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.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 # iconv.m4 serial AM6 (gettext-0.17)
23 dnl Copyright (C) 2000-2002, 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 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);
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);
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 and HP-UX 11.11.
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 #if 0 /* This bug could be worked around by the caller. */
112 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
114 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
115 if (cd_88591_to_utf8 != (iconv_t)(-1))
117 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
119 const char *inptr = input;
120 size_t inbytesleft = strlen (input);
122 size_t outbytesleft = sizeof (buf);
123 size_t res = iconv (cd_88591_to_utf8,
124 (char **) &inptr, &inbytesleft,
125 &outptr, &outbytesleft);
131 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
133 if (/* Try standardized names. */
134 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
135 /* Try IRIX, OSF/1 names. */
136 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
138 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
139 /* Try HP-UX names. */
140 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
143 }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
145 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
146 *) am_cv_func_iconv_works="guessing yes" ;;
150 case "$am_cv_func_iconv_works" in
151 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
152 *) am_func_iconv=yes ;;
155 am_func_iconv=no am_cv_lib_iconv=no
157 if test "$am_func_iconv" = yes; then
158 AC_DEFINE(HAVE_ICONV, 1,
159 [Define if you have the iconv() function and it works.])
161 if test "$am_cv_lib_iconv" = yes; then
162 AC_MSG_CHECKING([how to link with libiconv])
163 AC_MSG_RESULT([$LIBICONV])
165 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
167 CPPFLAGS="$am_save_CPPFLAGS"
178 if test "$am_cv_func_iconv" = yes; then
179 AC_MSG_CHECKING([for iconv declaration])
180 AC_CACHE_VAL(am_cv_proto_iconv, [
188 #if defined(__STDC__) || defined(__cplusplus)
189 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
193 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
194 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);"])
195 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
196 AC_MSG_RESULT([$]{ac_t:-
197 }[$]am_cv_proto_iconv)
198 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
199 [Define as const if the declaration of iconv() needs const.])
203 # lib-ld.m4 serial 3 (gettext-0.13)
204 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
205 dnl This file is free software; the Free Software Foundation
206 dnl gives unlimited permission to copy and/or distribute it,
207 dnl with or without modifications, as long as this notice is preserved.
209 dnl Subroutines of libtool.m4,
210 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
213 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
214 AC_DEFUN([AC_LIB_PROG_LD_GNU],
215 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
216 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
217 case `$LD -v 2>&1 </dev/null` in
218 *GNU* | *'with BFD'*)
219 acl_cv_prog_gnu_ld=yes ;;
221 acl_cv_prog_gnu_ld=no ;;
223 with_gnu_ld=$acl_cv_prog_gnu_ld
226 dnl From libtool-1.4. Sets the variable LD.
227 AC_DEFUN([AC_LIB_PROG_LD],
229 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
230 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
231 AC_REQUIRE([AC_PROG_CC])dnl
232 AC_REQUIRE([AC_CANONICAL_HOST])dnl
233 # Prepare PATH_SEPARATOR.
234 # The user is always right.
235 if test "${PATH_SEPARATOR+set}" != set; then
236 echo "#! /bin/sh" >conf$$.sh
237 echo "exit 0" >>conf$$.sh
239 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
247 if test "$GCC" = yes; then
248 # Check if gcc -print-prog-name=ld gives a path.
249 AC_MSG_CHECKING([for ld used by GCC])
252 # gcc leaves a trailing carriage return which upsets mingw
253 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
255 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
258 # Accept absolute paths.
259 [[\\/]* | [A-Za-z]:[\\/]*)]
260 [re_direlt='/[^/][^/]*/\.\./']
261 # Canonicalize the path of ld
262 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
263 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
264 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
266 test -z "$LD" && LD="$ac_prog"
269 # If it fails, then pretend we aren't using GCC.
273 # If it is relative, then search for the first ld in PATH.
277 elif test "$with_gnu_ld" = yes; then
278 AC_MSG_CHECKING([for GNU ld])
280 AC_MSG_CHECKING([for non-GNU ld])
282 AC_CACHE_VAL(acl_cv_path_LD,
283 [if test -z "$LD"; then
284 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
285 for ac_dir in $PATH; do
286 test -z "$ac_dir" && ac_dir=.
287 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
288 acl_cv_path_LD="$ac_dir/$ac_prog"
289 # Check to see if the program is GNU ld. I'd rather use --version,
290 # but apparently some GNU ld's only accept -v.
291 # Break only if it was the GNU/non-GNU ld that we prefer.
292 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
293 *GNU* | *'with BFD'*)
294 test "$with_gnu_ld" != no && break ;;
296 test "$with_gnu_ld" != yes && break ;;
302 acl_cv_path_LD="$LD" # Let the user override the test with a path.
305 if test -n "$LD"; then
310 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
314 # lib-link.m4 serial 13 (gettext-0.17)
315 dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
316 dnl This file is free software; the Free Software Foundation
317 dnl gives unlimited permission to copy and/or distribute it,
318 dnl with or without modifications, as long as this notice is preserved.
320 dnl From Bruno Haible.
324 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
325 dnl the libraries corresponding to explicit and implicit dependencies.
326 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
327 dnl augments the CPPFLAGS variable.
328 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
329 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
330 AC_DEFUN([AC_LIB_LINKFLAGS],
332 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
333 AC_REQUIRE([AC_LIB_RPATH])
334 define([Name],[translit([$1],[./-], [___])])
335 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
336 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
337 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
338 AC_LIB_LINKFLAGS_BODY([$1], [$2])
339 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
340 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
341 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
342 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
344 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
345 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
346 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
347 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
348 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
350 AC_SUBST([LTLIB]NAME)
351 AC_SUBST([LIB]NAME[_PREFIX])
352 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
353 dnl results of this search when this library appears as a dependency.
359 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
360 dnl searches for libname and the libraries corresponding to explicit and
361 dnl implicit dependencies, together with the specified include files and
362 dnl the ability to compile and link the specified testcode. If found, it
363 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
364 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
365 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
366 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
367 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
368 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
369 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
371 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
372 AC_REQUIRE([AC_LIB_RPATH])
373 define([Name],[translit([$1],[./-], [___])])
374 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
375 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
377 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
379 AC_LIB_LINKFLAGS_BODY([$1], [$2])
381 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
382 dnl because if the user has installed lib[]Name and not disabled its use
383 dnl via --without-lib[]Name-prefix, he wants to use it.
384 ac_save_CPPFLAGS="$CPPFLAGS"
385 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
387 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
389 LIBS="$LIBS $LIB[]NAME"
390 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
393 if test "$ac_cv_lib[]Name" = yes; then
395 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
396 AC_MSG_CHECKING([how to link with lib[]$1])
397 AC_MSG_RESULT([$LIB[]NAME])
400 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
401 dnl $INC[]NAME either.
402 CPPFLAGS="$ac_save_CPPFLAGS"
407 AC_SUBST([HAVE_LIB]NAME)
409 AC_SUBST([LTLIB]NAME)
410 AC_SUBST([LIB]NAME[_PREFIX])
415 dnl Determine the platform dependent parameters needed to use rpath:
418 dnl acl_hardcode_libdir_flag_spec,
419 dnl acl_hardcode_libdir_separator,
420 dnl acl_hardcode_direct,
421 dnl acl_hardcode_minus_L.
422 AC_DEFUN([AC_LIB_RPATH],
424 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
425 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
426 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
427 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
428 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
429 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
430 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
431 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
432 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
438 acl_libext="$acl_cv_libext"
439 acl_shlibext="$acl_cv_shlibext"
440 acl_libname_spec="$acl_cv_libname_spec"
441 acl_library_names_spec="$acl_cv_library_names_spec"
442 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
443 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
444 acl_hardcode_direct="$acl_cv_hardcode_direct"
445 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
446 dnl Determine whether the user wants rpath handling at all.
448 [ --disable-rpath do not hardcode runtime library paths],
452 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
453 dnl the libraries corresponding to explicit and implicit dependencies.
454 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
455 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
456 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
457 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
459 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
460 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
461 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
462 dnl Autoconf >= 2.61 supports dots in --with options.
463 define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
464 dnl By default, look in $includedir and $libdir.
466 AC_LIB_WITH_FINAL_PREFIX([
467 eval additional_includedir=\"$includedir\"
468 eval additional_libdir=\"$libdir\"
470 AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
471 [ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
472 --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
474 if test "X$withval" = "Xno"; then
477 if test "X$withval" = "X"; then
478 AC_LIB_WITH_FINAL_PREFIX([
479 eval additional_includedir=\"$includedir\"
480 eval additional_libdir=\"$libdir\"
483 additional_includedir="$withval/include"
484 additional_libdir="$withval/$acl_libdirstem"
488 dnl Search the library and its dependencies in $additional_libdir and
489 dnl $LDFLAGS. Using breadth-first-seach.
496 names_already_handled=
497 names_next_round='$1 $2'
498 while test -n "$names_next_round"; do
499 names_this_round="$names_next_round"
501 for name in $names_this_round; do
503 for n in $names_already_handled; do
504 if test "$n" = "$name"; then
509 if test -z "$already_handled"; then
510 names_already_handled="$names_already_handled $name"
511 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
512 dnl or AC_LIB_HAVE_LINKFLAGS call.
513 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
514 eval value=\"\$HAVE_LIB$uppername\"
515 if test -n "$value"; then
516 if test "$value" = yes; then
517 eval value=\"\$LIB$uppername\"
518 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
519 eval value=\"\$LTLIB$uppername\"
520 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
522 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
523 dnl that this library doesn't exist. So just drop it.
527 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
528 dnl and the already constructed $LIBNAME/$LTLIBNAME.
533 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
534 if test -n "$acl_shlibext"; then
535 shrext=".$acl_shlibext" # typically: shrext=.so
539 if test $use_additional = yes; then
540 dir="$additional_libdir"
541 dnl The same code as in the loop below:
542 dnl First look for a shared library.
543 if test -n "$acl_shlibext"; then
544 if test -f "$dir/$libname$shrext"; then
546 found_so="$dir/$libname$shrext"
548 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
550 for f in "$libname$shrext".*; do echo "$f"; done \
551 | sed -e "s,^$libname$shrext\\\\.,," \
552 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
553 | sed 1q ) 2>/dev/null`
554 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
556 found_so="$dir/$libname$shrext.$ver"
559 eval library_names=\"$acl_library_names_spec\"
560 for f in $library_names; do
561 if test -f "$dir/$f"; then
570 dnl Then look for a static library.
571 if test "X$found_dir" = "X"; then
572 if test -f "$dir/$libname.$acl_libext"; then
574 found_a="$dir/$libname.$acl_libext"
577 if test "X$found_dir" != "X"; then
578 if test -f "$dir/$libname.la"; then
579 found_la="$dir/$libname.la"
583 if test "X$found_dir" = "X"; then
584 for x in $LDFLAGS $LTLIB[]NAME; do
585 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
588 dir=`echo "X$x" | sed -e 's/^X-L//'`
589 dnl First look for a shared library.
590 if test -n "$acl_shlibext"; then
591 if test -f "$dir/$libname$shrext"; then
593 found_so="$dir/$libname$shrext"
595 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
597 for f in "$libname$shrext".*; do echo "$f"; done \
598 | sed -e "s,^$libname$shrext\\\\.,," \
599 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
600 | sed 1q ) 2>/dev/null`
601 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
603 found_so="$dir/$libname$shrext.$ver"
606 eval library_names=\"$acl_library_names_spec\"
607 for f in $library_names; do
608 if test -f "$dir/$f"; then
617 dnl Then look for a static library.
618 if test "X$found_dir" = "X"; then
619 if test -f "$dir/$libname.$acl_libext"; then
621 found_a="$dir/$libname.$acl_libext"
624 if test "X$found_dir" != "X"; then
625 if test -f "$dir/$libname.la"; then
626 found_la="$dir/$libname.la"
631 if test "X$found_dir" != "X"; then
636 if test "X$found_dir" != "X"; then
637 dnl Found the library.
638 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
639 if test "X$found_so" != "X"; then
640 dnl Linking with a shared library. We attempt to hardcode its
641 dnl directory into the executable's runpath, unless it's the
642 dnl standard /usr/lib.
643 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
644 dnl No hardcoding is needed.
645 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
647 dnl Use an explicit option to hardcode DIR into the resulting
649 dnl Potentially add DIR to ltrpathdirs.
650 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
652 for x in $ltrpathdirs; do
653 if test "X$x" = "X$found_dir"; then
658 if test -z "$haveit"; then
659 ltrpathdirs="$ltrpathdirs $found_dir"
661 dnl The hardcoding into $LIBNAME is system dependent.
662 if test "$acl_hardcode_direct" = yes; then
663 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
664 dnl resulting binary.
665 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
667 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
668 dnl Use an explicit option to hardcode DIR into the resulting
670 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
671 dnl Potentially add DIR to rpathdirs.
672 dnl The rpathdirs will be appended to $LIBNAME at the end.
674 for x in $rpathdirs; do
675 if test "X$x" = "X$found_dir"; then
680 if test -z "$haveit"; then
681 rpathdirs="$rpathdirs $found_dir"
684 dnl Rely on "-L$found_dir".
685 dnl But don't add it if it's already contained in the LDFLAGS
686 dnl or the already constructed $LIBNAME
688 for x in $LDFLAGS $LIB[]NAME; do
689 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
690 if test "X$x" = "X-L$found_dir"; then
695 if test -z "$haveit"; then
696 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
698 if test "$acl_hardcode_minus_L" != no; then
699 dnl FIXME: Not sure whether we should use
700 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
702 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
704 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
705 dnl here, because this doesn't fit in flags passed to the
706 dnl compiler. So give up. No hardcoding. This affects only
707 dnl very old systems.
708 dnl FIXME: Not sure whether we should use
709 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
711 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
717 if test "X$found_a" != "X"; then
718 dnl Linking with a static library.
719 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
721 dnl We shouldn't come here, but anyway it's good to have a
723 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
726 dnl Assume the include files are nearby.
727 additional_includedir=
729 */$acl_libdirstem | */$acl_libdirstem/)
730 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
731 LIB[]NAME[]_PREFIX="$basedir"
732 additional_includedir="$basedir/include"
735 if test "X$additional_includedir" != "X"; then
736 dnl Potentially add $additional_includedir to $INCNAME.
738 dnl 1. if it's the standard /usr/include,
739 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
740 dnl 3. if it's already present in $CPPFLAGS or the already
741 dnl constructed $INCNAME,
742 dnl 4. if it doesn't exist as a directory.
743 if test "X$additional_includedir" != "X/usr/include"; then
745 if test "X$additional_includedir" = "X/usr/local/include"; then
746 if test -n "$GCC"; then
748 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
752 if test -z "$haveit"; then
753 for x in $CPPFLAGS $INC[]NAME; do
754 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
755 if test "X$x" = "X-I$additional_includedir"; then
760 if test -z "$haveit"; then
761 if test -d "$additional_includedir"; then
762 dnl Really add $additional_includedir to $INCNAME.
763 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
769 dnl Look for dependencies.
770 if test -n "$found_la"; then
771 dnl Read the .la file. It defines the variables
772 dnl dlname, library_names, old_library, dependency_libs, current,
773 dnl age, revision, installed, dlopen, dlpreopen, libdir.
774 save_libdir="$libdir"
776 */* | *\\*) . "$found_la" ;;
777 *) . "./$found_la" ;;
779 libdir="$save_libdir"
780 dnl We use only dependency_libs.
781 for dep in $dependency_libs; do
784 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
785 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
787 dnl 1. if it's the standard /usr/lib,
788 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
789 dnl 3. if it's already present in $LDFLAGS or the already
790 dnl constructed $LIBNAME,
791 dnl 4. if it doesn't exist as a directory.
792 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
794 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
795 if test -n "$GCC"; then
797 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
801 if test -z "$haveit"; then
803 for x in $LDFLAGS $LIB[]NAME; do
804 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
805 if test "X$x" = "X-L$additional_libdir"; then
810 if test -z "$haveit"; then
811 if test -d "$additional_libdir"; then
812 dnl Really add $additional_libdir to $LIBNAME.
813 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
817 for x in $LDFLAGS $LTLIB[]NAME; do
818 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
819 if test "X$x" = "X-L$additional_libdir"; then
824 if test -z "$haveit"; then
825 if test -d "$additional_libdir"; then
826 dnl Really add $additional_libdir to $LTLIBNAME.
827 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
834 dir=`echo "X$dep" | sed -e 's/^X-R//'`
835 if test "$enable_rpath" != no; then
836 dnl Potentially add DIR to rpathdirs.
837 dnl The rpathdirs will be appended to $LIBNAME at the end.
839 for x in $rpathdirs; do
840 if test "X$x" = "X$dir"; then
845 if test -z "$haveit"; then
846 rpathdirs="$rpathdirs $dir"
848 dnl Potentially add DIR to ltrpathdirs.
849 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
851 for x in $ltrpathdirs; do
852 if test "X$x" = "X$dir"; then
857 if test -z "$haveit"; then
858 ltrpathdirs="$ltrpathdirs $dir"
863 dnl Handle this in the next round.
864 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
867 dnl Handle this in the next round. Throw away the .la's
868 dnl directory; it is already contained in a preceding -L
870 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
873 dnl Most likely an immediate library name.
874 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
875 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
881 dnl Didn't find the library; assume it is in the system directories
882 dnl known to the linker and runtime loader. (All the system
883 dnl directories known to the linker should also be known to the
884 dnl runtime loader, otherwise the system is severely misconfigured.)
885 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
886 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
892 if test "X$rpathdirs" != "X"; then
893 if test -n "$acl_hardcode_libdir_separator"; then
894 dnl Weird platform: only the last -rpath option counts, the user must
895 dnl pass all path elements in one option. We can arrange that for a
896 dnl single library, but not when more than one $LIBNAMEs are used.
898 for found_dir in $rpathdirs; do
899 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
901 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
902 acl_save_libdir="$libdir"
904 eval flag=\"$acl_hardcode_libdir_flag_spec\"
905 libdir="$acl_save_libdir"
906 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
908 dnl The -rpath options are cumulative.
909 for found_dir in $rpathdirs; do
910 acl_save_libdir="$libdir"
912 eval flag=\"$acl_hardcode_libdir_flag_spec\"
913 libdir="$acl_save_libdir"
914 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
918 if test "X$ltrpathdirs" != "X"; then
919 dnl When using libtool, the option that works for both libraries and
920 dnl executables is -R. The -R options are cumulative.
921 for found_dir in $ltrpathdirs; do
922 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
927 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
928 dnl unless already present in VAR.
929 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
930 dnl contains two or three consecutive elements that belong together.
931 AC_DEFUN([AC_LIB_APPENDTOVAR],
933 for element in [$2]; do
936 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
937 if test "X$x" = "X$element"; then
942 if test -z "$haveit"; then
943 [$1]="${[$1]}${[$1]:+ }$element"
948 dnl For those cases where a variable contains several -L and -l options
949 dnl referring to unknown libraries and directories, this macro determines the
950 dnl necessary additional linker options for the runtime path.
951 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
952 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
953 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
954 dnl otherwise linking without libtool is assumed.
955 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
957 AC_REQUIRE([AC_LIB_RPATH])
958 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
960 if test "$enable_rpath" != no; then
961 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
962 dnl Use an explicit option to hardcode directories into the resulting
967 if test -n "$next"; then
969 dnl No need to hardcode the standard /usr/lib.
970 if test "X$dir" != "X/usr/$acl_libdirstem"; then
971 rpathdirs="$rpathdirs $dir"
977 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
978 dnl No need to hardcode the standard /usr/lib.
979 if test "X$dir" != "X/usr/$acl_libdirstem"; then
980 rpathdirs="$rpathdirs $dir"
987 if test "X$rpathdirs" != "X"; then
988 if test -n ""$3""; then
989 dnl libtool is used for linking. Use -R options.
990 for dir in $rpathdirs; do
991 $1="${$1}${$1:+ }-R$dir"
994 dnl The linker is used for linking directly.
995 if test -n "$acl_hardcode_libdir_separator"; then
996 dnl Weird platform: only the last -rpath option counts, the user
997 dnl must pass all path elements in one option.
999 for dir in $rpathdirs; do
1000 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1002 acl_save_libdir="$libdir"
1004 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1005 libdir="$acl_save_libdir"
1008 dnl The -rpath options are cumulative.
1009 for dir in $rpathdirs; do
1010 acl_save_libdir="$libdir"
1012 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1013 libdir="$acl_save_libdir"
1014 $1="${$1}${$1:+ }$flag"
1024 # lib-prefix.m4 serial 5 (gettext-0.15)
1025 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
1026 dnl This file is free software; the Free Software Foundation
1027 dnl gives unlimited permission to copy and/or distribute it,
1028 dnl with or without modifications, as long as this notice is preserved.
1030 dnl From Bruno Haible.
1032 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1033 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1034 dnl require excessive bracketing.
1035 ifdef([AC_HELP_STRING],
1036 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1037 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1039 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1040 dnl to access previously installed libraries. The basic assumption is that
1041 dnl a user will want packages to use other packages he previously installed
1042 dnl with the same --prefix option.
1043 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1044 dnl libraries, but is otherwise very convenient.
1045 AC_DEFUN([AC_LIB_PREFIX],
1047 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1048 AC_REQUIRE([AC_PROG_CC])
1049 AC_REQUIRE([AC_CANONICAL_HOST])
1050 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1051 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1052 dnl By default, look in $includedir and $libdir.
1054 AC_LIB_WITH_FINAL_PREFIX([
1055 eval additional_includedir=\"$includedir\"
1056 eval additional_libdir=\"$libdir\"
1058 AC_LIB_ARG_WITH([lib-prefix],
1059 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1060 --without-lib-prefix don't search for libraries in includedir and libdir],
1062 if test "X$withval" = "Xno"; then
1065 if test "X$withval" = "X"; then
1066 AC_LIB_WITH_FINAL_PREFIX([
1067 eval additional_includedir=\"$includedir\"
1068 eval additional_libdir=\"$libdir\"
1071 additional_includedir="$withval/include"
1072 additional_libdir="$withval/$acl_libdirstem"
1076 if test $use_additional = yes; then
1077 dnl Potentially add $additional_includedir to $CPPFLAGS.
1078 dnl But don't add it
1079 dnl 1. if it's the standard /usr/include,
1080 dnl 2. if it's already present in $CPPFLAGS,
1081 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1082 dnl 4. if it doesn't exist as a directory.
1083 if test "X$additional_includedir" != "X/usr/include"; then
1085 for x in $CPPFLAGS; do
1086 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1087 if test "X$x" = "X-I$additional_includedir"; then
1092 if test -z "$haveit"; then
1093 if test "X$additional_includedir" = "X/usr/local/include"; then
1094 if test -n "$GCC"; then
1096 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1100 if test -z "$haveit"; then
1101 if test -d "$additional_includedir"; then
1102 dnl Really add $additional_includedir to $CPPFLAGS.
1103 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1108 dnl Potentially add $additional_libdir to $LDFLAGS.
1109 dnl But don't add it
1110 dnl 1. if it's the standard /usr/lib,
1111 dnl 2. if it's already present in $LDFLAGS,
1112 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1113 dnl 4. if it doesn't exist as a directory.
1114 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1116 for x in $LDFLAGS; do
1117 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1118 if test "X$x" = "X-L$additional_libdir"; then
1123 if test -z "$haveit"; then
1124 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1125 if test -n "$GCC"; then
1127 linux*) haveit=yes;;
1131 if test -z "$haveit"; then
1132 if test -d "$additional_libdir"; then
1133 dnl Really add $additional_libdir to $LDFLAGS.
1134 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1142 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1143 dnl acl_final_exec_prefix, containing the values to which $prefix and
1144 dnl $exec_prefix will expand at the end of the configure script.
1145 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1147 dnl Unfortunately, prefix and exec_prefix get only finally determined
1148 dnl at the end of configure.
1149 if test "X$prefix" = "XNONE"; then
1150 acl_final_prefix="$ac_default_prefix"
1152 acl_final_prefix="$prefix"
1154 if test "X$exec_prefix" = "XNONE"; then
1155 acl_final_exec_prefix='${prefix}'
1157 acl_final_exec_prefix="$exec_prefix"
1159 acl_save_prefix="$prefix"
1160 prefix="$acl_final_prefix"
1161 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1162 prefix="$acl_save_prefix"
1165 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1166 dnl variables prefix and exec_prefix bound to the values they will have
1167 dnl at the end of the configure script.
1168 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1170 acl_save_prefix="$prefix"
1171 prefix="$acl_final_prefix"
1172 acl_save_exec_prefix="$exec_prefix"
1173 exec_prefix="$acl_final_exec_prefix"
1175 exec_prefix="$acl_save_exec_prefix"
1176 prefix="$acl_save_prefix"
1179 dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
1180 dnl the basename of the libdir, either "lib" or "lib64".
1181 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1183 dnl There is no formal standard regarding lib and lib64. The current
1184 dnl practice is that on a system supporting 32-bit and 64-bit instruction
1185 dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
1186 dnl libraries go under $prefix/lib. We determine the compiler's default
1187 dnl mode by looking at the compiler's library search path. If at least
1188 dnl of its elements ends in /lib64 or points to a directory whose absolute
1189 dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
1190 dnl default, namely "lib".
1192 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1193 if test -n "$searchpath"; then
1194 acl_save_IFS="${IFS= }"; IFS=":"
1195 for searchdir in $searchpath; do
1196 if test -d "$searchdir"; then
1197 case "$searchdir" in
1198 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1199 *) searchdir=`cd "$searchdir" && pwd`
1200 case "$searchdir" in
1201 */lib64 ) acl_libdirstem=lib64 ;;
1210 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1212 # This file is free software; the Free Software Foundation
1213 # gives unlimited permission to copy and/or distribute it,
1214 # with or without modifications, as long as this notice is preserved.
1216 # AM_AUTOMAKE_VERSION(VERSION)
1217 # ----------------------------
1218 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1219 # generated from the m4 files accompanying Automake X.Y.
1220 # (This private macro should not be called outside this file.)
1221 AC_DEFUN([AM_AUTOMAKE_VERSION],
1222 [am__api_version='1.11'
1223 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1224 dnl require some minimum version. Point them to the right macro.
1225 m4_if([$1], [1.11.1], [],
1226 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1229 # _AM_AUTOCONF_VERSION(VERSION)
1230 # -----------------------------
1231 # aclocal traces this macro to find the Autoconf version.
1232 # This is a private macro too. Using m4_define simplifies
1233 # the logic in aclocal, which can simply ignore this definition.
1234 m4_define([_AM_AUTOCONF_VERSION], [])
1236 # AM_SET_CURRENT_AUTOMAKE_VERSION
1237 # -------------------------------
1238 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1239 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1240 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1241 [AM_AUTOMAKE_VERSION([1.11.1])dnl
1242 m4_ifndef([AC_AUTOCONF_VERSION],
1243 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1244 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1246 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
1248 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1250 # This file is free software; the Free Software Foundation
1251 # gives unlimited permission to copy and/or distribute it,
1252 # with or without modifications, as long as this notice is preserved.
1254 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1255 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
1256 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
1258 # Of course, Automake must honor this variable whenever it calls a
1259 # tool from the auxiliary directory. The problem is that $srcdir (and
1260 # therefore $ac_aux_dir as well) can be either absolute or relative,
1261 # depending on how configure is run. This is pretty annoying, since
1262 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
1263 # source directory, any form will work fine, but in subdirectories a
1264 # relative path needs to be adjusted first.
1266 # $ac_aux_dir/missing
1267 # fails when called from a subdirectory if $ac_aux_dir is relative
1268 # $top_srcdir/$ac_aux_dir/missing
1269 # fails if $ac_aux_dir is absolute,
1270 # fails when called from a subdirectory in a VPATH build with
1271 # a relative $ac_aux_dir
1273 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1274 # are both prefixed by $srcdir. In an in-source build this is usually
1275 # harmless because $srcdir is `.', but things will broke when you
1276 # start a VPATH build or use an absolute $srcdir.
1278 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1279 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1280 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1281 # and then we would define $MISSING as
1282 # MISSING="\${SHELL} $am_aux_dir/missing"
1283 # This will work as long as MISSING is not called from configure, because
1284 # unfortunately $(top_srcdir) has no meaning in configure.
1285 # However there are other variables, like CC, which are often used in
1286 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1288 # Another solution, used here, is to always expand $ac_aux_dir to an
1289 # absolute PATH. The drawback is that using absolute paths prevent a
1290 # configured tree to be moved without reconfiguration.
1292 AC_DEFUN([AM_AUX_DIR_EXPAND],
1293 [dnl Rely on autoconf to set up CDPATH properly.
1294 AC_PREREQ([2.50])dnl
1295 # expand $ac_aux_dir to an absolute path
1296 am_aux_dir=`cd $ac_aux_dir && pwd`
1299 # AM_CONDITIONAL -*- Autoconf -*-
1301 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
1302 # Free Software Foundation, Inc.
1304 # This file is free software; the Free Software Foundation
1305 # gives unlimited permission to copy and/or distribute it,
1306 # with or without modifications, as long as this notice is preserved.
1310 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1311 # -------------------------------------
1312 # Define a conditional.
1313 AC_DEFUN([AM_CONDITIONAL],
1315 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1316 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1317 AC_SUBST([$1_TRUE])dnl
1318 AC_SUBST([$1_FALSE])dnl
1319 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
1320 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
1321 m4_define([_AM_COND_VALUE_$1], [$2])dnl
1329 AC_CONFIG_COMMANDS_PRE(
1330 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1331 AC_MSG_ERROR([[conditional "$1" was never defined.
1332 Usually this means the macro was only invoked conditionally.]])
1335 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
1336 # Free Software Foundation, Inc.
1338 # This file is free software; the Free Software Foundation
1339 # gives unlimited permission to copy and/or distribute it,
1340 # with or without modifications, as long as this notice is preserved.
1344 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1345 # written in clear, in which case automake, when reading aclocal.m4,
1346 # will think it sees a *use*, and therefore will trigger all it's
1347 # C support machinery. Also note that it means that autoscan, seeing
1348 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1351 # _AM_DEPENDENCIES(NAME)
1352 # ----------------------
1353 # See how the compiler implements dependency checking.
1354 # NAME is "CC", "CXX", "GCJ", or "OBJC".
1355 # We try a few techniques and use that to set a single cache variable.
1357 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1358 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1359 # dependency, and given that the user is not expected to run this macro,
1360 # just rely on AC_PROG_CC.
1361 AC_DEFUN([_AM_DEPENDENCIES],
1362 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1363 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1364 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1365 AC_REQUIRE([AM_DEP_TRACK])dnl
1367 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1368 [$1], CXX, [depcc="$CXX" am_compiler_list=],
1369 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1370 [$1], UPC, [depcc="$UPC" am_compiler_list=],
1371 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1372 [depcc="$$1" am_compiler_list=])
1374 AC_CACHE_CHECK([dependency style of $depcc],
1375 [am_cv_$1_dependencies_compiler_type],
1376 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1377 # We make a subdir and do the tests there. Otherwise we can end up
1378 # making bogus files that we don't know about and never remove. For
1379 # instance it was reported that on HP-UX the gcc test will end up
1380 # making a dummy file named `D' -- because `-MD' means `put the output
1383 # Copy depcomp to subdir because otherwise we won't find it if we're
1384 # using a relative directory.
1385 cp "$am_depcomp" conftest.dir
1387 # We will build objects and dependencies in a subdirectory because
1388 # it helps to detect inapplicable dependency modes. For instance
1389 # both Tru64's cc and ICC support -MD to output dependencies as a
1390 # side effect of compilation, but ICC will put the dependencies in
1391 # the current directory while Tru64 will put them in the object
1395 am_cv_$1_dependencies_compiler_type=none
1396 if test "$am_compiler_list" = ""; then
1397 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1401 [case " $depcc " in #(
1402 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1405 [case " $depcc " in #(
1406 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1409 for depmode in $am_compiler_list; do
1410 # Setup a source with many dependencies, because some compilers
1411 # like to wrap large dependency lists on column 80 (with \), and
1412 # we should not choose a depcomp mode which is confused by this.
1414 # We need to recreate these files for each test, as the compiler may
1415 # overwrite some of them when testing with obscure command lines.
1416 # This happens at least with the AIX C compiler.
1418 for i in 1 2 3 4 5 6; do
1419 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1420 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1421 # Solaris 8's {/usr,}/bin/sh.
1422 touch sub/conftst$i.h
1424 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1426 # We check with `-c' and `-o' for the sake of the "dashmstdout"
1427 # mode. It turns out that the SunPro C++ compiler does not properly
1428 # handle `-M -o', and we need to detect this. Also, some Intel
1429 # versions had trouble with output in subdirs
1430 am__obj=sub/conftest.${OBJEXT-o}
1431 am__minus_obj="-o $am__obj"
1434 # This depmode causes a compiler race in universal mode.
1435 test "$am__universal" = false || continue
1438 # after this tag, mechanisms are not by side-effect, so they'll
1439 # only be used when explicitly requested
1440 if test "x$enable_dependency_tracking" = xyes; then
1446 msvisualcpp | msvcmsys)
1447 # This compiler won't grok `-c -o', but also, the minuso test has
1448 # not run yet. These depmodes are late enough in the game, and
1449 # so weak that their functioning should not be impacted.
1450 am__obj=conftest.${OBJEXT-o}
1455 if depmode=$depmode \
1456 source=sub/conftest.c object=$am__obj \
1457 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1458 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1459 >/dev/null 2>conftest.err &&
1460 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1461 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1462 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1463 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1464 # icc doesn't choke on unknown options, it will just issue warnings
1465 # or remarks (even with -Werror). So we grep stderr for any message
1466 # that says an option was ignored or not supported.
1467 # When given -MP, icc 7.0 and 7.1 complain thusly:
1468 # icc: Command line warning: ignoring option '-M'; no argument required
1469 # The diagnosis changed in icc 8.0:
1470 # icc: Command line remark: option '-MP' not supported
1471 if (grep 'ignoring option' conftest.err ||
1472 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1473 am_cv_$1_dependencies_compiler_type=$depmode
1482 am_cv_$1_dependencies_compiler_type=none
1485 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1486 AM_CONDITIONAL([am__fastdep$1], [
1487 test "x$enable_dependency_tracking" != xno \
1488 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1494 # Choose a directory name for dependency files.
1495 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1496 AC_DEFUN([AM_SET_DEPDIR],
1497 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1498 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1504 AC_DEFUN([AM_DEP_TRACK],
1505 [AC_ARG_ENABLE(dependency-tracking,
1506 [ --disable-dependency-tracking speeds up one-time build
1507 --enable-dependency-tracking do not reject slow dependency extractors])
1508 if test "x$enable_dependency_tracking" != xno; then
1509 am_depcomp="$ac_aux_dir/depcomp"
1512 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1513 AC_SUBST([AMDEPBACKSLASH])dnl
1514 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1517 # Generate code to set up dependency tracking. -*- Autoconf -*-
1519 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1520 # Free Software Foundation, Inc.
1522 # This file is free software; the Free Software Foundation
1523 # gives unlimited permission to copy and/or distribute it,
1524 # with or without modifications, as long as this notice is preserved.
1528 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1529 # ------------------------------
1530 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1532 # Autoconf 2.62 quotes --file arguments for eval, but not when files
1533 # are listed without --file. Let's play safe and only enable the eval
1534 # if we detect the quoting.
1535 case $CONFIG_FILES in
1536 *\'*) eval set x "$CONFIG_FILES" ;;
1537 *) set x $CONFIG_FILES ;;
1542 # Strip MF so we end up with the name of the file.
1543 mf=`echo "$mf" | sed -e 's/:.*$//'`
1544 # Check whether this is an Automake generated Makefile or not.
1545 # We used to match only the files named `Makefile.in', but
1546 # some people rename them; so instead we look at the file content.
1547 # Grep'ing the first line is not enough: some people post-process
1548 # each Makefile.in and add a new line on top of each file to say so.
1549 # Grep'ing the whole file is not good either: AIX grep has a line
1550 # limit of 2048, but all sed's we know have understand at least 4000.
1551 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1552 dirpart=`AS_DIRNAME("$mf")`
1556 # Extract the definition of DEPDIR, am__include, and am__quote
1557 # from the Makefile without running `make'.
1558 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1559 test -z "$DEPDIR" && continue
1560 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1561 test -z "am__include" && continue
1562 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1563 # When using ansi2knr, U may be empty or an underscore; expand it
1564 U=`sed -n 's/^U = //p' < "$mf"`
1565 # Find all dependency output files, they are included files with
1566 # $(DEPDIR) in their names. We invoke sed twice because it is the
1567 # simplest approach to changing $(DEPDIR) to its actual value in the
1569 for file in `sed -n "
1570 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1571 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1572 # Make sure the directory exists.
1573 test -f "$dirpart/$file" && continue
1574 fdir=`AS_DIRNAME(["$file"])`
1575 AS_MKDIR_P([$dirpart/$fdir])
1576 # echo "creating $dirpart/$file"
1577 echo '# dummy' > "$dirpart/$file"
1581 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1584 # AM_OUTPUT_DEPENDENCY_COMMANDS
1585 # -----------------------------
1586 # This macro should only be invoked once -- use via AC_REQUIRE.
1588 # This code is only required when automatic dependency tracking
1589 # is enabled. FIXME. This creates each `.P' file that we will
1590 # need in order to bootstrap the dependency handling code.
1591 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1592 [AC_CONFIG_COMMANDS([depfiles],
1593 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1594 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1597 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
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_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
1607 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1609 # Do all the work for Automake. -*- Autoconf -*-
1611 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1612 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1614 # This file is free software; the Free Software Foundation
1615 # gives unlimited permission to copy and/or distribute it,
1616 # with or without modifications, as long as this notice is preserved.
1620 # This macro actually does too much. Some checks are only needed if
1621 # your package does certain things. But this isn't really a big deal.
1623 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1624 # AM_INIT_AUTOMAKE([OPTIONS])
1625 # -----------------------------------------------
1626 # The call with PACKAGE and VERSION arguments is the old style
1627 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1628 # and VERSION should now be passed to AC_INIT and removed from
1629 # the call to AM_INIT_AUTOMAKE.
1630 # We support both call styles for the transition. After
1631 # the next Automake release, Autoconf can make the AC_INIT
1632 # arguments mandatory, and then we can depend on a new Autoconf
1633 # release and drop the old call support.
1634 AC_DEFUN([AM_INIT_AUTOMAKE],
1635 [AC_PREREQ([2.62])dnl
1636 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1637 dnl the ones we care about.
1638 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1639 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1640 AC_REQUIRE([AC_PROG_INSTALL])dnl
1641 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1642 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1643 # is not polluted with repeated "-I."
1644 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1645 # test to see if srcdir already configured
1646 if test -f $srcdir/config.status; then
1647 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1651 # test whether we have cygpath
1652 if test -z "$CYGPATH_W"; then
1653 if (cygpath --version) >/dev/null 2>/dev/null; then
1654 CYGPATH_W='cygpath -w'
1659 AC_SUBST([CYGPATH_W])
1661 # Define the identity of the package.
1662 dnl Distinguish between old-style and new-style calls.
1664 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1665 AC_SUBST([PACKAGE], [$1])dnl
1666 AC_SUBST([VERSION], [$2])],
1667 [_AM_SET_OPTIONS([$1])dnl
1668 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1669 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1670 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1671 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1672 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1674 _AM_IF_OPTION([no-define],,
1675 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1676 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1678 # Some tools Automake needs.
1679 AC_REQUIRE([AM_SANITY_CHECK])dnl
1680 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1681 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1682 AM_MISSING_PROG(AUTOCONF, autoconf)
1683 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1684 AM_MISSING_PROG(AUTOHEADER, autoheader)
1685 AM_MISSING_PROG(MAKEINFO, makeinfo)
1686 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1687 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1688 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1689 # We need awk for the "check" target. The system "awk" is bad on
1691 AC_REQUIRE([AC_PROG_AWK])dnl
1692 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1693 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1694 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1695 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1696 [_AM_PROG_TAR([v7])])])
1697 _AM_IF_OPTION([no-dependencies],,
1698 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1699 [_AM_DEPENDENCIES(CC)],
1700 [define([AC_PROG_CC],
1701 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1702 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1703 [_AM_DEPENDENCIES(CXX)],
1704 [define([AC_PROG_CXX],
1705 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1706 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1707 [_AM_DEPENDENCIES(OBJC)],
1708 [define([AC_PROG_OBJC],
1709 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1711 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1712 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1713 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1714 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1715 AC_CONFIG_COMMANDS_PRE(dnl
1716 [m4_provide_if([_AM_COMPILER_EXEEXT],
1717 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1720 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1721 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1722 dnl mangled by Autoconf and run in a shell conditional statement.
1723 m4_define([_AC_COMPILER_EXEEXT],
1724 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1727 # When config.status generates a header, we must update the stamp-h file.
1728 # This file resides in the same directory as the config header
1729 # that is generated. The stamp files are numbered to have different names.
1731 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1732 # loop where config.status creates the headers, so we can generate
1733 # our stamp files there.
1734 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1735 [# Compute $1's index in $config_headers.
1738 for _am_header in $config_headers :; do
1740 $_am_arg | $_am_arg:* )
1743 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1746 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1748 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
1750 # This file is free software; the Free Software Foundation
1751 # gives unlimited permission to copy and/or distribute it,
1752 # with or without modifications, as long as this notice is preserved.
1754 # AM_PROG_INSTALL_SH
1755 # ------------------
1756 # Define $install_sh.
1757 AC_DEFUN([AM_PROG_INSTALL_SH],
1758 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1759 if test x"${install_sh}" != xset; then
1762 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1764 install_sh="\${SHELL} $am_aux_dir/install-sh"
1767 AC_SUBST(install_sh)])
1769 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1771 # This file is free software; the Free Software Foundation
1772 # gives unlimited permission to copy and/or distribute it,
1773 # with or without modifications, as long as this notice is preserved.
1777 # Check whether the underlying file-system supports filenames
1778 # with a leading dot. For instance MS-DOS doesn't.
1779 AC_DEFUN([AM_SET_LEADING_DOT],
1780 [rm -rf .tst 2>/dev/null
1781 mkdir .tst 2>/dev/null
1782 if test -d .tst; then
1787 rmdir .tst 2>/dev/null
1788 AC_SUBST([am__leading_dot])])
1790 # Check to see how 'make' treats includes. -*- Autoconf -*-
1792 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1794 # This file is free software; the Free Software Foundation
1795 # gives unlimited permission to copy and/or distribute it,
1796 # with or without modifications, as long as this notice is preserved.
1802 # Check to see how make treats includes.
1803 AC_DEFUN([AM_MAKE_INCLUDE],
1804 [am_make=${MAKE-make}
1805 cat > confinc << 'END'
1807 @echo this is the am__doit target
1810 # If we don't find an include directive, just comment out the code.
1811 AC_MSG_CHECKING([for style of include used by $am_make])
1815 # First try GNU make style include.
1816 echo "include confinc" > confmf
1817 # Ignore all kinds of additional output from `make'.
1818 case `$am_make -s -f confmf 2> /dev/null` in #(
1819 *the\ am__doit\ target*)
1825 # Now try BSD make style include.
1826 if test "$am__include" = "#"; then
1827 echo '.include "confinc"' > confmf
1828 case `$am_make -s -f confmf 2> /dev/null` in #(
1829 *the\ am__doit\ target*)
1830 am__include=.include
1836 AC_SUBST([am__include])
1837 AC_SUBST([am__quote])
1838 AC_MSG_RESULT([$_am_result])
1839 rm -f confinc confmf
1842 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
1843 # Free Software Foundation, Inc.
1845 # This file is free software; the Free Software Foundation
1846 # gives unlimited permission to copy and/or distribute it,
1847 # with or without modifications, as long as this notice is preserved.
1853 # Like AC_PROG_CC_C_O, but changed for automake.
1854 AC_DEFUN([AM_PROG_CC_C_O],
1855 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
1856 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1857 AC_REQUIRE_AUX_FILE([compile])dnl
1858 # FIXME: we rely on the cache variable name because
1859 # there is no other way.
1861 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1862 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1863 if test "$am_t" != yes; then
1864 # Losing compiler, so override with the script.
1865 # FIXME: It is wrong to rewrite CC.
1866 # But if we don't then we get into trouble of one sort or another.
1867 # A longer-term fix would be to have automake use am__CC in this case,
1868 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1869 CC="$am_aux_dir/compile $CC"
1871 dnl Make sure AC_PROG_CC is never called again, or it will override our
1873 m4_define([AC_PROG_CC],
1874 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1877 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1879 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1880 # Free Software Foundation, Inc.
1882 # This file is free software; the Free Software Foundation
1883 # gives unlimited permission to copy and/or distribute it,
1884 # with or without modifications, as long as this notice is preserved.
1888 # AM_MISSING_PROG(NAME, PROGRAM)
1889 # ------------------------------
1890 AC_DEFUN([AM_MISSING_PROG],
1891 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1892 $1=${$1-"${am_missing_run}$2"}
1896 # AM_MISSING_HAS_RUN
1897 # ------------------
1898 # Define MISSING if not defined so far and test if it supports --run.
1899 # If it does, set am_missing_run to use it, otherwise, to nothing.
1900 AC_DEFUN([AM_MISSING_HAS_RUN],
1901 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1902 AC_REQUIRE_AUX_FILE([missing])dnl
1903 if test x"${MISSING+set}" != xset; then
1906 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1908 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1911 # Use eval to expand $SHELL
1912 if eval "$MISSING --run true"; then
1913 am_missing_run="$MISSING --run "
1916 AC_MSG_WARN([`missing' script is too old or missing])
1920 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1922 # This file is free software; the Free Software Foundation
1923 # gives unlimited permission to copy and/or distribute it,
1924 # with or without modifications, as long as this notice is preserved.
1928 # Check for `mkdir -p'.
1929 AC_DEFUN([AM_PROG_MKDIR_P],
1930 [AC_PREREQ([2.60])dnl
1931 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1932 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1933 dnl while keeping a definition of mkdir_p for backward compatibility.
1934 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1935 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1936 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1937 dnl adjustment using top_builddir (which is defined more often than
1939 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1941 [[\\/$]]* | ?:[[\\/]]*) ;;
1942 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1946 # Helper functions for option handling. -*- Autoconf -*-
1948 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
1950 # This file is free software; the Free Software Foundation
1951 # gives unlimited permission to copy and/or distribute it,
1952 # with or without modifications, as long as this notice is preserved.
1956 # _AM_MANGLE_OPTION(NAME)
1957 # -----------------------
1958 AC_DEFUN([_AM_MANGLE_OPTION],
1959 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1961 # _AM_SET_OPTION(NAME)
1962 # ------------------------------
1963 # Set option NAME. Presently that only means defining a flag for this option.
1964 AC_DEFUN([_AM_SET_OPTION],
1965 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1967 # _AM_SET_OPTIONS(OPTIONS)
1968 # ----------------------------------
1969 # OPTIONS is a space-separated list of Automake options.
1970 AC_DEFUN([_AM_SET_OPTIONS],
1971 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1973 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1974 # -------------------------------------------
1975 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1976 AC_DEFUN([_AM_IF_OPTION],
1977 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1979 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1981 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1982 # Free Software Foundation, Inc.
1984 # This file is free software; the Free Software Foundation
1985 # gives unlimited permission to copy and/or distribute it,
1986 # with or without modifications, as long as this notice is preserved.
1992 AC_DEFUN([AM_SANITY_CHECK],
1993 [AC_MSG_CHECKING([whether build environment is sane])
1996 echo timestamp > conftest.file
1997 # Reject unsafe characters in $srcdir or the absolute working directory
1998 # name. Accept space and tab only in the latter.
2002 *[[\\\"\#\$\&\'\`$am_lf]]*)
2003 AC_MSG_ERROR([unsafe absolute working directory name]);;
2006 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
2007 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
2010 # Do `set' in a subshell so we don't clobber the current shell's
2011 # arguments. Must try -L first in case configure is actually a
2012 # symlink; some systems play weird games with the mod time of symlinks
2013 # (eg FreeBSD returns the mod time of the symlink's containing
2016 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2017 if test "$[*]" = "X"; then
2019 set X `ls -t "$srcdir/configure" conftest.file`
2022 if test "$[*]" != "X $srcdir/configure conftest.file" \
2023 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2025 # If neither matched, then we have a broken ls. This can happen
2026 # if, for instance, CONFIG_SHELL is bash and it inherits a
2027 # broken ls alias from the environment. This has actually
2028 # happened. Such a system could not be considered "sane".
2029 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2030 alias in your environment])
2033 test "$[2]" = conftest.file
2039 AC_MSG_ERROR([newly created file is older than distributed files!
2040 Check your system clock])
2042 AC_MSG_RESULT(yes)])
2044 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
2046 # This file is free software; the Free Software Foundation
2047 # gives unlimited permission to copy and/or distribute it,
2048 # with or without modifications, as long as this notice is preserved.
2050 # AM_PROG_INSTALL_STRIP
2051 # ---------------------
2052 # One issue with vendor `install' (even GNU) is that you can't
2053 # specify the program used to strip binaries. This is especially
2054 # annoying in cross-compiling environments, where the build's strip
2055 # is unlikely to handle the host's binaries.
2056 # Fortunately install-sh will honor a STRIPPROG variable, so we
2057 # always use install-sh in `make install-strip', and initialize
2058 # STRIPPROG with the value of the STRIP variable (set by the user).
2059 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2060 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2061 # Installed binaries are usually stripped using `strip' when the user
2062 # run `make install-strip'. However `strip' might not be the right
2063 # tool to use in cross-compilation environments, therefore Automake
2064 # will honor the `STRIP' environment variable to overrule this program.
2065 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2066 if test "$cross_compiling" != no; then
2067 AC_CHECK_TOOL([STRIP], [strip], :)
2069 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2070 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2072 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
2074 # This file is free software; the Free Software Foundation
2075 # gives unlimited permission to copy and/or distribute it,
2076 # with or without modifications, as long as this notice is preserved.
2080 # _AM_SUBST_NOTMAKE(VARIABLE)
2081 # ---------------------------
2082 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2083 # This macro is traced by Automake.
2084 AC_DEFUN([_AM_SUBST_NOTMAKE])
2086 # AM_SUBST_NOTMAKE(VARIABLE)
2087 # ---------------------------
2088 # Public sister of _AM_SUBST_NOTMAKE.
2089 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2091 # Check how to create a tarball. -*- Autoconf -*-
2093 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
2095 # This file is free software; the Free Software Foundation
2096 # gives unlimited permission to copy and/or distribute it,
2097 # with or without modifications, as long as this notice is preserved.
2101 # _AM_PROG_TAR(FORMAT)
2102 # --------------------
2103 # Check how to create a tarball in format FORMAT.
2104 # FORMAT should be one of `v7', `ustar', or `pax'.
2106 # Substitute a variable $(am__tar) that is a command
2107 # writing to stdout a FORMAT-tarball containing the directory
2109 # tardir=directory && $(am__tar) > result.tar
2111 # Substitute a variable $(am__untar) that extract such
2112 # a tarball read from stdin.
2113 # $(am__untar) < result.tar
2114 AC_DEFUN([_AM_PROG_TAR],
2115 [# Always define AMTAR for backward compatibility.
2116 AM_MISSING_PROG([AMTAR], [tar])
2118 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
2119 [m4_case([$1], [ustar],, [pax],,
2120 [m4_fatal([Unknown tar format])])
2121 AC_MSG_CHECKING([how to create a $1 tar archive])
2122 # Loop over all known methods to create a tar archive until one works.
2123 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2124 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2125 # Do not fold the above two line into one, because Tru64 sh and
2126 # Solaris sh will not grok spaces in the rhs of `-'.
2127 for _am_tool in $_am_tools
2131 for _am_tar in tar gnutar gtar;
2133 AM_RUN_LOG([$_am_tar --version]) && break
2135 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2136 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2137 am__untar="$_am_tar -xf -"
2140 # Must skip GNU tar: if it does not support --format= it doesn't create
2141 # ustar tarball either.
2142 (tar --version) >/dev/null 2>&1 && continue
2143 am__tar='tar chf - "$$tardir"'
2144 am__tar_='tar chf - "$tardir"'
2145 am__untar='tar xf -'
2148 am__tar='pax -L -x $1 -w "$$tardir"'
2149 am__tar_='pax -L -x $1 -w "$tardir"'
2153 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2154 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2155 am__untar='cpio -i -H $1 -d'
2164 # If the value was cached, stop now. We just wanted to have am__tar
2165 # and am__untar set.
2166 test -n "${am_cv_prog_tar_$1}" && break
2168 # tar/untar a dummy directory, and stop if the command works
2171 echo GrepMe > conftest.dir/file
2172 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2174 if test -s conftest.tar; then
2175 AM_RUN_LOG([$am__untar <conftest.tar])
2176 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2181 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2182 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2184 AC_SUBST([am__untar])
2187 m4_include([m4/libtool.m4])
2188 m4_include([m4/ltoptions.m4])
2189 m4_include([m4/ltsugar.m4])
2190 m4_include([m4/ltversion.m4])
2191 m4_include([m4/lt~obsolete.m4])
2192 m4_include([m4/pkg.m4])