1 # generated automatically by aclocal 1.7.9 -*- 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 dnl Check longest integer in digits.
16 AC_DEFUN([BLP_INT_DIGITS],
18 AC_MSG_CHECKING(number of digits in LONG_MIN (incl. sign))
19 AC_CACHE_VAL(blp_int_digits,
20 [AC_TRY_RUN([#include <stdio.h>
27 sprintf(s, "%ld", LONG_MAX);
29 sprintf(s, "%ld", LONG_MIN);
30 if(strlen(s)>len) len=strlen(s);
31 sprintf(s, "%lu", ULONG_MAX);
32 if(strlen(s)>len) len=strlen(s);
36 eval "blp_int_digits=19",
37 eval "blp_int_digits=$?"
38 if test "$blp_int_digits" -lt 11; then
41 eval "blp_int_digits=19")
43 AC_DEFINE_UNQUOTED([INT_DIGITS], $blp_int_digits,
44 [Number of digits in longest `long' value, including sign.
45 This is usually 11, for 32-bit `long's, or 19, for 64-bit
47 AC_MSG_RESULT($blp_int_digits) ])dnl
49 dnl Check quality of this machine's sprintf implementation.
51 AC_DEFUN([BLP_IS_SPRINTF_GOOD],
53 AC_MSG_CHECKING(if sprintf returns a char count)
54 AC_CACHE_VAL(blp_is_sprintf_good,
55 [AC_TRY_RUN([#include <stdio.h>
60 exit((int)sprintf(s, "abcdefg")!=7);
63 eval "blp_is_sprintf_good=yes",
64 eval "blp_is_sprintf_good=no",
65 eval "blp_is_sprintf_good=no")
67 if test "$blp_is_sprintf_good" = yes; then
68 AC_DEFINE([HAVE_GOOD_SPRINTF], 1,
69 [Define if sprintf() returns the number of characters written
70 to the destination string, excluding the null terminator.])
77 dnl Check for proper random number generator.
79 AC_DEFUN([BLP_RANDOM],
81 AC_MSG_CHECKING(random number generator)
82 AC_CACHE_VAL(blp_random_good,
83 AC_TRY_COMPILE([#include <stdlib.h>], [int x=RAND_MAX;],
84 blp_random_good=yes, blp_random_good=no))
85 if test "$blp_random_good" = yes; then
86 AC_DEFINE([HAVE_GOOD_RANDOM], 1,
87 [Define if rand() and company work according to ANSI.])
94 dnl aclocal.m4 ends here
96 # Do all the work for Automake. -*- Autoconf -*-
98 # This macro actually does too much some checks are only needed if
99 # your package does certain things. But this isn't really a big deal.
101 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
102 # Free Software Foundation, Inc.
104 # This program is free software; you can redistribute it and/or modify
105 # it under the terms of the GNU General Public License as published by
106 # the Free Software Foundation; either version 2, or (at your option)
109 # This program is distributed in the hope that it will be useful,
110 # but WITHOUT ANY WARRANTY; without even the implied warranty of
111 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
112 # GNU General Public License for more details.
114 # You should have received a copy of the GNU General Public License
115 # along with this program; if not, write to the Free Software
116 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
123 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
124 # the ones we care about.
125 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
127 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
128 # AM_INIT_AUTOMAKE([OPTIONS])
129 # -----------------------------------------------
130 # The call with PACKAGE and VERSION arguments is the old style
131 # call (pre autoconf-2.50), which is being phased out. PACKAGE
132 # and VERSION should now be passed to AC_INIT and removed from
133 # the call to AM_INIT_AUTOMAKE.
134 # We support both call styles for the transition. After
135 # the next Automake release, Autoconf can make the AC_INIT
136 # arguments mandatory, and then we can depend on a new Autoconf
137 # release and drop the old call support.
138 AC_DEFUN([AM_INIT_AUTOMAKE],
139 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
140 AC_REQUIRE([AC_PROG_INSTALL])dnl
141 # test to see if srcdir already configured
142 if test "`cd $srcdir && pwd`" != "`pwd`" &&
143 test -f $srcdir/config.status; then
144 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
147 # test whether we have cygpath
148 if test -z "$CYGPATH_W"; then
149 if (cygpath --version) >/dev/null 2>/dev/null; then
150 CYGPATH_W='cygpath -w'
155 AC_SUBST([CYGPATH_W])
157 # Define the identity of the package.
158 dnl Distinguish between old-style and new-style calls.
160 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
161 AC_SUBST([PACKAGE], [$1])dnl
162 AC_SUBST([VERSION], [$2])],
163 [_AM_SET_OPTIONS([$1])dnl
164 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
165 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
167 _AM_IF_OPTION([no-define],,
168 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
169 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
171 # Some tools Automake needs.
172 AC_REQUIRE([AM_SANITY_CHECK])dnl
173 AC_REQUIRE([AC_ARG_PROGRAM])dnl
174 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
175 AM_MISSING_PROG(AUTOCONF, autoconf)
176 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
177 AM_MISSING_PROG(AUTOHEADER, autoheader)
178 AM_MISSING_PROG(MAKEINFO, makeinfo)
179 AM_MISSING_PROG(AMTAR, tar)
181 AM_PROG_INSTALL_STRIP
182 # We need awk for the "check" target. The system "awk" is bad on
184 AC_REQUIRE([AC_PROG_AWK])dnl
185 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
186 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
188 _AM_IF_OPTION([no-dependencies],,
189 [AC_PROVIDE_IFELSE([AC_PROG_CC],
190 [_AM_DEPENDENCIES(CC)],
191 [define([AC_PROG_CC],
192 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
193 AC_PROVIDE_IFELSE([AC_PROG_CXX],
194 [_AM_DEPENDENCIES(CXX)],
195 [define([AC_PROG_CXX],
196 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
201 # When config.status generates a header, we must update the stamp-h file.
202 # This file resides in the same directory as the config header
203 # that is generated. The stamp files are numbered to have different names.
205 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
206 # loop where config.status creates the headers, so we can generate
207 # our stamp files there.
208 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
209 [# Compute $1's index in $config_headers.
211 for _am_header in $config_headers :; do
216 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
219 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
221 # Copyright 2002 Free Software Foundation, Inc.
223 # This program is free software; you can redistribute it and/or modify
224 # it under the terms of the GNU General Public License as published by
225 # the Free Software Foundation; either version 2, or (at your option)
228 # This program is distributed in the hope that it will be useful,
229 # but WITHOUT ANY WARRANTY; without even the implied warranty of
230 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
231 # GNU General Public License for more details.
233 # You should have received a copy of the GNU General Public License
234 # along with this program; if not, write to the Free Software
235 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
237 # AM_AUTOMAKE_VERSION(VERSION)
238 # ----------------------------
239 # Automake X.Y traces this macro to ensure aclocal.m4 has been
240 # generated from the m4 files accompanying Automake X.Y.
241 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
243 # AM_SET_CURRENT_AUTOMAKE_VERSION
244 # -------------------------------
245 # Call AM_AUTOMAKE_VERSION so it can be traced.
246 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
247 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
248 [AM_AUTOMAKE_VERSION([1.7.9])])
250 # Helper functions for option handling. -*- Autoconf -*-
252 # Copyright 2001, 2002 Free Software Foundation, Inc.
254 # This program is free software; you can redistribute it and/or modify
255 # it under the terms of the GNU General Public License as published by
256 # the Free Software Foundation; either version 2, or (at your option)
259 # This program is distributed in the hope that it will be useful,
260 # but WITHOUT ANY WARRANTY; without even the implied warranty of
261 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
262 # GNU General Public License for more details.
264 # You should have received a copy of the GNU General Public License
265 # along with this program; if not, write to the Free Software
266 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
271 # _AM_MANGLE_OPTION(NAME)
272 # -----------------------
273 AC_DEFUN([_AM_MANGLE_OPTION],
274 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
276 # _AM_SET_OPTION(NAME)
277 # ------------------------------
278 # Set option NAME. Presently that only means defining a flag for this option.
279 AC_DEFUN([_AM_SET_OPTION],
280 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
282 # _AM_SET_OPTIONS(OPTIONS)
283 # ----------------------------------
284 # OPTIONS is a space-separated list of Automake options.
285 AC_DEFUN([_AM_SET_OPTIONS],
286 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
288 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
289 # -------------------------------------------
290 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
291 AC_DEFUN([_AM_IF_OPTION],
292 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
295 # Check to make sure that the build environment is sane.
298 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
300 # This program is free software; you can redistribute it and/or modify
301 # it under the terms of the GNU General Public License as published by
302 # the Free Software Foundation; either version 2, or (at your option)
305 # This program is distributed in the hope that it will be useful,
306 # but WITHOUT ANY WARRANTY; without even the implied warranty of
307 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
308 # GNU General Public License for more details.
310 # You should have received a copy of the GNU General Public License
311 # along with this program; if not, write to the Free Software
312 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
319 AC_DEFUN([AM_SANITY_CHECK],
320 [AC_MSG_CHECKING([whether build environment is sane])
323 echo timestamp > conftest.file
324 # Do `set' in a subshell so we don't clobber the current shell's
325 # arguments. Must try -L first in case configure is actually a
326 # symlink; some systems play weird games with the mod time of symlinks
327 # (eg FreeBSD returns the mod time of the symlink's containing
330 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
331 if test "$[*]" = "X"; then
333 set X `ls -t $srcdir/configure conftest.file`
336 if test "$[*]" != "X $srcdir/configure conftest.file" \
337 && test "$[*]" != "X conftest.file $srcdir/configure"; then
339 # If neither matched, then we have a broken ls. This can happen
340 # if, for instance, CONFIG_SHELL is bash and it inherits a
341 # broken ls alias from the environment. This has actually
342 # happened. Such a system could not be considered "sane".
343 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
344 alias in your environment])
347 test "$[2]" = conftest.file
353 AC_MSG_ERROR([newly created file is older than distributed files!
354 Check your system clock])
361 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
363 # This program is free software; you can redistribute it and/or modify
364 # it under the terms of the GNU General Public License as published by
365 # the Free Software Foundation; either version 2, or (at your option)
368 # This program is distributed in the hope that it will be useful,
369 # but WITHOUT ANY WARRANTY; without even the implied warranty of
370 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
371 # GNU General Public License for more details.
373 # You should have received a copy of the GNU General Public License
374 # along with this program; if not, write to the Free Software
375 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
380 # AM_MISSING_PROG(NAME, PROGRAM)
381 # ------------------------------
382 AC_DEFUN([AM_MISSING_PROG],
383 [AC_REQUIRE([AM_MISSING_HAS_RUN])
384 $1=${$1-"${am_missing_run}$2"}
390 # Define MISSING if not defined so far and test if it supports --run.
391 # If it does, set am_missing_run to use it, otherwise, to nothing.
392 AC_DEFUN([AM_MISSING_HAS_RUN],
393 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
394 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
395 # Use eval to expand $SHELL
396 if eval "$MISSING --run true"; then
397 am_missing_run="$MISSING --run "
400 AC_MSG_WARN([`missing' script is too old or missing])
406 # Copyright 2001 Free Software Foundation, Inc.
408 # This program is free software; you can redistribute it and/or modify
409 # it under the terms of the GNU General Public License as published by
410 # the Free Software Foundation; either version 2, or (at your option)
413 # This program is distributed in the hope that it will be useful,
414 # but WITHOUT ANY WARRANTY; without even the implied warranty of
415 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
416 # GNU General Public License for more details.
418 # You should have received a copy of the GNU General Public License
419 # along with this program; if not, write to the Free Software
420 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
423 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
424 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
425 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
427 # Of course, Automake must honor this variable whenever it calls a
428 # tool from the auxiliary directory. The problem is that $srcdir (and
429 # therefore $ac_aux_dir as well) can be either absolute or relative,
430 # depending on how configure is run. This is pretty annoying, since
431 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
432 # source directory, any form will work fine, but in subdirectories a
433 # relative path needs to be adjusted first.
435 # $ac_aux_dir/missing
436 # fails when called from a subdirectory if $ac_aux_dir is relative
437 # $top_srcdir/$ac_aux_dir/missing
438 # fails if $ac_aux_dir is absolute,
439 # fails when called from a subdirectory in a VPATH build with
440 # a relative $ac_aux_dir
442 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
443 # are both prefixed by $srcdir. In an in-source build this is usually
444 # harmless because $srcdir is `.', but things will broke when you
445 # start a VPATH build or use an absolute $srcdir.
447 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
448 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
449 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
450 # and then we would define $MISSING as
451 # MISSING="\${SHELL} $am_aux_dir/missing"
452 # This will work as long as MISSING is not called from configure, because
453 # unfortunately $(top_srcdir) has no meaning in configure.
454 # However there are other variables, like CC, which are often used in
455 # configure, and could therefore not use this "fixed" $ac_aux_dir.
457 # Another solution, used here, is to always expand $ac_aux_dir to an
458 # absolute PATH. The drawback is that using absolute paths prevent a
459 # configured tree to be moved without reconfiguration.
461 # Rely on autoconf to set up CDPATH properly.
464 AC_DEFUN([AM_AUX_DIR_EXPAND], [
465 # expand $ac_aux_dir to an absolute path
466 am_aux_dir=`cd $ac_aux_dir && pwd`
471 # Define $install_sh.
473 # Copyright 2001 Free Software Foundation, Inc.
475 # This program is free software; you can redistribute it and/or modify
476 # it under the terms of the GNU General Public License as published by
477 # the Free Software Foundation; either version 2, or (at your option)
480 # This program is distributed in the hope that it will be useful,
481 # but WITHOUT ANY WARRANTY; without even the implied warranty of
482 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
483 # GNU General Public License for more details.
485 # You should have received a copy of the GNU General Public License
486 # along with this program; if not, write to the Free Software
487 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
490 AC_DEFUN([AM_PROG_INSTALL_SH],
491 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
492 install_sh=${install_sh-"$am_aux_dir/install-sh"}
493 AC_SUBST(install_sh)])
495 # AM_PROG_INSTALL_STRIP
497 # Copyright 2001 Free Software Foundation, Inc.
499 # This program is free software; you can redistribute it and/or modify
500 # it under the terms of the GNU General Public License as published by
501 # the Free Software Foundation; either version 2, or (at your option)
504 # This program is distributed in the hope that it will be useful,
505 # but WITHOUT ANY WARRANTY; without even the implied warranty of
506 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
507 # GNU General Public License for more details.
509 # You should have received a copy of the GNU General Public License
510 # along with this program; if not, write to the Free Software
511 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
514 # One issue with vendor `install' (even GNU) is that you can't
515 # specify the program used to strip binaries. This is especially
516 # annoying in cross-compiling environments, where the build's strip
517 # is unlikely to handle the host's binaries.
518 # Fortunately install-sh will honor a STRIPPROG variable, so we
519 # always use install-sh in `make install-strip', and initialize
520 # STRIPPROG with the value of the STRIP variable (set by the user).
521 AC_DEFUN([AM_PROG_INSTALL_STRIP],
522 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
523 # Installed binaries are usually stripped using `strip' when the user
524 # run `make install-strip'. However `strip' might not be the right
525 # tool to use in cross-compilation environments, therefore Automake
526 # will honor the `STRIP' environment variable to overrule this program.
527 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
528 if test "$cross_compiling" != no; then
529 AC_CHECK_TOOL([STRIP], [strip], :)
531 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
532 AC_SUBST([INSTALL_STRIP_PROGRAM])])
535 # Copyright (C) 2003 Free Software Foundation, Inc.
537 # This program is free software; you can redistribute it and/or modify
538 # it under the terms of the GNU General Public License as published by
539 # the Free Software Foundation; either version 2, or (at your option)
542 # This program is distributed in the hope that it will be useful,
543 # but WITHOUT ANY WARRANTY; without even the implied warranty of
544 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
545 # GNU General Public License for more details.
547 # You should have received a copy of the GNU General Public License
548 # along with this program; if not, write to the Free Software
549 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
554 # Check whether the underlying file-system supports filenames
555 # with a leading dot. For instance MS-DOS doesn't.
556 AC_DEFUN([AM_SET_LEADING_DOT],
557 [rm -rf .tst 2>/dev/null
558 mkdir .tst 2>/dev/null
559 if test -d .tst; then
564 rmdir .tst 2>/dev/null
565 AC_SUBST([am__leading_dot])])
567 # serial 5 -*- Autoconf -*-
569 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
571 # This program is free software; you can redistribute it and/or modify
572 # it under the terms of the GNU General Public License as published by
573 # the Free Software Foundation; either version 2, or (at your option)
576 # This program is distributed in the hope that it will be useful,
577 # but WITHOUT ANY WARRANTY; without even the implied warranty of
578 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
579 # GNU General Public License for more details.
581 # You should have received a copy of the GNU General Public License
582 # along with this program; if not, write to the Free Software
583 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
587 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
588 # written in clear, in which case automake, when reading aclocal.m4,
589 # will think it sees a *use*, and therefore will trigger all it's
590 # C support machinery. Also note that it means that autoscan, seeing
591 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
595 # _AM_DEPENDENCIES(NAME)
596 # ----------------------
597 # See how the compiler implements dependency checking.
598 # NAME is "CC", "CXX", "GCJ", or "OBJC".
599 # We try a few techniques and use that to set a single cache variable.
601 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
602 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
603 # dependency, and given that the user is not expected to run this macro,
604 # just rely on AC_PROG_CC.
605 AC_DEFUN([_AM_DEPENDENCIES],
606 [AC_REQUIRE([AM_SET_DEPDIR])dnl
607 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
608 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
609 AC_REQUIRE([AM_DEP_TRACK])dnl
611 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
612 [$1], CXX, [depcc="$CXX" am_compiler_list=],
613 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
614 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
615 [depcc="$$1" am_compiler_list=])
617 AC_CACHE_CHECK([dependency style of $depcc],
618 [am_cv_$1_dependencies_compiler_type],
619 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
620 # We make a subdir and do the tests there. Otherwise we can end up
621 # making bogus files that we don't know about and never remove. For
622 # instance it was reported that on HP-UX the gcc test will end up
623 # making a dummy file named `D' -- because `-MD' means `put the output
626 # Copy depcomp to subdir because otherwise we won't find it if we're
627 # using a relative directory.
628 cp "$am_depcomp" conftest.dir
630 # We will build objects and dependencies in a subdirectory because
631 # it helps to detect inapplicable dependency modes. For instance
632 # both Tru64's cc and ICC support -MD to output dependencies as a
633 # side effect of compilation, but ICC will put the dependencies in
634 # the current directory while Tru64 will put them in the object
638 am_cv_$1_dependencies_compiler_type=none
639 if test "$am_compiler_list" = ""; then
640 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
642 for depmode in $am_compiler_list; do
643 # Setup a source with many dependencies, because some compilers
644 # like to wrap large dependency lists on column 80 (with \), and
645 # we should not choose a depcomp mode which is confused by this.
647 # We need to recreate these files for each test, as the compiler may
648 # overwrite some of them when testing with obscure command lines.
649 # This happens at least with the AIX C compiler.
651 for i in 1 2 3 4 5 6; do
652 echo '#include "conftst'$i'.h"' >> sub/conftest.c
655 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
659 # after this tag, mechanisms are not by side-effect, so they'll
660 # only be used when explicitly requested
661 if test "x$enable_dependency_tracking" = xyes; then
669 # We check with `-c' and `-o' for the sake of the "dashmstdout"
670 # mode. It turns out that the SunPro C++ compiler does not properly
671 # handle `-M -o', and we need to detect this.
672 if depmode=$depmode \
673 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
674 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
675 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
676 >/dev/null 2>conftest.err &&
677 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
678 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
679 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
680 # icc doesn't choke on unknown options, it will just issue warnings
681 # (even with -Werror). So we grep stderr for any message
682 # that says an option was ignored.
683 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
684 am_cv_$1_dependencies_compiler_type=$depmode
693 am_cv_$1_dependencies_compiler_type=none
696 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
697 AM_CONDITIONAL([am__fastdep$1], [
698 test "x$enable_dependency_tracking" != xno \
699 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
705 # Choose a directory name for dependency files.
706 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
707 AC_DEFUN([AM_SET_DEPDIR],
708 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
709 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
715 AC_DEFUN([AM_DEP_TRACK],
716 [AC_ARG_ENABLE(dependency-tracking,
717 [ --disable-dependency-tracking Speeds up one-time builds
718 --enable-dependency-tracking Do not reject slow dependency extractors])
719 if test "x$enable_dependency_tracking" != xno; then
720 am_depcomp="$ac_aux_dir/depcomp"
723 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
724 AC_SUBST([AMDEPBACKSLASH])
727 # Generate code to set up dependency tracking. -*- Autoconf -*-
729 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
731 # This program is free software; you can redistribute it and/or modify
732 # it under the terms of the GNU General Public License as published by
733 # the Free Software Foundation; either version 2, or (at your option)
736 # This program is distributed in the hope that it will be useful,
737 # but WITHOUT ANY WARRANTY; without even the implied warranty of
738 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
739 # GNU General Public License for more details.
741 # You should have received a copy of the GNU General Public License
742 # along with this program; if not, write to the Free Software
743 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
748 # _AM_OUTPUT_DEPENDENCY_COMMANDS
749 # ------------------------------
750 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
751 [for mf in $CONFIG_FILES; do
752 # Strip MF so we end up with the name of the file.
753 mf=`echo "$mf" | sed -e 's/:.*$//'`
754 # Check whether this is an Automake generated Makefile or not.
755 # We used to match only the files named `Makefile.in', but
756 # some people rename them; so instead we look at the file content.
757 # Grep'ing the first line is not enough: some people post-process
758 # each Makefile.in and add a new line on top of each file to say so.
759 # So let's grep whole file.
760 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
761 dirpart=`AS_DIRNAME("$mf")`
765 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
766 # Extract the definition of DEP_FILES from the Makefile without
768 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
769 test -z "$DEPDIR" && continue
770 # When using ansi2knr, U may be empty or an underscore; expand it
771 U=`sed -n -e '/^U = / s///p' < "$mf"`
772 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
773 # We invoke sed twice because it is the simplest approach to
774 # changing $(DEPDIR) to its actual value in the expansion.
775 for file in `sed -n -e '
776 /^DEP_FILES = .*\\\\$/ {
785 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
786 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
787 # Make sure the directory exists.
788 test -f "$dirpart/$file" && continue
789 fdir=`AS_DIRNAME(["$file"])`
790 AS_MKDIR_P([$dirpart/$fdir])
791 # echo "creating $dirpart/$file"
792 echo '# dummy' > "$dirpart/$file"
795 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
798 # AM_OUTPUT_DEPENDENCY_COMMANDS
799 # -----------------------------
800 # This macro should only be invoked once -- use via AC_REQUIRE.
802 # This code is only required when automatic dependency tracking
803 # is enabled. FIXME. This creates each `.P' file that we will
804 # need in order to bootstrap the dependency handling code.
805 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
806 [AC_CONFIG_COMMANDS([depfiles],
807 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
808 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
811 # Check to see how 'make' treats includes. -*- Autoconf -*-
813 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
815 # This program is free software; you can redistribute it and/or modify
816 # it under the terms of the GNU General Public License as published by
817 # the Free Software Foundation; either version 2, or (at your option)
820 # This program is distributed in the hope that it will be useful,
821 # but WITHOUT ANY WARRANTY; without even the implied warranty of
822 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
823 # GNU General Public License for more details.
825 # You should have received a copy of the GNU General Public License
826 # along with this program; if not, write to the Free Software
827 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
834 # Check to see how make treats includes.
835 AC_DEFUN([AM_MAKE_INCLUDE],
836 [am_make=${MAKE-make}
837 cat > confinc << 'END'
842 # If we don't find an include directive, just comment out the code.
843 AC_MSG_CHECKING([for style of include used by $am_make])
847 # First try GNU make style include.
848 echo "include confinc" > confmf
849 # We grep out `Entering directory' and `Leaving directory'
850 # messages which can occur if `w' ends up in MAKEFLAGS.
851 # In particular we don't look at `^make:' because GNU make might
852 # be invoked under some other name (usually "gmake"), in which
853 # case it prints its new name instead of `make'.
854 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
859 # Now try BSD make style include.
860 if test "$am__include" = "#"; then
861 echo '.include "confinc"' > confmf
862 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
868 AC_SUBST([am__include])
869 AC_SUBST([am__quote])
870 AC_MSG_RESULT([$_am_result])
874 # AM_CONDITIONAL -*- Autoconf -*-
876 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
878 # This program is free software; you can redistribute it and/or modify
879 # it under the terms of the GNU General Public License as published by
880 # the Free Software Foundation; either version 2, or (at your option)
883 # This program is distributed in the hope that it will be useful,
884 # but WITHOUT ANY WARRANTY; without even the implied warranty of
885 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
886 # GNU General Public License for more details.
888 # You should have received a copy of the GNU General Public License
889 # along with this program; if not, write to the Free Software
890 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
897 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
898 # -------------------------------------
899 # Define a conditional.
900 AC_DEFUN([AM_CONDITIONAL],
901 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
902 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
912 AC_CONFIG_COMMANDS_PRE(
913 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
914 AC_MSG_ERROR([conditional "$1" was never defined.
915 Usually this means the macro was only invoked conditionally.])
918 # gettext.m4 serial 20 (gettext-0.12)
919 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
920 dnl This file is free software, distributed under the terms of the GNU
921 dnl General Public License. As a special exception to the GNU General
922 dnl Public License, this file may be distributed as part of a program
923 dnl that contains a configuration script generated by Autoconf, under
924 dnl the same distribution terms as the rest of that program.
926 dnl This file can can be used in projects which are not available under
927 dnl the GNU General Public License or the GNU Library General Public
928 dnl License but which still want to provide support for the GNU gettext
930 dnl Please note that the actual code of the GNU gettext library is covered
931 dnl by the GNU Library General Public License, and the rest of the GNU
932 dnl gettext package package is covered by the GNU General Public License.
933 dnl They are *not* in the public domain.
936 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
937 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
939 dnl Macro to add for using GNU gettext.
941 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
942 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
943 dnl default (if it is not specified or empty) is 'no-libtool'.
944 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
945 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
946 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
947 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
948 dnl depending on --{enable,disable}-{shared,static} and on the presence of
949 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
950 dnl $(top_builddir)/intl/libintl.a will be created.
951 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
952 dnl implementations (in libc or libintl) without the ngettext() function
953 dnl will be ignored. If NEEDSYMBOL is specified and is
954 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
955 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
956 dnl INTLDIR is used to find the intl libraries. If empty,
957 dnl the value `$(top_builddir)/intl/' is used.
959 dnl The result of the configuration is one of three cases:
960 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
962 dnl Catalog format: GNU --> install in $(datadir)
963 dnl Catalog extension: .mo after installation, .gmo in source tree
964 dnl 2) GNU gettext has been found in the system's C library.
965 dnl Catalog format: GNU --> install in $(datadir)
966 dnl Catalog extension: .mo after installation, .gmo in source tree
967 dnl 3) No internationalization, always use English msgid.
968 dnl Catalog format: none
969 dnl Catalog extension: none
970 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
971 dnl The use of .gmo is historical (it was needed to avoid overwriting the
972 dnl GNU format catalogs when building on a platform with an X/Open gettext),
973 dnl but we keep it in order not to force irrelevant filename changes on the
976 AC_DEFUN([AM_GNU_GETTEXT],
978 dnl Argument checking.
979 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
980 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
982 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
983 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
985 define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
986 define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
988 AC_REQUIRE([AM_PO_SUBDIRS])dnl
989 ifelse(gt_included_intl, yes, [
990 AC_REQUIRE([AM_INTL_SUBDIR])dnl
993 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
994 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
995 AC_REQUIRE([AC_LIB_RPATH])
997 dnl Sometimes libintl requires libiconv, so first search for libiconv.
998 dnl Ideally we would do this search only after the
999 dnl if test "$USE_NLS" = "yes"; then
1000 dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
1001 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
1002 dnl the configure script would need to contain the same shell code
1003 dnl again, outside any 'if'. There are two solutions:
1004 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
1005 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
1006 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
1007 dnl documented, we avoid it.
1008 ifelse(gt_included_intl, yes, , [
1009 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
1015 ifelse(gt_included_intl, yes, [
1016 BUILD_INCLUDED_LIBINTL=no
1017 USE_INCLUDED_LIBINTL=no
1023 dnl If we use NLS figure out what method
1024 if test "$USE_NLS" = "yes"; then
1025 gt_use_preinstalled_gnugettext=no
1026 ifelse(gt_included_intl, yes, [
1027 AC_MSG_CHECKING([whether included gettext is requested])
1028 AC_ARG_WITH(included-gettext,
1029 [ --with-included-gettext use the GNU gettext library included here],
1030 nls_cv_force_use_gnu_gettext=$withval,
1031 nls_cv_force_use_gnu_gettext=no)
1032 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
1034 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
1035 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
1037 dnl User does not insist on using GNU NLS library. Figure out what
1038 dnl to use. If GNU gettext is available we use this. Else we have
1039 dnl to fall back to GNU NLS library.
1041 dnl Add a version number to the cache macros.
1042 define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
1043 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
1044 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
1046 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
1047 [AC_TRY_LINK([#include <libintl.h>
1048 ]ifelse([$2], [need-formatstring-macros],
1049 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1050 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1053 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1055 ], [])[extern int _nl_msg_cat_cntr;
1056 extern int *_nl_domain_bindings;],
1057 [bindtextdomain ("", "");
1058 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
1059 gt_cv_func_gnugettext_libc=yes,
1060 gt_cv_func_gnugettext_libc=no)])
1062 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
1063 dnl Sometimes libintl requires libiconv, so first search for libiconv.
1064 ifelse(gt_included_intl, yes, , [
1067 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
1068 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
1069 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
1070 dnl even if libiconv doesn't exist.
1071 AC_LIB_LINKFLAGS_BODY([intl])
1072 AC_CACHE_CHECK([for GNU gettext in libintl],
1073 gt_cv_func_gnugettext_libintl,
1074 [gt_save_CPPFLAGS="$CPPFLAGS"
1075 CPPFLAGS="$CPPFLAGS $INCINTL"
1076 gt_save_LIBS="$LIBS"
1077 LIBS="$LIBS $LIBINTL"
1078 dnl Now see whether libintl exists and does not depend on libiconv.
1079 AC_TRY_LINK([#include <libintl.h>
1080 ]ifelse([$2], [need-formatstring-macros],
1081 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1082 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1085 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1087 ], [])[extern int _nl_msg_cat_cntr;
1092 const char *_nl_expand_alias ();],
1093 [bindtextdomain ("", "");
1094 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
1095 gt_cv_func_gnugettext_libintl=yes,
1096 gt_cv_func_gnugettext_libintl=no)
1097 dnl Now see whether libintl exists and depends on libiconv.
1098 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
1099 LIBS="$LIBS $LIBICONV"
1100 AC_TRY_LINK([#include <libintl.h>
1101 ]ifelse([$2], [need-formatstring-macros],
1102 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1103 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1106 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1108 ], [])[extern int _nl_msg_cat_cntr;
1113 const char *_nl_expand_alias ();],
1114 [bindtextdomain ("", "");
1115 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
1116 [LIBINTL="$LIBINTL $LIBICONV"
1117 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
1118 gt_cv_func_gnugettext_libintl=yes
1121 CPPFLAGS="$gt_save_CPPFLAGS"
1122 LIBS="$gt_save_LIBS"])
1125 dnl If an already present or preinstalled GNU gettext() is found,
1126 dnl use it. But if this macro is used in GNU gettext, and GNU
1127 dnl gettext is already preinstalled in libintl, we update this
1128 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
1129 if test "$gt_cv_func_gnugettext_libc" = "yes" \
1130 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
1131 && test "$PACKAGE" != gettext-runtime \
1132 && test "$PACKAGE" != gettext-tools; }; then
1133 gt_use_preinstalled_gnugettext=yes
1135 dnl Reset the values set by searching for libintl.
1141 ifelse(gt_included_intl, yes, [
1142 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
1143 dnl GNU gettext is not found in the C library.
1144 dnl Fall back on included GNU gettext library.
1145 nls_cv_use_gnu_gettext=yes
1149 if test "$nls_cv_use_gnu_gettext" = "yes"; then
1150 dnl Mark actions used to generate GNU NLS library.
1151 BUILD_INCLUDED_LIBINTL=yes
1152 USE_INCLUDED_LIBINTL=yes
1153 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
1154 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
1155 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
1158 if test "$gt_use_preinstalled_gnugettext" = "yes" \
1159 || test "$nls_cv_use_gnu_gettext" = "yes"; then
1160 dnl Mark actions to use GNU gettext tools.
1165 if test "$gt_use_preinstalled_gnugettext" = "yes" \
1166 || test "$nls_cv_use_gnu_gettext" = "yes"; then
1167 AC_DEFINE(ENABLE_NLS, 1,
1168 [Define to 1 if translation of program messages to the user's native language
1175 AC_MSG_CHECKING([whether to use NLS])
1176 AC_MSG_RESULT([$USE_NLS])
1177 if test "$USE_NLS" = "yes"; then
1178 AC_MSG_CHECKING([where the gettext function comes from])
1179 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1180 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
1181 gt_source="external libintl"
1186 gt_source="included intl directory"
1188 AC_MSG_RESULT([$gt_source])
1191 if test "$USE_NLS" = "yes"; then
1193 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1194 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
1195 AC_MSG_CHECKING([how to link with libintl])
1196 AC_MSG_RESULT([$LIBINTL])
1197 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
1200 dnl For backward compatibility. Some packages may be using this.
1201 AC_DEFINE(HAVE_GETTEXT, 1,
1202 [Define if the GNU gettext() function is already present or preinstalled.])
1203 AC_DEFINE(HAVE_DCGETTEXT, 1,
1204 [Define if the GNU dcgettext() function is already present or preinstalled.])
1207 dnl We need to process the po/ directory.
1211 ifelse(gt_included_intl, yes, [
1212 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
1213 dnl to 'yes' because some of the testsuite requires it.
1214 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
1215 BUILD_INCLUDED_LIBINTL=yes
1218 dnl Make all variables we use known to autoconf.
1219 AC_SUBST(BUILD_INCLUDED_LIBINTL)
1220 AC_SUBST(USE_INCLUDED_LIBINTL)
1223 dnl For backward compatibility. Some configure.ins may be using this.
1225 nls_cv_header_libgt=
1227 dnl For backward compatibility. Some Makefiles may be using this.
1229 AC_SUBST(DATADIRNAME)
1231 dnl For backward compatibility. Some Makefiles may be using this.
1233 AC_SUBST(INSTOBJEXT)
1235 dnl For backward compatibility. Some Makefiles may be using this.
1239 dnl For backward compatibility. Some Makefiles may be using this.
1240 if test "$USE_INCLUDED_LIBINTL" = yes; then
1241 INTLOBJS="\$(GETTOBJS)"
1245 dnl Enable libtool support if the surrounding package wishes it.
1246 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
1247 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
1250 dnl For backward compatibility. Some Makefiles may be using this.
1254 dnl Make all documented variables known to autoconf.
1261 dnl Checks for all prerequisites of the intl subdirectory,
1262 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
1263 dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
1264 AC_DEFUN([AM_INTL_SUBDIR],
1266 AC_REQUIRE([AC_PROG_INSTALL])dnl
1267 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1268 AC_REQUIRE([AC_PROG_CC])dnl
1269 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1270 AC_REQUIRE([AC_PROG_RANLIB])dnl
1271 AC_REQUIRE([AC_ISC_POSIX])dnl
1272 AC_REQUIRE([AC_HEADER_STDC])dnl
1273 AC_REQUIRE([AC_C_CONST])dnl
1274 AC_REQUIRE([AC_C_INLINE])dnl
1275 AC_REQUIRE([AC_TYPE_OFF_T])dnl
1276 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1277 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1278 AC_REQUIRE([AC_FUNC_MMAP])dnl
1279 AC_REQUIRE([jm_GLIBC21])dnl
1280 AC_REQUIRE([gt_INTDIV0])dnl
1281 AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
1282 AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
1283 AC_REQUIRE([gt_INTTYPES_PRI])dnl
1285 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
1286 stdlib.h string.h unistd.h sys/param.h])
1287 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
1288 geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
1289 strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
1294 if test $ac_cv_header_locale_h = yes; then
1298 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
1299 dnl because plural.y uses bison specific features. It requires at least
1300 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
1302 dnl bison is only needed for the maintainer (who touches plural.y). But in
1303 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
1304 dnl the rule in general Makefile. Now, some people carelessly touch the
1305 dnl files or have a broken "make" program, hence the plural.c rule will
1306 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
1307 dnl present or too old.
1308 AC_CHECK_PROGS([INTLBISON], [bison])
1309 if test -z "$INTLBISON"; then
1312 dnl Found it, now check the version.
1313 AC_MSG_CHECKING([version of bison])
1314 changequote(<<,>>)dnl
1315 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
1316 case $ac_prog_version in
1317 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1318 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
1320 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1321 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1323 AC_MSG_RESULT([$ac_prog_version])
1325 if test $ac_verc_fail = yes; then
1331 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
1332 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
1334 # po.m4 serial 1 (gettext-0.12)
1335 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
1336 dnl This file is free software, distributed under the terms of the GNU
1337 dnl General Public License. As a special exception to the GNU General
1338 dnl Public License, this file may be distributed as part of a program
1339 dnl that contains a configuration script generated by Autoconf, under
1340 dnl the same distribution terms as the rest of that program.
1342 dnl This file can can be used in projects which are not available under
1343 dnl the GNU General Public License or the GNU Library General Public
1344 dnl License but which still want to provide support for the GNU gettext
1346 dnl Please note that the actual code of the GNU gettext library is covered
1347 dnl by the GNU Library General Public License, and the rest of the GNU
1348 dnl gettext package package is covered by the GNU General Public License.
1349 dnl They are *not* in the public domain.
1352 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1353 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1355 dnl Checks for all prerequisites of the po subdirectory.
1356 AC_DEFUN([AM_PO_SUBDIRS],
1358 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1359 AC_REQUIRE([AC_PROG_INSTALL])dnl
1360 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1361 AC_REQUIRE([AM_NLS])dnl
1363 dnl Perform the following tests also if --disable-nls has been given,
1364 dnl because they are needed for "make dist" to work.
1366 dnl Search for GNU msgfmt in the PATH.
1367 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1368 dnl The second test excludes FreeBSD msgfmt.
1369 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1370 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
1371 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1373 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1375 dnl Search for GNU xgettext 0.12 or newer in the PATH.
1376 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1377 dnl The second test excludes FreeBSD xgettext.
1378 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1379 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
1380 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1382 dnl Remove leftover from FreeBSD xgettext call.
1385 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
1386 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
1387 [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
1389 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1390 dnl Test whether we really found GNU msgfmt.
1391 if test "$GMSGFMT" != ":"; then
1392 dnl If it is no GNU msgfmt we define it as : so that the
1393 dnl Makefiles still can work.
1394 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
1395 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1398 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
1400 [found $GMSGFMT program is not GNU msgfmt; ignore it])
1405 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1406 dnl Test whether we really found GNU xgettext.
1407 if test "$XGETTEXT" != ":"; then
1408 dnl If it is no GNU xgettext we define it as : so that the
1409 dnl Makefiles still can work.
1410 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
1411 (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1415 [found xgettext program is not GNU xgettext; ignore it])
1418 dnl Remove leftover from FreeBSD xgettext call.
1422 AC_OUTPUT_COMMANDS([
1423 for ac_file in $CONFIG_FILES; do
1424 # Support "outfile[:infile[:infile...]]"
1426 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1428 # PO directories have a Makefile.in generated from Makefile.in.in.
1429 case "$ac_file" in */Makefile.in)
1430 # Adjust a relative srcdir.
1431 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1432 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1433 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1434 # In autoconf-2.13 it is called $ac_given_srcdir.
1435 # In autoconf-2.50 it is called $srcdir.
1436 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1437 case "$ac_given_srcdir" in
1438 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1439 /*) top_srcdir="$ac_given_srcdir" ;;
1440 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
1442 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
1443 rm -f "$ac_dir/POTFILES"
1444 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
1445 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
1446 POMAKEFILEDEPS="POTFILES.in"
1447 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
1448 # on $ac_dir but don't depend on user-specified configuration
1450 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1451 # The LINGUAS file contains the set of available languages.
1452 if test -n "$OBSOLETE_ALL_LINGUAS"; then
1453 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1455 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1456 # Hide the ALL_LINGUAS assigment from automake.
1457 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1458 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
1460 # The set of available languages was given in configure.in.
1461 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
1463 case "$ac_given_srcdir" in
1465 *) srcdirpre='$(srcdir)/' ;;
1471 for lang in $ALL_LINGUAS; do
1472 POFILES="$POFILES $srcdirpre$lang.po"
1473 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1474 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1475 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1477 # CATALOGS depends on both $ac_dir and the user's LINGUAS
1478 # environment variable.
1480 if test -n "$ALL_LINGUAS"; then
1481 for presentlang in $ALL_LINGUAS; do
1483 if test "%UNSET%" != "$LINGUAS"; then
1484 desiredlanguages="$LINGUAS"
1486 desiredlanguages="$ALL_LINGUAS"
1488 for desiredlang in $desiredlanguages; do
1489 # Use the presentlang catalog if desiredlang is
1490 # a. equal to presentlang, or
1491 # b. a variant of presentlang (because in this case,
1492 # presentlang can be used as a fallback for messages
1493 # which are not translated in the desiredlang catalog).
1494 case "$desiredlang" in
1495 "$presentlang"*) useit=yes;;
1498 if test $useit = yes; then
1499 INST_LINGUAS="$INST_LINGUAS $presentlang"
1504 if test -n "$INST_LINGUAS"; then
1505 for lang in $INST_LINGUAS; do
1506 CATALOGS="$CATALOGS $lang.gmo"
1509 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
1510 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" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
1511 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
1512 if test -f "$f"; then
1514 *.orig | *.bak | *~) ;;
1515 *) cat "$f" >> "$ac_dir/Makefile" ;;
1523 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
1524 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
1526 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
1527 # Capture the value of LINGUAS because we need it to compute CATALOGS.
1528 LINGUAS="${LINGUAS-%UNSET%}"
1532 # nls.m4 serial 1 (gettext-0.12)
1533 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
1534 dnl This file is free software, distributed under the terms of the GNU
1535 dnl General Public License. As a special exception to the GNU General
1536 dnl Public License, this file may be distributed as part of a program
1537 dnl that contains a configuration script generated by Autoconf, under
1538 dnl the same distribution terms as the rest of that program.
1540 dnl This file can can be used in projects which are not available under
1541 dnl the GNU General Public License or the GNU Library General Public
1542 dnl License but which still want to provide support for the GNU gettext
1544 dnl Please note that the actual code of the GNU gettext library is covered
1545 dnl by the GNU Library General Public License, and the rest of the GNU
1546 dnl gettext package package is covered by the GNU General Public License.
1547 dnl They are *not* in the public domain.
1550 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1551 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1555 AC_MSG_CHECKING([whether NLS is requested])
1556 dnl Default is enabled NLS
1558 [ --disable-nls do not use Native Language Support],
1559 USE_NLS=$enableval, USE_NLS=yes)
1560 AC_MSG_RESULT($USE_NLS)
1564 AC_DEFUN([AM_MKINSTALLDIRS],
1566 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1567 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
1568 dnl Try to locate it.
1570 if test -n "$ac_aux_dir"; then
1571 case "$ac_aux_dir" in
1572 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
1573 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
1576 if test -z "$MKINSTALLDIRS"; then
1577 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1579 AC_SUBST(MKINSTALLDIRS)
1582 # progtest.m4 serial 3 (gettext-0.12)
1583 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
1584 dnl This file is free software, distributed under the terms of the GNU
1585 dnl General Public License. As a special exception to the GNU General
1586 dnl Public License, this file may be distributed as part of a program
1587 dnl that contains a configuration script generated by Autoconf, under
1588 dnl the same distribution terms as the rest of that program.
1590 dnl This file can can be used in projects which are not available under
1591 dnl the GNU General Public License or the GNU Library General Public
1592 dnl License but which still want to provide support for the GNU gettext
1594 dnl Please note that the actual code of the GNU gettext library is covered
1595 dnl by the GNU Library General Public License, and the rest of the GNU
1596 dnl gettext package package is covered by the GNU General Public License.
1597 dnl They are *not* in the public domain.
1600 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
1602 # Search path for a program which passes the given test.
1604 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1605 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1606 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
1608 # Prepare PATH_SEPARATOR.
1609 # The user is always right.
1610 if test "${PATH_SEPARATOR+set}" != set; then
1611 echo "#! /bin/sh" >conf$$.sh
1612 echo "exit 0" >>conf$$.sh
1614 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1622 # Find out how to test for executable files. Don't use a zero-byte file,
1623 # as systems may use methods other than mode bits to determine executability.
1624 cat >conf$$.file <<_ASEOF
1628 chmod +x conf$$.file
1629 if test -x conf$$.file >/dev/null 2>&1; then
1630 ac_executable_p="test -x"
1632 ac_executable_p="test -f"
1636 # Extract the first word of "$2", so it can be a program name with args.
1637 set dummy $2; ac_word=[$]2
1638 AC_MSG_CHECKING([for $ac_word])
1639 AC_CACHE_VAL(ac_cv_path_$1,
1641 [[\\/]]* | ?:[[\\/]]*)
1642 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1645 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
1646 for ac_dir in ifelse([$5], , $PATH, [$5]); do
1648 test -z "$ac_dir" && ac_dir=.
1649 for ac_exec_ext in '' $ac_executable_extensions; do
1650 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
1652 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
1659 dnl If no 4th arg is given, leave the cache variable unset,
1660 dnl so AC_PATH_PROGS will keep looking.
1661 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1666 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1667 AC_MSG_RESULT([$]$1)
1674 # lib-prefix.m4 serial 2 (gettext-0.12)
1675 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
1676 dnl This file is free software, distributed under the terms of the GNU
1677 dnl General Public License. As a special exception to the GNU General
1678 dnl Public License, this file may be distributed as part of a program
1679 dnl that contains a configuration script generated by Autoconf, under
1680 dnl the same distribution terms as the rest of that program.
1682 dnl From Bruno Haible.
1684 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1685 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1686 dnl require excessive bracketing.
1687 ifdef([AC_HELP_STRING],
1688 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1689 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1691 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1692 dnl to access previously installed libraries. The basic assumption is that
1693 dnl a user will want packages to use other packages he previously installed
1694 dnl with the same --prefix option.
1695 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1696 dnl libraries, but is otherwise very convenient.
1697 AC_DEFUN([AC_LIB_PREFIX],
1699 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1700 AC_REQUIRE([AC_PROG_CC])
1701 AC_REQUIRE([AC_CANONICAL_HOST])
1702 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1703 dnl By default, look in $includedir and $libdir.
1705 AC_LIB_WITH_FINAL_PREFIX([
1706 eval additional_includedir=\"$includedir\"
1707 eval additional_libdir=\"$libdir\"
1709 AC_LIB_ARG_WITH([lib-prefix],
1710 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1711 --without-lib-prefix don't search for libraries in includedir and libdir],
1713 if test "X$withval" = "Xno"; then
1716 if test "X$withval" = "X"; then
1717 AC_LIB_WITH_FINAL_PREFIX([
1718 eval additional_includedir=\"$includedir\"
1719 eval additional_libdir=\"$libdir\"
1722 additional_includedir="$withval/include"
1723 additional_libdir="$withval/lib"
1727 if test $use_additional = yes; then
1728 dnl Potentially add $additional_includedir to $CPPFLAGS.
1729 dnl But don't add it
1730 dnl 1. if it's the standard /usr/include,
1731 dnl 2. if it's already present in $CPPFLAGS,
1732 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1733 dnl 4. if it doesn't exist as a directory.
1734 if test "X$additional_includedir" != "X/usr/include"; then
1736 for x in $CPPFLAGS; do
1737 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1738 if test "X$x" = "X-I$additional_includedir"; then
1743 if test -z "$haveit"; then
1744 if test "X$additional_includedir" = "X/usr/local/include"; then
1745 if test -n "$GCC"; then
1747 linux*) haveit=yes;;
1751 if test -z "$haveit"; then
1752 if test -d "$additional_includedir"; then
1753 dnl Really add $additional_includedir to $CPPFLAGS.
1754 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1759 dnl Potentially add $additional_libdir to $LDFLAGS.
1760 dnl But don't add it
1761 dnl 1. if it's the standard /usr/lib,
1762 dnl 2. if it's already present in $LDFLAGS,
1763 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1764 dnl 4. if it doesn't exist as a directory.
1765 if test "X$additional_libdir" != "X/usr/lib"; then
1767 for x in $LDFLAGS; do
1768 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1769 if test "X$x" = "X-L$additional_libdir"; then
1774 if test -z "$haveit"; then
1775 if test "X$additional_libdir" = "X/usr/local/lib"; then
1776 if test -n "$GCC"; then
1778 linux*) haveit=yes;;
1782 if test -z "$haveit"; then
1783 if test -d "$additional_libdir"; then
1784 dnl Really add $additional_libdir to $LDFLAGS.
1785 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1793 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1794 dnl acl_final_exec_prefix, containing the values to which $prefix and
1795 dnl $exec_prefix will expand at the end of the configure script.
1796 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1798 dnl Unfortunately, prefix and exec_prefix get only finally determined
1799 dnl at the end of configure.
1800 if test "X$prefix" = "XNONE"; then
1801 acl_final_prefix="$ac_default_prefix"
1803 acl_final_prefix="$prefix"
1805 if test "X$exec_prefix" = "XNONE"; then
1806 acl_final_exec_prefix='${prefix}'
1808 acl_final_exec_prefix="$exec_prefix"
1810 acl_save_prefix="$prefix"
1811 prefix="$acl_final_prefix"
1812 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1813 prefix="$acl_save_prefix"
1816 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1817 dnl variables prefix and exec_prefix bound to the values they will have
1818 dnl at the end of the configure script.
1819 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1821 acl_save_prefix="$prefix"
1822 prefix="$acl_final_prefix"
1823 acl_save_exec_prefix="$exec_prefix"
1824 exec_prefix="$acl_final_exec_prefix"
1826 exec_prefix="$acl_save_exec_prefix"
1827 prefix="$acl_save_prefix"
1830 # lib-link.m4 serial 4 (gettext-0.12)
1831 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
1832 dnl This file is free software, distributed under the terms of the GNU
1833 dnl General Public License. As a special exception to the GNU General
1834 dnl Public License, this file may be distributed as part of a program
1835 dnl that contains a configuration script generated by Autoconf, under
1836 dnl the same distribution terms as the rest of that program.
1838 dnl From Bruno Haible.
1840 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1841 dnl the libraries corresponding to explicit and implicit dependencies.
1842 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1843 dnl augments the CPPFLAGS variable.
1844 AC_DEFUN([AC_LIB_LINKFLAGS],
1846 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1847 AC_REQUIRE([AC_LIB_RPATH])
1848 define([Name],[translit([$1],[./-], [___])])
1849 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1850 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1851 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1852 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1853 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1854 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1855 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1857 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1858 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1859 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1860 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1862 AC_SUBST([LTLIB]NAME)
1863 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1864 dnl results of this search when this library appears as a dependency.
1870 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
1871 dnl searches for libname and the libraries corresponding to explicit and
1872 dnl implicit dependencies, together with the specified include files and
1873 dnl the ability to compile and link the specified testcode. If found, it
1874 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
1875 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1876 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1877 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1878 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1880 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1881 AC_REQUIRE([AC_LIB_RPATH])
1882 define([Name],[translit([$1],[./-], [___])])
1883 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1884 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1886 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1888 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1890 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1891 dnl because if the user has installed lib[]Name and not disabled its use
1892 dnl via --without-lib[]Name-prefix, he wants to use it.
1893 ac_save_CPPFLAGS="$CPPFLAGS"
1894 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1896 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1897 ac_save_LIBS="$LIBS"
1898 LIBS="$LIBS $LIB[]NAME"
1899 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
1900 LIBS="$ac_save_LIBS"
1902 if test "$ac_cv_lib[]Name" = yes; then
1904 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
1905 AC_MSG_CHECKING([how to link with lib[]$1])
1906 AC_MSG_RESULT([$LIB[]NAME])
1909 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1910 dnl $INC[]NAME either.
1911 CPPFLAGS="$ac_save_CPPFLAGS"
1915 AC_SUBST([HAVE_LIB]NAME)
1917 AC_SUBST([LTLIB]NAME)
1922 dnl Determine the platform dependent parameters needed to use rpath:
1923 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
1924 dnl hardcode_direct, hardcode_minus_L.
1925 AC_DEFUN([AC_LIB_RPATH],
1927 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1928 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1929 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1930 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1931 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
1932 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1933 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1939 libext="$acl_cv_libext"
1940 shlibext="$acl_cv_shlibext"
1941 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1942 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1943 hardcode_direct="$acl_cv_hardcode_direct"
1944 hardcode_minus_L="$acl_cv_hardcode_minus_L"
1945 dnl Determine whether the user wants rpath handling at all.
1946 AC_ARG_ENABLE(rpath,
1947 [ --disable-rpath do not hardcode runtime library paths],
1948 :, enable_rpath=yes)
1951 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1952 dnl the libraries corresponding to explicit and implicit dependencies.
1953 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1954 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1956 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1957 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1958 dnl By default, look in $includedir and $libdir.
1960 AC_LIB_WITH_FINAL_PREFIX([
1961 eval additional_includedir=\"$includedir\"
1962 eval additional_libdir=\"$libdir\"
1964 AC_LIB_ARG_WITH([lib$1-prefix],
1965 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
1966 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
1968 if test "X$withval" = "Xno"; then
1971 if test "X$withval" = "X"; then
1972 AC_LIB_WITH_FINAL_PREFIX([
1973 eval additional_includedir=\"$includedir\"
1974 eval additional_libdir=\"$libdir\"
1977 additional_includedir="$withval/include"
1978 additional_libdir="$withval/lib"
1982 dnl Search the library and its dependencies in $additional_libdir and
1983 dnl $LDFLAGS. Using breadth-first-seach.
1989 names_already_handled=
1990 names_next_round='$1 $2'
1991 while test -n "$names_next_round"; do
1992 names_this_round="$names_next_round"
1994 for name in $names_this_round; do
1996 for n in $names_already_handled; do
1997 if test "$n" = "$name"; then
2002 if test -z "$already_handled"; then
2003 names_already_handled="$names_already_handled $name"
2004 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
2005 dnl or AC_LIB_HAVE_LINKFLAGS call.
2006 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
2007 eval value=\"\$HAVE_LIB$uppername\"
2008 if test -n "$value"; then
2009 if test "$value" = yes; then
2010 eval value=\"\$LIB$uppername\"
2011 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
2012 eval value=\"\$LTLIB$uppername\"
2013 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
2015 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
2016 dnl that this library doesn't exist. So just drop it.
2020 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
2021 dnl and the already constructed $LIBNAME/$LTLIBNAME.
2026 if test $use_additional = yes; then
2027 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
2028 found_dir="$additional_libdir"
2029 found_so="$additional_libdir/lib$name.$shlibext"
2030 if test -f "$additional_libdir/lib$name.la"; then
2031 found_la="$additional_libdir/lib$name.la"
2034 if test -f "$additional_libdir/lib$name.$libext"; then
2035 found_dir="$additional_libdir"
2036 found_a="$additional_libdir/lib$name.$libext"
2037 if test -f "$additional_libdir/lib$name.la"; then
2038 found_la="$additional_libdir/lib$name.la"
2043 if test "X$found_dir" = "X"; then
2044 for x in $LDFLAGS $LTLIB[]NAME; do
2045 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2048 dir=`echo "X$x" | sed -e 's/^X-L//'`
2049 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
2051 found_so="$dir/lib$name.$shlibext"
2052 if test -f "$dir/lib$name.la"; then
2053 found_la="$dir/lib$name.la"
2056 if test -f "$dir/lib$name.$libext"; then
2058 found_a="$dir/lib$name.$libext"
2059 if test -f "$dir/lib$name.la"; then
2060 found_la="$dir/lib$name.la"
2066 if test "X$found_dir" != "X"; then
2071 if test "X$found_dir" != "X"; then
2072 dnl Found the library.
2073 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
2074 if test "X$found_so" != "X"; then
2075 dnl Linking with a shared library. We attempt to hardcode its
2076 dnl directory into the executable's runpath, unless it's the
2077 dnl standard /usr/lib.
2078 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
2079 dnl No hardcoding is needed.
2080 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2082 dnl Use an explicit option to hardcode DIR into the resulting
2084 dnl Potentially add DIR to ltrpathdirs.
2085 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2087 for x in $ltrpathdirs; do
2088 if test "X$x" = "X$found_dir"; then
2093 if test -z "$haveit"; then
2094 ltrpathdirs="$ltrpathdirs $found_dir"
2096 dnl The hardcoding into $LIBNAME is system dependent.
2097 if test "$hardcode_direct" = yes; then
2098 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
2099 dnl resulting binary.
2100 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2102 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
2103 dnl Use an explicit option to hardcode DIR into the resulting
2105 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2106 dnl Potentially add DIR to rpathdirs.
2107 dnl The rpathdirs will be appended to $LIBNAME at the end.
2109 for x in $rpathdirs; do
2110 if test "X$x" = "X$found_dir"; then
2115 if test -z "$haveit"; then
2116 rpathdirs="$rpathdirs $found_dir"
2119 dnl Rely on "-L$found_dir".
2120 dnl But don't add it if it's already contained in the LDFLAGS
2121 dnl or the already constructed $LIBNAME
2123 for x in $LDFLAGS $LIB[]NAME; do
2124 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2125 if test "X$x" = "X-L$found_dir"; then
2130 if test -z "$haveit"; then
2131 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
2133 if test "$hardcode_minus_L" != no; then
2134 dnl FIXME: Not sure whether we should use
2135 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2137 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2139 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
2140 dnl here, because this doesn't fit in flags passed to the
2141 dnl compiler. So give up. No hardcoding. This affects only
2142 dnl very old systems.
2143 dnl FIXME: Not sure whether we should use
2144 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2146 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2152 if test "X$found_a" != "X"; then
2153 dnl Linking with a static library.
2154 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
2156 dnl We shouldn't come here, but anyway it's good to have a
2158 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
2161 dnl Assume the include files are nearby.
2162 additional_includedir=
2163 case "$found_dir" in
2165 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
2166 additional_includedir="$basedir/include"
2169 if test "X$additional_includedir" != "X"; then
2170 dnl Potentially add $additional_includedir to $INCNAME.
2171 dnl But don't add it
2172 dnl 1. if it's the standard /usr/include,
2173 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
2174 dnl 3. if it's already present in $CPPFLAGS or the already
2175 dnl constructed $INCNAME,
2176 dnl 4. if it doesn't exist as a directory.
2177 if test "X$additional_includedir" != "X/usr/include"; then
2179 if test "X$additional_includedir" = "X/usr/local/include"; then
2180 if test -n "$GCC"; then
2182 linux*) haveit=yes;;
2186 if test -z "$haveit"; then
2187 for x in $CPPFLAGS $INC[]NAME; do
2188 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2189 if test "X$x" = "X-I$additional_includedir"; then
2194 if test -z "$haveit"; then
2195 if test -d "$additional_includedir"; then
2196 dnl Really add $additional_includedir to $INCNAME.
2197 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
2203 dnl Look for dependencies.
2204 if test -n "$found_la"; then
2205 dnl Read the .la file. It defines the variables
2206 dnl dlname, library_names, old_library, dependency_libs, current,
2207 dnl age, revision, installed, dlopen, dlpreopen, libdir.
2208 save_libdir="$libdir"
2210 */* | *\\*) . "$found_la" ;;
2211 *) . "./$found_la" ;;
2213 libdir="$save_libdir"
2214 dnl We use only dependency_libs.
2215 for dep in $dependency_libs; do
2218 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
2219 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
2220 dnl But don't add it
2221 dnl 1. if it's the standard /usr/lib,
2222 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
2223 dnl 3. if it's already present in $LDFLAGS or the already
2224 dnl constructed $LIBNAME,
2225 dnl 4. if it doesn't exist as a directory.
2226 if test "X$additional_libdir" != "X/usr/lib"; then
2228 if test "X$additional_libdir" = "X/usr/local/lib"; then
2229 if test -n "$GCC"; then
2231 linux*) haveit=yes;;
2235 if test -z "$haveit"; then
2237 for x in $LDFLAGS $LIB[]NAME; do
2238 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2239 if test "X$x" = "X-L$additional_libdir"; then
2244 if test -z "$haveit"; then
2245 if test -d "$additional_libdir"; then
2246 dnl Really add $additional_libdir to $LIBNAME.
2247 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
2251 for x in $LDFLAGS $LTLIB[]NAME; do
2252 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2253 if test "X$x" = "X-L$additional_libdir"; then
2258 if test -z "$haveit"; then
2259 if test -d "$additional_libdir"; then
2260 dnl Really add $additional_libdir to $LTLIBNAME.
2261 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
2268 dir=`echo "X$dep" | sed -e 's/^X-R//'`
2269 if test "$enable_rpath" != no; then
2270 dnl Potentially add DIR to rpathdirs.
2271 dnl The rpathdirs will be appended to $LIBNAME at the end.
2273 for x in $rpathdirs; do
2274 if test "X$x" = "X$dir"; then
2279 if test -z "$haveit"; then
2280 rpathdirs="$rpathdirs $dir"
2282 dnl Potentially add DIR to ltrpathdirs.
2283 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2285 for x in $ltrpathdirs; do
2286 if test "X$x" = "X$dir"; then
2291 if test -z "$haveit"; then
2292 ltrpathdirs="$ltrpathdirs $dir"
2297 dnl Handle this in the next round.
2298 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
2301 dnl Handle this in the next round. Throw away the .la's
2302 dnl directory; it is already contained in a preceding -L
2304 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
2307 dnl Most likely an immediate library name.
2308 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
2309 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
2315 dnl Didn't find the library; assume it is in the system directories
2316 dnl known to the linker and runtime loader. (All the system
2317 dnl directories known to the linker should also be known to the
2318 dnl runtime loader, otherwise the system is severely misconfigured.)
2319 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2320 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
2326 if test "X$rpathdirs" != "X"; then
2327 if test -n "$hardcode_libdir_separator"; then
2328 dnl Weird platform: only the last -rpath option counts, the user must
2329 dnl pass all path elements in one option. We can arrange that for a
2330 dnl single library, but not when more than one $LIBNAMEs are used.
2332 for found_dir in $rpathdirs; do
2333 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
2335 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
2336 acl_save_libdir="$libdir"
2338 eval flag=\"$hardcode_libdir_flag_spec\"
2339 libdir="$acl_save_libdir"
2340 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2342 dnl The -rpath options are cumulative.
2343 for found_dir in $rpathdirs; do
2344 acl_save_libdir="$libdir"
2346 eval flag=\"$hardcode_libdir_flag_spec\"
2347 libdir="$acl_save_libdir"
2348 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2352 if test "X$ltrpathdirs" != "X"; then
2353 dnl When using libtool, the option that works for both libraries and
2354 dnl executables is -R. The -R options are cumulative.
2355 for found_dir in $ltrpathdirs; do
2356 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
2361 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
2362 dnl unless already present in VAR.
2363 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
2364 dnl contains two or three consecutive elements that belong together.
2365 AC_DEFUN([AC_LIB_APPENDTOVAR],
2367 for element in [$2]; do
2370 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2371 if test "X$x" = "X$element"; then
2376 if test -z "$haveit"; then
2377 [$1]="${[$1]}${[$1]:+ }$element"
2382 # lib-ld.m4 serial 2 (gettext-0.12)
2383 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
2384 dnl This file is free software, distributed under the terms of the GNU
2385 dnl General Public License. As a special exception to the GNU General
2386 dnl Public License, this file may be distributed as part of a program
2387 dnl that contains a configuration script generated by Autoconf, under
2388 dnl the same distribution terms as the rest of that program.
2390 dnl Subroutines of libtool.m4,
2391 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
2392 dnl with libtool.m4.
2394 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
2395 AC_DEFUN([AC_LIB_PROG_LD_GNU],
2396 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
2397 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2398 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2399 acl_cv_prog_gnu_ld=yes
2401 acl_cv_prog_gnu_ld=no
2403 with_gnu_ld=$acl_cv_prog_gnu_ld
2406 dnl From libtool-1.4. Sets the variable LD.
2407 AC_DEFUN([AC_LIB_PROG_LD],
2408 [AC_ARG_WITH(gnu-ld,
2409 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
2410 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
2411 AC_REQUIRE([AC_PROG_CC])dnl
2412 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2413 # Prepare PATH_SEPARATOR.
2414 # The user is always right.
2415 if test "${PATH_SEPARATOR+set}" != set; then
2416 echo "#! /bin/sh" >conf$$.sh
2417 echo "exit 0" >>conf$$.sh
2419 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
2427 if test "$GCC" = yes; then
2428 # Check if gcc -print-prog-name=ld gives a path.
2429 AC_MSG_CHECKING([for ld used by GCC])
2432 # gcc leaves a trailing carriage return which upsets mingw
2433 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2435 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2438 # Accept absolute paths.
2439 [[\\/]* | [A-Za-z]:[\\/]*)]
2440 [re_direlt='/[^/][^/]*/\.\./']
2441 # Canonicalize the path of ld
2442 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2443 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2444 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2446 test -z "$LD" && LD="$ac_prog"
2449 # If it fails, then pretend we aren't using GCC.
2453 # If it is relative, then search for the first ld in PATH.
2457 elif test "$with_gnu_ld" = yes; then
2458 AC_MSG_CHECKING([for GNU ld])
2460 AC_MSG_CHECKING([for non-GNU ld])
2462 AC_CACHE_VAL(acl_cv_path_LD,
2463 [if test -z "$LD"; then
2464 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2465 for ac_dir in $PATH; do
2466 test -z "$ac_dir" && ac_dir=.
2467 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2468 acl_cv_path_LD="$ac_dir/$ac_prog"
2469 # Check to see if the program is GNU ld. I'd rather use --version,
2470 # but apparently some GNU ld's only accept -v.
2471 # Break only if it was the GNU/non-GNU ld that we prefer.
2472 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2473 test "$with_gnu_ld" != no && break
2475 test "$with_gnu_ld" != yes && break
2481 acl_cv_path_LD="$LD" # Let the user override the test with a path.
2483 LD="$acl_cv_path_LD"
2484 if test -n "$LD"; then
2489 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2493 # iconv.m4 serial AM4 (gettext-0.11.3)
2494 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2495 dnl This file is free software, distributed under the terms of the GNU
2496 dnl General Public License. As a special exception to the GNU General
2497 dnl Public License, this file may be distributed as part of a program
2498 dnl that contains a configuration script generated by Autoconf, under
2499 dnl the same distribution terms as the rest of that program.
2501 dnl From Bruno Haible.
2503 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
2505 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
2506 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2507 AC_REQUIRE([AC_LIB_RPATH])
2509 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2511 AC_LIB_LINKFLAGS_BODY([iconv])
2514 AC_DEFUN([AM_ICONV_LINK],
2516 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
2517 dnl those with the standalone portable GNU libiconv installed).
2519 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2521 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
2523 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
2524 dnl because if the user has installed libiconv and not disabled its use
2525 dnl via --without-libiconv-prefix, he wants to use it. The first
2526 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
2527 am_save_CPPFLAGS="$CPPFLAGS"
2528 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
2530 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
2531 am_cv_func_iconv="no, consider installing GNU libiconv"
2533 AC_TRY_LINK([#include <stdlib.h>
2534 #include <iconv.h>],
2535 [iconv_t cd = iconv_open("","");
2536 iconv(cd,NULL,NULL,NULL,NULL);
2538 am_cv_func_iconv=yes)
2539 if test "$am_cv_func_iconv" != yes; then
2540 am_save_LIBS="$LIBS"
2541 LIBS="$LIBS $LIBICONV"
2542 AC_TRY_LINK([#include <stdlib.h>
2543 #include <iconv.h>],
2544 [iconv_t cd = iconv_open("","");
2545 iconv(cd,NULL,NULL,NULL,NULL);
2548 am_cv_func_iconv=yes)
2549 LIBS="$am_save_LIBS"
2552 if test "$am_cv_func_iconv" = yes; then
2553 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
2555 if test "$am_cv_lib_iconv" = yes; then
2556 AC_MSG_CHECKING([how to link with libiconv])
2557 AC_MSG_RESULT([$LIBICONV])
2559 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
2561 CPPFLAGS="$am_save_CPPFLAGS"
2566 AC_SUBST(LTLIBICONV)
2569 AC_DEFUN([AM_ICONV],
2572 if test "$am_cv_func_iconv" = yes; then
2573 AC_MSG_CHECKING([for iconv declaration])
2574 AC_CACHE_VAL(am_cv_proto_iconv, [
2582 #if defined(__STDC__) || defined(__cplusplus)
2583 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
2587 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
2588 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);"])
2589 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
2590 AC_MSG_RESULT([$]{ac_t:-
2591 }[$]am_cv_proto_iconv)
2592 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
2593 [Define as const if the declaration of iconv() needs const.])
2597 # isc-posix.m4 serial 2 (gettext-0.11.2)
2598 dnl Copyright (C) 1995-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 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
2607 # This test replaces the one in autoconf.
2608 # Currently this macro should have the same name as the autoconf macro
2609 # because gettext's gettext.m4 (distributed in the automake package)
2610 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
2611 # give these diagnostics:
2612 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
2613 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
2615 undefine([AC_ISC_POSIX])
2617 AC_DEFUN([AC_ISC_POSIX],
2619 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
2620 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
2624 # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
2625 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2626 dnl This file is free software, distributed under the terms of the GNU
2627 dnl General Public License. As a special exception to the GNU General
2628 dnl Public License, this file may be distributed as part of a program
2629 dnl that contains a configuration script generated by Autoconf, under
2630 dnl the same distribution terms as the rest of that program.
2632 # Test for the GNU C Library, version 2.1 or newer.
2633 # From Bruno Haible.
2635 AC_DEFUN([jm_GLIBC21],
2637 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
2638 ac_cv_gnu_library_2_1,
2639 [AC_EGREP_CPP([Lucky GNU user],
2641 #include <features.h>
2642 #ifdef __GNU_LIBRARY__
2643 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
2648 ac_cv_gnu_library_2_1=yes,
2649 ac_cv_gnu_library_2_1=no)
2653 GLIBC21="$ac_cv_gnu_library_2_1"
2657 # intdiv0.m4 serial 1 (gettext-0.11.3)
2658 dnl Copyright (C) 2002 Free Software Foundation, Inc.
2659 dnl This file is free software, distributed under the terms of the GNU
2660 dnl General Public License. As a special exception to the GNU General
2661 dnl Public License, this file may be distributed as part of a program
2662 dnl that contains a configuration script generated by Autoconf, under
2663 dnl the same distribution terms as the rest of that program.
2665 dnl From Bruno Haible.
2667 AC_DEFUN([gt_INTDIV0],
2669 AC_REQUIRE([AC_PROG_CC])dnl
2670 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2672 AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
2673 gt_cv_int_divbyzero_sigfpe,
2681 sigfpe_handler (int sig)
2683 sigfpe_handler (sig) int sig;
2686 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
2687 exit (sig != SIGFPE);
2697 signal (SIGFPE, sigfpe_handler);
2698 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
2699 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
2700 signal (SIGTRAP, sigfpe_handler);
2702 /* Linux/SPARC yields signal SIGILL. */
2703 #if defined (__sparc__) && defined (__linux__)
2704 signal (SIGILL, sigfpe_handler);
2711 ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
2713 # Guess based on the CPU.
2715 alpha* | i[34567]86 | m68k | s390*)
2716 gt_cv_int_divbyzero_sigfpe="guessing yes";;
2718 gt_cv_int_divbyzero_sigfpe="guessing no";;
2722 case "$gt_cv_int_divbyzero_sigfpe" in
2726 AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
2727 [Define if integer division by zero raises signal SIGFPE.])
2730 # uintmax_t.m4 serial 7 (gettext-0.12)
2731 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
2732 dnl This file is free software, distributed under the terms of the GNU
2733 dnl General Public License. As a special exception to the GNU General
2734 dnl Public License, this file may be distributed as part of a program
2735 dnl that contains a configuration script generated by Autoconf, under
2736 dnl the same distribution terms as the rest of that program.
2738 dnl From Paul Eggert.
2742 # Define uintmax_t to 'unsigned long' or 'unsigned long long'
2743 # if it is not already defined in <stdint.h> or <inttypes.h>.
2745 AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
2747 AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
2748 AC_REQUIRE([jm_AC_HEADER_STDINT_H])
2749 if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
2750 AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
2751 test $ac_cv_type_unsigned_long_long = yes \
2752 && ac_type='unsigned long long' \
2753 || ac_type='unsigned long'
2754 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
2755 [Define to unsigned long or unsigned long long
2756 if <stdint.h> and <inttypes.h> don't define.])
2758 AC_DEFINE(HAVE_UINTMAX_T, 1,
2759 [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
2763 # inttypes_h.m4 serial 5 (gettext-0.12)
2764 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
2765 dnl This file is free software, distributed under the terms of the GNU
2766 dnl General Public License. As a special exception to the GNU General
2767 dnl Public License, this file may be distributed as part of a program
2768 dnl that contains a configuration script generated by Autoconf, under
2769 dnl the same distribution terms as the rest of that program.
2771 dnl From Paul Eggert.
2773 # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
2774 # doesn't clash with <sys/types.h>, and declares uintmax_t.
2776 AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
2778 AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
2780 [#include <sys/types.h>
2781 #include <inttypes.h>],
2782 [uintmax_t i = (uintmax_t) -1;],
2783 jm_ac_cv_header_inttypes_h=yes,
2784 jm_ac_cv_header_inttypes_h=no)])
2785 if test $jm_ac_cv_header_inttypes_h = yes; then
2786 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
2787 [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
2788 and declares uintmax_t. ])
2792 # stdint_h.m4 serial 3 (gettext-0.12)
2793 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
2794 dnl This file is free software, distributed under the terms of the GNU
2795 dnl General Public License. As a special exception to the GNU General
2796 dnl Public License, this file may be distributed as part of a program
2797 dnl that contains a configuration script generated by Autoconf, under
2798 dnl the same distribution terms as the rest of that program.
2800 dnl From Paul Eggert.
2802 # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
2803 # doesn't clash with <sys/types.h>, and declares uintmax_t.
2805 AC_DEFUN([jm_AC_HEADER_STDINT_H],
2807 AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
2809 [#include <sys/types.h>
2810 #include <stdint.h>],
2811 [uintmax_t i = (uintmax_t) -1;],
2812 jm_ac_cv_header_stdint_h=yes,
2813 jm_ac_cv_header_stdint_h=no)])
2814 if test $jm_ac_cv_header_stdint_h = yes; then
2815 AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
2816 [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
2817 and declares uintmax_t. ])
2821 # ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
2822 dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
2823 dnl This file is free software, distributed under the terms of the GNU
2824 dnl General Public License. As a special exception to the GNU General
2825 dnl Public License, this file may be distributed as part of a program
2826 dnl that contains a configuration script generated by Autoconf, under
2827 dnl the same distribution terms as the rest of that program.
2829 dnl From Paul Eggert.
2831 AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
2833 AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
2834 [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
2835 [unsigned long long ullmax = (unsigned long long) -1;
2836 return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
2837 ac_cv_type_unsigned_long_long=yes,
2838 ac_cv_type_unsigned_long_long=no)])
2839 if test $ac_cv_type_unsigned_long_long = yes; then
2840 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
2841 [Define if you have the unsigned long long type.])
2845 # inttypes.m4 serial 1 (gettext-0.11.4)
2846 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2847 dnl This file is free software, distributed under the terms of the GNU
2848 dnl General Public License. As a special exception to the GNU General
2849 dnl Public License, this file may be distributed as part of a program
2850 dnl that contains a configuration script generated by Autoconf, under
2851 dnl the same distribution terms as the rest of that program.
2853 dnl From Paul Eggert.
2855 # Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
2858 AC_DEFUN([gt_HEADER_INTTYPES_H],
2860 AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
2863 [#include <sys/types.h>
2864 #include <inttypes.h>],
2865 [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
2867 if test $gt_cv_header_inttypes_h = yes; then
2868 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
2869 [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
2873 # inttypes-pri.m4 serial 1 (gettext-0.11.4)
2874 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2875 dnl This file is free software, distributed under the terms of the GNU
2876 dnl General Public License. As a special exception to the GNU General
2877 dnl Public License, this file may be distributed as part of a program
2878 dnl that contains a configuration script generated by Autoconf, under
2879 dnl the same distribution terms as the rest of that program.
2881 dnl From Bruno Haible.
2883 # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
2884 # macros to non-string values. This is the case on AIX 4.3.3.
2886 AC_DEFUN([gt_INTTYPES_PRI],
2888 AC_REQUIRE([gt_HEADER_INTTYPES_H])
2889 if test $gt_cv_header_inttypes_h = yes; then
2890 AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
2891 gt_cv_inttypes_pri_broken,
2893 AC_TRY_COMPILE([#include <inttypes.h>
2897 ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
2900 if test "$gt_cv_inttypes_pri_broken" = yes; then
2901 AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
2902 [Define if <inttypes.h> exists and defines unusable PRI* macros.])
2906 # codeset.m4 serial AM1 (gettext-0.10.40)
2907 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2908 dnl This file is free software, distributed under the terms of the GNU
2909 dnl General Public License. As a special exception to the GNU General
2910 dnl Public License, this file may be distributed as part of a program
2911 dnl that contains a configuration script generated by Autoconf, under
2912 dnl the same distribution terms as the rest of that program.
2914 dnl From Bruno Haible.
2916 AC_DEFUN([AM_LANGINFO_CODESET],
2918 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
2919 [AC_TRY_LINK([#include <langinfo.h>],
2920 [char* cs = nl_langinfo(CODESET);],
2921 am_cv_langinfo_codeset=yes,
2922 am_cv_langinfo_codeset=no)
2924 if test $am_cv_langinfo_codeset = yes; then
2925 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
2926 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
2930 # lcmessage.m4 serial 3 (gettext-0.11.3)
2931 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2932 dnl This file is free software, distributed under the terms of the GNU
2933 dnl General Public License. As a special exception to the GNU General
2934 dnl Public License, this file may be distributed as part of a program
2935 dnl that contains a configuration script generated by Autoconf, under
2936 dnl the same distribution terms as the rest of that program.
2938 dnl This file can can be used in projects which are not available under
2939 dnl the GNU General Public License or the GNU Library General Public
2940 dnl License but which still want to provide support for the GNU gettext
2942 dnl Please note that the actual code of the GNU gettext library is covered
2943 dnl by the GNU Library General Public License, and the rest of the GNU
2944 dnl gettext package package is covered by the GNU General Public License.
2945 dnl They are *not* in the public domain.
2948 dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
2950 # Check whether LC_MESSAGES is available in <locale.h>.
2952 AC_DEFUN([AM_LC_MESSAGES],
2954 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
2955 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
2956 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
2957 if test $am_cv_val_LC_MESSAGES = yes; then
2958 AC_DEFINE(HAVE_LC_MESSAGES, 1,
2959 [Define if your <locale.h> file defines LC_MESSAGES.])