14
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
15
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
m4_if(AC_AUTOCONF_VERSION, [2.61],,
17
[m4_warning([this file was generated for autoconf 2.61.
16
m4_if(AC_AUTOCONF_VERSION, [2.62],,
17
[m4_warning([this file was generated for autoconf 2.62.
18
18
You have another version of autoconf. It may work, but is not guaranteed to.
19
19
If you have problems, you may need to regenerate the build system entirely.
20
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
24
# This file is free software; the Free Software Foundation
25
# gives unlimited permission to copy and/or distribute it,
26
# with or without modifications, as long as this notice is preserved.
28
# AM_AUTOMAKE_VERSION(VERSION)
29
# ----------------------------
30
# Automake X.Y traces this macro to ensure aclocal.m4 has been
31
# generated from the m4 files accompanying Automake X.Y.
32
# (This private macro should not be called outside this file.)
33
AC_DEFUN([AM_AUTOMAKE_VERSION],
34
[am__api_version='1.10'
35
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36
dnl require some minimum version. Point them to the right macro.
37
m4_if([$1], [1.10.1], [],
38
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
41
# _AM_AUTOCONF_VERSION(VERSION)
42
# -----------------------------
43
# aclocal traces this macro to find the Autoconf version.
44
# This is a private macro too. Using m4_define simplifies
45
# the logic in aclocal, which can simply ignore this definition.
46
m4_define([_AM_AUTOCONF_VERSION], [])
48
# AM_SET_CURRENT_AUTOMAKE_VERSION
49
# -------------------------------
50
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
52
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53
[AM_AUTOMAKE_VERSION([1.10.1])dnl
54
m4_ifndef([AC_AUTOCONF_VERSION],
55
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56
_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
58
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
60
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
62
# This file is free software; the Free Software Foundation
63
# gives unlimited permission to copy and/or distribute it,
64
# with or without modifications, as long as this notice is preserved.
66
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
68
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
70
# Of course, Automake must honor this variable whenever it calls a
71
# tool from the auxiliary directory. The problem is that $srcdir (and
72
# therefore $ac_aux_dir as well) can be either absolute or relative,
73
# depending on how configure is run. This is pretty annoying, since
74
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
75
# source directory, any form will work fine, but in subdirectories a
76
# relative path needs to be adjusted first.
79
# fails when called from a subdirectory if $ac_aux_dir is relative
80
# $top_srcdir/$ac_aux_dir/missing
81
# fails if $ac_aux_dir is absolute,
82
# fails when called from a subdirectory in a VPATH build with
83
# a relative $ac_aux_dir
85
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86
# are both prefixed by $srcdir. In an in-source build this is usually
87
# harmless because $srcdir is `.', but things will broke when you
88
# start a VPATH build or use an absolute $srcdir.
90
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
92
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93
# and then we would define $MISSING as
94
# MISSING="\${SHELL} $am_aux_dir/missing"
95
# This will work as long as MISSING is not called from configure, because
96
# unfortunately $(top_srcdir) has no meaning in configure.
97
# However there are other variables, like CC, which are often used in
98
# configure, and could therefore not use this "fixed" $ac_aux_dir.
100
# Another solution, used here, is to always expand $ac_aux_dir to an
101
# absolute PATH. The drawback is that using absolute paths prevent a
102
# configured tree to be moved without reconfiguration.
104
AC_DEFUN([AM_AUX_DIR_EXPAND],
105
[dnl Rely on autoconf to set up CDPATH properly.
107
# expand $ac_aux_dir to an absolute path
108
am_aux_dir=`cd $ac_aux_dir && pwd`
111
# AM_CONDITIONAL -*- Autoconf -*-
113
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
114
# Free Software Foundation, Inc.
116
# This file is free software; the Free Software Foundation
117
# gives unlimited permission to copy and/or distribute it,
118
# with or without modifications, as long as this notice is preserved.
122
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
123
# -------------------------------------
124
# Define a conditional.
125
AC_DEFUN([AM_CONDITIONAL],
127
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
128
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129
AC_SUBST([$1_TRUE])dnl
130
AC_SUBST([$1_FALSE])dnl
131
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
132
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
140
AC_CONFIG_COMMANDS_PRE(
141
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
142
AC_MSG_ERROR([[conditional "$1" was never defined.
143
Usually this means the macro was only invoked conditionally.]])
146
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
147
# Free Software Foundation, Inc.
149
# This file is free software; the Free Software Foundation
150
# gives unlimited permission to copy and/or distribute it,
151
# with or without modifications, as long as this notice is preserved.
155
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
156
# written in clear, in which case automake, when reading aclocal.m4,
157
# will think it sees a *use*, and therefore will trigger all it's
158
# C support machinery. Also note that it means that autoscan, seeing
159
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
162
# _AM_DEPENDENCIES(NAME)
163
# ----------------------
164
# See how the compiler implements dependency checking.
165
# NAME is "CC", "CXX", "GCJ", or "OBJC".
166
# We try a few techniques and use that to set a single cache variable.
168
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
169
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
170
# dependency, and given that the user is not expected to run this macro,
171
# just rely on AC_PROG_CC.
172
AC_DEFUN([_AM_DEPENDENCIES],
173
[AC_REQUIRE([AM_SET_DEPDIR])dnl
174
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
175
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
176
AC_REQUIRE([AM_DEP_TRACK])dnl
178
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
179
[$1], CXX, [depcc="$CXX" am_compiler_list=],
180
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
181
[$1], UPC, [depcc="$UPC" am_compiler_list=],
182
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
183
[depcc="$$1" am_compiler_list=])
185
AC_CACHE_CHECK([dependency style of $depcc],
186
[am_cv_$1_dependencies_compiler_type],
187
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
188
# We make a subdir and do the tests there. Otherwise we can end up
189
# making bogus files that we don't know about and never remove. For
190
# instance it was reported that on HP-UX the gcc test will end up
191
# making a dummy file named `D' -- because `-MD' means `put the output
194
# Copy depcomp to subdir because otherwise we won't find it if we're
195
# using a relative directory.
196
cp "$am_depcomp" conftest.dir
198
# We will build objects and dependencies in a subdirectory because
199
# it helps to detect inapplicable dependency modes. For instance
200
# both Tru64's cc and ICC support -MD to output dependencies as a
201
# side effect of compilation, but ICC will put the dependencies in
202
# the current directory while Tru64 will put them in the object
206
am_cv_$1_dependencies_compiler_type=none
207
if test "$am_compiler_list" = ""; then
208
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
210
for depmode in $am_compiler_list; do
211
# Setup a source with many dependencies, because some compilers
212
# like to wrap large dependency lists on column 80 (with \), and
213
# we should not choose a depcomp mode which is confused by this.
215
# We need to recreate these files for each test, as the compiler may
216
# overwrite some of them when testing with obscure command lines.
217
# This happens at least with the AIX C compiler.
219
for i in 1 2 3 4 5 6; do
220
echo '#include "conftst'$i'.h"' >> sub/conftest.c
221
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
222
# Solaris 8's {/usr,}/bin/sh.
223
touch sub/conftst$i.h
225
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
229
# after this tag, mechanisms are not by side-effect, so they'll
230
# only be used when explicitly requested
231
if test "x$enable_dependency_tracking" = xyes; then
239
# We check with `-c' and `-o' for the sake of the "dashmstdout"
240
# mode. It turns out that the SunPro C++ compiler does not properly
241
# handle `-M -o', and we need to detect this.
242
if depmode=$depmode \
243
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
244
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
245
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
246
>/dev/null 2>conftest.err &&
247
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
248
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
249
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
250
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
251
# icc doesn't choke on unknown options, it will just issue warnings
252
# or remarks (even with -Werror). So we grep stderr for any message
253
# that says an option was ignored or not supported.
254
# When given -MP, icc 7.0 and 7.1 complain thusly:
255
# icc: Command line warning: ignoring option '-M'; no argument required
256
# The diagnosis changed in icc 8.0:
257
# icc: Command line remark: option '-MP' not supported
258
if (grep 'ignoring option' conftest.err ||
259
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
260
am_cv_$1_dependencies_compiler_type=$depmode
269
am_cv_$1_dependencies_compiler_type=none
272
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
273
AM_CONDITIONAL([am__fastdep$1], [
274
test "x$enable_dependency_tracking" != xno \
275
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
281
# Choose a directory name for dependency files.
282
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
283
AC_DEFUN([AM_SET_DEPDIR],
284
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
285
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
291
AC_DEFUN([AM_DEP_TRACK],
292
[AC_ARG_ENABLE(dependency-tracking,
293
[ --disable-dependency-tracking speeds up one-time build
294
--enable-dependency-tracking do not reject slow dependency extractors])
295
if test "x$enable_dependency_tracking" != xno; then
296
am_depcomp="$ac_aux_dir/depcomp"
299
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
300
AC_SUBST([AMDEPBACKSLASH])dnl
301
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
304
# Generate code to set up dependency tracking. -*- Autoconf -*-
306
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
307
# Free Software Foundation, Inc.
309
# This file is free software; the Free Software Foundation
310
# gives unlimited permission to copy and/or distribute it,
311
# with or without modifications, as long as this notice is preserved.
315
# _AM_OUTPUT_DEPENDENCY_COMMANDS
316
# ------------------------------
317
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
318
[for mf in $CONFIG_FILES; do
319
# Strip MF so we end up with the name of the file.
320
mf=`echo "$mf" | sed -e 's/:.*$//'`
321
# Check whether this is an Automake generated Makefile or not.
322
# We used to match only the files named `Makefile.in', but
323
# some people rename them; so instead we look at the file content.
324
# Grep'ing the first line is not enough: some people post-process
325
# each Makefile.in and add a new line on top of each file to say so.
326
# Grep'ing the whole file is not good either: AIX grep has a line
327
# limit of 2048, but all sed's we know have understand at least 4000.
328
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
329
dirpart=`AS_DIRNAME("$mf")`
333
# Extract the definition of DEPDIR, am__include, and am__quote
334
# from the Makefile without running `make'.
335
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
336
test -z "$DEPDIR" && continue
337
am__include=`sed -n 's/^am__include = //p' < "$mf"`
338
test -z "am__include" && continue
339
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
340
# When using ansi2knr, U may be empty or an underscore; expand it
341
U=`sed -n 's/^U = //p' < "$mf"`
342
# Find all dependency output files, they are included files with
343
# $(DEPDIR) in their names. We invoke sed twice because it is the
344
# simplest approach to changing $(DEPDIR) to its actual value in the
346
for file in `sed -n "
347
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
348
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
349
# Make sure the directory exists.
350
test -f "$dirpart/$file" && continue
351
fdir=`AS_DIRNAME(["$file"])`
352
AS_MKDIR_P([$dirpart/$fdir])
353
# echo "creating $dirpart/$file"
354
echo '# dummy' > "$dirpart/$file"
357
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
360
# AM_OUTPUT_DEPENDENCY_COMMANDS
361
# -----------------------------
362
# This macro should only be invoked once -- use via AC_REQUIRE.
364
# This code is only required when automatic dependency tracking
365
# is enabled. FIXME. This creates each `.P' file that we will
366
# need in order to bootstrap the dependency handling code.
367
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
368
[AC_CONFIG_COMMANDS([depfiles],
369
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
370
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
373
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
374
# Free Software Foundation, Inc.
376
# This file is free software; the Free Software Foundation
377
# gives unlimited permission to copy and/or distribute it,
378
# with or without modifications, as long as this notice is preserved.
382
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
383
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
385
# Do all the work for Automake. -*- Autoconf -*-
387
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
388
# 2005, 2006, 2008 Free Software Foundation, Inc.
390
# This file is free software; the Free Software Foundation
391
# gives unlimited permission to copy and/or distribute it,
392
# with or without modifications, as long as this notice is preserved.
396
# This macro actually does too much. Some checks are only needed if
397
# your package does certain things. But this isn't really a big deal.
399
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
400
# AM_INIT_AUTOMAKE([OPTIONS])
401
# -----------------------------------------------
402
# The call with PACKAGE and VERSION arguments is the old style
403
# call (pre autoconf-2.50), which is being phased out. PACKAGE
404
# and VERSION should now be passed to AC_INIT and removed from
405
# the call to AM_INIT_AUTOMAKE.
406
# We support both call styles for the transition. After
407
# the next Automake release, Autoconf can make the AC_INIT
408
# arguments mandatory, and then we can depend on a new Autoconf
409
# release and drop the old call support.
410
AC_DEFUN([AM_INIT_AUTOMAKE],
411
[AC_PREREQ([2.60])dnl
412
dnl Autoconf wants to disallow AM_ names. We explicitly allow
413
dnl the ones we care about.
414
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
415
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
416
AC_REQUIRE([AC_PROG_INSTALL])dnl
417
if test "`cd $srcdir && pwd`" != "`pwd`"; then
418
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
419
# is not polluted with repeated "-I."
420
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
421
# test to see if srcdir already configured
422
if test -f $srcdir/config.status; then
423
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
427
# test whether we have cygpath
428
if test -z "$CYGPATH_W"; then
429
if (cygpath --version) >/dev/null 2>/dev/null; then
430
CYGPATH_W='cygpath -w'
435
AC_SUBST([CYGPATH_W])
437
# Define the identity of the package.
438
dnl Distinguish between old-style and new-style calls.
440
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
441
AC_SUBST([PACKAGE], [$1])dnl
442
AC_SUBST([VERSION], [$2])],
443
[_AM_SET_OPTIONS([$1])dnl
444
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
445
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
446
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
447
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
448
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
450
_AM_IF_OPTION([no-define],,
451
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
452
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
454
# Some tools Automake needs.
455
AC_REQUIRE([AM_SANITY_CHECK])dnl
456
AC_REQUIRE([AC_ARG_PROGRAM])dnl
457
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
458
AM_MISSING_PROG(AUTOCONF, autoconf)
459
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
460
AM_MISSING_PROG(AUTOHEADER, autoheader)
461
AM_MISSING_PROG(MAKEINFO, makeinfo)
463
AM_PROG_INSTALL_STRIP
464
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
465
# We need awk for the "check" target. The system "awk" is bad on
467
AC_REQUIRE([AC_PROG_AWK])dnl
468
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
469
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
470
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
471
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
472
[_AM_PROG_TAR([v7])])])
473
_AM_IF_OPTION([no-dependencies],,
474
[AC_PROVIDE_IFELSE([AC_PROG_CC],
475
[_AM_DEPENDENCIES(CC)],
476
[define([AC_PROG_CC],
477
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
478
AC_PROVIDE_IFELSE([AC_PROG_CXX],
479
[_AM_DEPENDENCIES(CXX)],
480
[define([AC_PROG_CXX],
481
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
482
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
483
[_AM_DEPENDENCIES(OBJC)],
484
[define([AC_PROG_OBJC],
485
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
490
# When config.status generates a header, we must update the stamp-h file.
491
# This file resides in the same directory as the config header
492
# that is generated. The stamp files are numbered to have different names.
494
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
495
# loop where config.status creates the headers, so we can generate
496
# our stamp files there.
497
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
498
[# Compute $1's index in $config_headers.
501
for _am_header in $config_headers :; do
503
$_am_arg | $_am_arg:* )
506
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
509
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
511
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
513
# This file is free software; the Free Software Foundation
514
# gives unlimited permission to copy and/or distribute it,
515
# with or without modifications, as long as this notice is preserved.
519
# Define $install_sh.
520
AC_DEFUN([AM_PROG_INSTALL_SH],
521
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
522
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
523
AC_SUBST(install_sh)])
525
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
527
# This file is free software; the Free Software Foundation
528
# gives unlimited permission to copy and/or distribute it,
529
# with or without modifications, as long as this notice is preserved.
533
# Check whether the underlying file-system supports filenames
534
# with a leading dot. For instance MS-DOS doesn't.
535
AC_DEFUN([AM_SET_LEADING_DOT],
536
[rm -rf .tst 2>/dev/null
537
mkdir .tst 2>/dev/null
538
if test -d .tst; then
543
rmdir .tst 2>/dev/null
544
AC_SUBST([am__leading_dot])])
546
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
549
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
550
# Free Software Foundation, Inc.
552
# This file is free software; the Free Software Foundation
553
# gives unlimited permission to copy and/or distribute it,
554
# with or without modifications, as long as this notice is preserved.
558
AC_DEFUN([AM_MAINTAINER_MODE],
559
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
560
dnl maintainer-mode is disabled by default
561
AC_ARG_ENABLE(maintainer-mode,
562
[ --enable-maintainer-mode enable make rules and dependencies not useful
563
(and sometimes confusing) to the casual installer],
564
USE_MAINTAINER_MODE=$enableval,
565
USE_MAINTAINER_MODE=no)
566
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
567
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
568
MAINT=$MAINTAINER_MODE_TRUE
573
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
575
# Check to see how 'make' treats includes. -*- Autoconf -*-
577
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
579
# This file is free software; the Free Software Foundation
580
# gives unlimited permission to copy and/or distribute it,
581
# with or without modifications, as long as this notice is preserved.
587
# Check to see how make treats includes.
588
AC_DEFUN([AM_MAKE_INCLUDE],
589
[am_make=${MAKE-make}
590
cat > confinc << 'END'
595
# If we don't find an include directive, just comment out the code.
596
AC_MSG_CHECKING([for style of include used by $am_make])
600
# First try GNU make style include.
601
echo "include confinc" > confmf
602
# We grep out `Entering directory' and `Leaving directory'
603
# messages which can occur if `w' ends up in MAKEFLAGS.
604
# In particular we don't look at `^make:' because GNU make might
605
# be invoked under some other name (usually "gmake"), in which
606
# case it prints its new name instead of `make'.
607
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
612
# Now try BSD make style include.
613
if test "$am__include" = "#"; then
614
echo '.include "confinc"' > confmf
615
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
621
AC_SUBST([am__include])
622
AC_SUBST([am__quote])
623
AC_MSG_RESULT([$_am_result])
627
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
629
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
630
# Free Software Foundation, Inc.
632
# This file is free software; the Free Software Foundation
633
# gives unlimited permission to copy and/or distribute it,
634
# with or without modifications, as long as this notice is preserved.
638
# AM_MISSING_PROG(NAME, PROGRAM)
639
# ------------------------------
640
AC_DEFUN([AM_MISSING_PROG],
641
[AC_REQUIRE([AM_MISSING_HAS_RUN])
642
$1=${$1-"${am_missing_run}$2"}
648
# Define MISSING if not defined so far and test if it supports --run.
649
# If it does, set am_missing_run to use it, otherwise, to nothing.
650
AC_DEFUN([AM_MISSING_HAS_RUN],
651
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
652
AC_REQUIRE_AUX_FILE([missing])dnl
653
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
654
# Use eval to expand $SHELL
655
if eval "$MISSING --run true"; then
656
am_missing_run="$MISSING --run "
659
AC_MSG_WARN([`missing' script is too old or missing])
663
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
665
# This file is free software; the Free Software Foundation
666
# gives unlimited permission to copy and/or distribute it,
667
# with or without modifications, as long as this notice is preserved.
671
# Check for `mkdir -p'.
672
AC_DEFUN([AM_PROG_MKDIR_P],
673
[AC_PREREQ([2.60])dnl
674
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
675
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
676
dnl while keeping a definition of mkdir_p for backward compatibility.
677
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
678
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
679
dnl Makefile.ins that do not define MKDIR_P, so we do our own
680
dnl adjustment using top_builddir (which is defined more often than
682
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
684
[[\\/$]]* | ?:[[\\/]]*) ;;
685
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
689
# Helper functions for option handling. -*- Autoconf -*-
691
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
693
# This file is free software; the Free Software Foundation
694
# gives unlimited permission to copy and/or distribute it,
695
# with or without modifications, as long as this notice is preserved.
699
# _AM_MANGLE_OPTION(NAME)
700
# -----------------------
701
AC_DEFUN([_AM_MANGLE_OPTION],
702
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
704
# _AM_SET_OPTION(NAME)
705
# ------------------------------
706
# Set option NAME. Presently that only means defining a flag for this option.
707
AC_DEFUN([_AM_SET_OPTION],
708
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
710
# _AM_SET_OPTIONS(OPTIONS)
711
# ----------------------------------
712
# OPTIONS is a space-separated list of Automake options.
713
AC_DEFUN([_AM_SET_OPTIONS],
714
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
716
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
717
# -------------------------------------------
718
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
719
AC_DEFUN([_AM_IF_OPTION],
720
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
722
# Check to make sure that the build environment is sane. -*- Autoconf -*-
724
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
725
# Free Software Foundation, Inc.
727
# This file is free software; the Free Software Foundation
728
# gives unlimited permission to copy and/or distribute it,
729
# with or without modifications, as long as this notice is preserved.
735
AC_DEFUN([AM_SANITY_CHECK],
736
[AC_MSG_CHECKING([whether build environment is sane])
739
echo timestamp > conftest.file
740
# Do `set' in a subshell so we don't clobber the current shell's
741
# arguments. Must try -L first in case configure is actually a
742
# symlink; some systems play weird games with the mod time of symlinks
743
# (eg FreeBSD returns the mod time of the symlink's containing
746
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
747
if test "$[*]" = "X"; then
749
set X `ls -t $srcdir/configure conftest.file`
752
if test "$[*]" != "X $srcdir/configure conftest.file" \
753
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
755
# If neither matched, then we have a broken ls. This can happen
756
# if, for instance, CONFIG_SHELL is bash and it inherits a
757
# broken ls alias from the environment. This has actually
758
# happened. Such a system could not be considered "sane".
759
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
760
alias in your environment])
763
test "$[2]" = conftest.file
769
AC_MSG_ERROR([newly created file is older than distributed files!
770
Check your system clock])
774
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
776
# This file is free software; the Free Software Foundation
777
# gives unlimited permission to copy and/or distribute it,
778
# with or without modifications, as long as this notice is preserved.
780
# AM_PROG_INSTALL_STRIP
781
# ---------------------
782
# One issue with vendor `install' (even GNU) is that you can't
783
# specify the program used to strip binaries. This is especially
784
# annoying in cross-compiling environments, where the build's strip
785
# is unlikely to handle the host's binaries.
786
# Fortunately install-sh will honor a STRIPPROG variable, so we
787
# always use install-sh in `make install-strip', and initialize
788
# STRIPPROG with the value of the STRIP variable (set by the user).
789
AC_DEFUN([AM_PROG_INSTALL_STRIP],
790
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
791
# Installed binaries are usually stripped using `strip' when the user
792
# run `make install-strip'. However `strip' might not be the right
793
# tool to use in cross-compilation environments, therefore Automake
794
# will honor the `STRIP' environment variable to overrule this program.
795
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
796
if test "$cross_compiling" != no; then
797
AC_CHECK_TOOL([STRIP], [strip], :)
799
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
800
AC_SUBST([INSTALL_STRIP_PROGRAM])])
802
# Copyright (C) 2006 Free Software Foundation, Inc.
804
# This file is free software; the Free Software Foundation
805
# gives unlimited permission to copy and/or distribute it,
806
# with or without modifications, as long as this notice is preserved.
808
# _AM_SUBST_NOTMAKE(VARIABLE)
809
# ---------------------------
810
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
811
# This macro is traced by Automake.
812
AC_DEFUN([_AM_SUBST_NOTMAKE])
814
# Check how to create a tarball. -*- Autoconf -*-
816
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
818
# This file is free software; the Free Software Foundation
819
# gives unlimited permission to copy and/or distribute it,
820
# with or without modifications, as long as this notice is preserved.
824
# _AM_PROG_TAR(FORMAT)
825
# --------------------
826
# Check how to create a tarball in format FORMAT.
827
# FORMAT should be one of `v7', `ustar', or `pax'.
829
# Substitute a variable $(am__tar) that is a command
830
# writing to stdout a FORMAT-tarball containing the directory
832
# tardir=directory && $(am__tar) > result.tar
834
# Substitute a variable $(am__untar) that extract such
835
# a tarball read from stdin.
836
# $(am__untar) < result.tar
837
AC_DEFUN([_AM_PROG_TAR],
838
[# Always define AMTAR for backward compatibility.
839
AM_MISSING_PROG([AMTAR], [tar])
841
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
842
[m4_case([$1], [ustar],, [pax],,
843
[m4_fatal([Unknown tar format])])
844
AC_MSG_CHECKING([how to create a $1 tar archive])
845
# Loop over all known methods to create a tar archive until one works.
846
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
847
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
848
# Do not fold the above two line into one, because Tru64 sh and
849
# Solaris sh will not grok spaces in the rhs of `-'.
850
for _am_tool in $_am_tools
854
for _am_tar in tar gnutar gtar;
856
AM_RUN_LOG([$_am_tar --version]) && break
858
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
859
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
860
am__untar="$_am_tar -xf -"
863
# Must skip GNU tar: if it does not support --format= it doesn't create
864
# ustar tarball either.
865
(tar --version) >/dev/null 2>&1 && continue
866
am__tar='tar chf - "$$tardir"'
867
am__tar_='tar chf - "$tardir"'
871
am__tar='pax -L -x $1 -w "$$tardir"'
872
am__tar_='pax -L -x $1 -w "$tardir"'
876
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
877
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
878
am__untar='cpio -i -H $1 -d'
887
# If the value was cached, stop now. We just wanted to have am__tar
889
test -n "${am_cv_prog_tar_$1}" && break
891
# tar/untar a dummy directory, and stop if the command works
894
echo GrepMe > conftest.dir/file
895
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
897
if test -s conftest.tar; then
898
AM_RUN_LOG([$am__untar <conftest.tar])
899
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
904
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
905
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
907
AC_SUBST([am__untar])
910
dnl AM_GCONF_SOURCE_2
911
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
912
dnl (i.e. pass to gconftool-2
913
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
914
dnl you should install foo.schemas files
917
AC_DEFUN([AM_GCONF_SOURCE_2],
919
if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
920
GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
922
GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
925
AC_ARG_WITH([gconf-source],
926
AC_HELP_STRING([--with-gconf-source=sourceaddress],
927
[Config database for installing schema files.]),
928
[GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
930
AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
931
AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
933
if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
934
GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
937
AC_ARG_WITH([gconf-schema-file-dir],
938
AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
939
[Directory for installing schema files.]),
940
[GCONF_SCHEMA_FILE_DIR="$withval"],)
942
AC_SUBST(GCONF_SCHEMA_FILE_DIR)
943
AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
945
AC_ARG_ENABLE(schemas-install,
946
[ --disable-schemas-install Disable the schemas installation],
947
[case ${enableval} in
949
*) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
951
AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
954
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
955
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
957
# This file is free software, distributed under the terms of the GNU
958
# General Public License. As a special exception to the GNU General
959
# Public License, this file may be distributed as part of a program
960
# that contains a configuration script generated by Autoconf, under
961
# the same distribution terms as the rest of that program.
963
# This file can be copied and used freely without restrictions. It can
964
# be used in projects which are not available under the GNU Public License
965
# but which still want to provide support for the GNU gettext functionality.
967
# Macro to add for using GNU gettext.
968
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
970
# Modified to never use included libintl.
971
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
973
# Major rework to remove unused code
974
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
976
# Added better handling of ALL_LINGUAS from GNU gettext version
977
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
979
# Modified to require ngettext
980
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
982
# We need this here as well, since someone might use autoconf-2.5x
983
# to configure GLib then an older version to configure a package
984
# using AM_GLIB_GNU_GETTEXT
988
dnl We go to great lengths to make sure that aclocal won't
989
dnl try to pull in the installed version of these macros
990
dnl when running aclocal in the glib directory.
992
m4_copy([AC_DEFUN],[glib_DEFUN])
993
m4_copy([AC_REQUIRE],[glib_REQUIRE])
995
dnl At the end, if we're not within glib, we'll define the public
996
dnl definitions in terms of our private definitions.
1000
#--------------------
1001
glib_DEFUN([GLIB_LC_MESSAGES],
1002
[AC_CHECK_HEADERS([locale.h])
1003
if test $ac_cv_header_locale_h = yes; then
1004
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1005
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1006
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1007
if test $am_cv_val_LC_MESSAGES = yes; then
1008
AC_DEFINE(HAVE_LC_MESSAGES, 1,
1009
[Define if your <locale.h> file defines LC_MESSAGES.])
1013
# GLIB_PATH_PROG_WITH_TEST
1014
#----------------------------
1015
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1016
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1017
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
1018
[# Extract the first word of "$2", so it can be a program name with args.
1019
set dummy $2; ac_word=[$]2
1020
AC_MSG_CHECKING([for $ac_word])
1021
AC_CACHE_VAL(ac_cv_path_$1,
1024
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1027
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1028
for ac_dir in ifelse([$5], , $PATH, [$5]); do
1029
test -z "$ac_dir" && ac_dir=.
1030
if test -f $ac_dir/$ac_word; then
1032
ac_cv_path_$1="$ac_dir/$ac_word"
1038
dnl If no 4th arg is given, leave the cache variable unset,
1039
dnl so AC_PATH_PROGS will keep looking.
1040
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1045
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1046
AC_MSG_RESULT([$]$1)
1055
glib_DEFUN([GLIB_WITH_NLS],
1056
dnl NLS is obligatory
1060
gt_cv_have_gettext=no
1066
AC_CHECK_HEADER(libintl.h,
1067
[gt_cv_func_dgettext_libintl="no"
1068
libintl_extra_libs=""
1071
# First check in libc
1073
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
1075
#include <libintl.h>
1077
[return !ngettext ("","", 1)],
1078
gt_cv_func_ngettext_libc=yes,
1079
gt_cv_func_ngettext_libc=no)
1082
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1083
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
1085
#include <libintl.h>
1087
[return !dgettext ("","")],
1088
gt_cv_func_dgettext_libc=yes,
1089
gt_cv_func_dgettext_libc=no)
1093
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1094
AC_CHECK_FUNCS(bind_textdomain_codeset)
1098
# If we don't have everything we want, check in libintl
1100
if test "$gt_cv_func_dgettext_libc" != "yes" \
1101
|| test "$gt_cv_func_ngettext_libc" != "yes" \
1102
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
1104
AC_CHECK_LIB(intl, bindtextdomain,
1105
[AC_CHECK_LIB(intl, ngettext,
1106
[AC_CHECK_LIB(intl, dgettext,
1107
gt_cv_func_dgettext_libintl=yes)])])
1109
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
1110
AC_MSG_CHECKING([if -liconv is needed to use gettext])
1112
AC_CHECK_LIB(intl, ngettext,
1113
[AC_CHECK_LIB(intl, dcgettext,
1114
[gt_cv_func_dgettext_libintl=yes
1115
libintl_extra_libs=-liconv],
1121
# If we found libintl, then check in it for bind_textdomain_codeset();
1122
# we'll prefer libc if neither have bind_textdomain_codeset(),
1123
# and both have dgettext and ngettext
1125
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
1126
glib_save_LIBS="$LIBS"
1127
LIBS="$LIBS -lintl $libintl_extra_libs"
1128
unset ac_cv_func_bind_textdomain_codeset
1129
AC_CHECK_FUNCS(bind_textdomain_codeset)
1130
LIBS="$glib_save_LIBS"
1132
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
1133
gt_cv_func_dgettext_libc=no
1135
if test "$gt_cv_func_dgettext_libc" = "yes" \
1136
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
1137
gt_cv_func_dgettext_libintl=no
1143
if test "$gt_cv_func_dgettext_libc" = "yes" \
1144
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
1145
gt_cv_have_gettext=yes
1148
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1149
INTLLIBS="-lintl $libintl_extra_libs"
1152
if test "$gt_cv_have_gettext" = "yes"; then
1153
AC_DEFINE(HAVE_GETTEXT,1,
1154
[Define if the GNU gettext() function is already present or preinstalled.])
1155
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1156
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1157
if test "$MSGFMT" != "no"; then
1158
glib_save_LIBS="$LIBS"
1159
LIBS="$LIBS $INTLLIBS"
1160
AC_CHECK_FUNCS(dcgettext)
1162
AC_MSG_CHECKING([if msgfmt accepts -c])
1163
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
1166
"Content-Type: text/plain; charset=UTF-8\n"
1167
"Project-Id-Version: test 1.0\n"
1168
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
1169
"Last-Translator: test <foo@bar.xx>\n"
1170
"Language-Team: C <LL@li.org>\n"
1171
"MIME-Version: 1.0\n"
1172
"Content-Transfer-Encoding: 8bit\n"
1173
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
1174
AC_SUBST(MSGFMT_OPTS)
1175
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1176
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1177
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1178
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1179
return _nl_msg_cat_cntr],
1184
dnl On Solaris, if bind_textdomain_codeset is in libc,
1185
dnl GNU format message catalog is always supported,
1186
dnl since both are added to the libc all together.
1187
dnl Hence, we'd like to go with DATADIRNAME=share and
1188
dnl and CATOBJEXT=.gmo in this case.
1189
AC_CHECK_FUNC(bind_textdomain_codeset,
1200
LIBS="$glib_save_LIBS"
1203
gt_cv_have_gettext=no
1208
if test "$gt_cv_have_gettext" = "yes" ; then
1209
AC_DEFINE(ENABLE_NLS, 1,
1210
[always defined to indicate that i18n is enabled])
1213
dnl Test whether we really found GNU xgettext.
1214
if test "$XGETTEXT" != ":"; then
1215
dnl If it is not GNU xgettext we define it as : so that the
1216
dnl Makefiles still can work.
1217
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1221
[found xgettext program is not GNU xgettext; ignore it])
1226
# We need to process the po/ directory.
1230
[case "$CONFIG_FILES" in *po/Makefile.in*)
1231
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1234
dnl These rules are solely for the distribution goal. While doing this
1235
dnl we only have to keep exactly one list of the available catalogs
1236
dnl in configure.in.
1237
for lang in $ALL_LINGUAS; do
1238
GMOFILES="$GMOFILES $lang.gmo"
1239
POFILES="$POFILES $lang.po"
1242
dnl Make all variables we use known to autoconf.
1245
AC_SUBST(DATADIRNAME)
1247
AC_SUBST(INSTOBJEXT)
1249
AC_SUBST(PO_IN_DATADIR_TRUE)
1250
AC_SUBST(PO_IN_DATADIR_FALSE)
1255
# AM_GLIB_GNU_GETTEXT
1256
# -------------------
1257
# Do checks necessary for use of gettext. If a suitable implementation
1258
# of gettext is found in either in libintl or in the C library,
1259
# it will set INTLLIBS to the libraries needed for use of gettext
1260
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
1261
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
1262
# on various variables needed by the Makefile.in.in installed by
1265
glib_DEFUN([GLIB_GNU_GETTEXT],
1266
[AC_REQUIRE([AC_PROG_CC])dnl
1267
AC_REQUIRE([AC_HEADER_STDC])dnl
1272
if test "$gt_cv_have_gettext" = "yes"; then
1273
if test "x$ALL_LINGUAS" = "x"; then
1276
AC_MSG_CHECKING(for catalogs to be installed)
1278
for presentlang in $ALL_LINGUAS; do
1280
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
1281
desiredlanguages="$LINGUAS"
1283
desiredlanguages="$ALL_LINGUAS"
1285
for desiredlang in $desiredlanguages; do
1286
# Use the presentlang catalog if desiredlang is
1287
# a. equal to presentlang, or
1288
# b. a variant of presentlang (because in this case,
1289
# presentlang can be used as a fallback for messages
1290
# which are not translated in the desiredlang catalog).
1291
case "$desiredlang" in
1292
"$presentlang"*) useit=yes;;
1295
if test $useit = yes; then
1296
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1299
LINGUAS=$NEW_LINGUAS
1300
AC_MSG_RESULT($LINGUAS)
1303
dnl Construct list of names of catalog files to be constructed.
1304
if test -n "$LINGUAS"; then
1305
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1309
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1310
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1311
dnl Try to locate is.
1313
if test -n "$ac_aux_dir"; then
1314
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1316
if test -z "$MKINSTALLDIRS"; then
1317
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1319
AC_SUBST(MKINSTALLDIRS)
1321
dnl Generate list of files to be processed by xgettext which will
1322
dnl be included in po/Makefile.
1323
test -d po || mkdir po
1324
if test "x$srcdir" != "x."; then
1325
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1326
posrcprefix="$srcdir/"
1328
posrcprefix="../$srcdir/"
1334
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1335
< $srcdir/po/POTFILES.in > po/POTFILES
1338
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1339
# -------------------------------
1340
# Define VARIABLE to the location where catalog files will
1341
# be installed by po/Makefile.
1342
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1343
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
1344
glib_save_prefix="$prefix"
1345
glib_save_exec_prefix="$exec_prefix"
1346
glib_save_datarootdir="$datarootdir"
1347
test "x$prefix" = xNONE && prefix=$ac_default_prefix
1348
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1349
datarootdir=`eval echo "${datarootdir}"`
1350
if test "x$CATOBJEXT" = "x.mo" ; then
1351
localedir=`eval echo "${libdir}/locale"`
1353
localedir=`eval echo "${datadir}/locale"`
1355
prefix="$glib_save_prefix"
1356
exec_prefix="$glib_save_exec_prefix"
1357
datarootdir="$glib_save_datarootdir"
1358
AC_DEFINE_UNQUOTED($1, "$localedir",
1359
[Define the location where the catalogs will be installed])
1363
dnl Now the definitions that aclocal will find
1365
ifdef(glib_configure_in,[],[
1366
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
1367
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1370
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
1372
# Create a temporary file with TEST-FILE as its contents and pass the
1373
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
1374
# 0 and perform ACTION-IF-FAIL for any other exit status.
1375
AC_DEFUN([GLIB_RUN_PROG],
1376
[cat >conftest.foo <<_ACEOF
1379
if AC_RUN_LOG([$1 conftest.foo]); then
1380
m4_ifval([$3], [$3], [:])
1381
m4_ifvaln([$4], [else $4])dnl
1382
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
1383
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
1390
dnl GNOME_COMMON_INIT
1392
AC_DEFUN([GNOME_COMMON_INIT],
1394
dnl this macro should come after AC_CONFIG_MACRO_DIR
1395
AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
1397
dnl ensure that when the Automake generated makefile calls aclocal,
1398
dnl it honours the $ACLOCAL_FLAGS environment variable
1399
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
1400
if test -n "$ac_macro_dir"; then
1401
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
1404
AC_SUBST([ACLOCAL_AMFLAGS])
1407
AC_DEFUN([GNOME_DEBUG_CHECK],
1409
AC_ARG_ENABLE([debug],
1410
AC_HELP_STRING([--enable-debug],
1411
[turn on debugging]),,
1414
if test x$enable_debug = xyes ; then
1415
AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
1416
[Enable additional debugging at the expense of performance and size])
1420
dnl GNOME_MAINTAINER_MODE_DEFINES ()
1421
dnl define DISABLE_DEPRECATED
1423
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
1425
AC_REQUIRE([AM_MAINTAINER_MODE])
1427
if test $USE_MAINTAINER_MODE = yes; then
1428
DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_DEPRECATED -DWNCK_DISABLE_DEPRECATED -DLIBSOUP_DISABLE_DEPRECATED"
1430
DISABLE_DEPRECATED=""
1432
AC_SUBST(DISABLE_DEPRECATED)
1435
dnl GNOME_COMPILE_WARNINGS
1436
dnl Turn on many useful compiler warnings
1437
dnl For now, only works on GCC
1438
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
1439
dnl ******************************
1440
dnl More compiler warnings
1441
dnl ******************************
1443
AC_ARG_ENABLE(compile-warnings,
1444
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
1445
[Turn on compiler warnings]),,
1446
[enable_compile_warnings="m4_default([$1],[yes])"])
1449
if test "x$GCC" != xyes; then
1450
enable_compile_warnings=no
1454
realsave_CFLAGS="$CFLAGS"
1456
case "$enable_compile_warnings" in
1461
warning_flags="-Wall"
1464
warning_flags="-Wall -Wmissing-prototypes"
1467
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
1468
CFLAGS="$warning_flags $CFLAGS"
1469
for option in -Wno-sign-compare; do
1470
SAVE_CFLAGS="$CFLAGS"
1471
CFLAGS="$CFLAGS $option"
1472
AC_MSG_CHECKING([whether gcc understands $option])
1473
AC_TRY_COMPILE([], [],
1476
CFLAGS="$SAVE_CFLAGS"
1477
AC_MSG_RESULT($has_option)
1478
if test $has_option = yes; then
1479
warning_flags="$warning_flags $option"
1485
if test "$enable_compile_warnings" = "error" ; then
1486
warning_flags="$warning_flags -Werror"
1490
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
1493
CFLAGS="$realsave_CFLAGS"
1494
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
1495
AC_MSG_RESULT($warning_flags)
1497
AC_ARG_ENABLE(iso-c,
1498
AC_HELP_STRING([--enable-iso-c],
1499
[Try to warn if code is not ISO C ]),,
1502
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
1504
if test "x$enable_iso_c" != "xno"; then
1505
if test "x$GCC" = "xyes"; then
1507
*[\ \ ]-ansi[\ \ ]*) ;;
1508
*) complCFLAGS="$complCFLAGS -ansi" ;;
1511
*[\ \ ]-pedantic[\ \ ]*) ;;
1512
*) complCFLAGS="$complCFLAGS -pedantic" ;;
1516
AC_MSG_RESULT($complCFLAGS)
1518
WARN_CFLAGS="$warning_flags $complCFLAGS"
1519
AC_SUBST(WARN_CFLAGS)
1522
dnl For C++, do basically the same thing.
1524
AC_DEFUN([GNOME_CXX_WARNINGS],[
1525
AC_ARG_ENABLE(cxx-warnings,
1526
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
1527
[Turn on compiler warnings.]),,
1528
[enable_cxx_warnings="m4_default([$1],[minimum])"])
1530
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
1532
if test "x$GXX" != xyes; then
1533
enable_cxx_warnings=no
1535
if test "x$enable_cxx_warnings" != "xno"; then
1536
if test "x$GXX" = "xyes"; then
1537
case " $CXXFLAGS " in
1538
*[\ \ ]-Wall[\ \ ]*) ;;
1539
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
1542
## -W is not all that useful. And it cannot be controlled
1543
## with individual -Wno-xxx flags, unlike -Wall
1544
if test "x$enable_cxx_warnings" = "xyes"; then
1545
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
1549
AC_MSG_RESULT($warnCXXFLAGS)
1551
AC_ARG_ENABLE(iso-cxx,
1552
AC_HELP_STRING([--enable-iso-cxx],
1553
[Try to warn if code is not ISO C++ ]),,
1554
[enable_iso_cxx=no])
1556
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
1558
if test "x$enable_iso_cxx" != "xno"; then
1559
if test "x$GXX" = "xyes"; then
1560
case " $CXXFLAGS " in
1561
*[\ \ ]-ansi[\ \ ]*) ;;
1562
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
1565
case " $CXXFLAGS " in
1566
*[\ \ ]-pedantic[\ \ ]*) ;;
1567
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
1571
AC_MSG_RESULT($complCXXFLAGS)
1573
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
1574
AC_SUBST(WARN_CXXFLAGS)
1577
dnl -*- mode: autoconf -*-
1582
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
1583
AC_DEFUN([GTK_DOC_CHECK],
1585
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
1586
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
1588
dnl for overriding the documentation installation directory
1589
AC_ARG_WITH([html-dir],
1590
AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
1591
[with_html_dir='${datadir}/gtk-doc/html'])
1592
HTML_DIR="$with_html_dir"
1593
AC_SUBST([HTML_DIR])
1595
dnl enable/disable documentation building
1596
AC_ARG_ENABLE([gtk-doc],
1597
AS_HELP_STRING([--enable-gtk-doc],
1598
[use gtk-doc to build documentation [[default=no]]]),,
1599
[enable_gtk_doc=no])
1601
if test x$enable_gtk_doc = xyes; then
1603
[PKG_CHECK_EXISTS([gtk-doc],,
1604
AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
1605
[PKG_CHECK_EXISTS([gtk-doc >= $1],,
1606
AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
1609
AC_MSG_CHECKING([whether to build gtk-doc documentation])
1610
AC_MSG_RESULT($enable_gtk_doc)
1612
dnl enable/disable output formats
1613
AC_ARG_ENABLE([gtk-doc-html],
1614
AS_HELP_STRING([--enable-gtk-doc-html],
1615
[build documentation in html format [[default=yes]]]),,
1616
[enable_gtk_doc_html=yes])
1617
AC_ARG_ENABLE([gtk-doc-pdf],
1618
AS_HELP_STRING([--enable-gtk-doc-pdf],
1619
[build documentation in pdf format [[default=no]]]),,
1620
[enable_gtk_doc_pdf=no])
1622
dnl check for tools we added during development
1623
AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
1624
AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
1626
AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
1627
AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
1628
AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
1629
AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
1630
AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
1634
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1635
# serial 40 IT_PROG_INTLTOOL
1636
AC_DEFUN([IT_PROG_INTLTOOL], [
1637
AC_PREREQ([2.50])dnl
1638
AC_REQUIRE([AM_NLS])dnl
1640
case "$am__api_version" in
1642
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1648
if test -n "$1"; then
1649
AC_MSG_CHECKING([for intltool >= $1])
1651
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1652
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
1653
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1655
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1656
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
1657
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
1660
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
1661
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
1662
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
1663
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
1664
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
1667
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1668
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1669
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1670
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1671
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
1672
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1673
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1674
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1675
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1676
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1677
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1678
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
1679
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1680
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1681
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1682
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1683
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1684
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1685
INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1687
AC_SUBST(INTLTOOL_DESKTOP_RULE)
1688
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
1689
AC_SUBST(INTLTOOL_KEYS_RULE)
1690
AC_SUBST(INTLTOOL_PROP_RULE)
1691
AC_SUBST(INTLTOOL_OAF_RULE)
1692
AC_SUBST(INTLTOOL_PONG_RULE)
1693
AC_SUBST(INTLTOOL_SERVER_RULE)
1694
AC_SUBST(INTLTOOL_SHEET_RULE)
1695
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
1696
AC_SUBST(INTLTOOL_UI_RULE)
1697
AC_SUBST(INTLTOOL_XAM_RULE)
1698
AC_SUBST(INTLTOOL_KBD_RULE)
1699
AC_SUBST(INTLTOOL_XML_RULE)
1700
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1701
AC_SUBST(INTLTOOL_CAVES_RULE)
1702
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
1703
AC_SUBST(INTLTOOL_THEME_RULE)
1704
AC_SUBST(INTLTOOL_SERVICE_RULE)
1705
AC_SUBST(INTLTOOL_POLICY_RULE)
1707
# Check the gettext tools to make sure they are GNU
1708
AC_PATH_PROG(XGETTEXT, xgettext)
1709
AC_PATH_PROG(MSGMERGE, msgmerge)
1710
AC_PATH_PROG(MSGFMT, msgfmt)
1711
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1712
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
1713
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1715
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
1716
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
1717
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
1718
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
1719
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1722
AC_PATH_PROG(INTLTOOL_PERL, [perl])
1723
if test -z "$INTLTOOL_PERL"; then
1724
AC_MSG_ERROR([perl not found; required for intltool])
1726
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
1727
AC_MSG_ERROR([perl 5.x required for intltool])
1729
if test "x$2" != "xno-xml"; then
1730
AC_MSG_CHECKING([for XML::Parser])
1731
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1734
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1738
# Substitute ALL_LINGUAS so we can use it in po/Makefile
1739
AC_SUBST(ALL_LINGUAS)
1741
# Set DATADIRNAME correctly if it is not set yet
1742
# (copied from glib-gettext.m4)
1743
if test -z "$DATADIRNAME"; then
1745
[AC_LANG_PROGRAM([[]],
1746
[[extern int _nl_msg_cat_cntr;
1747
return _nl_msg_cat_cntr]])],
1748
[DATADIRNAME=share],
1751
dnl On Solaris, if bind_textdomain_codeset is in libc,
1752
dnl GNU format message catalog is always supported,
1753
dnl since both are added to the libc all together.
1754
dnl Hence, we'd like to go with DATADIRNAME=share
1756
AC_CHECK_FUNC(bind_textdomain_codeset,
1757
[DATADIRNAME=share], [DATADIRNAME=lib])
1764
AC_SUBST(DATADIRNAME)
1771
# IT_PO_SUBDIR(DIRNAME)
1772
# ---------------------
1773
# All po subdirs have to be declared with this macro; the subdir "po" is
1774
# declared by IT_PROG_INTLTOOL.
1776
AC_DEFUN([IT_PO_SUBDIR],
1777
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1779
dnl The following CONFIG_COMMANDS should be exetuted at the very end
1780
dnl of config.status.
1781
AC_CONFIG_COMMANDS_PRE([
1782
AC_CONFIG_COMMANDS([$1/stamp-it], [
1783
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" ]; then
1784
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1786
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1791
'"s|^| $ac_top_srcdir/|" \
1792
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1794
[sed '/^POTFILES =/,/[^\\]$/ {
1798
' "$1/Makefile.in" >"$1/Makefile"]
1799
rm -f "$1/Makefile.tmp"
1800
mv "$1/stamp-it.tmp" "$1/stamp-it"
1806
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1807
# A hint is needed for aclocal from Automake <= 1.9.4:
1808
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
22
1811
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
24
# serial 51 AC_PROG_LIBTOOL
1813
# serial 52 AC_PROG_LIBTOOL
27
1816
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
6776
8636
])# PKG_CHECK_MODULES
6778
# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
6780
# This file is free software; the Free Software Foundation
6781
# gives unlimited permission to copy and/or distribute it,
6782
# with or without modifications, as long as this notice is preserved.
6784
# AM_AUTOMAKE_VERSION(VERSION)
6785
# ----------------------------
6786
# Automake X.Y traces this macro to ensure aclocal.m4 has been
6787
# generated from the m4 files accompanying Automake X.Y.
6788
# (This private macro should not be called outside this file.)
6789
AC_DEFUN([AM_AUTOMAKE_VERSION],
6790
[am__api_version='1.10'
6791
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
6792
dnl require some minimum version. Point them to the right macro.
6793
m4_if([$1], [1.10.1], [],
6794
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
6797
# _AM_AUTOCONF_VERSION(VERSION)
6798
# -----------------------------
6799
# aclocal traces this macro to find the Autoconf version.
6800
# This is a private macro too. Using m4_define simplifies
6801
# the logic in aclocal, which can simply ignore this definition.
6802
m4_define([_AM_AUTOCONF_VERSION], [])
6804
# AM_SET_CURRENT_AUTOMAKE_VERSION
6805
# -------------------------------
6806
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
6807
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6808
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6809
[AM_AUTOMAKE_VERSION([1.10.1])dnl
6810
m4_ifndef([AC_AUTOCONF_VERSION],
6811
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
6812
_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
6814
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
6816
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6818
# This file is free software; the Free Software Foundation
6819
# gives unlimited permission to copy and/or distribute it,
6820
# with or without modifications, as long as this notice is preserved.
6822
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6823
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
6824
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6826
# Of course, Automake must honor this variable whenever it calls a
6827
# tool from the auxiliary directory. The problem is that $srcdir (and
6828
# therefore $ac_aux_dir as well) can be either absolute or relative,
6829
# depending on how configure is run. This is pretty annoying, since
6830
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6831
# source directory, any form will work fine, but in subdirectories a
6832
# relative path needs to be adjusted first.
6834
# $ac_aux_dir/missing
6835
# fails when called from a subdirectory if $ac_aux_dir is relative
6836
# $top_srcdir/$ac_aux_dir/missing
6837
# fails if $ac_aux_dir is absolute,
6838
# fails when called from a subdirectory in a VPATH build with
6839
# a relative $ac_aux_dir
6841
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6842
# are both prefixed by $srcdir. In an in-source build this is usually
6843
# harmless because $srcdir is `.', but things will broke when you
6844
# start a VPATH build or use an absolute $srcdir.
6846
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6847
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
6848
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6849
# and then we would define $MISSING as
6850
# MISSING="\${SHELL} $am_aux_dir/missing"
6851
# This will work as long as MISSING is not called from configure, because
6852
# unfortunately $(top_srcdir) has no meaning in configure.
6853
# However there are other variables, like CC, which are often used in
6854
# configure, and could therefore not use this "fixed" $ac_aux_dir.
6856
# Another solution, used here, is to always expand $ac_aux_dir to an
6857
# absolute PATH. The drawback is that using absolute paths prevent a
6858
# configured tree to be moved without reconfiguration.
6860
AC_DEFUN([AM_AUX_DIR_EXPAND],
6861
[dnl Rely on autoconf to set up CDPATH properly.
6862
AC_PREREQ([2.50])dnl
6863
# expand $ac_aux_dir to an absolute path
6864
am_aux_dir=`cd $ac_aux_dir && pwd`
6867
# AM_CONDITIONAL -*- Autoconf -*-
6869
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
6870
# Free Software Foundation, Inc.
6872
# This file is free software; the Free Software Foundation
6873
# gives unlimited permission to copy and/or distribute it,
6874
# with or without modifications, as long as this notice is preserved.
6878
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6879
# -------------------------------------
6880
# Define a conditional.
6881
AC_DEFUN([AM_CONDITIONAL],
6883
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
6884
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6885
AC_SUBST([$1_TRUE])dnl
6886
AC_SUBST([$1_FALSE])dnl
6887
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
6888
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
6896
AC_CONFIG_COMMANDS_PRE(
6897
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6898
AC_MSG_ERROR([[conditional "$1" was never defined.
6899
Usually this means the macro was only invoked conditionally.]])
6902
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6903
# Free Software Foundation, Inc.
6905
# This file is free software; the Free Software Foundation
6906
# gives unlimited permission to copy and/or distribute it,
6907
# with or without modifications, as long as this notice is preserved.
6911
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6912
# written in clear, in which case automake, when reading aclocal.m4,
6913
# will think it sees a *use*, and therefore will trigger all it's
6914
# C support machinery. Also note that it means that autoscan, seeing
6915
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6918
# _AM_DEPENDENCIES(NAME)
6919
# ----------------------
6920
# See how the compiler implements dependency checking.
6921
# NAME is "CC", "CXX", "GCJ", or "OBJC".
6922
# We try a few techniques and use that to set a single cache variable.
6924
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6925
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6926
# dependency, and given that the user is not expected to run this macro,
6927
# just rely on AC_PROG_CC.
6928
AC_DEFUN([_AM_DEPENDENCIES],
6929
[AC_REQUIRE([AM_SET_DEPDIR])dnl
6930
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6931
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6932
AC_REQUIRE([AM_DEP_TRACK])dnl
6934
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
6935
[$1], CXX, [depcc="$CXX" am_compiler_list=],
6936
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6937
[$1], UPC, [depcc="$UPC" am_compiler_list=],
6938
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
6939
[depcc="$$1" am_compiler_list=])
6941
AC_CACHE_CHECK([dependency style of $depcc],
6942
[am_cv_$1_dependencies_compiler_type],
6943
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6944
# We make a subdir and do the tests there. Otherwise we can end up
6945
# making bogus files that we don't know about and never remove. For
6946
# instance it was reported that on HP-UX the gcc test will end up
6947
# making a dummy file named `D' -- because `-MD' means `put the output
6950
# Copy depcomp to subdir because otherwise we won't find it if we're
6951
# using a relative directory.
6952
cp "$am_depcomp" conftest.dir
6954
# We will build objects and dependencies in a subdirectory because
6955
# it helps to detect inapplicable dependency modes. For instance
6956
# both Tru64's cc and ICC support -MD to output dependencies as a
6957
# side effect of compilation, but ICC will put the dependencies in
6958
# the current directory while Tru64 will put them in the object
6962
am_cv_$1_dependencies_compiler_type=none
6963
if test "$am_compiler_list" = ""; then
6964
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6966
for depmode in $am_compiler_list; do
6967
# Setup a source with many dependencies, because some compilers
6968
# like to wrap large dependency lists on column 80 (with \), and
6969
# we should not choose a depcomp mode which is confused by this.
6971
# We need to recreate these files for each test, as the compiler may
6972
# overwrite some of them when testing with obscure command lines.
6973
# This happens at least with the AIX C compiler.
6975
for i in 1 2 3 4 5 6; do
6976
echo '#include "conftst'$i'.h"' >> sub/conftest.c
6977
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6978
# Solaris 8's {/usr,}/bin/sh.
6979
touch sub/conftst$i.h
6981
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6985
# after this tag, mechanisms are not by side-effect, so they'll
6986
# only be used when explicitly requested
6987
if test "x$enable_dependency_tracking" = xyes; then
6995
# We check with `-c' and `-o' for the sake of the "dashmstdout"
6996
# mode. It turns out that the SunPro C++ compiler does not properly
6997
# handle `-M -o', and we need to detect this.
6998
if depmode=$depmode \
6999
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7000
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7001
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7002
>/dev/null 2>conftest.err &&
7003
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
7004
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7005
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7006
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7007
# icc doesn't choke on unknown options, it will just issue warnings
7008
# or remarks (even with -Werror). So we grep stderr for any message
7009
# that says an option was ignored or not supported.
7010
# When given -MP, icc 7.0 and 7.1 complain thusly:
7011
# icc: Command line warning: ignoring option '-M'; no argument required
7012
# The diagnosis changed in icc 8.0:
7013
# icc: Command line remark: option '-MP' not supported
7014
if (grep 'ignoring option' conftest.err ||
7015
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7016
am_cv_$1_dependencies_compiler_type=$depmode
7025
am_cv_$1_dependencies_compiler_type=none
7028
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
7029
AM_CONDITIONAL([am__fastdep$1], [
7030
test "x$enable_dependency_tracking" != xno \
7031
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
7037
# Choose a directory name for dependency files.
7038
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
7039
AC_DEFUN([AM_SET_DEPDIR],
7040
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7041
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
7047
AC_DEFUN([AM_DEP_TRACK],
7048
[AC_ARG_ENABLE(dependency-tracking,
7049
[ --disable-dependency-tracking speeds up one-time build
7050
--enable-dependency-tracking do not reject slow dependency extractors])
7051
if test "x$enable_dependency_tracking" != xno; then
7052
am_depcomp="$ac_aux_dir/depcomp"
7055
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
7056
AC_SUBST([AMDEPBACKSLASH])dnl
7057
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
7060
# Generate code to set up dependency tracking. -*- Autoconf -*-
7062
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
7063
# Free Software Foundation, Inc.
7065
# This file is free software; the Free Software Foundation
7066
# gives unlimited permission to copy and/or distribute it,
7067
# with or without modifications, as long as this notice is preserved.
7071
# _AM_OUTPUT_DEPENDENCY_COMMANDS
7072
# ------------------------------
7073
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
7074
[for mf in $CONFIG_FILES; do
7075
# Strip MF so we end up with the name of the file.
7076
mf=`echo "$mf" | sed -e 's/:.*$//'`
7077
# Check whether this is an Automake generated Makefile or not.
7078
# We used to match only the files named `Makefile.in', but
7079
# some people rename them; so instead we look at the file content.
7080
# Grep'ing the first line is not enough: some people post-process
7081
# each Makefile.in and add a new line on top of each file to say so.
7082
# Grep'ing the whole file is not good either: AIX grep has a line
7083
# limit of 2048, but all sed's we know have understand at least 4000.
7084
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
7085
dirpart=`AS_DIRNAME("$mf")`
7089
# Extract the definition of DEPDIR, am__include, and am__quote
7090
# from the Makefile without running `make'.
7091
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
7092
test -z "$DEPDIR" && continue
7093
am__include=`sed -n 's/^am__include = //p' < "$mf"`
7094
test -z "am__include" && continue
7095
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
7096
# When using ansi2knr, U may be empty or an underscore; expand it
7097
U=`sed -n 's/^U = //p' < "$mf"`
7098
# Find all dependency output files, they are included files with
7099
# $(DEPDIR) in their names. We invoke sed twice because it is the
7100
# simplest approach to changing $(DEPDIR) to its actual value in the
7102
for file in `sed -n "
7103
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
7104
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7105
# Make sure the directory exists.
7106
test -f "$dirpart/$file" && continue
7107
fdir=`AS_DIRNAME(["$file"])`
7108
AS_MKDIR_P([$dirpart/$fdir])
7109
# echo "creating $dirpart/$file"
7110
echo '# dummy' > "$dirpart/$file"
7113
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7116
# AM_OUTPUT_DEPENDENCY_COMMANDS
7117
# -----------------------------
7118
# This macro should only be invoked once -- use via AC_REQUIRE.
7120
# This code is only required when automatic dependency tracking
7121
# is enabled. FIXME. This creates each `.P' file that we will
7122
# need in order to bootstrap the dependency handling code.
7123
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7124
[AC_CONFIG_COMMANDS([depfiles],
7125
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7126
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7129
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7130
# Free Software Foundation, Inc.
7132
# This file is free software; the Free Software Foundation
7133
# gives unlimited permission to copy and/or distribute it,
7134
# with or without modifications, as long as this notice is preserved.
7138
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
7139
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
7141
# Do all the work for Automake. -*- Autoconf -*-
7143
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
7144
# 2005, 2006, 2008 Free Software Foundation, Inc.
7146
# This file is free software; the Free Software Foundation
7147
# gives unlimited permission to copy and/or distribute it,
7148
# with or without modifications, as long as this notice is preserved.
7152
# This macro actually does too much. Some checks are only needed if
7153
# your package does certain things. But this isn't really a big deal.
7155
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
7156
# AM_INIT_AUTOMAKE([OPTIONS])
7157
# -----------------------------------------------
7158
# The call with PACKAGE and VERSION arguments is the old style
7159
# call (pre autoconf-2.50), which is being phased out. PACKAGE
7160
# and VERSION should now be passed to AC_INIT and removed from
7161
# the call to AM_INIT_AUTOMAKE.
7162
# We support both call styles for the transition. After
7163
# the next Automake release, Autoconf can make the AC_INIT
7164
# arguments mandatory, and then we can depend on a new Autoconf
7165
# release and drop the old call support.
7166
AC_DEFUN([AM_INIT_AUTOMAKE],
7167
[AC_PREREQ([2.60])dnl
7168
dnl Autoconf wants to disallow AM_ names. We explicitly allow
7169
dnl the ones we care about.
7170
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
7171
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
7172
AC_REQUIRE([AC_PROG_INSTALL])dnl
7173
if test "`cd $srcdir && pwd`" != "`pwd`"; then
7174
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7175
# is not polluted with repeated "-I."
7176
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
7177
# test to see if srcdir already configured
7178
if test -f $srcdir/config.status; then
7179
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
7183
# test whether we have cygpath
7184
if test -z "$CYGPATH_W"; then
7185
if (cygpath --version) >/dev/null 2>/dev/null; then
7186
CYGPATH_W='cygpath -w'
7191
AC_SUBST([CYGPATH_W])
7193
# Define the identity of the package.
7194
dnl Distinguish between old-style and new-style calls.
7196
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
7197
AC_SUBST([PACKAGE], [$1])dnl
7198
AC_SUBST([VERSION], [$2])],
7199
[_AM_SET_OPTIONS([$1])dnl
7200
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
7201
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
7202
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
7203
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
7204
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
7206
_AM_IF_OPTION([no-define],,
7207
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
7208
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
7210
# Some tools Automake needs.
7211
AC_REQUIRE([AM_SANITY_CHECK])dnl
7212
AC_REQUIRE([AC_ARG_PROGRAM])dnl
7213
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
7214
AM_MISSING_PROG(AUTOCONF, autoconf)
7215
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
7216
AM_MISSING_PROG(AUTOHEADER, autoheader)
7217
AM_MISSING_PROG(MAKEINFO, makeinfo)
7219
AM_PROG_INSTALL_STRIP
7220
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
7221
# We need awk for the "check" target. The system "awk" is bad on
7223
AC_REQUIRE([AC_PROG_AWK])dnl
7224
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
7225
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7226
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
7227
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
7228
[_AM_PROG_TAR([v7])])])
7229
_AM_IF_OPTION([no-dependencies],,
7230
[AC_PROVIDE_IFELSE([AC_PROG_CC],
7231
[_AM_DEPENDENCIES(CC)],
7232
[define([AC_PROG_CC],
7233
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
7234
AC_PROVIDE_IFELSE([AC_PROG_CXX],
7235
[_AM_DEPENDENCIES(CXX)],
7236
[define([AC_PROG_CXX],
7237
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
7238
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
7239
[_AM_DEPENDENCIES(OBJC)],
7240
[define([AC_PROG_OBJC],
7241
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
7246
# When config.status generates a header, we must update the stamp-h file.
7247
# This file resides in the same directory as the config header
7248
# that is generated. The stamp files are numbered to have different names.
7250
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
7251
# loop where config.status creates the headers, so we can generate
7252
# our stamp files there.
7253
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
7254
[# Compute $1's index in $config_headers.
7257
for _am_header in $config_headers :; do
7259
$_am_arg | $_am_arg:* )
7262
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
7265
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
7267
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7269
# This file is free software; the Free Software Foundation
7270
# gives unlimited permission to copy and/or distribute it,
7271
# with or without modifications, as long as this notice is preserved.
7273
# AM_PROG_INSTALL_SH
7274
# ------------------
7275
# Define $install_sh.
7276
AC_DEFUN([AM_PROG_INSTALL_SH],
7277
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7278
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
7279
AC_SUBST(install_sh)])
7281
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
7283
# This file is free software; the Free Software Foundation
7284
# gives unlimited permission to copy and/or distribute it,
7285
# with or without modifications, as long as this notice is preserved.
7289
# Check whether the underlying file-system supports filenames
7290
# with a leading dot. For instance MS-DOS doesn't.
7291
AC_DEFUN([AM_SET_LEADING_DOT],
7292
[rm -rf .tst 2>/dev/null
7293
mkdir .tst 2>/dev/null
7294
if test -d .tst; then
7299
rmdir .tst 2>/dev/null
7300
AC_SUBST([am__leading_dot])])
7302
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
7305
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
7306
# Free Software Foundation, Inc.
7308
# This file is free software; the Free Software Foundation
7309
# gives unlimited permission to copy and/or distribute it,
7310
# with or without modifications, as long as this notice is preserved.
7314
AC_DEFUN([AM_MAINTAINER_MODE],
7315
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
7316
dnl maintainer-mode is disabled by default
7317
AC_ARG_ENABLE(maintainer-mode,
7318
[ --enable-maintainer-mode enable make rules and dependencies not useful
7319
(and sometimes confusing) to the casual installer],
7320
USE_MAINTAINER_MODE=$enableval,
7321
USE_MAINTAINER_MODE=no)
7322
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
7323
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
7324
MAINT=$MAINTAINER_MODE_TRUE
7329
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
7331
# Check to see how 'make' treats includes. -*- Autoconf -*-
7333
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
7335
# This file is free software; the Free Software Foundation
7336
# gives unlimited permission to copy and/or distribute it,
7337
# with or without modifications, as long as this notice is preserved.
7343
# Check to see how make treats includes.
7344
AC_DEFUN([AM_MAKE_INCLUDE],
7345
[am_make=${MAKE-make}
7346
cat > confinc << 'END'
7351
# If we don't find an include directive, just comment out the code.
7352
AC_MSG_CHECKING([for style of include used by $am_make])
7356
# First try GNU make style include.
7357
echo "include confinc" > confmf
7358
# We grep out `Entering directory' and `Leaving directory'
7359
# messages which can occur if `w' ends up in MAKEFLAGS.
7360
# In particular we don't look at `^make:' because GNU make might
7361
# be invoked under some other name (usually "gmake"), in which
7362
# case it prints its new name instead of `make'.
7363
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7368
# Now try BSD make style include.
7369
if test "$am__include" = "#"; then
7370
echo '.include "confinc"' > confmf
7371
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7372
am__include=.include
7377
AC_SUBST([am__include])
7378
AC_SUBST([am__quote])
7379
AC_MSG_RESULT([$_am_result])
7380
rm -f confinc confmf
7383
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
7385
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
7386
# Free Software Foundation, Inc.
7388
# This file is free software; the Free Software Foundation
7389
# gives unlimited permission to copy and/or distribute it,
7390
# with or without modifications, as long as this notice is preserved.
7394
# AM_MISSING_PROG(NAME, PROGRAM)
7395
# ------------------------------
7396
AC_DEFUN([AM_MISSING_PROG],
7397
[AC_REQUIRE([AM_MISSING_HAS_RUN])
7398
$1=${$1-"${am_missing_run}$2"}
7402
# AM_MISSING_HAS_RUN
7403
# ------------------
7404
# Define MISSING if not defined so far and test if it supports --run.
7405
# If it does, set am_missing_run to use it, otherwise, to nothing.
7406
AC_DEFUN([AM_MISSING_HAS_RUN],
7407
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7408
AC_REQUIRE_AUX_FILE([missing])dnl
7409
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7410
# Use eval to expand $SHELL
7411
if eval "$MISSING --run true"; then
7412
am_missing_run="$MISSING --run "
7415
AC_MSG_WARN([`missing' script is too old or missing])
7419
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
7421
# This file is free software; the Free Software Foundation
7422
# gives unlimited permission to copy and/or distribute it,
7423
# with or without modifications, as long as this notice is preserved.
7427
# Check for `mkdir -p'.
7428
AC_DEFUN([AM_PROG_MKDIR_P],
7429
[AC_PREREQ([2.60])dnl
7430
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
7431
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
7432
dnl while keeping a definition of mkdir_p for backward compatibility.
7433
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
7434
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
7435
dnl Makefile.ins that do not define MKDIR_P, so we do our own
7436
dnl adjustment using top_builddir (which is defined more often than
7438
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
7440
[[\\/$]]* | ?:[[\\/]]*) ;;
7441
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7445
# Helper functions for option handling. -*- Autoconf -*-
7447
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
7449
# This file is free software; the Free Software Foundation
7450
# gives unlimited permission to copy and/or distribute it,
7451
# with or without modifications, as long as this notice is preserved.
7455
# _AM_MANGLE_OPTION(NAME)
7456
# -----------------------
7457
AC_DEFUN([_AM_MANGLE_OPTION],
7458
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7460
# _AM_SET_OPTION(NAME)
7461
# ------------------------------
7462
# Set option NAME. Presently that only means defining a flag for this option.
7463
AC_DEFUN([_AM_SET_OPTION],
7464
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7466
# _AM_SET_OPTIONS(OPTIONS)
7467
# ----------------------------------
7468
# OPTIONS is a space-separated list of Automake options.
7469
AC_DEFUN([_AM_SET_OPTIONS],
7470
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7472
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7473
# -------------------------------------------
7474
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7475
AC_DEFUN([_AM_IF_OPTION],
7476
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7478
# Check to make sure that the build environment is sane. -*- Autoconf -*-
7480
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7481
# Free Software Foundation, Inc.
7483
# This file is free software; the Free Software Foundation
7484
# gives unlimited permission to copy and/or distribute it,
7485
# with or without modifications, as long as this notice is preserved.
7491
AC_DEFUN([AM_SANITY_CHECK],
7492
[AC_MSG_CHECKING([whether build environment is sane])
7495
echo timestamp > conftest.file
7496
# Do `set' in a subshell so we don't clobber the current shell's
7497
# arguments. Must try -L first in case configure is actually a
7498
# symlink; some systems play weird games with the mod time of symlinks
7499
# (eg FreeBSD returns the mod time of the symlink's containing
7502
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7503
if test "$[*]" = "X"; then
7505
set X `ls -t $srcdir/configure conftest.file`
7508
if test "$[*]" != "X $srcdir/configure conftest.file" \
7509
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
7511
# If neither matched, then we have a broken ls. This can happen
7512
# if, for instance, CONFIG_SHELL is bash and it inherits a
7513
# broken ls alias from the environment. This has actually
7514
# happened. Such a system could not be considered "sane".
7515
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
7516
alias in your environment])
7519
test "$[2]" = conftest.file
7525
AC_MSG_ERROR([newly created file is older than distributed files!
7526
Check your system clock])
7528
AC_MSG_RESULT(yes)])
7530
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7532
# This file is free software; the Free Software Foundation
7533
# gives unlimited permission to copy and/or distribute it,
7534
# with or without modifications, as long as this notice is preserved.
7536
# AM_PROG_INSTALL_STRIP
7537
# ---------------------
7538
# One issue with vendor `install' (even GNU) is that you can't
7539
# specify the program used to strip binaries. This is especially
7540
# annoying in cross-compiling environments, where the build's strip
7541
# is unlikely to handle the host's binaries.
7542
# Fortunately install-sh will honor a STRIPPROG variable, so we
7543
# always use install-sh in `make install-strip', and initialize
7544
# STRIPPROG with the value of the STRIP variable (set by the user).
7545
AC_DEFUN([AM_PROG_INSTALL_STRIP],
7546
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7547
# Installed binaries are usually stripped using `strip' when the user
7548
# run `make install-strip'. However `strip' might not be the right
7549
# tool to use in cross-compilation environments, therefore Automake
7550
# will honor the `STRIP' environment variable to overrule this program.
7551
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7552
if test "$cross_compiling" != no; then
7553
AC_CHECK_TOOL([STRIP], [strip], :)
7555
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7556
AC_SUBST([INSTALL_STRIP_PROGRAM])])
7558
# Copyright (C) 2006 Free Software Foundation, Inc.
7560
# This file is free software; the Free Software Foundation
7561
# gives unlimited permission to copy and/or distribute it,
7562
# with or without modifications, as long as this notice is preserved.
7564
# _AM_SUBST_NOTMAKE(VARIABLE)
7565
# ---------------------------
7566
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
7567
# This macro is traced by Automake.
7568
AC_DEFUN([_AM_SUBST_NOTMAKE])
7570
# Check how to create a tarball. -*- Autoconf -*-
7572
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
7574
# This file is free software; the Free Software Foundation
7575
# gives unlimited permission to copy and/or distribute it,
7576
# with or without modifications, as long as this notice is preserved.
7580
# _AM_PROG_TAR(FORMAT)
7581
# --------------------
7582
# Check how to create a tarball in format FORMAT.
7583
# FORMAT should be one of `v7', `ustar', or `pax'.
7585
# Substitute a variable $(am__tar) that is a command
7586
# writing to stdout a FORMAT-tarball containing the directory
7588
# tardir=directory && $(am__tar) > result.tar
7590
# Substitute a variable $(am__untar) that extract such
7591
# a tarball read from stdin.
7592
# $(am__untar) < result.tar
7593
AC_DEFUN([_AM_PROG_TAR],
7594
[# Always define AMTAR for backward compatibility.
7595
AM_MISSING_PROG([AMTAR], [tar])
7597
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
7598
[m4_case([$1], [ustar],, [pax],,
7599
[m4_fatal([Unknown tar format])])
7600
AC_MSG_CHECKING([how to create a $1 tar archive])
7601
# Loop over all known methods to create a tar archive until one works.
7602
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
7603
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
7604
# Do not fold the above two line into one, because Tru64 sh and
7605
# Solaris sh will not grok spaces in the rhs of `-'.
7606
for _am_tool in $_am_tools
7610
for _am_tar in tar gnutar gtar;
7612
AM_RUN_LOG([$_am_tar --version]) && break
7614
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
7615
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
7616
am__untar="$_am_tar -xf -"
7619
# Must skip GNU tar: if it does not support --format= it doesn't create
7620
# ustar tarball either.
7621
(tar --version) >/dev/null 2>&1 && continue
7622
am__tar='tar chf - "$$tardir"'
7623
am__tar_='tar chf - "$tardir"'
7624
am__untar='tar xf -'
7627
am__tar='pax -L -x $1 -w "$$tardir"'
7628
am__tar_='pax -L -x $1 -w "$tardir"'
7632
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
7633
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
7634
am__untar='cpio -i -H $1 -d'
7643
# If the value was cached, stop now. We just wanted to have am__tar
7644
# and am__untar set.
7645
test -n "${am_cv_prog_tar_$1}" && break
7647
# tar/untar a dummy directory, and stop if the command works
7650
echo GrepMe > conftest.dir/file
7651
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7653
if test -s conftest.tar; then
7654
AM_RUN_LOG([$am__untar <conftest.tar])
7655
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7660
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7661
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
7663
AC_SUBST([am__untar])
7666
dnl AM_GCONF_SOURCE_2
7667
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
7668
dnl (i.e. pass to gconftool-2
7669
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
7670
dnl you should install foo.schemas files
7673
AC_DEFUN([AM_GCONF_SOURCE_2],
7675
if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
7676
GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
7678
GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
7681
AC_ARG_WITH([gconf-source],
7682
AC_HELP_STRING([--with-gconf-source=sourceaddress],
7683
[Config database for installing schema files.]),
7684
[GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
7686
AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
7687
AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
7689
if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
7690
GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
7693
AC_ARG_WITH([gconf-schema-file-dir],
7694
AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
7695
[Directory for installing schema files.]),
7696
[GCONF_SCHEMA_FILE_DIR="$withval"],)
7698
AC_SUBST(GCONF_SCHEMA_FILE_DIR)
7699
AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
7701
AC_ARG_ENABLE(schemas-install,
7702
[ --disable-schemas-install Disable the schemas installation],
7703
[case ${enableval} in
7705
*) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
7707
AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
7710
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
7711
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
7713
# This file is free software, distributed under the terms of the GNU
7714
# General Public License. As a special exception to the GNU General
7715
# Public License, this file may be distributed as part of a program
7716
# that contains a configuration script generated by Autoconf, under
7717
# the same distribution terms as the rest of that program.
7719
# This file can be copied and used freely without restrictions. It can
7720
# be used in projects which are not available under the GNU Public License
7721
# but which still want to provide support for the GNU gettext functionality.
7723
# Macro to add for using GNU gettext.
7724
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
7726
# Modified to never use included libintl.
7727
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
7729
# Major rework to remove unused code
7730
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
7732
# Added better handling of ALL_LINGUAS from GNU gettext version
7733
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
7735
# Modified to require ngettext
7736
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
7738
# We need this here as well, since someone might use autoconf-2.5x
7739
# to configure GLib then an older version to configure a package
7740
# using AM_GLIB_GNU_GETTEXT
7744
dnl We go to great lengths to make sure that aclocal won't
7745
dnl try to pull in the installed version of these macros
7746
dnl when running aclocal in the glib directory.
7748
m4_copy([AC_DEFUN],[glib_DEFUN])
7749
m4_copy([AC_REQUIRE],[glib_REQUIRE])
7751
dnl At the end, if we're not within glib, we'll define the public
7752
dnl definitions in terms of our private definitions.
7756
#--------------------
7757
glib_DEFUN([GLIB_LC_MESSAGES],
7758
[AC_CHECK_HEADERS([locale.h])
7759
if test $ac_cv_header_locale_h = yes; then
7760
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
7761
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
7762
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
7763
if test $am_cv_val_LC_MESSAGES = yes; then
7764
AC_DEFINE(HAVE_LC_MESSAGES, 1,
7765
[Define if your <locale.h> file defines LC_MESSAGES.])
7769
# GLIB_PATH_PROG_WITH_TEST
7770
#----------------------------
7771
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
7772
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
7773
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
7774
[# Extract the first word of "$2", so it can be a program name with args.
7775
set dummy $2; ac_word=[$]2
7776
AC_MSG_CHECKING([for $ac_word])
7777
AC_CACHE_VAL(ac_cv_path_$1,
7780
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
7783
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7784
for ac_dir in ifelse([$5], , $PATH, [$5]); do
7785
test -z "$ac_dir" && ac_dir=.
7786
if test -f $ac_dir/$ac_word; then
7788
ac_cv_path_$1="$ac_dir/$ac_word"
7794
dnl If no 4th arg is given, leave the cache variable unset,
7795
dnl so AC_PATH_PROGS will keep looking.
7796
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
7801
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
7802
AC_MSG_RESULT([$]$1)
7811
glib_DEFUN([GLIB_WITH_NLS],
7812
dnl NLS is obligatory
7816
gt_cv_have_gettext=no
7822
AC_CHECK_HEADER(libintl.h,
7823
[gt_cv_func_dgettext_libintl="no"
7824
libintl_extra_libs=""
7827
# First check in libc
7829
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
7831
#include <libintl.h>
7833
[return !ngettext ("","", 1)],
7834
gt_cv_func_ngettext_libc=yes,
7835
gt_cv_func_ngettext_libc=no)
7838
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7839
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
7841
#include <libintl.h>
7843
[return !dgettext ("","")],
7844
gt_cv_func_dgettext_libc=yes,
7845
gt_cv_func_dgettext_libc=no)
7849
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7850
AC_CHECK_FUNCS(bind_textdomain_codeset)
7854
# If we don't have everything we want, check in libintl
7856
if test "$gt_cv_func_dgettext_libc" != "yes" \
7857
|| test "$gt_cv_func_ngettext_libc" != "yes" \
7858
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7860
AC_CHECK_LIB(intl, bindtextdomain,
7861
[AC_CHECK_LIB(intl, ngettext,
7862
[AC_CHECK_LIB(intl, dgettext,
7863
gt_cv_func_dgettext_libintl=yes)])])
7865
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7866
AC_MSG_CHECKING([if -liconv is needed to use gettext])
7868
AC_CHECK_LIB(intl, ngettext,
7869
[AC_CHECK_LIB(intl, dcgettext,
7870
[gt_cv_func_dgettext_libintl=yes
7871
libintl_extra_libs=-liconv],
7877
# If we found libintl, then check in it for bind_textdomain_codeset();
7878
# we'll prefer libc if neither have bind_textdomain_codeset(),
7879
# and both have dgettext and ngettext
7881
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7882
glib_save_LIBS="$LIBS"
7883
LIBS="$LIBS -lintl $libintl_extra_libs"
7884
unset ac_cv_func_bind_textdomain_codeset
7885
AC_CHECK_FUNCS(bind_textdomain_codeset)
7886
LIBS="$glib_save_LIBS"
7888
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7889
gt_cv_func_dgettext_libc=no
7891
if test "$gt_cv_func_dgettext_libc" = "yes" \
7892
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
7893
gt_cv_func_dgettext_libintl=no
7899
if test "$gt_cv_func_dgettext_libc" = "yes" \
7900
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
7901
gt_cv_have_gettext=yes
7904
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7905
INTLLIBS="-lintl $libintl_extra_libs"
7908
if test "$gt_cv_have_gettext" = "yes"; then
7909
AC_DEFINE(HAVE_GETTEXT,1,
7910
[Define if the GNU gettext() function is already present or preinstalled.])
7911
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
7912
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
7913
if test "$MSGFMT" != "no"; then
7914
glib_save_LIBS="$LIBS"
7915
LIBS="$LIBS $INTLLIBS"
7916
AC_CHECK_FUNCS(dcgettext)
7918
AC_MSG_CHECKING([if msgfmt accepts -c])
7919
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
7922
"Content-Type: text/plain; charset=UTF-8\n"
7923
"Project-Id-Version: test 1.0\n"
7924
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
7925
"Last-Translator: test <foo@bar.xx>\n"
7926
"Language-Team: C <LL@li.org>\n"
7927
"MIME-Version: 1.0\n"
7928
"Content-Transfer-Encoding: 8bit\n"
7929
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
7930
AC_SUBST(MSGFMT_OPTS)
7931
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7932
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
7933
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
7934
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
7935
return _nl_msg_cat_cntr],
7940
dnl On Solaris, if bind_textdomain_codeset is in libc,
7941
dnl GNU format message catalog is always supported,
7942
dnl since both are added to the libc all together.
7943
dnl Hence, we'd like to go with DATADIRNAME=share and
7944
dnl and CATOBJEXT=.gmo in this case.
7945
AC_CHECK_FUNC(bind_textdomain_codeset,
7956
LIBS="$glib_save_LIBS"
7959
gt_cv_have_gettext=no
7964
if test "$gt_cv_have_gettext" = "yes" ; then
7965
AC_DEFINE(ENABLE_NLS, 1,
7966
[always defined to indicate that i18n is enabled])
7969
dnl Test whether we really found GNU xgettext.
7970
if test "$XGETTEXT" != ":"; then
7971
dnl If it is not GNU xgettext we define it as : so that the
7972
dnl Makefiles still can work.
7973
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7977
[found xgettext program is not GNU xgettext; ignore it])
7982
# We need to process the po/ directory.
7986
[case "$CONFIG_FILES" in *po/Makefile.in*)
7987
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7990
dnl These rules are solely for the distribution goal. While doing this
7991
dnl we only have to keep exactly one list of the available catalogs
7992
dnl in configure.in.
7993
for lang in $ALL_LINGUAS; do
7994
GMOFILES="$GMOFILES $lang.gmo"
7995
POFILES="$POFILES $lang.po"
7998
dnl Make all variables we use known to autoconf.
8001
AC_SUBST(DATADIRNAME)
8003
AC_SUBST(INSTOBJEXT)
8005
AC_SUBST(PO_IN_DATADIR_TRUE)
8006
AC_SUBST(PO_IN_DATADIR_FALSE)
8011
# AM_GLIB_GNU_GETTEXT
8012
# -------------------
8013
# Do checks necessary for use of gettext. If a suitable implementation
8014
# of gettext is found in either in libintl or in the C library,
8015
# it will set INTLLIBS to the libraries needed for use of gettext
8016
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
8017
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
8018
# on various variables needed by the Makefile.in.in installed by
8021
glib_DEFUN([GLIB_GNU_GETTEXT],
8022
[AC_REQUIRE([AC_PROG_CC])dnl
8023
AC_REQUIRE([AC_HEADER_STDC])dnl
8028
if test "$gt_cv_have_gettext" = "yes"; then
8029
if test "x$ALL_LINGUAS" = "x"; then
8032
AC_MSG_CHECKING(for catalogs to be installed)
8034
for presentlang in $ALL_LINGUAS; do
8036
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
8037
desiredlanguages="$LINGUAS"
8039
desiredlanguages="$ALL_LINGUAS"
8041
for desiredlang in $desiredlanguages; do
8042
# Use the presentlang catalog if desiredlang is
8043
# a. equal to presentlang, or
8044
# b. a variant of presentlang (because in this case,
8045
# presentlang can be used as a fallback for messages
8046
# which are not translated in the desiredlang catalog).
8047
case "$desiredlang" in
8048
"$presentlang"*) useit=yes;;
8051
if test $useit = yes; then
8052
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
8055
LINGUAS=$NEW_LINGUAS
8056
AC_MSG_RESULT($LINGUAS)
8059
dnl Construct list of names of catalog files to be constructed.
8060
if test -n "$LINGUAS"; then
8061
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8065
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
8066
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
8067
dnl Try to locate is.
8069
if test -n "$ac_aux_dir"; then
8070
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8072
if test -z "$MKINSTALLDIRS"; then
8073
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8075
AC_SUBST(MKINSTALLDIRS)
8077
dnl Generate list of files to be processed by xgettext which will
8078
dnl be included in po/Makefile.
8079
test -d po || mkdir po
8080
if test "x$srcdir" != "x."; then
8081
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8082
posrcprefix="$srcdir/"
8084
posrcprefix="../$srcdir/"
8090
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8091
< $srcdir/po/POTFILES.in > po/POTFILES
8094
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
8095
# -------------------------------
8096
# Define VARIABLE to the location where catalog files will
8097
# be installed by po/Makefile.
8098
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
8099
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
8100
glib_save_prefix="$prefix"
8101
glib_save_exec_prefix="$exec_prefix"
8102
glib_save_datarootdir="$datarootdir"
8103
test "x$prefix" = xNONE && prefix=$ac_default_prefix
8104
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
8105
datarootdir=`eval echo "${datarootdir}"`
8106
if test "x$CATOBJEXT" = "x.mo" ; then
8107
localedir=`eval echo "${libdir}/locale"`
8109
localedir=`eval echo "${datadir}/locale"`
8111
prefix="$glib_save_prefix"
8112
exec_prefix="$glib_save_exec_prefix"
8113
datarootdir="$glib_save_datarootdir"
8114
AC_DEFINE_UNQUOTED($1, "$localedir",
8115
[Define the location where the catalogs will be installed])
8119
dnl Now the definitions that aclocal will find
8121
ifdef(glib_configure_in,[],[
8122
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
8123
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
8126
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
8128
# Create a temporary file with TEST-FILE as its contents and pass the
8129
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
8130
# 0 and perform ACTION-IF-FAIL for any other exit status.
8131
AC_DEFUN([GLIB_RUN_PROG],
8132
[cat >conftest.foo <<_ACEOF
8135
if AC_RUN_LOG([$1 conftest.foo]); then
8136
m4_ifval([$3], [$3], [:])
8137
m4_ifvaln([$4], [else $4])dnl
8138
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
8139
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
8146
dnl GNOME_COMMON_INIT
8148
AC_DEFUN([GNOME_COMMON_INIT],
8150
dnl this macro should come after AC_CONFIG_MACRO_DIR
8151
AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
8153
dnl ensure that when the Automake generated makefile calls aclocal,
8154
dnl it honours the $ACLOCAL_FLAGS environment variable
8155
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
8156
if test -n "$ac_macro_dir"; then
8157
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
8160
AC_SUBST([ACLOCAL_AMFLAGS])
8163
AC_DEFUN([GNOME_DEBUG_CHECK],
8165
AC_ARG_ENABLE([debug],
8166
AC_HELP_STRING([--enable-debug],
8167
[turn on debugging]),,
8170
if test x$enable_debug = xyes ; then
8171
AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
8172
[Enable additional debugging at the expense of performance and size])
8176
dnl GNOME_MAINTAINER_MODE_DEFINES ()
8177
dnl define DISABLE_DEPRECATED
8179
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
8181
AC_REQUIRE([AM_MAINTAINER_MODE])
8183
if test $USE_MAINTAINER_MODE = yes; then
8184
DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_DEPRECATED"
8186
DISABLE_DEPRECATED=""
8188
AC_SUBST(DISABLE_DEPRECATED)
8191
dnl GNOME_COMPILE_WARNINGS
8192
dnl Turn on many useful compiler warnings
8193
dnl For now, only works on GCC
8194
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
8195
dnl ******************************
8196
dnl More compiler warnings
8197
dnl ******************************
8199
AC_ARG_ENABLE(compile-warnings,
8200
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
8201
[Turn on compiler warnings]),,
8202
[enable_compile_warnings="m4_default([$1],[yes])"])
8205
if test "x$GCC" != xyes; then
8206
enable_compile_warnings=no
8210
realsave_CFLAGS="$CFLAGS"
8212
case "$enable_compile_warnings" in
8217
warning_flags="-Wall"
8220
warning_flags="-Wall -Wmissing-prototypes"
8223
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
8224
CFLAGS="$warning_flags $CFLAGS"
8225
for option in -Wno-sign-compare; do
8226
SAVE_CFLAGS="$CFLAGS"
8227
CFLAGS="$CFLAGS $option"
8228
AC_MSG_CHECKING([whether gcc understands $option])
8229
AC_TRY_COMPILE([], [],
8232
CFLAGS="$SAVE_CFLAGS"
8233
AC_MSG_RESULT($has_option)
8234
if test $has_option = yes; then
8235
warning_flags="$warning_flags $option"
8241
if test "$enable_compile_warnings" = "error" ; then
8242
warning_flags="$warning_flags -Werror"
8246
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
8249
CFLAGS="$realsave_CFLAGS"
8250
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
8251
AC_MSG_RESULT($warning_flags)
8253
AC_ARG_ENABLE(iso-c,
8254
AC_HELP_STRING([--enable-iso-c],
8255
[Try to warn if code is not ISO C ]),,
8258
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
8260
if test "x$enable_iso_c" != "xno"; then
8261
if test "x$GCC" = "xyes"; then
8263
*[\ \ ]-ansi[\ \ ]*) ;;
8264
*) complCFLAGS="$complCFLAGS -ansi" ;;
8267
*[\ \ ]-pedantic[\ \ ]*) ;;
8268
*) complCFLAGS="$complCFLAGS -pedantic" ;;
8272
AC_MSG_RESULT($complCFLAGS)
8274
WARN_CFLAGS="$warning_flags $complCFLAGS"
8275
AC_SUBST(WARN_CFLAGS)
8278
dnl For C++, do basically the same thing.
8280
AC_DEFUN([GNOME_CXX_WARNINGS],[
8281
AC_ARG_ENABLE(cxx-warnings,
8282
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
8283
[Turn on compiler warnings.]),,
8284
[enable_cxx_warnings="m4_default([$1],[minimum])"])
8286
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
8288
if test "x$GXX" != xyes; then
8289
enable_cxx_warnings=no
8291
if test "x$enable_cxx_warnings" != "xno"; then
8292
if test "x$GXX" = "xyes"; then
8293
case " $CXXFLAGS " in
8294
*[\ \ ]-Wall[\ \ ]*) ;;
8295
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
8298
## -W is not all that useful. And it cannot be controlled
8299
## with individual -Wno-xxx flags, unlike -Wall
8300
if test "x$enable_cxx_warnings" = "xyes"; then
8301
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
8305
AC_MSG_RESULT($warnCXXFLAGS)
8307
AC_ARG_ENABLE(iso-cxx,
8308
AC_HELP_STRING([--enable-iso-cxx],
8309
[Try to warn if code is not ISO C++ ]),,
8310
[enable_iso_cxx=no])
8312
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
8314
if test "x$enable_iso_cxx" != "xno"; then
8315
if test "x$GXX" = "xyes"; then
8316
case " $CXXFLAGS " in
8317
*[\ \ ]-ansi[\ \ ]*) ;;
8318
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
8321
case " $CXXFLAGS " in
8322
*[\ \ ]-pedantic[\ \ ]*) ;;
8323
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
8327
AC_MSG_RESULT($complCXXFLAGS)
8329
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
8330
AC_SUBST(WARN_CXXFLAGS)
8333
dnl -*- mode: autoconf -*-
8338
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
8339
AC_DEFUN([GTK_DOC_CHECK],
8341
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
8342
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
8343
dnl for overriding the documentation installation directory
8344
AC_ARG_WITH([html-dir],
8345
AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
8346
[with_html_dir='${datadir}/gtk-doc/html'])
8347
HTML_DIR="$with_html_dir"
8348
AC_SUBST([HTML_DIR])
8350
dnl enable/disable documentation building
8351
AC_ARG_ENABLE([gtk-doc],
8352
AS_HELP_STRING([--enable-gtk-doc],
8353
[use gtk-doc to build documentation [[default=no]]]),,
8354
[enable_gtk_doc=no])
8356
if test x$enable_gtk_doc = xyes; then
8358
[PKG_CHECK_EXISTS([gtk-doc],,
8359
AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
8360
[PKG_CHECK_EXISTS([gtk-doc >= $1],,
8361
AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))])
8364
AC_MSG_CHECKING([whether to build gtk-doc documentation])
8365
AC_MSG_RESULT($enable_gtk_doc)
8367
AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,)
8369
AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
8370
AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
8374
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
8375
# serial 40 IT_PROG_INTLTOOL
8376
AC_DEFUN([IT_PROG_INTLTOOL], [
8377
AC_PREREQ([2.50])dnl
8378
AC_REQUIRE([AM_NLS])dnl
8380
case "$am__api_version" in
8382
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
8388
if test -n "$1"; then
8389
AC_MSG_CHECKING([for intltool >= $1])
8391
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
8392
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
8393
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
8395
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
8396
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
8397
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
8400
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
8401
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
8402
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
8403
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
8404
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
8407
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8408
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8409
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8410
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8411
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
8412
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8413
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8414
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8415
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8416
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8417
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8418
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
8419
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8420
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8421
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8422
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8423
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8424
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8425
INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8427
AC_SUBST(INTLTOOL_DESKTOP_RULE)
8428
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
8429
AC_SUBST(INTLTOOL_KEYS_RULE)
8430
AC_SUBST(INTLTOOL_PROP_RULE)
8431
AC_SUBST(INTLTOOL_OAF_RULE)
8432
AC_SUBST(INTLTOOL_PONG_RULE)
8433
AC_SUBST(INTLTOOL_SERVER_RULE)
8434
AC_SUBST(INTLTOOL_SHEET_RULE)
8435
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
8436
AC_SUBST(INTLTOOL_UI_RULE)
8437
AC_SUBST(INTLTOOL_XAM_RULE)
8438
AC_SUBST(INTLTOOL_KBD_RULE)
8439
AC_SUBST(INTLTOOL_XML_RULE)
8440
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
8441
AC_SUBST(INTLTOOL_CAVES_RULE)
8442
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
8443
AC_SUBST(INTLTOOL_THEME_RULE)
8444
AC_SUBST(INTLTOOL_SERVICE_RULE)
8445
AC_SUBST(INTLTOOL_POLICY_RULE)
8447
# Check the gettext tools to make sure they are GNU
8448
AC_PATH_PROG(XGETTEXT, xgettext)
8449
AC_PATH_PROG(MSGMERGE, msgmerge)
8450
AC_PATH_PROG(MSGFMT, msgfmt)
8451
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
8452
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
8453
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
8455
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
8456
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
8457
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
8458
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
8459
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
8462
AC_PATH_PROG(INTLTOOL_PERL, [perl])
8463
if test -z "$INTLTOOL_PERL"; then
8464
AC_MSG_ERROR([perl not found; required for intltool])
8466
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
8467
AC_MSG_ERROR([perl 5.x required for intltool])
8469
if test "x$2" != "xno-xml"; then
8470
AC_MSG_CHECKING([for XML::Parser])
8471
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
8474
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
8478
# Substitute ALL_LINGUAS so we can use it in po/Makefile
8479
AC_SUBST(ALL_LINGUAS)
8481
# Set DATADIRNAME correctly if it is not set yet
8482
# (copied from glib-gettext.m4)
8483
if test -z "$DATADIRNAME"; then
8485
[AC_LANG_PROGRAM([[]],
8486
[[extern int _nl_msg_cat_cntr;
8487
return _nl_msg_cat_cntr]])],
8488
[DATADIRNAME=share],
8491
dnl On Solaris, if bind_textdomain_codeset is in libc,
8492
dnl GNU format message catalog is always supported,
8493
dnl since both are added to the libc all together.
8494
dnl Hence, we'd like to go with DATADIRNAME=share
8496
AC_CHECK_FUNC(bind_textdomain_codeset,
8497
[DATADIRNAME=share], [DATADIRNAME=lib])
8504
AC_SUBST(DATADIRNAME)
8511
# IT_PO_SUBDIR(DIRNAME)
8512
# ---------------------
8513
# All po subdirs have to be declared with this macro; the subdir "po" is
8514
# declared by IT_PROG_INTLTOOL.
8516
AC_DEFUN([IT_PO_SUBDIR],
8517
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
8519
dnl The following CONFIG_COMMANDS should be exetuted at the very end
8520
dnl of config.status.
8521
AC_CONFIG_COMMANDS_PRE([
8522
AC_CONFIG_COMMANDS([$1/stamp-it], [
8523
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
8528
'"s|^| $ac_top_srcdir/|" \
8529
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
8531
[sed '/^POTFILES =/,/[^\\]$/ {
8535
' "$1/Makefile.in" >"$1/Makefile"]
8536
rm -f "$1/Makefile.tmp"
8537
mv "$1/stamp-it.tmp" "$1/stamp-it"
8543
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
8544
# A hint is needed for aclocal from Automake <= 1.9.4:
8545
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
8548
8638
m4_include([acinclude.m4])