~ubuntu-branches/ubuntu/saucy/gnome-screensaver/saucy-proposed

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-12-19 18:37:44 UTC
  • mto: (1.4.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051219183744-c8xqhevfb3j7xde3
Tags: upstream-0.0.23
Import upstream version 0.0.23

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
2
2
 
3
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
 
# Free Software Foundation, Inc.
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
4
# 2005  Free Software Foundation, Inc.
5
5
# This file is free software; the Free Software Foundation
6
6
# gives unlimited permission to copy and/or distribute it,
7
7
# with or without modifications, as long as this notice is preserved.
11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
13
13
 
14
 
# Do all the work for Automake.                            -*- Autoconf -*-
15
 
 
16
 
# This macro actually does too much some checks are only needed if
17
 
# your package does certain things.  But this isn't really a big deal.
18
 
 
19
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
20
 
# Free Software Foundation, Inc.
21
 
 
22
 
# This program is free software; you can redistribute it and/or modify
23
 
# it under the terms of the GNU General Public License as published by
24
 
# the Free Software Foundation; either version 2, or (at your option)
25
 
# any later version.
26
 
 
27
 
# This program is distributed in the hope that it will be useful,
28
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
29
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30
 
# GNU General Public License for more details.
31
 
 
32
 
# You should have received a copy of the GNU General Public License
33
 
# along with this program; if not, write to the Free Software
34
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
35
 
# 02111-1307, USA.
36
 
 
37
 
# serial 10
38
 
 
39
 
AC_PREREQ([2.54])
40
 
 
41
 
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
42
 
# the ones we care about.
43
 
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
44
 
 
45
 
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
46
 
# AM_INIT_AUTOMAKE([OPTIONS])
47
 
# -----------------------------------------------
48
 
# The call with PACKAGE and VERSION arguments is the old style
49
 
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
50
 
# and VERSION should now be passed to AC_INIT and removed from
51
 
# the call to AM_INIT_AUTOMAKE.
52
 
# We support both call styles for the transition.  After
53
 
# the next Automake release, Autoconf can make the AC_INIT
54
 
# arguments mandatory, and then we can depend on a new Autoconf
55
 
# release and drop the old call support.
56
 
AC_DEFUN([AM_INIT_AUTOMAKE],
57
 
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
58
 
 AC_REQUIRE([AC_PROG_INSTALL])dnl
59
 
# test to see if srcdir already configured
60
 
if test "`cd $srcdir && pwd`" != "`pwd`" &&
61
 
   test -f $srcdir/config.status; then
62
 
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
63
 
fi
64
 
 
65
 
# test whether we have cygpath
66
 
if test -z "$CYGPATH_W"; then
67
 
  if (cygpath --version) >/dev/null 2>/dev/null; then
68
 
    CYGPATH_W='cygpath -w'
69
 
  else
70
 
    CYGPATH_W=echo
71
 
  fi
72
 
fi
73
 
AC_SUBST([CYGPATH_W])
74
 
 
75
 
# Define the identity of the package.
76
 
dnl Distinguish between old-style and new-style calls.
77
 
m4_ifval([$2],
78
 
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
79
 
 AC_SUBST([PACKAGE], [$1])dnl
80
 
 AC_SUBST([VERSION], [$2])],
81
 
[_AM_SET_OPTIONS([$1])dnl
82
 
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
83
 
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
84
 
 
85
 
_AM_IF_OPTION([no-define],,
86
 
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
87
 
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
88
 
 
89
 
# Some tools Automake needs.
90
 
AC_REQUIRE([AM_SANITY_CHECK])dnl
91
 
AC_REQUIRE([AC_ARG_PROGRAM])dnl
92
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
93
 
AM_MISSING_PROG(AUTOCONF, autoconf)
94
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
95
 
AM_MISSING_PROG(AUTOHEADER, autoheader)
96
 
AM_MISSING_PROG(MAKEINFO, makeinfo)
97
 
AM_MISSING_PROG(AMTAR, tar)
98
 
AM_PROG_INSTALL_SH
99
 
AM_PROG_INSTALL_STRIP
100
 
# We need awk for the "check" target.  The system "awk" is bad on
101
 
# some platforms.
102
 
AC_REQUIRE([AC_PROG_AWK])dnl
103
 
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
104
 
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
105
 
 
106
 
_AM_IF_OPTION([no-dependencies],,
107
 
[AC_PROVIDE_IFELSE([AC_PROG_CC],
108
 
                  [_AM_DEPENDENCIES(CC)],
109
 
                  [define([AC_PROG_CC],
110
 
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
111
 
AC_PROVIDE_IFELSE([AC_PROG_CXX],
112
 
                  [_AM_DEPENDENCIES(CXX)],
113
 
                  [define([AC_PROG_CXX],
114
 
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
115
 
])
116
 
])
117
 
 
118
 
 
119
 
# When config.status generates a header, we must update the stamp-h file.
120
 
# This file resides in the same directory as the config header
121
 
# that is generated.  The stamp files are numbered to have different names.
122
 
 
123
 
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
124
 
# loop where config.status creates the headers, so we can generate
125
 
# our stamp files there.
126
 
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
127
 
[# Compute $1's index in $config_headers.
128
 
_am_stamp_count=1
129
 
for _am_header in $config_headers :; do
130
 
  case $_am_header in
131
 
    $1 | $1:* )
132
 
      break ;;
133
 
    * )
134
 
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
135
 
  esac
136
 
done
137
 
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
138
 
 
139
 
# Copyright 2002  Free Software Foundation, Inc.
140
 
 
141
 
# This program is free software; you can redistribute it and/or modify
142
 
# it under the terms of the GNU General Public License as published by
143
 
# the Free Software Foundation; either version 2, or (at your option)
144
 
# any later version.
145
 
 
146
 
# This program is distributed in the hope that it will be useful,
147
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
148
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
149
 
# GNU General Public License for more details.
150
 
 
151
 
# You should have received a copy of the GNU General Public License
152
 
# along with this program; if not, write to the Free Software
153
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
14
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
 
15
#
 
16
# This file is free software; the Free Software Foundation
 
17
# gives unlimited permission to copy and/or distribute it,
 
18
# with or without modifications, as long as this notice is preserved.
154
19
 
155
20
# AM_AUTOMAKE_VERSION(VERSION)
156
21
# ----------------------------
157
22
# Automake X.Y traces this macro to ensure aclocal.m4 has been
158
23
# generated from the m4 files accompanying Automake X.Y.
159
 
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
 
24
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
160
25
 
161
26
# AM_SET_CURRENT_AUTOMAKE_VERSION
162
27
# -------------------------------
163
28
# Call AM_AUTOMAKE_VERSION so it can be traced.
164
29
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
165
30
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166
 
         [AM_AUTOMAKE_VERSION([1.7.9])])
167
 
 
168
 
# Helper functions for option handling.                    -*- Autoconf -*-
169
 
 
170
 
# Copyright 2001, 2002  Free Software Foundation, Inc.
171
 
 
172
 
# This program is free software; you can redistribute it and/or modify
173
 
# it under the terms of the GNU General Public License as published by
174
 
# the Free Software Foundation; either version 2, or (at your option)
175
 
# any later version.
176
 
 
177
 
# This program is distributed in the hope that it will be useful,
178
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
179
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
180
 
# GNU General Public License for more details.
181
 
 
182
 
# You should have received a copy of the GNU General Public License
183
 
# along with this program; if not, write to the Free Software
184
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
185
 
# 02111-1307, USA.
186
 
 
187
 
# serial 2
188
 
 
189
 
# _AM_MANGLE_OPTION(NAME)
190
 
# -----------------------
191
 
AC_DEFUN([_AM_MANGLE_OPTION],
192
 
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
193
 
 
194
 
# _AM_SET_OPTION(NAME)
195
 
# ------------------------------
196
 
# Set option NAME.  Presently that only means defining a flag for this option.
197
 
AC_DEFUN([_AM_SET_OPTION],
198
 
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
199
 
 
200
 
# _AM_SET_OPTIONS(OPTIONS)
201
 
# ----------------------------------
202
 
# OPTIONS is a space-separated list of Automake options.
203
 
AC_DEFUN([_AM_SET_OPTIONS],
204
 
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
205
 
 
206
 
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
207
 
# -------------------------------------------
208
 
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
209
 
AC_DEFUN([_AM_IF_OPTION],
210
 
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
211
 
 
212
 
#
213
 
# Check to make sure that the build environment is sane.
214
 
#
215
 
 
216
 
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
217
 
 
218
 
# This program is free software; you can redistribute it and/or modify
219
 
# it under the terms of the GNU General Public License as published by
220
 
# the Free Software Foundation; either version 2, or (at your option)
221
 
# any later version.
222
 
 
223
 
# This program is distributed in the hope that it will be useful,
224
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
225
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
226
 
# GNU General Public License for more details.
227
 
 
228
 
# You should have received a copy of the GNU General Public License
229
 
# along with this program; if not, write to the Free Software
230
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
231
 
# 02111-1307, USA.
232
 
 
233
 
# serial 3
234
 
 
235
 
# AM_SANITY_CHECK
236
 
# ---------------
237
 
AC_DEFUN([AM_SANITY_CHECK],
238
 
[AC_MSG_CHECKING([whether build environment is sane])
239
 
# Just in case
240
 
sleep 1
241
 
echo timestamp > conftest.file
242
 
# Do `set' in a subshell so we don't clobber the current shell's
243
 
# arguments.  Must try -L first in case configure is actually a
244
 
# symlink; some systems play weird games with the mod time of symlinks
245
 
# (eg FreeBSD returns the mod time of the symlink's containing
246
 
# directory).
247
 
if (
248
 
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
249
 
   if test "$[*]" = "X"; then
250
 
      # -L didn't work.
251
 
      set X `ls -t $srcdir/configure conftest.file`
252
 
   fi
253
 
   rm -f conftest.file
254
 
   if test "$[*]" != "X $srcdir/configure conftest.file" \
255
 
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
256
 
 
257
 
      # If neither matched, then we have a broken ls.  This can happen
258
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
259
 
      # broken ls alias from the environment.  This has actually
260
 
      # happened.  Such a system could not be considered "sane".
261
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
262
 
alias in your environment])
263
 
   fi
264
 
 
265
 
   test "$[2]" = conftest.file
266
 
   )
267
 
then
268
 
   # Ok.
269
 
   :
270
 
else
271
 
   AC_MSG_ERROR([newly created file is older than distributed files!
272
 
Check your system clock])
273
 
fi
274
 
AC_MSG_RESULT(yes)])
275
 
 
276
 
#  -*- Autoconf -*-
277
 
 
278
 
 
279
 
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
280
 
 
281
 
# This program is free software; you can redistribute it and/or modify
282
 
# it under the terms of the GNU General Public License as published by
283
 
# the Free Software Foundation; either version 2, or (at your option)
284
 
# any later version.
285
 
 
286
 
# This program is distributed in the hope that it will be useful,
287
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
288
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
289
 
# GNU General Public License for more details.
290
 
 
291
 
# You should have received a copy of the GNU General Public License
292
 
# along with this program; if not, write to the Free Software
293
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
294
 
# 02111-1307, USA.
295
 
 
296
 
# serial 3
297
 
 
298
 
# AM_MISSING_PROG(NAME, PROGRAM)
299
 
# ------------------------------
300
 
AC_DEFUN([AM_MISSING_PROG],
301
 
[AC_REQUIRE([AM_MISSING_HAS_RUN])
302
 
$1=${$1-"${am_missing_run}$2"}
303
 
AC_SUBST($1)])
304
 
 
305
 
 
306
 
# AM_MISSING_HAS_RUN
307
 
# ------------------
308
 
# Define MISSING if not defined so far and test if it supports --run.
309
 
# If it does, set am_missing_run to use it, otherwise, to nothing.
310
 
AC_DEFUN([AM_MISSING_HAS_RUN],
311
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
312
 
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
313
 
# Use eval to expand $SHELL
314
 
if eval "$MISSING --run true"; then
315
 
  am_missing_run="$MISSING --run "
316
 
else
317
 
  am_missing_run=
318
 
  AC_MSG_WARN([`missing' script is too old or missing])
319
 
fi
320
 
])
321
 
 
322
 
# AM_AUX_DIR_EXPAND
323
 
 
324
 
# Copyright 2001 Free Software Foundation, Inc.
325
 
 
326
 
# This program is free software; you can redistribute it and/or modify
327
 
# it under the terms of the GNU General Public License as published by
328
 
# the Free Software Foundation; either version 2, or (at your option)
329
 
# any later version.
330
 
 
331
 
# This program is distributed in the hope that it will be useful,
332
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
333
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
334
 
# GNU General Public License for more details.
335
 
 
336
 
# You should have received a copy of the GNU General Public License
337
 
# along with this program; if not, write to the Free Software
338
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
339
 
# 02111-1307, USA.
 
31
         [AM_AUTOMAKE_VERSION([1.9.5])])
 
32
 
 
33
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
34
 
 
35
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
36
#
 
37
# This file is free software; the Free Software Foundation
 
38
# gives unlimited permission to copy and/or distribute it,
 
39
# with or without modifications, as long as this notice is preserved.
340
40
 
341
41
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
342
42
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
376
76
# absolute PATH.  The drawback is that using absolute paths prevent a
377
77
# configured tree to be moved without reconfiguration.
378
78
 
379
 
# Rely on autoconf to set up CDPATH properly.
380
 
AC_PREREQ([2.50])
381
 
 
382
 
AC_DEFUN([AM_AUX_DIR_EXPAND], [
 
79
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
80
[dnl Rely on autoconf to set up CDPATH properly.
 
81
AC_PREREQ([2.50])dnl
383
82
# expand $ac_aux_dir to an absolute path
384
83
am_aux_dir=`cd $ac_aux_dir && pwd`
385
84
])
386
85
 
387
 
# AM_PROG_INSTALL_SH
388
 
# ------------------
389
 
# Define $install_sh.
390
 
 
391
 
# Copyright 2001 Free Software Foundation, Inc.
392
 
 
393
 
# This program is free software; you can redistribute it and/or modify
394
 
# it under the terms of the GNU General Public License as published by
395
 
# the Free Software Foundation; either version 2, or (at your option)
396
 
# any later version.
397
 
 
398
 
# This program is distributed in the hope that it will be useful,
399
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
400
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
401
 
# GNU General Public License for more details.
402
 
 
403
 
# You should have received a copy of the GNU General Public License
404
 
# along with this program; if not, write to the Free Software
405
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
406
 
# 02111-1307, USA.
407
 
 
408
 
AC_DEFUN([AM_PROG_INSTALL_SH],
409
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
410
 
install_sh=${install_sh-"$am_aux_dir/install-sh"}
411
 
AC_SUBST(install_sh)])
412
 
 
413
 
# AM_PROG_INSTALL_STRIP
414
 
 
415
 
# Copyright 2001 Free Software Foundation, Inc.
416
 
 
417
 
# This program is free software; you can redistribute it and/or modify
418
 
# it under the terms of the GNU General Public License as published by
419
 
# the Free Software Foundation; either version 2, or (at your option)
420
 
# any later version.
421
 
 
422
 
# This program is distributed in the hope that it will be useful,
423
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
424
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
425
 
# GNU General Public License for more details.
426
 
 
427
 
# You should have received a copy of the GNU General Public License
428
 
# along with this program; if not, write to the Free Software
429
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
430
 
# 02111-1307, USA.
431
 
 
432
 
# One issue with vendor `install' (even GNU) is that you can't
433
 
# specify the program used to strip binaries.  This is especially
434
 
# annoying in cross-compiling environments, where the build's strip
435
 
# is unlikely to handle the host's binaries.
436
 
# Fortunately install-sh will honor a STRIPPROG variable, so we
437
 
# always use install-sh in `make install-strip', and initialize
438
 
# STRIPPROG with the value of the STRIP variable (set by the user).
439
 
AC_DEFUN([AM_PROG_INSTALL_STRIP],
440
 
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
441
 
# Installed binaries are usually stripped using `strip' when the user
442
 
# run `make install-strip'.  However `strip' might not be the right
443
 
# tool to use in cross-compilation environments, therefore Automake
444
 
# will honor the `STRIP' environment variable to overrule this program.
445
 
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
446
 
if test "$cross_compiling" != no; then
447
 
  AC_CHECK_TOOL([STRIP], [strip], :)
448
 
fi
449
 
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
450
 
AC_SUBST([INSTALL_STRIP_PROGRAM])])
451
 
 
452
 
#                                                          -*- Autoconf -*-
453
 
# Copyright (C) 2003  Free Software Foundation, Inc.
454
 
 
455
 
# This program is free software; you can redistribute it and/or modify
456
 
# it under the terms of the GNU General Public License as published by
457
 
# the Free Software Foundation; either version 2, or (at your option)
458
 
# any later version.
459
 
 
460
 
# This program is distributed in the hope that it will be useful,
461
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
462
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
463
 
# GNU General Public License for more details.
464
 
 
465
 
# You should have received a copy of the GNU General Public License
466
 
# along with this program; if not, write to the Free Software
467
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
468
 
# 02111-1307, USA.
469
 
 
470
 
# serial 1
471
 
 
472
 
# Check whether the underlying file-system supports filenames
473
 
# with a leading dot.  For instance MS-DOS doesn't.
474
 
AC_DEFUN([AM_SET_LEADING_DOT],
475
 
[rm -rf .tst 2>/dev/null
476
 
mkdir .tst 2>/dev/null
477
 
if test -d .tst; then
478
 
  am__leading_dot=.
 
86
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
87
 
 
88
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
 
89
# Free Software Foundation, Inc.
 
90
#
 
91
# This file is free software; the Free Software Foundation
 
92
# gives unlimited permission to copy and/or distribute it,
 
93
# with or without modifications, as long as this notice is preserved.
 
94
 
 
95
# serial 7
 
96
 
 
97
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
98
# -------------------------------------
 
99
# Define a conditional.
 
100
AC_DEFUN([AM_CONDITIONAL],
 
101
[AC_PREREQ(2.52)dnl
 
102
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
103
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
104
AC_SUBST([$1_TRUE])
 
105
AC_SUBST([$1_FALSE])
 
106
if $2; then
 
107
  $1_TRUE=
 
108
  $1_FALSE='#'
479
109
else
480
 
  am__leading_dot=_
 
110
  $1_TRUE='#'
 
111
  $1_FALSE=
481
112
fi
482
 
rmdir .tst 2>/dev/null
483
 
AC_SUBST([am__leading_dot])])
484
 
 
485
 
# serial 5                                              -*- Autoconf -*-
486
 
 
487
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
488
 
 
489
 
# This program is free software; you can redistribute it and/or modify
490
 
# it under the terms of the GNU General Public License as published by
491
 
# the Free Software Foundation; either version 2, or (at your option)
492
 
# any later version.
493
 
 
494
 
# This program is distributed in the hope that it will be useful,
495
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
496
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
497
 
# GNU General Public License for more details.
498
 
 
499
 
# You should have received a copy of the GNU General Public License
500
 
# along with this program; if not, write to the Free Software
501
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
502
 
# 02111-1307, USA.
503
 
 
 
113
AC_CONFIG_COMMANDS_PRE(
 
114
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
115
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
116
Usually this means the macro was only invoked conditionally.]])
 
117
fi])])
 
118
 
 
119
 
 
120
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
121
# Free Software Foundation, Inc.
 
122
#
 
123
# This file is free software; the Free Software Foundation
 
124
# gives unlimited permission to copy and/or distribute it,
 
125
# with or without modifications, as long as this notice is preserved.
 
126
 
 
127
# serial 8
504
128
 
505
129
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
506
130
# written in clear, in which case automake, when reading aclocal.m4,
509
133
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
510
134
 
511
135
 
512
 
 
513
136
# _AM_DEPENDENCIES(NAME)
514
137
# ----------------------
515
138
# See how the compiler implements dependency checking.
568
191
    : > sub/conftest.c
569
192
    for i in 1 2 3 4 5 6; do
570
193
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
571
 
      : > sub/conftst$i.h
 
194
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
195
      # Solaris 8's {/usr,}/bin/sh.
 
196
      touch sub/conftst$i.h
572
197
    done
573
198
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
574
199
 
596
221
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
597
222
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
598
223
      # icc doesn't choke on unknown options, it will just issue warnings
599
 
      # (even with -Werror).  So we grep stderr for any message
600
 
      # that says an option was ignored.
601
 
      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
 
224
      # or remarks (even with -Werror).  So we grep stderr for any message
 
225
      # that says an option was ignored or not supported.
 
226
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
227
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
228
      # The diagnosis changed in icc 8.0:
 
229
      #   icc: Command line remark: option '-MP' not supported
 
230
      if (grep 'ignoring option' conftest.err ||
 
231
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
602
232
        am_cv_$1_dependencies_compiler_type=$depmode
603
233
        break
604
234
      fi
632
262
# ------------
633
263
AC_DEFUN([AM_DEP_TRACK],
634
264
[AC_ARG_ENABLE(dependency-tracking,
635
 
[  --disable-dependency-tracking Speeds up one-time builds
636
 
  --enable-dependency-tracking  Do not reject slow dependency extractors])
 
265
[  --disable-dependency-tracking  speeds up one-time build
 
266
  --enable-dependency-tracking   do not reject slow dependency extractors])
637
267
if test "x$enable_dependency_tracking" != xno; then
638
268
  am_depcomp="$ac_aux_dir/depcomp"
639
269
  AMDEPBACKSLASH='\'
642
272
AC_SUBST([AMDEPBACKSLASH])
643
273
])
644
274
 
645
 
# Generate code to set up dependency tracking.   -*- Autoconf -*-
646
 
 
647
 
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
648
 
 
649
 
# This program is free software; you can redistribute it and/or modify
650
 
# it under the terms of the GNU General Public License as published by
651
 
# the Free Software Foundation; either version 2, or (at your option)
652
 
# any later version.
653
 
 
654
 
# This program is distributed in the hope that it will be useful,
655
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
656
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
657
 
# GNU General Public License for more details.
658
 
 
659
 
# You should have received a copy of the GNU General Public License
660
 
# along with this program; if not, write to the Free Software
661
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
662
 
# 02111-1307, USA.
663
 
 
664
 
#serial 2
 
275
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
276
 
 
277
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
278
# Free Software Foundation, Inc.
 
279
#
 
280
# This file is free software; the Free Software Foundation
 
281
# gives unlimited permission to copy and/or distribute it,
 
282
# with or without modifications, as long as this notice is preserved.
 
283
 
 
284
#serial 3
665
285
 
666
286
# _AM_OUTPUT_DEPENDENCY_COMMANDS
667
287
# ------------------------------
680
300
  else
681
301
    continue
682
302
  fi
683
 
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
684
 
  # Extract the definition of DEP_FILES from the Makefile without
685
 
  # running `make'.
686
 
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
 
303
  # Extract the definition of DEPDIR, am__include, and am__quote
 
304
  # from the Makefile without running `make'.
 
305
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
687
306
  test -z "$DEPDIR" && continue
 
307
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
308
  test -z "am__include" && continue
 
309
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
688
310
  # When using ansi2knr, U may be empty or an underscore; expand it
689
 
  U=`sed -n -e '/^U = / s///p' < "$mf"`
690
 
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
691
 
  # We invoke sed twice because it is the simplest approach to
692
 
  # changing $(DEPDIR) to its actual value in the expansion.
693
 
  for file in `sed -n -e '
694
 
    /^DEP_FILES = .*\\\\$/ {
695
 
      s/^DEP_FILES = //
696
 
      :loop
697
 
        s/\\\\$//
698
 
        p
699
 
        n
700
 
        /\\\\$/ b loop
701
 
      p
702
 
    }
703
 
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
 
311
  U=`sed -n 's/^U = //p' < "$mf"`
 
312
  # Find all dependency output files, they are included files with
 
313
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
314
  # simplest approach to changing $(DEPDIR) to its actual value in the
 
315
  # expansion.
 
316
  for file in `sed -n "
 
317
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
704
318
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
705
319
    # Make sure the directory exists.
706
320
    test -f "$dirpart/$file" && continue
726
340
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
727
341
])
728
342
 
729
 
# Check to see how 'make' treats includes.      -*- Autoconf -*-
730
 
 
731
 
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
732
 
 
733
 
# This program is free software; you can redistribute it and/or modify
734
 
# it under the terms of the GNU General Public License as published by
735
 
# the Free Software Foundation; either version 2, or (at your option)
736
 
# any later version.
737
 
 
738
 
# This program is distributed in the hope that it will be useful,
739
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
740
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
741
 
# GNU General Public License for more details.
742
 
 
743
 
# You should have received a copy of the GNU General Public License
744
 
# along with this program; if not, write to the Free Software
745
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
746
 
# 02111-1307, USA.
 
343
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
344
# Free Software Foundation, Inc.
 
345
#
 
346
# This file is free software; the Free Software Foundation
 
347
# gives unlimited permission to copy and/or distribute it,
 
348
# with or without modifications, as long as this notice is preserved.
 
349
 
 
350
# serial 8
 
351
 
 
352
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
353
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
354
 
 
355
# Do all the work for Automake.                             -*- Autoconf -*-
 
356
 
 
357
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
358
# Free Software Foundation, Inc.
 
359
#
 
360
# This file is free software; the Free Software Foundation
 
361
# gives unlimited permission to copy and/or distribute it,
 
362
# with or without modifications, as long as this notice is preserved.
 
363
 
 
364
# serial 12
 
365
 
 
366
# This macro actually does too much.  Some checks are only needed if
 
367
# your package does certain things.  But this isn't really a big deal.
 
368
 
 
369
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
370
# AM_INIT_AUTOMAKE([OPTIONS])
 
371
# -----------------------------------------------
 
372
# The call with PACKAGE and VERSION arguments is the old style
 
373
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
374
# and VERSION should now be passed to AC_INIT and removed from
 
375
# the call to AM_INIT_AUTOMAKE.
 
376
# We support both call styles for the transition.  After
 
377
# the next Automake release, Autoconf can make the AC_INIT
 
378
# arguments mandatory, and then we can depend on a new Autoconf
 
379
# release and drop the old call support.
 
380
AC_DEFUN([AM_INIT_AUTOMAKE],
 
381
[AC_PREREQ([2.58])dnl
 
382
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
383
dnl the ones we care about.
 
384
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
385
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
386
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
387
# test to see if srcdir already configured
 
388
if test "`cd $srcdir && pwd`" != "`pwd`" &&
 
389
   test -f $srcdir/config.status; then
 
390
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
391
fi
 
392
 
 
393
# test whether we have cygpath
 
394
if test -z "$CYGPATH_W"; then
 
395
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
396
    CYGPATH_W='cygpath -w'
 
397
  else
 
398
    CYGPATH_W=echo
 
399
  fi
 
400
fi
 
401
AC_SUBST([CYGPATH_W])
 
402
 
 
403
# Define the identity of the package.
 
404
dnl Distinguish between old-style and new-style calls.
 
405
m4_ifval([$2],
 
406
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
407
 AC_SUBST([PACKAGE], [$1])dnl
 
408
 AC_SUBST([VERSION], [$2])],
 
409
[_AM_SET_OPTIONS([$1])dnl
 
410
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
411
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
412
 
 
413
_AM_IF_OPTION([no-define],,
 
414
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
415
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
416
 
 
417
# Some tools Automake needs.
 
418
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
419
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
420
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
421
AM_MISSING_PROG(AUTOCONF, autoconf)
 
422
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
423
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
424
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
425
AM_PROG_INSTALL_SH
 
426
AM_PROG_INSTALL_STRIP
 
427
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
428
# We need awk for the "check" target.  The system "awk" is bad on
 
429
# some platforms.
 
430
AC_REQUIRE([AC_PROG_AWK])dnl
 
431
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
432
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
433
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
434
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
435
                             [_AM_PROG_TAR([v7])])])
 
436
_AM_IF_OPTION([no-dependencies],,
 
437
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
438
                  [_AM_DEPENDENCIES(CC)],
 
439
                  [define([AC_PROG_CC],
 
440
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
441
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
442
                  [_AM_DEPENDENCIES(CXX)],
 
443
                  [define([AC_PROG_CXX],
 
444
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
445
])
 
446
])
 
447
 
 
448
 
 
449
# When config.status generates a header, we must update the stamp-h file.
 
450
# This file resides in the same directory as the config header
 
451
# that is generated.  The stamp files are numbered to have different names.
 
452
 
 
453
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
454
# loop where config.status creates the headers, so we can generate
 
455
# our stamp files there.
 
456
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
457
[# Compute $1's index in $config_headers.
 
458
_am_stamp_count=1
 
459
for _am_header in $config_headers :; do
 
460
  case $_am_header in
 
461
    $1 | $1:* )
 
462
      break ;;
 
463
    * )
 
464
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
465
  esac
 
466
done
 
467
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
468
 
 
469
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
470
#
 
471
# This file is free software; the Free Software Foundation
 
472
# gives unlimited permission to copy and/or distribute it,
 
473
# with or without modifications, as long as this notice is preserved.
 
474
 
 
475
# AM_PROG_INSTALL_SH
 
476
# ------------------
 
477
# Define $install_sh.
 
478
AC_DEFUN([AM_PROG_INSTALL_SH],
 
479
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
480
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
481
AC_SUBST(install_sh)])
 
482
 
 
483
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
484
#
 
485
# This file is free software; the Free Software Foundation
 
486
# gives unlimited permission to copy and/or distribute it,
 
487
# with or without modifications, as long as this notice is preserved.
747
488
 
748
489
# serial 2
749
490
 
 
491
# Check whether the underlying file-system supports filenames
 
492
# with a leading dot.  For instance MS-DOS doesn't.
 
493
AC_DEFUN([AM_SET_LEADING_DOT],
 
494
[rm -rf .tst 2>/dev/null
 
495
mkdir .tst 2>/dev/null
 
496
if test -d .tst; then
 
497
  am__leading_dot=.
 
498
else
 
499
  am__leading_dot=_
 
500
fi
 
501
rmdir .tst 2>/dev/null
 
502
AC_SUBST([am__leading_dot])])
 
503
 
 
504
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 
505
# From Jim Meyering
 
506
 
 
507
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
 
508
# Free Software Foundation, Inc.
 
509
#
 
510
# This file is free software; the Free Software Foundation
 
511
# gives unlimited permission to copy and/or distribute it,
 
512
# with or without modifications, as long as this notice is preserved.
 
513
 
 
514
# serial 4
 
515
 
 
516
AC_DEFUN([AM_MAINTAINER_MODE],
 
517
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 
518
  dnl maintainer-mode is disabled by default
 
519
  AC_ARG_ENABLE(maintainer-mode,
 
520
[  --enable-maintainer-mode  enable make rules and dependencies not useful
 
521
                          (and sometimes confusing) to the casual installer],
 
522
      USE_MAINTAINER_MODE=$enableval,
 
523
      USE_MAINTAINER_MODE=no)
 
524
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
 
525
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
 
526
  MAINT=$MAINTAINER_MODE_TRUE
 
527
  AC_SUBST(MAINT)dnl
 
528
]
 
529
)
 
530
 
 
531
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
532
 
 
533
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
534
 
 
535
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
536
#
 
537
# This file is free software; the Free Software Foundation
 
538
# gives unlimited permission to copy and/or distribute it,
 
539
# with or without modifications, as long as this notice is preserved.
 
540
 
 
541
# serial 3
 
542
 
750
543
# AM_MAKE_INCLUDE()
751
544
# -----------------
752
545
# Check to see how make treats includes.
789
582
rm -f confinc confmf
790
583
])
791
584
 
792
 
# AM_CONDITIONAL                                              -*- Autoconf -*-
793
 
 
794
 
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
795
 
 
796
 
# This program is free software; you can redistribute it and/or modify
797
 
# it under the terms of the GNU General Public License as published by
798
 
# the Free Software Foundation; either version 2, or (at your option)
799
 
# any later version.
800
 
 
801
 
# This program is distributed in the hope that it will be useful,
802
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
803
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
804
 
# GNU General Public License for more details.
805
 
 
806
 
# You should have received a copy of the GNU General Public License
807
 
# along with this program; if not, write to the Free Software
808
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
809
 
# 02111-1307, USA.
810
 
 
811
 
# serial 5
812
 
 
813
 
AC_PREREQ(2.52)
814
 
 
815
 
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
816
 
# -------------------------------------
817
 
# Define a conditional.
818
 
AC_DEFUN([AM_CONDITIONAL],
819
 
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
820
 
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
821
 
AC_SUBST([$1_TRUE])
822
 
AC_SUBST([$1_FALSE])
823
 
if $2; then
824
 
  $1_TRUE=
825
 
  $1_FALSE='#'
826
 
else
827
 
  $1_TRUE='#'
828
 
  $1_FALSE=
829
 
fi
830
 
AC_CONFIG_COMMANDS_PRE(
831
 
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
832
 
  AC_MSG_ERROR([conditional "$1" was never defined.
833
 
Usually this means the macro was only invoked conditionally.])
834
 
fi])])
835
 
 
836
 
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
837
 
 
838
 
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
839
 
 
840
 
# This program is free software; you can redistribute it and/or modify
841
 
# it under the terms of the GNU General Public License as published by
842
 
# the Free Software Foundation; either version 2, or (at your option)
843
 
# any later version.
844
 
 
845
 
# This program is distributed in the hope that it will be useful,
846
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
847
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
848
 
# GNU General Public License for more details.
849
 
 
850
 
# You should have received a copy of the GNU General Public License
851
 
# along with this program; if not, write to the Free Software
852
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
853
 
# 02111-1307, USA.
854
 
 
855
 
AC_PREREQ([2.52])
856
 
 
857
 
# serial 6
858
 
 
859
 
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
860
 
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
861
 
 
862
 
# Add --enable-maintainer-mode option to configure.
863
 
# From Jim Meyering
864
 
 
865
 
# Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
866
 
 
867
 
# This program is free software; you can redistribute it and/or modify
868
 
# it under the terms of the GNU General Public License as published by
869
 
# the Free Software Foundation; either version 2, or (at your option)
870
 
# any later version.
871
 
 
872
 
# This program is distributed in the hope that it will be useful,
873
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
874
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
875
 
# GNU General Public License for more details.
876
 
 
877
 
# You should have received a copy of the GNU General Public License
878
 
# along with this program; if not, write to the Free Software
879
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
880
 
# 02111-1307, USA.
 
585
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
586
 
 
587
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
 
588
# Free Software Foundation, Inc.
 
589
#
 
590
# This file is free software; the Free Software Foundation
 
591
# gives unlimited permission to copy and/or distribute it,
 
592
# with or without modifications, as long as this notice is preserved.
 
593
 
 
594
# serial 4
 
595
 
 
596
# AM_MISSING_PROG(NAME, PROGRAM)
 
597
# ------------------------------
 
598
AC_DEFUN([AM_MISSING_PROG],
 
599
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
600
$1=${$1-"${am_missing_run}$2"}
 
601
AC_SUBST($1)])
 
602
 
 
603
 
 
604
# AM_MISSING_HAS_RUN
 
605
# ------------------
 
606
# Define MISSING if not defined so far and test if it supports --run.
 
607
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
608
AC_DEFUN([AM_MISSING_HAS_RUN],
 
609
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
610
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
611
# Use eval to expand $SHELL
 
612
if eval "$MISSING --run true"; then
 
613
  am_missing_run="$MISSING --run "
 
614
else
 
615
  am_missing_run=
 
616
  AC_MSG_WARN([`missing' script is too old or missing])
 
617
fi
 
618
])
 
619
 
 
620
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
 
621
#
 
622
# This file is free software; the Free Software Foundation
 
623
# gives unlimited permission to copy and/or distribute it,
 
624
# with or without modifications, as long as this notice is preserved.
 
625
 
 
626
# AM_PROG_MKDIR_P
 
627
# ---------------
 
628
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
 
629
#
 
630
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
 
631
# created by `make install' are always world readable, even if the
 
632
# installer happens to have an overly restrictive umask (e.g. 077).
 
633
# This was a mistake.  There are at least two reasons why we must not
 
634
# use `-m 0755':
 
635
#   - it causes special bits like SGID to be ignored,
 
636
#   - it may be too restrictive (some setups expect 775 directories).
 
637
#
 
638
# Do not use -m 0755 and let people choose whatever they expect by
 
639
# setting umask.
 
640
#
 
641
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
 
642
# Some implementations (such as Solaris 8's) are not thread-safe: if a
 
643
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
 
644
# concurrently, both version can detect that a/ is missing, but only
 
645
# one can create it and the other will error out.  Consequently we
 
646
# restrict ourselves to GNU make (using the --version option ensures
 
647
# this.)
 
648
AC_DEFUN([AM_PROG_MKDIR_P],
 
649
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
 
650
  # We used to keeping the `.' as first argument, in order to
 
651
  # allow $(mkdir_p) to be used without argument.  As in
 
652
  #   $(mkdir_p) $(somedir)
 
653
  # where $(somedir) is conditionally defined.  However this is wrong
 
654
  # for two reasons:
 
655
  #  1. if the package is installed by a user who cannot write `.'
 
656
  #     make install will fail,
 
657
  #  2. the above comment should most certainly read
 
658
  #     $(mkdir_p) $(DESTDIR)$(somedir)
 
659
  #     so it does not work when $(somedir) is undefined and
 
660
  #     $(DESTDIR) is not.
 
661
  #  To support the latter case, we have to write
 
662
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
 
663
  #  so the `.' trick is pointless.
 
664
  mkdir_p='mkdir -p --'
 
665
else
 
666
  # On NextStep and OpenStep, the `mkdir' command does not
 
667
  # recognize any option.  It will interpret all options as
 
668
  # directories to create, and then abort because `.' already
 
669
  # exists.
 
670
  for d in ./-p ./--version;
 
671
  do
 
672
    test -d $d && rmdir $d
 
673
  done
 
674
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
 
675
  if test -f "$ac_aux_dir/mkinstalldirs"; then
 
676
    mkdir_p='$(mkinstalldirs)'
 
677
  else
 
678
    mkdir_p='$(install_sh) -d'
 
679
  fi
 
680
fi
 
681
AC_SUBST([mkdir_p])])
 
682
 
 
683
# Helper functions for option handling.                     -*- Autoconf -*-
 
684
 
 
685
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
686
#
 
687
# This file is free software; the Free Software Foundation
 
688
# gives unlimited permission to copy and/or distribute it,
 
689
# with or without modifications, as long as this notice is preserved.
 
690
 
 
691
# serial 3
 
692
 
 
693
# _AM_MANGLE_OPTION(NAME)
 
694
# -----------------------
 
695
AC_DEFUN([_AM_MANGLE_OPTION],
 
696
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
697
 
 
698
# _AM_SET_OPTION(NAME)
 
699
# ------------------------------
 
700
# Set option NAME.  Presently that only means defining a flag for this option.
 
701
AC_DEFUN([_AM_SET_OPTION],
 
702
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
703
 
 
704
# _AM_SET_OPTIONS(OPTIONS)
 
705
# ----------------------------------
 
706
# OPTIONS is a space-separated list of Automake options.
 
707
AC_DEFUN([_AM_SET_OPTIONS],
 
708
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
709
 
 
710
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
711
# -------------------------------------------
 
712
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
713
AC_DEFUN([_AM_IF_OPTION],
 
714
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
715
 
 
716
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
717
 
 
718
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
719
# Free Software Foundation, Inc.
 
720
#
 
721
# This file is free software; the Free Software Foundation
 
722
# gives unlimited permission to copy and/or distribute it,
 
723
# with or without modifications, as long as this notice is preserved.
 
724
 
 
725
# serial 4
 
726
 
 
727
# AM_SANITY_CHECK
 
728
# ---------------
 
729
AC_DEFUN([AM_SANITY_CHECK],
 
730
[AC_MSG_CHECKING([whether build environment is sane])
 
731
# Just in case
 
732
sleep 1
 
733
echo timestamp > conftest.file
 
734
# Do `set' in a subshell so we don't clobber the current shell's
 
735
# arguments.  Must try -L first in case configure is actually a
 
736
# symlink; some systems play weird games with the mod time of symlinks
 
737
# (eg FreeBSD returns the mod time of the symlink's containing
 
738
# directory).
 
739
if (
 
740
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
741
   if test "$[*]" = "X"; then
 
742
      # -L didn't work.
 
743
      set X `ls -t $srcdir/configure conftest.file`
 
744
   fi
 
745
   rm -f conftest.file
 
746
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
747
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
748
 
 
749
      # If neither matched, then we have a broken ls.  This can happen
 
750
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
751
      # broken ls alias from the environment.  This has actually
 
752
      # happened.  Such a system could not be considered "sane".
 
753
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
754
alias in your environment])
 
755
   fi
 
756
 
 
757
   test "$[2]" = conftest.file
 
758
   )
 
759
then
 
760
   # Ok.
 
761
   :
 
762
else
 
763
   AC_MSG_ERROR([newly created file is older than distributed files!
 
764
Check your system clock])
 
765
fi
 
766
AC_MSG_RESULT(yes)])
 
767
 
 
768
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
769
#
 
770
# This file is free software; the Free Software Foundation
 
771
# gives unlimited permission to copy and/or distribute it,
 
772
# with or without modifications, as long as this notice is preserved.
 
773
 
 
774
# AM_PROG_INSTALL_STRIP
 
775
# ---------------------
 
776
# One issue with vendor `install' (even GNU) is that you can't
 
777
# specify the program used to strip binaries.  This is especially
 
778
# annoying in cross-compiling environments, where the build's strip
 
779
# is unlikely to handle the host's binaries.
 
780
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
781
# always use install-sh in `make install-strip', and initialize
 
782
# STRIPPROG with the value of the STRIP variable (set by the user).
 
783
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
784
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
785
# Installed binaries are usually stripped using `strip' when the user
 
786
# run `make install-strip'.  However `strip' might not be the right
 
787
# tool to use in cross-compilation environments, therefore Automake
 
788
# will honor the `STRIP' environment variable to overrule this program.
 
789
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
790
if test "$cross_compiling" != no; then
 
791
  AC_CHECK_TOOL([STRIP], [strip], :)
 
792
fi
 
793
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
794
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
795
 
 
796
# Check how to create a tarball.                            -*- Autoconf -*-
 
797
 
 
798
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
799
#
 
800
# This file is free software; the Free Software Foundation
 
801
# gives unlimited permission to copy and/or distribute it,
 
802
# with or without modifications, as long as this notice is preserved.
881
803
 
882
804
# serial 2
883
805
 
884
 
AC_DEFUN([AM_MAINTAINER_MODE],
885
 
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
886
 
  dnl maintainer-mode is disabled by default
887
 
  AC_ARG_ENABLE(maintainer-mode,
888
 
[  --enable-maintainer-mode enable make rules and dependencies not useful
889
 
                          (and sometimes confusing) to the casual installer],
890
 
      USE_MAINTAINER_MODE=$enableval,
891
 
      USE_MAINTAINER_MODE=no)
892
 
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
893
 
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
894
 
  MAINT=$MAINTAINER_MODE_TRUE
895
 
  AC_SUBST(MAINT)dnl
896
 
]
897
 
)
898
 
 
899
 
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
806
# _AM_PROG_TAR(FORMAT)
 
807
# --------------------
 
808
# Check how to create a tarball in format FORMAT.
 
809
# FORMAT should be one of `v7', `ustar', or `pax'.
 
810
#
 
811
# Substitute a variable $(am__tar) that is a command
 
812
# writing to stdout a FORMAT-tarball containing the directory
 
813
# $tardir.
 
814
#     tardir=directory && $(am__tar) > result.tar
 
815
#
 
816
# Substitute a variable $(am__untar) that extract such
 
817
# a tarball read from stdin.
 
818
#     $(am__untar) < result.tar
 
819
AC_DEFUN([_AM_PROG_TAR],
 
820
[# Always define AMTAR for backward compatibility.
 
821
AM_MISSING_PROG([AMTAR], [tar])
 
822
m4_if([$1], [v7],
 
823
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
824
     [m4_case([$1], [ustar],, [pax],,
 
825
              [m4_fatal([Unknown tar format])])
 
826
AC_MSG_CHECKING([how to create a $1 tar archive])
 
827
# Loop over all known methods to create a tar archive until one works.
 
828
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
829
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
830
# Do not fold the above two line into one, because Tru64 sh and
 
831
# Solaris sh will not grok spaces in the rhs of `-'.
 
832
for _am_tool in $_am_tools
 
833
do
 
834
  case $_am_tool in
 
835
  gnutar)
 
836
    for _am_tar in tar gnutar gtar;
 
837
    do
 
838
      AM_RUN_LOG([$_am_tar --version]) && break
 
839
    done
 
840
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
841
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
842
    am__untar="$_am_tar -xf -"
 
843
    ;;
 
844
  plaintar)
 
845
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
846
    # ustar tarball either.
 
847
    (tar --version) >/dev/null 2>&1 && continue
 
848
    am__tar='tar chf - "$$tardir"'
 
849
    am__tar_='tar chf - "$tardir"'
 
850
    am__untar='tar xf -'
 
851
    ;;
 
852
  pax)
 
853
    am__tar='pax -L -x $1 -w "$$tardir"'
 
854
    am__tar_='pax -L -x $1 -w "$tardir"'
 
855
    am__untar='pax -r'
 
856
    ;;
 
857
  cpio)
 
858
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
859
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
860
    am__untar='cpio -i -H $1 -d'
 
861
    ;;
 
862
  none)
 
863
    am__tar=false
 
864
    am__tar_=false
 
865
    am__untar=false
 
866
    ;;
 
867
  esac
 
868
 
 
869
  # If the value was cached, stop now.  We just wanted to have am__tar
 
870
  # and am__untar set.
 
871
  test -n "${am_cv_prog_tar_$1}" && break
 
872
 
 
873
  # tar/untar a dummy directory, and stop if the command works
 
874
  rm -rf conftest.dir
 
875
  mkdir conftest.dir
 
876
  echo GrepMe > conftest.dir/file
 
877
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
878
  rm -rf conftest.dir
 
879
  if test -s conftest.tar; then
 
880
    AM_RUN_LOG([$am__untar <conftest.tar])
 
881
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
882
  fi
 
883
done
 
884
rm -rf conftest.dir
 
885
 
 
886
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
887
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
888
AC_SUBST([am__tar])
 
889
AC_SUBST([am__untar])
 
890
]) # _AM_PROG_TAR
 
891
 
 
892
dnl AM_GCONF_SOURCE_2
 
893
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
 
894
dnl  (i.e. pass to gconftool-2
 
895
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
 
896
dnl  you should install foo.schemas files
 
897
dnl
 
898
 
 
899
AC_DEFUN([AM_GCONF_SOURCE_2],
 
900
[
 
901
  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
 
902
    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
 
903
  else
 
904
    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
 
905
  fi
 
906
 
 
907
  AC_ARG_WITH(gconf-source, 
 
908
  [  --with-gconf-source=sourceaddress      Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
 
909
 
 
910
  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
 
911
  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
 
912
 
 
913
  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
 
914
    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
 
915
  fi
 
916
 
 
917
  AC_ARG_WITH(gconf-schema-file-dir, 
 
918
  [  --with-gconf-schema-file-dir=dir        Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
 
919
 
 
920
  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
 
921
  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
 
922
 
 
923
  AC_ARG_ENABLE(schemas-install,
 
924
     [  --disable-schemas-install       Disable the schemas installation],
 
925
     [case ${enableval} in
 
926
       yes|no) ;;
 
927
       *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
 
928
      esac])
 
929
  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
 
930
])
 
931
 
 
932
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
933
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
934
#
 
935
# This file is free software, distributed under the terms of the GNU
 
936
# General Public License.  As a special exception to the GNU General
 
937
# Public License, this file may be distributed as part of a program
 
938
# that contains a configuration script generated by Autoconf, under
 
939
# the same distribution terms as the rest of that program.
 
940
#
 
941
# This file can be copied and used freely without restrictions.  It can
 
942
# be used in projects which are not available under the GNU Public License
 
943
# but which still want to provide support for the GNU gettext functionality.
 
944
#
 
945
# Macro to add for using GNU gettext.
 
946
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
947
#
 
948
# Modified to never use included libintl. 
 
949
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
950
#
 
951
# Major rework to remove unused code
 
952
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
953
#
 
954
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
955
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
956
#
 
957
# Modified to require ngettext
 
958
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
959
#
 
960
# We need this here as well, since someone might use autoconf-2.5x
 
961
# to configure GLib then an older version to configure a package
 
962
# using AM_GLIB_GNU_GETTEXT
 
963
AC_PREREQ(2.53)
 
964
 
 
965
dnl
 
966
dnl We go to great lengths to make sure that aclocal won't 
 
967
dnl try to pull in the installed version of these macros
 
968
dnl when running aclocal in the glib directory.
 
969
dnl
 
970
m4_copy([AC_DEFUN],[glib_DEFUN])
 
971
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
972
dnl
 
973
dnl At the end, if we're not within glib, we'll define the public
 
974
dnl definitions in terms of our private definitions.
 
975
dnl
 
976
 
 
977
# GLIB_LC_MESSAGES
 
978
#--------------------
 
979
glib_DEFUN([GLIB_LC_MESSAGES],
 
980
  [AC_CHECK_HEADERS([locale.h])
 
981
    if test $ac_cv_header_locale_h = yes; then
 
982
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
983
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
984
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
985
    if test $am_cv_val_LC_MESSAGES = yes; then
 
986
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
987
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
988
    fi
 
989
  fi])
 
990
 
 
991
# GLIB_PATH_PROG_WITH_TEST
 
992
#----------------------------
 
993
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
994
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
995
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
996
[# Extract the first word of "$2", so it can be a program name with args.
 
997
set dummy $2; ac_word=[$]2
 
998
AC_MSG_CHECKING([for $ac_word])
 
999
AC_CACHE_VAL(ac_cv_path_$1,
 
1000
[case "[$]$1" in
 
1001
  /*)
 
1002
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
1003
  ;;
 
1004
  *)
 
1005
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
1006
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
1007
    test -z "$ac_dir" && ac_dir=.
 
1008
    if test -f $ac_dir/$ac_word; then
 
1009
      if [$3]; then
 
1010
        ac_cv_path_$1="$ac_dir/$ac_word"
 
1011
        break
 
1012
      fi
 
1013
    fi
 
1014
  done
 
1015
  IFS="$ac_save_ifs"
 
1016
dnl If no 4th arg is given, leave the cache variable unset,
 
1017
dnl so AC_PATH_PROGS will keep looking.
 
1018
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
1019
])dnl
 
1020
  ;;
 
1021
esac])dnl
 
1022
$1="$ac_cv_path_$1"
 
1023
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
1024
  AC_MSG_RESULT([$]$1)
 
1025
else
 
1026
  AC_MSG_RESULT(no)
 
1027
fi
 
1028
AC_SUBST($1)dnl
 
1029
])
 
1030
 
 
1031
# GLIB_WITH_NLS
 
1032
#-----------------
 
1033
glib_DEFUN([GLIB_WITH_NLS],
 
1034
  dnl NLS is obligatory
 
1035
  [USE_NLS=yes
 
1036
    AC_SUBST(USE_NLS)
 
1037
 
 
1038
    gt_cv_have_gettext=no
 
1039
 
 
1040
    CATOBJEXT=NONE
 
1041
    XGETTEXT=:
 
1042
    INTLLIBS=
 
1043
 
 
1044
    AC_CHECK_HEADER(libintl.h,
 
1045
     [gt_cv_func_dgettext_libintl="no"
 
1046
      libintl_extra_libs=""
 
1047
 
 
1048
      #
 
1049
      # First check in libc
 
1050
      #
 
1051
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
1052
        [AC_TRY_LINK([
 
1053
#include <libintl.h>
 
1054
],
 
1055
         [return !ngettext ("","", 1)],
 
1056
          gt_cv_func_ngettext_libc=yes,
 
1057
          gt_cv_func_ngettext_libc=no)
 
1058
        ])
 
1059
  
 
1060
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
1061
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
1062
                [AC_TRY_LINK([
 
1063
#include <libintl.h>
 
1064
],
 
1065
                  [return !dgettext ("","")],
 
1066
                  gt_cv_func_dgettext_libc=yes,
 
1067
                  gt_cv_func_dgettext_libc=no)
 
1068
                ])
 
1069
      fi
 
1070
  
 
1071
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
1072
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
1073
      fi
 
1074
 
 
1075
      #
 
1076
      # If we don't have everything we want, check in libintl
 
1077
      #
 
1078
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
1079
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
1080
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
1081
        
 
1082
        AC_CHECK_LIB(intl, bindtextdomain,
 
1083
            [AC_CHECK_LIB(intl, ngettext,
 
1084
                    [AC_CHECK_LIB(intl, dgettext,
 
1085
                                  gt_cv_func_dgettext_libintl=yes)])])
 
1086
 
 
1087
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
1088
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
1089
          AC_MSG_RESULT([])
 
1090
          AC_CHECK_LIB(intl, ngettext,
 
1091
                [AC_CHECK_LIB(intl, dcgettext,
 
1092
                       [gt_cv_func_dgettext_libintl=yes
 
1093
                        libintl_extra_libs=-liconv],
 
1094
                        :,-liconv)],
 
1095
                :,-liconv)
 
1096
        fi
 
1097
 
 
1098
        #
 
1099
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
1100
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
1101
        # and both have dgettext and ngettext
 
1102
        #
 
1103
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
1104
          glib_save_LIBS="$LIBS"
 
1105
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
1106
          unset ac_cv_func_bind_textdomain_codeset
 
1107
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
1108
          LIBS="$glib_save_LIBS"
 
1109
 
 
1110
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
1111
            gt_cv_func_dgettext_libc=no
 
1112
          else
 
1113
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
1114
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
1115
              gt_cv_func_dgettext_libintl=no
 
1116
            fi
 
1117
          fi
 
1118
        fi
 
1119
      fi
 
1120
 
 
1121
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
1122
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
1123
        gt_cv_have_gettext=yes
 
1124
      fi
 
1125
  
 
1126
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
1127
        INTLLIBS="-lintl $libintl_extra_libs"
 
1128
      fi
 
1129
  
 
1130
      if test "$gt_cv_have_gettext" = "yes"; then
 
1131
        AC_DEFINE(HAVE_GETTEXT,1,
 
1132
          [Define if the GNU gettext() function is already present or preinstalled.])
 
1133
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
1134
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
1135
        if test "$MSGFMT" != "no"; then
 
1136
          glib_save_LIBS="$LIBS"
 
1137
          LIBS="$LIBS $INTLLIBS"
 
1138
          AC_CHECK_FUNCS(dcgettext)
 
1139
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
1140
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
1141
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
1142
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
1143
                         return _nl_msg_cat_cntr],
 
1144
            [CATOBJEXT=.gmo 
 
1145
             DATADIRNAME=share],
 
1146
            [case $host in
 
1147
            *-*-solaris*)
 
1148
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
1149
            dnl GNU format message catalog is always supported,
 
1150
            dnl since both are added to the libc all together.
 
1151
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
1152
            dnl and CATOBJEXT=.gmo in this case.
 
1153
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
1154
              [CATOBJEXT=.gmo 
 
1155
               DATADIRNAME=share],
 
1156
              [CATOBJEXT=.mo
 
1157
               DATADIRNAME=lib])
 
1158
            ;;
 
1159
            *)
 
1160
            CATOBJEXT=.mo
 
1161
            DATADIRNAME=lib
 
1162
            ;;
 
1163
            esac])
 
1164
          LIBS="$glib_save_LIBS"
 
1165
          INSTOBJEXT=.mo
 
1166
        else
 
1167
          gt_cv_have_gettext=no
 
1168
        fi
 
1169
      fi
 
1170
    ])
 
1171
 
 
1172
    if test "$gt_cv_have_gettext" = "yes" ; then
 
1173
      AC_DEFINE(ENABLE_NLS, 1,
 
1174
        [always defined to indicate that i18n is enabled])
 
1175
    fi
 
1176
 
 
1177
    dnl Test whether we really found GNU xgettext.
 
1178
    if test "$XGETTEXT" != ":"; then
 
1179
      dnl If it is not GNU xgettext we define it as : so that the
 
1180
      dnl Makefiles still can work.
 
1181
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
1182
        : ;
 
1183
      else
 
1184
        AC_MSG_RESULT(
 
1185
          [found xgettext program is not GNU xgettext; ignore it])
 
1186
        XGETTEXT=":"
 
1187
      fi
 
1188
    fi
 
1189
 
 
1190
    # We need to process the po/ directory.
 
1191
    POSUB=po
 
1192
 
 
1193
    AC_OUTPUT_COMMANDS(
 
1194
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
1195
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
1196
      esac])
 
1197
 
 
1198
    dnl These rules are solely for the distribution goal.  While doing this
 
1199
    dnl we only have to keep exactly one list of the available catalogs
 
1200
    dnl in configure.in.
 
1201
    for lang in $ALL_LINGUAS; do
 
1202
      GMOFILES="$GMOFILES $lang.gmo"
 
1203
      POFILES="$POFILES $lang.po"
 
1204
    done
 
1205
 
 
1206
    dnl Make all variables we use known to autoconf.
 
1207
    AC_SUBST(CATALOGS)
 
1208
    AC_SUBST(CATOBJEXT)
 
1209
    AC_SUBST(DATADIRNAME)
 
1210
    AC_SUBST(GMOFILES)
 
1211
    AC_SUBST(INSTOBJEXT)
 
1212
    AC_SUBST(INTLLIBS)
 
1213
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
1214
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
1215
    AC_SUBST(POFILES)
 
1216
    AC_SUBST(POSUB)
 
1217
  ])
 
1218
 
 
1219
# AM_GLIB_GNU_GETTEXT
 
1220
# -------------------
 
1221
# Do checks necessary for use of gettext. If a suitable implementation 
 
1222
# of gettext is found in either in libintl or in the C library,
 
1223
# it will set INTLLIBS to the libraries needed for use of gettext
 
1224
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
1225
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
1226
# on various variables needed by the Makefile.in.in installed by 
 
1227
# glib-gettextize.
 
1228
dnl
 
1229
glib_DEFUN([GLIB_GNU_GETTEXT],
 
1230
  [AC_REQUIRE([AC_PROG_CC])dnl
 
1231
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
1232
   
 
1233
   GLIB_LC_MESSAGES
 
1234
   GLIB_WITH_NLS
 
1235
 
 
1236
   if test "$gt_cv_have_gettext" = "yes"; then
 
1237
     if test "x$ALL_LINGUAS" = "x"; then
 
1238
       LINGUAS=
 
1239
     else
 
1240
       AC_MSG_CHECKING(for catalogs to be installed)
 
1241
       NEW_LINGUAS=
 
1242
       for presentlang in $ALL_LINGUAS; do
 
1243
         useit=no
 
1244
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
1245
           desiredlanguages="$LINGUAS"
 
1246
         else
 
1247
           desiredlanguages="$ALL_LINGUAS"
 
1248
         fi
 
1249
         for desiredlang in $desiredlanguages; do
 
1250
           # Use the presentlang catalog if desiredlang is
 
1251
           #   a. equal to presentlang, or
 
1252
           #   b. a variant of presentlang (because in this case,
 
1253
           #      presentlang can be used as a fallback for messages
 
1254
           #      which are not translated in the desiredlang catalog).
 
1255
           case "$desiredlang" in
 
1256
             "$presentlang"*) useit=yes;;
 
1257
           esac
 
1258
         done
 
1259
         if test $useit = yes; then
 
1260
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
1261
         fi
 
1262
       done
 
1263
       LINGUAS=$NEW_LINGUAS
 
1264
       AC_MSG_RESULT($LINGUAS)
 
1265
     fi
 
1266
 
 
1267
     dnl Construct list of names of catalog files to be constructed.
 
1268
     if test -n "$LINGUAS"; then
 
1269
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
1270
     fi
 
1271
   fi
 
1272
 
 
1273
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
1274
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
1275
   dnl Try to locate is.
 
1276
   MKINSTALLDIRS=
 
1277
   if test -n "$ac_aux_dir"; then
 
1278
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
1279
   fi
 
1280
   if test -z "$MKINSTALLDIRS"; then
 
1281
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
1282
   fi
 
1283
   AC_SUBST(MKINSTALLDIRS)
 
1284
 
 
1285
   dnl Generate list of files to be processed by xgettext which will
 
1286
   dnl be included in po/Makefile.
 
1287
   test -d po || mkdir po
 
1288
   if test "x$srcdir" != "x."; then
 
1289
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
1290
       posrcprefix="$srcdir/"
 
1291
     else
 
1292
       posrcprefix="../$srcdir/"
 
1293
     fi
 
1294
   else
 
1295
     posrcprefix="../"
 
1296
   fi
 
1297
   rm -f po/POTFILES
 
1298
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
1299
        < $srcdir/po/POTFILES.in > po/POTFILES
 
1300
  ])
 
1301
 
 
1302
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
1303
# -------------------------------
 
1304
# Define VARIABLE to the location where catalog files will
 
1305
# be installed by po/Makefile.
 
1306
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
1307
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
1308
glib_save_prefix="$prefix"
 
1309
glib_save_exec_prefix="$exec_prefix"
 
1310
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
1311
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
1312
if test "x$CATOBJEXT" = "x.mo" ; then
 
1313
  localedir=`eval echo "${libdir}/locale"`
 
1314
else
 
1315
  localedir=`eval echo "${datadir}/locale"`
 
1316
fi
 
1317
prefix="$glib_save_prefix"
 
1318
exec_prefix="$glib_save_exec_prefix"
 
1319
AC_DEFINE_UNQUOTED($1, "$localedir",
 
1320
  [Define the location where the catalogs will be installed])
 
1321
])
 
1322
 
 
1323
dnl
 
1324
dnl Now the definitions that aclocal will find
 
1325
dnl
 
1326
ifdef(glib_configure_in,[],[
 
1327
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
1328
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
1329
])dnl
 
1330
 
 
1331
dnl GNOME_COMPILE_WARNINGS
 
1332
dnl Turn on many useful compiler warnings
 
1333
dnl For now, only works on GCC
 
1334
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
 
1335
    dnl ******************************
 
1336
    dnl More compiler warnings
 
1337
    dnl ******************************
 
1338
 
 
1339
    AC_ARG_ENABLE(compile-warnings, 
 
1340
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
 
1341
                                 [Turn on compiler warnings]),,
 
1342
                  [enable_compile_warnings="m4_default([$1],[yes])"])
 
1343
 
 
1344
    warnCFLAGS=
 
1345
    if test "x$GCC" != xyes; then
 
1346
        enable_compile_warnings=no
 
1347
    fi
 
1348
 
 
1349
    warning_flags=
 
1350
    realsave_CFLAGS="$CFLAGS"
 
1351
 
 
1352
    case "$enable_compile_warnings" in
 
1353
    no)
 
1354
        warning_flags=
 
1355
        ;;
 
1356
    minimum)
 
1357
        warning_flags="-Wall"
 
1358
        ;;
 
1359
    yes)
 
1360
        warning_flags="-Wall -Wmissing-prototypes"
 
1361
        ;;
 
1362
    maximum|error)
 
1363
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
 
1364
        CFLAGS="$warning_flags $CFLAGS"
 
1365
        for option in -Wno-sign-compare; do
 
1366
                SAVE_CFLAGS="$CFLAGS"
 
1367
                CFLAGS="$CFLAGS $option"
 
1368
                AC_MSG_CHECKING([whether gcc understands $option])
 
1369
                AC_TRY_COMPILE([], [],
 
1370
                        has_option=yes,
 
1371
                        has_option=no,)
 
1372
                CFLAGS="$SAVE_CFLAGS"
 
1373
                AC_MSG_RESULT($has_option)
 
1374
                if test $has_option = yes; then
 
1375
                  warning_flags="$warning_flags $option"
 
1376
                fi
 
1377
                unset has_option
 
1378
                unset SAVE_CFLAGS
 
1379
        done
 
1380
        unset option
 
1381
        if test "$enable_compile_warnings" = "error" ; then
 
1382
            warning_flags="$warning_flags -Werror"
 
1383
        fi
 
1384
        ;;
 
1385
    *)
 
1386
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
 
1387
        ;;
 
1388
    esac
 
1389
    CFLAGS="$realsave_CFLAGS"
 
1390
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
 
1391
    AC_MSG_RESULT($warning_flags)
 
1392
 
 
1393
    AC_ARG_ENABLE(iso-c,
 
1394
                  AC_HELP_STRING([--enable-iso-c],
 
1395
                                 [Try to warn if code is not ISO C ]),,
 
1396
                  [enable_iso_c=no])
 
1397
 
 
1398
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
 
1399
    complCFLAGS=
 
1400
    if test "x$enable_iso_c" != "xno"; then
 
1401
        if test "x$GCC" = "xyes"; then
 
1402
        case " $CFLAGS " in
 
1403
            *[\ \       ]-ansi[\ \      ]*) ;;
 
1404
            *) complCFLAGS="$complCFLAGS -ansi" ;;
 
1405
        esac
 
1406
        case " $CFLAGS " in
 
1407
            *[\ \       ]-pedantic[\ \  ]*) ;;
 
1408
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
 
1409
        esac
 
1410
        fi
 
1411
    fi
 
1412
    AC_MSG_RESULT($complCFLAGS)
 
1413
 
 
1414
    WARN_CFLAGS="$warning_flags $complCFLAGS"
 
1415
    AC_SUBST(WARN_CFLAGS)
 
1416
])
 
1417
 
 
1418
dnl For C++, do basically the same thing.
 
1419
 
 
1420
AC_DEFUN([GNOME_CXX_WARNINGS],[
 
1421
  AC_ARG_ENABLE(cxx-warnings,
 
1422
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
 
1423
                               [Turn on compiler warnings.]),,
 
1424
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
 
1425
 
 
1426
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
 
1427
  warnCXXFLAGS=
 
1428
  if test "x$GCC" != xyes; then
 
1429
    enable_compile_warnings=no
 
1430
  fi
 
1431
  if test "x$enable_cxx_warnings" != "xno"; then
 
1432
    if test "x$GCC" = "xyes"; then
 
1433
      case " $CXXFLAGS " in
 
1434
      *[\ \     ]-Wall[\ \      ]*) ;;
 
1435
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
 
1436
      esac
 
1437
 
 
1438
      ## -W is not all that useful.  And it cannot be controlled
 
1439
      ## with individual -Wno-xxx flags, unlike -Wall
 
1440
      if test "x$enable_cxx_warnings" = "xyes"; then
 
1441
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
 
1442
      fi
 
1443
    fi
 
1444
  fi
 
1445
  AC_MSG_RESULT($warnCXXFLAGS)
 
1446
 
 
1447
   AC_ARG_ENABLE(iso-cxx,
 
1448
                 AC_HELP_STRING([--enable-iso-cxx],
 
1449
                                [Try to warn if code is not ISO C++ ]),,
 
1450
                 [enable_iso_cxx=no])
 
1451
 
 
1452
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
 
1453
   complCXXFLAGS=
 
1454
   if test "x$enable_iso_cxx" != "xno"; then
 
1455
     if test "x$GCC" = "xyes"; then
 
1456
      case " $CXXFLAGS " in
 
1457
      *[\ \     ]-ansi[\ \      ]*) ;;
 
1458
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
 
1459
      esac
 
1460
 
 
1461
      case " $CXXFLAGS " in
 
1462
      *[\ \     ]-pedantic[\ \  ]*) ;;
 
1463
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
 
1464
      esac
 
1465
     fi
 
1466
   fi
 
1467
  AC_MSG_RESULT($complCXXFLAGS)
 
1468
 
 
1469
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
 
1470
  AC_SUBST(WARN_CXXFLAGS)
 
1471
])
900
1472
 
901
1473
 
902
1474
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
933
1505
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
934
1506
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
935
1507
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1508
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
936
1509
 
937
1510
AC_SUBST(INTLTOOL_DESKTOP_RULE)
938
1511
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
951
1524
AC_SUBST(INTLTOOL_CAVES_RULE)
952
1525
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
953
1526
AC_SUBST(INTLTOOL_THEME_RULE)
 
1527
AC_SUBST(INTLTOOL_SERVICE_RULE)
954
1528
 
955
1529
# Use the tools built into the package, not the ones that are installed.
956
1530
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
978
1552
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
979
1553
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
980
1554
 
981
 
# Remove file type tags (using []) from po/POTFILES.
 
1555
IT_PO_SUBDIR([po])
 
1556
 
 
1557
dnl The following is very similar to
 
1558
dnl
 
1559
dnl     AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
 
1560
dnl
 
1561
dnl with the following slight differences:
 
1562
dnl  - the *.in files are in ac_aux_dir,
 
1563
dnl  - if the file haven't changed upon reconfigure, it's not touched,
 
1564
dnl  - the evaluation of the third parameter enables a hack which computes
 
1565
dnl    the actual value of $libdir,
 
1566
dnl  - the user sees "executing intltool commands", instead of
 
1567
dnl    "creating intltool-extract" and such.
 
1568
dnl
 
1569
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
 
1570
dnl a reason for it.
 
1571
 
 
1572
AC_CONFIG_COMMANDS([intltool], [
 
1573
 
 
1574
for file in intltool-extract intltool-merge intltool-update; do
 
1575
  sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
 
1576
      -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
 
1577
      -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
 
1578
      -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
 
1579
      -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
 
1580
      -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
 
1581
      -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
 
1582
        < ${ac_aux_dir}/${file}.in > ${file}.out
 
1583
  if cmp -s ${file} ${file}.out 2>/dev/null; then
 
1584
    rm -f ${file}.out
 
1585
  else
 
1586
    mv -f ${file}.out ${file}
 
1587
  fi
 
1588
  chmod ugo+x ${file}
 
1589
  chmod u+w ${file}
 
1590
done
 
1591
 
 
1592
],
 
1593
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
 
1594
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
 
1595
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
 
1596
INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
 
1597
INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
 
1598
 
 
1599
])
 
1600
 
 
1601
 
 
1602
# IT_PO_SUBDIR(DIRNAME)
 
1603
# ---------------------
 
1604
# All po subdirs have to be declared with this macro; the subdir "po" is
 
1605
# declared by IT_PROG_INTLTOOL.
 
1606
#
 
1607
AC_DEFUN([IT_PO_SUBDIR],
 
1608
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
1609
dnl
 
1610
dnl The following CONFIG_COMMANDS should be exetuted at the very end
 
1611
dnl of config.status.
982
1612
AC_CONFIG_COMMANDS_PRE([
983
 
   [mv -f po/POTFILES po/POTFILES.tmp
984
 
    sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
985
 
    rm -f po/POTFILES.tmp
986
 
   ]dnl
987
 
])
988
 
 
989
 
# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
990
 
 
991
 
AC_CONFIG_COMMANDS([intltool], [
992
 
 
993
 
intltool_edit="-e 's#@INTLTOOL_EXTRACT@#`pwd`/intltool-extract#g' \
994
 
               -e 's#@INTLTOOL_ICONV@#${INTLTOOL_ICONV}#g' \
995
 
               -e 's#@INTLTOOL_MSGFMT@#${INTLTOOL_MSGFMT}#g' \
996
 
               -e 's#@INTLTOOL_MSGMERGE@#${INTLTOOL_MSGMERGE}#g' \
997
 
               -e 's#@INTLTOOL_XGETTEXT@#${INTLTOOL_XGETTEXT}#g' \
998
 
               -e 's#@INTLTOOL_PERL@#${INTLTOOL_PERL}#g'"
999
 
 
1000
 
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-extract.in \
1001
 
  > intltool-extract.out
1002
 
if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
1003
 
  rm -f intltool-extract.out
1004
 
else
1005
 
  mv -f intltool-extract.out intltool-extract
1006
 
fi
1007
 
chmod ugo+x intltool-extract
1008
 
chmod u+w intltool-extract
1009
 
 
1010
 
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-merge.in \
1011
 
  > intltool-merge.out
1012
 
if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
1013
 
  rm -f intltool-merge.out
1014
 
else
1015
 
  mv -f intltool-merge.out intltool-merge
1016
 
fi
1017
 
chmod ugo+x intltool-merge
1018
 
chmod u+w intltool-merge
1019
 
 
1020
 
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-update.in \
1021
 
  > intltool-update.out
1022
 
if cmp -s intltool-update intltool-update.out 2>/dev/null; then
1023
 
  rm -f intltool-update.out
1024
 
else
1025
 
  mv -f intltool-update.out intltool-update
1026
 
fi
1027
 
chmod ugo+x intltool-update
1028
 
chmod u+w intltool-update
1029
 
 
1030
 
], INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir=${ac_aux_dir}
1031
 
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' ICONV='${INTLTOOL_ICONV}'
1032
 
MSGFMT='${INTLTOOL_MSGFMT}' MSGMERGE='${INTLTOOL_MSGMERGE}'
1033
 
XGETTEXT='${INTLTOOL_XGETTEXT}')
1034
 
 
1035
 
])
 
1613
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
1614
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
1615
    >"$1/stamp-it.tmp"
 
1616
    [sed '/^#/d
 
1617
         s/^[[].*] *//
 
1618
         /^[    ]*$/d
 
1619
        '"s|^|  $ac_top_srcdir/|" \
 
1620
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
1621
    ]
 
1622
    if test ! -f "$1/Makefile"; then
 
1623
      AC_MSG_ERROR([$1/Makefile is not ready.])
 
1624
    fi
 
1625
    mv "$1/Makefile" "$1/Makefile.tmp"
 
1626
    [sed '/^POTFILES =/,/[^\\]$/ {
 
1627
                /^POTFILES =/!d
 
1628
                r $1/POTFILES
 
1629
          }
 
1630
         ' "$1/Makefile.tmp" >"$1/Makefile"]
 
1631
    rm -f "$1/Makefile.tmp"
 
1632
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
1633
  ])
 
1634
])dnl
 
1635
])
 
1636
 
1036
1637
 
1037
1638
# deprecated macros
1038
1639
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1040
1641
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1041
1642
 
1042
1643
 
1043
 
# isc-posix.m4 serial 2 (gettext-0.11.2)
1044
 
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1045
 
dnl This file is free software; the Free Software Foundation
1046
 
dnl gives unlimited permission to copy and/or distribute it,
1047
 
dnl with or without modifications, as long as this notice is preserved.
1048
 
 
1049
 
# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
1050
 
 
1051
 
# This test replaces the one in autoconf.
1052
 
# Currently this macro should have the same name as the autoconf macro
1053
 
# because gettext's gettext.m4 (distributed in the automake package)
1054
 
# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
1055
 
# give these diagnostics:
1056
 
#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1057
 
#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1058
 
 
1059
 
undefine([AC_ISC_POSIX])
1060
 
 
1061
 
AC_DEFUN([AC_ISC_POSIX],
1062
 
  [
1063
 
    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1064
 
    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1065
 
  ]
1066
 
)
1067
 
 
1068
1644
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1069
1645
 
1070
1646
# serial 47 AC_PROG_LIBTOOL
7230
7806
AC_MSG_RESULT([$SED])
7231
7807
])
7232
7808
 
7233
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
7234
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
7235
 
#
7236
 
# This file is free software, distributed under the terms of the GNU
7237
 
# General Public License.  As a special exception to the GNU General
7238
 
# Public License, this file may be distributed as part of a program
7239
 
# that contains a configuration script generated by Autoconf, under
7240
 
# the same distribution terms as the rest of that program.
7241
 
#
7242
 
# This file can be copied and used freely without restrictions.  It can
7243
 
# be used in projects which are not available under the GNU Public License
7244
 
# but which still want to provide support for the GNU gettext functionality.
7245
 
#
7246
 
# Macro to add for using GNU gettext.
7247
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
7248
 
#
7249
 
# Modified to never use included libintl. 
7250
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
7251
 
#
7252
 
# Major rework to remove unused code
7253
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
7254
 
#
7255
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
7256
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
7257
 
#
7258
 
# Modified to require ngettext
7259
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
7260
 
#
7261
 
# We need this here as well, since someone might use autoconf-2.5x
7262
 
# to configure GLib then an older version to configure a package
7263
 
# using AM_GLIB_GNU_GETTEXT
7264
 
AC_PREREQ(2.53)
7265
 
 
7266
 
dnl
7267
 
dnl We go to great lengths to make sure that aclocal won't 
7268
 
dnl try to pull in the installed version of these macros
7269
 
dnl when running aclocal in the glib directory.
7270
 
dnl
7271
 
m4_copy([AC_DEFUN],[glib_DEFUN])
7272
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
7273
 
dnl
7274
 
dnl At the end, if we're not within glib, we'll define the public
7275
 
dnl definitions in terms of our private definitions.
7276
 
dnl
7277
 
 
7278
 
# GLIB_LC_MESSAGES
7279
 
#--------------------
7280
 
glib_DEFUN([GLIB_LC_MESSAGES],
7281
 
  [AC_CHECK_HEADERS([locale.h])
7282
 
    if test $ac_cv_header_locale_h = yes; then
7283
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
7284
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
7285
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
7286
 
    if test $am_cv_val_LC_MESSAGES = yes; then
7287
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
7288
 
        [Define if your <locale.h> file defines LC_MESSAGES.])
7289
 
    fi
7290
 
  fi])
7291
 
 
7292
 
# GLIB_PATH_PROG_WITH_TEST
7293
 
#----------------------------
7294
 
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
7295
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
7296
 
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
7297
 
[# Extract the first word of "$2", so it can be a program name with args.
7298
 
set dummy $2; ac_word=[$]2
7299
 
AC_MSG_CHECKING([for $ac_word])
7300
 
AC_CACHE_VAL(ac_cv_path_$1,
7301
 
[case "[$]$1" in
7302
 
  /*)
7303
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
7304
 
  ;;
7305
 
  *)
7306
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7307
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
7308
 
    test -z "$ac_dir" && ac_dir=.
7309
 
    if test -f $ac_dir/$ac_word; then
7310
 
      if [$3]; then
7311
 
        ac_cv_path_$1="$ac_dir/$ac_word"
7312
 
        break
7313
 
      fi
7314
 
    fi
7315
 
  done
7316
 
  IFS="$ac_save_ifs"
7317
 
dnl If no 4th arg is given, leave the cache variable unset,
7318
 
dnl so AC_PATH_PROGS will keep looking.
7319
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
7320
 
])dnl
7321
 
  ;;
7322
 
esac])dnl
7323
 
$1="$ac_cv_path_$1"
7324
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
7325
 
  AC_MSG_RESULT([$]$1)
7326
 
else
7327
 
  AC_MSG_RESULT(no)
7328
 
fi
7329
 
AC_SUBST($1)dnl
7330
 
])
7331
 
 
7332
 
# GLIB_WITH_NLS
7333
 
#-----------------
7334
 
glib_DEFUN([GLIB_WITH_NLS],
7335
 
  dnl NLS is obligatory
7336
 
  [USE_NLS=yes
7337
 
    AC_SUBST(USE_NLS)
7338
 
 
7339
 
    gt_cv_have_gettext=no
7340
 
 
7341
 
    CATOBJEXT=NONE
7342
 
    XGETTEXT=:
7343
 
    INTLLIBS=
7344
 
 
7345
 
    AC_CHECK_HEADER(libintl.h,
7346
 
     [gt_cv_func_dgettext_libintl="no"
7347
 
      libintl_extra_libs=""
7348
 
 
7349
 
      #
7350
 
      # First check in libc
7351
 
      #
7352
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
7353
 
        [AC_TRY_LINK([
7354
 
#include <libintl.h>
7355
 
],
7356
 
         [return !ngettext ("","", 1)],
7357
 
          gt_cv_func_ngettext_libc=yes,
7358
 
          gt_cv_func_ngettext_libc=no)
7359
 
        ])
7360
 
  
7361
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7362
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
7363
 
                [AC_TRY_LINK([
7364
 
#include <libintl.h>
7365
 
],
7366
 
                  [return !dgettext ("","")],
7367
 
                  gt_cv_func_dgettext_libc=yes,
7368
 
                  gt_cv_func_dgettext_libc=no)
7369
 
                ])
7370
 
      fi
7371
 
  
7372
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7373
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
7374
 
      fi
7375
 
 
7376
 
      #
7377
 
      # If we don't have everything we want, check in libintl
7378
 
      #
7379
 
      if test "$gt_cv_func_dgettext_libc" != "yes" \
7380
 
         || test "$gt_cv_func_ngettext_libc" != "yes" \
7381
 
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7382
 
        
7383
 
        AC_CHECK_LIB(intl, bindtextdomain,
7384
 
            [AC_CHECK_LIB(intl, ngettext,
7385
 
                    [AC_CHECK_LIB(intl, dgettext,
7386
 
                                  gt_cv_func_dgettext_libintl=yes)])])
7387
 
 
7388
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7389
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
7390
 
          AC_MSG_RESULT([])
7391
 
          AC_CHECK_LIB(intl, ngettext,
7392
 
                [AC_CHECK_LIB(intl, dcgettext,
7393
 
                       [gt_cv_func_dgettext_libintl=yes
7394
 
                        libintl_extra_libs=-liconv],
7395
 
                        :,-liconv)],
7396
 
                :,-liconv)
7397
 
        fi
7398
 
 
7399
 
        #
7400
 
        # If we found libintl, then check in it for bind_textdomain_codeset();
7401
 
        # we'll prefer libc if neither have bind_textdomain_codeset(),
7402
 
        # and both have dgettext and ngettext
7403
 
        #
7404
 
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7405
 
          glib_save_LIBS="$LIBS"
7406
 
          LIBS="$LIBS -lintl $libintl_extra_libs"
7407
 
          unset ac_cv_func_bind_textdomain_codeset
7408
 
          AC_CHECK_FUNCS(bind_textdomain_codeset)
7409
 
          LIBS="$glib_save_LIBS"
7410
 
 
7411
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7412
 
            gt_cv_func_dgettext_libc=no
7413
 
          else
7414
 
            if test "$gt_cv_func_dgettext_libc" = "yes" \
7415
 
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
7416
 
              gt_cv_func_dgettext_libintl=no
7417
 
            fi
7418
 
          fi
7419
 
        fi
7420
 
      fi
7421
 
 
7422
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
7423
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7424
 
        gt_cv_have_gettext=yes
7425
 
      fi
7426
 
  
7427
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7428
 
        INTLLIBS="-lintl $libintl_extra_libs"
7429
 
      fi
7430
 
  
7431
 
      if test "$gt_cv_have_gettext" = "yes"; then
7432
 
        AC_DEFINE(HAVE_GETTEXT,1,
7433
 
          [Define if the GNU gettext() function is already present or preinstalled.])
7434
 
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
7435
 
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
7436
 
        if test "$MSGFMT" != "no"; then
7437
 
          glib_save_LIBS="$LIBS"
7438
 
          LIBS="$LIBS $INTLLIBS"
7439
 
          AC_CHECK_FUNCS(dcgettext)
7440
 
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7441
 
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
7442
 
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
7443
 
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
7444
 
                         return _nl_msg_cat_cntr],
7445
 
            [CATOBJEXT=.gmo 
7446
 
             DATADIRNAME=share],
7447
 
            [case $host in
7448
 
            *-*-solaris*)
7449
 
            dnl On Solaris, if bind_textdomain_codeset is in libc,
7450
 
            dnl GNU format message catalog is always supported,
7451
 
            dnl since both are added to the libc all together.
7452
 
            dnl Hence, we'd like to go with DATADIRNAME=share and
7453
 
            dnl and CATOBJEXT=.gmo in this case.
7454
 
            AC_CHECK_FUNC(bind_textdomain_codeset,
7455
 
              [CATOBJEXT=.gmo 
7456
 
               DATADIRNAME=share],
7457
 
              [CATOBJEXT=.mo
7458
 
               DATADIRNAME=lib])
7459
 
            ;;
7460
 
            *)
7461
 
            CATOBJEXT=.mo
7462
 
            DATADIRNAME=lib
7463
 
            ;;
7464
 
            esac])
7465
 
          LIBS="$glib_save_LIBS"
7466
 
          INSTOBJEXT=.mo
7467
 
        else
7468
 
          gt_cv_have_gettext=no
7469
 
        fi
7470
 
      fi
7471
 
    ])
7472
 
 
7473
 
    if test "$gt_cv_have_gettext" = "yes" ; then
7474
 
      AC_DEFINE(ENABLE_NLS, 1,
7475
 
        [always defined to indicate that i18n is enabled])
7476
 
    fi
7477
 
 
7478
 
    dnl Test whether we really found GNU xgettext.
7479
 
    if test "$XGETTEXT" != ":"; then
7480
 
      dnl If it is not GNU xgettext we define it as : so that the
7481
 
      dnl Makefiles still can work.
7482
 
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7483
 
        : ;
7484
 
      else
7485
 
        AC_MSG_RESULT(
7486
 
          [found xgettext program is not GNU xgettext; ignore it])
7487
 
        XGETTEXT=":"
7488
 
      fi
7489
 
    fi
7490
 
 
7491
 
    # We need to process the po/ directory.
7492
 
    POSUB=po
7493
 
 
7494
 
    AC_OUTPUT_COMMANDS(
7495
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
7496
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7497
 
      esac])
7498
 
 
7499
 
    dnl These rules are solely for the distribution goal.  While doing this
7500
 
    dnl we only have to keep exactly one list of the available catalogs
7501
 
    dnl in configure.in.
7502
 
    for lang in $ALL_LINGUAS; do
7503
 
      GMOFILES="$GMOFILES $lang.gmo"
7504
 
      POFILES="$POFILES $lang.po"
7505
 
    done
7506
 
 
7507
 
    dnl Make all variables we use known to autoconf.
7508
 
    AC_SUBST(CATALOGS)
7509
 
    AC_SUBST(CATOBJEXT)
7510
 
    AC_SUBST(DATADIRNAME)
7511
 
    AC_SUBST(GMOFILES)
7512
 
    AC_SUBST(INSTOBJEXT)
7513
 
    AC_SUBST(INTLLIBS)
7514
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
7515
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
7516
 
    AC_SUBST(POFILES)
7517
 
    AC_SUBST(POSUB)
7518
 
  ])
7519
 
 
7520
 
# AM_GLIB_GNU_GETTEXT
7521
 
# -------------------
7522
 
# Do checks necessary for use of gettext. If a suitable implementation 
7523
 
# of gettext is found in either in libintl or in the C library,
7524
 
# it will set INTLLIBS to the libraries needed for use of gettext
7525
 
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
7526
 
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
7527
 
# on various variables needed by the Makefile.in.in installed by 
7528
 
# glib-gettextize.
7529
 
dnl
7530
 
glib_DEFUN([GLIB_GNU_GETTEXT],
7531
 
  [AC_REQUIRE([AC_PROG_CC])dnl
7532
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
7533
 
   
7534
 
   GLIB_LC_MESSAGES
7535
 
   GLIB_WITH_NLS
7536
 
 
7537
 
   if test "$gt_cv_have_gettext" = "yes"; then
7538
 
     if test "x$ALL_LINGUAS" = "x"; then
7539
 
       LINGUAS=
7540
 
     else
7541
 
       AC_MSG_CHECKING(for catalogs to be installed)
7542
 
       NEW_LINGUAS=
7543
 
       for presentlang in $ALL_LINGUAS; do
7544
 
         useit=no
7545
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
7546
 
           desiredlanguages="$LINGUAS"
7547
 
         else
7548
 
           desiredlanguages="$ALL_LINGUAS"
7549
 
         fi
7550
 
         for desiredlang in $desiredlanguages; do
7551
 
           # Use the presentlang catalog if desiredlang is
7552
 
           #   a. equal to presentlang, or
7553
 
           #   b. a variant of presentlang (because in this case,
7554
 
           #      presentlang can be used as a fallback for messages
7555
 
           #      which are not translated in the desiredlang catalog).
7556
 
           case "$desiredlang" in
7557
 
             "$presentlang"*) useit=yes;;
7558
 
           esac
7559
 
         done
7560
 
         if test $useit = yes; then
7561
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
7562
 
         fi
7563
 
       done
7564
 
       LINGUAS=$NEW_LINGUAS
7565
 
       AC_MSG_RESULT($LINGUAS)
7566
 
     fi
7567
 
 
7568
 
     dnl Construct list of names of catalog files to be constructed.
7569
 
     if test -n "$LINGUAS"; then
7570
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7571
 
     fi
7572
 
   fi
7573
 
 
7574
 
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
7575
 
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
7576
 
   dnl Try to locate is.
7577
 
   MKINSTALLDIRS=
7578
 
   if test -n "$ac_aux_dir"; then
7579
 
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7580
 
   fi
7581
 
   if test -z "$MKINSTALLDIRS"; then
7582
 
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7583
 
   fi
7584
 
   AC_SUBST(MKINSTALLDIRS)
7585
 
 
7586
 
   dnl Generate list of files to be processed by xgettext which will
7587
 
   dnl be included in po/Makefile.
7588
 
   test -d po || mkdir po
7589
 
   if test "x$srcdir" != "x."; then
7590
 
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
7591
 
       posrcprefix="$srcdir/"
7592
 
     else
7593
 
       posrcprefix="../$srcdir/"
7594
 
     fi
7595
 
   else
7596
 
     posrcprefix="../"
7597
 
   fi
7598
 
   rm -f po/POTFILES
7599
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
7600
 
        < $srcdir/po/POTFILES.in > po/POTFILES
7601
 
  ])
7602
 
 
7603
 
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
7604
 
# -------------------------------
7605
 
# Define VARIABLE to the location where catalog files will
7606
 
# be installed by po/Makefile.
7607
 
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
7608
 
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
7609
 
glib_save_prefix="$prefix"
7610
 
glib_save_exec_prefix="$exec_prefix"
7611
 
test "x$prefix" = xNONE && prefix=$ac_default_prefix
7612
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
7613
 
if test "x$CATOBJEXT" = "x.mo" ; then
7614
 
  localedir=`eval echo "${libdir}/locale"`
7615
 
else
7616
 
  localedir=`eval echo "${datadir}/locale"`
7617
 
fi
7618
 
prefix="$glib_save_prefix"
7619
 
exec_prefix="$glib_save_exec_prefix"
7620
 
AC_DEFINE_UNQUOTED($1, "$localedir",
7621
 
  [Define the location where the catalogs will be installed])
7622
 
])
7623
 
 
7624
 
dnl
7625
 
dnl Now the definitions that aclocal will find
7626
 
dnl
7627
 
ifdef(glib_configure_in,[],[
7628
 
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
7629
 
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
7630
 
])dnl
7631
 
 
7632
7809
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7633
7810
7634
7811
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7761
7938
fi[]dnl
7762
7939
])# PKG_CHECK_MODULES
7763
7940
 
7764
 
dnl AM_GCONF_SOURCE_2
7765
 
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
7766
 
dnl  (i.e. pass to gconftool-2
7767
 
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
7768
 
dnl  you should install foo.schemas files
7769
 
dnl
7770
 
 
7771
 
AC_DEFUN([AM_GCONF_SOURCE_2],
7772
 
[
7773
 
  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
7774
 
    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
7775
 
  else
7776
 
    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
7777
 
  fi
7778
 
 
7779
 
  AC_ARG_WITH(gconf-source, 
7780
 
  [  --with-gconf-source=sourceaddress      Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
7781
 
 
7782
 
  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
7783
 
  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
7784
 
 
7785
 
  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
7786
 
    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
7787
 
  fi
7788
 
 
7789
 
  AC_ARG_WITH(gconf-schema-file-dir, 
7790
 
  [  --with-gconf-schema-file-dir=dir        Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
7791
 
 
7792
 
  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
7793
 
  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
7794
 
 
7795
 
  AC_ARG_ENABLE(schemas-install,
7796
 
     [  --disable-schemas-install       Disable the schemas installation],
7797
 
     [case "${enableval}" in
7798
 
       yes) schemas_install=true ;;
7799
 
       no)  schemas_install=false ;;
7800
 
       *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
7801
 
     esac],[schemas_install=true])
7802
 
     AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test x$schemas_install = xtrue)
7803
 
])
7804
 
 
7805
 
dnl GNOME_COMPILE_WARNINGS
7806
 
dnl Turn on many useful compiler warnings
7807
 
dnl For now, only works on GCC
7808
 
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
7809
 
    dnl ******************************
7810
 
    dnl More compiler warnings
7811
 
    dnl ******************************
7812
 
 
7813
 
    AC_ARG_ENABLE(compile-warnings, 
7814
 
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
7815
 
                                 [Turn on compiler warnings]),,
7816
 
                  [enable_compile_warnings="m4_default([$1],[yes])"])
7817
 
 
7818
 
    warnCFLAGS=
7819
 
    if test "x$GCC" != xyes; then
7820
 
        enable_compile_warnings=no
7821
 
    fi
7822
 
 
7823
 
    warning_flags=
7824
 
    realsave_CFLAGS="$CFLAGS"
7825
 
 
7826
 
    case "$enable_compile_warnings" in
7827
 
    no)
7828
 
        warning_flags=
7829
 
        ;;
7830
 
    minimum)
7831
 
        warning_flags="-Wall"
7832
 
        ;;
7833
 
    yes)
7834
 
        warning_flags="-Wall -Wmissing-prototypes"
7835
 
        ;;
7836
 
    maximum|error)
7837
 
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
7838
 
        CFLAGS="$warning_flags $CFLAGS"
7839
 
        for option in -Wno-sign-compare; do
7840
 
                SAVE_CFLAGS="$CFLAGS"
7841
 
                CFLAGS="$CFLAGS $option"
7842
 
                AC_MSG_CHECKING([whether gcc understands $option])
7843
 
                AC_TRY_COMPILE([], [],
7844
 
                        has_option=yes,
7845
 
                        has_option=no,)
7846
 
                CFLAGS="$SAVE_CFLAGS"
7847
 
                AC_MSG_RESULT($has_option)
7848
 
                if test $has_option = yes; then
7849
 
                  warning_flags="$warning_flags $option"
7850
 
                fi
7851
 
                unset has_option
7852
 
                unset SAVE_CFLAGS
7853
 
        done
7854
 
        unset option
7855
 
        if test "$enable_compile_warnings" = "error" ; then
7856
 
            warning_flags="$warning_flags -Werror"
7857
 
        fi
7858
 
        ;;
7859
 
    *)
7860
 
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
7861
 
        ;;
7862
 
    esac
7863
 
    CFLAGS="$realsave_CFLAGS"
7864
 
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
7865
 
    AC_MSG_RESULT($warning_flags)
7866
 
 
7867
 
    AC_ARG_ENABLE(iso-c,
7868
 
                  AC_HELP_STRING([--enable-iso-c],
7869
 
                                 [Try to warn if code is not ISO C ]),,
7870
 
                  [enable_iso_c=no])
7871
 
 
7872
 
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
7873
 
    complCFLAGS=
7874
 
    if test "x$enable_iso_c" != "xno"; then
7875
 
        if test "x$GCC" = "xyes"; then
7876
 
        case " $CFLAGS " in
7877
 
            *[\ \       ]-ansi[\ \      ]*) ;;
7878
 
            *) complCFLAGS="$complCFLAGS -ansi" ;;
7879
 
        esac
7880
 
        case " $CFLAGS " in
7881
 
            *[\ \       ]-pedantic[\ \  ]*) ;;
7882
 
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
7883
 
        esac
7884
 
        fi
7885
 
    fi
7886
 
    AC_MSG_RESULT($complCFLAGS)
7887
 
 
7888
 
    WARN_CFLAGS="$warning_flags $complCFLAGS"
7889
 
    AC_SUBST(WARN_CFLAGS)
7890
 
])
7891
 
 
7892
 
dnl For C++, do basically the same thing.
7893
 
 
7894
 
AC_DEFUN([GNOME_CXX_WARNINGS],[
7895
 
  AC_ARG_ENABLE(cxx-warnings,
7896
 
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
7897
 
                               [Turn on compiler warnings.]),,
7898
 
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
7899
 
 
7900
 
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
7901
 
  warnCXXFLAGS=
7902
 
  if test "x$GCC" != xyes; then
7903
 
    enable_compile_warnings=no
7904
 
  fi
7905
 
  if test "x$enable_cxx_warnings" != "xno"; then
7906
 
    if test "x$GCC" = "xyes"; then
7907
 
      case " $CXXFLAGS " in
7908
 
      *[\ \     ]-Wall[\ \      ]*) ;;
7909
 
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
7910
 
      esac
7911
 
 
7912
 
      ## -W is not all that useful.  And it cannot be controlled
7913
 
      ## with individual -Wno-xxx flags, unlike -Wall
7914
 
      if test "x$enable_cxx_warnings" = "xyes"; then
7915
 
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
7916
 
      fi
7917
 
    fi
7918
 
  fi
7919
 
  AC_MSG_RESULT($warnCXXFLAGS)
7920
 
 
7921
 
   AC_ARG_ENABLE(iso-cxx,
7922
 
                 AC_HELP_STRING([--enable-iso-cxx],
7923
 
                                [Try to warn if code is not ISO C++ ]),,
7924
 
                 [enable_iso_cxx=no])
7925
 
 
7926
 
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
7927
 
   complCXXFLAGS=
7928
 
   if test "x$enable_iso_cxx" != "xno"; then
7929
 
     if test "x$GCC" = "xyes"; then
7930
 
      case " $CXXFLAGS " in
7931
 
      *[\ \     ]-ansi[\ \      ]*) ;;
7932
 
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
7933
 
      esac
7934
 
 
7935
 
      case " $CXXFLAGS " in
7936
 
      *[\ \     ]-pedantic[\ \  ]*) ;;
7937
 
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
7938
 
      esac
7939
 
     fi
7940
 
   fi
7941
 
  AC_MSG_RESULT($complCXXFLAGS)
7942
 
 
7943
 
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
7944
 
  AC_SUBST(WARN_CXXFLAGS)
7945
 
])
7946