1 dnl aclocal.m4 generated automatically by aclocal 1.4-p6
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 # gettext.m4 serial 20 (gettext-0.12)
14 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
15 dnl This file is free software, distributed under the terms of the GNU
16 dnl General Public License. As a special exception to the GNU General
17 dnl Public License, this file may be distributed as part of a program
18 dnl that contains a configuration script generated by Autoconf, under
19 dnl the same distribution terms as the rest of that program.
21 dnl This file can can be used in projects which are not available under
22 dnl the GNU General Public License or the GNU Library General Public
23 dnl License but which still want to provide support for the GNU gettext
25 dnl Please note that the actual code of the GNU gettext library is covered
26 dnl by the GNU Library General Public License, and the rest of the GNU
27 dnl gettext package package is covered by the GNU General Public License.
28 dnl They are *not* in the public domain.
31 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
32 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
34 dnl Macro to add for using GNU gettext.
36 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
37 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
38 dnl default (if it is not specified or empty) is 'no-libtool'.
39 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
40 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
41 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
42 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
43 dnl depending on --{enable,disable}-{shared,static} and on the presence of
44 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
45 dnl $(top_builddir)/intl/libintl.a will be created.
46 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
47 dnl implementations (in libc or libintl) without the ngettext() function
48 dnl will be ignored. If NEEDSYMBOL is specified and is
49 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
50 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
51 dnl INTLDIR is used to find the intl libraries. If empty,
52 dnl the value `$(top_builddir)/intl/' is used.
54 dnl The result of the configuration is one of three cases:
55 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
57 dnl Catalog format: GNU --> install in $(datadir)
58 dnl Catalog extension: .mo after installation, .gmo in source tree
59 dnl 2) GNU gettext has been found in the system's C library.
60 dnl Catalog format: GNU --> install in $(datadir)
61 dnl Catalog extension: .mo after installation, .gmo in source tree
62 dnl 3) No internationalization, always use English msgid.
63 dnl Catalog format: none
64 dnl Catalog extension: none
65 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
66 dnl The use of .gmo is historical (it was needed to avoid overwriting the
67 dnl GNU format catalogs when building on a platform with an X/Open gettext),
68 dnl but we keep it in order not to force irrelevant filename changes on the
71 AC_DEFUN([AM_GNU_GETTEXT],
73 dnl Argument checking.
74 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
75 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
77 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
78 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
80 define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
81 define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
83 AC_REQUIRE([AM_PO_SUBDIRS])dnl
84 ifelse(gt_included_intl, yes, [
85 AC_REQUIRE([AM_INTL_SUBDIR])dnl
88 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
89 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
90 AC_REQUIRE([AC_LIB_RPATH])
92 dnl Sometimes libintl requires libiconv, so first search for libiconv.
93 dnl Ideally we would do this search only after the
94 dnl if test "$USE_NLS" = "yes"; then
95 dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
96 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
97 dnl the configure script would need to contain the same shell code
98 dnl again, outside any 'if'. There are two solutions:
99 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
100 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
101 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
102 dnl documented, we avoid it.
103 ifelse(gt_included_intl, yes, , [
104 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
110 ifelse(gt_included_intl, yes, [
111 BUILD_INCLUDED_LIBINTL=no
112 USE_INCLUDED_LIBINTL=no
118 dnl If we use NLS figure out what method
119 if test "$USE_NLS" = "yes"; then
120 gt_use_preinstalled_gnugettext=no
121 ifelse(gt_included_intl, yes, [
122 AC_MSG_CHECKING([whether included gettext is requested])
123 AC_ARG_WITH(included-gettext,
124 [ --with-included-gettext use the GNU gettext library included here],
125 nls_cv_force_use_gnu_gettext=$withval,
126 nls_cv_force_use_gnu_gettext=no)
127 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
129 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
130 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
132 dnl User does not insist on using GNU NLS library. Figure out what
133 dnl to use. If GNU gettext is available we use this. Else we have
134 dnl to fall back to GNU NLS library.
136 dnl Add a version number to the cache macros.
137 define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
138 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
139 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
141 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
142 [AC_TRY_LINK([#include <libintl.h>
143 ]ifelse([$2], [need-formatstring-macros],
144 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
145 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
148 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
150 ], [])[extern int _nl_msg_cat_cntr;
151 extern int *_nl_domain_bindings;],
152 [bindtextdomain ("", "");
153 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
154 gt_cv_func_gnugettext_libc=yes,
155 gt_cv_func_gnugettext_libc=no)])
157 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
158 dnl Sometimes libintl requires libiconv, so first search for libiconv.
159 ifelse(gt_included_intl, yes, , [
162 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
163 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
164 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
165 dnl even if libiconv doesn't exist.
166 AC_LIB_LINKFLAGS_BODY([intl])
167 AC_CACHE_CHECK([for GNU gettext in libintl],
168 gt_cv_func_gnugettext_libintl,
169 [gt_save_CPPFLAGS="$CPPFLAGS"
170 CPPFLAGS="$CPPFLAGS $INCINTL"
172 LIBS="$LIBS $LIBINTL"
173 dnl Now see whether libintl exists and does not depend on libiconv.
174 AC_TRY_LINK([#include <libintl.h>
175 ]ifelse([$2], [need-formatstring-macros],
176 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
177 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
180 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
182 ], [])[extern int _nl_msg_cat_cntr;
187 const char *_nl_expand_alias ();],
188 [bindtextdomain ("", "");
189 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
190 gt_cv_func_gnugettext_libintl=yes,
191 gt_cv_func_gnugettext_libintl=no)
192 dnl Now see whether libintl exists and depends on libiconv.
193 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
194 LIBS="$LIBS $LIBICONV"
195 AC_TRY_LINK([#include <libintl.h>
196 ]ifelse([$2], [need-formatstring-macros],
197 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
198 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
201 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
203 ], [])[extern int _nl_msg_cat_cntr;
208 const char *_nl_expand_alias ();],
209 [bindtextdomain ("", "");
210 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
211 [LIBINTL="$LIBINTL $LIBICONV"
212 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
213 gt_cv_func_gnugettext_libintl=yes
216 CPPFLAGS="$gt_save_CPPFLAGS"
217 LIBS="$gt_save_LIBS"])
220 dnl If an already present or preinstalled GNU gettext() is found,
221 dnl use it. But if this macro is used in GNU gettext, and GNU
222 dnl gettext is already preinstalled in libintl, we update this
223 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
224 if test "$gt_cv_func_gnugettext_libc" = "yes" \
225 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
226 && test "$PACKAGE" != gettext-runtime \
227 && test "$PACKAGE" != gettext-tools; }; then
228 gt_use_preinstalled_gnugettext=yes
230 dnl Reset the values set by searching for libintl.
236 ifelse(gt_included_intl, yes, [
237 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
238 dnl GNU gettext is not found in the C library.
239 dnl Fall back on included GNU gettext library.
240 nls_cv_use_gnu_gettext=yes
244 if test "$nls_cv_use_gnu_gettext" = "yes"; then
245 dnl Mark actions used to generate GNU NLS library.
246 BUILD_INCLUDED_LIBINTL=yes
247 USE_INCLUDED_LIBINTL=yes
248 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
249 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
250 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
253 if test "$gt_use_preinstalled_gnugettext" = "yes" \
254 || test "$nls_cv_use_gnu_gettext" = "yes"; then
255 dnl Mark actions to use GNU gettext tools.
260 if test "$gt_use_preinstalled_gnugettext" = "yes" \
261 || test "$nls_cv_use_gnu_gettext" = "yes"; then
262 AC_DEFINE(ENABLE_NLS, 1,
263 [Define to 1 if translation of program messages to the user's native language
270 AC_MSG_CHECKING([whether to use NLS])
271 AC_MSG_RESULT([$USE_NLS])
272 if test "$USE_NLS" = "yes"; then
273 AC_MSG_CHECKING([where the gettext function comes from])
274 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
275 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
276 gt_source="external libintl"
281 gt_source="included intl directory"
283 AC_MSG_RESULT([$gt_source])
286 if test "$USE_NLS" = "yes"; then
288 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
289 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
290 AC_MSG_CHECKING([how to link with libintl])
291 AC_MSG_RESULT([$LIBINTL])
292 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
295 dnl For backward compatibility. Some packages may be using this.
296 AC_DEFINE(HAVE_GETTEXT, 1,
297 [Define if the GNU gettext() function is already present or preinstalled.])
298 AC_DEFINE(HAVE_DCGETTEXT, 1,
299 [Define if the GNU dcgettext() function is already present or preinstalled.])
302 dnl We need to process the po/ directory.
306 ifelse(gt_included_intl, yes, [
307 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
308 dnl to 'yes' because some of the testsuite requires it.
309 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
310 BUILD_INCLUDED_LIBINTL=yes
313 dnl Make all variables we use known to autoconf.
314 AC_SUBST(BUILD_INCLUDED_LIBINTL)
315 AC_SUBST(USE_INCLUDED_LIBINTL)
318 dnl For backward compatibility. Some configure.ins may be using this.
322 dnl For backward compatibility. Some Makefiles may be using this.
324 AC_SUBST(DATADIRNAME)
326 dnl For backward compatibility. Some Makefiles may be using this.
330 dnl For backward compatibility. Some Makefiles may be using this.
334 dnl For backward compatibility. Some Makefiles may be using this.
335 if test "$USE_INCLUDED_LIBINTL" = yes; then
336 INTLOBJS="\$(GETTOBJS)"
340 dnl Enable libtool support if the surrounding package wishes it.
341 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
342 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
345 dnl For backward compatibility. Some Makefiles may be using this.
349 dnl Make all documented variables known to autoconf.
356 dnl Checks for all prerequisites of the intl subdirectory,
357 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
358 dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
359 AC_DEFUN([AM_INTL_SUBDIR],
361 AC_REQUIRE([AC_PROG_INSTALL])dnl
362 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
363 AC_REQUIRE([AC_PROG_CC])dnl
364 AC_REQUIRE([AC_CANONICAL_HOST])dnl
365 AC_REQUIRE([AC_PROG_RANLIB])dnl
366 AC_REQUIRE([AC_ISC_POSIX])dnl
367 AC_REQUIRE([AC_HEADER_STDC])dnl
368 AC_REQUIRE([AC_C_CONST])dnl
369 AC_REQUIRE([AC_C_INLINE])dnl
370 AC_REQUIRE([AC_TYPE_OFF_T])dnl
371 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
372 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
373 AC_REQUIRE([AC_FUNC_MMAP])dnl
374 AC_REQUIRE([jm_GLIBC21])dnl
375 AC_REQUIRE([gt_INTDIV0])dnl
376 AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
377 AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
378 AC_REQUIRE([gt_INTTYPES_PRI])dnl
380 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
381 stdlib.h string.h unistd.h sys/param.h])
382 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
383 geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
384 strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
389 if test $ac_cv_header_locale_h = yes; then
393 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
394 dnl because plural.y uses bison specific features. It requires at least
395 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
397 dnl bison is only needed for the maintainer (who touches plural.y). But in
398 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
399 dnl the rule in general Makefile. Now, some people carelessly touch the
400 dnl files or have a broken "make" program, hence the plural.c rule will
401 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
402 dnl present or too old.
403 AC_CHECK_PROGS([INTLBISON], [bison])
404 if test -z "$INTLBISON"; then
407 dnl Found it, now check the version.
408 AC_MSG_CHECKING([version of bison])
409 changequote(<<,>>)dnl
410 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
411 case $ac_prog_version in
412 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
413 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
415 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
416 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
418 AC_MSG_RESULT([$ac_prog_version])
420 if test $ac_verc_fail = yes; then
426 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
427 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
429 # po.m4 serial 1 (gettext-0.12)
430 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
431 dnl This file is free software, distributed under the terms of the GNU
432 dnl General Public License. As a special exception to the GNU General
433 dnl Public License, this file may be distributed as part of a program
434 dnl that contains a configuration script generated by Autoconf, under
435 dnl the same distribution terms as the rest of that program.
437 dnl This file can can be used in projects which are not available under
438 dnl the GNU General Public License or the GNU Library General Public
439 dnl License but which still want to provide support for the GNU gettext
441 dnl Please note that the actual code of the GNU gettext library is covered
442 dnl by the GNU Library General Public License, and the rest of the GNU
443 dnl gettext package package is covered by the GNU General Public License.
444 dnl They are *not* in the public domain.
447 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
448 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
450 dnl Checks for all prerequisites of the po subdirectory.
451 AC_DEFUN([AM_PO_SUBDIRS],
453 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
454 AC_REQUIRE([AC_PROG_INSTALL])dnl
455 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
456 AC_REQUIRE([AM_NLS])dnl
458 dnl Perform the following tests also if --disable-nls has been given,
459 dnl because they are needed for "make dist" to work.
461 dnl Search for GNU msgfmt in the PATH.
462 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
463 dnl The second test excludes FreeBSD msgfmt.
464 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
465 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
466 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
468 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
470 dnl Search for GNU xgettext 0.12 or newer in the PATH.
471 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
472 dnl The second test excludes FreeBSD xgettext.
473 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
474 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
475 (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)],
477 dnl Remove leftover from FreeBSD xgettext call.
480 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
481 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
482 [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
484 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
485 dnl Test whether we really found GNU msgfmt.
486 if test "$GMSGFMT" != ":"; then
487 dnl If it is no GNU msgfmt we define it as : so that the
488 dnl Makefiles still can work.
489 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
490 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
493 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
495 [found $GMSGFMT program is not GNU msgfmt; ignore it])
500 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
501 dnl Test whether we really found GNU xgettext.
502 if test "$XGETTEXT" != ":"; then
503 dnl If it is no GNU xgettext we define it as : so that the
504 dnl Makefiles still can work.
505 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
506 (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
510 [found xgettext program is not GNU xgettext; ignore it])
513 dnl Remove leftover from FreeBSD xgettext call.
518 for ac_file in $CONFIG_FILES; do
519 # Support "outfile[:infile[:infile...]]"
521 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
523 # PO directories have a Makefile.in generated from Makefile.in.in.
524 case "$ac_file" in */Makefile.in)
525 # Adjust a relative srcdir.
526 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
527 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
528 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
529 # In autoconf-2.13 it is called $ac_given_srcdir.
530 # In autoconf-2.50 it is called $srcdir.
531 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
532 case "$ac_given_srcdir" in
533 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
534 /*) top_srcdir="$ac_given_srcdir" ;;
535 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
537 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
538 rm -f "$ac_dir/POTFILES"
539 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
540 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
541 POMAKEFILEDEPS="POTFILES.in"
542 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
543 # on $ac_dir but don't depend on user-specified configuration
545 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
546 # The LINGUAS file contains the set of available languages.
547 if test -n "$OBSOLETE_ALL_LINGUAS"; then
548 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
550 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
551 # Hide the ALL_LINGUAS assigment from automake.
552 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
553 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
555 # The set of available languages was given in configure.in.
556 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
558 case "$ac_given_srcdir" in
560 *) srcdirpre='$(srcdir)/' ;;
566 for lang in $ALL_LINGUAS; do
567 POFILES="$POFILES $srcdirpre$lang.po"
568 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
569 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
570 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
572 # CATALOGS depends on both $ac_dir and the user's LINGUAS
573 # environment variable.
575 if test -n "$ALL_LINGUAS"; then
576 for presentlang in $ALL_LINGUAS; do
578 if test "%UNSET%" != "$LINGUAS"; then
579 desiredlanguages="$LINGUAS"
581 desiredlanguages="$ALL_LINGUAS"
583 for desiredlang in $desiredlanguages; do
584 # Use the presentlang catalog if desiredlang is
585 # a. equal to presentlang, or
586 # b. a variant of presentlang (because in this case,
587 # presentlang can be used as a fallback for messages
588 # which are not translated in the desiredlang catalog).
589 case "$desiredlang" in
590 "$presentlang"*) useit=yes;;
593 if test $useit = yes; then
594 INST_LINGUAS="$INST_LINGUAS $presentlang"
599 if test -n "$INST_LINGUAS"; then
600 for lang in $INST_LINGUAS; do
601 CATALOGS="$CATALOGS $lang.gmo"
604 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
605 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"
606 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
607 if test -f "$f"; then
609 *.orig | *.bak | *~) ;;
610 *) cat "$f" >> "$ac_dir/Makefile" ;;
618 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
619 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
621 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
622 # Capture the value of LINGUAS because we need it to compute CATALOGS.
623 LINGUAS="${LINGUAS-%UNSET%}"
627 # nls.m4 serial 1 (gettext-0.12)
628 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
629 dnl This file is free software, distributed under the terms of the GNU
630 dnl General Public License. As a special exception to the GNU General
631 dnl Public License, this file may be distributed as part of a program
632 dnl that contains a configuration script generated by Autoconf, under
633 dnl the same distribution terms as the rest of that program.
635 dnl This file can can be used in projects which are not available under
636 dnl the GNU General Public License or the GNU Library General Public
637 dnl License but which still want to provide support for the GNU gettext
639 dnl Please note that the actual code of the GNU gettext library is covered
640 dnl by the GNU Library General Public License, and the rest of the GNU
641 dnl gettext package package is covered by the GNU General Public License.
642 dnl They are *not* in the public domain.
645 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
646 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
650 AC_MSG_CHECKING([whether NLS is requested])
651 dnl Default is enabled NLS
653 [ --disable-nls do not use Native Language Support],
654 USE_NLS=$enableval, USE_NLS=yes)
655 AC_MSG_RESULT($USE_NLS)
659 AC_DEFUN([AM_MKINSTALLDIRS],
661 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
662 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
663 dnl Try to locate it.
665 if test -n "$ac_aux_dir"; then
666 case "$ac_aux_dir" in
667 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
668 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
671 if test -z "$MKINSTALLDIRS"; then
672 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
674 AC_SUBST(MKINSTALLDIRS)
677 # progtest.m4 serial 3 (gettext-0.12)
678 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
679 dnl This file is free software, distributed under the terms of the GNU
680 dnl General Public License. As a special exception to the GNU General
681 dnl Public License, this file may be distributed as part of a program
682 dnl that contains a configuration script generated by Autoconf, under
683 dnl the same distribution terms as the rest of that program.
685 dnl This file can can be used in projects which are not available under
686 dnl the GNU General Public License or the GNU Library General Public
687 dnl License but which still want to provide support for the GNU gettext
689 dnl Please note that the actual code of the GNU gettext library is covered
690 dnl by the GNU Library General Public License, and the rest of the GNU
691 dnl gettext package package is covered by the GNU General Public License.
692 dnl They are *not* in the public domain.
695 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
697 # Search path for a program which passes the given test.
699 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
700 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
701 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
703 # Prepare PATH_SEPARATOR.
704 # The user is always right.
705 if test "${PATH_SEPARATOR+set}" != set; then
706 echo "#! /bin/sh" >conf$$.sh
707 echo "exit 0" >>conf$$.sh
709 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
717 # Find out how to test for executable files. Don't use a zero-byte file,
718 # as systems may use methods other than mode bits to determine executability.
719 cat >conf$$.file <<_ASEOF
724 if test -x conf$$.file >/dev/null 2>&1; then
725 ac_executable_p="test -x"
727 ac_executable_p="test -f"
731 # Extract the first word of "$2", so it can be a program name with args.
732 set dummy $2; ac_word=[$]2
733 AC_MSG_CHECKING([for $ac_word])
734 AC_CACHE_VAL(ac_cv_path_$1,
736 [[\\/]]* | ?:[[\\/]]*)
737 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
740 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
741 for ac_dir in ifelse([$5], , $PATH, [$5]); do
743 test -z "$ac_dir" && ac_dir=.
744 for ac_exec_ext in '' $ac_executable_extensions; do
745 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
747 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
754 dnl If no 4th arg is given, leave the cache variable unset,
755 dnl so AC_PATH_PROGS will keep looking.
756 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
761 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
769 # lib-link.m4 serial 4 (gettext-0.12)
770 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
771 dnl This file is free software, distributed under the terms of the GNU
772 dnl General Public License. As a special exception to the GNU General
773 dnl Public License, this file may be distributed as part of a program
774 dnl that contains a configuration script generated by Autoconf, under
775 dnl the same distribution terms as the rest of that program.
777 dnl From Bruno Haible.
779 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
780 dnl the libraries corresponding to explicit and implicit dependencies.
781 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
782 dnl augments the CPPFLAGS variable.
783 AC_DEFUN([AC_LIB_LINKFLAGS],
785 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
786 AC_REQUIRE([AC_LIB_RPATH])
787 define([Name],[translit([$1],[./-], [___])])
788 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
789 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
790 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
791 AC_LIB_LINKFLAGS_BODY([$1], [$2])
792 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
793 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
794 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
796 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
797 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
798 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
799 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
801 AC_SUBST([LTLIB]NAME)
802 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
803 dnl results of this search when this library appears as a dependency.
809 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
810 dnl searches for libname and the libraries corresponding to explicit and
811 dnl implicit dependencies, together with the specified include files and
812 dnl the ability to compile and link the specified testcode. If found, it
813 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
814 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
815 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
816 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
817 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
819 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
820 AC_REQUIRE([AC_LIB_RPATH])
821 define([Name],[translit([$1],[./-], [___])])
822 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
823 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
825 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
827 AC_LIB_LINKFLAGS_BODY([$1], [$2])
829 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
830 dnl because if the user has installed lib[]Name and not disabled its use
831 dnl via --without-lib[]Name-prefix, he wants to use it.
832 ac_save_CPPFLAGS="$CPPFLAGS"
833 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
835 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
837 LIBS="$LIBS $LIB[]NAME"
838 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
841 if test "$ac_cv_lib[]Name" = yes; then
843 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
844 AC_MSG_CHECKING([how to link with lib[]$1])
845 AC_MSG_RESULT([$LIB[]NAME])
848 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
849 dnl $INC[]NAME either.
850 CPPFLAGS="$ac_save_CPPFLAGS"
854 AC_SUBST([HAVE_LIB]NAME)
856 AC_SUBST([LTLIB]NAME)
861 dnl Determine the platform dependent parameters needed to use rpath:
862 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
863 dnl hardcode_direct, hardcode_minus_L.
864 AC_DEFUN([AC_LIB_RPATH],
866 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
867 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
868 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
869 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
870 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
871 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
872 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
878 libext="$acl_cv_libext"
879 shlibext="$acl_cv_shlibext"
880 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
881 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
882 hardcode_direct="$acl_cv_hardcode_direct"
883 hardcode_minus_L="$acl_cv_hardcode_minus_L"
884 dnl Determine whether the user wants rpath handling at all.
886 [ --disable-rpath do not hardcode runtime library paths],
890 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
891 dnl the libraries corresponding to explicit and implicit dependencies.
892 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
893 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
895 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
896 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
897 dnl By default, look in $includedir and $libdir.
899 AC_LIB_WITH_FINAL_PREFIX([
900 eval additional_includedir=\"$includedir\"
901 eval additional_libdir=\"$libdir\"
903 AC_LIB_ARG_WITH([lib$1-prefix],
904 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
905 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
907 if test "X$withval" = "Xno"; then
910 if test "X$withval" = "X"; then
911 AC_LIB_WITH_FINAL_PREFIX([
912 eval additional_includedir=\"$includedir\"
913 eval additional_libdir=\"$libdir\"
916 additional_includedir="$withval/include"
917 additional_libdir="$withval/lib"
921 dnl Search the library and its dependencies in $additional_libdir and
922 dnl $LDFLAGS. Using breadth-first-seach.
928 names_already_handled=
929 names_next_round='$1 $2'
930 while test -n "$names_next_round"; do
931 names_this_round="$names_next_round"
933 for name in $names_this_round; do
935 for n in $names_already_handled; do
936 if test "$n" = "$name"; then
941 if test -z "$already_handled"; then
942 names_already_handled="$names_already_handled $name"
943 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
944 dnl or AC_LIB_HAVE_LINKFLAGS call.
945 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
946 eval value=\"\$HAVE_LIB$uppername\"
947 if test -n "$value"; then
948 if test "$value" = yes; then
949 eval value=\"\$LIB$uppername\"
950 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
951 eval value=\"\$LTLIB$uppername\"
952 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
954 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
955 dnl that this library doesn't exist. So just drop it.
959 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
960 dnl and the already constructed $LIBNAME/$LTLIBNAME.
965 if test $use_additional = yes; then
966 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
967 found_dir="$additional_libdir"
968 found_so="$additional_libdir/lib$name.$shlibext"
969 if test -f "$additional_libdir/lib$name.la"; then
970 found_la="$additional_libdir/lib$name.la"
973 if test -f "$additional_libdir/lib$name.$libext"; then
974 found_dir="$additional_libdir"
975 found_a="$additional_libdir/lib$name.$libext"
976 if test -f "$additional_libdir/lib$name.la"; then
977 found_la="$additional_libdir/lib$name.la"
982 if test "X$found_dir" = "X"; then
983 for x in $LDFLAGS $LTLIB[]NAME; do
984 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
987 dir=`echo "X$x" | sed -e 's/^X-L//'`
988 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
990 found_so="$dir/lib$name.$shlibext"
991 if test -f "$dir/lib$name.la"; then
992 found_la="$dir/lib$name.la"
995 if test -f "$dir/lib$name.$libext"; then
997 found_a="$dir/lib$name.$libext"
998 if test -f "$dir/lib$name.la"; then
999 found_la="$dir/lib$name.la"
1005 if test "X$found_dir" != "X"; then
1010 if test "X$found_dir" != "X"; then
1011 dnl Found the library.
1012 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1013 if test "X$found_so" != "X"; then
1014 dnl Linking with a shared library. We attempt to hardcode its
1015 dnl directory into the executable's runpath, unless it's the
1016 dnl standard /usr/lib.
1017 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
1018 dnl No hardcoding is needed.
1019 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1021 dnl Use an explicit option to hardcode DIR into the resulting
1023 dnl Potentially add DIR to ltrpathdirs.
1024 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1026 for x in $ltrpathdirs; do
1027 if test "X$x" = "X$found_dir"; then
1032 if test -z "$haveit"; then
1033 ltrpathdirs="$ltrpathdirs $found_dir"
1035 dnl The hardcoding into $LIBNAME is system dependent.
1036 if test "$hardcode_direct" = yes; then
1037 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1038 dnl resulting binary.
1039 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1041 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
1042 dnl Use an explicit option to hardcode DIR into the resulting
1044 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1045 dnl Potentially add DIR to rpathdirs.
1046 dnl The rpathdirs will be appended to $LIBNAME at the end.
1048 for x in $rpathdirs; do
1049 if test "X$x" = "X$found_dir"; then
1054 if test -z "$haveit"; then
1055 rpathdirs="$rpathdirs $found_dir"
1058 dnl Rely on "-L$found_dir".
1059 dnl But don't add it if it's already contained in the LDFLAGS
1060 dnl or the already constructed $LIBNAME
1062 for x in $LDFLAGS $LIB[]NAME; do
1063 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1064 if test "X$x" = "X-L$found_dir"; then
1069 if test -z "$haveit"; then
1070 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1072 if test "$hardcode_minus_L" != no; then
1073 dnl FIXME: Not sure whether we should use
1074 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1076 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1078 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
1079 dnl here, because this doesn't fit in flags passed to the
1080 dnl compiler. So give up. No hardcoding. This affects only
1081 dnl very old systems.
1082 dnl FIXME: Not sure whether we should use
1083 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1085 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1091 if test "X$found_a" != "X"; then
1092 dnl Linking with a static library.
1093 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1095 dnl We shouldn't come here, but anyway it's good to have a
1097 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1100 dnl Assume the include files are nearby.
1101 additional_includedir=
1102 case "$found_dir" in
1104 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
1105 additional_includedir="$basedir/include"
1108 if test "X$additional_includedir" != "X"; then
1109 dnl Potentially add $additional_includedir to $INCNAME.
1110 dnl But don't add it
1111 dnl 1. if it's the standard /usr/include,
1112 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1113 dnl 3. if it's already present in $CPPFLAGS or the already
1114 dnl constructed $INCNAME,
1115 dnl 4. if it doesn't exist as a directory.
1116 if test "X$additional_includedir" != "X/usr/include"; then
1118 if test "X$additional_includedir" = "X/usr/local/include"; then
1119 if test -n "$GCC"; then
1121 linux*) haveit=yes;;
1125 if test -z "$haveit"; then
1126 for x in $CPPFLAGS $INC[]NAME; do
1127 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1128 if test "X$x" = "X-I$additional_includedir"; then
1133 if test -z "$haveit"; then
1134 if test -d "$additional_includedir"; then
1135 dnl Really add $additional_includedir to $INCNAME.
1136 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1142 dnl Look for dependencies.
1143 if test -n "$found_la"; then
1144 dnl Read the .la file. It defines the variables
1145 dnl dlname, library_names, old_library, dependency_libs, current,
1146 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1147 save_libdir="$libdir"
1149 */* | *\\*) . "$found_la" ;;
1150 *) . "./$found_la" ;;
1152 libdir="$save_libdir"
1153 dnl We use only dependency_libs.
1154 for dep in $dependency_libs; do
1157 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1158 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1159 dnl But don't add it
1160 dnl 1. if it's the standard /usr/lib,
1161 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1162 dnl 3. if it's already present in $LDFLAGS or the already
1163 dnl constructed $LIBNAME,
1164 dnl 4. if it doesn't exist as a directory.
1165 if test "X$additional_libdir" != "X/usr/lib"; then
1167 if test "X$additional_libdir" = "X/usr/local/lib"; then
1168 if test -n "$GCC"; then
1170 linux*) haveit=yes;;
1174 if test -z "$haveit"; then
1176 for x in $LDFLAGS $LIB[]NAME; do
1177 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1178 if test "X$x" = "X-L$additional_libdir"; then
1183 if test -z "$haveit"; then
1184 if test -d "$additional_libdir"; then
1185 dnl Really add $additional_libdir to $LIBNAME.
1186 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1190 for x in $LDFLAGS $LTLIB[]NAME; do
1191 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1192 if test "X$x" = "X-L$additional_libdir"; then
1197 if test -z "$haveit"; then
1198 if test -d "$additional_libdir"; then
1199 dnl Really add $additional_libdir to $LTLIBNAME.
1200 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1207 dir=`echo "X$dep" | sed -e 's/^X-R//'`
1208 if test "$enable_rpath" != no; then
1209 dnl Potentially add DIR to rpathdirs.
1210 dnl The rpathdirs will be appended to $LIBNAME at the end.
1212 for x in $rpathdirs; do
1213 if test "X$x" = "X$dir"; then
1218 if test -z "$haveit"; then
1219 rpathdirs="$rpathdirs $dir"
1221 dnl Potentially add DIR to ltrpathdirs.
1222 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1224 for x in $ltrpathdirs; do
1225 if test "X$x" = "X$dir"; then
1230 if test -z "$haveit"; then
1231 ltrpathdirs="$ltrpathdirs $dir"
1236 dnl Handle this in the next round.
1237 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1240 dnl Handle this in the next round. Throw away the .la's
1241 dnl directory; it is already contained in a preceding -L
1243 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1246 dnl Most likely an immediate library name.
1247 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1248 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1254 dnl Didn't find the library; assume it is in the system directories
1255 dnl known to the linker and runtime loader. (All the system
1256 dnl directories known to the linker should also be known to the
1257 dnl runtime loader, otherwise the system is severely misconfigured.)
1258 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1259 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1265 if test "X$rpathdirs" != "X"; then
1266 if test -n "$hardcode_libdir_separator"; then
1267 dnl Weird platform: only the last -rpath option counts, the user must
1268 dnl pass all path elements in one option. We can arrange that for a
1269 dnl single library, but not when more than one $LIBNAMEs are used.
1271 for found_dir in $rpathdirs; do
1272 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
1274 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
1275 acl_save_libdir="$libdir"
1277 eval flag=\"$hardcode_libdir_flag_spec\"
1278 libdir="$acl_save_libdir"
1279 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1281 dnl The -rpath options are cumulative.
1282 for found_dir in $rpathdirs; do
1283 acl_save_libdir="$libdir"
1285 eval flag=\"$hardcode_libdir_flag_spec\"
1286 libdir="$acl_save_libdir"
1287 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1291 if test "X$ltrpathdirs" != "X"; then
1292 dnl When using libtool, the option that works for both libraries and
1293 dnl executables is -R. The -R options are cumulative.
1294 for found_dir in $ltrpathdirs; do
1295 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1300 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1301 dnl unless already present in VAR.
1302 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1303 dnl contains two or three consecutive elements that belong together.
1304 AC_DEFUN([AC_LIB_APPENDTOVAR],
1306 for element in [$2]; do
1309 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1310 if test "X$x" = "X$element"; then
1315 if test -z "$haveit"; then
1316 [$1]="${[$1]}${[$1]:+ }$element"
1321 # lib-prefix.m4 serial 2 (gettext-0.12)
1322 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
1323 dnl This file is free software, distributed under the terms of the GNU
1324 dnl General Public License. As a special exception to the GNU General
1325 dnl Public License, this file may be distributed as part of a program
1326 dnl that contains a configuration script generated by Autoconf, under
1327 dnl the same distribution terms as the rest of that program.
1329 dnl From Bruno Haible.
1331 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1332 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1333 dnl require excessive bracketing.
1334 ifdef([AC_HELP_STRING],
1335 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1336 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1338 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1339 dnl to access previously installed libraries. The basic assumption is that
1340 dnl a user will want packages to use other packages he previously installed
1341 dnl with the same --prefix option.
1342 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1343 dnl libraries, but is otherwise very convenient.
1344 AC_DEFUN([AC_LIB_PREFIX],
1346 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1347 AC_REQUIRE([AC_PROG_CC])
1348 AC_REQUIRE([AC_CANONICAL_HOST])
1349 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1350 dnl By default, look in $includedir and $libdir.
1352 AC_LIB_WITH_FINAL_PREFIX([
1353 eval additional_includedir=\"$includedir\"
1354 eval additional_libdir=\"$libdir\"
1356 AC_LIB_ARG_WITH([lib-prefix],
1357 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1358 --without-lib-prefix don't search for libraries in includedir and libdir],
1360 if test "X$withval" = "Xno"; then
1363 if test "X$withval" = "X"; then
1364 AC_LIB_WITH_FINAL_PREFIX([
1365 eval additional_includedir=\"$includedir\"
1366 eval additional_libdir=\"$libdir\"
1369 additional_includedir="$withval/include"
1370 additional_libdir="$withval/lib"
1374 if test $use_additional = yes; then
1375 dnl Potentially add $additional_includedir to $CPPFLAGS.
1376 dnl But don't add it
1377 dnl 1. if it's the standard /usr/include,
1378 dnl 2. if it's already present in $CPPFLAGS,
1379 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1380 dnl 4. if it doesn't exist as a directory.
1381 if test "X$additional_includedir" != "X/usr/include"; then
1383 for x in $CPPFLAGS; do
1384 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1385 if test "X$x" = "X-I$additional_includedir"; then
1390 if test -z "$haveit"; then
1391 if test "X$additional_includedir" = "X/usr/local/include"; then
1392 if test -n "$GCC"; then
1394 linux*) haveit=yes;;
1398 if test -z "$haveit"; then
1399 if test -d "$additional_includedir"; then
1400 dnl Really add $additional_includedir to $CPPFLAGS.
1401 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1406 dnl Potentially add $additional_libdir to $LDFLAGS.
1407 dnl But don't add it
1408 dnl 1. if it's the standard /usr/lib,
1409 dnl 2. if it's already present in $LDFLAGS,
1410 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1411 dnl 4. if it doesn't exist as a directory.
1412 if test "X$additional_libdir" != "X/usr/lib"; then
1414 for x in $LDFLAGS; do
1415 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1416 if test "X$x" = "X-L$additional_libdir"; then
1421 if test -z "$haveit"; then
1422 if test "X$additional_libdir" = "X/usr/local/lib"; then
1423 if test -n "$GCC"; then
1425 linux*) haveit=yes;;
1429 if test -z "$haveit"; then
1430 if test -d "$additional_libdir"; then
1431 dnl Really add $additional_libdir to $LDFLAGS.
1432 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1440 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1441 dnl acl_final_exec_prefix, containing the values to which $prefix and
1442 dnl $exec_prefix will expand at the end of the configure script.
1443 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1445 dnl Unfortunately, prefix and exec_prefix get only finally determined
1446 dnl at the end of configure.
1447 if test "X$prefix" = "XNONE"; then
1448 acl_final_prefix="$ac_default_prefix"
1450 acl_final_prefix="$prefix"
1452 if test "X$exec_prefix" = "XNONE"; then
1453 acl_final_exec_prefix='${prefix}'
1455 acl_final_exec_prefix="$exec_prefix"
1457 acl_save_prefix="$prefix"
1458 prefix="$acl_final_prefix"
1459 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1460 prefix="$acl_save_prefix"
1463 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1464 dnl variables prefix and exec_prefix bound to the values they will have
1465 dnl at the end of the configure script.
1466 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1468 acl_save_prefix="$prefix"
1469 prefix="$acl_final_prefix"
1470 acl_save_exec_prefix="$exec_prefix"
1471 exec_prefix="$acl_final_exec_prefix"
1473 exec_prefix="$acl_save_exec_prefix"
1474 prefix="$acl_save_prefix"
1477 # lib-ld.m4 serial 2 (gettext-0.12)
1478 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
1479 dnl This file is free software, distributed under the terms of the GNU
1480 dnl General Public License. As a special exception to the GNU General
1481 dnl Public License, this file may be distributed as part of a program
1482 dnl that contains a configuration script generated by Autoconf, under
1483 dnl the same distribution terms as the rest of that program.
1485 dnl Subroutines of libtool.m4,
1486 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
1487 dnl with libtool.m4.
1489 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
1490 AC_DEFUN([AC_LIB_PROG_LD_GNU],
1491 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
1492 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1493 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1494 acl_cv_prog_gnu_ld=yes
1496 acl_cv_prog_gnu_ld=no
1498 with_gnu_ld=$acl_cv_prog_gnu_ld
1501 dnl From libtool-1.4. Sets the variable LD.
1502 AC_DEFUN([AC_LIB_PROG_LD],
1503 [AC_ARG_WITH(gnu-ld,
1504 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
1505 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
1506 AC_REQUIRE([AC_PROG_CC])dnl
1507 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1508 # Prepare PATH_SEPARATOR.
1509 # The user is always right.
1510 if test "${PATH_SEPARATOR+set}" != set; then
1511 echo "#! /bin/sh" >conf$$.sh
1512 echo "exit 0" >>conf$$.sh
1514 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1522 if test "$GCC" = yes; then
1523 # Check if gcc -print-prog-name=ld gives a path.
1524 AC_MSG_CHECKING([for ld used by GCC])
1527 # gcc leaves a trailing carriage return which upsets mingw
1528 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1530 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1533 # Accept absolute paths.
1534 [[\\/]* | [A-Za-z]:[\\/]*)]
1535 [re_direlt='/[^/][^/]*/\.\./']
1536 # Canonicalize the path of ld
1537 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1538 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1539 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1541 test -z "$LD" && LD="$ac_prog"
1544 # If it fails, then pretend we aren't using GCC.
1548 # If it is relative, then search for the first ld in PATH.
1552 elif test "$with_gnu_ld" = yes; then
1553 AC_MSG_CHECKING([for GNU ld])
1555 AC_MSG_CHECKING([for non-GNU ld])
1557 AC_CACHE_VAL(acl_cv_path_LD,
1558 [if test -z "$LD"; then
1559 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1560 for ac_dir in $PATH; do
1561 test -z "$ac_dir" && ac_dir=.
1562 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1563 acl_cv_path_LD="$ac_dir/$ac_prog"
1564 # Check to see if the program is GNU ld. I'd rather use --version,
1565 # but apparently some GNU ld's only accept -v.
1566 # Break only if it was the GNU/non-GNU ld that we prefer.
1567 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1568 test "$with_gnu_ld" != no && break
1570 test "$with_gnu_ld" != yes && break
1576 acl_cv_path_LD="$LD" # Let the user override the test with a path.
1578 LD="$acl_cv_path_LD"
1579 if test -n "$LD"; then
1584 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1588 # iconv.m4 serial AM4 (gettext-0.11.3)
1589 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
1590 dnl This file is free software, distributed under the terms of the GNU
1591 dnl General Public License. As a special exception to the GNU General
1592 dnl Public License, this file may be distributed as part of a program
1593 dnl that contains a configuration script generated by Autoconf, under
1594 dnl the same distribution terms as the rest of that program.
1596 dnl From Bruno Haible.
1598 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
1600 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
1601 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1602 AC_REQUIRE([AC_LIB_RPATH])
1604 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
1606 AC_LIB_LINKFLAGS_BODY([iconv])
1609 AC_DEFUN([AM_ICONV_LINK],
1611 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
1612 dnl those with the standalone portable GNU libiconv installed).
1614 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
1616 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
1618 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
1619 dnl because if the user has installed libiconv and not disabled its use
1620 dnl via --without-libiconv-prefix, he wants to use it. The first
1621 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
1622 am_save_CPPFLAGS="$CPPFLAGS"
1623 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
1625 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
1626 am_cv_func_iconv="no, consider installing GNU libiconv"
1628 AC_TRY_LINK([#include <stdlib.h>
1629 #include <iconv.h>],
1630 [iconv_t cd = iconv_open("","");
1631 iconv(cd,NULL,NULL,NULL,NULL);
1633 am_cv_func_iconv=yes)
1634 if test "$am_cv_func_iconv" != yes; then
1635 am_save_LIBS="$LIBS"
1636 LIBS="$LIBS $LIBICONV"
1637 AC_TRY_LINK([#include <stdlib.h>
1638 #include <iconv.h>],
1639 [iconv_t cd = iconv_open("","");
1640 iconv(cd,NULL,NULL,NULL,NULL);
1643 am_cv_func_iconv=yes)
1644 LIBS="$am_save_LIBS"
1647 if test "$am_cv_func_iconv" = yes; then
1648 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
1650 if test "$am_cv_lib_iconv" = yes; then
1651 AC_MSG_CHECKING([how to link with libiconv])
1652 AC_MSG_RESULT([$LIBICONV])
1654 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
1656 CPPFLAGS="$am_save_CPPFLAGS"
1661 AC_SUBST(LTLIBICONV)
1664 AC_DEFUN([AM_ICONV],
1667 if test "$am_cv_func_iconv" = yes; then
1668 AC_MSG_CHECKING([for iconv declaration])
1669 AC_CACHE_VAL(am_cv_proto_iconv, [
1677 #if defined(__STDC__) || defined(__cplusplus)
1678 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
1682 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
1683 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);"])
1684 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
1685 AC_MSG_RESULT([$]{ac_t:-
1686 }[$]am_cv_proto_iconv)
1687 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
1688 [Define as const if the declaration of iconv() needs const.])
1692 # isc-posix.m4 serial 2 (gettext-0.11.2)
1693 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1694 dnl This file is free software, distributed under the terms of the GNU
1695 dnl General Public License. As a special exception to the GNU General
1696 dnl Public License, this file may be distributed as part of a program
1697 dnl that contains a configuration script generated by Autoconf, under
1698 dnl the same distribution terms as the rest of that program.
1700 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
1702 # This test replaces the one in autoconf.
1703 # Currently this macro should have the same name as the autoconf macro
1704 # because gettext's gettext.m4 (distributed in the automake package)
1705 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
1706 # give these diagnostics:
1707 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1708 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1710 undefine([AC_ISC_POSIX])
1712 AC_DEFUN([AC_ISC_POSIX],
1714 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1715 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1719 # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
1720 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
1721 dnl This file is free software, distributed under the terms of the GNU
1722 dnl General Public License. As a special exception to the GNU General
1723 dnl Public License, this file may be distributed as part of a program
1724 dnl that contains a configuration script generated by Autoconf, under
1725 dnl the same distribution terms as the rest of that program.
1727 # Test for the GNU C Library, version 2.1 or newer.
1728 # From Bruno Haible.
1730 AC_DEFUN([jm_GLIBC21],
1732 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
1733 ac_cv_gnu_library_2_1,
1734 [AC_EGREP_CPP([Lucky GNU user],
1736 #include <features.h>
1737 #ifdef __GNU_LIBRARY__
1738 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
1743 ac_cv_gnu_library_2_1=yes,
1744 ac_cv_gnu_library_2_1=no)
1748 GLIBC21="$ac_cv_gnu_library_2_1"
1752 # intdiv0.m4 serial 1 (gettext-0.11.3)
1753 dnl Copyright (C) 2002 Free Software Foundation, Inc.
1754 dnl This file is free software, distributed under the terms of the GNU
1755 dnl General Public License. As a special exception to the GNU General
1756 dnl Public License, this file may be distributed as part of a program
1757 dnl that contains a configuration script generated by Autoconf, under
1758 dnl the same distribution terms as the rest of that program.
1760 dnl From Bruno Haible.
1762 AC_DEFUN([gt_INTDIV0],
1764 AC_REQUIRE([AC_PROG_CC])dnl
1765 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1767 AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
1768 gt_cv_int_divbyzero_sigfpe,
1776 sigfpe_handler (int sig)
1778 sigfpe_handler (sig) int sig;
1781 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
1782 exit (sig != SIGFPE);
1792 signal (SIGFPE, sigfpe_handler);
1793 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
1794 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
1795 signal (SIGTRAP, sigfpe_handler);
1797 /* Linux/SPARC yields signal SIGILL. */
1798 #if defined (__sparc__) && defined (__linux__)
1799 signal (SIGILL, sigfpe_handler);
1806 ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
1808 # Guess based on the CPU.
1810 alpha* | i[34567]86 | m68k | s390*)
1811 gt_cv_int_divbyzero_sigfpe="guessing yes";;
1813 gt_cv_int_divbyzero_sigfpe="guessing no";;
1817 case "$gt_cv_int_divbyzero_sigfpe" in
1821 AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
1822 [Define if integer division by zero raises signal SIGFPE.])
1825 # uintmax_t.m4 serial 7 (gettext-0.12)
1826 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
1827 dnl This file is free software, distributed under the terms of the GNU
1828 dnl General Public License. As a special exception to the GNU General
1829 dnl Public License, this file may be distributed as part of a program
1830 dnl that contains a configuration script generated by Autoconf, under
1831 dnl the same distribution terms as the rest of that program.
1833 dnl From Paul Eggert.
1837 # Define uintmax_t to 'unsigned long' or 'unsigned long long'
1838 # if it is not already defined in <stdint.h> or <inttypes.h>.
1840 AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
1842 AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
1843 AC_REQUIRE([jm_AC_HEADER_STDINT_H])
1844 if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
1845 AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
1846 test $ac_cv_type_unsigned_long_long = yes \
1847 && ac_type='unsigned long long' \
1848 || ac_type='unsigned long'
1849 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
1850 [Define to unsigned long or unsigned long long
1851 if <stdint.h> and <inttypes.h> don't define.])
1853 AC_DEFINE(HAVE_UINTMAX_T, 1,
1854 [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
1858 # inttypes_h.m4 serial 5 (gettext-0.12)
1859 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
1860 dnl This file is free software, distributed under the terms of the GNU
1861 dnl General Public License. As a special exception to the GNU General
1862 dnl Public License, this file may be distributed as part of a program
1863 dnl that contains a configuration script generated by Autoconf, under
1864 dnl the same distribution terms as the rest of that program.
1866 dnl From Paul Eggert.
1868 # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
1869 # doesn't clash with <sys/types.h>, and declares uintmax_t.
1871 AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
1873 AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
1875 [#include <sys/types.h>
1876 #include <inttypes.h>],
1877 [uintmax_t i = (uintmax_t) -1;],
1878 jm_ac_cv_header_inttypes_h=yes,
1879 jm_ac_cv_header_inttypes_h=no)])
1880 if test $jm_ac_cv_header_inttypes_h = yes; then
1881 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
1882 [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
1883 and declares uintmax_t. ])
1887 # stdint_h.m4 serial 3 (gettext-0.12)
1888 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
1889 dnl This file is free software, distributed under the terms of the GNU
1890 dnl General Public License. As a special exception to the GNU General
1891 dnl Public License, this file may be distributed as part of a program
1892 dnl that contains a configuration script generated by Autoconf, under
1893 dnl the same distribution terms as the rest of that program.
1895 dnl From Paul Eggert.
1897 # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
1898 # doesn't clash with <sys/types.h>, and declares uintmax_t.
1900 AC_DEFUN([jm_AC_HEADER_STDINT_H],
1902 AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
1904 [#include <sys/types.h>
1905 #include <stdint.h>],
1906 [uintmax_t i = (uintmax_t) -1;],
1907 jm_ac_cv_header_stdint_h=yes,
1908 jm_ac_cv_header_stdint_h=no)])
1909 if test $jm_ac_cv_header_stdint_h = yes; then
1910 AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
1911 [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
1912 and declares uintmax_t. ])
1916 # ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
1917 dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
1918 dnl This file is free software, distributed under the terms of the GNU
1919 dnl General Public License. As a special exception to the GNU General
1920 dnl Public License, this file may be distributed as part of a program
1921 dnl that contains a configuration script generated by Autoconf, under
1922 dnl the same distribution terms as the rest of that program.
1924 dnl From Paul Eggert.
1926 AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
1928 AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
1929 [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
1930 [unsigned long long ullmax = (unsigned long long) -1;
1931 return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
1932 ac_cv_type_unsigned_long_long=yes,
1933 ac_cv_type_unsigned_long_long=no)])
1934 if test $ac_cv_type_unsigned_long_long = yes; then
1935 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
1936 [Define if you have the unsigned long long type.])
1940 # inttypes.m4 serial 1 (gettext-0.11.4)
1941 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
1942 dnl This file is free software, distributed under the terms of the GNU
1943 dnl General Public License. As a special exception to the GNU General
1944 dnl Public License, this file may be distributed as part of a program
1945 dnl that contains a configuration script generated by Autoconf, under
1946 dnl the same distribution terms as the rest of that program.
1948 dnl From Paul Eggert.
1950 # Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
1953 AC_DEFUN([gt_HEADER_INTTYPES_H],
1955 AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
1958 [#include <sys/types.h>
1959 #include <inttypes.h>],
1960 [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
1962 if test $gt_cv_header_inttypes_h = yes; then
1963 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
1964 [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
1968 # inttypes-pri.m4 serial 1 (gettext-0.11.4)
1969 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
1970 dnl This file is free software, distributed under the terms of the GNU
1971 dnl General Public License. As a special exception to the GNU General
1972 dnl Public License, this file may be distributed as part of a program
1973 dnl that contains a configuration script generated by Autoconf, under
1974 dnl the same distribution terms as the rest of that program.
1976 dnl From Bruno Haible.
1978 # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
1979 # macros to non-string values. This is the case on AIX 4.3.3.
1981 AC_DEFUN([gt_INTTYPES_PRI],
1983 AC_REQUIRE([gt_HEADER_INTTYPES_H])
1984 if test $gt_cv_header_inttypes_h = yes; then
1985 AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
1986 gt_cv_inttypes_pri_broken,
1988 AC_TRY_COMPILE([#include <inttypes.h>
1992 ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
1995 if test "$gt_cv_inttypes_pri_broken" = yes; then
1996 AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
1997 [Define if <inttypes.h> exists and defines unusable PRI* macros.])
2001 # codeset.m4 serial AM1 (gettext-0.10.40)
2002 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2003 dnl This file is free software, distributed under the terms of the GNU
2004 dnl General Public License. As a special exception to the GNU General
2005 dnl Public License, this file may be distributed as part of a program
2006 dnl that contains a configuration script generated by Autoconf, under
2007 dnl the same distribution terms as the rest of that program.
2009 dnl From Bruno Haible.
2011 AC_DEFUN([AM_LANGINFO_CODESET],
2013 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
2014 [AC_TRY_LINK([#include <langinfo.h>],
2015 [char* cs = nl_langinfo(CODESET);],
2016 am_cv_langinfo_codeset=yes,
2017 am_cv_langinfo_codeset=no)
2019 if test $am_cv_langinfo_codeset = yes; then
2020 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
2021 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
2025 # lcmessage.m4 serial 3 (gettext-0.11.3)
2026 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2027 dnl This file is free software, distributed under the terms of the GNU
2028 dnl General Public License. As a special exception to the GNU General
2029 dnl Public License, this file may be distributed as part of a program
2030 dnl that contains a configuration script generated by Autoconf, under
2031 dnl the same distribution terms as the rest of that program.
2033 dnl This file can can be used in projects which are not available under
2034 dnl the GNU General Public License or the GNU Library General Public
2035 dnl License but which still want to provide support for the GNU gettext
2037 dnl Please note that the actual code of the GNU gettext library is covered
2038 dnl by the GNU Library General Public License, and the rest of the GNU
2039 dnl gettext package package is covered by the GNU General Public License.
2040 dnl They are *not* in the public domain.
2043 dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
2045 # Check whether LC_MESSAGES is available in <locale.h>.
2047 AC_DEFUN([AM_LC_MESSAGES],
2049 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
2050 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
2051 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
2052 if test $am_cv_val_LC_MESSAGES = yes; then
2053 AC_DEFINE(HAVE_LC_MESSAGES, 1,
2054 [Define if your <locale.h> file defines LC_MESSAGES.])