16
16
You have another version of autoconf. If you want to use that,
17
17
you should regenerate the build system entirely.], [63])])
19
# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
21
# This file is free software; the Free Software Foundation
22
# gives unlimited permission to copy and/or distribute it,
23
# with or without modifications, as long as this notice is preserved.
25
# AM_AUTOMAKE_VERSION(VERSION)
26
# ----------------------------
27
# Automake X.Y traces this macro to ensure aclocal.m4 has been
28
# generated from the m4 files accompanying Automake X.Y.
29
# (This private macro should not be called outside this file.)
30
AC_DEFUN([AM_AUTOMAKE_VERSION],
31
[am__api_version='1.10'
32
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
33
dnl require some minimum version. Point them to the right macro.
34
m4_if([$1], [1.10], [],
35
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
38
# _AM_AUTOCONF_VERSION(VERSION)
39
# -----------------------------
40
# aclocal traces this macro to find the Autoconf version.
41
# This is a private macro too. Using m4_define simplifies
42
# the logic in aclocal, which can simply ignore this definition.
43
m4_define([_AM_AUTOCONF_VERSION], [])
45
# AM_SET_CURRENT_AUTOMAKE_VERSION
46
# -------------------------------
47
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
48
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
49
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
50
[AM_AUTOMAKE_VERSION([1.10])dnl
51
_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
53
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
55
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
57
# This file is free software; the Free Software Foundation
58
# gives unlimited permission to copy and/or distribute it,
59
# with or without modifications, as long as this notice is preserved.
61
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
62
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
63
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
65
# Of course, Automake must honor this variable whenever it calls a
66
# tool from the auxiliary directory. The problem is that $srcdir (and
67
# therefore $ac_aux_dir as well) can be either absolute or relative,
68
# depending on how configure is run. This is pretty annoying, since
69
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
70
# source directory, any form will work fine, but in subdirectories a
71
# relative path needs to be adjusted first.
74
# fails when called from a subdirectory if $ac_aux_dir is relative
75
# $top_srcdir/$ac_aux_dir/missing
76
# fails if $ac_aux_dir is absolute,
77
# fails when called from a subdirectory in a VPATH build with
78
# a relative $ac_aux_dir
80
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
81
# are both prefixed by $srcdir. In an in-source build this is usually
82
# harmless because $srcdir is `.', but things will broke when you
83
# start a VPATH build or use an absolute $srcdir.
85
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
86
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
87
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
88
# and then we would define $MISSING as
89
# MISSING="\${SHELL} $am_aux_dir/missing"
90
# This will work as long as MISSING is not called from configure, because
91
# unfortunately $(top_srcdir) has no meaning in configure.
92
# However there are other variables, like CC, which are often used in
93
# configure, and could therefore not use this "fixed" $ac_aux_dir.
95
# Another solution, used here, is to always expand $ac_aux_dir to an
96
# absolute PATH. The drawback is that using absolute paths prevent a
97
# configured tree to be moved without reconfiguration.
99
AC_DEFUN([AM_AUX_DIR_EXPAND],
100
[dnl Rely on autoconf to set up CDPATH properly.
102
# expand $ac_aux_dir to an absolute path
103
am_aux_dir=`cd $ac_aux_dir && pwd`
106
# AM_CONDITIONAL -*- Autoconf -*-
108
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
109
# Free Software Foundation, Inc.
111
# This file is free software; the Free Software Foundation
112
# gives unlimited permission to copy and/or distribute it,
113
# with or without modifications, as long as this notice is preserved.
117
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
118
# -------------------------------------
119
# Define a conditional.
120
AC_DEFUN([AM_CONDITIONAL],
122
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
123
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
124
AC_SUBST([$1_TRUE])dnl
125
AC_SUBST([$1_FALSE])dnl
126
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
127
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
135
AC_CONFIG_COMMANDS_PRE(
136
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
137
AC_MSG_ERROR([[conditional "$1" was never defined.
138
Usually this means the macro was only invoked conditionally.]])
141
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
142
# Free Software Foundation, Inc.
144
# This file is free software; the Free Software Foundation
145
# gives unlimited permission to copy and/or distribute it,
146
# with or without modifications, as long as this notice is preserved.
150
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
151
# written in clear, in which case automake, when reading aclocal.m4,
152
# will think it sees a *use*, and therefore will trigger all it's
153
# C support machinery. Also note that it means that autoscan, seeing
154
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
157
# _AM_DEPENDENCIES(NAME)
158
# ----------------------
159
# See how the compiler implements dependency checking.
160
# NAME is "CC", "CXX", "GCJ", or "OBJC".
161
# We try a few techniques and use that to set a single cache variable.
163
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
164
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
165
# dependency, and given that the user is not expected to run this macro,
166
# just rely on AC_PROG_CC.
167
AC_DEFUN([_AM_DEPENDENCIES],
168
[AC_REQUIRE([AM_SET_DEPDIR])dnl
169
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
170
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
171
AC_REQUIRE([AM_DEP_TRACK])dnl
173
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
174
[$1], CXX, [depcc="$CXX" am_compiler_list=],
175
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
176
[$1], UPC, [depcc="$UPC" am_compiler_list=],
177
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
178
[depcc="$$1" am_compiler_list=])
180
AC_CACHE_CHECK([dependency style of $depcc],
181
[am_cv_$1_dependencies_compiler_type],
182
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
183
# We make a subdir and do the tests there. Otherwise we can end up
184
# making bogus files that we don't know about and never remove. For
185
# instance it was reported that on HP-UX the gcc test will end up
186
# making a dummy file named `D' -- because `-MD' means `put the output
189
# Copy depcomp to subdir because otherwise we won't find it if we're
190
# using a relative directory.
191
cp "$am_depcomp" conftest.dir
193
# We will build objects and dependencies in a subdirectory because
194
# it helps to detect inapplicable dependency modes. For instance
195
# both Tru64's cc and ICC support -MD to output dependencies as a
196
# side effect of compilation, but ICC will put the dependencies in
197
# the current directory while Tru64 will put them in the object
201
am_cv_$1_dependencies_compiler_type=none
202
if test "$am_compiler_list" = ""; then
203
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
205
for depmode in $am_compiler_list; do
206
# Setup a source with many dependencies, because some compilers
207
# like to wrap large dependency lists on column 80 (with \), and
208
# we should not choose a depcomp mode which is confused by this.
210
# We need to recreate these files for each test, as the compiler may
211
# overwrite some of them when testing with obscure command lines.
212
# This happens at least with the AIX C compiler.
214
for i in 1 2 3 4 5 6; do
215
echo '#include "conftst'$i'.h"' >> sub/conftest.c
216
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
217
# Solaris 8's {/usr,}/bin/sh.
218
touch sub/conftst$i.h
220
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
224
# after this tag, mechanisms are not by side-effect, so they'll
225
# only be used when explicitly requested
226
if test "x$enable_dependency_tracking" = xyes; then
234
# We check with `-c' and `-o' for the sake of the "dashmstdout"
235
# mode. It turns out that the SunPro C++ compiler does not properly
236
# handle `-M -o', and we need to detect this.
237
if depmode=$depmode \
238
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
239
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
240
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
241
>/dev/null 2>conftest.err &&
242
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
243
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
244
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
245
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
246
# icc doesn't choke on unknown options, it will just issue warnings
247
# or remarks (even with -Werror). So we grep stderr for any message
248
# that says an option was ignored or not supported.
249
# When given -MP, icc 7.0 and 7.1 complain thusly:
250
# icc: Command line warning: ignoring option '-M'; no argument required
251
# The diagnosis changed in icc 8.0:
252
# icc: Command line remark: option '-MP' not supported
253
if (grep 'ignoring option' conftest.err ||
254
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
255
am_cv_$1_dependencies_compiler_type=$depmode
264
am_cv_$1_dependencies_compiler_type=none
267
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
268
AM_CONDITIONAL([am__fastdep$1], [
269
test "x$enable_dependency_tracking" != xno \
270
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
276
# Choose a directory name for dependency files.
277
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
278
AC_DEFUN([AM_SET_DEPDIR],
279
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
280
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
286
AC_DEFUN([AM_DEP_TRACK],
287
[AC_ARG_ENABLE(dependency-tracking,
288
[ --disable-dependency-tracking speeds up one-time build
289
--enable-dependency-tracking do not reject slow dependency extractors])
290
if test "x$enable_dependency_tracking" != xno; then
291
am_depcomp="$ac_aux_dir/depcomp"
294
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
295
AC_SUBST([AMDEPBACKSLASH])dnl
296
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
299
# Generate code to set up dependency tracking. -*- Autoconf -*-
301
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
302
# Free Software Foundation, Inc.
304
# This file is free software; the Free Software Foundation
305
# gives unlimited permission to copy and/or distribute it,
306
# with or without modifications, as long as this notice is preserved.
310
# _AM_OUTPUT_DEPENDENCY_COMMANDS
311
# ------------------------------
312
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
313
[for mf in $CONFIG_FILES; do
314
# Strip MF so we end up with the name of the file.
315
mf=`echo "$mf" | sed -e 's/:.*$//'`
316
# Check whether this is an Automake generated Makefile or not.
317
# We used to match only the files named `Makefile.in', but
318
# some people rename them; so instead we look at the file content.
319
# Grep'ing the first line is not enough: some people post-process
320
# each Makefile.in and add a new line on top of each file to say so.
321
# Grep'ing the whole file is not good either: AIX grep has a line
322
# limit of 2048, but all sed's we know have understand at least 4000.
323
if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
324
dirpart=`AS_DIRNAME("$mf")`
328
# Extract the definition of DEPDIR, am__include, and am__quote
329
# from the Makefile without running `make'.
330
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
331
test -z "$DEPDIR" && continue
332
am__include=`sed -n 's/^am__include = //p' < "$mf"`
333
test -z "am__include" && continue
334
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
335
# When using ansi2knr, U may be empty or an underscore; expand it
336
U=`sed -n 's/^U = //p' < "$mf"`
337
# Find all dependency output files, they are included files with
338
# $(DEPDIR) in their names. We invoke sed twice because it is the
339
# simplest approach to changing $(DEPDIR) to its actual value in the
341
for file in `sed -n "
342
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
343
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
344
# Make sure the directory exists.
345
test -f "$dirpart/$file" && continue
346
fdir=`AS_DIRNAME(["$file"])`
347
AS_MKDIR_P([$dirpart/$fdir])
348
# echo "creating $dirpart/$file"
349
echo '# dummy' > "$dirpart/$file"
352
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
355
# AM_OUTPUT_DEPENDENCY_COMMANDS
356
# -----------------------------
357
# This macro should only be invoked once -- use via AC_REQUIRE.
359
# This code is only required when automatic dependency tracking
360
# is enabled. FIXME. This creates each `.P' file that we will
361
# need in order to bootstrap the dependency handling code.
362
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
363
[AC_CONFIG_COMMANDS([depfiles],
364
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
365
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
368
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
369
# Free Software Foundation, Inc.
371
# This file is free software; the Free Software Foundation
372
# gives unlimited permission to copy and/or distribute it,
373
# with or without modifications, as long as this notice is preserved.
377
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
378
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
380
# Do all the work for Automake. -*- Autoconf -*-
382
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
383
# 2005, 2006 Free Software Foundation, Inc.
385
# This file is free software; the Free Software Foundation
386
# gives unlimited permission to copy and/or distribute it,
387
# with or without modifications, as long as this notice is preserved.
391
# This macro actually does too much. Some checks are only needed if
392
# your package does certain things. But this isn't really a big deal.
394
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
395
# AM_INIT_AUTOMAKE([OPTIONS])
396
# -----------------------------------------------
397
# The call with PACKAGE and VERSION arguments is the old style
398
# call (pre autoconf-2.50), which is being phased out. PACKAGE
399
# and VERSION should now be passed to AC_INIT and removed from
400
# the call to AM_INIT_AUTOMAKE.
401
# We support both call styles for the transition. After
402
# the next Automake release, Autoconf can make the AC_INIT
403
# arguments mandatory, and then we can depend on a new Autoconf
404
# release and drop the old call support.
405
AC_DEFUN([AM_INIT_AUTOMAKE],
406
[AC_PREREQ([2.60])dnl
407
dnl Autoconf wants to disallow AM_ names. We explicitly allow
408
dnl the ones we care about.
409
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
410
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
411
AC_REQUIRE([AC_PROG_INSTALL])dnl
412
if test "`cd $srcdir && pwd`" != "`pwd`"; then
413
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
414
# is not polluted with repeated "-I."
415
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
416
# test to see if srcdir already configured
417
if test -f $srcdir/config.status; then
418
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
422
# test whether we have cygpath
423
if test -z "$CYGPATH_W"; then
424
if (cygpath --version) >/dev/null 2>/dev/null; then
425
CYGPATH_W='cygpath -w'
430
AC_SUBST([CYGPATH_W])
432
# Define the identity of the package.
433
dnl Distinguish between old-style and new-style calls.
435
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
436
AC_SUBST([PACKAGE], [$1])dnl
437
AC_SUBST([VERSION], [$2])],
438
[_AM_SET_OPTIONS([$1])dnl
439
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
440
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
441
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
442
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
443
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
445
_AM_IF_OPTION([no-define],,
446
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
447
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
449
# Some tools Automake needs.
450
AC_REQUIRE([AM_SANITY_CHECK])dnl
451
AC_REQUIRE([AC_ARG_PROGRAM])dnl
452
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
453
AM_MISSING_PROG(AUTOCONF, autoconf)
454
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
455
AM_MISSING_PROG(AUTOHEADER, autoheader)
456
AM_MISSING_PROG(MAKEINFO, makeinfo)
458
AM_PROG_INSTALL_STRIP
459
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
460
# We need awk for the "check" target. The system "awk" is bad on
462
AC_REQUIRE([AC_PROG_AWK])dnl
463
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
464
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
465
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
466
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
467
[_AM_PROG_TAR([v7])])])
468
_AM_IF_OPTION([no-dependencies],,
469
[AC_PROVIDE_IFELSE([AC_PROG_CC],
470
[_AM_DEPENDENCIES(CC)],
471
[define([AC_PROG_CC],
472
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
473
AC_PROVIDE_IFELSE([AC_PROG_CXX],
474
[_AM_DEPENDENCIES(CXX)],
475
[define([AC_PROG_CXX],
476
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
477
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
478
[_AM_DEPENDENCIES(OBJC)],
479
[define([AC_PROG_OBJC],
480
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
485
# When config.status generates a header, we must update the stamp-h file.
486
# This file resides in the same directory as the config header
487
# that is generated. The stamp files are numbered to have different names.
489
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
490
# loop where config.status creates the headers, so we can generate
491
# our stamp files there.
492
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
493
[# Compute $1's index in $config_headers.
495
for _am_header in $config_headers :; do
500
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
503
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
505
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
507
# This file is free software; the Free Software Foundation
508
# gives unlimited permission to copy and/or distribute it,
509
# with or without modifications, as long as this notice is preserved.
513
# Define $install_sh.
514
AC_DEFUN([AM_PROG_INSTALL_SH],
515
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
516
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
517
AC_SUBST(install_sh)])
519
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
521
# This file is free software; the Free Software Foundation
522
# gives unlimited permission to copy and/or distribute it,
523
# with or without modifications, as long as this notice is preserved.
527
# Check whether the underlying file-system supports filenames
528
# with a leading dot. For instance MS-DOS doesn't.
529
AC_DEFUN([AM_SET_LEADING_DOT],
530
[rm -rf .tst 2>/dev/null
531
mkdir .tst 2>/dev/null
532
if test -d .tst; then
537
rmdir .tst 2>/dev/null
538
AC_SUBST([am__leading_dot])])
540
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
543
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
544
# Free Software Foundation, Inc.
546
# This file is free software; the Free Software Foundation
547
# gives unlimited permission to copy and/or distribute it,
548
# with or without modifications, as long as this notice is preserved.
552
AC_DEFUN([AM_MAINTAINER_MODE],
553
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
554
dnl maintainer-mode is disabled by default
555
AC_ARG_ENABLE(maintainer-mode,
556
[ --enable-maintainer-mode enable make rules and dependencies not useful
557
(and sometimes confusing) to the casual installer],
558
USE_MAINTAINER_MODE=$enableval,
559
USE_MAINTAINER_MODE=no)
560
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
561
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
562
MAINT=$MAINTAINER_MODE_TRUE
567
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
569
# Check to see how 'make' treats includes. -*- Autoconf -*-
571
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
573
# This file is free software; the Free Software Foundation
574
# gives unlimited permission to copy and/or distribute it,
575
# with or without modifications, as long as this notice is preserved.
581
# Check to see how make treats includes.
582
AC_DEFUN([AM_MAKE_INCLUDE],
583
[am_make=${MAKE-make}
584
cat > confinc << 'END'
589
# If we don't find an include directive, just comment out the code.
590
AC_MSG_CHECKING([for style of include used by $am_make])
594
# First try GNU make style include.
595
echo "include confinc" > confmf
596
# We grep out `Entering directory' and `Leaving directory'
597
# messages which can occur if `w' ends up in MAKEFLAGS.
598
# In particular we don't look at `^make:' because GNU make might
599
# be invoked under some other name (usually "gmake"), in which
600
# case it prints its new name instead of `make'.
601
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
606
# Now try BSD make style include.
607
if test "$am__include" = "#"; then
608
echo '.include "confinc"' > confmf
609
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
615
AC_SUBST([am__include])
616
AC_SUBST([am__quote])
617
AC_MSG_RESULT([$_am_result])
621
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
623
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
624
# Free Software Foundation, Inc.
626
# This file is free software; the Free Software Foundation
627
# gives unlimited permission to copy and/or distribute it,
628
# with or without modifications, as long as this notice is preserved.
632
# AM_MISSING_PROG(NAME, PROGRAM)
633
# ------------------------------
634
AC_DEFUN([AM_MISSING_PROG],
635
[AC_REQUIRE([AM_MISSING_HAS_RUN])
636
$1=${$1-"${am_missing_run}$2"}
642
# Define MISSING if not defined so far and test if it supports --run.
643
# If it does, set am_missing_run to use it, otherwise, to nothing.
644
AC_DEFUN([AM_MISSING_HAS_RUN],
645
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
646
AC_REQUIRE_AUX_FILE([missing])dnl
647
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
648
# Use eval to expand $SHELL
649
if eval "$MISSING --run true"; then
650
am_missing_run="$MISSING --run "
653
AC_MSG_WARN([`missing' script is too old or missing])
657
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
659
# This file is free software; the Free Software Foundation
660
# gives unlimited permission to copy and/or distribute it,
661
# with or without modifications, as long as this notice is preserved.
665
# Check for `mkdir -p'.
666
AC_DEFUN([AM_PROG_MKDIR_P],
667
[AC_PREREQ([2.60])dnl
668
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
669
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
670
dnl while keeping a definition of mkdir_p for backward compatibility.
671
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
672
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
673
dnl Makefile.ins that do not define MKDIR_P, so we do our own
674
dnl adjustment using top_builddir (which is defined more often than
676
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
678
[[\\/$]]* | ?:[[\\/]]*) ;;
679
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
683
# Helper functions for option handling. -*- Autoconf -*-
685
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
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.
693
# _AM_MANGLE_OPTION(NAME)
694
# -----------------------
695
AC_DEFUN([_AM_MANGLE_OPTION],
696
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
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)])
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)])])
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])])
716
# Check to make sure that the build environment is sane. -*- Autoconf -*-
718
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
719
# Free Software Foundation, Inc.
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.
729
AC_DEFUN([AM_SANITY_CHECK],
730
[AC_MSG_CHECKING([whether build environment is sane])
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
740
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
741
if test "$[*]" = "X"; then
743
set X `ls -t $srcdir/configure conftest.file`
746
if test "$[*]" != "X $srcdir/configure conftest.file" \
747
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
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])
757
test "$[2]" = conftest.file
763
AC_MSG_ERROR([newly created file is older than distributed files!
764
Check your system clock])
768
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
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.
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], :)
793
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
794
AC_SUBST([INSTALL_STRIP_PROGRAM])])
796
# Copyright (C) 2006 Free Software Foundation, Inc.
798
# This file is free software; the Free Software Foundation
799
# gives unlimited permission to copy and/or distribute it,
800
# with or without modifications, as long as this notice is preserved.
802
# _AM_SUBST_NOTMAKE(VARIABLE)
803
# ---------------------------
804
# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
805
# This macro is traced by Automake.
806
AC_DEFUN([_AM_SUBST_NOTMAKE])
808
# Check how to create a tarball. -*- Autoconf -*-
810
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
812
# This file is free software; the Free Software Foundation
813
# gives unlimited permission to copy and/or distribute it,
814
# with or without modifications, as long as this notice is preserved.
818
# _AM_PROG_TAR(FORMAT)
819
# --------------------
820
# Check how to create a tarball in format FORMAT.
821
# FORMAT should be one of `v7', `ustar', or `pax'.
823
# Substitute a variable $(am__tar) that is a command
824
# writing to stdout a FORMAT-tarball containing the directory
826
# tardir=directory && $(am__tar) > result.tar
828
# Substitute a variable $(am__untar) that extract such
829
# a tarball read from stdin.
830
# $(am__untar) < result.tar
831
AC_DEFUN([_AM_PROG_TAR],
832
[# Always define AMTAR for backward compatibility.
833
AM_MISSING_PROG([AMTAR], [tar])
835
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
836
[m4_case([$1], [ustar],, [pax],,
837
[m4_fatal([Unknown tar format])])
838
AC_MSG_CHECKING([how to create a $1 tar archive])
839
# Loop over all known methods to create a tar archive until one works.
840
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
841
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
842
# Do not fold the above two line into one, because Tru64 sh and
843
# Solaris sh will not grok spaces in the rhs of `-'.
844
for _am_tool in $_am_tools
848
for _am_tar in tar gnutar gtar;
850
AM_RUN_LOG([$_am_tar --version]) && break
852
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
853
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
854
am__untar="$_am_tar -xf -"
857
# Must skip GNU tar: if it does not support --format= it doesn't create
858
# ustar tarball either.
859
(tar --version) >/dev/null 2>&1 && continue
860
am__tar='tar chf - "$$tardir"'
861
am__tar_='tar chf - "$tardir"'
865
am__tar='pax -L -x $1 -w "$$tardir"'
866
am__tar_='pax -L -x $1 -w "$tardir"'
870
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
871
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
872
am__untar='cpio -i -H $1 -d'
881
# If the value was cached, stop now. We just wanted to have am__tar
883
test -n "${am_cv_prog_tar_$1}" && break
885
# tar/untar a dummy directory, and stop if the command works
888
echo GrepMe > conftest.dir/file
889
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
891
if test -s conftest.tar; then
892
AM_RUN_LOG([$am__untar <conftest.tar])
893
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
898
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
899
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
901
AC_SUBST([am__untar])
904
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
905
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
907
# This file is free software, distributed under the terms of the GNU
908
# General Public License. As a special exception to the GNU General
909
# Public License, this file may be distributed as part of a program
910
# that contains a configuration script generated by Autoconf, under
911
# the same distribution terms as the rest of that program.
913
# This file can be copied and used freely without restrictions. It can
914
# be used in projects which are not available under the GNU Public License
915
# but which still want to provide support for the GNU gettext functionality.
917
# Macro to add for using GNU gettext.
918
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
920
# Modified to never use included libintl.
921
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
923
# Major rework to remove unused code
924
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
926
# Added better handling of ALL_LINGUAS from GNU gettext version
927
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
929
# Modified to require ngettext
930
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
932
# We need this here as well, since someone might use autoconf-2.5x
933
# to configure GLib then an older version to configure a package
934
# using AM_GLIB_GNU_GETTEXT
938
dnl We go to great lengths to make sure that aclocal won't
939
dnl try to pull in the installed version of these macros
940
dnl when running aclocal in the glib directory.
942
m4_copy([AC_DEFUN],[glib_DEFUN])
943
m4_copy([AC_REQUIRE],[glib_REQUIRE])
945
dnl At the end, if we're not within glib, we'll define the public
946
dnl definitions in terms of our private definitions.
950
#--------------------
951
glib_DEFUN([GLIB_LC_MESSAGES],
952
[AC_CHECK_HEADERS([locale.h])
953
if test $ac_cv_header_locale_h = yes; then
954
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
955
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
956
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
957
if test $am_cv_val_LC_MESSAGES = yes; then
958
AC_DEFINE(HAVE_LC_MESSAGES, 1,
959
[Define if your <locale.h> file defines LC_MESSAGES.])
963
# GLIB_PATH_PROG_WITH_TEST
964
#----------------------------
965
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
966
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
967
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
968
[# Extract the first word of "$2", so it can be a program name with args.
969
set dummy $2; ac_word=[$]2
970
AC_MSG_CHECKING([for $ac_word])
971
AC_CACHE_VAL(ac_cv_path_$1,
974
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
977
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
978
for ac_dir in ifelse([$5], , $PATH, [$5]); do
979
test -z "$ac_dir" && ac_dir=.
980
if test -f $ac_dir/$ac_word; then
982
ac_cv_path_$1="$ac_dir/$ac_word"
988
dnl If no 4th arg is given, leave the cache variable unset,
989
dnl so AC_PATH_PROGS will keep looking.
990
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
995
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1005
glib_DEFUN([GLIB_WITH_NLS],
1006
dnl NLS is obligatory
1007
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1011
gt_cv_have_gettext=no
1017
AC_CHECK_HEADER(libintl.h,
1018
[gt_cv_func_dgettext_libintl="no"
1019
libintl_extra_libs=""
1022
# First check in libc
1024
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
1026
#include <libintl.h>
1028
[return !ngettext ("","", 1)],
1029
gt_cv_func_ngettext_libc=yes,
1030
gt_cv_func_ngettext_libc=no)
1033
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1034
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
1036
#include <libintl.h>
1038
[return !dgettext ("","")],
1039
gt_cv_func_dgettext_libc=yes,
1040
gt_cv_func_dgettext_libc=no)
1044
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1045
AC_CHECK_FUNCS(bind_textdomain_codeset)
1049
# If we don't have everything we want, check in libintl
1051
if test "$gt_cv_func_dgettext_libc" != "yes" \
1052
|| test "$gt_cv_func_ngettext_libc" != "yes" \
1053
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
1055
AC_CHECK_LIB(intl, bindtextdomain,
1056
[AC_CHECK_LIB(intl, ngettext,
1057
[AC_CHECK_LIB(intl, dgettext,
1058
gt_cv_func_dgettext_libintl=yes)])])
1060
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
1061
AC_MSG_CHECKING([if -liconv is needed to use gettext])
1063
AC_CHECK_LIB(intl, ngettext,
1064
[AC_CHECK_LIB(intl, dcgettext,
1065
[gt_cv_func_dgettext_libintl=yes
1066
libintl_extra_libs=-liconv],
1072
# If we found libintl, then check in it for bind_textdomain_codeset();
1073
# we'll prefer libc if neither have bind_textdomain_codeset(),
1074
# and both have dgettext and ngettext
1076
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
1077
glib_save_LIBS="$LIBS"
1078
LIBS="$LIBS -lintl $libintl_extra_libs"
1079
unset ac_cv_func_bind_textdomain_codeset
1080
AC_CHECK_FUNCS(bind_textdomain_codeset)
1081
LIBS="$glib_save_LIBS"
1083
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
1084
gt_cv_func_dgettext_libc=no
1086
if test "$gt_cv_func_dgettext_libc" = "yes" \
1087
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
1088
gt_cv_func_dgettext_libintl=no
1094
if test "$gt_cv_func_dgettext_libc" = "yes" \
1095
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
1096
gt_cv_have_gettext=yes
1099
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1100
INTLLIBS="-lintl $libintl_extra_libs"
1103
if test "$gt_cv_have_gettext" = "yes"; then
1104
AC_DEFINE(HAVE_GETTEXT,1,
1105
[Define if the GNU gettext() function is already present or preinstalled.])
1106
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1107
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1108
if test "$MSGFMT" != "no"; then
1109
glib_save_LIBS="$LIBS"
1110
LIBS="$LIBS $INTLLIBS"
1111
AC_CHECK_FUNCS(dcgettext)
1113
AC_MSG_CHECKING([if msgfmt accepts -c])
1114
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
1117
"Content-Type: text/plain; charset=UTF-8\n"
1118
"Project-Id-Version: test 1.0\n"
1119
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
1120
"Last-Translator: test <foo@bar.xx>\n"
1121
"Language-Team: C <LL@li.org>\n"
1122
"MIME-Version: 1.0\n"
1123
"Content-Transfer-Encoding: 8bit\n"
1124
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
1125
AC_SUBST(MSGFMT_OPTS)
1126
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1127
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1128
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1129
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1130
return _nl_msg_cat_cntr],
1135
dnl On Solaris, if bind_textdomain_codeset is in libc,
1136
dnl GNU format message catalog is always supported,
1137
dnl since both are added to the libc all together.
1138
dnl Hence, we'd like to go with DATADIRNAME=share and
1139
dnl and CATOBJEXT=.gmo in this case.
1140
AC_CHECK_FUNC(bind_textdomain_codeset,
1151
LIBS="$glib_save_LIBS"
1154
gt_cv_have_gettext=no
1159
if test "$gt_cv_have_gettext" = "yes" ; then
1160
AC_DEFINE(ENABLE_NLS, 1,
1161
[always defined to indicate that i18n is enabled])
1164
dnl Test whether we really found GNU xgettext.
1165
if test "$XGETTEXT" != ":"; then
1166
dnl If it is not GNU xgettext we define it as : so that the
1167
dnl Makefiles still can work.
1168
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1172
[found xgettext program is not GNU xgettext; ignore it])
1177
# We need to process the po/ directory.
1181
[case "$CONFIG_FILES" in *po/Makefile.in*)
1182
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1185
dnl These rules are solely for the distribution goal. While doing this
1186
dnl we only have to keep exactly one list of the available catalogs
1187
dnl in configure.in.
1188
for lang in $ALL_LINGUAS; do
1189
GMOFILES="$GMOFILES $lang.gmo"
1190
POFILES="$POFILES $lang.po"
1193
dnl Make all variables we use known to autoconf.
1196
AC_SUBST(DATADIRNAME)
1198
AC_SUBST(INSTOBJEXT)
1200
AC_SUBST(PO_IN_DATADIR_TRUE)
1201
AC_SUBST(PO_IN_DATADIR_FALSE)
1206
# AM_GLIB_GNU_GETTEXT
1207
# -------------------
1208
# Do checks necessary for use of gettext. If a suitable implementation
1209
# of gettext is found in either in libintl or in the C library,
1210
# it will set INTLLIBS to the libraries needed for use of gettext
1211
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
1212
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
1213
# on various variables needed by the Makefile.in.in installed by
1216
glib_DEFUN([GLIB_GNU_GETTEXT],
1217
[AC_REQUIRE([AC_PROG_CC])dnl
1218
AC_REQUIRE([AC_HEADER_STDC])dnl
1223
if test "$gt_cv_have_gettext" = "yes"; then
1224
if test "x$ALL_LINGUAS" = "x"; then
1227
AC_MSG_CHECKING(for catalogs to be installed)
1229
for presentlang in $ALL_LINGUAS; do
1231
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
1232
desiredlanguages="$LINGUAS"
1234
desiredlanguages="$ALL_LINGUAS"
1236
for desiredlang in $desiredlanguages; do
1237
# Use the presentlang catalog if desiredlang is
1238
# a. equal to presentlang, or
1239
# b. a variant of presentlang (because in this case,
1240
# presentlang can be used as a fallback for messages
1241
# which are not translated in the desiredlang catalog).
1242
case "$desiredlang" in
1243
"$presentlang"*) useit=yes;;
1246
if test $useit = yes; then
1247
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1250
LINGUAS=$NEW_LINGUAS
1251
AC_MSG_RESULT($LINGUAS)
1254
dnl Construct list of names of catalog files to be constructed.
1255
if test -n "$LINGUAS"; then
1256
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1260
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1261
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1262
dnl Try to locate is.
1264
if test -n "$ac_aux_dir"; then
1265
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1267
if test -z "$MKINSTALLDIRS"; then
1268
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1270
AC_SUBST(MKINSTALLDIRS)
1272
dnl Generate list of files to be processed by xgettext which will
1273
dnl be included in po/Makefile.
1274
test -d po || mkdir po
1275
if test "x$srcdir" != "x."; then
1276
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1277
posrcprefix="$srcdir/"
1279
posrcprefix="../$srcdir/"
1285
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1286
< $srcdir/po/POTFILES.in > po/POTFILES
1289
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1290
# -------------------------------
1291
# Define VARIABLE to the location where catalog files will
1292
# be installed by po/Makefile.
1293
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1294
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
1295
glib_save_prefix="$prefix"
1296
glib_save_exec_prefix="$exec_prefix"
1297
glib_save_datarootdir="$datarootdir"
1298
test "x$prefix" = xNONE && prefix=$ac_default_prefix
1299
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1300
datarootdir=`eval echo "${datarootdir}"`
1301
if test "x$CATOBJEXT" = "x.mo" ; then
1302
localedir=`eval echo "${libdir}/locale"`
1304
localedir=`eval echo "${datadir}/locale"`
1306
prefix="$glib_save_prefix"
1307
exec_prefix="$glib_save_exec_prefix"
1308
datarootdir="$glib_save_datarootdir"
1309
AC_DEFINE_UNQUOTED($1, "$localedir",
1310
[Define the location where the catalogs will be installed])
1314
dnl Now the definitions that aclocal will find
1316
ifdef(glib_configure_in,[],[
1317
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
1318
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1321
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
1323
# Create a temporary file with TEST-FILE as its contents and pass the
1324
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
1325
# 0 and perform ACTION-IF-FAIL for any other exit status.
1326
AC_DEFUN([GLIB_RUN_PROG],
1327
[cat >conftest.foo <<_ACEOF
1330
if AC_RUN_LOG([$1 conftest.foo]); then
1331
m4_ifval([$3], [$3], [:])
1332
m4_ifvaln([$4], [else $4])dnl
1333
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
1334
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
1338
dnl GNOME_COMPILE_WARNINGS
1339
dnl Turn on many useful compiler warnings
1340
dnl For now, only works on GCC
1341
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
1342
dnl ******************************
1343
dnl More compiler warnings
1344
dnl ******************************
1346
AC_ARG_ENABLE(compile-warnings,
1347
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
1348
[Turn on compiler warnings]),,
1349
[enable_compile_warnings="m4_default([$1],[yes])"])
1352
if test "x$GCC" != xyes; then
1353
enable_compile_warnings=no
1357
realsave_CFLAGS="$CFLAGS"
1359
case "$enable_compile_warnings" in
1364
warning_flags="-Wall"
1367
warning_flags="-Wall -Wmissing-prototypes"
1370
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
1371
CFLAGS="$warning_flags $CFLAGS"
1372
for option in -Wno-sign-compare; do
1373
SAVE_CFLAGS="$CFLAGS"
1374
CFLAGS="$CFLAGS $option"
1375
AC_MSG_CHECKING([whether gcc understands $option])
1376
AC_TRY_COMPILE([], [],
1379
CFLAGS="$SAVE_CFLAGS"
1380
AC_MSG_RESULT($has_option)
1381
if test $has_option = yes; then
1382
warning_flags="$warning_flags $option"
1388
if test "$enable_compile_warnings" = "error" ; then
1389
warning_flags="$warning_flags -Werror"
1393
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
1396
CFLAGS="$realsave_CFLAGS"
1397
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
1398
AC_MSG_RESULT($warning_flags)
1400
AC_ARG_ENABLE(iso-c,
1401
AC_HELP_STRING([--enable-iso-c],
1402
[Try to warn if code is not ISO C ]),,
1405
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
1407
if test "x$enable_iso_c" != "xno"; then
1408
if test "x$GCC" = "xyes"; then
1410
*[\ \ ]-ansi[\ \ ]*) ;;
1411
*) complCFLAGS="$complCFLAGS -ansi" ;;
1414
*[\ \ ]-pedantic[\ \ ]*) ;;
1415
*) complCFLAGS="$complCFLAGS -pedantic" ;;
1419
AC_MSG_RESULT($complCFLAGS)
1421
WARN_CFLAGS="$warning_flags $complCFLAGS"
1422
AC_SUBST(WARN_CFLAGS)
1425
dnl For C++, do basically the same thing.
1427
AC_DEFUN([GNOME_CXX_WARNINGS],[
1428
AC_ARG_ENABLE(cxx-warnings,
1429
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
1430
[Turn on compiler warnings.]),,
1431
[enable_cxx_warnings="m4_default([$1],[minimum])"])
1433
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
1435
if test "x$GXX" != xyes; then
1436
enable_cxx_warnings=no
1438
if test "x$enable_cxx_warnings" != "xno"; then
1439
if test "x$GXX" = "xyes"; then
1440
case " $CXXFLAGS " in
1441
*[\ \ ]-Wall[\ \ ]*) ;;
1442
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
1445
## -W is not all that useful. And it cannot be controlled
1446
## with individual -Wno-xxx flags, unlike -Wall
1447
if test "x$enable_cxx_warnings" = "xyes"; then
1448
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
1452
AC_MSG_RESULT($warnCXXFLAGS)
1454
AC_ARG_ENABLE(iso-cxx,
1455
AC_HELP_STRING([--enable-iso-cxx],
1456
[Try to warn if code is not ISO C++ ]),,
1457
[enable_iso_cxx=no])
1459
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
1461
if test "x$enable_iso_cxx" != "xno"; then
1462
if test "x$GXX" = "xyes"; then
1463
case " $CXXFLAGS " in
1464
*[\ \ ]-ansi[\ \ ]*) ;;
1465
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
1468
case " $CXXFLAGS " in
1469
*[\ \ ]-pedantic[\ \ ]*) ;;
1470
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
1474
AC_MSG_RESULT($complCXXFLAGS)
1476
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
1477
AC_SUBST(WARN_CXXFLAGS)
1480
19
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1482
21
# serial 48 AC_PROG_LIBTOOL
7854
6393
AC_MSG_RESULT([$SED])
6396
# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
6398
# This file is free software; the Free Software Foundation
6399
# gives unlimited permission to copy and/or distribute it,
6400
# with or without modifications, as long as this notice is preserved.
6402
# AM_AUTOMAKE_VERSION(VERSION)
6403
# ----------------------------
6404
# Automake X.Y traces this macro to ensure aclocal.m4 has been
6405
# generated from the m4 files accompanying Automake X.Y.
6406
# (This private macro should not be called outside this file.)
6407
AC_DEFUN([AM_AUTOMAKE_VERSION],
6408
[am__api_version='1.10'
6409
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
6410
dnl require some minimum version. Point them to the right macro.
6411
m4_if([$1], [1.10], [],
6412
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
6415
# _AM_AUTOCONF_VERSION(VERSION)
6416
# -----------------------------
6417
# aclocal traces this macro to find the Autoconf version.
6418
# This is a private macro too. Using m4_define simplifies
6419
# the logic in aclocal, which can simply ignore this definition.
6420
m4_define([_AM_AUTOCONF_VERSION], [])
6422
# AM_SET_CURRENT_AUTOMAKE_VERSION
6423
# -------------------------------
6424
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
6425
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6426
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6427
[AM_AUTOMAKE_VERSION([1.10])dnl
6428
_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
6430
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
6432
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6434
# This file is free software; the Free Software Foundation
6435
# gives unlimited permission to copy and/or distribute it,
6436
# with or without modifications, as long as this notice is preserved.
6438
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6439
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
6440
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6442
# Of course, Automake must honor this variable whenever it calls a
6443
# tool from the auxiliary directory. The problem is that $srcdir (and
6444
# therefore $ac_aux_dir as well) can be either absolute or relative,
6445
# depending on how configure is run. This is pretty annoying, since
6446
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6447
# source directory, any form will work fine, but in subdirectories a
6448
# relative path needs to be adjusted first.
6450
# $ac_aux_dir/missing
6451
# fails when called from a subdirectory if $ac_aux_dir is relative
6452
# $top_srcdir/$ac_aux_dir/missing
6453
# fails if $ac_aux_dir is absolute,
6454
# fails when called from a subdirectory in a VPATH build with
6455
# a relative $ac_aux_dir
6457
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6458
# are both prefixed by $srcdir. In an in-source build this is usually
6459
# harmless because $srcdir is `.', but things will broke when you
6460
# start a VPATH build or use an absolute $srcdir.
6462
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6463
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
6464
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6465
# and then we would define $MISSING as
6466
# MISSING="\${SHELL} $am_aux_dir/missing"
6467
# This will work as long as MISSING is not called from configure, because
6468
# unfortunately $(top_srcdir) has no meaning in configure.
6469
# However there are other variables, like CC, which are often used in
6470
# configure, and could therefore not use this "fixed" $ac_aux_dir.
6472
# Another solution, used here, is to always expand $ac_aux_dir to an
6473
# absolute PATH. The drawback is that using absolute paths prevent a
6474
# configured tree to be moved without reconfiguration.
6476
AC_DEFUN([AM_AUX_DIR_EXPAND],
6477
[dnl Rely on autoconf to set up CDPATH properly.
6478
AC_PREREQ([2.50])dnl
6479
# expand $ac_aux_dir to an absolute path
6480
am_aux_dir=`cd $ac_aux_dir && pwd`
6483
# AM_CONDITIONAL -*- Autoconf -*-
6485
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
6486
# Free Software Foundation, Inc.
6488
# This file is free software; the Free Software Foundation
6489
# gives unlimited permission to copy and/or distribute it,
6490
# with or without modifications, as long as this notice is preserved.
6494
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6495
# -------------------------------------
6496
# Define a conditional.
6497
AC_DEFUN([AM_CONDITIONAL],
6499
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
6500
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6501
AC_SUBST([$1_TRUE])dnl
6502
AC_SUBST([$1_FALSE])dnl
6503
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
6504
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
6512
AC_CONFIG_COMMANDS_PRE(
6513
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6514
AC_MSG_ERROR([[conditional "$1" was never defined.
6515
Usually this means the macro was only invoked conditionally.]])
6518
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6519
# Free Software Foundation, Inc.
6521
# This file is free software; the Free Software Foundation
6522
# gives unlimited permission to copy and/or distribute it,
6523
# with or without modifications, as long as this notice is preserved.
6527
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6528
# written in clear, in which case automake, when reading aclocal.m4,
6529
# will think it sees a *use*, and therefore will trigger all it's
6530
# C support machinery. Also note that it means that autoscan, seeing
6531
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6534
# _AM_DEPENDENCIES(NAME)
6535
# ----------------------
6536
# See how the compiler implements dependency checking.
6537
# NAME is "CC", "CXX", "GCJ", or "OBJC".
6538
# We try a few techniques and use that to set a single cache variable.
6540
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6541
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6542
# dependency, and given that the user is not expected to run this macro,
6543
# just rely on AC_PROG_CC.
6544
AC_DEFUN([_AM_DEPENDENCIES],
6545
[AC_REQUIRE([AM_SET_DEPDIR])dnl
6546
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6547
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6548
AC_REQUIRE([AM_DEP_TRACK])dnl
6550
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
6551
[$1], CXX, [depcc="$CXX" am_compiler_list=],
6552
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6553
[$1], UPC, [depcc="$UPC" am_compiler_list=],
6554
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
6555
[depcc="$$1" am_compiler_list=])
6557
AC_CACHE_CHECK([dependency style of $depcc],
6558
[am_cv_$1_dependencies_compiler_type],
6559
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6560
# We make a subdir and do the tests there. Otherwise we can end up
6561
# making bogus files that we don't know about and never remove. For
6562
# instance it was reported that on HP-UX the gcc test will end up
6563
# making a dummy file named `D' -- because `-MD' means `put the output
6566
# Copy depcomp to subdir because otherwise we won't find it if we're
6567
# using a relative directory.
6568
cp "$am_depcomp" conftest.dir
6570
# We will build objects and dependencies in a subdirectory because
6571
# it helps to detect inapplicable dependency modes. For instance
6572
# both Tru64's cc and ICC support -MD to output dependencies as a
6573
# side effect of compilation, but ICC will put the dependencies in
6574
# the current directory while Tru64 will put them in the object
6578
am_cv_$1_dependencies_compiler_type=none
6579
if test "$am_compiler_list" = ""; then
6580
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6582
for depmode in $am_compiler_list; do
6583
# Setup a source with many dependencies, because some compilers
6584
# like to wrap large dependency lists on column 80 (with \), and
6585
# we should not choose a depcomp mode which is confused by this.
6587
# We need to recreate these files for each test, as the compiler may
6588
# overwrite some of them when testing with obscure command lines.
6589
# This happens at least with the AIX C compiler.
6591
for i in 1 2 3 4 5 6; do
6592
echo '#include "conftst'$i'.h"' >> sub/conftest.c
6593
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6594
# Solaris 8's {/usr,}/bin/sh.
6595
touch sub/conftst$i.h
6597
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6601
# after this tag, mechanisms are not by side-effect, so they'll
6602
# only be used when explicitly requested
6603
if test "x$enable_dependency_tracking" = xyes; then
6611
# We check with `-c' and `-o' for the sake of the "dashmstdout"
6612
# mode. It turns out that the SunPro C++ compiler does not properly
6613
# handle `-M -o', and we need to detect this.
6614
if depmode=$depmode \
6615
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6616
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6617
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6618
>/dev/null 2>conftest.err &&
6619
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6620
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6621
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6622
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6623
# icc doesn't choke on unknown options, it will just issue warnings
6624
# or remarks (even with -Werror). So we grep stderr for any message
6625
# that says an option was ignored or not supported.
6626
# When given -MP, icc 7.0 and 7.1 complain thusly:
6627
# icc: Command line warning: ignoring option '-M'; no argument required
6628
# The diagnosis changed in icc 8.0:
6629
# icc: Command line remark: option '-MP' not supported
6630
if (grep 'ignoring option' conftest.err ||
6631
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6632
am_cv_$1_dependencies_compiler_type=$depmode
6641
am_cv_$1_dependencies_compiler_type=none
6644
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6645
AM_CONDITIONAL([am__fastdep$1], [
6646
test "x$enable_dependency_tracking" != xno \
6647
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6653
# Choose a directory name for dependency files.
6654
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6655
AC_DEFUN([AM_SET_DEPDIR],
6656
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6657
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6663
AC_DEFUN([AM_DEP_TRACK],
6664
[AC_ARG_ENABLE(dependency-tracking,
6665
[ --disable-dependency-tracking speeds up one-time build
6666
--enable-dependency-tracking do not reject slow dependency extractors])
6667
if test "x$enable_dependency_tracking" != xno; then
6668
am_depcomp="$ac_aux_dir/depcomp"
6671
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6672
AC_SUBST([AMDEPBACKSLASH])dnl
6673
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
6676
# Generate code to set up dependency tracking. -*- Autoconf -*-
6678
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6679
# Free Software Foundation, Inc.
6681
# This file is free software; the Free Software Foundation
6682
# gives unlimited permission to copy and/or distribute it,
6683
# with or without modifications, as long as this notice is preserved.
6687
# _AM_OUTPUT_DEPENDENCY_COMMANDS
6688
# ------------------------------
6689
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6690
[for mf in $CONFIG_FILES; do
6691
# Strip MF so we end up with the name of the file.
6692
mf=`echo "$mf" | sed -e 's/:.*$//'`
6693
# Check whether this is an Automake generated Makefile or not.
6694
# We used to match only the files named `Makefile.in', but
6695
# some people rename them; so instead we look at the file content.
6696
# Grep'ing the first line is not enough: some people post-process
6697
# each Makefile.in and add a new line on top of each file to say so.
6698
# Grep'ing the whole file is not good either: AIX grep has a line
6699
# limit of 2048, but all sed's we know have understand at least 4000.
6700
if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
6701
dirpart=`AS_DIRNAME("$mf")`
6705
# Extract the definition of DEPDIR, am__include, and am__quote
6706
# from the Makefile without running `make'.
6707
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6708
test -z "$DEPDIR" && continue
6709
am__include=`sed -n 's/^am__include = //p' < "$mf"`
6710
test -z "am__include" && continue
6711
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
6712
# When using ansi2knr, U may be empty or an underscore; expand it
6713
U=`sed -n 's/^U = //p' < "$mf"`
6714
# Find all dependency output files, they are included files with
6715
# $(DEPDIR) in their names. We invoke sed twice because it is the
6716
# simplest approach to changing $(DEPDIR) to its actual value in the
6718
for file in `sed -n "
6719
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
6720
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6721
# Make sure the directory exists.
6722
test -f "$dirpart/$file" && continue
6723
fdir=`AS_DIRNAME(["$file"])`
6724
AS_MKDIR_P([$dirpart/$fdir])
6725
# echo "creating $dirpart/$file"
6726
echo '# dummy' > "$dirpart/$file"
6729
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
6732
# AM_OUTPUT_DEPENDENCY_COMMANDS
6733
# -----------------------------
6734
# This macro should only be invoked once -- use via AC_REQUIRE.
6736
# This code is only required when automatic dependency tracking
6737
# is enabled. FIXME. This creates each `.P' file that we will
6738
# need in order to bootstrap the dependency handling code.
6739
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6740
[AC_CONFIG_COMMANDS([depfiles],
6741
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
6742
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6745
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
6746
# Free Software Foundation, Inc.
6748
# This file is free software; the Free Software Foundation
6749
# gives unlimited permission to copy and/or distribute it,
6750
# with or without modifications, as long as this notice is preserved.
6754
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
6755
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
6757
# Do all the work for Automake. -*- Autoconf -*-
6759
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
6760
# 2005, 2006 Free Software Foundation, Inc.
6762
# This file is free software; the Free Software Foundation
6763
# gives unlimited permission to copy and/or distribute it,
6764
# with or without modifications, as long as this notice is preserved.
6768
# This macro actually does too much. Some checks are only needed if
6769
# your package does certain things. But this isn't really a big deal.
6771
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6772
# AM_INIT_AUTOMAKE([OPTIONS])
6773
# -----------------------------------------------
6774
# The call with PACKAGE and VERSION arguments is the old style
6775
# call (pre autoconf-2.50), which is being phased out. PACKAGE
6776
# and VERSION should now be passed to AC_INIT and removed from
6777
# the call to AM_INIT_AUTOMAKE.
6778
# We support both call styles for the transition. After
6779
# the next Automake release, Autoconf can make the AC_INIT
6780
# arguments mandatory, and then we can depend on a new Autoconf
6781
# release and drop the old call support.
6782
AC_DEFUN([AM_INIT_AUTOMAKE],
6783
[AC_PREREQ([2.60])dnl
6784
dnl Autoconf wants to disallow AM_ names. We explicitly allow
6785
dnl the ones we care about.
6786
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6787
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6788
AC_REQUIRE([AC_PROG_INSTALL])dnl
6789
if test "`cd $srcdir && pwd`" != "`pwd`"; then
6790
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
6791
# is not polluted with repeated "-I."
6792
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
6793
# test to see if srcdir already configured
6794
if test -f $srcdir/config.status; then
6795
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6799
# test whether we have cygpath
6800
if test -z "$CYGPATH_W"; then
6801
if (cygpath --version) >/dev/null 2>/dev/null; then
6802
CYGPATH_W='cygpath -w'
6807
AC_SUBST([CYGPATH_W])
6809
# Define the identity of the package.
6810
dnl Distinguish between old-style and new-style calls.
6812
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6813
AC_SUBST([PACKAGE], [$1])dnl
6814
AC_SUBST([VERSION], [$2])],
6815
[_AM_SET_OPTIONS([$1])dnl
6816
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
6817
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
6818
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
6819
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6820
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
6822
_AM_IF_OPTION([no-define],,
6823
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
6824
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
6826
# Some tools Automake needs.
6827
AC_REQUIRE([AM_SANITY_CHECK])dnl
6828
AC_REQUIRE([AC_ARG_PROGRAM])dnl
6829
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
6830
AM_MISSING_PROG(AUTOCONF, autoconf)
6831
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
6832
AM_MISSING_PROG(AUTOHEADER, autoheader)
6833
AM_MISSING_PROG(MAKEINFO, makeinfo)
6835
AM_PROG_INSTALL_STRIP
6836
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
6837
# We need awk for the "check" target. The system "awk" is bad on
6839
AC_REQUIRE([AC_PROG_AWK])dnl
6840
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
6841
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6842
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
6843
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
6844
[_AM_PROG_TAR([v7])])])
6845
_AM_IF_OPTION([no-dependencies],,
6846
[AC_PROVIDE_IFELSE([AC_PROG_CC],
6847
[_AM_DEPENDENCIES(CC)],
6848
[define([AC_PROG_CC],
6849
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
6850
AC_PROVIDE_IFELSE([AC_PROG_CXX],
6851
[_AM_DEPENDENCIES(CXX)],
6852
[define([AC_PROG_CXX],
6853
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
6854
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
6855
[_AM_DEPENDENCIES(OBJC)],
6856
[define([AC_PROG_OBJC],
6857
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
6862
# When config.status generates a header, we must update the stamp-h file.
6863
# This file resides in the same directory as the config header
6864
# that is generated. The stamp files are numbered to have different names.
6866
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6867
# loop where config.status creates the headers, so we can generate
6868
# our stamp files there.
6869
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6870
[# Compute $1's index in $config_headers.
6872
for _am_header in $config_headers :; do
6877
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
6880
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
6882
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6884
# This file is free software; the Free Software Foundation
6885
# gives unlimited permission to copy and/or distribute it,
6886
# with or without modifications, as long as this notice is preserved.
6888
# AM_PROG_INSTALL_SH
6889
# ------------------
6890
# Define $install_sh.
6891
AC_DEFUN([AM_PROG_INSTALL_SH],
6892
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6893
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
6894
AC_SUBST(install_sh)])
6896
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
6898
# This file is free software; the Free Software Foundation
6899
# gives unlimited permission to copy and/or distribute it,
6900
# with or without modifications, as long as this notice is preserved.
6904
# Check whether the underlying file-system supports filenames
6905
# with a leading dot. For instance MS-DOS doesn't.
6906
AC_DEFUN([AM_SET_LEADING_DOT],
6907
[rm -rf .tst 2>/dev/null
6908
mkdir .tst 2>/dev/null
6909
if test -d .tst; then
6914
rmdir .tst 2>/dev/null
6915
AC_SUBST([am__leading_dot])])
6917
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
6920
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
6921
# Free Software Foundation, Inc.
6923
# This file is free software; the Free Software Foundation
6924
# gives unlimited permission to copy and/or distribute it,
6925
# with or without modifications, as long as this notice is preserved.
6929
AC_DEFUN([AM_MAINTAINER_MODE],
6930
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
6931
dnl maintainer-mode is disabled by default
6932
AC_ARG_ENABLE(maintainer-mode,
6933
[ --enable-maintainer-mode enable make rules and dependencies not useful
6934
(and sometimes confusing) to the casual installer],
6935
USE_MAINTAINER_MODE=$enableval,
6936
USE_MAINTAINER_MODE=no)
6937
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
6938
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
6939
MAINT=$MAINTAINER_MODE_TRUE
6944
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
6946
# Check to see how 'make' treats includes. -*- Autoconf -*-
6948
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
6950
# This file is free software; the Free Software Foundation
6951
# gives unlimited permission to copy and/or distribute it,
6952
# with or without modifications, as long as this notice is preserved.
6958
# Check to see how make treats includes.
6959
AC_DEFUN([AM_MAKE_INCLUDE],
6960
[am_make=${MAKE-make}
6961
cat > confinc << 'END'
6966
# If we don't find an include directive, just comment out the code.
6967
AC_MSG_CHECKING([for style of include used by $am_make])
6971
# First try GNU make style include.
6972
echo "include confinc" > confmf
6973
# We grep out `Entering directory' and `Leaving directory'
6974
# messages which can occur if `w' ends up in MAKEFLAGS.
6975
# In particular we don't look at `^make:' because GNU make might
6976
# be invoked under some other name (usually "gmake"), in which
6977
# case it prints its new name instead of `make'.
6978
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6983
# Now try BSD make style include.
6984
if test "$am__include" = "#"; then
6985
echo '.include "confinc"' > confmf
6986
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6987
am__include=.include
6992
AC_SUBST([am__include])
6993
AC_SUBST([am__quote])
6994
AC_MSG_RESULT([$_am_result])
6995
rm -f confinc confmf
6998
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
7000
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
7001
# Free Software Foundation, Inc.
7003
# This file is free software; the Free Software Foundation
7004
# gives unlimited permission to copy and/or distribute it,
7005
# with or without modifications, as long as this notice is preserved.
7009
# AM_MISSING_PROG(NAME, PROGRAM)
7010
# ------------------------------
7011
AC_DEFUN([AM_MISSING_PROG],
7012
[AC_REQUIRE([AM_MISSING_HAS_RUN])
7013
$1=${$1-"${am_missing_run}$2"}
7017
# AM_MISSING_HAS_RUN
7018
# ------------------
7019
# Define MISSING if not defined so far and test if it supports --run.
7020
# If it does, set am_missing_run to use it, otherwise, to nothing.
7021
AC_DEFUN([AM_MISSING_HAS_RUN],
7022
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7023
AC_REQUIRE_AUX_FILE([missing])dnl
7024
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7025
# Use eval to expand $SHELL
7026
if eval "$MISSING --run true"; then
7027
am_missing_run="$MISSING --run "
7030
AC_MSG_WARN([`missing' script is too old or missing])
7034
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
7036
# This file is free software; the Free Software Foundation
7037
# gives unlimited permission to copy and/or distribute it,
7038
# with or without modifications, as long as this notice is preserved.
7042
# Check for `mkdir -p'.
7043
AC_DEFUN([AM_PROG_MKDIR_P],
7044
[AC_PREREQ([2.60])dnl
7045
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
7046
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
7047
dnl while keeping a definition of mkdir_p for backward compatibility.
7048
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
7049
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
7050
dnl Makefile.ins that do not define MKDIR_P, so we do our own
7051
dnl adjustment using top_builddir (which is defined more often than
7053
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
7055
[[\\/$]]* | ?:[[\\/]]*) ;;
7056
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7060
# Helper functions for option handling. -*- Autoconf -*-
7062
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
7064
# This file is free software; the Free Software Foundation
7065
# gives unlimited permission to copy and/or distribute it,
7066
# with or without modifications, as long as this notice is preserved.
7070
# _AM_MANGLE_OPTION(NAME)
7071
# -----------------------
7072
AC_DEFUN([_AM_MANGLE_OPTION],
7073
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7075
# _AM_SET_OPTION(NAME)
7076
# ------------------------------
7077
# Set option NAME. Presently that only means defining a flag for this option.
7078
AC_DEFUN([_AM_SET_OPTION],
7079
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7081
# _AM_SET_OPTIONS(OPTIONS)
7082
# ----------------------------------
7083
# OPTIONS is a space-separated list of Automake options.
7084
AC_DEFUN([_AM_SET_OPTIONS],
7085
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7087
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7088
# -------------------------------------------
7089
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7090
AC_DEFUN([_AM_IF_OPTION],
7091
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7093
# Check to make sure that the build environment is sane. -*- Autoconf -*-
7095
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7096
# Free Software Foundation, Inc.
7098
# This file is free software; the Free Software Foundation
7099
# gives unlimited permission to copy and/or distribute it,
7100
# with or without modifications, as long as this notice is preserved.
7106
AC_DEFUN([AM_SANITY_CHECK],
7107
[AC_MSG_CHECKING([whether build environment is sane])
7110
echo timestamp > conftest.file
7111
# Do `set' in a subshell so we don't clobber the current shell's
7112
# arguments. Must try -L first in case configure is actually a
7113
# symlink; some systems play weird games with the mod time of symlinks
7114
# (eg FreeBSD returns the mod time of the symlink's containing
7117
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7118
if test "$[*]" = "X"; then
7120
set X `ls -t $srcdir/configure conftest.file`
7123
if test "$[*]" != "X $srcdir/configure conftest.file" \
7124
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
7126
# If neither matched, then we have a broken ls. This can happen
7127
# if, for instance, CONFIG_SHELL is bash and it inherits a
7128
# broken ls alias from the environment. This has actually
7129
# happened. Such a system could not be considered "sane".
7130
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
7131
alias in your environment])
7134
test "$[2]" = conftest.file
7140
AC_MSG_ERROR([newly created file is older than distributed files!
7141
Check your system clock])
7143
AC_MSG_RESULT(yes)])
7145
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7147
# This file is free software; the Free Software Foundation
7148
# gives unlimited permission to copy and/or distribute it,
7149
# with or without modifications, as long as this notice is preserved.
7151
# AM_PROG_INSTALL_STRIP
7152
# ---------------------
7153
# One issue with vendor `install' (even GNU) is that you can't
7154
# specify the program used to strip binaries. This is especially
7155
# annoying in cross-compiling environments, where the build's strip
7156
# is unlikely to handle the host's binaries.
7157
# Fortunately install-sh will honor a STRIPPROG variable, so we
7158
# always use install-sh in `make install-strip', and initialize
7159
# STRIPPROG with the value of the STRIP variable (set by the user).
7160
AC_DEFUN([AM_PROG_INSTALL_STRIP],
7161
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7162
# Installed binaries are usually stripped using `strip' when the user
7163
# run `make install-strip'. However `strip' might not be the right
7164
# tool to use in cross-compilation environments, therefore Automake
7165
# will honor the `STRIP' environment variable to overrule this program.
7166
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7167
if test "$cross_compiling" != no; then
7168
AC_CHECK_TOOL([STRIP], [strip], :)
7170
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7171
AC_SUBST([INSTALL_STRIP_PROGRAM])])
7173
# Copyright (C) 2006 Free Software Foundation, Inc.
7175
# This file is free software; the Free Software Foundation
7176
# gives unlimited permission to copy and/or distribute it,
7177
# with or without modifications, as long as this notice is preserved.
7179
# _AM_SUBST_NOTMAKE(VARIABLE)
7180
# ---------------------------
7181
# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
7182
# This macro is traced by Automake.
7183
AC_DEFUN([_AM_SUBST_NOTMAKE])
7185
# Check how to create a tarball. -*- Autoconf -*-
7187
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
7189
# This file is free software; the Free Software Foundation
7190
# gives unlimited permission to copy and/or distribute it,
7191
# with or without modifications, as long as this notice is preserved.
7195
# _AM_PROG_TAR(FORMAT)
7196
# --------------------
7197
# Check how to create a tarball in format FORMAT.
7198
# FORMAT should be one of `v7', `ustar', or `pax'.
7200
# Substitute a variable $(am__tar) that is a command
7201
# writing to stdout a FORMAT-tarball containing the directory
7203
# tardir=directory && $(am__tar) > result.tar
7205
# Substitute a variable $(am__untar) that extract such
7206
# a tarball read from stdin.
7207
# $(am__untar) < result.tar
7208
AC_DEFUN([_AM_PROG_TAR],
7209
[# Always define AMTAR for backward compatibility.
7210
AM_MISSING_PROG([AMTAR], [tar])
7212
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
7213
[m4_case([$1], [ustar],, [pax],,
7214
[m4_fatal([Unknown tar format])])
7215
AC_MSG_CHECKING([how to create a $1 tar archive])
7216
# Loop over all known methods to create a tar archive until one works.
7217
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
7218
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
7219
# Do not fold the above two line into one, because Tru64 sh and
7220
# Solaris sh will not grok spaces in the rhs of `-'.
7221
for _am_tool in $_am_tools
7225
for _am_tar in tar gnutar gtar;
7227
AM_RUN_LOG([$_am_tar --version]) && break
7229
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
7230
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
7231
am__untar="$_am_tar -xf -"
7234
# Must skip GNU tar: if it does not support --format= it doesn't create
7235
# ustar tarball either.
7236
(tar --version) >/dev/null 2>&1 && continue
7237
am__tar='tar chf - "$$tardir"'
7238
am__tar_='tar chf - "$tardir"'
7239
am__untar='tar xf -'
7242
am__tar='pax -L -x $1 -w "$$tardir"'
7243
am__tar_='pax -L -x $1 -w "$tardir"'
7247
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
7248
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
7249
am__untar='cpio -i -H $1 -d'
7258
# If the value was cached, stop now. We just wanted to have am__tar
7259
# and am__untar set.
7260
test -n "${am_cv_prog_tar_$1}" && break
7262
# tar/untar a dummy directory, and stop if the command works
7265
echo GrepMe > conftest.dir/file
7266
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7268
if test -s conftest.tar; then
7269
AM_RUN_LOG([$am__untar <conftest.tar])
7270
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7275
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7276
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
7278
AC_SUBST([am__untar])
7281
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
7282
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
7284
# This file is free software, distributed under the terms of the GNU
7285
# General Public License. As a special exception to the GNU General
7286
# Public License, this file may be distributed as part of a program
7287
# that contains a configuration script generated by Autoconf, under
7288
# the same distribution terms as the rest of that program.
7290
# This file can be copied and used freely without restrictions. It can
7291
# be used in projects which are not available under the GNU Public License
7292
# but which still want to provide support for the GNU gettext functionality.
7294
# Macro to add for using GNU gettext.
7295
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
7297
# Modified to never use included libintl.
7298
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
7300
# Major rework to remove unused code
7301
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
7303
# Added better handling of ALL_LINGUAS from GNU gettext version
7304
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
7306
# Modified to require ngettext
7307
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
7309
# We need this here as well, since someone might use autoconf-2.5x
7310
# to configure GLib then an older version to configure a package
7311
# using AM_GLIB_GNU_GETTEXT
7315
dnl We go to great lengths to make sure that aclocal won't
7316
dnl try to pull in the installed version of these macros
7317
dnl when running aclocal in the glib directory.
7319
m4_copy([AC_DEFUN],[glib_DEFUN])
7320
m4_copy([AC_REQUIRE],[glib_REQUIRE])
7322
dnl At the end, if we're not within glib, we'll define the public
7323
dnl definitions in terms of our private definitions.
7327
#--------------------
7328
glib_DEFUN([GLIB_LC_MESSAGES],
7329
[AC_CHECK_HEADERS([locale.h])
7330
if test $ac_cv_header_locale_h = yes; then
7331
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
7332
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
7333
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
7334
if test $am_cv_val_LC_MESSAGES = yes; then
7335
AC_DEFINE(HAVE_LC_MESSAGES, 1,
7336
[Define if your <locale.h> file defines LC_MESSAGES.])
7340
# GLIB_PATH_PROG_WITH_TEST
7341
#----------------------------
7342
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
7343
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
7344
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
7345
[# Extract the first word of "$2", so it can be a program name with args.
7346
set dummy $2; ac_word=[$]2
7347
AC_MSG_CHECKING([for $ac_word])
7348
AC_CACHE_VAL(ac_cv_path_$1,
7351
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
7354
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7355
for ac_dir in ifelse([$5], , $PATH, [$5]); do
7356
test -z "$ac_dir" && ac_dir=.
7357
if test -f $ac_dir/$ac_word; then
7359
ac_cv_path_$1="$ac_dir/$ac_word"
7365
dnl If no 4th arg is given, leave the cache variable unset,
7366
dnl so AC_PATH_PROGS will keep looking.
7367
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
7372
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
7373
AC_MSG_RESULT([$]$1)
7382
glib_DEFUN([GLIB_WITH_NLS],
7383
dnl NLS is obligatory
7384
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7388
gt_cv_have_gettext=no
7394
AC_CHECK_HEADER(libintl.h,
7395
[gt_cv_func_dgettext_libintl="no"
7396
libintl_extra_libs=""
7399
# First check in libc
7401
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
7403
#include <libintl.h>
7405
[return !ngettext ("","", 1)],
7406
gt_cv_func_ngettext_libc=yes,
7407
gt_cv_func_ngettext_libc=no)
7410
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7411
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
7413
#include <libintl.h>
7415
[return !dgettext ("","")],
7416
gt_cv_func_dgettext_libc=yes,
7417
gt_cv_func_dgettext_libc=no)
7421
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7422
AC_CHECK_FUNCS(bind_textdomain_codeset)
7426
# If we don't have everything we want, check in libintl
7428
if test "$gt_cv_func_dgettext_libc" != "yes" \
7429
|| test "$gt_cv_func_ngettext_libc" != "yes" \
7430
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7432
AC_CHECK_LIB(intl, bindtextdomain,
7433
[AC_CHECK_LIB(intl, ngettext,
7434
[AC_CHECK_LIB(intl, dgettext,
7435
gt_cv_func_dgettext_libintl=yes)])])
7437
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7438
AC_MSG_CHECKING([if -liconv is needed to use gettext])
7440
AC_CHECK_LIB(intl, ngettext,
7441
[AC_CHECK_LIB(intl, dcgettext,
7442
[gt_cv_func_dgettext_libintl=yes
7443
libintl_extra_libs=-liconv],
7449
# If we found libintl, then check in it for bind_textdomain_codeset();
7450
# we'll prefer libc if neither have bind_textdomain_codeset(),
7451
# and both have dgettext and ngettext
7453
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7454
glib_save_LIBS="$LIBS"
7455
LIBS="$LIBS -lintl $libintl_extra_libs"
7456
unset ac_cv_func_bind_textdomain_codeset
7457
AC_CHECK_FUNCS(bind_textdomain_codeset)
7458
LIBS="$glib_save_LIBS"
7460
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7461
gt_cv_func_dgettext_libc=no
7463
if test "$gt_cv_func_dgettext_libc" = "yes" \
7464
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
7465
gt_cv_func_dgettext_libintl=no
7471
if test "$gt_cv_func_dgettext_libc" = "yes" \
7472
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
7473
gt_cv_have_gettext=yes
7476
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7477
INTLLIBS="-lintl $libintl_extra_libs"
7480
if test "$gt_cv_have_gettext" = "yes"; then
7481
AC_DEFINE(HAVE_GETTEXT,1,
7482
[Define if the GNU gettext() function is already present or preinstalled.])
7483
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
7484
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
7485
if test "$MSGFMT" != "no"; then
7486
glib_save_LIBS="$LIBS"
7487
LIBS="$LIBS $INTLLIBS"
7488
AC_CHECK_FUNCS(dcgettext)
7490
AC_MSG_CHECKING([if msgfmt accepts -c])
7491
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
7494
"Content-Type: text/plain; charset=UTF-8\n"
7495
"Project-Id-Version: test 1.0\n"
7496
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
7497
"Last-Translator: test <foo@bar.xx>\n"
7498
"Language-Team: C <LL@li.org>\n"
7499
"MIME-Version: 1.0\n"
7500
"Content-Transfer-Encoding: 8bit\n"
7501
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
7502
AC_SUBST(MSGFMT_OPTS)
7503
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7504
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
7505
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
7506
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
7507
return _nl_msg_cat_cntr],
7512
dnl On Solaris, if bind_textdomain_codeset is in libc,
7513
dnl GNU format message catalog is always supported,
7514
dnl since both are added to the libc all together.
7515
dnl Hence, we'd like to go with DATADIRNAME=share and
7516
dnl and CATOBJEXT=.gmo in this case.
7517
AC_CHECK_FUNC(bind_textdomain_codeset,
7528
LIBS="$glib_save_LIBS"
7531
gt_cv_have_gettext=no
7536
if test "$gt_cv_have_gettext" = "yes" ; then
7537
AC_DEFINE(ENABLE_NLS, 1,
7538
[always defined to indicate that i18n is enabled])
7541
dnl Test whether we really found GNU xgettext.
7542
if test "$XGETTEXT" != ":"; then
7543
dnl If it is not GNU xgettext we define it as : so that the
7544
dnl Makefiles still can work.
7545
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7549
[found xgettext program is not GNU xgettext; ignore it])
7554
# We need to process the po/ directory.
7558
[case "$CONFIG_FILES" in *po/Makefile.in*)
7559
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7562
dnl These rules are solely for the distribution goal. While doing this
7563
dnl we only have to keep exactly one list of the available catalogs
7564
dnl in configure.in.
7565
for lang in $ALL_LINGUAS; do
7566
GMOFILES="$GMOFILES $lang.gmo"
7567
POFILES="$POFILES $lang.po"
7570
dnl Make all variables we use known to autoconf.
7573
AC_SUBST(DATADIRNAME)
7575
AC_SUBST(INSTOBJEXT)
7577
AC_SUBST(PO_IN_DATADIR_TRUE)
7578
AC_SUBST(PO_IN_DATADIR_FALSE)
7583
# AM_GLIB_GNU_GETTEXT
7584
# -------------------
7585
# Do checks necessary for use of gettext. If a suitable implementation
7586
# of gettext is found in either in libintl or in the C library,
7587
# it will set INTLLIBS to the libraries needed for use of gettext
7588
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
7589
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
7590
# on various variables needed by the Makefile.in.in installed by
7593
glib_DEFUN([GLIB_GNU_GETTEXT],
7594
[AC_REQUIRE([AC_PROG_CC])dnl
7595
AC_REQUIRE([AC_HEADER_STDC])dnl
7600
if test "$gt_cv_have_gettext" = "yes"; then
7601
if test "x$ALL_LINGUAS" = "x"; then
7604
AC_MSG_CHECKING(for catalogs to be installed)
7606
for presentlang in $ALL_LINGUAS; do
7608
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
7609
desiredlanguages="$LINGUAS"
7611
desiredlanguages="$ALL_LINGUAS"
7613
for desiredlang in $desiredlanguages; do
7614
# Use the presentlang catalog if desiredlang is
7615
# a. equal to presentlang, or
7616
# b. a variant of presentlang (because in this case,
7617
# presentlang can be used as a fallback for messages
7618
# which are not translated in the desiredlang catalog).
7619
case "$desiredlang" in
7620
"$presentlang"*) useit=yes;;
7623
if test $useit = yes; then
7624
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
7627
LINGUAS=$NEW_LINGUAS
7628
AC_MSG_RESULT($LINGUAS)
7631
dnl Construct list of names of catalog files to be constructed.
7632
if test -n "$LINGUAS"; then
7633
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7637
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
7638
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
7639
dnl Try to locate is.
7641
if test -n "$ac_aux_dir"; then
7642
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7644
if test -z "$MKINSTALLDIRS"; then
7645
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7647
AC_SUBST(MKINSTALLDIRS)
7649
dnl Generate list of files to be processed by xgettext which will
7650
dnl be included in po/Makefile.
7651
test -d po || mkdir po
7652
if test "x$srcdir" != "x."; then
7653
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
7654
posrcprefix="$srcdir/"
7656
posrcprefix="../$srcdir/"
7662
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
7663
< $srcdir/po/POTFILES.in > po/POTFILES
7666
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
7667
# -------------------------------
7668
# Define VARIABLE to the location where catalog files will
7669
# be installed by po/Makefile.
7670
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
7671
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
7672
glib_save_prefix="$prefix"
7673
glib_save_exec_prefix="$exec_prefix"
7674
glib_save_datarootdir="$datarootdir"
7675
test "x$prefix" = xNONE && prefix=$ac_default_prefix
7676
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
7677
datarootdir=`eval echo "${datarootdir}"`
7678
if test "x$CATOBJEXT" = "x.mo" ; then
7679
localedir=`eval echo "${libdir}/locale"`
7681
localedir=`eval echo "${datadir}/locale"`
7683
prefix="$glib_save_prefix"
7684
exec_prefix="$glib_save_exec_prefix"
7685
datarootdir="$glib_save_datarootdir"
7686
AC_DEFINE_UNQUOTED($1, "$localedir",
7687
[Define the location where the catalogs will be installed])
7691
dnl Now the definitions that aclocal will find
7693
ifdef(glib_configure_in,[],[
7694
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
7695
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
7698
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
7700
# Create a temporary file with TEST-FILE as its contents and pass the
7701
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
7702
# 0 and perform ACTION-IF-FAIL for any other exit status.
7703
AC_DEFUN([GLIB_RUN_PROG],
7704
[cat >conftest.foo <<_ACEOF
7707
if AC_RUN_LOG([$1 conftest.foo]); then
7708
m4_ifval([$3], [$3], [:])
7709
m4_ifvaln([$4], [else $4])dnl
7710
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
7711
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
7715
dnl GNOME_COMPILE_WARNINGS
7716
dnl Turn on many useful compiler warnings
7717
dnl For now, only works on GCC
7718
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
7719
dnl ******************************
7720
dnl More compiler warnings
7721
dnl ******************************
7723
AC_ARG_ENABLE(compile-warnings,
7724
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
7725
[Turn on compiler warnings]),,
7726
[enable_compile_warnings="m4_default([$1],[yes])"])
7729
if test "x$GCC" != xyes; then
7730
enable_compile_warnings=no
7734
realsave_CFLAGS="$CFLAGS"
7736
case "$enable_compile_warnings" in
7741
warning_flags="-Wall"
7744
warning_flags="-Wall -Wmissing-prototypes"
7747
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
7748
CFLAGS="$warning_flags $CFLAGS"
7749
for option in -Wno-sign-compare; do
7750
SAVE_CFLAGS="$CFLAGS"
7751
CFLAGS="$CFLAGS $option"
7752
AC_MSG_CHECKING([whether gcc understands $option])
7753
AC_TRY_COMPILE([], [],
7756
CFLAGS="$SAVE_CFLAGS"
7757
AC_MSG_RESULT($has_option)
7758
if test $has_option = yes; then
7759
warning_flags="$warning_flags $option"
7765
if test "$enable_compile_warnings" = "error" ; then
7766
warning_flags="$warning_flags -Werror"
7770
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
7773
CFLAGS="$realsave_CFLAGS"
7774
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
7775
AC_MSG_RESULT($warning_flags)
7777
AC_ARG_ENABLE(iso-c,
7778
AC_HELP_STRING([--enable-iso-c],
7779
[Try to warn if code is not ISO C ]),,
7782
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
7784
if test "x$enable_iso_c" != "xno"; then
7785
if test "x$GCC" = "xyes"; then
7787
*[\ \ ]-ansi[\ \ ]*) ;;
7788
*) complCFLAGS="$complCFLAGS -ansi" ;;
7791
*[\ \ ]-pedantic[\ \ ]*) ;;
7792
*) complCFLAGS="$complCFLAGS -pedantic" ;;
7796
AC_MSG_RESULT($complCFLAGS)
7798
WARN_CFLAGS="$warning_flags $complCFLAGS"
7799
AC_SUBST(WARN_CFLAGS)
7802
dnl For C++, do basically the same thing.
7804
AC_DEFUN([GNOME_CXX_WARNINGS],[
7805
AC_ARG_ENABLE(cxx-warnings,
7806
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
7807
[Turn on compiler warnings.]),,
7808
[enable_cxx_warnings="m4_default([$1],[minimum])"])
7810
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
7812
if test "x$GXX" != xyes; then
7813
enable_cxx_warnings=no
7815
if test "x$enable_cxx_warnings" != "xno"; then
7816
if test "x$GXX" = "xyes"; then
7817
case " $CXXFLAGS " in
7818
*[\ \ ]-Wall[\ \ ]*) ;;
7819
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
7822
## -W is not all that useful. And it cannot be controlled
7823
## with individual -Wno-xxx flags, unlike -Wall
7824
if test "x$enable_cxx_warnings" = "xyes"; then
7825
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
7829
AC_MSG_RESULT($warnCXXFLAGS)
7831
AC_ARG_ENABLE(iso-cxx,
7832
AC_HELP_STRING([--enable-iso-cxx],
7833
[Try to warn if code is not ISO C++ ]),,
7834
[enable_iso_cxx=no])
7836
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
7838
if test "x$enable_iso_cxx" != "xno"; then
7839
if test "x$GXX" = "xyes"; then
7840
case " $CXXFLAGS " in
7841
*[\ \ ]-ansi[\ \ ]*) ;;
7842
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
7845
case " $CXXFLAGS " in
7846
*[\ \ ]-pedantic[\ \ ]*) ;;
7847
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
7851
AC_MSG_RESULT($complCXXFLAGS)
7853
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
7854
AC_SUBST(WARN_CXXFLAGS)
7857
7857
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
7859
7859
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.