1 # generated automatically by aclocal 1.8.2 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 # codeset.m4 serial AM1 (gettext-0.10.40)
15 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
16 dnl This file is free software, distributed under the terms of the GNU
17 dnl General Public License. As a special exception to the GNU General
18 dnl Public License, this file may be distributed as part of a program
19 dnl that contains a configuration script generated by Autoconf, under
20 dnl the same distribution terms as the rest of that program.
22 dnl From Bruno Haible.
24 AC_DEFUN([AM_LANGINFO_CODESET],
26 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
27 [AC_TRY_LINK([#include <langinfo.h>],
28 [char* cs = nl_langinfo(CODESET);],
29 am_cv_langinfo_codeset=yes,
30 am_cv_langinfo_codeset=no)
32 if test $am_cv_langinfo_codeset = yes; then
33 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
34 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
38 # gettext.m4 serial 20 (gettext-0.12)
39 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
40 dnl This file is free software, distributed under the terms of the GNU
41 dnl General Public License. As a special exception to the GNU General
42 dnl Public License, this file may be distributed as part of a program
43 dnl that contains a configuration script generated by Autoconf, under
44 dnl the same distribution terms as the rest of that program.
46 dnl This file can can be used in projects which are not available under
47 dnl the GNU General Public License or the GNU Library General Public
48 dnl License but which still want to provide support for the GNU gettext
50 dnl Please note that the actual code of the GNU gettext library is covered
51 dnl by the GNU Library General Public License, and the rest of the GNU
52 dnl gettext package package is covered by the GNU General Public License.
53 dnl They are *not* in the public domain.
56 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
57 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
59 dnl Macro to add for using GNU gettext.
61 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
62 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
63 dnl default (if it is not specified or empty) is 'no-libtool'.
64 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
65 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
66 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
67 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
68 dnl depending on --{enable,disable}-{shared,static} and on the presence of
69 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
70 dnl $(top_builddir)/intl/libintl.a will be created.
71 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
72 dnl implementations (in libc or libintl) without the ngettext() function
73 dnl will be ignored. If NEEDSYMBOL is specified and is
74 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
75 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
76 dnl INTLDIR is used to find the intl libraries. If empty,
77 dnl the value `$(top_builddir)/intl/' is used.
79 dnl The result of the configuration is one of three cases:
80 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
82 dnl Catalog format: GNU --> install in $(datadir)
83 dnl Catalog extension: .mo after installation, .gmo in source tree
84 dnl 2) GNU gettext has been found in the system's C library.
85 dnl Catalog format: GNU --> install in $(datadir)
86 dnl Catalog extension: .mo after installation, .gmo in source tree
87 dnl 3) No internationalization, always use English msgid.
88 dnl Catalog format: none
89 dnl Catalog extension: none
90 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
91 dnl The use of .gmo is historical (it was needed to avoid overwriting the
92 dnl GNU format catalogs when building on a platform with an X/Open gettext),
93 dnl but we keep it in order not to force irrelevant filename changes on the
96 AC_DEFUN([AM_GNU_GETTEXT],
98 dnl Argument checking.
99 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
100 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
102 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
103 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
105 define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
106 define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
108 AC_REQUIRE([AM_PO_SUBDIRS])dnl
109 ifelse(gt_included_intl, yes, [
110 AC_REQUIRE([AM_INTL_SUBDIR])dnl
113 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
114 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
115 AC_REQUIRE([AC_LIB_RPATH])
117 dnl Sometimes libintl requires libiconv, so first search for libiconv.
118 dnl Ideally we would do this search only after the
119 dnl if test "$USE_NLS" = "yes"; then
120 dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
121 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
122 dnl the configure script would need to contain the same shell code
123 dnl again, outside any 'if'. There are two solutions:
124 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
125 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
126 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
127 dnl documented, we avoid it.
128 ifelse(gt_included_intl, yes, , [
129 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
135 ifelse(gt_included_intl, yes, [
136 BUILD_INCLUDED_LIBINTL=no
137 USE_INCLUDED_LIBINTL=no
143 dnl If we use NLS figure out what method
144 if test "$USE_NLS" = "yes"; then
145 gt_use_preinstalled_gnugettext=no
146 ifelse(gt_included_intl, yes, [
147 AC_MSG_CHECKING([whether included gettext is requested])
148 AC_ARG_WITH(included-gettext,
149 [ --with-included-gettext use the GNU gettext library included here],
150 nls_cv_force_use_gnu_gettext=$withval,
151 nls_cv_force_use_gnu_gettext=no)
152 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
154 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
155 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
157 dnl User does not insist on using GNU NLS library. Figure out what
158 dnl to use. If GNU gettext is available we use this. Else we have
159 dnl to fall back to GNU NLS library.
161 dnl Add a version number to the cache macros.
162 define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
163 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
164 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
166 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
167 [AC_TRY_LINK([#include <libintl.h>
168 ]ifelse([$2], [need-formatstring-macros],
169 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
170 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
173 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
175 ], [])[extern int _nl_msg_cat_cntr;
176 extern int *_nl_domain_bindings;],
177 [bindtextdomain ("", "");
178 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
179 gt_cv_func_gnugettext_libc=yes,
180 gt_cv_func_gnugettext_libc=no)])
182 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
183 dnl Sometimes libintl requires libiconv, so first search for libiconv.
184 ifelse(gt_included_intl, yes, , [
187 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
188 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
189 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
190 dnl even if libiconv doesn't exist.
191 AC_LIB_LINKFLAGS_BODY([intl])
192 AC_CACHE_CHECK([for GNU gettext in libintl],
193 gt_cv_func_gnugettext_libintl,
194 [gt_save_CPPFLAGS="$CPPFLAGS"
195 CPPFLAGS="$CPPFLAGS $INCINTL"
197 LIBS="$LIBS $LIBINTL"
198 dnl Now see whether libintl exists and does not depend on libiconv.
199 AC_TRY_LINK([#include <libintl.h>
200 ]ifelse([$2], [need-formatstring-macros],
201 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
202 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
205 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
207 ], [])[extern int _nl_msg_cat_cntr;
212 const char *_nl_expand_alias ();],
213 [bindtextdomain ("", "");
214 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
215 gt_cv_func_gnugettext_libintl=yes,
216 gt_cv_func_gnugettext_libintl=no)
217 dnl Now see whether libintl exists and depends on libiconv.
218 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
219 LIBS="$LIBS $LIBICONV"
220 AC_TRY_LINK([#include <libintl.h>
221 ]ifelse([$2], [need-formatstring-macros],
222 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
223 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
226 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
228 ], [])[extern int _nl_msg_cat_cntr;
233 const char *_nl_expand_alias ();],
234 [bindtextdomain ("", "");
235 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
236 [LIBINTL="$LIBINTL $LIBICONV"
237 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
238 gt_cv_func_gnugettext_libintl=yes
241 CPPFLAGS="$gt_save_CPPFLAGS"
242 LIBS="$gt_save_LIBS"])
245 dnl If an already present or preinstalled GNU gettext() is found,
246 dnl use it. But if this macro is used in GNU gettext, and GNU
247 dnl gettext is already preinstalled in libintl, we update this
248 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
249 if test "$gt_cv_func_gnugettext_libc" = "yes" \
250 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
251 && test "$PACKAGE" != gettext-runtime \
252 && test "$PACKAGE" != gettext-tools; }; then
253 gt_use_preinstalled_gnugettext=yes
255 dnl Reset the values set by searching for libintl.
261 ifelse(gt_included_intl, yes, [
262 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
263 dnl GNU gettext is not found in the C library.
264 dnl Fall back on included GNU gettext library.
265 nls_cv_use_gnu_gettext=yes
269 if test "$nls_cv_use_gnu_gettext" = "yes"; then
270 dnl Mark actions used to generate GNU NLS library.
271 BUILD_INCLUDED_LIBINTL=yes
272 USE_INCLUDED_LIBINTL=yes
273 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
274 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
275 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
278 if test "$gt_use_preinstalled_gnugettext" = "yes" \
279 || test "$nls_cv_use_gnu_gettext" = "yes"; then
280 dnl Mark actions to use GNU gettext tools.
285 if test "$gt_use_preinstalled_gnugettext" = "yes" \
286 || test "$nls_cv_use_gnu_gettext" = "yes"; then
287 AC_DEFINE(ENABLE_NLS, 1,
288 [Define to 1 if translation of program messages to the user's native language
295 AC_MSG_CHECKING([whether to use NLS])
296 AC_MSG_RESULT([$USE_NLS])
297 if test "$USE_NLS" = "yes"; then
298 AC_MSG_CHECKING([where the gettext function comes from])
299 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
300 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
301 gt_source="external libintl"
306 gt_source="included intl directory"
308 AC_MSG_RESULT([$gt_source])
311 if test "$USE_NLS" = "yes"; then
313 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
314 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
315 AC_MSG_CHECKING([how to link with libintl])
316 AC_MSG_RESULT([$LIBINTL])
317 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
320 dnl For backward compatibility. Some packages may be using this.
321 AC_DEFINE(HAVE_GETTEXT, 1,
322 [Define if the GNU gettext() function is already present or preinstalled.])
323 AC_DEFINE(HAVE_DCGETTEXT, 1,
324 [Define if the GNU dcgettext() function is already present or preinstalled.])
327 dnl We need to process the po/ directory.
331 ifelse(gt_included_intl, yes, [
332 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
333 dnl to 'yes' because some of the testsuite requires it.
334 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
335 BUILD_INCLUDED_LIBINTL=yes
338 dnl Make all variables we use known to autoconf.
339 AC_SUBST(BUILD_INCLUDED_LIBINTL)
340 AC_SUBST(USE_INCLUDED_LIBINTL)
343 dnl For backward compatibility. Some configure.ins may be using this.
347 dnl For backward compatibility. Some Makefiles may be using this.
349 AC_SUBST(DATADIRNAME)
351 dnl For backward compatibility. Some Makefiles may be using this.
355 dnl For backward compatibility. Some Makefiles may be using this.
359 dnl For backward compatibility. Some Makefiles may be using this.
360 if test "$USE_INCLUDED_LIBINTL" = yes; then
361 INTLOBJS="\$(GETTOBJS)"
365 dnl Enable libtool support if the surrounding package wishes it.
366 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
367 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
370 dnl For backward compatibility. Some Makefiles may be using this.
374 dnl Make all documented variables known to autoconf.
381 dnl Checks for all prerequisites of the intl subdirectory,
382 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
383 dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
384 AC_DEFUN([AM_INTL_SUBDIR],
386 AC_REQUIRE([AC_PROG_INSTALL])dnl
387 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
388 AC_REQUIRE([AC_PROG_CC])dnl
389 AC_REQUIRE([AC_CANONICAL_HOST])dnl
390 AC_REQUIRE([AC_PROG_RANLIB])dnl
391 AC_REQUIRE([AC_ISC_POSIX])dnl
392 AC_REQUIRE([AC_HEADER_STDC])dnl
393 AC_REQUIRE([AC_C_CONST])dnl
394 AC_REQUIRE([AC_C_INLINE])dnl
395 AC_REQUIRE([AC_TYPE_OFF_T])dnl
396 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
397 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
398 AC_REQUIRE([AC_FUNC_MMAP])dnl
399 AC_REQUIRE([jm_GLIBC21])dnl
400 AC_REQUIRE([gt_INTDIV0])dnl
401 AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
402 AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
403 AC_REQUIRE([gt_INTTYPES_PRI])dnl
405 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
406 stdlib.h string.h unistd.h sys/param.h])
407 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
408 geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
409 strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
414 if test $ac_cv_header_locale_h = yes; then
418 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
419 dnl because plural.y uses bison specific features. It requires at least
420 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
422 dnl bison is only needed for the maintainer (who touches plural.y). But in
423 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
424 dnl the rule in general Makefile. Now, some people carelessly touch the
425 dnl files or have a broken "make" program, hence the plural.c rule will
426 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
427 dnl present or too old.
428 AC_CHECK_PROGS([INTLBISON], [bison])
429 if test -z "$INTLBISON"; then
432 dnl Found it, now check the version.
433 AC_MSG_CHECKING([version of bison])
434 changequote(<<,>>)dnl
435 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
436 case $ac_prog_version in
437 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
438 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
440 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
441 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
443 AC_MSG_RESULT([$ac_prog_version])
445 if test $ac_verc_fail = yes; then
451 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
452 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
454 # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
455 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
456 dnl This file is free software, distributed under the terms of the GNU
457 dnl General Public License. As a special exception to the GNU General
458 dnl Public License, this file may be distributed as part of a program
459 dnl that contains a configuration script generated by Autoconf, under
460 dnl the same distribution terms as the rest of that program.
462 # Test for the GNU C Library, version 2.1 or newer.
465 AC_DEFUN([jm_GLIBC21],
467 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
468 ac_cv_gnu_library_2_1,
469 [AC_EGREP_CPP([Lucky GNU user],
471 #include <features.h>
472 #ifdef __GNU_LIBRARY__
473 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
478 ac_cv_gnu_library_2_1=yes,
479 ac_cv_gnu_library_2_1=no)
483 GLIBC21="$ac_cv_gnu_library_2_1"
487 # Configure paths for GTK+
488 # Owen Taylor 1997-2001
490 dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
491 dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
492 dnl pass to pkg-config
494 AC_DEFUN(AM_PATH_GTK_2_0,
496 dnl Get the cflags and libraries from pkg-config
498 AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
499 , enable_gtktest=yes)
501 pkg_config_args=gtk+-2.0
506 pkg_config_args="$pkg_config_args gthread-2.0"
513 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
515 if test x$PKG_CONFIG != xno ; then
516 if pkg-config --atleast-pkgconfig-version 0.7 ; then
519 echo *** pkg-config too old; version 0.7 or better required.
527 min_gtk_version=ifelse([$1], ,2.0.0,$1)
528 AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
530 if test x$PKG_CONFIG != xno ; then
531 ## don't try to run the test against uninstalled libtool libs
532 if $PKG_CONFIG --uninstalled $pkg_config_args; then
533 echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
537 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
544 if test x"$no_gtk" = x ; then
545 GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
546 GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
547 gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
548 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
549 gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
550 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
551 gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
552 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
553 if test "x$enable_gtktest" = "xyes" ; then
554 ac_save_CFLAGS="$CFLAGS"
556 CFLAGS="$CFLAGS $GTK_CFLAGS"
557 LIBS="$GTK_LIBS $LIBS"
559 dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
560 dnl checks the results of pkg-config to some extent)
571 int major, minor, micro;
574 system ("touch conf.gtktest");
576 /* HP/UX 9 (%@#!) writes to sscanf strings */
577 tmp_version = g_strdup("$min_gtk_version");
578 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
579 printf("%s, bad version string\n", "$min_gtk_version");
583 if ((gtk_major_version != $gtk_config_major_version) ||
584 (gtk_minor_version != $gtk_config_minor_version) ||
585 (gtk_micro_version != $gtk_config_micro_version))
587 printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
588 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
589 gtk_major_version, gtk_minor_version, gtk_micro_version);
590 printf ("*** was found! If pkg-config was correct, then it is best\n");
591 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
592 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
593 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
594 printf("*** required on your system.\n");
595 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
596 printf("*** to point to the correct configuration files\n");
598 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
599 (gtk_minor_version != GTK_MINOR_VERSION) ||
600 (gtk_micro_version != GTK_MICRO_VERSION))
602 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
603 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
604 printf("*** library (version %d.%d.%d)\n",
605 gtk_major_version, gtk_minor_version, gtk_micro_version);
609 if ((gtk_major_version > major) ||
610 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
611 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
617 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
618 gtk_major_version, gtk_minor_version, gtk_micro_version);
619 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
620 major, minor, micro);
621 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
623 printf("*** If you have already installed a sufficiently new version, this error\n");
624 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
625 printf("*** being found. The easiest way to fix this is to remove the old version\n");
626 printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
627 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
628 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
629 printf("*** so that the correct libraries are found at run-time))\n");
634 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
635 CFLAGS="$ac_save_CFLAGS"
639 if test "x$no_gtk" = x ; then
640 AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
641 ifelse([$2], , :, [$2])
644 if test "$PKG_CONFIG" = "no" ; then
645 echo "*** A new enough version of pkg-config was not found."
646 echo "*** See http://pkgconfig.sourceforge.net"
648 if test -f conf.gtktest ; then
651 echo "*** Could not run GTK+ test program, checking why..."
652 ac_save_CFLAGS="$CFLAGS"
654 CFLAGS="$CFLAGS $GTK_CFLAGS"
655 LIBS="$LIBS $GTK_LIBS"
659 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
660 [ echo "*** The test program compiled, but did not run. This usually means"
661 echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
662 echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
663 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
664 echo "*** to the installed location Also, make sure you have run ldconfig if that"
665 echo "*** is required on your system"
667 echo "*** If you have an old version installed, it is best to remove it, although"
668 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
669 [ echo "*** The test program failed to compile or link. See the file config.log for the"
670 echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
671 CFLAGS="$ac_save_CFLAGS"
677 ifelse([$3], , :, [$3])
684 # iconv.m4 serial AM4 (gettext-0.11.3)
685 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
686 dnl This file is free software, distributed under the terms of the GNU
687 dnl General Public License. As a special exception to the GNU General
688 dnl Public License, this file may be distributed as part of a program
689 dnl that contains a configuration script generated by Autoconf, under
690 dnl the same distribution terms as the rest of that program.
692 dnl From Bruno Haible.
694 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
696 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
697 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
698 AC_REQUIRE([AC_LIB_RPATH])
700 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
702 AC_LIB_LINKFLAGS_BODY([iconv])
705 AC_DEFUN([AM_ICONV_LINK],
707 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
708 dnl those with the standalone portable GNU libiconv installed).
710 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
712 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
714 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
715 dnl because if the user has installed libiconv and not disabled its use
716 dnl via --without-libiconv-prefix, he wants to use it. The first
717 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
718 am_save_CPPFLAGS="$CPPFLAGS"
719 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
721 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
722 am_cv_func_iconv="no, consider installing GNU libiconv"
724 AC_TRY_LINK([#include <stdlib.h>
726 [iconv_t cd = iconv_open("","");
727 iconv(cd,NULL,NULL,NULL,NULL);
729 am_cv_func_iconv=yes)
730 if test "$am_cv_func_iconv" != yes; then
732 LIBS="$LIBS $LIBICONV"
733 AC_TRY_LINK([#include <stdlib.h>
735 [iconv_t cd = iconv_open("","");
736 iconv(cd,NULL,NULL,NULL,NULL);
739 am_cv_func_iconv=yes)
743 if test "$am_cv_func_iconv" = yes; then
744 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
746 if test "$am_cv_lib_iconv" = yes; then
747 AC_MSG_CHECKING([how to link with libiconv])
748 AC_MSG_RESULT([$LIBICONV])
750 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
752 CPPFLAGS="$am_save_CPPFLAGS"
763 if test "$am_cv_func_iconv" = yes; then
764 AC_MSG_CHECKING([for iconv declaration])
765 AC_CACHE_VAL(am_cv_proto_iconv, [
773 #if defined(__STDC__) || defined(__cplusplus)
774 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
778 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
779 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);"])
780 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
781 AC_MSG_RESULT([$]{ac_t:-
782 }[$]am_cv_proto_iconv)
783 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
784 [Define as const if the declaration of iconv() needs const.])
788 # intdiv0.m4 serial 1 (gettext-0.11.3)
789 dnl Copyright (C) 2002 Free Software Foundation, Inc.
790 dnl This file is free software, distributed under the terms of the GNU
791 dnl General Public License. As a special exception to the GNU General
792 dnl Public License, this file may be distributed as part of a program
793 dnl that contains a configuration script generated by Autoconf, under
794 dnl the same distribution terms as the rest of that program.
796 dnl From Bruno Haible.
798 AC_DEFUN([gt_INTDIV0],
800 AC_REQUIRE([AC_PROG_CC])dnl
801 AC_REQUIRE([AC_CANONICAL_HOST])dnl
803 AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
804 gt_cv_int_divbyzero_sigfpe,
812 sigfpe_handler (int sig)
814 sigfpe_handler (sig) int sig;
817 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
818 exit (sig != SIGFPE);
828 signal (SIGFPE, sigfpe_handler);
829 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
830 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
831 signal (SIGTRAP, sigfpe_handler);
833 /* Linux/SPARC yields signal SIGILL. */
834 #if defined (__sparc__) && defined (__linux__)
835 signal (SIGILL, sigfpe_handler);
842 ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
844 # Guess based on the CPU.
846 alpha* | i[34567]86 | m68k | s390*)
847 gt_cv_int_divbyzero_sigfpe="guessing yes";;
849 gt_cv_int_divbyzero_sigfpe="guessing no";;
853 case "$gt_cv_int_divbyzero_sigfpe" in
857 AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
858 [Define if integer division by zero raises signal SIGFPE.])
861 # inttypes-pri.m4 serial 1 (gettext-0.11.4)
862 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
863 dnl This file is free software, distributed under the terms of the GNU
864 dnl General Public License. As a special exception to the GNU General
865 dnl Public License, this file may be distributed as part of a program
866 dnl that contains a configuration script generated by Autoconf, under
867 dnl the same distribution terms as the rest of that program.
869 dnl From Bruno Haible.
871 # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
872 # macros to non-string values. This is the case on AIX 4.3.3.
874 AC_DEFUN([gt_INTTYPES_PRI],
876 AC_REQUIRE([gt_HEADER_INTTYPES_H])
877 if test $gt_cv_header_inttypes_h = yes; then
878 AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
879 gt_cv_inttypes_pri_broken,
881 AC_TRY_COMPILE([#include <inttypes.h>
885 ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
888 if test "$gt_cv_inttypes_pri_broken" = yes; then
889 AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
890 [Define if <inttypes.h> exists and defines unusable PRI* macros.])
894 # inttypes.m4 serial 1 (gettext-0.11.4)
895 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
896 dnl This file is free software, distributed under the terms of the GNU
897 dnl General Public License. As a special exception to the GNU General
898 dnl Public License, this file may be distributed as part of a program
899 dnl that contains a configuration script generated by Autoconf, under
900 dnl the same distribution terms as the rest of that program.
902 dnl From Paul Eggert.
904 # Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
907 AC_DEFUN([gt_HEADER_INTTYPES_H],
909 AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
912 [#include <sys/types.h>
913 #include <inttypes.h>],
914 [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
916 if test $gt_cv_header_inttypes_h = yes; then
917 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
918 [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
922 # inttypes_h.m4 serial 5 (gettext-0.12)
923 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
924 dnl This file is free software, distributed under the terms of the GNU
925 dnl General Public License. As a special exception to the GNU General
926 dnl Public License, this file may be distributed as part of a program
927 dnl that contains a configuration script generated by Autoconf, under
928 dnl the same distribution terms as the rest of that program.
930 dnl From Paul Eggert.
932 # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
933 # doesn't clash with <sys/types.h>, and declares uintmax_t.
935 AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
937 AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
939 [#include <sys/types.h>
940 #include <inttypes.h>],
941 [uintmax_t i = (uintmax_t) -1;],
942 jm_ac_cv_header_inttypes_h=yes,
943 jm_ac_cv_header_inttypes_h=no)])
944 if test $jm_ac_cv_header_inttypes_h = yes; then
945 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
946 [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
947 and declares uintmax_t. ])
951 # lcmessage.m4 serial 3 (gettext-0.11.3)
952 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
953 dnl This file is free software, distributed under the terms of the GNU
954 dnl General Public License. As a special exception to the GNU General
955 dnl Public License, this file may be distributed as part of a program
956 dnl that contains a configuration script generated by Autoconf, under
957 dnl the same distribution terms as the rest of that program.
959 dnl This file can can be used in projects which are not available under
960 dnl the GNU General Public License or the GNU Library General Public
961 dnl License but which still want to provide support for the GNU gettext
963 dnl Please note that the actual code of the GNU gettext library is covered
964 dnl by the GNU Library General Public License, and the rest of the GNU
965 dnl gettext package package is covered by the GNU General Public License.
966 dnl They are *not* in the public domain.
969 dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
971 # Check whether LC_MESSAGES is available in <locale.h>.
973 AC_DEFUN([AM_LC_MESSAGES],
975 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
976 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
977 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
978 if test $am_cv_val_LC_MESSAGES = yes; then
979 AC_DEFINE(HAVE_LC_MESSAGES, 1,
980 [Define if your <locale.h> file defines LC_MESSAGES.])
984 # lib-ld.m4 serial 2 (gettext-0.12)
985 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
986 dnl This file is free software, distributed under the terms of the GNU
987 dnl General Public License. As a special exception to the GNU General
988 dnl Public License, this file may be distributed as part of a program
989 dnl that contains a configuration script generated by Autoconf, under
990 dnl the same distribution terms as the rest of that program.
992 dnl Subroutines of libtool.m4,
993 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
996 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
997 AC_DEFUN([AC_LIB_PROG_LD_GNU],
998 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
999 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1000 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1001 acl_cv_prog_gnu_ld=yes
1003 acl_cv_prog_gnu_ld=no
1005 with_gnu_ld=$acl_cv_prog_gnu_ld
1008 dnl From libtool-1.4. Sets the variable LD.
1009 AC_DEFUN([AC_LIB_PROG_LD],
1010 [AC_ARG_WITH(gnu-ld,
1011 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
1012 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
1013 AC_REQUIRE([AC_PROG_CC])dnl
1014 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1015 # Prepare PATH_SEPARATOR.
1016 # The user is always right.
1017 if test "${PATH_SEPARATOR+set}" != set; then
1018 echo "#! /bin/sh" >conf$$.sh
1019 echo "exit 0" >>conf$$.sh
1021 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1029 if test "$GCC" = yes; then
1030 # Check if gcc -print-prog-name=ld gives a path.
1031 AC_MSG_CHECKING([for ld used by GCC])
1034 # gcc leaves a trailing carriage return which upsets mingw
1035 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1037 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1040 # Accept absolute paths.
1041 [[\\/]* | [A-Za-z]:[\\/]*)]
1042 [re_direlt='/[^/][^/]*/\.\./']
1043 # Canonicalize the path of ld
1044 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1045 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1046 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1048 test -z "$LD" && LD="$ac_prog"
1051 # If it fails, then pretend we aren't using GCC.
1055 # If it is relative, then search for the first ld in PATH.
1059 elif test "$with_gnu_ld" = yes; then
1060 AC_MSG_CHECKING([for GNU ld])
1062 AC_MSG_CHECKING([for non-GNU ld])
1064 AC_CACHE_VAL(acl_cv_path_LD,
1065 [if test -z "$LD"; then
1066 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1067 for ac_dir in $PATH; do
1068 test -z "$ac_dir" && ac_dir=.
1069 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1070 acl_cv_path_LD="$ac_dir/$ac_prog"
1071 # Check to see if the program is GNU ld. I'd rather use --version,
1072 # but apparently some GNU ld's only accept -v.
1073 # Break only if it was the GNU/non-GNU ld that we prefer.
1074 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1075 test "$with_gnu_ld" != no && break
1077 test "$with_gnu_ld" != yes && break
1083 acl_cv_path_LD="$LD" # Let the user override the test with a path.
1085 LD="$acl_cv_path_LD"
1086 if test -n "$LD"; then
1091 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1095 # lib-link.m4 serial 4 (gettext-0.12)
1096 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
1097 dnl This file is free software, distributed under the terms of the GNU
1098 dnl General Public License. As a special exception to the GNU General
1099 dnl Public License, this file may be distributed as part of a program
1100 dnl that contains a configuration script generated by Autoconf, under
1101 dnl the same distribution terms as the rest of that program.
1103 dnl From Bruno Haible.
1105 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1106 dnl the libraries corresponding to explicit and implicit dependencies.
1107 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1108 dnl augments the CPPFLAGS variable.
1109 AC_DEFUN([AC_LIB_LINKFLAGS],
1111 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1112 AC_REQUIRE([AC_LIB_RPATH])
1113 define([Name],[translit([$1],[./-], [___])])
1114 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1115 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1116 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1117 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1118 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1119 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1120 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1122 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1123 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1124 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1125 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1127 AC_SUBST([LTLIB]NAME)
1128 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1129 dnl results of this search when this library appears as a dependency.
1135 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
1136 dnl searches for libname and the libraries corresponding to explicit and
1137 dnl implicit dependencies, together with the specified include files and
1138 dnl the ability to compile and link the specified testcode. If found, it
1139 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
1140 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1141 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1142 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1143 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1145 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1146 AC_REQUIRE([AC_LIB_RPATH])
1147 define([Name],[translit([$1],[./-], [___])])
1148 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1149 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1151 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1153 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1155 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1156 dnl because if the user has installed lib[]Name and not disabled its use
1157 dnl via --without-lib[]Name-prefix, he wants to use it.
1158 ac_save_CPPFLAGS="$CPPFLAGS"
1159 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1161 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1162 ac_save_LIBS="$LIBS"
1163 LIBS="$LIBS $LIB[]NAME"
1164 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
1165 LIBS="$ac_save_LIBS"
1167 if test "$ac_cv_lib[]Name" = yes; then
1169 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
1170 AC_MSG_CHECKING([how to link with lib[]$1])
1171 AC_MSG_RESULT([$LIB[]NAME])
1174 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1175 dnl $INC[]NAME either.
1176 CPPFLAGS="$ac_save_CPPFLAGS"
1180 AC_SUBST([HAVE_LIB]NAME)
1182 AC_SUBST([LTLIB]NAME)
1187 dnl Determine the platform dependent parameters needed to use rpath:
1188 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
1189 dnl hardcode_direct, hardcode_minus_L.
1190 AC_DEFUN([AC_LIB_RPATH],
1192 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1193 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1194 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1195 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1196 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
1197 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1198 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1204 libext="$acl_cv_libext"
1205 shlibext="$acl_cv_shlibext"
1206 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1207 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1208 hardcode_direct="$acl_cv_hardcode_direct"
1209 hardcode_minus_L="$acl_cv_hardcode_minus_L"
1210 dnl Determine whether the user wants rpath handling at all.
1211 AC_ARG_ENABLE(rpath,
1212 [ --disable-rpath do not hardcode runtime library paths],
1213 :, enable_rpath=yes)
1216 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1217 dnl the libraries corresponding to explicit and implicit dependencies.
1218 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1219 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1221 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1222 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1223 dnl By default, look in $includedir and $libdir.
1225 AC_LIB_WITH_FINAL_PREFIX([
1226 eval additional_includedir=\"$includedir\"
1227 eval additional_libdir=\"$libdir\"
1229 AC_LIB_ARG_WITH([lib$1-prefix],
1230 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
1231 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
1233 if test "X$withval" = "Xno"; then
1236 if test "X$withval" = "X"; then
1237 AC_LIB_WITH_FINAL_PREFIX([
1238 eval additional_includedir=\"$includedir\"
1239 eval additional_libdir=\"$libdir\"
1242 additional_includedir="$withval/include"
1243 additional_libdir="$withval/lib"
1247 dnl Search the library and its dependencies in $additional_libdir and
1248 dnl $LDFLAGS. Using breadth-first-seach.
1254 names_already_handled=
1255 names_next_round='$1 $2'
1256 while test -n "$names_next_round"; do
1257 names_this_round="$names_next_round"
1259 for name in $names_this_round; do
1261 for n in $names_already_handled; do
1262 if test "$n" = "$name"; then
1267 if test -z "$already_handled"; then
1268 names_already_handled="$names_already_handled $name"
1269 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1270 dnl or AC_LIB_HAVE_LINKFLAGS call.
1271 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1272 eval value=\"\$HAVE_LIB$uppername\"
1273 if test -n "$value"; then
1274 if test "$value" = yes; then
1275 eval value=\"\$LIB$uppername\"
1276 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1277 eval value=\"\$LTLIB$uppername\"
1278 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1280 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1281 dnl that this library doesn't exist. So just drop it.
1285 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1286 dnl and the already constructed $LIBNAME/$LTLIBNAME.
1291 if test $use_additional = yes; then
1292 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
1293 found_dir="$additional_libdir"
1294 found_so="$additional_libdir/lib$name.$shlibext"
1295 if test -f "$additional_libdir/lib$name.la"; then
1296 found_la="$additional_libdir/lib$name.la"
1299 if test -f "$additional_libdir/lib$name.$libext"; then
1300 found_dir="$additional_libdir"
1301 found_a="$additional_libdir/lib$name.$libext"
1302 if test -f "$additional_libdir/lib$name.la"; then
1303 found_la="$additional_libdir/lib$name.la"
1308 if test "X$found_dir" = "X"; then
1309 for x in $LDFLAGS $LTLIB[]NAME; do
1310 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1313 dir=`echo "X$x" | sed -e 's/^X-L//'`
1314 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
1316 found_so="$dir/lib$name.$shlibext"
1317 if test -f "$dir/lib$name.la"; then
1318 found_la="$dir/lib$name.la"
1321 if test -f "$dir/lib$name.$libext"; then
1323 found_a="$dir/lib$name.$libext"
1324 if test -f "$dir/lib$name.la"; then
1325 found_la="$dir/lib$name.la"
1331 if test "X$found_dir" != "X"; then
1336 if test "X$found_dir" != "X"; then
1337 dnl Found the library.
1338 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1339 if test "X$found_so" != "X"; then
1340 dnl Linking with a shared library. We attempt to hardcode its
1341 dnl directory into the executable's runpath, unless it's the
1342 dnl standard /usr/lib.
1343 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
1344 dnl No hardcoding is needed.
1345 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1347 dnl Use an explicit option to hardcode DIR into the resulting
1349 dnl Potentially add DIR to ltrpathdirs.
1350 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1352 for x in $ltrpathdirs; do
1353 if test "X$x" = "X$found_dir"; then
1358 if test -z "$haveit"; then
1359 ltrpathdirs="$ltrpathdirs $found_dir"
1361 dnl The hardcoding into $LIBNAME is system dependent.
1362 if test "$hardcode_direct" = yes; then
1363 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1364 dnl resulting binary.
1365 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1367 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
1368 dnl Use an explicit option to hardcode DIR into the resulting
1370 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1371 dnl Potentially add DIR to rpathdirs.
1372 dnl The rpathdirs will be appended to $LIBNAME at the end.
1374 for x in $rpathdirs; do
1375 if test "X$x" = "X$found_dir"; then
1380 if test -z "$haveit"; then
1381 rpathdirs="$rpathdirs $found_dir"
1384 dnl Rely on "-L$found_dir".
1385 dnl But don't add it if it's already contained in the LDFLAGS
1386 dnl or the already constructed $LIBNAME
1388 for x in $LDFLAGS $LIB[]NAME; do
1389 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1390 if test "X$x" = "X-L$found_dir"; then
1395 if test -z "$haveit"; then
1396 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1398 if test "$hardcode_minus_L" != no; then
1399 dnl FIXME: Not sure whether we should use
1400 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1402 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1404 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
1405 dnl here, because this doesn't fit in flags passed to the
1406 dnl compiler. So give up. No hardcoding. This affects only
1407 dnl very old systems.
1408 dnl FIXME: Not sure whether we should use
1409 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1411 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1417 if test "X$found_a" != "X"; then
1418 dnl Linking with a static library.
1419 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1421 dnl We shouldn't come here, but anyway it's good to have a
1423 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1426 dnl Assume the include files are nearby.
1427 additional_includedir=
1428 case "$found_dir" in
1430 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
1431 additional_includedir="$basedir/include"
1434 if test "X$additional_includedir" != "X"; then
1435 dnl Potentially add $additional_includedir to $INCNAME.
1436 dnl But don't add it
1437 dnl 1. if it's the standard /usr/include,
1438 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1439 dnl 3. if it's already present in $CPPFLAGS or the already
1440 dnl constructed $INCNAME,
1441 dnl 4. if it doesn't exist as a directory.
1442 if test "X$additional_includedir" != "X/usr/include"; then
1444 if test "X$additional_includedir" = "X/usr/local/include"; then
1445 if test -n "$GCC"; then
1447 linux*) haveit=yes;;
1451 if test -z "$haveit"; then
1452 for x in $CPPFLAGS $INC[]NAME; do
1453 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1454 if test "X$x" = "X-I$additional_includedir"; then
1459 if test -z "$haveit"; then
1460 if test -d "$additional_includedir"; then
1461 dnl Really add $additional_includedir to $INCNAME.
1462 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1468 dnl Look for dependencies.
1469 if test -n "$found_la"; then
1470 dnl Read the .la file. It defines the variables
1471 dnl dlname, library_names, old_library, dependency_libs, current,
1472 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1473 save_libdir="$libdir"
1475 */* | *\\*) . "$found_la" ;;
1476 *) . "./$found_la" ;;
1478 libdir="$save_libdir"
1479 dnl We use only dependency_libs.
1480 for dep in $dependency_libs; do
1483 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1484 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1485 dnl But don't add it
1486 dnl 1. if it's the standard /usr/lib,
1487 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1488 dnl 3. if it's already present in $LDFLAGS or the already
1489 dnl constructed $LIBNAME,
1490 dnl 4. if it doesn't exist as a directory.
1491 if test "X$additional_libdir" != "X/usr/lib"; then
1493 if test "X$additional_libdir" = "X/usr/local/lib"; then
1494 if test -n "$GCC"; then
1496 linux*) haveit=yes;;
1500 if test -z "$haveit"; then
1502 for x in $LDFLAGS $LIB[]NAME; do
1503 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1504 if test "X$x" = "X-L$additional_libdir"; then
1509 if test -z "$haveit"; then
1510 if test -d "$additional_libdir"; then
1511 dnl Really add $additional_libdir to $LIBNAME.
1512 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1516 for x in $LDFLAGS $LTLIB[]NAME; do
1517 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1518 if test "X$x" = "X-L$additional_libdir"; then
1523 if test -z "$haveit"; then
1524 if test -d "$additional_libdir"; then
1525 dnl Really add $additional_libdir to $LTLIBNAME.
1526 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1533 dir=`echo "X$dep" | sed -e 's/^X-R//'`
1534 if test "$enable_rpath" != no; then
1535 dnl Potentially add DIR to rpathdirs.
1536 dnl The rpathdirs will be appended to $LIBNAME at the end.
1538 for x in $rpathdirs; do
1539 if test "X$x" = "X$dir"; then
1544 if test -z "$haveit"; then
1545 rpathdirs="$rpathdirs $dir"
1547 dnl Potentially add DIR to ltrpathdirs.
1548 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1550 for x in $ltrpathdirs; do
1551 if test "X$x" = "X$dir"; then
1556 if test -z "$haveit"; then
1557 ltrpathdirs="$ltrpathdirs $dir"
1562 dnl Handle this in the next round.
1563 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1566 dnl Handle this in the next round. Throw away the .la's
1567 dnl directory; it is already contained in a preceding -L
1569 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1572 dnl Most likely an immediate library name.
1573 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1574 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1580 dnl Didn't find the library; assume it is in the system directories
1581 dnl known to the linker and runtime loader. (All the system
1582 dnl directories known to the linker should also be known to the
1583 dnl runtime loader, otherwise the system is severely misconfigured.)
1584 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1585 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1591 if test "X$rpathdirs" != "X"; then
1592 if test -n "$hardcode_libdir_separator"; then
1593 dnl Weird platform: only the last -rpath option counts, the user must
1594 dnl pass all path elements in one option. We can arrange that for a
1595 dnl single library, but not when more than one $LIBNAMEs are used.
1597 for found_dir in $rpathdirs; do
1598 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
1600 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
1601 acl_save_libdir="$libdir"
1603 eval flag=\"$hardcode_libdir_flag_spec\"
1604 libdir="$acl_save_libdir"
1605 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1607 dnl The -rpath options are cumulative.
1608 for found_dir in $rpathdirs; do
1609 acl_save_libdir="$libdir"
1611 eval flag=\"$hardcode_libdir_flag_spec\"
1612 libdir="$acl_save_libdir"
1613 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1617 if test "X$ltrpathdirs" != "X"; then
1618 dnl When using libtool, the option that works for both libraries and
1619 dnl executables is -R. The -R options are cumulative.
1620 for found_dir in $ltrpathdirs; do
1621 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1626 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1627 dnl unless already present in VAR.
1628 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1629 dnl contains two or three consecutive elements that belong together.
1630 AC_DEFUN([AC_LIB_APPENDTOVAR],
1632 for element in [$2]; do
1635 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1636 if test "X$x" = "X$element"; then
1641 if test -z "$haveit"; then
1642 [$1]="${[$1]}${[$1]:+ }$element"
1647 # lib-prefix.m4 serial 2 (gettext-0.12)
1648 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
1649 dnl This file is free software, distributed under the terms of the GNU
1650 dnl General Public License. As a special exception to the GNU General
1651 dnl Public License, this file may be distributed as part of a program
1652 dnl that contains a configuration script generated by Autoconf, under
1653 dnl the same distribution terms as the rest of that program.
1655 dnl From Bruno Haible.
1657 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1658 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1659 dnl require excessive bracketing.
1660 ifdef([AC_HELP_STRING],
1661 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1662 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1664 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1665 dnl to access previously installed libraries. The basic assumption is that
1666 dnl a user will want packages to use other packages he previously installed
1667 dnl with the same --prefix option.
1668 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1669 dnl libraries, but is otherwise very convenient.
1670 AC_DEFUN([AC_LIB_PREFIX],
1672 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1673 AC_REQUIRE([AC_PROG_CC])
1674 AC_REQUIRE([AC_CANONICAL_HOST])
1675 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1676 dnl By default, look in $includedir and $libdir.
1678 AC_LIB_WITH_FINAL_PREFIX([
1679 eval additional_includedir=\"$includedir\"
1680 eval additional_libdir=\"$libdir\"
1682 AC_LIB_ARG_WITH([lib-prefix],
1683 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1684 --without-lib-prefix don't search for libraries in includedir and libdir],
1686 if test "X$withval" = "Xno"; then
1689 if test "X$withval" = "X"; then
1690 AC_LIB_WITH_FINAL_PREFIX([
1691 eval additional_includedir=\"$includedir\"
1692 eval additional_libdir=\"$libdir\"
1695 additional_includedir="$withval/include"
1696 additional_libdir="$withval/lib"
1700 if test $use_additional = yes; then
1701 dnl Potentially add $additional_includedir to $CPPFLAGS.
1702 dnl But don't add it
1703 dnl 1. if it's the standard /usr/include,
1704 dnl 2. if it's already present in $CPPFLAGS,
1705 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1706 dnl 4. if it doesn't exist as a directory.
1707 if test "X$additional_includedir" != "X/usr/include"; then
1709 for x in $CPPFLAGS; do
1710 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1711 if test "X$x" = "X-I$additional_includedir"; then
1716 if test -z "$haveit"; then
1717 if test "X$additional_includedir" = "X/usr/local/include"; then
1718 if test -n "$GCC"; then
1720 linux*) haveit=yes;;
1724 if test -z "$haveit"; then
1725 if test -d "$additional_includedir"; then
1726 dnl Really add $additional_includedir to $CPPFLAGS.
1727 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1732 dnl Potentially add $additional_libdir to $LDFLAGS.
1733 dnl But don't add it
1734 dnl 1. if it's the standard /usr/lib,
1735 dnl 2. if it's already present in $LDFLAGS,
1736 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1737 dnl 4. if it doesn't exist as a directory.
1738 if test "X$additional_libdir" != "X/usr/lib"; then
1740 for x in $LDFLAGS; do
1741 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1742 if test "X$x" = "X-L$additional_libdir"; then
1747 if test -z "$haveit"; then
1748 if test "X$additional_libdir" = "X/usr/local/lib"; then
1749 if test -n "$GCC"; then
1751 linux*) haveit=yes;;
1755 if test -z "$haveit"; then
1756 if test -d "$additional_libdir"; then
1757 dnl Really add $additional_libdir to $LDFLAGS.
1758 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1766 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1767 dnl acl_final_exec_prefix, containing the values to which $prefix and
1768 dnl $exec_prefix will expand at the end of the configure script.
1769 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1771 dnl Unfortunately, prefix and exec_prefix get only finally determined
1772 dnl at the end of configure.
1773 if test "X$prefix" = "XNONE"; then
1774 acl_final_prefix="$ac_default_prefix"
1776 acl_final_prefix="$prefix"
1778 if test "X$exec_prefix" = "XNONE"; then
1779 acl_final_exec_prefix='${prefix}'
1781 acl_final_exec_prefix="$exec_prefix"
1783 acl_save_prefix="$prefix"
1784 prefix="$acl_final_prefix"
1785 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1786 prefix="$acl_save_prefix"
1789 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1790 dnl variables prefix and exec_prefix bound to the values they will have
1791 dnl at the end of the configure script.
1792 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1794 acl_save_prefix="$prefix"
1795 prefix="$acl_final_prefix"
1796 acl_save_exec_prefix="$exec_prefix"
1797 exec_prefix="$acl_final_exec_prefix"
1799 exec_prefix="$acl_save_exec_prefix"
1800 prefix="$acl_save_prefix"
1803 # nls.m4 serial 1 (gettext-0.12)
1804 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
1805 dnl This file is free software, distributed under the terms of the GNU
1806 dnl General Public License. As a special exception to the GNU General
1807 dnl Public License, this file may be distributed as part of a program
1808 dnl that contains a configuration script generated by Autoconf, under
1809 dnl the same distribution terms as the rest of that program.
1811 dnl This file can can be used in projects which are not available under
1812 dnl the GNU General Public License or the GNU Library General Public
1813 dnl License but which still want to provide support for the GNU gettext
1815 dnl Please note that the actual code of the GNU gettext library is covered
1816 dnl by the GNU Library General Public License, and the rest of the GNU
1817 dnl gettext package package is covered by the GNU General Public License.
1818 dnl They are *not* in the public domain.
1821 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1822 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1826 AC_MSG_CHECKING([whether NLS is requested])
1827 dnl Default is enabled NLS
1829 [ --disable-nls do not use Native Language Support],
1830 USE_NLS=$enableval, USE_NLS=yes)
1831 AC_MSG_RESULT($USE_NLS)
1835 AC_DEFUN([AM_MKINSTALLDIRS],
1837 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1838 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
1839 dnl Try to locate it.
1841 if test -n "$ac_aux_dir"; then
1842 case "$ac_aux_dir" in
1843 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
1844 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
1847 if test -z "$MKINSTALLDIRS"; then
1848 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1850 AC_SUBST(MKINSTALLDIRS)
1854 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
1855 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
1856 dnl also defines GSTUFF_PKG_ERRORS on error
1857 AC_DEFUN(PKG_CHECK_MODULES, [
1860 if test -z "$PKG_CONFIG"; then
1861 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1864 if test "$PKG_CONFIG" = "no" ; then
1865 echo "*** The pkg-config script could not be found. Make sure it is"
1866 echo "*** in your path, or set the PKG_CONFIG environment variable"
1867 echo "*** to the full path to pkg-config."
1868 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
1870 PKG_CONFIG_MIN_VERSION=0.9.0
1871 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
1872 AC_MSG_CHECKING(for $2)
1874 if $PKG_CONFIG --exists "$2" ; then
1878 AC_MSG_CHECKING($1_CFLAGS)
1879 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
1880 AC_MSG_RESULT($$1_CFLAGS)
1882 AC_MSG_CHECKING($1_LIBS)
1883 $1_LIBS=`$PKG_CONFIG --libs "$2"`
1884 AC_MSG_RESULT($$1_LIBS)
1888 ## If we have a custom action on failure, don't print errors, but
1889 ## do set a variable so people can do so.
1890 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
1891 ifelse([$4], ,echo $$1_PKG_ERRORS,)
1897 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
1898 echo "*** See http://www.freedesktop.org/software/pkgconfig"
1902 if test $succeeded = yes; then
1903 ifelse([$3], , :, [$3])
1905 ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
1911 # po.m4 serial 1 (gettext-0.12)
1912 dnl Copyright (C) 1995-2003 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 This file can can be used in projects which are not available under
1920 dnl the GNU General Public License or the GNU Library General Public
1921 dnl License but which still want to provide support for the GNU gettext
1923 dnl Please note that the actual code of the GNU gettext library is covered
1924 dnl by the GNU Library General Public License, and the rest of the GNU
1925 dnl gettext package package is covered by the GNU General Public License.
1926 dnl They are *not* in the public domain.
1929 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1930 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1932 dnl Checks for all prerequisites of the po subdirectory.
1933 AC_DEFUN([AM_PO_SUBDIRS],
1935 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1936 AC_REQUIRE([AC_PROG_INSTALL])dnl
1937 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1938 AC_REQUIRE([AM_NLS])dnl
1940 dnl Perform the following tests also if --disable-nls has been given,
1941 dnl because they are needed for "make dist" to work.
1943 dnl Search for GNU msgfmt in the PATH.
1944 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1945 dnl The second test excludes FreeBSD msgfmt.
1946 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1947 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
1948 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1950 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1952 dnl Search for GNU xgettext 0.12 or newer in the PATH.
1953 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1954 dnl The second test excludes FreeBSD xgettext.
1955 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1956 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
1957 (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)],
1959 dnl Remove leftover from FreeBSD xgettext call.
1962 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
1963 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
1964 [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
1966 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1967 dnl Test whether we really found GNU msgfmt.
1968 if test "$GMSGFMT" != ":"; then
1969 dnl If it is no GNU msgfmt we define it as : so that the
1970 dnl Makefiles still can work.
1971 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
1972 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1975 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
1977 [found $GMSGFMT program is not GNU msgfmt; ignore it])
1982 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1983 dnl Test whether we really found GNU xgettext.
1984 if test "$XGETTEXT" != ":"; then
1985 dnl If it is no GNU xgettext we define it as : so that the
1986 dnl Makefiles still can work.
1987 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
1988 (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
1992 [found xgettext program is not GNU xgettext; ignore it])
1995 dnl Remove leftover from FreeBSD xgettext call.
1999 AC_OUTPUT_COMMANDS([
2000 for ac_file in $CONFIG_FILES; do
2001 # Support "outfile[:infile[:infile...]]"
2003 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2005 # PO directories have a Makefile.in generated from Makefile.in.in.
2006 case "$ac_file" in */Makefile.in)
2007 # Adjust a relative srcdir.
2008 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2009 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
2010 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2011 # In autoconf-2.13 it is called $ac_given_srcdir.
2012 # In autoconf-2.50 it is called $srcdir.
2013 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2014 case "$ac_given_srcdir" in
2015 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2016 /*) top_srcdir="$ac_given_srcdir" ;;
2017 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2019 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
2020 rm -f "$ac_dir/POTFILES"
2021 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
2022 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
2023 POMAKEFILEDEPS="POTFILES.in"
2024 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
2025 # on $ac_dir but don't depend on user-specified configuration
2027 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2028 # The LINGUAS file contains the set of available languages.
2029 if test -n "$OBSOLETE_ALL_LINGUAS"; then
2030 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2032 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2033 # Hide the ALL_LINGUAS assigment from automake.
2034 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2035 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2037 # The set of available languages was given in configure.in.
2038 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
2040 case "$ac_given_srcdir" in
2042 *) srcdirpre='$(srcdir)/' ;;
2048 for lang in $ALL_LINGUAS; do
2049 POFILES="$POFILES $srcdirpre$lang.po"
2050 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2051 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2052 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2054 # CATALOGS depends on both $ac_dir and the user's LINGUAS
2055 # environment variable.
2057 if test -n "$ALL_LINGUAS"; then
2058 for presentlang in $ALL_LINGUAS; do
2060 if test "%UNSET%" != "$LINGUAS"; then
2061 desiredlanguages="$LINGUAS"
2063 desiredlanguages="$ALL_LINGUAS"
2065 for desiredlang in $desiredlanguages; do
2066 # Use the presentlang catalog if desiredlang is
2067 # a. equal to presentlang, or
2068 # b. a variant of presentlang (because in this case,
2069 # presentlang can be used as a fallback for messages
2070 # which are not translated in the desiredlang catalog).
2071 case "$desiredlang" in
2072 "$presentlang"*) useit=yes;;
2075 if test $useit = yes; then
2076 INST_LINGUAS="$INST_LINGUAS $presentlang"
2081 if test -n "$INST_LINGUAS"; then
2082 for lang in $INST_LINGUAS; do
2083 CATALOGS="$CATALOGS $lang.gmo"
2086 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
2087 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"
2088 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
2089 if test -f "$f"; then
2091 *.orig | *.bak | *~) ;;
2092 *) cat "$f" >> "$ac_dir/Makefile" ;;
2100 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
2101 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
2103 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
2104 # Capture the value of LINGUAS because we need it to compute CATALOGS.
2105 LINGUAS="${LINGUAS-%UNSET%}"
2109 # progtest.m4 serial 3 (gettext-0.12)
2110 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
2111 dnl This file is free software, distributed under the terms of the GNU
2112 dnl General Public License. As a special exception to the GNU General
2113 dnl Public License, this file may be distributed as part of a program
2114 dnl that contains a configuration script generated by Autoconf, under
2115 dnl the same distribution terms as the rest of that program.
2117 dnl This file can can be used in projects which are not available under
2118 dnl the GNU General Public License or the GNU Library General Public
2119 dnl License but which still want to provide support for the GNU gettext
2121 dnl Please note that the actual code of the GNU gettext library is covered
2122 dnl by the GNU Library General Public License, and the rest of the GNU
2123 dnl gettext package package is covered by the GNU General Public License.
2124 dnl They are *not* in the public domain.
2127 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
2129 # Search path for a program which passes the given test.
2131 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2132 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2133 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2135 # Prepare PATH_SEPARATOR.
2136 # The user is always right.
2137 if test "${PATH_SEPARATOR+set}" != set; then
2138 echo "#! /bin/sh" >conf$$.sh
2139 echo "exit 0" >>conf$$.sh
2141 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
2149 # Find out how to test for executable files. Don't use a zero-byte file,
2150 # as systems may use methods other than mode bits to determine executability.
2151 cat >conf$$.file <<_ASEOF
2155 chmod +x conf$$.file
2156 if test -x conf$$.file >/dev/null 2>&1; then
2157 ac_executable_p="test -x"
2159 ac_executable_p="test -f"
2163 # Extract the first word of "$2", so it can be a program name with args.
2164 set dummy $2; ac_word=[$]2
2165 AC_MSG_CHECKING([for $ac_word])
2166 AC_CACHE_VAL(ac_cv_path_$1,
2168 [[\\/]]* | ?:[[\\/]]*)
2169 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2172 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2173 for ac_dir in ifelse([$5], , $PATH, [$5]); do
2175 test -z "$ac_dir" && ac_dir=.
2176 for ac_exec_ext in '' $ac_executable_extensions; do
2177 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2179 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
2186 dnl If no 4th arg is given, leave the cache variable unset,
2187 dnl so AC_PATH_PROGS will keep looking.
2188 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2193 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2194 AC_MSG_RESULT([$]$1)
2201 # stdint_h.m4 serial 3 (gettext-0.12)
2202 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
2203 dnl This file is free software, distributed under the terms of the GNU
2204 dnl General Public License. As a special exception to the GNU General
2205 dnl Public License, this file may be distributed as part of a program
2206 dnl that contains a configuration script generated by Autoconf, under
2207 dnl the same distribution terms as the rest of that program.
2209 dnl From Paul Eggert.
2211 # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
2212 # doesn't clash with <sys/types.h>, and declares uintmax_t.
2214 AC_DEFUN([jm_AC_HEADER_STDINT_H],
2216 AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
2218 [#include <sys/types.h>
2219 #include <stdint.h>],
2220 [uintmax_t i = (uintmax_t) -1;],
2221 jm_ac_cv_header_stdint_h=yes,
2222 jm_ac_cv_header_stdint_h=no)])
2223 if test $jm_ac_cv_header_stdint_h = yes; then
2224 AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
2225 [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
2226 and declares uintmax_t. ])
2230 # uintmax_t.m4 serial 7 (gettext-0.12)
2231 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
2232 dnl This file is free software, distributed under the terms of the GNU
2233 dnl General Public License. As a special exception to the GNU General
2234 dnl Public License, this file may be distributed as part of a program
2235 dnl that contains a configuration script generated by Autoconf, under
2236 dnl the same distribution terms as the rest of that program.
2238 dnl From Paul Eggert.
2242 # Define uintmax_t to 'unsigned long' or 'unsigned long long'
2243 # if it is not already defined in <stdint.h> or <inttypes.h>.
2245 AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
2247 AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
2248 AC_REQUIRE([jm_AC_HEADER_STDINT_H])
2249 if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
2250 AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
2251 test $ac_cv_type_unsigned_long_long = yes \
2252 && ac_type='unsigned long long' \
2253 || ac_type='unsigned long'
2254 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
2255 [Define to unsigned long or unsigned long long
2256 if <stdint.h> and <inttypes.h> don't define.])
2258 AC_DEFINE(HAVE_UINTMAX_T, 1,
2259 [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
2263 # ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
2264 dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
2265 dnl This file is free software, distributed under the terms of the GNU
2266 dnl General Public License. As a special exception to the GNU General
2267 dnl Public License, this file may be distributed as part of a program
2268 dnl that contains a configuration script generated by Autoconf, under
2269 dnl the same distribution terms as the rest of that program.
2271 dnl From Paul Eggert.
2273 AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
2275 AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
2276 [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
2277 [unsigned long long ullmax = (unsigned long long) -1;
2278 return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
2279 ac_cv_type_unsigned_long_long=yes,
2280 ac_cv_type_unsigned_long_long=no)])
2281 if test $ac_cv_type_unsigned_long_long = yes; then
2282 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
2283 [Define if you have the unsigned long long type.])
2288 # Copyright (C) 2002, 2003 Free Software Foundation, Inc.
2289 # Generated from amversion.in; do not edit by hand.
2291 # This program is free software; you can redistribute it and/or modify
2292 # it under the terms of the GNU General Public License as published by
2293 # the Free Software Foundation; either version 2, or (at your option)
2294 # any later version.
2296 # This program is distributed in the hope that it will be useful,
2297 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2298 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2299 # GNU General Public License for more details.
2301 # You should have received a copy of the GNU General Public License
2302 # along with this program; if not, write to the Free Software
2303 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2305 # AM_AUTOMAKE_VERSION(VERSION)
2306 # ----------------------------
2307 # Automake X.Y traces this macro to ensure aclocal.m4 has been
2308 # generated from the m4 files accompanying Automake X.Y.
2309 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
2311 # AM_SET_CURRENT_AUTOMAKE_VERSION
2312 # -------------------------------
2313 # Call AM_AUTOMAKE_VERSION so it can be traced.
2314 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
2315 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
2316 [AM_AUTOMAKE_VERSION([1.8.2])])
2320 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
2322 # This program is free software; you can redistribute it and/or modify
2323 # it under the terms of the GNU General Public License as published by
2324 # the Free Software Foundation; either version 2, or (at your option)
2325 # any later version.
2327 # This program is distributed in the hope that it will be useful,
2328 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2329 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2330 # GNU General Public License for more details.
2332 # You should have received a copy of the GNU General Public License
2333 # along with this program; if not, write to the Free Software
2334 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2337 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2338 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
2339 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
2341 # Of course, Automake must honor this variable whenever it calls a
2342 # tool from the auxiliary directory. The problem is that $srcdir (and
2343 # therefore $ac_aux_dir as well) can be either absolute or relative,
2344 # depending on how configure is run. This is pretty annoying, since
2345 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
2346 # source directory, any form will work fine, but in subdirectories a
2347 # relative path needs to be adjusted first.
2349 # $ac_aux_dir/missing
2350 # fails when called from a subdirectory if $ac_aux_dir is relative
2351 # $top_srcdir/$ac_aux_dir/missing
2352 # fails if $ac_aux_dir is absolute,
2353 # fails when called from a subdirectory in a VPATH build with
2354 # a relative $ac_aux_dir
2356 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2357 # are both prefixed by $srcdir. In an in-source build this is usually
2358 # harmless because $srcdir is `.', but things will broke when you
2359 # start a VPATH build or use an absolute $srcdir.
2361 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2362 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
2363 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2364 # and then we would define $MISSING as
2365 # MISSING="\${SHELL} $am_aux_dir/missing"
2366 # This will work as long as MISSING is not called from configure, because
2367 # unfortunately $(top_srcdir) has no meaning in configure.
2368 # However there are other variables, like CC, which are often used in
2369 # configure, and could therefore not use this "fixed" $ac_aux_dir.
2371 # Another solution, used here, is to always expand $ac_aux_dir to an
2372 # absolute PATH. The drawback is that using absolute paths prevent a
2373 # configured tree to be moved without reconfiguration.
2375 AC_DEFUN([AM_AUX_DIR_EXPAND],
2376 [dnl Rely on autoconf to set up CDPATH properly.
2377 AC_PREREQ([2.50])dnl
2378 # expand $ac_aux_dir to an absolute path
2379 am_aux_dir=`cd $ac_aux_dir && pwd`
2382 # AM_CONDITIONAL -*- Autoconf -*-
2384 # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
2386 # This program is free software; you can redistribute it and/or modify
2387 # it under the terms of the GNU General Public License as published by
2388 # the Free Software Foundation; either version 2, or (at your option)
2389 # any later version.
2391 # This program is distributed in the hope that it will be useful,
2392 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2393 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2394 # GNU General Public License for more details.
2396 # You should have received a copy of the GNU General Public License
2397 # along with this program; if not, write to the Free Software
2398 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2403 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
2404 # -------------------------------------
2405 # Define a conditional.
2406 AC_DEFUN([AM_CONDITIONAL],
2408 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
2409 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
2411 AC_SUBST([$1_FALSE])
2419 AC_CONFIG_COMMANDS_PRE(
2420 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
2421 AC_MSG_ERROR([conditional "$1" was never defined.
2422 Usually this means the macro was only invoked conditionally.])
2425 # serial 6 -*- Autoconf -*-
2427 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
2428 # Free Software Foundation, Inc.
2430 # This program is free software; you can redistribute it and/or modify
2431 # it under the terms of the GNU General Public License as published by
2432 # the Free Software Foundation; either version 2, or (at your option)
2433 # any later version.
2435 # This program is distributed in the hope that it will be useful,
2436 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2437 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2438 # GNU General Public License for more details.
2440 # You should have received a copy of the GNU General Public License
2441 # along with this program; if not, write to the Free Software
2442 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2446 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
2447 # written in clear, in which case automake, when reading aclocal.m4,
2448 # will think it sees a *use*, and therefore will trigger all it's
2449 # C support machinery. Also note that it means that autoscan, seeing
2450 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2454 # _AM_DEPENDENCIES(NAME)
2455 # ----------------------
2456 # See how the compiler implements dependency checking.
2457 # NAME is "CC", "CXX", "GCJ", or "OBJC".
2458 # We try a few techniques and use that to set a single cache variable.
2460 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
2461 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
2462 # dependency, and given that the user is not expected to run this macro,
2463 # just rely on AC_PROG_CC.
2464 AC_DEFUN([_AM_DEPENDENCIES],
2465 [AC_REQUIRE([AM_SET_DEPDIR])dnl
2466 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
2467 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
2468 AC_REQUIRE([AM_DEP_TRACK])dnl
2470 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
2471 [$1], CXX, [depcc="$CXX" am_compiler_list=],
2472 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2473 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
2474 [depcc="$$1" am_compiler_list=])
2476 AC_CACHE_CHECK([dependency style of $depcc],
2477 [am_cv_$1_dependencies_compiler_type],
2478 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2479 # We make a subdir and do the tests there. Otherwise we can end up
2480 # making bogus files that we don't know about and never remove. For
2481 # instance it was reported that on HP-UX the gcc test will end up
2482 # making a dummy file named `D' -- because `-MD' means `put the output
2485 # Copy depcomp to subdir because otherwise we won't find it if we're
2486 # using a relative directory.
2487 cp "$am_depcomp" conftest.dir
2489 # We will build objects and dependencies in a subdirectory because
2490 # it helps to detect inapplicable dependency modes. For instance
2491 # both Tru64's cc and ICC support -MD to output dependencies as a
2492 # side effect of compilation, but ICC will put the dependencies in
2493 # the current directory while Tru64 will put them in the object
2497 am_cv_$1_dependencies_compiler_type=none
2498 if test "$am_compiler_list" = ""; then
2499 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2501 for depmode in $am_compiler_list; do
2502 # Setup a source with many dependencies, because some compilers
2503 # like to wrap large dependency lists on column 80 (with \), and
2504 # we should not choose a depcomp mode which is confused by this.
2506 # We need to recreate these files for each test, as the compiler may
2507 # overwrite some of them when testing with obscure command lines.
2508 # This happens at least with the AIX C compiler.
2510 for i in 1 2 3 4 5 6; do
2511 echo '#include "conftst'$i'.h"' >> sub/conftest.c
2514 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2518 # after this tag, mechanisms are not by side-effect, so they'll
2519 # only be used when explicitly requested
2520 if test "x$enable_dependency_tracking" = xyes; then
2528 # We check with `-c' and `-o' for the sake of the "dashmstdout"
2529 # mode. It turns out that the SunPro C++ compiler does not properly
2530 # handle `-M -o', and we need to detect this.
2531 if depmode=$depmode \
2532 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
2533 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2534 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
2535 >/dev/null 2>conftest.err &&
2536 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2537 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
2538 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2539 # icc doesn't choke on unknown options, it will just issue warnings
2540 # (even with -Werror). So we grep stderr for any message
2541 # that says an option was ignored.
2542 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
2543 am_cv_$1_dependencies_compiler_type=$depmode
2552 am_cv_$1_dependencies_compiler_type=none
2555 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2556 AM_CONDITIONAL([am__fastdep$1], [
2557 test "x$enable_dependency_tracking" != xno \
2558 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2564 # Choose a directory name for dependency files.
2565 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
2566 AC_DEFUN([AM_SET_DEPDIR],
2567 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2568 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
2574 AC_DEFUN([AM_DEP_TRACK],
2575 [AC_ARG_ENABLE(dependency-tracking,
2576 [ --disable-dependency-tracking speeds up one-time build
2577 --enable-dependency-tracking do not reject slow dependency extractors])
2578 if test "x$enable_dependency_tracking" != xno; then
2579 am_depcomp="$ac_aux_dir/depcomp"
2582 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
2583 AC_SUBST([AMDEPBACKSLASH])
2586 # Generate code to set up dependency tracking. -*- Autoconf -*-
2588 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
2590 # This program is free software; you can redistribute it and/or modify
2591 # it under the terms of the GNU General Public License as published by
2592 # the Free Software Foundation; either version 2, or (at your option)
2593 # any later version.
2595 # This program is distributed in the hope that it will be useful,
2596 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2597 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2598 # GNU General Public License for more details.
2600 # You should have received a copy of the GNU General Public License
2601 # along with this program; if not, write to the Free Software
2602 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2607 # _AM_OUTPUT_DEPENDENCY_COMMANDS
2608 # ------------------------------
2609 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
2610 [for mf in $CONFIG_FILES; do
2611 # Strip MF so we end up with the name of the file.
2612 mf=`echo "$mf" | sed -e 's/:.*$//'`
2613 # Check whether this is an Automake generated Makefile or not.
2614 # We used to match only the files named `Makefile.in', but
2615 # some people rename them; so instead we look at the file content.
2616 # Grep'ing the first line is not enough: some people post-process
2617 # each Makefile.in and add a new line on top of each file to say so.
2618 # So let's grep whole file.
2619 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
2620 dirpart=`AS_DIRNAME("$mf")`
2624 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
2625 # Extract the definition of DEP_FILES from the Makefile without
2627 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
2628 test -z "$DEPDIR" && continue
2629 # When using ansi2knr, U may be empty or an underscore; expand it
2630 U=`sed -n -e '/^U = / s///p' < "$mf"`
2631 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
2632 # We invoke sed twice because it is the simplest approach to
2633 # changing $(DEPDIR) to its actual value in the expansion.
2634 for file in `sed -n -e '
2635 /^DEP_FILES = .*\\\\$/ {
2644 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
2645 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
2646 # Make sure the directory exists.
2647 test -f "$dirpart/$file" && continue
2648 fdir=`AS_DIRNAME(["$file"])`
2649 AS_MKDIR_P([$dirpart/$fdir])
2650 # echo "creating $dirpart/$file"
2651 echo '# dummy' > "$dirpart/$file"
2654 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
2657 # AM_OUTPUT_DEPENDENCY_COMMANDS
2658 # -----------------------------
2659 # This macro should only be invoked once -- use via AC_REQUIRE.
2661 # This code is only required when automatic dependency tracking
2662 # is enabled. FIXME. This creates each `.P' file that we will
2663 # need in order to bootstrap the dependency handling code.
2664 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
2665 [AC_CONFIG_COMMANDS([depfiles],
2666 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
2667 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
2670 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
2672 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
2674 # This program is free software; you can redistribute it and/or modify
2675 # it under the terms of the GNU General Public License as published by
2676 # the Free Software Foundation; either version 2, or (at your option)
2677 # any later version.
2679 # This program is distributed in the hope that it will be useful,
2680 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2681 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2682 # GNU General Public License for more details.
2684 # You should have received a copy of the GNU General Public License
2685 # along with this program; if not, write to the Free Software
2686 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2691 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
2692 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
2694 # Do all the work for Automake. -*- Autoconf -*-
2696 # This macro actually does too much some checks are only needed if
2697 # your package does certain things. But this isn't really a big deal.
2699 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
2700 # Free Software Foundation, Inc.
2702 # This program is free software; you can redistribute it and/or modify
2703 # it under the terms of the GNU General Public License as published by
2704 # the Free Software Foundation; either version 2, or (at your option)
2705 # any later version.
2707 # This program is distributed in the hope that it will be useful,
2708 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2709 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2710 # GNU General Public License for more details.
2712 # You should have received a copy of the GNU General Public License
2713 # along with this program; if not, write to the Free Software
2714 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2719 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
2720 # AM_INIT_AUTOMAKE([OPTIONS])
2721 # -----------------------------------------------
2722 # The call with PACKAGE and VERSION arguments is the old style
2723 # call (pre autoconf-2.50), which is being phased out. PACKAGE
2724 # and VERSION should now be passed to AC_INIT and removed from
2725 # the call to AM_INIT_AUTOMAKE.
2726 # We support both call styles for the transition. After
2727 # the next Automake release, Autoconf can make the AC_INIT
2728 # arguments mandatory, and then we can depend on a new Autoconf
2729 # release and drop the old call support.
2730 AC_DEFUN([AM_INIT_AUTOMAKE],
2731 [AC_PREREQ([2.58])dnl
2732 dnl Autoconf wants to disallow AM_ names. We explicitly allow
2733 dnl the ones we care about.
2734 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
2735 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
2736 AC_REQUIRE([AC_PROG_INSTALL])dnl
2737 # test to see if srcdir already configured
2738 if test "`cd $srcdir && pwd`" != "`pwd`" &&
2739 test -f $srcdir/config.status; then
2740 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
2743 # test whether we have cygpath
2744 if test -z "$CYGPATH_W"; then
2745 if (cygpath --version) >/dev/null 2>/dev/null; then
2746 CYGPATH_W='cygpath -w'
2751 AC_SUBST([CYGPATH_W])
2753 # Define the identity of the package.
2754 dnl Distinguish between old-style and new-style calls.
2756 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
2757 AC_SUBST([PACKAGE], [$1])dnl
2758 AC_SUBST([VERSION], [$2])],
2759 [_AM_SET_OPTIONS([$1])dnl
2760 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
2761 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
2763 _AM_IF_OPTION([no-define],,
2764 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
2765 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
2767 # Some tools Automake needs.
2768 AC_REQUIRE([AM_SANITY_CHECK])dnl
2769 AC_REQUIRE([AC_ARG_PROGRAM])dnl
2770 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
2771 AM_MISSING_PROG(AUTOCONF, autoconf)
2772 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
2773 AM_MISSING_PROG(AUTOHEADER, autoheader)
2774 AM_MISSING_PROG(MAKEINFO, makeinfo)
2775 AM_MISSING_PROG(AMTAR, tar)
2777 AM_PROG_INSTALL_STRIP
2778 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
2779 # We need awk for the "check" target. The system "awk" is bad on
2781 AC_REQUIRE([AC_PROG_AWK])dnl
2782 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2783 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2785 _AM_IF_OPTION([no-dependencies],,
2786 [AC_PROVIDE_IFELSE([AC_PROG_CC],
2787 [_AM_DEPENDENCIES(CC)],
2788 [define([AC_PROG_CC],
2789 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
2790 AC_PROVIDE_IFELSE([AC_PROG_CXX],
2791 [_AM_DEPENDENCIES(CXX)],
2792 [define([AC_PROG_CXX],
2793 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
2798 # When config.status generates a header, we must update the stamp-h file.
2799 # This file resides in the same directory as the config header
2800 # that is generated. The stamp files are numbered to have different names.
2802 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
2803 # loop where config.status creates the headers, so we can generate
2804 # our stamp files there.
2805 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
2806 [# Compute $1's index in $config_headers.
2808 for _am_header in $config_headers :; do
2813 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
2816 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
2818 # AM_PROG_INSTALL_SH
2819 # ------------------
2820 # Define $install_sh.
2822 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
2824 # This program is free software; you can redistribute it and/or modify
2825 # it under the terms of the GNU General Public License as published by
2826 # the Free Software Foundation; either version 2, or (at your option)
2827 # any later version.
2829 # This program is distributed in the hope that it will be useful,
2830 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2831 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2832 # GNU General Public License for more details.
2834 # You should have received a copy of the GNU General Public License
2835 # along with this program; if not, write to the Free Software
2836 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2839 AC_DEFUN([AM_PROG_INSTALL_SH],
2840 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2841 install_sh=${install_sh-"$am_aux_dir/install-sh"}
2842 AC_SUBST(install_sh)])
2845 # Copyright (C) 2003 Free Software Foundation, Inc.
2847 # This program is free software; you can redistribute it and/or modify
2848 # it under the terms of the GNU General Public License as published by
2849 # the Free Software Foundation; either version 2, or (at your option)
2850 # any later version.
2852 # This program is distributed in the hope that it will be useful,
2853 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2854 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2855 # GNU General Public License for more details.
2857 # You should have received a copy of the GNU General Public License
2858 # along with this program; if not, write to the Free Software
2859 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2864 # Check whether the underlying file-system supports filenames
2865 # with a leading dot. For instance MS-DOS doesn't.
2866 AC_DEFUN([AM_SET_LEADING_DOT],
2867 [rm -rf .tst 2>/dev/null
2868 mkdir .tst 2>/dev/null
2869 if test -d .tst; then
2874 rmdir .tst 2>/dev/null
2875 AC_SUBST([am__leading_dot])])
2877 # Check to see how 'make' treats includes. -*- Autoconf -*-
2879 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
2881 # This program is free software; you can redistribute it and/or modify
2882 # it under the terms of the GNU General Public License as published by
2883 # the Free Software Foundation; either version 2, or (at your option)
2884 # any later version.
2886 # This program is distributed in the hope that it will be useful,
2887 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2888 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2889 # GNU General Public License for more details.
2891 # You should have received a copy of the GNU General Public License
2892 # along with this program; if not, write to the Free Software
2893 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2900 # Check to see how make treats includes.
2901 AC_DEFUN([AM_MAKE_INCLUDE],
2902 [am_make=${MAKE-make}
2903 cat > confinc << 'END'
2908 # If we don't find an include directive, just comment out the code.
2909 AC_MSG_CHECKING([for style of include used by $am_make])
2913 # First try GNU make style include.
2914 echo "include confinc" > confmf
2915 # We grep out `Entering directory' and `Leaving directory'
2916 # messages which can occur if `w' ends up in MAKEFLAGS.
2917 # In particular we don't look at `^make:' because GNU make might
2918 # be invoked under some other name (usually "gmake"), in which
2919 # case it prints its new name instead of `make'.
2920 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
2925 # Now try BSD make style include.
2926 if test "$am__include" = "#"; then
2927 echo '.include "confinc"' > confmf
2928 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
2929 am__include=.include
2934 AC_SUBST([am__include])
2935 AC_SUBST([am__quote])
2936 AC_MSG_RESULT([$_am_result])
2937 rm -f confinc confmf
2943 # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
2945 # This program is free software; you can redistribute it and/or modify
2946 # it under the terms of the GNU General Public License as published by
2947 # the Free Software Foundation; either version 2, or (at your option)
2948 # any later version.
2950 # This program is distributed in the hope that it will be useful,
2951 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2952 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2953 # GNU General Public License for more details.
2955 # You should have received a copy of the GNU General Public License
2956 # along with this program; if not, write to the Free Software
2957 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2962 # AM_MISSING_PROG(NAME, PROGRAM)
2963 # ------------------------------
2964 AC_DEFUN([AM_MISSING_PROG],
2965 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2966 $1=${$1-"${am_missing_run}$2"}
2970 # AM_MISSING_HAS_RUN
2971 # ------------------
2972 # Define MISSING if not defined so far and test if it supports --run.
2973 # If it does, set am_missing_run to use it, otherwise, to nothing.
2974 AC_DEFUN([AM_MISSING_HAS_RUN],
2975 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2976 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
2977 # Use eval to expand $SHELL
2978 if eval "$MISSING --run true"; then
2979 am_missing_run="$MISSING --run "
2982 AC_MSG_WARN([`missing' script is too old or missing])
2988 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
2990 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
2992 # This program is free software; you can redistribute it and/or modify
2993 # it under the terms of the GNU General Public License as published by
2994 # the Free Software Foundation; either version 2, or (at your option)
2995 # any later version.
2997 # This program is distributed in the hope that it will be useful,
2998 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2999 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3000 # GNU General Public License for more details.
3002 # You should have received a copy of the GNU General Public License
3003 # along with this program; if not, write to the Free Software
3004 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3007 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
3008 # created by `make install' are always world readable, even if the
3009 # installer happens to have an overly restrictive umask (e.g. 077).
3010 # This was a mistake. There are at least two reasons why we must not
3012 # - it causes special bits like SGID to be ignored,
3013 # - it may be too restrictive (some setups expect 775 directories).
3015 # Do not use -m 0755 and let people choose whatever they expect by
3017 AC_DEFUN([AM_PROG_MKDIR_P],
3018 [if mkdir -p -- . 2>/dev/null; then
3019 # Keeping the `.' argument allows $(mkdir_p) to be used without
3020 # argument. Indeed, we sometimes output rules like
3021 # $(mkdir_p) $(somedir)
3022 # where $(somedir) is conditionally defined.
3023 # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
3024 # expensive solution, as it forces Make to start a sub-shell.)
3025 mkdir_p='mkdir -p -- .'
3027 # On NextStep and OpenStep, the `mkdir' command does not
3028 # recognize any option. It will interpret all options as
3029 # directories to create, and then abort because `.' already
3033 test -d $d && rmdir $d
3035 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
3036 if test -f "$ac_aux_dir/mkinstalldirs"; then
3037 mkdir_p='$(mkinstalldirs)'
3039 mkdir_p='$(install_sh) -d'
3042 AC_SUBST([mkdir_p])])
3044 # Helper functions for option handling. -*- Autoconf -*-
3046 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
3048 # This program is free software; you can redistribute it and/or modify
3049 # it under the terms of the GNU General Public License as published by
3050 # the Free Software Foundation; either version 2, or (at your option)
3051 # any later version.
3053 # This program is distributed in the hope that it will be useful,
3054 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3055 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3056 # GNU General Public License for more details.
3058 # You should have received a copy of the GNU General Public License
3059 # along with this program; if not, write to the Free Software
3060 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3065 # _AM_MANGLE_OPTION(NAME)
3066 # -----------------------
3067 AC_DEFUN([_AM_MANGLE_OPTION],
3068 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
3070 # _AM_SET_OPTION(NAME)
3071 # ------------------------------
3072 # Set option NAME. Presently that only means defining a flag for this option.
3073 AC_DEFUN([_AM_SET_OPTION],
3074 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
3076 # _AM_SET_OPTIONS(OPTIONS)
3077 # ----------------------------------
3078 # OPTIONS is a space-separated list of Automake options.
3079 AC_DEFUN([_AM_SET_OPTIONS],
3080 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
3082 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
3083 # -------------------------------------------
3084 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
3085 AC_DEFUN([_AM_IF_OPTION],
3086 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
3089 # Check to make sure that the build environment is sane.
3092 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
3094 # This program is free software; you can redistribute it and/or modify
3095 # it under the terms of the GNU General Public License as published by
3096 # the Free Software Foundation; either version 2, or (at your option)
3097 # any later version.
3099 # This program is distributed in the hope that it will be useful,
3100 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3101 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3102 # GNU General Public License for more details.
3104 # You should have received a copy of the GNU General Public License
3105 # along with this program; if not, write to the Free Software
3106 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3113 AC_DEFUN([AM_SANITY_CHECK],
3114 [AC_MSG_CHECKING([whether build environment is sane])
3117 echo timestamp > conftest.file
3118 # Do `set' in a subshell so we don't clobber the current shell's
3119 # arguments. Must try -L first in case configure is actually a
3120 # symlink; some systems play weird games with the mod time of symlinks
3121 # (eg FreeBSD returns the mod time of the symlink's containing
3124 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
3125 if test "$[*]" = "X"; then
3127 set X `ls -t $srcdir/configure conftest.file`
3130 if test "$[*]" != "X $srcdir/configure conftest.file" \
3131 && test "$[*]" != "X conftest.file $srcdir/configure"; then
3133 # If neither matched, then we have a broken ls. This can happen
3134 # if, for instance, CONFIG_SHELL is bash and it inherits a
3135 # broken ls alias from the environment. This has actually
3136 # happened. Such a system could not be considered "sane".
3137 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
3138 alias in your environment])
3141 test "$[2]" = conftest.file
3147 AC_MSG_ERROR([newly created file is older than distributed files!
3148 Check your system clock])
3150 AC_MSG_RESULT(yes)])
3152 # AM_PROG_INSTALL_STRIP
3154 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
3156 # This program is free software; you can redistribute it and/or modify
3157 # it under the terms of the GNU General Public License as published by
3158 # the Free Software Foundation; either version 2, or (at your option)
3159 # any later version.
3161 # This program is distributed in the hope that it will be useful,
3162 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3163 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3164 # GNU General Public License for more details.
3166 # You should have received a copy of the GNU General Public License
3167 # along with this program; if not, write to the Free Software
3168 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3171 # One issue with vendor `install' (even GNU) is that you can't
3172 # specify the program used to strip binaries. This is especially
3173 # annoying in cross-compiling environments, where the build's strip
3174 # is unlikely to handle the host's binaries.
3175 # Fortunately install-sh will honor a STRIPPROG variable, so we
3176 # always use install-sh in `make install-strip', and initialize
3177 # STRIPPROG with the value of the STRIP variable (set by the user).
3178 AC_DEFUN([AM_PROG_INSTALL_STRIP],
3179 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3180 # Installed binaries are usually stripped using `strip' when the user
3181 # run `make install-strip'. However `strip' might not be the right
3182 # tool to use in cross-compilation environments, therefore Automake
3183 # will honor the `STRIP' environment variable to overrule this program.
3184 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
3185 if test "$cross_compiling" != no; then
3186 AC_CHECK_TOOL([STRIP], [strip], :)
3188 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
3189 AC_SUBST([INSTALL_STRIP_PROGRAM])])