14
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
15
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17
[m4_warning([this file was generated for autoconf 2.63.
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.66],,
17
[m4_warning([this file was generated for autoconf 2.66.
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'.])])
23
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
24
dnl (i.e. pass to gconftool-2
25
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
26
dnl you should install foo.schemas files
29
AC_DEFUN([AM_GCONF_SOURCE_2],
22
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 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.11'
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.11.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 AM_INIT_AUTOMAKE.
52
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53
[AM_AUTOMAKE_VERSION([1.11.1])dnl
54
m4_ifndef([AC_AUTOCONF_VERSION],
55
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56
_AM_AUTOCONF_VERSION(m4_defn([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, 2008
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
133
m4_define([_AM_COND_VALUE_$1], [$2])dnl
141
AC_CONFIG_COMMANDS_PRE(
142
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
143
AC_MSG_ERROR([[conditional "$1" was never defined.
144
Usually this means the macro was only invoked conditionally.]])
147
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148
# Free Software Foundation, Inc.
150
# This file is free software; the Free Software Foundation
151
# gives unlimited permission to copy and/or distribute it,
152
# with or without modifications, as long as this notice is preserved.
156
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
157
# written in clear, in which case automake, when reading aclocal.m4,
158
# will think it sees a *use*, and therefore will trigger all it's
159
# C support machinery. Also note that it means that autoscan, seeing
160
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
163
# _AM_DEPENDENCIES(NAME)
164
# ----------------------
165
# See how the compiler implements dependency checking.
166
# NAME is "CC", "CXX", "GCJ", or "OBJC".
167
# We try a few techniques and use that to set a single cache variable.
169
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
170
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
171
# dependency, and given that the user is not expected to run this macro,
172
# just rely on AC_PROG_CC.
173
AC_DEFUN([_AM_DEPENDENCIES],
174
[AC_REQUIRE([AM_SET_DEPDIR])dnl
175
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
176
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
177
AC_REQUIRE([AM_DEP_TRACK])dnl
179
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
180
[$1], CXX, [depcc="$CXX" am_compiler_list=],
181
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182
[$1], UPC, [depcc="$UPC" am_compiler_list=],
183
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
184
[depcc="$$1" am_compiler_list=])
186
AC_CACHE_CHECK([dependency style of $depcc],
187
[am_cv_$1_dependencies_compiler_type],
188
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
189
# We make a subdir and do the tests there. Otherwise we can end up
190
# making bogus files that we don't know about and never remove. For
191
# instance it was reported that on HP-UX the gcc test will end up
192
# making a dummy file named `D' -- because `-MD' means `put the output
195
# Copy depcomp to subdir because otherwise we won't find it if we're
196
# using a relative directory.
197
cp "$am_depcomp" conftest.dir
199
# We will build objects and dependencies in a subdirectory because
200
# it helps to detect inapplicable dependency modes. For instance
201
# both Tru64's cc and ICC support -MD to output dependencies as a
202
# side effect of compilation, but ICC will put the dependencies in
203
# the current directory while Tru64 will put them in the object
207
am_cv_$1_dependencies_compiler_type=none
208
if test "$am_compiler_list" = ""; then
209
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
213
[case " $depcc " in #(
214
*\ -arch\ *\ -arch\ *) am__universal=true ;;
217
[case " $depcc " in #(
218
*\ -arch\ *\ -arch\ *) am__universal=true ;;
221
for depmode in $am_compiler_list; do
222
# Setup a source with many dependencies, because some compilers
223
# like to wrap large dependency lists on column 80 (with \), and
224
# we should not choose a depcomp mode which is confused by this.
226
# We need to recreate these files for each test, as the compiler may
227
# overwrite some of them when testing with obscure command lines.
228
# This happens at least with the AIX C compiler.
230
for i in 1 2 3 4 5 6; do
231
echo '#include "conftst'$i'.h"' >> sub/conftest.c
232
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
233
# Solaris 8's {/usr,}/bin/sh.
234
touch sub/conftst$i.h
236
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
238
# We check with `-c' and `-o' for the sake of the "dashmstdout"
239
# mode. It turns out that the SunPro C++ compiler does not properly
240
# handle `-M -o', and we need to detect this. Also, some Intel
241
# versions had trouble with output in subdirs
242
am__obj=sub/conftest.${OBJEXT-o}
243
am__minus_obj="-o $am__obj"
246
# This depmode causes a compiler race in universal mode.
247
test "$am__universal" = false || continue
250
# after this tag, mechanisms are not by side-effect, so they'll
251
# only be used when explicitly requested
252
if test "x$enable_dependency_tracking" = xyes; then
258
msvisualcpp | msvcmsys)
259
# This compiler won't grok `-c -o', but also, the minuso test has
260
# not run yet. These depmodes are late enough in the game, and
261
# so weak that their functioning should not be impacted.
262
am__obj=conftest.${OBJEXT-o}
267
if depmode=$depmode \
268
source=sub/conftest.c object=$am__obj \
269
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
270
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
271
>/dev/null 2>conftest.err &&
272
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
273
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
274
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
275
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
276
# icc doesn't choke on unknown options, it will just issue warnings
277
# or remarks (even with -Werror). So we grep stderr for any message
278
# that says an option was ignored or not supported.
279
# When given -MP, icc 7.0 and 7.1 complain thusly:
280
# icc: Command line warning: ignoring option '-M'; no argument required
281
# The diagnosis changed in icc 8.0:
282
# icc: Command line remark: option '-MP' not supported
283
if (grep 'ignoring option' conftest.err ||
284
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
285
am_cv_$1_dependencies_compiler_type=$depmode
294
am_cv_$1_dependencies_compiler_type=none
297
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
298
AM_CONDITIONAL([am__fastdep$1], [
299
test "x$enable_dependency_tracking" != xno \
300
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
306
# Choose a directory name for dependency files.
307
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
308
AC_DEFUN([AM_SET_DEPDIR],
309
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
310
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
316
AC_DEFUN([AM_DEP_TRACK],
317
[AC_ARG_ENABLE(dependency-tracking,
318
[ --disable-dependency-tracking speeds up one-time build
319
--enable-dependency-tracking do not reject slow dependency extractors])
320
if test "x$enable_dependency_tracking" != xno; then
321
am_depcomp="$ac_aux_dir/depcomp"
324
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325
AC_SUBST([AMDEPBACKSLASH])dnl
326
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
329
# Generate code to set up dependency tracking. -*- Autoconf -*-
331
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332
# Free Software Foundation, Inc.
334
# This file is free software; the Free Software Foundation
335
# gives unlimited permission to copy and/or distribute it,
336
# with or without modifications, as long as this notice is preserved.
340
# _AM_OUTPUT_DEPENDENCY_COMMANDS
341
# ------------------------------
342
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
344
# Autoconf 2.62 quotes --file arguments for eval, but not when files
345
# are listed without --file. Let's play safe and only enable the eval
346
# if we detect the quoting.
347
case $CONFIG_FILES in
348
*\'*) eval set x "$CONFIG_FILES" ;;
349
*) set x $CONFIG_FILES ;;
354
# Strip MF so we end up with the name of the file.
355
mf=`echo "$mf" | sed -e 's/:.*$//'`
356
# Check whether this is an Automake generated Makefile or not.
357
# We used to match only the files named `Makefile.in', but
358
# some people rename them; so instead we look at the file content.
359
# Grep'ing the first line is not enough: some people post-process
360
# each Makefile.in and add a new line on top of each file to say so.
361
# Grep'ing the whole file is not good either: AIX grep has a line
362
# limit of 2048, but all sed's we know have understand at least 4000.
363
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
364
dirpart=`AS_DIRNAME("$mf")`
368
# Extract the definition of DEPDIR, am__include, and am__quote
369
# from the Makefile without running `make'.
370
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
371
test -z "$DEPDIR" && continue
372
am__include=`sed -n 's/^am__include = //p' < "$mf"`
373
test -z "am__include" && continue
374
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
375
# When using ansi2knr, U may be empty or an underscore; expand it
376
U=`sed -n 's/^U = //p' < "$mf"`
377
# Find all dependency output files, they are included files with
378
# $(DEPDIR) in their names. We invoke sed twice because it is the
379
# simplest approach to changing $(DEPDIR) to its actual value in the
381
for file in `sed -n "
382
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
383
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
384
# Make sure the directory exists.
385
test -f "$dirpart/$file" && continue
386
fdir=`AS_DIRNAME(["$file"])`
387
AS_MKDIR_P([$dirpart/$fdir])
388
# echo "creating $dirpart/$file"
389
echo '# dummy' > "$dirpart/$file"
393
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
396
# AM_OUTPUT_DEPENDENCY_COMMANDS
397
# -----------------------------
398
# This macro should only be invoked once -- use via AC_REQUIRE.
400
# This code is only required when automatic dependency tracking
401
# is enabled. FIXME. This creates each `.P' file that we will
402
# need in order to bootstrap the dependency handling code.
403
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404
[AC_CONFIG_COMMANDS([depfiles],
405
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
406
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
409
# Do all the work for Automake. -*- Autoconf -*-
411
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
412
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
414
# This file is free software; the Free Software Foundation
415
# gives unlimited permission to copy and/or distribute it,
416
# with or without modifications, as long as this notice is preserved.
420
# This macro actually does too much. Some checks are only needed if
421
# your package does certain things. But this isn't really a big deal.
423
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
424
# AM_INIT_AUTOMAKE([OPTIONS])
425
# -----------------------------------------------
426
# The call with PACKAGE and VERSION arguments is the old style
427
# call (pre autoconf-2.50), which is being phased out. PACKAGE
428
# and VERSION should now be passed to AC_INIT and removed from
429
# the call to AM_INIT_AUTOMAKE.
430
# We support both call styles for the transition. After
431
# the next Automake release, Autoconf can make the AC_INIT
432
# arguments mandatory, and then we can depend on a new Autoconf
433
# release and drop the old call support.
434
AC_DEFUN([AM_INIT_AUTOMAKE],
435
[AC_PREREQ([2.62])dnl
436
dnl Autoconf wants to disallow AM_ names. We explicitly allow
437
dnl the ones we care about.
438
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
439
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
440
AC_REQUIRE([AC_PROG_INSTALL])dnl
441
if test "`cd $srcdir && pwd`" != "`pwd`"; then
442
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
443
# is not polluted with repeated "-I."
444
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
445
# test to see if srcdir already configured
446
if test -f $srcdir/config.status; then
447
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
451
# test whether we have cygpath
452
if test -z "$CYGPATH_W"; then
453
if (cygpath --version) >/dev/null 2>/dev/null; then
454
CYGPATH_W='cygpath -w'
459
AC_SUBST([CYGPATH_W])
461
# Define the identity of the package.
462
dnl Distinguish between old-style and new-style calls.
464
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
465
AC_SUBST([PACKAGE], [$1])dnl
466
AC_SUBST([VERSION], [$2])],
467
[_AM_SET_OPTIONS([$1])dnl
468
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
469
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
470
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
471
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
472
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
474
_AM_IF_OPTION([no-define],,
475
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
476
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
478
# Some tools Automake needs.
479
AC_REQUIRE([AM_SANITY_CHECK])dnl
480
AC_REQUIRE([AC_ARG_PROGRAM])dnl
481
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
482
AM_MISSING_PROG(AUTOCONF, autoconf)
483
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
484
AM_MISSING_PROG(AUTOHEADER, autoheader)
485
AM_MISSING_PROG(MAKEINFO, makeinfo)
486
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
487
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
488
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
489
# We need awk for the "check" target. The system "awk" is bad on
491
AC_REQUIRE([AC_PROG_AWK])dnl
492
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
493
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
494
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
495
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
496
[_AM_PROG_TAR([v7])])])
497
_AM_IF_OPTION([no-dependencies],,
498
[AC_PROVIDE_IFELSE([AC_PROG_CC],
499
[_AM_DEPENDENCIES(CC)],
500
[define([AC_PROG_CC],
501
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
502
AC_PROVIDE_IFELSE([AC_PROG_CXX],
503
[_AM_DEPENDENCIES(CXX)],
504
[define([AC_PROG_CXX],
505
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
506
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
507
[_AM_DEPENDENCIES(OBJC)],
508
[define([AC_PROG_OBJC],
509
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
511
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
512
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
513
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
514
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
515
AC_CONFIG_COMMANDS_PRE(dnl
516
[m4_provide_if([_AM_COMPILER_EXEEXT],
517
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
520
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
521
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
522
dnl mangled by Autoconf and run in a shell conditional statement.
523
m4_define([_AC_COMPILER_EXEEXT],
524
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
527
# When config.status generates a header, we must update the stamp-h file.
528
# This file resides in the same directory as the config header
529
# that is generated. The stamp files are numbered to have different names.
531
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
532
# loop where config.status creates the headers, so we can generate
533
# our stamp files there.
534
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
535
[# Compute $1's index in $config_headers.
538
for _am_header in $config_headers :; do
540
$_am_arg | $_am_arg:* )
543
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
546
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
548
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
550
# This file is free software; the Free Software Foundation
551
# gives unlimited permission to copy and/or distribute it,
552
# with or without modifications, as long as this notice is preserved.
556
# Define $install_sh.
557
AC_DEFUN([AM_PROG_INSTALL_SH],
558
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
559
if test x"${install_sh}" != xset; then
562
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
564
install_sh="\${SHELL} $am_aux_dir/install-sh"
567
AC_SUBST(install_sh)])
569
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
571
# This file is free software; the Free Software Foundation
572
# gives unlimited permission to copy and/or distribute it,
573
# with or without modifications, as long as this notice is preserved.
577
# Check whether the underlying file-system supports filenames
578
# with a leading dot. For instance MS-DOS doesn't.
579
AC_DEFUN([AM_SET_LEADING_DOT],
580
[rm -rf .tst 2>/dev/null
581
mkdir .tst 2>/dev/null
582
if test -d .tst; then
587
rmdir .tst 2>/dev/null
588
AC_SUBST([am__leading_dot])])
590
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
593
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
594
# Free Software Foundation, Inc.
596
# This file is free software; the Free Software Foundation
597
# gives unlimited permission to copy and/or distribute it,
598
# with or without modifications, as long as this notice is preserved.
602
# AM_MAINTAINER_MODE([DEFAULT-MODE])
603
# ----------------------------------
604
# Control maintainer-specific portions of Makefiles.
605
# Default is to disable them, unless `enable' is passed literally.
606
# For symmetry, `disable' may be passed as well. Anyway, the user
607
# can override the default with the --enable/--disable switch.
608
AC_DEFUN([AM_MAINTAINER_MODE],
609
[m4_case(m4_default([$1], [disable]),
610
[enable], [m4_define([am_maintainer_other], [disable])],
611
[disable], [m4_define([am_maintainer_other], [enable])],
612
[m4_define([am_maintainer_other], [enable])
613
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
614
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
615
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
616
AC_ARG_ENABLE([maintainer-mode],
617
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
618
(and sometimes confusing) to the casual installer],
619
[USE_MAINTAINER_MODE=$enableval],
620
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
621
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
622
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
623
MAINT=$MAINTAINER_MODE_TRUE
628
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
630
# Check to see how 'make' treats includes. -*- Autoconf -*-
632
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
634
# This file is free software; the Free Software Foundation
635
# gives unlimited permission to copy and/or distribute it,
636
# with or without modifications, as long as this notice is preserved.
642
# Check to see how make treats includes.
643
AC_DEFUN([AM_MAKE_INCLUDE],
644
[am_make=${MAKE-make}
645
cat > confinc << 'END'
647
@echo this is the am__doit target
650
# If we don't find an include directive, just comment out the code.
651
AC_MSG_CHECKING([for style of include used by $am_make])
655
# First try GNU make style include.
656
echo "include confinc" > confmf
657
# Ignore all kinds of additional output from `make'.
658
case `$am_make -s -f confmf 2> /dev/null` in #(
659
*the\ am__doit\ target*)
665
# Now try BSD make style include.
666
if test "$am__include" = "#"; then
667
echo '.include "confinc"' > confmf
668
case `$am_make -s -f confmf 2> /dev/null` in #(
669
*the\ am__doit\ target*)
676
AC_SUBST([am__include])
677
AC_SUBST([am__quote])
678
AC_MSG_RESULT([$_am_result])
682
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
684
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
685
# Free Software Foundation, Inc.
687
# This file is free software; the Free Software Foundation
688
# gives unlimited permission to copy and/or distribute it,
689
# with or without modifications, as long as this notice is preserved.
693
# AM_MISSING_PROG(NAME, PROGRAM)
694
# ------------------------------
695
AC_DEFUN([AM_MISSING_PROG],
696
[AC_REQUIRE([AM_MISSING_HAS_RUN])
697
$1=${$1-"${am_missing_run}$2"}
703
# Define MISSING if not defined so far and test if it supports --run.
704
# If it does, set am_missing_run to use it, otherwise, to nothing.
705
AC_DEFUN([AM_MISSING_HAS_RUN],
706
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
707
AC_REQUIRE_AUX_FILE([missing])dnl
708
if test x"${MISSING+set}" != xset; then
711
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
713
MISSING="\${SHELL} $am_aux_dir/missing" ;;
716
# Use eval to expand $SHELL
717
if eval "$MISSING --run true"; then
718
am_missing_run="$MISSING --run "
721
AC_MSG_WARN([`missing' script is too old or missing])
725
# Copyright (C) 2003, 2004, 2005, 2006 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.
733
# Check for `mkdir -p'.
734
AC_DEFUN([AM_PROG_MKDIR_P],
735
[AC_PREREQ([2.60])dnl
736
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
737
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
738
dnl while keeping a definition of mkdir_p for backward compatibility.
739
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
740
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
741
dnl Makefile.ins that do not define MKDIR_P, so we do our own
742
dnl adjustment using top_builddir (which is defined more often than
744
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
746
[[\\/$]]* | ?:[[\\/]]*) ;;
747
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
751
# Helper functions for option handling. -*- Autoconf -*-
753
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
755
# This file is free software; the Free Software Foundation
756
# gives unlimited permission to copy and/or distribute it,
757
# with or without modifications, as long as this notice is preserved.
761
# _AM_MANGLE_OPTION(NAME)
762
# -----------------------
763
AC_DEFUN([_AM_MANGLE_OPTION],
764
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
766
# _AM_SET_OPTION(NAME)
767
# ------------------------------
768
# Set option NAME. Presently that only means defining a flag for this option.
769
AC_DEFUN([_AM_SET_OPTION],
770
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
772
# _AM_SET_OPTIONS(OPTIONS)
773
# ----------------------------------
774
# OPTIONS is a space-separated list of Automake options.
775
AC_DEFUN([_AM_SET_OPTIONS],
776
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
778
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
779
# -------------------------------------------
780
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
781
AC_DEFUN([_AM_IF_OPTION],
782
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
784
# Check to make sure that the build environment is sane. -*- Autoconf -*-
786
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
787
# Free Software Foundation, Inc.
789
# This file is free software; the Free Software Foundation
790
# gives unlimited permission to copy and/or distribute it,
791
# with or without modifications, as long as this notice is preserved.
797
AC_DEFUN([AM_SANITY_CHECK],
798
[AC_MSG_CHECKING([whether build environment is sane])
801
echo timestamp > conftest.file
802
# Reject unsafe characters in $srcdir or the absolute working directory
803
# name. Accept space and tab only in the latter.
807
*[[\\\"\#\$\&\'\`$am_lf]]*)
808
AC_MSG_ERROR([unsafe absolute working directory name]);;
811
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
812
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
815
# Do `set' in a subshell so we don't clobber the current shell's
816
# arguments. Must try -L first in case configure is actually a
817
# symlink; some systems play weird games with the mod time of symlinks
818
# (eg FreeBSD returns the mod time of the symlink's containing
821
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
822
if test "$[*]" = "X"; then
824
set X `ls -t "$srcdir/configure" conftest.file`
827
if test "$[*]" != "X $srcdir/configure conftest.file" \
828
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
830
# If neither matched, then we have a broken ls. This can happen
831
# if, for instance, CONFIG_SHELL is bash and it inherits a
832
# broken ls alias from the environment. This has actually
833
# happened. Such a system could not be considered "sane".
834
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
835
alias in your environment])
838
test "$[2]" = conftest.file
844
AC_MSG_ERROR([newly created file is older than distributed files!
845
Check your system clock])
849
# Copyright (C) 2009 Free Software Foundation, Inc.
851
# This file is free software; the Free Software Foundation
852
# gives unlimited permission to copy and/or distribute it,
853
# with or without modifications, as long as this notice is preserved.
857
# AM_SILENT_RULES([DEFAULT])
858
# --------------------------
859
# Enable less verbose build rules; with the default set to DEFAULT
860
# (`yes' being less verbose, `no' or empty being verbose).
861
AC_DEFUN([AM_SILENT_RULES],
862
[AC_ARG_ENABLE([silent-rules],
863
[ --enable-silent-rules less verbose build output (undo: `make V=1')
864
--disable-silent-rules verbose build output (undo: `make V=0')])
865
case $enable_silent_rules in
866
yes) AM_DEFAULT_VERBOSITY=0;;
867
no) AM_DEFAULT_VERBOSITY=1;;
868
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
870
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
872
AC_SUBST([AM_BACKSLASH])dnl
873
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
876
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
878
# This file is free software; the Free Software Foundation
879
# gives unlimited permission to copy and/or distribute it,
880
# with or without modifications, as long as this notice is preserved.
882
# AM_PROG_INSTALL_STRIP
883
# ---------------------
884
# One issue with vendor `install' (even GNU) is that you can't
885
# specify the program used to strip binaries. This is especially
886
# annoying in cross-compiling environments, where the build's strip
887
# is unlikely to handle the host's binaries.
888
# Fortunately install-sh will honor a STRIPPROG variable, so we
889
# always use install-sh in `make install-strip', and initialize
890
# STRIPPROG with the value of the STRIP variable (set by the user).
891
AC_DEFUN([AM_PROG_INSTALL_STRIP],
892
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
893
# Installed binaries are usually stripped using `strip' when the user
894
# run `make install-strip'. However `strip' might not be the right
895
# tool to use in cross-compilation environments, therefore Automake
896
# will honor the `STRIP' environment variable to overrule this program.
897
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
898
if test "$cross_compiling" != no; then
899
AC_CHECK_TOOL([STRIP], [strip], :)
901
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
902
AC_SUBST([INSTALL_STRIP_PROGRAM])])
904
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
906
# This file is free software; the Free Software Foundation
907
# gives unlimited permission to copy and/or distribute it,
908
# with or without modifications, as long as this notice is preserved.
912
# _AM_SUBST_NOTMAKE(VARIABLE)
913
# ---------------------------
914
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
915
# This macro is traced by Automake.
916
AC_DEFUN([_AM_SUBST_NOTMAKE])
918
# AM_SUBST_NOTMAKE(VARIABLE)
919
# ---------------------------
920
# Public sister of _AM_SUBST_NOTMAKE.
921
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
923
# Check how to create a tarball. -*- Autoconf -*-
925
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
927
# This file is free software; the Free Software Foundation
928
# gives unlimited permission to copy and/or distribute it,
929
# with or without modifications, as long as this notice is preserved.
933
# _AM_PROG_TAR(FORMAT)
934
# --------------------
935
# Check how to create a tarball in format FORMAT.
936
# FORMAT should be one of `v7', `ustar', or `pax'.
938
# Substitute a variable $(am__tar) that is a command
939
# writing to stdout a FORMAT-tarball containing the directory
941
# tardir=directory && $(am__tar) > result.tar
943
# Substitute a variable $(am__untar) that extract such
944
# a tarball read from stdin.
945
# $(am__untar) < result.tar
946
AC_DEFUN([_AM_PROG_TAR],
947
[# Always define AMTAR for backward compatibility.
948
AM_MISSING_PROG([AMTAR], [tar])
950
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
951
[m4_case([$1], [ustar],, [pax],,
952
[m4_fatal([Unknown tar format])])
953
AC_MSG_CHECKING([how to create a $1 tar archive])
954
# Loop over all known methods to create a tar archive until one works.
955
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
956
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
957
# Do not fold the above two line into one, because Tru64 sh and
958
# Solaris sh will not grok spaces in the rhs of `-'.
959
for _am_tool in $_am_tools
963
for _am_tar in tar gnutar gtar;
965
AM_RUN_LOG([$_am_tar --version]) && break
967
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
968
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
969
am__untar="$_am_tar -xf -"
972
# Must skip GNU tar: if it does not support --format= it doesn't create
973
# ustar tarball either.
974
(tar --version) >/dev/null 2>&1 && continue
975
am__tar='tar chf - "$$tardir"'
976
am__tar_='tar chf - "$tardir"'
980
am__tar='pax -L -x $1 -w "$$tardir"'
981
am__tar_='pax -L -x $1 -w "$tardir"'
985
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
986
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
987
am__untar='cpio -i -H $1 -d'
996
# If the value was cached, stop now. We just wanted to have am__tar
998
test -n "${am_cv_prog_tar_$1}" && break
1000
# tar/untar a dummy directory, and stop if the command works
1003
echo GrepMe > conftest.dir/file
1004
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1006
if test -s conftest.tar; then
1007
AM_RUN_LOG([$am__untar <conftest.tar])
1008
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1013
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1014
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1016
AC_SUBST([am__untar])
1019
# gettext.m4 serial 63 (gettext-0.18)
1020
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
1021
dnl This file is free software; the Free Software Foundation
1022
dnl gives unlimited permission to copy and/or distribute it,
1023
dnl with or without modifications, as long as this notice is preserved.
1025
dnl This file can can be used in projects which are not available under
1026
dnl the GNU General Public License or the GNU Library General Public
1027
dnl License but which still want to provide support for the GNU gettext
1029
dnl Please note that the actual code of the GNU gettext library is covered
1030
dnl by the GNU Library General Public License, and the rest of the GNU
1031
dnl gettext package package is covered by the GNU General Public License.
1032
dnl They are *not* in the public domain.
1035
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1036
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
1038
dnl Macro to add for using GNU gettext.
1040
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
1041
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
1042
dnl default (if it is not specified or empty) is 'no-libtool'.
1043
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
1044
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
1045
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
1046
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
1047
dnl depending on --{enable,disable}-{shared,static} and on the presence of
1048
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
1049
dnl $(top_builddir)/intl/libintl.a will be created.
1050
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
1051
dnl implementations (in libc or libintl) without the ngettext() function
1052
dnl will be ignored. If NEEDSYMBOL is specified and is
1053
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
1054
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
1055
dnl INTLDIR is used to find the intl libraries. If empty,
1056
dnl the value `$(top_builddir)/intl/' is used.
1058
dnl The result of the configuration is one of three cases:
1059
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
1061
dnl Catalog format: GNU --> install in $(datadir)
1062
dnl Catalog extension: .mo after installation, .gmo in source tree
1063
dnl 2) GNU gettext has been found in the system's C library.
1064
dnl Catalog format: GNU --> install in $(datadir)
1065
dnl Catalog extension: .mo after installation, .gmo in source tree
1066
dnl 3) No internationalization, always use English msgid.
1067
dnl Catalog format: none
1068
dnl Catalog extension: none
1069
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
1070
dnl The use of .gmo is historical (it was needed to avoid overwriting the
1071
dnl GNU format catalogs when building on a platform with an X/Open gettext),
1072
dnl but we keep it in order not to force irrelevant filename changes on the
1075
AC_DEFUN([AM_GNU_GETTEXT],
31
if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
32
GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
34
GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
37
AC_ARG_WITH([gconf-source],
38
AC_HELP_STRING([--with-gconf-source=sourceaddress],
39
[Config database for installing schema files.]),
40
[GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
42
AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
43
AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
45
if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
46
GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
49
AC_ARG_WITH([gconf-schema-file-dir],
50
AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
51
[Directory for installing schema files.]),
52
[GCONF_SCHEMA_FILE_DIR="$withval"],)
54
AC_SUBST(GCONF_SCHEMA_FILE_DIR)
55
AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
57
AC_ARG_ENABLE(schemas-install,
58
AC_HELP_STRING([--disable-schemas-install],
59
[Disable the schemas installation]),
62
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;;
64
AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
67
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
68
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
70
# This file is free software, distributed under the terms of the GNU
71
# General Public License. As a special exception to the GNU General
72
# Public License, this file may be distributed as part of a program
73
# that contains a configuration script generated by Autoconf, under
74
# the same distribution terms as the rest of that program.
76
# This file can be copied and used freely without restrictions. It can
77
# be used in projects which are not available under the GNU Public License
78
# but which still want to provide support for the GNU gettext functionality.
80
# Macro to add for using GNU gettext.
81
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
83
# Modified to never use included libintl.
84
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
86
# Major rework to remove unused code
87
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
89
# Added better handling of ALL_LINGUAS from GNU gettext version
90
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
92
# Modified to require ngettext
93
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
95
# We need this here as well, since someone might use autoconf-2.5x
96
# to configure GLib then an older version to configure a package
97
# using AM_GLIB_GNU_GETTEXT
101
dnl We go to great lengths to make sure that aclocal won't
102
dnl try to pull in the installed version of these macros
103
dnl when running aclocal in the glib directory.
105
m4_copy([AC_DEFUN],[glib_DEFUN])
106
m4_copy([AC_REQUIRE],[glib_REQUIRE])
108
dnl At the end, if we're not within glib, we'll define the public
109
dnl definitions in terms of our private definitions.
113
#--------------------
114
glib_DEFUN([GLIB_LC_MESSAGES],
115
[AC_CHECK_HEADERS([locale.h])
116
if test $ac_cv_header_locale_h = yes; then
117
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
118
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
119
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
120
if test $am_cv_val_LC_MESSAGES = yes; then
121
AC_DEFINE(HAVE_LC_MESSAGES, 1,
122
[Define if your <locale.h> file defines LC_MESSAGES.])
126
# GLIB_PATH_PROG_WITH_TEST
127
#----------------------------
128
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
129
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
130
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
131
[# Extract the first word of "$2", so it can be a program name with args.
132
set dummy $2; ac_word=[$]2
133
AC_MSG_CHECKING([for $ac_word])
134
AC_CACHE_VAL(ac_cv_path_$1,
137
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
140
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
141
for ac_dir in ifelse([$5], , $PATH, [$5]); do
142
test -z "$ac_dir" && ac_dir=.
143
if test -f $ac_dir/$ac_word; then
145
ac_cv_path_$1="$ac_dir/$ac_word"
151
dnl If no 4th arg is given, leave the cache variable unset,
152
dnl so AC_PATH_PROGS will keep looking.
153
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
158
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
168
glib_DEFUN([GLIB_WITH_NLS],
169
dnl NLS is obligatory
173
gt_cv_have_gettext=no
179
AC_CHECK_HEADER(libintl.h,
180
[gt_cv_func_dgettext_libintl="no"
181
libintl_extra_libs=""
184
# First check in libc
186
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
190
[return !ngettext ("","", 1)],
191
gt_cv_func_ngettext_libc=yes,
192
gt_cv_func_ngettext_libc=no)
195
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
196
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
200
[return !dgettext ("","")],
201
gt_cv_func_dgettext_libc=yes,
202
gt_cv_func_dgettext_libc=no)
206
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
207
AC_CHECK_FUNCS(bind_textdomain_codeset)
211
# If we don't have everything we want, check in libintl
213
if test "$gt_cv_func_dgettext_libc" != "yes" \
214
|| test "$gt_cv_func_ngettext_libc" != "yes" \
215
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
217
AC_CHECK_LIB(intl, bindtextdomain,
218
[AC_CHECK_LIB(intl, ngettext,
219
[AC_CHECK_LIB(intl, dgettext,
220
gt_cv_func_dgettext_libintl=yes)])])
222
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
223
AC_MSG_CHECKING([if -liconv is needed to use gettext])
225
AC_CHECK_LIB(intl, ngettext,
226
[AC_CHECK_LIB(intl, dcgettext,
227
[gt_cv_func_dgettext_libintl=yes
228
libintl_extra_libs=-liconv],
234
# If we found libintl, then check in it for bind_textdomain_codeset();
235
# we'll prefer libc if neither have bind_textdomain_codeset(),
236
# and both have dgettext and ngettext
238
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
239
glib_save_LIBS="$LIBS"
240
LIBS="$LIBS -lintl $libintl_extra_libs"
241
unset ac_cv_func_bind_textdomain_codeset
242
AC_CHECK_FUNCS(bind_textdomain_codeset)
243
LIBS="$glib_save_LIBS"
245
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
246
gt_cv_func_dgettext_libc=no
248
if test "$gt_cv_func_dgettext_libc" = "yes" \
249
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
250
gt_cv_func_dgettext_libintl=no
1077
dnl Argument checking.
1078
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
1079
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
1081
ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
1082
[AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
1083
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
1084
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
1086
define([gt_included_intl],
1087
ifelse([$1], [external],
1088
ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
1090
define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
1092
AM_GNU_GETTEXT_NEED([$2])
1094
AC_REQUIRE([AM_PO_SUBDIRS])dnl
1095
ifelse(gt_included_intl, yes, [
1096
AC_REQUIRE([AM_INTL_SUBDIR])dnl
1099
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
1100
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1101
AC_REQUIRE([AC_LIB_RPATH])
1103
dnl Sometimes libintl requires libiconv, so first search for libiconv.
1104
dnl Ideally we would do this search only after the
1105
dnl if test "$USE_NLS" = "yes"; then
1106
dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
1107
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
1108
dnl the configure script would need to contain the same shell code
1109
dnl again, outside any 'if'. There are two solutions:
1110
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
1111
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
1112
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
1113
dnl documented, we avoid it.
1114
ifelse(gt_included_intl, yes, , [
1115
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
1118
dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
1122
AC_REQUIRE([AM_NLS])
1124
ifelse(gt_included_intl, yes, [
1125
BUILD_INCLUDED_LIBINTL=no
1126
USE_INCLUDED_LIBINTL=no
1132
dnl Add a version number to the cache macros.
1133
case " $gt_needs " in
1134
*" need-formatstring-macros "*) gt_api_version=3 ;;
1135
*" need-ngettext "*) gt_api_version=2 ;;
1136
*) gt_api_version=1 ;;
1138
gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
1139
gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
1141
dnl If we use NLS figure out what method
1142
if test "$USE_NLS" = "yes"; then
1143
gt_use_preinstalled_gnugettext=no
1144
ifelse(gt_included_intl, yes, [
1145
AC_MSG_CHECKING([whether included gettext is requested])
1146
AC_ARG_WITH([included-gettext],
1147
[ --with-included-gettext use the GNU gettext library included here],
1148
nls_cv_force_use_gnu_gettext=$withval,
1149
nls_cv_force_use_gnu_gettext=no)
1150
AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
1152
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
1153
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
1155
dnl User does not insist on using GNU NLS library. Figure out what
1156
dnl to use. If GNU gettext is available we use this. Else we have
1157
dnl to fall back to GNU NLS library.
1159
if test $gt_api_version -ge 3; then
1160
gt_revision_test_code='
1161
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1162
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1165
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1169
gt_revision_test_code=
1171
if test $gt_api_version -ge 2; then
1172
gt_expression_test_code=' + * ngettext ("", "", 0)'
1174
gt_expression_test_code=
1177
AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
1178
[AC_TRY_LINK([#include <libintl.h>
1179
$gt_revision_test_code
1180
extern int _nl_msg_cat_cntr;
1181
extern int *_nl_domain_bindings;],
1182
[bindtextdomain ("", "");
1183
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
1184
[eval "$gt_func_gnugettext_libc=yes"],
1185
[eval "$gt_func_gnugettext_libc=no"])])
1187
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
1188
dnl Sometimes libintl requires libiconv, so first search for libiconv.
1189
ifelse(gt_included_intl, yes, , [
1192
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
1193
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
1194
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
1195
dnl even if libiconv doesn't exist.
1196
AC_LIB_LINKFLAGS_BODY([intl])
1197
AC_CACHE_CHECK([for GNU gettext in libintl],
1198
[$gt_func_gnugettext_libintl],
1199
[gt_save_CPPFLAGS="$CPPFLAGS"
1200
CPPFLAGS="$CPPFLAGS $INCINTL"
1201
gt_save_LIBS="$LIBS"
1202
LIBS="$LIBS $LIBINTL"
1203
dnl Now see whether libintl exists and does not depend on libiconv.
1204
AC_TRY_LINK([#include <libintl.h>
1205
$gt_revision_test_code
1206
extern int _nl_msg_cat_cntr;
1211
const char *_nl_expand_alias (const char *);],
1212
[bindtextdomain ("", "");
1213
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
1214
[eval "$gt_func_gnugettext_libintl=yes"],
1215
[eval "$gt_func_gnugettext_libintl=no"])
1216
dnl Now see whether libintl exists and depends on libiconv.
1217
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
1218
LIBS="$LIBS $LIBICONV"
1219
AC_TRY_LINK([#include <libintl.h>
1220
$gt_revision_test_code
1221
extern int _nl_msg_cat_cntr;
1226
const char *_nl_expand_alias (const char *);],
1227
[bindtextdomain ("", "");
1228
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
1229
[LIBINTL="$LIBINTL $LIBICONV"
1230
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
1231
eval "$gt_func_gnugettext_libintl=yes"
256
if test "$gt_cv_func_dgettext_libc" = "yes" \
257
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
258
gt_cv_have_gettext=yes
261
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
262
INTLLIBS="-lintl $libintl_extra_libs"
265
if test "$gt_cv_have_gettext" = "yes"; then
266
AC_DEFINE(HAVE_GETTEXT,1,
267
[Define if the GNU gettext() function is already present or preinstalled.])
268
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
269
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
270
if test "$MSGFMT" != "no"; then
271
glib_save_LIBS="$LIBS"
272
LIBS="$LIBS $INTLLIBS"
273
AC_CHECK_FUNCS(dcgettext)
275
AC_MSG_CHECKING([if msgfmt accepts -c])
276
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
279
"Content-Type: text/plain; charset=UTF-8\n"
280
"Project-Id-Version: test 1.0\n"
281
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
282
"Last-Translator: test <foo@bar.xx>\n"
283
"Language-Team: C <LL@li.org>\n"
284
"MIME-Version: 1.0\n"
285
"Content-Transfer-Encoding: 8bit\n"
286
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
287
AC_SUBST(MSGFMT_OPTS)
288
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
289
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
290
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
291
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
292
return _nl_msg_cat_cntr],
297
dnl On Solaris, if bind_textdomain_codeset is in libc,
298
dnl GNU format message catalog is always supported,
299
dnl since both are added to the libc all together.
300
dnl Hence, we'd like to go with DATADIRNAME=share and
301
dnl and CATOBJEXT=.gmo in this case.
302
AC_CHECK_FUNC(bind_textdomain_codeset,
313
LIBS="$glib_save_LIBS"
316
gt_cv_have_gettext=no
1234
CPPFLAGS="$gt_save_CPPFLAGS"
1235
LIBS="$gt_save_LIBS"])
1238
dnl If an already present or preinstalled GNU gettext() is found,
1239
dnl use it. But if this macro is used in GNU gettext, and GNU
1240
dnl gettext is already preinstalled in libintl, we update this
1241
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
1242
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
1243
|| { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
1244
&& test "$PACKAGE" != gettext-runtime \
1245
&& test "$PACKAGE" != gettext-tools; }; then
1246
gt_use_preinstalled_gnugettext=yes
1248
dnl Reset the values set by searching for libintl.
1254
ifelse(gt_included_intl, yes, [
1255
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
1256
dnl GNU gettext is not found in the C library.
1257
dnl Fall back on included GNU gettext library.
1258
nls_cv_use_gnu_gettext=yes
1262
if test "$nls_cv_use_gnu_gettext" = "yes"; then
1263
dnl Mark actions used to generate GNU NLS library.
1264
BUILD_INCLUDED_LIBINTL=yes
1265
USE_INCLUDED_LIBINTL=yes
1266
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
1267
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
1268
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
1272
if test "$gt_use_preinstalled_gnugettext" = "yes" \
1273
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
1274
dnl Mark actions to use GNU gettext tools.
321
if test "$gt_cv_have_gettext" = "yes" ; then
322
AC_DEFINE(ENABLE_NLS, 1,
323
[always defined to indicate that i18n is enabled])
326
dnl Test whether we really found GNU xgettext.
327
if test "$XGETTEXT" != ":"; then
328
dnl If it is not GNU xgettext we define it as : so that the
329
dnl Makefiles still can work.
330
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1279
if test -n "$INTL_MACOSX_LIBS"; then
1280
if test "$gt_use_preinstalled_gnugettext" = "yes" \
1281
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
1282
dnl Some extra flags are needed during linking.
1283
LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
1284
LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
1288
if test "$gt_use_preinstalled_gnugettext" = "yes" \
1289
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
1290
AC_DEFINE([ENABLE_NLS], [1],
1291
[Define to 1 if translation of program messages to the user's native language
1298
AC_MSG_CHECKING([whether to use NLS])
1299
AC_MSG_RESULT([$USE_NLS])
1300
if test "$USE_NLS" = "yes"; then
1301
AC_MSG_CHECKING([where the gettext function comes from])
1302
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1303
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
1304
gt_source="external libintl"
334
[found xgettext program is not GNU xgettext; ignore it])
339
# We need to process the po/ directory.
1309
gt_source="included intl directory"
1311
AC_MSG_RESULT([$gt_source])
1314
if test "$USE_NLS" = "yes"; then
1316
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1317
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
1318
AC_MSG_CHECKING([how to link with libintl])
1319
AC_MSG_RESULT([$LIBINTL])
1320
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
1323
dnl For backward compatibility. Some packages may be using this.
1324
AC_DEFINE([HAVE_GETTEXT], [1],
1325
[Define if the GNU gettext() function is already present or preinstalled.])
1326
AC_DEFINE([HAVE_DCGETTEXT], [1],
1327
[Define if the GNU dcgettext() function is already present or preinstalled.])
1330
dnl We need to process the po/ directory.
343
[case "$CONFIG_FILES" in *po/Makefile.in*)
344
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
347
dnl These rules are solely for the distribution goal. While doing this
348
dnl we only have to keep exactly one list of the available catalogs
350
for lang in $ALL_LINGUAS; do
351
GMOFILES="$GMOFILES $lang.gmo"
352
POFILES="$POFILES $lang.po"
1334
ifelse(gt_included_intl, yes, [
1335
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
1336
dnl to 'yes' because some of the testsuite requires it.
1337
if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
1338
BUILD_INCLUDED_LIBINTL=yes
355
1341
dnl Make all variables we use known to autoconf.
358
AC_SUBST(DATADIRNAME)
362
AC_SUBST(PO_IN_DATADIR_TRUE)
363
AC_SUBST(PO_IN_DATADIR_FALSE)
368
# AM_GLIB_GNU_GETTEXT
369
# -------------------
370
# Do checks necessary for use of gettext. If a suitable implementation
371
# of gettext is found in either in libintl or in the C library,
372
# it will set INTLLIBS to the libraries needed for use of gettext
373
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
374
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
375
# on various variables needed by the Makefile.in.in installed by
378
glib_DEFUN([GLIB_GNU_GETTEXT],
379
[AC_REQUIRE([AC_PROG_CC])dnl
380
AC_REQUIRE([AC_HEADER_STDC])dnl
385
if test "$gt_cv_have_gettext" = "yes"; then
386
if test "x$ALL_LINGUAS" = "x"; then
389
AC_MSG_CHECKING(for catalogs to be installed)
391
for presentlang in $ALL_LINGUAS; do
393
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
394
desiredlanguages="$LINGUAS"
396
desiredlanguages="$ALL_LINGUAS"
398
for desiredlang in $desiredlanguages; do
399
# Use the presentlang catalog if desiredlang is
400
# a. equal to presentlang, or
401
# b. a variant of presentlang (because in this case,
402
# presentlang can be used as a fallback for messages
403
# which are not translated in the desiredlang catalog).
404
case "$desiredlang" in
405
"$presentlang"*) useit=yes;;
408
if test $useit = yes; then
409
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
413
AC_MSG_RESULT($LINGUAS)
416
dnl Construct list of names of catalog files to be constructed.
417
if test -n "$LINGUAS"; then
418
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
422
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
423
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
424
dnl Try to locate is.
426
if test -n "$ac_aux_dir"; then
427
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
429
if test -z "$MKINSTALLDIRS"; then
430
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
432
AC_SUBST(MKINSTALLDIRS)
434
dnl Generate list of files to be processed by xgettext which will
435
dnl be included in po/Makefile.
436
test -d po || mkdir po
437
if test "x$srcdir" != "x."; then
438
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
439
posrcprefix="$srcdir/"
441
posrcprefix="../$srcdir/"
447
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
448
< $srcdir/po/POTFILES.in > po/POTFILES
451
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
452
# -------------------------------
453
# Define VARIABLE to the location where catalog files will
454
# be installed by po/Makefile.
455
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
456
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
457
glib_save_prefix="$prefix"
458
glib_save_exec_prefix="$exec_prefix"
459
glib_save_datarootdir="$datarootdir"
460
test "x$prefix" = xNONE && prefix=$ac_default_prefix
461
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
462
datarootdir=`eval echo "${datarootdir}"`
463
if test "x$CATOBJEXT" = "x.mo" ; then
464
localedir=`eval echo "${libdir}/locale"`
466
localedir=`eval echo "${datadir}/locale"`
468
prefix="$glib_save_prefix"
469
exec_prefix="$glib_save_exec_prefix"
470
datarootdir="$glib_save_datarootdir"
471
AC_DEFINE_UNQUOTED($1, "$localedir",
472
[Define the location where the catalogs will be installed])
476
dnl Now the definitions that aclocal will find
478
ifdef(glib_configure_in,[],[
479
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
480
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
483
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
485
# Create a temporary file with TEST-FILE as its contents and pass the
486
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
487
# 0 and perform ACTION-IF-FAIL for any other exit status.
488
AC_DEFUN([GLIB_RUN_PROG],
489
[cat >conftest.foo <<_ACEOF
492
if AC_RUN_LOG([$1 conftest.foo]); then
493
m4_ifval([$3], [$3], [:])
494
m4_ifvaln([$4], [else $4])dnl
495
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
496
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
1342
AC_SUBST([BUILD_INCLUDED_LIBINTL])
1343
AC_SUBST([USE_INCLUDED_LIBINTL])
1344
AC_SUBST([CATOBJEXT])
1346
dnl For backward compatibility. Some configure.ins may be using this.
1348
nls_cv_header_libgt=
1350
dnl For backward compatibility. Some Makefiles may be using this.
1352
AC_SUBST([DATADIRNAME])
1354
dnl For backward compatibility. Some Makefiles may be using this.
1356
AC_SUBST([INSTOBJEXT])
1358
dnl For backward compatibility. Some Makefiles may be using this.
1362
dnl For backward compatibility. Some Makefiles may be using this.
1364
if test "$USE_INCLUDED_LIBINTL" = yes; then
1365
INTLOBJS="\$(GETTOBJS)"
1367
AC_SUBST([INTLOBJS])
1369
dnl Enable libtool support if the surrounding package wishes it.
1370
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
1371
AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
1374
dnl For backward compatibility. Some Makefiles may be using this.
1376
AC_SUBST([INTLLIBS])
1378
dnl Make all documented variables known to autoconf.
1380
AC_SUBST([LTLIBINTL])
1385
dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
1386
m4_define([gt_NEEDS_INIT],
1388
m4_divert_text([DEFAULTS], [gt_needs=])
1389
m4_define([gt_NEEDS_INIT], [])
1393
dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
1394
AC_DEFUN([AM_GNU_GETTEXT_NEED],
1396
m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
1400
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
1401
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
1403
# iconv.m4 serial 11 (gettext-0.18.1)
1404
dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
1405
dnl This file is free software; the Free Software Foundation
1406
dnl gives unlimited permission to copy and/or distribute it,
1407
dnl with or without modifications, as long as this notice is preserved.
1409
dnl From Bruno Haible.
1411
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
1413
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
1414
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1415
AC_REQUIRE([AC_LIB_RPATH])
1417
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
1419
AC_LIB_LINKFLAGS_BODY([iconv])
1422
AC_DEFUN([AM_ICONV_LINK],
1424
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
1425
dnl those with the standalone portable GNU libiconv installed).
1426
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
1428
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
1430
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
1432
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
1433
dnl because if the user has installed libiconv and not disabled its use
1434
dnl via --without-libiconv-prefix, he wants to use it. The first
1435
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
1436
am_save_CPPFLAGS="$CPPFLAGS"
1437
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
1439
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
1440
am_cv_func_iconv="no, consider installing GNU libiconv"
1442
AC_TRY_LINK([#include <stdlib.h>
1443
#include <iconv.h>],
1444
[iconv_t cd = iconv_open("","");
1445
iconv(cd,NULL,NULL,NULL,NULL);
1447
[am_cv_func_iconv=yes])
1448
if test "$am_cv_func_iconv" != yes; then
1449
am_save_LIBS="$LIBS"
1450
LIBS="$LIBS $LIBICONV"
1451
AC_TRY_LINK([#include <stdlib.h>
1452
#include <iconv.h>],
1453
[iconv_t cd = iconv_open("","");
1454
iconv(cd,NULL,NULL,NULL,NULL);
1456
[am_cv_lib_iconv=yes]
1457
[am_cv_func_iconv=yes])
1458
LIBS="$am_save_LIBS"
1461
if test "$am_cv_func_iconv" = yes; then
1462
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
1463
dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
1464
am_save_LIBS="$LIBS"
1465
if test $am_cv_lib_iconv = yes; then
1466
LIBS="$LIBS $LIBICONV"
1473
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
1476
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
1477
if (cd_utf8_to_88591 != (iconv_t)(-1))
1479
static const char input[] = "\342\202\254"; /* EURO SIGN */
1481
const char *inptr = input;
1482
size_t inbytesleft = strlen (input);
1484
size_t outbytesleft = sizeof (buf);
1485
size_t res = iconv (cd_utf8_to_88591,
1486
(char **) &inptr, &inbytesleft,
1487
&outptr, &outbytesleft);
1492
/* Test against Solaris 10 bug: Failures are not distinguishable from
1493
successful returns. */
1495
iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
1496
if (cd_ascii_to_88591 != (iconv_t)(-1))
1498
static const char input[] = "\263";
1500
const char *inptr = input;
1501
size_t inbytesleft = strlen (input);
1503
size_t outbytesleft = sizeof (buf);
1504
size_t res = iconv (cd_ascii_to_88591,
1505
(char **) &inptr, &inbytesleft,
1506
&outptr, &outbytesleft);
1511
#if 0 /* This bug could be worked around by the caller. */
1512
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
1514
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
1515
if (cd_88591_to_utf8 != (iconv_t)(-1))
1517
static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
1519
const char *inptr = input;
1520
size_t inbytesleft = strlen (input);
1522
size_t outbytesleft = sizeof (buf);
1523
size_t res = iconv (cd_88591_to_utf8,
1524
(char **) &inptr, &inbytesleft,
1525
&outptr, &outbytesleft);
1531
/* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
1533
if (/* Try standardized names. */
1534
iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
1535
/* Try IRIX, OSF/1 names. */
1536
&& iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
1537
/* Try AIX names. */
1538
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
1539
/* Try HP-UX names. */
1540
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
1543
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
1545
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
1546
*) am_cv_func_iconv_works="guessing yes" ;;
1548
LIBS="$am_save_LIBS"
1550
case "$am_cv_func_iconv_works" in
1551
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
1552
*) am_func_iconv=yes ;;
1555
am_func_iconv=no am_cv_lib_iconv=no
1557
if test "$am_func_iconv" = yes; then
1558
AC_DEFINE([HAVE_ICONV], [1],
1559
[Define if you have the iconv() function and it works.])
1561
if test "$am_cv_lib_iconv" = yes; then
1562
AC_MSG_CHECKING([how to link with libiconv])
1563
AC_MSG_RESULT([$LIBICONV])
1565
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
1567
CPPFLAGS="$am_save_CPPFLAGS"
1571
AC_SUBST([LIBICONV])
1572
AC_SUBST([LTLIBICONV])
1575
dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
1576
dnl avoid warnings like
1577
dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
1578
dnl This is tricky because of the way 'aclocal' is implemented:
1579
dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
1580
dnl Otherwise aclocal's initial scan pass would miss the macro definition.
1581
dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
1582
dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
1584
m4_define([gl_iconv_AC_DEFUN],
1585
m4_version_prereq([2.64],
1590
gl_iconv_AC_DEFUN([AM_ICONV],
1593
if test "$am_cv_func_iconv" = yes; then
1594
AC_MSG_CHECKING([for iconv declaration])
1595
AC_CACHE_VAL([am_cv_proto_iconv], [
1603
#if defined(__STDC__) || defined(__cplusplus)
1604
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
1608
], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
1609
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
1610
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
1612
$am_cv_proto_iconv])
1613
AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
1614
[Define as const if the declaration of iconv() needs const.])
1618
# intlmacosx.m4 serial 3 (gettext-0.18)
1619
dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
1620
dnl This file is free software; the Free Software Foundation
1621
dnl gives unlimited permission to copy and/or distribute it,
1622
dnl with or without modifications, as long as this notice is preserved.
1624
dnl This file can can be used in projects which are not available under
1625
dnl the GNU General Public License or the GNU Library General Public
1626
dnl License but which still want to provide support for the GNU gettext
1628
dnl Please note that the actual code of the GNU gettext library is covered
1629
dnl by the GNU Library General Public License, and the rest of the GNU
1630
dnl gettext package package is covered by the GNU General Public License.
1631
dnl They are *not* in the public domain.
1633
dnl Checks for special options needed on MacOS X.
1634
dnl Defines INTL_MACOSX_LIBS.
1635
AC_DEFUN([gt_INTL_MACOSX],
1637
dnl Check for API introduced in MacOS X 10.2.
1638
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
1639
[gt_cv_func_CFPreferencesCopyAppValue],
1640
[gt_save_LIBS="$LIBS"
1641
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
1642
AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
1643
[CFPreferencesCopyAppValue(NULL, NULL)],
1644
[gt_cv_func_CFPreferencesCopyAppValue=yes],
1645
[gt_cv_func_CFPreferencesCopyAppValue=no])
1646
LIBS="$gt_save_LIBS"])
1647
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
1648
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
1649
[Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
1651
dnl Check for API introduced in MacOS X 10.3.
1652
AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
1653
[gt_save_LIBS="$LIBS"
1654
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
1655
AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
1656
[gt_cv_func_CFLocaleCopyCurrent=yes],
1657
[gt_cv_func_CFLocaleCopyCurrent=no])
1658
LIBS="$gt_save_LIBS"])
1659
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
1660
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
1661
[Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
1664
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
1665
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
1667
AC_SUBST([INTL_MACOSX_LIBS])
1670
# lib-ld.m4 serial 4 (gettext-0.18)
1671
dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
1672
dnl This file is free software; the Free Software Foundation
1673
dnl gives unlimited permission to copy and/or distribute it,
1674
dnl with or without modifications, as long as this notice is preserved.
1676
dnl Subroutines of libtool.m4,
1677
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
1678
dnl with libtool.m4.
1680
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
1681
AC_DEFUN([AC_LIB_PROG_LD_GNU],
1682
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
1683
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1684
case `$LD -v 2>&1 </dev/null` in
1685
*GNU* | *'with BFD'*)
1686
acl_cv_prog_gnu_ld=yes ;;
1688
acl_cv_prog_gnu_ld=no ;;
1690
with_gnu_ld=$acl_cv_prog_gnu_ld
1693
dnl From libtool-1.4. Sets the variable LD.
1694
AC_DEFUN([AC_LIB_PROG_LD],
1695
[AC_ARG_WITH([gnu-ld],
1696
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
1697
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
1698
AC_REQUIRE([AC_PROG_CC])dnl
1699
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1700
# Prepare PATH_SEPARATOR.
1701
# The user is always right.
1702
if test "${PATH_SEPARATOR+set}" != set; then
1703
echo "#! /bin/sh" >conf$$.sh
1704
echo "exit 0" >>conf$$.sh
1706
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1714
if test "$GCC" = yes; then
1715
# Check if gcc -print-prog-name=ld gives a path.
1716
AC_MSG_CHECKING([for ld used by GCC])
1719
# gcc leaves a trailing carriage return which upsets mingw
1720
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1722
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1725
# Accept absolute paths.
1726
[[\\/]* | [A-Za-z]:[\\/]*)]
1727
[re_direlt='/[^/][^/]*/\.\./']
1728
# Canonicalize the path of ld
1729
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1730
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1731
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1733
test -z "$LD" && LD="$ac_prog"
1736
# If it fails, then pretend we aren't using GCC.
1740
# If it is relative, then search for the first ld in PATH.
1744
elif test "$with_gnu_ld" = yes; then
1745
AC_MSG_CHECKING([for GNU ld])
1747
AC_MSG_CHECKING([for non-GNU ld])
1749
AC_CACHE_VAL([acl_cv_path_LD],
1750
[if test -z "$LD"; then
1751
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1752
for ac_dir in $PATH; do
1753
test -z "$ac_dir" && ac_dir=.
1754
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1755
acl_cv_path_LD="$ac_dir/$ac_prog"
1756
# Check to see if the program is GNU ld. I'd rather use --version,
1757
# but apparently some GNU ld's only accept -v.
1758
# Break only if it was the GNU/non-GNU ld that we prefer.
1759
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
1760
*GNU* | *'with BFD'*)
1761
test "$with_gnu_ld" != no && break ;;
1763
test "$with_gnu_ld" != yes && break ;;
1769
acl_cv_path_LD="$LD" # Let the user override the test with a path.
503
dnl GNOME_COMMON_INIT
505
AC_DEFUN([GNOME_COMMON_INIT],
507
dnl this macro should come after AC_CONFIG_MACRO_DIR
508
AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
510
dnl ensure that when the Automake generated makefile calls aclocal,
511
dnl it honours the $ACLOCAL_FLAGS environment variable
512
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
513
if test -n "$ac_macro_dir"; then
514
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
517
AC_SUBST([ACLOCAL_AMFLAGS])
520
AC_DEFUN([GNOME_DEBUG_CHECK],
522
AC_ARG_ENABLE([debug],
523
AC_HELP_STRING([--enable-debug],
524
[turn on debugging]),,
527
if test x$enable_debug = xyes ; then
528
AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
529
[Enable additional debugging at the expense of performance and size])
533
dnl GNOME_MAINTAINER_MODE_DEFINES ()
534
dnl define DISABLE_DEPRECATED
536
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
538
AC_REQUIRE([AM_MAINTAINER_MODE])
540
DISABLE_DEPRECATED=""
541
if test $USE_MAINTAINER_MODE = yes; then
542
DOMAINS="G ATK PANGO GDK GDK_PIXBUF GTK GCONF BONOBO BONOBO_UI GNOME LIBGLADE VTE GNOME_VFS WNCK LIBSOUP"
543
for DOMAIN in $DOMAINS; do
544
DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
548
AC_SUBST(DISABLE_DEPRECATED)
551
dnl GNOME_COMPILE_WARNINGS
552
dnl Turn on many useful compiler warnings
553
dnl For now, only works on GCC
554
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
555
dnl ******************************
556
dnl More compiler warnings
557
dnl ******************************
559
AC_ARG_ENABLE(compile-warnings,
560
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
561
[Turn on compiler warnings]),,
562
[enable_compile_warnings="m4_default([$1],[yes])"])
565
if test "x$GCC" != xyes; then
566
enable_compile_warnings=no
570
realsave_CFLAGS="$CFLAGS"
572
case "$enable_compile_warnings" in
577
warning_flags="-Wall"
580
warning_flags="-Wall -Wmissing-prototypes"
583
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
584
CFLAGS="$warning_flags $CFLAGS"
585
for option in -Wno-sign-compare; do
586
SAVE_CFLAGS="$CFLAGS"
587
CFLAGS="$CFLAGS $option"
588
AC_MSG_CHECKING([whether gcc understands $option])
589
AC_TRY_COMPILE([], [],
592
CFLAGS="$SAVE_CFLAGS"
593
AC_MSG_RESULT($has_option)
594
if test $has_option = yes; then
595
warning_flags="$warning_flags $option"
601
if test "$enable_compile_warnings" = "error" ; then
602
warning_flags="$warning_flags -Werror"
606
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
1771
LD="$acl_cv_path_LD"
1772
if test -n "$LD"; then
1773
AC_MSG_RESULT([$LD])
1777
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1781
# lib-link.m4 serial 21 (gettext-0.18)
1782
dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
1783
dnl This file is free software; the Free Software Foundation
1784
dnl gives unlimited permission to copy and/or distribute it,
1785
dnl with or without modifications, as long as this notice is preserved.
1787
dnl From Bruno Haible.
1791
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1792
dnl the libraries corresponding to explicit and implicit dependencies.
1793
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1794
dnl augments the CPPFLAGS variable.
1795
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1796
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1797
AC_DEFUN([AC_LIB_LINKFLAGS],
1799
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1800
AC_REQUIRE([AC_LIB_RPATH])
1801
pushdef([Name],[translit([$1],[./-], [___])])
1802
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1803
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1804
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1805
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1806
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1807
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1808
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1809
ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
1811
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1812
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1813
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1814
LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
1815
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1817
AC_SUBST([LTLIB]NAME)
1818
AC_SUBST([LIB]NAME[_PREFIX])
1819
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1820
dnl results of this search when this library appears as a dependency.
1826
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
1827
dnl searches for libname and the libraries corresponding to explicit and
1828
dnl implicit dependencies, together with the specified include files and
1829
dnl the ability to compile and link the specified testcode. The missing-message
1830
dnl defaults to 'no' and may contain additional hints for the user.
1831
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
1832
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1833
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1834
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1835
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1836
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1837
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1839
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1840
AC_REQUIRE([AC_LIB_RPATH])
1841
pushdef([Name],[translit([$1],[./-], [___])])
1842
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1843
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1845
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1847
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1849
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1850
dnl because if the user has installed lib[]Name and not disabled its use
1851
dnl via --without-lib[]Name-prefix, he wants to use it.
1852
ac_save_CPPFLAGS="$CPPFLAGS"
1853
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1855
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1856
ac_save_LIBS="$LIBS"
1857
dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
1858
dnl because these -l options might require -L options that are present in
1859
dnl LIBS. -l options benefit only from the -L options listed before it.
1860
dnl Otherwise, add it to the front of LIBS, because it may be a static
1861
dnl library that depends on another static library that is present in LIBS.
1862
dnl Static libraries benefit only from the static libraries listed after
1864
case " $LIB[]NAME" in
1865
*" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
1866
*) LIBS="$LIB[]NAME $LIBS" ;;
609
CFLAGS="$realsave_CFLAGS"
610
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
611
AC_MSG_RESULT($warning_flags)
614
AC_HELP_STRING([--enable-iso-c],
615
[Try to warn if code is not ISO C ]),,
618
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
620
if test "x$enable_iso_c" != "xno"; then
621
if test "x$GCC" = "xyes"; then
623
*[\ \ ]-ansi[\ \ ]*) ;;
624
*) complCFLAGS="$complCFLAGS -ansi" ;;
627
*[\ \ ]-pedantic[\ \ ]*) ;;
628
*) complCFLAGS="$complCFLAGS -pedantic" ;;
632
AC_MSG_RESULT($complCFLAGS)
634
WARN_CFLAGS="$warning_flags $complCFLAGS"
635
AC_SUBST(WARN_CFLAGS)
638
dnl For C++, do basically the same thing.
640
AC_DEFUN([GNOME_CXX_WARNINGS],[
641
AC_ARG_ENABLE(cxx-warnings,
642
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
643
[Turn on compiler warnings.]),,
644
[enable_cxx_warnings="m4_default([$1],[minimum])"])
646
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
648
if test "x$GXX" != xyes; then
649
enable_cxx_warnings=no
651
if test "x$enable_cxx_warnings" != "xno"; then
652
if test "x$GXX" = "xyes"; then
653
case " $CXXFLAGS " in
654
*[\ \ ]-Wall[\ \ ]*) ;;
655
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
658
## -W is not all that useful. And it cannot be controlled
659
## with individual -Wno-xxx flags, unlike -Wall
660
if test "x$enable_cxx_warnings" = "xyes"; then
661
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
665
AC_MSG_RESULT($warnCXXFLAGS)
667
AC_ARG_ENABLE(iso-cxx,
668
AC_HELP_STRING([--enable-iso-cxx],
669
[Try to warn if code is not ISO C++ ]),,
672
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
674
if test "x$enable_iso_cxx" != "xno"; then
675
if test "x$GXX" = "xyes"; then
676
case " $CXXFLAGS " in
677
*[\ \ ]-ansi[\ \ ]*) ;;
678
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
681
case " $CXXFLAGS " in
682
*[\ \ ]-pedantic[\ \ ]*) ;;
683
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
687
AC_MSG_RESULT($complCXXFLAGS)
689
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
690
AC_SUBST(WARN_CXXFLAGS)
693
dnl Do not call GNOME_DOC_DEFINES directly. It is split out from
694
dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself.
695
AC_DEFUN([GNOME_DOC_DEFINES],
697
AC_ARG_WITH([help-dir],
698
AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
699
[with_help_dir='${datadir}/gnome/help'])
700
HELP_DIR="$with_help_dir"
703
AC_ARG_WITH([omf-dir],
704
AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
705
[with_omf_dir='${datadir}/omf'])
706
OMF_DIR="$with_omf_dir"
709
AC_ARG_WITH([help-formats],
710
AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
711
[with_help_formats=''])
712
DOC_USER_FORMATS="$with_help_formats"
713
AC_SUBST(DOC_USER_FORMATS)
715
AC_ARG_ENABLE([scrollkeeper],
716
[AC_HELP_STRING([--disable-scrollkeeper],
717
[do not make updates to the scrollkeeper database])],,
718
enable_scrollkeeper=yes)
719
AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
721
dnl disable scrollkeeper automatically for distcheck
722
DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS"
723
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
725
AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
728
# GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
730
AC_DEFUN([GNOME_DOC_INIT],
731
[AC_REQUIRE([AC_PROG_LN_S])dnl
733
ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
735
AC_MSG_CHECKING([gnome-doc-utils >= $gdu_cv_version_required])
736
PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
737
[gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no])
739
if test "$gdu_cv_have_gdu" = "yes"; then
741
ifelse([$2],,[:],[$2])
744
ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3])
750
dnl -*- mode: autoconf -*-
755
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
756
AC_DEFUN([GTK_DOC_CHECK],
758
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
759
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
760
dnl for overriding the documentation installation directory
761
AC_ARG_WITH([html-dir],
762
AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
763
[with_html_dir='${datadir}/gtk-doc/html'])
764
HTML_DIR="$with_html_dir"
767
dnl enable/disable documentation building
768
AC_ARG_ENABLE([gtk-doc],
769
AS_HELP_STRING([--enable-gtk-doc],
770
[use gtk-doc to build documentation [[default=no]]]),,
773
if test x$enable_gtk_doc = xyes; then
775
[PKG_CHECK_EXISTS([gtk-doc],,
776
AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
777
[PKG_CHECK_EXISTS([gtk-doc >= $1],,
778
AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))])
781
AC_MSG_CHECKING([whether to build gtk-doc documentation])
782
AC_MSG_RESULT($enable_gtk_doc)
784
AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,)
786
AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
787
AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
791
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
792
# serial 40 IT_PROG_INTLTOOL
793
AC_DEFUN([IT_PROG_INTLTOOL], [
795
AC_REQUIRE([AM_NLS])dnl
797
case "$am__api_version" in
799
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
805
if test -n "$1"; then
806
AC_MSG_CHECKING([for intltool >= $1])
808
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
809
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
810
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
812
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
813
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
814
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
817
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
818
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
819
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
820
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
821
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
824
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 $< [$]@'
825
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 $< [$]@'
826
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 $< [$]@'
827
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 $< [$]@'
828
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
829
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 $< [$]@'
830
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 $< [$]@'
831
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 $< [$]@'
832
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 $< [$]@'
833
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 $< [$]@'
834
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 $< [$]@'
835
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
836
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 $< [$]@'
837
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 $< [$]@'
838
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 $< [$]@'
839
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 $< [$]@'
840
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 $< [$]@'
841
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 $< [$]@'
842
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 $< [$]@'
844
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
845
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
846
_IT_SUBST(INTLTOOL_KEYS_RULE)
847
_IT_SUBST(INTLTOOL_PROP_RULE)
848
_IT_SUBST(INTLTOOL_OAF_RULE)
849
_IT_SUBST(INTLTOOL_PONG_RULE)
850
_IT_SUBST(INTLTOOL_SERVER_RULE)
851
_IT_SUBST(INTLTOOL_SHEET_RULE)
852
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
853
_IT_SUBST(INTLTOOL_UI_RULE)
854
_IT_SUBST(INTLTOOL_XAM_RULE)
855
_IT_SUBST(INTLTOOL_KBD_RULE)
856
_IT_SUBST(INTLTOOL_XML_RULE)
857
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
858
_IT_SUBST(INTLTOOL_CAVES_RULE)
859
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
860
_IT_SUBST(INTLTOOL_THEME_RULE)
861
_IT_SUBST(INTLTOOL_SERVICE_RULE)
862
_IT_SUBST(INTLTOOL_POLICY_RULE)
864
# Check the gettext tools to make sure they are GNU
865
AC_PATH_PROG(XGETTEXT, xgettext)
866
AC_PATH_PROG(MSGMERGE, msgmerge)
867
AC_PATH_PROG(MSGFMT, msgfmt)
868
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
869
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
870
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
872
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
873
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
874
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
875
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
876
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
879
AC_PATH_PROG(INTLTOOL_PERL, perl)
880
if test -z "$INTLTOOL_PERL"; then
881
AC_MSG_ERROR([perl not found])
883
AC_MSG_CHECKING([for perl >= 5.8.1])
884
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
885
if test $? -ne 0; then
886
AC_MSG_ERROR([perl 5.8.1 is required for intltool])
888
IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
889
AC_MSG_RESULT([$IT_PERL_VERSION])
891
if test "x$2" != "xno-xml"; then
892
AC_MSG_CHECKING([for XML::Parser])
893
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
896
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
900
# Substitute ALL_LINGUAS so we can use it in po/Makefile
901
AC_SUBST(ALL_LINGUAS)
903
# Set DATADIRNAME correctly if it is not set yet
904
# (copied from glib-gettext.m4)
905
if test -z "$DATADIRNAME"; then
907
[AC_LANG_PROGRAM([[]],
908
[[extern int _nl_msg_cat_cntr;
909
return _nl_msg_cat_cntr]])],
913
dnl On Solaris, if bind_textdomain_codeset is in libc,
914
dnl GNU format message catalog is always supported,
915
dnl since both are added to the libc all together.
916
dnl Hence, we'd like to go with DATADIRNAME=share
918
AC_CHECK_FUNC(bind_textdomain_codeset,
919
[DATADIRNAME=share], [DATADIRNAME=lib])
926
AC_SUBST(DATADIRNAME)
933
# IT_PO_SUBDIR(DIRNAME)
934
# ---------------------
935
# All po subdirs have to be declared with this macro; the subdir "po" is
936
# declared by IT_PROG_INTLTOOL.
938
AC_DEFUN([IT_PO_SUBDIR],
939
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
941
dnl The following CONFIG_COMMANDS should be exetuted at the very end
942
dnl of config.status.
943
AC_CONFIG_COMMANDS_PRE([
944
AC_CONFIG_COMMANDS([$1/stamp-it], [
945
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
946
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
948
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
953
'"s|^| $ac_top_srcdir/|" \
954
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
956
[sed '/^POTFILES =/,/[^\\]$/ {
960
' "$1/Makefile.in" >"$1/Makefile"]
961
rm -f "$1/Makefile.tmp"
962
mv "$1/stamp-it.tmp" "$1/stamp-it"
967
# _IT_SUBST(VARIABLE)
968
# -------------------
969
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
971
AC_DEFUN([_IT_SUBST],
974
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
979
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
980
# A hint is needed for aclocal from Automake <= 1.9.4:
981
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1868
AC_TRY_LINK([$3], [$4],
1869
[ac_cv_lib[]Name=yes],
1870
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
1871
LIBS="$ac_save_LIBS"
1873
if test "$ac_cv_lib[]Name" = yes; then
1875
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
1876
AC_MSG_CHECKING([how to link with lib[]$1])
1877
AC_MSG_RESULT([$LIB[]NAME])
1880
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1881
dnl $INC[]NAME either.
1882
CPPFLAGS="$ac_save_CPPFLAGS"
1887
AC_SUBST([HAVE_LIB]NAME)
1889
AC_SUBST([LTLIB]NAME)
1890
AC_SUBST([LIB]NAME[_PREFIX])
1895
dnl Determine the platform dependent parameters needed to use rpath:
1898
dnl acl_hardcode_libdir_flag_spec,
1899
dnl acl_hardcode_libdir_separator,
1900
dnl acl_hardcode_direct,
1901
dnl acl_hardcode_minus_L.
1902
AC_DEFUN([AC_LIB_RPATH],
1904
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1905
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1906
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1907
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1908
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1909
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1910
AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
1911
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1912
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1918
acl_libext="$acl_cv_libext"
1919
acl_shlibext="$acl_cv_shlibext"
1920
acl_libname_spec="$acl_cv_libname_spec"
1921
acl_library_names_spec="$acl_cv_library_names_spec"
1922
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1923
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1924
acl_hardcode_direct="$acl_cv_hardcode_direct"
1925
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
1926
dnl Determine whether the user wants rpath handling at all.
1927
AC_ARG_ENABLE([rpath],
1928
[ --disable-rpath do not hardcode runtime library paths],
1929
:, enable_rpath=yes)
1932
dnl AC_LIB_FROMPACKAGE(name, package)
1933
dnl declares that libname comes from the given package. The configure file
1934
dnl will then not have a --with-libname-prefix option but a
1935
dnl --with-package-prefix option. Several libraries can come from the same
1936
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
1937
dnl macro call that searches for libname.
1938
AC_DEFUN([AC_LIB_FROMPACKAGE],
1940
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1941
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1942
define([acl_frompackage_]NAME, [$2])
1944
pushdef([PACK],[$2])
1945
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
1946
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1947
define([acl_libsinpackage_]PACKUP,
1948
m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
1953
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1954
dnl the libraries corresponding to explicit and implicit dependencies.
1955
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1956
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
1957
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1958
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1960
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1961
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1962
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1963
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
1964
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
1965
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1966
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
1967
dnl Autoconf >= 2.61 supports dots in --with options.
1968
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
1969
dnl By default, look in $includedir and $libdir.
1971
AC_LIB_WITH_FINAL_PREFIX([
1972
eval additional_includedir=\"$includedir\"
1973
eval additional_libdir=\"$libdir\"
1975
AC_ARG_WITH(P_A_C_K[-prefix],
1976
[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
1977
--without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
1979
if test "X$withval" = "Xno"; then
1982
if test "X$withval" = "X"; then
1983
AC_LIB_WITH_FINAL_PREFIX([
1984
eval additional_includedir=\"$includedir\"
1985
eval additional_libdir=\"$libdir\"
1988
additional_includedir="$withval/include"
1989
additional_libdir="$withval/$acl_libdirstem"
1990
if test "$acl_libdirstem2" != "$acl_libdirstem" \
1991
&& ! test -d "$withval/$acl_libdirstem"; then
1992
additional_libdir="$withval/$acl_libdirstem2"
1997
dnl Search the library and its dependencies in $additional_libdir and
1998
dnl $LDFLAGS. Using breadth-first-seach.
2003
dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
2004
dnl computed. So it has to be reset here.
2008
names_already_handled=
2009
names_next_round='$1 $2'
2010
while test -n "$names_next_round"; do
2011
names_this_round="$names_next_round"
2013
for name in $names_this_round; do
2015
for n in $names_already_handled; do
2016
if test "$n" = "$name"; then
2021
if test -z "$already_handled"; then
2022
names_already_handled="$names_already_handled $name"
2023
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
2024
dnl or AC_LIB_HAVE_LINKFLAGS call.
2025
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
2026
eval value=\"\$HAVE_LIB$uppername\"
2027
if test -n "$value"; then
2028
if test "$value" = yes; then
2029
eval value=\"\$LIB$uppername\"
2030
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
2031
eval value=\"\$LTLIB$uppername\"
2032
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
2034
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
2035
dnl that this library doesn't exist. So just drop it.
2039
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
2040
dnl and the already constructed $LIBNAME/$LTLIBNAME.
2045
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
2046
if test -n "$acl_shlibext"; then
2047
shrext=".$acl_shlibext" # typically: shrext=.so
2051
if test $use_additional = yes; then
2052
dir="$additional_libdir"
2053
dnl The same code as in the loop below:
2054
dnl First look for a shared library.
2055
if test -n "$acl_shlibext"; then
2056
if test -f "$dir/$libname$shrext"; then
2058
found_so="$dir/$libname$shrext"
2060
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
2061
ver=`(cd "$dir" && \
2062
for f in "$libname$shrext".*; do echo "$f"; done \
2063
| sed -e "s,^$libname$shrext\\\\.,," \
2064
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
2065
| sed 1q ) 2>/dev/null`
2066
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
2068
found_so="$dir/$libname$shrext.$ver"
2071
eval library_names=\"$acl_library_names_spec\"
2072
for f in $library_names; do
2073
if test -f "$dir/$f"; then
2082
dnl Then look for a static library.
2083
if test "X$found_dir" = "X"; then
2084
if test -f "$dir/$libname.$acl_libext"; then
2086
found_a="$dir/$libname.$acl_libext"
2089
if test "X$found_dir" != "X"; then
2090
if test -f "$dir/$libname.la"; then
2091
found_la="$dir/$libname.la"
2095
if test "X$found_dir" = "X"; then
2096
for x in $LDFLAGS $LTLIB[]NAME; do
2097
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2100
dir=`echo "X$x" | sed -e 's/^X-L//'`
2101
dnl First look for a shared library.
2102
if test -n "$acl_shlibext"; then
2103
if test -f "$dir/$libname$shrext"; then
2105
found_so="$dir/$libname$shrext"
2107
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
2108
ver=`(cd "$dir" && \
2109
for f in "$libname$shrext".*; do echo "$f"; done \
2110
| sed -e "s,^$libname$shrext\\\\.,," \
2111
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
2112
| sed 1q ) 2>/dev/null`
2113
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
2115
found_so="$dir/$libname$shrext.$ver"
2118
eval library_names=\"$acl_library_names_spec\"
2119
for f in $library_names; do
2120
if test -f "$dir/$f"; then
2129
dnl Then look for a static library.
2130
if test "X$found_dir" = "X"; then
2131
if test -f "$dir/$libname.$acl_libext"; then
2133
found_a="$dir/$libname.$acl_libext"
2136
if test "X$found_dir" != "X"; then
2137
if test -f "$dir/$libname.la"; then
2138
found_la="$dir/$libname.la"
2143
if test "X$found_dir" != "X"; then
2148
if test "X$found_dir" != "X"; then
2149
dnl Found the library.
2150
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
2151
if test "X$found_so" != "X"; then
2152
dnl Linking with a shared library. We attempt to hardcode its
2153
dnl directory into the executable's runpath, unless it's the
2154
dnl standard /usr/lib.
2155
if test "$enable_rpath" = no \
2156
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
2157
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
2158
dnl No hardcoding is needed.
2159
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2161
dnl Use an explicit option to hardcode DIR into the resulting
2163
dnl Potentially add DIR to ltrpathdirs.
2164
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2166
for x in $ltrpathdirs; do
2167
if test "X$x" = "X$found_dir"; then
2172
if test -z "$haveit"; then
2173
ltrpathdirs="$ltrpathdirs $found_dir"
2175
dnl The hardcoding into $LIBNAME is system dependent.
2176
if test "$acl_hardcode_direct" = yes; then
2177
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
2178
dnl resulting binary.
2179
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2181
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
2182
dnl Use an explicit option to hardcode DIR into the resulting
2184
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2185
dnl Potentially add DIR to rpathdirs.
2186
dnl The rpathdirs will be appended to $LIBNAME at the end.
2188
for x in $rpathdirs; do
2189
if test "X$x" = "X$found_dir"; then
2194
if test -z "$haveit"; then
2195
rpathdirs="$rpathdirs $found_dir"
2198
dnl Rely on "-L$found_dir".
2199
dnl But don't add it if it's already contained in the LDFLAGS
2200
dnl or the already constructed $LIBNAME
2202
for x in $LDFLAGS $LIB[]NAME; do
2203
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2204
if test "X$x" = "X-L$found_dir"; then
2209
if test -z "$haveit"; then
2210
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
2212
if test "$acl_hardcode_minus_L" != no; then
2213
dnl FIXME: Not sure whether we should use
2214
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2216
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2218
dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
2219
dnl here, because this doesn't fit in flags passed to the
2220
dnl compiler. So give up. No hardcoding. This affects only
2221
dnl very old systems.
2222
dnl FIXME: Not sure whether we should use
2223
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2225
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2231
if test "X$found_a" != "X"; then
2232
dnl Linking with a static library.
2233
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
2235
dnl We shouldn't come here, but anyway it's good to have a
2237
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
2240
dnl Assume the include files are nearby.
2241
additional_includedir=
2242
case "$found_dir" in
2243
*/$acl_libdirstem | */$acl_libdirstem/)
2244
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
2245
if test "$name" = '$1'; then
2246
LIB[]NAME[]_PREFIX="$basedir"
2248
additional_includedir="$basedir/include"
2250
*/$acl_libdirstem2 | */$acl_libdirstem2/)
2251
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
2252
if test "$name" = '$1'; then
2253
LIB[]NAME[]_PREFIX="$basedir"
2255
additional_includedir="$basedir/include"
2258
if test "X$additional_includedir" != "X"; then
2259
dnl Potentially add $additional_includedir to $INCNAME.
2260
dnl But don't add it
2261
dnl 1. if it's the standard /usr/include,
2262
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
2263
dnl 3. if it's already present in $CPPFLAGS or the already
2264
dnl constructed $INCNAME,
2265
dnl 4. if it doesn't exist as a directory.
2266
if test "X$additional_includedir" != "X/usr/include"; then
2268
if test "X$additional_includedir" = "X/usr/local/include"; then
2269
if test -n "$GCC"; then
2271
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
2275
if test -z "$haveit"; then
2276
for x in $CPPFLAGS $INC[]NAME; do
2277
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2278
if test "X$x" = "X-I$additional_includedir"; then
2283
if test -z "$haveit"; then
2284
if test -d "$additional_includedir"; then
2285
dnl Really add $additional_includedir to $INCNAME.
2286
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
2292
dnl Look for dependencies.
2293
if test -n "$found_la"; then
2294
dnl Read the .la file. It defines the variables
2295
dnl dlname, library_names, old_library, dependency_libs, current,
2296
dnl age, revision, installed, dlopen, dlpreopen, libdir.
2297
save_libdir="$libdir"
2299
*/* | *\\*) . "$found_la" ;;
2300
*) . "./$found_la" ;;
2302
libdir="$save_libdir"
2303
dnl We use only dependency_libs.
2304
for dep in $dependency_libs; do
2307
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
2308
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
2309
dnl But don't add it
2310
dnl 1. if it's the standard /usr/lib,
2311
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
2312
dnl 3. if it's already present in $LDFLAGS or the already
2313
dnl constructed $LIBNAME,
2314
dnl 4. if it doesn't exist as a directory.
2315
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
2316
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
2318
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
2319
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
2320
if test -n "$GCC"; then
2322
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
2326
if test -z "$haveit"; then
2328
for x in $LDFLAGS $LIB[]NAME; do
2329
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2330
if test "X$x" = "X-L$additional_libdir"; then
2335
if test -z "$haveit"; then
2336
if test -d "$additional_libdir"; then
2337
dnl Really add $additional_libdir to $LIBNAME.
2338
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
2342
for x in $LDFLAGS $LTLIB[]NAME; do
2343
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2344
if test "X$x" = "X-L$additional_libdir"; then
2349
if test -z "$haveit"; then
2350
if test -d "$additional_libdir"; then
2351
dnl Really add $additional_libdir to $LTLIBNAME.
2352
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
2359
dir=`echo "X$dep" | sed -e 's/^X-R//'`
2360
if test "$enable_rpath" != no; then
2361
dnl Potentially add DIR to rpathdirs.
2362
dnl The rpathdirs will be appended to $LIBNAME at the end.
2364
for x in $rpathdirs; do
2365
if test "X$x" = "X$dir"; then
2370
if test -z "$haveit"; then
2371
rpathdirs="$rpathdirs $dir"
2373
dnl Potentially add DIR to ltrpathdirs.
2374
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2376
for x in $ltrpathdirs; do
2377
if test "X$x" = "X$dir"; then
2382
if test -z "$haveit"; then
2383
ltrpathdirs="$ltrpathdirs $dir"
2388
dnl Handle this in the next round.
2389
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
2392
dnl Handle this in the next round. Throw away the .la's
2393
dnl directory; it is already contained in a preceding -L
2395
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
2398
dnl Most likely an immediate library name.
2399
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
2400
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
2406
dnl Didn't find the library; assume it is in the system directories
2407
dnl known to the linker and runtime loader. (All the system
2408
dnl directories known to the linker should also be known to the
2409
dnl runtime loader, otherwise the system is severely misconfigured.)
2410
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2411
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
2417
if test "X$rpathdirs" != "X"; then
2418
if test -n "$acl_hardcode_libdir_separator"; then
2419
dnl Weird platform: only the last -rpath option counts, the user must
2420
dnl pass all path elements in one option. We can arrange that for a
2421
dnl single library, but not when more than one $LIBNAMEs are used.
2423
for found_dir in $rpathdirs; do
2424
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
2426
dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
2427
acl_save_libdir="$libdir"
2429
eval flag=\"$acl_hardcode_libdir_flag_spec\"
2430
libdir="$acl_save_libdir"
2431
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2433
dnl The -rpath options are cumulative.
2434
for found_dir in $rpathdirs; do
2435
acl_save_libdir="$libdir"
2437
eval flag=\"$acl_hardcode_libdir_flag_spec\"
2438
libdir="$acl_save_libdir"
2439
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2443
if test "X$ltrpathdirs" != "X"; then
2444
dnl When using libtool, the option that works for both libraries and
2445
dnl executables is -R. The -R options are cumulative.
2446
for found_dir in $ltrpathdirs; do
2447
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
2457
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
2458
dnl unless already present in VAR.
2459
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
2460
dnl contains two or three consecutive elements that belong together.
2461
AC_DEFUN([AC_LIB_APPENDTOVAR],
2463
for element in [$2]; do
2466
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2467
if test "X$x" = "X$element"; then
2472
if test -z "$haveit"; then
2473
[$1]="${[$1]}${[$1]:+ }$element"
2478
dnl For those cases where a variable contains several -L and -l options
2479
dnl referring to unknown libraries and directories, this macro determines the
2480
dnl necessary additional linker options for the runtime path.
2481
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
2482
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
2483
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
2484
dnl otherwise linking without libtool is assumed.
2485
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
2487
AC_REQUIRE([AC_LIB_RPATH])
2488
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
2490
if test "$enable_rpath" != no; then
2491
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
2492
dnl Use an explicit option to hardcode directories into the resulting
2497
if test -n "$next"; then
2499
dnl No need to hardcode the standard /usr/lib.
2500
if test "X$dir" != "X/usr/$acl_libdirstem" \
2501
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
2502
rpathdirs="$rpathdirs $dir"
2508
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
2509
dnl No need to hardcode the standard /usr/lib.
2510
if test "X$dir" != "X/usr/$acl_libdirstem" \
2511
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
2512
rpathdirs="$rpathdirs $dir"
2519
if test "X$rpathdirs" != "X"; then
2520
if test -n ""$3""; then
2521
dnl libtool is used for linking. Use -R options.
2522
for dir in $rpathdirs; do
2523
$1="${$1}${$1:+ }-R$dir"
2526
dnl The linker is used for linking directly.
2527
if test -n "$acl_hardcode_libdir_separator"; then
2528
dnl Weird platform: only the last -rpath option counts, the user
2529
dnl must pass all path elements in one option.
2531
for dir in $rpathdirs; do
2532
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
2534
acl_save_libdir="$libdir"
2536
eval flag=\"$acl_hardcode_libdir_flag_spec\"
2537
libdir="$acl_save_libdir"
2540
dnl The -rpath options are cumulative.
2541
for dir in $rpathdirs; do
2542
acl_save_libdir="$libdir"
2544
eval flag=\"$acl_hardcode_libdir_flag_spec\"
2545
libdir="$acl_save_libdir"
2546
$1="${$1}${$1:+ }$flag"
2556
# lib-prefix.m4 serial 7 (gettext-0.18)
2557
dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
2558
dnl This file is free software; the Free Software Foundation
2559
dnl gives unlimited permission to copy and/or distribute it,
2560
dnl with or without modifications, as long as this notice is preserved.
2562
dnl From Bruno Haible.
2564
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
2565
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
2566
dnl require excessive bracketing.
2567
ifdef([AC_HELP_STRING],
2568
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
2569
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
2571
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
2572
dnl to access previously installed libraries. The basic assumption is that
2573
dnl a user will want packages to use other packages he previously installed
2574
dnl with the same --prefix option.
2575
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
2576
dnl libraries, but is otherwise very convenient.
2577
AC_DEFUN([AC_LIB_PREFIX],
2579
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
2580
AC_REQUIRE([AC_PROG_CC])
2581
AC_REQUIRE([AC_CANONICAL_HOST])
2582
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
2583
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2584
dnl By default, look in $includedir and $libdir.
2586
AC_LIB_WITH_FINAL_PREFIX([
2587
eval additional_includedir=\"$includedir\"
2588
eval additional_libdir=\"$libdir\"
2590
AC_LIB_ARG_WITH([lib-prefix],
2591
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
2592
--without-lib-prefix don't search for libraries in includedir and libdir],
2594
if test "X$withval" = "Xno"; then
2597
if test "X$withval" = "X"; then
2598
AC_LIB_WITH_FINAL_PREFIX([
2599
eval additional_includedir=\"$includedir\"
2600
eval additional_libdir=\"$libdir\"
2603
additional_includedir="$withval/include"
2604
additional_libdir="$withval/$acl_libdirstem"
2608
if test $use_additional = yes; then
2609
dnl Potentially add $additional_includedir to $CPPFLAGS.
2610
dnl But don't add it
2611
dnl 1. if it's the standard /usr/include,
2612
dnl 2. if it's already present in $CPPFLAGS,
2613
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
2614
dnl 4. if it doesn't exist as a directory.
2615
if test "X$additional_includedir" != "X/usr/include"; then
2617
for x in $CPPFLAGS; do
2618
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2619
if test "X$x" = "X-I$additional_includedir"; then
2624
if test -z "$haveit"; then
2625
if test "X$additional_includedir" = "X/usr/local/include"; then
2626
if test -n "$GCC"; then
2628
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
2632
if test -z "$haveit"; then
2633
if test -d "$additional_includedir"; then
2634
dnl Really add $additional_includedir to $CPPFLAGS.
2635
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
2640
dnl Potentially add $additional_libdir to $LDFLAGS.
2641
dnl But don't add it
2642
dnl 1. if it's the standard /usr/lib,
2643
dnl 2. if it's already present in $LDFLAGS,
2644
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
2645
dnl 4. if it doesn't exist as a directory.
2646
if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
2648
for x in $LDFLAGS; do
2649
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2650
if test "X$x" = "X-L$additional_libdir"; then
2655
if test -z "$haveit"; then
2656
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
2657
if test -n "$GCC"; then
2659
linux*) haveit=yes;;
2663
if test -z "$haveit"; then
2664
if test -d "$additional_libdir"; then
2665
dnl Really add $additional_libdir to $LDFLAGS.
2666
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
2674
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
2675
dnl acl_final_exec_prefix, containing the values to which $prefix and
2676
dnl $exec_prefix will expand at the end of the configure script.
2677
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
2679
dnl Unfortunately, prefix and exec_prefix get only finally determined
2680
dnl at the end of configure.
2681
if test "X$prefix" = "XNONE"; then
2682
acl_final_prefix="$ac_default_prefix"
2684
acl_final_prefix="$prefix"
2686
if test "X$exec_prefix" = "XNONE"; then
2687
acl_final_exec_prefix='${prefix}'
2689
acl_final_exec_prefix="$exec_prefix"
2691
acl_save_prefix="$prefix"
2692
prefix="$acl_final_prefix"
2693
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
2694
prefix="$acl_save_prefix"
2697
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
2698
dnl variables prefix and exec_prefix bound to the values they will have
2699
dnl at the end of the configure script.
2700
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
2702
acl_save_prefix="$prefix"
2703
prefix="$acl_final_prefix"
2704
acl_save_exec_prefix="$exec_prefix"
2705
exec_prefix="$acl_final_exec_prefix"
2707
exec_prefix="$acl_save_exec_prefix"
2708
prefix="$acl_save_prefix"
2711
dnl AC_LIB_PREPARE_MULTILIB creates
2712
dnl - a variable acl_libdirstem, containing the basename of the libdir, either
2713
dnl "lib" or "lib64" or "lib/64",
2714
dnl - a variable acl_libdirstem2, as a secondary possible value for
2715
dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
2717
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
2719
dnl There is no formal standard regarding lib and lib64.
2720
dnl On glibc systems, the current practice is that on a system supporting
2721
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
2722
dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
2723
dnl the compiler's default mode by looking at the compiler's library search
2724
dnl path. If at least one of its elements ends in /lib64 or points to a
2725
dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
2726
dnl Otherwise we use the default, namely "lib".
2727
dnl On Solaris systems, the current practice is that on a system supporting
2728
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
2729
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
2730
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
2731
AC_REQUIRE([AC_CANONICAL_HOST])
2736
dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
2737
dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
2738
dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
2739
dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
2740
dnl symlink is missing, so we set acl_libdirstem2 too.
2741
AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
2742
[AC_EGREP_CPP([sixtyfour bits], [
2746
], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
2748
if test $gl_cv_solaris_64bit = yes; then
2749
acl_libdirstem=lib/64
2751
sparc*) acl_libdirstem2=lib/sparcv9 ;;
2752
i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
2757
searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
2758
if test -n "$searchpath"; then
2759
acl_save_IFS="${IFS= }"; IFS=":"
2760
for searchdir in $searchpath; do
2761
if test -d "$searchdir"; then
2762
case "$searchdir" in
2763
*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
2765
# Better ignore directories of this form. They are misleading.
2767
*) searchdir=`cd "$searchdir" && pwd`
2768
case "$searchdir" in
2769
*/lib64 ) acl_libdirstem=lib64 ;;
2778
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
984
2781
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
986
2783
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
987
# 2006, 2007, 2008 Free Software Foundation, Inc.
2784
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
988
2786
# Written by Gordon Matzigkeit, 1996
990
2788
# This file is free software; the Free Software Foundation gives
9096
10985
Consider adjusting the PKG_CONFIG_PATH environment variable if you
9097
10986
installed software in a non-standard prefix.
9101
[AC_MSG_RESULT([no])
9103
10990
elif test $pkg_failed = untried; then
9104
ifelse([$4], , [AC_MSG_FAILURE(dnl
10991
AC_MSG_RESULT([no])
10992
m4_default([$4], [AC_MSG_FAILURE(
9105
10993
[The pkg-config script could not be found or is too old. Make sure it
9106
10994
is in your PATH or set the PKG_CONFIG environment variable to the full
9107
10995
path to pkg-config.
9111
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
10999
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
9114
11002
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9115
11003
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9116
11004
AC_MSG_RESULT([yes])
9117
ifelse([$3], , :, [$3])
9119
11007
])# PKG_CHECK_MODULES
9121
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
9123
# This file is free software; the Free Software Foundation
9124
# gives unlimited permission to copy and/or distribute it,
9125
# with or without modifications, as long as this notice is preserved.
9127
# AM_AUTOMAKE_VERSION(VERSION)
9128
# ----------------------------
9129
# Automake X.Y traces this macro to ensure aclocal.m4 has been
9130
# generated from the m4 files accompanying Automake X.Y.
9131
# (This private macro should not be called outside this file.)
9132
AC_DEFUN([AM_AUTOMAKE_VERSION],
9133
[am__api_version='1.11'
9134
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9135
dnl require some minimum version. Point them to the right macro.
9136
m4_if([$1], [1.11], [],
9137
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9140
# _AM_AUTOCONF_VERSION(VERSION)
9141
# -----------------------------
9142
# aclocal traces this macro to find the Autoconf version.
9143
# This is a private macro too. Using m4_define simplifies
9144
# the logic in aclocal, which can simply ignore this definition.
9145
m4_define([_AM_AUTOCONF_VERSION], [])
9147
# AM_SET_CURRENT_AUTOMAKE_VERSION
9148
# -------------------------------
9149
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9150
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9151
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9152
[AM_AUTOMAKE_VERSION([1.11])dnl
9153
m4_ifndef([AC_AUTOCONF_VERSION],
9154
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9155
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9157
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
9159
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9161
# This file is free software; the Free Software Foundation
9162
# gives unlimited permission to copy and/or distribute it,
9163
# with or without modifications, as long as this notice is preserved.
9165
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9166
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
9167
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9169
# Of course, Automake must honor this variable whenever it calls a
9170
# tool from the auxiliary directory. The problem is that $srcdir (and
9171
# therefore $ac_aux_dir as well) can be either absolute or relative,
9172
# depending on how configure is run. This is pretty annoying, since
9173
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
9174
# source directory, any form will work fine, but in subdirectories a
9175
# relative path needs to be adjusted first.
9177
# $ac_aux_dir/missing
9178
# fails when called from a subdirectory if $ac_aux_dir is relative
9179
# $top_srcdir/$ac_aux_dir/missing
9180
# fails if $ac_aux_dir is absolute,
9181
# fails when called from a subdirectory in a VPATH build with
9182
# a relative $ac_aux_dir
9184
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9185
# are both prefixed by $srcdir. In an in-source build this is usually
9186
# harmless because $srcdir is `.', but things will broke when you
9187
# start a VPATH build or use an absolute $srcdir.
9189
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9190
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
9191
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9192
# and then we would define $MISSING as
9193
# MISSING="\${SHELL} $am_aux_dir/missing"
9194
# This will work as long as MISSING is not called from configure, because
9195
# unfortunately $(top_srcdir) has no meaning in configure.
9196
# However there are other variables, like CC, which are often used in
9197
# configure, and could therefore not use this "fixed" $ac_aux_dir.
9199
# Another solution, used here, is to always expand $ac_aux_dir to an
9200
# absolute PATH. The drawback is that using absolute paths prevent a
9201
# configured tree to be moved without reconfiguration.
9203
AC_DEFUN([AM_AUX_DIR_EXPAND],
9204
[dnl Rely on autoconf to set up CDPATH properly.
9205
AC_PREREQ([2.50])dnl
9206
# expand $ac_aux_dir to an absolute path
9207
am_aux_dir=`cd $ac_aux_dir && pwd`
9210
# AM_CONDITIONAL -*- Autoconf -*-
9212
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9213
# Free Software Foundation, Inc.
9215
# This file is free software; the Free Software Foundation
9216
# gives unlimited permission to copy and/or distribute it,
9217
# with or without modifications, as long as this notice is preserved.
9221
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
9222
# -------------------------------------
9223
# Define a conditional.
9224
AC_DEFUN([AM_CONDITIONAL],
9226
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
9227
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9228
AC_SUBST([$1_TRUE])dnl
9229
AC_SUBST([$1_FALSE])dnl
9230
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9231
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
9232
m4_define([_AM_COND_VALUE_$1], [$2])dnl
9240
AC_CONFIG_COMMANDS_PRE(
9241
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9242
AC_MSG_ERROR([[conditional "$1" was never defined.
9243
Usually this means the macro was only invoked conditionally.]])
9246
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9247
# Free Software Foundation, Inc.
9249
# This file is free software; the Free Software Foundation
9250
# gives unlimited permission to copy and/or distribute it,
9251
# with or without modifications, as long as this notice is preserved.
9255
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9256
# written in clear, in which case automake, when reading aclocal.m4,
9257
# will think it sees a *use*, and therefore will trigger all it's
9258
# C support machinery. Also note that it means that autoscan, seeing
9259
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9262
# _AM_DEPENDENCIES(NAME)
9263
# ----------------------
9264
# See how the compiler implements dependency checking.
9265
# NAME is "CC", "CXX", "GCJ", or "OBJC".
9266
# We try a few techniques and use that to set a single cache variable.
9268
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9269
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9270
# dependency, and given that the user is not expected to run this macro,
9271
# just rely on AC_PROG_CC.
9272
AC_DEFUN([_AM_DEPENDENCIES],
9273
[AC_REQUIRE([AM_SET_DEPDIR])dnl
9274
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9275
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9276
AC_REQUIRE([AM_DEP_TRACK])dnl
9278
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
9279
[$1], CXX, [depcc="$CXX" am_compiler_list=],
9280
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9281
[$1], UPC, [depcc="$UPC" am_compiler_list=],
9282
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
9283
[depcc="$$1" am_compiler_list=])
9285
AC_CACHE_CHECK([dependency style of $depcc],
9286
[am_cv_$1_dependencies_compiler_type],
9287
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9288
# We make a subdir and do the tests there. Otherwise we can end up
9289
# making bogus files that we don't know about and never remove. For
9290
# instance it was reported that on HP-UX the gcc test will end up
9291
# making a dummy file named `D' -- because `-MD' means `put the output
9294
# Copy depcomp to subdir because otherwise we won't find it if we're
9295
# using a relative directory.
9296
cp "$am_depcomp" conftest.dir
9298
# We will build objects and dependencies in a subdirectory because
9299
# it helps to detect inapplicable dependency modes. For instance
9300
# both Tru64's cc and ICC support -MD to output dependencies as a
9301
# side effect of compilation, but ICC will put the dependencies in
9302
# the current directory while Tru64 will put them in the object
9306
am_cv_$1_dependencies_compiler_type=none
9307
if test "$am_compiler_list" = ""; then
9308
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9312
[case " $depcc " in #(
9313
*\ -arch\ *\ -arch\ *) am__universal=true ;;
9316
[case " $depcc " in #(
9317
*\ -arch\ *\ -arch\ *) am__universal=true ;;
9320
for depmode in $am_compiler_list; do
9321
# Setup a source with many dependencies, because some compilers
9322
# like to wrap large dependency lists on column 80 (with \), and
9323
# we should not choose a depcomp mode which is confused by this.
9325
# We need to recreate these files for each test, as the compiler may
9326
# overwrite some of them when testing with obscure command lines.
9327
# This happens at least with the AIX C compiler.
9329
for i in 1 2 3 4 5 6; do
9330
echo '#include "conftst'$i'.h"' >> sub/conftest.c
9331
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9332
# Solaris 8's {/usr,}/bin/sh.
9333
touch sub/conftst$i.h
9335
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9337
# We check with `-c' and `-o' for the sake of the "dashmstdout"
9338
# mode. It turns out that the SunPro C++ compiler does not properly
9339
# handle `-M -o', and we need to detect this. Also, some Intel
9340
# versions had trouble with output in subdirs
9341
am__obj=sub/conftest.${OBJEXT-o}
9342
am__minus_obj="-o $am__obj"
9345
# This depmode causes a compiler race in universal mode.
9346
test "$am__universal" = false || continue
9349
# after this tag, mechanisms are not by side-effect, so they'll
9350
# only be used when explicitly requested
9351
if test "x$enable_dependency_tracking" = xyes; then
11009
# po.m4 serial 17 (gettext-0.18)
11010
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
11011
dnl This file is free software; the Free Software Foundation
11012
dnl gives unlimited permission to copy and/or distribute it,
11013
dnl with or without modifications, as long as this notice is preserved.
11015
dnl This file can can be used in projects which are not available under
11016
dnl the GNU General Public License or the GNU Library General Public
11017
dnl License but which still want to provide support for the GNU gettext
11019
dnl Please note that the actual code of the GNU gettext library is covered
11020
dnl by the GNU Library General Public License, and the rest of the GNU
11021
dnl gettext package package is covered by the GNU General Public License.
11022
dnl They are *not* in the public domain.
11025
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
11026
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
11030
dnl Checks for all prerequisites of the po subdirectory.
11031
AC_DEFUN([AM_PO_SUBDIRS],
11033
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
11034
AC_REQUIRE([AC_PROG_INSTALL])dnl
11035
AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
11036
AC_REQUIRE([AM_NLS])dnl
11038
dnl Release version of the gettext macros. This is used to ensure that
11039
dnl the gettext macros and po/Makefile.in.in are in sync.
11040
AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
11042
dnl Perform the following tests also if --disable-nls has been given,
11043
dnl because they are needed for "make dist" to work.
11045
dnl Search for GNU msgfmt in the PATH.
11046
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
11047
dnl The second test excludes FreeBSD msgfmt.
11048
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
11049
[$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
11050
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
11052
AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
11054
dnl Test whether it is GNU msgfmt >= 0.15.
11056
case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
11057
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
11058
*) MSGFMT_015=$MSGFMT ;;
11060
changequote([,])dnl
11061
AC_SUBST([MSGFMT_015])
11063
case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
11064
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
11065
*) GMSGFMT_015=$GMSGFMT ;;
11067
changequote([,])dnl
11068
AC_SUBST([GMSGFMT_015])
11070
dnl Search for GNU xgettext 0.12 or newer in the PATH.
11071
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
11072
dnl The second test excludes FreeBSD xgettext.
11073
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
11074
[$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
11075
(if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
11077
dnl Remove leftover from FreeBSD xgettext call.
11080
dnl Test whether it is GNU xgettext >= 0.15.
11082
case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
11083
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
11084
*) XGETTEXT_015=$XGETTEXT ;;
11086
changequote([,])dnl
11087
AC_SUBST([XGETTEXT_015])
11089
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
11090
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
11091
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
11093
dnl Installation directories.
11094
dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
11095
dnl have to define it here, so that it can be used in po/Makefile.
11096
test -n "$localedir" || localedir='${datadir}/locale'
11097
AC_SUBST([localedir])
11099
dnl Support for AM_XGETTEXT_OPTION.
11100
test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
11101
AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
11103
AC_CONFIG_COMMANDS([po-directories], [[
11104
for ac_file in $CONFIG_FILES; do
11105
# Support "outfile[:infile[:infile...]]"
11107
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11109
# PO directories have a Makefile.in generated from Makefile.in.in.
11110
case "$ac_file" in */Makefile.in)
11111
# Adjust a relative srcdir.
11112
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
11113
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
11114
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
11115
# In autoconf-2.13 it is called $ac_given_srcdir.
11116
# In autoconf-2.50 it is called $srcdir.
11117
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
11118
case "$ac_given_srcdir" in
11119
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
11120
/*) top_srcdir="$ac_given_srcdir" ;;
11121
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
11123
# Treat a directory as a PO directory if and only if it has a
11124
# POTFILES.in file. This allows packages to have multiple PO
11125
# directories under different names or in different locations.
11126
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
11127
rm -f "$ac_dir/POTFILES"
11128
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
11129
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
11130
POMAKEFILEDEPS="POTFILES.in"
11131
# ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
11132
# on $ac_dir but don't depend on user-specified configuration
11134
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
11135
# The LINGUAS file contains the set of available languages.
11136
if test -n "$OBSOLETE_ALL_LINGUAS"; then
11137
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
11139
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
11140
# Hide the ALL_LINGUAS assigment from automake < 1.5.
11141
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
11142
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
11144
# The set of available languages was given in configure.in.
11145
# Hide the ALL_LINGUAS assigment from automake < 1.5.
11146
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
11149
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
11150
# Compute UPDATEPOFILES
11151
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
11152
# Compute DUMMYPOFILES
11153
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
11155
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
11156
case "$ac_given_srcdir" in
11158
*) srcdirpre='$(srcdir)/' ;;
11164
for lang in $ALL_LINGUAS; do
11165
POFILES="$POFILES $srcdirpre$lang.po"
11166
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
11167
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
11168
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
11170
# CATALOGS depends on both $ac_dir and the user's LINGUAS
11171
# environment variable.
11173
if test -n "$ALL_LINGUAS"; then
11174
for presentlang in $ALL_LINGUAS; do
11176
if test "%UNSET%" != "$LINGUAS"; then
11177
desiredlanguages="$LINGUAS"
11179
desiredlanguages="$ALL_LINGUAS"
11181
for desiredlang in $desiredlanguages; do
11182
# Use the presentlang catalog if desiredlang is
11183
# a. equal to presentlang, or
11184
# b. a variant of presentlang (because in this case,
11185
# presentlang can be used as a fallback for messages
11186
# which are not translated in the desiredlang catalog).
11187
case "$desiredlang" in
11188
"$presentlang"*) useit=yes;;
11191
if test $useit = yes; then
11192
INST_LINGUAS="$INST_LINGUAS $presentlang"
11197
if test -n "$INST_LINGUAS"; then
11198
for lang in $INST_LINGUAS; do
11199
CATALOGS="$CATALOGS $lang.gmo"
11202
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
11203
sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
11204
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
11205
if test -f "$f"; then
11207
*.orig | *.bak | *~) ;;
11208
*) cat "$f" >> "$ac_dir/Makefile" ;;
11216
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
11217
# POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
11218
# from automake < 1.5.
11219
eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
11220
# Capture the value of LINGUAS because we need it to compute CATALOGS.
11221
LINGUAS="${LINGUAS-%UNSET%}"
11225
dnl Postprocesses a Makefile in a directory containing PO files.
11226
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
11228
# When this code is run, in config.status, two variables have already been
11230
# - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
11231
# - LINGUAS is the value of the environment variable LINGUAS at configure
11235
# Adjust a relative srcdir.
11236
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
11237
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
11238
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
11239
# In autoconf-2.13 it is called $ac_given_srcdir.
11240
# In autoconf-2.50 it is called $srcdir.
11241
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
11242
case "$ac_given_srcdir" in
11243
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
11244
/*) top_srcdir="$ac_given_srcdir" ;;
11245
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
11248
# Find a way to echo strings without interpreting backslash.
11249
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
11252
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
11253
gt_echo='printf %s\n'
11260
gt_echo='echo_func'
11264
# A sed script that extracts the value of VARIABLE from a Makefile.
11266
# Test if the hold space is empty.
11271
# Yes it was empty. Look if we have the expected variable definition.
11272
/^[ ]*VARIABLE[ ]*=/{
11273
# Seen the first line of the variable definition.
11274
s/^[ ]*VARIABLE[ ]*=//
11279
# Here we are processing a line from the variable definition.
11280
# Remove comment, more precisely replace it with a space.
11282
# See if the line ends in a backslash.
11286
# Print the line, without the trailing backslash.
11289
# There was no trailing backslash. The end of the variable definition is
11290
# reached. Clear the hold space.
11295
# A trailing backslash means that the variable definition continues in the
11296
# next line. Put a nonempty string into the hold space to indicate this.
11301
changequote([,])dnl
11303
# Set POTFILES to the value of the Makefile variable POTFILES.
11304
sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
11305
POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
11306
# Compute POTFILES_DEPS as
11307
# $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
11309
for file in $POTFILES; do
11310
POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
11314
if test -n "$OBSOLETE_ALL_LINGUAS"; then
11315
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
11317
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
11318
# The LINGUAS file contains the set of available languages.
11319
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
11320
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
11322
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
11323
sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
11324
ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
11326
# Hide the ALL_LINGUAS assigment from automake < 1.5.
11327
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
11329
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
11330
# Compute UPDATEPOFILES
11331
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
11332
# Compute DUMMYPOFILES
11333
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
11335
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
11336
# Compute PROPERTIESFILES
11337
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
11338
# Compute CLASSFILES
11339
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
11341
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
11343
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
11344
# Compute RESOURCESDLLFILES
11345
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
11346
case "$ac_given_srcdir" in
11348
*) srcdirpre='$(srcdir)/' ;;
11359
for lang in $ALL_LINGUAS; do
11360
POFILES="$POFILES $srcdirpre$lang.po"
11361
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
11362
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
11363
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
11364
PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
11365
CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
11366
QMFILES="$QMFILES $srcdirpre$lang.qm"
11367
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
11368
MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
11369
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
11370
RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
11372
# CATALOGS depends on both $ac_dir and the user's LINGUAS
11373
# environment variable.
11375
if test -n "$ALL_LINGUAS"; then
11376
for presentlang in $ALL_LINGUAS; do
11378
if test "%UNSET%" != "$LINGUAS"; then
11379
desiredlanguages="$LINGUAS"
9357
msvisualcpp | msvcmsys)
9358
# This compiler won't grok `-c -o', but also, the minuso test has
9359
# not run yet. These depmodes are late enough in the game, and
9360
# so weak that their functioning should not be impacted.
9361
am__obj=conftest.${OBJEXT-o}
11381
desiredlanguages="$ALL_LINGUAS"
11383
for desiredlang in $desiredlanguages; do
11384
# Use the presentlang catalog if desiredlang is
11385
# a. equal to presentlang, or
11386
# b. a variant of presentlang (because in this case,
11387
# presentlang can be used as a fallback for messages
11388
# which are not translated in the desiredlang catalog).
11389
case "$desiredlang" in
11390
"$presentlang"*) useit=yes;;
11393
if test $useit = yes; then
11394
INST_LINGUAS="$INST_LINGUAS $presentlang"
11403
if test -n "$INST_LINGUAS"; then
11404
for lang in $INST_LINGUAS; do
11405
CATALOGS="$CATALOGS $lang.gmo"
11406
JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
11407
QTCATALOGS="$QTCATALOGS $lang.qm"
11408
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
11409
TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
11410
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
11411
CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
11415
sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
11416
if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
11417
# Add dependencies that cannot be formulated as a simple suffix rule.
11418
for lang in $ALL_LINGUAS; do
11419
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
11420
cat >> "$ac_file.tmp" <<EOF
11421
$frobbedlang.msg: $lang.po
11422
@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
11423
\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
11427
if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
11428
# Add dependencies that cannot be formulated as a simple suffix rule.
11429
for lang in $ALL_LINGUAS; do
11430
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
11431
cat >> "$ac_file.tmp" <<EOF
11432
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
11433
@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
11434
\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
11438
if test -n "$POMAKEFILEDEPS"; then
11439
cat >> "$ac_file.tmp" <<EOF
11440
Makefile: $POMAKEFILEDEPS
11443
mv "$ac_file.tmp" "$ac_file"
11446
dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
11447
AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
11449
XGETTEXT_EXTRA_OPTIONS=
11452
dnl Registers an option to be passed to xgettext in the po subdirectory.
11453
AC_DEFUN([AM_XGETTEXT_OPTION],
11455
AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
11456
XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
11459
# progtest.m4 serial 6 (gettext-0.18)
11460
dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc.
11461
dnl This file is free software; the Free Software Foundation
11462
dnl gives unlimited permission to copy and/or distribute it,
11463
dnl with or without modifications, as long as this notice is preserved.
11465
dnl This file can can be used in projects which are not available under
11466
dnl the GNU General Public License or the GNU Library General Public
11467
dnl License but which still want to provide support for the GNU gettext
11469
dnl Please note that the actual code of the GNU gettext library is covered
11470
dnl by the GNU Library General Public License, and the rest of the GNU
11471
dnl gettext package package is covered by the GNU General Public License.
11472
dnl They are *not* in the public domain.
11475
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
11479
# Search path for a program which passes the given test.
11481
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
11482
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
11483
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
11485
# Prepare PATH_SEPARATOR.
11486
# The user is always right.
11487
if test "${PATH_SEPARATOR+set}" != set; then
11488
echo "#! /bin/sh" >conf$$.sh
11489
echo "exit 0" >>conf$$.sh
11491
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11499
# Find out how to test for executable files. Don't use a zero-byte file,
11500
# as systems may use methods other than mode bits to determine executability.
11501
cat >conf$$.file <<_ASEOF
11505
chmod +x conf$$.file
11506
if test -x conf$$.file >/dev/null 2>&1; then
11507
ac_executable_p="test -x"
11509
ac_executable_p="test -f"
11513
# Extract the first word of "$2", so it can be a program name with args.
11514
set dummy $2; ac_word=[$]2
11515
AC_MSG_CHECKING([for $ac_word])
11516
AC_CACHE_VAL([ac_cv_path_$1],
11518
[[\\/]]* | ?:[[\\/]]*)
11519
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
11522
ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11523
for ac_dir in ifelse([$5], , $PATH, [$5]); do
11525
test -z "$ac_dir" && ac_dir=.
11526
for ac_exec_ext in '' $ac_executable_extensions; do
11527
if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11528
echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
11530
ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
11537
dnl If no 4th arg is given, leave the cache variable unset,
11538
dnl so AC_PATH_PROGS will keep looking.
11539
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
11543
$1="$ac_cv_path_$1"
11544
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
11545
AC_MSG_RESULT([$][$1])
11547
AC_MSG_RESULT([no])
11557
dnl GNOME_COMMON_INIT
11559
AU_DEFUN([GNOME_COMMON_INIT],
11561
dnl this macro should come after AC_CONFIG_MACRO_DIR
11562
AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
11564
dnl ensure that when the Automake generated makefile calls aclocal,
11565
dnl it honours the $ACLOCAL_FLAGS environment variable
11566
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
11567
if test -n "$ac_macro_dir"; then
11568
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
11571
AC_SUBST([ACLOCAL_AMFLAGS])
11573
[[$0: This macro is deprecated. You should set put "ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}"
11574
in your top-level Makefile.am, instead, where "m4" is the macro directory set
11575
with AC_CONFIG_MACRO_DIR() in your configure.ac]])
11577
AC_DEFUN([GNOME_DEBUG_CHECK],
11579
AC_ARG_ENABLE([debug],
11580
AC_HELP_STRING([--enable-debug],
11581
[turn on debugging]),,
11584
if test x$enable_debug = xyes ; then
11585
AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
11586
[Enable additional debugging at the expense of performance and size])
11590
dnl GNOME_MAINTAINER_MODE_DEFINES ()
11591
dnl define DISABLE_DEPRECATED
11593
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
11595
AC_REQUIRE([AM_MAINTAINER_MODE])
11597
DISABLE_DEPRECATED=""
11598
if test $USE_MAINTAINER_MODE = yes; then
11599
DOMAINS="G ATK PANGO GDK GDK_PIXBUF GTK GCONF BONOBO BONOBO_UI GNOME LIBGLADE VTE GNOME_VFS WNCK LIBSOUP"
11600
for DOMAIN in $DOMAINS; do
11601
DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
11605
AC_SUBST(DISABLE_DEPRECATED)
11608
dnl GNOME_COMPILE_WARNINGS
11609
dnl Turn on many useful compiler warnings
11610
dnl For now, only works on GCC
11611
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
11612
dnl ******************************
11613
dnl More compiler warnings
11614
dnl ******************************
11616
AC_ARG_ENABLE(compile-warnings,
11617
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
11618
[Turn on compiler warnings]),,
11619
[enable_compile_warnings="m4_default([$1],[yes])"])
11622
if test "x$GCC" != xyes; then
11623
enable_compile_warnings=no
11627
realsave_CFLAGS="$CFLAGS"
11629
case "$enable_compile_warnings" in
11634
warning_flags="-Wall"
11637
warning_flags="-Wall -Wmissing-prototypes"
11640
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
11641
CFLAGS="$warning_flags $CFLAGS"
11642
for option in -Wno-sign-compare; do
11643
SAVE_CFLAGS="$CFLAGS"
11644
CFLAGS="$CFLAGS $option"
11645
AC_MSG_CHECKING([whether gcc understands $option])
11646
AC_TRY_COMPILE([], [],
11649
CFLAGS="$SAVE_CFLAGS"
11650
AC_MSG_RESULT($has_option)
11651
if test $has_option = yes; then
11652
warning_flags="$warning_flags $option"
11658
if test "$enable_compile_warnings" = "error" ; then
11659
warning_flags="$warning_flags -Werror"
11663
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
9366
if depmode=$depmode \
9367
source=sub/conftest.c object=$am__obj \
9368
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9369
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9370
>/dev/null 2>conftest.err &&
9371
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9372
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9373
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9374
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9375
# icc doesn't choke on unknown options, it will just issue warnings
9376
# or remarks (even with -Werror). So we grep stderr for any message
9377
# that says an option was ignored or not supported.
9378
# When given -MP, icc 7.0 and 7.1 complain thusly:
9379
# icc: Command line warning: ignoring option '-M'; no argument required
9380
# The diagnosis changed in icc 8.0:
9381
# icc: Command line remark: option '-MP' not supported
9382
if (grep 'ignoring option' conftest.err ||
9383
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9384
am_cv_$1_dependencies_compiler_type=$depmode
11666
CFLAGS="$realsave_CFLAGS"
11667
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
11668
AC_MSG_RESULT($warning_flags)
11670
AC_ARG_ENABLE(iso-c,
11671
AC_HELP_STRING([--enable-iso-c],
11672
[Try to warn if code is not ISO C ]),,
11675
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
11677
if test "x$enable_iso_c" != "xno"; then
11678
if test "x$GCC" = "xyes"; then
11679
case " $CFLAGS " in
11680
*[\ \ ]-ansi[\ \ ]*) ;;
11681
*) complCFLAGS="$complCFLAGS -ansi" ;;
11683
case " $CFLAGS " in
11684
*[\ \ ]-pedantic[\ \ ]*) ;;
11685
*) complCFLAGS="$complCFLAGS -pedantic" ;;
11689
AC_MSG_RESULT($complCFLAGS)
11691
WARN_CFLAGS="$warning_flags $complCFLAGS"
11692
AC_SUBST(WARN_CFLAGS)
11695
dnl For C++, do basically the same thing.
11697
AC_DEFUN([GNOME_CXX_WARNINGS],[
11698
AC_ARG_ENABLE(cxx-warnings,
11699
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
11700
[Turn on compiler warnings.]),,
11701
[enable_cxx_warnings="m4_default([$1],[minimum])"])
11703
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
11705
if test "x$GXX" != xyes; then
11706
enable_cxx_warnings=no
11708
if test "x$enable_cxx_warnings" != "xno"; then
11709
if test "x$GXX" = "xyes"; then
11710
case " $CXXFLAGS " in
11711
*[\ \ ]-Wall[\ \ ]*) ;;
11712
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
11715
## -W is not all that useful. And it cannot be controlled
11716
## with individual -Wno-xxx flags, unlike -Wall
11717
if test "x$enable_cxx_warnings" = "xyes"; then
11718
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
9393
am_cv_$1_dependencies_compiler_type=none
9396
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9397
AM_CONDITIONAL([am__fastdep$1], [
9398
test "x$enable_dependency_tracking" != xno \
9399
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9405
# Choose a directory name for dependency files.
9406
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9407
AC_DEFUN([AM_SET_DEPDIR],
9408
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9409
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9415
AC_DEFUN([AM_DEP_TRACK],
9416
[AC_ARG_ENABLE(dependency-tracking,
9417
[ --disable-dependency-tracking speeds up one-time build
9418
--enable-dependency-tracking do not reject slow dependency extractors])
9419
if test "x$enable_dependency_tracking" != xno; then
9420
am_depcomp="$ac_aux_dir/depcomp"
9423
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9424
AC_SUBST([AMDEPBACKSLASH])dnl
9425
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9428
# Generate code to set up dependency tracking. -*- Autoconf -*-
9430
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9431
# Free Software Foundation, Inc.
9433
# This file is free software; the Free Software Foundation
9434
# gives unlimited permission to copy and/or distribute it,
9435
# with or without modifications, as long as this notice is preserved.
9439
# _AM_OUTPUT_DEPENDENCY_COMMANDS
9440
# ------------------------------
9441
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9443
# Autoconf 2.62 quotes --file arguments for eval, but not when files
9444
# are listed without --file. Let's play safe and only enable the eval
9445
# if we detect the quoting.
9446
case $CONFIG_FILES in
9447
*\'*) eval set x "$CONFIG_FILES" ;;
9448
*) set x $CONFIG_FILES ;;
9453
# Strip MF so we end up with the name of the file.
9454
mf=`echo "$mf" | sed -e 's/:.*$//'`
9455
# Check whether this is an Automake generated Makefile or not.
9456
# We used to match only the files named `Makefile.in', but
9457
# some people rename them; so instead we look at the file content.
9458
# Grep'ing the first line is not enough: some people post-process
9459
# each Makefile.in and add a new line on top of each file to say so.
9460
# Grep'ing the whole file is not good either: AIX grep has a line
9461
# limit of 2048, but all sed's we know have understand at least 4000.
9462
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9463
dirpart=`AS_DIRNAME("$mf")`
9467
# Extract the definition of DEPDIR, am__include, and am__quote
9468
# from the Makefile without running `make'.
9469
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9470
test -z "$DEPDIR" && continue
9471
am__include=`sed -n 's/^am__include = //p' < "$mf"`
9472
test -z "am__include" && continue
9473
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9474
# When using ansi2knr, U may be empty or an underscore; expand it
9475
U=`sed -n 's/^U = //p' < "$mf"`
9476
# Find all dependency output files, they are included files with
9477
# $(DEPDIR) in their names. We invoke sed twice because it is the
9478
# simplest approach to changing $(DEPDIR) to its actual value in the
9480
for file in `sed -n "
9481
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9482
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9483
# Make sure the directory exists.
9484
test -f "$dirpart/$file" && continue
9485
fdir=`AS_DIRNAME(["$file"])`
9486
AS_MKDIR_P([$dirpart/$fdir])
9487
# echo "creating $dirpart/$file"
9488
echo '# dummy' > "$dirpart/$file"
9492
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9495
# AM_OUTPUT_DEPENDENCY_COMMANDS
9496
# -----------------------------
9497
# This macro should only be invoked once -- use via AC_REQUIRE.
9499
# This code is only required when automatic dependency tracking
9500
# is enabled. FIXME. This creates each `.P' file that we will
9501
# need in order to bootstrap the dependency handling code.
9502
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9503
[AC_CONFIG_COMMANDS([depfiles],
9504
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9505
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9508
# Do all the work for Automake. -*- Autoconf -*-
9510
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9511
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9513
# This file is free software; the Free Software Foundation
9514
# gives unlimited permission to copy and/or distribute it,
9515
# with or without modifications, as long as this notice is preserved.
9519
# This macro actually does too much. Some checks are only needed if
9520
# your package does certain things. But this isn't really a big deal.
9522
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9523
# AM_INIT_AUTOMAKE([OPTIONS])
9524
# -----------------------------------------------
9525
# The call with PACKAGE and VERSION arguments is the old style
9526
# call (pre autoconf-2.50), which is being phased out. PACKAGE
9527
# and VERSION should now be passed to AC_INIT and removed from
9528
# the call to AM_INIT_AUTOMAKE.
9529
# We support both call styles for the transition. After
9530
# the next Automake release, Autoconf can make the AC_INIT
9531
# arguments mandatory, and then we can depend on a new Autoconf
9532
# release and drop the old call support.
9533
AC_DEFUN([AM_INIT_AUTOMAKE],
9534
[AC_PREREQ([2.62])dnl
9535
dnl Autoconf wants to disallow AM_ names. We explicitly allow
9536
dnl the ones we care about.
9537
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9538
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9539
AC_REQUIRE([AC_PROG_INSTALL])dnl
9540
if test "`cd $srcdir && pwd`" != "`pwd`"; then
9541
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9542
# is not polluted with repeated "-I."
9543
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9544
# test to see if srcdir already configured
9545
if test -f $srcdir/config.status; then
9546
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9550
# test whether we have cygpath
9551
if test -z "$CYGPATH_W"; then
9552
if (cygpath --version) >/dev/null 2>/dev/null; then
9553
CYGPATH_W='cygpath -w'
9558
AC_SUBST([CYGPATH_W])
9560
# Define the identity of the package.
9561
dnl Distinguish between old-style and new-style calls.
9563
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9564
AC_SUBST([PACKAGE], [$1])dnl
9565
AC_SUBST([VERSION], [$2])],
9566
[_AM_SET_OPTIONS([$1])dnl
9567
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9568
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9569
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9570
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9571
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9573
_AM_IF_OPTION([no-define],,
9574
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9575
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9577
# Some tools Automake needs.
9578
AC_REQUIRE([AM_SANITY_CHECK])dnl
9579
AC_REQUIRE([AC_ARG_PROGRAM])dnl
9580
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9581
AM_MISSING_PROG(AUTOCONF, autoconf)
9582
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9583
AM_MISSING_PROG(AUTOHEADER, autoheader)
9584
AM_MISSING_PROG(MAKEINFO, makeinfo)
9585
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9586
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9587
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9588
# We need awk for the "check" target. The system "awk" is bad on
9590
AC_REQUIRE([AC_PROG_AWK])dnl
9591
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9592
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9593
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9594
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9595
[_AM_PROG_TAR([v7])])])
9596
_AM_IF_OPTION([no-dependencies],,
9597
[AC_PROVIDE_IFELSE([AC_PROG_CC],
9598
[_AM_DEPENDENCIES(CC)],
9599
[define([AC_PROG_CC],
9600
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9601
AC_PROVIDE_IFELSE([AC_PROG_CXX],
9602
[_AM_DEPENDENCIES(CXX)],
9603
[define([AC_PROG_CXX],
9604
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9605
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9606
[_AM_DEPENDENCIES(OBJC)],
9607
[define([AC_PROG_OBJC],
9608
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9610
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9611
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9612
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
9613
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9614
AC_CONFIG_COMMANDS_PRE(dnl
9615
[m4_provide_if([_AM_COMPILER_EXEEXT],
9616
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9619
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
9620
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9621
dnl mangled by Autoconf and run in a shell conditional statement.
9622
m4_define([_AC_COMPILER_EXEEXT],
9623
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9626
# When config.status generates a header, we must update the stamp-h file.
9627
# This file resides in the same directory as the config header
9628
# that is generated. The stamp files are numbered to have different names.
9630
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9631
# loop where config.status creates the headers, so we can generate
9632
# our stamp files there.
9633
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9634
[# Compute $1's index in $config_headers.
9637
for _am_header in $config_headers :; do
9639
$_am_arg | $_am_arg:* )
9642
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
9645
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9647
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
9649
# This file is free software; the Free Software Foundation
9650
# gives unlimited permission to copy and/or distribute it,
9651
# with or without modifications, as long as this notice is preserved.
9653
# AM_PROG_INSTALL_SH
9654
# ------------------
9655
# Define $install_sh.
9656
AC_DEFUN([AM_PROG_INSTALL_SH],
9657
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9658
if test x"${install_sh}" != xset; then
9661
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9663
install_sh="\${SHELL} $am_aux_dir/install-sh"
9666
AC_SUBST(install_sh)])
9668
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
9670
# This file is free software; the Free Software Foundation
9671
# gives unlimited permission to copy and/or distribute it,
9672
# with or without modifications, as long as this notice is preserved.
9676
# Check whether the underlying file-system supports filenames
9677
# with a leading dot. For instance MS-DOS doesn't.
9678
AC_DEFUN([AM_SET_LEADING_DOT],
9679
[rm -rf .tst 2>/dev/null
9680
mkdir .tst 2>/dev/null
9681
if test -d .tst; then
9686
rmdir .tst 2>/dev/null
9687
AC_SUBST([am__leading_dot])])
9689
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
9692
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9693
# Free Software Foundation, Inc.
9695
# This file is free software; the Free Software Foundation
9696
# gives unlimited permission to copy and/or distribute it,
9697
# with or without modifications, as long as this notice is preserved.
9701
# AM_MAINTAINER_MODE([DEFAULT-MODE])
9702
# ----------------------------------
9703
# Control maintainer-specific portions of Makefiles.
9704
# Default is to disable them, unless `enable' is passed literally.
9705
# For symmetry, `disable' may be passed as well. Anyway, the user
9706
# can override the default with the --enable/--disable switch.
9707
AC_DEFUN([AM_MAINTAINER_MODE],
9708
[m4_case(m4_default([$1], [disable]),
9709
[enable], [m4_define([am_maintainer_other], [disable])],
9710
[disable], [m4_define([am_maintainer_other], [enable])],
9711
[m4_define([am_maintainer_other], [enable])
9712
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
9713
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
9714
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
9715
AC_ARG_ENABLE([maintainer-mode],
9716
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
9717
(and sometimes confusing) to the casual installer],
9718
[USE_MAINTAINER_MODE=$enableval],
9719
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
9720
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
9721
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
9722
MAINT=$MAINTAINER_MODE_TRUE
9723
AC_SUBST([MAINT])dnl
11722
AC_MSG_RESULT($warnCXXFLAGS)
11724
AC_ARG_ENABLE(iso-cxx,
11725
AC_HELP_STRING([--enable-iso-cxx],
11726
[Try to warn if code is not ISO C++ ]),,
11727
[enable_iso_cxx=no])
11729
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
11731
if test "x$enable_iso_cxx" != "xno"; then
11732
if test "x$GXX" = "xyes"; then
11733
case " $CXXFLAGS " in
11734
*[\ \ ]-ansi[\ \ ]*) ;;
11735
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
11738
case " $CXXFLAGS " in
11739
*[\ \ ]-pedantic[\ \ ]*) ;;
11740
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
11744
AC_MSG_RESULT($complCXXFLAGS)
11746
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
11747
AC_SUBST(WARN_CXXFLAGS)
11750
dnl Do not call GNOME_DOC_DEFINES directly. It is split out from
11751
dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself.
11752
AC_DEFUN([GNOME_DOC_DEFINES],
11754
AC_ARG_WITH([help-dir],
11755
AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
11756
[with_help_dir='${datadir}/gnome/help'])
11757
HELP_DIR="$with_help_dir"
11760
AC_ARG_WITH([omf-dir],
11761
AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
11762
[with_omf_dir='${datadir}/omf'])
11763
OMF_DIR="$with_omf_dir"
11766
AC_ARG_WITH([help-formats],
11767
AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
11768
[with_help_formats=''])
11769
DOC_USER_FORMATS="$with_help_formats"
11770
AC_SUBST(DOC_USER_FORMATS)
11772
AC_ARG_ENABLE([scrollkeeper],
11773
[AC_HELP_STRING([--disable-scrollkeeper],
11774
[do not make updates to the scrollkeeper database])],,
11775
enable_scrollkeeper=yes)
11776
AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
11778
dnl disable scrollkeeper automatically for distcheck
11779
DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS"
11780
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
11782
AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
11785
# GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
11787
AC_DEFUN([GNOME_DOC_INIT],
11788
[AC_REQUIRE([AC_PROG_LN_S])dnl
11790
ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
11792
AC_MSG_CHECKING([gnome-doc-utils >= $gdu_cv_version_required])
11793
PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
11794
[gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no])
11796
if test "$gdu_cv_have_gdu" = "yes"; then
11797
AC_MSG_RESULT([yes])
11798
ifelse([$2],,[:],[$2])
11800
AC_MSG_RESULT([no])
11801
ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3])
11808
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
11809
dnl the schema should be compiled
11812
AC_DEFUN([GLIB_GSETTINGS],
11814
m4_pattern_allow([AM_V_GEN])
11815
AC_ARG_ENABLE(schemas-compile,
11816
AC_HELP_STRING([--disable-schemas-compile],
11817
[Disable regeneration of gschemas.compiled on install]),
11818
[case ${enableval} in
11819
yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
11820
no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
11821
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
11823
AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
11824
PKG_PROG_PKG_CONFIG([0.16])
11825
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
11826
if test x$cross_compiling != xyes; then
11827
GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
11829
AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
11831
AC_SUBST(GLIB_COMPILE_SCHEMAS)
11832
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
11833
ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
11835
ifelse([$1],,[:],[$1])
11839
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
11841
mostlyclean-am: clean-gsettings-schemas
11843
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
11845
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
11846
$(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
11848
all-am: $(gsettings_SCHEMAS:.xml=.valid)
11849
uninstall-am: uninstall-gsettings-schemas
11850
install-data-am: install-gsettings-schemas
11852
.SECONDARY: $(gsettings_SCHEMAS)
11854
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
11856
if test -n "$^"; then \
11857
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
11858
$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
11859
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
11862
uninstall-gsettings-schemas:
11863
@$(NORMAL_UNINSTALL)
11864
@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
11865
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
11866
test -n "$$files" || exit 0; \
11867
echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
11868
cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
11869
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
11871
clean-gsettings-schemas:
11872
rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
11874
ifdef gsettings_ENUM_NAMESPACE
11875
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
11876
$(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
11879
_GSETTINGS_SUBST(GSETTINGS_RULES)
11882
dnl _GSETTINGS_SUBST(VARIABLE)
11883
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
11884
AC_DEFUN([_GSETTINGS_SUBST],
11887
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
9727
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9729
# Check to see how 'make' treats includes. -*- Autoconf -*-
9731
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
9733
# This file is free software; the Free Software Foundation
9734
# gives unlimited permission to copy and/or distribute it,
9735
# with or without modifications, as long as this notice is preserved.
9741
# Check to see how make treats includes.
9742
AC_DEFUN([AM_MAKE_INCLUDE],
9743
[am_make=${MAKE-make}
9744
cat > confinc << 'END'
9746
@echo this is the am__doit target
9749
# If we don't find an include directive, just comment out the code.
9750
AC_MSG_CHECKING([for style of include used by $am_make])
9754
# First try GNU make style include.
9755
echo "include confinc" > confmf
9756
# Ignore all kinds of additional output from `make'.
9757
case `$am_make -s -f confmf 2> /dev/null` in #(
9758
*the\ am__doit\ target*)
9764
# Now try BSD make style include.
9765
if test "$am__include" = "#"; then
9766
echo '.include "confinc"' > confmf
9767
case `$am_make -s -f confmf 2> /dev/null` in #(
9768
*the\ am__doit\ target*)
9769
am__include=.include
9775
AC_SUBST([am__include])
9776
AC_SUBST([am__quote])
9777
AC_MSG_RESULT([$_am_result])
9778
rm -f confinc confmf
9781
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
9783
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
9784
# Free Software Foundation, Inc.
9786
# This file is free software; the Free Software Foundation
9787
# gives unlimited permission to copy and/or distribute it,
9788
# with or without modifications, as long as this notice is preserved.
9792
# AM_MISSING_PROG(NAME, PROGRAM)
9793
# ------------------------------
9794
AC_DEFUN([AM_MISSING_PROG],
9795
[AC_REQUIRE([AM_MISSING_HAS_RUN])
9796
$1=${$1-"${am_missing_run}$2"}
9800
# AM_MISSING_HAS_RUN
9801
# ------------------
9802
# Define MISSING if not defined so far and test if it supports --run.
9803
# If it does, set am_missing_run to use it, otherwise, to nothing.
9804
AC_DEFUN([AM_MISSING_HAS_RUN],
9805
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9806
AC_REQUIRE_AUX_FILE([missing])dnl
9807
if test x"${MISSING+set}" != xset; then
9810
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
9812
MISSING="\${SHELL} $am_aux_dir/missing" ;;
9815
# Use eval to expand $SHELL
9816
if eval "$MISSING --run true"; then
9817
am_missing_run="$MISSING --run "
9820
AC_MSG_WARN([`missing' script is too old or missing])
9824
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
9826
# This file is free software; the Free Software Foundation
9827
# gives unlimited permission to copy and/or distribute it,
9828
# with or without modifications, as long as this notice is preserved.
9832
# Check for `mkdir -p'.
9833
AC_DEFUN([AM_PROG_MKDIR_P],
9834
[AC_PREREQ([2.60])dnl
9835
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9836
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
9837
dnl while keeping a definition of mkdir_p for backward compatibility.
9838
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9839
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9840
dnl Makefile.ins that do not define MKDIR_P, so we do our own
9841
dnl adjustment using top_builddir (which is defined more often than
9843
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9845
[[\\/$]]* | ?:[[\\/]]*) ;;
9846
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9850
# Helper functions for option handling. -*- Autoconf -*-
9852
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
9854
# This file is free software; the Free Software Foundation
9855
# gives unlimited permission to copy and/or distribute it,
9856
# with or without modifications, as long as this notice is preserved.
9860
# _AM_MANGLE_OPTION(NAME)
9861
# -----------------------
9862
AC_DEFUN([_AM_MANGLE_OPTION],
9863
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9865
# _AM_SET_OPTION(NAME)
9866
# ------------------------------
9867
# Set option NAME. Presently that only means defining a flag for this option.
9868
AC_DEFUN([_AM_SET_OPTION],
9869
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9871
# _AM_SET_OPTIONS(OPTIONS)
9872
# ----------------------------------
9873
# OPTIONS is a space-separated list of Automake options.
9874
AC_DEFUN([_AM_SET_OPTIONS],
9875
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9877
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9878
# -------------------------------------------
9879
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9880
AC_DEFUN([_AM_IF_OPTION],
9881
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9883
# Check to make sure that the build environment is sane. -*- Autoconf -*-
9885
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
9886
# Free Software Foundation, Inc.
9888
# This file is free software; the Free Software Foundation
9889
# gives unlimited permission to copy and/or distribute it,
9890
# with or without modifications, as long as this notice is preserved.
9896
AC_DEFUN([AM_SANITY_CHECK],
9897
[AC_MSG_CHECKING([whether build environment is sane])
9900
echo timestamp > conftest.file
9901
# Reject unsafe characters in $srcdir or the absolute working directory
9902
# name. Accept space and tab only in the latter.
9906
*[[\\\"\#\$\&\'\`$am_lf]]*)
9907
AC_MSG_ERROR([unsafe absolute working directory name]);;
9910
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
9911
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
9914
# Do `set' in a subshell so we don't clobber the current shell's
9915
# arguments. Must try -L first in case configure is actually a
9916
# symlink; some systems play weird games with the mod time of symlinks
9917
# (eg FreeBSD returns the mod time of the symlink's containing
9920
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
9921
if test "$[*]" = "X"; then
9923
set X `ls -t "$srcdir/configure" conftest.file`
9926
if test "$[*]" != "X $srcdir/configure conftest.file" \
9927
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
9929
# If neither matched, then we have a broken ls. This can happen
9930
# if, for instance, CONFIG_SHELL is bash and it inherits a
9931
# broken ls alias from the environment. This has actually
9932
# happened. Such a system could not be considered "sane".
9933
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
9934
alias in your environment])
9937
test "$[2]" = conftest.file
9943
AC_MSG_ERROR([newly created file is older than distributed files!
9944
Check your system clock])
9946
AC_MSG_RESULT(yes)])
9948
# Copyright (C) 2009 Free Software Foundation, Inc.
9950
# This file is free software; the Free Software Foundation
9951
# gives unlimited permission to copy and/or distribute it,
9952
# with or without modifications, as long as this notice is preserved.
11891
dnl -*- mode: autoconf -*-
9956
# AM_SILENT_RULES([DEFAULT])
9957
# --------------------------
9958
# Enable less verbose build rules; with the default set to DEFAULT
9959
# (`yes' being less verbose, `no' or empty being verbose).
9960
AC_DEFUN([AM_SILENT_RULES],
9961
[AC_ARG_ENABLE([silent-rules],
9962
[ --enable-silent-rules less verbose build output (undo: `make V=1')
9963
--disable-silent-rules verbose build output (undo: `make V=0')])
9964
case $enable_silent_rules in
9965
yes) AM_DEFAULT_VERBOSITY=0;;
9966
no) AM_DEFAULT_VERBOSITY=1;;
9967
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
11896
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
11897
AC_DEFUN([GTK_DOC_CHECK],
11899
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
11900
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
11902
dnl check for tools we added during development
11903
AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
11904
AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
11905
AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
11907
dnl for overriding the documentation installation directory
11908
AC_ARG_WITH([html-dir],
11909
AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
11910
[with_html_dir='${datadir}/gtk-doc/html'])
11911
HTML_DIR="$with_html_dir"
11912
AC_SUBST([HTML_DIR])
11914
dnl enable/disable documentation building
11915
AC_ARG_ENABLE([gtk-doc],
11916
AS_HELP_STRING([--enable-gtk-doc],
11917
[use gtk-doc to build documentation [[default=no]]]),,
11918
[enable_gtk_doc=no])
11920
if test x$enable_gtk_doc = xyes; then
11922
[PKG_CHECK_EXISTS([gtk-doc],,
11923
AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
11924
[PKG_CHECK_EXISTS([gtk-doc >= $1],,
11925
AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
11928
AC_MSG_CHECKING([whether to build gtk-doc documentation])
11929
AC_MSG_RESULT($enable_gtk_doc)
11931
dnl enable/disable output formats
11932
AC_ARG_ENABLE([gtk-doc-html],
11933
AS_HELP_STRING([--enable-gtk-doc-html],
11934
[build documentation in html format [[default=yes]]]),,
11935
[enable_gtk_doc_html=yes])
11936
AC_ARG_ENABLE([gtk-doc-pdf],
11937
AS_HELP_STRING([--enable-gtk-doc-pdf],
11938
[build documentation in pdf format [[default=no]]]),,
11939
[enable_gtk_doc_pdf=no])
11941
if test -z "$GTKDOC_MKPDF"; then
11942
enable_gtk_doc_pdf=no
11946
AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
11947
AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
11948
AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
11949
AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
11950
AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
11954
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
11955
# serial 40 IT_PROG_INTLTOOL
11956
AC_DEFUN([IT_PROG_INTLTOOL], [
11957
AC_PREREQ([2.50])dnl
11958
AC_REQUIRE([AM_NLS])dnl
11960
case "$am__api_version" in
11962
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
9969
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
9971
AC_SUBST([AM_BACKSLASH])dnl
9972
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
11968
if test -n "$1"; then
11969
AC_MSG_CHECKING([for intltool >= $1])
11971
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
11972
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
11973
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
11975
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
11976
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
11977
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
11980
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
11981
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
11982
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
11983
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
11984
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
11987
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 $< [$]@'
11988
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 $< [$]@'
11989
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 $< [$]@'
11990
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 $< [$]@'
11991
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
11992
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 $< [$]@'
11993
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 $< [$]@'
11994
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 $< [$]@'
11995
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 $< [$]@'
11996
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 $< [$]@'
11997
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 $< [$]@'
11998
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
11999
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 $< [$]@'
12000
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 $< [$]@'
12001
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 $< [$]@'
12002
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 $< [$]@'
12003
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 $< [$]@'
12004
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 $< [$]@'
12005
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 $< [$]@'
12007
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
12008
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
12009
_IT_SUBST(INTLTOOL_KEYS_RULE)
12010
_IT_SUBST(INTLTOOL_PROP_RULE)
12011
_IT_SUBST(INTLTOOL_OAF_RULE)
12012
_IT_SUBST(INTLTOOL_PONG_RULE)
12013
_IT_SUBST(INTLTOOL_SERVER_RULE)
12014
_IT_SUBST(INTLTOOL_SHEET_RULE)
12015
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
12016
_IT_SUBST(INTLTOOL_UI_RULE)
12017
_IT_SUBST(INTLTOOL_XAM_RULE)
12018
_IT_SUBST(INTLTOOL_KBD_RULE)
12019
_IT_SUBST(INTLTOOL_XML_RULE)
12020
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
12021
_IT_SUBST(INTLTOOL_CAVES_RULE)
12022
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
12023
_IT_SUBST(INTLTOOL_THEME_RULE)
12024
_IT_SUBST(INTLTOOL_SERVICE_RULE)
12025
_IT_SUBST(INTLTOOL_POLICY_RULE)
12027
# Check the gettext tools to make sure they are GNU
12028
AC_PATH_PROG(XGETTEXT, xgettext)
12029
AC_PATH_PROG(MSGMERGE, msgmerge)
12030
AC_PATH_PROG(MSGFMT, msgfmt)
12031
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
12032
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
12033
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
12035
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
12036
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
12037
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
12038
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
12039
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
12042
AC_PATH_PROG(INTLTOOL_PERL, perl)
12043
if test -z "$INTLTOOL_PERL"; then
12044
AC_MSG_ERROR([perl not found])
12046
AC_MSG_CHECKING([for perl >= 5.8.1])
12047
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
12048
if test $? -ne 0; then
12049
AC_MSG_ERROR([perl 5.8.1 is required for intltool])
12051
IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
12052
AC_MSG_RESULT([$IT_PERL_VERSION])
12054
if test "x$2" != "xno-xml"; then
12055
AC_MSG_CHECKING([for XML::Parser])
12056
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
12057
AC_MSG_RESULT([ok])
12059
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
12063
# Substitute ALL_LINGUAS so we can use it in po/Makefile
12064
AC_SUBST(ALL_LINGUAS)
12066
# Set DATADIRNAME correctly if it is not set yet
12067
# (copied from glib-gettext.m4)
12068
if test -z "$DATADIRNAME"; then
12070
[AC_LANG_PROGRAM([[]],
12071
[[extern int _nl_msg_cat_cntr;
12072
return _nl_msg_cat_cntr]])],
12073
[DATADIRNAME=share],
12076
dnl On Solaris, if bind_textdomain_codeset is in libc,
12077
dnl GNU format message catalog is always supported,
12078
dnl since both are added to the libc all together.
12079
dnl Hence, we'd like to go with DATADIRNAME=share
12081
AC_CHECK_FUNC(bind_textdomain_codeset,
12082
[DATADIRNAME=share], [DATADIRNAME=lib])
12089
AC_SUBST(DATADIRNAME)
9975
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9977
# This file is free software; the Free Software Foundation
9978
# gives unlimited permission to copy and/or distribute it,
9979
# with or without modifications, as long as this notice is preserved.
9981
# AM_PROG_INSTALL_STRIP
12096
# IT_PO_SUBDIR(DIRNAME)
9982
12097
# ---------------------
9983
# One issue with vendor `install' (even GNU) is that you can't
9984
# specify the program used to strip binaries. This is especially
9985
# annoying in cross-compiling environments, where the build's strip
9986
# is unlikely to handle the host's binaries.
9987
# Fortunately install-sh will honor a STRIPPROG variable, so we
9988
# always use install-sh in `make install-strip', and initialize
9989
# STRIPPROG with the value of the STRIP variable (set by the user).
9990
AC_DEFUN([AM_PROG_INSTALL_STRIP],
9991
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9992
# Installed binaries are usually stripped using `strip' when the user
9993
# run `make install-strip'. However `strip' might not be the right
9994
# tool to use in cross-compilation environments, therefore Automake
9995
# will honor the `STRIP' environment variable to overrule this program.
9996
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9997
if test "$cross_compiling" != no; then
9998
AC_CHECK_TOOL([STRIP], [strip], :)
10000
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10001
AC_SUBST([INSTALL_STRIP_PROGRAM])])
10003
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
10005
# This file is free software; the Free Software Foundation
10006
# gives unlimited permission to copy and/or distribute it,
10007
# with or without modifications, as long as this notice is preserved.
10011
# _AM_SUBST_NOTMAKE(VARIABLE)
10012
# ---------------------------
10013
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10014
# This macro is traced by Automake.
10015
AC_DEFUN([_AM_SUBST_NOTMAKE])
10017
# AM_SUBST_NOTMAKE(VARIABLE)
10018
# ---------------------------
10019
# Public sister of _AM_SUBST_NOTMAKE.
10020
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10022
# Check how to create a tarball. -*- Autoconf -*-
10024
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
10026
# This file is free software; the Free Software Foundation
10027
# gives unlimited permission to copy and/or distribute it,
10028
# with or without modifications, as long as this notice is preserved.
10032
# _AM_PROG_TAR(FORMAT)
10033
# --------------------
10034
# Check how to create a tarball in format FORMAT.
10035
# FORMAT should be one of `v7', `ustar', or `pax'.
10037
# Substitute a variable $(am__tar) that is a command
10038
# writing to stdout a FORMAT-tarball containing the directory
10040
# tardir=directory && $(am__tar) > result.tar
10042
# Substitute a variable $(am__untar) that extract such
10043
# a tarball read from stdin.
10044
# $(am__untar) < result.tar
10045
AC_DEFUN([_AM_PROG_TAR],
10046
[# Always define AMTAR for backward compatibility.
10047
AM_MISSING_PROG([AMTAR], [tar])
10049
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
10050
[m4_case([$1], [ustar],, [pax],,
10051
[m4_fatal([Unknown tar format])])
10052
AC_MSG_CHECKING([how to create a $1 tar archive])
10053
# Loop over all known methods to create a tar archive until one works.
10054
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10055
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
10056
# Do not fold the above two line into one, because Tru64 sh and
10057
# Solaris sh will not grok spaces in the rhs of `-'.
10058
for _am_tool in $_am_tools
10062
for _am_tar in tar gnutar gtar;
10064
AM_RUN_LOG([$_am_tar --version]) && break
10066
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10067
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10068
am__untar="$_am_tar -xf -"
10071
# Must skip GNU tar: if it does not support --format= it doesn't create
10072
# ustar tarball either.
10073
(tar --version) >/dev/null 2>&1 && continue
10074
am__tar='tar chf - "$$tardir"'
10075
am__tar_='tar chf - "$tardir"'
10076
am__untar='tar xf -'
10079
am__tar='pax -L -x $1 -w "$$tardir"'
10080
am__tar_='pax -L -x $1 -w "$tardir"'
10084
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10085
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10086
am__untar='cpio -i -H $1 -d'
10095
# If the value was cached, stop now. We just wanted to have am__tar
10096
# and am__untar set.
10097
test -n "${am_cv_prog_tar_$1}" && break
10099
# tar/untar a dummy directory, and stop if the command works
10100
rm -rf conftest.dir
10102
echo GrepMe > conftest.dir/file
10103
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10104
rm -rf conftest.dir
10105
if test -s conftest.tar; then
10106
AM_RUN_LOG([$am__untar <conftest.tar])
10107
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10110
rm -rf conftest.dir
10112
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10113
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10114
AC_SUBST([am__tar])
10115
AC_SUBST([am__untar])
12098
# All po subdirs have to be declared with this macro; the subdir "po" is
12099
# declared by IT_PROG_INTLTOOL.
12101
AC_DEFUN([IT_PO_SUBDIR],
12102
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
12104
dnl The following CONFIG_COMMANDS should be executed at the very end
12105
dnl of config.status.
12106
AC_CONFIG_COMMANDS_PRE([
12107
AC_CONFIG_COMMANDS([$1/stamp-it], [
12108
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
12109
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
12111
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
12116
'"s|^| $ac_top_srcdir/|" \
12117
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
12119
[sed '/^POTFILES =/,/[^\\]$/ {
12123
' "$1/Makefile.in" >"$1/Makefile"]
12124
rm -f "$1/Makefile.tmp"
12125
mv "$1/stamp-it.tmp" "$1/stamp-it"
12130
# _IT_SUBST(VARIABLE)
12131
# -------------------
12132
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
12134
AC_DEFUN([_IT_SUBST],
12137
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
12141
# deprecated macros
12142
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
12143
# A hint is needed for aclocal from Automake <= 1.9.4:
12144
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
12147
dnl -*- mode: autoconf -*-
12148
dnl Copyright 2009 Johan Dahlin
12150
dnl This file is free software; the author(s) gives unlimited
12151
dnl permission to copy and/or distribute it, with or without
12152
dnl modifications, as long as this notice is preserved.
12157
m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
12159
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
12160
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
12161
AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
12163
dnl enable/disable introspection
12164
m4_if([$2], [require],
12166
enable_introspection=yes
12168
AC_ARG_ENABLE(introspection,
12169
AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
12170
[Enable introspection for this build]),,
12171
[enable_introspection=auto])
12174
AC_MSG_CHECKING([for gobject-introspection])
12176
dnl presence/version checking
12177
AS_CASE([$enable_introspection],
12179
found_introspection="no (disabled, use --enable-introspection to enable)"
12182
PKG_CHECK_EXISTS([gobject-introspection-1.0],,
12183
AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
12184
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
12185
found_introspection=yes,
12186
AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
12189
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
12192
AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
12195
AC_MSG_RESULT([$found_introspection])
12197
INTROSPECTION_SCANNER=
12198
INTROSPECTION_COMPILER=
12199
INTROSPECTION_GENERATE=
12200
INTROSPECTION_GIRDIR=
12201
INTROSPECTION_TYPELIBDIR=
12202
if test "x$found_introspection" = "xyes"; then
12203
INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
12204
INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
12205
INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
12206
INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
12207
INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
12208
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
12209
INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
12210
INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
12212
AC_SUBST(INTROSPECTION_SCANNER)
12213
AC_SUBST(INTROSPECTION_COMPILER)
12214
AC_SUBST(INTROSPECTION_GENERATE)
12215
AC_SUBST(INTROSPECTION_GIRDIR)
12216
AC_SUBST(INTROSPECTION_TYPELIBDIR)
12217
AC_SUBST(INTROSPECTION_CFLAGS)
12218
AC_SUBST(INTROSPECTION_LIBS)
12219
AC_SUBST(INTROSPECTION_MAKEFILE)
12221
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
12226
dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
12228
AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
12230
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
12234
dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
12237
AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
12239
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
10118
12242
m4_include([acinclude.m4])