FYI: Reply from HP-UX
[git/dscho.git] / flex-2.5.33 / aclocal.m4
blob76aa2debbf7f399c0a24d905e6686daec61b368a
1 # generated automatically by aclocal 1.7.5 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
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)
25 # any later version.
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
35 # 02111-1307, USA.
37 # serial 10
39 AC_PREREQ([2.54])
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'
69   else
70     CYGPATH_W=echo
71   fi
73 AC_SUBST([CYGPATH_W])
75 # Define the identity of the package.
76 dnl Distinguish between old-style and new-style calls.
77 m4_ifval([$2],
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)
98 AM_PROG_INSTALL_SH
99 AM_PROG_INSTALL_STRIP
100 # We need awk for the "check" target.  The system "awk" is bad on
101 # some platforms.
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.
128 _am_stamp_count=1
129 for _am_header in $config_headers :; do
130   case $_am_header in
131     $1 | $1:* )
132       break ;;
133     * )
134       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
135   esac
136 done
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)
144 # any later version.
146 # This program is distributed in the hope that it will be useful,
147 # but WITHOUT ANY WARRANTY; without even the implied warranty of
148 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
149 # GNU General Public License for more details.
151 # You should have received a copy of the GNU General Public License
152 # along with this program; if not, write to the Free Software
153 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
155 # AM_AUTOMAKE_VERSION(VERSION)
156 # ----------------------------
157 # Automake X.Y traces this macro to ensure aclocal.m4 has been
158 # generated from the m4 files accompanying Automake X.Y.
159 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
161 # AM_SET_CURRENT_AUTOMAKE_VERSION
162 # -------------------------------
163 # Call AM_AUTOMAKE_VERSION so it can be traced.
164 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
165 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166          [AM_AUTOMAKE_VERSION([1.7.5])])
168 # Helper functions for option handling.                    -*- Autoconf -*-
170 # Copyright 2001, 2002  Free Software Foundation, Inc.
172 # This program is free software; you can redistribute it and/or modify
173 # it under the terms of the GNU General Public License as published by
174 # the Free Software Foundation; either version 2, or (at your option)
175 # any later version.
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
185 # 02111-1307, USA.
187 # serial 2
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)
221 # any later version.
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
231 # 02111-1307, USA.
233 # serial 3
235 # AM_SANITY_CHECK
236 # ---------------
237 AC_DEFUN([AM_SANITY_CHECK],
238 [AC_MSG_CHECKING([whether build environment is sane])
239 # Just in case
240 sleep 1
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
246 # directory).
247 if (
248    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
249    if test "$[*]" = "X"; then
250       # -L didn't work.
251       set X `ls -t $srcdir/configure conftest.file`
252    fi
253    rm -f 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])
263    fi
265    test "$[2]" = conftest.file
266    )
267 then
268    # Ok.
269    :
270 else
271    AC_MSG_ERROR([newly created file is older than distributed files!
272 Check your system clock])
274 AC_MSG_RESULT(yes)])
276 #  -*- Autoconf -*-
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)
284 # any later version.
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
294 # 02111-1307, USA.
296 # serial 3
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"}
303 AC_SUBST($1)])
306 # AM_MISSING_HAS_RUN
307 # ------------------
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 "
316 else
317   am_missing_run=
318   AC_MSG_WARN([`missing' script is too old or missing])
322 # AM_AUX_DIR_EXPAND
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)
329 # any later version.
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
339 # 02111-1307, USA.
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.
380 AC_PREREQ([2.50])
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`
387 # AM_PROG_INSTALL_SH
388 # ------------------
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)
396 # any later version.
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
406 # 02111-1307, USA.
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)
420 # any later version.
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
430 # 02111-1307, USA.
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])])
452 #                                                          -*- Autoconf -*-
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)
458 # any later version.
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
468 # 02111-1307, USA.
470 # serial 1
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
478   am__leading_dot=.
479 else
480   am__leading_dot=_
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)
492 # any later version.
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
502 # 02111-1307, USA.
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
542   # in D'.
543   mkdir conftest.dir
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
547   cd conftest.dir
549   am_cv_$1_dependencies_compiler_type=none
550   if test "$am_compiler_list" = ""; then
551      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
552   fi
553   for depmode in $am_compiler_list; do
554     # We need to recreate these files for each test, as the compiler may
555     # overwrite some of them when testing with obscure command lines.
556     # This happens at least with the AIX C compiler.
557     echo '#include "conftest.h"' > conftest.c
558     echo 'int i;' > conftest.h
559     echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
561     case $depmode in
562     nosideeffect)
563       # after this tag, mechanisms are not by side-effect, so they'll
564       # only be used when explicitly requested
565       if test "x$enable_dependency_tracking" = xyes; then
566         continue
567       else
568         break
569       fi
570       ;;
571     none) break ;;
572     esac
573     # We check with `-c' and `-o' for the sake of the "dashmstdout"
574     # mode.  It turns out that the SunPro C++ compiler does not properly
575     # handle `-M -o', and we need to detect this.
576     if depmode=$depmode \
577        source=conftest.c object=conftest.o \
578        depfile=conftest.Po tmpdepfile=conftest.TPo \
579        $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
580          >/dev/null 2>conftest.err &&
581        grep conftest.h conftest.Po > /dev/null 2>&1 &&
582        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
583       # icc doesn't choke on unknown options, it will just issue warnings
584       # (even with -Werror).  So we grep stderr for any message
585       # that says an option was ignored.
586       if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
587         am_cv_$1_dependencies_compiler_type=$depmode
588         break
589       fi
590     fi
591   done
593   cd ..
594   rm -rf conftest.dir
595 else
596   am_cv_$1_dependencies_compiler_type=none
599 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
600 AM_CONDITIONAL([am__fastdep$1], [
601   test "x$enable_dependency_tracking" != xno \
602   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
606 # AM_SET_DEPDIR
607 # -------------
608 # Choose a directory name for dependency files.
609 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
610 AC_DEFUN([AM_SET_DEPDIR],
611 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
612 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
616 # AM_DEP_TRACK
617 # ------------
618 AC_DEFUN([AM_DEP_TRACK],
619 [AC_ARG_ENABLE(dependency-tracking,
620 [  --disable-dependency-tracking Speeds up one-time builds
621   --enable-dependency-tracking  Do not reject slow dependency extractors])
622 if test "x$enable_dependency_tracking" != xno; then
623   am_depcomp="$ac_aux_dir/depcomp"
624   AMDEPBACKSLASH='\'
626 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
627 AC_SUBST([AMDEPBACKSLASH])
630 # Generate code to set up dependency tracking.   -*- Autoconf -*-
632 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
634 # This program is free software; you can redistribute it and/or modify
635 # it under the terms of the GNU General Public License as published by
636 # the Free Software Foundation; either version 2, or (at your option)
637 # any later version.
639 # This program is distributed in the hope that it will be useful,
640 # but WITHOUT ANY WARRANTY; without even the implied warranty of
641 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
642 # GNU General Public License for more details.
644 # You should have received a copy of the GNU General Public License
645 # along with this program; if not, write to the Free Software
646 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
647 # 02111-1307, USA.
649 #serial 2
651 # _AM_OUTPUT_DEPENDENCY_COMMANDS
652 # ------------------------------
653 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
654 [for mf in $CONFIG_FILES; do
655   # Strip MF so we end up with the name of the file.
656   mf=`echo "$mf" | sed -e 's/:.*$//'`
657   # Check whether this is an Automake generated Makefile or not.
658   # We used to match only the files named `Makefile.in', but
659   # some people rename them; so instead we look at the file content.
660   # Grep'ing the first line is not enough: some people post-process
661   # each Makefile.in and add a new line on top of each file to say so.
662   # So let's grep whole file.
663   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
664     dirpart=`AS_DIRNAME("$mf")`
665   else
666     continue
667   fi
668   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
669   # Extract the definition of DEP_FILES from the Makefile without
670   # running `make'.
671   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
672   test -z "$DEPDIR" && continue
673   # When using ansi2knr, U may be empty or an underscore; expand it
674   U=`sed -n -e '/^U = / s///p' < "$mf"`
675   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
676   # We invoke sed twice because it is the simplest approach to
677   # changing $(DEPDIR) to its actual value in the expansion.
678   for file in `sed -n -e '
679     /^DEP_FILES = .*\\\\$/ {
680       s/^DEP_FILES = //
681       :loop
682         s/\\\\$//
683         p
684         n
685         /\\\\$/ b loop
686       p
687     }
688     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
689        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
690     # Make sure the directory exists.
691     test -f "$dirpart/$file" && continue
692     fdir=`AS_DIRNAME(["$file"])`
693     AS_MKDIR_P([$dirpart/$fdir])
694     # echo "creating $dirpart/$file"
695     echo '# dummy' > "$dirpart/$file"
696   done
697 done
698 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
701 # AM_OUTPUT_DEPENDENCY_COMMANDS
702 # -----------------------------
703 # This macro should only be invoked once -- use via AC_REQUIRE.
705 # This code is only required when automatic dependency tracking
706 # is enabled.  FIXME.  This creates each `.P' file that we will
707 # need in order to bootstrap the dependency handling code.
708 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
709 [AC_CONFIG_COMMANDS([depfiles],
710      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
711      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
714 # Check to see how 'make' treats includes.      -*- Autoconf -*-
716 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
718 # This program is free software; you can redistribute it and/or modify
719 # it under the terms of the GNU General Public License as published by
720 # the Free Software Foundation; either version 2, or (at your option)
721 # any later version.
723 # This program is distributed in the hope that it will be useful,
724 # but WITHOUT ANY WARRANTY; without even the implied warranty of
725 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
726 # GNU General Public License for more details.
728 # You should have received a copy of the GNU General Public License
729 # along with this program; if not, write to the Free Software
730 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
731 # 02111-1307, USA.
733 # serial 2
735 # AM_MAKE_INCLUDE()
736 # -----------------
737 # Check to see how make treats includes.
738 AC_DEFUN([AM_MAKE_INCLUDE],
739 [am_make=${MAKE-make}
740 cat > confinc << 'END'
741 am__doit:
742         @echo done
743 .PHONY: am__doit
745 # If we don't find an include directive, just comment out the code.
746 AC_MSG_CHECKING([for style of include used by $am_make])
747 am__include="#"
748 am__quote=
749 _am_result=none
750 # First try GNU make style include.
751 echo "include confinc" > confmf
752 # We grep out `Entering directory' and `Leaving directory'
753 # messages which can occur if `w' ends up in MAKEFLAGS.
754 # In particular we don't look at `^make:' because GNU make might
755 # be invoked under some other name (usually "gmake"), in which
756 # case it prints its new name instead of `make'.
757 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
758    am__include=include
759    am__quote=
760    _am_result=GNU
762 # Now try BSD make style include.
763 if test "$am__include" = "#"; then
764    echo '.include "confinc"' > confmf
765    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
766       am__include=.include
767       am__quote="\""
768       _am_result=BSD
769    fi
771 AC_SUBST([am__include])
772 AC_SUBST([am__quote])
773 AC_MSG_RESULT([$_am_result])
774 rm -f confinc confmf
777 # AM_CONDITIONAL                                              -*- Autoconf -*-
779 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
781 # This program is free software; you can redistribute it and/or modify
782 # it under the terms of the GNU General Public License as published by
783 # the Free Software Foundation; either version 2, or (at your option)
784 # any later version.
786 # This program is distributed in the hope that it will be useful,
787 # but WITHOUT ANY WARRANTY; without even the implied warranty of
788 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
789 # GNU General Public License for more details.
791 # You should have received a copy of the GNU General Public License
792 # along with this program; if not, write to the Free Software
793 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
794 # 02111-1307, USA.
796 # serial 5
798 AC_PREREQ(2.52)
800 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
801 # -------------------------------------
802 # Define a conditional.
803 AC_DEFUN([AM_CONDITIONAL],
804 [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
805         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
806 AC_SUBST([$1_TRUE])
807 AC_SUBST([$1_FALSE])
808 if $2; then
809   $1_TRUE=
810   $1_FALSE='#'
811 else
812   $1_TRUE='#'
813   $1_FALSE=
815 AC_CONFIG_COMMANDS_PRE(
816 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
817   AC_MSG_ERROR([conditional "$1" was never defined.
818 Usually this means the macro was only invoked conditionally.])
819 fi])])
821 # gettext.m4 serial 20 (gettext-0.12)
822 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
823 dnl This file is free software, distributed under the terms of the GNU
824 dnl General Public License.  As a special exception to the GNU General
825 dnl Public License, this file may be distributed as part of a program
826 dnl that contains a configuration script generated by Autoconf, under
827 dnl the same distribution terms as the rest of that program.
829 dnl This file can can be used in projects which are not available under
830 dnl the GNU General Public License or the GNU Library General Public
831 dnl License but which still want to provide support for the GNU gettext
832 dnl functionality.
833 dnl Please note that the actual code of the GNU gettext library is covered
834 dnl by the GNU Library General Public License, and the rest of the GNU
835 dnl gettext package package is covered by the GNU General Public License.
836 dnl They are *not* in the public domain.
838 dnl Authors:
839 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
840 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
842 dnl Macro to add for using GNU gettext.
844 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
845 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
846 dnl    default (if it is not specified or empty) is 'no-libtool'.
847 dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
848 dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
849 dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
850 dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
851 dnl    depending on --{enable,disable}-{shared,static} and on the presence of
852 dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
853 dnl    $(top_builddir)/intl/libintl.a will be created.
854 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
855 dnl    implementations (in libc or libintl) without the ngettext() function
856 dnl    will be ignored.  If NEEDSYMBOL is specified and is
857 dnl    'need-formatstring-macros', then GNU gettext implementations that don't
858 dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
859 dnl INTLDIR is used to find the intl libraries.  If empty,
860 dnl    the value `$(top_builddir)/intl/' is used.
862 dnl The result of the configuration is one of three cases:
863 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
864 dnl    and used.
865 dnl    Catalog format: GNU --> install in $(datadir)
866 dnl    Catalog extension: .mo after installation, .gmo in source tree
867 dnl 2) GNU gettext has been found in the system's C library.
868 dnl    Catalog format: GNU --> install in $(datadir)
869 dnl    Catalog extension: .mo after installation, .gmo in source tree
870 dnl 3) No internationalization, always use English msgid.
871 dnl    Catalog format: none
872 dnl    Catalog extension: none
873 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
874 dnl The use of .gmo is historical (it was needed to avoid overwriting the
875 dnl GNU format catalogs when building on a platform with an X/Open gettext),
876 dnl but we keep it in order not to force irrelevant filename changes on the
877 dnl maintainers.
879 AC_DEFUN([AM_GNU_GETTEXT],
881   dnl Argument checking.
882   ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
883     [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
884 ])])])])])
885   ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
886     [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
887 ])])])])
888   define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
889   define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
891   AC_REQUIRE([AM_PO_SUBDIRS])dnl
892   ifelse(gt_included_intl, yes, [
893     AC_REQUIRE([AM_INTL_SUBDIR])dnl
894   ])
896   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
897   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
898   AC_REQUIRE([AC_LIB_RPATH])
900   dnl Sometimes libintl requires libiconv, so first search for libiconv.
901   dnl Ideally we would do this search only after the
902   dnl      if test "$USE_NLS" = "yes"; then
903   dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
904   dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
905   dnl the configure script would need to contain the same shell code
906   dnl again, outside any 'if'. There are two solutions:
907   dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
908   dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
909   dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
910   dnl documented, we avoid it.
911   ifelse(gt_included_intl, yes, , [
912     AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
913   ])
915   dnl Set USE_NLS.
916   AM_NLS
918   ifelse(gt_included_intl, yes, [
919     BUILD_INCLUDED_LIBINTL=no
920     USE_INCLUDED_LIBINTL=no
921   ])
922   LIBINTL=
923   LTLIBINTL=
924   POSUB=
926   dnl If we use NLS figure out what method
927   if test "$USE_NLS" = "yes"; then
928     gt_use_preinstalled_gnugettext=no
929     ifelse(gt_included_intl, yes, [
930       AC_MSG_CHECKING([whether included gettext is requested])
931       AC_ARG_WITH(included-gettext,
932         [  --with-included-gettext use the GNU gettext library included here],
933         nls_cv_force_use_gnu_gettext=$withval,
934         nls_cv_force_use_gnu_gettext=no)
935       AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
937       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
938       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
939     ])
940         dnl User does not insist on using GNU NLS library.  Figure out what
941         dnl to use.  If GNU gettext is available we use this.  Else we have
942         dnl to fall back to GNU NLS library.
944         dnl Add a version number to the cache macros.
945         define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
946         define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
947         define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
949         AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
950          [AC_TRY_LINK([#include <libintl.h>
951 ]ifelse([$2], [need-formatstring-macros],
952 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
953 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
954 #endif
955 changequote(,)dnl
956 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
957 changequote([,])dnl
958 ], [])[extern int _nl_msg_cat_cntr;
959 extern int *_nl_domain_bindings;],
960             [bindtextdomain ("", "");
961 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
962             gt_cv_func_gnugettext_libc=yes,
963             gt_cv_func_gnugettext_libc=no)])
965         if test "$gt_cv_func_gnugettext_libc" != "yes"; then
966           dnl Sometimes libintl requires libiconv, so first search for libiconv.
967           ifelse(gt_included_intl, yes, , [
968             AM_ICONV_LINK
969           ])
970           dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
971           dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
972           dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
973           dnl even if libiconv doesn't exist.
974           AC_LIB_LINKFLAGS_BODY([intl])
975           AC_CACHE_CHECK([for GNU gettext in libintl],
976             gt_cv_func_gnugettext_libintl,
977            [gt_save_CPPFLAGS="$CPPFLAGS"
978             CPPFLAGS="$CPPFLAGS $INCINTL"
979             gt_save_LIBS="$LIBS"
980             LIBS="$LIBS $LIBINTL"
981             dnl Now see whether libintl exists and does not depend on libiconv.
982             AC_TRY_LINK([#include <libintl.h>
983 ]ifelse([$2], [need-formatstring-macros],
984 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
985 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
986 #endif
987 changequote(,)dnl
988 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
989 changequote([,])dnl
990 ], [])[extern int _nl_msg_cat_cntr;
991 extern
992 #ifdef __cplusplus
994 #endif
995 const char *_nl_expand_alias ();],
996               [bindtextdomain ("", "");
997 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
998               gt_cv_func_gnugettext_libintl=yes,
999               gt_cv_func_gnugettext_libintl=no)
1000             dnl Now see whether libintl exists and depends on libiconv.
1001             if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
1002               LIBS="$LIBS $LIBICONV"
1003               AC_TRY_LINK([#include <libintl.h>
1004 ]ifelse([$2], [need-formatstring-macros],
1005 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1006 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1007 #endif
1008 changequote(,)dnl
1009 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1010 changequote([,])dnl
1011 ], [])[extern int _nl_msg_cat_cntr;
1012 extern
1013 #ifdef __cplusplus
1015 #endif
1016 const char *_nl_expand_alias ();],
1017                 [bindtextdomain ("", "");
1018 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
1019                [LIBINTL="$LIBINTL $LIBICONV"
1020                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
1021                 gt_cv_func_gnugettext_libintl=yes
1022                ])
1023             fi
1024             CPPFLAGS="$gt_save_CPPFLAGS"
1025             LIBS="$gt_save_LIBS"])
1026         fi
1028         dnl If an already present or preinstalled GNU gettext() is found,
1029         dnl use it.  But if this macro is used in GNU gettext, and GNU
1030         dnl gettext is already preinstalled in libintl, we update this
1031         dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
1032         if test "$gt_cv_func_gnugettext_libc" = "yes" \
1033            || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
1034                 && test "$PACKAGE" != gettext-runtime \
1035                 && test "$PACKAGE" != gettext-tools; }; then
1036           gt_use_preinstalled_gnugettext=yes
1037         else
1038           dnl Reset the values set by searching for libintl.
1039           LIBINTL=
1040           LTLIBINTL=
1041           INCINTL=
1042         fi
1044     ifelse(gt_included_intl, yes, [
1045         if test "$gt_use_preinstalled_gnugettext" != "yes"; then
1046           dnl GNU gettext is not found in the C library.
1047           dnl Fall back on included GNU gettext library.
1048           nls_cv_use_gnu_gettext=yes
1049         fi
1050       fi
1052       if test "$nls_cv_use_gnu_gettext" = "yes"; then
1053         dnl Mark actions used to generate GNU NLS library.
1054         BUILD_INCLUDED_LIBINTL=yes
1055         USE_INCLUDED_LIBINTL=yes
1056         LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
1057         LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
1058         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
1059       fi
1061       if test "$gt_use_preinstalled_gnugettext" = "yes" \
1062          || test "$nls_cv_use_gnu_gettext" = "yes"; then
1063         dnl Mark actions to use GNU gettext tools.
1064         CATOBJEXT=.gmo
1065       fi
1066     ])
1068     if test "$gt_use_preinstalled_gnugettext" = "yes" \
1069        || test "$nls_cv_use_gnu_gettext" = "yes"; then
1070       AC_DEFINE(ENABLE_NLS, 1,
1071         [Define to 1 if translation of program messages to the user's native language
1072    is requested.])
1073     else
1074       USE_NLS=no
1075     fi
1076   fi
1078   AC_MSG_CHECKING([whether to use NLS])
1079   AC_MSG_RESULT([$USE_NLS])
1080   if test "$USE_NLS" = "yes"; then
1081     AC_MSG_CHECKING([where the gettext function comes from])
1082     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1083       if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
1084         gt_source="external libintl"
1085       else
1086         gt_source="libc"
1087       fi
1088     else
1089       gt_source="included intl directory"
1090     fi
1091     AC_MSG_RESULT([$gt_source])
1092   fi
1094   if test "$USE_NLS" = "yes"; then
1096     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1097       if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
1098         AC_MSG_CHECKING([how to link with libintl])
1099         AC_MSG_RESULT([$LIBINTL])
1100         AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
1101       fi
1103       dnl For backward compatibility. Some packages may be using this.
1104       AC_DEFINE(HAVE_GETTEXT, 1,
1105        [Define if the GNU gettext() function is already present or preinstalled.])
1106       AC_DEFINE(HAVE_DCGETTEXT, 1,
1107        [Define if the GNU dcgettext() function is already present or preinstalled.])
1108     fi
1110     dnl We need to process the po/ directory.
1111     POSUB=po
1112   fi
1114   ifelse(gt_included_intl, yes, [
1115     dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
1116     dnl to 'yes' because some of the testsuite requires it.
1117     if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
1118       BUILD_INCLUDED_LIBINTL=yes
1119     fi
1121     dnl Make all variables we use known to autoconf.
1122     AC_SUBST(BUILD_INCLUDED_LIBINTL)
1123     AC_SUBST(USE_INCLUDED_LIBINTL)
1124     AC_SUBST(CATOBJEXT)
1126     dnl For backward compatibility. Some configure.ins may be using this.
1127     nls_cv_header_intl=
1128     nls_cv_header_libgt=
1130     dnl For backward compatibility. Some Makefiles may be using this.
1131     DATADIRNAME=share
1132     AC_SUBST(DATADIRNAME)
1134     dnl For backward compatibility. Some Makefiles may be using this.
1135     INSTOBJEXT=.mo
1136     AC_SUBST(INSTOBJEXT)
1138     dnl For backward compatibility. Some Makefiles may be using this.
1139     GENCAT=gencat
1140     AC_SUBST(GENCAT)
1142     dnl For backward compatibility. Some Makefiles may be using this.
1143     if test "$USE_INCLUDED_LIBINTL" = yes; then
1144       INTLOBJS="\$(GETTOBJS)"
1145     fi
1146     AC_SUBST(INTLOBJS)
1148     dnl Enable libtool support if the surrounding package wishes it.
1149     INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
1150     AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
1151   ])
1153   dnl For backward compatibility. Some Makefiles may be using this.
1154   INTLLIBS="$LIBINTL"
1155   AC_SUBST(INTLLIBS)
1157   dnl Make all documented variables known to autoconf.
1158   AC_SUBST(LIBINTL)
1159   AC_SUBST(LTLIBINTL)
1160   AC_SUBST(POSUB)
1164 dnl Checks for all prerequisites of the intl subdirectory,
1165 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
1166 dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
1167 AC_DEFUN([AM_INTL_SUBDIR],
1169   AC_REQUIRE([AC_PROG_INSTALL])dnl
1170   AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1171   AC_REQUIRE([AC_PROG_CC])dnl
1172   AC_REQUIRE([AC_CANONICAL_HOST])dnl
1173   AC_REQUIRE([AC_PROG_RANLIB])dnl
1174   AC_REQUIRE([AC_ISC_POSIX])dnl
1175   AC_REQUIRE([AC_HEADER_STDC])dnl
1176   AC_REQUIRE([AC_C_CONST])dnl
1177   AC_REQUIRE([AC_C_INLINE])dnl
1178   AC_REQUIRE([AC_TYPE_OFF_T])dnl
1179   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1180   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1181   AC_REQUIRE([AC_FUNC_MMAP])dnl
1182   AC_REQUIRE([jm_GLIBC21])dnl
1183   AC_REQUIRE([gt_INTDIV0])dnl
1184   AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
1185   AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
1186   AC_REQUIRE([gt_INTTYPES_PRI])dnl
1188   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
1189 stdlib.h string.h unistd.h sys/param.h])
1190   AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
1191 geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
1192 strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
1193 __fsetlocking])
1195   AM_ICONV
1196   AM_LANGINFO_CODESET
1197   if test $ac_cv_header_locale_h = yes; then
1198     AM_LC_MESSAGES
1199   fi
1201   dnl intl/plural.c is generated from intl/plural.y. It requires bison,
1202   dnl because plural.y uses bison specific features. It requires at least
1203   dnl bison-1.26 because earlier versions generate a plural.c that doesn't
1204   dnl compile.
1205   dnl bison is only needed for the maintainer (who touches plural.y). But in
1206   dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
1207   dnl the rule in general Makefile. Now, some people carelessly touch the
1208   dnl files or have a broken "make" program, hence the plural.c rule will
1209   dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
1210   dnl present or too old.
1211   AC_CHECK_PROGS([INTLBISON], [bison])
1212   if test -z "$INTLBISON"; then
1213     ac_verc_fail=yes
1214   else
1215     dnl Found it, now check the version.
1216     AC_MSG_CHECKING([version of bison])
1217 changequote(<<,>>)dnl
1218     ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
1219     case $ac_prog_version in
1220       '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1221       1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
1222 changequote([,])dnl
1223          ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1224       *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1225     esac
1226     AC_MSG_RESULT([$ac_prog_version])
1227   fi
1228   if test $ac_verc_fail = yes; then
1229     INTLBISON=:
1230   fi
1234 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
1235 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
1237 # po.m4 serial 1 (gettext-0.12)
1238 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
1239 dnl This file is free software, distributed under the terms of the GNU
1240 dnl General Public License.  As a special exception to the GNU General
1241 dnl Public License, this file may be distributed as part of a program
1242 dnl that contains a configuration script generated by Autoconf, under
1243 dnl the same distribution terms as the rest of that program.
1245 dnl This file can can be used in projects which are not available under
1246 dnl the GNU General Public License or the GNU Library General Public
1247 dnl License but which still want to provide support for the GNU gettext
1248 dnl functionality.
1249 dnl Please note that the actual code of the GNU gettext library is covered
1250 dnl by the GNU Library General Public License, and the rest of the GNU
1251 dnl gettext package package is covered by the GNU General Public License.
1252 dnl They are *not* in the public domain.
1254 dnl Authors:
1255 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1256 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1258 dnl Checks for all prerequisites of the po subdirectory.
1259 AC_DEFUN([AM_PO_SUBDIRS],
1261   AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1262   AC_REQUIRE([AC_PROG_INSTALL])dnl
1263   AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1264   AC_REQUIRE([AM_NLS])dnl
1266   dnl Perform the following tests also if --disable-nls has been given,
1267   dnl because they are needed for "make dist" to work.
1269   dnl Search for GNU msgfmt in the PATH.
1270   dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1271   dnl The second test excludes FreeBSD msgfmt.
1272   AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1273     [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
1274      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1275     :)
1276   AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1278   dnl Search for GNU xgettext 0.12 or newer in the PATH.
1279   dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1280   dnl The second test excludes FreeBSD xgettext.
1281   AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1282     [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
1283      (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)],
1284     :)
1285   dnl Remove leftover from FreeBSD xgettext call.
1286   rm -f messages.po
1288   dnl Search for GNU msgmerge 0.11 or newer in the PATH.
1289   AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
1290     [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
1292   dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1293   dnl Test whether we really found GNU msgfmt.
1294   if test "$GMSGFMT" != ":"; then
1295     dnl If it is no GNU msgfmt we define it as : so that the
1296     dnl Makefiles still can work.
1297     if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
1298        (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1299       : ;
1300     else
1301       GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
1302       AC_MSG_RESULT(
1303         [found $GMSGFMT program is not GNU msgfmt; ignore it])
1304       GMSGFMT=":"
1305     fi
1306   fi
1308   dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1309   dnl Test whether we really found GNU xgettext.
1310   if test "$XGETTEXT" != ":"; then
1311     dnl If it is no GNU xgettext we define it as : so that the
1312     dnl Makefiles still can work.
1313     if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
1314        (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
1315       : ;
1316     else
1317       AC_MSG_RESULT(
1318         [found xgettext program is not GNU xgettext; ignore it])
1319       XGETTEXT=":"
1320     fi
1321     dnl Remove leftover from FreeBSD xgettext call.
1322     rm -f messages.po
1323   fi
1325   AC_OUTPUT_COMMANDS([
1326     for ac_file in $CONFIG_FILES; do
1327       # Support "outfile[:infile[:infile...]]"
1328       case "$ac_file" in
1329         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1330       esac
1331       # PO directories have a Makefile.in generated from Makefile.in.in.
1332       case "$ac_file" in */Makefile.in)
1333         # Adjust a relative srcdir.
1334         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1335         ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1336         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1337         # In autoconf-2.13 it is called $ac_given_srcdir.
1338         # In autoconf-2.50 it is called $srcdir.
1339         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1340         case "$ac_given_srcdir" in
1341           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1342           /*) top_srcdir="$ac_given_srcdir" ;;
1343           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
1344         esac
1345         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
1346           rm -f "$ac_dir/POTFILES"
1347           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
1348           cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
1349           POMAKEFILEDEPS="POTFILES.in"
1350           # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
1351           # on $ac_dir but don't depend on user-specified configuration
1352           # parameters.
1353           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1354             # The LINGUAS file contains the set of available languages.
1355             if test -n "$OBSOLETE_ALL_LINGUAS"; then
1356               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1357             fi
1358             ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1359             # Hide the ALL_LINGUAS assigment from automake.
1360             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1361             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
1362           else
1363             # The set of available languages was given in configure.in.
1364             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
1365           fi
1366           case "$ac_given_srcdir" in
1367             .) srcdirpre= ;;
1368             *) srcdirpre='$(srcdir)/' ;;
1369           esac
1370           POFILES=
1371           GMOFILES=
1372           UPDATEPOFILES=
1373           DUMMYPOFILES=
1374           for lang in $ALL_LINGUAS; do
1375             POFILES="$POFILES $srcdirpre$lang.po"
1376             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1377             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1378             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1379           done
1380           # CATALOGS depends on both $ac_dir and the user's LINGUAS
1381           # environment variable.
1382           INST_LINGUAS=
1383           if test -n "$ALL_LINGUAS"; then
1384             for presentlang in $ALL_LINGUAS; do
1385               useit=no
1386               if test "%UNSET%" != "$LINGUAS"; then
1387                 desiredlanguages="$LINGUAS"
1388               else
1389                 desiredlanguages="$ALL_LINGUAS"
1390               fi
1391               for desiredlang in $desiredlanguages; do
1392                 # Use the presentlang catalog if desiredlang is
1393                 #   a. equal to presentlang, or
1394                 #   b. a variant of presentlang (because in this case,
1395                 #      presentlang can be used as a fallback for messages
1396                 #      which are not translated in the desiredlang catalog).
1397                 case "$desiredlang" in
1398                   "$presentlang"*) useit=yes;;
1399                 esac
1400               done
1401               if test $useit = yes; then
1402                 INST_LINGUAS="$INST_LINGUAS $presentlang"
1403               fi
1404             done
1405           fi
1406           CATALOGS=
1407           if test -n "$INST_LINGUAS"; then
1408             for lang in $INST_LINGUAS; do
1409               CATALOGS="$CATALOGS $lang.gmo"
1410             done
1411           fi
1412           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
1413           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"
1414           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
1415             if test -f "$f"; then
1416               case "$f" in
1417                 *.orig | *.bak | *~) ;;
1418                 *) cat "$f" >> "$ac_dir/Makefile" ;;
1419               esac
1420             fi
1421           done
1422         fi
1423         ;;
1424       esac
1425     done],
1426    [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
1427     # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
1428     # from automake.
1429     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
1430     # Capture the value of LINGUAS because we need it to compute CATALOGS.
1431     LINGUAS="${LINGUAS-%UNSET%}"
1432    ])
1435 # nls.m4 serial 1 (gettext-0.12)
1436 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
1437 dnl This file is free software, distributed under the terms of the GNU
1438 dnl General Public License.  As a special exception to the GNU General
1439 dnl Public License, this file may be distributed as part of a program
1440 dnl that contains a configuration script generated by Autoconf, under
1441 dnl the same distribution terms as the rest of that program.
1443 dnl This file can can be used in projects which are not available under
1444 dnl the GNU General Public License or the GNU Library General Public
1445 dnl License but which still want to provide support for the GNU gettext
1446 dnl functionality.
1447 dnl Please note that the actual code of the GNU gettext library is covered
1448 dnl by the GNU Library General Public License, and the rest of the GNU
1449 dnl gettext package package is covered by the GNU General Public License.
1450 dnl They are *not* in the public domain.
1452 dnl Authors:
1453 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1454 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1456 AC_DEFUN([AM_NLS],
1458   AC_MSG_CHECKING([whether NLS is requested])
1459   dnl Default is enabled NLS
1460   AC_ARG_ENABLE(nls,
1461     [  --disable-nls           do not use Native Language Support],
1462     USE_NLS=$enableval, USE_NLS=yes)
1463   AC_MSG_RESULT($USE_NLS)
1464   AC_SUBST(USE_NLS)
1467 AC_DEFUN([AM_MKINSTALLDIRS],
1469   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1470   dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
1471   dnl Try to locate it.
1472   MKINSTALLDIRS=
1473   if test -n "$ac_aux_dir"; then
1474     case "$ac_aux_dir" in
1475       /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
1476       *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
1477     esac
1478   fi
1479   if test -z "$MKINSTALLDIRS"; then
1480     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1481   fi
1482   AC_SUBST(MKINSTALLDIRS)
1485 # progtest.m4 serial 3 (gettext-0.12)
1486 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
1487 dnl This file is free software, distributed under the terms of the GNU
1488 dnl General Public License.  As a special exception to the GNU General
1489 dnl Public License, this file may be distributed as part of a program
1490 dnl that contains a configuration script generated by Autoconf, under
1491 dnl the same distribution terms as the rest of that program.
1493 dnl This file can can be used in projects which are not available under
1494 dnl the GNU General Public License or the GNU Library General Public
1495 dnl License but which still want to provide support for the GNU gettext
1496 dnl functionality.
1497 dnl Please note that the actual code of the GNU gettext library is covered
1498 dnl by the GNU Library General Public License, and the rest of the GNU
1499 dnl gettext package package is covered by the GNU General Public License.
1500 dnl They are *not* in the public domain.
1502 dnl Authors:
1503 dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
1505 # Search path for a program which passes the given test.
1507 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1508 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1509 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
1511 # Prepare PATH_SEPARATOR.
1512 # The user is always right.
1513 if test "${PATH_SEPARATOR+set}" != set; then
1514   echo "#! /bin/sh" >conf$$.sh
1515   echo  "exit 0"   >>conf$$.sh
1516   chmod +x conf$$.sh
1517   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1518     PATH_SEPARATOR=';'
1519   else
1520     PATH_SEPARATOR=:
1521   fi
1522   rm -f conf$$.sh
1525 # Find out how to test for executable files. Don't use a zero-byte file,
1526 # as systems may use methods other than mode bits to determine executability.
1527 cat >conf$$.file <<_ASEOF
1528 #! /bin/sh
1529 exit 0
1530 _ASEOF
1531 chmod +x conf$$.file
1532 if test -x conf$$.file >/dev/null 2>&1; then
1533   ac_executable_p="test -x"
1534 else
1535   ac_executable_p="test -f"
1537 rm -f conf$$.file
1539 # Extract the first word of "$2", so it can be a program name with args.
1540 set dummy $2; ac_word=[$]2
1541 AC_MSG_CHECKING([for $ac_word])
1542 AC_CACHE_VAL(ac_cv_path_$1,
1543 [case "[$]$1" in
1544   [[\\/]]* | ?:[[\\/]]*)
1545     ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1546     ;;
1547   *)
1548     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
1549     for ac_dir in ifelse([$5], , $PATH, [$5]); do
1550       IFS="$ac_save_IFS"
1551       test -z "$ac_dir" && ac_dir=.
1552       for ac_exec_ext in '' $ac_executable_extensions; do
1553         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
1554           if [$3]; then
1555             ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
1556             break 2
1557           fi
1558         fi
1559       done
1560     done
1561     IFS="$ac_save_IFS"
1562 dnl If no 4th arg is given, leave the cache variable unset,
1563 dnl so AC_PATH_PROGS will keep looking.
1564 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1565 ])dnl
1566     ;;
1567 esac])dnl
1568 $1="$ac_cv_path_$1"
1569 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1570   AC_MSG_RESULT([$]$1)
1571 else
1572   AC_MSG_RESULT(no)
1574 AC_SUBST($1)dnl
1577 # lib-prefix.m4 serial 2 (gettext-0.12)
1578 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
1579 dnl This file is free software, distributed under the terms of the GNU
1580 dnl General Public License.  As a special exception to the GNU General
1581 dnl Public License, this file may be distributed as part of a program
1582 dnl that contains a configuration script generated by Autoconf, under
1583 dnl the same distribution terms as the rest of that program.
1585 dnl From Bruno Haible.
1587 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1588 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1589 dnl require excessive bracketing.
1590 ifdef([AC_HELP_STRING],
1591 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1592 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1594 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1595 dnl to access previously installed libraries. The basic assumption is that
1596 dnl a user will want packages to use other packages he previously installed
1597 dnl with the same --prefix option.
1598 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1599 dnl libraries, but is otherwise very convenient.
1600 AC_DEFUN([AC_LIB_PREFIX],
1602   AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1603   AC_REQUIRE([AC_PROG_CC])
1604   AC_REQUIRE([AC_CANONICAL_HOST])
1605   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1606   dnl By default, look in $includedir and $libdir.
1607   use_additional=yes
1608   AC_LIB_WITH_FINAL_PREFIX([
1609     eval additional_includedir=\"$includedir\"
1610     eval additional_libdir=\"$libdir\"
1611   ])
1612   AC_LIB_ARG_WITH([lib-prefix],
1613 [  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1614   --without-lib-prefix    don't search for libraries in includedir and libdir],
1616     if test "X$withval" = "Xno"; then
1617       use_additional=no
1618     else
1619       if test "X$withval" = "X"; then
1620         AC_LIB_WITH_FINAL_PREFIX([
1621           eval additional_includedir=\"$includedir\"
1622           eval additional_libdir=\"$libdir\"
1623         ])
1624       else
1625         additional_includedir="$withval/include"
1626         additional_libdir="$withval/lib"
1627       fi
1628     fi
1630   if test $use_additional = yes; then
1631     dnl Potentially add $additional_includedir to $CPPFLAGS.
1632     dnl But don't add it
1633     dnl   1. if it's the standard /usr/include,
1634     dnl   2. if it's already present in $CPPFLAGS,
1635     dnl   3. if it's /usr/local/include and we are using GCC on Linux,
1636     dnl   4. if it doesn't exist as a directory.
1637     if test "X$additional_includedir" != "X/usr/include"; then
1638       haveit=
1639       for x in $CPPFLAGS; do
1640         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1641         if test "X$x" = "X-I$additional_includedir"; then
1642           haveit=yes
1643           break
1644         fi
1645       done
1646       if test -z "$haveit"; then
1647         if test "X$additional_includedir" = "X/usr/local/include"; then
1648           if test -n "$GCC"; then
1649             case $host_os in
1650               linux*) haveit=yes;;
1651             esac
1652           fi
1653         fi
1654         if test -z "$haveit"; then
1655           if test -d "$additional_includedir"; then
1656             dnl Really add $additional_includedir to $CPPFLAGS.
1657             CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1658           fi
1659         fi
1660       fi
1661     fi
1662     dnl Potentially add $additional_libdir to $LDFLAGS.
1663     dnl But don't add it
1664     dnl   1. if it's the standard /usr/lib,
1665     dnl   2. if it's already present in $LDFLAGS,
1666     dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
1667     dnl   4. if it doesn't exist as a directory.
1668     if test "X$additional_libdir" != "X/usr/lib"; then
1669       haveit=
1670       for x in $LDFLAGS; do
1671         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1672         if test "X$x" = "X-L$additional_libdir"; then
1673           haveit=yes
1674           break
1675         fi
1676       done
1677       if test -z "$haveit"; then
1678         if test "X$additional_libdir" = "X/usr/local/lib"; then
1679           if test -n "$GCC"; then
1680             case $host_os in
1681               linux*) haveit=yes;;
1682             esac
1683           fi
1684         fi
1685         if test -z "$haveit"; then
1686           if test -d "$additional_libdir"; then
1687             dnl Really add $additional_libdir to $LDFLAGS.
1688             LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1689           fi
1690         fi
1691       fi
1692     fi
1693   fi
1696 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1697 dnl acl_final_exec_prefix, containing the values to which $prefix and
1698 dnl $exec_prefix will expand at the end of the configure script.
1699 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1701   dnl Unfortunately, prefix and exec_prefix get only finally determined
1702   dnl at the end of configure.
1703   if test "X$prefix" = "XNONE"; then
1704     acl_final_prefix="$ac_default_prefix"
1705   else
1706     acl_final_prefix="$prefix"
1707   fi
1708   if test "X$exec_prefix" = "XNONE"; then
1709     acl_final_exec_prefix='${prefix}'
1710   else
1711     acl_final_exec_prefix="$exec_prefix"
1712   fi
1713   acl_save_prefix="$prefix"
1714   prefix="$acl_final_prefix"
1715   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1716   prefix="$acl_save_prefix"
1719 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1720 dnl variables prefix and exec_prefix bound to the values they will have
1721 dnl at the end of the configure script.
1722 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1724   acl_save_prefix="$prefix"
1725   prefix="$acl_final_prefix"
1726   acl_save_exec_prefix="$exec_prefix"
1727   exec_prefix="$acl_final_exec_prefix"
1728   $1
1729   exec_prefix="$acl_save_exec_prefix"
1730   prefix="$acl_save_prefix"
1733 # lib-link.m4 serial 4 (gettext-0.12)
1734 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
1735 dnl This file is free software, distributed under the terms of the GNU
1736 dnl General Public License.  As a special exception to the GNU General
1737 dnl Public License, this file may be distributed as part of a program
1738 dnl that contains a configuration script generated by Autoconf, under
1739 dnl the same distribution terms as the rest of that program.
1741 dnl From Bruno Haible.
1743 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1744 dnl the libraries corresponding to explicit and implicit dependencies.
1745 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1746 dnl augments the CPPFLAGS variable.
1747 AC_DEFUN([AC_LIB_LINKFLAGS],
1749   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1750   AC_REQUIRE([AC_LIB_RPATH])
1751   define([Name],[translit([$1],[./-], [___])])
1752   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1753                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1754   AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1755     AC_LIB_LINKFLAGS_BODY([$1], [$2])
1756     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1757     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1758     ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1759   ])
1760   LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1761   LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1762   INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1763   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1764   AC_SUBST([LIB]NAME)
1765   AC_SUBST([LTLIB]NAME)
1766   dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1767   dnl results of this search when this library appears as a dependency.
1768   HAVE_LIB[]NAME=yes
1769   undefine([Name])
1770   undefine([NAME])
1773 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
1774 dnl searches for libname and the libraries corresponding to explicit and
1775 dnl implicit dependencies, together with the specified include files and
1776 dnl the ability to compile and link the specified testcode. If found, it
1777 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
1778 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1779 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1780 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1781 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1783   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1784   AC_REQUIRE([AC_LIB_RPATH])
1785   define([Name],[translit([$1],[./-], [___])])
1786   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1787                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1789   dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1790   dnl accordingly.
1791   AC_LIB_LINKFLAGS_BODY([$1], [$2])
1793   dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1794   dnl because if the user has installed lib[]Name and not disabled its use
1795   dnl via --without-lib[]Name-prefix, he wants to use it.
1796   ac_save_CPPFLAGS="$CPPFLAGS"
1797   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1799   AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1800     ac_save_LIBS="$LIBS"
1801     LIBS="$LIBS $LIB[]NAME"
1802     AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
1803     LIBS="$ac_save_LIBS"
1804   ])
1805   if test "$ac_cv_lib[]Name" = yes; then
1806     HAVE_LIB[]NAME=yes
1807     AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
1808     AC_MSG_CHECKING([how to link with lib[]$1])
1809     AC_MSG_RESULT([$LIB[]NAME])
1810   else
1811     HAVE_LIB[]NAME=no
1812     dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1813     dnl $INC[]NAME either.
1814     CPPFLAGS="$ac_save_CPPFLAGS"
1815     LIB[]NAME=
1816     LTLIB[]NAME=
1817   fi
1818   AC_SUBST([HAVE_LIB]NAME)
1819   AC_SUBST([LIB]NAME)
1820   AC_SUBST([LTLIB]NAME)
1821   undefine([Name])
1822   undefine([NAME])
1825 dnl Determine the platform dependent parameters needed to use rpath:
1826 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
1827 dnl hardcode_direct, hardcode_minus_L.
1828 AC_DEFUN([AC_LIB_RPATH],
1830   AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
1831   AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
1832   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
1833   AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1834   AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
1835     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1836     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1837     . ./conftest.sh
1838     rm -f ./conftest.sh
1839     acl_cv_rpath=done
1840   ])
1841   wl="$acl_cv_wl"
1842   libext="$acl_cv_libext"
1843   shlibext="$acl_cv_shlibext"
1844   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1845   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1846   hardcode_direct="$acl_cv_hardcode_direct"
1847   hardcode_minus_L="$acl_cv_hardcode_minus_L"
1848   dnl Determine whether the user wants rpath handling at all.
1849   AC_ARG_ENABLE(rpath,
1850     [  --disable-rpath         do not hardcode runtime library paths],
1851     :, enable_rpath=yes)
1854 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1855 dnl the libraries corresponding to explicit and implicit dependencies.
1856 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1857 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1859   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1860                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1861   dnl By default, look in $includedir and $libdir.
1862   use_additional=yes
1863   AC_LIB_WITH_FINAL_PREFIX([
1864     eval additional_includedir=\"$includedir\"
1865     eval additional_libdir=\"$libdir\"
1866   ])
1867   AC_LIB_ARG_WITH([lib$1-prefix],
1868 [  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
1869   --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
1871     if test "X$withval" = "Xno"; then
1872       use_additional=no
1873     else
1874       if test "X$withval" = "X"; then
1875         AC_LIB_WITH_FINAL_PREFIX([
1876           eval additional_includedir=\"$includedir\"
1877           eval additional_libdir=\"$libdir\"
1878         ])
1879       else
1880         additional_includedir="$withval/include"
1881         additional_libdir="$withval/lib"
1882       fi
1883     fi
1885   dnl Search the library and its dependencies in $additional_libdir and
1886   dnl $LDFLAGS. Using breadth-first-seach.
1887   LIB[]NAME=
1888   LTLIB[]NAME=
1889   INC[]NAME=
1890   rpathdirs=
1891   ltrpathdirs=
1892   names_already_handled=
1893   names_next_round='$1 $2'
1894   while test -n "$names_next_round"; do
1895     names_this_round="$names_next_round"
1896     names_next_round=
1897     for name in $names_this_round; do
1898       already_handled=
1899       for n in $names_already_handled; do
1900         if test "$n" = "$name"; then
1901           already_handled=yes
1902           break
1903         fi
1904       done
1905       if test -z "$already_handled"; then
1906         names_already_handled="$names_already_handled $name"
1907         dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1908         dnl or AC_LIB_HAVE_LINKFLAGS call.
1909         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1910         eval value=\"\$HAVE_LIB$uppername\"
1911         if test -n "$value"; then
1912           if test "$value" = yes; then
1913             eval value=\"\$LIB$uppername\"
1914             test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1915             eval value=\"\$LTLIB$uppername\"
1916             test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1917           else
1918             dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1919             dnl that this library doesn't exist. So just drop it.
1920             :
1921           fi
1922         else
1923           dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1924           dnl and the already constructed $LIBNAME/$LTLIBNAME.
1925           found_dir=
1926           found_la=
1927           found_so=
1928           found_a=
1929           if test $use_additional = yes; then
1930             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
1931               found_dir="$additional_libdir"
1932               found_so="$additional_libdir/lib$name.$shlibext"
1933               if test -f "$additional_libdir/lib$name.la"; then
1934                 found_la="$additional_libdir/lib$name.la"
1935               fi
1936             else
1937               if test -f "$additional_libdir/lib$name.$libext"; then
1938                 found_dir="$additional_libdir"
1939                 found_a="$additional_libdir/lib$name.$libext"
1940                 if test -f "$additional_libdir/lib$name.la"; then
1941                   found_la="$additional_libdir/lib$name.la"
1942                 fi
1943               fi
1944             fi
1945           fi
1946           if test "X$found_dir" = "X"; then
1947             for x in $LDFLAGS $LTLIB[]NAME; do
1948               AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1949               case "$x" in
1950                 -L*)
1951                   dir=`echo "X$x" | sed -e 's/^X-L//'`
1952                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
1953                     found_dir="$dir"
1954                     found_so="$dir/lib$name.$shlibext"
1955                     if test -f "$dir/lib$name.la"; then
1956                       found_la="$dir/lib$name.la"
1957                     fi
1958                   else
1959                     if test -f "$dir/lib$name.$libext"; then
1960                       found_dir="$dir"
1961                       found_a="$dir/lib$name.$libext"
1962                       if test -f "$dir/lib$name.la"; then
1963                         found_la="$dir/lib$name.la"
1964                       fi
1965                     fi
1966                   fi
1967                   ;;
1968               esac
1969               if test "X$found_dir" != "X"; then
1970                 break
1971               fi
1972             done
1973           fi
1974           if test "X$found_dir" != "X"; then
1975             dnl Found the library.
1976             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1977             if test "X$found_so" != "X"; then
1978               dnl Linking with a shared library. We attempt to hardcode its
1979               dnl directory into the executable's runpath, unless it's the
1980               dnl standard /usr/lib.
1981               if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
1982                 dnl No hardcoding is needed.
1983                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1984               else
1985                 dnl Use an explicit option to hardcode DIR into the resulting
1986                 dnl binary.
1987                 dnl Potentially add DIR to ltrpathdirs.
1988                 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1989                 haveit=
1990                 for x in $ltrpathdirs; do
1991                   if test "X$x" = "X$found_dir"; then
1992                     haveit=yes
1993                     break
1994                   fi
1995                 done
1996                 if test -z "$haveit"; then
1997                   ltrpathdirs="$ltrpathdirs $found_dir"
1998                 fi
1999                 dnl The hardcoding into $LIBNAME is system dependent.
2000                 if test "$hardcode_direct" = yes; then
2001                   dnl Using DIR/libNAME.so during linking hardcodes DIR into the
2002                   dnl resulting binary.
2003                   LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2004                 else
2005                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
2006                     dnl Use an explicit option to hardcode DIR into the resulting
2007                     dnl binary.
2008                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2009                     dnl Potentially add DIR to rpathdirs.
2010                     dnl The rpathdirs will be appended to $LIBNAME at the end.
2011                     haveit=
2012                     for x in $rpathdirs; do
2013                       if test "X$x" = "X$found_dir"; then
2014                         haveit=yes
2015                         break
2016                       fi
2017                     done
2018                     if test -z "$haveit"; then
2019                       rpathdirs="$rpathdirs $found_dir"
2020                     fi
2021                   else
2022                     dnl Rely on "-L$found_dir".
2023                     dnl But don't add it if it's already contained in the LDFLAGS
2024                     dnl or the already constructed $LIBNAME
2025                     haveit=
2026                     for x in $LDFLAGS $LIB[]NAME; do
2027                       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2028                       if test "X$x" = "X-L$found_dir"; then
2029                         haveit=yes
2030                         break
2031                       fi
2032                     done
2033                     if test -z "$haveit"; then
2034                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
2035                     fi
2036                     if test "$hardcode_minus_L" != no; then
2037                       dnl FIXME: Not sure whether we should use
2038                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2039                       dnl here.
2040                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2041                     else
2042                       dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
2043                       dnl here, because this doesn't fit in flags passed to the
2044                       dnl compiler. So give up. No hardcoding. This affects only
2045                       dnl very old systems.
2046                       dnl FIXME: Not sure whether we should use
2047                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2048                       dnl here.
2049                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2050                     fi
2051                   fi
2052                 fi
2053               fi
2054             else
2055               if test "X$found_a" != "X"; then
2056                 dnl Linking with a static library.
2057                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
2058               else
2059                 dnl We shouldn't come here, but anyway it's good to have a
2060                 dnl fallback.
2061                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
2062               fi
2063             fi
2064             dnl Assume the include files are nearby.
2065             additional_includedir=
2066             case "$found_dir" in
2067               */lib | */lib/)
2068                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
2069                 additional_includedir="$basedir/include"
2070                 ;;
2071             esac
2072             if test "X$additional_includedir" != "X"; then
2073               dnl Potentially add $additional_includedir to $INCNAME.
2074               dnl But don't add it
2075               dnl   1. if it's the standard /usr/include,
2076               dnl   2. if it's /usr/local/include and we are using GCC on Linux,
2077               dnl   3. if it's already present in $CPPFLAGS or the already
2078               dnl      constructed $INCNAME,
2079               dnl   4. if it doesn't exist as a directory.
2080               if test "X$additional_includedir" != "X/usr/include"; then
2081                 haveit=
2082                 if test "X$additional_includedir" = "X/usr/local/include"; then
2083                   if test -n "$GCC"; then
2084                     case $host_os in
2085                       linux*) haveit=yes;;
2086                     esac
2087                   fi
2088                 fi
2089                 if test -z "$haveit"; then
2090                   for x in $CPPFLAGS $INC[]NAME; do
2091                     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2092                     if test "X$x" = "X-I$additional_includedir"; then
2093                       haveit=yes
2094                       break
2095                     fi
2096                   done
2097                   if test -z "$haveit"; then
2098                     if test -d "$additional_includedir"; then
2099                       dnl Really add $additional_includedir to $INCNAME.
2100                       INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
2101                     fi
2102                   fi
2103                 fi
2104               fi
2105             fi
2106             dnl Look for dependencies.
2107             if test -n "$found_la"; then
2108               dnl Read the .la file. It defines the variables
2109               dnl dlname, library_names, old_library, dependency_libs, current,
2110               dnl age, revision, installed, dlopen, dlpreopen, libdir.
2111               save_libdir="$libdir"
2112               case "$found_la" in
2113                 */* | *\\*) . "$found_la" ;;
2114                 *) . "./$found_la" ;;
2115               esac
2116               libdir="$save_libdir"
2117               dnl We use only dependency_libs.
2118               for dep in $dependency_libs; do
2119                 case "$dep" in
2120                   -L*)
2121                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
2122                     dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
2123                     dnl But don't add it
2124                     dnl   1. if it's the standard /usr/lib,
2125                     dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
2126                     dnl   3. if it's already present in $LDFLAGS or the already
2127                     dnl      constructed $LIBNAME,
2128                     dnl   4. if it doesn't exist as a directory.
2129                     if test "X$additional_libdir" != "X/usr/lib"; then
2130                       haveit=
2131                       if test "X$additional_libdir" = "X/usr/local/lib"; then
2132                         if test -n "$GCC"; then
2133                           case $host_os in
2134                             linux*) haveit=yes;;
2135                           esac
2136                         fi
2137                       fi
2138                       if test -z "$haveit"; then
2139                         haveit=
2140                         for x in $LDFLAGS $LIB[]NAME; do
2141                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2142                           if test "X$x" = "X-L$additional_libdir"; then
2143                             haveit=yes
2144                             break
2145                           fi
2146                         done
2147                         if test -z "$haveit"; then
2148                           if test -d "$additional_libdir"; then
2149                             dnl Really add $additional_libdir to $LIBNAME.
2150                             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
2151                           fi
2152                         fi
2153                         haveit=
2154                         for x in $LDFLAGS $LTLIB[]NAME; do
2155                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2156                           if test "X$x" = "X-L$additional_libdir"; then
2157                             haveit=yes
2158                             break
2159                           fi
2160                         done
2161                         if test -z "$haveit"; then
2162                           if test -d "$additional_libdir"; then
2163                             dnl Really add $additional_libdir to $LTLIBNAME.
2164                             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
2165                           fi
2166                         fi
2167                       fi
2168                     fi
2169                     ;;
2170                   -R*)
2171                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
2172                     if test "$enable_rpath" != no; then
2173                       dnl Potentially add DIR to rpathdirs.
2174                       dnl The rpathdirs will be appended to $LIBNAME at the end.
2175                       haveit=
2176                       for x in $rpathdirs; do
2177                         if test "X$x" = "X$dir"; then
2178                           haveit=yes
2179                           break
2180                         fi
2181                       done
2182                       if test -z "$haveit"; then
2183                         rpathdirs="$rpathdirs $dir"
2184                       fi
2185                       dnl Potentially add DIR to ltrpathdirs.
2186                       dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2187                       haveit=
2188                       for x in $ltrpathdirs; do
2189                         if test "X$x" = "X$dir"; then
2190                           haveit=yes
2191                           break
2192                         fi
2193                       done
2194                       if test -z "$haveit"; then
2195                         ltrpathdirs="$ltrpathdirs $dir"
2196                       fi
2197                     fi
2198                     ;;
2199                   -l*)
2200                     dnl Handle this in the next round.
2201                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
2202                     ;;
2203                   *.la)
2204                     dnl Handle this in the next round. Throw away the .la's
2205                     dnl directory; it is already contained in a preceding -L
2206                     dnl option.
2207                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
2208                     ;;
2209                   *)
2210                     dnl Most likely an immediate library name.
2211                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
2212                     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
2213                     ;;
2214                 esac
2215               done
2216             fi
2217           else
2218             dnl Didn't find the library; assume it is in the system directories
2219             dnl known to the linker and runtime loader. (All the system
2220             dnl directories known to the linker should also be known to the
2221             dnl runtime loader, otherwise the system is severely misconfigured.)
2222             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2223             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
2224           fi
2225         fi
2226       fi
2227     done
2228   done
2229   if test "X$rpathdirs" != "X"; then
2230     if test -n "$hardcode_libdir_separator"; then
2231       dnl Weird platform: only the last -rpath option counts, the user must
2232       dnl pass all path elements in one option. We can arrange that for a
2233       dnl single library, but not when more than one $LIBNAMEs are used.
2234       alldirs=
2235       for found_dir in $rpathdirs; do
2236         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
2237       done
2238       dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
2239       acl_save_libdir="$libdir"
2240       libdir="$alldirs"
2241       eval flag=\"$hardcode_libdir_flag_spec\"
2242       libdir="$acl_save_libdir"
2243       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2244     else
2245       dnl The -rpath options are cumulative.
2246       for found_dir in $rpathdirs; do
2247         acl_save_libdir="$libdir"
2248         libdir="$found_dir"
2249         eval flag=\"$hardcode_libdir_flag_spec\"
2250         libdir="$acl_save_libdir"
2251         LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2252       done
2253     fi
2254   fi
2255   if test "X$ltrpathdirs" != "X"; then
2256     dnl When using libtool, the option that works for both libraries and
2257     dnl executables is -R. The -R options are cumulative.
2258     for found_dir in $ltrpathdirs; do
2259       LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
2260     done
2261   fi
2264 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
2265 dnl unless already present in VAR.
2266 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
2267 dnl contains two or three consecutive elements that belong together.
2268 AC_DEFUN([AC_LIB_APPENDTOVAR],
2270   for element in [$2]; do
2271     haveit=
2272     for x in $[$1]; do
2273       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2274       if test "X$x" = "X$element"; then
2275         haveit=yes
2276         break
2277       fi
2278     done
2279     if test -z "$haveit"; then
2280       [$1]="${[$1]}${[$1]:+ }$element"
2281     fi
2282   done
2285 # lib-ld.m4 serial 2 (gettext-0.12)
2286 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
2287 dnl This file is free software, distributed under the terms of the GNU
2288 dnl General Public License.  As a special exception to the GNU General
2289 dnl Public License, this file may be distributed as part of a program
2290 dnl that contains a configuration script generated by Autoconf, under
2291 dnl the same distribution terms as the rest of that program.
2293 dnl Subroutines of libtool.m4,
2294 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
2295 dnl with libtool.m4.
2297 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
2298 AC_DEFUN([AC_LIB_PROG_LD_GNU],
2299 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
2300 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2301 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2302   acl_cv_prog_gnu_ld=yes
2303 else
2304   acl_cv_prog_gnu_ld=no
2305 fi])
2306 with_gnu_ld=$acl_cv_prog_gnu_ld
2309 dnl From libtool-1.4. Sets the variable LD.
2310 AC_DEFUN([AC_LIB_PROG_LD],
2311 [AC_ARG_WITH(gnu-ld,
2312 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
2313 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
2314 AC_REQUIRE([AC_PROG_CC])dnl
2315 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2316 # Prepare PATH_SEPARATOR.
2317 # The user is always right.
2318 if test "${PATH_SEPARATOR+set}" != set; then
2319   echo "#! /bin/sh" >conf$$.sh
2320   echo  "exit 0"   >>conf$$.sh
2321   chmod +x conf$$.sh
2322   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
2323     PATH_SEPARATOR=';'
2324   else
2325     PATH_SEPARATOR=:
2326   fi
2327   rm -f conf$$.sh
2329 ac_prog=ld
2330 if test "$GCC" = yes; then
2331   # Check if gcc -print-prog-name=ld gives a path.
2332   AC_MSG_CHECKING([for ld used by GCC])
2333   case $host in
2334   *-*-mingw*)
2335     # gcc leaves a trailing carriage return which upsets mingw
2336     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2337   *)
2338     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2339   esac
2340   case $ac_prog in
2341     # Accept absolute paths.
2342     [[\\/]* | [A-Za-z]:[\\/]*)]
2343       [re_direlt='/[^/][^/]*/\.\./']
2344       # Canonicalize the path of ld
2345       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2346       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2347         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2348       done
2349       test -z "$LD" && LD="$ac_prog"
2350       ;;
2351   "")
2352     # If it fails, then pretend we aren't using GCC.
2353     ac_prog=ld
2354     ;;
2355   *)
2356     # If it is relative, then search for the first ld in PATH.
2357     with_gnu_ld=unknown
2358     ;;
2359   esac
2360 elif test "$with_gnu_ld" = yes; then
2361   AC_MSG_CHECKING([for GNU ld])
2362 else
2363   AC_MSG_CHECKING([for non-GNU ld])
2365 AC_CACHE_VAL(acl_cv_path_LD,
2366 [if test -z "$LD"; then
2367   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2368   for ac_dir in $PATH; do
2369     test -z "$ac_dir" && ac_dir=.
2370     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2371       acl_cv_path_LD="$ac_dir/$ac_prog"
2372       # Check to see if the program is GNU ld.  I'd rather use --version,
2373       # but apparently some GNU ld's only accept -v.
2374       # Break only if it was the GNU/non-GNU ld that we prefer.
2375       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2376         test "$with_gnu_ld" != no && break
2377       else
2378         test "$with_gnu_ld" != yes && break
2379       fi
2380     fi
2381   done
2382   IFS="$ac_save_ifs"
2383 else
2384   acl_cv_path_LD="$LD" # Let the user override the test with a path.
2385 fi])
2386 LD="$acl_cv_path_LD"
2387 if test -n "$LD"; then
2388   AC_MSG_RESULT($LD)
2389 else
2390   AC_MSG_RESULT(no)
2392 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2393 AC_LIB_PROG_LD_GNU
2396 # iconv.m4 serial AM4 (gettext-0.11.3)
2397 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2398 dnl This file is free software, distributed under the terms of the GNU
2399 dnl General Public License.  As a special exception to the GNU General
2400 dnl Public License, this file may be distributed as part of a program
2401 dnl that contains a configuration script generated by Autoconf, under
2402 dnl the same distribution terms as the rest of that program.
2404 dnl From Bruno Haible.
2406 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
2408   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
2409   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2410   AC_REQUIRE([AC_LIB_RPATH])
2412   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2413   dnl accordingly.
2414   AC_LIB_LINKFLAGS_BODY([iconv])
2417 AC_DEFUN([AM_ICONV_LINK],
2419   dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
2420   dnl those with the standalone portable GNU libiconv installed).
2422   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2423   dnl accordingly.
2424   AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
2426   dnl Add $INCICONV to CPPFLAGS before performing the following checks,
2427   dnl because if the user has installed libiconv and not disabled its use
2428   dnl via --without-libiconv-prefix, he wants to use it. The first
2429   dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
2430   am_save_CPPFLAGS="$CPPFLAGS"
2431   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
2433   AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
2434     am_cv_func_iconv="no, consider installing GNU libiconv"
2435     am_cv_lib_iconv=no
2436     AC_TRY_LINK([#include <stdlib.h>
2437 #include <iconv.h>],
2438       [iconv_t cd = iconv_open("","");
2439        iconv(cd,NULL,NULL,NULL,NULL);
2440        iconv_close(cd);],
2441       am_cv_func_iconv=yes)
2442     if test "$am_cv_func_iconv" != yes; then
2443       am_save_LIBS="$LIBS"
2444       LIBS="$LIBS $LIBICONV"
2445       AC_TRY_LINK([#include <stdlib.h>
2446 #include <iconv.h>],
2447         [iconv_t cd = iconv_open("","");
2448          iconv(cd,NULL,NULL,NULL,NULL);
2449          iconv_close(cd);],
2450         am_cv_lib_iconv=yes
2451         am_cv_func_iconv=yes)
2452       LIBS="$am_save_LIBS"
2453     fi
2454   ])
2455   if test "$am_cv_func_iconv" = yes; then
2456     AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
2457   fi
2458   if test "$am_cv_lib_iconv" = yes; then
2459     AC_MSG_CHECKING([how to link with libiconv])
2460     AC_MSG_RESULT([$LIBICONV])
2461   else
2462     dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
2463     dnl either.
2464     CPPFLAGS="$am_save_CPPFLAGS"
2465     LIBICONV=
2466     LTLIBICONV=
2467   fi
2468   AC_SUBST(LIBICONV)
2469   AC_SUBST(LTLIBICONV)
2472 AC_DEFUN([AM_ICONV],
2474   AM_ICONV_LINK
2475   if test "$am_cv_func_iconv" = yes; then
2476     AC_MSG_CHECKING([for iconv declaration])
2477     AC_CACHE_VAL(am_cv_proto_iconv, [
2478       AC_TRY_COMPILE([
2479 #include <stdlib.h>
2480 #include <iconv.h>
2481 extern
2482 #ifdef __cplusplus
2484 #endif
2485 #if defined(__STDC__) || defined(__cplusplus)
2486 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
2487 #else
2488 size_t iconv();
2489 #endif
2490 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
2491       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);"])
2492     am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
2493     AC_MSG_RESULT([$]{ac_t:-
2494          }[$]am_cv_proto_iconv)
2495     AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
2496       [Define as const if the declaration of iconv() needs const.])
2497   fi
2500 # isc-posix.m4 serial 2 (gettext-0.11.2)
2501 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2502 dnl This file is free software, distributed under the terms of the GNU
2503 dnl General Public License.  As a special exception to the GNU General
2504 dnl Public License, this file may be distributed as part of a program
2505 dnl that contains a configuration script generated by Autoconf, under
2506 dnl the same distribution terms as the rest of that program.
2508 # This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
2510 # This test replaces the one in autoconf.
2511 # Currently this macro should have the same name as the autoconf macro
2512 # because gettext's gettext.m4 (distributed in the automake package)
2513 # still uses it.  Otherwise, the use in gettext.m4 makes autoheader
2514 # give these diagnostics:
2515 #   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
2516 #   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
2518 undefine([AC_ISC_POSIX])
2520 AC_DEFUN([AC_ISC_POSIX],
2521   [
2522     dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
2523     AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
2524   ]
2527 # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
2528 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2529 dnl This file is free software, distributed under the terms of the GNU
2530 dnl General Public License.  As a special exception to the GNU General
2531 dnl Public License, this file may be distributed as part of a program
2532 dnl that contains a configuration script generated by Autoconf, under
2533 dnl the same distribution terms as the rest of that program.
2535 # Test for the GNU C Library, version 2.1 or newer.
2536 # From Bruno Haible.
2538 AC_DEFUN([jm_GLIBC21],
2539   [
2540     AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
2541       ac_cv_gnu_library_2_1,
2542       [AC_EGREP_CPP([Lucky GNU user],
2543         [
2544 #include <features.h>
2545 #ifdef __GNU_LIBRARY__
2546  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
2547   Lucky GNU user
2548  #endif
2549 #endif
2550         ],
2551         ac_cv_gnu_library_2_1=yes,
2552         ac_cv_gnu_library_2_1=no)
2553       ]
2554     )
2555     AC_SUBST(GLIBC21)
2556     GLIBC21="$ac_cv_gnu_library_2_1"
2557   ]
2560 # intdiv0.m4 serial 1 (gettext-0.11.3)
2561 dnl Copyright (C) 2002 Free Software Foundation, Inc.
2562 dnl This file is free software, distributed under the terms of the GNU
2563 dnl General Public License.  As a special exception to the GNU General
2564 dnl Public License, this file may be distributed as part of a program
2565 dnl that contains a configuration script generated by Autoconf, under
2566 dnl the same distribution terms as the rest of that program.
2568 dnl From Bruno Haible.
2570 AC_DEFUN([gt_INTDIV0],
2572   AC_REQUIRE([AC_PROG_CC])dnl
2573   AC_REQUIRE([AC_CANONICAL_HOST])dnl
2575   AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
2576     gt_cv_int_divbyzero_sigfpe,
2577     [
2578       AC_TRY_RUN([
2579 #include <stdlib.h>
2580 #include <signal.h>
2582 static void
2583 #ifdef __cplusplus
2584 sigfpe_handler (int sig)
2585 #else
2586 sigfpe_handler (sig) int sig;
2587 #endif
2589   /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
2590   exit (sig != SIGFPE);
2593 int x = 1;
2594 int y = 0;
2595 int z;
2596 int nan;
2598 int main ()
2600   signal (SIGFPE, sigfpe_handler);
2601 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
2602 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
2603   signal (SIGTRAP, sigfpe_handler);
2604 #endif
2605 /* Linux/SPARC yields signal SIGILL.  */
2606 #if defined (__sparc__) && defined (__linux__)
2607   signal (SIGILL, sigfpe_handler);
2608 #endif
2610   z = x / y;
2611   nan = y / y;
2612   exit (1);
2614 ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
2615         [
2616           # Guess based on the CPU.
2617           case "$host_cpu" in
2618             alpha* | i[34567]86 | m68k | s390*)
2619               gt_cv_int_divbyzero_sigfpe="guessing yes";;
2620             *)
2621               gt_cv_int_divbyzero_sigfpe="guessing no";;
2622           esac
2623         ])
2624     ])
2625   case "$gt_cv_int_divbyzero_sigfpe" in
2626     *yes) value=1;;
2627     *) value=0;;
2628   esac
2629   AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
2630     [Define if integer division by zero raises signal SIGFPE.])
2633 # uintmax_t.m4 serial 7 (gettext-0.12)
2634 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
2635 dnl This file is free software, distributed under the terms of the GNU
2636 dnl General Public License.  As a special exception to the GNU General
2637 dnl Public License, this file may be distributed as part of a program
2638 dnl that contains a configuration script generated by Autoconf, under
2639 dnl the same distribution terms as the rest of that program.
2641 dnl From Paul Eggert.
2643 AC_PREREQ(2.13)
2645 # Define uintmax_t to 'unsigned long' or 'unsigned long long'
2646 # if it is not already defined in <stdint.h> or <inttypes.h>.
2648 AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
2650   AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
2651   AC_REQUIRE([jm_AC_HEADER_STDINT_H])
2652   if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
2653     AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
2654     test $ac_cv_type_unsigned_long_long = yes \
2655       && ac_type='unsigned long long' \
2656       || ac_type='unsigned long'
2657     AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
2658       [Define to unsigned long or unsigned long long
2659        if <stdint.h> and <inttypes.h> don't define.])
2660   else
2661     AC_DEFINE(HAVE_UINTMAX_T, 1,
2662       [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
2663   fi
2666 # inttypes_h.m4 serial 5 (gettext-0.12)
2667 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
2668 dnl This file is free software, distributed under the terms of the GNU
2669 dnl General Public License.  As a special exception to the GNU General
2670 dnl Public License, this file may be distributed as part of a program
2671 dnl that contains a configuration script generated by Autoconf, under
2672 dnl the same distribution terms as the rest of that program.
2674 dnl From Paul Eggert.
2676 # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
2677 # doesn't clash with <sys/types.h>, and declares uintmax_t.
2679 AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
2681   AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
2682   [AC_TRY_COMPILE(
2683     [#include <sys/types.h>
2684 #include <inttypes.h>],
2685     [uintmax_t i = (uintmax_t) -1;],
2686     jm_ac_cv_header_inttypes_h=yes,
2687     jm_ac_cv_header_inttypes_h=no)])
2688   if test $jm_ac_cv_header_inttypes_h = yes; then
2689     AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
2690       [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
2691        and declares uintmax_t. ])
2692   fi
2695 # stdint_h.m4 serial 3 (gettext-0.12)
2696 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
2697 dnl This file is free software, distributed under the terms of the GNU
2698 dnl General Public License.  As a special exception to the GNU General
2699 dnl Public License, this file may be distributed as part of a program
2700 dnl that contains a configuration script generated by Autoconf, under
2701 dnl the same distribution terms as the rest of that program.
2703 dnl From Paul Eggert.
2705 # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
2706 # doesn't clash with <sys/types.h>, and declares uintmax_t.
2708 AC_DEFUN([jm_AC_HEADER_STDINT_H],
2710   AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
2711   [AC_TRY_COMPILE(
2712     [#include <sys/types.h>
2713 #include <stdint.h>],
2714     [uintmax_t i = (uintmax_t) -1;],
2715     jm_ac_cv_header_stdint_h=yes,
2716     jm_ac_cv_header_stdint_h=no)])
2717   if test $jm_ac_cv_header_stdint_h = yes; then
2718     AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
2719       [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
2720        and declares uintmax_t. ])
2721   fi
2724 # ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
2725 dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
2726 dnl This file is free software, distributed under the terms of the GNU
2727 dnl General Public License.  As a special exception to the GNU General
2728 dnl Public License, this file may be distributed as part of a program
2729 dnl that contains a configuration script generated by Autoconf, under
2730 dnl the same distribution terms as the rest of that program.
2732 dnl From Paul Eggert.
2734 AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
2736   AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
2737   [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
2738     [unsigned long long ullmax = (unsigned long long) -1;
2739      return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
2740     ac_cv_type_unsigned_long_long=yes,
2741     ac_cv_type_unsigned_long_long=no)])
2742   if test $ac_cv_type_unsigned_long_long = yes; then
2743     AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
2744       [Define if you have the unsigned long long type.])
2745   fi
2748 # inttypes.m4 serial 1 (gettext-0.11.4)
2749 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2750 dnl This file is free software, distributed under the terms of the GNU
2751 dnl General Public License.  As a special exception to the GNU General
2752 dnl Public License, this file may be distributed as part of a program
2753 dnl that contains a configuration script generated by Autoconf, under
2754 dnl the same distribution terms as the rest of that program.
2756 dnl From Paul Eggert.
2758 # Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
2759 # <sys/types.h>.
2761 AC_DEFUN([gt_HEADER_INTTYPES_H],
2763   AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
2764   [
2765     AC_TRY_COMPILE(
2766       [#include <sys/types.h>
2767 #include <inttypes.h>],
2768       [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
2769   ])
2770   if test $gt_cv_header_inttypes_h = yes; then
2771     AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
2772       [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
2773   fi
2776 # inttypes-pri.m4 serial 1 (gettext-0.11.4)
2777 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2778 dnl This file is free software, distributed under the terms of the GNU
2779 dnl General Public License.  As a special exception to the GNU General
2780 dnl Public License, this file may be distributed as part of a program
2781 dnl that contains a configuration script generated by Autoconf, under
2782 dnl the same distribution terms as the rest of that program.
2784 dnl From Bruno Haible.
2786 # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
2787 # macros to non-string values.  This is the case on AIX 4.3.3.
2789 AC_DEFUN([gt_INTTYPES_PRI],
2791   AC_REQUIRE([gt_HEADER_INTTYPES_H])
2792   if test $gt_cv_header_inttypes_h = yes; then
2793     AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
2794       gt_cv_inttypes_pri_broken,
2795       [
2796         AC_TRY_COMPILE([#include <inttypes.h>
2797 #ifdef PRId32
2798 char *p = PRId32;
2799 #endif
2800 ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
2801       ])
2802   fi
2803   if test "$gt_cv_inttypes_pri_broken" = yes; then
2804     AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
2805       [Define if <inttypes.h> exists and defines unusable PRI* macros.])
2806   fi
2809 # codeset.m4 serial AM1 (gettext-0.10.40)
2810 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2811 dnl This file is free software, distributed under the terms of the GNU
2812 dnl General Public License.  As a special exception to the GNU General
2813 dnl Public License, this file may be distributed as part of a program
2814 dnl that contains a configuration script generated by Autoconf, under
2815 dnl the same distribution terms as the rest of that program.
2817 dnl From Bruno Haible.
2819 AC_DEFUN([AM_LANGINFO_CODESET],
2821   AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
2822     [AC_TRY_LINK([#include <langinfo.h>],
2823       [char* cs = nl_langinfo(CODESET);],
2824       am_cv_langinfo_codeset=yes,
2825       am_cv_langinfo_codeset=no)
2826     ])
2827   if test $am_cv_langinfo_codeset = yes; then
2828     AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
2829       [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
2830   fi
2833 # lcmessage.m4 serial 3 (gettext-0.11.3)
2834 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2835 dnl This file is free software, distributed under the terms of the GNU
2836 dnl General Public License.  As a special exception to the GNU General
2837 dnl Public License, this file may be distributed as part of a program
2838 dnl that contains a configuration script generated by Autoconf, under
2839 dnl the same distribution terms as the rest of that program.
2841 dnl This file can can be used in projects which are not available under
2842 dnl the GNU General Public License or the GNU Library General Public
2843 dnl License but which still want to provide support for the GNU gettext
2844 dnl functionality.
2845 dnl Please note that the actual code of the GNU gettext library is covered
2846 dnl by the GNU Library General Public License, and the rest of the GNU
2847 dnl gettext package package is covered by the GNU General Public License.
2848 dnl They are *not* in the public domain.
2850 dnl Authors:
2851 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
2853 # Check whether LC_MESSAGES is available in <locale.h>.
2855 AC_DEFUN([AM_LC_MESSAGES],
2857   AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
2858     [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
2859        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
2860   if test $am_cv_val_LC_MESSAGES = yes; then
2861     AC_DEFINE(HAVE_LC_MESSAGES, 1,
2862       [Define if your <locale.h> file defines LC_MESSAGES.])
2863   fi
2867 # Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
2869 # This program is free software; you can redistribute it and/or modify
2870 # it under the terms of the GNU General Public License as published by
2871 # the Free Software Foundation; either version 2, or (at your option)
2872 # any later version.
2874 # This program is distributed in the hope that it will be useful,
2875 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2876 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2877 # GNU General Public License for more details.
2879 # You should have received a copy of the GNU General Public License
2880 # along with this program; if not, write to the Free Software
2881 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2882 # 02111-1307, USA.
2884 # serial 3
2886 AC_PREREQ(2.50)
2888 # AM_PROG_LEX
2889 # -----------
2890 # Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
2891 # "missing" invocation, for better error output.
2892 AC_DEFUN([AM_PROG_LEX],
2893 [AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
2894 AC_REQUIRE([AC_PROG_LEX])dnl
2895 if test "$LEX" = :; then
2896   LEX=${am_missing_run}flex
2897 fi])