1
dnl aclocal.m4 generated automatically by aclocal 1.4-p4
3
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4
dnl This file is free software; the Free Software Foundation
5
dnl gives unlimited permission to copy and/or distribute it,
6
dnl with or without modifications, as long as this notice is preserved.
8
dnl This program is distributed in the hope that it will be useful,
9
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
dnl PARTICULAR PURPOSE.
13
# Like AC_CONFIG_HEADER, but automatically create stamp file.
15
AC_DEFUN(AM_CONFIG_HEADER,
17
AC_CONFIG_HEADER([$1])
18
dnl When config.status generates a header, we must update the stamp-h file.
19
dnl This file resides in the same directory as the config header
20
dnl that is generated. We must strip everything past the first ":",
21
dnl and everything past the last "/".
22
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
23
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
24
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
26
for am_file in <<$1>>; do
27
case " <<$>>CONFIG_HEADERS " in
28
*" <<$>>am_file "*<<)>>
29
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
32
am_indx=`expr "<<$>>am_indx" + 1`
36
# Do all the work for Automake. This macro actually does too much --
37
# some checks are only needed if your package does certain things.
38
# But this isn't really a big deal.
43
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
45
AC_DEFUN(AM_INIT_AUTOMAKE,
46
[AC_REQUIRE([AC_PROG_INSTALL])
51
dnl test to see if srcdir already configured
52
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1
# generated automatically by aclocal 1.7.2 -*- 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
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
16
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
18
# This program is free software; you can redistribute it and/or modify
19
# it under the terms of the GNU General Public License as published by
20
# the Free Software Foundation; either version 2, or (at your option)
23
# This program is distributed in the hope that it will be useful,
24
# but WITHOUT ANY WARRANTY; without even the implied warranty of
25
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
# GNU General Public License for more details.
28
# You should have received a copy of the GNU General Public License
29
# along with this program; if not, write to the Free Software
30
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
37
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
38
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
40
# Do all the work for Automake. -*- Autoconf -*-
42
# This macro actually does too much some checks are only needed if
43
# your package does certain things. But this isn't really a big deal.
45
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
46
# Free Software Foundation, Inc.
48
# This program is free software; you can redistribute it and/or modify
49
# it under the terms of the GNU General Public License as published by
50
# the Free Software Foundation; either version 2, or (at your option)
53
# This program is distributed in the hope that it will be useful,
54
# but WITHOUT ANY WARRANTY; without even the implied warranty of
55
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56
# GNU General Public License for more details.
58
# You should have received a copy of the GNU General Public License
59
# along with this program; if not, write to the Free Software
60
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
65
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
66
# written in clear, in which case automake, when reading aclocal.m4,
67
# will think it sees a *use*, and therefore will trigger all it's
68
# C support machinery. Also note that it means that autoscan, seeing
69
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
74
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
75
# the ones we care about.
76
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
78
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
79
# AM_INIT_AUTOMAKE([OPTIONS])
80
# -----------------------------------------------
81
# The call with PACKAGE and VERSION arguments is the old style
82
# call (pre autoconf-2.50), which is being phased out. PACKAGE
83
# and VERSION should now be passed to AC_INIT and removed from
84
# the call to AM_INIT_AUTOMAKE.
85
# We support both call styles for the transition. After
86
# the next Automake release, Autoconf can make the AC_INIT
87
# arguments mandatory, and then we can depend on a new Autoconf
88
# release and drop the old call support.
89
AC_DEFUN([AM_INIT_AUTOMAKE],
90
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
91
AC_REQUIRE([AC_PROG_INSTALL])dnl
92
# test to see if srcdir already configured
93
if test "`cd $srcdir && pwd`" != "`pwd`" &&
94
test -f $srcdir/config.status; then
53
95
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
56
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
57
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
58
AC_REQUIRE([AM_SANITY_CHECK])
59
AC_REQUIRE([AC_ARG_PROGRAM])
60
dnl FIXME This is truly gross.
61
missing_dir=`cd $ac_aux_dir && pwd`
62
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
63
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
64
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
65
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
66
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
67
AC_REQUIRE([AC_PROG_MAKE_SET])])
98
# test whether we have cygpath
99
if test -z "$CYGPATH_W"; then
100
if (cygpath --version) >/dev/null 2>/dev/null; then
101
CYGPATH_W='cygpath -w'
106
AC_SUBST([CYGPATH_W])
108
# Define the identity of the package.
109
dnl Distinguish between old-style and new-style calls.
111
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
112
AC_SUBST([PACKAGE], [$1])dnl
113
AC_SUBST([VERSION], [$2])],
114
[_AM_SET_OPTIONS([$1])dnl
115
AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
116
AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
118
_AM_IF_OPTION([no-define],,
119
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
120
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
122
# Some tools Automake needs.
123
AC_REQUIRE([AM_SANITY_CHECK])dnl
124
AC_REQUIRE([AC_ARG_PROGRAM])dnl
125
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
126
AM_MISSING_PROG(AUTOCONF, autoconf)
127
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
128
AM_MISSING_PROG(AUTOHEADER, autoheader)
129
AM_MISSING_PROG(MAKEINFO, makeinfo)
130
AM_MISSING_PROG(AMTAR, tar)
132
AM_PROG_INSTALL_STRIP
133
# We need awk for the "check" target. The system "awk" is bad on
135
AC_REQUIRE([AC_PROG_AWK])dnl
136
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
138
_AM_IF_OPTION([no-dependencies],,
139
[AC_PROVIDE_IFELSE([AC_PROG_CC],
140
[_AM_DEPENDENCIES(CC)],
141
[define([AC_PROG_CC],
142
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
143
AC_PROVIDE_IFELSE([AC_PROG_CXX],
144
[_AM_DEPENDENCIES(CXX)],
145
[define([AC_PROG_CXX],
146
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
151
# When config.status generates a header, we must update the stamp-h file.
152
# This file resides in the same directory as the config header
153
# that is generated. The stamp files are numbered to have different names.
155
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
156
# loop where config.status creates the headers, so we can generate
157
# our stamp files there.
158
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
159
[_am_stamp_count=`expr ${_am_stamp_count-0} + 1`
160
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
162
# Copyright 2002 Free Software Foundation, Inc.
164
# This program is free software; you can redistribute it and/or modify
165
# it under the terms of the GNU General Public License as published by
166
# the Free Software Foundation; either version 2, or (at your option)
169
# This program is distributed in the hope that it will be useful,
170
# but WITHOUT ANY WARRANTY; without even the implied warranty of
171
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
172
# GNU General Public License for more details.
174
# You should have received a copy of the GNU General Public License
175
# along with this program; if not, write to the Free Software
176
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
178
# AM_AUTOMAKE_VERSION(VERSION)
179
# ----------------------------
180
# Automake X.Y traces this macro to ensure aclocal.m4 has been
181
# generated from the m4 files accompanying Automake X.Y.
182
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
184
# AM_SET_CURRENT_AUTOMAKE_VERSION
185
# -------------------------------
186
# Call AM_AUTOMAKE_VERSION so it can be traced.
187
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
188
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
189
[AM_AUTOMAKE_VERSION([1.7.2])])
191
# Helper functions for option handling. -*- Autoconf -*-
193
# Copyright 2001, 2002 Free Software Foundation, Inc.
195
# This program is free software; you can redistribute it and/or modify
196
# it under the terms of the GNU General Public License as published by
197
# the Free Software Foundation; either version 2, or (at your option)
200
# This program is distributed in the hope that it will be useful,
201
# but WITHOUT ANY WARRANTY; without even the implied warranty of
202
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
203
# GNU General Public License for more details.
205
# You should have received a copy of the GNU General Public License
206
# along with this program; if not, write to the Free Software
207
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
212
# _AM_MANGLE_OPTION(NAME)
213
# -----------------------
214
AC_DEFUN([_AM_MANGLE_OPTION],
215
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
217
# _AM_SET_OPTION(NAME)
218
# ------------------------------
219
# Set option NAME. Presently that only means defining a flag for this option.
220
AC_DEFUN([_AM_SET_OPTION],
221
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
223
# _AM_SET_OPTIONS(OPTIONS)
224
# ----------------------------------
225
# OPTIONS is a space-separated list of Automake options.
226
AC_DEFUN([_AM_SET_OPTIONS],
227
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
229
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
230
# -------------------------------------------
231
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
232
AC_DEFUN([_AM_IF_OPTION],
233
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
70
236
# Check to make sure that the build environment is sane.
73
AC_DEFUN(AM_SANITY_CHECK,
239
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
241
# This program is free software; you can redistribute it and/or modify
242
# it under the terms of the GNU General Public License as published by
243
# the Free Software Foundation; either version 2, or (at your option)
246
# This program is distributed in the hope that it will be useful,
247
# but WITHOUT ANY WARRANTY; without even the implied warranty of
248
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
249
# GNU General Public License for more details.
251
# You should have received a copy of the GNU General Public License
252
# along with this program; if not, write to the Free Software
253
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
260
AC_DEFUN([AM_SANITY_CHECK],
74
261
[AC_MSG_CHECKING([whether build environment is sane])
77
echo timestamp > conftestfile
264
echo timestamp > conftest.file
78
265
# Do `set' in a subshell so we don't clobber the current shell's
79
266
# arguments. Must try -L first in case configure is actually a
80
267
# symlink; some systems play weird games with the mod time of symlinks
81
268
# (eg FreeBSD returns the mod time of the symlink's containing
84
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
85
if test "[$]*" = "X"; then
271
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
272
if test "$[*]" = "X"; then
87
set X `ls -t $srcdir/configure conftestfile`
274
set X `ls -t $srcdir/configure conftest.file`
89
if test "[$]*" != "X $srcdir/configure conftestfile" \
90
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
277
if test "$[*]" != "X $srcdir/configure conftest.file" \
278
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
92
280
# If neither matched, then we have a broken ls. This can happen
93
281
# if, for instance, CONFIG_SHELL is bash and it inherits a
106
294
AC_MSG_ERROR([newly created file is older than distributed files!
107
295
Check your system clock])
110
297
AC_MSG_RESULT(yes)])
112
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
113
dnl The program must properly implement --version.
114
AC_DEFUN(AM_MISSING_PROG,
115
[AC_MSG_CHECKING(for working $2)
116
# Run test in a subshell; some versions of sh will print an error if
117
# an executable is not found, even if stderr is redirected.
118
# Redirect stdin to placate older versions of autoconf. Sigh.
119
if ($2 --version) < /dev/null > /dev/null 2>&1; then
124
AC_MSG_RESULT(missing)
302
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
304
# This program is free software; you can redistribute it and/or modify
305
# it under the terms of the GNU General Public License as published by
306
# the Free Software Foundation; either version 2, or (at your option)
309
# This program is distributed in the hope that it will be useful,
310
# but WITHOUT ANY WARRANTY; without even the implied warranty of
311
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
312
# GNU General Public License for more details.
314
# You should have received a copy of the GNU General Public License
315
# along with this program; if not, write to the Free Software
316
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
321
# AM_MISSING_PROG(NAME, PROGRAM)
322
# ------------------------------
323
AC_DEFUN([AM_MISSING_PROG],
324
[AC_REQUIRE([AM_MISSING_HAS_RUN])
325
$1=${$1-"${am_missing_run}$2"}
128
# Macro to add for using GNU gettext.
129
# Ulrich Drepper <drepper@cygnus.com>, 1995.
131
# This file can be copied and used freely without restrictions. It can
132
# be used in projects which are not available under the GNU General Public
133
# License or the GNU Library General Public License but which still want
134
# to provide support for the GNU gettext functionality.
135
# Please note that the actual code of the GNU gettext library is covered
136
# by the GNU Library General Public License, and the rest of the GNU
137
# gettext package package is covered by the GNU General Public License.
138
# They are *not* in the public domain.
142
dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
143
dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
331
# Define MISSING if not defined so far and test if it supports --run.
332
# If it does, set am_missing_run to use it, otherwise, to nothing.
333
AC_DEFUN([AM_MISSING_HAS_RUN],
334
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
335
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
336
# Use eval to expand $SHELL
337
if eval "$MISSING --run true"; then
338
am_missing_run="$MISSING --run "
341
AC_MSG_WARN([`missing' script is too old or missing])
347
# Copyright 2001 Free Software Foundation, Inc.
349
# This program is free software; you can redistribute it and/or modify
350
# it under the terms of the GNU General Public License as published by
351
# the Free Software Foundation; either version 2, or (at your option)
354
# This program is distributed in the hope that it will be useful,
355
# but WITHOUT ANY WARRANTY; without even the implied warranty of
356
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
357
# GNU General Public License for more details.
359
# You should have received a copy of the GNU General Public License
360
# along with this program; if not, write to the Free Software
361
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
364
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
365
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
366
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
368
# Of course, Automake must honor this variable whenever it calls a
369
# tool from the auxiliary directory. The problem is that $srcdir (and
370
# therefore $ac_aux_dir as well) can be either absolute or relative,
371
# depending on how configure is run. This is pretty annoying, since
372
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
373
# source directory, any form will work fine, but in subdirectories a
374
# relative path needs to be adjusted first.
376
# $ac_aux_dir/missing
377
# fails when called from a subdirectory if $ac_aux_dir is relative
378
# $top_srcdir/$ac_aux_dir/missing
379
# fails if $ac_aux_dir is absolute,
380
# fails when called from a subdirectory in a VPATH build with
381
# a relative $ac_aux_dir
383
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
384
# are both prefixed by $srcdir. In an in-source build this is usually
385
# harmless because $srcdir is `.', but things will broke when you
386
# start a VPATH build or use an absolute $srcdir.
388
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
389
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
390
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
391
# and then we would define $MISSING as
392
# MISSING="\${SHELL} $am_aux_dir/missing"
393
# This will work as long as MISSING is not called from configure, because
394
# unfortunately $(top_srcdir) has no meaning in configure.
395
# However there are other variables, like CC, which are often used in
396
# configure, and could therefore not use this "fixed" $ac_aux_dir.
398
# Another solution, used here, is to always expand $ac_aux_dir to an
399
# absolute PATH. The drawback is that using absolute paths prevent a
400
# configured tree to be moved without reconfiguration.
402
# Rely on autoconf to set up CDPATH properly.
405
AC_DEFUN([AM_AUX_DIR_EXPAND], [
406
# expand $ac_aux_dir to an absolute path
407
am_aux_dir=`cd $ac_aux_dir && pwd`
412
# Define $install_sh.
414
# Copyright 2001 Free Software Foundation, Inc.
416
# This program is free software; you can redistribute it and/or modify
417
# it under the terms of the GNU General Public License as published by
418
# the Free Software Foundation; either version 2, or (at your option)
421
# This program is distributed in the hope that it will be useful,
422
# but WITHOUT ANY WARRANTY; without even the implied warranty of
423
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
424
# GNU General Public License for more details.
426
# You should have received a copy of the GNU General Public License
427
# along with this program; if not, write to the Free Software
428
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
431
AC_DEFUN([AM_PROG_INSTALL_SH],
432
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
433
install_sh=${install_sh-"$am_aux_dir/install-sh"}
434
AC_SUBST(install_sh)])
436
# AM_PROG_INSTALL_STRIP
438
# Copyright 2001 Free Software Foundation, Inc.
440
# This program is free software; you can redistribute it and/or modify
441
# it under the terms of the GNU General Public License as published by
442
# the Free Software Foundation; either version 2, or (at your option)
445
# This program is distributed in the hope that it will be useful,
446
# but WITHOUT ANY WARRANTY; without even the implied warranty of
447
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
448
# GNU General Public License for more details.
450
# You should have received a copy of the GNU General Public License
451
# along with this program; if not, write to the Free Software
452
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
455
# One issue with vendor `install' (even GNU) is that you can't
456
# specify the program used to strip binaries. This is especially
457
# annoying in cross-compiling environments, where the build's strip
458
# is unlikely to handle the host's binaries.
459
# Fortunately install-sh will honor a STRIPPROG variable, so we
460
# always use install-sh in `make install-strip', and initialize
461
# STRIPPROG with the value of the STRIP variable (set by the user).
462
AC_DEFUN([AM_PROG_INSTALL_STRIP],
463
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
464
# Installed binaries are usually stripped using `strip' when the user
465
# run `make install-strip'. However `strip' might not be the right
466
# tool to use in cross-compilation environments, therefore Automake
467
# will honor the `STRIP' environment variable to overrule this program.
468
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
469
if test "$cross_compiling" != no; then
470
AC_CHECK_TOOL([STRIP], [strip], :)
472
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
473
AC_SUBST([INSTALL_STRIP_PROGRAM])])
475
# serial 4 -*- Autoconf -*-
477
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
479
# This program is free software; you can redistribute it and/or modify
480
# it under the terms of the GNU General Public License as published by
481
# the Free Software Foundation; either version 2, or (at your option)
484
# This program is distributed in the hope that it will be useful,
485
# but WITHOUT ANY WARRANTY; without even the implied warranty of
486
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
487
# GNU General Public License for more details.
489
# You should have received a copy of the GNU General Public License
490
# along with this program; if not, write to the Free Software
491
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
495
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
496
# written in clear, in which case automake, when reading aclocal.m4,
497
# will think it sees a *use*, and therefore will trigger all it's
498
# C support machinery. Also note that it means that autoscan, seeing
499
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
503
# _AM_DEPENDENCIES(NAME)
504
# ----------------------
505
# See how the compiler implements dependency checking.
506
# NAME is "CC", "CXX", "GCJ", or "OBJC".
507
# We try a few techniques and use that to set a single cache variable.
509
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
510
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
511
# dependency, and given that the user is not expected to run this macro,
512
# just rely on AC_PROG_CC.
513
AC_DEFUN([_AM_DEPENDENCIES],
514
[AC_REQUIRE([AM_SET_DEPDIR])dnl
515
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
516
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
517
AC_REQUIRE([AM_DEP_TRACK])dnl
519
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
520
[$1], CXX, [depcc="$CXX" am_compiler_list=],
521
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
522
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
523
[depcc="$$1" am_compiler_list=])
525
AC_CACHE_CHECK([dependency style of $depcc],
526
[am_cv_$1_dependencies_compiler_type],
527
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
528
# We make a subdir and do the tests there. Otherwise we can end up
529
# making bogus files that we don't know about and never remove. For
530
# instance it was reported that on HP-UX the gcc test will end up
531
# making a dummy file named `D' -- because `-MD' means `put the output
534
# Copy depcomp to subdir because otherwise we won't find it if we're
535
# using a relative directory.
536
cp "$am_depcomp" conftest.dir
539
am_cv_$1_dependencies_compiler_type=none
540
if test "$am_compiler_list" = ""; then
541
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
543
for depmode in $am_compiler_list; do
544
# We need to recreate these files for each test, as the compiler may
545
# overwrite some of them when testing with obscure command lines.
546
# This happens at least with the AIX C compiler.
547
echo '#include "conftest.h"' > conftest.c
548
echo 'int i;' > conftest.h
549
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
553
# after this tag, mechanisms are not by side-effect, so they'll
554
# only be used when explicitly requested
555
if test "x$enable_dependency_tracking" = xyes; then
563
# We check with `-c' and `-o' for the sake of the "dashmstdout"
564
# mode. It turns out that the SunPro C++ compiler does not properly
565
# handle `-M -o', and we need to detect this.
566
if depmode=$depmode \
567
source=conftest.c object=conftest.o \
568
depfile=conftest.Po tmpdepfile=conftest.TPo \
569
$SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
570
grep conftest.h conftest.Po > /dev/null 2>&1 &&
571
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
572
am_cv_$1_dependencies_compiler_type=$depmode
580
am_cv_$1_dependencies_compiler_type=none
583
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
584
AM_CONDITIONAL([am__fastdep$1], [
585
test "x$enable_dependency_tracking" != xno \
586
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
592
# Choose a directory name for dependency files.
593
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
594
AC_DEFUN([AM_SET_DEPDIR],
595
[rm -f .deps 2>/dev/null
596
mkdir .deps 2>/dev/null
597
if test -d .deps; then
600
# MS-DOS does not allow filenames that begin with a dot.
603
rmdir .deps 2>/dev/null
610
AC_DEFUN([AM_DEP_TRACK],
611
[AC_ARG_ENABLE(dependency-tracking,
612
[ --disable-dependency-tracking Speeds up one-time builds
613
--enable-dependency-tracking Do not reject slow dependency extractors])
614
if test "x$enable_dependency_tracking" != xno; then
615
am_depcomp="$ac_aux_dir/depcomp"
618
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
619
AC_SUBST([AMDEPBACKSLASH])
622
# Generate code to set up dependency tracking. -*- Autoconf -*-
624
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
626
# This program is free software; you can redistribute it and/or modify
627
# it under the terms of the GNU General Public License as published by
628
# the Free Software Foundation; either version 2, or (at your option)
631
# This program is distributed in the hope that it will be useful,
632
# but WITHOUT ANY WARRANTY; without even the implied warranty of
633
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
634
# GNU General Public License for more details.
636
# You should have received a copy of the GNU General Public License
637
# along with this program; if not, write to the Free Software
638
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
643
# _AM_OUTPUT_DEPENDENCY_COMMANDS
644
# ------------------------------
645
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
646
[for mf in $CONFIG_FILES; do
647
# Strip MF so we end up with the name of the file.
648
mf=`echo "$mf" | sed -e 's/:.*$//'`
649
# Check whether this is an Automake generated Makefile or not.
650
# We used to match only the files named `Makefile.in', but
651
# some people rename them; so instead we look at the file content.
652
# Grep'ing the first line is not enough: some people post-process
653
# each Makefile.in and add a new line on top of each file to say so.
654
# So let's grep whole file.
655
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
656
dirpart=`AS_DIRNAME("$mf")`
660
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
661
# Extract the definition of DEP_FILES from the Makefile without
663
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
664
test -z "$DEPDIR" && continue
665
# When using ansi2knr, U may be empty or an underscore; expand it
666
U=`sed -n -e '/^U = / s///p' < "$mf"`
667
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
668
# We invoke sed twice because it is the simplest approach to
669
# changing $(DEPDIR) to its actual value in the expansion.
670
for file in `sed -n -e '
671
/^DEP_FILES = .*\\\\$/ {
680
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
681
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
682
# Make sure the directory exists.
683
test -f "$dirpart/$file" && continue
684
fdir=`AS_DIRNAME(["$file"])`
685
AS_MKDIR_P([$dirpart/$fdir])
686
# echo "creating $dirpart/$file"
687
echo '# dummy' > "$dirpart/$file"
690
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
693
# AM_OUTPUT_DEPENDENCY_COMMANDS
694
# -----------------------------
695
# This macro should only be invoked once -- use via AC_REQUIRE.
697
# This code is only required when automatic dependency tracking
698
# is enabled. FIXME. This creates each `.P' file that we will
699
# need in order to bootstrap the dependency handling code.
700
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
701
[AC_CONFIG_COMMANDS([depfiles],
702
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
703
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
706
# Check to see how 'make' treats includes. -*- Autoconf -*-
708
# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
710
# This program is free software; you can redistribute it and/or modify
711
# it under the terms of the GNU General Public License as published by
712
# the Free Software Foundation; either version 2, or (at your option)
715
# This program is distributed in the hope that it will be useful,
716
# but WITHOUT ANY WARRANTY; without even the implied warranty of
717
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
718
# GNU General Public License for more details.
720
# You should have received a copy of the GNU General Public License
721
# along with this program; if not, write to the Free Software
722
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
729
# Check to see how make treats includes.
730
AC_DEFUN([AM_MAKE_INCLUDE],
731
[am_make=${MAKE-make}
732
cat > confinc << 'END'
736
# If we don't find an include directive, just comment out the code.
737
AC_MSG_CHECKING([for style of include used by $am_make])
741
# First try GNU make style include.
742
echo "include confinc" > confmf
743
# We grep out `Entering directory' and `Leaving directory'
744
# messages which can occur if `w' ends up in MAKEFLAGS.
745
# In particular we don't look at `^make:' because GNU make might
746
# be invoked under some other name (usually "gmake"), in which
747
# case it prints its new name instead of `make'.
748
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
753
# Now try BSD make style include.
754
if test "$am__include" = "#"; then
755
echo '.include "confinc"' > confmf
756
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
762
AC_SUBST(am__include)
764
AC_MSG_RESULT($_am_result)
768
# AM_CONDITIONAL -*- Autoconf -*-
770
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
772
# This program is free software; you can redistribute it and/or modify
773
# it under the terms of the GNU General Public License as published by
774
# the Free Software Foundation; either version 2, or (at your option)
777
# This program is distributed in the hope that it will be useful,
778
# but WITHOUT ANY WARRANTY; without even the implied warranty of
779
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
780
# GNU General Public License for more details.
782
# You should have received a copy of the GNU General Public License
783
# along with this program; if not, write to the Free Software
784
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
791
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
792
# -------------------------------------
793
# Define a conditional.
794
AC_DEFUN([AM_CONDITIONAL],
795
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
796
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
806
AC_CONFIG_COMMANDS_PRE(
807
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
808
AC_MSG_ERROR([conditional "$1" was never defined.
809
Usually this means the macro was only invoked conditionally.])
812
# Add --enable-maintainer-mode option to configure.
815
# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
817
# This program is free software; you can redistribute it and/or modify
818
# it under the terms of the GNU General Public License as published by
819
# the Free Software Foundation; either version 2, or (at your option)
822
# This program is distributed in the hope that it will be useful,
823
# but WITHOUT ANY WARRANTY; without even the implied warranty of
824
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
825
# GNU General Public License for more details.
827
# You should have received a copy of the GNU General Public License
828
# along with this program; if not, write to the Free Software
829
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
834
AC_DEFUN([AM_MAINTAINER_MODE],
835
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
836
dnl maintainer-mode is disabled by default
837
AC_ARG_ENABLE(maintainer-mode,
838
[ --enable-maintainer-mode enable make rules and dependencies not useful
839
(and sometimes confusing) to the casual installer],
840
USE_MAINTAINER_MODE=$enableval,
841
USE_MAINTAINER_MODE=no)
842
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
843
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
844
MAINT=$MAINTAINER_MODE_TRUE
849
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
851
# gettext.m4 serial 17 (gettext-0.11.5)
852
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
853
dnl This file is free software, distributed under the terms of the GNU
854
dnl General Public License. As a special exception to the GNU General
855
dnl Public License, this file may be distributed as part of a program
856
dnl that contains a configuration script generated by Autoconf, under
857
dnl the same distribution terms as the rest of that program.
859
dnl This file can can be used in projects which are not available under
860
dnl the GNU General Public License or the GNU Library General Public
861
dnl License but which still want to provide support for the GNU gettext
863
dnl Please note that the actual code of the GNU gettext library is covered
864
dnl by the GNU Library General Public License, and the rest of the GNU
865
dnl gettext package package is covered by the GNU General Public License.
866
dnl They are *not* in the public domain.
869
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
870
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
872
dnl Macro to add for using GNU gettext.
874
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
875
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
876
dnl default (if it is not specified or empty) is 'no-libtool'.
877
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
878
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
879
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
144
880
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
145
881
dnl depending on --{enable,disable}-{shared,static} and on the presence of
146
dnl AM-DISABLE-SHARED). Otherwise, a static library
882
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
147
883
dnl $(top_builddir)/intl/libintl.a will be created.
148
884
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
149
885
dnl implementations (in libc or libintl) without the ngettext() function
151
dnl LIBDIR is used to find the intl libraries. If empty,
886
dnl will be ignored. If NEEDSYMBOL is specified and is
887
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
888
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
889
dnl INTLDIR is used to find the intl libraries. If empty,
152
890
dnl the value `$(top_builddir)/intl/' is used.
154
892
dnl The result of the configuration is one of three cases:
195
972
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
196
973
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
197
975
dnl User does not insist on using GNU NLS library. Figure out what
198
976
dnl to use. If GNU gettext is available we use this. Else we have
199
977
dnl to fall back to GNU NLS library.
202
979
dnl Add a version number to the cache macros.
203
define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
204
define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
206
AC_CHECK_HEADER(libintl.h,
207
[AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
208
[AC_TRY_LINK([#include <libintl.h>
209
extern int _nl_msg_cat_cntr;],
210
[bindtextdomain ("", "");
211
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
212
gt_cv_func_gnugettext_libc=yes,
213
gt_cv_func_gnugettext_libc=no)])
215
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
216
AC_CACHE_CHECK([for GNU gettext in libintl],
217
gt_cv_func_gnugettext_libintl,
218
[gt_save_LIBS="$LIBS"
219
LIBS="$LIBS -lintl $LIBICONV"
220
AC_TRY_LINK([#include <libintl.h>
221
extern int _nl_msg_cat_cntr;],
222
[bindtextdomain ("", "");
223
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
224
gt_cv_func_gnugettext_libintl=yes,
225
gt_cv_func_gnugettext_libintl=no)
226
LIBS="$gt_save_LIBS"])
229
dnl If an already present or preinstalled GNU gettext() is found,
230
dnl use it. But if this macro is used in GNU gettext, and GNU
231
dnl gettext is already preinstalled in libintl, we update this
232
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
233
if test "$gt_cv_func_gnugettext_libc" = "yes" \
234
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
235
&& test "$PACKAGE" != gettext; }; then
236
AC_DEFINE(HAVE_GETTEXT, 1,
237
[Define if the GNU gettext() function is already present or preinstalled.])
239
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
240
dnl If iconv() is in a separate libiconv library, then anyone
241
dnl linking with libintl{.a,.so} also needs to link with
243
INTLLIBS="-lintl $LIBICONV"
247
LIBS="$LIBS $INTLLIBS"
248
AC_CHECK_FUNCS(dcgettext)
251
dnl Search for GNU msgfmt in the PATH.
252
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
253
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
254
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
256
dnl Search for GNU xgettext in the PATH.
257
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
258
[$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
264
if test "$CATOBJEXT" = "NONE"; then
265
dnl GNU gettext is not found in the C library.
266
dnl Fall back on GNU gettext library.
267
nls_cv_use_gnu_gettext=yes
980
define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
981
define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
982
define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
984
AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
985
[AC_TRY_LINK([#include <libintl.h>
986
]ifelse([$2], [need-formatstring-macros],
987
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
988
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
991
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
993
], [])[extern int _nl_msg_cat_cntr;
994
extern int *_nl_domain_bindings;],
995
[bindtextdomain ("", "");
996
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
997
gt_cv_func_gnugettext_libc=yes,
998
gt_cv_func_gnugettext_libc=no)])
1000
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
1001
dnl Sometimes libintl requires libiconv, so first search for libiconv.
1002
ifelse(gt_included_intl, yes, , [
1005
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
1006
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
1007
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
1008
dnl even if libiconv doesn't exist.
1009
AC_LIB_LINKFLAGS_BODY([intl])
1010
AC_CACHE_CHECK([for GNU gettext in libintl],
1011
gt_cv_func_gnugettext_libintl,
1012
[gt_save_CPPFLAGS="$CPPFLAGS"
1013
CPPFLAGS="$CPPFLAGS $INCINTL"
1014
gt_save_LIBS="$LIBS"
1015
LIBS="$LIBS $LIBINTL"
1016
dnl Now see whether libintl exists and does not depend on libiconv.
1017
AC_TRY_LINK([#include <libintl.h>
1018
]ifelse([$2], [need-formatstring-macros],
1019
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1020
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1023
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1025
], [])[extern int _nl_msg_cat_cntr;
1030
const char *_nl_expand_alias ();],
1031
[bindtextdomain ("", "");
1032
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
1033
gt_cv_func_gnugettext_libintl=yes,
1034
gt_cv_func_gnugettext_libintl=no)
1035
dnl Now see whether libintl exists and depends on libiconv.
1036
if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
1037
LIBS="$LIBS $LIBICONV"
1038
AC_TRY_LINK([#include <libintl.h>
1039
]ifelse([$2], [need-formatstring-macros],
1040
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1041
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1044
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1046
], [])[extern int _nl_msg_cat_cntr;
1051
const char *_nl_expand_alias ();],
1052
[bindtextdomain ("", "");
1053
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
1054
[LIBINTL="$LIBINTL $LIBICONV"
1055
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
1056
gt_cv_func_gnugettext_libintl=yes
1059
CPPFLAGS="$gt_save_CPPFLAGS"
1060
LIBS="$gt_save_LIBS"])
1063
dnl If an already present or preinstalled GNU gettext() is found,
1064
dnl use it. But if this macro is used in GNU gettext, and GNU
1065
dnl gettext is already preinstalled in libintl, we update this
1066
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
1067
if test "$gt_cv_func_gnugettext_libc" = "yes" \
1068
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
1069
&& test "$PACKAGE" != gettext; }; then
1070
gt_use_preinstalled_gnugettext=yes
1072
dnl Reset the values set by searching for libintl.
1078
ifelse(gt_included_intl, yes, [
1079
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
1080
dnl GNU gettext is not found in the C library.
1081
dnl Fall back on included GNU gettext library.
1082
nls_cv_use_gnu_gettext=yes
271
1086
if test "$nls_cv_use_gnu_gettext" = "yes"; then
272
1087
dnl Mark actions used to generate GNU NLS library.
273
1088
INTLOBJS="\$(GETTOBJS)"
274
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
275
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
276
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
277
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
278
[$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
280
BUILD_INCLUDED_LIBINTL=yes
281
USE_INCLUDED_LIBINTL=yes
1089
BUILD_INCLUDED_LIBINTL=yes
1090
USE_INCLUDED_LIBINTL=yes
1091
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
1092
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
1093
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
1096
if test "$gt_use_preinstalled_gnugettext" = "yes" \
1097
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
1098
dnl Mark actions to use GNU gettext tools.
283
INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
284
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
287
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
288
dnl Test whether we really found GNU msgfmt.
289
if test "$GMSGFMT" != ":"; then
290
dnl If it is no GNU msgfmt we define it as : so that the
291
dnl Makefiles still can work.
292
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
296
[found msgfmt program is not GNU msgfmt; ignore it])
301
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
302
dnl Test whether we really found GNU xgettext.
303
if test "$XGETTEXT" != ":"; then
304
dnl If it is no GNU xgettext we define it as : so that the
305
dnl Makefiles still can work.
306
if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
310
[found xgettext program is not GNU xgettext; ignore it])
315
dnl We need to process the po/ directory.
319
[for ac_file in $CONFIG_FILES; do
320
# Support "outfile[:infile[:infile...]]"
322
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
324
# PO directories have a Makefile.in generated from Makefile.in.in.
325
case "$ac_file" in */Makefile.in)
326
# Adjust a relative srcdir.
327
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
328
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
329
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
330
# In autoconf-2.13 it is called $ac_given_srcdir.
331
# In autoconf-2.50 it is called $srcdir.
332
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
333
case "$ac_given_srcdir" in
334
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
335
/*) top_srcdir="$ac_given_srcdir" ;;
336
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
338
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
339
rm -f "$ac_dir/POTFILES"
340
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
341
sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
342
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
343
sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
1103
if test "$gt_use_preinstalled_gnugettext" = "yes" \
1104
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
1105
AC_DEFINE(ENABLE_NLS, 1,
1106
[Define to 1 if translation of program messages to the user's native language
1113
if test "$USE_NLS" = "yes"; then
1115
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1116
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
1117
AC_MSG_CHECKING([how to link with libintl])
1118
AC_MSG_RESULT([$LIBINTL])
1119
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
1122
dnl For backward compatibility. Some packages may be using this.
1123
AC_DEFINE(HAVE_GETTEXT, 1,
1124
[Define if the GNU gettext() function is already present or preinstalled.])
1125
AC_DEFINE(HAVE_DCGETTEXT, 1,
1126
[Define if the GNU dcgettext() function is already present or preinstalled.])
1129
dnl We need to process the po/ directory.
1133
ifelse(gt_included_intl, yes, [
350
1134
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
351
1135
dnl to 'yes' because some of the testsuite requires it.
352
1136
if test "$PACKAGE" = gettext; then
353
1137
BUILD_INCLUDED_LIBINTL=yes
356
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
357
dnl because plural.y uses bison specific features. It requires at least
358
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
360
dnl bison is only needed for the maintainer (who touches plural.y). But in
361
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
362
dnl the rule in general Makefile. Now, some people carelessly touch the
363
dnl files or have a broken "make" program, hence the plural.c rule will
364
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
365
dnl present or too old.
366
AC_CHECK_PROGS([INTLBISON], [bison])
367
if test -z "$INTLBISON"; then
370
dnl Found it, now check the version.
371
AC_MSG_CHECKING([version of bison])
372
changequote(<<,>>)dnl
373
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
374
case $ac_prog_version in
375
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
376
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
378
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
379
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
381
AC_MSG_RESULT([$ac_prog_version])
383
if test $ac_verc_fail = yes; then
387
dnl These rules are solely for the distribution goal. While doing this
388
dnl we only have to keep exactly one list of the available catalogs
390
for lang in $ALL_LINGUAS; do
391
GMOFILES="$GMOFILES $lang.gmo"
392
POFILES="$POFILES $lang.po"
395
1140
dnl Make all variables we use known to autoconf.
396
1141
AC_SUBST(BUILD_INCLUDED_LIBINTL)
397
1142
AC_SUBST(USE_INCLUDED_LIBINTL)
399
1143
AC_SUBST(CATOBJEXT)
402
1144
AC_SUBST(INTLOBJS)
406
1146
dnl For backward compatibility. Some configure.ins may be using this.
407
1147
nls_cv_header_intl=
418
1158
dnl For backward compatibility. Some Makefiles may be using this.
420
1160
AC_SUBST(GENCAT)
1162
dnl Enable libtool support if the surrounding package wishes it.
1163
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
1164
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
423
dnl Usage: Just like AM_WITH_NLS, which see.
424
AC_DEFUN([AM_GNU_GETTEXT],
425
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
426
AC_REQUIRE([AC_PROG_CC])dnl
427
AC_REQUIRE([AC_CANONICAL_HOST])dnl
428
AC_REQUIRE([AC_PROG_RANLIB])dnl
429
AC_REQUIRE([AC_ISC_POSIX])dnl
430
AC_REQUIRE([AC_HEADER_STDC])dnl
431
AC_REQUIRE([AC_C_CONST])dnl
432
AC_REQUIRE([AC_C_INLINE])dnl
433
AC_REQUIRE([AC_TYPE_OFF_T])dnl
434
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
435
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
436
AC_REQUIRE([AC_FUNC_MMAP])dnl
437
AC_REQUIRE([jm_GLIBC21])dnl
439
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
1167
dnl For backward compatibility. Some Makefiles may be using this.
1171
dnl Make all documented variables known to autoconf.
1178
dnl Checks for all prerequisites of the po subdirectory,
1179
dnl except for USE_NLS.
1180
AC_DEFUN([AM_PO_SUBDIRS],
1182
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1183
AC_REQUIRE([AC_PROG_INSTALL])dnl
1184
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1186
dnl Perform the following tests also if --disable-nls has been given,
1187
dnl because they are needed for "make dist" to work.
1189
dnl Search for GNU msgfmt in the PATH.
1190
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1191
dnl The second test excludes FreeBSD msgfmt.
1192
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1193
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
1194
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1196
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1198
dnl Search for GNU xgettext 0.11 or newer in the PATH.
1199
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1200
dnl The second test excludes FreeBSD xgettext.
1201
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1202
[$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
1203
(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)],
1205
dnl Remove leftover from FreeBSD xgettext call.
1208
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
1209
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
1210
[$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
1212
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1213
dnl Test whether we really found GNU msgfmt.
1214
if test "$GMSGFMT" != ":"; then
1215
dnl If it is no GNU msgfmt we define it as : so that the
1216
dnl Makefiles still can work.
1217
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
1218
(if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1221
GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
1223
[found $GMSGFMT program is not GNU msgfmt; ignore it])
1228
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1229
dnl Test whether we really found GNU xgettext.
1230
if test "$XGETTEXT" != ":"; then
1231
dnl If it is no GNU xgettext we define it as : so that the
1232
dnl Makefiles still can work.
1233
if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
1234
(if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1238
[found xgettext program is not GNU xgettext; ignore it])
1241
dnl Remove leftover from FreeBSD xgettext call.
1245
AC_OUTPUT_COMMANDS([
1246
for ac_file in $CONFIG_FILES; do
1247
# Support "outfile[:infile[:infile...]]"
1249
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1251
# PO directories have a Makefile.in generated from Makefile.in.in.
1252
case "$ac_file" in */Makefile.in)
1253
# Adjust a relative srcdir.
1254
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1255
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1256
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1257
# In autoconf-2.13 it is called $ac_given_srcdir.
1258
# In autoconf-2.50 it is called $srcdir.
1259
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1260
case "$ac_given_srcdir" in
1261
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1262
/*) top_srcdir="$ac_given_srcdir" ;;
1263
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
1265
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
1266
rm -f "$ac_dir/POTFILES"
1267
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
1268
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
1269
# ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
1270
# on $ac_dir but don't depend on user-specified configuration
1272
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1273
# The LINGUAS file contains the set of available languages.
1274
if test -n "$ALL_LINGUAS"; then
1275
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1277
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1278
# Hide the ALL_LINGUAS assigment from automake.
1279
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1281
case "$ac_given_srcdir" in
1283
*) srcdirpre='$(srcdir)/' ;;
1289
for lang in $ALL_LINGUAS; do
1290
POFILES="$POFILES $srcdirpre$lang.po"
1291
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1292
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1293
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1295
# CATALOGS depends on both $ac_dir and the user's LINGUAS
1296
# environment variable.
1298
if test -n "$ALL_LINGUAS"; then
1299
for presentlang in $ALL_LINGUAS; do
1301
if test "%UNSET%" != "$LINGUAS"; then
1302
desiredlanguages="$LINGUAS"
1304
desiredlanguages="$ALL_LINGUAS"
1306
for desiredlang in $desiredlanguages; do
1307
# Use the presentlang catalog if desiredlang is
1308
# a. equal to presentlang, or
1309
# b. a variant of presentlang (because in this case,
1310
# presentlang can be used as a fallback for messages
1311
# which are not translated in the desiredlang catalog).
1312
case "$desiredlang" in
1313
"$presentlang"*) useit=yes;;
1316
if test $useit = yes; then
1317
INST_LINGUAS="$INST_LINGUAS $presentlang"
1322
if test -n "$INST_LINGUAS"; then
1323
for lang in $INST_LINGUAS; do
1324
CATALOGS="$CATALOGS $lang.gmo"
1327
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
1328
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"
1329
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
1330
if test -f "$f"; then
1332
*.orig | *.bak | *~) ;;
1333
*) cat "$f" >> "$ac_dir/Makefile" ;;
1341
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
1342
# POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
1344
eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
1345
# Capture the value of LINGUAS because we need it to compute CATALOGS.
1346
LINGUAS="${LINGUAS-%UNSET%}"
1351
dnl Checks for all prerequisites of the intl subdirectory,
1352
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
1353
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
1354
AC_DEFUN([AM_INTL_SUBDIR],
1356
AC_REQUIRE([AC_PROG_INSTALL])dnl
1357
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1358
AC_REQUIRE([AC_PROG_CC])dnl
1359
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1360
AC_REQUIRE([AC_PROG_RANLIB])dnl
1361
AC_REQUIRE([AC_ISC_POSIX])dnl
1362
AC_REQUIRE([AC_HEADER_STDC])dnl
1363
AC_REQUIRE([AC_C_CONST])dnl
1364
AC_REQUIRE([AC_C_INLINE])dnl
1365
AC_REQUIRE([AC_TYPE_OFF_T])dnl
1366
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1367
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1368
AC_REQUIRE([AC_FUNC_MMAP])dnl
1369
AC_REQUIRE([jm_GLIBC21])dnl
1370
AC_REQUIRE([gt_INTDIV0])dnl
1371
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
1372
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
1373
AC_REQUIRE([gt_INTTYPES_PRI])dnl
1375
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
440
1376
stdlib.h string.h unistd.h sys/param.h])
441
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
442
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
443
strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
448
AM_WITH_NLS([$1],[$2],[$3])
450
if test "x$CATOBJEXT" != "x"; then
451
if test "x$ALL_LINGUAS" = "x"; then
454
AC_MSG_CHECKING(for catalogs to be installed)
456
for presentlang in $ALL_LINGUAS; do
458
for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
459
# Use the presentlang catalog if desiredlang is
460
# a. equal to presentlang, or
461
# b. a variant of presentlang (because in this case,
462
# presentlang can be used as a fallback for messages
463
# which are not translated in the desiredlang catalog).
464
case "$desiredlang" in
465
"$presentlang"*) useit=yes;;
468
if test $useit = yes; then
469
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
473
AC_MSG_RESULT($LINGUAS)
476
dnl Construct list of names of catalog files to be constructed.
477
if test -n "$LINGUAS"; then
478
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
482
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
483
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
484
dnl Try to locate is.
486
if test -n "$ac_aux_dir"; then
487
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
489
if test -z "$MKINSTALLDIRS"; then
490
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
492
AC_SUBST(MKINSTALLDIRS)
494
dnl Enable libtool support if the surrounding package wishes it.
495
INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
496
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
1377
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
1378
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
1379
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
1383
if test $ac_cv_header_locale_h = yes; then
1387
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
1388
dnl because plural.y uses bison specific features. It requires at least
1389
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
1391
dnl bison is only needed for the maintainer (who touches plural.y). But in
1392
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
1393
dnl the rule in general Makefile. Now, some people carelessly touch the
1394
dnl files or have a broken "make" program, hence the plural.c rule will
1395
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
1396
dnl present or too old.
1397
AC_CHECK_PROGS([INTLBISON], [bison])
1398
if test -z "$INTLBISON"; then
1401
dnl Found it, now check the version.
1402
AC_MSG_CHECKING([version of bison])
1403
changequote(<<,>>)dnl
1404
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
1405
case $ac_prog_version in
1406
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1407
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
1409
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1410
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1412
AC_MSG_RESULT([$ac_prog_version])
1414
if test $ac_verc_fail = yes; then
1420
AC_DEFUN([AM_MKINSTALLDIRS],
1422
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1423
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
1424
dnl Try to locate is.
1426
if test -n "$ac_aux_dir"; then
1427
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1429
if test -z "$MKINSTALLDIRS"; then
1430
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1432
AC_SUBST(MKINSTALLDIRS)
1436
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
1437
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
1439
# lib-prefix.m4 serial 1 (gettext-0.11)
1440
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1441
dnl This file is free software, distributed under the terms of the GNU
1442
dnl General Public License. As a special exception to the GNU General
1443
dnl Public License, this file may be distributed as part of a program
1444
dnl that contains a configuration script generated by Autoconf, under
1445
dnl the same distribution terms as the rest of that program.
1447
dnl From Bruno Haible.
1449
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1450
dnl to access previously installed libraries. The basic assumption is that
1451
dnl a user will want packages to use other packages he previously installed
1452
dnl with the same --prefix option.
1453
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1454
dnl libraries, but is otherwise very convenient.
1455
AC_DEFUN([AC_LIB_PREFIX],
1457
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1458
AC_REQUIRE([AC_PROG_CC])
1459
AC_REQUIRE([AC_CANONICAL_HOST])
1460
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1461
dnl By default, look in $includedir and $libdir.
1463
AC_LIB_WITH_FINAL_PREFIX([
1464
eval additional_includedir=\"$includedir\"
1465
eval additional_libdir=\"$libdir\"
1467
AC_ARG_WITH([lib-prefix],
1468
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1469
--without-lib-prefix don't search for libraries in includedir and libdir],
1471
if test "X$withval" = "Xno"; then
1474
if test "X$withval" = "X"; then
1475
AC_LIB_WITH_FINAL_PREFIX([
1476
eval additional_includedir=\"$includedir\"
1477
eval additional_libdir=\"$libdir\"
1480
additional_includedir="$withval/include"
1481
additional_libdir="$withval/lib"
1485
if test $use_additional = yes; then
1486
dnl Potentially add $additional_includedir to $CPPFLAGS.
1487
dnl But don't add it
1488
dnl 1. if it's the standard /usr/include,
1489
dnl 2. if it's already present in $CPPFLAGS,
1490
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1491
dnl 4. if it doesn't exist as a directory.
1492
if test "X$additional_includedir" != "X/usr/include"; then
1494
for x in $CPPFLAGS; do
1495
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1496
if test "X$x" = "X-I$additional_includedir"; then
1501
if test -z "$haveit"; then
1502
if test "X$additional_includedir" = "X/usr/local/include"; then
1503
if test -n "$GCC"; then
1505
linux*) haveit=yes;;
1509
if test -z "$haveit"; then
1510
if test -d "$additional_includedir"; then
1511
dnl Really add $additional_includedir to $CPPFLAGS.
1512
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1517
dnl Potentially add $additional_libdir to $LDFLAGS.
1518
dnl But don't add it
1519
dnl 1. if it's the standard /usr/lib,
1520
dnl 2. if it's already present in $LDFLAGS,
1521
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1522
dnl 4. if it doesn't exist as a directory.
1523
if test "X$additional_libdir" != "X/usr/lib"; then
1525
for x in $LDFLAGS; do
1526
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1527
if test "X$x" = "X-L$additional_libdir"; then
1532
if test -z "$haveit"; then
1533
if test "X$additional_libdir" = "X/usr/local/lib"; then
1534
if test -n "$GCC"; then
1536
linux*) haveit=yes;;
1540
if test -z "$haveit"; then
1541
if test -d "$additional_libdir"; then
1542
dnl Really add $additional_libdir to $LDFLAGS.
1543
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1551
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1552
dnl acl_final_exec_prefix, containing the values to which $prefix and
1553
dnl $exec_prefix will expand at the end of the configure script.
1554
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1556
dnl Unfortunately, prefix and exec_prefix get only finally determined
1557
dnl at the end of configure.
1558
if test "X$prefix" = "XNONE"; then
1559
acl_final_prefix="$ac_default_prefix"
1561
acl_final_prefix="$prefix"
1563
if test "X$exec_prefix" = "XNONE"; then
1564
acl_final_exec_prefix='${prefix}'
1566
acl_final_exec_prefix="$exec_prefix"
1568
acl_save_prefix="$prefix"
1569
prefix="$acl_final_prefix"
1570
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1571
prefix="$acl_save_prefix"
1574
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1575
dnl variables prefix and exec_prefix bound to the values they will have
1576
dnl at the end of the configure script.
1577
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1579
acl_save_prefix="$prefix"
1580
prefix="$acl_final_prefix"
1581
acl_save_exec_prefix="$exec_prefix"
1582
exec_prefix="$acl_final_exec_prefix"
1584
exec_prefix="$acl_save_exec_prefix"
1585
prefix="$acl_save_prefix"
1588
# lib-link.m4 serial 3 (gettext-0.11.3)
1589
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1590
dnl This file is free software, distributed under the terms of the GNU
1591
dnl General Public License. As a special exception to the GNU General
1592
dnl Public License, this file may be distributed as part of a program
1593
dnl that contains a configuration script generated by Autoconf, under
1594
dnl the same distribution terms as the rest of that program.
1596
dnl From Bruno Haible.
1598
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1599
dnl the libraries corresponding to explicit and implicit dependencies.
1600
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1601
dnl augments the CPPFLAGS variable.
1602
AC_DEFUN([AC_LIB_LINKFLAGS],
1604
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1605
AC_REQUIRE([AC_LIB_RPATH])
1606
define([Name],[translit([$1],[./-], [___])])
1607
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1608
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1609
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1610
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1611
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1612
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1613
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1615
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1616
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1617
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1618
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1620
AC_SUBST([LTLIB]NAME)
1621
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1622
dnl results of this search when this library appears as a dependency.
1628
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
1629
dnl searches for libname and the libraries corresponding to explicit and
1630
dnl implicit dependencies, together with the specified include files and
1631
dnl the ability to compile and link the specified testcode. If found, it
1632
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
1633
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1634
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1635
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1636
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1638
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1639
AC_REQUIRE([AC_LIB_RPATH])
1640
define([Name],[translit([$1],[./-], [___])])
1641
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1642
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1644
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1646
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1648
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1649
dnl because if the user has installed lib[]Name and not disabled its use
1650
dnl via --without-lib[]Name-prefix, he wants to use it.
1651
ac_save_CPPFLAGS="$CPPFLAGS"
1652
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1654
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1655
ac_save_LIBS="$LIBS"
1656
LIBS="$LIBS $LIB[]NAME"
1657
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
1658
LIBS="$ac_save_LIBS"
1660
if test "$ac_cv_lib[]Name" = yes; then
1662
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
1663
AC_MSG_CHECKING([how to link with lib[]$1])
1664
AC_MSG_RESULT([$LIB[]NAME])
1667
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1668
dnl $INC[]NAME either.
1669
CPPFLAGS="$ac_save_CPPFLAGS"
1673
AC_SUBST([HAVE_LIB]NAME)
1675
AC_SUBST([LTLIB]NAME)
1680
dnl Determine the platform dependent parameters needed to use rpath:
1681
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
1682
dnl hardcode_direct, hardcode_minus_L,
1683
dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
1684
AC_DEFUN([AC_LIB_RPATH],
1686
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1687
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1688
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1689
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1690
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
1691
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1692
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1698
libext="$acl_cv_libext"
1699
shlibext="$acl_cv_shlibext"
1700
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1701
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1702
hardcode_direct="$acl_cv_hardcode_direct"
1703
hardcode_minus_L="$acl_cv_hardcode_minus_L"
1704
sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
1705
sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
1706
dnl Determine whether the user wants rpath handling at all.
1707
AC_ARG_ENABLE(rpath,
1708
[ --disable-rpath do not hardcode runtime library paths],
1709
:, enable_rpath=yes)
1712
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1713
dnl the libraries corresponding to explicit and implicit dependencies.
1714
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1715
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1717
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1718
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1719
dnl By default, look in $includedir and $libdir.
1721
AC_LIB_WITH_FINAL_PREFIX([
1722
eval additional_includedir=\"$includedir\"
1723
eval additional_libdir=\"$libdir\"
1725
AC_ARG_WITH([lib$1-prefix],
1726
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
1727
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
1729
if test "X$withval" = "Xno"; then
1732
if test "X$withval" = "X"; then
1733
AC_LIB_WITH_FINAL_PREFIX([
1734
eval additional_includedir=\"$includedir\"
1735
eval additional_libdir=\"$libdir\"
1738
additional_includedir="$withval/include"
1739
additional_libdir="$withval/lib"
1743
dnl Search the library and its dependencies in $additional_libdir and
1744
dnl $LDFLAGS. Using breadth-first-seach.
1750
names_already_handled=
1751
names_next_round='$1 $2'
1752
while test -n "$names_next_round"; do
1753
names_this_round="$names_next_round"
1755
for name in $names_this_round; do
1757
for n in $names_already_handled; do
1758
if test "$n" = "$name"; then
1763
if test -z "$already_handled"; then
1764
names_already_handled="$names_already_handled $name"
1765
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1766
dnl or AC_LIB_HAVE_LINKFLAGS call.
1767
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1768
eval value=\"\$HAVE_LIB$uppername\"
1769
if test -n "$value"; then
1770
if test "$value" = yes; then
1771
eval value=\"\$LIB$uppername\"
1772
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1773
eval value=\"\$LTLIB$uppername\"
1774
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1776
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1777
dnl that this library doesn't exist. So just drop it.
1781
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1782
dnl and the already constructed $LIBNAME/$LTLIBNAME.
1787
if test $use_additional = yes; then
1788
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
1789
found_dir="$additional_libdir"
1790
found_so="$additional_libdir/lib$name.$shlibext"
1791
if test -f "$additional_libdir/lib$name.la"; then
1792
found_la="$additional_libdir/lib$name.la"
1795
if test -f "$additional_libdir/lib$name.$libext"; then
1796
found_dir="$additional_libdir"
1797
found_a="$additional_libdir/lib$name.$libext"
1798
if test -f "$additional_libdir/lib$name.la"; then
1799
found_la="$additional_libdir/lib$name.la"
1804
if test "X$found_dir" = "X"; then
1805
for x in $LDFLAGS $LTLIB[]NAME; do
1806
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1809
dir=`echo "X$x" | sed -e 's/^X-L//'`
1810
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
1812
found_so="$dir/lib$name.$shlibext"
1813
if test -f "$dir/lib$name.la"; then
1814
found_la="$dir/lib$name.la"
1817
if test -f "$dir/lib$name.$libext"; then
1819
found_a="$dir/lib$name.$libext"
1820
if test -f "$dir/lib$name.la"; then
1821
found_la="$dir/lib$name.la"
1827
if test "X$found_dir" != "X"; then
1832
if test "X$found_dir" != "X"; then
1833
dnl Found the library.
1834
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1835
if test "X$found_so" != "X"; then
1836
dnl Linking with a shared library. We attempt to hardcode its
1837
dnl directory into the executable's runpath, unless it's the
1838
dnl standard /usr/lib.
1839
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
1840
dnl No hardcoding is needed.
1841
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1843
dnl Use an explicit option to hardcode DIR into the resulting
1845
dnl Potentially add DIR to ltrpathdirs.
1846
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1848
for x in $ltrpathdirs; do
1849
if test "X$x" = "X$found_dir"; then
1854
if test -z "$haveit"; then
1855
ltrpathdirs="$ltrpathdirs $found_dir"
1857
dnl The hardcoding into $LIBNAME is system dependent.
1858
if test "$hardcode_direct" = yes; then
1859
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1860
dnl resulting binary.
1861
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1863
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
1864
dnl Use an explicit option to hardcode DIR into the resulting
1866
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1867
dnl Potentially add DIR to rpathdirs.
1868
dnl The rpathdirs will be appended to $LIBNAME at the end.
1870
for x in $rpathdirs; do
1871
if test "X$x" = "X$found_dir"; then
1876
if test -z "$haveit"; then
1877
rpathdirs="$rpathdirs $found_dir"
1880
dnl Rely on "-L$found_dir".
1881
dnl But don't add it if it's already contained in the LDFLAGS
1882
dnl or the already constructed $LIBNAME
1884
for x in $LDFLAGS $LIB[]NAME; do
1885
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1886
if test "X$x" = "X-L$found_dir"; then
1891
if test -z "$haveit"; then
1892
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1894
if test "$hardcode_minus_L" != no; then
1895
dnl FIXME: Not sure whether we should use
1896
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1898
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1900
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
1901
dnl here, because this doesn't fit in flags passed to the
1902
dnl compiler. So give up. No hardcoding. This affects only
1903
dnl very old systems.
1904
dnl FIXME: Not sure whether we should use
1905
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1907
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1913
if test "X$found_a" != "X"; then
1914
dnl Linking with a static library.
1915
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1917
dnl We shouldn't come here, but anyway it's good to have a
1919
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1922
dnl Assume the include files are nearby.
1923
additional_includedir=
1924
case "$found_dir" in
1926
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
1927
additional_includedir="$basedir/include"
1930
if test "X$additional_includedir" != "X"; then
1931
dnl Potentially add $additional_includedir to $INCNAME.
1932
dnl But don't add it
1933
dnl 1. if it's the standard /usr/include,
1934
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1935
dnl 3. if it's already present in $CPPFLAGS or the already
1936
dnl constructed $INCNAME,
1937
dnl 4. if it doesn't exist as a directory.
1938
if test "X$additional_includedir" != "X/usr/include"; then
1940
if test "X$additional_includedir" = "X/usr/local/include"; then
1941
if test -n "$GCC"; then
1943
linux*) haveit=yes;;
1947
if test -z "$haveit"; then
1948
for x in $CPPFLAGS $INC[]NAME; do
1949
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1950
if test "X$x" = "X-I$additional_includedir"; then
1955
if test -z "$haveit"; then
1956
if test -d "$additional_includedir"; then
1957
dnl Really add $additional_includedir to $INCNAME.
1958
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1964
dnl Look for dependencies.
1965
if test -n "$found_la"; then
1966
dnl Read the .la file. It defines the variables
1967
dnl dlname, library_names, old_library, dependency_libs, current,
1968
dnl age, revision, installed, dlopen, dlpreopen, libdir.
1969
save_libdir="$libdir"
1971
*/* | *\\*) . "$found_la" ;;
1972
*) . "./$found_la" ;;
1974
libdir="$save_libdir"
1975
dnl We use only dependency_libs.
1976
for dep in $dependency_libs; do
1979
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1980
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1981
dnl But don't add it
1982
dnl 1. if it's the standard /usr/lib,
1983
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1984
dnl 3. if it's already present in $LDFLAGS or the already
1985
dnl constructed $LIBNAME,
1986
dnl 4. if it doesn't exist as a directory.
1987
if test "X$additional_libdir" != "X/usr/lib"; then
1989
if test "X$additional_libdir" = "X/usr/local/lib"; then
1990
if test -n "$GCC"; then
1992
linux*) haveit=yes;;
1996
if test -z "$haveit"; then
1998
for x in $LDFLAGS $LIB[]NAME; do
1999
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2000
if test "X$x" = "X-L$additional_libdir"; then
2005
if test -z "$haveit"; then
2006
if test -d "$additional_libdir"; then
2007
dnl Really add $additional_libdir to $LIBNAME.
2008
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
2012
for x in $LDFLAGS $LTLIB[]NAME; do
2013
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2014
if test "X$x" = "X-L$additional_libdir"; then
2019
if test -z "$haveit"; then
2020
if test -d "$additional_libdir"; then
2021
dnl Really add $additional_libdir to $LTLIBNAME.
2022
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
2029
dir=`echo "X$dep" | sed -e 's/^X-R//'`
2030
if test "$enable_rpath" != no; then
2031
dnl Potentially add DIR to rpathdirs.
2032
dnl The rpathdirs will be appended to $LIBNAME at the end.
2034
for x in $rpathdirs; do
2035
if test "X$x" = "X$dir"; then
2040
if test -z "$haveit"; then
2041
rpathdirs="$rpathdirs $dir"
2043
dnl Potentially add DIR to ltrpathdirs.
2044
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2046
for x in $ltrpathdirs; do
2047
if test "X$x" = "X$dir"; then
2052
if test -z "$haveit"; then
2053
ltrpathdirs="$ltrpathdirs $dir"
2058
dnl Handle this in the next round.
2059
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
2062
dnl Handle this in the next round. Throw away the .la's
2063
dnl directory; it is already contained in a preceding -L
2065
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
2068
dnl Most likely an immediate library name.
2069
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
2070
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
2076
dnl Didn't find the library; assume it is in the system directories
2077
dnl known to the linker and runtime loader. (All the system
2078
dnl directories known to the linker should also be known to the
2079
dnl runtime loader, otherwise the system is severely misconfigured.)
2080
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2081
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
2087
if test "X$rpathdirs" != "X"; then
2088
if test -n "$hardcode_libdir_separator"; then
2089
dnl Weird platform: only the last -rpath option counts, the user must
2090
dnl pass all path elements in one option. We can arrange that for a
2091
dnl single library, but not when more than one $LIBNAMEs are used.
2093
for found_dir in $rpathdirs; do
2094
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
2096
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
2097
acl_save_libdir="$libdir"
2099
eval flag=\"$hardcode_libdir_flag_spec\"
2100
libdir="$acl_save_libdir"
2101
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2103
dnl The -rpath options are cumulative.
2104
for found_dir in $rpathdirs; do
2105
acl_save_libdir="$libdir"
2107
eval flag=\"$hardcode_libdir_flag_spec\"
2108
libdir="$acl_save_libdir"
2109
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2113
if test "X$ltrpathdirs" != "X"; then
2114
dnl When using libtool, the option that works for both libraries and
2115
dnl executables is -R. The -R options are cumulative.
2116
for found_dir in $ltrpathdirs; do
2117
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
2122
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
2123
dnl unless already present in VAR.
2124
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
2125
dnl contains two or three consecutive elements that belong together.
2126
AC_DEFUN([AC_LIB_APPENDTOVAR],
2128
for element in [$2]; do
2131
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2132
if test "X$x" = "X$element"; then
2137
if test -z "$haveit"; then
2138
[$1]="${[$1]}${[$1]:+ }$element"
2143
# lib-ld.m4 serial 1 (gettext-0.11)
2144
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
2145
dnl This file is free software, distributed under the terms of the GNU
2146
dnl General Public License. As a special exception to the GNU General
2147
dnl Public License, this file may be distributed as part of a program
2148
dnl that contains a configuration script generated by Autoconf, under
2149
dnl the same distribution terms as the rest of that program.
2151
dnl Subroutines of libtool.m4,
2152
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
2153
dnl with libtool.m4.
2155
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
2156
AC_DEFUN([AC_LIB_PROG_LD_GNU],
2157
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
2158
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2159
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2160
acl_cv_prog_gnu_ld=yes
2162
acl_cv_prog_gnu_ld=no
2164
with_gnu_ld=$acl_cv_prog_gnu_ld
2167
dnl From libtool-1.4. Sets the variable LD.
2168
AC_DEFUN([AC_LIB_PROG_LD],
2169
[AC_ARG_WITH(gnu-ld,
2170
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
2171
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
2172
AC_REQUIRE([AC_PROG_CC])dnl
2173
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2175
if test "$GCC" = yes; then
2176
# Check if gcc -print-prog-name=ld gives a path.
2177
AC_MSG_CHECKING([for ld used by GCC])
2180
# gcc leaves a trailing carriage return which upsets mingw
2181
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2183
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2186
# Accept absolute paths.
2187
[[\\/]* | [A-Za-z]:[\\/]*)]
2188
[re_direlt='/[^/][^/]*/\.\./']
2189
# Canonicalize the path of ld
2190
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2191
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2192
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2194
test -z "$LD" && LD="$ac_prog"
2197
# If it fails, then pretend we aren't using GCC.
2201
# If it is relative, then search for the first ld in PATH.
2205
elif test "$with_gnu_ld" = yes; then
2206
AC_MSG_CHECKING([for GNU ld])
2208
AC_MSG_CHECKING([for non-GNU ld])
2210
AC_CACHE_VAL(acl_cv_path_LD,
2211
[if test -z "$LD"; then
2212
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2213
for ac_dir in $PATH; do
2214
test -z "$ac_dir" && ac_dir=.
2215
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2216
acl_cv_path_LD="$ac_dir/$ac_prog"
2217
# Check to see if the program is GNU ld. I'd rather use --version,
2218
# but apparently some GNU ld's only accept -v.
2219
# Break only if it was the GNU/non-GNU ld that we prefer.
2220
if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2221
test "$with_gnu_ld" != no && break
2223
test "$with_gnu_ld" != yes && break
2229
acl_cv_path_LD="$LD" # Let the user override the test with a path.
2231
LD="$acl_cv_path_LD"
2232
if test -n "$LD"; then
2237
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2241
# iconv.m4 serial AM4 (gettext-0.11.3)
2242
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2243
dnl This file is free software, distributed under the terms of the GNU
2244
dnl General Public License. As a special exception to the GNU General
2245
dnl Public License, this file may be distributed as part of a program
2246
dnl that contains a configuration script generated by Autoconf, under
2247
dnl the same distribution terms as the rest of that program.
2249
dnl From Bruno Haible.
2251
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
2253
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
2254
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2255
AC_REQUIRE([AC_LIB_RPATH])
2257
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2259
AC_LIB_LINKFLAGS_BODY([iconv])
2262
AC_DEFUN([AM_ICONV_LINK],
2264
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
2265
dnl those with the standalone portable GNU libiconv installed).
2267
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2269
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
2271
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
2272
dnl because if the user has installed libiconv and not disabled its use
2273
dnl via --without-libiconv-prefix, he wants to use it. The first
2274
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
2275
am_save_CPPFLAGS="$CPPFLAGS"
2276
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
2278
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
2279
am_cv_func_iconv="no, consider installing GNU libiconv"
2281
AC_TRY_LINK([#include <stdlib.h>
2282
#include <iconv.h>],
2283
[iconv_t cd = iconv_open("","");
2284
iconv(cd,NULL,NULL,NULL,NULL);
2286
am_cv_func_iconv=yes)
2287
if test "$am_cv_func_iconv" != yes; then
2288
am_save_LIBS="$LIBS"
2289
LIBS="$LIBS $LIBICONV"
2290
AC_TRY_LINK([#include <stdlib.h>
2291
#include <iconv.h>],
2292
[iconv_t cd = iconv_open("","");
2293
iconv(cd,NULL,NULL,NULL,NULL);
2296
am_cv_func_iconv=yes)
2297
LIBS="$am_save_LIBS"
2300
if test "$am_cv_func_iconv" = yes; then
2301
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
2303
if test "$am_cv_lib_iconv" = yes; then
2304
AC_MSG_CHECKING([how to link with libiconv])
2305
AC_MSG_RESULT([$LIBICONV])
2307
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
2309
CPPFLAGS="$am_save_CPPFLAGS"
2314
AC_SUBST(LTLIBICONV)
2317
AC_DEFUN([AM_ICONV],
2320
if test "$am_cv_func_iconv" = yes; then
2321
AC_MSG_CHECKING([for iconv declaration])
2322
AC_CACHE_VAL(am_cv_proto_iconv, [
2330
#if defined(__STDC__) || defined(__cplusplus)
2331
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
2335
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
2336
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);"])
2337
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
2338
AC_MSG_RESULT([$]{ac_t:-
2339
}[$]am_cv_proto_iconv)
2340
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
2341
[Define as const if the declaration of iconv() needs const.])
2345
# progtest.m4 serial 2 (gettext-0.10.40)
2346
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
2347
dnl This file is free software, distributed under the terms of the GNU
2348
dnl General Public License. As a special exception to the GNU General
2349
dnl Public License, this file may be distributed as part of a program
2350
dnl that contains a configuration script generated by Autoconf, under
2351
dnl the same distribution terms as the rest of that program.
2353
dnl This file can can be used in projects which are not available under
2354
dnl the GNU General Public License or the GNU Library General Public
2355
dnl License but which still want to provide support for the GNU gettext
2357
dnl Please note that the actual code of the GNU gettext library is covered
2358
dnl by the GNU Library General Public License, and the rest of the GNU
2359
dnl gettext package package is covered by the GNU General Public License.
2360
dnl They are *not* in the public domain.
2363
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
499
2365
# Search path for a program which passes the given test.
500
# Ulrich Drepper <drepper@cygnus.com>, 1996.
502
# This file can be copied and used freely without restrictions. It can
503
# be used in projects which are not available under the GNU General Public
504
# License or the GNU Library General Public License but which still want
505
# to provide support for the GNU gettext functionality.
506
# Please note that the actual code of the GNU gettext library is covered
507
# by the GNU Library General Public License, and the rest of the GNU
508
# gettext package package is covered by the GNU General Public License.
509
# They are *not* in the public domain.
513
2367
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
514
2368
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2465
# intdiv0.m4 serial 1 (gettext-0.11.3)
2466
dnl Copyright (C) 2002 Free Software Foundation, Inc.
2467
dnl This file is free software, distributed under the terms of the GNU
2468
dnl General Public License. As a special exception to the GNU General
2469
dnl Public License, this file may be distributed as part of a program
2470
dnl that contains a configuration script generated by Autoconf, under
2471
dnl the same distribution terms as the rest of that program.
598
2473
dnl From Bruno Haible.
2475
AC_DEFUN([gt_INTDIV0],
602
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
603
dnl those with the standalone portable GNU libiconv installed).
605
AC_ARG_WITH([libiconv-prefix],
606
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
607
for dir in `echo "$withval" | tr : ' '`; do
608
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
609
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
613
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
614
am_cv_func_iconv="no, consider installing GNU libiconv"
616
AC_TRY_LINK([#include <stdlib.h>
618
[iconv_t cd = iconv_open("","");
619
iconv(cd,NULL,NULL,NULL,NULL);
621
am_cv_func_iconv=yes)
622
if test "$am_cv_func_iconv" != yes; then
625
AC_TRY_LINK([#include <stdlib.h>
627
[iconv_t cd = iconv_open("","");
628
iconv(cd,NULL,NULL,NULL,NULL);
631
am_cv_func_iconv=yes)
635
if test "$am_cv_func_iconv" = yes; then
636
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
637
AC_MSG_CHECKING([for iconv declaration])
638
AC_CACHE_VAL(am_cv_proto_iconv, [
2477
AC_REQUIRE([AC_PROG_CC])dnl
2478
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2480
AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
2481
gt_cv_int_divbyzero_sigfpe,
640
2484
#include <stdlib.h>
643
2488
#ifdef __cplusplus
646
#if defined(__STDC__) || defined(__cplusplus)
647
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
2489
sigfpe_handler (int sig)
651
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
652
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);"])
653
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
654
AC_MSG_RESULT([$]{ac_t:-
655
}[$]am_cv_proto_iconv)
656
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
657
[Define as const if the declaration of iconv() needs const.])
660
if test "$am_cv_lib_iconv" = yes; then
2491
sigfpe_handler (sig) int sig;
2494
/* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
2495
exit (sig != SIGFPE);
2505
signal (SIGFPE, sigfpe_handler);
2506
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
2507
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
2508
signal (SIGTRAP, sigfpe_handler);
2510
/* Linux/SPARC yields signal SIGILL. */
2511
#if defined (__sparc__) && defined (__linux__)
2512
signal (SIGILL, sigfpe_handler);
2519
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
2521
# Guess based on the CPU.
2523
alpha* | i[34567]86 | m68k | s390*)
2524
gt_cv_int_divbyzero_sigfpe="guessing yes";;
2526
gt_cv_int_divbyzero_sigfpe="guessing no";;
2530
case "$gt_cv_int_divbyzero_sigfpe" in
2534
AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
2535
[Define if integer division by zero raises signal SIGFPE.])
2538
# uintmax_t.m4 serial 6 (gettext-0.11)
2539
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2540
dnl This file is free software, distributed under the terms of the GNU
2541
dnl General Public License. As a special exception to the GNU General
2542
dnl Public License, this file may be distributed as part of a program
2543
dnl that contains a configuration script generated by Autoconf, under
2544
dnl the same distribution terms as the rest of that program.
2546
dnl From Paul Eggert.
2550
# Define uintmax_t to `unsigned long' or `unsigned long long'
2551
# if <inttypes.h> does not exist.
2553
AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
2555
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
2556
AC_REQUIRE([jm_AC_HEADER_STDINT_H])
2557
if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
2558
AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
2559
test $ac_cv_type_unsigned_long_long = yes \
2560
&& ac_type='unsigned long long' \
2561
|| ac_type='unsigned long'
2562
AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
2563
[Define to unsigned long or unsigned long long
2564
if <inttypes.h> and <stdint.h> don't define.])
2568
# inttypes_h.m4 serial 4 (gettext-0.11.4)
2569
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2570
dnl This file is free software, distributed under the terms of the GNU
2571
dnl General Public License. As a special exception to the GNU General
2572
dnl Public License, this file may be distributed as part of a program
2573
dnl that contains a configuration script generated by Autoconf, under
2574
dnl the same distribution terms as the rest of that program.
2576
dnl From Paul Eggert.
2578
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
2579
# doesn't clash with <sys/types.h>, and declares uintmax_t.
2581
AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
2583
AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
2585
[#include <sys/types.h>
2586
#include <inttypes.h>],
2587
[uintmax_t i = (uintmax_t) -1;],
2588
jm_ac_cv_header_inttypes_h=yes,
2589
jm_ac_cv_header_inttypes_h=no)])
2590
if test $jm_ac_cv_header_inttypes_h = yes; then
2591
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
2592
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
2593
and declares uintmax_t. ])
2597
# stdint_h.m4 serial 2 (gettext-0.11.4)
2598
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2599
dnl This file is free software, distributed under the terms of the GNU
2600
dnl General Public License. As a special exception to the GNU General
2601
dnl Public License, this file may be distributed as part of a program
2602
dnl that contains a configuration script generated by Autoconf, under
2603
dnl the same distribution terms as the rest of that program.
2605
dnl From Paul Eggert.
2607
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
2608
# doesn't clash with <sys/types.h>, and declares uintmax_t.
2610
AC_DEFUN([jm_AC_HEADER_STDINT_H],
2612
AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
2614
[#include <sys/types.h>
2615
#include <stdint.h>],
2616
[uintmax_t i = (uintmax_t) -1;],
2617
jm_ac_cv_header_stdint_h=yes,
2618
jm_ac_cv_header_stdint_h=no)])
2619
if test $jm_ac_cv_header_stdint_h = yes; then
2620
AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
2621
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
2622
and declares uintmax_t. ])
2626
# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
2627
dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
2628
dnl This file is free software, distributed under the terms of the GNU
2629
dnl General Public License. As a special exception to the GNU General
2630
dnl Public License, this file may be distributed as part of a program
2631
dnl that contains a configuration script generated by Autoconf, under
2632
dnl the same distribution terms as the rest of that program.
2634
dnl From Paul Eggert.
2636
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
2638
AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
2639
[AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
2640
[unsigned long long ullmax = (unsigned long long) -1;
2641
return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
2642
ac_cv_type_unsigned_long_long=yes,
2643
ac_cv_type_unsigned_long_long=no)])
2644
if test $ac_cv_type_unsigned_long_long = yes; then
2645
AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
2646
[Define if you have the unsigned long long type.])
2650
# inttypes.m4 serial 1 (gettext-0.11.4)
2651
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2652
dnl This file is free software, distributed under the terms of the GNU
2653
dnl General Public License. As a special exception to the GNU General
2654
dnl Public License, this file may be distributed as part of a program
2655
dnl that contains a configuration script generated by Autoconf, under
2656
dnl the same distribution terms as the rest of that program.
2658
dnl From Paul Eggert.
2660
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
2663
AC_DEFUN([gt_HEADER_INTTYPES_H],
2665
AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
2668
[#include <sys/types.h>
2669
#include <inttypes.h>],
2670
[], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
2672
if test $gt_cv_header_inttypes_h = yes; then
2673
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
2674
[Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
2678
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
2679
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2680
dnl This file is free software, distributed under the terms of the GNU
2681
dnl General Public License. As a special exception to the GNU General
2682
dnl Public License, this file may be distributed as part of a program
2683
dnl that contains a configuration script generated by Autoconf, under
2684
dnl the same distribution terms as the rest of that program.
2686
dnl From Bruno Haible.
2688
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
2689
# macros to non-string values. This is the case on AIX 4.3.3.
2691
AC_DEFUN([gt_INTTYPES_PRI],
2693
AC_REQUIRE([gt_HEADER_INTTYPES_H])
2694
if test $gt_cv_header_inttypes_h = yes; then
2695
AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
2696
gt_cv_inttypes_pri_broken,
2698
AC_TRY_COMPILE([#include <inttypes.h>
2702
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
2705
if test "$gt_cv_inttypes_pri_broken" = yes; then
2706
AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
2707
[Define if <inttypes.h> exists and defines unusable PRI* macros.])
2711
# codeset.m4 serial AM1 (gettext-0.10.40)
2712
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2713
dnl This file is free software, distributed under the terms of the GNU
2714
dnl General Public License. As a special exception to the GNU General
2715
dnl Public License, this file may be distributed as part of a program
2716
dnl that contains a configuration script generated by Autoconf, under
2717
dnl the same distribution terms as the rest of that program.
668
2719
dnl From Bruno Haible.