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 sinclude(../config/progtest.m4)
679 # lib-link.m4 serial 4 (gettext-0.12)
680 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
681 dnl This file is free software, distributed under the terms of the GNU
682 dnl General Public License. As a special exception to the GNU General
683 dnl Public License, this file may be distributed as part of a program
684 dnl that contains a configuration script generated by Autoconf, under
685 dnl the same distribution terms as the rest of that program.
687 dnl From Bruno Haible.
689 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
690 dnl the libraries corresponding to explicit and implicit dependencies.
691 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
692 dnl augments the CPPFLAGS variable.
693 AC_DEFUN([AC_LIB_LINKFLAGS],
695 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
696 AC_REQUIRE([AC_LIB_RPATH])
697 define([Name],[translit([$1],[./-], [___])])
698 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
699 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
700 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
701 AC_LIB_LINKFLAGS_BODY([$1], [$2])
702 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
703 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
704 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
706 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
707 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
708 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
709 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
711 AC_SUBST([LTLIB]NAME)
712 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
713 dnl results of this search when this library appears as a dependency.
719 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
720 dnl searches for libname and the libraries corresponding to explicit and
721 dnl implicit dependencies, together with the specified include files and
722 dnl the ability to compile and link the specified testcode. If found, it
723 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
724 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
725 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
726 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
727 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
729 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
730 AC_REQUIRE([AC_LIB_RPATH])
731 define([Name],[translit([$1],[./-], [___])])
732 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
733 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
735 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
737 AC_LIB_LINKFLAGS_BODY([$1], [$2])
739 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
740 dnl because if the user has installed lib[]Name and not disabled its use
741 dnl via --without-lib[]Name-prefix, he wants to use it.
742 ac_save_CPPFLAGS="$CPPFLAGS"
743 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
745 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
747 LIBS="$LIBS $LIB[]NAME"
748 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
751 if test "$ac_cv_lib[]Name" = yes; then
753 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
754 AC_MSG_CHECKING([how to link with lib[]$1])
755 AC_MSG_RESULT([$LIB[]NAME])
758 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
759 dnl $INC[]NAME either.
760 CPPFLAGS="$ac_save_CPPFLAGS"
764 AC_SUBST([HAVE_LIB]NAME)
766 AC_SUBST([LTLIB]NAME)
771 dnl Determine the platform dependent parameters needed to use rpath:
772 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
773 dnl hardcode_direct, hardcode_minus_L.
774 AC_DEFUN([AC_LIB_RPATH],
776 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
777 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
778 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
779 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
780 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
781 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
782 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
788 libext="$acl_cv_libext"
789 shlibext="$acl_cv_shlibext"
790 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
791 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
792 hardcode_direct="$acl_cv_hardcode_direct"
793 hardcode_minus_L="$acl_cv_hardcode_minus_L"
794 dnl Determine whether the user wants rpath handling at all.
796 [ --disable-rpath do not hardcode runtime library paths],
800 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
801 dnl the libraries corresponding to explicit and implicit dependencies.
802 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
803 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
805 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
806 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
807 dnl By default, look in $includedir and $libdir.
809 AC_LIB_WITH_FINAL_PREFIX([
810 eval additional_includedir=\"$includedir\"
811 eval additional_libdir=\"$libdir\"
813 AC_LIB_ARG_WITH([lib$1-prefix],
814 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
815 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
817 if test "X$withval" = "Xno"; then
820 if test "X$withval" = "X"; then
821 AC_LIB_WITH_FINAL_PREFIX([
822 eval additional_includedir=\"$includedir\"
823 eval additional_libdir=\"$libdir\"
826 additional_includedir="$withval/include"
827 additional_libdir="$withval/lib"
831 dnl Search the library and its dependencies in $additional_libdir and
832 dnl $LDFLAGS. Using breadth-first-seach.
838 names_already_handled=
839 names_next_round='$1 $2'
840 while test -n "$names_next_round"; do
841 names_this_round="$names_next_round"
843 for name in $names_this_round; do
845 for n in $names_already_handled; do
846 if test "$n" = "$name"; then
851 if test -z "$already_handled"; then
852 names_already_handled="$names_already_handled $name"
853 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
854 dnl or AC_LIB_HAVE_LINKFLAGS call.
855 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
856 eval value=\"\$HAVE_LIB$uppername\"
857 if test -n "$value"; then
858 if test "$value" = yes; then
859 eval value=\"\$LIB$uppername\"
860 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
861 eval value=\"\$LTLIB$uppername\"
862 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
864 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
865 dnl that this library doesn't exist. So just drop it.
869 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
870 dnl and the already constructed $LIBNAME/$LTLIBNAME.
875 if test $use_additional = yes; then
876 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
877 found_dir="$additional_libdir"
878 found_so="$additional_libdir/lib$name.$shlibext"
879 if test -f "$additional_libdir/lib$name.la"; then
880 found_la="$additional_libdir/lib$name.la"
883 if test -f "$additional_libdir/lib$name.$libext"; then
884 found_dir="$additional_libdir"
885 found_a="$additional_libdir/lib$name.$libext"
886 if test -f "$additional_libdir/lib$name.la"; then
887 found_la="$additional_libdir/lib$name.la"
892 if test "X$found_dir" = "X"; then
893 for x in $LDFLAGS $LTLIB[]NAME; do
894 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
897 dir=`echo "X$x" | sed -e 's/^X-L//'`
898 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
900 found_so="$dir/lib$name.$shlibext"
901 if test -f "$dir/lib$name.la"; then
902 found_la="$dir/lib$name.la"
905 if test -f "$dir/lib$name.$libext"; then
907 found_a="$dir/lib$name.$libext"
908 if test -f "$dir/lib$name.la"; then
909 found_la="$dir/lib$name.la"
915 if test "X$found_dir" != "X"; then
920 if test "X$found_dir" != "X"; then
921 dnl Found the library.
922 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
923 if test "X$found_so" != "X"; then
924 dnl Linking with a shared library. We attempt to hardcode its
925 dnl directory into the executable's runpath, unless it's the
926 dnl standard /usr/lib.
927 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
928 dnl No hardcoding is needed.
929 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
931 dnl Use an explicit option to hardcode DIR into the resulting
933 dnl Potentially add DIR to ltrpathdirs.
934 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
936 for x in $ltrpathdirs; do
937 if test "X$x" = "X$found_dir"; then
942 if test -z "$haveit"; then
943 ltrpathdirs="$ltrpathdirs $found_dir"
945 dnl The hardcoding into $LIBNAME is system dependent.
946 if test "$hardcode_direct" = yes; then
947 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
948 dnl resulting binary.
949 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
951 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
952 dnl Use an explicit option to hardcode DIR into the resulting
954 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
955 dnl Potentially add DIR to rpathdirs.
956 dnl The rpathdirs will be appended to $LIBNAME at the end.
958 for x in $rpathdirs; do
959 if test "X$x" = "X$found_dir"; then
964 if test -z "$haveit"; then
965 rpathdirs="$rpathdirs $found_dir"
968 dnl Rely on "-L$found_dir".
969 dnl But don't add it if it's already contained in the LDFLAGS
970 dnl or the already constructed $LIBNAME
972 for x in $LDFLAGS $LIB[]NAME; do
973 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
974 if test "X$x" = "X-L$found_dir"; then
979 if test -z "$haveit"; then
980 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
982 if test "$hardcode_minus_L" != no; then
983 dnl FIXME: Not sure whether we should use
984 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
986 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
988 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
989 dnl here, because this doesn't fit in flags passed to the
990 dnl compiler. So give up. No hardcoding. This affects only
991 dnl very old systems.
992 dnl FIXME: Not sure whether we should use
993 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
995 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1001 if test "X$found_a" != "X"; then
1002 dnl Linking with a static library.
1003 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1005 dnl We shouldn't come here, but anyway it's good to have a
1007 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1010 dnl Assume the include files are nearby.
1011 additional_includedir=
1012 case "$found_dir" in
1014 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
1015 additional_includedir="$basedir/include"
1018 if test "X$additional_includedir" != "X"; then
1019 dnl Potentially add $additional_includedir to $INCNAME.
1020 dnl But don't add it
1021 dnl 1. if it's the standard /usr/include,
1022 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1023 dnl 3. if it's already present in $CPPFLAGS or the already
1024 dnl constructed $INCNAME,
1025 dnl 4. if it doesn't exist as a directory.
1026 if test "X$additional_includedir" != "X/usr/include"; then
1028 if test "X$additional_includedir" = "X/usr/local/include"; then
1029 if test -n "$GCC"; then
1031 linux*) haveit=yes;;
1035 if test -z "$haveit"; then
1036 for x in $CPPFLAGS $INC[]NAME; do
1037 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1038 if test "X$x" = "X-I$additional_includedir"; then
1043 if test -z "$haveit"; then
1044 if test -d "$additional_includedir"; then
1045 dnl Really add $additional_includedir to $INCNAME.
1046 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1052 dnl Look for dependencies.
1053 if test -n "$found_la"; then
1054 dnl Read the .la file. It defines the variables
1055 dnl dlname, library_names, old_library, dependency_libs, current,
1056 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1057 save_libdir="$libdir"
1059 */* | *\\*) . "$found_la" ;;
1060 *) . "./$found_la" ;;
1062 libdir="$save_libdir"
1063 dnl We use only dependency_libs.
1064 for dep in $dependency_libs; do
1067 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1068 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1069 dnl But don't add it
1070 dnl 1. if it's the standard /usr/lib,
1071 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1072 dnl 3. if it's already present in $LDFLAGS or the already
1073 dnl constructed $LIBNAME,
1074 dnl 4. if it doesn't exist as a directory.
1075 if test "X$additional_libdir" != "X/usr/lib"; then
1077 if test "X$additional_libdir" = "X/usr/local/lib"; then
1078 if test -n "$GCC"; then
1080 linux*) haveit=yes;;
1084 if test -z "$haveit"; then
1086 for x in $LDFLAGS $LIB[]NAME; do
1087 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1088 if test "X$x" = "X-L$additional_libdir"; then
1093 if test -z "$haveit"; then
1094 if test -d "$additional_libdir"; then
1095 dnl Really add $additional_libdir to $LIBNAME.
1096 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1100 for x in $LDFLAGS $LTLIB[]NAME; do
1101 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1102 if test "X$x" = "X-L$additional_libdir"; then
1107 if test -z "$haveit"; then
1108 if test -d "$additional_libdir"; then
1109 dnl Really add $additional_libdir to $LTLIBNAME.
1110 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1117 dir=`echo "X$dep" | sed -e 's/^X-R//'`
1118 if test "$enable_rpath" != no; then
1119 dnl Potentially add DIR to rpathdirs.
1120 dnl The rpathdirs will be appended to $LIBNAME at the end.
1122 for x in $rpathdirs; do
1123 if test "X$x" = "X$dir"; then
1128 if test -z "$haveit"; then
1129 rpathdirs="$rpathdirs $dir"
1131 dnl Potentially add DIR to ltrpathdirs.
1132 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1134 for x in $ltrpathdirs; do
1135 if test "X$x" = "X$dir"; then
1140 if test -z "$haveit"; then
1141 ltrpathdirs="$ltrpathdirs $dir"
1146 dnl Handle this in the next round.
1147 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1150 dnl Handle this in the next round. Throw away the .la's
1151 dnl directory; it is already contained in a preceding -L
1153 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1156 dnl Most likely an immediate library name.
1157 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1158 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1164 dnl Didn't find the library; assume it is in the system directories
1165 dnl known to the linker and runtime loader. (All the system
1166 dnl directories known to the linker should also be known to the
1167 dnl runtime loader, otherwise the system is severely misconfigured.)
1168 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1169 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1175 if test "X$rpathdirs" != "X"; then
1176 if test -n "$hardcode_libdir_separator"; then
1177 dnl Weird platform: only the last -rpath option counts, the user must
1178 dnl pass all path elements in one option. We can arrange that for a
1179 dnl single library, but not when more than one $LIBNAMEs are used.
1181 for found_dir in $rpathdirs; do
1182 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
1184 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
1185 acl_save_libdir="$libdir"
1187 eval flag=\"$hardcode_libdir_flag_spec\"
1188 libdir="$acl_save_libdir"
1189 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1191 dnl The -rpath options are cumulative.
1192 for found_dir in $rpathdirs; do
1193 acl_save_libdir="$libdir"
1195 eval flag=\"$hardcode_libdir_flag_spec\"
1196 libdir="$acl_save_libdir"
1197 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1201 if test "X$ltrpathdirs" != "X"; then
1202 dnl When using libtool, the option that works for both libraries and
1203 dnl executables is -R. The -R options are cumulative.
1204 for found_dir in $ltrpathdirs; do
1205 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1210 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1211 dnl unless already present in VAR.
1212 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1213 dnl contains two or three consecutive elements that belong together.
1214 AC_DEFUN([AC_LIB_APPENDTOVAR],
1216 for element in [$2]; do
1219 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1220 if test "X$x" = "X$element"; then
1225 if test -z "$haveit"; then
1226 [$1]="${[$1]}${[$1]:+ }$element"
1231 # lib-prefix.m4 serial 2 (gettext-0.12)
1232 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
1233 dnl This file is free software, distributed under the terms of the GNU
1234 dnl General Public License. As a special exception to the GNU General
1235 dnl Public License, this file may be distributed as part of a program
1236 dnl that contains a configuration script generated by Autoconf, under
1237 dnl the same distribution terms as the rest of that program.
1239 dnl From Bruno Haible.
1241 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1242 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1243 dnl require excessive bracketing.
1244 ifdef([AC_HELP_STRING],
1245 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1246 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1248 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1249 dnl to access previously installed libraries. The basic assumption is that
1250 dnl a user will want packages to use other packages he previously installed
1251 dnl with the same --prefix option.
1252 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1253 dnl libraries, but is otherwise very convenient.
1254 AC_DEFUN([AC_LIB_PREFIX],
1256 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1257 AC_REQUIRE([AC_PROG_CC])
1258 AC_REQUIRE([AC_CANONICAL_HOST])
1259 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1260 dnl By default, look in $includedir and $libdir.
1262 AC_LIB_WITH_FINAL_PREFIX([
1263 eval additional_includedir=\"$includedir\"
1264 eval additional_libdir=\"$libdir\"
1266 AC_LIB_ARG_WITH([lib-prefix],
1267 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1268 --without-lib-prefix don't search for libraries in includedir and libdir],
1270 if test "X$withval" = "Xno"; then
1273 if test "X$withval" = "X"; then
1274 AC_LIB_WITH_FINAL_PREFIX([
1275 eval additional_includedir=\"$includedir\"
1276 eval additional_libdir=\"$libdir\"
1279 additional_includedir="$withval/include"
1280 additional_libdir="$withval/lib"
1284 if test $use_additional = yes; then
1285 dnl Potentially add $additional_includedir to $CPPFLAGS.
1286 dnl But don't add it
1287 dnl 1. if it's the standard /usr/include,
1288 dnl 2. if it's already present in $CPPFLAGS,
1289 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1290 dnl 4. if it doesn't exist as a directory.
1291 if test "X$additional_includedir" != "X/usr/include"; then
1293 for x in $CPPFLAGS; do
1294 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1295 if test "X$x" = "X-I$additional_includedir"; then
1300 if test -z "$haveit"; then
1301 if test "X$additional_includedir" = "X/usr/local/include"; then
1302 if test -n "$GCC"; then
1304 linux*) haveit=yes;;
1308 if test -z "$haveit"; then
1309 if test -d "$additional_includedir"; then
1310 dnl Really add $additional_includedir to $CPPFLAGS.
1311 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1316 dnl Potentially add $additional_libdir to $LDFLAGS.
1317 dnl But don't add it
1318 dnl 1. if it's the standard /usr/lib,
1319 dnl 2. if it's already present in $LDFLAGS,
1320 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1321 dnl 4. if it doesn't exist as a directory.
1322 if test "X$additional_libdir" != "X/usr/lib"; then
1324 for x in $LDFLAGS; do
1325 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1326 if test "X$x" = "X-L$additional_libdir"; then
1331 if test -z "$haveit"; then
1332 if test "X$additional_libdir" = "X/usr/local/lib"; then
1333 if test -n "$GCC"; then
1335 linux*) haveit=yes;;
1339 if test -z "$haveit"; then
1340 if test -d "$additional_libdir"; then
1341 dnl Really add $additional_libdir to $LDFLAGS.
1342 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1350 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1351 dnl acl_final_exec_prefix, containing the values to which $prefix and
1352 dnl $exec_prefix will expand at the end of the configure script.
1353 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1355 dnl Unfortunately, prefix and exec_prefix get only finally determined
1356 dnl at the end of configure.
1357 if test "X$prefix" = "XNONE"; then
1358 acl_final_prefix="$ac_default_prefix"
1360 acl_final_prefix="$prefix"
1362 if test "X$exec_prefix" = "XNONE"; then
1363 acl_final_exec_prefix='${prefix}'
1365 acl_final_exec_prefix="$exec_prefix"
1367 acl_save_prefix="$prefix"
1368 prefix="$acl_final_prefix"
1369 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1370 prefix="$acl_save_prefix"
1373 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1374 dnl variables prefix and exec_prefix bound to the values they will have
1375 dnl at the end of the configure script.
1376 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1378 acl_save_prefix="$prefix"
1379 prefix="$acl_final_prefix"
1380 acl_save_exec_prefix="$exec_prefix"
1381 exec_prefix="$acl_final_exec_prefix"
1383 exec_prefix="$acl_save_exec_prefix"
1384 prefix="$acl_save_prefix"
1387 # lib-ld.m4 serial 2 (gettext-0.12)
1388 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
1389 dnl This file is free software, distributed under the terms of the GNU
1390 dnl General Public License. As a special exception to the GNU General
1391 dnl Public License, this file may be distributed as part of a program
1392 dnl that contains a configuration script generated by Autoconf, under
1393 dnl the same distribution terms as the rest of that program.
1395 dnl Subroutines of libtool.m4,
1396 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
1397 dnl with libtool.m4.
1399 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
1400 AC_DEFUN([AC_LIB_PROG_LD_GNU],
1401 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
1402 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1403 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1404 acl_cv_prog_gnu_ld=yes
1406 acl_cv_prog_gnu_ld=no
1408 with_gnu_ld=$acl_cv_prog_gnu_ld
1411 dnl From libtool-1.4. Sets the variable LD.
1412 AC_DEFUN([AC_LIB_PROG_LD],
1413 [AC_ARG_WITH(gnu-ld,
1414 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
1415 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
1416 AC_REQUIRE([AC_PROG_CC])dnl
1417 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1418 # Prepare PATH_SEPARATOR.
1419 # The user is always right.
1420 if test "${PATH_SEPARATOR+set}" != set; then
1421 echo "#! /bin/sh" >conf$$.sh
1422 echo "exit 0" >>conf$$.sh
1424 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1432 if test "$GCC" = yes; then
1433 # Check if gcc -print-prog-name=ld gives a path.
1434 AC_MSG_CHECKING([for ld used by GCC])
1437 # gcc leaves a trailing carriage return which upsets mingw
1438 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1440 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1443 # Accept absolute paths.
1444 [[\\/]* | [A-Za-z]:[\\/]*)]
1445 [re_direlt='/[^/][^/]*/\.\./']
1446 # Canonicalize the path of ld
1447 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1448 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1449 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1451 test -z "$LD" && LD="$ac_prog"
1454 # If it fails, then pretend we aren't using GCC.
1458 # If it is relative, then search for the first ld in PATH.
1462 elif test "$with_gnu_ld" = yes; then
1463 AC_MSG_CHECKING([for GNU ld])
1465 AC_MSG_CHECKING([for non-GNU ld])
1467 AC_CACHE_VAL(acl_cv_path_LD,
1468 [if test -z "$LD"; then
1469 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1470 for ac_dir in $PATH; do
1471 test -z "$ac_dir" && ac_dir=.
1472 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1473 acl_cv_path_LD="$ac_dir/$ac_prog"
1474 # Check to see if the program is GNU ld. I'd rather use --version,
1475 # but apparently some GNU ld's only accept -v.
1476 # Break only if it was the GNU/non-GNU ld that we prefer.
1477 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1478 test "$with_gnu_ld" != no && break
1480 test "$with_gnu_ld" != yes && break
1486 acl_cv_path_LD="$LD" # Let the user override the test with a path.
1488 LD="$acl_cv_path_LD"
1489 if test -n "$LD"; then
1494 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1498 # iconv.m4 serial AM4 (gettext-0.11.3)
1499 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
1500 dnl This file is free software, distributed under the terms of the GNU
1501 dnl General Public License. As a special exception to the GNU General
1502 dnl Public License, this file may be distributed as part of a program
1503 dnl that contains a configuration script generated by Autoconf, under
1504 dnl the same distribution terms as the rest of that program.
1506 dnl From Bruno Haible.
1508 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
1510 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
1511 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1512 AC_REQUIRE([AC_LIB_RPATH])
1514 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
1516 AC_LIB_LINKFLAGS_BODY([iconv])
1519 AC_DEFUN([AM_ICONV_LINK],
1521 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
1522 dnl those with the standalone portable GNU libiconv installed).
1524 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
1526 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
1528 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
1529 dnl because if the user has installed libiconv and not disabled its use
1530 dnl via --without-libiconv-prefix, he wants to use it. The first
1531 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
1532 am_save_CPPFLAGS="$CPPFLAGS"
1533 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
1535 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
1536 am_cv_func_iconv="no, consider installing GNU libiconv"
1538 AC_TRY_LINK([#include <stdlib.h>
1539 #include <iconv.h>],
1540 [iconv_t cd = iconv_open("","");
1541 iconv(cd,NULL,NULL,NULL,NULL);
1543 am_cv_func_iconv=yes)
1544 if test "$am_cv_func_iconv" != yes; then
1545 am_save_LIBS="$LIBS"
1546 LIBS="$LIBS $LIBICONV"
1547 AC_TRY_LINK([#include <stdlib.h>
1548 #include <iconv.h>],
1549 [iconv_t cd = iconv_open("","");
1550 iconv(cd,NULL,NULL,NULL,NULL);
1553 am_cv_func_iconv=yes)
1554 LIBS="$am_save_LIBS"
1557 if test "$am_cv_func_iconv" = yes; then
1558 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
1560 if test "$am_cv_lib_iconv" = yes; then
1561 AC_MSG_CHECKING([how to link with libiconv])
1562 AC_MSG_RESULT([$LIBICONV])
1564 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
1566 CPPFLAGS="$am_save_CPPFLAGS"
1571 AC_SUBST(LTLIBICONV)
1574 AC_DEFUN([AM_ICONV],
1577 if test "$am_cv_func_iconv" = yes; then
1578 AC_MSG_CHECKING([for iconv declaration])
1579 AC_CACHE_VAL(am_cv_proto_iconv, [
1587 #if defined(__STDC__) || defined(__cplusplus)
1588 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
1592 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
1593 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);"])
1594 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
1595 AC_MSG_RESULT([$]{ac_t:-
1596 }[$]am_cv_proto_iconv)
1597 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
1598 [Define as const if the declaration of iconv() needs const.])
1602 # isc-posix.m4 serial 2 (gettext-0.11.2)
1603 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1604 dnl This file is free software, distributed under the terms of the GNU
1605 dnl General Public License. As a special exception to the GNU General
1606 dnl Public License, this file may be distributed as part of a program
1607 dnl that contains a configuration script generated by Autoconf, under
1608 dnl the same distribution terms as the rest of that program.
1610 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
1612 # This test replaces the one in autoconf.
1613 # Currently this macro should have the same name as the autoconf macro
1614 # because gettext's gettext.m4 (distributed in the automake package)
1615 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
1616 # give these diagnostics:
1617 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1618 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1620 undefine([AC_ISC_POSIX])
1622 AC_DEFUN([AC_ISC_POSIX],
1624 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1625 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1629 # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
1630 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
1631 dnl This file is free software, distributed under the terms of the GNU
1632 dnl General Public License. As a special exception to the GNU General
1633 dnl Public License, this file may be distributed as part of a program
1634 dnl that contains a configuration script generated by Autoconf, under
1635 dnl the same distribution terms as the rest of that program.
1637 # Test for the GNU C Library, version 2.1 or newer.
1638 # From Bruno Haible.
1640 AC_DEFUN([jm_GLIBC21],
1642 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
1643 ac_cv_gnu_library_2_1,
1644 [AC_EGREP_CPP([Lucky GNU user],
1646 #include <features.h>
1647 #ifdef __GNU_LIBRARY__
1648 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
1653 ac_cv_gnu_library_2_1=yes,
1654 ac_cv_gnu_library_2_1=no)
1658 GLIBC21="$ac_cv_gnu_library_2_1"
1662 # intdiv0.m4 serial 1 (gettext-0.11.3)
1663 dnl Copyright (C) 2002 Free Software Foundation, Inc.
1664 dnl This file is free software, distributed under the terms of the GNU
1665 dnl General Public License. As a special exception to the GNU General
1666 dnl Public License, this file may be distributed as part of a program
1667 dnl that contains a configuration script generated by Autoconf, under
1668 dnl the same distribution terms as the rest of that program.
1670 dnl From Bruno Haible.
1672 AC_DEFUN([gt_INTDIV0],
1674 AC_REQUIRE([AC_PROG_CC])dnl
1675 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1677 AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
1678 gt_cv_int_divbyzero_sigfpe,
1686 sigfpe_handler (int sig)
1688 sigfpe_handler (sig) int sig;
1691 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
1692 exit (sig != SIGFPE);
1702 signal (SIGFPE, sigfpe_handler);
1703 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
1704 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
1705 signal (SIGTRAP, sigfpe_handler);
1707 /* Linux/SPARC yields signal SIGILL. */
1708 #if defined (__sparc__) && defined (__linux__)
1709 signal (SIGILL, sigfpe_handler);
1716 ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
1718 # Guess based on the CPU.
1720 alpha* | i[34567]86 | m68k | s390*)
1721 gt_cv_int_divbyzero_sigfpe="guessing yes";;
1723 gt_cv_int_divbyzero_sigfpe="guessing no";;
1727 case "$gt_cv_int_divbyzero_sigfpe" in
1731 AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
1732 [Define if integer division by zero raises signal SIGFPE.])
1735 # uintmax_t.m4 serial 7 (gettext-0.12)
1736 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
1737 dnl This file is free software, distributed under the terms of the GNU
1738 dnl General Public License. As a special exception to the GNU General
1739 dnl Public License, this file may be distributed as part of a program
1740 dnl that contains a configuration script generated by Autoconf, under
1741 dnl the same distribution terms as the rest of that program.
1743 dnl From Paul Eggert.
1747 # Define uintmax_t to 'unsigned long' or 'unsigned long long'
1748 # if it is not already defined in <stdint.h> or <inttypes.h>.
1750 AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
1752 AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
1753 AC_REQUIRE([jm_AC_HEADER_STDINT_H])
1754 if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
1755 AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
1756 test $ac_cv_type_unsigned_long_long = yes \
1757 && ac_type='unsigned long long' \
1758 || ac_type='unsigned long'
1759 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
1760 [Define to unsigned long or unsigned long long
1761 if <stdint.h> and <inttypes.h> don't define.])
1763 AC_DEFINE(HAVE_UINTMAX_T, 1,
1764 [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
1768 # inttypes_h.m4 serial 5 (gettext-0.12)
1769 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
1770 dnl This file is free software, distributed under the terms of the GNU
1771 dnl General Public License. As a special exception to the GNU General
1772 dnl Public License, this file may be distributed as part of a program
1773 dnl that contains a configuration script generated by Autoconf, under
1774 dnl the same distribution terms as the rest of that program.
1776 dnl From Paul Eggert.
1778 # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
1779 # doesn't clash with <sys/types.h>, and declares uintmax_t.
1781 AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
1783 AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
1785 [#include <sys/types.h>
1786 #include <inttypes.h>],
1787 [uintmax_t i = (uintmax_t) -1;],
1788 jm_ac_cv_header_inttypes_h=yes,
1789 jm_ac_cv_header_inttypes_h=no)])
1790 if test $jm_ac_cv_header_inttypes_h = yes; then
1791 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
1792 [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
1793 and declares uintmax_t. ])
1797 # stdint_h.m4 serial 3 (gettext-0.12)
1798 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
1799 dnl This file is free software, distributed under the terms of the GNU
1800 dnl General Public License. As a special exception to the GNU General
1801 dnl Public License, this file may be distributed as part of a program
1802 dnl that contains a configuration script generated by Autoconf, under
1803 dnl the same distribution terms as the rest of that program.
1805 dnl From Paul Eggert.
1807 # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
1808 # doesn't clash with <sys/types.h>, and declares uintmax_t.
1810 AC_DEFUN([jm_AC_HEADER_STDINT_H],
1812 AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
1814 [#include <sys/types.h>
1815 #include <stdint.h>],
1816 [uintmax_t i = (uintmax_t) -1;],
1817 jm_ac_cv_header_stdint_h=yes,
1818 jm_ac_cv_header_stdint_h=no)])
1819 if test $jm_ac_cv_header_stdint_h = yes; then
1820 AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
1821 [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
1822 and declares uintmax_t. ])
1826 # ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
1827 dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
1828 dnl This file is free software, distributed under the terms of the GNU
1829 dnl General Public License. As a special exception to the GNU General
1830 dnl Public License, this file may be distributed as part of a program
1831 dnl that contains a configuration script generated by Autoconf, under
1832 dnl the same distribution terms as the rest of that program.
1834 dnl From Paul Eggert.
1836 AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
1838 AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
1839 [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
1840 [unsigned long long ullmax = (unsigned long long) -1;
1841 return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
1842 ac_cv_type_unsigned_long_long=yes,
1843 ac_cv_type_unsigned_long_long=no)])
1844 if test $ac_cv_type_unsigned_long_long = yes; then
1845 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
1846 [Define if you have the unsigned long long type.])
1850 # inttypes.m4 serial 1 (gettext-0.11.4)
1851 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
1852 dnl This file is free software, distributed under the terms of the GNU
1853 dnl General Public License. As a special exception to the GNU General
1854 dnl Public License, this file may be distributed as part of a program
1855 dnl that contains a configuration script generated by Autoconf, under
1856 dnl the same distribution terms as the rest of that program.
1858 dnl From Paul Eggert.
1860 # Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
1863 AC_DEFUN([gt_HEADER_INTTYPES_H],
1865 AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
1868 [#include <sys/types.h>
1869 #include <inttypes.h>],
1870 [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
1872 if test $gt_cv_header_inttypes_h = yes; then
1873 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
1874 [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
1878 # inttypes-pri.m4 serial 1 (gettext-0.11.4)
1879 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
1880 dnl This file is free software, distributed under the terms of the GNU
1881 dnl General Public License. As a special exception to the GNU General
1882 dnl Public License, this file may be distributed as part of a program
1883 dnl that contains a configuration script generated by Autoconf, under
1884 dnl the same distribution terms as the rest of that program.
1886 dnl From Bruno Haible.
1888 # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
1889 # macros to non-string values. This is the case on AIX 4.3.3.
1891 AC_DEFUN([gt_INTTYPES_PRI],
1893 AC_REQUIRE([gt_HEADER_INTTYPES_H])
1894 if test $gt_cv_header_inttypes_h = yes; then
1895 AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
1896 gt_cv_inttypes_pri_broken,
1898 AC_TRY_COMPILE([#include <inttypes.h>
1902 ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
1905 if test "$gt_cv_inttypes_pri_broken" = yes; then
1906 AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
1907 [Define if <inttypes.h> exists and defines unusable PRI* macros.])
1911 # codeset.m4 serial AM1 (gettext-0.10.40)
1912 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
1913 dnl This file is free software, distributed under the terms of the GNU
1914 dnl General Public License. As a special exception to the GNU General
1915 dnl Public License, this file may be distributed as part of a program
1916 dnl that contains a configuration script generated by Autoconf, under
1917 dnl the same distribution terms as the rest of that program.
1919 dnl From Bruno Haible.
1921 AC_DEFUN([AM_LANGINFO_CODESET],
1923 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
1924 [AC_TRY_LINK([#include <langinfo.h>],
1925 [char* cs = nl_langinfo(CODESET);],
1926 am_cv_langinfo_codeset=yes,
1927 am_cv_langinfo_codeset=no)
1929 if test $am_cv_langinfo_codeset = yes; then
1930 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
1931 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
1935 # lcmessage.m4 serial 3 (gettext-0.11.3)
1936 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1937 dnl This file is free software, distributed under the terms of the GNU
1938 dnl General Public License. As a special exception to the GNU General
1939 dnl Public License, this file may be distributed as part of a program
1940 dnl that contains a configuration script generated by Autoconf, under
1941 dnl the same distribution terms as the rest of that program.
1943 dnl This file can can be used in projects which are not available under
1944 dnl the GNU General Public License or the GNU Library General Public
1945 dnl License but which still want to provide support for the GNU gettext
1947 dnl Please note that the actual code of the GNU gettext library is covered
1948 dnl by the GNU Library General Public License, and the rest of the GNU
1949 dnl gettext package package is covered by the GNU General Public License.
1950 dnl They are *not* in the public domain.
1953 dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
1955 # Check whether LC_MESSAGES is available in <locale.h>.
1957 AC_DEFUN([AM_LC_MESSAGES],
1959 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1960 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1961 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1962 if test $am_cv_val_LC_MESSAGES = yes; then
1963 AC_DEFINE(HAVE_LC_MESSAGES, 1,
1964 [Define if your <locale.h> file defines LC_MESSAGES.])