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 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1350 # This file is free software; the Free Software Foundation
1351 # gives unlimited permission to copy and/or distribute it,
1352 # with or without modifications, as long as this notice is preserved.
1354 # AM_AUTOMAKE_VERSION(VERSION)
1355 # ----------------------------
1356 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1357 # generated from the m4 files accompanying Automake X.Y.
1358 # (This private macro should not be called outside this file.)
1359 AC_DEFUN([AM_AUTOMAKE_VERSION],
1360 [am__api_version='1.11'
1361 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1362 dnl require some minimum version. Point them to the right macro.
1363 m4_if([$1], [1.11.1], [],
1364 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1367 # _AM_AUTOCONF_VERSION(VERSION)
1368 # -----------------------------
1369 # aclocal traces this macro to find the Autoconf version.
1370 # This is a private macro too. Using m4_define simplifies
1371 # the logic in aclocal, which can simply ignore this definition.
1372 m4_define([_AM_AUTOCONF_VERSION], [])
1374 # AM_SET_CURRENT_AUTOMAKE_VERSION
1375 # -------------------------------
1376 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1377 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1378 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1379 [AM_AUTOMAKE_VERSION([1.11.1])dnl
1380 m4_ifndef([AC_AUTOCONF_VERSION],
1381 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1382 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1384 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
1386 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1388 # This file is free software; the Free Software Foundation
1389 # gives unlimited permission to copy and/or distribute it,
1390 # with or without modifications, as long as this notice is preserved.
1392 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1393 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
1394 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
1396 # Of course, Automake must honor this variable whenever it calls a
1397 # tool from the auxiliary directory. The problem is that $srcdir (and
1398 # therefore $ac_aux_dir as well) can be either absolute or relative,
1399 # depending on how configure is run. This is pretty annoying, since
1400 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
1401 # source directory, any form will work fine, but in subdirectories a
1402 # relative path needs to be adjusted first.
1404 # $ac_aux_dir/missing
1405 # fails when called from a subdirectory if $ac_aux_dir is relative
1406 # $top_srcdir/$ac_aux_dir/missing
1407 # fails if $ac_aux_dir is absolute,
1408 # fails when called from a subdirectory in a VPATH build with
1409 # a relative $ac_aux_dir
1411 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1412 # are both prefixed by $srcdir. In an in-source build this is usually
1413 # harmless because $srcdir is `.', but things will broke when you
1414 # start a VPATH build or use an absolute $srcdir.
1416 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1417 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1418 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1419 # and then we would define $MISSING as
1420 # MISSING="\${SHELL} $am_aux_dir/missing"
1421 # This will work as long as MISSING is not called from configure, because
1422 # unfortunately $(top_srcdir) has no meaning in configure.
1423 # However there are other variables, like CC, which are often used in
1424 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1426 # Another solution, used here, is to always expand $ac_aux_dir to an
1427 # absolute PATH. The drawback is that using absolute paths prevent a
1428 # configured tree to be moved without reconfiguration.
1430 AC_DEFUN([AM_AUX_DIR_EXPAND],
1431 [dnl Rely on autoconf to set up CDPATH properly.
1432 AC_PREREQ([2.50])dnl
1433 # expand $ac_aux_dir to an absolute path
1434 am_aux_dir=`cd $ac_aux_dir && pwd`
1437 # AM_CONDITIONAL -*- Autoconf -*-
1439 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
1440 # Free Software Foundation, Inc.
1442 # This file is free software; the Free Software Foundation
1443 # gives unlimited permission to copy and/or distribute it,
1444 # with or without modifications, as long as this notice is preserved.
1448 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1449 # -------------------------------------
1450 # Define a conditional.
1451 AC_DEFUN([AM_CONDITIONAL],
1453 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1454 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1455 AC_SUBST([$1_TRUE])dnl
1456 AC_SUBST([$1_FALSE])dnl
1457 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
1458 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
1459 m4_define([_AM_COND_VALUE_$1], [$2])dnl
1467 AC_CONFIG_COMMANDS_PRE(
1468 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1469 AC_MSG_ERROR([[conditional "$1" was never defined.
1470 Usually this means the macro was only invoked conditionally.]])
1473 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
1474 # Free Software Foundation, Inc.
1476 # This file is free software; the Free Software Foundation
1477 # gives unlimited permission to copy and/or distribute it,
1478 # with or without modifications, as long as this notice is preserved.
1482 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1483 # written in clear, in which case automake, when reading aclocal.m4,
1484 # will think it sees a *use*, and therefore will trigger all it's
1485 # C support machinery. Also note that it means that autoscan, seeing
1486 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1489 # _AM_DEPENDENCIES(NAME)
1490 # ----------------------
1491 # See how the compiler implements dependency checking.
1492 # NAME is "CC", "CXX", "GCJ", or "OBJC".
1493 # We try a few techniques and use that to set a single cache variable.
1495 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1496 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1497 # dependency, and given that the user is not expected to run this macro,
1498 # just rely on AC_PROG_CC.
1499 AC_DEFUN([_AM_DEPENDENCIES],
1500 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1501 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1502 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1503 AC_REQUIRE([AM_DEP_TRACK])dnl
1505 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1506 [$1], CXX, [depcc="$CXX" am_compiler_list=],
1507 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1508 [$1], UPC, [depcc="$UPC" am_compiler_list=],
1509 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1510 [depcc="$$1" am_compiler_list=])
1512 AC_CACHE_CHECK([dependency style of $depcc],
1513 [am_cv_$1_dependencies_compiler_type],
1514 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1515 # We make a subdir and do the tests there. Otherwise we can end up
1516 # making bogus files that we don't know about and never remove. For
1517 # instance it was reported that on HP-UX the gcc test will end up
1518 # making a dummy file named `D' -- because `-MD' means `put the output
1521 # Copy depcomp to subdir because otherwise we won't find it if we're
1522 # using a relative directory.
1523 cp "$am_depcomp" conftest.dir
1525 # We will build objects and dependencies in a subdirectory because
1526 # it helps to detect inapplicable dependency modes. For instance
1527 # both Tru64's cc and ICC support -MD to output dependencies as a
1528 # side effect of compilation, but ICC will put the dependencies in
1529 # the current directory while Tru64 will put them in the object
1533 am_cv_$1_dependencies_compiler_type=none
1534 if test "$am_compiler_list" = ""; then
1535 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1539 [case " $depcc " in #(
1540 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1543 [case " $depcc " in #(
1544 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1547 for depmode in $am_compiler_list; do
1548 # Setup a source with many dependencies, because some compilers
1549 # like to wrap large dependency lists on column 80 (with \), and
1550 # we should not choose a depcomp mode which is confused by this.
1552 # We need to recreate these files for each test, as the compiler may
1553 # overwrite some of them when testing with obscure command lines.
1554 # This happens at least with the AIX C compiler.
1556 for i in 1 2 3 4 5 6; do
1557 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1558 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1559 # Solaris 8's {/usr,}/bin/sh.
1560 touch sub/conftst$i.h
1562 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1564 # We check with `-c' and `-o' for the sake of the "dashmstdout"
1565 # mode. It turns out that the SunPro C++ compiler does not properly
1566 # handle `-M -o', and we need to detect this. Also, some Intel
1567 # versions had trouble with output in subdirs
1568 am__obj=sub/conftest.${OBJEXT-o}
1569 am__minus_obj="-o $am__obj"
1572 # This depmode causes a compiler race in universal mode.
1573 test "$am__universal" = false || continue
1576 # after this tag, mechanisms are not by side-effect, so they'll
1577 # only be used when explicitly requested
1578 if test "x$enable_dependency_tracking" = xyes; then
1584 msvisualcpp | msvcmsys)
1585 # This compiler won't grok `-c -o', but also, the minuso test has
1586 # not run yet. These depmodes are late enough in the game, and
1587 # so weak that their functioning should not be impacted.
1588 am__obj=conftest.${OBJEXT-o}
1593 if depmode=$depmode \
1594 source=sub/conftest.c object=$am__obj \
1595 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1596 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1597 >/dev/null 2>conftest.err &&
1598 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1599 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1600 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1601 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1602 # icc doesn't choke on unknown options, it will just issue warnings
1603 # or remarks (even with -Werror). So we grep stderr for any message
1604 # that says an option was ignored or not supported.
1605 # When given -MP, icc 7.0 and 7.1 complain thusly:
1606 # icc: Command line warning: ignoring option '-M'; no argument required
1607 # The diagnosis changed in icc 8.0:
1608 # icc: Command line remark: option '-MP' not supported
1609 if (grep 'ignoring option' conftest.err ||
1610 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1611 am_cv_$1_dependencies_compiler_type=$depmode
1620 am_cv_$1_dependencies_compiler_type=none
1623 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1624 AM_CONDITIONAL([am__fastdep$1], [
1625 test "x$enable_dependency_tracking" != xno \
1626 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1632 # Choose a directory name for dependency files.
1633 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1634 AC_DEFUN([AM_SET_DEPDIR],
1635 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1636 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1642 AC_DEFUN([AM_DEP_TRACK],
1643 [AC_ARG_ENABLE(dependency-tracking,
1644 [ --disable-dependency-tracking speeds up one-time build
1645 --enable-dependency-tracking do not reject slow dependency extractors])
1646 if test "x$enable_dependency_tracking" != xno; then
1647 am_depcomp="$ac_aux_dir/depcomp"
1650 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1651 AC_SUBST([AMDEPBACKSLASH])dnl
1652 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1655 # Generate code to set up dependency tracking. -*- Autoconf -*-
1657 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1658 # Free Software Foundation, Inc.
1660 # This file is free software; the Free Software Foundation
1661 # gives unlimited permission to copy and/or distribute it,
1662 # with or without modifications, as long as this notice is preserved.
1666 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1667 # ------------------------------
1668 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1670 # Autoconf 2.62 quotes --file arguments for eval, but not when files
1671 # are listed without --file. Let's play safe and only enable the eval
1672 # if we detect the quoting.
1673 case $CONFIG_FILES in
1674 *\'*) eval set x "$CONFIG_FILES" ;;
1675 *) set x $CONFIG_FILES ;;
1680 # Strip MF so we end up with the name of the file.
1681 mf=`echo "$mf" | sed -e 's/:.*$//'`
1682 # Check whether this is an Automake generated Makefile or not.
1683 # We used to match only the files named `Makefile.in', but
1684 # some people rename them; so instead we look at the file content.
1685 # Grep'ing the first line is not enough: some people post-process
1686 # each Makefile.in and add a new line on top of each file to say so.
1687 # Grep'ing the whole file is not good either: AIX grep has a line
1688 # limit of 2048, but all sed's we know have understand at least 4000.
1689 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1690 dirpart=`AS_DIRNAME("$mf")`
1694 # Extract the definition of DEPDIR, am__include, and am__quote
1695 # from the Makefile without running `make'.
1696 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1697 test -z "$DEPDIR" && continue
1698 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1699 test -z "am__include" && continue
1700 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1701 # When using ansi2knr, U may be empty or an underscore; expand it
1702 U=`sed -n 's/^U = //p' < "$mf"`
1703 # Find all dependency output files, they are included files with
1704 # $(DEPDIR) in their names. We invoke sed twice because it is the
1705 # simplest approach to changing $(DEPDIR) to its actual value in the
1707 for file in `sed -n "
1708 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1709 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1710 # Make sure the directory exists.
1711 test -f "$dirpart/$file" && continue
1712 fdir=`AS_DIRNAME(["$file"])`
1713 AS_MKDIR_P([$dirpart/$fdir])
1714 # echo "creating $dirpart/$file"
1715 echo '# dummy' > "$dirpart/$file"
1719 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1722 # AM_OUTPUT_DEPENDENCY_COMMANDS
1723 # -----------------------------
1724 # This macro should only be invoked once -- use via AC_REQUIRE.
1726 # This code is only required when automatic dependency tracking
1727 # is enabled. FIXME. This creates each `.P' file that we will
1728 # need in order to bootstrap the dependency handling code.
1729 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1730 [AC_CONFIG_COMMANDS([depfiles],
1731 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1732 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1735 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1736 # Free Software Foundation, Inc.
1738 # This file is free software; the Free Software Foundation
1739 # gives unlimited permission to copy and/or distribute it,
1740 # with or without modifications, as long as this notice is preserved.
1744 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
1745 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1747 # Do all the work for Automake. -*- Autoconf -*-
1749 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1750 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1752 # This file is free software; the Free Software Foundation
1753 # gives unlimited permission to copy and/or distribute it,
1754 # with or without modifications, as long as this notice is preserved.
1758 # This macro actually does too much. Some checks are only needed if
1759 # your package does certain things. But this isn't really a big deal.
1761 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1762 # AM_INIT_AUTOMAKE([OPTIONS])
1763 # -----------------------------------------------
1764 # The call with PACKAGE and VERSION arguments is the old style
1765 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1766 # and VERSION should now be passed to AC_INIT and removed from
1767 # the call to AM_INIT_AUTOMAKE.
1768 # We support both call styles for the transition. After
1769 # the next Automake release, Autoconf can make the AC_INIT
1770 # arguments mandatory, and then we can depend on a new Autoconf
1771 # release and drop the old call support.
1772 AC_DEFUN([AM_INIT_AUTOMAKE],
1773 [AC_PREREQ([2.62])dnl
1774 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1775 dnl the ones we care about.
1776 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1777 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1778 AC_REQUIRE([AC_PROG_INSTALL])dnl
1779 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1780 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1781 # is not polluted with repeated "-I."
1782 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1783 # test to see if srcdir already configured
1784 if test -f $srcdir/config.status; then
1785 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1789 # test whether we have cygpath
1790 if test -z "$CYGPATH_W"; then
1791 if (cygpath --version) >/dev/null 2>/dev/null; then
1792 CYGPATH_W='cygpath -w'
1797 AC_SUBST([CYGPATH_W])
1799 # Define the identity of the package.
1800 dnl Distinguish between old-style and new-style calls.
1802 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1803 AC_SUBST([PACKAGE], [$1])dnl
1804 AC_SUBST([VERSION], [$2])],
1805 [_AM_SET_OPTIONS([$1])dnl
1806 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1807 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1808 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1809 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1810 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1812 _AM_IF_OPTION([no-define],,
1813 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1814 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1816 # Some tools Automake needs.
1817 AC_REQUIRE([AM_SANITY_CHECK])dnl
1818 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1819 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1820 AM_MISSING_PROG(AUTOCONF, autoconf)
1821 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1822 AM_MISSING_PROG(AUTOHEADER, autoheader)
1823 AM_MISSING_PROG(MAKEINFO, makeinfo)
1824 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1825 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1826 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1827 # We need awk for the "check" target. The system "awk" is bad on
1829 AC_REQUIRE([AC_PROG_AWK])dnl
1830 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1831 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1832 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1833 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1834 [_AM_PROG_TAR([v7])])])
1835 _AM_IF_OPTION([no-dependencies],,
1836 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1837 [_AM_DEPENDENCIES(CC)],
1838 [define([AC_PROG_CC],
1839 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1840 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1841 [_AM_DEPENDENCIES(CXX)],
1842 [define([AC_PROG_CXX],
1843 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1844 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1845 [_AM_DEPENDENCIES(OBJC)],
1846 [define([AC_PROG_OBJC],
1847 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1849 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1850 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1851 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1852 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1853 AC_CONFIG_COMMANDS_PRE(dnl
1854 [m4_provide_if([_AM_COMPILER_EXEEXT],
1855 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1858 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1859 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1860 dnl mangled by Autoconf and run in a shell conditional statement.
1861 m4_define([_AC_COMPILER_EXEEXT],
1862 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1865 # When config.status generates a header, we must update the stamp-h file.
1866 # This file resides in the same directory as the config header
1867 # that is generated. The stamp files are numbered to have different names.
1869 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1870 # loop where config.status creates the headers, so we can generate
1871 # our stamp files there.
1872 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1873 [# Compute $1's index in $config_headers.
1876 for _am_header in $config_headers :; do
1878 $_am_arg | $_am_arg:* )
1881 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1884 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1886 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
1888 # This file is free software; the Free Software Foundation
1889 # gives unlimited permission to copy and/or distribute it,
1890 # with or without modifications, as long as this notice is preserved.
1892 # AM_PROG_INSTALL_SH
1893 # ------------------
1894 # Define $install_sh.
1895 AC_DEFUN([AM_PROG_INSTALL_SH],
1896 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1897 if test x"${install_sh}" != xset; then
1900 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1902 install_sh="\${SHELL} $am_aux_dir/install-sh"
1905 AC_SUBST(install_sh)])
1907 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1909 # This file is free software; the Free Software Foundation
1910 # gives unlimited permission to copy and/or distribute it,
1911 # with or without modifications, as long as this notice is preserved.
1915 # Check whether the underlying file-system supports filenames
1916 # with a leading dot. For instance MS-DOS doesn't.
1917 AC_DEFUN([AM_SET_LEADING_DOT],
1918 [rm -rf .tst 2>/dev/null
1919 mkdir .tst 2>/dev/null
1920 if test -d .tst; then
1925 rmdir .tst 2>/dev/null
1926 AC_SUBST([am__leading_dot])])
1928 # Check to see how 'make' treats includes. -*- Autoconf -*-
1930 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1932 # This file is free software; the Free Software Foundation
1933 # gives unlimited permission to copy and/or distribute it,
1934 # with or without modifications, as long as this notice is preserved.
1940 # Check to see how make treats includes.
1941 AC_DEFUN([AM_MAKE_INCLUDE],
1942 [am_make=${MAKE-make}
1943 cat > confinc << 'END'
1945 @echo this is the am__doit target
1948 # If we don't find an include directive, just comment out the code.
1949 AC_MSG_CHECKING([for style of include used by $am_make])
1953 # First try GNU make style include.
1954 echo "include confinc" > confmf
1955 # Ignore all kinds of additional output from `make'.
1956 case `$am_make -s -f confmf 2> /dev/null` in #(
1957 *the\ am__doit\ target*)
1963 # Now try BSD make style include.
1964 if test "$am__include" = "#"; then
1965 echo '.include "confinc"' > confmf
1966 case `$am_make -s -f confmf 2> /dev/null` in #(
1967 *the\ am__doit\ target*)
1968 am__include=.include
1974 AC_SUBST([am__include])
1975 AC_SUBST([am__quote])
1976 AC_MSG_RESULT([$_am_result])
1977 rm -f confinc confmf
1980 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
1981 # Free Software Foundation, Inc.
1983 # This file is free software; the Free Software Foundation
1984 # gives unlimited permission to copy and/or distribute it,
1985 # with or without modifications, as long as this notice is preserved.
1991 # Like AC_PROG_CC_C_O, but changed for automake.
1992 AC_DEFUN([AM_PROG_CC_C_O],
1993 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
1994 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1995 AC_REQUIRE_AUX_FILE([compile])dnl
1996 # FIXME: we rely on the cache variable name because
1997 # there is no other way.
1999 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
2000 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
2001 if test "$am_t" != yes; then
2002 # Losing compiler, so override with the script.
2003 # FIXME: It is wrong to rewrite CC.
2004 # But if we don't then we get into trouble of one sort or another.
2005 # A longer-term fix would be to have automake use am__CC in this case,
2006 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2007 CC="$am_aux_dir/compile $CC"
2009 dnl Make sure AC_PROG_CC is never called again, or it will override our
2011 m4_define([AC_PROG_CC],
2012 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
2015 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
2017 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
2018 # Free Software Foundation, Inc.
2020 # This file is free software; the Free Software Foundation
2021 # gives unlimited permission to copy and/or distribute it,
2022 # with or without modifications, as long as this notice is preserved.
2026 # AM_MISSING_PROG(NAME, PROGRAM)
2027 # ------------------------------
2028 AC_DEFUN([AM_MISSING_PROG],
2029 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2030 $1=${$1-"${am_missing_run}$2"}
2034 # AM_MISSING_HAS_RUN
2035 # ------------------
2036 # Define MISSING if not defined so far and test if it supports --run.
2037 # If it does, set am_missing_run to use it, otherwise, to nothing.
2038 AC_DEFUN([AM_MISSING_HAS_RUN],
2039 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2040 AC_REQUIRE_AUX_FILE([missing])dnl
2041 if test x"${MISSING+set}" != xset; then
2044 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2046 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2049 # Use eval to expand $SHELL
2050 if eval "$MISSING --run true"; then
2051 am_missing_run="$MISSING --run "
2054 AC_MSG_WARN([`missing' script is too old or missing])
2058 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
2060 # This file is free software; the Free Software Foundation
2061 # gives unlimited permission to copy and/or distribute it,
2062 # with or without modifications, as long as this notice is preserved.
2066 # Check for `mkdir -p'.
2067 AC_DEFUN([AM_PROG_MKDIR_P],
2068 [AC_PREREQ([2.60])dnl
2069 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
2070 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
2071 dnl while keeping a definition of mkdir_p for backward compatibility.
2072 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
2073 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
2074 dnl Makefile.ins that do not define MKDIR_P, so we do our own
2075 dnl adjustment using top_builddir (which is defined more often than
2077 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
2079 [[\\/$]]* | ?:[[\\/]]*) ;;
2080 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2084 # Helper functions for option handling. -*- Autoconf -*-
2086 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
2088 # This file is free software; the Free Software Foundation
2089 # gives unlimited permission to copy and/or distribute it,
2090 # with or without modifications, as long as this notice is preserved.
2094 # _AM_MANGLE_OPTION(NAME)
2095 # -----------------------
2096 AC_DEFUN([_AM_MANGLE_OPTION],
2097 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2099 # _AM_SET_OPTION(NAME)
2100 # ------------------------------
2101 # Set option NAME. Presently that only means defining a flag for this option.
2102 AC_DEFUN([_AM_SET_OPTION],
2103 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
2105 # _AM_SET_OPTIONS(OPTIONS)
2106 # ----------------------------------
2107 # OPTIONS is a space-separated list of Automake options.
2108 AC_DEFUN([_AM_SET_OPTIONS],
2109 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2111 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2112 # -------------------------------------------
2113 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2114 AC_DEFUN([_AM_IF_OPTION],
2115 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2117 # Check to make sure that the build environment is sane. -*- Autoconf -*-
2119 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
2120 # Free Software Foundation, Inc.
2122 # This file is free software; the Free Software Foundation
2123 # gives unlimited permission to copy and/or distribute it,
2124 # with or without modifications, as long as this notice is preserved.
2130 AC_DEFUN([AM_SANITY_CHECK],
2131 [AC_MSG_CHECKING([whether build environment is sane])
2134 echo timestamp > conftest.file
2135 # Reject unsafe characters in $srcdir or the absolute working directory
2136 # name. Accept space and tab only in the latter.
2140 *[[\\\"\#\$\&\'\`$am_lf]]*)
2141 AC_MSG_ERROR([unsafe absolute working directory name]);;
2144 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
2145 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
2148 # Do `set' in a subshell so we don't clobber the current shell's
2149 # arguments. Must try -L first in case configure is actually a
2150 # symlink; some systems play weird games with the mod time of symlinks
2151 # (eg FreeBSD returns the mod time of the symlink's containing
2154 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2155 if test "$[*]" = "X"; then
2157 set X `ls -t "$srcdir/configure" conftest.file`
2160 if test "$[*]" != "X $srcdir/configure conftest.file" \
2161 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2163 # If neither matched, then we have a broken ls. This can happen
2164 # if, for instance, CONFIG_SHELL is bash and it inherits a
2165 # broken ls alias from the environment. This has actually
2166 # happened. Such a system could not be considered "sane".
2167 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2168 alias in your environment])
2171 test "$[2]" = conftest.file
2177 AC_MSG_ERROR([newly created file is older than distributed files!
2178 Check your system clock])
2180 AC_MSG_RESULT(yes)])
2182 # Copyright (C) 2009 Free Software Foundation, Inc.
2184 # This file is free software; the Free Software Foundation
2185 # gives unlimited permission to copy and/or distribute it,
2186 # with or without modifications, as long as this notice is preserved.
2190 # AM_SILENT_RULES([DEFAULT])
2191 # --------------------------
2192 # Enable less verbose build rules; with the default set to DEFAULT
2193 # (`yes' being less verbose, `no' or empty being verbose).
2194 AC_DEFUN([AM_SILENT_RULES],
2195 [AC_ARG_ENABLE([silent-rules],
2196 [ --enable-silent-rules less verbose build output (undo: `make V=1')
2197 --disable-silent-rules verbose build output (undo: `make V=0')])
2198 case $enable_silent_rules in
2199 yes) AM_DEFAULT_VERBOSITY=0;;
2200 no) AM_DEFAULT_VERBOSITY=1;;
2201 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2203 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2205 AC_SUBST([AM_BACKSLASH])dnl
2206 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2209 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
2211 # This file is free software; the Free Software Foundation
2212 # gives unlimited permission to copy and/or distribute it,
2213 # with or without modifications, as long as this notice is preserved.
2215 # AM_PROG_INSTALL_STRIP
2216 # ---------------------
2217 # One issue with vendor `install' (even GNU) is that you can't
2218 # specify the program used to strip binaries. This is especially
2219 # annoying in cross-compiling environments, where the build's strip
2220 # is unlikely to handle the host's binaries.
2221 # Fortunately install-sh will honor a STRIPPROG variable, so we
2222 # always use install-sh in `make install-strip', and initialize
2223 # STRIPPROG with the value of the STRIP variable (set by the user).
2224 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2225 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2226 # Installed binaries are usually stripped using `strip' when the user
2227 # run `make install-strip'. However `strip' might not be the right
2228 # tool to use in cross-compilation environments, therefore Automake
2229 # will honor the `STRIP' environment variable to overrule this program.
2230 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2231 if test "$cross_compiling" != no; then
2232 AC_CHECK_TOOL([STRIP], [strip], :)
2234 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2235 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2237 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
2239 # This file is free software; the Free Software Foundation
2240 # gives unlimited permission to copy and/or distribute it,
2241 # with or without modifications, as long as this notice is preserved.
2245 # _AM_SUBST_NOTMAKE(VARIABLE)
2246 # ---------------------------
2247 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2248 # This macro is traced by Automake.
2249 AC_DEFUN([_AM_SUBST_NOTMAKE])
2251 # AM_SUBST_NOTMAKE(VARIABLE)
2252 # ---------------------------
2253 # Public sister of _AM_SUBST_NOTMAKE.
2254 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2256 # Check how to create a tarball. -*- Autoconf -*-
2258 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
2260 # This file is free software; the Free Software Foundation
2261 # gives unlimited permission to copy and/or distribute it,
2262 # with or without modifications, as long as this notice is preserved.
2266 # _AM_PROG_TAR(FORMAT)
2267 # --------------------
2268 # Check how to create a tarball in format FORMAT.
2269 # FORMAT should be one of `v7', `ustar', or `pax'.
2271 # Substitute a variable $(am__tar) that is a command
2272 # writing to stdout a FORMAT-tarball containing the directory
2274 # tardir=directory && $(am__tar) > result.tar
2276 # Substitute a variable $(am__untar) that extract such
2277 # a tarball read from stdin.
2278 # $(am__untar) < result.tar
2279 AC_DEFUN([_AM_PROG_TAR],
2280 [# Always define AMTAR for backward compatibility.
2281 AM_MISSING_PROG([AMTAR], [tar])
2283 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
2284 [m4_case([$1], [ustar],, [pax],,
2285 [m4_fatal([Unknown tar format])])
2286 AC_MSG_CHECKING([how to create a $1 tar archive])
2287 # Loop over all known methods to create a tar archive until one works.
2288 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2289 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2290 # Do not fold the above two line into one, because Tru64 sh and
2291 # Solaris sh will not grok spaces in the rhs of `-'.
2292 for _am_tool in $_am_tools
2296 for _am_tar in tar gnutar gtar;
2298 AM_RUN_LOG([$_am_tar --version]) && break
2300 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2301 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2302 am__untar="$_am_tar -xf -"
2305 # Must skip GNU tar: if it does not support --format= it doesn't create
2306 # ustar tarball either.
2307 (tar --version) >/dev/null 2>&1 && continue
2308 am__tar='tar chf - "$$tardir"'
2309 am__tar_='tar chf - "$tardir"'
2310 am__untar='tar xf -'
2313 am__tar='pax -L -x $1 -w "$$tardir"'
2314 am__tar_='pax -L -x $1 -w "$tardir"'
2318 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2319 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2320 am__untar='cpio -i -H $1 -d'
2329 # If the value was cached, stop now. We just wanted to have am__tar
2330 # and am__untar set.
2331 test -n "${am_cv_prog_tar_$1}" && break
2333 # tar/untar a dummy directory, and stop if the command works
2336 echo GrepMe > conftest.dir/file
2337 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2339 if test -s conftest.tar; then
2340 AM_RUN_LOG([$am__untar <conftest.tar])
2341 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2346 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2347 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2349 AC_SUBST([am__untar])
2352 m4_include([m4/libtool.m4])
2353 m4_include([m4/ltoptions.m4])
2354 m4_include([m4/ltsugar.m4])
2355 m4_include([m4/ltversion.m4])
2356 m4_include([m4/lt~obsolete.m4])