1 # generated automatically by aclocal 1.7.8 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 # Do all the work for Automake. -*- Autoconf -*-
16 # This macro actually does too much some checks are only needed if
17 # your package does certain things. But this isn't really a big deal.
19 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
20 # Free Software Foundation, Inc.
22 # This program is free software; you can redistribute it and/or modify
23 # it under the terms of the GNU General Public License as published by
24 # the Free Software Foundation; either version 2, or (at your option)
27 # This program is distributed in the hope that it will be useful,
28 # but WITHOUT ANY WARRANTY; without even the implied warranty of
29 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 # GNU General Public License for more details.
32 # You should have received a copy of the GNU General Public License
33 # along with this program; if not, write to the Free Software
34 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
41 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
42 # the ones we care about.
43 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
45 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
46 # AM_INIT_AUTOMAKE([OPTIONS])
47 # -----------------------------------------------
48 # The call with PACKAGE and VERSION arguments is the old style
49 # call (pre autoconf-2.50), which is being phased out. PACKAGE
50 # and VERSION should now be passed to AC_INIT and removed from
51 # the call to AM_INIT_AUTOMAKE.
52 # We support both call styles for the transition. After
53 # the next Automake release, Autoconf can make the AC_INIT
54 # arguments mandatory, and then we can depend on a new Autoconf
55 # release and drop the old call support.
56 AC_DEFUN([AM_INIT_AUTOMAKE],
57 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
58 AC_REQUIRE([AC_PROG_INSTALL])dnl
59 # test to see if srcdir already configured
60 if test "`cd $srcdir && pwd`" != "`pwd`" &&
61 test -f $srcdir/config.status; then
62 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
65 # test whether we have cygpath
66 if test -z "$CYGPATH_W"; then
67 if (cygpath --version) >/dev/null 2>/dev/null; then
68 CYGPATH_W='cygpath -w'
75 # Define the identity of the package.
76 dnl Distinguish between old-style and new-style calls.
78 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
79 AC_SUBST([PACKAGE], [$1])dnl
80 AC_SUBST([VERSION], [$2])],
81 [_AM_SET_OPTIONS([$1])dnl
82 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
83 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
85 _AM_IF_OPTION([no-define],,
86 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
87 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
89 # Some tools Automake needs.
90 AC_REQUIRE([AM_SANITY_CHECK])dnl
91 AC_REQUIRE([AC_ARG_PROGRAM])dnl
92 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
93 AM_MISSING_PROG(AUTOCONF, autoconf)
94 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
95 AM_MISSING_PROG(AUTOHEADER, autoheader)
96 AM_MISSING_PROG(MAKEINFO, makeinfo)
97 AM_MISSING_PROG(AMTAR, tar)
100 # We need awk for the "check" target. The system "awk" is bad on
102 AC_REQUIRE([AC_PROG_AWK])dnl
103 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
104 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
106 _AM_IF_OPTION([no-dependencies],,
107 [AC_PROVIDE_IFELSE([AC_PROG_CC],
108 [_AM_DEPENDENCIES(CC)],
109 [define([AC_PROG_CC],
110 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
111 AC_PROVIDE_IFELSE([AC_PROG_CXX],
112 [_AM_DEPENDENCIES(CXX)],
113 [define([AC_PROG_CXX],
114 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
119 # When config.status generates a header, we must update the stamp-h file.
120 # This file resides in the same directory as the config header
121 # that is generated. The stamp files are numbered to have different names.
123 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
124 # loop where config.status creates the headers, so we can generate
125 # our stamp files there.
126 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
127 [# Compute $1's index in $config_headers.
129 for _am_header in $config_headers :; do
134 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
137 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
139 # Copyright 2002 Free Software Foundation, Inc.
141 # This program is free software; you can redistribute it and/or modify
142 # it under the terms of the GNU General Public License as published by
143 # the Free Software Foundation; either version 2, or (at your option)
146 # This program is distributed in the hope that it will be useful,
147 # but WITHOUT ANY WARRANTY; without even the implied warranty of
148 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
149 # GNU General Public License for more details.
151 # You should have received a copy of the GNU General Public License
152 # along with this program; if not, write to the Free Software
153 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
155 # AM_AUTOMAKE_VERSION(VERSION)
156 # ----------------------------
157 # Automake X.Y traces this macro to ensure aclocal.m4 has been
158 # generated from the m4 files accompanying Automake X.Y.
159 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
161 # AM_SET_CURRENT_AUTOMAKE_VERSION
162 # -------------------------------
163 # Call AM_AUTOMAKE_VERSION so it can be traced.
164 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
165 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166 [AM_AUTOMAKE_VERSION([1.7.8])])
168 # Helper functions for option handling. -*- Autoconf -*-
170 # Copyright 2001, 2002 Free Software Foundation, Inc.
172 # This program is free software; you can redistribute it and/or modify
173 # it under the terms of the GNU General Public License as published by
174 # the Free Software Foundation; either version 2, or (at your option)
177 # This program is distributed in the hope that it will be useful,
178 # but WITHOUT ANY WARRANTY; without even the implied warranty of
179 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
180 # GNU General Public License for more details.
182 # You should have received a copy of the GNU General Public License
183 # along with this program; if not, write to the Free Software
184 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
189 # _AM_MANGLE_OPTION(NAME)
190 # -----------------------
191 AC_DEFUN([_AM_MANGLE_OPTION],
192 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
194 # _AM_SET_OPTION(NAME)
195 # ------------------------------
196 # Set option NAME. Presently that only means defining a flag for this option.
197 AC_DEFUN([_AM_SET_OPTION],
198 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
200 # _AM_SET_OPTIONS(OPTIONS)
201 # ----------------------------------
202 # OPTIONS is a space-separated list of Automake options.
203 AC_DEFUN([_AM_SET_OPTIONS],
204 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
206 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
207 # -------------------------------------------
208 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
209 AC_DEFUN([_AM_IF_OPTION],
210 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
213 # Check to make sure that the build environment is sane.
216 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
218 # This program is free software; you can redistribute it and/or modify
219 # it under the terms of the GNU General Public License as published by
220 # the Free Software Foundation; either version 2, or (at your option)
223 # This program is distributed in the hope that it will be useful,
224 # but WITHOUT ANY WARRANTY; without even the implied warranty of
225 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
226 # GNU General Public License for more details.
228 # You should have received a copy of the GNU General Public License
229 # along with this program; if not, write to the Free Software
230 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
237 AC_DEFUN([AM_SANITY_CHECK],
238 [AC_MSG_CHECKING([whether build environment is sane])
241 echo timestamp > conftest.file
242 # Do `set' in a subshell so we don't clobber the current shell's
243 # arguments. Must try -L first in case configure is actually a
244 # symlink; some systems play weird games with the mod time of symlinks
245 # (eg FreeBSD returns the mod time of the symlink's containing
248 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
249 if test "$[*]" = "X"; then
251 set X `ls -t $srcdir/configure conftest.file`
254 if test "$[*]" != "X $srcdir/configure conftest.file" \
255 && test "$[*]" != "X conftest.file $srcdir/configure"; then
257 # If neither matched, then we have a broken ls. This can happen
258 # if, for instance, CONFIG_SHELL is bash and it inherits a
259 # broken ls alias from the environment. This has actually
260 # happened. Such a system could not be considered "sane".
261 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
262 alias in your environment])
265 test "$[2]" = conftest.file
271 AC_MSG_ERROR([newly created file is older than distributed files!
272 Check your system clock])
279 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
281 # This program is free software; you can redistribute it and/or modify
282 # it under the terms of the GNU General Public License as published by
283 # the Free Software Foundation; either version 2, or (at your option)
286 # This program is distributed in the hope that it will be useful,
287 # but WITHOUT ANY WARRANTY; without even the implied warranty of
288 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
289 # GNU General Public License for more details.
291 # You should have received a copy of the GNU General Public License
292 # along with this program; if not, write to the Free Software
293 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
298 # AM_MISSING_PROG(NAME, PROGRAM)
299 # ------------------------------
300 AC_DEFUN([AM_MISSING_PROG],
301 [AC_REQUIRE([AM_MISSING_HAS_RUN])
302 $1=${$1-"${am_missing_run}$2"}
308 # Define MISSING if not defined so far and test if it supports --run.
309 # If it does, set am_missing_run to use it, otherwise, to nothing.
310 AC_DEFUN([AM_MISSING_HAS_RUN],
311 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
312 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
313 # Use eval to expand $SHELL
314 if eval "$MISSING --run true"; then
315 am_missing_run="$MISSING --run "
318 AC_MSG_WARN([`missing' script is too old or missing])
324 # Copyright 2001 Free Software Foundation, Inc.
326 # This program is free software; you can redistribute it and/or modify
327 # it under the terms of the GNU General Public License as published by
328 # the Free Software Foundation; either version 2, or (at your option)
331 # This program is distributed in the hope that it will be useful,
332 # but WITHOUT ANY WARRANTY; without even the implied warranty of
333 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
334 # GNU General Public License for more details.
336 # You should have received a copy of the GNU General Public License
337 # along with this program; if not, write to the Free Software
338 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
341 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
342 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
343 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
345 # Of course, Automake must honor this variable whenever it calls a
346 # tool from the auxiliary directory. The problem is that $srcdir (and
347 # therefore $ac_aux_dir as well) can be either absolute or relative,
348 # depending on how configure is run. This is pretty annoying, since
349 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
350 # source directory, any form will work fine, but in subdirectories a
351 # relative path needs to be adjusted first.
353 # $ac_aux_dir/missing
354 # fails when called from a subdirectory if $ac_aux_dir is relative
355 # $top_srcdir/$ac_aux_dir/missing
356 # fails if $ac_aux_dir is absolute,
357 # fails when called from a subdirectory in a VPATH build with
358 # a relative $ac_aux_dir
360 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
361 # are both prefixed by $srcdir. In an in-source build this is usually
362 # harmless because $srcdir is `.', but things will broke when you
363 # start a VPATH build or use an absolute $srcdir.
365 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
366 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
367 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
368 # and then we would define $MISSING as
369 # MISSING="\${SHELL} $am_aux_dir/missing"
370 # This will work as long as MISSING is not called from configure, because
371 # unfortunately $(top_srcdir) has no meaning in configure.
372 # However there are other variables, like CC, which are often used in
373 # configure, and could therefore not use this "fixed" $ac_aux_dir.
375 # Another solution, used here, is to always expand $ac_aux_dir to an
376 # absolute PATH. The drawback is that using absolute paths prevent a
377 # configured tree to be moved without reconfiguration.
379 # Rely on autoconf to set up CDPATH properly.
382 AC_DEFUN([AM_AUX_DIR_EXPAND], [
383 # expand $ac_aux_dir to an absolute path
384 am_aux_dir=`cd $ac_aux_dir && pwd`
389 # Define $install_sh.
391 # Copyright 2001 Free Software Foundation, Inc.
393 # This program is free software; you can redistribute it and/or modify
394 # it under the terms of the GNU General Public License as published by
395 # the Free Software Foundation; either version 2, or (at your option)
398 # This program is distributed in the hope that it will be useful,
399 # but WITHOUT ANY WARRANTY; without even the implied warranty of
400 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
401 # GNU General Public License for more details.
403 # You should have received a copy of the GNU General Public License
404 # along with this program; if not, write to the Free Software
405 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
408 AC_DEFUN([AM_PROG_INSTALL_SH],
409 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
410 install_sh=${install_sh-"$am_aux_dir/install-sh"}
411 AC_SUBST(install_sh)])
413 # AM_PROG_INSTALL_STRIP
415 # Copyright 2001 Free Software Foundation, Inc.
417 # This program is free software; you can redistribute it and/or modify
418 # it under the terms of the GNU General Public License as published by
419 # the Free Software Foundation; either version 2, or (at your option)
422 # This program is distributed in the hope that it will be useful,
423 # but WITHOUT ANY WARRANTY; without even the implied warranty of
424 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
425 # GNU General Public License for more details.
427 # You should have received a copy of the GNU General Public License
428 # along with this program; if not, write to the Free Software
429 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
432 # One issue with vendor `install' (even GNU) is that you can't
433 # specify the program used to strip binaries. This is especially
434 # annoying in cross-compiling environments, where the build's strip
435 # is unlikely to handle the host's binaries.
436 # Fortunately install-sh will honor a STRIPPROG variable, so we
437 # always use install-sh in `make install-strip', and initialize
438 # STRIPPROG with the value of the STRIP variable (set by the user).
439 AC_DEFUN([AM_PROG_INSTALL_STRIP],
440 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
441 # Installed binaries are usually stripped using `strip' when the user
442 # run `make install-strip'. However `strip' might not be the right
443 # tool to use in cross-compilation environments, therefore Automake
444 # will honor the `STRIP' environment variable to overrule this program.
445 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
446 if test "$cross_compiling" != no; then
447 AC_CHECK_TOOL([STRIP], [strip], :)
449 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
450 AC_SUBST([INSTALL_STRIP_PROGRAM])])
453 # Copyright (C) 2003 Free Software Foundation, Inc.
455 # This program is free software; you can redistribute it and/or modify
456 # it under the terms of the GNU General Public License as published by
457 # the Free Software Foundation; either version 2, or (at your option)
460 # This program is distributed in the hope that it will be useful,
461 # but WITHOUT ANY WARRANTY; without even the implied warranty of
462 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
463 # GNU General Public License for more details.
465 # You should have received a copy of the GNU General Public License
466 # along with this program; if not, write to the Free Software
467 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
472 # Check whether the underlying file-system supports filenames
473 # with a leading dot. For instance MS-DOS doesn't.
474 AC_DEFUN([AM_SET_LEADING_DOT],
475 [rm -rf .tst 2>/dev/null
476 mkdir .tst 2>/dev/null
477 if test -d .tst; then
482 rmdir .tst 2>/dev/null
483 AC_SUBST([am__leading_dot])])
485 # serial 5 -*- Autoconf -*-
487 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
489 # This program is free software; you can redistribute it and/or modify
490 # it under the terms of the GNU General Public License as published by
491 # the Free Software Foundation; either version 2, or (at your option)
494 # This program is distributed in the hope that it will be useful,
495 # but WITHOUT ANY WARRANTY; without even the implied warranty of
496 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
497 # GNU General Public License for more details.
499 # You should have received a copy of the GNU General Public License
500 # along with this program; if not, write to the Free Software
501 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
505 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
506 # written in clear, in which case automake, when reading aclocal.m4,
507 # will think it sees a *use*, and therefore will trigger all it's
508 # C support machinery. Also note that it means that autoscan, seeing
509 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
513 # _AM_DEPENDENCIES(NAME)
514 # ----------------------
515 # See how the compiler implements dependency checking.
516 # NAME is "CC", "CXX", "GCJ", or "OBJC".
517 # We try a few techniques and use that to set a single cache variable.
519 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
520 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
521 # dependency, and given that the user is not expected to run this macro,
522 # just rely on AC_PROG_CC.
523 AC_DEFUN([_AM_DEPENDENCIES],
524 [AC_REQUIRE([AM_SET_DEPDIR])dnl
525 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
526 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
527 AC_REQUIRE([AM_DEP_TRACK])dnl
529 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
530 [$1], CXX, [depcc="$CXX" am_compiler_list=],
531 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
532 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
533 [depcc="$$1" am_compiler_list=])
535 AC_CACHE_CHECK([dependency style of $depcc],
536 [am_cv_$1_dependencies_compiler_type],
537 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
538 # We make a subdir and do the tests there. Otherwise we can end up
539 # making bogus files that we don't know about and never remove. For
540 # instance it was reported that on HP-UX the gcc test will end up
541 # making a dummy file named `D' -- because `-MD' means `put the output
544 # Copy depcomp to subdir because otherwise we won't find it if we're
545 # using a relative directory.
546 cp "$am_depcomp" conftest.dir
548 # We will build objects and dependencies in a subdirectory because
549 # it helps to detect inapplicable dependency modes. For instance
550 # both Tru64's cc and ICC support -MD to output dependencies as a
551 # side effect of compilation, but ICC will put the dependencies in
552 # the current directory while Tru64 will put them in the object
556 am_cv_$1_dependencies_compiler_type=none
557 if test "$am_compiler_list" = ""; then
558 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
560 for depmode in $am_compiler_list; do
561 # Setup a source with many dependencies, because some compilers
562 # like to wrap large dependency lists on column 80 (with \), and
563 # we should not choose a depcomp mode which is confused by this.
565 # We need to recreate these files for each test, as the compiler may
566 # overwrite some of them when testing with obscure command lines.
567 # This happens at least with the AIX C compiler.
569 for i in 1 2 3 4 5 6; do
570 echo '#include "conftst'$i'.h"' >> sub/conftest.c
573 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
577 # after this tag, mechanisms are not by side-effect, so they'll
578 # only be used when explicitly requested
579 if test "x$enable_dependency_tracking" = xyes; then
587 # We check with `-c' and `-o' for the sake of the "dashmstdout"
588 # mode. It turns out that the SunPro C++ compiler does not properly
589 # handle `-M -o', and we need to detect this.
590 if depmode=$depmode \
591 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
592 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
593 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
594 >/dev/null 2>conftest.err &&
595 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
596 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
597 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
598 # icc doesn't choke on unknown options, it will just issue warnings
599 # (even with -Werror). So we grep stderr for any message
600 # that says an option was ignored.
601 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
602 am_cv_$1_dependencies_compiler_type=$depmode
611 am_cv_$1_dependencies_compiler_type=none
614 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
615 AM_CONDITIONAL([am__fastdep$1], [
616 test "x$enable_dependency_tracking" != xno \
617 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
623 # Choose a directory name for dependency files.
624 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
625 AC_DEFUN([AM_SET_DEPDIR],
626 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
627 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
633 AC_DEFUN([AM_DEP_TRACK],
634 [AC_ARG_ENABLE(dependency-tracking,
635 [ --disable-dependency-tracking Speeds up one-time builds
636 --enable-dependency-tracking Do not reject slow dependency extractors])
637 if test "x$enable_dependency_tracking" != xno; then
638 am_depcomp="$ac_aux_dir/depcomp"
641 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
642 AC_SUBST([AMDEPBACKSLASH])
645 # Generate code to set up dependency tracking. -*- Autoconf -*-
647 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
649 # This program is free software; you can redistribute it and/or modify
650 # it under the terms of the GNU General Public License as published by
651 # the Free Software Foundation; either version 2, or (at your option)
654 # This program is distributed in the hope that it will be useful,
655 # but WITHOUT ANY WARRANTY; without even the implied warranty of
656 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
657 # GNU General Public License for more details.
659 # You should have received a copy of the GNU General Public License
660 # along with this program; if not, write to the Free Software
661 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
666 # _AM_OUTPUT_DEPENDENCY_COMMANDS
667 # ------------------------------
668 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
669 [for mf in $CONFIG_FILES; do
670 # Strip MF so we end up with the name of the file.
671 mf=`echo "$mf" | sed -e 's/:.*$//'`
672 # Check whether this is an Automake generated Makefile or not.
673 # We used to match only the files named `Makefile.in', but
674 # some people rename them; so instead we look at the file content.
675 # Grep'ing the first line is not enough: some people post-process
676 # each Makefile.in and add a new line on top of each file to say so.
677 # So let's grep whole file.
678 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
679 dirpart=`AS_DIRNAME("$mf")`
683 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
684 # Extract the definition of DEP_FILES from the Makefile without
686 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
687 test -z "$DEPDIR" && continue
688 # When using ansi2knr, U may be empty or an underscore; expand it
689 U=`sed -n -e '/^U = / s///p' < "$mf"`
690 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
691 # We invoke sed twice because it is the simplest approach to
692 # changing $(DEPDIR) to its actual value in the expansion.
693 for file in `sed -n -e '
694 /^DEP_FILES = .*\\\\$/ {
703 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
704 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
705 # Make sure the directory exists.
706 test -f "$dirpart/$file" && continue
707 fdir=`AS_DIRNAME(["$file"])`
708 AS_MKDIR_P([$dirpart/$fdir])
709 # echo "creating $dirpart/$file"
710 echo '# dummy' > "$dirpart/$file"
713 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
716 # AM_OUTPUT_DEPENDENCY_COMMANDS
717 # -----------------------------
718 # This macro should only be invoked once -- use via AC_REQUIRE.
720 # This code is only required when automatic dependency tracking
721 # is enabled. FIXME. This creates each `.P' file that we will
722 # need in order to bootstrap the dependency handling code.
723 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
724 [AC_CONFIG_COMMANDS([depfiles],
725 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
726 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
729 # Check to see how 'make' treats includes. -*- Autoconf -*-
731 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
733 # This program is free software; you can redistribute it and/or modify
734 # it under the terms of the GNU General Public License as published by
735 # the Free Software Foundation; either version 2, or (at your option)
738 # This program is distributed in the hope that it will be useful,
739 # but WITHOUT ANY WARRANTY; without even the implied warranty of
740 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
741 # GNU General Public License for more details.
743 # You should have received a copy of the GNU General Public License
744 # along with this program; if not, write to the Free Software
745 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
752 # Check to see how make treats includes.
753 AC_DEFUN([AM_MAKE_INCLUDE],
754 [am_make=${MAKE-make}
755 cat > confinc << 'END'
760 # If we don't find an include directive, just comment out the code.
761 AC_MSG_CHECKING([for style of include used by $am_make])
765 # First try GNU make style include.
766 echo "include confinc" > confmf
767 # We grep out `Entering directory' and `Leaving directory'
768 # messages which can occur if `w' ends up in MAKEFLAGS.
769 # In particular we don't look at `^make:' because GNU make might
770 # be invoked under some other name (usually "gmake"), in which
771 # case it prints its new name instead of `make'.
772 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
777 # Now try BSD make style include.
778 if test "$am__include" = "#"; then
779 echo '.include "confinc"' > confmf
780 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
786 AC_SUBST([am__include])
787 AC_SUBST([am__quote])
788 AC_MSG_RESULT([$_am_result])
792 # AM_CONDITIONAL -*- Autoconf -*-
794 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
796 # This program is free software; you can redistribute it and/or modify
797 # it under the terms of the GNU General Public License as published by
798 # the Free Software Foundation; either version 2, or (at your option)
801 # This program is distributed in the hope that it will be useful,
802 # but WITHOUT ANY WARRANTY; without even the implied warranty of
803 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
804 # GNU General Public License for more details.
806 # You should have received a copy of the GNU General Public License
807 # along with this program; if not, write to the Free Software
808 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
815 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
816 # -------------------------------------
817 # Define a conditional.
818 AC_DEFUN([AM_CONDITIONAL],
819 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
820 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
830 AC_CONFIG_COMMANDS_PRE(
831 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
832 AC_MSG_ERROR([conditional "$1" was never defined.
833 Usually this means the macro was only invoked conditionally.])
836 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
838 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
840 # This program is free software; you can redistribute it and/or modify
841 # it under the terms of the GNU General Public License as published by
842 # the Free Software Foundation; either version 2, or (at your option)
845 # This program is distributed in the hope that it will be useful,
846 # but WITHOUT ANY WARRANTY; without even the implied warranty of
847 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
848 # GNU General Public License for more details.
850 # You should have received a copy of the GNU General Public License
851 # along with this program; if not, write to the Free Software
852 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
859 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
860 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
862 # gettext.m4 serial 13 (gettext-0.11.1)
863 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
864 dnl This file is free software, distributed under the terms of the GNU
865 dnl General Public License. As a special exception to the GNU General
866 dnl Public License, this file may be distributed as part of a program
867 dnl that contains a configuration script generated by Autoconf, under
868 dnl the same distribution terms as the rest of that program.
870 dnl This file can can be used in projects which are not available under
871 dnl the GNU General Public License or the GNU Library General Public
872 dnl License but which still want to provide support for the GNU gettext
874 dnl Please note that the actual code of the GNU gettext library is covered
875 dnl by the GNU Library General Public License, and the rest of the GNU
876 dnl gettext package package is covered by the GNU General Public License.
877 dnl They are *not* in the public domain.
880 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
881 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
883 dnl Macro to add for using GNU gettext.
885 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
886 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
887 dnl default (if it is not specified or empty) is 'no-libtool'.
888 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
889 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
890 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
891 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
892 dnl depending on --{enable,disable}-{shared,static} and on the presence of
893 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
894 dnl $(top_builddir)/intl/libintl.a will be created.
895 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
896 dnl implementations (in libc or libintl) without the ngettext() function
898 dnl INTLDIR is used to find the intl libraries. If empty,
899 dnl the value `$(top_builddir)/intl/' is used.
901 dnl The result of the configuration is one of three cases:
902 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
904 dnl Catalog format: GNU --> install in $(datadir)
905 dnl Catalog extension: .mo after installation, .gmo in source tree
906 dnl 2) GNU gettext has been found in the system's C library.
907 dnl Catalog format: GNU --> install in $(datadir)
908 dnl Catalog extension: .mo after installation, .gmo in source tree
909 dnl 3) No internationalization, always use English msgid.
910 dnl Catalog format: none
911 dnl Catalog extension: none
912 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
913 dnl The use of .gmo is historical (it was needed to avoid overwriting the
914 dnl GNU format catalogs when building on a platform with an X/Open gettext),
915 dnl but we keep it in order not to force irrelevant filename changes on the
918 AC_DEFUN([AM_GNU_GETTEXT],
920 dnl Argument checking.
921 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
922 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
924 ifelse([$2], [], , [ifelse([$2], [need-ngettext], ,
925 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
927 define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
928 define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
930 AC_REQUIRE([AM_PO_SUBDIRS])dnl
931 ifelse(gt_included_intl, yes, [
932 AC_REQUIRE([AM_INTL_SUBDIR])dnl
935 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
936 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
937 AC_REQUIRE([AC_LIB_RPATH])
939 AC_MSG_CHECKING([whether NLS is requested])
940 dnl Default is enabled NLS
942 [ --disable-nls do not use Native Language Support],
943 USE_NLS=$enableval, USE_NLS=yes)
944 AC_MSG_RESULT($USE_NLS)
947 ifelse(gt_included_intl, yes, [
948 BUILD_INCLUDED_LIBINTL=no
949 USE_INCLUDED_LIBINTL=no
955 dnl If we use NLS figure out what method
956 if test "$USE_NLS" = "yes"; then
957 gt_use_preinstalled_gnugettext=no
958 ifelse(gt_included_intl, yes, [
959 AC_MSG_CHECKING([whether included gettext is requested])
960 AC_ARG_WITH(included-gettext,
961 [ --with-included-gettext use the GNU gettext library included here],
962 nls_cv_force_use_gnu_gettext=$withval,
963 nls_cv_force_use_gnu_gettext=no)
964 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
966 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
967 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
969 dnl User does not insist on using GNU NLS library. Figure out what
970 dnl to use. If GNU gettext is available we use this. Else we have
971 dnl to fall back to GNU NLS library.
973 dnl Add a version number to the cache macros.
974 define([gt_api_version], ifelse([$2], [need-ngettext], 2, 1))
975 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
976 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
978 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
979 [AC_TRY_LINK([#include <libintl.h>
980 extern int _nl_msg_cat_cntr;
981 extern int *_nl_domain_bindings;],
982 [bindtextdomain ("", "");
983 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
984 gt_cv_func_gnugettext_libc=yes,
985 gt_cv_func_gnugettext_libc=no)])
987 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
988 dnl Sometimes libintl requires libiconv, so first search for libiconv.
989 ifelse(gt_included_intl, yes, , [
992 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
993 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
994 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
995 dnl even if libiconv doesn't exist.
996 AC_LIB_LINKFLAGS_BODY([intl])
997 AC_CACHE_CHECK([for GNU gettext in libintl],
998 gt_cv_func_gnugettext_libintl,
999 [gt_save_CPPFLAGS="$CPPFLAGS"
1000 CPPFLAGS="$CPPFLAGS $INCINTL"
1001 gt_save_LIBS="$LIBS"
1002 LIBS="$LIBS $LIBINTL"
1003 dnl Now see whether libintl exists and does not depend on libiconv.
1004 AC_TRY_LINK([#include <libintl.h>
1005 extern int _nl_msg_cat_cntr;
1006 extern int *_nl_domain_bindings;
1011 const char *_nl_expand_alias ();],
1012 [bindtextdomain ("", "");
1013 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings + *_nl_expand_alias (0)],
1014 gt_cv_func_gnugettext_libintl=yes,
1015 gt_cv_func_gnugettext_libintl=no)
1016 dnl Now see whether libintl exists and depends on libiconv.
1017 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
1018 LIBS="$LIBS $LIBICONV"
1019 AC_TRY_LINK([#include <libintl.h>
1020 extern int _nl_msg_cat_cntr;
1021 extern int *_nl_domain_bindings;
1026 const char *_nl_expand_alias ();],
1027 [bindtextdomain ("", "");
1028 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings + *_nl_expand_alias (0)],
1029 [LIBINTL="$LIBINTL $LIBICONV"
1030 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
1031 gt_cv_func_gnugettext_libintl=yes
1034 CPPFLAGS="$gt_save_CPPFLAGS"
1035 LIBS="$gt_save_LIBS"])
1038 dnl If an already present or preinstalled GNU gettext() is found,
1039 dnl use it. But if this macro is used in GNU gettext, and GNU
1040 dnl gettext is already preinstalled in libintl, we update this
1041 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
1042 if test "$gt_cv_func_gnugettext_libc" = "yes" \
1043 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
1044 && test "$PACKAGE" != gettext; }; then
1045 gt_use_preinstalled_gnugettext=yes
1047 dnl Reset the values set by searching for libintl.
1053 ifelse(gt_included_intl, yes, [
1054 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
1055 dnl GNU gettext is not found in the C library.
1056 dnl Fall back on included GNU gettext library.
1057 nls_cv_use_gnu_gettext=yes
1061 if test "$nls_cv_use_gnu_gettext" = "yes"; then
1062 dnl Mark actions used to generate GNU NLS library.
1063 INTLOBJS="\$(GETTOBJS)"
1064 BUILD_INCLUDED_LIBINTL=yes
1065 USE_INCLUDED_LIBINTL=yes
1066 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
1067 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
1068 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
1071 if test "$gt_use_preinstalled_gnugettext" = "yes" \
1072 || test "$nls_cv_use_gnu_gettext" = "yes"; then
1073 dnl Mark actions to use GNU gettext tools.
1078 if test "$gt_use_preinstalled_gnugettext" = "yes" \
1079 || test "$nls_cv_use_gnu_gettext" = "yes"; then
1080 AC_DEFINE(ENABLE_NLS, 1,
1081 [Define to 1 if translation of program messages to the user's native language
1088 if test "$USE_NLS" = "yes"; then
1090 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1091 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
1092 AC_MSG_CHECKING([how to link with libintl])
1093 AC_MSG_RESULT([$LIBINTL])
1094 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
1097 dnl For backward compatibility. Some packages may be using this.
1098 AC_DEFINE(HAVE_GETTEXT, 1,
1099 [Define if the GNU gettext() function is already present or preinstalled.])
1100 AC_DEFINE(HAVE_DCGETTEXT, 1,
1101 [Define if the GNU dcgettext() function is already present or preinstalled.])
1104 dnl We need to process the po/ directory.
1108 ifelse(gt_included_intl, yes, [
1109 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
1110 dnl to 'yes' because some of the testsuite requires it.
1111 if test "$PACKAGE" = gettext; then
1112 BUILD_INCLUDED_LIBINTL=yes
1115 dnl Make all variables we use known to autoconf.
1116 AC_SUBST(BUILD_INCLUDED_LIBINTL)
1117 AC_SUBST(USE_INCLUDED_LIBINTL)
1121 dnl For backward compatibility. Some configure.ins may be using this.
1123 nls_cv_header_libgt=
1125 dnl For backward compatibility. Some Makefiles may be using this.
1127 AC_SUBST(DATADIRNAME)
1129 dnl For backward compatibility. Some Makefiles may be using this.
1131 AC_SUBST(INSTOBJEXT)
1133 dnl For backward compatibility. Some Makefiles may be using this.
1137 dnl Enable libtool support if the surrounding package wishes it.
1138 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
1139 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
1142 dnl For backward compatibility. Some Makefiles may be using this.
1146 dnl Make all documented variables known to autoconf.
1153 dnl Checks for all prerequisites of the po subdirectory,
1154 dnl except for USE_NLS.
1155 AC_DEFUN([AM_PO_SUBDIRS],
1157 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1158 AC_REQUIRE([AC_PROG_INSTALL])dnl
1159 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1161 dnl Perform the following tests also if --disable-nls has been given,
1162 dnl because they are needed for "make dist" to work.
1164 dnl Search for GNU msgfmt in the PATH.
1165 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1166 dnl The second test excludes FreeBSD msgfmt.
1167 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1168 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
1169 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1171 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1173 dnl Search for GNU xgettext 0.11 or newer in the PATH.
1174 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1175 dnl The second test excludes FreeBSD xgettext.
1176 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1177 [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
1178 (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1180 dnl Remove leftover from FreeBSD xgettext call.
1183 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
1184 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
1185 [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
1187 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1188 dnl Test whether we really found GNU msgfmt.
1189 if test "$GMSGFMT" != ":"; then
1190 dnl If it is no GNU msgfmt we define it as : so that the
1191 dnl Makefiles still can work.
1192 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
1193 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1196 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
1198 [found $GMSGFMT program is not GNU msgfmt; ignore it])
1203 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1204 dnl Test whether we really found GNU xgettext.
1205 if test "$XGETTEXT" != ":"; then
1206 dnl If it is no GNU xgettext we define it as : so that the
1207 dnl Makefiles still can work.
1208 if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
1209 (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1213 [found xgettext program is not GNU xgettext; ignore it])
1216 dnl Remove leftover from FreeBSD xgettext call.
1220 AC_OUTPUT_COMMANDS([
1221 for ac_file in $CONFIG_FILES; do
1222 # Support "outfile[:infile[:infile...]]"
1224 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1226 # PO directories have a Makefile.in generated from Makefile.in.in.
1227 case "$ac_file" in */Makefile.in)
1228 # Adjust a relative srcdir.
1229 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1230 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1231 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1232 # In autoconf-2.13 it is called $ac_given_srcdir.
1233 # In autoconf-2.50 it is called $srcdir.
1234 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1235 case "$ac_given_srcdir" in
1236 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1237 /*) top_srcdir="$ac_given_srcdir" ;;
1238 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
1240 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
1241 rm -f "$ac_dir/POTFILES"
1242 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
1243 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
1244 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
1245 # on $ac_dir but don't depend on user-specified configuration
1247 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1248 # The LINGUAS file contains the set of available languages.
1249 if test -n "$ALL_LINGUAS"; then
1250 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1252 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1253 # Hide the ALL_LINGUAS assigment from automake.
1254 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1256 case "$ac_given_srcdir" in
1258 *) srcdirpre='$(srcdir)/' ;;
1264 for lang in $ALL_LINGUAS; do
1265 POFILES="$POFILES $srcdirpre$lang.po"
1266 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1267 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1268 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1270 # CATALOGS depends on both $ac_dir and the user's LINGUAS
1271 # environment variable.
1273 if test -n "$ALL_LINGUAS"; then
1274 for presentlang in $ALL_LINGUAS; do
1276 if test "%UNSET%" != "$LINGUAS"; then
1277 desiredlanguages="$LINGUAS"
1279 desiredlanguages="$ALL_LINGUAS"
1281 for desiredlang in $desiredlanguages; do
1282 # Use the presentlang catalog if desiredlang is
1283 # a. equal to presentlang, or
1284 # b. a variant of presentlang (because in this case,
1285 # presentlang can be used as a fallback for messages
1286 # which are not translated in the desiredlang catalog).
1287 case "$desiredlang" in
1288 "$presentlang"*) useit=yes;;
1291 if test $useit = yes; then
1292 INST_LINGUAS="$INST_LINGUAS $presentlang"
1297 if test -n "$INST_LINGUAS"; then
1298 for lang in $INST_LINGUAS; do
1299 CATALOGS="$CATALOGS $lang.gmo"
1302 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
1303 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
1304 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
1305 if test -f "$f"; then
1307 *.orig | *.bak | *~) ;;
1308 *) cat "$f" >> "$ac_dir/Makefile" ;;
1316 [# Capture the value of obsolete $ALL_LINGUAS because we need it to compute
1317 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
1319 eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
1320 # Capture the value of LINGUAS because we need it to compute CATALOGS.
1321 LINGUAS="${LINGUAS-%UNSET%}"
1326 dnl Checks for all prerequisites of the intl subdirectory,
1327 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
1328 dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
1329 AC_DEFUN([AM_INTL_SUBDIR],
1331 AC_REQUIRE([AC_PROG_INSTALL])dnl
1332 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1333 AC_REQUIRE([AC_PROG_CC])dnl
1334 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1335 AC_REQUIRE([AC_PROG_RANLIB])dnl
1336 AC_REQUIRE([AC_ISC_POSIX])dnl
1337 AC_REQUIRE([AC_HEADER_STDC])dnl
1338 AC_REQUIRE([AC_C_CONST])dnl
1339 AC_REQUIRE([AC_C_INLINE])dnl
1340 AC_REQUIRE([AC_TYPE_OFF_T])dnl
1341 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1342 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1343 AC_REQUIRE([AC_FUNC_MMAP])dnl
1344 AC_REQUIRE([jm_GLIBC21])dnl
1346 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
1347 stdlib.h string.h unistd.h sys/param.h])
1348 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
1349 geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
1350 strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
1356 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
1357 dnl because plural.y uses bison specific features. It requires at least
1358 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
1360 dnl bison is only needed for the maintainer (who touches plural.y). But in
1361 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
1362 dnl the rule in general Makefile. Now, some people carelessly touch the
1363 dnl files or have a broken "make" program, hence the plural.c rule will
1364 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
1365 dnl present or too old.
1366 AC_CHECK_PROGS([INTLBISON], [bison])
1367 if test -z "$INTLBISON"; then
1370 dnl Found it, now check the version.
1371 AC_MSG_CHECKING([version of bison])
1372 changequote(<<,>>)dnl
1373 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
1374 case $ac_prog_version in
1375 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1376 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
1378 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1379 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1381 AC_MSG_RESULT([$ac_prog_version])
1383 if test $ac_verc_fail = yes; then
1389 AC_DEFUN([AM_MKINSTALLDIRS],
1391 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1392 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
1393 dnl Try to locate is.
1395 if test -n "$ac_aux_dir"; then
1396 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1398 if test -z "$MKINSTALLDIRS"; then
1399 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1401 AC_SUBST(MKINSTALLDIRS)
1404 # lib-prefix.m4 serial 1 (gettext-0.11)
1405 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1406 dnl This file is free software, distributed under the terms of the GNU
1407 dnl General Public License. As a special exception to the GNU General
1408 dnl Public License, this file may be distributed as part of a program
1409 dnl that contains a configuration script generated by Autoconf, under
1410 dnl the same distribution terms as the rest of that program.
1412 dnl From Bruno Haible.
1414 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1415 dnl to access previously installed libraries. The basic assumption is that
1416 dnl a user will want packages to use other packages he previously installed
1417 dnl with the same --prefix option.
1418 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1419 dnl libraries, but is otherwise very convenient.
1420 AC_DEFUN([AC_LIB_PREFIX],
1422 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1423 AC_REQUIRE([AC_PROG_CC])
1424 AC_REQUIRE([AC_CANONICAL_HOST])
1425 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1426 dnl By default, look in $includedir and $libdir.
1428 AC_LIB_WITH_FINAL_PREFIX([
1429 eval additional_includedir=\"$includedir\"
1430 eval additional_libdir=\"$libdir\"
1432 AC_ARG_WITH([lib-prefix],
1433 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1434 --without-lib-prefix don't search for libraries in includedir and libdir],
1436 if test "X$withval" = "Xno"; then
1439 if test "X$withval" = "X"; then
1440 AC_LIB_WITH_FINAL_PREFIX([
1441 eval additional_includedir=\"$includedir\"
1442 eval additional_libdir=\"$libdir\"
1445 additional_includedir="$withval/include"
1446 additional_libdir="$withval/lib"
1450 if test $use_additional = yes; then
1451 dnl Potentially add $additional_includedir to $CPPFLAGS.
1452 dnl But don't add it
1453 dnl 1. if it's the standard /usr/include,
1454 dnl 2. if it's already present in $CPPFLAGS,
1455 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1456 dnl 4. if it doesn't exist as a directory.
1457 if test "X$additional_includedir" != "X/usr/include"; then
1459 for x in $CPPFLAGS; do
1460 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1461 if test "X$x" = "X-I$additional_includedir"; then
1466 if test -z "$haveit"; then
1467 if test "X$additional_includedir" = "X/usr/local/include"; then
1468 if test -n "$GCC"; then
1470 linux*) haveit=yes;;
1474 if test -z "$haveit"; then
1475 if test -d "$additional_includedir"; then
1476 dnl Really add $additional_includedir to $CPPFLAGS.
1477 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1482 dnl Potentially add $additional_libdir to $LDFLAGS.
1483 dnl But don't add it
1484 dnl 1. if it's the standard /usr/lib,
1485 dnl 2. if it's already present in $LDFLAGS,
1486 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1487 dnl 4. if it doesn't exist as a directory.
1488 if test "X$additional_libdir" != "X/usr/lib"; then
1490 for x in $LDFLAGS; do
1491 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1492 if test "X$x" = "X-L$additional_libdir"; then
1497 if test -z "$haveit"; then
1498 if test "X$additional_libdir" = "X/usr/local/lib"; then
1499 if test -n "$GCC"; then
1501 linux*) haveit=yes;;
1505 if test -z "$haveit"; then
1506 if test -d "$additional_libdir"; then
1507 dnl Really add $additional_libdir to $LDFLAGS.
1508 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1516 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1517 dnl acl_final_exec_prefix, containing the values to which $prefix and
1518 dnl $exec_prefix will expand at the end of the configure script.
1519 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1521 dnl Unfortunately, prefix and exec_prefix get only finally determined
1522 dnl at the end of configure.
1523 if test "X$prefix" = "XNONE"; then
1524 acl_final_prefix="$ac_default_prefix"
1526 acl_final_prefix="$prefix"
1528 if test "X$exec_prefix" = "XNONE"; then
1529 acl_final_exec_prefix='${prefix}'
1531 acl_final_exec_prefix="$exec_prefix"
1533 acl_save_prefix="$prefix"
1534 prefix="$acl_final_prefix"
1535 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1536 prefix="$acl_save_prefix"
1539 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1540 dnl variables prefix and exec_prefix bound to the values they will have
1541 dnl at the end of the configure script.
1542 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1544 acl_save_prefix="$prefix"
1545 prefix="$acl_final_prefix"
1546 acl_save_exec_prefix="$exec_prefix"
1547 exec_prefix="$acl_final_exec_prefix"
1549 exec_prefix="$acl_save_exec_prefix"
1550 prefix="$acl_save_prefix"
1553 # lib-link.m4 serial 1 (gettext-0.11)
1554 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1555 dnl This file is free software, distributed under the terms of the GNU
1556 dnl General Public License. As a special exception to the GNU General
1557 dnl Public License, this file may be distributed as part of a program
1558 dnl that contains a configuration script generated by Autoconf, under
1559 dnl the same distribution terms as the rest of that program.
1561 dnl From Bruno Haible.
1563 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1564 dnl the libraries corresponding to explicit and implicit dependencies.
1565 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1566 dnl augments the CPPFLAGS variable.
1567 AC_DEFUN([AC_LIB_LINKFLAGS],
1569 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1570 AC_REQUIRE([AC_LIB_RPATH])
1571 define([Name],[translit([$1],[./-], [___])])
1572 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1573 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1574 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1575 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1576 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1577 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1578 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1580 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1581 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1582 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1583 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1585 AC_SUBST([LTLIB]NAME)
1586 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1587 dnl results of this search when this library appears as a dependency.
1593 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
1594 dnl searches for libname and the libraries corresponding to explicit and
1595 dnl implicit dependencies, together with the specified include files and
1596 dnl the ability to compile and link the specified testcode. If found, it
1597 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
1598 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1599 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1600 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1601 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1603 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1604 AC_REQUIRE([AC_LIB_RPATH])
1605 define([Name],[translit([$1],[./-], [___])])
1606 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1607 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1609 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1611 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1613 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1614 dnl because if the user has installed lib[]Name and not disabled its use
1615 dnl via --without-lib[]Name-prefix, he wants to use it.
1616 ac_save_CPPFLAGS="$CPPFLAGS"
1617 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1619 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1620 ac_save_LIBS="$LIBS"
1621 LIBS="$LIBS $LIB[]NAME"
1622 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
1623 LIBS="$ac_save_LIBS"
1625 if test "$ac_cv_lib[]Name" = yes; then
1627 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
1628 AC_MSG_CHECKING([how to link with lib[]$1])
1629 AC_MSG_RESULT([$LIB[]NAME])
1632 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1633 dnl $INC[]NAME either.
1634 CPPFLAGS="$ac_save_CPPFLAGS"
1638 AC_SUBST([HAVE_LIB]NAME)
1640 AC_SUBST([LTLIB]NAME)
1645 dnl Determine the platform dependent parameters needed to use rpath:
1646 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
1647 dnl hardcode_direct, hardcode_minus_L,
1648 dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
1649 AC_DEFUN([AC_LIB_RPATH],
1651 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1652 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1653 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1654 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1655 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
1656 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1657 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1663 libext="$acl_cv_libext"
1664 shlibext="$acl_cv_shlibext"
1665 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1666 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1667 hardcode_direct="$acl_cv_hardcode_direct"
1668 hardcode_minus_L="$acl_cv_hardcode_minus_L"
1669 sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
1670 sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
1673 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1674 dnl the libraries corresponding to explicit and implicit dependencies.
1675 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1676 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1678 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1679 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1680 dnl By default, look in $includedir and $libdir.
1682 AC_LIB_WITH_FINAL_PREFIX([
1683 eval additional_includedir=\"$includedir\"
1684 eval additional_libdir=\"$libdir\"
1686 AC_ARG_WITH([lib$1-prefix],
1687 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
1688 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
1690 if test "X$withval" = "Xno"; then
1693 if test "X$withval" = "X"; then
1694 AC_LIB_WITH_FINAL_PREFIX([
1695 eval additional_includedir=\"$includedir\"
1696 eval additional_libdir=\"$libdir\"
1699 additional_includedir="$withval/include"
1700 additional_libdir="$withval/lib"
1704 dnl Search the library and its dependencies in $additional_libdir and
1705 dnl $LDFLAGS. Using breadth-first-seach.
1711 names_already_handled=
1712 names_next_round='$1 $2'
1713 while test -n "$names_next_round"; do
1714 names_this_round="$names_next_round"
1716 for name in $names_this_round; do
1718 for n in $names_already_handled; do
1719 if test "$n" = "$name"; then
1724 if test -z "$already_handled"; then
1725 names_already_handled="$names_already_handled $name"
1726 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1727 dnl or AC_LIB_HAVE_LINKFLAGS call.
1728 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1729 eval value=\"\$HAVE_LIB$uppername\"
1730 if test -n "$value"; then
1731 if test "$value" = yes; then
1732 eval value=\"\$LIB$uppername\"
1733 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1734 eval value=\"\$LTLIB$uppername\"
1735 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1737 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1738 dnl that this library doesn't exist. So just drop it.
1742 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1743 dnl and the already constructed $LIBNAME/$LTLIBNAME.
1748 if test $use_additional = yes; then
1749 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
1750 found_dir="$additional_libdir"
1751 found_so="$additional_libdir/lib$name.$shlibext"
1752 if test -f "$additional_libdir/lib$name.la"; then
1753 found_la="$additional_libdir/lib$name.la"
1756 if test -f "$additional_libdir/lib$name.$libext"; then
1757 found_dir="$additional_libdir"
1758 found_a="$additional_libdir/lib$name.$libext"
1759 if test -f "$additional_libdir/lib$name.la"; then
1760 found_la="$additional_libdir/lib$name.la"
1765 if test "X$found_dir" = "X"; then
1766 for x in $LDFLAGS $LTLIB[]NAME; do
1767 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1770 dir=`echo "X$x" | sed -e 's/^X-L//'`
1771 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
1773 found_so="$dir/lib$name.$shlibext"
1774 if test -f "$dir/lib$name.la"; then
1775 found_la="$dir/lib$name.la"
1778 if test -f "$dir/lib$name.$libext"; then
1780 found_a="$dir/lib$name.$libext"
1781 if test -f "$dir/lib$name.la"; then
1782 found_la="$dir/lib$name.la"
1788 if test "X$found_dir" != "X"; then
1793 if test "X$found_dir" != "X"; then
1794 dnl Found the library.
1795 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1796 if test "X$found_so" != "X"; then
1797 dnl Linking with a shared library. We attempt to hardcode its
1798 dnl directory into the executable's runpath, unless it's the
1799 dnl standard /usr/lib.
1800 if test "X$found_dir" = "X/usr/lib"; then
1801 dnl No hardcoding is needed.
1802 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1804 dnl Use an explicit option to hardcode DIR into the resulting
1806 dnl Potentially add DIR to ltrpathdirs.
1807 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1809 for x in $ltrpathdirs; do
1810 if test "X$x" = "X$found_dir"; then
1815 if test -z "$haveit"; then
1816 ltrpathdirs="$ltrpathdirs $found_dir"
1818 dnl The hardcoding into $LIBNAME is system dependent.
1819 if test "$hardcode_direct" = yes; then
1820 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1821 dnl resulting binary.
1822 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1824 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
1825 dnl Use an explicit option to hardcode DIR into the resulting
1827 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1828 dnl Potentially add DIR to rpathdirs.
1829 dnl The rpathdirs will be appended to $LIBNAME at the end.
1831 for x in $rpathdirs; do
1832 if test "X$x" = "X$found_dir"; then
1837 if test -z "$haveit"; then
1838 rpathdirs="$rpathdirs $found_dir"
1841 dnl Rely on "-L$found_dir".
1842 dnl But don't add it if it's already contained in the LDFLAGS
1843 dnl or the already constructed $LIBNAME
1845 for x in $LDFLAGS $LIB[]NAME; do
1846 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1847 if test "X$x" = "X-L$found_dir"; then
1852 if test -z "$haveit"; then
1853 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1855 if test "$hardcode_minus_L" != no; then
1856 dnl FIXME: Not sure whether we should use
1857 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1859 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1861 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
1862 dnl here, because this doesn't fit in flags passed to the
1863 dnl compiler. So give up. No hardcoding. This affects only
1864 dnl very old systems.
1865 dnl FIXME: Not sure whether we should use
1866 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1868 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1874 if test "X$found_a" != "X"; then
1875 dnl Linking with a static library.
1876 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1878 dnl We shouldn't come here, but anyway it's good to have a
1880 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1883 dnl Assume the include files are nearby.
1884 additional_includedir=
1885 case "$found_dir" in
1887 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
1888 additional_includedir="$basedir/include"
1891 if test "X$additional_includedir" != "X"; then
1892 dnl Potentially add $additional_includedir to $INCNAME.
1893 dnl But don't add it
1894 dnl 1. if it's the standard /usr/include,
1895 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1896 dnl 3. if it's already present in $CPPFLAGS or the already
1897 dnl constructed $INCNAME,
1898 dnl 4. if it doesn't exist as a directory.
1899 if test "X$additional_includedir" != "X/usr/include"; then
1901 if test "X$additional_includedir" = "X/usr/local/include"; then
1902 if test -n "$GCC"; then
1904 linux*) haveit=yes;;
1908 if test -z "$haveit"; then
1909 for x in $CPPFLAGS $INC[]NAME; do
1910 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1911 if test "X$x" = "X-I$additional_includedir"; then
1916 if test -z "$haveit"; then
1917 if test -d "$additional_includedir"; then
1918 dnl Really add $additional_includedir to $INCNAME.
1919 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1925 dnl Look for dependencies.
1926 if test -n "$found_la"; then
1927 dnl Read the .la file. It defines the variables
1928 dnl dlname, library_names, old_library, dependency_libs, current,
1929 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1930 save_libdir="$libdir"
1932 */* | *\\*) . "$found_la" ;;
1933 *) . "./$found_la" ;;
1935 libdir="$save_libdir"
1936 dnl We use only dependency_libs.
1937 for dep in $dependency_libs; do
1940 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1941 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1942 dnl But don't add it
1943 dnl 1. if it's the standard /usr/lib,
1944 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1945 dnl 3. if it's already present in $LDFLAGS or the already
1946 dnl constructed $LIBNAME,
1947 dnl 4. if it doesn't exist as a directory.
1948 if test "X$additional_libdir" != "X/usr/lib"; then
1950 if test "X$additional_libdir" = "X/usr/local/lib"; then
1951 if test -n "$GCC"; then
1953 linux*) haveit=yes;;
1957 if test -z "$haveit"; then
1959 for x in $LDFLAGS $LIB[]NAME; do
1960 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1961 if test "X$x" = "X-L$additional_libdir"; then
1966 if test -z "$haveit"; then
1967 if test -d "$additional_libdir"; then
1968 dnl Really add $additional_libdir to $LIBNAME.
1969 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1973 for x in $LDFLAGS $LTLIB[]NAME; do
1974 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1975 if test "X$x" = "X-L$additional_libdir"; then
1980 if test -z "$haveit"; then
1981 if test -d "$additional_libdir"; then
1982 dnl Really add $additional_libdir to $LTLIBNAME.
1983 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1990 dnl Handle this in the next round.
1991 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1994 dnl Handle this in the next round. Throw away the .la's
1995 dnl directory; it is already contained in a preceding -L
1997 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
2000 dnl Most likely an immediate library name.
2001 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
2002 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
2008 dnl Didn't find the library; assume it is in the system directories
2009 dnl known to the linker and runtime loader. (All the system
2010 dnl directories known to the linker should also be known to the
2011 dnl runtime loader, otherwise the system is severely misconfigured.)
2012 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2013 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
2019 if test "X$rpathdirs" != "X"; then
2020 if test -n "$hardcode_libdir_separator"; then
2021 dnl Weird platform: only the last -rpath option counts, the user must
2022 dnl pass all path elements in one option. We can arrange that for a
2023 dnl single library, but not when more than one $LIBNAMEs are used.
2025 for found_dir in $rpathdirs; do
2026 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
2028 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
2029 acl_save_libdir="$libdir"
2031 eval flag=\"$hardcode_libdir_flag_spec\"
2032 libdir="$acl_save_libdir"
2033 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2035 dnl The -rpath options are cumulative.
2036 for found_dir in $rpathdirs; do
2037 acl_save_libdir="$libdir"
2039 eval flag=\"$hardcode_libdir_flag_spec\"
2040 libdir="$acl_save_libdir"
2041 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2045 if test "X$ltrpathdirs" != "X"; then
2046 dnl When using libtool, the option that works for both libraries and
2047 dnl executables is -R. The -R options are cumulative.
2048 for found_dir in $ltrpathdirs; do
2049 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
2054 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
2055 dnl unless already present in VAR.
2056 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
2057 dnl contains two or three consecutive elements that belong together.
2058 AC_DEFUN([AC_LIB_APPENDTOVAR],
2060 for element in [$2]; do
2063 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2064 if test "X$x" = "X$element"; then
2069 if test -z "$haveit"; then
2070 [$1]="${[$1]}${[$1]:+ }$element"
2075 # lib-ld.m4 serial 1 (gettext-0.11)
2076 dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
2077 dnl This file is free software, distributed under the terms of the GNU
2078 dnl General Public License. As a special exception to the GNU General
2079 dnl Public License, this file may be distributed as part of a program
2080 dnl that contains a configuration script generated by Autoconf, under
2081 dnl the same distribution terms as the rest of that program.
2083 dnl Subroutines of libtool.m4,
2084 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
2085 dnl with libtool.m4.
2087 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
2088 AC_DEFUN([AC_LIB_PROG_LD_GNU],
2089 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
2090 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2091 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2092 acl_cv_prog_gnu_ld=yes
2094 acl_cv_prog_gnu_ld=no
2096 with_gnu_ld=$acl_cv_prog_gnu_ld
2099 dnl From libtool-1.4. Sets the variable LD.
2100 AC_DEFUN([AC_LIB_PROG_LD],
2101 [AC_ARG_WITH(gnu-ld,
2102 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
2103 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
2104 AC_REQUIRE([AC_PROG_CC])dnl
2105 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2107 if test "$GCC" = yes; then
2108 # Check if gcc -print-prog-name=ld gives a path.
2109 AC_MSG_CHECKING([for ld used by GCC])
2112 # gcc leaves a trailing carriage return which upsets mingw
2113 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2115 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2118 # Accept absolute paths.
2119 [[\\/]* | [A-Za-z]:[\\/]*)]
2120 [re_direlt='/[^/][^/]*/\.\./']
2121 # Canonicalize the path of ld
2122 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2123 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2124 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2126 test -z "$LD" && LD="$ac_prog"
2129 # If it fails, then pretend we aren't using GCC.
2133 # If it is relative, then search for the first ld in PATH.
2137 elif test "$with_gnu_ld" = yes; then
2138 AC_MSG_CHECKING([for GNU ld])
2140 AC_MSG_CHECKING([for non-GNU ld])
2142 AC_CACHE_VAL(acl_cv_path_LD,
2143 [if test -z "$LD"; then
2144 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2145 for ac_dir in $PATH; do
2146 test -z "$ac_dir" && ac_dir=.
2147 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2148 acl_cv_path_LD="$ac_dir/$ac_prog"
2149 # Check to see if the program is GNU ld. I'd rather use --version,
2150 # but apparently some GNU ld's only accept -v.
2151 # Break only if it was the GNU/non-GNU ld that we prefer.
2152 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2153 test "$with_gnu_ld" != no && break
2155 test "$with_gnu_ld" != yes && break
2161 acl_cv_path_LD="$LD" # Let the user override the test with a path.
2163 LD="$acl_cv_path_LD"
2164 if test -n "$LD"; then
2169 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2173 # iconv.m4 serial AM3 (gettext-0.11)
2174 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2175 dnl This file is free software, distributed under the terms of the GNU
2176 dnl General Public License. As a special exception to the GNU General
2177 dnl Public License, this file may be distributed as part of a program
2178 dnl that contains a configuration script generated by Autoconf, under
2179 dnl the same distribution terms as the rest of that program.
2181 dnl From Bruno Haible.
2183 AC_DEFUN([AM_ICONV_LINK],
2185 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
2186 dnl those with the standalone portable GNU libiconv installed).
2188 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
2189 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2190 AC_REQUIRE([AC_LIB_RPATH])
2192 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2194 AC_LIB_LINKFLAGS_BODY([iconv])
2196 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
2197 dnl because if the user has installed libiconv and not disabled its use
2198 dnl via --without-libiconv-prefix, he wants to use it. The first
2199 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
2200 am_save_CPPFLAGS="$CPPFLAGS"
2201 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
2203 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
2204 am_cv_func_iconv="no, consider installing GNU libiconv"
2206 AC_TRY_LINK([#include <stdlib.h>
2207 #include <iconv.h>],
2208 [iconv_t cd = iconv_open("","");
2209 iconv(cd,NULL,NULL,NULL,NULL);
2211 am_cv_func_iconv=yes)
2212 if test "$am_cv_func_iconv" != yes; then
2213 am_save_LIBS="$LIBS"
2214 LIBS="$LIBS $LIBICONV"
2215 AC_TRY_LINK([#include <stdlib.h>
2216 #include <iconv.h>],
2217 [iconv_t cd = iconv_open("","");
2218 iconv(cd,NULL,NULL,NULL,NULL);
2221 am_cv_func_iconv=yes)
2222 LIBS="$am_save_LIBS"
2225 if test "$am_cv_func_iconv" = yes; then
2226 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
2228 if test "$am_cv_lib_iconv" = yes; then
2229 AC_MSG_CHECKING([how to link with libiconv])
2230 AC_MSG_RESULT([$LIBICONV])
2232 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
2234 CPPFLAGS="$am_save_CPPFLAGS"
2239 AC_SUBST(LTLIBICONV)
2242 AC_DEFUN([AM_ICONV],
2244 AC_REQUIRE([AM_ICONV_LINK])
2245 if test "$am_cv_func_iconv" = yes; then
2246 AC_MSG_CHECKING([for iconv declaration])
2247 AC_CACHE_VAL(am_cv_proto_iconv, [
2255 #if defined(__STDC__) || defined(__cplusplus)
2256 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
2260 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
2261 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);"])
2262 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
2263 AC_MSG_RESULT([$]{ac_t:-
2264 }[$]am_cv_proto_iconv)
2265 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
2266 [Define as const if the declaration of iconv() needs const.])
2270 # progtest.m4 serial 2 (gettext-0.10.40)
2271 dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
2272 dnl This file is free software, distributed under the terms of the GNU
2273 dnl General Public License. As a special exception to the GNU General
2274 dnl Public License, this file may be distributed as part of a program
2275 dnl that contains a configuration script generated by Autoconf, under
2276 dnl the same distribution terms as the rest of that program.
2278 dnl This file can can be used in projects which are not available under
2279 dnl the GNU General Public License or the GNU Library General Public
2280 dnl License but which still want to provide support for the GNU gettext
2282 dnl Please note that the actual code of the GNU gettext library is covered
2283 dnl by the GNU Library General Public License, and the rest of the GNU
2284 dnl gettext package package is covered by the GNU General Public License.
2285 dnl They are *not* in the public domain.
2288 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
2290 # Search path for a program which passes the given test.
2292 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2293 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2294 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2295 [# Extract the first word of "$2", so it can be a program name with args.
2296 set dummy $2; ac_word=[$]2
2297 AC_MSG_CHECKING([for $ac_word])
2298 AC_CACHE_VAL(ac_cv_path_$1,
2301 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2304 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2305 for ac_dir in ifelse([$5], , $PATH, [$5]); do
2306 test -z "$ac_dir" && ac_dir=.
2307 if test -f $ac_dir/$ac_word; then
2309 ac_cv_path_$1="$ac_dir/$ac_word"
2315 dnl If no 4th arg is given, leave the cache variable unset,
2316 dnl so AC_PATH_PROGS will keep looking.
2317 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2322 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2323 AC_MSG_RESULT([$]$1)
2330 # isc-posix.m4 serial 1 (gettext-0.10.40)
2331 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2332 dnl This file is free software, distributed under the terms of the GNU
2333 dnl General Public License. As a special exception to the GNU General
2334 dnl Public License, this file may be distributed as part of a program
2335 dnl that contains a configuration script generated by Autoconf, under
2336 dnl the same distribution terms as the rest of that program.
2338 # This test replaces the one in autoconf.
2339 # Currently this macro should have the same name as the autoconf macro
2340 # because gettext's gettext.m4 (distributed in the automake package)
2341 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
2342 # give these diagnostics:
2343 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
2344 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
2346 undefine([AC_ISC_POSIX])
2348 AC_DEFUN([AC_ISC_POSIX],
2350 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
2351 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
2355 # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
2356 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2357 dnl This file is free software, distributed under the terms of the GNU
2358 dnl General Public License. As a special exception to the GNU General
2359 dnl Public License, this file may be distributed as part of a program
2360 dnl that contains a configuration script generated by Autoconf, under
2361 dnl the same distribution terms as the rest of that program.
2363 # Test for the GNU C Library, version 2.1 or newer.
2364 # From Bruno Haible.
2366 AC_DEFUN([jm_GLIBC21],
2368 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
2369 ac_cv_gnu_library_2_1,
2370 [AC_EGREP_CPP([Lucky GNU user],
2372 #include <features.h>
2373 #ifdef __GNU_LIBRARY__
2374 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
2379 ac_cv_gnu_library_2_1=yes,
2380 ac_cv_gnu_library_2_1=no)
2384 GLIBC21="$ac_cv_gnu_library_2_1"
2388 # codeset.m4 serial AM1 (gettext-0.10.40)
2389 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2390 dnl This file is free software, distributed under the terms of the GNU
2391 dnl General Public License. As a special exception to the GNU General
2392 dnl Public License, this file may be distributed as part of a program
2393 dnl that contains a configuration script generated by Autoconf, under
2394 dnl the same distribution terms as the rest of that program.
2396 dnl From Bruno Haible.
2398 AC_DEFUN([AM_LANGINFO_CODESET],
2400 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
2401 [AC_TRY_LINK([#include <langinfo.h>],
2402 [char* cs = nl_langinfo(CODESET);],
2403 am_cv_langinfo_codeset=yes,
2404 am_cv_langinfo_codeset=no)
2406 if test $am_cv_langinfo_codeset = yes; then
2407 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
2408 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
2412 # lcmessage.m4 serial 2 (gettext-0.10.40)
2413 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2414 dnl This file is free software, distributed under the terms of the GNU
2415 dnl General Public License. As a special exception to the GNU General
2416 dnl Public License, this file may be distributed as part of a program
2417 dnl that contains a configuration script generated by Autoconf, under
2418 dnl the same distribution terms as the rest of that program.
2420 dnl This file can can be used in projects which are not available under
2421 dnl the GNU General Public License or the GNU Library General Public
2422 dnl License but which still want to provide support for the GNU gettext
2424 dnl Please note that the actual code of the GNU gettext library is covered
2425 dnl by the GNU Library General Public License, and the rest of the GNU
2426 dnl gettext package package is covered by the GNU General Public License.
2427 dnl They are *not* in the public domain.
2430 dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
2432 # Check whether LC_MESSAGES is available in <locale.h>.
2434 AC_DEFUN([AM_LC_MESSAGES],
2435 [if test $ac_cv_header_locale_h = yes; then
2436 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
2437 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
2438 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
2439 if test $am_cv_val_LC_MESSAGES = yes; then
2440 AC_DEFINE(HAVE_LC_MESSAGES, 1,
2441 [Define if your <locale.h> file defines LC_MESSAGES.])