1 # generated automatically by aclocal 1.11.1 -*- 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.68],,
17 [m4_warning([this file was generated for autoconf 2.68.
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 # iconv.m4 serial 11 (gettext-0.18.1)
23 dnl Copyright (C) 2000-2002, 2007-2010 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 From Bruno Haible.
30 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
32 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
33 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
34 AC_REQUIRE([AC_LIB_RPATH])
36 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
38 AC_LIB_LINKFLAGS_BODY([iconv])
41 AC_DEFUN([AM_ICONV_LINK],
43 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
44 dnl those with the standalone portable GNU libiconv installed).
45 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
47 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
49 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
51 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
52 dnl because if the user has installed libiconv and not disabled its use
53 dnl via --without-libiconv-prefix, he wants to use it. The first
54 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
55 am_save_CPPFLAGS="$CPPFLAGS"
56 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
58 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
59 am_cv_func_iconv="no, consider installing GNU libiconv"
61 AC_TRY_LINK([#include <stdlib.h>
63 [iconv_t cd = iconv_open("","");
64 iconv(cd,NULL,NULL,NULL,NULL);
66 [am_cv_func_iconv=yes])
67 if test "$am_cv_func_iconv" != yes; then
69 LIBS="$LIBS $LIBICONV"
70 AC_TRY_LINK([#include <stdlib.h>
72 [iconv_t cd = iconv_open("","");
73 iconv(cd,NULL,NULL,NULL,NULL);
76 [am_cv_func_iconv=yes])
80 if test "$am_cv_func_iconv" = yes; then
81 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
82 dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
84 if test $am_cv_lib_iconv = yes; then
85 LIBS="$LIBS $LIBICONV"
92 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
95 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
96 if (cd_utf8_to_88591 != (iconv_t)(-1))
98 static const char input[] = "\342\202\254"; /* EURO SIGN */
100 const char *inptr = input;
101 size_t inbytesleft = strlen (input);
103 size_t outbytesleft = sizeof (buf);
104 size_t res = iconv (cd_utf8_to_88591,
105 (char **) &inptr, &inbytesleft,
106 &outptr, &outbytesleft);
111 /* Test against Solaris 10 bug: Failures are not distinguishable from
112 successful returns. */
114 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
115 if (cd_ascii_to_88591 != (iconv_t)(-1))
117 static const char input[] = "\263";
119 const char *inptr = input;
120 size_t inbytesleft = strlen (input);
122 size_t outbytesleft = sizeof (buf);
123 size_t res = iconv (cd_ascii_to_88591,
124 (char **) &inptr, &inbytesleft,
125 &outptr, &outbytesleft);
130 #if 0 /* This bug could be worked around by the caller. */
131 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
133 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
134 if (cd_88591_to_utf8 != (iconv_t)(-1))
136 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
138 const char *inptr = input;
139 size_t inbytesleft = strlen (input);
141 size_t outbytesleft = sizeof (buf);
142 size_t res = iconv (cd_88591_to_utf8,
143 (char **) &inptr, &inbytesleft,
144 &outptr, &outbytesleft);
150 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
152 if (/* Try standardized names. */
153 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
154 /* Try IRIX, OSF/1 names. */
155 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
157 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
158 /* Try HP-UX names. */
159 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
162 }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
164 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
165 *) am_cv_func_iconv_works="guessing yes" ;;
169 case "$am_cv_func_iconv_works" in
170 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
171 *) am_func_iconv=yes ;;
174 am_func_iconv=no am_cv_lib_iconv=no
176 if test "$am_func_iconv" = yes; then
177 AC_DEFINE([HAVE_ICONV], [1],
178 [Define if you have the iconv() function and it works.])
180 if test "$am_cv_lib_iconv" = yes; then
181 AC_MSG_CHECKING([how to link with libiconv])
182 AC_MSG_RESULT([$LIBICONV])
184 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
186 CPPFLAGS="$am_save_CPPFLAGS"
191 AC_SUBST([LTLIBICONV])
194 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
195 dnl avoid warnings like
196 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
197 dnl This is tricky because of the way 'aclocal' is implemented:
198 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
199 dnl Otherwise aclocal's initial scan pass would miss the macro definition.
200 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
201 dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
203 m4_define([gl_iconv_AC_DEFUN],
204 m4_version_prereq([2.64],
209 gl_iconv_AC_DEFUN([AM_ICONV],
212 if test "$am_cv_func_iconv" = yes; then
213 AC_MSG_CHECKING([for iconv declaration])
214 AC_CACHE_VAL([am_cv_proto_iconv], [
222 #if defined(__STDC__) || defined(__cplusplus)
223 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
227 ], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
228 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);"])
229 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
232 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
233 [Define as const if the declaration of iconv() needs const.])
237 # lib-ld.m4 serial 4 (gettext-0.18)
238 dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
239 dnl This file is free software; the Free Software Foundation
240 dnl gives unlimited permission to copy and/or distribute it,
241 dnl with or without modifications, as long as this notice is preserved.
243 dnl Subroutines of libtool.m4,
244 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
247 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
248 AC_DEFUN([AC_LIB_PROG_LD_GNU],
249 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
250 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
251 case `$LD -v 2>&1 </dev/null` in
252 *GNU* | *'with BFD'*)
253 acl_cv_prog_gnu_ld=yes ;;
255 acl_cv_prog_gnu_ld=no ;;
257 with_gnu_ld=$acl_cv_prog_gnu_ld
260 dnl From libtool-1.4. Sets the variable LD.
261 AC_DEFUN([AC_LIB_PROG_LD],
262 [AC_ARG_WITH([gnu-ld],
263 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
264 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
265 AC_REQUIRE([AC_PROG_CC])dnl
266 AC_REQUIRE([AC_CANONICAL_HOST])dnl
267 # Prepare PATH_SEPARATOR.
268 # The user is always right.
269 if test "${PATH_SEPARATOR+set}" != set; then
270 echo "#! /bin/sh" >conf$$.sh
271 echo "exit 0" >>conf$$.sh
273 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
281 if test "$GCC" = yes; then
282 # Check if gcc -print-prog-name=ld gives a path.
283 AC_MSG_CHECKING([for ld used by GCC])
286 # gcc leaves a trailing carriage return which upsets mingw
287 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
289 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
292 # Accept absolute paths.
293 [[\\/]* | [A-Za-z]:[\\/]*)]
294 [re_direlt='/[^/][^/]*/\.\./']
295 # Canonicalize the path of ld
296 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
297 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
298 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
300 test -z "$LD" && LD="$ac_prog"
303 # If it fails, then pretend we aren't using GCC.
307 # If it is relative, then search for the first ld in PATH.
311 elif test "$with_gnu_ld" = yes; then
312 AC_MSG_CHECKING([for GNU ld])
314 AC_MSG_CHECKING([for non-GNU ld])
316 AC_CACHE_VAL([acl_cv_path_LD],
317 [if test -z "$LD"; then
318 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
319 for ac_dir in $PATH; do
320 test -z "$ac_dir" && ac_dir=.
321 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
322 acl_cv_path_LD="$ac_dir/$ac_prog"
323 # Check to see if the program is GNU ld. I'd rather use --version,
324 # but apparently some GNU ld's only accept -v.
325 # Break only if it was the GNU/non-GNU ld that we prefer.
326 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
327 *GNU* | *'with BFD'*)
328 test "$with_gnu_ld" != no && break ;;
330 test "$with_gnu_ld" != yes && break ;;
336 acl_cv_path_LD="$LD" # Let the user override the test with a path.
339 if test -n "$LD"; then
344 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
348 # lib-link.m4 serial 21 (gettext-0.18)
349 dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
350 dnl This file is free software; the Free Software Foundation
351 dnl gives unlimited permission to copy and/or distribute it,
352 dnl with or without modifications, as long as this notice is preserved.
354 dnl From Bruno Haible.
358 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
359 dnl the libraries corresponding to explicit and implicit dependencies.
360 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
361 dnl augments the CPPFLAGS variable.
362 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
363 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
364 AC_DEFUN([AC_LIB_LINKFLAGS],
366 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
367 AC_REQUIRE([AC_LIB_RPATH])
368 pushdef([Name],[translit([$1],[./-], [___])])
369 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
370 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
371 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
372 AC_LIB_LINKFLAGS_BODY([$1], [$2])
373 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
374 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
375 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
376 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
378 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
379 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
380 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
381 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
382 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
384 AC_SUBST([LTLIB]NAME)
385 AC_SUBST([LIB]NAME[_PREFIX])
386 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
387 dnl results of this search when this library appears as a dependency.
393 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
394 dnl searches for libname and the libraries corresponding to explicit and
395 dnl implicit dependencies, together with the specified include files and
396 dnl the ability to compile and link the specified testcode. The missing-message
397 dnl defaults to 'no' and may contain additional hints for the user.
398 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
399 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
400 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
401 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
402 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
403 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
404 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
406 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
407 AC_REQUIRE([AC_LIB_RPATH])
408 pushdef([Name],[translit([$1],[./-], [___])])
409 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
410 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
412 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
414 AC_LIB_LINKFLAGS_BODY([$1], [$2])
416 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
417 dnl because if the user has installed lib[]Name and not disabled its use
418 dnl via --without-lib[]Name-prefix, he wants to use it.
419 ac_save_CPPFLAGS="$CPPFLAGS"
420 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
422 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
424 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
425 dnl because these -l options might require -L options that are present in
426 dnl LIBS. -l options benefit only from the -L options listed before it.
427 dnl Otherwise, add it to the front of LIBS, because it may be a static
428 dnl library that depends on another static library that is present in LIBS.
429 dnl Static libraries benefit only from the static libraries listed after
431 case " $LIB[]NAME" in
432 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
433 *) LIBS="$LIB[]NAME $LIBS" ;;
435 AC_TRY_LINK([$3], [$4],
436 [ac_cv_lib[]Name=yes],
437 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
440 if test "$ac_cv_lib[]Name" = yes; then
442 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
443 AC_MSG_CHECKING([how to link with lib[]$1])
444 AC_MSG_RESULT([$LIB[]NAME])
447 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
448 dnl $INC[]NAME either.
449 CPPFLAGS="$ac_save_CPPFLAGS"
454 AC_SUBST([HAVE_LIB]NAME)
456 AC_SUBST([LTLIB]NAME)
457 AC_SUBST([LIB]NAME[_PREFIX])
462 dnl Determine the platform dependent parameters needed to use rpath:
465 dnl acl_hardcode_libdir_flag_spec,
466 dnl acl_hardcode_libdir_separator,
467 dnl acl_hardcode_direct,
468 dnl acl_hardcode_minus_L.
469 AC_DEFUN([AC_LIB_RPATH],
471 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
472 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
473 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
474 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
475 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
476 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
477 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
478 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
479 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
485 acl_libext="$acl_cv_libext"
486 acl_shlibext="$acl_cv_shlibext"
487 acl_libname_spec="$acl_cv_libname_spec"
488 acl_library_names_spec="$acl_cv_library_names_spec"
489 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
490 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
491 acl_hardcode_direct="$acl_cv_hardcode_direct"
492 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
493 dnl Determine whether the user wants rpath handling at all.
494 AC_ARG_ENABLE([rpath],
495 [ --disable-rpath do not hardcode runtime library paths],
499 dnl AC_LIB_FROMPACKAGE(name, package)
500 dnl declares that libname comes from the given package. The configure file
501 dnl will then not have a --with-libname-prefix option but a
502 dnl --with-package-prefix option. Several libraries can come from the same
503 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
504 dnl macro call that searches for libname.
505 AC_DEFUN([AC_LIB_FROMPACKAGE],
507 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
508 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
509 define([acl_frompackage_]NAME, [$2])
512 pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
513 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
514 define([acl_libsinpackage_]PACKUP,
515 m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
520 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
521 dnl the libraries corresponding to explicit and implicit dependencies.
522 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
523 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
524 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
525 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
527 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
528 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
529 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
530 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
531 pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
532 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
533 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
534 dnl Autoconf >= 2.61 supports dots in --with options.
535 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
536 dnl By default, look in $includedir and $libdir.
538 AC_LIB_WITH_FINAL_PREFIX([
539 eval additional_includedir=\"$includedir\"
540 eval additional_libdir=\"$libdir\"
542 AC_ARG_WITH(P_A_C_K[-prefix],
543 [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
544 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
546 if test "X$withval" = "Xno"; then
549 if test "X$withval" = "X"; then
550 AC_LIB_WITH_FINAL_PREFIX([
551 eval additional_includedir=\"$includedir\"
552 eval additional_libdir=\"$libdir\"
555 additional_includedir="$withval/include"
556 additional_libdir="$withval/$acl_libdirstem"
557 if test "$acl_libdirstem2" != "$acl_libdirstem" \
558 && ! test -d "$withval/$acl_libdirstem"; then
559 additional_libdir="$withval/$acl_libdirstem2"
564 dnl Search the library and its dependencies in $additional_libdir and
565 dnl $LDFLAGS. Using breadth-first-seach.
570 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
571 dnl computed. So it has to be reset here.
575 names_already_handled=
576 names_next_round='$1 $2'
577 while test -n "$names_next_round"; do
578 names_this_round="$names_next_round"
580 for name in $names_this_round; do
582 for n in $names_already_handled; do
583 if test "$n" = "$name"; then
588 if test -z "$already_handled"; then
589 names_already_handled="$names_already_handled $name"
590 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
591 dnl or AC_LIB_HAVE_LINKFLAGS call.
592 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
593 eval value=\"\$HAVE_LIB$uppername\"
594 if test -n "$value"; then
595 if test "$value" = yes; then
596 eval value=\"\$LIB$uppername\"
597 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
598 eval value=\"\$LTLIB$uppername\"
599 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
601 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
602 dnl that this library doesn't exist. So just drop it.
606 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
607 dnl and the already constructed $LIBNAME/$LTLIBNAME.
612 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
613 if test -n "$acl_shlibext"; then
614 shrext=".$acl_shlibext" # typically: shrext=.so
618 if test $use_additional = yes; then
619 dir="$additional_libdir"
620 dnl The same code as in the loop below:
621 dnl First look for a shared library.
622 if test -n "$acl_shlibext"; then
623 if test -f "$dir/$libname$shrext"; then
625 found_so="$dir/$libname$shrext"
627 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
629 for f in "$libname$shrext".*; do echo "$f"; done \
630 | sed -e "s,^$libname$shrext\\\\.,," \
631 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
632 | sed 1q ) 2>/dev/null`
633 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
635 found_so="$dir/$libname$shrext.$ver"
638 eval library_names=\"$acl_library_names_spec\"
639 for f in $library_names; do
640 if test -f "$dir/$f"; then
649 dnl Then look for a static library.
650 if test "X$found_dir" = "X"; then
651 if test -f "$dir/$libname.$acl_libext"; then
653 found_a="$dir/$libname.$acl_libext"
656 if test "X$found_dir" != "X"; then
657 if test -f "$dir/$libname.la"; then
658 found_la="$dir/$libname.la"
662 if test "X$found_dir" = "X"; then
663 for x in $LDFLAGS $LTLIB[]NAME; do
664 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
667 dir=`echo "X$x" | sed -e 's/^X-L//'`
668 dnl First look for a shared library.
669 if test -n "$acl_shlibext"; then
670 if test -f "$dir/$libname$shrext"; then
672 found_so="$dir/$libname$shrext"
674 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
676 for f in "$libname$shrext".*; do echo "$f"; done \
677 | sed -e "s,^$libname$shrext\\\\.,," \
678 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
679 | sed 1q ) 2>/dev/null`
680 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
682 found_so="$dir/$libname$shrext.$ver"
685 eval library_names=\"$acl_library_names_spec\"
686 for f in $library_names; do
687 if test -f "$dir/$f"; then
696 dnl Then look for a static library.
697 if test "X$found_dir" = "X"; then
698 if test -f "$dir/$libname.$acl_libext"; then
700 found_a="$dir/$libname.$acl_libext"
703 if test "X$found_dir" != "X"; then
704 if test -f "$dir/$libname.la"; then
705 found_la="$dir/$libname.la"
710 if test "X$found_dir" != "X"; then
715 if test "X$found_dir" != "X"; then
716 dnl Found the library.
717 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
718 if test "X$found_so" != "X"; then
719 dnl Linking with a shared library. We attempt to hardcode its
720 dnl directory into the executable's runpath, unless it's the
721 dnl standard /usr/lib.
722 if test "$enable_rpath" = no \
723 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
724 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
725 dnl No hardcoding is needed.
726 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
728 dnl Use an explicit option to hardcode DIR into the resulting
730 dnl Potentially add DIR to ltrpathdirs.
731 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
733 for x in $ltrpathdirs; do
734 if test "X$x" = "X$found_dir"; then
739 if test -z "$haveit"; then
740 ltrpathdirs="$ltrpathdirs $found_dir"
742 dnl The hardcoding into $LIBNAME is system dependent.
743 if test "$acl_hardcode_direct" = yes; then
744 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
745 dnl resulting binary.
746 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
748 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
749 dnl Use an explicit option to hardcode DIR into the resulting
751 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
752 dnl Potentially add DIR to rpathdirs.
753 dnl The rpathdirs will be appended to $LIBNAME at the end.
755 for x in $rpathdirs; do
756 if test "X$x" = "X$found_dir"; then
761 if test -z "$haveit"; then
762 rpathdirs="$rpathdirs $found_dir"
765 dnl Rely on "-L$found_dir".
766 dnl But don't add it if it's already contained in the LDFLAGS
767 dnl or the already constructed $LIBNAME
769 for x in $LDFLAGS $LIB[]NAME; do
770 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
771 if test "X$x" = "X-L$found_dir"; then
776 if test -z "$haveit"; then
777 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
779 if test "$acl_hardcode_minus_L" != no; then
780 dnl FIXME: Not sure whether we should use
781 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
783 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
785 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
786 dnl here, because this doesn't fit in flags passed to the
787 dnl compiler. So give up. No hardcoding. This affects only
788 dnl very old systems.
789 dnl FIXME: Not sure whether we should use
790 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
792 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
798 if test "X$found_a" != "X"; then
799 dnl Linking with a static library.
800 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
802 dnl We shouldn't come here, but anyway it's good to have a
804 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
807 dnl Assume the include files are nearby.
808 additional_includedir=
810 */$acl_libdirstem | */$acl_libdirstem/)
811 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
812 if test "$name" = '$1'; then
813 LIB[]NAME[]_PREFIX="$basedir"
815 additional_includedir="$basedir/include"
817 */$acl_libdirstem2 | */$acl_libdirstem2/)
818 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
819 if test "$name" = '$1'; then
820 LIB[]NAME[]_PREFIX="$basedir"
822 additional_includedir="$basedir/include"
825 if test "X$additional_includedir" != "X"; then
826 dnl Potentially add $additional_includedir to $INCNAME.
828 dnl 1. if it's the standard /usr/include,
829 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
830 dnl 3. if it's already present in $CPPFLAGS or the already
831 dnl constructed $INCNAME,
832 dnl 4. if it doesn't exist as a directory.
833 if test "X$additional_includedir" != "X/usr/include"; then
835 if test "X$additional_includedir" = "X/usr/local/include"; then
836 if test -n "$GCC"; then
838 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
842 if test -z "$haveit"; then
843 for x in $CPPFLAGS $INC[]NAME; do
844 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
845 if test "X$x" = "X-I$additional_includedir"; then
850 if test -z "$haveit"; then
851 if test -d "$additional_includedir"; then
852 dnl Really add $additional_includedir to $INCNAME.
853 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
859 dnl Look for dependencies.
860 if test -n "$found_la"; then
861 dnl Read the .la file. It defines the variables
862 dnl dlname, library_names, old_library, dependency_libs, current,
863 dnl age, revision, installed, dlopen, dlpreopen, libdir.
864 save_libdir="$libdir"
866 */* | *\\*) . "$found_la" ;;
867 *) . "./$found_la" ;;
869 libdir="$save_libdir"
870 dnl We use only dependency_libs.
871 for dep in $dependency_libs; do
874 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
875 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
877 dnl 1. if it's the standard /usr/lib,
878 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
879 dnl 3. if it's already present in $LDFLAGS or the already
880 dnl constructed $LIBNAME,
881 dnl 4. if it doesn't exist as a directory.
882 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
883 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
885 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
886 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
887 if test -n "$GCC"; then
889 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
893 if test -z "$haveit"; then
895 for x in $LDFLAGS $LIB[]NAME; do
896 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
897 if test "X$x" = "X-L$additional_libdir"; then
902 if test -z "$haveit"; then
903 if test -d "$additional_libdir"; then
904 dnl Really add $additional_libdir to $LIBNAME.
905 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
909 for x in $LDFLAGS $LTLIB[]NAME; do
910 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
911 if test "X$x" = "X-L$additional_libdir"; then
916 if test -z "$haveit"; then
917 if test -d "$additional_libdir"; then
918 dnl Really add $additional_libdir to $LTLIBNAME.
919 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
926 dir=`echo "X$dep" | sed -e 's/^X-R//'`
927 if test "$enable_rpath" != no; then
928 dnl Potentially add DIR to rpathdirs.
929 dnl The rpathdirs will be appended to $LIBNAME at the end.
931 for x in $rpathdirs; do
932 if test "X$x" = "X$dir"; then
937 if test -z "$haveit"; then
938 rpathdirs="$rpathdirs $dir"
940 dnl Potentially add DIR to ltrpathdirs.
941 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
943 for x in $ltrpathdirs; do
944 if test "X$x" = "X$dir"; then
949 if test -z "$haveit"; then
950 ltrpathdirs="$ltrpathdirs $dir"
955 dnl Handle this in the next round.
956 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
959 dnl Handle this in the next round. Throw away the .la's
960 dnl directory; it is already contained in a preceding -L
962 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
965 dnl Most likely an immediate library name.
966 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
967 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
973 dnl Didn't find the library; assume it is in the system directories
974 dnl known to the linker and runtime loader. (All the system
975 dnl directories known to the linker should also be known to the
976 dnl runtime loader, otherwise the system is severely misconfigured.)
977 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
978 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
984 if test "X$rpathdirs" != "X"; then
985 if test -n "$acl_hardcode_libdir_separator"; then
986 dnl Weird platform: only the last -rpath option counts, the user must
987 dnl pass all path elements in one option. We can arrange that for a
988 dnl single library, but not when more than one $LIBNAMEs are used.
990 for found_dir in $rpathdirs; do
991 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
993 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
994 acl_save_libdir="$libdir"
996 eval flag=\"$acl_hardcode_libdir_flag_spec\"
997 libdir="$acl_save_libdir"
998 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1000 dnl The -rpath options are cumulative.
1001 for found_dir in $rpathdirs; do
1002 acl_save_libdir="$libdir"
1004 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1005 libdir="$acl_save_libdir"
1006 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1010 if test "X$ltrpathdirs" != "X"; then
1011 dnl When using libtool, the option that works for both libraries and
1012 dnl executables is -R. The -R options are cumulative.
1013 for found_dir in $ltrpathdirs; do
1014 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1024 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1025 dnl unless already present in VAR.
1026 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1027 dnl contains two or three consecutive elements that belong together.
1028 AC_DEFUN([AC_LIB_APPENDTOVAR],
1030 for element in [$2]; do
1033 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1034 if test "X$x" = "X$element"; then
1039 if test -z "$haveit"; then
1040 [$1]="${[$1]}${[$1]:+ }$element"
1045 dnl For those cases where a variable contains several -L and -l options
1046 dnl referring to unknown libraries and directories, this macro determines the
1047 dnl necessary additional linker options for the runtime path.
1048 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1049 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1050 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1051 dnl otherwise linking without libtool is assumed.
1052 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1054 AC_REQUIRE([AC_LIB_RPATH])
1055 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1057 if test "$enable_rpath" != no; then
1058 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1059 dnl Use an explicit option to hardcode directories into the resulting
1064 if test -n "$next"; then
1066 dnl No need to hardcode the standard /usr/lib.
1067 if test "X$dir" != "X/usr/$acl_libdirstem" \
1068 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1069 rpathdirs="$rpathdirs $dir"
1075 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1076 dnl No need to hardcode the standard /usr/lib.
1077 if test "X$dir" != "X/usr/$acl_libdirstem" \
1078 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1079 rpathdirs="$rpathdirs $dir"
1086 if test "X$rpathdirs" != "X"; then
1087 if test -n ""$3""; then
1088 dnl libtool is used for linking. Use -R options.
1089 for dir in $rpathdirs; do
1090 $1="${$1}${$1:+ }-R$dir"
1093 dnl The linker is used for linking directly.
1094 if test -n "$acl_hardcode_libdir_separator"; then
1095 dnl Weird platform: only the last -rpath option counts, the user
1096 dnl must pass all path elements in one option.
1098 for dir in $rpathdirs; do
1099 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1101 acl_save_libdir="$libdir"
1103 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1104 libdir="$acl_save_libdir"
1107 dnl The -rpath options are cumulative.
1108 for dir in $rpathdirs; do
1109 acl_save_libdir="$libdir"
1111 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1112 libdir="$acl_save_libdir"
1113 $1="${$1}${$1:+ }$flag"
1123 # lib-prefix.m4 serial 7 (gettext-0.18)
1124 dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
1125 dnl This file is free software; the Free Software Foundation
1126 dnl gives unlimited permission to copy and/or distribute it,
1127 dnl with or without modifications, as long as this notice is preserved.
1129 dnl From Bruno Haible.
1131 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1132 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1133 dnl require excessive bracketing.
1134 ifdef([AC_HELP_STRING],
1135 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1136 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1138 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1139 dnl to access previously installed libraries. The basic assumption is that
1140 dnl a user will want packages to use other packages he previously installed
1141 dnl with the same --prefix option.
1142 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1143 dnl libraries, but is otherwise very convenient.
1144 AC_DEFUN([AC_LIB_PREFIX],
1146 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1147 AC_REQUIRE([AC_PROG_CC])
1148 AC_REQUIRE([AC_CANONICAL_HOST])
1149 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1150 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1151 dnl By default, look in $includedir and $libdir.
1153 AC_LIB_WITH_FINAL_PREFIX([
1154 eval additional_includedir=\"$includedir\"
1155 eval additional_libdir=\"$libdir\"
1157 AC_LIB_ARG_WITH([lib-prefix],
1158 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1159 --without-lib-prefix don't search for libraries in includedir and libdir],
1161 if test "X$withval" = "Xno"; then
1164 if test "X$withval" = "X"; then
1165 AC_LIB_WITH_FINAL_PREFIX([
1166 eval additional_includedir=\"$includedir\"
1167 eval additional_libdir=\"$libdir\"
1170 additional_includedir="$withval/include"
1171 additional_libdir="$withval/$acl_libdirstem"
1175 if test $use_additional = yes; then
1176 dnl Potentially add $additional_includedir to $CPPFLAGS.
1177 dnl But don't add it
1178 dnl 1. if it's the standard /usr/include,
1179 dnl 2. if it's already present in $CPPFLAGS,
1180 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1181 dnl 4. if it doesn't exist as a directory.
1182 if test "X$additional_includedir" != "X/usr/include"; then
1184 for x in $CPPFLAGS; do
1185 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1186 if test "X$x" = "X-I$additional_includedir"; then
1191 if test -z "$haveit"; then
1192 if test "X$additional_includedir" = "X/usr/local/include"; then
1193 if test -n "$GCC"; then
1195 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1199 if test -z "$haveit"; then
1200 if test -d "$additional_includedir"; then
1201 dnl Really add $additional_includedir to $CPPFLAGS.
1202 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1207 dnl Potentially add $additional_libdir to $LDFLAGS.
1208 dnl But don't add it
1209 dnl 1. if it's the standard /usr/lib,
1210 dnl 2. if it's already present in $LDFLAGS,
1211 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1212 dnl 4. if it doesn't exist as a directory.
1213 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1215 for x in $LDFLAGS; do
1216 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1217 if test "X$x" = "X-L$additional_libdir"; then
1222 if test -z "$haveit"; then
1223 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1224 if test -n "$GCC"; then
1226 linux*) haveit=yes;;
1230 if test -z "$haveit"; then
1231 if test -d "$additional_libdir"; then
1232 dnl Really add $additional_libdir to $LDFLAGS.
1233 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1241 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1242 dnl acl_final_exec_prefix, containing the values to which $prefix and
1243 dnl $exec_prefix will expand at the end of the configure script.
1244 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1246 dnl Unfortunately, prefix and exec_prefix get only finally determined
1247 dnl at the end of configure.
1248 if test "X$prefix" = "XNONE"; then
1249 acl_final_prefix="$ac_default_prefix"
1251 acl_final_prefix="$prefix"
1253 if test "X$exec_prefix" = "XNONE"; then
1254 acl_final_exec_prefix='${prefix}'
1256 acl_final_exec_prefix="$exec_prefix"
1258 acl_save_prefix="$prefix"
1259 prefix="$acl_final_prefix"
1260 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1261 prefix="$acl_save_prefix"
1264 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1265 dnl variables prefix and exec_prefix bound to the values they will have
1266 dnl at the end of the configure script.
1267 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1269 acl_save_prefix="$prefix"
1270 prefix="$acl_final_prefix"
1271 acl_save_exec_prefix="$exec_prefix"
1272 exec_prefix="$acl_final_exec_prefix"
1274 exec_prefix="$acl_save_exec_prefix"
1275 prefix="$acl_save_prefix"
1278 dnl AC_LIB_PREPARE_MULTILIB creates
1279 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1280 dnl "lib" or "lib64" or "lib/64",
1281 dnl - a variable acl_libdirstem2, as a secondary possible value for
1282 dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1284 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1286 dnl There is no formal standard regarding lib and lib64.
1287 dnl On glibc systems, the current practice is that on a system supporting
1288 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1289 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1290 dnl the compiler's default mode by looking at the compiler's library search
1291 dnl path. If at least one of its elements ends in /lib64 or points to a
1292 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1293 dnl Otherwise we use the default, namely "lib".
1294 dnl On Solaris systems, the current practice is that on a system supporting
1295 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1296 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1297 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1298 AC_REQUIRE([AC_CANONICAL_HOST])
1303 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1304 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1305 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1306 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1307 dnl symlink is missing, so we set acl_libdirstem2 too.
1308 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1309 [AC_EGREP_CPP([sixtyfour bits], [
1313 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1315 if test $gl_cv_solaris_64bit = yes; then
1316 acl_libdirstem=lib/64
1318 sparc*) acl_libdirstem2=lib/sparcv9 ;;
1319 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1324 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1325 if test -n "$searchpath"; then
1326 acl_save_IFS="${IFS= }"; IFS=":"
1327 for searchdir in $searchpath; do
1328 if test -d "$searchdir"; then
1329 case "$searchdir" in
1330 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1332 # Better ignore directories of this form. They are misleading.
1334 *) searchdir=`cd "$searchdir" && pwd`
1335 case "$searchdir" in
1336 */lib64 ) acl_libdirstem=lib64 ;;
1345 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1348 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1349 # serial 1 (pkg-config-0.24)
1351 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1353 # This program is free software; you can redistribute it and/or modify
1354 # it under the terms of the GNU General Public License as published by
1355 # the Free Software Foundation; either version 2 of the License, or
1356 # (at your option) any later version.
1358 # This program is distributed in the hope that it will be useful, but
1359 # WITHOUT ANY WARRANTY; without even the implied warranty of
1360 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1361 # General Public License for more details.
1363 # You should have received a copy of the GNU General Public License
1364 # along with this program; if not, write to the Free Software
1365 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1367 # As a special exception to the GNU General Public License, if you
1368 # distribute this file as part of a program that contains a
1369 # configuration script generated by Autoconf, you may include it under
1370 # the same distribution terms that you use for the rest of that program.
1372 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
1373 # ----------------------------------
1374 AC_DEFUN([PKG_PROG_PKG_CONFIG],
1375 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1376 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1377 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1378 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1379 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1381 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1382 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1384 if test -n "$PKG_CONFIG"; then
1385 _pkg_min_version=m4_default([$1], [0.9.0])
1386 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1387 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1388 AC_MSG_RESULT([yes])
1394 ])# PKG_PROG_PKG_CONFIG
1396 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1398 # Check to see whether a particular set of modules exists. Similar
1399 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
1401 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1402 # only at the first occurence in configure.ac, so if the first place
1403 # it's called might be skipped (such as if it is within an "if", you
1404 # have to call PKG_CHECK_EXISTS manually
1405 # --------------------------------------------------------------
1406 AC_DEFUN([PKG_CHECK_EXISTS],
1407 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1408 if test -n "$PKG_CONFIG" && \
1409 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1410 m4_default([$2], [:])
1411 m4_ifvaln([$3], [else
1415 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1416 # ---------------------------------------------
1417 m4_define([_PKG_CONFIG],
1418 [if test -n "$$1"; then
1420 elif test -n "$PKG_CONFIG"; then
1421 PKG_CHECK_EXISTS([$3],
1422 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1429 # _PKG_SHORT_ERRORS_SUPPORTED
1430 # -----------------------------
1431 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1432 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1433 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1434 _pkg_short_errors_supported=yes
1436 _pkg_short_errors_supported=no
1438 ])# _PKG_SHORT_ERRORS_SUPPORTED
1441 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1442 # [ACTION-IF-NOT-FOUND])
1445 # Note that if there is a possibility the first call to
1446 # PKG_CHECK_MODULES might not happen, you should be sure to include an
1447 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1450 # --------------------------------------------------------------
1451 AC_DEFUN([PKG_CHECK_MODULES],
1452 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1453 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1454 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1457 AC_MSG_CHECKING([for $1])
1459 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1460 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
1462 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1463 and $1[]_LIBS to avoid the need to call pkg-config.
1464 See the pkg-config man page for more details.])
1466 if test $pkg_failed = yes; then
1468 _PKG_SHORT_ERRORS_SUPPORTED
1469 if test $_pkg_short_errors_supported = yes; then
1470 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1472 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1474 # Put the nasty error message in config.log where it belongs
1475 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1477 m4_default([$4], [AC_MSG_ERROR(
1478 [Package requirements ($2) were not met:
1482 Consider adjusting the PKG_CONFIG_PATH environment variable if you
1483 installed software in a non-standard prefix.
1487 elif test $pkg_failed = untried; then
1489 m4_default([$4], [AC_MSG_FAILURE(
1490 [The pkg-config script could not be found or is too old. Make sure it
1491 is in your PATH or set the PKG_CONFIG environment variable to the full
1496 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
1499 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1500 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1501 AC_MSG_RESULT([yes])
1504 ])# PKG_CHECK_MODULES
1506 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1508 # This file is free software; the Free Software Foundation
1509 # gives unlimited permission to copy and/or distribute it,
1510 # with or without modifications, as long as this notice is preserved.
1512 # AM_AUTOMAKE_VERSION(VERSION)
1513 # ----------------------------
1514 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1515 # generated from the m4 files accompanying Automake X.Y.
1516 # (This private macro should not be called outside this file.)
1517 AC_DEFUN([AM_AUTOMAKE_VERSION],
1518 [am__api_version='1.11'
1519 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1520 dnl require some minimum version. Point them to the right macro.
1521 m4_if([$1], [1.11.1], [],
1522 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1525 # _AM_AUTOCONF_VERSION(VERSION)
1526 # -----------------------------
1527 # aclocal traces this macro to find the Autoconf version.
1528 # This is a private macro too. Using m4_define simplifies
1529 # the logic in aclocal, which can simply ignore this definition.
1530 m4_define([_AM_AUTOCONF_VERSION], [])
1532 # AM_SET_CURRENT_AUTOMAKE_VERSION
1533 # -------------------------------
1534 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1535 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1536 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1537 [AM_AUTOMAKE_VERSION([1.11.1])dnl
1538 m4_ifndef([AC_AUTOCONF_VERSION],
1539 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1540 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1542 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
1544 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1546 # This file is free software; the Free Software Foundation
1547 # gives unlimited permission to copy and/or distribute it,
1548 # with or without modifications, as long as this notice is preserved.
1550 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1551 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
1552 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
1554 # Of course, Automake must honor this variable whenever it calls a
1555 # tool from the auxiliary directory. The problem is that $srcdir (and
1556 # therefore $ac_aux_dir as well) can be either absolute or relative,
1557 # depending on how configure is run. This is pretty annoying, since
1558 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
1559 # source directory, any form will work fine, but in subdirectories a
1560 # relative path needs to be adjusted first.
1562 # $ac_aux_dir/missing
1563 # fails when called from a subdirectory if $ac_aux_dir is relative
1564 # $top_srcdir/$ac_aux_dir/missing
1565 # fails if $ac_aux_dir is absolute,
1566 # fails when called from a subdirectory in a VPATH build with
1567 # a relative $ac_aux_dir
1569 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1570 # are both prefixed by $srcdir. In an in-source build this is usually
1571 # harmless because $srcdir is `.', but things will broke when you
1572 # start a VPATH build or use an absolute $srcdir.
1574 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1575 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1576 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1577 # and then we would define $MISSING as
1578 # MISSING="\${SHELL} $am_aux_dir/missing"
1579 # This will work as long as MISSING is not called from configure, because
1580 # unfortunately $(top_srcdir) has no meaning in configure.
1581 # However there are other variables, like CC, which are often used in
1582 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1584 # Another solution, used here, is to always expand $ac_aux_dir to an
1585 # absolute PATH. The drawback is that using absolute paths prevent a
1586 # configured tree to be moved without reconfiguration.
1588 AC_DEFUN([AM_AUX_DIR_EXPAND],
1589 [dnl Rely on autoconf to set up CDPATH properly.
1590 AC_PREREQ([2.50])dnl
1591 # expand $ac_aux_dir to an absolute path
1592 am_aux_dir=`cd $ac_aux_dir && pwd`
1595 # AM_CONDITIONAL -*- Autoconf -*-
1597 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
1598 # Free Software Foundation, Inc.
1600 # This file is free software; the Free Software Foundation
1601 # gives unlimited permission to copy and/or distribute it,
1602 # with or without modifications, as long as this notice is preserved.
1606 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1607 # -------------------------------------
1608 # Define a conditional.
1609 AC_DEFUN([AM_CONDITIONAL],
1611 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1612 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1613 AC_SUBST([$1_TRUE])dnl
1614 AC_SUBST([$1_FALSE])dnl
1615 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
1616 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
1617 m4_define([_AM_COND_VALUE_$1], [$2])dnl
1625 AC_CONFIG_COMMANDS_PRE(
1626 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1627 AC_MSG_ERROR([[conditional "$1" was never defined.
1628 Usually this means the macro was only invoked conditionally.]])
1631 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
1632 # Free Software Foundation, Inc.
1634 # This file is free software; the Free Software Foundation
1635 # gives unlimited permission to copy and/or distribute it,
1636 # with or without modifications, as long as this notice is preserved.
1640 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1641 # written in clear, in which case automake, when reading aclocal.m4,
1642 # will think it sees a *use*, and therefore will trigger all it's
1643 # C support machinery. Also note that it means that autoscan, seeing
1644 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1647 # _AM_DEPENDENCIES(NAME)
1648 # ----------------------
1649 # See how the compiler implements dependency checking.
1650 # NAME is "CC", "CXX", "GCJ", or "OBJC".
1651 # We try a few techniques and use that to set a single cache variable.
1653 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1654 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1655 # dependency, and given that the user is not expected to run this macro,
1656 # just rely on AC_PROG_CC.
1657 AC_DEFUN([_AM_DEPENDENCIES],
1658 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1659 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1660 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1661 AC_REQUIRE([AM_DEP_TRACK])dnl
1663 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1664 [$1], CXX, [depcc="$CXX" am_compiler_list=],
1665 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1666 [$1], UPC, [depcc="$UPC" am_compiler_list=],
1667 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1668 [depcc="$$1" am_compiler_list=])
1670 AC_CACHE_CHECK([dependency style of $depcc],
1671 [am_cv_$1_dependencies_compiler_type],
1672 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1673 # We make a subdir and do the tests there. Otherwise we can end up
1674 # making bogus files that we don't know about and never remove. For
1675 # instance it was reported that on HP-UX the gcc test will end up
1676 # making a dummy file named `D' -- because `-MD' means `put the output
1679 # Copy depcomp to subdir because otherwise we won't find it if we're
1680 # using a relative directory.
1681 cp "$am_depcomp" conftest.dir
1683 # We will build objects and dependencies in a subdirectory because
1684 # it helps to detect inapplicable dependency modes. For instance
1685 # both Tru64's cc and ICC support -MD to output dependencies as a
1686 # side effect of compilation, but ICC will put the dependencies in
1687 # the current directory while Tru64 will put them in the object
1691 am_cv_$1_dependencies_compiler_type=none
1692 if test "$am_compiler_list" = ""; then
1693 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1697 [case " $depcc " in #(
1698 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1701 [case " $depcc " in #(
1702 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1705 for depmode in $am_compiler_list; do
1706 # Setup a source with many dependencies, because some compilers
1707 # like to wrap large dependency lists on column 80 (with \), and
1708 # we should not choose a depcomp mode which is confused by this.
1710 # We need to recreate these files for each test, as the compiler may
1711 # overwrite some of them when testing with obscure command lines.
1712 # This happens at least with the AIX C compiler.
1714 for i in 1 2 3 4 5 6; do
1715 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1716 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1717 # Solaris 8's {/usr,}/bin/sh.
1718 touch sub/conftst$i.h
1720 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1722 # We check with `-c' and `-o' for the sake of the "dashmstdout"
1723 # mode. It turns out that the SunPro C++ compiler does not properly
1724 # handle `-M -o', and we need to detect this. Also, some Intel
1725 # versions had trouble with output in subdirs
1726 am__obj=sub/conftest.${OBJEXT-o}
1727 am__minus_obj="-o $am__obj"
1730 # This depmode causes a compiler race in universal mode.
1731 test "$am__universal" = false || continue
1734 # after this tag, mechanisms are not by side-effect, so they'll
1735 # only be used when explicitly requested
1736 if test "x$enable_dependency_tracking" = xyes; then
1742 msvisualcpp | msvcmsys)
1743 # This compiler won't grok `-c -o', but also, the minuso test has
1744 # not run yet. These depmodes are late enough in the game, and
1745 # so weak that their functioning should not be impacted.
1746 am__obj=conftest.${OBJEXT-o}
1751 if depmode=$depmode \
1752 source=sub/conftest.c object=$am__obj \
1753 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1754 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1755 >/dev/null 2>conftest.err &&
1756 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1757 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1758 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1759 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1760 # icc doesn't choke on unknown options, it will just issue warnings
1761 # or remarks (even with -Werror). So we grep stderr for any message
1762 # that says an option was ignored or not supported.
1763 # When given -MP, icc 7.0 and 7.1 complain thusly:
1764 # icc: Command line warning: ignoring option '-M'; no argument required
1765 # The diagnosis changed in icc 8.0:
1766 # icc: Command line remark: option '-MP' not supported
1767 if (grep 'ignoring option' conftest.err ||
1768 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1769 am_cv_$1_dependencies_compiler_type=$depmode
1778 am_cv_$1_dependencies_compiler_type=none
1781 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1782 AM_CONDITIONAL([am__fastdep$1], [
1783 test "x$enable_dependency_tracking" != xno \
1784 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1790 # Choose a directory name for dependency files.
1791 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1792 AC_DEFUN([AM_SET_DEPDIR],
1793 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1794 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1800 AC_DEFUN([AM_DEP_TRACK],
1801 [AC_ARG_ENABLE(dependency-tracking,
1802 [ --disable-dependency-tracking speeds up one-time build
1803 --enable-dependency-tracking do not reject slow dependency extractors])
1804 if test "x$enable_dependency_tracking" != xno; then
1805 am_depcomp="$ac_aux_dir/depcomp"
1808 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1809 AC_SUBST([AMDEPBACKSLASH])dnl
1810 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1813 # Generate code to set up dependency tracking. -*- Autoconf -*-
1815 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1816 # Free Software Foundation, Inc.
1818 # This file is free software; the Free Software Foundation
1819 # gives unlimited permission to copy and/or distribute it,
1820 # with or without modifications, as long as this notice is preserved.
1824 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1825 # ------------------------------
1826 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1828 # Autoconf 2.62 quotes --file arguments for eval, but not when files
1829 # are listed without --file. Let's play safe and only enable the eval
1830 # if we detect the quoting.
1831 case $CONFIG_FILES in
1832 *\'*) eval set x "$CONFIG_FILES" ;;
1833 *) set x $CONFIG_FILES ;;
1838 # Strip MF so we end up with the name of the file.
1839 mf=`echo "$mf" | sed -e 's/:.*$//'`
1840 # Check whether this is an Automake generated Makefile or not.
1841 # We used to match only the files named `Makefile.in', but
1842 # some people rename them; so instead we look at the file content.
1843 # Grep'ing the first line is not enough: some people post-process
1844 # each Makefile.in and add a new line on top of each file to say so.
1845 # Grep'ing the whole file is not good either: AIX grep has a line
1846 # limit of 2048, but all sed's we know have understand at least 4000.
1847 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1848 dirpart=`AS_DIRNAME("$mf")`
1852 # Extract the definition of DEPDIR, am__include, and am__quote
1853 # from the Makefile without running `make'.
1854 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1855 test -z "$DEPDIR" && continue
1856 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1857 test -z "am__include" && continue
1858 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1859 # When using ansi2knr, U may be empty or an underscore; expand it
1860 U=`sed -n 's/^U = //p' < "$mf"`
1861 # Find all dependency output files, they are included files with
1862 # $(DEPDIR) in their names. We invoke sed twice because it is the
1863 # simplest approach to changing $(DEPDIR) to its actual value in the
1865 for file in `sed -n "
1866 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1867 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1868 # Make sure the directory exists.
1869 test -f "$dirpart/$file" && continue
1870 fdir=`AS_DIRNAME(["$file"])`
1871 AS_MKDIR_P([$dirpart/$fdir])
1872 # echo "creating $dirpart/$file"
1873 echo '# dummy' > "$dirpart/$file"
1877 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1880 # AM_OUTPUT_DEPENDENCY_COMMANDS
1881 # -----------------------------
1882 # This macro should only be invoked once -- use via AC_REQUIRE.
1884 # This code is only required when automatic dependency tracking
1885 # is enabled. FIXME. This creates each `.P' file that we will
1886 # need in order to bootstrap the dependency handling code.
1887 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1888 [AC_CONFIG_COMMANDS([depfiles],
1889 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1890 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1893 # Do all the work for Automake. -*- Autoconf -*-
1895 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1896 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1898 # This file is free software; the Free Software Foundation
1899 # gives unlimited permission to copy and/or distribute it,
1900 # with or without modifications, as long as this notice is preserved.
1904 # This macro actually does too much. Some checks are only needed if
1905 # your package does certain things. But this isn't really a big deal.
1907 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1908 # AM_INIT_AUTOMAKE([OPTIONS])
1909 # -----------------------------------------------
1910 # The call with PACKAGE and VERSION arguments is the old style
1911 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1912 # and VERSION should now be passed to AC_INIT and removed from
1913 # the call to AM_INIT_AUTOMAKE.
1914 # We support both call styles for the transition. After
1915 # the next Automake release, Autoconf can make the AC_INIT
1916 # arguments mandatory, and then we can depend on a new Autoconf
1917 # release and drop the old call support.
1918 AC_DEFUN([AM_INIT_AUTOMAKE],
1919 [AC_PREREQ([2.62])dnl
1920 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1921 dnl the ones we care about.
1922 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1923 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1924 AC_REQUIRE([AC_PROG_INSTALL])dnl
1925 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1926 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1927 # is not polluted with repeated "-I."
1928 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1929 # test to see if srcdir already configured
1930 if test -f $srcdir/config.status; then
1931 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1935 # test whether we have cygpath
1936 if test -z "$CYGPATH_W"; then
1937 if (cygpath --version) >/dev/null 2>/dev/null; then
1938 CYGPATH_W='cygpath -w'
1943 AC_SUBST([CYGPATH_W])
1945 # Define the identity of the package.
1946 dnl Distinguish between old-style and new-style calls.
1948 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1949 AC_SUBST([PACKAGE], [$1])dnl
1950 AC_SUBST([VERSION], [$2])],
1951 [_AM_SET_OPTIONS([$1])dnl
1952 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1953 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1954 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1955 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1956 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1958 _AM_IF_OPTION([no-define],,
1959 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1960 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1962 # Some tools Automake needs.
1963 AC_REQUIRE([AM_SANITY_CHECK])dnl
1964 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1965 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1966 AM_MISSING_PROG(AUTOCONF, autoconf)
1967 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1968 AM_MISSING_PROG(AUTOHEADER, autoheader)
1969 AM_MISSING_PROG(MAKEINFO, makeinfo)
1970 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1971 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1972 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1973 # We need awk for the "check" target. The system "awk" is bad on
1975 AC_REQUIRE([AC_PROG_AWK])dnl
1976 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1977 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1978 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1979 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1980 [_AM_PROG_TAR([v7])])])
1981 _AM_IF_OPTION([no-dependencies],,
1982 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1983 [_AM_DEPENDENCIES(CC)],
1984 [define([AC_PROG_CC],
1985 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1986 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1987 [_AM_DEPENDENCIES(CXX)],
1988 [define([AC_PROG_CXX],
1989 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1990 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1991 [_AM_DEPENDENCIES(OBJC)],
1992 [define([AC_PROG_OBJC],
1993 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1995 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1996 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1997 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1998 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1999 AC_CONFIG_COMMANDS_PRE(dnl
2000 [m4_provide_if([_AM_COMPILER_EXEEXT],
2001 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
2004 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
2005 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
2006 dnl mangled by Autoconf and run in a shell conditional statement.
2007 m4_define([_AC_COMPILER_EXEEXT],
2008 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
2011 # When config.status generates a header, we must update the stamp-h file.
2012 # This file resides in the same directory as the config header
2013 # that is generated. The stamp files are numbered to have different names.
2015 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
2016 # loop where config.status creates the headers, so we can generate
2017 # our stamp files there.
2018 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
2019 [# Compute $1's index in $config_headers.
2022 for _am_header in $config_headers :; do
2024 $_am_arg | $_am_arg:* )
2027 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
2030 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
2032 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
2034 # This file is free software; the Free Software Foundation
2035 # gives unlimited permission to copy and/or distribute it,
2036 # with or without modifications, as long as this notice is preserved.
2038 # AM_PROG_INSTALL_SH
2039 # ------------------
2040 # Define $install_sh.
2041 AC_DEFUN([AM_PROG_INSTALL_SH],
2042 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2043 if test x"${install_sh}" != xset; then
2046 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2048 install_sh="\${SHELL} $am_aux_dir/install-sh"
2051 AC_SUBST(install_sh)])
2053 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
2055 # This file is free software; the Free Software Foundation
2056 # gives unlimited permission to copy and/or distribute it,
2057 # with or without modifications, as long as this notice is preserved.
2061 # Check whether the underlying file-system supports filenames
2062 # with a leading dot. For instance MS-DOS doesn't.
2063 AC_DEFUN([AM_SET_LEADING_DOT],
2064 [rm -rf .tst 2>/dev/null
2065 mkdir .tst 2>/dev/null
2066 if test -d .tst; then
2071 rmdir .tst 2>/dev/null
2072 AC_SUBST([am__leading_dot])])
2074 # Check to see how 'make' treats includes. -*- Autoconf -*-
2076 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
2078 # This file is free software; the Free Software Foundation
2079 # gives unlimited permission to copy and/or distribute it,
2080 # with or without modifications, as long as this notice is preserved.
2086 # Check to see how make treats includes.
2087 AC_DEFUN([AM_MAKE_INCLUDE],
2088 [am_make=${MAKE-make}
2089 cat > confinc << 'END'
2091 @echo this is the am__doit target
2094 # If we don't find an include directive, just comment out the code.
2095 AC_MSG_CHECKING([for style of include used by $am_make])
2099 # First try GNU make style include.
2100 echo "include confinc" > confmf
2101 # Ignore all kinds of additional output from `make'.
2102 case `$am_make -s -f confmf 2> /dev/null` in #(
2103 *the\ am__doit\ target*)
2109 # Now try BSD make style include.
2110 if test "$am__include" = "#"; then
2111 echo '.include "confinc"' > confmf
2112 case `$am_make -s -f confmf 2> /dev/null` in #(
2113 *the\ am__doit\ target*)
2114 am__include=.include
2120 AC_SUBST([am__include])
2121 AC_SUBST([am__quote])
2122 AC_MSG_RESULT([$_am_result])
2123 rm -f confinc confmf
2126 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
2128 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
2129 # Free Software Foundation, Inc.
2131 # This file is free software; the Free Software Foundation
2132 # gives unlimited permission to copy and/or distribute it,
2133 # with or without modifications, as long as this notice is preserved.
2137 # AM_MISSING_PROG(NAME, PROGRAM)
2138 # ------------------------------
2139 AC_DEFUN([AM_MISSING_PROG],
2140 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2141 $1=${$1-"${am_missing_run}$2"}
2145 # AM_MISSING_HAS_RUN
2146 # ------------------
2147 # Define MISSING if not defined so far and test if it supports --run.
2148 # If it does, set am_missing_run to use it, otherwise, to nothing.
2149 AC_DEFUN([AM_MISSING_HAS_RUN],
2150 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2151 AC_REQUIRE_AUX_FILE([missing])dnl
2152 if test x"${MISSING+set}" != xset; then
2155 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2157 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2160 # Use eval to expand $SHELL
2161 if eval "$MISSING --run true"; then
2162 am_missing_run="$MISSING --run "
2165 AC_MSG_WARN([`missing' script is too old or missing])
2169 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
2171 # This file is free software; the Free Software Foundation
2172 # gives unlimited permission to copy and/or distribute it,
2173 # with or without modifications, as long as this notice is preserved.
2177 # Check for `mkdir -p'.
2178 AC_DEFUN([AM_PROG_MKDIR_P],
2179 [AC_PREREQ([2.60])dnl
2180 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
2181 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
2182 dnl while keeping a definition of mkdir_p for backward compatibility.
2183 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
2184 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
2185 dnl Makefile.ins that do not define MKDIR_P, so we do our own
2186 dnl adjustment using top_builddir (which is defined more often than
2188 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
2190 [[\\/$]]* | ?:[[\\/]]*) ;;
2191 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2195 # Helper functions for option handling. -*- Autoconf -*-
2197 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
2199 # This file is free software; the Free Software Foundation
2200 # gives unlimited permission to copy and/or distribute it,
2201 # with or without modifications, as long as this notice is preserved.
2205 # _AM_MANGLE_OPTION(NAME)
2206 # -----------------------
2207 AC_DEFUN([_AM_MANGLE_OPTION],
2208 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2210 # _AM_SET_OPTION(NAME)
2211 # ------------------------------
2212 # Set option NAME. Presently that only means defining a flag for this option.
2213 AC_DEFUN([_AM_SET_OPTION],
2214 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
2216 # _AM_SET_OPTIONS(OPTIONS)
2217 # ----------------------------------
2218 # OPTIONS is a space-separated list of Automake options.
2219 AC_DEFUN([_AM_SET_OPTIONS],
2220 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2222 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2223 # -------------------------------------------
2224 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2225 AC_DEFUN([_AM_IF_OPTION],
2226 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2228 # Check to make sure that the build environment is sane. -*- Autoconf -*-
2230 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
2231 # Free Software Foundation, Inc.
2233 # This file is free software; the Free Software Foundation
2234 # gives unlimited permission to copy and/or distribute it,
2235 # with or without modifications, as long as this notice is preserved.
2241 AC_DEFUN([AM_SANITY_CHECK],
2242 [AC_MSG_CHECKING([whether build environment is sane])
2245 echo timestamp > conftest.file
2246 # Reject unsafe characters in $srcdir or the absolute working directory
2247 # name. Accept space and tab only in the latter.
2251 *[[\\\"\#\$\&\'\`$am_lf]]*)
2252 AC_MSG_ERROR([unsafe absolute working directory name]);;
2255 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
2256 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
2259 # Do `set' in a subshell so we don't clobber the current shell's
2260 # arguments. Must try -L first in case configure is actually a
2261 # symlink; some systems play weird games with the mod time of symlinks
2262 # (eg FreeBSD returns the mod time of the symlink's containing
2265 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2266 if test "$[*]" = "X"; then
2268 set X `ls -t "$srcdir/configure" conftest.file`
2271 if test "$[*]" != "X $srcdir/configure conftest.file" \
2272 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2274 # If neither matched, then we have a broken ls. This can happen
2275 # if, for instance, CONFIG_SHELL is bash and it inherits a
2276 # broken ls alias from the environment. This has actually
2277 # happened. Such a system could not be considered "sane".
2278 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2279 alias in your environment])
2282 test "$[2]" = conftest.file
2288 AC_MSG_ERROR([newly created file is older than distributed files!
2289 Check your system clock])
2291 AC_MSG_RESULT(yes)])
2293 # Copyright (C) 2009 Free Software Foundation, Inc.
2295 # This file is free software; the Free Software Foundation
2296 # gives unlimited permission to copy and/or distribute it,
2297 # with or without modifications, as long as this notice is preserved.
2301 # AM_SILENT_RULES([DEFAULT])
2302 # --------------------------
2303 # Enable less verbose build rules; with the default set to DEFAULT
2304 # (`yes' being less verbose, `no' or empty being verbose).
2305 AC_DEFUN([AM_SILENT_RULES],
2306 [AC_ARG_ENABLE([silent-rules],
2307 [ --enable-silent-rules less verbose build output (undo: `make V=1')
2308 --disable-silent-rules verbose build output (undo: `make V=0')])
2309 case $enable_silent_rules in
2310 yes) AM_DEFAULT_VERBOSITY=0;;
2311 no) AM_DEFAULT_VERBOSITY=1;;
2312 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2314 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2316 AC_SUBST([AM_BACKSLASH])dnl
2317 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2320 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
2322 # This file is free software; the Free Software Foundation
2323 # gives unlimited permission to copy and/or distribute it,
2324 # with or without modifications, as long as this notice is preserved.
2326 # AM_PROG_INSTALL_STRIP
2327 # ---------------------
2328 # One issue with vendor `install' (even GNU) is that you can't
2329 # specify the program used to strip binaries. This is especially
2330 # annoying in cross-compiling environments, where the build's strip
2331 # is unlikely to handle the host's binaries.
2332 # Fortunately install-sh will honor a STRIPPROG variable, so we
2333 # always use install-sh in `make install-strip', and initialize
2334 # STRIPPROG with the value of the STRIP variable (set by the user).
2335 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2336 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2337 # Installed binaries are usually stripped using `strip' when the user
2338 # run `make install-strip'. However `strip' might not be the right
2339 # tool to use in cross-compilation environments, therefore Automake
2340 # will honor the `STRIP' environment variable to overrule this program.
2341 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2342 if test "$cross_compiling" != no; then
2343 AC_CHECK_TOOL([STRIP], [strip], :)
2345 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2346 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2348 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
2350 # This file is free software; the Free Software Foundation
2351 # gives unlimited permission to copy and/or distribute it,
2352 # with or without modifications, as long as this notice is preserved.
2356 # _AM_SUBST_NOTMAKE(VARIABLE)
2357 # ---------------------------
2358 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2359 # This macro is traced by Automake.
2360 AC_DEFUN([_AM_SUBST_NOTMAKE])
2362 # AM_SUBST_NOTMAKE(VARIABLE)
2363 # ---------------------------
2364 # Public sister of _AM_SUBST_NOTMAKE.
2365 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2367 # Check how to create a tarball. -*- Autoconf -*-
2369 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
2371 # This file is free software; the Free Software Foundation
2372 # gives unlimited permission to copy and/or distribute it,
2373 # with or without modifications, as long as this notice is preserved.
2377 # _AM_PROG_TAR(FORMAT)
2378 # --------------------
2379 # Check how to create a tarball in format FORMAT.
2380 # FORMAT should be one of `v7', `ustar', or `pax'.
2382 # Substitute a variable $(am__tar) that is a command
2383 # writing to stdout a FORMAT-tarball containing the directory
2385 # tardir=directory && $(am__tar) > result.tar
2387 # Substitute a variable $(am__untar) that extract such
2388 # a tarball read from stdin.
2389 # $(am__untar) < result.tar
2390 AC_DEFUN([_AM_PROG_TAR],
2391 [# Always define AMTAR for backward compatibility.
2392 AM_MISSING_PROG([AMTAR], [tar])
2394 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
2395 [m4_case([$1], [ustar],, [pax],,
2396 [m4_fatal([Unknown tar format])])
2397 AC_MSG_CHECKING([how to create a $1 tar archive])
2398 # Loop over all known methods to create a tar archive until one works.
2399 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2400 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2401 # Do not fold the above two line into one, because Tru64 sh and
2402 # Solaris sh will not grok spaces in the rhs of `-'.
2403 for _am_tool in $_am_tools
2407 for _am_tar in tar gnutar gtar;
2409 AM_RUN_LOG([$_am_tar --version]) && break
2411 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2412 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2413 am__untar="$_am_tar -xf -"
2416 # Must skip GNU tar: if it does not support --format= it doesn't create
2417 # ustar tarball either.
2418 (tar --version) >/dev/null 2>&1 && continue
2419 am__tar='tar chf - "$$tardir"'
2420 am__tar_='tar chf - "$tardir"'
2421 am__untar='tar xf -'
2424 am__tar='pax -L -x $1 -w "$$tardir"'
2425 am__tar_='pax -L -x $1 -w "$tardir"'
2429 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2430 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2431 am__untar='cpio -i -H $1 -d'
2440 # If the value was cached, stop now. We just wanted to have am__tar
2441 # and am__untar set.
2442 test -n "${am_cv_prog_tar_$1}" && break
2444 # tar/untar a dummy directory, and stop if the command works
2447 echo GrepMe > conftest.dir/file
2448 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2450 if test -s conftest.tar; then
2451 AM_RUN_LOG([$am__untar <conftest.tar])
2452 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2457 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2458 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2460 AC_SUBST([am__untar])
2463 m4_include([m4/libtool.m4])
2464 m4_include([m4/ltoptions.m4])
2465 m4_include([m4/ltsugar.m4])
2466 m4_include([m4/ltversion.m4])
2467 m4_include([m4/lt~obsolete.m4])