1
# generated automatically by aclocal 1.7.5 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
# Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14
# Do all the work for Automake. -*- Autoconf -*-
16
# This macro actually does too much some checks are only needed if
17
# your package does certain things. But this isn't really a big deal.
19
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
20
# Free Software Foundation, Inc.
22
# This program is free software; you can redistribute it and/or modify
23
# it under the terms of the GNU General Public License as published by
24
# the Free Software Foundation; either version 2, or (at your option)
27
# This program is distributed in the hope that it will be useful,
28
# but WITHOUT ANY WARRANTY; without even the implied warranty of
29
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30
# GNU General Public License for more details.
32
# You should have received a copy of the GNU General Public License
33
# along with this program; if not, write to the Free Software
34
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
41
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
42
# the ones we care about.
43
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
45
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
46
# AM_INIT_AUTOMAKE([OPTIONS])
47
# -----------------------------------------------
48
# The call with PACKAGE and VERSION arguments is the old style
49
# call (pre autoconf-2.50), which is being phased out. PACKAGE
50
# and VERSION should now be passed to AC_INIT and removed from
51
# the call to AM_INIT_AUTOMAKE.
52
# We support both call styles for the transition. After
53
# the next Automake release, Autoconf can make the AC_INIT
54
# arguments mandatory, and then we can depend on a new Autoconf
55
# release and drop the old call support.
56
AC_DEFUN([AM_INIT_AUTOMAKE],
57
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
58
AC_REQUIRE([AC_PROG_INSTALL])dnl
59
# test to see if srcdir already configured
60
if test "`cd $srcdir && pwd`" != "`pwd`" &&
61
test -f $srcdir/config.status; then
62
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
65
# test whether we have cygpath
66
if test -z "$CYGPATH_W"; then
67
if (cygpath --version) >/dev/null 2>/dev/null; then
68
CYGPATH_W='cygpath -w'
75
# Define the identity of the package.
76
dnl Distinguish between old-style and new-style calls.
78
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
79
AC_SUBST([PACKAGE], [$1])dnl
80
AC_SUBST([VERSION], [$2])],
81
[_AM_SET_OPTIONS([$1])dnl
82
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
83
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
85
_AM_IF_OPTION([no-define],,
86
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
87
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
89
# Some tools Automake needs.
90
AC_REQUIRE([AM_SANITY_CHECK])dnl
91
AC_REQUIRE([AC_ARG_PROGRAM])dnl
92
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
93
AM_MISSING_PROG(AUTOCONF, autoconf)
94
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
95
AM_MISSING_PROG(AUTOHEADER, autoheader)
96
AM_MISSING_PROG(MAKEINFO, makeinfo)
97
AM_MISSING_PROG(AMTAR, tar)
100
# We need awk for the "check" target. The system "awk" is bad on
102
AC_REQUIRE([AC_PROG_AWK])dnl
103
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
104
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
106
_AM_IF_OPTION([no-dependencies],,
107
[AC_PROVIDE_IFELSE([AC_PROG_CC],
108
[_AM_DEPENDENCIES(CC)],
109
[define([AC_PROG_CC],
110
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
111
AC_PROVIDE_IFELSE([AC_PROG_CXX],
112
[_AM_DEPENDENCIES(CXX)],
113
[define([AC_PROG_CXX],
114
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
119
# When config.status generates a header, we must update the stamp-h file.
120
# This file resides in the same directory as the config header
121
# that is generated. The stamp files are numbered to have different names.
123
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
124
# loop where config.status creates the headers, so we can generate
125
# our stamp files there.
126
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
127
[# Compute $1's index in $config_headers.
129
for _am_header in $config_headers :; do
134
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
137
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
139
# Copyright 2002 Free Software Foundation, Inc.
141
# This program is free software; you can redistribute it and/or modify
142
# it under the terms of the GNU General Public License as published by
143
# the Free Software Foundation; either version 2, or (at your option)
146
# This program is distributed in the hope that it will be useful,
147
# but WITHOUT ANY WARRANTY; without even the implied warranty of
148
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
149
# GNU General Public License for more details.
151
# You should have received a copy of the GNU General Public License
152
# along with this program; if not, write to the Free Software
153
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
155
# AM_AUTOMAKE_VERSION(VERSION)
156
# ----------------------------
157
# Automake X.Y traces this macro to ensure aclocal.m4 has been
158
# generated from the m4 files accompanying Automake X.Y.
159
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
161
# AM_SET_CURRENT_AUTOMAKE_VERSION
162
# -------------------------------
163
# Call AM_AUTOMAKE_VERSION so it can be traced.
164
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
165
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166
[AM_AUTOMAKE_VERSION([1.7.5])])
168
# Helper functions for option handling. -*- Autoconf -*-
170
# Copyright 2001, 2002 Free Software Foundation, Inc.
172
# This program is free software; you can redistribute it and/or modify
173
# it under the terms of the GNU General Public License as published by
174
# the Free Software Foundation; either version 2, or (at your option)
177
# This program is distributed in the hope that it will be useful,
178
# but WITHOUT ANY WARRANTY; without even the implied warranty of
179
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
180
# GNU General Public License for more details.
182
# You should have received a copy of the GNU General Public License
183
# along with this program; if not, write to the Free Software
184
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
189
# _AM_MANGLE_OPTION(NAME)
190
# -----------------------
191
AC_DEFUN([_AM_MANGLE_OPTION],
192
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
194
# _AM_SET_OPTION(NAME)
195
# ------------------------------
196
# Set option NAME. Presently that only means defining a flag for this option.
197
AC_DEFUN([_AM_SET_OPTION],
198
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
200
# _AM_SET_OPTIONS(OPTIONS)
201
# ----------------------------------
202
# OPTIONS is a space-separated list of Automake options.
203
AC_DEFUN([_AM_SET_OPTIONS],
204
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
206
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
207
# -------------------------------------------
208
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
209
AC_DEFUN([_AM_IF_OPTION],
210
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
213
# Check to make sure that the build environment is sane.
216
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
218
# This program is free software; you can redistribute it and/or modify
219
# it under the terms of the GNU General Public License as published by
220
# the Free Software Foundation; either version 2, or (at your option)
223
# This program is distributed in the hope that it will be useful,
224
# but WITHOUT ANY WARRANTY; without even the implied warranty of
225
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
226
# GNU General Public License for more details.
228
# You should have received a copy of the GNU General Public License
229
# along with this program; if not, write to the Free Software
230
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
237
AC_DEFUN([AM_SANITY_CHECK],
238
[AC_MSG_CHECKING([whether build environment is sane])
241
echo timestamp > conftest.file
242
# Do `set' in a subshell so we don't clobber the current shell's
243
# arguments. Must try -L first in case configure is actually a
244
# symlink; some systems play weird games with the mod time of symlinks
245
# (eg FreeBSD returns the mod time of the symlink's containing
248
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
249
if test "$[*]" = "X"; then
251
set X `ls -t $srcdir/configure conftest.file`
254
if test "$[*]" != "X $srcdir/configure conftest.file" \
255
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
257
# If neither matched, then we have a broken ls. This can happen
258
# if, for instance, CONFIG_SHELL is bash and it inherits a
259
# broken ls alias from the environment. This has actually
260
# happened. Such a system could not be considered "sane".
261
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
262
alias in your environment])
265
test "$[2]" = conftest.file
271
AC_MSG_ERROR([newly created file is older than distributed files!
272
Check your system clock])
279
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
281
# This program is free software; you can redistribute it and/or modify
282
# it under the terms of the GNU General Public License as published by
283
# the Free Software Foundation; either version 2, or (at your option)
286
# This program is distributed in the hope that it will be useful,
287
# but WITHOUT ANY WARRANTY; without even the implied warranty of
288
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
289
# GNU General Public License for more details.
291
# You should have received a copy of the GNU General Public License
292
# along with this program; if not, write to the Free Software
293
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
298
# AM_MISSING_PROG(NAME, PROGRAM)
299
# ------------------------------
300
AC_DEFUN([AM_MISSING_PROG],
301
[AC_REQUIRE([AM_MISSING_HAS_RUN])
302
$1=${$1-"${am_missing_run}$2"}
308
# Define MISSING if not defined so far and test if it supports --run.
309
# If it does, set am_missing_run to use it, otherwise, to nothing.
310
AC_DEFUN([AM_MISSING_HAS_RUN],
311
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
312
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
313
# Use eval to expand $SHELL
314
if eval "$MISSING --run true"; then
315
am_missing_run="$MISSING --run "
318
AC_MSG_WARN([`missing' script is too old or missing])
324
# Copyright 2001 Free Software Foundation, Inc.
326
# This program is free software; you can redistribute it and/or modify
327
# it under the terms of the GNU General Public License as published by
328
# the Free Software Foundation; either version 2, or (at your option)
331
# This program is distributed in the hope that it will be useful,
332
# but WITHOUT ANY WARRANTY; without even the implied warranty of
333
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
334
# GNU General Public License for more details.
336
# You should have received a copy of the GNU General Public License
337
# along with this program; if not, write to the Free Software
338
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
341
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
342
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
343
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
345
# Of course, Automake must honor this variable whenever it calls a
346
# tool from the auxiliary directory. The problem is that $srcdir (and
347
# therefore $ac_aux_dir as well) can be either absolute or relative,
348
# depending on how configure is run. This is pretty annoying, since
349
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
350
# source directory, any form will work fine, but in subdirectories a
351
# relative path needs to be adjusted first.
353
# $ac_aux_dir/missing
354
# fails when called from a subdirectory if $ac_aux_dir is relative
355
# $top_srcdir/$ac_aux_dir/missing
356
# fails if $ac_aux_dir is absolute,
357
# fails when called from a subdirectory in a VPATH build with
358
# a relative $ac_aux_dir
360
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
361
# are both prefixed by $srcdir. In an in-source build this is usually
362
# harmless because $srcdir is `.', but things will broke when you
363
# start a VPATH build or use an absolute $srcdir.
365
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
366
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
367
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
368
# and then we would define $MISSING as
369
# MISSING="\${SHELL} $am_aux_dir/missing"
370
# This will work as long as MISSING is not called from configure, because
371
# unfortunately $(top_srcdir) has no meaning in configure.
372
# However there are other variables, like CC, which are often used in
373
# configure, and could therefore not use this "fixed" $ac_aux_dir.
375
# Another solution, used here, is to always expand $ac_aux_dir to an
376
# absolute PATH. The drawback is that using absolute paths prevent a
377
# configured tree to be moved without reconfiguration.
379
# Rely on autoconf to set up CDPATH properly.
382
AC_DEFUN([AM_AUX_DIR_EXPAND], [
383
# expand $ac_aux_dir to an absolute path
384
am_aux_dir=`cd $ac_aux_dir && pwd`
389
# Define $install_sh.
391
# Copyright 2001 Free Software Foundation, Inc.
393
# This program is free software; you can redistribute it and/or modify
394
# it under the terms of the GNU General Public License as published by
395
# the Free Software Foundation; either version 2, or (at your option)
398
# This program is distributed in the hope that it will be useful,
399
# but WITHOUT ANY WARRANTY; without even the implied warranty of
400
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
401
# GNU General Public License for more details.
403
# You should have received a copy of the GNU General Public License
404
# along with this program; if not, write to the Free Software
405
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
408
AC_DEFUN([AM_PROG_INSTALL_SH],
409
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
410
install_sh=${install_sh-"$am_aux_dir/install-sh"}
411
AC_SUBST(install_sh)])
413
# AM_PROG_INSTALL_STRIP
415
# Copyright 2001 Free Software Foundation, Inc.
417
# This program is free software; you can redistribute it and/or modify
418
# it under the terms of the GNU General Public License as published by
419
# the Free Software Foundation; either version 2, or (at your option)
422
# This program is distributed in the hope that it will be useful,
423
# but WITHOUT ANY WARRANTY; without even the implied warranty of
424
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
425
# GNU General Public License for more details.
427
# You should have received a copy of the GNU General Public License
428
# along with this program; if not, write to the Free Software
429
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
432
# One issue with vendor `install' (even GNU) is that you can't
433
# specify the program used to strip binaries. This is especially
434
# annoying in cross-compiling environments, where the build's strip
435
# is unlikely to handle the host's binaries.
436
# Fortunately install-sh will honor a STRIPPROG variable, so we
437
# always use install-sh in `make install-strip', and initialize
438
# STRIPPROG with the value of the STRIP variable (set by the user).
439
AC_DEFUN([AM_PROG_INSTALL_STRIP],
440
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
441
# Installed binaries are usually stripped using `strip' when the user
442
# run `make install-strip'. However `strip' might not be the right
443
# tool to use in cross-compilation environments, therefore Automake
444
# will honor the `STRIP' environment variable to overrule this program.
445
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
446
if test "$cross_compiling" != no; then
447
AC_CHECK_TOOL([STRIP], [strip], :)
449
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
450
AC_SUBST([INSTALL_STRIP_PROGRAM])])
453
# Copyright (C) 2003 Free Software Foundation, Inc.
455
# This program is free software; you can redistribute it and/or modify
456
# it under the terms of the GNU General Public License as published by
457
# the Free Software Foundation; either version 2, or (at your option)
460
# This program is distributed in the hope that it will be useful,
461
# but WITHOUT ANY WARRANTY; without even the implied warranty of
462
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
463
# GNU General Public License for more details.
465
# You should have received a copy of the GNU General Public License
466
# along with this program; if not, write to the Free Software
467
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
472
# Check whether the underlying file-system supports filenames
473
# with a leading dot. For instance MS-DOS doesn't.
474
AC_DEFUN([AM_SET_LEADING_DOT],
475
[rm -rf .tst 2>/dev/null
476
mkdir .tst 2>/dev/null
477
if test -d .tst; then
482
rmdir .tst 2>/dev/null
483
AC_SUBST([am__leading_dot])])
485
# serial 5 -*- Autoconf -*-
487
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
489
# This program is free software; you can redistribute it and/or modify
490
# it under the terms of the GNU General Public License as published by
491
# the Free Software Foundation; either version 2, or (at your option)
494
# This program is distributed in the hope that it will be useful,
495
# but WITHOUT ANY WARRANTY; without even the implied warranty of
496
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
497
# GNU General Public License for more details.
499
# You should have received a copy of the GNU General Public License
500
# along with this program; if not, write to the Free Software
501
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
505
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
506
# written in clear, in which case automake, when reading aclocal.m4,
507
# will think it sees a *use*, and therefore will trigger all it's
508
# C support machinery. Also note that it means that autoscan, seeing
509
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
513
# _AM_DEPENDENCIES(NAME)
514
# ----------------------
515
# See how the compiler implements dependency checking.
516
# NAME is "CC", "CXX", "GCJ", or "OBJC".
517
# We try a few techniques and use that to set a single cache variable.
519
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
520
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
521
# dependency, and given that the user is not expected to run this macro,
522
# just rely on AC_PROG_CC.
523
AC_DEFUN([_AM_DEPENDENCIES],
524
[AC_REQUIRE([AM_SET_DEPDIR])dnl
525
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
526
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
527
AC_REQUIRE([AM_DEP_TRACK])dnl
529
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
530
[$1], CXX, [depcc="$CXX" am_compiler_list=],
531
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
532
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
533
[depcc="$$1" am_compiler_list=])
535
AC_CACHE_CHECK([dependency style of $depcc],
536
[am_cv_$1_dependencies_compiler_type],
537
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
538
# We make a subdir and do the tests there. Otherwise we can end up
539
# making bogus files that we don't know about and never remove. For
540
# instance it was reported that on HP-UX the gcc test will end up
541
# making a dummy file named `D' -- because `-MD' means `put the output
544
# Copy depcomp to subdir because otherwise we won't find it if we're
545
# using a relative directory.
546
cp "$am_depcomp" conftest.dir
549
am_cv_$1_dependencies_compiler_type=none
550
if test "$am_compiler_list" = ""; then
551
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
553
for depmode in $am_compiler_list; do
554
# We need to recreate these files for each test, as the compiler may
555
# overwrite some of them when testing with obscure command lines.
556
# This happens at least with the AIX C compiler.
557
echo '#include "conftest.h"' > conftest.c
558
echo 'int i;' > conftest.h
559
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
563
# after this tag, mechanisms are not by side-effect, so they'll
564
# only be used when explicitly requested
565
if test "x$enable_dependency_tracking" = xyes; then
573
# We check with `-c' and `-o' for the sake of the "dashmstdout"
574
# mode. It turns out that the SunPro C++ compiler does not properly
575
# handle `-M -o', and we need to detect this.
576
if depmode=$depmode \
577
source=conftest.c object=conftest.o \
578
depfile=conftest.Po tmpdepfile=conftest.TPo \
579
$SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
580
>/dev/null 2>conftest.err &&
581
grep conftest.h conftest.Po > /dev/null 2>&1 &&
582
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
583
# icc doesn't choke on unknown options, it will just issue warnings
584
# (even with -Werror). So we grep stderr for any message
585
# that says an option was ignored.
586
if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
587
am_cv_$1_dependencies_compiler_type=$depmode
596
am_cv_$1_dependencies_compiler_type=none
599
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
600
AM_CONDITIONAL([am__fastdep$1], [
601
test "x$enable_dependency_tracking" != xno \
602
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
608
# Choose a directory name for dependency files.
609
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
610
AC_DEFUN([AM_SET_DEPDIR],
611
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
612
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
618
AC_DEFUN([AM_DEP_TRACK],
619
[AC_ARG_ENABLE(dependency-tracking,
620
[ --disable-dependency-tracking Speeds up one-time builds
621
--enable-dependency-tracking Do not reject slow dependency extractors])
622
if test "x$enable_dependency_tracking" != xno; then
623
am_depcomp="$ac_aux_dir/depcomp"
626
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
627
AC_SUBST([AMDEPBACKSLASH])
630
# Generate code to set up dependency tracking. -*- Autoconf -*-
632
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
634
# This program is free software; you can redistribute it and/or modify
635
# it under the terms of the GNU General Public License as published by
636
# the Free Software Foundation; either version 2, or (at your option)
639
# This program is distributed in the hope that it will be useful,
640
# but WITHOUT ANY WARRANTY; without even the implied warranty of
641
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
642
# GNU General Public License for more details.
644
# You should have received a copy of the GNU General Public License
645
# along with this program; if not, write to the Free Software
646
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
651
# _AM_OUTPUT_DEPENDENCY_COMMANDS
652
# ------------------------------
653
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
654
[for mf in $CONFIG_FILES; do
655
# Strip MF so we end up with the name of the file.
656
mf=`echo "$mf" | sed -e 's/:.*$//'`
657
# Check whether this is an Automake generated Makefile or not.
658
# We used to match only the files named `Makefile.in', but
659
# some people rename them; so instead we look at the file content.
660
# Grep'ing the first line is not enough: some people post-process
661
# each Makefile.in and add a new line on top of each file to say so.
662
# So let's grep whole file.
663
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
664
dirpart=`AS_DIRNAME("$mf")`
668
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
669
# Extract the definition of DEP_FILES from the Makefile without
671
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
672
test -z "$DEPDIR" && continue
673
# When using ansi2knr, U may be empty or an underscore; expand it
674
U=`sed -n -e '/^U = / s///p' < "$mf"`
675
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
676
# We invoke sed twice because it is the simplest approach to
677
# changing $(DEPDIR) to its actual value in the expansion.
678
for file in `sed -n -e '
679
/^DEP_FILES = .*\\\\$/ {
688
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
689
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
690
# Make sure the directory exists.
691
test -f "$dirpart/$file" && continue
692
fdir=`AS_DIRNAME(["$file"])`
693
AS_MKDIR_P([$dirpart/$fdir])
694
# echo "creating $dirpart/$file"
695
echo '# dummy' > "$dirpart/$file"
698
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
701
# AM_OUTPUT_DEPENDENCY_COMMANDS
702
# -----------------------------
703
# This macro should only be invoked once -- use via AC_REQUIRE.
705
# This code is only required when automatic dependency tracking
706
# is enabled. FIXME. This creates each `.P' file that we will
707
# need in order to bootstrap the dependency handling code.
708
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
709
[AC_CONFIG_COMMANDS([depfiles],
710
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
711
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
714
# Check to see how 'make' treats includes. -*- Autoconf -*-
716
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
718
# This program is free software; you can redistribute it and/or modify
719
# it under the terms of the GNU General Public License as published by
720
# the Free Software Foundation; either version 2, or (at your option)
723
# This program is distributed in the hope that it will be useful,
724
# but WITHOUT ANY WARRANTY; without even the implied warranty of
725
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
726
# GNU General Public License for more details.
728
# You should have received a copy of the GNU General Public License
729
# along with this program; if not, write to the Free Software
730
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
737
# Check to see how make treats includes.
738
AC_DEFUN([AM_MAKE_INCLUDE],
739
[am_make=${MAKE-make}
740
cat > confinc << 'END'
745
# If we don't find an include directive, just comment out the code.
746
AC_MSG_CHECKING([for style of include used by $am_make])
750
# First try GNU make style include.
751
echo "include confinc" > confmf
752
# We grep out `Entering directory' and `Leaving directory'
753
# messages which can occur if `w' ends up in MAKEFLAGS.
754
# In particular we don't look at `^make:' because GNU make might
755
# be invoked under some other name (usually "gmake"), in which
756
# case it prints its new name instead of `make'.
757
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
762
# Now try BSD make style include.
763
if test "$am__include" = "#"; then
764
echo '.include "confinc"' > confmf
765
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
771
AC_SUBST([am__include])
772
AC_SUBST([am__quote])
773
AC_MSG_RESULT([$_am_result])
777
# AM_CONDITIONAL -*- Autoconf -*-
779
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
781
# This program is free software; you can redistribute it and/or modify
782
# it under the terms of the GNU General Public License as published by
783
# the Free Software Foundation; either version 2, or (at your option)
786
# This program is distributed in the hope that it will be useful,
787
# but WITHOUT ANY WARRANTY; without even the implied warranty of
788
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
789
# GNU General Public License for more details.
791
# You should have received a copy of the GNU General Public License
792
# along with this program; if not, write to the Free Software
793
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
800
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
801
# -------------------------------------
802
# Define a conditional.
803
AC_DEFUN([AM_CONDITIONAL],
804
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
805
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
815
AC_CONFIG_COMMANDS_PRE(
816
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
817
AC_MSG_ERROR([conditional "$1" was never defined.
818
Usually this means the macro was only invoked conditionally.])
821
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
823
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
825
# This program is free software; you can redistribute it and/or modify
826
# it under the terms of the GNU General Public License as published by
827
# the Free Software Foundation; either version 2, or (at your option)
830
# This program is distributed in the hope that it will be useful,
831
# but WITHOUT ANY WARRANTY; without even the implied warranty of
832
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
833
# GNU General Public License for more details.
835
# You should have received a copy of the GNU General Public License
836
# along with this program; if not, write to the Free Software
837
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
844
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
845
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
848
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
849
dnl This file is free software, distributed under the terms of the GNU
850
dnl General Public License. As a special exception to the GNU General
851
dnl Public License, this file may be distributed as part of a program
852
dnl that contains a configuration script generated by Autoconf, under
853
dnl the same distribution terms as the rest of that program.
855
AC_DEFUN([gl_FUNC_ALLOCA],
857
dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
858
AC_REQUIRE([AC_PROG_CPP])
859
AC_REQUIRE([AC_PROG_EGREP])
861
AC_REQUIRE([AC_FUNC_ALLOCA])
862
if test $ac_cv_func_alloca_works = no; then
866
# Define an additional variable used in the Makefile substitution.
868
AC_EGREP_CPP([Need own alloca], [
869
#if defined __GNUC__ || defined _MSC_VER || !HAVE_ALLOCA_H
878
# Prerequisites of lib/alloca.c.
879
# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
880
AC_DEFUN([gl_PREREQ_ALLOCA], [
881
AC_CHECK_HEADERS_ONCE(stdlib.h string.h)
884
# onceonly_2_57.m4 serial 3
885
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
886
dnl This file is free software, distributed under the terms of the GNU
887
dnl General Public License. As a special exception to the GNU General
888
dnl Public License, this file may be distributed as part of a program
889
dnl that contains a configuration script generated by Autoconf, under
890
dnl the same distribution terms as the rest of that program.
892
dnl This file defines some "once only" variants of standard autoconf macros.
893
dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
894
dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
895
dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
896
dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
897
dnl The advantage is that the check for each of the headers/functions/decls
898
dnl will be put only once into the 'configure' file. It keeps the size of
899
dnl the 'configure' file down, and avoids redundant output when 'configure'
901
dnl The drawback is that the checks cannot be conditionalized. If you write
902
dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
903
dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
904
dnl empty, and the check will be inserted before the body of the AC_DEFUNed
907
dnl This is like onceonly.m4, except that it uses diversions to named sections
908
dnl DEFAULTS and INIT_PREPARE in order to check all requested headers at once,
909
dnl thus reducing the size of 'configure'. Works with autoconf-2.57. The
910
dnl size reduction is ca. 9%.
912
dnl Autoconf version 2.57 or newer is recommended.
915
# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
916
# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
917
AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
919
AC_FOREACH([gl_HEADER_NAME], [$1], [
920
AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
922
m4_divert_text([INIT_PREPARE],
923
[gl_header_list="$gl_header_list gl_HEADER_NAME"])
925
AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])),
926
[Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.])
928
AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
932
m4_define([gl_HEADERS_EXPANSION], [
933
m4_divert_text([DEFAULTS], [gl_header_list=])
934
AC_CHECK_HEADERS([$gl_header_list])
935
m4_define([gl_HEADERS_EXPANSION], [])
938
# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
939
# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
940
AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
942
AC_FOREACH([gl_FUNC_NAME], [$1], [
943
AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
944
m4_divert_text([INIT_PREPARE],
945
[gl_func_list="$gl_func_list gl_FUNC_NAME"])
947
AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])),
948
[Define to 1 if you have the `]m4_defn([gl_FUNC_NAME])[' function.])
950
AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
953
m4_define([gl_FUNCS_EXPANSION], [
954
m4_divert_text([DEFAULTS], [gl_func_list=])
955
AC_CHECK_FUNCS([$gl_func_list])
956
m4_define([gl_FUNCS_EXPANSION], [])
959
# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
960
# AC_CHECK_DECLS(DECL1, DECL2, ...).
961
AC_DEFUN([AC_CHECK_DECLS_ONCE], [
963
AC_FOREACH([gl_DECL_NAME], [$1], [
964
AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
965
AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
967
AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
971
# dirname.m4 serial 1
972
dnl Copyright (C) 2002 Free Software Foundation, Inc.
973
dnl This file is free software, distributed under the terms of the GNU
974
dnl General Public License. As a special exception to the GNU General
975
dnl Public License, this file may be distributed as part of a program
976
dnl that contains a configuration script generated by Autoconf, under
977
dnl the same distribution terms as the rest of that program.
979
AC_DEFUN([gl_DIRNAME],
981
dnl Prerequisites of lib/dirname.h.
982
AC_REQUIRE([jm_AC_DOS])
984
dnl Prerequisites of lib/dirname.c.
985
AC_REQUIRE([AC_HEADER_STDC])
986
AC_CHECK_HEADERS_ONCE(string.h)
988
dnl Prerequisites of lib/basename.c.
989
AC_REQUIRE([AC_HEADER_STDC])
990
AC_CHECK_HEADERS_ONCE(string.h)
992
dnl Prerequisites of lib/stripslash.c.
993
AC_REQUIRE([AC_HEADER_STDC])
994
AC_CHECK_HEADERS_ONCE(string.h)
999
# Define some macros required for proper operation of code in lib/*.c
1000
# on MSDOS/Windows systems.
1002
# From Jim Meyering.
1004
AC_DEFUN([jm_AC_DOS],
1006
AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
1009
[#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
1010
neither MSDOS nor Windows
1012
[ac_cv_win_or_dos=yes],
1013
[ac_cv_win_or_dos=no])
1016
if test x"$ac_cv_win_or_dos" = xyes; then
1017
ac_fs_accepts_drive_letter_prefix=1
1018
ac_fs_backslash_is_file_name_separator=1
1020
ac_fs_accepts_drive_letter_prefix=0
1021
ac_fs_backslash_is_file_name_separator=0
1024
AH_VERBATIM(FILESYSTEM_PREFIX_LEN,
1025
[#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
1026
# define FILESYSTEM_PREFIX_LEN(Filename) \
1027
((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
1029
# define FILESYSTEM_PREFIX_LEN(Filename) 0
1032
AC_DEFINE_UNQUOTED([FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
1033
$ac_fs_accepts_drive_letter_prefix,
1034
[Define on systems for which file names may have a so-called
1035
`drive letter' prefix, define this to compute the length of that
1036
prefix, including the colon.])
1038
AH_VERBATIM(ISSLASH,
1039
[#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
1040
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
1042
# define ISSLASH(C) ((C) == '/')
1045
AC_DEFINE_UNQUOTED([FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
1046
$ac_fs_backslash_is_file_name_separator,
1047
[Define if the backslash character may also serve as a file name
1048
component separator.])
1053
AC_DEFUN([gl_ERROR],
1055
AC_FUNC_ERROR_AT_LINE
1056
dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
1060
# Prerequisites of lib/error.c.
1061
AC_DEFUN([jm_PREREQ_ERROR],
1063
AC_REQUIRE([AC_HEADER_STDC])
1064
AC_REQUIRE([AC_FUNC_VPRINTF])
1065
AC_CHECK_FUNCS(strerror)
1066
AC_CHECK_DECLS([strerror])
1071
# Experimental replacement for the function in the latest CVS autoconf.
1072
# Use with the error.c file in ../lib.
1074
# Copyright 2001 Free Software Foundation, Inc.
1076
# This program is free software; you can redistribute it and/or modify
1077
# it under the terms of the GNU General Public License as published by
1078
# the Free Software Foundation; either version 2, or (at your option)
1079
# any later version.
1081
# This program is distributed in the hope that it will be useful,
1082
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1083
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1084
# GNU General Public License for more details.
1086
# You should have received a copy of the GNU General Public License
1087
# along with this program; if not, write to the Free Software Foundation,
1088
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
1090
undefine([AC_FUNC_STRERROR_R])
1092
# AC_FUNC_STRERROR_R
1093
# ------------------
1094
AC_DEFUN([AC_FUNC_STRERROR_R],
1095
[AC_CHECK_DECLS([strerror_r])
1096
AC_CHECK_FUNCS([strerror_r])
1097
AC_CACHE_CHECK([whether strerror_r returns char *],
1098
ac_cv_func_strerror_r_char_p,
1100
ac_cv_func_strerror_r_char_p=no
1101
if test $ac_cv_have_decl_strerror_r = yes; then
1102
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
1105
char x = *strerror_r (0, buf, sizeof buf);
1106
char *p = strerror_r (0, buf, sizeof buf);
1108
ac_cv_func_strerror_r_char_p=yes)
1110
# strerror_r is not declared. Choose between
1111
# systems that have relatively inaccessible declarations for the
1112
# function. BeOS and DEC UNIX 4.0 fall in this category, but the
1113
# former has a strerror_r that returns char*, while the latter
1114
# has a strerror_r that returns `int'.
1115
# This test should segfault on the DEC system.
1116
AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
1117
extern char *strerror_r ();],
1119
char x = *strerror_r (0, buf, sizeof buf);
1120
exit (!isalpha (x));]])],
1121
ac_cv_func_strerror_r_char_p=yes, , :)
1124
if test $ac_cv_func_strerror_r_char_p = yes; then
1125
AC_DEFINE([STRERROR_R_CHAR_P], 1,
1126
[Define to 1 if strerror_r returns char *.])
1128
])# AC_FUNC_STRERROR_R
1130
# fileblocks.m4 serial 1
1131
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1132
dnl This file is free software, distributed under the terms of the GNU
1133
dnl General Public License. As a special exception to the GNU General
1134
dnl Public License, this file may be distributed as part of a program
1135
dnl that contains a configuration script generated by Autoconf, under
1136
dnl the same distribution terms as the rest of that program.
1138
AC_DEFUN([gl_FILEBLOCKS],
1141
dnl Note: AC_STRUCT_ST_BLOCKS does AC_LIBOBJ(fileblocks).
1142
if test $ac_cv_member_struct_stat_st_blocks = no; then
1143
gl_PREREQ_FILEBLOCKS
1147
# Prerequisites of lib/fileblocks.c.
1148
AC_DEFUN([gl_PREREQ_FILEBLOCKS], [
1149
AC_CHECK_HEADERS_ONCE(sys/param.h unistd.h)
1152
# filemode.m4 serial 1
1153
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1154
dnl This file is free software, distributed under the terms of the GNU
1155
dnl General Public License. As a special exception to the GNU General
1156
dnl Public License, this file may be distributed as part of a program
1157
dnl that contains a configuration script generated by Autoconf, under
1158
dnl the same distribution terms as the rest of that program.
1160
AC_DEFUN([gl_FILEMODE],
1162
dnl Prerequisites of lib/filemode.c.
1163
AC_REQUIRE([AC_HEADER_STAT])
1166
# getline.m4 serial 8
1168
dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
1169
dnl Foundation, Inc.
1171
dnl This file is free software, distributed under the terms of the GNU
1172
dnl General Public License. As a special exception to the GNU General
1173
dnl Public License, this file may be distributed as part of a program
1174
dnl that contains a configuration script generated by Autoconf, under
1175
dnl the same distribution terms as the rest of that program.
1179
dnl See if there's a working, system-supplied version of the getline function.
1180
dnl We can't just do AC_REPLACE_FUNCS(getline) because some systems
1181
dnl have a function by that name in -linet that doesn't have anything
1182
dnl to do with the function we need.
1183
AC_DEFUN([AM_FUNC_GETLINE],
1185
dnl Persuade glibc <stdio.h> to declare getline() and getdelim().
1186
AC_REQUIRE([AC_GNU_SOURCE])
1188
am_getline_needs_run_time_check=no
1189
AC_CHECK_FUNC(getline,
1190
dnl Found it in some library. Verify that it works.
1191
am_getline_needs_run_time_check=yes,
1192
am_cv_func_working_getline=no)
1193
if test $am_getline_needs_run_time_check = yes; then
1194
AC_CACHE_CHECK([for working getline function], am_cv_func_working_getline,
1195
[echo fooN |tr -d '\012'|tr N '\012' > conftest.data
1198
# include <stdlib.h>
1199
# include <string.h>
1201
{ /* Based on a test program from Karl Heuer. */
1205
FILE *in = fopen ("./conftest.data", "r");
1208
len = getline (&line, &siz, in);
1209
exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
1211
], am_cv_func_working_getline=yes dnl The library version works.
1212
, am_cv_func_working_getline=no dnl The library version does NOT work.
1213
, am_cv_func_working_getline=no dnl We're cross compiling.
1217
if test $am_cv_func_working_getline = no; then
1218
dnl We must choose a different name for our function, since on ELF systems
1219
dnl a broken getline() in libc.so would override our getline() in
1220
dnl libgettextlib.so.
1221
AC_DEFINE([getline], [gnu_getline],
1222
[Define to a replacement function name for getline().])
1228
# Prerequisites of lib/getline.c.
1229
AC_DEFUN([gl_PREREQ_GETLINE],
1231
AC_REQUIRE([AC_HEADER_STDC])
1232
AC_CHECK_FUNCS(getdelim)
1235
# getopt.m4 serial 1
1236
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1237
dnl This file is free software, distributed under the terms of the GNU
1238
dnl General Public License. As a special exception to the GNU General
1239
dnl Public License, this file may be distributed as part of a program
1240
dnl that contains a configuration script generated by Autoconf, under
1241
dnl the same distribution terms as the rest of that program.
1243
AC_DEFUN([gl_GETOPT],
1245
dnl Prerequisites of lib/getopt.c.
1246
AC_CHECK_HEADERS_ONCE(string.h)
1249
# gettext.m4 serial 17 (gettext-0.11.5)
1250
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1251
dnl This file is free software, distributed under the terms of the GNU
1252
dnl General Public License. As a special exception to the GNU General
1253
dnl Public License, this file may be distributed as part of a program
1254
dnl that contains a configuration script generated by Autoconf, under
1255
dnl the same distribution terms as the rest of that program.
1257
dnl This file can can be used in projects which are not available under
1258
dnl the GNU General Public License or the GNU Library General Public
1259
dnl License but which still want to provide support for the GNU gettext
1261
dnl Please note that the actual code of the GNU gettext library is covered
1262
dnl by the GNU Library General Public License, and the rest of the GNU
1263
dnl gettext package package is covered by the GNU General Public License.
1264
dnl They are *not* in the public domain.
1267
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1268
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
1270
dnl Macro to add for using GNU gettext.
1272
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
1273
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
1274
dnl default (if it is not specified or empty) is 'no-libtool'.
1275
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
1276
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
1277
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
1278
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
1279
dnl depending on --{enable,disable}-{shared,static} and on the presence of
1280
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
1281
dnl $(top_builddir)/intl/libintl.a will be created.
1282
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
1283
dnl implementations (in libc or libintl) without the ngettext() function
1284
dnl will be ignored. If NEEDSYMBOL is specified and is
1285
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
1286
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
1287
dnl INTLDIR is used to find the intl libraries. If empty,
1288
dnl the value `$(top_builddir)/intl/' is used.
1290
dnl The result of the configuration is one of three cases:
1291
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
1293
dnl Catalog format: GNU --> install in $(datadir)
1294
dnl Catalog extension: .mo after installation, .gmo in source tree
1295
dnl 2) GNU gettext has been found in the system's C library.
1296
dnl Catalog format: GNU --> install in $(datadir)
1297
dnl Catalog extension: .mo after installation, .gmo in source tree
1298
dnl 3) No internationalization, always use English msgid.
1299
dnl Catalog format: none
1300
dnl Catalog extension: none
1301
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
1302
dnl The use of .gmo is historical (it was needed to avoid overwriting the
1303
dnl GNU format catalogs when building on a platform with an X/Open gettext),
1304
dnl but we keep it in order not to force irrelevant filename changes on the
1307
AC_DEFUN([AM_GNU_GETTEXT],
1309
dnl Argument checking.
1310
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
1311
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
1313
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
1314
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
1316
define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
1317
define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
1319
AC_REQUIRE([AM_PO_SUBDIRS])dnl
1320
ifelse(gt_included_intl, yes, [
1321
AC_REQUIRE([AM_INTL_SUBDIR])dnl
1324
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
1325
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1326
AC_REQUIRE([AC_LIB_RPATH])
1328
dnl Sometimes libintl requires libiconv, so first search for libiconv.
1329
dnl Ideally we would do this search only after the
1330
dnl if test "$USE_NLS" = "yes"; then
1331
dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
1332
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
1333
dnl the configure script would need to contain the same shell code
1334
dnl again, outside any 'if'. There are two solutions:
1335
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
1336
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
1337
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
1338
dnl documented, we avoid it.
1339
ifelse(gt_included_intl, yes, , [
1340
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
1343
AC_MSG_CHECKING([whether NLS is requested])
1344
dnl Default is enabled NLS
1346
[ --disable-nls do not use Native Language Support],
1347
USE_NLS=$enableval, USE_NLS=yes)
1348
AC_MSG_RESULT($USE_NLS)
1351
ifelse(gt_included_intl, yes, [
1352
BUILD_INCLUDED_LIBINTL=no
1353
USE_INCLUDED_LIBINTL=no
1359
dnl If we use NLS figure out what method
1360
if test "$USE_NLS" = "yes"; then
1361
gt_use_preinstalled_gnugettext=no
1362
ifelse(gt_included_intl, yes, [
1363
AC_MSG_CHECKING([whether included gettext is requested])
1364
AC_ARG_WITH(included-gettext,
1365
[ --with-included-gettext use the GNU gettext library included here],
1366
nls_cv_force_use_gnu_gettext=$withval,
1367
nls_cv_force_use_gnu_gettext=no)
1368
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
1370
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
1371
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
1373
dnl User does not insist on using GNU NLS library. Figure out what
1374
dnl to use. If GNU gettext is available we use this. Else we have
1375
dnl to fall back to GNU NLS library.
1377
dnl Add a version number to the cache macros.
1378
define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
1379
define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
1380
define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
1382
AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
1383
[AC_TRY_LINK([#include <libintl.h>
1384
]ifelse([$2], [need-formatstring-macros],
1385
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1386
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1389
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1391
], [])[extern int _nl_msg_cat_cntr;
1392
extern int *_nl_domain_bindings;],
1393
[bindtextdomain ("", "");
1394
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
1395
gt_cv_func_gnugettext_libc=yes,
1396
gt_cv_func_gnugettext_libc=no)])
1398
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
1399
dnl Sometimes libintl requires libiconv, so first search for libiconv.
1400
ifelse(gt_included_intl, yes, , [
1403
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
1404
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
1405
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
1406
dnl even if libiconv doesn't exist.
1407
AC_LIB_LINKFLAGS_BODY([intl])
1408
AC_CACHE_CHECK([for GNU gettext in libintl],
1409
gt_cv_func_gnugettext_libintl,
1410
[gt_save_CPPFLAGS="$CPPFLAGS"
1411
CPPFLAGS="$CPPFLAGS $INCINTL"
1412
gt_save_LIBS="$LIBS"
1413
LIBS="$LIBS $LIBINTL"
1414
dnl Now see whether libintl exists and does not depend on libiconv.
1415
AC_TRY_LINK([#include <libintl.h>
1416
]ifelse([$2], [need-formatstring-macros],
1417
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1418
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1421
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1423
], [])[extern int _nl_msg_cat_cntr;
1428
const char *_nl_expand_alias ();],
1429
[bindtextdomain ("", "");
1430
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
1431
gt_cv_func_gnugettext_libintl=yes,
1432
gt_cv_func_gnugettext_libintl=no)
1433
dnl Now see whether libintl exists and depends on libiconv.
1434
if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
1435
LIBS="$LIBS $LIBICONV"
1436
AC_TRY_LINK([#include <libintl.h>
1437
]ifelse([$2], [need-formatstring-macros],
1438
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1439
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1442
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1444
], [])[extern int _nl_msg_cat_cntr;
1449
const char *_nl_expand_alias ();],
1450
[bindtextdomain ("", "");
1451
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
1452
[LIBINTL="$LIBINTL $LIBICONV"
1453
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
1454
gt_cv_func_gnugettext_libintl=yes
1457
CPPFLAGS="$gt_save_CPPFLAGS"
1458
LIBS="$gt_save_LIBS"])
1461
dnl If an already present or preinstalled GNU gettext() is found,
1462
dnl use it. But if this macro is used in GNU gettext, and GNU
1463
dnl gettext is already preinstalled in libintl, we update this
1464
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
1465
if test "$gt_cv_func_gnugettext_libc" = "yes" \
1466
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
1467
&& test "$PACKAGE" != gettext; }; then
1468
gt_use_preinstalled_gnugettext=yes
1470
dnl Reset the values set by searching for libintl.
1476
ifelse(gt_included_intl, yes, [
1477
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
1478
dnl GNU gettext is not found in the C library.
1479
dnl Fall back on included GNU gettext library.
1480
nls_cv_use_gnu_gettext=yes
1484
if test "$nls_cv_use_gnu_gettext" = "yes"; then
1485
dnl Mark actions used to generate GNU NLS library.
1486
INTLOBJS="\$(GETTOBJS)"
1487
BUILD_INCLUDED_LIBINTL=yes
1488
USE_INCLUDED_LIBINTL=yes
1489
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
1490
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
1491
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
1494
if test "$gt_use_preinstalled_gnugettext" = "yes" \
1495
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
1496
dnl Mark actions to use GNU gettext tools.
1501
if test "$gt_use_preinstalled_gnugettext" = "yes" \
1502
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
1503
AC_DEFINE(ENABLE_NLS, 1,
1504
[Define to 1 if translation of program messages to the user's native language
1511
if test "$USE_NLS" = "yes"; then
1513
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1514
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
1515
AC_MSG_CHECKING([how to link with libintl])
1516
AC_MSG_RESULT([$LIBINTL])
1517
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
1520
dnl For backward compatibility. Some packages may be using this.
1521
AC_DEFINE(HAVE_GETTEXT, 1,
1522
[Define if the GNU gettext() function is already present or preinstalled.])
1523
AC_DEFINE(HAVE_DCGETTEXT, 1,
1524
[Define if the GNU dcgettext() function is already present or preinstalled.])
1527
dnl We need to process the po/ directory.
1531
ifelse(gt_included_intl, yes, [
1532
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
1533
dnl to 'yes' because some of the testsuite requires it.
1534
if test "$PACKAGE" = gettext; then
1535
BUILD_INCLUDED_LIBINTL=yes
1538
dnl Make all variables we use known to autoconf.
1539
AC_SUBST(BUILD_INCLUDED_LIBINTL)
1540
AC_SUBST(USE_INCLUDED_LIBINTL)
1544
dnl For backward compatibility. Some configure.ins may be using this.
1546
nls_cv_header_libgt=
1548
dnl For backward compatibility. Some Makefiles may be using this.
1550
AC_SUBST(DATADIRNAME)
1552
dnl For backward compatibility. Some Makefiles may be using this.
1554
AC_SUBST(INSTOBJEXT)
1556
dnl For backward compatibility. Some Makefiles may be using this.
1560
dnl Enable libtool support if the surrounding package wishes it.
1561
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
1562
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
1565
dnl For backward compatibility. Some Makefiles may be using this.
1569
dnl Make all documented variables known to autoconf.
1576
dnl Checks for all prerequisites of the po subdirectory,
1577
dnl except for USE_NLS.
1578
AC_DEFUN([AM_PO_SUBDIRS],
1580
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1581
AC_REQUIRE([AC_PROG_INSTALL])dnl
1582
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1584
dnl Perform the following tests also if --disable-nls has been given,
1585
dnl because they are needed for "make dist" to work.
1587
dnl Search for GNU msgfmt in the PATH.
1588
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1589
dnl The second test excludes FreeBSD msgfmt.
1590
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1591
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
1592
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1594
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1596
dnl Search for GNU xgettext 0.11 or newer in the PATH.
1597
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1598
dnl The second test excludes FreeBSD xgettext.
1599
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1600
[$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
1601
(if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1603
dnl Remove leftover from FreeBSD xgettext call.
1606
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
1607
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
1608
[$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
1610
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1611
dnl Test whether we really found GNU msgfmt.
1612
if test "$GMSGFMT" != ":"; then
1613
dnl If it is no GNU msgfmt we define it as : so that the
1614
dnl Makefiles still can work.
1615
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
1616
(if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1619
GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
1621
[found $GMSGFMT program is not GNU msgfmt; ignore it])
1626
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1627
dnl Test whether we really found GNU xgettext.
1628
if test "$XGETTEXT" != ":"; then
1629
dnl If it is no GNU xgettext we define it as : so that the
1630
dnl Makefiles still can work.
1631
if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
1632
(if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1636
[found xgettext program is not GNU xgettext; ignore it])
1639
dnl Remove leftover from FreeBSD xgettext call.
1643
AC_OUTPUT_COMMANDS([
1644
for ac_file in $CONFIG_FILES; do
1645
# Support "outfile[:infile[:infile...]]"
1647
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1649
# PO directories have a Makefile.in generated from Makefile.in.in.
1650
case "$ac_file" in */Makefile.in)
1651
# Adjust a relative srcdir.
1652
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1653
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1654
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1655
# In autoconf-2.13 it is called $ac_given_srcdir.
1656
# In autoconf-2.50 it is called $srcdir.
1657
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1658
case "$ac_given_srcdir" in
1659
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1660
/*) top_srcdir="$ac_given_srcdir" ;;
1661
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
1663
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
1664
rm -f "$ac_dir/POTFILES"
1665
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
1666
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
1667
# ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
1668
# on $ac_dir but don't depend on user-specified configuration
1670
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1671
# The LINGUAS file contains the set of available languages.
1672
if test -n "$ALL_LINGUAS"; then
1673
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1675
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1676
# Hide the ALL_LINGUAS assigment from automake.
1677
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1679
case "$ac_given_srcdir" in
1681
*) srcdirpre='$(srcdir)/' ;;
1687
for lang in $ALL_LINGUAS; do
1688
POFILES="$POFILES $srcdirpre$lang.po"
1689
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1690
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1691
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1693
# CATALOGS depends on both $ac_dir and the user's LINGUAS
1694
# environment variable.
1696
if test -n "$ALL_LINGUAS"; then
1697
for presentlang in $ALL_LINGUAS; do
1699
if test "%UNSET%" != "$LINGUAS"; then
1700
desiredlanguages="$LINGUAS"
1702
desiredlanguages="$ALL_LINGUAS"
1704
for desiredlang in $desiredlanguages; do
1705
# Use the presentlang catalog if desiredlang is
1706
# a. equal to presentlang, or
1707
# b. a variant of presentlang (because in this case,
1708
# presentlang can be used as a fallback for messages
1709
# which are not translated in the desiredlang catalog).
1710
case "$desiredlang" in
1711
"$presentlang"*) useit=yes;;
1714
if test $useit = yes; then
1715
INST_LINGUAS="$INST_LINGUAS $presentlang"
1720
if test -n "$INST_LINGUAS"; then
1721
for lang in $INST_LINGUAS; do
1722
CATALOGS="$CATALOGS $lang.gmo"
1725
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
1726
sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
1727
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
1728
if test -f "$f"; then
1730
*.orig | *.bak | *~) ;;
1731
*) cat "$f" >> "$ac_dir/Makefile" ;;
1739
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
1740
# POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
1742
eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
1743
# Capture the value of LINGUAS because we need it to compute CATALOGS.
1744
LINGUAS="${LINGUAS-%UNSET%}"
1749
dnl Checks for all prerequisites of the intl subdirectory,
1750
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
1751
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
1752
AC_DEFUN([AM_INTL_SUBDIR],
1754
AC_REQUIRE([AC_PROG_INSTALL])dnl
1755
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1756
AC_REQUIRE([AC_PROG_CC])dnl
1757
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1758
AC_REQUIRE([AC_PROG_RANLIB])dnl
1759
AC_REQUIRE([AC_ISC_POSIX])dnl
1760
AC_REQUIRE([AC_HEADER_STDC])dnl
1761
AC_REQUIRE([AC_C_CONST])dnl
1762
AC_REQUIRE([AC_C_INLINE])dnl
1763
AC_REQUIRE([AC_TYPE_OFF_T])dnl
1764
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1765
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1766
AC_REQUIRE([AC_FUNC_MMAP])dnl
1767
AC_REQUIRE([jm_GLIBC21])dnl
1768
AC_REQUIRE([gt_INTDIV0])dnl
1769
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
1770
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
1771
AC_REQUIRE([gt_INTTYPES_PRI])dnl
1773
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
1774
stdlib.h string.h unistd.h sys/param.h])
1775
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
1776
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
1777
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
1781
if test $ac_cv_header_locale_h = yes; then
1785
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
1786
dnl because plural.y uses bison specific features. It requires at least
1787
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
1789
dnl bison is only needed for the maintainer (who touches plural.y). But in
1790
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
1791
dnl the rule in general Makefile. Now, some people carelessly touch the
1792
dnl files or have a broken "make" program, hence the plural.c rule will
1793
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
1794
dnl present or too old.
1795
AC_CHECK_PROGS([INTLBISON], [bison])
1796
if test -z "$INTLBISON"; then
1799
dnl Found it, now check the version.
1800
AC_MSG_CHECKING([version of bison])
1801
changequote(<<,>>)dnl
1802
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
1803
case $ac_prog_version in
1804
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1805
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
1807
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1808
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1810
AC_MSG_RESULT([$ac_prog_version])
1812
if test $ac_verc_fail = yes; then
1818
AC_DEFUN([AM_MKINSTALLDIRS],
1820
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1821
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
1822
dnl Try to locate is.
1824
if test -n "$ac_aux_dir"; then
1825
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1827
if test -z "$MKINSTALLDIRS"; then
1828
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1830
AC_SUBST(MKINSTALLDIRS)
1834
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
1835
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
1837
# lib-prefix.m4 serial 1 (gettext-0.11)
1838
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1839
dnl This file is free software, distributed under the terms of the GNU
1840
dnl General Public License. As a special exception to the GNU General
1841
dnl Public License, this file may be distributed as part of a program
1842
dnl that contains a configuration script generated by Autoconf, under
1843
dnl the same distribution terms as the rest of that program.
1845
dnl From Bruno Haible.
1847
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1848
dnl to access previously installed libraries. The basic assumption is that
1849
dnl a user will want packages to use other packages he previously installed
1850
dnl with the same --prefix option.
1851
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1852
dnl libraries, but is otherwise very convenient.
1853
AC_DEFUN([AC_LIB_PREFIX],
1855
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1856
AC_REQUIRE([AC_PROG_CC])
1857
AC_REQUIRE([AC_CANONICAL_HOST])
1858
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1859
dnl By default, look in $includedir and $libdir.
1861
AC_LIB_WITH_FINAL_PREFIX([
1862
eval additional_includedir=\"$includedir\"
1863
eval additional_libdir=\"$libdir\"
1865
AC_ARG_WITH([lib-prefix],
1866
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1867
--without-lib-prefix don't search for libraries in includedir and libdir],
1869
if test "X$withval" = "Xno"; then
1872
if test "X$withval" = "X"; then
1873
AC_LIB_WITH_FINAL_PREFIX([
1874
eval additional_includedir=\"$includedir\"
1875
eval additional_libdir=\"$libdir\"
1878
additional_includedir="$withval/include"
1879
additional_libdir="$withval/lib"
1883
if test $use_additional = yes; then
1884
dnl Potentially add $additional_includedir to $CPPFLAGS.
1885
dnl But don't add it
1886
dnl 1. if it's the standard /usr/include,
1887
dnl 2. if it's already present in $CPPFLAGS,
1888
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1889
dnl 4. if it doesn't exist as a directory.
1890
if test "X$additional_includedir" != "X/usr/include"; then
1892
for x in $CPPFLAGS; do
1893
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1894
if test "X$x" = "X-I$additional_includedir"; then
1899
if test -z "$haveit"; then
1900
if test "X$additional_includedir" = "X/usr/local/include"; then
1901
if test -n "$GCC"; then
1903
linux*) haveit=yes;;
1907
if test -z "$haveit"; then
1908
if test -d "$additional_includedir"; then
1909
dnl Really add $additional_includedir to $CPPFLAGS.
1910
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1915
dnl Potentially add $additional_libdir to $LDFLAGS.
1916
dnl But don't add it
1917
dnl 1. if it's the standard /usr/lib,
1918
dnl 2. if it's already present in $LDFLAGS,
1919
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1920
dnl 4. if it doesn't exist as a directory.
1921
if test "X$additional_libdir" != "X/usr/lib"; then
1923
for x in $LDFLAGS; do
1924
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1925
if test "X$x" = "X-L$additional_libdir"; then
1930
if test -z "$haveit"; then
1931
if test "X$additional_libdir" = "X/usr/local/lib"; then
1932
if test -n "$GCC"; then
1934
linux*) haveit=yes;;
1938
if test -z "$haveit"; then
1939
if test -d "$additional_libdir"; then
1940
dnl Really add $additional_libdir to $LDFLAGS.
1941
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1949
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1950
dnl acl_final_exec_prefix, containing the values to which $prefix and
1951
dnl $exec_prefix will expand at the end of the configure script.
1952
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1954
dnl Unfortunately, prefix and exec_prefix get only finally determined
1955
dnl at the end of configure.
1956
if test "X$prefix" = "XNONE"; then
1957
acl_final_prefix="$ac_default_prefix"
1959
acl_final_prefix="$prefix"
1961
if test "X$exec_prefix" = "XNONE"; then
1962
acl_final_exec_prefix='${prefix}'
1964
acl_final_exec_prefix="$exec_prefix"
1966
acl_save_prefix="$prefix"
1967
prefix="$acl_final_prefix"
1968
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1969
prefix="$acl_save_prefix"
1972
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1973
dnl variables prefix and exec_prefix bound to the values they will have
1974
dnl at the end of the configure script.
1975
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1977
acl_save_prefix="$prefix"
1978
prefix="$acl_final_prefix"
1979
acl_save_exec_prefix="$exec_prefix"
1980
exec_prefix="$acl_final_exec_prefix"
1982
exec_prefix="$acl_save_exec_prefix"
1983
prefix="$acl_save_prefix"
1986
# lib-link.m4 serial 3 (gettext-0.11.3)
1987
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1988
dnl This file is free software, distributed under the terms of the GNU
1989
dnl General Public License. As a special exception to the GNU General
1990
dnl Public License, this file may be distributed as part of a program
1991
dnl that contains a configuration script generated by Autoconf, under
1992
dnl the same distribution terms as the rest of that program.
1994
dnl From Bruno Haible.
1996
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1997
dnl the libraries corresponding to explicit and implicit dependencies.
1998
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1999
dnl augments the CPPFLAGS variable.
2000
AC_DEFUN([AC_LIB_LINKFLAGS],
2002
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2003
AC_REQUIRE([AC_LIB_RPATH])
2004
define([Name],[translit([$1],[./-], [___])])
2005
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
2006
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
2007
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
2008
AC_LIB_LINKFLAGS_BODY([$1], [$2])
2009
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
2010
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
2011
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
2013
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
2014
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
2015
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
2016
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
2018
AC_SUBST([LTLIB]NAME)
2019
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
2020
dnl results of this search when this library appears as a dependency.
2026
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
2027
dnl searches for libname and the libraries corresponding to explicit and
2028
dnl implicit dependencies, together with the specified include files and
2029
dnl the ability to compile and link the specified testcode. If found, it
2030
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
2031
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
2032
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
2033
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
2034
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
2036
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2037
AC_REQUIRE([AC_LIB_RPATH])
2038
define([Name],[translit([$1],[./-], [___])])
2039
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
2040
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
2042
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
2044
AC_LIB_LINKFLAGS_BODY([$1], [$2])
2046
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
2047
dnl because if the user has installed lib[]Name and not disabled its use
2048
dnl via --without-lib[]Name-prefix, he wants to use it.
2049
ac_save_CPPFLAGS="$CPPFLAGS"
2050
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
2052
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
2053
ac_save_LIBS="$LIBS"
2054
LIBS="$LIBS $LIB[]NAME"
2055
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
2056
LIBS="$ac_save_LIBS"
2058
if test "$ac_cv_lib[]Name" = yes; then
2060
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
2061
AC_MSG_CHECKING([how to link with lib[]$1])
2062
AC_MSG_RESULT([$LIB[]NAME])
2065
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
2066
dnl $INC[]NAME either.
2067
CPPFLAGS="$ac_save_CPPFLAGS"
2071
AC_SUBST([HAVE_LIB]NAME)
2073
AC_SUBST([LTLIB]NAME)
2078
dnl Determine the platform dependent parameters needed to use rpath:
2079
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
2080
dnl hardcode_direct, hardcode_minus_L,
2081
dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
2082
AC_DEFUN([AC_LIB_RPATH],
2084
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
2085
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
2086
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
2087
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
2088
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
2089
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
2090
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
2096
libext="$acl_cv_libext"
2097
shlibext="$acl_cv_shlibext"
2098
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
2099
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
2100
hardcode_direct="$acl_cv_hardcode_direct"
2101
hardcode_minus_L="$acl_cv_hardcode_minus_L"
2102
sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
2103
sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
2104
dnl Determine whether the user wants rpath handling at all.
2105
AC_ARG_ENABLE(rpath,
2106
[ --disable-rpath do not hardcode runtime library paths],
2107
:, enable_rpath=yes)
2110
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
2111
dnl the libraries corresponding to explicit and implicit dependencies.
2112
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
2113
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
2115
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
2116
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
2117
dnl By default, look in $includedir and $libdir.
2119
AC_LIB_WITH_FINAL_PREFIX([
2120
eval additional_includedir=\"$includedir\"
2121
eval additional_libdir=\"$libdir\"
2123
AC_ARG_WITH([lib$1-prefix],
2124
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
2125
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
2127
if test "X$withval" = "Xno"; then
2130
if test "X$withval" = "X"; then
2131
AC_LIB_WITH_FINAL_PREFIX([
2132
eval additional_includedir=\"$includedir\"
2133
eval additional_libdir=\"$libdir\"
2136
additional_includedir="$withval/include"
2137
additional_libdir="$withval/lib"
2141
dnl Search the library and its dependencies in $additional_libdir and
2142
dnl $LDFLAGS. Using breadth-first-seach.
2148
names_already_handled=
2149
names_next_round='$1 $2'
2150
while test -n "$names_next_round"; do
2151
names_this_round="$names_next_round"
2153
for name in $names_this_round; do
2155
for n in $names_already_handled; do
2156
if test "$n" = "$name"; then
2161
if test -z "$already_handled"; then
2162
names_already_handled="$names_already_handled $name"
2163
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
2164
dnl or AC_LIB_HAVE_LINKFLAGS call.
2165
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
2166
eval value=\"\$HAVE_LIB$uppername\"
2167
if test -n "$value"; then
2168
if test "$value" = yes; then
2169
eval value=\"\$LIB$uppername\"
2170
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
2171
eval value=\"\$LTLIB$uppername\"
2172
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
2174
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
2175
dnl that this library doesn't exist. So just drop it.
2179
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
2180
dnl and the already constructed $LIBNAME/$LTLIBNAME.
2185
if test $use_additional = yes; then
2186
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
2187
found_dir="$additional_libdir"
2188
found_so="$additional_libdir/lib$name.$shlibext"
2189
if test -f "$additional_libdir/lib$name.la"; then
2190
found_la="$additional_libdir/lib$name.la"
2193
if test -f "$additional_libdir/lib$name.$libext"; then
2194
found_dir="$additional_libdir"
2195
found_a="$additional_libdir/lib$name.$libext"
2196
if test -f "$additional_libdir/lib$name.la"; then
2197
found_la="$additional_libdir/lib$name.la"
2202
if test "X$found_dir" = "X"; then
2203
for x in $LDFLAGS $LTLIB[]NAME; do
2204
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2207
dir=`echo "X$x" | sed -e 's/^X-L//'`
2208
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
2210
found_so="$dir/lib$name.$shlibext"
2211
if test -f "$dir/lib$name.la"; then
2212
found_la="$dir/lib$name.la"
2215
if test -f "$dir/lib$name.$libext"; then
2217
found_a="$dir/lib$name.$libext"
2218
if test -f "$dir/lib$name.la"; then
2219
found_la="$dir/lib$name.la"
2225
if test "X$found_dir" != "X"; then
2230
if test "X$found_dir" != "X"; then
2231
dnl Found the library.
2232
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
2233
if test "X$found_so" != "X"; then
2234
dnl Linking with a shared library. We attempt to hardcode its
2235
dnl directory into the executable's runpath, unless it's the
2236
dnl standard /usr/lib.
2237
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
2238
dnl No hardcoding is needed.
2239
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2241
dnl Use an explicit option to hardcode DIR into the resulting
2243
dnl Potentially add DIR to ltrpathdirs.
2244
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2246
for x in $ltrpathdirs; do
2247
if test "X$x" = "X$found_dir"; then
2252
if test -z "$haveit"; then
2253
ltrpathdirs="$ltrpathdirs $found_dir"
2255
dnl The hardcoding into $LIBNAME is system dependent.
2256
if test "$hardcode_direct" = yes; then
2257
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
2258
dnl resulting binary.
2259
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2261
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
2262
dnl Use an explicit option to hardcode DIR into the resulting
2264
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2265
dnl Potentially add DIR to rpathdirs.
2266
dnl The rpathdirs will be appended to $LIBNAME at the end.
2268
for x in $rpathdirs; do
2269
if test "X$x" = "X$found_dir"; then
2274
if test -z "$haveit"; then
2275
rpathdirs="$rpathdirs $found_dir"
2278
dnl Rely on "-L$found_dir".
2279
dnl But don't add it if it's already contained in the LDFLAGS
2280
dnl or the already constructed $LIBNAME
2282
for x in $LDFLAGS $LIB[]NAME; do
2283
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2284
if test "X$x" = "X-L$found_dir"; then
2289
if test -z "$haveit"; then
2290
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
2292
if test "$hardcode_minus_L" != no; then
2293
dnl FIXME: Not sure whether we should use
2294
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2296
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2298
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
2299
dnl here, because this doesn't fit in flags passed to the
2300
dnl compiler. So give up. No hardcoding. This affects only
2301
dnl very old systems.
2302
dnl FIXME: Not sure whether we should use
2303
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2305
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2311
if test "X$found_a" != "X"; then
2312
dnl Linking with a static library.
2313
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
2315
dnl We shouldn't come here, but anyway it's good to have a
2317
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
2320
dnl Assume the include files are nearby.
2321
additional_includedir=
2322
case "$found_dir" in
2324
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
2325
additional_includedir="$basedir/include"
2328
if test "X$additional_includedir" != "X"; then
2329
dnl Potentially add $additional_includedir to $INCNAME.
2330
dnl But don't add it
2331
dnl 1. if it's the standard /usr/include,
2332
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
2333
dnl 3. if it's already present in $CPPFLAGS or the already
2334
dnl constructed $INCNAME,
2335
dnl 4. if it doesn't exist as a directory.
2336
if test "X$additional_includedir" != "X/usr/include"; then
2338
if test "X$additional_includedir" = "X/usr/local/include"; then
2339
if test -n "$GCC"; then
2341
linux*) haveit=yes;;
2345
if test -z "$haveit"; then
2346
for x in $CPPFLAGS $INC[]NAME; do
2347
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2348
if test "X$x" = "X-I$additional_includedir"; then
2353
if test -z "$haveit"; then
2354
if test -d "$additional_includedir"; then
2355
dnl Really add $additional_includedir to $INCNAME.
2356
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
2362
dnl Look for dependencies.
2363
if test -n "$found_la"; then
2364
dnl Read the .la file. It defines the variables
2365
dnl dlname, library_names, old_library, dependency_libs, current,
2366
dnl age, revision, installed, dlopen, dlpreopen, libdir.
2367
save_libdir="$libdir"
2369
*/* | *\\*) . "$found_la" ;;
2370
*) . "./$found_la" ;;
2372
libdir="$save_libdir"
2373
dnl We use only dependency_libs.
2374
for dep in $dependency_libs; do
2377
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
2378
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
2379
dnl But don't add it
2380
dnl 1. if it's the standard /usr/lib,
2381
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
2382
dnl 3. if it's already present in $LDFLAGS or the already
2383
dnl constructed $LIBNAME,
2384
dnl 4. if it doesn't exist as a directory.
2385
if test "X$additional_libdir" != "X/usr/lib"; then
2387
if test "X$additional_libdir" = "X/usr/local/lib"; then
2388
if test -n "$GCC"; then
2390
linux*) haveit=yes;;
2394
if test -z "$haveit"; then
2396
for x in $LDFLAGS $LIB[]NAME; do
2397
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2398
if test "X$x" = "X-L$additional_libdir"; then
2403
if test -z "$haveit"; then
2404
if test -d "$additional_libdir"; then
2405
dnl Really add $additional_libdir to $LIBNAME.
2406
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
2410
for x in $LDFLAGS $LTLIB[]NAME; do
2411
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2412
if test "X$x" = "X-L$additional_libdir"; then
2417
if test -z "$haveit"; then
2418
if test -d "$additional_libdir"; then
2419
dnl Really add $additional_libdir to $LTLIBNAME.
2420
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
2427
dir=`echo "X$dep" | sed -e 's/^X-R//'`
2428
if test "$enable_rpath" != no; then
2429
dnl Potentially add DIR to rpathdirs.
2430
dnl The rpathdirs will be appended to $LIBNAME at the end.
2432
for x in $rpathdirs; do
2433
if test "X$x" = "X$dir"; then
2438
if test -z "$haveit"; then
2439
rpathdirs="$rpathdirs $dir"
2441
dnl Potentially add DIR to ltrpathdirs.
2442
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2444
for x in $ltrpathdirs; do
2445
if test "X$x" = "X$dir"; then
2450
if test -z "$haveit"; then
2451
ltrpathdirs="$ltrpathdirs $dir"
2456
dnl Handle this in the next round.
2457
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
2460
dnl Handle this in the next round. Throw away the .la's
2461
dnl directory; it is already contained in a preceding -L
2463
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
2466
dnl Most likely an immediate library name.
2467
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
2468
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
2474
dnl Didn't find the library; assume it is in the system directories
2475
dnl known to the linker and runtime loader. (All the system
2476
dnl directories known to the linker should also be known to the
2477
dnl runtime loader, otherwise the system is severely misconfigured.)
2478
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2479
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
2485
if test "X$rpathdirs" != "X"; then
2486
if test -n "$hardcode_libdir_separator"; then
2487
dnl Weird platform: only the last -rpath option counts, the user must
2488
dnl pass all path elements in one option. We can arrange that for a
2489
dnl single library, but not when more than one $LIBNAMEs are used.
2491
for found_dir in $rpathdirs; do
2492
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
2494
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
2495
acl_save_libdir="$libdir"
2497
eval flag=\"$hardcode_libdir_flag_spec\"
2498
libdir="$acl_save_libdir"
2499
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2501
dnl The -rpath options are cumulative.
2502
for found_dir in $rpathdirs; do
2503
acl_save_libdir="$libdir"
2505
eval flag=\"$hardcode_libdir_flag_spec\"
2506
libdir="$acl_save_libdir"
2507
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2511
if test "X$ltrpathdirs" != "X"; then
2512
dnl When using libtool, the option that works for both libraries and
2513
dnl executables is -R. The -R options are cumulative.
2514
for found_dir in $ltrpathdirs; do
2515
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
2520
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
2521
dnl unless already present in VAR.
2522
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
2523
dnl contains two or three consecutive elements that belong together.
2524
AC_DEFUN([AC_LIB_APPENDTOVAR],
2526
for element in [$2]; do
2529
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2530
if test "X$x" = "X$element"; then
2535
if test -z "$haveit"; then
2536
[$1]="${[$1]}${[$1]:+ }$element"
2541
# lib-ld.m4 serial 1 (gettext-0.11)
2542
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
2543
dnl This file is free software, distributed under the terms of the GNU
2544
dnl General Public License. As a special exception to the GNU General
2545
dnl Public License, this file may be distributed as part of a program
2546
dnl that contains a configuration script generated by Autoconf, under
2547
dnl the same distribution terms as the rest of that program.
2549
dnl Subroutines of libtool.m4,
2550
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
2551
dnl with libtool.m4.
2553
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
2554
AC_DEFUN([AC_LIB_PROG_LD_GNU],
2555
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
2556
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2557
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2558
acl_cv_prog_gnu_ld=yes
2560
acl_cv_prog_gnu_ld=no
2562
with_gnu_ld=$acl_cv_prog_gnu_ld
2565
dnl From libtool-1.4. Sets the variable LD.
2566
AC_DEFUN([AC_LIB_PROG_LD],
2567
[AC_ARG_WITH(gnu-ld,
2568
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
2569
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
2570
AC_REQUIRE([AC_PROG_CC])dnl
2571
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2573
if test "$GCC" = yes; then
2574
# Check if gcc -print-prog-name=ld gives a path.
2575
AC_MSG_CHECKING([for ld used by GCC])
2578
# gcc leaves a trailing carriage return which upsets mingw
2579
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2581
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2584
# Accept absolute paths.
2585
[[\\/]* | [A-Za-z]:[\\/]*)]
2586
[re_direlt='/[^/][^/]*/\.\./']
2587
# Canonicalize the path of ld
2588
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2589
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2590
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2592
test -z "$LD" && LD="$ac_prog"
2595
# If it fails, then pretend we aren't using GCC.
2599
# If it is relative, then search for the first ld in PATH.
2603
elif test "$with_gnu_ld" = yes; then
2604
AC_MSG_CHECKING([for GNU ld])
2606
AC_MSG_CHECKING([for non-GNU ld])
2608
AC_CACHE_VAL(acl_cv_path_LD,
2609
[if test -z "$LD"; then
2610
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2611
for ac_dir in $PATH; do
2612
test -z "$ac_dir" && ac_dir=.
2613
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2614
acl_cv_path_LD="$ac_dir/$ac_prog"
2615
# Check to see if the program is GNU ld. I'd rather use --version,
2616
# but apparently some GNU ld's only accept -v.
2617
# Break only if it was the GNU/non-GNU ld that we prefer.
2618
if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2619
test "$with_gnu_ld" != no && break
2621
test "$with_gnu_ld" != yes && break
2627
acl_cv_path_LD="$LD" # Let the user override the test with a path.
2629
LD="$acl_cv_path_LD"
2630
if test -n "$LD"; then
2635
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2639
# iconv.m4 serial AM4 (gettext-0.11.3)
2640
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2641
dnl This file is free software, distributed under the terms of the GNU
2642
dnl General Public License. As a special exception to the GNU General
2643
dnl Public License, this file may be distributed as part of a program
2644
dnl that contains a configuration script generated by Autoconf, under
2645
dnl the same distribution terms as the rest of that program.
2647
dnl From Bruno Haible.
2649
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
2651
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
2652
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2653
AC_REQUIRE([AC_LIB_RPATH])
2655
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2657
AC_LIB_LINKFLAGS_BODY([iconv])
2660
AC_DEFUN([AM_ICONV_LINK],
2662
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
2663
dnl those with the standalone portable GNU libiconv installed).
2665
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2667
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
2669
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
2670
dnl because if the user has installed libiconv and not disabled its use
2671
dnl via --without-libiconv-prefix, he wants to use it. The first
2672
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
2673
am_save_CPPFLAGS="$CPPFLAGS"
2674
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
2676
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
2677
am_cv_func_iconv="no, consider installing GNU libiconv"
2679
AC_TRY_LINK([#include <stdlib.h>
2680
#include <iconv.h>],
2681
[iconv_t cd = iconv_open("","");
2682
iconv(cd,NULL,NULL,NULL,NULL);
2684
am_cv_func_iconv=yes)
2685
if test "$am_cv_func_iconv" != yes; then
2686
am_save_LIBS="$LIBS"
2687
LIBS="$LIBS $LIBICONV"
2688
AC_TRY_LINK([#include <stdlib.h>
2689
#include <iconv.h>],
2690
[iconv_t cd = iconv_open("","");
2691
iconv(cd,NULL,NULL,NULL,NULL);
2694
am_cv_func_iconv=yes)
2695
LIBS="$am_save_LIBS"
2698
if test "$am_cv_func_iconv" = yes; then
2699
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
2701
if test "$am_cv_lib_iconv" = yes; then
2702
AC_MSG_CHECKING([how to link with libiconv])
2703
AC_MSG_RESULT([$LIBICONV])
2705
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
2707
CPPFLAGS="$am_save_CPPFLAGS"
2712
AC_SUBST(LTLIBICONV)
2715
AC_DEFUN([AM_ICONV],
2718
if test "$am_cv_func_iconv" = yes; then
2719
AC_MSG_CHECKING([for iconv declaration])
2720
AC_CACHE_VAL(am_cv_proto_iconv, [
2728
#if defined(__STDC__) || defined(__cplusplus)
2729
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
2733
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
2734
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);"])
2735
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
2736
AC_MSG_RESULT([$]{ac_t:-
2737
}[$]am_cv_proto_iconv)
2738
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
2739
[Define as const if the declaration of iconv() needs const.])
2743
# progtest.m4 serial 2 (gettext-0.10.40)
2744
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
2745
dnl This file is free software, distributed under the terms of the GNU
2746
dnl General Public License. As a special exception to the GNU General
2747
dnl Public License, this file may be distributed as part of a program
2748
dnl that contains a configuration script generated by Autoconf, under
2749
dnl the same distribution terms as the rest of that program.
2751
dnl This file can can be used in projects which are not available under
2752
dnl the GNU General Public License or the GNU Library General Public
2753
dnl License but which still want to provide support for the GNU gettext
2755
dnl Please note that the actual code of the GNU gettext library is covered
2756
dnl by the GNU Library General Public License, and the rest of the GNU
2757
dnl gettext package package is covered by the GNU General Public License.
2758
dnl They are *not* in the public domain.
2761
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
2763
# Search path for a program which passes the given test.
2765
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2766
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2767
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2768
[# Extract the first word of "$2", so it can be a program name with args.
2769
set dummy $2; ac_word=[$]2
2770
AC_MSG_CHECKING([for $ac_word])
2771
AC_CACHE_VAL(ac_cv_path_$1,
2774
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2777
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2778
for ac_dir in ifelse([$5], , $PATH, [$5]); do
2779
test -z "$ac_dir" && ac_dir=.
2780
if test -f $ac_dir/$ac_word; then
2782
ac_cv_path_$1="$ac_dir/$ac_word"
2788
dnl If no 4th arg is given, leave the cache variable unset,
2789
dnl so AC_PATH_PROGS will keep looking.
2790
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2795
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2796
AC_MSG_RESULT([$]$1)
2803
# isc-posix.m4 serial 2 (gettext-0.11.2)
2804
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2805
dnl This file is free software, distributed under the terms of the GNU
2806
dnl General Public License. As a special exception to the GNU General
2807
dnl Public License, this file may be distributed as part of a program
2808
dnl that contains a configuration script generated by Autoconf, under
2809
dnl the same distribution terms as the rest of that program.
2811
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
2813
# This test replaces the one in autoconf.
2814
# Currently this macro should have the same name as the autoconf macro
2815
# because gettext's gettext.m4 (distributed in the automake package)
2816
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
2817
# give these diagnostics:
2818
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
2819
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
2821
undefine([AC_ISC_POSIX])
2823
AC_DEFUN([AC_ISC_POSIX],
2825
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
2826
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
2830
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
2831
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2832
dnl This file is free software, distributed under the terms of the GNU
2833
dnl General Public License. As a special exception to the GNU General
2834
dnl Public License, this file may be distributed as part of a program
2835
dnl that contains a configuration script generated by Autoconf, under
2836
dnl the same distribution terms as the rest of that program.
2838
# Test for the GNU C Library, version 2.1 or newer.
2839
# From Bruno Haible.
2841
AC_DEFUN([jm_GLIBC21],
2843
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
2844
ac_cv_gnu_library_2_1,
2845
[AC_EGREP_CPP([Lucky GNU user],
2847
#include <features.h>
2848
#ifdef __GNU_LIBRARY__
2849
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
2854
ac_cv_gnu_library_2_1=yes,
2855
ac_cv_gnu_library_2_1=no)
2859
GLIBC21="$ac_cv_gnu_library_2_1"
2863
# intdiv0.m4 serial 1 (gettext-0.11.3)
2864
dnl Copyright (C) 2002 Free Software Foundation, Inc.
2865
dnl This file is free software, distributed under the terms of the GNU
2866
dnl General Public License. As a special exception to the GNU General
2867
dnl Public License, this file may be distributed as part of a program
2868
dnl that contains a configuration script generated by Autoconf, under
2869
dnl the same distribution terms as the rest of that program.
2871
dnl From Bruno Haible.
2873
AC_DEFUN([gt_INTDIV0],
2875
AC_REQUIRE([AC_PROG_CC])dnl
2876
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2878
AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
2879
gt_cv_int_divbyzero_sigfpe,
2887
sigfpe_handler (int sig)
2889
sigfpe_handler (sig) int sig;
2892
/* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
2893
exit (sig != SIGFPE);
2903
signal (SIGFPE, sigfpe_handler);
2904
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
2905
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
2906
signal (SIGTRAP, sigfpe_handler);
2908
/* Linux/SPARC yields signal SIGILL. */
2909
#if defined (__sparc__) && defined (__linux__)
2910
signal (SIGILL, sigfpe_handler);
2917
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
2919
# Guess based on the CPU.
2921
alpha* | i[34567]86 | m68k | s390*)
2922
gt_cv_int_divbyzero_sigfpe="guessing yes";;
2924
gt_cv_int_divbyzero_sigfpe="guessing no";;
2928
case "$gt_cv_int_divbyzero_sigfpe" in
2932
AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
2933
[Define if integer division by zero raises signal SIGFPE.])
2936
# uintmax_t.m4 serial 7 (gettext-0.11.6)
2937
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2938
dnl This file is free software, distributed under the terms of the GNU
2939
dnl General Public License. As a special exception to the GNU General
2940
dnl Public License, this file may be distributed as part of a program
2941
dnl that contains a configuration script generated by Autoconf, under
2942
dnl the same distribution terms as the rest of that program.
2944
dnl From Paul Eggert.
2948
# Define uintmax_t to 'unsigned long' or 'unsigned long long'
2949
# if it is not already defined in <stdint.h> or <inttypes.h>.
2951
AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
2953
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
2954
AC_REQUIRE([jm_AC_HEADER_STDINT_H])
2955
if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
2956
AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
2957
test $ac_cv_type_unsigned_long_long = yes \
2958
&& ac_type='unsigned long long' \
2959
|| ac_type='unsigned long'
2960
AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
2961
[Define to unsigned long or unsigned long long
2962
if <stdint.h> and <inttypes.h> don't define.])
2964
AC_DEFINE(HAVE_UINTMAX_T, 1,
2965
[Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
2969
# inttypes_h.m4 serial 5 (gettext-0.11.6)
2970
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2971
dnl This file is free software, distributed under the terms of the GNU
2972
dnl General Public License. As a special exception to the GNU General
2973
dnl Public License, this file may be distributed as part of a program
2974
dnl that contains a configuration script generated by Autoconf, under
2975
dnl the same distribution terms as the rest of that program.
2977
dnl From Paul Eggert.
2979
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
2980
# doesn't clash with <sys/types.h>, and declares uintmax_t.
2982
AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
2984
AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
2986
[#include <sys/types.h>
2987
#include <inttypes.h>],
2988
[uintmax_t i = (uintmax_t) -1;],
2989
jm_ac_cv_header_inttypes_h=yes,
2990
jm_ac_cv_header_inttypes_h=no)])
2991
if test $jm_ac_cv_header_inttypes_h = yes; then
2992
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
2993
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
2994
and declares uintmax_t. ])
2998
# stdint_h.m4 serial 3 (gettext-0.11.6)
2999
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
3000
dnl This file is free software, distributed under the terms of the GNU
3001
dnl General Public License. As a special exception to the GNU General
3002
dnl Public License, this file may be distributed as part of a program
3003
dnl that contains a configuration script generated by Autoconf, under
3004
dnl the same distribution terms as the rest of that program.
3006
dnl From Paul Eggert.
3008
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
3009
# doesn't clash with <sys/types.h>, and declares uintmax_t.
3011
AC_DEFUN([jm_AC_HEADER_STDINT_H],
3013
AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
3015
[#include <sys/types.h>
3016
#include <stdint.h>],
3017
[uintmax_t i = (uintmax_t) -1;],
3018
jm_ac_cv_header_stdint_h=yes,
3019
jm_ac_cv_header_stdint_h=no)])
3020
if test $jm_ac_cv_header_stdint_h = yes; then
3021
AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
3022
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
3023
and declares uintmax_t. ])
3027
# ulonglong.m4 serial 3
3028
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
3029
dnl This file is free software, distributed under the terms of the GNU
3030
dnl General Public License. As a special exception to the GNU General
3031
dnl Public License, this file may be distributed as part of a program
3032
dnl that contains a configuration script generated by Autoconf, under
3033
dnl the same distribution terms as the rest of that program.
3035
dnl From Paul Eggert.
3037
# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
3039
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
3041
AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
3042
[AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
3043
[unsigned long long ullmax = (unsigned long long) -1;
3044
return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
3045
ac_cv_type_unsigned_long_long=yes,
3046
ac_cv_type_unsigned_long_long=no)])
3047
if test $ac_cv_type_unsigned_long_long = yes; then
3048
AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
3049
[Define if you have the 'unsigned long long' type.])
3053
# inttypes.m4 serial 1 (gettext-0.11.4)
3054
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
3055
dnl This file is free software, distributed under the terms of the GNU
3056
dnl General Public License. As a special exception to the GNU General
3057
dnl Public License, this file may be distributed as part of a program
3058
dnl that contains a configuration script generated by Autoconf, under
3059
dnl the same distribution terms as the rest of that program.
3061
dnl From Paul Eggert.
3063
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
3066
AC_DEFUN([gt_HEADER_INTTYPES_H],
3068
AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
3071
[#include <sys/types.h>
3072
#include <inttypes.h>],
3073
[], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
3075
if test $gt_cv_header_inttypes_h = yes; then
3076
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
3077
[Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
3081
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
3082
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
3083
dnl This file is free software, distributed under the terms of the GNU
3084
dnl General Public License. As a special exception to the GNU General
3085
dnl Public License, this file may be distributed as part of a program
3086
dnl that contains a configuration script generated by Autoconf, under
3087
dnl the same distribution terms as the rest of that program.
3089
dnl From Bruno Haible.
3091
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
3092
# macros to non-string values. This is the case on AIX 4.3.3.
3094
AC_DEFUN([gt_INTTYPES_PRI],
3096
AC_REQUIRE([gt_HEADER_INTTYPES_H])
3097
if test $gt_cv_header_inttypes_h = yes; then
3098
AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
3099
gt_cv_inttypes_pri_broken,
3101
AC_TRY_COMPILE([#include <inttypes.h>
3105
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
3108
if test "$gt_cv_inttypes_pri_broken" = yes; then
3109
AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
3110
[Define if <inttypes.h> exists and defines unusable PRI* macros.])
3114
# codeset.m4 serial AM1 (gettext-0.10.40)
3115
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
3116
dnl This file is free software, distributed under the terms of the GNU
3117
dnl General Public License. As a special exception to the GNU General
3118
dnl Public License, this file may be distributed as part of a program
3119
dnl that contains a configuration script generated by Autoconf, under
3120
dnl the same distribution terms as the rest of that program.
3122
dnl From Bruno Haible.
3124
AC_DEFUN([AM_LANGINFO_CODESET],
3126
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
3127
[AC_TRY_LINK([#include <langinfo.h>],
3128
[char* cs = nl_langinfo(CODESET);],
3129
am_cv_langinfo_codeset=yes,
3130
am_cv_langinfo_codeset=no)
3132
if test $am_cv_langinfo_codeset = yes; then
3133
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
3134
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
3138
# lcmessage.m4 serial 3 (gettext-0.11.3)
3139
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
3140
dnl This file is free software, distributed under the terms of the GNU
3141
dnl General Public License. As a special exception to the GNU General
3142
dnl Public License, this file may be distributed as part of a program
3143
dnl that contains a configuration script generated by Autoconf, under
3144
dnl the same distribution terms as the rest of that program.
3146
dnl This file can can be used in projects which are not available under
3147
dnl the GNU General Public License or the GNU Library General Public
3148
dnl License but which still want to provide support for the GNU gettext
3150
dnl Please note that the actual code of the GNU gettext library is covered
3151
dnl by the GNU Library General Public License, and the rest of the GNU
3152
dnl gettext package package is covered by the GNU General Public License.
3153
dnl They are *not* in the public domain.
3156
dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
3158
# Check whether LC_MESSAGES is available in <locale.h>.
3160
AC_DEFUN([AM_LC_MESSAGES],
3162
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3163
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3164
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3165
if test $am_cv_val_LC_MESSAGES = yes; then
3166
AC_DEFINE(HAVE_LC_MESSAGES, 1,
3167
[Define if your <locale.h> file defines LC_MESSAGES.])
3172
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3173
dnl This file is free software, distributed under the terms of the GNU
3174
dnl General Public License. As a special exception to the GNU General
3175
dnl Public License, this file may be distributed as part of a program
3176
dnl that contains a configuration script generated by Autoconf, under
3177
dnl the same distribution terms as the rest of that program.
3179
AC_DEFUN([gl_HUMAN],
3181
dnl Prerequisites of lib/human.h.
3182
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
3184
dnl Prerequisites of lib/human.c.
3185
AC_CHECK_HEADERS_ONCE(limits.h stdlib.h string.h)
3186
AC_CHECK_DECLS_ONCE([getenv])
3189
# idcache.m4 serial 1
3190
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3191
dnl This file is free software, distributed under the terms of the GNU
3192
dnl General Public License. As a special exception to the GNU General
3193
dnl Public License, this file may be distributed as part of a program
3194
dnl that contains a configuration script generated by Autoconf, under
3195
dnl the same distribution terms as the rest of that program.
3197
AC_DEFUN([gl_IDCACHE],
3199
dnl Prerequisites of lib/idcache.c.
3200
AC_REQUIRE([AC_HEADER_STDC])
3201
AC_CHECK_HEADERS_ONCE(string.h unistd.h)
3206
dnl From Jim Meyering.
3207
dnl Determine whether lstat has the bug that it succeeds when given the
3208
dnl zero-length file name argument. The lstat from SunOS4.1.4 and the Hurd
3209
dnl (as of 1998-11-01) do this.
3211
dnl If it does, then define HAVE_LSTAT_EMPTY_STRING_BUG and arrange to
3212
dnl compile the wrapper function.
3215
AC_DEFUN([jm_FUNC_LSTAT],
3218
dnl Note: AC_FUNC_LSTAT does AC_LIBOBJ(lstat).
3219
if test $ac_cv_func_lstat_empty_string_bug = yes; then
3224
# Prerequisites of lib/lstat.c.
3225
AC_DEFUN([gl_PREREQ_LSTAT],
3227
AC_REQUIRE([AC_HEADER_STAT])
3228
AC_CHECK_HEADERS_ONCE(stdlib.h)
3229
AC_CHECK_DECLS_ONCE(free)
3232
# malloc.m4 serial 7
3233
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3234
dnl This file is free software, distributed under the terms of the GNU
3235
dnl General Public License. As a special exception to the GNU General
3236
dnl Public License, this file may be distributed as part of a program
3237
dnl that contains a configuration script generated by Autoconf, under
3238
dnl the same distribution terms as the rest of that program.
3240
dnl From Jim Meyering.
3241
dnl Determine whether malloc accepts 0 as its argument.
3242
dnl If it doesn't, arrange to use the replacement function.
3244
AC_DEFUN([jm_FUNC_MALLOC],
3246
AC_REQUIRE([AC_FUNC_MALLOC])
3247
dnl autoconf < 2.57 used the symbol ac_cv_func_malloc_works.
3248
if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
3253
# Prerequisites of lib/malloc.c.
3254
AC_DEFUN([gl_PREREQ_MALLOC], [
3258
# memcmp.m4 serial 8
3259
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3260
dnl This file is free software, distributed under the terms of the GNU
3261
dnl General Public License. As a special exception to the GNU General
3262
dnl Public License, this file may be distributed as part of a program
3263
dnl that contains a configuration script generated by Autoconf, under
3264
dnl the same distribution terms as the rest of that program.
3266
AC_DEFUN([jm_FUNC_MEMCMP],
3268
AC_REQUIRE([AC_FUNC_MEMCMP])
3269
if test $ac_cv_func_memcmp_working = no; then
3270
AC_DEFINE(memcmp, rpl_memcmp,
3271
[Define to rpl_memcmp if the replacement function should be used.])
3276
# Prerequisites of lib/memcmp.c.
3277
AC_DEFUN([gl_PREREQ_MEMCMP], [
3278
AC_CHECK_HEADERS_ONCE(string.h)
3281
# memset.m4 serial 1
3282
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3283
dnl This file is free software, distributed under the terms of the GNU
3284
dnl General Public License. As a special exception to the GNU General
3285
dnl Public License, this file may be distributed as part of a program
3286
dnl that contains a configuration script generated by Autoconf, under
3287
dnl the same distribution terms as the rest of that program.
3289
AC_DEFUN([gl_FUNC_MEMSET],
3291
AC_REPLACE_FUNCS(memset)
3292
if test $ac_cv_func_memset = no; then
3297
# Prerequisites of lib/memset.c.
3298
AC_DEFUN([gl_PREREQ_MEMSET], [
3302
# mktime.m4 serial 1
3303
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3304
dnl This file is free software, distributed under the terms of the GNU
3305
dnl General Public License. As a special exception to the GNU General
3306
dnl Public License, this file may be distributed as part of a program
3307
dnl that contains a configuration script generated by Autoconf, under
3308
dnl the same distribution terms as the rest of that program.
3310
dnl From Jim Meyering.
3312
AC_DEFUN([gl_FUNC_MKTIME],
3314
AC_REQUIRE([AC_FUNC_MKTIME])
3315
if test $ac_cv_func_working_mktime = no; then
3316
AC_DEFINE(mktime, rpl_mktime,
3317
[Define to rpl_mktime if the replacement function should be used.])
3322
# Prerequisites of lib/mktime.c.
3323
AC_DEFUN([gl_PREREQ_MKTIME], [
3324
AC_REQUIRE([AC_HEADER_STDC])
3325
AC_CHECK_HEADERS_ONCE(limits.h)
3328
# modechange.m4 serial 1
3329
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3330
dnl This file is free software, distributed under the terms of the GNU
3331
dnl General Public License. As a special exception to the GNU General
3332
dnl Public License, this file may be distributed as part of a program
3333
dnl that contains a configuration script generated by Autoconf, under
3334
dnl the same distribution terms as the rest of that program.
3336
AC_DEFUN([gl_MODECHANGE],
3338
AC_REQUIRE([AC_HEADER_STDC])
3339
AC_REQUIRE([AC_HEADER_STAT])
3342
# pathmax.m4 serial 1
3343
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3344
dnl This file is free software, distributed under the terms of the GNU
3345
dnl General Public License. As a special exception to the GNU General
3346
dnl Public License, this file may be distributed as part of a program
3347
dnl that contains a configuration script generated by Autoconf, under
3348
dnl the same distribution terms as the rest of that program.
3350
AC_DEFUN([gl_PATHMAX],
3352
dnl Prerequisites of lib/pathmax.h.
3353
AC_CHECK_HEADERS_ONCE(limits.h sys/param.h unistd.h)
3357
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3358
dnl This file is free software, distributed under the terms of the GNU
3359
dnl General Public License. As a special exception to the GNU General
3360
dnl Public License, this file may be distributed as part of a program
3361
dnl that contains a configuration script generated by Autoconf, under
3362
dnl the same distribution terms as the rest of that program.
3364
AC_DEFUN([gl_QUOTE],
3366
dnl Prerequisites of lib/quote.c.
3367
AC_CHECK_HEADERS_ONCE(stddef.h)
3370
# quotearg.m4 serial 1
3371
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3372
dnl This file is free software, distributed under the terms of the GNU
3373
dnl General Public License. As a special exception to the GNU General
3374
dnl Public License, this file may be distributed as part of a program
3375
dnl that contains a configuration script generated by Autoconf, under
3376
dnl the same distribution terms as the rest of that program.
3378
AC_DEFUN([gl_QUOTEARG],
3380
dnl Prerequisites of lib/quotearg.c.
3381
AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
3382
AC_CHECK_FUNCS_ONCE(iswprint mbsinit)
3387
# mbstate_t.m4 serial 9
3388
dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
3389
dnl This file is free software, distributed under the terms of the GNU
3390
dnl General Public License. As a special exception to the GNU General
3391
dnl Public License, this file may be distributed as part of a program
3392
dnl that contains a configuration script generated by Autoconf, under
3393
dnl the same distribution terms as the rest of that program.
3397
# BeOS 5 has <wchar.h> but does not define mbstate_t,
3398
# so you can't declare an object of that type.
3399
# Check for this incompatibility with Standard C.
3403
AC_DEFUN([AC_TYPE_MBSTATE_T],
3404
[AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
3407
[AC_INCLUDES_DEFAULT
3408
# include <wchar.h>],
3409
[mbstate_t x; return sizeof x;])],
3410
[ac_cv_type_mbstate_t=yes],
3411
[ac_cv_type_mbstate_t=no])])
3412
if test $ac_cv_type_mbstate_t = yes; then
3413
AC_DEFINE([HAVE_MBSTATE_T], 1,
3414
[Define to 1 if <wchar.h> declares mbstate_t.])
3416
AC_DEFINE([mbstate_t], int,
3417
[Define to a type if <wchar.h> does not define.])
3420
# mbrtowc.m4 serial 5
3421
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
3422
dnl This file is free software, distributed under the terms of the GNU
3423
dnl General Public License. As a special exception to the GNU General
3424
dnl Public License, this file may be distributed as part of a program
3425
dnl that contains a configuration script generated by Autoconf, under
3426
dnl the same distribution terms as the rest of that program.
3428
dnl From Paul Eggert
3430
dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
3431
dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
3433
AC_DEFUN([jm_FUNC_MBRTOWC],
3435
AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
3438
[#include <wchar.h>],
3439
[mbstate_t state; return ! (sizeof state && mbrtowc);],
3440
jm_cv_func_mbrtowc=yes,
3441
jm_cv_func_mbrtowc=no)])
3442
if test $jm_cv_func_mbrtowc = yes; then
3443
AC_DEFINE(HAVE_MBRTOWC, 1,
3444
[Define to 1 if mbrtowc and mbstate_t are properly declared.])
3448
# realloc.m4 serial 7
3449
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3450
dnl This file is free software, distributed under the terms of the GNU
3451
dnl General Public License. As a special exception to the GNU General
3452
dnl Public License, this file may be distributed as part of a program
3453
dnl that contains a configuration script generated by Autoconf, under
3454
dnl the same distribution terms as the rest of that program.
3456
dnl From Jim Meyering.
3457
dnl Determine whether realloc works when both arguments are 0.
3458
dnl If it doesn't, arrange to use the replacement function.
3460
AC_DEFUN([jm_FUNC_REALLOC],
3462
AC_REQUIRE([AC_FUNC_REALLOC])
3463
dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
3464
if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
3469
# Prerequisites of lib/realloc.c.
3470
AC_DEFUN([gl_PREREQ_REALLOC], [
3476
dnl Initially derived from code in GNU grep.
3477
dnl Mostly written by Jim Meyering.
3479
AC_DEFUN([gl_REGEX],
3481
jm_INCLUDED_REGEX([lib/regex.c])
3484
dnl Usage: jm_INCLUDED_REGEX([lib/regex.c])
3486
AC_DEFUN([jm_INCLUDED_REGEX],
3488
dnl Even packages that don't use regex.c can use this macro.
3489
dnl Of course, for them it doesn't do anything.
3491
# Assume we'll default to using the included regex.c.
3492
ac_use_included_regex=yes
3494
# However, if the system regex support is good enough that it passes the
3495
# the following run test, then default to *not* using the included regex.c.
3496
# If cross compiling, assume the test would fail and use the included
3497
# regex.c. The first failing regular expression is from `Spencer ere
3498
# test #75' in grep-2.3.
3499
AC_CACHE_CHECK([for working re_compile_pattern],
3500
jm_cv_func_working_re_compile_pattern,
3508
static struct re_pattern_buffer regex;
3510
struct re_registers regs;
3511
re_set_syntax (RE_SYNTAX_POSIX_EGREP);
3512
memset (®ex, 0, sizeof (regex));
3513
[s = re_compile_pattern ("a[[:@:>@:]]b\n", 9, ®ex);]
3514
/* This should fail with _Invalid character class name_ error. */
3518
/* This should succeed, but doesn't for e.g. glibc-2.1.3. */
3519
memset (®ex, 0, sizeof (regex));
3520
s = re_compile_pattern ("{1", 2, ®ex);
3525
/* The following example is derived from a problem report
3526
against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
3527
memset (®ex, 0, sizeof (regex));
3528
s = re_compile_pattern ("[[anļæ½]]*n", 7, ®ex);
3532
/* This should match, but doesn't for e.g. glibc-2.2.1. */
3533
if (re_match (®ex, "an", 2, 0, ®s) != 2)
3536
memset (®ex, 0, sizeof (regex));
3537
s = re_compile_pattern ("x", 1, ®ex);
3541
/* The version of regex.c in e.g. GNU libc-2.2.93 didn't
3542
work with a negative RANGE argument. */
3543
if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1)
3549
jm_cv_func_working_re_compile_pattern=yes,
3550
jm_cv_func_working_re_compile_pattern=no,
3551
dnl When crosscompiling, assume it's broken.
3552
jm_cv_func_working_re_compile_pattern=no))
3553
if test $jm_cv_func_working_re_compile_pattern = yes; then
3554
ac_use_included_regex=no
3557
test -n "$1" || AC_MSG_ERROR([missing argument])
3558
m4_syscmd([test -f $1])
3559
ifelse(m4_sysval, 0,
3561
AC_ARG_WITH(included-regex,
3562
[ --without-included-regex don't compile regex; this is the default on
3563
systems with version 2 of the GNU C library
3564
(use with caution on other system)],
3565
jm_with_regex=$withval,
3566
jm_with_regex=$ac_use_included_regex)
3567
if test "$jm_with_regex" = yes; then
3576
# Prerequisites of lib/regex.c.
3577
AC_DEFUN([jm_PREREQ_REGEX],
3579
dnl FIXME: Maybe provide a btowc replacement someday: solaris-2.5.1 lacks it.
3580
dnl FIXME: Check for wctype and iswctype, and and add -lw if necessary
3583
dnl Persuade glibc <string.h> to declare mempcpy().
3584
AC_REQUIRE([AC_GNU_SOURCE])
3586
AC_REQUIRE([AC_FUNC_ALLOCA])
3587
AC_REQUIRE([AC_HEADER_STDC])
3588
AC_CHECK_HEADERS_ONCE(limits.h string.h wchar.h wctype.h)
3589
AC_CHECK_FUNCS_ONCE(isascii mempcpy)
3590
AC_CHECK_FUNCS(btowc)
3593
# rpmatch.m4 serial 1
3594
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3595
dnl This file is free software, distributed under the terms of the GNU
3596
dnl General Public License. As a special exception to the GNU General
3597
dnl Public License, this file may be distributed as part of a program
3598
dnl that contains a configuration script generated by Autoconf, under
3599
dnl the same distribution terms as the rest of that program.
3601
AC_DEFUN([gl_FUNC_RPMATCH],
3603
AC_REPLACE_FUNCS(rpmatch)
3604
if test $ac_cv_func_rpmatch = no; then
3609
# Prerequisites of lib/rpmatch.c.
3610
AC_DEFUN([gl_PREREQ_RPMATCH], [
3611
AC_REQUIRE([AC_HEADER_STDC])
3612
AC_CHECK_HEADERS_ONCE(limits.h)
3616
# savedir.m4 serial 1
3617
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3618
dnl This file is free software, distributed under the terms of the GNU
3619
dnl General Public License. As a special exception to the GNU General
3620
dnl Public License, this file may be distributed as part of a program
3621
dnl that contains a configuration script generated by Autoconf, under
3622
dnl the same distribution terms as the rest of that program.
3624
AC_DEFUN([gl_SAVEDIR],
3626
dnl Prerequisites of lib/savedir.c.
3627
AC_REQUIRE([AC_HEADER_STDC])
3628
AC_REQUIRE([AC_HEADER_DIRENT])
3629
AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
3634
dnl From Jim Meyering.
3635
dnl Determine whether stat has the bug that it succeeds when given the
3636
dnl zero-length file name argument. The stat from SunOS4.1.4 and the Hurd
3637
dnl (as of 1998-11-01) do this.
3639
dnl If it does, then define HAVE_STAT_EMPTY_STRING_BUG and arrange to
3640
dnl compile the wrapper function.
3643
AC_DEFUN([jm_FUNC_STAT],
3646
dnl Note: AC_FUNC_STAT does AC_LIBOBJ(stat).
3647
if test $ac_cv_func_stat_empty_string_bug = yes; then
3652
# Prerequisites of lib/stat.c.
3653
AC_DEFUN([gl_PREREQ_STAT],
3658
# stpcpy.m4 serial 1
3659
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3660
dnl This file is free software, distributed under the terms of the GNU
3661
dnl General Public License. As a special exception to the GNU General
3662
dnl Public License, this file may be distributed as part of a program
3663
dnl that contains a configuration script generated by Autoconf, under
3664
dnl the same distribution terms as the rest of that program.
3666
AC_DEFUN([gl_FUNC_STPCPY],
3668
dnl Persuade glibc <string.h> to declare stpcpy().
3669
AC_REQUIRE([AC_GNU_SOURCE])
3671
AC_REPLACE_FUNCS(stpcpy)
3672
if test $ac_cv_func_stpcpy = no; then
3677
# Prerequisites of lib/stpcpy.c.
3678
AC_DEFUN([gl_PREREQ_STPCPY], [
3683
# strdup.m4 serial 1
3684
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3685
dnl This file is free software, distributed under the terms of the GNU
3686
dnl General Public License. As a special exception to the GNU General
3687
dnl Public License, this file may be distributed as part of a program
3688
dnl that contains a configuration script generated by Autoconf, under
3689
dnl the same distribution terms as the rest of that program.
3691
AC_DEFUN([gl_FUNC_STRDUP],
3693
AC_REPLACE_FUNCS(strdup)
3694
if test $ac_cv_func_strdup = no; then
3699
# Prerequisites of lib/strdup.c.
3700
AC_DEFUN([gl_PREREQ_STRDUP], [
3701
AC_REQUIRE([AC_HEADER_STDC])
3708
dnl This macro is intended to be used solely in this file.
3709
dnl These are the prerequisite macros for GNU's strftime.c replacement.
3710
AC_DEFUN([_jm_STRFTIME_PREREQS],
3712
dnl strftime.c uses the underyling system strftime if it exists.
3715
AC_CHECK_HEADERS_ONCE(limits.h)
3716
AC_CHECK_FUNCS_ONCE(memcpy mempcpy)
3717
AC_CHECK_FUNCS(tzset memset)
3719
# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
3722
AC_CHECK_FUNCS(mblen mbrlen)
3725
AC_REQUIRE([gl_TM_GMTOFF])
3728
dnl From Jim Meyering.
3730
AC_DEFUN([jm_FUNC_GNU_STRFTIME],
3731
[AC_REQUIRE([AC_HEADER_TIME])dnl
3733
_jm_STRFTIME_PREREQS
3735
AC_REQUIRE([AC_C_CONST])dnl
3736
AC_REQUIRE([AC_HEADER_STDC])dnl
3737
AC_CHECK_HEADERS_ONCE(sys/time.h)
3738
AC_DEFINE([my_strftime], [nstrftime],
3739
[Define to the name of the strftime replacement function.])
3742
AC_DEFUN([jm_FUNC_STRFTIME],
3744
_jm_STRFTIME_PREREQS
3747
# tm_gmtoff.m4 serial 1
3748
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3749
dnl This file is free software, distributed under the terms of the GNU
3750
dnl General Public License. As a special exception to the GNU General
3751
dnl Public License, this file may be distributed as part of a program
3752
dnl that contains a configuration script generated by Autoconf, under
3753
dnl the same distribution terms as the rest of that program.
3755
AC_DEFUN([gl_TM_GMTOFF],
3757
AC_CHECK_MEMBER([struct tm.tm_gmtoff],
3758
[AC_DEFINE(HAVE_TM_GMTOFF, 1,
3759
[Define if struct tm has the tm_gmtoff member.])],
3761
[#include <time.h>])
3764
# strstr.m4 serial 1
3765
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3766
dnl This file is free software, distributed under the terms of the GNU
3767
dnl General Public License. As a special exception to the GNU General
3768
dnl Public License, this file may be distributed as part of a program
3769
dnl that contains a configuration script generated by Autoconf, under
3770
dnl the same distribution terms as the rest of that program.
3772
AC_DEFUN([gl_FUNC_STRSTR],
3774
AC_REPLACE_FUNCS(strstr)
3775
if test $ac_cv_func_strstr = no; then
3780
# Prerequisites of lib/strstr.c.
3781
AC_DEFUN([gl_PREREQ_STRSTR], [
3782
AC_CHECK_HEADERS_ONCE(string.h)
3785
# strtoimax.m4 serial 2
3786
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
3787
dnl This file is free software, distributed under the terms of the GNU
3788
dnl General Public License. As a special exception to the GNU General
3789
dnl Public License, this file may be distributed as part of a program
3790
dnl that contains a configuration script generated by Autoconf, under
3791
dnl the same distribution terms as the rest of that program.
3793
AC_DEFUN([gl_FUNC_STRTOIMAX],
3795
dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
3796
AC_REQUIRE([AC_PROG_CPP])
3797
AC_REQUIRE([AC_PROG_EGREP])
3799
AC_CACHE_CHECK([whether <inttypes.h> defines strtoimax as a macro],
3800
jm_cv_func_strtoimax_macro,
3801
[AC_EGREP_CPP([inttypes_h_defines_strtoimax], [#include <inttypes.h>
3803
inttypes_h_defines_strtoimax
3805
jm_cv_func_strtoimax_macro=yes,
3806
jm_cv_func_strtoimax_macro=no)])
3808
if test "$jm_cv_func_strtoimax_macro" != yes; then
3809
AC_REPLACE_FUNCS(strtoimax)
3810
if test $ac_cv_func_strtoimax = no; then
3816
# Prerequisites of lib/strtoimax.c.
3817
AC_DEFUN([gl_PREREQ_STRTOIMAX], [
3819
AC_CHECK_HEADERS_ONCE(stdlib.h)
3820
AC_CHECK_DECLS_ONCE(strtol)
3821
AC_CHECK_DECLS(strtoll)
3822
AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
3825
# intmax_t.m4 serial 1
3826
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
3827
dnl This file is free software, distributed under the terms of the GNU
3828
dnl General Public License. As a special exception to the GNU General
3829
dnl Public License, this file may be distributed as part of a program
3830
dnl that contains a configuration script generated by Autoconf, under
3831
dnl the same distribution terms as the rest of that program.
3833
dnl From Paul Eggert.
3837
# Define intmax_t to 'long' or 'long long'
3838
# if it is not already defined in <stdint.h> or <inttypes.h>.
3840
AC_DEFUN([jm_AC_TYPE_INTMAX_T],
3842
dnl For simplicity, we assume that a header file defines 'intmax_t' if and
3843
dnl only if it defines 'uintmax_t'.
3844
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
3845
AC_REQUIRE([jm_AC_HEADER_STDINT_H])
3846
if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
3847
AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
3848
test $ac_cv_type_long_long = yes \
3849
&& ac_type='long long' \
3851
AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
3852
[Define to long or long long if <inttypes.h> and <stdint.h> don't define.])
3854
AC_DEFINE(HAVE_INTMAX_T, 1,
3855
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
3859
dnl An alternative would be to explicitly test for 'intmax_t'.
3861
AC_DEFUN([gt_AC_TYPE_INTMAX_T],
3863
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
3864
AC_REQUIRE([jm_AC_HEADER_STDINT_H])
3865
AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
3869
#if HAVE_STDINT_H_WITH_UINTMAX
3872
#if HAVE_INTTYPES_H_WITH_UINTMAX
3873
#include <inttypes.h>
3875
], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
3876
if test $gt_cv_c_intmax_t = yes; then
3877
AC_DEFINE(HAVE_INTMAX_T, 1,
3878
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
3880
AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
3881
test $ac_cv_type_long_long = yes \
3882
&& ac_type='long long' \
3884
AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
3885
[Define to long or long long if <stdint.h> and <inttypes.h> don't define.])
3889
# longlong.m4 serial 4
3890
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
3891
dnl This file is free software, distributed under the terms of the GNU
3892
dnl General Public License. As a special exception to the GNU General
3893
dnl Public License, this file may be distributed as part of a program
3894
dnl that contains a configuration script generated by Autoconf, under
3895
dnl the same distribution terms as the rest of that program.
3897
dnl From Paul Eggert.
3899
# Define HAVE_LONG_LONG if 'long long' works.
3901
AC_DEFUN([jm_AC_TYPE_LONG_LONG],
3903
AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
3904
[AC_TRY_LINK([long long ll = 1LL; int i = 63;],
3905
[long long llmax = (long long) -1;
3906
return ll << i | ll >> i | llmax / ll | llmax % ll;],
3907
ac_cv_type_long_long=yes,
3908
ac_cv_type_long_long=no)])
3909
if test $ac_cv_type_long_long = yes; then
3910
AC_DEFINE(HAVE_LONG_LONG, 1,
3911
[Define if you have the 'long long' type.])
3915
# strtol.m4 serial 1
3916
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3917
dnl This file is free software, distributed under the terms of the GNU
3918
dnl General Public License. As a special exception to the GNU General
3919
dnl Public License, this file may be distributed as part of a program
3920
dnl that contains a configuration script generated by Autoconf, under
3921
dnl the same distribution terms as the rest of that program.
3923
AC_DEFUN([gl_FUNC_STRTOL],
3925
AC_REPLACE_FUNCS(strtol)
3926
if test $ac_cv_func_strtol = no; then
3931
# Prerequisites of lib/strtol.c.
3932
AC_DEFUN([gl_PREREQ_STRTOL], [
3933
AC_REQUIRE([AC_HEADER_STDC])
3934
AC_CHECK_HEADERS_ONCE(limits.h)
3935
AC_CHECK_FUNCS_ONCE(isascii)
3938
# strtoll.m4 serial 1
3939
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3940
dnl This file is free software, distributed under the terms of the GNU
3941
dnl General Public License. As a special exception to the GNU General
3942
dnl Public License, this file may be distributed as part of a program
3943
dnl that contains a configuration script generated by Autoconf, under
3944
dnl the same distribution terms as the rest of that program.
3946
AC_DEFUN([gl_FUNC_STRTOLL],
3948
dnl We don't need (and can't compile) the replacement strtoll
3949
dnl unless the type 'long long' exists.
3950
AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
3951
if test "$ac_cv_type_long_long" = yes; then
3952
AC_REPLACE_FUNCS(strtoll)
3953
if test $ac_cv_func_strtoll = no; then
3959
# Prerequisites of lib/strtoll.c.
3960
AC_DEFUN([gl_PREREQ_STRTOLL], [
3965
# strtoul.m4 serial 1
3966
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3967
dnl This file is free software, distributed under the terms of the GNU
3968
dnl General Public License. As a special exception to the GNU General
3969
dnl Public License, this file may be distributed as part of a program
3970
dnl that contains a configuration script generated by Autoconf, under
3971
dnl the same distribution terms as the rest of that program.
3973
AC_DEFUN([gl_FUNC_STRTOUL],
3975
AC_REPLACE_FUNCS(strtoul)
3976
if test $ac_cv_func_strtoul = no; then
3981
# Prerequisites of lib/strtoul.c.
3982
AC_DEFUN([gl_PREREQ_STRTOUL], [
3986
# strtoull.m4 serial 1
3987
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3988
dnl This file is free software, distributed under the terms of the GNU
3989
dnl General Public License. As a special exception to the GNU General
3990
dnl Public License, this file may be distributed as part of a program
3991
dnl that contains a configuration script generated by Autoconf, under
3992
dnl the same distribution terms as the rest of that program.
3994
AC_DEFUN([gl_FUNC_STRTOULL],
3996
dnl We don't need (and can't compile) the replacement strtoull
3997
dnl unless the type 'unsigned long long' exists.
3998
AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
3999
if test "$ac_cv_type_unsigned_long_long" = yes; then
4000
AC_REPLACE_FUNCS(strtoull)
4001
if test $ac_cv_func_strtoull = no; then
4007
# Prerequisites of lib/strtoull.c.
4008
AC_DEFUN([gl_PREREQ_STRTOULL], [
4013
# strtoumax.m4 serial 2
4014
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
4015
dnl This file is free software, distributed under the terms of the GNU
4016
dnl General Public License. As a special exception to the GNU General
4017
dnl Public License, this file may be distributed as part of a program
4018
dnl that contains a configuration script generated by Autoconf, under
4019
dnl the same distribution terms as the rest of that program.
4021
AC_DEFUN([gl_FUNC_STRTOUMAX],
4023
dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
4024
AC_REQUIRE([AC_PROG_CPP])
4025
AC_REQUIRE([AC_PROG_EGREP])
4027
AC_CACHE_CHECK([whether <inttypes.h> defines strtoumax as a macro],
4028
jm_cv_func_strtoumax_macro,
4029
[AC_EGREP_CPP([inttypes_h_defines_strtoumax], [#include <inttypes.h>
4031
inttypes_h_defines_strtoumax
4033
jm_cv_func_strtoumax_macro=yes,
4034
jm_cv_func_strtoumax_macro=no)])
4036
if test "$jm_cv_func_strtoumax_macro" != yes; then
4037
AC_REPLACE_FUNCS(strtoumax)
4038
if test $ac_cv_func_strtoumax = no; then
4044
# Prerequisites of lib/strtoumax.c.
4045
AC_DEFUN([gl_PREREQ_STRTOUMAX], [
4046
jm_AC_TYPE_UINTMAX_T
4047
AC_CHECK_HEADERS_ONCE(stdlib.h)
4048
AC_CHECK_DECLS_ONCE(strtoul)
4049
AC_CHECK_DECLS(strtoull)
4050
AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
4053
#serial 7 -*- autoconf -*-
4055
dnl From Jim Meyering.
4057
dnl See if the glibc *_unlocked I/O macros or functions are available.
4058
dnl Use only those *_unlocked macros or functions that are declared
4059
dnl (because some of them were declared in Solaris 2.5.1 but were removed
4060
dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
4061
dnl on Solaris 2.6).
4063
AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
4065
dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
4067
AC_REQUIRE([AC_GNU_SOURCE])
4069
AC_CHECK_DECLS_ONCE(
4070
[clearerr_unlocked feof_unlocked ferror_unlocked
4071
fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
4072
fread_unlocked fwrite_unlocked getc_unlocked
4073
getchar_unlocked putc_unlocked putchar_unlocked])
4076
# xalloc.m4 serial 1
4077
dnl Copyright (C) 2002 Free Software Foundation, Inc.
4078
dnl This file is free software, distributed under the terms of the GNU
4079
dnl General Public License. As a special exception to the GNU General
4080
dnl Public License, this file may be distributed as part of a program
4081
dnl that contains a configuration script generated by Autoconf, under
4082
dnl the same distribution terms as the rest of that program.
4084
AC_DEFUN([gl_XALLOC],
4090
# Prerequisites of lib/xmalloc.c.
4091
AC_DEFUN([gl_PREREQ_XMALLOC], [
4092
AC_REQUIRE([AC_HEADER_STDC])
4093
AC_REQUIRE([jm_FUNC_MALLOC])
4094
AC_REQUIRE([jm_FUNC_REALLOC])
4097
# Prerequisites of lib/xstrdup.c.
4098
AC_DEFUN([gl_PREREQ_XSTRDUP], [
4099
AC_REQUIRE([AC_HEADER_STDC])
4100
AC_CHECK_HEADERS_ONCE(string.h)
4103
# xgetcwd.m4 serial 1
4104
dnl Copyright (C) 2002 Free Software Foundation, Inc.
4105
dnl This file is free software, distributed under the terms of the GNU
4106
dnl General Public License. As a special exception to the GNU General
4107
dnl Public License, this file may be distributed as part of a program
4108
dnl that contains a configuration script generated by Autoconf, under
4109
dnl the same distribution terms as the rest of that program.
4111
AC_DEFUN([gl_XGETCWD],
4113
dnl Prerequisites of lib/xgetcwd.c.
4114
AC_CHECK_HEADERS_ONCE(stdlib.h unistd.h)
4115
AC_CHECK_FUNCS(getcwd)
4119
# getcwd.m4 - check whether getcwd (NULL, 0) allocates memory for result
4121
# Copyright 2001 Free Software Foundation, Inc.
4123
# This program is free software; you can redistribute it and/or modify
4124
# it under the terms of the GNU General Public License as published by
4125
# the Free Software Foundation; either version 2, or (at your option)
4126
# any later version.
4128
# This program is distributed in the hope that it will be useful,
4129
# but WITHOUT ANY WARRANTY; without even the implied warranty of
4130
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4131
# GNU General Public License for more details.
4133
# You should have received a copy of the GNU General Public License
4134
# along with this program; if not, write to the Free Software Foundation,
4135
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
4137
# Written by Paul Eggert.
4139
AC_DEFUN([AC_FUNC_GETCWD_NULL],
4141
AC_CHECK_HEADERS_ONCE(stdlib.h unistd.h)
4142
AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result],
4143
[ac_cv_func_getcwd_null],
4146
# ifdef HAVE_STDLIB_H
4147
# include <stdlib.h>
4149
# ifdef HAVE_UNISTD_H
4150
# include <unistd.h>
4158
if (chdir ("/") != 0)
4162
char *f = getcwd (NULL, 0);
4163
exit (! (f && f[0] == '/' && !f[1]));
4166
[ac_cv_func_getcwd_null=yes],
4167
[ac_cv_func_getcwd_null=no],
4168
[ac_cv_func_getcwd_null=no])])
4169
if test $ac_cv_func_getcwd_null = yes; then
4170
AC_DEFINE(HAVE_GETCWD_NULL, 1,
4171
[Define if getcwd (NULL, 0) allocates memory for result.])
4174
# xstrtol.m4 serial 1
4175
dnl Copyright (C) 2002 Free Software Foundation, Inc.
4176
dnl This file is free software, distributed under the terms of the GNU
4177
dnl General Public License. As a special exception to the GNU General
4178
dnl Public License, this file may be distributed as part of a program
4179
dnl that contains a configuration script generated by Autoconf, under
4180
dnl the same distribution terms as the rest of that program.
4182
AC_DEFUN([gl_XSTRTOL],
4184
AC_REQUIRE([gl_PREREQ_XSTRTOL])
4185
AC_REQUIRE([gl_PREREQ_XSTRTOUL])
4188
# Prerequisites of lib/xstrtol.h.
4189
AC_DEFUN([gl_PREREQ_XSTRTOL_H],
4191
AC_REQUIRE([jm_AC_TYPE_INTMAX_T])
4192
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
4195
# Prerequisites of lib/xstrtol.c.
4196
AC_DEFUN([gl_PREREQ_XSTRTOL],
4198
AC_REQUIRE([gl_PREREQ_XSTRTOL_H])
4199
AC_REQUIRE([AC_HEADER_STDC])
4200
AC_CHECK_HEADERS_ONCE(limits.h string.h)
4201
AC_CHECK_FUNCS_ONCE(isascii)
4202
AC_CHECK_DECLS_ONCE(strtol strtoul)
4203
AC_CHECK_DECLS([strtoimax, strtoumax])
4206
# Prerequisites of lib/xstrtoul.c.
4207
AC_DEFUN([gl_PREREQ_XSTRTOUL],
4209
AC_REQUIRE([gl_PREREQ_XSTRTOL])
4213
dnl Cloned from xstrtoimax.m4. Keep these files in sync.
4215
AC_DEFUN([jm_XSTRTOUMAX],
4217
dnl Prerequisites of lib/xstrtoumax.c.
4218
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
4219
AC_REQUIRE([gl_PREREQ_XSTRTOL])
4223
dnl Copyright (C) 2002 Free Software Foundation, Inc.
4224
dnl This file is free software, distributed under the terms of the GNU
4225
dnl General Public License. As a special exception to the GNU General
4226
dnl Public License, this file may be distributed as part of a program
4227
dnl that contains a configuration script generated by Autoconf, under
4228
dnl the same distribution terms as the rest of that program.
4230
AC_DEFUN([gl_YESNO],
4232
dnl Prerequisites of lib/yesno.c.
4233
AC_CHECK_HEADERS_ONCE(stdlib.h)