1 # generated automatically by aclocal 1.11.6 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15 m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf. It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically `autoreconf'.])])
23 # gettext.m4 serial 63 (gettext-0.18)
24 dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
25 dnl This file is free software; the Free Software Foundation
26 dnl gives unlimited permission to copy and/or distribute it,
27 dnl with or without modifications, as long as this notice is preserved.
29 dnl This file can can be used in projects which are not available under
30 dnl the GNU General Public License or the GNU Library General Public
31 dnl License but which still want to provide support for the GNU gettext
33 dnl Please note that the actual code of the GNU gettext library is covered
34 dnl by the GNU Library General Public License, and the rest of the GNU
35 dnl gettext package package is covered by the GNU General Public License.
36 dnl They are *not* in the public domain.
39 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
40 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
42 dnl Macro to add for using GNU gettext.
44 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
45 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
46 dnl default (if it is not specified or empty) is 'no-libtool'.
47 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
48 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
49 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
50 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
51 dnl depending on --{enable,disable}-{shared,static} and on the presence of
52 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
53 dnl $(top_builddir)/intl/libintl.a will be created.
54 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
55 dnl implementations (in libc or libintl) without the ngettext() function
56 dnl will be ignored. If NEEDSYMBOL is specified and is
57 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
58 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
59 dnl INTLDIR is used to find the intl libraries. If empty,
60 dnl the value `$(top_builddir)/intl/' is used.
62 dnl The result of the configuration is one of three cases:
63 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
65 dnl Catalog format: GNU --> install in $(datadir)
66 dnl Catalog extension: .mo after installation, .gmo in source tree
67 dnl 2) GNU gettext has been found in the system's C library.
68 dnl Catalog format: GNU --> install in $(datadir)
69 dnl Catalog extension: .mo after installation, .gmo in source tree
70 dnl 3) No internationalization, always use English msgid.
71 dnl Catalog format: none
72 dnl Catalog extension: none
73 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
74 dnl The use of .gmo is historical (it was needed to avoid overwriting the
75 dnl GNU format catalogs when building on a platform with an X/Open gettext),
76 dnl but we keep it in order not to force irrelevant filename changes on the
79 AC_DEFUN([AM_GNU_GETTEXT],
81 dnl Argument checking.
82 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
83 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
85 ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
86 [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
87 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
88 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
90 define([gt_included_intl],
91 ifelse([$1], [external],
92 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
94 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
96 AM_GNU_GETTEXT_NEED([$2])
98 AC_REQUIRE([AM_PO_SUBDIRS])dnl
99 ifelse(gt_included_intl, yes, [
100 AC_REQUIRE([AM_INTL_SUBDIR])dnl
103 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
104 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
105 AC_REQUIRE([AC_LIB_RPATH])
107 dnl Sometimes libintl requires libiconv, so first search for libiconv.
108 dnl Ideally we would do this search only after the
109 dnl if test "$USE_NLS" = "yes"; then
110 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
111 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
112 dnl the configure script would need to contain the same shell code
113 dnl again, outside any 'if'. There are two solutions:
114 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
115 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
116 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
117 dnl documented, we avoid it.
118 ifelse(gt_included_intl, yes, , [
119 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
122 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
128 ifelse(gt_included_intl, yes, [
129 BUILD_INCLUDED_LIBINTL=no
130 USE_INCLUDED_LIBINTL=no
136 dnl Add a version number to the cache macros.
137 case " $gt_needs " in
138 *" need-formatstring-macros "*) gt_api_version=3 ;;
139 *" need-ngettext "*) gt_api_version=2 ;;
140 *) gt_api_version=1 ;;
142 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
143 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
145 dnl If we use NLS figure out what method
146 if test "$USE_NLS" = "yes"; then
147 gt_use_preinstalled_gnugettext=no
148 ifelse(gt_included_intl, yes, [
149 AC_MSG_CHECKING([whether included gettext is requested])
150 AC_ARG_WITH([included-gettext],
151 [ --with-included-gettext use the GNU gettext library included here],
152 nls_cv_force_use_gnu_gettext=$withval,
153 nls_cv_force_use_gnu_gettext=no)
154 AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
156 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
157 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
159 dnl User does not insist on using GNU NLS library. Figure out what
160 dnl to use. If GNU gettext is available we use this. Else we have
161 dnl to fall back to GNU NLS library.
163 if test $gt_api_version -ge 3; then
164 gt_revision_test_code='
165 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
166 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
169 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
173 gt_revision_test_code=
175 if test $gt_api_version -ge 2; then
176 gt_expression_test_code=' + * ngettext ("", "", 0)'
178 gt_expression_test_code=
181 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
182 [AC_TRY_LINK([#include <libintl.h>
183 $gt_revision_test_code
184 extern int _nl_msg_cat_cntr;
185 extern int *_nl_domain_bindings;],
186 [bindtextdomain ("", "");
187 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
188 [eval "$gt_func_gnugettext_libc=yes"],
189 [eval "$gt_func_gnugettext_libc=no"])])
191 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
192 dnl Sometimes libintl requires libiconv, so first search for libiconv.
193 ifelse(gt_included_intl, yes, , [
196 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
197 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
198 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
199 dnl even if libiconv doesn't exist.
200 AC_LIB_LINKFLAGS_BODY([intl])
201 AC_CACHE_CHECK([for GNU gettext in libintl],
202 [$gt_func_gnugettext_libintl],
203 [gt_save_CPPFLAGS="$CPPFLAGS"
204 CPPFLAGS="$CPPFLAGS $INCINTL"
206 LIBS="$LIBS $LIBINTL"
207 dnl Now see whether libintl exists and does not depend on libiconv.
208 AC_TRY_LINK([#include <libintl.h>
209 $gt_revision_test_code
210 extern int _nl_msg_cat_cntr;
215 const char *_nl_expand_alias (const char *);],
216 [bindtextdomain ("", "");
217 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
218 [eval "$gt_func_gnugettext_libintl=yes"],
219 [eval "$gt_func_gnugettext_libintl=no"])
220 dnl Now see whether libintl exists and depends on libiconv.
221 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
222 LIBS="$LIBS $LIBICONV"
223 AC_TRY_LINK([#include <libintl.h>
224 $gt_revision_test_code
225 extern int _nl_msg_cat_cntr;
230 const char *_nl_expand_alias (const char *);],
231 [bindtextdomain ("", "");
232 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
233 [LIBINTL="$LIBINTL $LIBICONV"
234 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
235 eval "$gt_func_gnugettext_libintl=yes"
238 CPPFLAGS="$gt_save_CPPFLAGS"
239 LIBS="$gt_save_LIBS"])
242 dnl If an already present or preinstalled GNU gettext() is found,
243 dnl use it. But if this macro is used in GNU gettext, and GNU
244 dnl gettext is already preinstalled in libintl, we update this
245 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
246 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
247 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
248 && test "$PACKAGE" != gettext-runtime \
249 && test "$PACKAGE" != gettext-tools; }; then
250 gt_use_preinstalled_gnugettext=yes
252 dnl Reset the values set by searching for libintl.
258 ifelse(gt_included_intl, yes, [
259 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
260 dnl GNU gettext is not found in the C library.
261 dnl Fall back on included GNU gettext library.
262 nls_cv_use_gnu_gettext=yes
266 if test "$nls_cv_use_gnu_gettext" = "yes"; then
267 dnl Mark actions used to generate GNU NLS library.
268 BUILD_INCLUDED_LIBINTL=yes
269 USE_INCLUDED_LIBINTL=yes
270 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
271 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
272 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
276 if test "$gt_use_preinstalled_gnugettext" = "yes" \
277 || test "$nls_cv_use_gnu_gettext" = "yes"; then
278 dnl Mark actions to use GNU gettext tools.
283 if test -n "$INTL_MACOSX_LIBS"; then
284 if test "$gt_use_preinstalled_gnugettext" = "yes" \
285 || test "$nls_cv_use_gnu_gettext" = "yes"; then
286 dnl Some extra flags are needed during linking.
287 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
288 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
292 if test "$gt_use_preinstalled_gnugettext" = "yes" \
293 || test "$nls_cv_use_gnu_gettext" = "yes"; then
294 AC_DEFINE([ENABLE_NLS], [1],
295 [Define to 1 if translation of program messages to the user's native language
302 AC_MSG_CHECKING([whether to use NLS])
303 AC_MSG_RESULT([$USE_NLS])
304 if test "$USE_NLS" = "yes"; then
305 AC_MSG_CHECKING([where the gettext function comes from])
306 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
307 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
308 gt_source="external libintl"
313 gt_source="included intl directory"
315 AC_MSG_RESULT([$gt_source])
318 if test "$USE_NLS" = "yes"; then
320 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
321 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
322 AC_MSG_CHECKING([how to link with libintl])
323 AC_MSG_RESULT([$LIBINTL])
324 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
327 dnl For backward compatibility. Some packages may be using this.
328 AC_DEFINE([HAVE_GETTEXT], [1],
329 [Define if the GNU gettext() function is already present or preinstalled.])
330 AC_DEFINE([HAVE_DCGETTEXT], [1],
331 [Define if the GNU dcgettext() function is already present or preinstalled.])
334 dnl We need to process the po/ directory.
338 ifelse(gt_included_intl, yes, [
339 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
340 dnl to 'yes' because some of the testsuite requires it.
341 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
342 BUILD_INCLUDED_LIBINTL=yes
345 dnl Make all variables we use known to autoconf.
346 AC_SUBST([BUILD_INCLUDED_LIBINTL])
347 AC_SUBST([USE_INCLUDED_LIBINTL])
348 AC_SUBST([CATOBJEXT])
350 dnl For backward compatibility. Some configure.ins may be using this.
354 dnl For backward compatibility. Some Makefiles may be using this.
356 AC_SUBST([DATADIRNAME])
358 dnl For backward compatibility. Some Makefiles may be using this.
360 AC_SUBST([INSTOBJEXT])
362 dnl For backward compatibility. Some Makefiles may be using this.
366 dnl For backward compatibility. Some Makefiles may be using this.
368 if test "$USE_INCLUDED_LIBINTL" = yes; then
369 INTLOBJS="\$(GETTOBJS)"
373 dnl Enable libtool support if the surrounding package wishes it.
374 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
375 AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
378 dnl For backward compatibility. Some Makefiles may be using this.
382 dnl Make all documented variables known to autoconf.
384 AC_SUBST([LTLIBINTL])
389 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
390 m4_define([gt_NEEDS_INIT],
392 m4_divert_text([DEFAULTS], [gt_needs=])
393 m4_define([gt_NEEDS_INIT], [])
397 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
398 AC_DEFUN([AM_GNU_GETTEXT_NEED],
400 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
404 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
405 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
407 # Configure paths for GLIB
408 # Owen Taylor 1997-2001
410 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
411 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
412 dnl gthread, or gio is specified in MODULES, pass to pkg-config
414 AC_DEFUN([AM_PATH_GLIB_2_0],
416 dnl Get the cflags and libraries from pkg-config
418 AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
419 , enable_glibtest=yes)
421 pkg_config_args=glib-2.0
426 pkg_config_args="$pkg_config_args gmodule-2.0"
429 pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
432 pkg_config_args="$pkg_config_args gobject-2.0"
435 pkg_config_args="$pkg_config_args gthread-2.0"
438 pkg_config_args="$pkg_config_args $module-2.0"
443 PKG_PROG_PKG_CONFIG([0.16])
447 if test "x$PKG_CONFIG" = x ; then
452 min_glib_version=ifelse([$1], ,2.0.0,$1)
453 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
455 if test x$PKG_CONFIG != xno ; then
456 ## don't try to run the test against uninstalled libtool libs
457 if $PKG_CONFIG --uninstalled $pkg_config_args; then
458 echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
462 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
469 if test x"$no_glib" = x ; then
470 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
471 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
472 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
473 GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
475 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
476 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
477 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
478 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
479 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
480 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
481 glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
482 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
483 if test "x$enable_glibtest" = "xyes" ; then
484 ac_save_CFLAGS="$CFLAGS"
486 CFLAGS="$CFLAGS $GLIB_CFLAGS"
487 LIBS="$GLIB_LIBS $LIBS"
489 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
490 dnl checks the results of pkg-config to some extent)
501 unsigned int major, minor, micro;
504 fclose (fopen ("conf.glibtest", "w"));
506 /* HP/UX 9 (%@#!) writes to sscanf strings */
507 tmp_version = g_strdup("$min_glib_version");
508 if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, µ) != 3) {
509 printf("%s, bad version string\n", "$min_glib_version");
513 if ((glib_major_version != $glib_config_major_version) ||
514 (glib_minor_version != $glib_config_minor_version) ||
515 (glib_micro_version != $glib_config_micro_version))
517 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
518 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
519 glib_major_version, glib_minor_version, glib_micro_version);
520 printf ("*** was found! If pkg-config was correct, then it is best\n");
521 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
522 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
523 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
524 printf("*** required on your system.\n");
525 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
526 printf("*** to point to the correct configuration files\n");
528 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
529 (glib_minor_version != GLIB_MINOR_VERSION) ||
530 (glib_micro_version != GLIB_MICRO_VERSION))
532 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
533 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
534 printf("*** library (version %d.%d.%d)\n",
535 glib_major_version, glib_minor_version, glib_micro_version);
539 if ((glib_major_version > major) ||
540 ((glib_major_version == major) && (glib_minor_version > minor)) ||
541 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
547 printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
548 glib_major_version, glib_minor_version, glib_micro_version);
549 printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
550 major, minor, micro);
551 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
553 printf("*** If you have already installed a sufficiently new version, this error\n");
554 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
555 printf("*** being found. The easiest way to fix this is to remove the old version\n");
556 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
557 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
558 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
559 printf("*** so that the correct libraries are found at run-time))\n");
564 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
565 CFLAGS="$ac_save_CFLAGS"
569 if test "x$no_glib" = x ; then
570 AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
571 ifelse([$2], , :, [$2])
574 if test "$PKG_CONFIG" = "no" ; then
575 echo "*** A new enough version of pkg-config was not found."
576 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
578 if test -f conf.glibtest ; then
581 echo "*** Could not run GLIB test program, checking why..."
582 ac_save_CFLAGS="$CFLAGS"
584 CFLAGS="$CFLAGS $GLIB_CFLAGS"
585 LIBS="$LIBS $GLIB_LIBS"
589 ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
590 [ echo "*** The test program compiled, but did not run. This usually means"
591 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
592 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
593 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
594 echo "*** to the installed location Also, make sure you have run ldconfig if that"
595 echo "*** is required on your system"
597 echo "*** If you have an old version installed, it is best to remove it, although"
598 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
599 [ echo "*** The test program failed to compile or link. See the file config.log for the"
600 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
601 CFLAGS="$ac_save_CFLAGS"
610 GLIB_COMPILE_RESOURCES=""
611 ifelse([$3], , :, [$3])
613 AC_SUBST(GLIB_CFLAGS)
615 AC_SUBST(GLIB_GENMARSHAL)
616 AC_SUBST(GOBJECT_QUERY)
617 AC_SUBST(GLIB_MKENUMS)
618 AC_SUBST(GLIB_COMPILE_RESOURCES)
622 # Configure paths for GTK+
623 # Owen Taylor 1997-2001
625 dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
626 dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
627 dnl pass to pkg-config
629 AC_DEFUN([AM_PATH_GTK_2_0],
631 dnl Get the cflags and libraries from pkg-config
633 AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
634 , enable_gtktest=yes)
636 pkg_config_args=gtk+-2.0
641 pkg_config_args="$pkg_config_args gthread-2.0"
648 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
650 if test x$PKG_CONFIG != xno ; then
651 if pkg-config --atleast-pkgconfig-version 0.7 ; then
654 echo "*** pkg-config too old; version 0.7 or better required."
662 min_gtk_version=ifelse([$1], ,2.0.0,$1)
663 AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
665 if test x$PKG_CONFIG != xno ; then
666 ## don't try to run the test against uninstalled libtool libs
667 if $PKG_CONFIG --uninstalled $pkg_config_args; then
668 echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
672 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
679 if test x"$no_gtk" = x ; then
680 GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
681 GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
682 gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
683 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
684 gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
685 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
686 gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
687 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
688 if test "x$enable_gtktest" = "xyes" ; then
689 ac_save_CFLAGS="$CFLAGS"
691 CFLAGS="$CFLAGS $GTK_CFLAGS"
692 LIBS="$GTK_LIBS $LIBS"
694 dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
695 dnl checks the results of pkg-config to some extent)
706 int major, minor, micro;
709 fclose (fopen ("conf.gtktest", "w"));
711 /* HP/UX 9 (%@#!) writes to sscanf strings */
712 tmp_version = g_strdup("$min_gtk_version");
713 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
714 printf("%s, bad version string\n", "$min_gtk_version");
718 if ((gtk_major_version != $gtk_config_major_version) ||
719 (gtk_minor_version != $gtk_config_minor_version) ||
720 (gtk_micro_version != $gtk_config_micro_version))
722 printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
723 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
724 gtk_major_version, gtk_minor_version, gtk_micro_version);
725 printf ("*** was found! If pkg-config was correct, then it is best\n");
726 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
727 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
728 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
729 printf("*** required on your system.\n");
730 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
731 printf("*** to point to the correct configuration files\n");
733 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
734 (gtk_minor_version != GTK_MINOR_VERSION) ||
735 (gtk_micro_version != GTK_MICRO_VERSION))
737 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
738 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
739 printf("*** library (version %d.%d.%d)\n",
740 gtk_major_version, gtk_minor_version, gtk_micro_version);
744 if ((gtk_major_version > major) ||
745 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
746 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
752 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
753 gtk_major_version, gtk_minor_version, gtk_micro_version);
754 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
755 major, minor, micro);
756 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
758 printf("*** If you have already installed a sufficiently new version, this error\n");
759 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
760 printf("*** being found. The easiest way to fix this is to remove the old version\n");
761 printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
762 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
763 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
764 printf("*** so that the correct libraries are found at run-time))\n");
769 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
770 CFLAGS="$ac_save_CFLAGS"
774 if test "x$no_gtk" = x ; then
775 AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
776 ifelse([$2], , :, [$2])
779 if test "$PKG_CONFIG" = "no" ; then
780 echo "*** A new enough version of pkg-config was not found."
781 echo "*** See http://pkgconfig.sourceforge.net"
783 if test -f conf.gtktest ; then
786 echo "*** Could not run GTK+ test program, checking why..."
787 ac_save_CFLAGS="$CFLAGS"
789 CFLAGS="$CFLAGS $GTK_CFLAGS"
790 LIBS="$LIBS $GTK_LIBS"
794 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
795 [ echo "*** The test program compiled, but did not run. This usually means"
796 echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
797 echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
798 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
799 echo "*** to the installed location Also, make sure you have run ldconfig if that"
800 echo "*** is required on your system"
802 echo "*** If you have an old version installed, it is best to remove it, although"
803 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
804 [ echo "*** The test program failed to compile or link. See the file config.log for the"
805 echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
806 CFLAGS="$ac_save_CFLAGS"
812 ifelse([$3], , :, [$3])
819 # iconv.m4 serial 11 (gettext-0.18.1)
820 dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
821 dnl This file is free software; the Free Software Foundation
822 dnl gives unlimited permission to copy and/or distribute it,
823 dnl with or without modifications, as long as this notice is preserved.
825 dnl From Bruno Haible.
827 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
829 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
830 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
831 AC_REQUIRE([AC_LIB_RPATH])
833 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
835 AC_LIB_LINKFLAGS_BODY([iconv])
838 AC_DEFUN([AM_ICONV_LINK],
840 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
841 dnl those with the standalone portable GNU libiconv installed).
842 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
844 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
846 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
848 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
849 dnl because if the user has installed libiconv and not disabled its use
850 dnl via --without-libiconv-prefix, he wants to use it. The first
851 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
852 am_save_CPPFLAGS="$CPPFLAGS"
853 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
855 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
856 am_cv_func_iconv="no, consider installing GNU libiconv"
858 AC_TRY_LINK([#include <stdlib.h>
860 [iconv_t cd = iconv_open("","");
861 iconv(cd,NULL,NULL,NULL,NULL);
863 [am_cv_func_iconv=yes])
864 if test "$am_cv_func_iconv" != yes; then
866 LIBS="$LIBS $LIBICONV"
867 AC_TRY_LINK([#include <stdlib.h>
869 [iconv_t cd = iconv_open("","");
870 iconv(cd,NULL,NULL,NULL,NULL);
872 [am_cv_lib_iconv=yes]
873 [am_cv_func_iconv=yes])
877 if test "$am_cv_func_iconv" = yes; then
878 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
879 dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
881 if test $am_cv_lib_iconv = yes; then
882 LIBS="$LIBS $LIBICONV"
889 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
892 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
893 if (cd_utf8_to_88591 != (iconv_t)(-1))
895 static const char input[] = "\342\202\254"; /* EURO SIGN */
897 const char *inptr = input;
898 size_t inbytesleft = strlen (input);
900 size_t outbytesleft = sizeof (buf);
901 size_t res = iconv (cd_utf8_to_88591,
902 (char **) &inptr, &inbytesleft,
903 &outptr, &outbytesleft);
908 /* Test against Solaris 10 bug: Failures are not distinguishable from
909 successful returns. */
911 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
912 if (cd_ascii_to_88591 != (iconv_t)(-1))
914 static const char input[] = "\263";
916 const char *inptr = input;
917 size_t inbytesleft = strlen (input);
919 size_t outbytesleft = sizeof (buf);
920 size_t res = iconv (cd_ascii_to_88591,
921 (char **) &inptr, &inbytesleft,
922 &outptr, &outbytesleft);
927 #if 0 /* This bug could be worked around by the caller. */
928 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
930 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
931 if (cd_88591_to_utf8 != (iconv_t)(-1))
933 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
935 const char *inptr = input;
936 size_t inbytesleft = strlen (input);
938 size_t outbytesleft = sizeof (buf);
939 size_t res = iconv (cd_88591_to_utf8,
940 (char **) &inptr, &inbytesleft,
941 &outptr, &outbytesleft);
947 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
949 if (/* Try standardized names. */
950 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
951 /* Try IRIX, OSF/1 names. */
952 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
954 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
955 /* Try HP-UX names. */
956 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
959 }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
961 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
962 *) am_cv_func_iconv_works="guessing yes" ;;
966 case "$am_cv_func_iconv_works" in
967 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
968 *) am_func_iconv=yes ;;
971 am_func_iconv=no am_cv_lib_iconv=no
973 if test "$am_func_iconv" = yes; then
974 AC_DEFINE([HAVE_ICONV], [1],
975 [Define if you have the iconv() function and it works.])
977 if test "$am_cv_lib_iconv" = yes; then
978 AC_MSG_CHECKING([how to link with libiconv])
979 AC_MSG_RESULT([$LIBICONV])
981 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
983 CPPFLAGS="$am_save_CPPFLAGS"
988 AC_SUBST([LTLIBICONV])
991 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
992 dnl avoid warnings like
993 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
994 dnl This is tricky because of the way 'aclocal' is implemented:
995 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
996 dnl Otherwise aclocal's initial scan pass would miss the macro definition.
997 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
998 dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
1000 m4_define([gl_iconv_AC_DEFUN],
1001 m4_version_prereq([2.64],
1006 gl_iconv_AC_DEFUN([AM_ICONV],
1009 if test "$am_cv_func_iconv" = yes; then
1010 AC_MSG_CHECKING([for iconv declaration])
1011 AC_CACHE_VAL([am_cv_proto_iconv], [
1019 #if defined(__STDC__) || defined(__cplusplus)
1020 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
1024 ], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
1025 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);"])
1026 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
1028 $am_cv_proto_iconv])
1029 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
1030 [Define as const if the declaration of iconv() needs const.])
1034 # intlmacosx.m4 serial 3 (gettext-0.18)
1035 dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
1036 dnl This file is free software; the Free Software Foundation
1037 dnl gives unlimited permission to copy and/or distribute it,
1038 dnl with or without modifications, as long as this notice is preserved.
1040 dnl This file can can be used in projects which are not available under
1041 dnl the GNU General Public License or the GNU Library General Public
1042 dnl License but which still want to provide support for the GNU gettext
1044 dnl Please note that the actual code of the GNU gettext library is covered
1045 dnl by the GNU Library General Public License, and the rest of the GNU
1046 dnl gettext package package is covered by the GNU General Public License.
1047 dnl They are *not* in the public domain.
1049 dnl Checks for special options needed on MacOS X.
1050 dnl Defines INTL_MACOSX_LIBS.
1051 AC_DEFUN([gt_INTL_MACOSX],
1053 dnl Check for API introduced in MacOS X 10.2.
1054 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
1055 [gt_cv_func_CFPreferencesCopyAppValue],
1056 [gt_save_LIBS="$LIBS"
1057 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
1058 AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
1059 [CFPreferencesCopyAppValue(NULL, NULL)],
1060 [gt_cv_func_CFPreferencesCopyAppValue=yes],
1061 [gt_cv_func_CFPreferencesCopyAppValue=no])
1062 LIBS="$gt_save_LIBS"])
1063 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
1064 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
1065 [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
1067 dnl Check for API introduced in MacOS X 10.3.
1068 AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
1069 [gt_save_LIBS="$LIBS"
1070 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
1071 AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
1072 [gt_cv_func_CFLocaleCopyCurrent=yes],
1073 [gt_cv_func_CFLocaleCopyCurrent=no])
1074 LIBS="$gt_save_LIBS"])
1075 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
1076 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
1077 [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
1080 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
1081 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
1083 AC_SUBST([INTL_MACOSX_LIBS])
1086 # lib-ld.m4 serial 4 (gettext-0.18)
1087 dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
1088 dnl This file is free software; the Free Software Foundation
1089 dnl gives unlimited permission to copy and/or distribute it,
1090 dnl with or without modifications, as long as this notice is preserved.
1092 dnl Subroutines of libtool.m4,
1093 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
1094 dnl with libtool.m4.
1096 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
1097 AC_DEFUN([AC_LIB_PROG_LD_GNU],
1098 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
1099 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1100 case `$LD -v 2>&1 </dev/null` in
1101 *GNU* | *'with BFD'*)
1102 acl_cv_prog_gnu_ld=yes ;;
1104 acl_cv_prog_gnu_ld=no ;;
1106 with_gnu_ld=$acl_cv_prog_gnu_ld
1109 dnl From libtool-1.4. Sets the variable LD.
1110 AC_DEFUN([AC_LIB_PROG_LD],
1111 [AC_ARG_WITH([gnu-ld],
1112 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
1113 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
1114 AC_REQUIRE([AC_PROG_CC])dnl
1115 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1116 # Prepare PATH_SEPARATOR.
1117 # The user is always right.
1118 if test "${PATH_SEPARATOR+set}" != set; then
1119 echo "#! /bin/sh" >conf$$.sh
1120 echo "exit 0" >>conf$$.sh
1122 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1130 if test "$GCC" = yes; then
1131 # Check if gcc -print-prog-name=ld gives a path.
1132 AC_MSG_CHECKING([for ld used by GCC])
1135 # gcc leaves a trailing carriage return which upsets mingw
1136 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1138 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1141 # Accept absolute paths.
1142 [[\\/]* | [A-Za-z]:[\\/]*)]
1143 [re_direlt='/[^/][^/]*/\.\./']
1144 # Canonicalize the path of ld
1145 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1146 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1147 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1149 test -z "$LD" && LD="$ac_prog"
1152 # If it fails, then pretend we aren't using GCC.
1156 # If it is relative, then search for the first ld in PATH.
1160 elif test "$with_gnu_ld" = yes; then
1161 AC_MSG_CHECKING([for GNU ld])
1163 AC_MSG_CHECKING([for non-GNU ld])
1165 AC_CACHE_VAL([acl_cv_path_LD],
1166 [if test -z "$LD"; then
1167 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1168 for ac_dir in $PATH; do
1169 test -z "$ac_dir" && ac_dir=.
1170 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1171 acl_cv_path_LD="$ac_dir/$ac_prog"
1172 # Check to see if the program is GNU ld. I'd rather use --version,
1173 # but apparently some GNU ld's only accept -v.
1174 # Break only if it was the GNU/non-GNU ld that we prefer.
1175 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
1176 *GNU* | *'with BFD'*)
1177 test "$with_gnu_ld" != no && break ;;
1179 test "$with_gnu_ld" != yes && break ;;
1185 acl_cv_path_LD="$LD" # Let the user override the test with a path.
1187 LD="$acl_cv_path_LD"
1188 if test -n "$LD"; then
1189 AC_MSG_RESULT([$LD])
1193 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1197 # lib-link.m4 serial 21 (gettext-0.18)
1198 dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
1199 dnl This file is free software; the Free Software Foundation
1200 dnl gives unlimited permission to copy and/or distribute it,
1201 dnl with or without modifications, as long as this notice is preserved.
1203 dnl From Bruno Haible.
1207 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1208 dnl the libraries corresponding to explicit and implicit dependencies.
1209 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1210 dnl augments the CPPFLAGS variable.
1211 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1212 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1213 AC_DEFUN([AC_LIB_LINKFLAGS],
1215 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1216 AC_REQUIRE([AC_LIB_RPATH])
1217 pushdef([Name],[translit([$1],[./-], [___])])
1218 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1219 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1220 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1221 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1222 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1223 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1224 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1225 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
1227 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1228 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1229 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1230 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
1231 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1233 AC_SUBST([LTLIB]NAME)
1234 AC_SUBST([LIB]NAME[_PREFIX])
1235 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1236 dnl results of this search when this library appears as a dependency.
1242 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
1243 dnl searches for libname and the libraries corresponding to explicit and
1244 dnl implicit dependencies, together with the specified include files and
1245 dnl the ability to compile and link the specified testcode. The missing-message
1246 dnl defaults to 'no' and may contain additional hints for the user.
1247 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
1248 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1249 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1250 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1251 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1252 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1253 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1255 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1256 AC_REQUIRE([AC_LIB_RPATH])
1257 pushdef([Name],[translit([$1],[./-], [___])])
1258 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1259 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1261 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1263 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1265 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1266 dnl because if the user has installed lib[]Name and not disabled its use
1267 dnl via --without-lib[]Name-prefix, he wants to use it.
1268 ac_save_CPPFLAGS="$CPPFLAGS"
1269 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1271 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1272 ac_save_LIBS="$LIBS"
1273 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
1274 dnl because these -l options might require -L options that are present in
1275 dnl LIBS. -l options benefit only from the -L options listed before it.
1276 dnl Otherwise, add it to the front of LIBS, because it may be a static
1277 dnl library that depends on another static library that is present in LIBS.
1278 dnl Static libraries benefit only from the static libraries listed after
1280 case " $LIB[]NAME" in
1281 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
1282 *) LIBS="$LIB[]NAME $LIBS" ;;
1284 AC_TRY_LINK([$3], [$4],
1285 [ac_cv_lib[]Name=yes],
1286 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
1287 LIBS="$ac_save_LIBS"
1289 if test "$ac_cv_lib[]Name" = yes; then
1291 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
1292 AC_MSG_CHECKING([how to link with lib[]$1])
1293 AC_MSG_RESULT([$LIB[]NAME])
1296 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1297 dnl $INC[]NAME either.
1298 CPPFLAGS="$ac_save_CPPFLAGS"
1303 AC_SUBST([HAVE_LIB]NAME)
1305 AC_SUBST([LTLIB]NAME)
1306 AC_SUBST([LIB]NAME[_PREFIX])
1311 dnl Determine the platform dependent parameters needed to use rpath:
1314 dnl acl_hardcode_libdir_flag_spec,
1315 dnl acl_hardcode_libdir_separator,
1316 dnl acl_hardcode_direct,
1317 dnl acl_hardcode_minus_L.
1318 AC_DEFUN([AC_LIB_RPATH],
1320 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1321 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1322 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1323 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1324 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1325 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1326 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
1327 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1328 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1334 acl_libext="$acl_cv_libext"
1335 acl_shlibext="$acl_cv_shlibext"
1336 acl_libname_spec="$acl_cv_libname_spec"
1337 acl_library_names_spec="$acl_cv_library_names_spec"
1338 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1339 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1340 acl_hardcode_direct="$acl_cv_hardcode_direct"
1341 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
1342 dnl Determine whether the user wants rpath handling at all.
1343 AC_ARG_ENABLE([rpath],
1344 [ --disable-rpath do not hardcode runtime library paths],
1345 :, enable_rpath=yes)
1348 dnl AC_LIB_FROMPACKAGE(name, package)
1349 dnl declares that libname comes from the given package. The configure file
1350 dnl will then not have a --with-libname-prefix option but a
1351 dnl --with-package-prefix option. Several libraries can come from the same
1352 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
1353 dnl macro call that searches for libname.
1354 AC_DEFUN([AC_LIB_FROMPACKAGE],
1356 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1357 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1358 define([acl_frompackage_]NAME, [$2])
1360 pushdef([PACK],[$2])
1361 pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
1362 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1363 define([acl_libsinpackage_]PACKUP,
1364 m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
1369 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1370 dnl the libraries corresponding to explicit and implicit dependencies.
1371 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1372 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
1373 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1374 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1376 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1377 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1378 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1379 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
1380 pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
1381 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1382 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
1383 dnl Autoconf >= 2.61 supports dots in --with options.
1384 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
1385 dnl By default, look in $includedir and $libdir.
1387 AC_LIB_WITH_FINAL_PREFIX([
1388 eval additional_includedir=\"$includedir\"
1389 eval additional_libdir=\"$libdir\"
1391 AC_ARG_WITH(P_A_C_K[-prefix],
1392 [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
1393 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
1395 if test "X$withval" = "Xno"; then
1398 if test "X$withval" = "X"; then
1399 AC_LIB_WITH_FINAL_PREFIX([
1400 eval additional_includedir=\"$includedir\"
1401 eval additional_libdir=\"$libdir\"
1404 additional_includedir="$withval/include"
1405 additional_libdir="$withval/$acl_libdirstem"
1406 if test "$acl_libdirstem2" != "$acl_libdirstem" \
1407 && ! test -d "$withval/$acl_libdirstem"; then
1408 additional_libdir="$withval/$acl_libdirstem2"
1413 dnl Search the library and its dependencies in $additional_libdir and
1414 dnl $LDFLAGS. Using breadth-first-seach.
1419 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
1420 dnl computed. So it has to be reset here.
1424 names_already_handled=
1425 names_next_round='$1 $2'
1426 while test -n "$names_next_round"; do
1427 names_this_round="$names_next_round"
1429 for name in $names_this_round; do
1431 for n in $names_already_handled; do
1432 if test "$n" = "$name"; then
1437 if test -z "$already_handled"; then
1438 names_already_handled="$names_already_handled $name"
1439 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1440 dnl or AC_LIB_HAVE_LINKFLAGS call.
1441 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1442 eval value=\"\$HAVE_LIB$uppername\"
1443 if test -n "$value"; then
1444 if test "$value" = yes; then
1445 eval value=\"\$LIB$uppername\"
1446 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1447 eval value=\"\$LTLIB$uppername\"
1448 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1450 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1451 dnl that this library doesn't exist. So just drop it.
1455 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1456 dnl and the already constructed $LIBNAME/$LTLIBNAME.
1461 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
1462 if test -n "$acl_shlibext"; then
1463 shrext=".$acl_shlibext" # typically: shrext=.so
1467 if test $use_additional = yes; then
1468 dir="$additional_libdir"
1469 dnl The same code as in the loop below:
1470 dnl First look for a shared library.
1471 if test -n "$acl_shlibext"; then
1472 if test -f "$dir/$libname$shrext"; then
1474 found_so="$dir/$libname$shrext"
1476 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1477 ver=`(cd "$dir" && \
1478 for f in "$libname$shrext".*; do echo "$f"; done \
1479 | sed -e "s,^$libname$shrext\\\\.,," \
1480 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1481 | sed 1q ) 2>/dev/null`
1482 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1484 found_so="$dir/$libname$shrext.$ver"
1487 eval library_names=\"$acl_library_names_spec\"
1488 for f in $library_names; do
1489 if test -f "$dir/$f"; then
1498 dnl Then look for a static library.
1499 if test "X$found_dir" = "X"; then
1500 if test -f "$dir/$libname.$acl_libext"; then
1502 found_a="$dir/$libname.$acl_libext"
1505 if test "X$found_dir" != "X"; then
1506 if test -f "$dir/$libname.la"; then
1507 found_la="$dir/$libname.la"
1511 if test "X$found_dir" = "X"; then
1512 for x in $LDFLAGS $LTLIB[]NAME; do
1513 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1516 dir=`echo "X$x" | sed -e 's/^X-L//'`
1517 dnl First look for a shared library.
1518 if test -n "$acl_shlibext"; then
1519 if test -f "$dir/$libname$shrext"; then
1521 found_so="$dir/$libname$shrext"
1523 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1524 ver=`(cd "$dir" && \
1525 for f in "$libname$shrext".*; do echo "$f"; done \
1526 | sed -e "s,^$libname$shrext\\\\.,," \
1527 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1528 | sed 1q ) 2>/dev/null`
1529 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1531 found_so="$dir/$libname$shrext.$ver"
1534 eval library_names=\"$acl_library_names_spec\"
1535 for f in $library_names; do
1536 if test -f "$dir/$f"; then
1545 dnl Then look for a static library.
1546 if test "X$found_dir" = "X"; then
1547 if test -f "$dir/$libname.$acl_libext"; then
1549 found_a="$dir/$libname.$acl_libext"
1552 if test "X$found_dir" != "X"; then
1553 if test -f "$dir/$libname.la"; then
1554 found_la="$dir/$libname.la"
1559 if test "X$found_dir" != "X"; then
1564 if test "X$found_dir" != "X"; then
1565 dnl Found the library.
1566 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1567 if test "X$found_so" != "X"; then
1568 dnl Linking with a shared library. We attempt to hardcode its
1569 dnl directory into the executable's runpath, unless it's the
1570 dnl standard /usr/lib.
1571 if test "$enable_rpath" = no \
1572 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
1573 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
1574 dnl No hardcoding is needed.
1575 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1577 dnl Use an explicit option to hardcode DIR into the resulting
1579 dnl Potentially add DIR to ltrpathdirs.
1580 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1582 for x in $ltrpathdirs; do
1583 if test "X$x" = "X$found_dir"; then
1588 if test -z "$haveit"; then
1589 ltrpathdirs="$ltrpathdirs $found_dir"
1591 dnl The hardcoding into $LIBNAME is system dependent.
1592 if test "$acl_hardcode_direct" = yes; then
1593 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1594 dnl resulting binary.
1595 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1597 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1598 dnl Use an explicit option to hardcode DIR into the resulting
1600 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1601 dnl Potentially add DIR to rpathdirs.
1602 dnl The rpathdirs will be appended to $LIBNAME at the end.
1604 for x in $rpathdirs; do
1605 if test "X$x" = "X$found_dir"; then
1610 if test -z "$haveit"; then
1611 rpathdirs="$rpathdirs $found_dir"
1614 dnl Rely on "-L$found_dir".
1615 dnl But don't add it if it's already contained in the LDFLAGS
1616 dnl or the already constructed $LIBNAME
1618 for x in $LDFLAGS $LIB[]NAME; do
1619 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1620 if test "X$x" = "X-L$found_dir"; then
1625 if test -z "$haveit"; then
1626 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1628 if test "$acl_hardcode_minus_L" != no; then
1629 dnl FIXME: Not sure whether we should use
1630 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1632 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1634 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1635 dnl here, because this doesn't fit in flags passed to the
1636 dnl compiler. So give up. No hardcoding. This affects only
1637 dnl very old systems.
1638 dnl FIXME: Not sure whether we should use
1639 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1641 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1647 if test "X$found_a" != "X"; then
1648 dnl Linking with a static library.
1649 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1651 dnl We shouldn't come here, but anyway it's good to have a
1653 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1656 dnl Assume the include files are nearby.
1657 additional_includedir=
1658 case "$found_dir" in
1659 */$acl_libdirstem | */$acl_libdirstem/)
1660 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1661 if test "$name" = '$1'; then
1662 LIB[]NAME[]_PREFIX="$basedir"
1664 additional_includedir="$basedir/include"
1666 */$acl_libdirstem2 | */$acl_libdirstem2/)
1667 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
1668 if test "$name" = '$1'; then
1669 LIB[]NAME[]_PREFIX="$basedir"
1671 additional_includedir="$basedir/include"
1674 if test "X$additional_includedir" != "X"; then
1675 dnl Potentially add $additional_includedir to $INCNAME.
1676 dnl But don't add it
1677 dnl 1. if it's the standard /usr/include,
1678 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1679 dnl 3. if it's already present in $CPPFLAGS or the already
1680 dnl constructed $INCNAME,
1681 dnl 4. if it doesn't exist as a directory.
1682 if test "X$additional_includedir" != "X/usr/include"; then
1684 if test "X$additional_includedir" = "X/usr/local/include"; then
1685 if test -n "$GCC"; then
1687 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1691 if test -z "$haveit"; then
1692 for x in $CPPFLAGS $INC[]NAME; do
1693 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1694 if test "X$x" = "X-I$additional_includedir"; then
1699 if test -z "$haveit"; then
1700 if test -d "$additional_includedir"; then
1701 dnl Really add $additional_includedir to $INCNAME.
1702 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1708 dnl Look for dependencies.
1709 if test -n "$found_la"; then
1710 dnl Read the .la file. It defines the variables
1711 dnl dlname, library_names, old_library, dependency_libs, current,
1712 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1713 save_libdir="$libdir"
1715 */* | *\\*) . "$found_la" ;;
1716 *) . "./$found_la" ;;
1718 libdir="$save_libdir"
1719 dnl We use only dependency_libs.
1720 for dep in $dependency_libs; do
1723 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1724 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1725 dnl But don't add it
1726 dnl 1. if it's the standard /usr/lib,
1727 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1728 dnl 3. if it's already present in $LDFLAGS or the already
1729 dnl constructed $LIBNAME,
1730 dnl 4. if it doesn't exist as a directory.
1731 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
1732 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
1734 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
1735 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
1736 if test -n "$GCC"; then
1738 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1742 if test -z "$haveit"; then
1744 for x in $LDFLAGS $LIB[]NAME; do
1745 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1746 if test "X$x" = "X-L$additional_libdir"; then
1751 if test -z "$haveit"; then
1752 if test -d "$additional_libdir"; then
1753 dnl Really add $additional_libdir to $LIBNAME.
1754 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1758 for x in $LDFLAGS $LTLIB[]NAME; do
1759 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1760 if test "X$x" = "X-L$additional_libdir"; then
1765 if test -z "$haveit"; then
1766 if test -d "$additional_libdir"; then
1767 dnl Really add $additional_libdir to $LTLIBNAME.
1768 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1775 dir=`echo "X$dep" | sed -e 's/^X-R//'`
1776 if test "$enable_rpath" != no; then
1777 dnl Potentially add DIR to rpathdirs.
1778 dnl The rpathdirs will be appended to $LIBNAME at the end.
1780 for x in $rpathdirs; do
1781 if test "X$x" = "X$dir"; then
1786 if test -z "$haveit"; then
1787 rpathdirs="$rpathdirs $dir"
1789 dnl Potentially add DIR to ltrpathdirs.
1790 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1792 for x in $ltrpathdirs; do
1793 if test "X$x" = "X$dir"; then
1798 if test -z "$haveit"; then
1799 ltrpathdirs="$ltrpathdirs $dir"
1804 dnl Handle this in the next round.
1805 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1808 dnl Handle this in the next round. Throw away the .la's
1809 dnl directory; it is already contained in a preceding -L
1811 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1814 dnl Most likely an immediate library name.
1815 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1816 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1822 dnl Didn't find the library; assume it is in the system directories
1823 dnl known to the linker and runtime loader. (All the system
1824 dnl directories known to the linker should also be known to the
1825 dnl runtime loader, otherwise the system is severely misconfigured.)
1826 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1827 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1833 if test "X$rpathdirs" != "X"; then
1834 if test -n "$acl_hardcode_libdir_separator"; then
1835 dnl Weird platform: only the last -rpath option counts, the user must
1836 dnl pass all path elements in one option. We can arrange that for a
1837 dnl single library, but not when more than one $LIBNAMEs are used.
1839 for found_dir in $rpathdirs; do
1840 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1842 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1843 acl_save_libdir="$libdir"
1845 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1846 libdir="$acl_save_libdir"
1847 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1849 dnl The -rpath options are cumulative.
1850 for found_dir in $rpathdirs; do
1851 acl_save_libdir="$libdir"
1853 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1854 libdir="$acl_save_libdir"
1855 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1859 if test "X$ltrpathdirs" != "X"; then
1860 dnl When using libtool, the option that works for both libraries and
1861 dnl executables is -R. The -R options are cumulative.
1862 for found_dir in $ltrpathdirs; do
1863 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1873 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1874 dnl unless already present in VAR.
1875 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1876 dnl contains two or three consecutive elements that belong together.
1877 AC_DEFUN([AC_LIB_APPENDTOVAR],
1879 for element in [$2]; do
1882 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1883 if test "X$x" = "X$element"; then
1888 if test -z "$haveit"; then
1889 [$1]="${[$1]}${[$1]:+ }$element"
1894 dnl For those cases where a variable contains several -L and -l options
1895 dnl referring to unknown libraries and directories, this macro determines the
1896 dnl necessary additional linker options for the runtime path.
1897 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1898 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1899 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1900 dnl otherwise linking without libtool is assumed.
1901 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1903 AC_REQUIRE([AC_LIB_RPATH])
1904 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1906 if test "$enable_rpath" != no; then
1907 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1908 dnl Use an explicit option to hardcode directories into the resulting
1913 if test -n "$next"; then
1915 dnl No need to hardcode the standard /usr/lib.
1916 if test "X$dir" != "X/usr/$acl_libdirstem" \
1917 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1918 rpathdirs="$rpathdirs $dir"
1924 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1925 dnl No need to hardcode the standard /usr/lib.
1926 if test "X$dir" != "X/usr/$acl_libdirstem" \
1927 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1928 rpathdirs="$rpathdirs $dir"
1935 if test "X$rpathdirs" != "X"; then
1936 if test -n ""$3""; then
1937 dnl libtool is used for linking. Use -R options.
1938 for dir in $rpathdirs; do
1939 $1="${$1}${$1:+ }-R$dir"
1942 dnl The linker is used for linking directly.
1943 if test -n "$acl_hardcode_libdir_separator"; then
1944 dnl Weird platform: only the last -rpath option counts, the user
1945 dnl must pass all path elements in one option.
1947 for dir in $rpathdirs; do
1948 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1950 acl_save_libdir="$libdir"
1952 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1953 libdir="$acl_save_libdir"
1956 dnl The -rpath options are cumulative.
1957 for dir in $rpathdirs; do
1958 acl_save_libdir="$libdir"
1960 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1961 libdir="$acl_save_libdir"
1962 $1="${$1}${$1:+ }$flag"
1972 # lib-prefix.m4 serial 7 (gettext-0.18)
1973 dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
1974 dnl This file is free software; the Free Software Foundation
1975 dnl gives unlimited permission to copy and/or distribute it,
1976 dnl with or without modifications, as long as this notice is preserved.
1978 dnl From Bruno Haible.
1980 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1981 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1982 dnl require excessive bracketing.
1983 ifdef([AC_HELP_STRING],
1984 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1985 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1987 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1988 dnl to access previously installed libraries. The basic assumption is that
1989 dnl a user will want packages to use other packages he previously installed
1990 dnl with the same --prefix option.
1991 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1992 dnl libraries, but is otherwise very convenient.
1993 AC_DEFUN([AC_LIB_PREFIX],
1995 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1996 AC_REQUIRE([AC_PROG_CC])
1997 AC_REQUIRE([AC_CANONICAL_HOST])
1998 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1999 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2000 dnl By default, look in $includedir and $libdir.
2002 AC_LIB_WITH_FINAL_PREFIX([
2003 eval additional_includedir=\"$includedir\"
2004 eval additional_libdir=\"$libdir\"
2006 AC_LIB_ARG_WITH([lib-prefix],
2007 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
2008 --without-lib-prefix don't search for libraries in includedir and libdir],
2010 if test "X$withval" = "Xno"; then
2013 if test "X$withval" = "X"; then
2014 AC_LIB_WITH_FINAL_PREFIX([
2015 eval additional_includedir=\"$includedir\"
2016 eval additional_libdir=\"$libdir\"
2019 additional_includedir="$withval/include"
2020 additional_libdir="$withval/$acl_libdirstem"
2024 if test $use_additional = yes; then
2025 dnl Potentially add $additional_includedir to $CPPFLAGS.
2026 dnl But don't add it
2027 dnl 1. if it's the standard /usr/include,
2028 dnl 2. if it's already present in $CPPFLAGS,
2029 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
2030 dnl 4. if it doesn't exist as a directory.
2031 if test "X$additional_includedir" != "X/usr/include"; then
2033 for x in $CPPFLAGS; do
2034 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2035 if test "X$x" = "X-I$additional_includedir"; then
2040 if test -z "$haveit"; then
2041 if test "X$additional_includedir" = "X/usr/local/include"; then
2042 if test -n "$GCC"; then
2044 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
2048 if test -z "$haveit"; then
2049 if test -d "$additional_includedir"; then
2050 dnl Really add $additional_includedir to $CPPFLAGS.
2051 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
2056 dnl Potentially add $additional_libdir to $LDFLAGS.
2057 dnl But don't add it
2058 dnl 1. if it's the standard /usr/lib,
2059 dnl 2. if it's already present in $LDFLAGS,
2060 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
2061 dnl 4. if it doesn't exist as a directory.
2062 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
2064 for x in $LDFLAGS; do
2065 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2066 if test "X$x" = "X-L$additional_libdir"; then
2071 if test -z "$haveit"; then
2072 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
2073 if test -n "$GCC"; then
2075 linux*) haveit=yes;;
2079 if test -z "$haveit"; then
2080 if test -d "$additional_libdir"; then
2081 dnl Really add $additional_libdir to $LDFLAGS.
2082 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
2090 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
2091 dnl acl_final_exec_prefix, containing the values to which $prefix and
2092 dnl $exec_prefix will expand at the end of the configure script.
2093 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
2095 dnl Unfortunately, prefix and exec_prefix get only finally determined
2096 dnl at the end of configure.
2097 if test "X$prefix" = "XNONE"; then
2098 acl_final_prefix="$ac_default_prefix"
2100 acl_final_prefix="$prefix"
2102 if test "X$exec_prefix" = "XNONE"; then
2103 acl_final_exec_prefix='${prefix}'
2105 acl_final_exec_prefix="$exec_prefix"
2107 acl_save_prefix="$prefix"
2108 prefix="$acl_final_prefix"
2109 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
2110 prefix="$acl_save_prefix"
2113 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
2114 dnl variables prefix and exec_prefix bound to the values they will have
2115 dnl at the end of the configure script.
2116 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
2118 acl_save_prefix="$prefix"
2119 prefix="$acl_final_prefix"
2120 acl_save_exec_prefix="$exec_prefix"
2121 exec_prefix="$acl_final_exec_prefix"
2123 exec_prefix="$acl_save_exec_prefix"
2124 prefix="$acl_save_prefix"
2127 dnl AC_LIB_PREPARE_MULTILIB creates
2128 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
2129 dnl "lib" or "lib64" or "lib/64",
2130 dnl - a variable acl_libdirstem2, as a secondary possible value for
2131 dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
2133 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
2135 dnl There is no formal standard regarding lib and lib64.
2136 dnl On glibc systems, the current practice is that on a system supporting
2137 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
2138 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
2139 dnl the compiler's default mode by looking at the compiler's library search
2140 dnl path. If at least one of its elements ends in /lib64 or points to a
2141 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
2142 dnl Otherwise we use the default, namely "lib".
2143 dnl On Solaris systems, the current practice is that on a system supporting
2144 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
2145 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
2146 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
2147 AC_REQUIRE([AC_CANONICAL_HOST])
2152 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
2153 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
2154 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
2155 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
2156 dnl symlink is missing, so we set acl_libdirstem2 too.
2157 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
2158 [AC_EGREP_CPP([sixtyfour bits], [
2162 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
2164 if test $gl_cv_solaris_64bit = yes; then
2165 acl_libdirstem=lib/64
2167 sparc*) acl_libdirstem2=lib/sparcv9 ;;
2168 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
2173 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
2174 if test -n "$searchpath"; then
2175 acl_save_IFS="${IFS= }"; IFS=":"
2176 for searchdir in $searchpath; do
2177 if test -d "$searchdir"; then
2178 case "$searchdir" in
2179 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
2181 # Better ignore directories of this form. They are misleading.
2183 *) searchdir=`cd "$searchdir" && pwd`
2184 case "$searchdir" in
2185 */lib64 ) acl_libdirstem=lib64 ;;
2194 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
2197 # nls.m4 serial 5 (gettext-0.18)
2198 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
2200 dnl This file is free software; the Free Software Foundation
2201 dnl gives unlimited permission to copy and/or distribute it,
2202 dnl with or without modifications, as long as this notice is preserved.
2204 dnl This file can can be used in projects which are not available under
2205 dnl the GNU General Public License or the GNU Library General Public
2206 dnl License but which still want to provide support for the GNU gettext
2208 dnl Please note that the actual code of the GNU gettext library is covered
2209 dnl by the GNU Library General Public License, and the rest of the GNU
2210 dnl gettext package package is covered by the GNU General Public License.
2211 dnl They are *not* in the public domain.
2214 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2215 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2221 AC_MSG_CHECKING([whether NLS is requested])
2222 dnl Default is enabled NLS
2223 AC_ARG_ENABLE([nls],
2224 [ --disable-nls do not use Native Language Support],
2225 USE_NLS=$enableval, USE_NLS=yes)
2226 AC_MSG_RESULT([$USE_NLS])
2230 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
2231 # serial 1 (pkg-config-0.24)
2233 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2235 # This program is free software; you can redistribute it and/or modify
2236 # it under the terms of the GNU General Public License as published by
2237 # the Free Software Foundation; either version 2 of the License, or
2238 # (at your option) any later version.
2240 # This program is distributed in the hope that it will be useful, but
2241 # WITHOUT ANY WARRANTY; without even the implied warranty of
2242 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2243 # General Public License for more details.
2245 # You should have received a copy of the GNU General Public License
2246 # along with this program; if not, write to the Free Software
2247 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2249 # As a special exception to the GNU General Public License, if you
2250 # distribute this file as part of a program that contains a
2251 # configuration script generated by Autoconf, you may include it under
2252 # the same distribution terms that you use for the rest of that program.
2254 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
2255 # ----------------------------------
2256 AC_DEFUN([PKG_PROG_PKG_CONFIG],
2257 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2258 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
2259 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
2260 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
2261 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
2262 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
2264 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2265 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2267 if test -n "$PKG_CONFIG"; then
2268 _pkg_min_version=m4_default([$1], [0.9.0])
2269 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2270 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2271 AC_MSG_RESULT([yes])
2277 ])# PKG_PROG_PKG_CONFIG
2279 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2281 # Check to see whether a particular set of modules exists. Similar
2282 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
2284 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2285 # only at the first occurence in configure.ac, so if the first place
2286 # it's called might be skipped (such as if it is within an "if", you
2287 # have to call PKG_CHECK_EXISTS manually
2288 # --------------------------------------------------------------
2289 AC_DEFUN([PKG_CHECK_EXISTS],
2290 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2291 if test -n "$PKG_CONFIG" && \
2292 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2293 m4_default([$2], [:])
2294 m4_ifvaln([$3], [else
2298 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2299 # ---------------------------------------------
2300 m4_define([_PKG_CONFIG],
2301 [if test -n "$$1"; then
2303 elif test -n "$PKG_CONFIG"; then
2304 PKG_CHECK_EXISTS([$3],
2305 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
2306 test "x$?" != "x0" && pkg_failed=yes ],
2313 # _PKG_SHORT_ERRORS_SUPPORTED
2314 # -----------------------------
2315 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2316 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2317 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2318 _pkg_short_errors_supported=yes
2320 _pkg_short_errors_supported=no
2322 ])# _PKG_SHORT_ERRORS_SUPPORTED
2325 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2326 # [ACTION-IF-NOT-FOUND])
2329 # Note that if there is a possibility the first call to
2330 # PKG_CHECK_MODULES might not happen, you should be sure to include an
2331 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2334 # --------------------------------------------------------------
2335 AC_DEFUN([PKG_CHECK_MODULES],
2336 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2337 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2338 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2341 AC_MSG_CHECKING([for $1])
2343 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2344 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
2346 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2347 and $1[]_LIBS to avoid the need to call pkg-config.
2348 See the pkg-config man page for more details.])
2350 if test $pkg_failed = yes; then
2352 _PKG_SHORT_ERRORS_SUPPORTED
2353 if test $_pkg_short_errors_supported = yes; then
2354 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
2356 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
2358 # Put the nasty error message in config.log where it belongs
2359 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2361 m4_default([$4], [AC_MSG_ERROR(
2362 [Package requirements ($2) were not met:
2366 Consider adjusting the PKG_CONFIG_PATH environment variable if you
2367 installed software in a non-standard prefix.
2371 elif test $pkg_failed = untried; then
2373 m4_default([$4], [AC_MSG_FAILURE(
2374 [The pkg-config script could not be found or is too old. Make sure it
2375 is in your PATH or set the PKG_CONFIG environment variable to the full
2380 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
2383 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2384 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2385 AC_MSG_RESULT([yes])
2388 ])# PKG_CHECK_MODULES
2390 # po.m4 serial 17 (gettext-0.18)
2391 dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
2392 dnl This file is free software; the Free Software Foundation
2393 dnl gives unlimited permission to copy and/or distribute it,
2394 dnl with or without modifications, as long as this notice is preserved.
2396 dnl This file can can be used in projects which are not available under
2397 dnl the GNU General Public License or the GNU Library General Public
2398 dnl License but which still want to provide support for the GNU gettext
2400 dnl Please note that the actual code of the GNU gettext library is covered
2401 dnl by the GNU Library General Public License, and the rest of the GNU
2402 dnl gettext package package is covered by the GNU General Public License.
2403 dnl They are *not* in the public domain.
2406 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2407 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2411 dnl Checks for all prerequisites of the po subdirectory.
2412 AC_DEFUN([AM_PO_SUBDIRS],
2414 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2415 AC_REQUIRE([AC_PROG_INSTALL])dnl
2416 AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
2417 AC_REQUIRE([AM_NLS])dnl
2419 dnl Release version of the gettext macros. This is used to ensure that
2420 dnl the gettext macros and po/Makefile.in.in are in sync.
2421 AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
2423 dnl Perform the following tests also if --disable-nls has been given,
2424 dnl because they are needed for "make dist" to work.
2426 dnl Search for GNU msgfmt in the PATH.
2427 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
2428 dnl The second test excludes FreeBSD msgfmt.
2429 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
2430 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2431 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
2433 AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
2435 dnl Test whether it is GNU msgfmt >= 0.15.
2437 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2438 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
2439 *) MSGFMT_015=$MSGFMT ;;
2442 AC_SUBST([MSGFMT_015])
2444 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2445 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
2446 *) GMSGFMT_015=$GMSGFMT ;;
2449 AC_SUBST([GMSGFMT_015])
2451 dnl Search for GNU xgettext 0.12 or newer in the PATH.
2452 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
2453 dnl The second test excludes FreeBSD xgettext.
2454 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
2455 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2456 (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)],
2458 dnl Remove leftover from FreeBSD xgettext call.
2461 dnl Test whether it is GNU xgettext >= 0.15.
2463 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2464 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
2465 *) XGETTEXT_015=$XGETTEXT ;;
2468 AC_SUBST([XGETTEXT_015])
2470 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
2471 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
2472 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
2474 dnl Installation directories.
2475 dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
2476 dnl have to define it here, so that it can be used in po/Makefile.
2477 test -n "$localedir" || localedir='${datadir}/locale'
2478 AC_SUBST([localedir])
2480 dnl Support for AM_XGETTEXT_OPTION.
2481 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
2482 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
2484 AC_CONFIG_COMMANDS([po-directories], [[
2485 for ac_file in $CONFIG_FILES; do
2486 # Support "outfile[:infile[:infile...]]"
2488 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2490 # PO directories have a Makefile.in generated from Makefile.in.in.
2491 case "$ac_file" in */Makefile.in)
2492 # Adjust a relative srcdir.
2493 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2494 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
2495 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2496 # In autoconf-2.13 it is called $ac_given_srcdir.
2497 # In autoconf-2.50 it is called $srcdir.
2498 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2499 case "$ac_given_srcdir" in
2500 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2501 /*) top_srcdir="$ac_given_srcdir" ;;
2502 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2504 # Treat a directory as a PO directory if and only if it has a
2505 # POTFILES.in file. This allows packages to have multiple PO
2506 # directories under different names or in different locations.
2507 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
2508 rm -f "$ac_dir/POTFILES"
2509 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
2510 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
2511 POMAKEFILEDEPS="POTFILES.in"
2512 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
2513 # on $ac_dir but don't depend on user-specified configuration
2515 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2516 # The LINGUAS file contains the set of available languages.
2517 if test -n "$OBSOLETE_ALL_LINGUAS"; then
2518 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2520 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2521 # Hide the ALL_LINGUAS assigment from automake < 1.5.
2522 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2523 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2525 # The set of available languages was given in configure.in.
2526 # Hide the ALL_LINGUAS assigment from automake < 1.5.
2527 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
2530 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2531 # Compute UPDATEPOFILES
2532 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2533 # Compute DUMMYPOFILES
2534 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2536 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2537 case "$ac_given_srcdir" in
2539 *) srcdirpre='$(srcdir)/' ;;
2545 for lang in $ALL_LINGUAS; do
2546 POFILES="$POFILES $srcdirpre$lang.po"
2547 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2548 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2549 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2551 # CATALOGS depends on both $ac_dir and the user's LINGUAS
2552 # environment variable.
2554 if test -n "$ALL_LINGUAS"; then
2555 for presentlang in $ALL_LINGUAS; do
2557 if test "%UNSET%" != "$LINGUAS"; then
2558 desiredlanguages="$LINGUAS"
2560 desiredlanguages="$ALL_LINGUAS"
2562 for desiredlang in $desiredlanguages; do
2563 # Use the presentlang catalog if desiredlang is
2564 # a. equal to presentlang, or
2565 # b. a variant of presentlang (because in this case,
2566 # presentlang can be used as a fallback for messages
2567 # which are not translated in the desiredlang catalog).
2568 case "$desiredlang" in
2569 "$presentlang"*) useit=yes;;
2572 if test $useit = yes; then
2573 INST_LINGUAS="$INST_LINGUAS $presentlang"
2578 if test -n "$INST_LINGUAS"; then
2579 for lang in $INST_LINGUAS; do
2580 CATALOGS="$CATALOGS $lang.gmo"
2583 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
2584 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
2585 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
2586 if test -f "$f"; then
2588 *.orig | *.bak | *~) ;;
2589 *) cat "$f" >> "$ac_dir/Makefile" ;;
2597 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
2598 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
2599 # from automake < 1.5.
2600 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
2601 # Capture the value of LINGUAS because we need it to compute CATALOGS.
2602 LINGUAS="${LINGUAS-%UNSET%}"
2606 dnl Postprocesses a Makefile in a directory containing PO files.
2607 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
2609 # When this code is run, in config.status, two variables have already been
2611 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
2612 # - LINGUAS is the value of the environment variable LINGUAS at configure
2616 # Adjust a relative srcdir.
2617 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2618 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
2619 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2620 # In autoconf-2.13 it is called $ac_given_srcdir.
2621 # In autoconf-2.50 it is called $srcdir.
2622 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2623 case "$ac_given_srcdir" in
2624 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2625 /*) top_srcdir="$ac_given_srcdir" ;;
2626 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2629 # Find a way to echo strings without interpreting backslash.
2630 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
2633 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
2634 gt_echo='printf %s\n'
2645 # A sed script that extracts the value of VARIABLE from a Makefile.
2647 # Test if the hold space is empty.
2652 # Yes it was empty. Look if we have the expected variable definition.
2653 /^[ ]*VARIABLE[ ]*=/{
2654 # Seen the first line of the variable definition.
2655 s/^[ ]*VARIABLE[ ]*=//
2660 # Here we are processing a line from the variable definition.
2661 # Remove comment, more precisely replace it with a space.
2663 # See if the line ends in a backslash.
2667 # Print the line, without the trailing backslash.
2670 # There was no trailing backslash. The end of the variable definition is
2671 # reached. Clear the hold space.
2676 # A trailing backslash means that the variable definition continues in the
2677 # next line. Put a nonempty string into the hold space to indicate this.
2684 # Set POTFILES to the value of the Makefile variable POTFILES.
2685 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
2686 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
2687 # Compute POTFILES_DEPS as
2688 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
2690 for file in $POTFILES; do
2691 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
2695 if test -n "$OBSOLETE_ALL_LINGUAS"; then
2696 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2698 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2699 # The LINGUAS file contains the set of available languages.
2700 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2701 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2703 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
2704 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
2705 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
2707 # Hide the ALL_LINGUAS assigment from automake < 1.5.
2708 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2710 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2711 # Compute UPDATEPOFILES
2712 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2713 # Compute DUMMYPOFILES
2714 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2716 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2717 # Compute PROPERTIESFILES
2718 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
2719 # Compute CLASSFILES
2720 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
2722 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
2724 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
2725 # Compute RESOURCESDLLFILES
2726 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
2727 case "$ac_given_srcdir" in
2729 *) srcdirpre='$(srcdir)/' ;;
2740 for lang in $ALL_LINGUAS; do
2741 POFILES="$POFILES $srcdirpre$lang.po"
2742 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2743 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2744 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2745 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
2746 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
2747 QMFILES="$QMFILES $srcdirpre$lang.qm"
2748 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2749 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
2750 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
2751 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
2753 # CATALOGS depends on both $ac_dir and the user's LINGUAS
2754 # environment variable.
2756 if test -n "$ALL_LINGUAS"; then
2757 for presentlang in $ALL_LINGUAS; do
2759 if test "%UNSET%" != "$LINGUAS"; then
2760 desiredlanguages="$LINGUAS"
2762 desiredlanguages="$ALL_LINGUAS"
2764 for desiredlang in $desiredlanguages; do
2765 # Use the presentlang catalog if desiredlang is
2766 # a. equal to presentlang, or
2767 # b. a variant of presentlang (because in this case,
2768 # presentlang can be used as a fallback for messages
2769 # which are not translated in the desiredlang catalog).
2770 case "$desiredlang" in
2771 "$presentlang"*) useit=yes;;
2774 if test $useit = yes; then
2775 INST_LINGUAS="$INST_LINGUAS $presentlang"
2784 if test -n "$INST_LINGUAS"; then
2785 for lang in $INST_LINGUAS; do
2786 CATALOGS="$CATALOGS $lang.gmo"
2787 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
2788 QTCATALOGS="$QTCATALOGS $lang.qm"
2789 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2790 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
2791 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
2792 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
2796 sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
2797 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
2798 # Add dependencies that cannot be formulated as a simple suffix rule.
2799 for lang in $ALL_LINGUAS; do
2800 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2801 cat >> "$ac_file.tmp" <<EOF
2802 $frobbedlang.msg: $lang.po
2803 @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
2804 \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2808 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
2809 # Add dependencies that cannot be formulated as a simple suffix rule.
2810 for lang in $ALL_LINGUAS; do
2811 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
2812 cat >> "$ac_file.tmp" <<EOF
2813 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
2814 @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
2815 \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2819 if test -n "$POMAKEFILEDEPS"; then
2820 cat >> "$ac_file.tmp" <<EOF
2821 Makefile: $POMAKEFILEDEPS
2824 mv "$ac_file.tmp" "$ac_file"
2827 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
2828 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
2830 XGETTEXT_EXTRA_OPTIONS=
2833 dnl Registers an option to be passed to xgettext in the po subdirectory.
2834 AC_DEFUN([AM_XGETTEXT_OPTION],
2836 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
2837 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
2840 # progtest.m4 serial 6 (gettext-0.18)
2841 dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc.
2842 dnl This file is free software; the Free Software Foundation
2843 dnl gives unlimited permission to copy and/or distribute it,
2844 dnl with or without modifications, as long as this notice is preserved.
2846 dnl This file can can be used in projects which are not available under
2847 dnl the GNU General Public License or the GNU Library General Public
2848 dnl License but which still want to provide support for the GNU gettext
2850 dnl Please note that the actual code of the GNU gettext library is covered
2851 dnl by the GNU Library General Public License, and the rest of the GNU
2852 dnl gettext package package is covered by the GNU General Public License.
2853 dnl They are *not* in the public domain.
2856 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
2860 # Search path for a program which passes the given test.
2862 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2863 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2864 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2866 # Prepare PATH_SEPARATOR.
2867 # The user is always right.
2868 if test "${PATH_SEPARATOR+set}" != set; then
2869 echo "#! /bin/sh" >conf$$.sh
2870 echo "exit 0" >>conf$$.sh
2872 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
2880 # Find out how to test for executable files. Don't use a zero-byte file,
2881 # as systems may use methods other than mode bits to determine executability.
2882 cat >conf$$.file <<_ASEOF
2886 chmod +x conf$$.file
2887 if test -x conf$$.file >/dev/null 2>&1; then
2888 ac_executable_p="test -x"
2890 ac_executable_p="test -f"
2894 # Extract the first word of "$2", so it can be a program name with args.
2895 set dummy $2; ac_word=[$]2
2896 AC_MSG_CHECKING([for $ac_word])
2897 AC_CACHE_VAL([ac_cv_path_$1],
2899 [[\\/]]* | ?:[[\\/]]*)
2900 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2903 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2904 for ac_dir in ifelse([$5], , $PATH, [$5]); do
2906 test -z "$ac_dir" && ac_dir=.
2907 for ac_exec_ext in '' $ac_executable_extensions; do
2908 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2909 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
2911 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
2918 dnl If no 4th arg is given, leave the cache variable unset,
2919 dnl so AC_PATH_PROGS will keep looking.
2920 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2925 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2926 AC_MSG_RESULT([$][$1])
2933 # Configure paths for SDL
2934 # Sam Lantinga 9/21/99
2935 # stolen from Manish Singh
2936 # stolen back from Frank Belew
2937 # stolen from Manish Singh
2938 # Shamelessly stolen from Owen Taylor
2942 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
2943 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
2945 AC_DEFUN([AM_PATH_SDL],
2947 dnl Get the cflags and libraries from the sdl-config script
2949 AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
2950 sdl_prefix="$withval", sdl_prefix="")
2951 AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
2952 sdl_exec_prefix="$withval", sdl_exec_prefix="")
2953 AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
2954 , enable_sdltest=yes)
2956 if test x$sdl_exec_prefix != x ; then
2957 sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
2958 if test x${SDL_CONFIG+set} != xset ; then
2959 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
2962 if test x$sdl_prefix != x ; then
2963 sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
2964 if test x${SDL_CONFIG+set} != xset ; then
2965 SDL_CONFIG=$sdl_prefix/bin/sdl-config
2969 as_save_PATH="$PATH"
2970 if test "x$prefix" != xNONE; then
2971 PATH="$prefix/bin:$prefix/usr/bin:$PATH"
2973 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
2974 PATH="$as_save_PATH"
2975 min_sdl_version=ifelse([$1], ,0.11.0,$1)
2976 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
2978 if test "$SDL_CONFIG" = "no" ; then
2981 SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
2982 SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
2984 sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
2985 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
2986 sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \
2987 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
2988 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
2989 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
2990 if test "x$enable_sdltest" = "xyes" ; then
2991 ac_save_CFLAGS="$CFLAGS"
2992 ac_save_CXXFLAGS="$CXXFLAGS"
2993 ac_save_LIBS="$LIBS"
2994 CFLAGS="$CFLAGS $SDL_CFLAGS"
2995 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
2996 LIBS="$LIBS $SDL_LIBS"
2998 dnl Now check if the installed SDL is sufficiently new. (Also sanity
2999 dnl checks the results of sdl-config to some extent
3009 my_strdup (char *str)
3015 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
3016 strcpy (new_str, str);
3024 int main (int argc, char *argv[])
3026 int major, minor, micro;
3029 /* This hangs on some systems (?)
3030 system ("touch conf.sdltest");
3032 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
3034 /* HP/UX 9 (%@#!) writes to sscanf strings */
3035 tmp_version = my_strdup("$min_sdl_version");
3036 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
3037 printf("%s, bad version string\n", "$min_sdl_version");
3041 if (($sdl_major_version > major) ||
3042 (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
3043 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
3049 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
3050 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
3051 printf("*** best to upgrade to the required version.\n");
3052 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
3053 printf("*** to point to the correct copy of sdl-config, and remove the file\n");
3054 printf("*** config.cache before re-running configure\n");
3059 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
3060 CFLAGS="$ac_save_CFLAGS"
3061 CXXFLAGS="$ac_save_CXXFLAGS"
3062 LIBS="$ac_save_LIBS"
3065 if test "x$no_sdl" = x ; then
3067 ifelse([$2], , :, [$2])
3070 if test "$SDL_CONFIG" = "no" ; then
3071 echo "*** The sdl-config script installed by SDL could not be found"
3072 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
3073 echo "*** your path, or set the SDL_CONFIG environment variable to the"
3074 echo "*** full path to sdl-config."
3076 if test -f conf.sdltest ; then
3079 echo "*** Could not run SDL test program, checking why..."
3080 CFLAGS="$CFLAGS $SDL_CFLAGS"
3081 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
3082 LIBS="$LIBS $SDL_LIBS"
3087 int main(int argc, char *argv[])
3090 #define main K_and_R_C_main
3092 [ echo "*** The test program compiled, but did not run. This usually means"
3093 echo "*** that the run-time linker is not finding SDL or finding the wrong"
3094 echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
3095 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
3096 echo "*** to the installed location Also, make sure you have run ldconfig if that"
3097 echo "*** is required on your system"
3099 echo "*** If you have an old version installed, it is best to remove it, although"
3100 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
3101 [ echo "*** The test program failed to compile or link. See the file config.log for the"
3102 echo "*** exact error that occured. This usually means SDL was incorrectly installed"
3103 echo "*** or that you have moved SDL since it was installed. In the latter case, you"
3104 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
3105 CFLAGS="$ac_save_CFLAGS"
3106 CXXFLAGS="$ac_save_CXXFLAGS"
3107 LIBS="$ac_save_LIBS"
3112 ifelse([$3], , :, [$3])
3114 AC_SUBST(SDL_CFLAGS)
3119 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
3122 # This file is free software; the Free Software Foundation
3123 # gives unlimited permission to copy and/or distribute it,
3124 # with or without modifications, as long as this notice is preserved.
3128 # AM_AUTOMAKE_VERSION(VERSION)
3129 # ----------------------------
3130 # Automake X.Y traces this macro to ensure aclocal.m4 has been
3131 # generated from the m4 files accompanying Automake X.Y.
3132 # (This private macro should not be called outside this file.)
3133 AC_DEFUN([AM_AUTOMAKE_VERSION],
3134 [am__api_version='1.11'
3135 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3136 dnl require some minimum version. Point them to the right macro.
3137 m4_if([$1], [1.11.6], [],
3138 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3141 # _AM_AUTOCONF_VERSION(VERSION)
3142 # -----------------------------
3143 # aclocal traces this macro to find the Autoconf version.
3144 # This is a private macro too. Using m4_define simplifies
3145 # the logic in aclocal, which can simply ignore this definition.
3146 m4_define([_AM_AUTOCONF_VERSION], [])
3148 # AM_SET_CURRENT_AUTOMAKE_VERSION
3149 # -------------------------------
3150 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
3151 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
3152 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
3153 [AM_AUTOMAKE_VERSION([1.11.6])dnl
3154 m4_ifndef([AC_AUTOCONF_VERSION],
3155 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
3156 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
3158 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
3160 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
3162 # This file is free software; the Free Software Foundation
3163 # gives unlimited permission to copy and/or distribute it,
3164 # with or without modifications, as long as this notice is preserved.
3168 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
3169 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
3170 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
3172 # Of course, Automake must honor this variable whenever it calls a
3173 # tool from the auxiliary directory. The problem is that $srcdir (and
3174 # therefore $ac_aux_dir as well) can be either absolute or relative,
3175 # depending on how configure is run. This is pretty annoying, since
3176 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
3177 # source directory, any form will work fine, but in subdirectories a
3178 # relative path needs to be adjusted first.
3180 # $ac_aux_dir/missing
3181 # fails when called from a subdirectory if $ac_aux_dir is relative
3182 # $top_srcdir/$ac_aux_dir/missing
3183 # fails if $ac_aux_dir is absolute,
3184 # fails when called from a subdirectory in a VPATH build with
3185 # a relative $ac_aux_dir
3187 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
3188 # are both prefixed by $srcdir. In an in-source build this is usually
3189 # harmless because $srcdir is `.', but things will broke when you
3190 # start a VPATH build or use an absolute $srcdir.
3192 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
3193 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
3194 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
3195 # and then we would define $MISSING as
3196 # MISSING="\${SHELL} $am_aux_dir/missing"
3197 # This will work as long as MISSING is not called from configure, because
3198 # unfortunately $(top_srcdir) has no meaning in configure.
3199 # However there are other variables, like CC, which are often used in
3200 # configure, and could therefore not use this "fixed" $ac_aux_dir.
3202 # Another solution, used here, is to always expand $ac_aux_dir to an
3203 # absolute PATH. The drawback is that using absolute paths prevent a
3204 # configured tree to be moved without reconfiguration.
3206 AC_DEFUN([AM_AUX_DIR_EXPAND],
3207 [dnl Rely on autoconf to set up CDPATH properly.
3208 AC_PREREQ([2.50])dnl
3209 # expand $ac_aux_dir to an absolute path
3210 am_aux_dir=`cd $ac_aux_dir && pwd`
3213 # AM_CONDITIONAL -*- Autoconf -*-
3215 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
3216 # Free Software Foundation, Inc.
3218 # This file is free software; the Free Software Foundation
3219 # gives unlimited permission to copy and/or distribute it,
3220 # with or without modifications, as long as this notice is preserved.
3224 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
3225 # -------------------------------------
3226 # Define a conditional.
3227 AC_DEFUN([AM_CONDITIONAL],
3229 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
3230 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
3231 AC_SUBST([$1_TRUE])dnl
3232 AC_SUBST([$1_FALSE])dnl
3233 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
3234 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
3235 m4_define([_AM_COND_VALUE_$1], [$2])dnl
3243 AC_CONFIG_COMMANDS_PRE(
3244 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
3245 AC_MSG_ERROR([[conditional "$1" was never defined.
3246 Usually this means the macro was only invoked conditionally.]])
3249 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
3250 # 2010, 2011 Free Software Foundation, Inc.
3252 # This file is free software; the Free Software Foundation
3253 # gives unlimited permission to copy and/or distribute it,
3254 # with or without modifications, as long as this notice is preserved.
3258 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
3259 # written in clear, in which case automake, when reading aclocal.m4,
3260 # will think it sees a *use*, and therefore will trigger all it's
3261 # C support machinery. Also note that it means that autoscan, seeing
3262 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
3265 # _AM_DEPENDENCIES(NAME)
3266 # ----------------------
3267 # See how the compiler implements dependency checking.
3268 # NAME is "CC", "CXX", "GCJ", or "OBJC".
3269 # We try a few techniques and use that to set a single cache variable.
3271 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
3272 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
3273 # dependency, and given that the user is not expected to run this macro,
3274 # just rely on AC_PROG_CC.
3275 AC_DEFUN([_AM_DEPENDENCIES],
3276 [AC_REQUIRE([AM_SET_DEPDIR])dnl
3277 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
3278 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
3279 AC_REQUIRE([AM_DEP_TRACK])dnl
3281 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
3282 [$1], CXX, [depcc="$CXX" am_compiler_list=],
3283 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
3284 [$1], UPC, [depcc="$UPC" am_compiler_list=],
3285 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
3286 [depcc="$$1" am_compiler_list=])
3288 AC_CACHE_CHECK([dependency style of $depcc],
3289 [am_cv_$1_dependencies_compiler_type],
3290 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3291 # We make a subdir and do the tests there. Otherwise we can end up
3292 # making bogus files that we don't know about and never remove. For
3293 # instance it was reported that on HP-UX the gcc test will end up
3294 # making a dummy file named `D' -- because `-MD' means `put the output
3298 # Copy depcomp to subdir because otherwise we won't find it if we're
3299 # using a relative directory.
3300 cp "$am_depcomp" conftest.dir
3302 # We will build objects and dependencies in a subdirectory because
3303 # it helps to detect inapplicable dependency modes. For instance
3304 # both Tru64's cc and ICC support -MD to output dependencies as a
3305 # side effect of compilation, but ICC will put the dependencies in
3306 # the current directory while Tru64 will put them in the object
3310 am_cv_$1_dependencies_compiler_type=none
3311 if test "$am_compiler_list" = ""; then
3312 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
3316 [case " $depcc " in #(
3317 *\ -arch\ *\ -arch\ *) am__universal=true ;;
3320 [case " $depcc " in #(
3321 *\ -arch\ *\ -arch\ *) am__universal=true ;;
3324 for depmode in $am_compiler_list; do
3325 # Setup a source with many dependencies, because some compilers
3326 # like to wrap large dependency lists on column 80 (with \), and
3327 # we should not choose a depcomp mode which is confused by this.
3329 # We need to recreate these files for each test, as the compiler may
3330 # overwrite some of them when testing with obscure command lines.
3331 # This happens at least with the AIX C compiler.
3333 for i in 1 2 3 4 5 6; do
3334 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3335 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3336 # Solaris 8's {/usr,}/bin/sh.
3337 touch sub/conftst$i.h
3339 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3341 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3342 # mode. It turns out that the SunPro C++ compiler does not properly
3343 # handle `-M -o', and we need to detect this. Also, some Intel
3344 # versions had trouble with output in subdirs
3345 am__obj=sub/conftest.${OBJEXT-o}
3346 am__minus_obj="-o $am__obj"
3349 # This depmode causes a compiler race in universal mode.
3350 test "$am__universal" = false || continue
3353 # after this tag, mechanisms are not by side-effect, so they'll
3354 # only be used when explicitly requested
3355 if test "x$enable_dependency_tracking" = xyes; then
3361 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
3362 # This compiler won't grok `-c -o', but also, the minuso test has
3363 # not run yet. These depmodes are late enough in the game, and
3364 # so weak that their functioning should not be impacted.
3365 am__obj=conftest.${OBJEXT-o}
3370 if depmode=$depmode \
3371 source=sub/conftest.c object=$am__obj \
3372 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3373 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3374 >/dev/null 2>conftest.err &&
3375 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3376 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3377 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3378 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3379 # icc doesn't choke on unknown options, it will just issue warnings
3380 # or remarks (even with -Werror). So we grep stderr for any message
3381 # that says an option was ignored or not supported.
3382 # When given -MP, icc 7.0 and 7.1 complain thusly:
3383 # icc: Command line warning: ignoring option '-M'; no argument required
3384 # The diagnosis changed in icc 8.0:
3385 # icc: Command line remark: option '-MP' not supported
3386 if (grep 'ignoring option' conftest.err ||
3387 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3388 am_cv_$1_dependencies_compiler_type=$depmode
3397 am_cv_$1_dependencies_compiler_type=none
3400 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
3401 AM_CONDITIONAL([am__fastdep$1], [
3402 test "x$enable_dependency_tracking" != xno \
3403 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
3409 # Choose a directory name for dependency files.
3410 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
3411 AC_DEFUN([AM_SET_DEPDIR],
3412 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3413 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3419 AC_DEFUN([AM_DEP_TRACK],
3420 [AC_ARG_ENABLE(dependency-tracking,
3421 [ --disable-dependency-tracking speeds up one-time build
3422 --enable-dependency-tracking do not reject slow dependency extractors])
3423 if test "x$enable_dependency_tracking" != xno; then
3424 am_depcomp="$ac_aux_dir/depcomp"
3428 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3429 AC_SUBST([AMDEPBACKSLASH])dnl
3430 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3431 AC_SUBST([am__nodep])dnl
3432 _AM_SUBST_NOTMAKE([am__nodep])dnl
3435 # Generate code to set up dependency tracking. -*- Autoconf -*-
3437 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
3438 # Free Software Foundation, Inc.
3440 # This file is free software; the Free Software Foundation
3441 # gives unlimited permission to copy and/or distribute it,
3442 # with or without modifications, as long as this notice is preserved.
3446 # _AM_OUTPUT_DEPENDENCY_COMMANDS
3447 # ------------------------------
3448 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3450 # Autoconf 2.62 quotes --file arguments for eval, but not when files
3451 # are listed without --file. Let's play safe and only enable the eval
3452 # if we detect the quoting.
3453 case $CONFIG_FILES in
3454 *\'*) eval set x "$CONFIG_FILES" ;;
3455 *) set x $CONFIG_FILES ;;
3460 # Strip MF so we end up with the name of the file.
3461 mf=`echo "$mf" | sed -e 's/:.*$//'`
3462 # Check whether this is an Automake generated Makefile or not.
3463 # We used to match only the files named `Makefile.in', but
3464 # some people rename them; so instead we look at the file content.
3465 # Grep'ing the first line is not enough: some people post-process
3466 # each Makefile.in and add a new line on top of each file to say so.
3467 # Grep'ing the whole file is not good either: AIX grep has a line
3468 # limit of 2048, but all sed's we know have understand at least 4000.
3469 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
3470 dirpart=`AS_DIRNAME("$mf")`
3474 # Extract the definition of DEPDIR, am__include, and am__quote
3475 # from the Makefile without running `make'.
3476 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
3477 test -z "$DEPDIR" && continue
3478 am__include=`sed -n 's/^am__include = //p' < "$mf"`
3479 test -z "am__include" && continue
3480 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
3481 # When using ansi2knr, U may be empty or an underscore; expand it
3482 U=`sed -n 's/^U = //p' < "$mf"`
3483 # Find all dependency output files, they are included files with
3484 # $(DEPDIR) in their names. We invoke sed twice because it is the
3485 # simplest approach to changing $(DEPDIR) to its actual value in the
3487 for file in `sed -n "
3488 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
3489 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
3490 # Make sure the directory exists.
3491 test -f "$dirpart/$file" && continue
3492 fdir=`AS_DIRNAME(["$file"])`
3493 AS_MKDIR_P([$dirpart/$fdir])
3494 # echo "creating $dirpart/$file"
3495 echo '# dummy' > "$dirpart/$file"
3499 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3502 # AM_OUTPUT_DEPENDENCY_COMMANDS
3503 # -----------------------------
3504 # This macro should only be invoked once -- use via AC_REQUIRE.
3506 # This code is only required when automatic dependency tracking
3507 # is enabled. FIXME. This creates each `.P' file that we will
3508 # need in order to bootstrap the dependency handling code.
3509 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
3510 [AC_CONFIG_COMMANDS([depfiles],
3511 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
3512 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
3515 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
3516 # Free Software Foundation, Inc.
3518 # This file is free software; the Free Software Foundation
3519 # gives unlimited permission to copy and/or distribute it,
3520 # with or without modifications, as long as this notice is preserved.
3524 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
3525 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
3527 # Do all the work for Automake. -*- Autoconf -*-
3529 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3530 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
3532 # This file is free software; the Free Software Foundation
3533 # gives unlimited permission to copy and/or distribute it,
3534 # with or without modifications, as long as this notice is preserved.
3538 # This macro actually does too much. Some checks are only needed if
3539 # your package does certain things. But this isn't really a big deal.
3541 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
3542 # AM_INIT_AUTOMAKE([OPTIONS])
3543 # -----------------------------------------------
3544 # The call with PACKAGE and VERSION arguments is the old style
3545 # call (pre autoconf-2.50), which is being phased out. PACKAGE
3546 # and VERSION should now be passed to AC_INIT and removed from
3547 # the call to AM_INIT_AUTOMAKE.
3548 # We support both call styles for the transition. After
3549 # the next Automake release, Autoconf can make the AC_INIT
3550 # arguments mandatory, and then we can depend on a new Autoconf
3551 # release and drop the old call support.
3552 AC_DEFUN([AM_INIT_AUTOMAKE],
3553 [AC_PREREQ([2.62])dnl
3554 dnl Autoconf wants to disallow AM_ names. We explicitly allow
3555 dnl the ones we care about.
3556 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
3557 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
3558 AC_REQUIRE([AC_PROG_INSTALL])dnl
3559 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3560 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3561 # is not polluted with repeated "-I."
3562 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
3563 # test to see if srcdir already configured
3564 if test -f $srcdir/config.status; then
3565 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
3569 # test whether we have cygpath
3570 if test -z "$CYGPATH_W"; then
3571 if (cygpath --version) >/dev/null 2>/dev/null; then
3572 CYGPATH_W='cygpath -w'
3577 AC_SUBST([CYGPATH_W])
3579 # Define the identity of the package.
3580 dnl Distinguish between old-style and new-style calls.
3582 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
3583 AC_SUBST([PACKAGE], [$1])dnl
3584 AC_SUBST([VERSION], [$2])],
3585 [_AM_SET_OPTIONS([$1])dnl
3586 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
3587 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
3588 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
3589 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
3590 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
3592 _AM_IF_OPTION([no-define],,
3593 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
3594 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
3596 # Some tools Automake needs.
3597 AC_REQUIRE([AM_SANITY_CHECK])dnl
3598 AC_REQUIRE([AC_ARG_PROGRAM])dnl
3599 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
3600 AM_MISSING_PROG(AUTOCONF, autoconf)
3601 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
3602 AM_MISSING_PROG(AUTOHEADER, autoheader)
3603 AM_MISSING_PROG(MAKEINFO, makeinfo)
3604 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3605 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
3606 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
3607 # We need awk for the "check" target. The system "awk" is bad on
3609 AC_REQUIRE([AC_PROG_AWK])dnl
3610 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3611 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3612 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
3613 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
3614 [_AM_PROG_TAR([v7])])])
3615 _AM_IF_OPTION([no-dependencies],,
3616 [AC_PROVIDE_IFELSE([AC_PROG_CC],
3617 [_AM_DEPENDENCIES(CC)],
3618 [define([AC_PROG_CC],
3619 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
3620 AC_PROVIDE_IFELSE([AC_PROG_CXX],
3621 [_AM_DEPENDENCIES(CXX)],
3622 [define([AC_PROG_CXX],
3623 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
3624 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
3625 [_AM_DEPENDENCIES(OBJC)],
3626 [define([AC_PROG_OBJC],
3627 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
3629 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
3630 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
3631 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
3632 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
3633 AC_CONFIG_COMMANDS_PRE(dnl
3634 [m4_provide_if([_AM_COMPILER_EXEEXT],
3635 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
3638 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
3639 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
3640 dnl mangled by Autoconf and run in a shell conditional statement.
3641 m4_define([_AC_COMPILER_EXEEXT],
3642 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
3645 # When config.status generates a header, we must update the stamp-h file.
3646 # This file resides in the same directory as the config header
3647 # that is generated. The stamp files are numbered to have different names.
3649 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
3650 # loop where config.status creates the headers, so we can generate
3651 # our stamp files there.
3652 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
3653 [# Compute $1's index in $config_headers.
3656 for _am_header in $config_headers :; do
3658 $_am_arg | $_am_arg:* )
3661 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
3664 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
3666 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
3669 # This file is free software; the Free Software Foundation
3670 # gives unlimited permission to copy and/or distribute it,
3671 # with or without modifications, as long as this notice is preserved.
3675 # AM_PROG_INSTALL_SH
3676 # ------------------
3677 # Define $install_sh.
3678 AC_DEFUN([AM_PROG_INSTALL_SH],
3679 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3680 if test x"${install_sh}" != xset; then
3683 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3685 install_sh="\${SHELL} $am_aux_dir/install-sh"
3688 AC_SUBST(install_sh)])
3690 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
3692 # This file is free software; the Free Software Foundation
3693 # gives unlimited permission to copy and/or distribute it,
3694 # with or without modifications, as long as this notice is preserved.
3698 # Check whether the underlying file-system supports filenames
3699 # with a leading dot. For instance MS-DOS doesn't.
3700 AC_DEFUN([AM_SET_LEADING_DOT],
3701 [rm -rf .tst 2>/dev/null
3702 mkdir .tst 2>/dev/null
3703 if test -d .tst; then
3708 rmdir .tst 2>/dev/null
3709 AC_SUBST([am__leading_dot])])
3711 # Check to see how 'make' treats includes. -*- Autoconf -*-
3713 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
3715 # This file is free software; the Free Software Foundation
3716 # gives unlimited permission to copy and/or distribute it,
3717 # with or without modifications, as long as this notice is preserved.
3723 # Check to see how make treats includes.
3724 AC_DEFUN([AM_MAKE_INCLUDE],
3725 [am_make=${MAKE-make}
3726 cat > confinc << 'END'
3728 @echo this is the am__doit target
3731 # If we don't find an include directive, just comment out the code.
3732 AC_MSG_CHECKING([for style of include used by $am_make])
3736 # First try GNU make style include.
3737 echo "include confinc" > confmf
3738 # Ignore all kinds of additional output from `make'.
3739 case `$am_make -s -f confmf 2> /dev/null` in #(
3740 *the\ am__doit\ target*)
3746 # Now try BSD make style include.
3747 if test "$am__include" = "#"; then
3748 echo '.include "confinc"' > confmf
3749 case `$am_make -s -f confmf 2> /dev/null` in #(
3750 *the\ am__doit\ target*)
3751 am__include=.include
3757 AC_SUBST([am__include])
3758 AC_SUBST([am__quote])
3759 AC_MSG_RESULT([$_am_result])
3760 rm -f confinc confmf
3763 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
3764 # Free Software Foundation, Inc.
3766 # This file is free software; the Free Software Foundation
3767 # gives unlimited permission to copy and/or distribute it,
3768 # with or without modifications, as long as this notice is preserved.
3774 # Like AC_PROG_CC_C_O, but changed for automake.
3775 AC_DEFUN([AM_PROG_CC_C_O],
3776 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
3777 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3778 AC_REQUIRE_AUX_FILE([compile])dnl
3779 # FIXME: we rely on the cache variable name because
3780 # there is no other way.
3782 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
3783 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
3784 if test "$am_t" != yes; then
3785 # Losing compiler, so override with the script.
3786 # FIXME: It is wrong to rewrite CC.
3787 # But if we don't then we get into trouble of one sort or another.
3788 # A longer-term fix would be to have automake use am__CC in this case,
3789 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3790 CC="$am_aux_dir/compile $CC"
3792 dnl Make sure AC_PROG_CC is never called again, or it will override our
3794 m4_define([AC_PROG_CC],
3795 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
3798 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
3800 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
3801 # Free Software Foundation, Inc.
3803 # This file is free software; the Free Software Foundation
3804 # gives unlimited permission to copy and/or distribute it,
3805 # with or without modifications, as long as this notice is preserved.
3809 # AM_MISSING_PROG(NAME, PROGRAM)
3810 # ------------------------------
3811 AC_DEFUN([AM_MISSING_PROG],
3812 [AC_REQUIRE([AM_MISSING_HAS_RUN])
3813 $1=${$1-"${am_missing_run}$2"}
3817 # AM_MISSING_HAS_RUN
3818 # ------------------
3819 # Define MISSING if not defined so far and test if it supports --run.
3820 # If it does, set am_missing_run to use it, otherwise, to nothing.
3821 AC_DEFUN([AM_MISSING_HAS_RUN],
3822 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3823 AC_REQUIRE_AUX_FILE([missing])dnl
3824 if test x"${MISSING+set}" != xset; then
3827 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3829 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3832 # Use eval to expand $SHELL
3833 if eval "$MISSING --run true"; then
3834 am_missing_run="$MISSING --run "
3837 AC_MSG_WARN([`missing' script is too old or missing])
3841 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
3844 # This file is free software; the Free Software Foundation
3845 # gives unlimited permission to copy and/or distribute it,
3846 # with or without modifications, as long as this notice is preserved.
3852 # Check for `mkdir -p'.
3853 AC_DEFUN([AM_PROG_MKDIR_P],
3854 [AC_PREREQ([2.60])dnl
3855 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
3856 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
3857 dnl while keeping a definition of mkdir_p for backward compatibility.
3858 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
3859 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
3860 dnl Makefile.ins that do not define MKDIR_P, so we do our own
3861 dnl adjustment using top_builddir (which is defined more often than
3863 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
3865 [[\\/$]]* | ?:[[\\/]]*) ;;
3866 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3870 # Helper functions for option handling. -*- Autoconf -*-
3872 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
3875 # This file is free software; the Free Software Foundation
3876 # gives unlimited permission to copy and/or distribute it,
3877 # with or without modifications, as long as this notice is preserved.
3881 # _AM_MANGLE_OPTION(NAME)
3882 # -----------------------
3883 AC_DEFUN([_AM_MANGLE_OPTION],
3884 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
3886 # _AM_SET_OPTION(NAME)
3887 # --------------------
3888 # Set option NAME. Presently that only means defining a flag for this option.
3889 AC_DEFUN([_AM_SET_OPTION],
3890 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
3892 # _AM_SET_OPTIONS(OPTIONS)
3893 # ------------------------
3894 # OPTIONS is a space-separated list of Automake options.
3895 AC_DEFUN([_AM_SET_OPTIONS],
3896 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
3898 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
3899 # -------------------------------------------
3900 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
3901 AC_DEFUN([_AM_IF_OPTION],
3902 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
3904 # Check to make sure that the build environment is sane. -*- Autoconf -*-
3906 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
3907 # Free Software Foundation, Inc.
3909 # This file is free software; the Free Software Foundation
3910 # gives unlimited permission to copy and/or distribute it,
3911 # with or without modifications, as long as this notice is preserved.
3917 AC_DEFUN([AM_SANITY_CHECK],
3918 [AC_MSG_CHECKING([whether build environment is sane])
3921 echo timestamp > conftest.file
3922 # Reject unsafe characters in $srcdir or the absolute working directory
3923 # name. Accept space and tab only in the latter.
3927 *[[\\\"\#\$\&\'\`$am_lf]]*)
3928 AC_MSG_ERROR([unsafe absolute working directory name]);;
3931 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
3932 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
3935 # Do `set' in a subshell so we don't clobber the current shell's
3936 # arguments. Must try -L first in case configure is actually a
3937 # symlink; some systems play weird games with the mod time of symlinks
3938 # (eg FreeBSD returns the mod time of the symlink's containing
3941 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3942 if test "$[*]" = "X"; then
3944 set X `ls -t "$srcdir/configure" conftest.file`
3947 if test "$[*]" != "X $srcdir/configure conftest.file" \
3948 && test "$[*]" != "X conftest.file $srcdir/configure"; then
3950 # If neither matched, then we have a broken ls. This can happen
3951 # if, for instance, CONFIG_SHELL is bash and it inherits a
3952 # broken ls alias from the environment. This has actually
3953 # happened. Such a system could not be considered "sane".
3954 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
3955 alias in your environment])
3958 test "$[2]" = conftest.file
3964 AC_MSG_ERROR([newly created file is older than distributed files!
3965 Check your system clock])
3967 AC_MSG_RESULT(yes)])
3969 # Copyright (C) 2009, 2011 Free Software Foundation, Inc.
3971 # This file is free software; the Free Software Foundation
3972 # gives unlimited permission to copy and/or distribute it,
3973 # with or without modifications, as long as this notice is preserved.
3977 # AM_SILENT_RULES([DEFAULT])
3978 # --------------------------
3979 # Enable less verbose build rules; with the default set to DEFAULT
3980 # (`yes' being less verbose, `no' or empty being verbose).
3981 AC_DEFUN([AM_SILENT_RULES],
3982 [AC_ARG_ENABLE([silent-rules],
3983 [ --enable-silent-rules less verbose build output (undo: `make V=1')
3984 --disable-silent-rules verbose build output (undo: `make V=0')])
3985 case $enable_silent_rules in
3986 yes) AM_DEFAULT_VERBOSITY=0;;
3987 no) AM_DEFAULT_VERBOSITY=1;;
3988 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
3991 dnl A few `make' implementations (e.g., NonStop OS and NextStep)
3992 dnl do not support nested variable expansions.
3993 dnl See automake bug#9928 and bug#10237.
3994 am_make=${MAKE-make}
3995 AC_CACHE_CHECK([whether $am_make supports nested variables],
3996 [am_cv_make_support_nested_variables],
3997 [if AS_ECHO([['TRUE=$(BAR$(V))
4003 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
4004 am_cv_make_support_nested_variables=yes
4006 am_cv_make_support_nested_variables=no
4008 if test $am_cv_make_support_nested_variables = yes; then
4009 dnl Using `$V' instead of `$(V)' breaks IRIX make.
4011 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4013 AM_V=$AM_DEFAULT_VERBOSITY
4014 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4017 AM_SUBST_NOTMAKE([AM_V])dnl
4018 AC_SUBST([AM_DEFAULT_V])dnl
4019 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
4020 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
4022 AC_SUBST([AM_BACKSLASH])dnl
4023 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
4026 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
4028 # This file is free software; the Free Software Foundation
4029 # gives unlimited permission to copy and/or distribute it,
4030 # with or without modifications, as long as this notice is preserved.
4034 # AM_PROG_INSTALL_STRIP
4035 # ---------------------
4036 # One issue with vendor `install' (even GNU) is that you can't
4037 # specify the program used to strip binaries. This is especially
4038 # annoying in cross-compiling environments, where the build's strip
4039 # is unlikely to handle the host's binaries.
4040 # Fortunately install-sh will honor a STRIPPROG variable, so we
4041 # always use install-sh in `make install-strip', and initialize
4042 # STRIPPROG with the value of the STRIP variable (set by the user).
4043 AC_DEFUN([AM_PROG_INSTALL_STRIP],
4044 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4045 # Installed binaries are usually stripped using `strip' when the user
4046 # run `make install-strip'. However `strip' might not be the right
4047 # tool to use in cross-compilation environments, therefore Automake
4048 # will honor the `STRIP' environment variable to overrule this program.
4049 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
4050 if test "$cross_compiling" != no; then
4051 AC_CHECK_TOOL([STRIP], [strip], :)
4053 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4054 AC_SUBST([INSTALL_STRIP_PROGRAM])])
4056 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
4058 # This file is free software; the Free Software Foundation
4059 # gives unlimited permission to copy and/or distribute it,
4060 # with or without modifications, as long as this notice is preserved.
4064 # _AM_SUBST_NOTMAKE(VARIABLE)
4065 # ---------------------------
4066 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
4067 # This macro is traced by Automake.
4068 AC_DEFUN([_AM_SUBST_NOTMAKE])
4070 # AM_SUBST_NOTMAKE(VARIABLE)
4071 # --------------------------
4072 # Public sister of _AM_SUBST_NOTMAKE.
4073 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
4075 # Check how to create a tarball. -*- Autoconf -*-
4077 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
4079 # This file is free software; the Free Software Foundation
4080 # gives unlimited permission to copy and/or distribute it,
4081 # with or without modifications, as long as this notice is preserved.
4085 # _AM_PROG_TAR(FORMAT)
4086 # --------------------
4087 # Check how to create a tarball in format FORMAT.
4088 # FORMAT should be one of `v7', `ustar', or `pax'.
4090 # Substitute a variable $(am__tar) that is a command
4091 # writing to stdout a FORMAT-tarball containing the directory
4093 # tardir=directory && $(am__tar) > result.tar
4095 # Substitute a variable $(am__untar) that extract such
4096 # a tarball read from stdin.
4097 # $(am__untar) < result.tar
4098 AC_DEFUN([_AM_PROG_TAR],
4099 [# Always define AMTAR for backward compatibility. Yes, it's still used
4100 # in the wild :-( We should find a proper way to deprecate it ...
4101 AC_SUBST([AMTAR], ['$${TAR-tar}'])
4103 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
4104 [m4_case([$1], [ustar],, [pax],,
4105 [m4_fatal([Unknown tar format])])
4106 AC_MSG_CHECKING([how to create a $1 tar archive])
4107 # Loop over all known methods to create a tar archive until one works.
4108 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
4109 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
4110 # Do not fold the above two line into one, because Tru64 sh and
4111 # Solaris sh will not grok spaces in the rhs of `-'.
4112 for _am_tool in $_am_tools
4116 for _am_tar in tar gnutar gtar;
4118 AM_RUN_LOG([$_am_tar --version]) && break
4120 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
4121 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
4122 am__untar="$_am_tar -xf -"
4125 # Must skip GNU tar: if it does not support --format= it doesn't create
4126 # ustar tarball either.
4127 (tar --version) >/dev/null 2>&1 && continue
4128 am__tar='tar chf - "$$tardir"'
4129 am__tar_='tar chf - "$tardir"'
4130 am__untar='tar xf -'
4133 am__tar='pax -L -x $1 -w "$$tardir"'
4134 am__tar_='pax -L -x $1 -w "$tardir"'
4138 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
4139 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
4140 am__untar='cpio -i -H $1 -d'
4149 # If the value was cached, stop now. We just wanted to have am__tar
4150 # and am__untar set.
4151 test -n "${am_cv_prog_tar_$1}" && break
4153 # tar/untar a dummy directory, and stop if the command works
4156 echo GrepMe > conftest.dir/file
4157 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
4159 if test -s conftest.tar; then
4160 AM_RUN_LOG([$am__untar <conftest.tar])
4161 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
4166 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
4167 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
4169 AC_SUBST([am__untar])
4172 m4_include([m4/ax_check_gl.m4])
4173 m4_include([m4/ax_lang_compiler_ms.m4])