1 # generated automatically by aclocal 1.11 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17 [m4_warning([this file was generated for autoconf 2.65.
18 You have another version of autoconf. It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
22 # gettext.m4 serial 60 (gettext-0.17)
23 dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
24 dnl This file is free software; the Free Software Foundation
25 dnl gives unlimited permission to copy and/or distribute it,
26 dnl with or without modifications, as long as this notice is preserved.
28 dnl This file can can be used in projects which are not available under
29 dnl the GNU General Public License or the GNU Library General Public
30 dnl License but which still want to provide support for the GNU gettext
32 dnl Please note that the actual code of the GNU gettext library is covered
33 dnl by the GNU Library General Public License, and the rest of the GNU
34 dnl gettext package package is covered by the GNU General Public License.
35 dnl They are *not* in the public domain.
38 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
39 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
41 dnl Macro to add for using GNU gettext.
43 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
44 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
45 dnl default (if it is not specified or empty) is 'no-libtool'.
46 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
47 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
48 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
49 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
50 dnl depending on --{enable,disable}-{shared,static} and on the presence of
51 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
52 dnl $(top_builddir)/intl/libintl.a will be created.
53 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
54 dnl implementations (in libc or libintl) without the ngettext() function
55 dnl will be ignored. If NEEDSYMBOL is specified and is
56 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
57 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
58 dnl INTLDIR is used to find the intl libraries. If empty,
59 dnl the value `$(top_builddir)/intl/' is used.
61 dnl The result of the configuration is one of three cases:
62 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
64 dnl Catalog format: GNU --> install in $(datadir)
65 dnl Catalog extension: .mo after installation, .gmo in source tree
66 dnl 2) GNU gettext has been found in the system's C library.
67 dnl Catalog format: GNU --> install in $(datadir)
68 dnl Catalog extension: .mo after installation, .gmo in source tree
69 dnl 3) No internationalization, always use English msgid.
70 dnl Catalog format: none
71 dnl Catalog extension: none
72 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
73 dnl The use of .gmo is historical (it was needed to avoid overwriting the
74 dnl GNU format catalogs when building on a platform with an X/Open gettext),
75 dnl but we keep it in order not to force irrelevant filename changes on the
78 AC_DEFUN([AM_GNU_GETTEXT],
80 dnl Argument checking.
81 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
82 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
84 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
85 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
87 define([gt_included_intl],
88 ifelse([$1], [external],
89 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
91 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
93 AM_GNU_GETTEXT_NEED([$2])
95 AC_REQUIRE([AM_PO_SUBDIRS])dnl
96 ifelse(gt_included_intl, yes, [
97 AC_REQUIRE([AM_INTL_SUBDIR])dnl
100 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
101 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
102 AC_REQUIRE([AC_LIB_RPATH])
104 dnl Sometimes libintl requires libiconv, so first search for libiconv.
105 dnl Ideally we would do this search only after the
106 dnl if test "$USE_NLS" = "yes"; then
107 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
108 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
109 dnl the configure script would need to contain the same shell code
110 dnl again, outside any 'if'. There are two solutions:
111 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
112 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
113 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
114 dnl documented, we avoid it.
115 ifelse(gt_included_intl, yes, , [
116 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
119 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
125 ifelse(gt_included_intl, yes, [
126 BUILD_INCLUDED_LIBINTL=no
127 USE_INCLUDED_LIBINTL=no
133 dnl Add a version number to the cache macros.
134 case " $gt_needs " in
135 *" need-formatstring-macros "*) gt_api_version=3 ;;
136 *" need-ngettext "*) gt_api_version=2 ;;
137 *) gt_api_version=1 ;;
139 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
140 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
142 dnl If we use NLS figure out what method
143 if test "$USE_NLS" = "yes"; then
144 gt_use_preinstalled_gnugettext=no
145 ifelse(gt_included_intl, yes, [
146 AC_MSG_CHECKING([whether included gettext is requested])
147 AC_ARG_WITH(included-gettext,
148 [ --with-included-gettext use the GNU gettext library included here],
149 nls_cv_force_use_gnu_gettext=$withval,
150 nls_cv_force_use_gnu_gettext=no)
151 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
153 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
154 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
156 dnl User does not insist on using GNU NLS library. Figure out what
157 dnl to use. If GNU gettext is available we use this. Else we have
158 dnl to fall back to GNU NLS library.
160 if test $gt_api_version -ge 3; then
161 gt_revision_test_code='
162 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
163 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
166 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
170 gt_revision_test_code=
172 if test $gt_api_version -ge 2; then
173 gt_expression_test_code=' + * ngettext ("", "", 0)'
175 gt_expression_test_code=
178 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
179 [AC_TRY_LINK([#include <libintl.h>
180 $gt_revision_test_code
181 extern int _nl_msg_cat_cntr;
182 extern int *_nl_domain_bindings;],
183 [bindtextdomain ("", "");
184 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
185 [eval "$gt_func_gnugettext_libc=yes"],
186 [eval "$gt_func_gnugettext_libc=no"])])
188 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
189 dnl Sometimes libintl requires libiconv, so first search for libiconv.
190 ifelse(gt_included_intl, yes, , [
193 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
194 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
195 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
196 dnl even if libiconv doesn't exist.
197 AC_LIB_LINKFLAGS_BODY([intl])
198 AC_CACHE_CHECK([for GNU gettext in libintl],
199 [$gt_func_gnugettext_libintl],
200 [gt_save_CPPFLAGS="$CPPFLAGS"
201 CPPFLAGS="$CPPFLAGS $INCINTL"
203 LIBS="$LIBS $LIBINTL"
204 dnl Now see whether libintl exists and does not depend on libiconv.
205 AC_TRY_LINK([#include <libintl.h>
206 $gt_revision_test_code
207 extern int _nl_msg_cat_cntr;
212 const char *_nl_expand_alias (const char *);],
213 [bindtextdomain ("", "");
214 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
215 [eval "$gt_func_gnugettext_libintl=yes"],
216 [eval "$gt_func_gnugettext_libintl=no"])
217 dnl Now see whether libintl exists and depends on libiconv.
218 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
219 LIBS="$LIBS $LIBICONV"
220 AC_TRY_LINK([#include <libintl.h>
221 $gt_revision_test_code
222 extern int _nl_msg_cat_cntr;
227 const char *_nl_expand_alias (const char *);],
228 [bindtextdomain ("", "");
229 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
230 [LIBINTL="$LIBINTL $LIBICONV"
231 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
232 eval "$gt_func_gnugettext_libintl=yes"
235 CPPFLAGS="$gt_save_CPPFLAGS"
236 LIBS="$gt_save_LIBS"])
239 dnl If an already present or preinstalled GNU gettext() is found,
240 dnl use it. But if this macro is used in GNU gettext, and GNU
241 dnl gettext is already preinstalled in libintl, we update this
242 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
243 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
244 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
245 && test "$PACKAGE" != gettext-runtime \
246 && test "$PACKAGE" != gettext-tools; }; then
247 gt_use_preinstalled_gnugettext=yes
249 dnl Reset the values set by searching for libintl.
255 ifelse(gt_included_intl, yes, [
256 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
257 dnl GNU gettext is not found in the C library.
258 dnl Fall back on included GNU gettext library.
259 nls_cv_use_gnu_gettext=yes
263 if test "$nls_cv_use_gnu_gettext" = "yes"; then
264 dnl Mark actions used to generate GNU NLS library.
265 BUILD_INCLUDED_LIBINTL=yes
266 USE_INCLUDED_LIBINTL=yes
267 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
268 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
269 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
273 if test "$gt_use_preinstalled_gnugettext" = "yes" \
274 || test "$nls_cv_use_gnu_gettext" = "yes"; then
275 dnl Mark actions to use GNU gettext tools.
280 if test -n "$INTL_MACOSX_LIBS"; then
281 if test "$gt_use_preinstalled_gnugettext" = "yes" \
282 || test "$nls_cv_use_gnu_gettext" = "yes"; then
283 dnl Some extra flags are needed during linking.
284 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
285 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
289 if test "$gt_use_preinstalled_gnugettext" = "yes" \
290 || test "$nls_cv_use_gnu_gettext" = "yes"; then
291 AC_DEFINE(ENABLE_NLS, 1,
292 [Define to 1 if translation of program messages to the user's native language
299 AC_MSG_CHECKING([whether to use NLS])
300 AC_MSG_RESULT([$USE_NLS])
301 if test "$USE_NLS" = "yes"; then
302 AC_MSG_CHECKING([where the gettext function comes from])
303 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
304 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
305 gt_source="external libintl"
310 gt_source="included intl directory"
312 AC_MSG_RESULT([$gt_source])
315 if test "$USE_NLS" = "yes"; then
317 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
318 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
319 AC_MSG_CHECKING([how to link with libintl])
320 AC_MSG_RESULT([$LIBINTL])
321 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
324 dnl For backward compatibility. Some packages may be using this.
325 AC_DEFINE(HAVE_GETTEXT, 1,
326 [Define if the GNU gettext() function is already present or preinstalled.])
327 AC_DEFINE(HAVE_DCGETTEXT, 1,
328 [Define if the GNU dcgettext() function is already present or preinstalled.])
331 dnl We need to process the po/ directory.
335 ifelse(gt_included_intl, yes, [
336 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
337 dnl to 'yes' because some of the testsuite requires it.
338 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
339 BUILD_INCLUDED_LIBINTL=yes
342 dnl Make all variables we use known to autoconf.
343 AC_SUBST(BUILD_INCLUDED_LIBINTL)
344 AC_SUBST(USE_INCLUDED_LIBINTL)
347 dnl For backward compatibility. Some configure.ins may be using this.
351 dnl For backward compatibility. Some Makefiles may be using this.
353 AC_SUBST(DATADIRNAME)
355 dnl For backward compatibility. Some Makefiles may be using this.
359 dnl For backward compatibility. Some Makefiles may be using this.
363 dnl For backward compatibility. Some Makefiles may be using this.
365 if test "$USE_INCLUDED_LIBINTL" = yes; then
366 INTLOBJS="\$(GETTOBJS)"
370 dnl Enable libtool support if the surrounding package wishes it.
371 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
372 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
375 dnl For backward compatibility. Some Makefiles may be using this.
379 dnl Make all documented variables known to autoconf.
386 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
387 m4_define([gt_NEEDS_INIT],
389 m4_divert_text([DEFAULTS], [gt_needs=])
390 m4_define([gt_NEEDS_INIT], [])
394 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
395 AC_DEFUN([AM_GNU_GETTEXT_NEED],
397 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
401 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
402 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
404 # iconv.m4 serial AM6 (gettext-0.17)
405 dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
406 dnl This file is free software; the Free Software Foundation
407 dnl gives unlimited permission to copy and/or distribute it,
408 dnl with or without modifications, as long as this notice is preserved.
410 dnl From Bruno Haible.
412 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
414 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
415 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
416 AC_REQUIRE([AC_LIB_RPATH])
418 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
420 AC_LIB_LINKFLAGS_BODY([iconv])
423 AC_DEFUN([AM_ICONV_LINK],
425 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
426 dnl those with the standalone portable GNU libiconv installed).
427 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
429 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
431 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
433 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
434 dnl because if the user has installed libiconv and not disabled its use
435 dnl via --without-libiconv-prefix, he wants to use it. The first
436 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
437 am_save_CPPFLAGS="$CPPFLAGS"
438 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
440 AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
441 am_cv_func_iconv="no, consider installing GNU libiconv"
443 AC_TRY_LINK([#include <stdlib.h>
445 [iconv_t cd = iconv_open("","");
446 iconv(cd,NULL,NULL,NULL,NULL);
448 am_cv_func_iconv=yes)
449 if test "$am_cv_func_iconv" != yes; then
451 LIBS="$LIBS $LIBICONV"
452 AC_TRY_LINK([#include <stdlib.h>
454 [iconv_t cd = iconv_open("","");
455 iconv(cd,NULL,NULL,NULL,NULL);
458 am_cv_func_iconv=yes)
462 if test "$am_cv_func_iconv" = yes; then
463 AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
464 dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
466 if test $am_cv_lib_iconv = yes; then
467 LIBS="$LIBS $LIBICONV"
474 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
477 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
478 if (cd_utf8_to_88591 != (iconv_t)(-1))
480 static const char input[] = "\342\202\254"; /* EURO SIGN */
482 const char *inptr = input;
483 size_t inbytesleft = strlen (input);
485 size_t outbytesleft = sizeof (buf);
486 size_t res = iconv (cd_utf8_to_88591,
487 (char **) &inptr, &inbytesleft,
488 &outptr, &outbytesleft);
493 #if 0 /* This bug could be worked around by the caller. */
494 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
496 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
497 if (cd_88591_to_utf8 != (iconv_t)(-1))
499 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
501 const char *inptr = input;
502 size_t inbytesleft = strlen (input);
504 size_t outbytesleft = sizeof (buf);
505 size_t res = iconv (cd_88591_to_utf8,
506 (char **) &inptr, &inbytesleft,
507 &outptr, &outbytesleft);
513 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
515 if (/* Try standardized names. */
516 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
517 /* Try IRIX, OSF/1 names. */
518 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
520 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
521 /* Try HP-UX names. */
522 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
525 }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
527 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
528 *) am_cv_func_iconv_works="guessing yes" ;;
532 case "$am_cv_func_iconv_works" in
533 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
534 *) am_func_iconv=yes ;;
537 am_func_iconv=no am_cv_lib_iconv=no
539 if test "$am_func_iconv" = yes; then
540 AC_DEFINE(HAVE_ICONV, 1,
541 [Define if you have the iconv() function and it works.])
543 if test "$am_cv_lib_iconv" = yes; then
544 AC_MSG_CHECKING([how to link with libiconv])
545 AC_MSG_RESULT([$LIBICONV])
547 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
549 CPPFLAGS="$am_save_CPPFLAGS"
560 if test "$am_cv_func_iconv" = yes; then
561 AC_MSG_CHECKING([for iconv declaration])
562 AC_CACHE_VAL(am_cv_proto_iconv, [
570 #if defined(__STDC__) || defined(__cplusplus)
571 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
575 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
576 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);"])
577 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
578 AC_MSG_RESULT([$]{ac_t:-
579 }[$]am_cv_proto_iconv)
580 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
581 [Define as const if the declaration of iconv() needs const.])
585 # intlmacosx.m4 serial 1 (gettext-0.17)
586 dnl Copyright (C) 2004-2007 Free Software Foundation, Inc.
587 dnl This file is free software; the Free Software Foundation
588 dnl gives unlimited permission to copy and/or distribute it,
589 dnl with or without modifications, as long as this notice is preserved.
591 dnl This file can can be used in projects which are not available under
592 dnl the GNU General Public License or the GNU Library General Public
593 dnl License but which still want to provide support for the GNU gettext
595 dnl Please note that the actual code of the GNU gettext library is covered
596 dnl by the GNU Library General Public License, and the rest of the GNU
597 dnl gettext package package is covered by the GNU General Public License.
598 dnl They are *not* in the public domain.
600 dnl Checks for special options needed on MacOS X.
601 dnl Defines INTL_MACOSX_LIBS.
602 AC_DEFUN([gt_INTL_MACOSX],
604 dnl Check for API introduced in MacOS X 10.2.
605 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
606 gt_cv_func_CFPreferencesCopyAppValue,
607 [gt_save_LIBS="$LIBS"
608 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
609 AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
610 [CFPreferencesCopyAppValue(NULL, NULL)],
611 [gt_cv_func_CFPreferencesCopyAppValue=yes],
612 [gt_cv_func_CFPreferencesCopyAppValue=no])
613 LIBS="$gt_save_LIBS"])
614 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
615 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
616 [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
618 dnl Check for API introduced in MacOS X 10.3.
619 AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
620 [gt_save_LIBS="$LIBS"
621 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
622 AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
623 [gt_cv_func_CFLocaleCopyCurrent=yes],
624 [gt_cv_func_CFLocaleCopyCurrent=no])
625 LIBS="$gt_save_LIBS"])
626 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
627 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
628 [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
631 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
632 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
634 AC_SUBST([INTL_MACOSX_LIBS])
637 # lib-link.m4 serial 13 (gettext-0.17)
638 dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
639 dnl This file is free software; the Free Software Foundation
640 dnl gives unlimited permission to copy and/or distribute it,
641 dnl with or without modifications, as long as this notice is preserved.
643 dnl From Bruno Haible.
647 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
648 dnl the libraries corresponding to explicit and implicit dependencies.
649 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
650 dnl augments the CPPFLAGS variable.
651 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
652 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
653 AC_DEFUN([AC_LIB_LINKFLAGS],
655 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
656 AC_REQUIRE([AC_LIB_RPATH])
657 define([Name],[translit([$1],[./-], [___])])
658 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
659 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
660 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
661 AC_LIB_LINKFLAGS_BODY([$1], [$2])
662 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
663 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
664 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
665 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
667 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
668 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
669 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
670 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
671 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
673 AC_SUBST([LTLIB]NAME)
674 AC_SUBST([LIB]NAME[_PREFIX])
675 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
676 dnl results of this search when this library appears as a dependency.
682 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
683 dnl searches for libname and the libraries corresponding to explicit and
684 dnl implicit dependencies, together with the specified include files and
685 dnl the ability to compile and link the specified testcode. If found, it
686 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
687 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
688 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
689 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
690 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
691 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
692 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
694 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
695 AC_REQUIRE([AC_LIB_RPATH])
696 define([Name],[translit([$1],[./-], [___])])
697 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
698 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
700 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
702 AC_LIB_LINKFLAGS_BODY([$1], [$2])
704 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
705 dnl because if the user has installed lib[]Name and not disabled its use
706 dnl via --without-lib[]Name-prefix, he wants to use it.
707 ac_save_CPPFLAGS="$CPPFLAGS"
708 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
710 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
712 LIBS="$LIBS $LIB[]NAME"
713 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
716 if test "$ac_cv_lib[]Name" = yes; then
718 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
719 AC_MSG_CHECKING([how to link with lib[]$1])
720 AC_MSG_RESULT([$LIB[]NAME])
723 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
724 dnl $INC[]NAME either.
725 CPPFLAGS="$ac_save_CPPFLAGS"
730 AC_SUBST([HAVE_LIB]NAME)
732 AC_SUBST([LTLIB]NAME)
733 AC_SUBST([LIB]NAME[_PREFIX])
738 dnl Determine the platform dependent parameters needed to use rpath:
741 dnl acl_hardcode_libdir_flag_spec,
742 dnl acl_hardcode_libdir_separator,
743 dnl acl_hardcode_direct,
744 dnl acl_hardcode_minus_L.
745 AC_DEFUN([AC_LIB_RPATH],
747 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
748 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
749 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
750 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
751 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
752 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
753 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
754 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
755 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
761 acl_libext="$acl_cv_libext"
762 acl_shlibext="$acl_cv_shlibext"
763 acl_libname_spec="$acl_cv_libname_spec"
764 acl_library_names_spec="$acl_cv_library_names_spec"
765 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
766 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
767 acl_hardcode_direct="$acl_cv_hardcode_direct"
768 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
769 dnl Determine whether the user wants rpath handling at all.
771 [ --disable-rpath do not hardcode runtime library paths],
775 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
776 dnl the libraries corresponding to explicit and implicit dependencies.
777 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
778 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
779 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
780 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
782 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
783 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
784 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
785 dnl Autoconf >= 2.61 supports dots in --with options.
786 define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
787 dnl By default, look in $includedir and $libdir.
789 AC_LIB_WITH_FINAL_PREFIX([
790 eval additional_includedir=\"$includedir\"
791 eval additional_libdir=\"$libdir\"
793 AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
794 [ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
795 --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
797 if test "X$withval" = "Xno"; then
800 if test "X$withval" = "X"; then
801 AC_LIB_WITH_FINAL_PREFIX([
802 eval additional_includedir=\"$includedir\"
803 eval additional_libdir=\"$libdir\"
806 additional_includedir="$withval/include"
807 additional_libdir="$withval/$acl_libdirstem"
811 dnl Search the library and its dependencies in $additional_libdir and
812 dnl $LDFLAGS. Using breadth-first-seach.
819 names_already_handled=
820 names_next_round='$1 $2'
821 while test -n "$names_next_round"; do
822 names_this_round="$names_next_round"
824 for name in $names_this_round; do
826 for n in $names_already_handled; do
827 if test "$n" = "$name"; then
832 if test -z "$already_handled"; then
833 names_already_handled="$names_already_handled $name"
834 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
835 dnl or AC_LIB_HAVE_LINKFLAGS call.
836 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
837 eval value=\"\$HAVE_LIB$uppername\"
838 if test -n "$value"; then
839 if test "$value" = yes; then
840 eval value=\"\$LIB$uppername\"
841 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
842 eval value=\"\$LTLIB$uppername\"
843 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
845 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
846 dnl that this library doesn't exist. So just drop it.
850 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
851 dnl and the already constructed $LIBNAME/$LTLIBNAME.
856 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
857 if test -n "$acl_shlibext"; then
858 shrext=".$acl_shlibext" # typically: shrext=.so
862 if test $use_additional = yes; then
863 dir="$additional_libdir"
864 dnl The same code as in the loop below:
865 dnl First look for a shared library.
866 if test -n "$acl_shlibext"; then
867 if test -f "$dir/$libname$shrext"; then
869 found_so="$dir/$libname$shrext"
871 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
873 for f in "$libname$shrext".*; do echo "$f"; done \
874 | sed -e "s,^$libname$shrext\\\\.,," \
875 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
876 | sed 1q ) 2>/dev/null`
877 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
879 found_so="$dir/$libname$shrext.$ver"
882 eval library_names=\"$acl_library_names_spec\"
883 for f in $library_names; do
884 if test -f "$dir/$f"; then
893 dnl Then look for a static library.
894 if test "X$found_dir" = "X"; then
895 if test -f "$dir/$libname.$acl_libext"; then
897 found_a="$dir/$libname.$acl_libext"
900 if test "X$found_dir" != "X"; then
901 if test -f "$dir/$libname.la"; then
902 found_la="$dir/$libname.la"
906 if test "X$found_dir" = "X"; then
907 for x in $LDFLAGS $LTLIB[]NAME; do
908 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
911 dir=`echo "X$x" | sed -e 's/^X-L//'`
912 dnl First look for a shared library.
913 if test -n "$acl_shlibext"; then
914 if test -f "$dir/$libname$shrext"; then
916 found_so="$dir/$libname$shrext"
918 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
920 for f in "$libname$shrext".*; do echo "$f"; done \
921 | sed -e "s,^$libname$shrext\\\\.,," \
922 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
923 | sed 1q ) 2>/dev/null`
924 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
926 found_so="$dir/$libname$shrext.$ver"
929 eval library_names=\"$acl_library_names_spec\"
930 for f in $library_names; do
931 if test -f "$dir/$f"; then
940 dnl Then look for a static library.
941 if test "X$found_dir" = "X"; then
942 if test -f "$dir/$libname.$acl_libext"; then
944 found_a="$dir/$libname.$acl_libext"
947 if test "X$found_dir" != "X"; then
948 if test -f "$dir/$libname.la"; then
949 found_la="$dir/$libname.la"
954 if test "X$found_dir" != "X"; then
959 if test "X$found_dir" != "X"; then
960 dnl Found the library.
961 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
962 if test "X$found_so" != "X"; then
963 dnl Linking with a shared library. We attempt to hardcode its
964 dnl directory into the executable's runpath, unless it's the
965 dnl standard /usr/lib.
966 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
967 dnl No hardcoding is needed.
968 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
970 dnl Use an explicit option to hardcode DIR into the resulting
972 dnl Potentially add DIR to ltrpathdirs.
973 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
975 for x in $ltrpathdirs; do
976 if test "X$x" = "X$found_dir"; then
981 if test -z "$haveit"; then
982 ltrpathdirs="$ltrpathdirs $found_dir"
984 dnl The hardcoding into $LIBNAME is system dependent.
985 if test "$acl_hardcode_direct" = yes; then
986 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
987 dnl resulting binary.
988 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
990 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
991 dnl Use an explicit option to hardcode DIR into the resulting
993 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
994 dnl Potentially add DIR to rpathdirs.
995 dnl The rpathdirs will be appended to $LIBNAME at the end.
997 for x in $rpathdirs; do
998 if test "X$x" = "X$found_dir"; then
1003 if test -z "$haveit"; then
1004 rpathdirs="$rpathdirs $found_dir"
1007 dnl Rely on "-L$found_dir".
1008 dnl But don't add it if it's already contained in the LDFLAGS
1009 dnl or the already constructed $LIBNAME
1011 for x in $LDFLAGS $LIB[]NAME; do
1012 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1013 if test "X$x" = "X-L$found_dir"; then
1018 if test -z "$haveit"; then
1019 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1021 if test "$acl_hardcode_minus_L" != no; then
1022 dnl FIXME: Not sure whether we should use
1023 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1025 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1027 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1028 dnl here, because this doesn't fit in flags passed to the
1029 dnl compiler. So give up. No hardcoding. This affects only
1030 dnl very old systems.
1031 dnl FIXME: Not sure whether we should use
1032 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1034 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1040 if test "X$found_a" != "X"; then
1041 dnl Linking with a static library.
1042 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1044 dnl We shouldn't come here, but anyway it's good to have a
1046 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1049 dnl Assume the include files are nearby.
1050 additional_includedir=
1051 case "$found_dir" in
1052 */$acl_libdirstem | */$acl_libdirstem/)
1053 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1054 LIB[]NAME[]_PREFIX="$basedir"
1055 additional_includedir="$basedir/include"
1058 if test "X$additional_includedir" != "X"; then
1059 dnl Potentially add $additional_includedir to $INCNAME.
1060 dnl But don't add it
1061 dnl 1. if it's the standard /usr/include,
1062 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1063 dnl 3. if it's already present in $CPPFLAGS or the already
1064 dnl constructed $INCNAME,
1065 dnl 4. if it doesn't exist as a directory.
1066 if test "X$additional_includedir" != "X/usr/include"; then
1068 if test "X$additional_includedir" = "X/usr/local/include"; then
1069 if test -n "$GCC"; then
1071 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1075 if test -z "$haveit"; then
1076 for x in $CPPFLAGS $INC[]NAME; do
1077 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1078 if test "X$x" = "X-I$additional_includedir"; then
1083 if test -z "$haveit"; then
1084 if test -d "$additional_includedir"; then
1085 dnl Really add $additional_includedir to $INCNAME.
1086 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1092 dnl Look for dependencies.
1093 if test -n "$found_la"; then
1094 dnl Read the .la file. It defines the variables
1095 dnl dlname, library_names, old_library, dependency_libs, current,
1096 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1097 save_libdir="$libdir"
1099 */* | *\\*) . "$found_la" ;;
1100 *) . "./$found_la" ;;
1102 libdir="$save_libdir"
1103 dnl We use only dependency_libs.
1104 for dep in $dependency_libs; do
1107 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1108 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1109 dnl But don't add it
1110 dnl 1. if it's the standard /usr/lib,
1111 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1112 dnl 3. if it's already present in $LDFLAGS or the already
1113 dnl constructed $LIBNAME,
1114 dnl 4. if it doesn't exist as a directory.
1115 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1117 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1118 if test -n "$GCC"; then
1120 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1124 if test -z "$haveit"; then
1126 for x in $LDFLAGS $LIB[]NAME; do
1127 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1128 if test "X$x" = "X-L$additional_libdir"; then
1133 if test -z "$haveit"; then
1134 if test -d "$additional_libdir"; then
1135 dnl Really add $additional_libdir to $LIBNAME.
1136 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1140 for x in $LDFLAGS $LTLIB[]NAME; do
1141 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1142 if test "X$x" = "X-L$additional_libdir"; then
1147 if test -z "$haveit"; then
1148 if test -d "$additional_libdir"; then
1149 dnl Really add $additional_libdir to $LTLIBNAME.
1150 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1157 dir=`echo "X$dep" | sed -e 's/^X-R//'`
1158 if test "$enable_rpath" != no; then
1159 dnl Potentially add DIR to rpathdirs.
1160 dnl The rpathdirs will be appended to $LIBNAME at the end.
1162 for x in $rpathdirs; do
1163 if test "X$x" = "X$dir"; then
1168 if test -z "$haveit"; then
1169 rpathdirs="$rpathdirs $dir"
1171 dnl Potentially add DIR to ltrpathdirs.
1172 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1174 for x in $ltrpathdirs; do
1175 if test "X$x" = "X$dir"; then
1180 if test -z "$haveit"; then
1181 ltrpathdirs="$ltrpathdirs $dir"
1186 dnl Handle this in the next round.
1187 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1190 dnl Handle this in the next round. Throw away the .la's
1191 dnl directory; it is already contained in a preceding -L
1193 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1196 dnl Most likely an immediate library name.
1197 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1198 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1204 dnl Didn't find the library; assume it is in the system directories
1205 dnl known to the linker and runtime loader. (All the system
1206 dnl directories known to the linker should also be known to the
1207 dnl runtime loader, otherwise the system is severely misconfigured.)
1208 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1209 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1215 if test "X$rpathdirs" != "X"; then
1216 if test -n "$acl_hardcode_libdir_separator"; then
1217 dnl Weird platform: only the last -rpath option counts, the user must
1218 dnl pass all path elements in one option. We can arrange that for a
1219 dnl single library, but not when more than one $LIBNAMEs are used.
1221 for found_dir in $rpathdirs; do
1222 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1224 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1225 acl_save_libdir="$libdir"
1227 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1228 libdir="$acl_save_libdir"
1229 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1231 dnl The -rpath options are cumulative.
1232 for found_dir in $rpathdirs; do
1233 acl_save_libdir="$libdir"
1235 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1236 libdir="$acl_save_libdir"
1237 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1241 if test "X$ltrpathdirs" != "X"; then
1242 dnl When using libtool, the option that works for both libraries and
1243 dnl executables is -R. The -R options are cumulative.
1244 for found_dir in $ltrpathdirs; do
1245 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1250 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1251 dnl unless already present in VAR.
1252 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1253 dnl contains two or three consecutive elements that belong together.
1254 AC_DEFUN([AC_LIB_APPENDTOVAR],
1256 for element in [$2]; do
1259 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1260 if test "X$x" = "X$element"; then
1265 if test -z "$haveit"; then
1266 [$1]="${[$1]}${[$1]:+ }$element"
1271 dnl For those cases where a variable contains several -L and -l options
1272 dnl referring to unknown libraries and directories, this macro determines the
1273 dnl necessary additional linker options for the runtime path.
1274 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1275 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1276 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1277 dnl otherwise linking without libtool is assumed.
1278 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1280 AC_REQUIRE([AC_LIB_RPATH])
1281 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1283 if test "$enable_rpath" != no; then
1284 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1285 dnl Use an explicit option to hardcode directories into the resulting
1290 if test -n "$next"; then
1292 dnl No need to hardcode the standard /usr/lib.
1293 if test "X$dir" != "X/usr/$acl_libdirstem"; then
1294 rpathdirs="$rpathdirs $dir"
1300 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1301 dnl No need to hardcode the standard /usr/lib.
1302 if test "X$dir" != "X/usr/$acl_libdirstem"; then
1303 rpathdirs="$rpathdirs $dir"
1310 if test "X$rpathdirs" != "X"; then
1311 if test -n ""$3""; then
1312 dnl libtool is used for linking. Use -R options.
1313 for dir in $rpathdirs; do
1314 $1="${$1}${$1:+ }-R$dir"
1317 dnl The linker is used for linking directly.
1318 if test -n "$acl_hardcode_libdir_separator"; then
1319 dnl Weird platform: only the last -rpath option counts, the user
1320 dnl must pass all path elements in one option.
1322 for dir in $rpathdirs; do
1323 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1325 acl_save_libdir="$libdir"
1327 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1328 libdir="$acl_save_libdir"
1331 dnl The -rpath options are cumulative.
1332 for dir in $rpathdirs; do
1333 acl_save_libdir="$libdir"
1335 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1336 libdir="$acl_save_libdir"
1337 $1="${$1}${$1:+ }$flag"
1347 # lib-prefix.m4 serial 5 (gettext-0.15)
1348 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
1349 dnl This file is free software; the Free Software Foundation
1350 dnl gives unlimited permission to copy and/or distribute it,
1351 dnl with or without modifications, as long as this notice is preserved.
1353 dnl From Bruno Haible.
1355 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1356 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1357 dnl require excessive bracketing.
1358 ifdef([AC_HELP_STRING],
1359 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1360 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1362 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1363 dnl to access previously installed libraries. The basic assumption is that
1364 dnl a user will want packages to use other packages he previously installed
1365 dnl with the same --prefix option.
1366 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1367 dnl libraries, but is otherwise very convenient.
1368 AC_DEFUN([AC_LIB_PREFIX],
1370 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1371 AC_REQUIRE([AC_PROG_CC])
1372 AC_REQUIRE([AC_CANONICAL_HOST])
1373 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1374 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1375 dnl By default, look in $includedir and $libdir.
1377 AC_LIB_WITH_FINAL_PREFIX([
1378 eval additional_includedir=\"$includedir\"
1379 eval additional_libdir=\"$libdir\"
1381 AC_LIB_ARG_WITH([lib-prefix],
1382 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1383 --without-lib-prefix don't search for libraries in includedir and libdir],
1385 if test "X$withval" = "Xno"; then
1388 if test "X$withval" = "X"; then
1389 AC_LIB_WITH_FINAL_PREFIX([
1390 eval additional_includedir=\"$includedir\"
1391 eval additional_libdir=\"$libdir\"
1394 additional_includedir="$withval/include"
1395 additional_libdir="$withval/$acl_libdirstem"
1399 if test $use_additional = yes; then
1400 dnl Potentially add $additional_includedir to $CPPFLAGS.
1401 dnl But don't add it
1402 dnl 1. if it's the standard /usr/include,
1403 dnl 2. if it's already present in $CPPFLAGS,
1404 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1405 dnl 4. if it doesn't exist as a directory.
1406 if test "X$additional_includedir" != "X/usr/include"; then
1408 for x in $CPPFLAGS; do
1409 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1410 if test "X$x" = "X-I$additional_includedir"; then
1415 if test -z "$haveit"; then
1416 if test "X$additional_includedir" = "X/usr/local/include"; then
1417 if test -n "$GCC"; then
1419 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1423 if test -z "$haveit"; then
1424 if test -d "$additional_includedir"; then
1425 dnl Really add $additional_includedir to $CPPFLAGS.
1426 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1431 dnl Potentially add $additional_libdir to $LDFLAGS.
1432 dnl But don't add it
1433 dnl 1. if it's the standard /usr/lib,
1434 dnl 2. if it's already present in $LDFLAGS,
1435 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1436 dnl 4. if it doesn't exist as a directory.
1437 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1439 for x in $LDFLAGS; do
1440 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1441 if test "X$x" = "X-L$additional_libdir"; then
1446 if test -z "$haveit"; then
1447 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1448 if test -n "$GCC"; then
1450 linux*) haveit=yes;;
1454 if test -z "$haveit"; then
1455 if test -d "$additional_libdir"; then
1456 dnl Really add $additional_libdir to $LDFLAGS.
1457 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1465 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1466 dnl acl_final_exec_prefix, containing the values to which $prefix and
1467 dnl $exec_prefix will expand at the end of the configure script.
1468 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1470 dnl Unfortunately, prefix and exec_prefix get only finally determined
1471 dnl at the end of configure.
1472 if test "X$prefix" = "XNONE"; then
1473 acl_final_prefix="$ac_default_prefix"
1475 acl_final_prefix="$prefix"
1477 if test "X$exec_prefix" = "XNONE"; then
1478 acl_final_exec_prefix='${prefix}'
1480 acl_final_exec_prefix="$exec_prefix"
1482 acl_save_prefix="$prefix"
1483 prefix="$acl_final_prefix"
1484 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1485 prefix="$acl_save_prefix"
1488 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1489 dnl variables prefix and exec_prefix bound to the values they will have
1490 dnl at the end of the configure script.
1491 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1493 acl_save_prefix="$prefix"
1494 prefix="$acl_final_prefix"
1495 acl_save_exec_prefix="$exec_prefix"
1496 exec_prefix="$acl_final_exec_prefix"
1498 exec_prefix="$acl_save_exec_prefix"
1499 prefix="$acl_save_prefix"
1502 dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
1503 dnl the basename of the libdir, either "lib" or "lib64".
1504 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1506 dnl There is no formal standard regarding lib and lib64. The current
1507 dnl practice is that on a system supporting 32-bit and 64-bit instruction
1508 dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
1509 dnl libraries go under $prefix/lib. We determine the compiler's default
1510 dnl mode by looking at the compiler's library search path. If at least
1511 dnl of its elements ends in /lib64 or points to a directory whose absolute
1512 dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
1513 dnl default, namely "lib".
1515 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1516 if test -n "$searchpath"; then
1517 acl_save_IFS="${IFS= }"; IFS=":"
1518 for searchdir in $searchpath; do
1519 if test -d "$searchdir"; then
1520 case "$searchdir" in
1521 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1522 *) searchdir=`cd "$searchdir" && pwd`
1523 case "$searchdir" in
1524 */lib64 ) acl_libdirstem=lib64 ;;
1533 # nls.m4 serial 3 (gettext-0.15)
1534 dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
1535 dnl This file is free software; the Free Software Foundation
1536 dnl gives unlimited permission to copy and/or distribute it,
1537 dnl with or without modifications, as long as this notice is preserved.
1539 dnl This file can can be used in projects which are not available under
1540 dnl the GNU General Public License or the GNU Library General Public
1541 dnl License but which still want to provide support for the GNU gettext
1543 dnl Please note that the actual code of the GNU gettext library is covered
1544 dnl by the GNU Library General Public License, and the rest of the GNU
1545 dnl gettext package package is covered by the GNU General Public License.
1546 dnl They are *not* in the public domain.
1549 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1550 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1556 AC_MSG_CHECKING([whether NLS is requested])
1557 dnl Default is enabled NLS
1559 [ --disable-nls do not use Native Language Support],
1560 USE_NLS=$enableval, USE_NLS=yes)
1561 AC_MSG_RESULT($USE_NLS)
1565 # po.m4 serial 15 (gettext-0.17)
1566 dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
1567 dnl This file is free software; the Free Software Foundation
1568 dnl gives unlimited permission to copy and/or distribute it,
1569 dnl with or without modifications, as long as this notice is preserved.
1571 dnl This file can can be used in projects which are not available under
1572 dnl the GNU General Public License or the GNU Library General Public
1573 dnl License but which still want to provide support for the GNU gettext
1575 dnl Please note that the actual code of the GNU gettext library is covered
1576 dnl by the GNU Library General Public License, and the rest of the GNU
1577 dnl gettext package package is covered by the GNU General Public License.
1578 dnl They are *not* in the public domain.
1581 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1582 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1586 dnl Checks for all prerequisites of the po subdirectory.
1587 AC_DEFUN([AM_PO_SUBDIRS],
1589 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1590 AC_REQUIRE([AC_PROG_INSTALL])dnl
1591 AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
1592 AC_REQUIRE([AM_NLS])dnl
1594 dnl Release version of the gettext macros. This is used to ensure that
1595 dnl the gettext macros and po/Makefile.in.in are in sync.
1596 AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
1598 dnl Perform the following tests also if --disable-nls has been given,
1599 dnl because they are needed for "make dist" to work.
1601 dnl Search for GNU msgfmt in the PATH.
1602 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1603 dnl The second test excludes FreeBSD msgfmt.
1604 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1605 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
1606 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1608 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1610 dnl Test whether it is GNU msgfmt >= 0.15.
1612 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
1613 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
1614 *) MSGFMT_015=$MSGFMT ;;
1617 AC_SUBST([MSGFMT_015])
1619 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
1620 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
1621 *) GMSGFMT_015=$GMSGFMT ;;
1624 AC_SUBST([GMSGFMT_015])
1626 dnl Search for GNU xgettext 0.12 or newer in the PATH.
1627 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1628 dnl The second test excludes FreeBSD xgettext.
1629 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1630 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
1631 (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)],
1633 dnl Remove leftover from FreeBSD xgettext call.
1636 dnl Test whether it is GNU xgettext >= 0.15.
1638 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
1639 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
1640 *) XGETTEXT_015=$XGETTEXT ;;
1643 AC_SUBST([XGETTEXT_015])
1645 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
1646 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
1647 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
1649 dnl Installation directories.
1650 dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
1651 dnl have to define it here, so that it can be used in po/Makefile.
1652 test -n "$localedir" || localedir='${datadir}/locale'
1653 AC_SUBST([localedir])
1655 dnl Support for AM_XGETTEXT_OPTION.
1656 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
1657 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
1659 AC_CONFIG_COMMANDS([po-directories], [[
1660 for ac_file in $CONFIG_FILES; do
1661 # Support "outfile[:infile[:infile...]]"
1663 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1665 # PO directories have a Makefile.in generated from Makefile.in.in.
1666 case "$ac_file" in */Makefile.in)
1667 # Adjust a relative srcdir.
1668 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1669 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1670 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1671 # In autoconf-2.13 it is called $ac_given_srcdir.
1672 # In autoconf-2.50 it is called $srcdir.
1673 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1674 case "$ac_given_srcdir" in
1675 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1676 /*) top_srcdir="$ac_given_srcdir" ;;
1677 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
1679 # Treat a directory as a PO directory if and only if it has a
1680 # POTFILES.in file. This allows packages to have multiple PO
1681 # directories under different names or in different locations.
1682 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
1683 rm -f "$ac_dir/POTFILES"
1684 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
1685 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
1686 POMAKEFILEDEPS="POTFILES.in"
1687 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
1688 # on $ac_dir but don't depend on user-specified configuration
1690 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1691 # The LINGUAS file contains the set of available languages.
1692 if test -n "$OBSOLETE_ALL_LINGUAS"; then
1693 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1695 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1696 # Hide the ALL_LINGUAS assigment from automake < 1.5.
1697 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1698 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
1700 # The set of available languages was given in configure.in.
1701 # Hide the ALL_LINGUAS assigment from automake < 1.5.
1702 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
1705 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
1706 # Compute UPDATEPOFILES
1707 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
1708 # Compute DUMMYPOFILES
1709 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
1711 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
1712 case "$ac_given_srcdir" in
1714 *) srcdirpre='$(srcdir)/' ;;
1720 for lang in $ALL_LINGUAS; do
1721 POFILES="$POFILES $srcdirpre$lang.po"
1722 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1723 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1724 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1726 # CATALOGS depends on both $ac_dir and the user's LINGUAS
1727 # environment variable.
1729 if test -n "$ALL_LINGUAS"; then
1730 for presentlang in $ALL_LINGUAS; do
1732 if test "%UNSET%" != "$LINGUAS"; then
1733 desiredlanguages="$LINGUAS"
1735 desiredlanguages="$ALL_LINGUAS"
1737 for desiredlang in $desiredlanguages; do
1738 # Use the presentlang catalog if desiredlang is
1739 # a. equal to presentlang, or
1740 # b. a variant of presentlang (because in this case,
1741 # presentlang can be used as a fallback for messages
1742 # which are not translated in the desiredlang catalog).
1743 case "$desiredlang" in
1744 "$presentlang"*) useit=yes;;
1747 if test $useit = yes; then
1748 INST_LINGUAS="$INST_LINGUAS $presentlang"
1753 if test -n "$INST_LINGUAS"; then
1754 for lang in $INST_LINGUAS; do
1755 CATALOGS="$CATALOGS $lang.gmo"
1758 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
1759 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"
1760 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
1761 if test -f "$f"; then
1763 *.orig | *.bak | *~) ;;
1764 *) cat "$f" >> "$ac_dir/Makefile" ;;
1772 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
1773 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
1774 # from automake < 1.5.
1775 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
1776 # Capture the value of LINGUAS because we need it to compute CATALOGS.
1777 LINGUAS="${LINGUAS-%UNSET%}"
1781 dnl Postprocesses a Makefile in a directory containing PO files.
1782 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
1784 # When this code is run, in config.status, two variables have already been
1786 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
1787 # - LINGUAS is the value of the environment variable LINGUAS at configure
1791 # Adjust a relative srcdir.
1792 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1793 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1794 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1795 # In autoconf-2.13 it is called $ac_given_srcdir.
1796 # In autoconf-2.50 it is called $srcdir.
1797 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1798 case "$ac_given_srcdir" in
1799 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1800 /*) top_srcdir="$ac_given_srcdir" ;;
1801 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
1804 # Find a way to echo strings without interpreting backslash.
1805 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
1808 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
1809 gt_echo='printf %s\n'
1820 # A sed script that extracts the value of VARIABLE from a Makefile.
1822 # Test if the hold space is empty.
1827 # Yes it was empty. Look if we have the expected variable definition.
1828 /^[ ]*VARIABLE[ ]*=/{
1829 # Seen the first line of the variable definition.
1830 s/^[ ]*VARIABLE[ ]*=//
1835 # Here we are processing a line from the variable definition.
1836 # Remove comment, more precisely replace it with a space.
1838 # See if the line ends in a backslash.
1842 # Print the line, without the trailing backslash.
1845 # There was no trailing backslash. The end of the variable definition is
1846 # reached. Clear the hold space.
1851 # A trailing backslash means that the variable definition continues in the
1852 # next line. Put a nonempty string into the hold space to indicate this.
1859 # Set POTFILES to the value of the Makefile variable POTFILES.
1860 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
1861 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
1862 # Compute POTFILES_DEPS as
1863 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
1865 for file in $POTFILES; do
1866 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
1870 if test -n "$OBSOLETE_ALL_LINGUAS"; then
1871 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1873 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1874 # The LINGUAS file contains the set of available languages.
1875 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1876 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
1878 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
1879 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
1880 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
1882 # Hide the ALL_LINGUAS assigment from automake < 1.5.
1883 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1885 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
1886 # Compute UPDATEPOFILES
1887 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
1888 # Compute DUMMYPOFILES
1889 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
1891 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
1892 # Compute PROPERTIESFILES
1893 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
1894 # Compute CLASSFILES
1895 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
1897 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
1899 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
1900 # Compute RESOURCESDLLFILES
1901 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
1902 case "$ac_given_srcdir" in
1904 *) srcdirpre='$(srcdir)/' ;;
1915 for lang in $ALL_LINGUAS; do
1916 POFILES="$POFILES $srcdirpre$lang.po"
1917 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1918 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1919 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1920 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
1921 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
1922 QMFILES="$QMFILES $srcdirpre$lang.qm"
1923 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
1924 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
1925 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/'`
1926 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
1928 # CATALOGS depends on both $ac_dir and the user's LINGUAS
1929 # environment variable.
1931 if test -n "$ALL_LINGUAS"; then
1932 for presentlang in $ALL_LINGUAS; do
1934 if test "%UNSET%" != "$LINGUAS"; then
1935 desiredlanguages="$LINGUAS"
1937 desiredlanguages="$ALL_LINGUAS"
1939 for desiredlang in $desiredlanguages; do
1940 # Use the presentlang catalog if desiredlang is
1941 # a. equal to presentlang, or
1942 # b. a variant of presentlang (because in this case,
1943 # presentlang can be used as a fallback for messages
1944 # which are not translated in the desiredlang catalog).
1945 case "$desiredlang" in
1946 "$presentlang"*) useit=yes;;
1949 if test $useit = yes; then
1950 INST_LINGUAS="$INST_LINGUAS $presentlang"
1959 if test -n "$INST_LINGUAS"; then
1960 for lang in $INST_LINGUAS; do
1961 CATALOGS="$CATALOGS $lang.gmo"
1962 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
1963 QTCATALOGS="$QTCATALOGS $lang.qm"
1964 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
1965 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
1966 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/'`
1967 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
1971 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"
1972 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
1973 # Add dependencies that cannot be formulated as a simple suffix rule.
1974 for lang in $ALL_LINGUAS; do
1975 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
1976 cat >> "$ac_file.tmp" <<EOF
1977 $frobbedlang.msg: $lang.po
1978 @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
1979 \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
1983 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
1984 # Add dependencies that cannot be formulated as a simple suffix rule.
1985 for lang in $ALL_LINGUAS; do
1986 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/'`
1987 cat >> "$ac_file.tmp" <<EOF
1988 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
1989 @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
1990 \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
1994 if test -n "$POMAKEFILEDEPS"; then
1995 cat >> "$ac_file.tmp" <<EOF
1996 Makefile: $POMAKEFILEDEPS
1999 mv "$ac_file.tmp" "$ac_file"
2002 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
2003 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
2005 XGETTEXT_EXTRA_OPTIONS=
2008 dnl Registers an option to be passed to xgettext in the po subdirectory.
2009 AC_DEFUN([AM_XGETTEXT_OPTION],
2011 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
2012 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
2015 # progtest.m4 serial 4 (gettext-0.14.2)
2016 dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
2017 dnl This file is free software; the Free Software Foundation
2018 dnl gives unlimited permission to copy and/or distribute it,
2019 dnl with or without modifications, as long as this notice is preserved.
2021 dnl This file can can be used in projects which are not available under
2022 dnl the GNU General Public License or the GNU Library General Public
2023 dnl License but which still want to provide support for the GNU gettext
2025 dnl Please note that the actual code of the GNU gettext library is covered
2026 dnl by the GNU Library General Public License, and the rest of the GNU
2027 dnl gettext package package is covered by the GNU General Public License.
2028 dnl They are *not* in the public domain.
2031 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
2035 # Search path for a program which passes the given test.
2037 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2038 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2039 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2041 # Prepare PATH_SEPARATOR.
2042 # The user is always right.
2043 if test "${PATH_SEPARATOR+set}" != set; then
2044 echo "#! /bin/sh" >conf$$.sh
2045 echo "exit 0" >>conf$$.sh
2047 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
2055 # Find out how to test for executable files. Don't use a zero-byte file,
2056 # as systems may use methods other than mode bits to determine executability.
2057 cat >conf$$.file <<_ASEOF
2061 chmod +x conf$$.file
2062 if test -x conf$$.file >/dev/null 2>&1; then
2063 ac_executable_p="test -x"
2065 ac_executable_p="test -f"
2069 # Extract the first word of "$2", so it can be a program name with args.
2070 set dummy $2; ac_word=[$]2
2071 AC_MSG_CHECKING([for $ac_word])
2072 AC_CACHE_VAL(ac_cv_path_$1,
2074 [[\\/]]* | ?:[[\\/]]*)
2075 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2078 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2079 for ac_dir in ifelse([$5], , $PATH, [$5]); do
2081 test -z "$ac_dir" && ac_dir=.
2082 for ac_exec_ext in '' $ac_executable_extensions; do
2083 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2084 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
2086 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
2093 dnl If no 4th arg is given, leave the cache variable unset,
2094 dnl so AC_PATH_PROGS will keep looking.
2095 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2100 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2101 AC_MSG_RESULT([$]$1)
2108 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
2110 # This file is free software; the Free Software Foundation
2111 # gives unlimited permission to copy and/or distribute it,
2112 # with or without modifications, as long as this notice is preserved.
2114 # AM_AUTOMAKE_VERSION(VERSION)
2115 # ----------------------------
2116 # Automake X.Y traces this macro to ensure aclocal.m4 has been
2117 # generated from the m4 files accompanying Automake X.Y.
2118 # (This private macro should not be called outside this file.)
2119 AC_DEFUN([AM_AUTOMAKE_VERSION],
2120 [am__api_version='1.11'
2121 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
2122 dnl require some minimum version. Point them to the right macro.
2123 m4_if([$1], [1.11], [],
2124 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
2127 # _AM_AUTOCONF_VERSION(VERSION)
2128 # -----------------------------
2129 # aclocal traces this macro to find the Autoconf version.
2130 # This is a private macro too. Using m4_define simplifies
2131 # the logic in aclocal, which can simply ignore this definition.
2132 m4_define([_AM_AUTOCONF_VERSION], [])
2134 # AM_SET_CURRENT_AUTOMAKE_VERSION
2135 # -------------------------------
2136 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
2137 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
2138 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
2139 [AM_AUTOMAKE_VERSION([1.11])dnl
2140 m4_ifndef([AC_AUTOCONF_VERSION],
2141 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
2142 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
2144 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
2146 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
2148 # This file is free software; the Free Software Foundation
2149 # gives unlimited permission to copy and/or distribute it,
2150 # with or without modifications, as long as this notice is preserved.
2152 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2153 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
2154 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
2156 # Of course, Automake must honor this variable whenever it calls a
2157 # tool from the auxiliary directory. The problem is that $srcdir (and
2158 # therefore $ac_aux_dir as well) can be either absolute or relative,
2159 # depending on how configure is run. This is pretty annoying, since
2160 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
2161 # source directory, any form will work fine, but in subdirectories a
2162 # relative path needs to be adjusted first.
2164 # $ac_aux_dir/missing
2165 # fails when called from a subdirectory if $ac_aux_dir is relative
2166 # $top_srcdir/$ac_aux_dir/missing
2167 # fails if $ac_aux_dir is absolute,
2168 # fails when called from a subdirectory in a VPATH build with
2169 # a relative $ac_aux_dir
2171 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2172 # are both prefixed by $srcdir. In an in-source build this is usually
2173 # harmless because $srcdir is `.', but things will broke when you
2174 # start a VPATH build or use an absolute $srcdir.
2176 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2177 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
2178 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2179 # and then we would define $MISSING as
2180 # MISSING="\${SHELL} $am_aux_dir/missing"
2181 # This will work as long as MISSING is not called from configure, because
2182 # unfortunately $(top_srcdir) has no meaning in configure.
2183 # However there are other variables, like CC, which are often used in
2184 # configure, and could therefore not use this "fixed" $ac_aux_dir.
2186 # Another solution, used here, is to always expand $ac_aux_dir to an
2187 # absolute PATH. The drawback is that using absolute paths prevent a
2188 # configured tree to be moved without reconfiguration.
2190 AC_DEFUN([AM_AUX_DIR_EXPAND],
2191 [dnl Rely on autoconf to set up CDPATH properly.
2192 AC_PREREQ([2.50])dnl
2193 # expand $ac_aux_dir to an absolute path
2194 am_aux_dir=`cd $ac_aux_dir && pwd`
2197 # AM_CONDITIONAL -*- Autoconf -*-
2199 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
2200 # Free Software Foundation, Inc.
2202 # This file is free software; the Free Software Foundation
2203 # gives unlimited permission to copy and/or distribute it,
2204 # with or without modifications, as long as this notice is preserved.
2208 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
2209 # -------------------------------------
2210 # Define a conditional.
2211 AC_DEFUN([AM_CONDITIONAL],
2213 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
2214 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
2215 AC_SUBST([$1_TRUE])dnl
2216 AC_SUBST([$1_FALSE])dnl
2217 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
2218 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
2219 m4_define([_AM_COND_VALUE_$1], [$2])dnl
2227 AC_CONFIG_COMMANDS_PRE(
2228 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
2229 AC_MSG_ERROR([[conditional "$1" was never defined.
2230 Usually this means the macro was only invoked conditionally.]])
2233 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
2234 # Free Software Foundation, Inc.
2236 # This file is free software; the Free Software Foundation
2237 # gives unlimited permission to copy and/or distribute it,
2238 # with or without modifications, as long as this notice is preserved.
2242 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
2243 # written in clear, in which case automake, when reading aclocal.m4,
2244 # will think it sees a *use*, and therefore will trigger all it's
2245 # C support machinery. Also note that it means that autoscan, seeing
2246 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2249 # _AM_DEPENDENCIES(NAME)
2250 # ----------------------
2251 # See how the compiler implements dependency checking.
2252 # NAME is "CC", "CXX", "GCJ", or "OBJC".
2253 # We try a few techniques and use that to set a single cache variable.
2255 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
2256 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
2257 # dependency, and given that the user is not expected to run this macro,
2258 # just rely on AC_PROG_CC.
2259 AC_DEFUN([_AM_DEPENDENCIES],
2260 [AC_REQUIRE([AM_SET_DEPDIR])dnl
2261 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
2262 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
2263 AC_REQUIRE([AM_DEP_TRACK])dnl
2265 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
2266 [$1], CXX, [depcc="$CXX" am_compiler_list=],
2267 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2268 [$1], UPC, [depcc="$UPC" am_compiler_list=],
2269 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
2270 [depcc="$$1" am_compiler_list=])
2272 AC_CACHE_CHECK([dependency style of $depcc],
2273 [am_cv_$1_dependencies_compiler_type],
2274 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2275 # We make a subdir and do the tests there. Otherwise we can end up
2276 # making bogus files that we don't know about and never remove. For
2277 # instance it was reported that on HP-UX the gcc test will end up
2278 # making a dummy file named `D' -- because `-MD' means `put the output
2281 # Copy depcomp to subdir because otherwise we won't find it if we're
2282 # using a relative directory.
2283 cp "$am_depcomp" conftest.dir
2285 # We will build objects and dependencies in a subdirectory because
2286 # it helps to detect inapplicable dependency modes. For instance
2287 # both Tru64's cc and ICC support -MD to output dependencies as a
2288 # side effect of compilation, but ICC will put the dependencies in
2289 # the current directory while Tru64 will put them in the object
2293 am_cv_$1_dependencies_compiler_type=none
2294 if test "$am_compiler_list" = ""; then
2295 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2299 [case " $depcc " in #(
2300 *\ -arch\ *\ -arch\ *) am__universal=true ;;
2303 [case " $depcc " in #(
2304 *\ -arch\ *\ -arch\ *) am__universal=true ;;
2307 for depmode in $am_compiler_list; do
2308 # Setup a source with many dependencies, because some compilers
2309 # like to wrap large dependency lists on column 80 (with \), and
2310 # we should not choose a depcomp mode which is confused by this.
2312 # We need to recreate these files for each test, as the compiler may
2313 # overwrite some of them when testing with obscure command lines.
2314 # This happens at least with the AIX C compiler.
2316 for i in 1 2 3 4 5 6; do
2317 echo '#include "conftst'$i'.h"' >> sub/conftest.c
2318 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
2319 # Solaris 8's {/usr,}/bin/sh.
2320 touch sub/conftst$i.h
2322 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2324 # We check with `-c' and `-o' for the sake of the "dashmstdout"
2325 # mode. It turns out that the SunPro C++ compiler does not properly
2326 # handle `-M -o', and we need to detect this. Also, some Intel
2327 # versions had trouble with output in subdirs
2328 am__obj=sub/conftest.${OBJEXT-o}
2329 am__minus_obj="-o $am__obj"
2332 # This depmode causes a compiler race in universal mode.
2333 test "$am__universal" = false || continue
2336 # after this tag, mechanisms are not by side-effect, so they'll
2337 # only be used when explicitly requested
2338 if test "x$enable_dependency_tracking" = xyes; then
2344 msvisualcpp | msvcmsys)
2345 # This compiler won't grok `-c -o', but also, the minuso test has
2346 # not run yet. These depmodes are late enough in the game, and
2347 # so weak that their functioning should not be impacted.
2348 am__obj=conftest.${OBJEXT-o}
2353 if depmode=$depmode \
2354 source=sub/conftest.c object=$am__obj \
2355 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2356 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
2357 >/dev/null 2>conftest.err &&
2358 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
2359 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2360 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
2361 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2362 # icc doesn't choke on unknown options, it will just issue warnings
2363 # or remarks (even with -Werror). So we grep stderr for any message
2364 # that says an option was ignored or not supported.
2365 # When given -MP, icc 7.0 and 7.1 complain thusly:
2366 # icc: Command line warning: ignoring option '-M'; no argument required
2367 # The diagnosis changed in icc 8.0:
2368 # icc: Command line remark: option '-MP' not supported
2369 if (grep 'ignoring option' conftest.err ||
2370 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
2371 am_cv_$1_dependencies_compiler_type=$depmode
2380 am_cv_$1_dependencies_compiler_type=none
2383 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2384 AM_CONDITIONAL([am__fastdep$1], [
2385 test "x$enable_dependency_tracking" != xno \
2386 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2392 # Choose a directory name for dependency files.
2393 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
2394 AC_DEFUN([AM_SET_DEPDIR],
2395 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2396 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
2402 AC_DEFUN([AM_DEP_TRACK],
2403 [AC_ARG_ENABLE(dependency-tracking,
2404 [ --disable-dependency-tracking speeds up one-time build
2405 --enable-dependency-tracking do not reject slow dependency extractors])
2406 if test "x$enable_dependency_tracking" != xno; then
2407 am_depcomp="$ac_aux_dir/depcomp"
2410 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
2411 AC_SUBST([AMDEPBACKSLASH])dnl
2412 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
2415 # Generate code to set up dependency tracking. -*- Autoconf -*-
2417 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
2418 # Free Software Foundation, Inc.
2420 # This file is free software; the Free Software Foundation
2421 # gives unlimited permission to copy and/or distribute it,
2422 # with or without modifications, as long as this notice is preserved.
2426 # _AM_OUTPUT_DEPENDENCY_COMMANDS
2427 # ------------------------------
2428 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
2430 # Autoconf 2.62 quotes --file arguments for eval, but not when files
2431 # are listed without --file. Let's play safe and only enable the eval
2432 # if we detect the quoting.
2433 case $CONFIG_FILES in
2434 *\'*) eval set x "$CONFIG_FILES" ;;
2435 *) set x $CONFIG_FILES ;;
2440 # Strip MF so we end up with the name of the file.
2441 mf=`echo "$mf" | sed -e 's/:.*$//'`
2442 # Check whether this is an Automake generated Makefile or not.
2443 # We used to match only the files named `Makefile.in', but
2444 # some people rename them; so instead we look at the file content.
2445 # Grep'ing the first line is not enough: some people post-process
2446 # each Makefile.in and add a new line on top of each file to say so.
2447 # Grep'ing the whole file is not good either: AIX grep has a line
2448 # limit of 2048, but all sed's we know have understand at least 4000.
2449 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
2450 dirpart=`AS_DIRNAME("$mf")`
2454 # Extract the definition of DEPDIR, am__include, and am__quote
2455 # from the Makefile without running `make'.
2456 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
2457 test -z "$DEPDIR" && continue
2458 am__include=`sed -n 's/^am__include = //p' < "$mf"`
2459 test -z "am__include" && continue
2460 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
2461 # When using ansi2knr, U may be empty or an underscore; expand it
2462 U=`sed -n 's/^U = //p' < "$mf"`
2463 # Find all dependency output files, they are included files with
2464 # $(DEPDIR) in their names. We invoke sed twice because it is the
2465 # simplest approach to changing $(DEPDIR) to its actual value in the
2467 for file in `sed -n "
2468 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
2469 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
2470 # Make sure the directory exists.
2471 test -f "$dirpart/$file" && continue
2472 fdir=`AS_DIRNAME(["$file"])`
2473 AS_MKDIR_P([$dirpart/$fdir])
2474 # echo "creating $dirpart/$file"
2475 echo '# dummy' > "$dirpart/$file"
2479 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
2482 # AM_OUTPUT_DEPENDENCY_COMMANDS
2483 # -----------------------------
2484 # This macro should only be invoked once -- use via AC_REQUIRE.
2486 # This code is only required when automatic dependency tracking
2487 # is enabled. FIXME. This creates each `.P' file that we will
2488 # need in order to bootstrap the dependency handling code.
2489 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
2490 [AC_CONFIG_COMMANDS([depfiles],
2491 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
2492 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
2495 # Do all the work for Automake. -*- Autoconf -*-
2497 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2498 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
2500 # This file is free software; the Free Software Foundation
2501 # gives unlimited permission to copy and/or distribute it,
2502 # with or without modifications, as long as this notice is preserved.
2506 # This macro actually does too much. Some checks are only needed if
2507 # your package does certain things. But this isn't really a big deal.
2509 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
2510 # AM_INIT_AUTOMAKE([OPTIONS])
2511 # -----------------------------------------------
2512 # The call with PACKAGE and VERSION arguments is the old style
2513 # call (pre autoconf-2.50), which is being phased out. PACKAGE
2514 # and VERSION should now be passed to AC_INIT and removed from
2515 # the call to AM_INIT_AUTOMAKE.
2516 # We support both call styles for the transition. After
2517 # the next Automake release, Autoconf can make the AC_INIT
2518 # arguments mandatory, and then we can depend on a new Autoconf
2519 # release and drop the old call support.
2520 AC_DEFUN([AM_INIT_AUTOMAKE],
2521 [AC_PREREQ([2.62])dnl
2522 dnl Autoconf wants to disallow AM_ names. We explicitly allow
2523 dnl the ones we care about.
2524 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
2525 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
2526 AC_REQUIRE([AC_PROG_INSTALL])dnl
2527 if test "`cd $srcdir && pwd`" != "`pwd`"; then
2528 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2529 # is not polluted with repeated "-I."
2530 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
2531 # test to see if srcdir already configured
2532 if test -f $srcdir/config.status; then
2533 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
2537 # test whether we have cygpath
2538 if test -z "$CYGPATH_W"; then
2539 if (cygpath --version) >/dev/null 2>/dev/null; then
2540 CYGPATH_W='cygpath -w'
2545 AC_SUBST([CYGPATH_W])
2547 # Define the identity of the package.
2548 dnl Distinguish between old-style and new-style calls.
2550 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
2551 AC_SUBST([PACKAGE], [$1])dnl
2552 AC_SUBST([VERSION], [$2])],
2553 [_AM_SET_OPTIONS([$1])dnl
2554 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
2555 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
2556 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
2557 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
2558 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
2560 _AM_IF_OPTION([no-define],,
2561 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
2562 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
2564 # Some tools Automake needs.
2565 AC_REQUIRE([AM_SANITY_CHECK])dnl
2566 AC_REQUIRE([AC_ARG_PROGRAM])dnl
2567 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
2568 AM_MISSING_PROG(AUTOCONF, autoconf)
2569 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
2570 AM_MISSING_PROG(AUTOHEADER, autoheader)
2571 AM_MISSING_PROG(MAKEINFO, makeinfo)
2572 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2573 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
2574 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
2575 # We need awk for the "check" target. The system "awk" is bad on
2577 AC_REQUIRE([AC_PROG_AWK])dnl
2578 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2579 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2580 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
2581 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
2582 [_AM_PROG_TAR([v7])])])
2583 _AM_IF_OPTION([no-dependencies],,
2584 [AC_PROVIDE_IFELSE([AC_PROG_CC],
2585 [_AM_DEPENDENCIES(CC)],
2586 [define([AC_PROG_CC],
2587 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
2588 AC_PROVIDE_IFELSE([AC_PROG_CXX],
2589 [_AM_DEPENDENCIES(CXX)],
2590 [define([AC_PROG_CXX],
2591 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
2592 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
2593 [_AM_DEPENDENCIES(OBJC)],
2594 [define([AC_PROG_OBJC],
2595 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
2597 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
2598 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
2599 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
2600 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
2601 AC_CONFIG_COMMANDS_PRE(dnl
2602 [m4_provide_if([_AM_COMPILER_EXEEXT],
2603 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
2606 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
2607 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
2608 dnl mangled by Autoconf and run in a shell conditional statement.
2609 m4_define([_AC_COMPILER_EXEEXT],
2610 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
2613 # When config.status generates a header, we must update the stamp-h file.
2614 # This file resides in the same directory as the config header
2615 # that is generated. The stamp files are numbered to have different names.
2617 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
2618 # loop where config.status creates the headers, so we can generate
2619 # our stamp files there.
2620 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
2621 [# Compute $1's index in $config_headers.
2624 for _am_header in $config_headers :; do
2626 $_am_arg | $_am_arg:* )
2629 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
2632 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
2634 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
2636 # This file is free software; the Free Software Foundation
2637 # gives unlimited permission to copy and/or distribute it,
2638 # with or without modifications, as long as this notice is preserved.
2640 # AM_PROG_INSTALL_SH
2641 # ------------------
2642 # Define $install_sh.
2643 AC_DEFUN([AM_PROG_INSTALL_SH],
2644 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2645 if test x"${install_sh}" != xset; then
2648 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2650 install_sh="\${SHELL} $am_aux_dir/install-sh"
2653 AC_SUBST(install_sh)])
2655 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
2657 # This file is free software; the Free Software Foundation
2658 # gives unlimited permission to copy and/or distribute it,
2659 # with or without modifications, as long as this notice is preserved.
2663 # Check whether the underlying file-system supports filenames
2664 # with a leading dot. For instance MS-DOS doesn't.
2665 AC_DEFUN([AM_SET_LEADING_DOT],
2666 [rm -rf .tst 2>/dev/null
2667 mkdir .tst 2>/dev/null
2668 if test -d .tst; then
2673 rmdir .tst 2>/dev/null
2674 AC_SUBST([am__leading_dot])])
2676 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
2679 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
2680 # Free Software Foundation, Inc.
2682 # This file is free software; the Free Software Foundation
2683 # gives unlimited permission to copy and/or distribute it,
2684 # with or without modifications, as long as this notice is preserved.
2688 # AM_MAINTAINER_MODE([DEFAULT-MODE])
2689 # ----------------------------------
2690 # Control maintainer-specific portions of Makefiles.
2691 # Default is to disable them, unless `enable' is passed literally.
2692 # For symmetry, `disable' may be passed as well. Anyway, the user
2693 # can override the default with the --enable/--disable switch.
2694 AC_DEFUN([AM_MAINTAINER_MODE],
2695 [m4_case(m4_default([$1], [disable]),
2696 [enable], [m4_define([am_maintainer_other], [disable])],
2697 [disable], [m4_define([am_maintainer_other], [enable])],
2698 [m4_define([am_maintainer_other], [enable])
2699 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
2700 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
2701 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
2702 AC_ARG_ENABLE([maintainer-mode],
2703 [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
2704 (and sometimes confusing) to the casual installer],
2705 [USE_MAINTAINER_MODE=$enableval],
2706 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
2707 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
2708 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
2709 MAINT=$MAINTAINER_MODE_TRUE
2710 AC_SUBST([MAINT])dnl
2714 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
2716 # Check to see how 'make' treats includes. -*- Autoconf -*-
2718 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
2720 # This file is free software; the Free Software Foundation
2721 # gives unlimited permission to copy and/or distribute it,
2722 # with or without modifications, as long as this notice is preserved.
2728 # Check to see how make treats includes.
2729 AC_DEFUN([AM_MAKE_INCLUDE],
2730 [am_make=${MAKE-make}
2731 cat > confinc << 'END'
2733 @echo this is the am__doit target
2736 # If we don't find an include directive, just comment out the code.
2737 AC_MSG_CHECKING([for style of include used by $am_make])
2741 # First try GNU make style include.
2742 echo "include confinc" > confmf
2743 # Ignore all kinds of additional output from `make'.
2744 case `$am_make -s -f confmf 2> /dev/null` in #(
2745 *the\ am__doit\ target*)
2751 # Now try BSD make style include.
2752 if test "$am__include" = "#"; then
2753 echo '.include "confinc"' > confmf
2754 case `$am_make -s -f confmf 2> /dev/null` in #(
2755 *the\ am__doit\ target*)
2756 am__include=.include
2762 AC_SUBST([am__include])
2763 AC_SUBST([am__quote])
2764 AC_MSG_RESULT([$_am_result])
2765 rm -f confinc confmf
2768 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
2769 # Free Software Foundation, Inc.
2771 # This file is free software; the Free Software Foundation
2772 # gives unlimited permission to copy and/or distribute it,
2773 # with or without modifications, as long as this notice is preserved.
2779 # Like AC_PROG_CC_C_O, but changed for automake.
2780 AC_DEFUN([AM_PROG_CC_C_O],
2781 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
2782 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2783 AC_REQUIRE_AUX_FILE([compile])dnl
2784 # FIXME: we rely on the cache variable name because
2785 # there is no other way.
2787 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
2788 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
2789 if test "$am_t" != yes; then
2790 # Losing compiler, so override with the script.
2791 # FIXME: It is wrong to rewrite CC.
2792 # But if we don't then we get into trouble of one sort or another.
2793 # A longer-term fix would be to have automake use am__CC in this case,
2794 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2795 CC="$am_aux_dir/compile $CC"
2797 dnl Make sure AC_PROG_CC is never called again, or it will override our
2799 m4_define([AC_PROG_CC],
2800 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
2803 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
2805 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
2806 # Free Software Foundation, Inc.
2808 # This file is free software; the Free Software Foundation
2809 # gives unlimited permission to copy and/or distribute it,
2810 # with or without modifications, as long as this notice is preserved.
2814 # AM_MISSING_PROG(NAME, PROGRAM)
2815 # ------------------------------
2816 AC_DEFUN([AM_MISSING_PROG],
2817 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2818 $1=${$1-"${am_missing_run}$2"}
2822 # AM_MISSING_HAS_RUN
2823 # ------------------
2824 # Define MISSING if not defined so far and test if it supports --run.
2825 # If it does, set am_missing_run to use it, otherwise, to nothing.
2826 AC_DEFUN([AM_MISSING_HAS_RUN],
2827 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2828 AC_REQUIRE_AUX_FILE([missing])dnl
2829 if test x"${MISSING+set}" != xset; then
2832 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2834 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2837 # Use eval to expand $SHELL
2838 if eval "$MISSING --run true"; then
2839 am_missing_run="$MISSING --run "
2842 AC_MSG_WARN([`missing' script is too old or missing])
2846 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
2848 # This file is free software; the Free Software Foundation
2849 # gives unlimited permission to copy and/or distribute it,
2850 # with or without modifications, as long as this notice is preserved.
2854 # Check for `mkdir -p'.
2855 AC_DEFUN([AM_PROG_MKDIR_P],
2856 [AC_PREREQ([2.60])dnl
2857 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
2858 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
2859 dnl while keeping a definition of mkdir_p for backward compatibility.
2860 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
2861 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
2862 dnl Makefile.ins that do not define MKDIR_P, so we do our own
2863 dnl adjustment using top_builddir (which is defined more often than
2865 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
2867 [[\\/$]]* | ?:[[\\/]]*) ;;
2868 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2872 # Helper functions for option handling. -*- Autoconf -*-
2874 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
2876 # This file is free software; the Free Software Foundation
2877 # gives unlimited permission to copy and/or distribute it,
2878 # with or without modifications, as long as this notice is preserved.
2882 # _AM_MANGLE_OPTION(NAME)
2883 # -----------------------
2884 AC_DEFUN([_AM_MANGLE_OPTION],
2885 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2887 # _AM_SET_OPTION(NAME)
2888 # ------------------------------
2889 # Set option NAME. Presently that only means defining a flag for this option.
2890 AC_DEFUN([_AM_SET_OPTION],
2891 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
2893 # _AM_SET_OPTIONS(OPTIONS)
2894 # ----------------------------------
2895 # OPTIONS is a space-separated list of Automake options.
2896 AC_DEFUN([_AM_SET_OPTIONS],
2897 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2899 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2900 # -------------------------------------------
2901 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2902 AC_DEFUN([_AM_IF_OPTION],
2903 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2905 # Check to make sure that the build environment is sane. -*- Autoconf -*-
2907 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
2908 # Free Software Foundation, Inc.
2910 # This file is free software; the Free Software Foundation
2911 # gives unlimited permission to copy and/or distribute it,
2912 # with or without modifications, as long as this notice is preserved.
2918 AC_DEFUN([AM_SANITY_CHECK],
2919 [AC_MSG_CHECKING([whether build environment is sane])
2922 echo timestamp > conftest.file
2923 # Reject unsafe characters in $srcdir or the absolute working directory
2924 # name. Accept space and tab only in the latter.
2928 *[[\\\"\#\$\&\'\`$am_lf]]*)
2929 AC_MSG_ERROR([unsafe absolute working directory name]);;
2932 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
2933 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
2936 # Do `set' in a subshell so we don't clobber the current shell's
2937 # arguments. Must try -L first in case configure is actually a
2938 # symlink; some systems play weird games with the mod time of symlinks
2939 # (eg FreeBSD returns the mod time of the symlink's containing
2942 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2943 if test "$[*]" = "X"; then
2945 set X `ls -t "$srcdir/configure" conftest.file`
2948 if test "$[*]" != "X $srcdir/configure conftest.file" \
2949 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2951 # If neither matched, then we have a broken ls. This can happen
2952 # if, for instance, CONFIG_SHELL is bash and it inherits a
2953 # broken ls alias from the environment. This has actually
2954 # happened. Such a system could not be considered "sane".
2955 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2956 alias in your environment])
2959 test "$[2]" = conftest.file
2965 AC_MSG_ERROR([newly created file is older than distributed files!
2966 Check your system clock])
2968 AC_MSG_RESULT(yes)])
2970 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
2972 # This file is free software; the Free Software Foundation
2973 # gives unlimited permission to copy and/or distribute it,
2974 # with or without modifications, as long as this notice is preserved.
2976 # AM_PROG_INSTALL_STRIP
2977 # ---------------------
2978 # One issue with vendor `install' (even GNU) is that you can't
2979 # specify the program used to strip binaries. This is especially
2980 # annoying in cross-compiling environments, where the build's strip
2981 # is unlikely to handle the host's binaries.
2982 # Fortunately install-sh will honor a STRIPPROG variable, so we
2983 # always use install-sh in `make install-strip', and initialize
2984 # STRIPPROG with the value of the STRIP variable (set by the user).
2985 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2986 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2987 # Installed binaries are usually stripped using `strip' when the user
2988 # run `make install-strip'. However `strip' might not be the right
2989 # tool to use in cross-compilation environments, therefore Automake
2990 # will honor the `STRIP' environment variable to overrule this program.
2991 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2992 if test "$cross_compiling" != no; then
2993 AC_CHECK_TOOL([STRIP], [strip], :)
2995 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2996 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2998 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
3000 # This file is free software; the Free Software Foundation
3001 # gives unlimited permission to copy and/or distribute it,
3002 # with or without modifications, as long as this notice is preserved.
3006 # _AM_SUBST_NOTMAKE(VARIABLE)
3007 # ---------------------------
3008 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
3009 # This macro is traced by Automake.
3010 AC_DEFUN([_AM_SUBST_NOTMAKE])
3012 # AM_SUBST_NOTMAKE(VARIABLE)
3013 # ---------------------------
3014 # Public sister of _AM_SUBST_NOTMAKE.
3015 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
3017 # Check how to create a tarball. -*- Autoconf -*-
3019 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
3021 # This file is free software; the Free Software Foundation
3022 # gives unlimited permission to copy and/or distribute it,
3023 # with or without modifications, as long as this notice is preserved.
3027 # _AM_PROG_TAR(FORMAT)
3028 # --------------------
3029 # Check how to create a tarball in format FORMAT.
3030 # FORMAT should be one of `v7', `ustar', or `pax'.
3032 # Substitute a variable $(am__tar) that is a command
3033 # writing to stdout a FORMAT-tarball containing the directory
3035 # tardir=directory && $(am__tar) > result.tar
3037 # Substitute a variable $(am__untar) that extract such
3038 # a tarball read from stdin.
3039 # $(am__untar) < result.tar
3040 AC_DEFUN([_AM_PROG_TAR],
3041 [# Always define AMTAR for backward compatibility.
3042 AM_MISSING_PROG([AMTAR], [tar])
3044 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
3045 [m4_case([$1], [ustar],, [pax],,
3046 [m4_fatal([Unknown tar format])])
3047 AC_MSG_CHECKING([how to create a $1 tar archive])
3048 # Loop over all known methods to create a tar archive until one works.
3049 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
3050 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
3051 # Do not fold the above two line into one, because Tru64 sh and
3052 # Solaris sh will not grok spaces in the rhs of `-'.
3053 for _am_tool in $_am_tools
3057 for _am_tar in tar gnutar gtar;
3059 AM_RUN_LOG([$_am_tar --version]) && break
3061 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
3062 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
3063 am__untar="$_am_tar -xf -"
3066 # Must skip GNU tar: if it does not support --format= it doesn't create
3067 # ustar tarball either.
3068 (tar --version) >/dev/null 2>&1 && continue
3069 am__tar='tar chf - "$$tardir"'
3070 am__tar_='tar chf - "$tardir"'
3071 am__untar='tar xf -'
3074 am__tar='pax -L -x $1 -w "$$tardir"'
3075 am__tar_='pax -L -x $1 -w "$tardir"'
3079 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
3080 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
3081 am__untar='cpio -i -H $1 -d'
3090 # If the value was cached, stop now. We just wanted to have am__tar
3091 # and am__untar set.
3092 test -n "${am_cv_prog_tar_$1}" && break
3094 # tar/untar a dummy directory, and stop if the command works
3097 echo GrepMe > conftest.dir/file
3098 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
3100 if test -s conftest.tar; then
3101 AM_RUN_LOG([$am__untar <conftest.tar])
3102 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
3107 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
3108 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
3110 AC_SUBST([am__untar])
3113 m4_include([m4/docbook.m4])
3114 m4_include([m4/fftw.m4])
3115 m4_include([m4/fortran.m4])
3116 m4_include([m4/giws.m4])
3117 m4_include([m4/hdf5.m4])
3118 m4_include([m4/intel_compiler.m4])
3119 m4_include([m4/java-thirdparty.m4])
3120 m4_include([m4/java.m4])
3121 m4_include([m4/lib-ld.m4])
3122 m4_include([m4/libsmath.m4])
3123 m4_include([m4/libtool.m4])
3124 m4_include([m4/libxml2.m4])
3125 m4_include([m4/ltoptions.m4])
3126 m4_include([m4/ltsugar.m4])
3127 m4_include([m4/ltversion.m4])
3128 m4_include([m4/lt~obsolete.m4])
3129 m4_include([m4/ocaml.m4])
3130 m4_include([m4/pcre.m4])
3131 m4_include([m4/pkg.m4])
3132 m4_include([m4/pvm.m4])
3133 m4_include([m4/relocatable.m4])
3134 m4_include([m4/swig.m4])
3135 m4_include([m4/symlinks.m4])
3136 m4_include([m4/tcltk.m4])
3137 m4_include([m4/umfpack.m4])