1 # generated automatically by aclocal 1.12 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15 m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf. It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
23 # lib-ld.m4 serial 4 (gettext-0.18)
24 dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
25 dnl This file is free software; the Free Software Foundation
26 dnl gives unlimited permission to copy and/or distribute it,
27 dnl with or without modifications, as long as this notice is preserved.
29 dnl Subroutines of libtool.m4,
30 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
33 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
34 AC_DEFUN([AC_LIB_PROG_LD_GNU],
35 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
36 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
37 case `$LD -v 2>&1 </dev/null` in
39 acl_cv_prog_gnu_ld=yes ;;
41 acl_cv_prog_gnu_ld=no ;;
43 with_gnu_ld=$acl_cv_prog_gnu_ld
46 dnl From libtool-1.4. Sets the variable LD.
47 AC_DEFUN([AC_LIB_PROG_LD],
48 [AC_ARG_WITH([gnu-ld],
49 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
50 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
51 AC_REQUIRE([AC_PROG_CC])dnl
52 AC_REQUIRE([AC_CANONICAL_HOST])dnl
53 # Prepare PATH_SEPARATOR.
54 # The user is always right.
55 if test "${PATH_SEPARATOR+set}" != set; then
56 echo "#! /bin/sh" >conf$$.sh
57 echo "exit 0" >>conf$$.sh
59 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
67 if test "$GCC" = yes; then
68 # Check if gcc -print-prog-name=ld gives a path.
69 AC_MSG_CHECKING([for ld used by GCC])
72 # gcc leaves a trailing carriage return which upsets mingw
73 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
75 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
78 # Accept absolute paths.
79 [[\\/]* | [A-Za-z]:[\\/]*)]
80 [re_direlt='/[^/][^/]*/\.\./']
81 # Canonicalize the path of ld
82 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
83 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
84 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
86 test -z "$LD" && LD="$ac_prog"
89 # If it fails, then pretend we aren't using GCC.
93 # If it is relative, then search for the first ld in PATH.
97 elif test "$with_gnu_ld" = yes; then
98 AC_MSG_CHECKING([for GNU ld])
100 AC_MSG_CHECKING([for non-GNU ld])
102 AC_CACHE_VAL([acl_cv_path_LD],
103 [if test -z "$LD"; then
104 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
105 for ac_dir in $PATH; do
106 test -z "$ac_dir" && ac_dir=.
107 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
108 acl_cv_path_LD="$ac_dir/$ac_prog"
109 # Check to see if the program is GNU ld. I'd rather use --version,
110 # but apparently some GNU ld's only accept -v.
111 # Break only if it was the GNU/non-GNU ld that we prefer.
112 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
113 *GNU* | *'with BFD'*)
114 test "$with_gnu_ld" != no && break ;;
116 test "$with_gnu_ld" != yes && break ;;
122 acl_cv_path_LD="$LD" # Let the user override the test with a path.
125 if test -n "$LD"; then
130 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
134 # lib-link.m4 serial 21 (gettext-0.18)
135 dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
136 dnl This file is free software; the Free Software Foundation
137 dnl gives unlimited permission to copy and/or distribute it,
138 dnl with or without modifications, as long as this notice is preserved.
140 dnl From Bruno Haible.
144 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
145 dnl the libraries corresponding to explicit and implicit dependencies.
146 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
147 dnl augments the CPPFLAGS variable.
148 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
149 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
150 AC_DEFUN([AC_LIB_LINKFLAGS],
152 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
153 AC_REQUIRE([AC_LIB_RPATH])
154 pushdef([Name],[translit([$1],[./-], [___])])
155 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
156 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
157 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
158 AC_LIB_LINKFLAGS_BODY([$1], [$2])
159 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
160 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
161 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
162 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
164 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
165 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
166 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
167 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
168 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
170 AC_SUBST([LTLIB]NAME)
171 AC_SUBST([LIB]NAME[_PREFIX])
172 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
173 dnl results of this search when this library appears as a dependency.
179 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
180 dnl searches for libname and the libraries corresponding to explicit and
181 dnl implicit dependencies, together with the specified include files and
182 dnl the ability to compile and link the specified testcode. The missing-message
183 dnl defaults to 'no' and may contain additional hints for the user.
184 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
185 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
186 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
187 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
188 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
189 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
190 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
192 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
193 AC_REQUIRE([AC_LIB_RPATH])
194 pushdef([Name],[translit([$1],[./-], [___])])
195 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
196 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
198 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
200 AC_LIB_LINKFLAGS_BODY([$1], [$2])
202 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
203 dnl because if the user has installed lib[]Name and not disabled its use
204 dnl via --without-lib[]Name-prefix, he wants to use it.
205 ac_save_CPPFLAGS="$CPPFLAGS"
206 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
208 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
210 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
211 dnl because these -l options might require -L options that are present in
212 dnl LIBS. -l options benefit only from the -L options listed before it.
213 dnl Otherwise, add it to the front of LIBS, because it may be a static
214 dnl library that depends on another static library that is present in LIBS.
215 dnl Static libraries benefit only from the static libraries listed after
217 case " $LIB[]NAME" in
218 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
219 *) LIBS="$LIB[]NAME $LIBS" ;;
221 AC_TRY_LINK([$3], [$4],
222 [ac_cv_lib[]Name=yes],
223 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
226 if test "$ac_cv_lib[]Name" = yes; then
228 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
229 AC_MSG_CHECKING([how to link with lib[]$1])
230 AC_MSG_RESULT([$LIB[]NAME])
233 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
234 dnl $INC[]NAME either.
235 CPPFLAGS="$ac_save_CPPFLAGS"
240 AC_SUBST([HAVE_LIB]NAME)
242 AC_SUBST([LTLIB]NAME)
243 AC_SUBST([LIB]NAME[_PREFIX])
248 dnl Determine the platform dependent parameters needed to use rpath:
251 dnl acl_hardcode_libdir_flag_spec,
252 dnl acl_hardcode_libdir_separator,
253 dnl acl_hardcode_direct,
254 dnl acl_hardcode_minus_L.
255 AC_DEFUN([AC_LIB_RPATH],
257 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
258 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
259 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
260 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
261 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
262 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
263 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
264 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
265 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
271 acl_libext="$acl_cv_libext"
272 acl_shlibext="$acl_cv_shlibext"
273 acl_libname_spec="$acl_cv_libname_spec"
274 acl_library_names_spec="$acl_cv_library_names_spec"
275 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
276 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
277 acl_hardcode_direct="$acl_cv_hardcode_direct"
278 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
279 dnl Determine whether the user wants rpath handling at all.
280 AC_ARG_ENABLE([rpath],
281 [ --disable-rpath do not hardcode runtime library paths],
285 dnl AC_LIB_FROMPACKAGE(name, package)
286 dnl declares that libname comes from the given package. The configure file
287 dnl will then not have a --with-libname-prefix option but a
288 dnl --with-package-prefix option. Several libraries can come from the same
289 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
290 dnl macro call that searches for libname.
291 AC_DEFUN([AC_LIB_FROMPACKAGE],
293 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
294 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
295 define([acl_frompackage_]NAME, [$2])
298 pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
299 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
300 define([acl_libsinpackage_]PACKUP,
301 m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
306 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
307 dnl the libraries corresponding to explicit and implicit dependencies.
308 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
309 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
310 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
311 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
313 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
314 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
315 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
316 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
317 pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
318 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
319 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
320 dnl Autoconf >= 2.61 supports dots in --with options.
321 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
322 dnl By default, look in $includedir and $libdir.
324 AC_LIB_WITH_FINAL_PREFIX([
325 eval additional_includedir=\"$includedir\"
326 eval additional_libdir=\"$libdir\"
328 AC_ARG_WITH(P_A_C_K[-prefix],
329 [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
330 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
332 if test "X$withval" = "Xno"; then
335 if test "X$withval" = "X"; then
336 AC_LIB_WITH_FINAL_PREFIX([
337 eval additional_includedir=\"$includedir\"
338 eval additional_libdir=\"$libdir\"
341 additional_includedir="$withval/include"
342 additional_libdir="$withval/$acl_libdirstem"
343 if test "$acl_libdirstem2" != "$acl_libdirstem" \
344 && ! test -d "$withval/$acl_libdirstem"; then
345 additional_libdir="$withval/$acl_libdirstem2"
350 dnl Search the library and its dependencies in $additional_libdir and
351 dnl $LDFLAGS. Using breadth-first-seach.
356 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
357 dnl computed. So it has to be reset here.
361 names_already_handled=
362 names_next_round='$1 $2'
363 while test -n "$names_next_round"; do
364 names_this_round="$names_next_round"
366 for name in $names_this_round; do
368 for n in $names_already_handled; do
369 if test "$n" = "$name"; then
374 if test -z "$already_handled"; then
375 names_already_handled="$names_already_handled $name"
376 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
377 dnl or AC_LIB_HAVE_LINKFLAGS call.
378 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
379 eval value=\"\$HAVE_LIB$uppername\"
380 if test -n "$value"; then
381 if test "$value" = yes; then
382 eval value=\"\$LIB$uppername\"
383 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
384 eval value=\"\$LTLIB$uppername\"
385 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
387 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
388 dnl that this library doesn't exist. So just drop it.
392 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
393 dnl and the already constructed $LIBNAME/$LTLIBNAME.
398 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
399 if test -n "$acl_shlibext"; then
400 shrext=".$acl_shlibext" # typically: shrext=.so
404 if test $use_additional = yes; then
405 dir="$additional_libdir"
406 dnl The same code as in the loop below:
407 dnl First look for a shared library.
408 if test -n "$acl_shlibext"; then
409 if test -f "$dir/$libname$shrext"; then
411 found_so="$dir/$libname$shrext"
413 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
415 for f in "$libname$shrext".*; do echo "$f"; done \
416 | sed -e "s,^$libname$shrext\\\\.,," \
417 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
418 | sed 1q ) 2>/dev/null`
419 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
421 found_so="$dir/$libname$shrext.$ver"
424 eval library_names=\"$acl_library_names_spec\"
425 for f in $library_names; do
426 if test -f "$dir/$f"; then
435 dnl Then look for a static library.
436 if test "X$found_dir" = "X"; then
437 if test -f "$dir/$libname.$acl_libext"; then
439 found_a="$dir/$libname.$acl_libext"
442 if test "X$found_dir" != "X"; then
443 if test -f "$dir/$libname.la"; then
444 found_la="$dir/$libname.la"
448 if test "X$found_dir" = "X"; then
449 for x in $LDFLAGS $LTLIB[]NAME; do
450 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
453 dir=`echo "X$x" | sed -e 's/^X-L//'`
454 dnl First look for a shared library.
455 if test -n "$acl_shlibext"; then
456 if test -f "$dir/$libname$shrext"; then
458 found_so="$dir/$libname$shrext"
460 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
462 for f in "$libname$shrext".*; do echo "$f"; done \
463 | sed -e "s,^$libname$shrext\\\\.,," \
464 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
465 | sed 1q ) 2>/dev/null`
466 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
468 found_so="$dir/$libname$shrext.$ver"
471 eval library_names=\"$acl_library_names_spec\"
472 for f in $library_names; do
473 if test -f "$dir/$f"; then
482 dnl Then look for a static library.
483 if test "X$found_dir" = "X"; then
484 if test -f "$dir/$libname.$acl_libext"; then
486 found_a="$dir/$libname.$acl_libext"
489 if test "X$found_dir" != "X"; then
490 if test -f "$dir/$libname.la"; then
491 found_la="$dir/$libname.la"
496 if test "X$found_dir" != "X"; then
501 if test "X$found_dir" != "X"; then
502 dnl Found the library.
503 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
504 if test "X$found_so" != "X"; then
505 dnl Linking with a shared library. We attempt to hardcode its
506 dnl directory into the executable's runpath, unless it's the
507 dnl standard /usr/lib.
508 if test "$enable_rpath" = no \
509 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
510 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
511 dnl No hardcoding is needed.
512 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
514 dnl Use an explicit option to hardcode DIR into the resulting
516 dnl Potentially add DIR to ltrpathdirs.
517 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
519 for x in $ltrpathdirs; do
520 if test "X$x" = "X$found_dir"; then
525 if test -z "$haveit"; then
526 ltrpathdirs="$ltrpathdirs $found_dir"
528 dnl The hardcoding into $LIBNAME is system dependent.
529 if test "$acl_hardcode_direct" = yes; then
530 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
531 dnl resulting binary.
532 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
534 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
535 dnl Use an explicit option to hardcode DIR into the resulting
537 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
538 dnl Potentially add DIR to rpathdirs.
539 dnl The rpathdirs will be appended to $LIBNAME at the end.
541 for x in $rpathdirs; do
542 if test "X$x" = "X$found_dir"; then
547 if test -z "$haveit"; then
548 rpathdirs="$rpathdirs $found_dir"
551 dnl Rely on "-L$found_dir".
552 dnl But don't add it if it's already contained in the LDFLAGS
553 dnl or the already constructed $LIBNAME
555 for x in $LDFLAGS $LIB[]NAME; do
556 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
557 if test "X$x" = "X-L$found_dir"; then
562 if test -z "$haveit"; then
563 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
565 if test "$acl_hardcode_minus_L" != no; then
566 dnl FIXME: Not sure whether we should use
567 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
569 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
571 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
572 dnl here, because this doesn't fit in flags passed to the
573 dnl compiler. So give up. No hardcoding. This affects only
574 dnl very old systems.
575 dnl FIXME: Not sure whether we should use
576 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
578 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
584 if test "X$found_a" != "X"; then
585 dnl Linking with a static library.
586 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
588 dnl We shouldn't come here, but anyway it's good to have a
590 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
593 dnl Assume the include files are nearby.
594 additional_includedir=
596 */$acl_libdirstem | */$acl_libdirstem/)
597 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
598 if test "$name" = '$1'; then
599 LIB[]NAME[]_PREFIX="$basedir"
601 additional_includedir="$basedir/include"
603 */$acl_libdirstem2 | */$acl_libdirstem2/)
604 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
605 if test "$name" = '$1'; then
606 LIB[]NAME[]_PREFIX="$basedir"
608 additional_includedir="$basedir/include"
611 if test "X$additional_includedir" != "X"; then
612 dnl Potentially add $additional_includedir to $INCNAME.
614 dnl 1. if it's the standard /usr/include,
615 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
616 dnl 3. if it's already present in $CPPFLAGS or the already
617 dnl constructed $INCNAME,
618 dnl 4. if it doesn't exist as a directory.
619 if test "X$additional_includedir" != "X/usr/include"; then
621 if test "X$additional_includedir" = "X/usr/local/include"; then
622 if test -n "$GCC"; then
624 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
628 if test -z "$haveit"; then
629 for x in $CPPFLAGS $INC[]NAME; do
630 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
631 if test "X$x" = "X-I$additional_includedir"; then
636 if test -z "$haveit"; then
637 if test -d "$additional_includedir"; then
638 dnl Really add $additional_includedir to $INCNAME.
639 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
645 dnl Look for dependencies.
646 if test -n "$found_la"; then
647 dnl Read the .la file. It defines the variables
648 dnl dlname, library_names, old_library, dependency_libs, current,
649 dnl age, revision, installed, dlopen, dlpreopen, libdir.
650 save_libdir="$libdir"
652 */* | *\\*) . "$found_la" ;;
653 *) . "./$found_la" ;;
655 libdir="$save_libdir"
656 dnl We use only dependency_libs.
657 for dep in $dependency_libs; do
660 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
661 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
663 dnl 1. if it's the standard /usr/lib,
664 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
665 dnl 3. if it's already present in $LDFLAGS or the already
666 dnl constructed $LIBNAME,
667 dnl 4. if it doesn't exist as a directory.
668 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
669 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
671 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
672 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
673 if test -n "$GCC"; then
675 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
679 if test -z "$haveit"; then
681 for x in $LDFLAGS $LIB[]NAME; do
682 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
683 if test "X$x" = "X-L$additional_libdir"; then
688 if test -z "$haveit"; then
689 if test -d "$additional_libdir"; then
690 dnl Really add $additional_libdir to $LIBNAME.
691 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
695 for x in $LDFLAGS $LTLIB[]NAME; do
696 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
697 if test "X$x" = "X-L$additional_libdir"; then
702 if test -z "$haveit"; then
703 if test -d "$additional_libdir"; then
704 dnl Really add $additional_libdir to $LTLIBNAME.
705 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
712 dir=`echo "X$dep" | sed -e 's/^X-R//'`
713 if test "$enable_rpath" != no; then
714 dnl Potentially add DIR to rpathdirs.
715 dnl The rpathdirs will be appended to $LIBNAME at the end.
717 for x in $rpathdirs; do
718 if test "X$x" = "X$dir"; then
723 if test -z "$haveit"; then
724 rpathdirs="$rpathdirs $dir"
726 dnl Potentially add DIR to ltrpathdirs.
727 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
729 for x in $ltrpathdirs; do
730 if test "X$x" = "X$dir"; then
735 if test -z "$haveit"; then
736 ltrpathdirs="$ltrpathdirs $dir"
741 dnl Handle this in the next round.
742 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
745 dnl Handle this in the next round. Throw away the .la's
746 dnl directory; it is already contained in a preceding -L
748 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
751 dnl Most likely an immediate library name.
752 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
753 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
759 dnl Didn't find the library; assume it is in the system directories
760 dnl known to the linker and runtime loader. (All the system
761 dnl directories known to the linker should also be known to the
762 dnl runtime loader, otherwise the system is severely misconfigured.)
763 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
764 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
770 if test "X$rpathdirs" != "X"; then
771 if test -n "$acl_hardcode_libdir_separator"; then
772 dnl Weird platform: only the last -rpath option counts, the user must
773 dnl pass all path elements in one option. We can arrange that for a
774 dnl single library, but not when more than one $LIBNAMEs are used.
776 for found_dir in $rpathdirs; do
777 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
779 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
780 acl_save_libdir="$libdir"
782 eval flag=\"$acl_hardcode_libdir_flag_spec\"
783 libdir="$acl_save_libdir"
784 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
786 dnl The -rpath options are cumulative.
787 for found_dir in $rpathdirs; do
788 acl_save_libdir="$libdir"
790 eval flag=\"$acl_hardcode_libdir_flag_spec\"
791 libdir="$acl_save_libdir"
792 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
796 if test "X$ltrpathdirs" != "X"; then
797 dnl When using libtool, the option that works for both libraries and
798 dnl executables is -R. The -R options are cumulative.
799 for found_dir in $ltrpathdirs; do
800 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
810 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
811 dnl unless already present in VAR.
812 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
813 dnl contains two or three consecutive elements that belong together.
814 AC_DEFUN([AC_LIB_APPENDTOVAR],
816 for element in [$2]; do
819 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
820 if test "X$x" = "X$element"; then
825 if test -z "$haveit"; then
826 [$1]="${[$1]}${[$1]:+ }$element"
831 dnl For those cases where a variable contains several -L and -l options
832 dnl referring to unknown libraries and directories, this macro determines the
833 dnl necessary additional linker options for the runtime path.
834 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
835 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
836 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
837 dnl otherwise linking without libtool is assumed.
838 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
840 AC_REQUIRE([AC_LIB_RPATH])
841 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
843 if test "$enable_rpath" != no; then
844 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
845 dnl Use an explicit option to hardcode directories into the resulting
850 if test -n "$next"; then
852 dnl No need to hardcode the standard /usr/lib.
853 if test "X$dir" != "X/usr/$acl_libdirstem" \
854 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
855 rpathdirs="$rpathdirs $dir"
861 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
862 dnl No need to hardcode the standard /usr/lib.
863 if test "X$dir" != "X/usr/$acl_libdirstem" \
864 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
865 rpathdirs="$rpathdirs $dir"
872 if test "X$rpathdirs" != "X"; then
873 if test -n ""$3""; then
874 dnl libtool is used for linking. Use -R options.
875 for dir in $rpathdirs; do
876 $1="${$1}${$1:+ }-R$dir"
879 dnl The linker is used for linking directly.
880 if test -n "$acl_hardcode_libdir_separator"; then
881 dnl Weird platform: only the last -rpath option counts, the user
882 dnl must pass all path elements in one option.
884 for dir in $rpathdirs; do
885 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
887 acl_save_libdir="$libdir"
889 eval flag=\"$acl_hardcode_libdir_flag_spec\"
890 libdir="$acl_save_libdir"
893 dnl The -rpath options are cumulative.
894 for dir in $rpathdirs; do
895 acl_save_libdir="$libdir"
897 eval flag=\"$acl_hardcode_libdir_flag_spec\"
898 libdir="$acl_save_libdir"
899 $1="${$1}${$1:+ }$flag"
909 # lib-prefix.m4 serial 7 (gettext-0.18)
910 dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
911 dnl This file is free software; the Free Software Foundation
912 dnl gives unlimited permission to copy and/or distribute it,
913 dnl with or without modifications, as long as this notice is preserved.
915 dnl From Bruno Haible.
917 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
918 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
919 dnl require excessive bracketing.
920 ifdef([AC_HELP_STRING],
921 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
922 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
924 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
925 dnl to access previously installed libraries. The basic assumption is that
926 dnl a user will want packages to use other packages he previously installed
927 dnl with the same --prefix option.
928 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
929 dnl libraries, but is otherwise very convenient.
930 AC_DEFUN([AC_LIB_PREFIX],
932 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
933 AC_REQUIRE([AC_PROG_CC])
934 AC_REQUIRE([AC_CANONICAL_HOST])
935 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
936 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
937 dnl By default, look in $includedir and $libdir.
939 AC_LIB_WITH_FINAL_PREFIX([
940 eval additional_includedir=\"$includedir\"
941 eval additional_libdir=\"$libdir\"
943 AC_LIB_ARG_WITH([lib-prefix],
944 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
945 --without-lib-prefix don't search for libraries in includedir and libdir],
947 if test "X$withval" = "Xno"; then
950 if test "X$withval" = "X"; then
951 AC_LIB_WITH_FINAL_PREFIX([
952 eval additional_includedir=\"$includedir\"
953 eval additional_libdir=\"$libdir\"
956 additional_includedir="$withval/include"
957 additional_libdir="$withval/$acl_libdirstem"
961 if test $use_additional = yes; then
962 dnl Potentially add $additional_includedir to $CPPFLAGS.
964 dnl 1. if it's the standard /usr/include,
965 dnl 2. if it's already present in $CPPFLAGS,
966 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
967 dnl 4. if it doesn't exist as a directory.
968 if test "X$additional_includedir" != "X/usr/include"; then
970 for x in $CPPFLAGS; do
971 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
972 if test "X$x" = "X-I$additional_includedir"; then
977 if test -z "$haveit"; then
978 if test "X$additional_includedir" = "X/usr/local/include"; then
979 if test -n "$GCC"; then
981 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
985 if test -z "$haveit"; then
986 if test -d "$additional_includedir"; then
987 dnl Really add $additional_includedir to $CPPFLAGS.
988 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
993 dnl Potentially add $additional_libdir to $LDFLAGS.
995 dnl 1. if it's the standard /usr/lib,
996 dnl 2. if it's already present in $LDFLAGS,
997 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
998 dnl 4. if it doesn't exist as a directory.
999 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1001 for x in $LDFLAGS; do
1002 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1003 if test "X$x" = "X-L$additional_libdir"; then
1008 if test -z "$haveit"; then
1009 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1010 if test -n "$GCC"; then
1012 linux*) haveit=yes;;
1016 if test -z "$haveit"; then
1017 if test -d "$additional_libdir"; then
1018 dnl Really add $additional_libdir to $LDFLAGS.
1019 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1027 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1028 dnl acl_final_exec_prefix, containing the values to which $prefix and
1029 dnl $exec_prefix will expand at the end of the configure script.
1030 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1032 dnl Unfortunately, prefix and exec_prefix get only finally determined
1033 dnl at the end of configure.
1034 if test "X$prefix" = "XNONE"; then
1035 acl_final_prefix="$ac_default_prefix"
1037 acl_final_prefix="$prefix"
1039 if test "X$exec_prefix" = "XNONE"; then
1040 acl_final_exec_prefix='${prefix}'
1042 acl_final_exec_prefix="$exec_prefix"
1044 acl_save_prefix="$prefix"
1045 prefix="$acl_final_prefix"
1046 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1047 prefix="$acl_save_prefix"
1050 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1051 dnl variables prefix and exec_prefix bound to the values they will have
1052 dnl at the end of the configure script.
1053 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1055 acl_save_prefix="$prefix"
1056 prefix="$acl_final_prefix"
1057 acl_save_exec_prefix="$exec_prefix"
1058 exec_prefix="$acl_final_exec_prefix"
1060 exec_prefix="$acl_save_exec_prefix"
1061 prefix="$acl_save_prefix"
1064 dnl AC_LIB_PREPARE_MULTILIB creates
1065 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1066 dnl "lib" or "lib64" or "lib/64",
1067 dnl - a variable acl_libdirstem2, as a secondary possible value for
1068 dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1070 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1072 dnl There is no formal standard regarding lib and lib64.
1073 dnl On glibc systems, the current practice is that on a system supporting
1074 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1075 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1076 dnl the compiler's default mode by looking at the compiler's library search
1077 dnl path. If at least one of its elements ends in /lib64 or points to a
1078 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1079 dnl Otherwise we use the default, namely "lib".
1080 dnl On Solaris systems, the current practice is that on a system supporting
1081 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1082 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1083 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1084 AC_REQUIRE([AC_CANONICAL_HOST])
1089 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1090 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1091 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1092 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1093 dnl symlink is missing, so we set acl_libdirstem2 too.
1094 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1095 [AC_EGREP_CPP([sixtyfour bits], [
1099 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1101 if test $gl_cv_solaris_64bit = yes; then
1102 acl_libdirstem=lib/64
1104 sparc*) acl_libdirstem2=lib/sparcv9 ;;
1105 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1110 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1111 if test -n "$searchpath"; then
1112 acl_save_IFS="${IFS= }"; IFS=":"
1113 for searchdir in $searchpath; do
1114 if test -d "$searchdir"; then
1115 case "$searchdir" in
1116 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1118 # Better ignore directories of this form. They are misleading.
1120 *) searchdir=`cd "$searchdir" && pwd`
1121 case "$searchdir" in
1122 */lib64 ) acl_libdirstem=lib64 ;;
1131 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1134 # Copyright (C) 2002-2012 Free Software Foundation, Inc.
1136 # This file is free software; the Free Software Foundation
1137 # gives unlimited permission to copy and/or distribute it,
1138 # with or without modifications, as long as this notice is preserved.
1142 # AM_AUTOMAKE_VERSION(VERSION)
1143 # ----------------------------
1144 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1145 # generated from the m4 files accompanying Automake X.Y.
1146 # (This private macro should not be called outside this file.)
1147 AC_DEFUN([AM_AUTOMAKE_VERSION],
1148 [am__api_version='1.12'
1149 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1150 dnl require some minimum version. Point them to the right macro.
1151 m4_if([$1], [1.12], [],
1152 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1155 # _AM_AUTOCONF_VERSION(VERSION)
1156 # -----------------------------
1157 # aclocal traces this macro to find the Autoconf version.
1158 # This is a private macro too. Using m4_define simplifies
1159 # the logic in aclocal, which can simply ignore this definition.
1160 m4_define([_AM_AUTOCONF_VERSION], [])
1162 # AM_SET_CURRENT_AUTOMAKE_VERSION
1163 # -------------------------------
1164 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1165 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1166 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1167 [AM_AUTOMAKE_VERSION([1.12])dnl
1168 m4_ifndef([AC_AUTOCONF_VERSION],
1169 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1170 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1172 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
1174 # This file is free software; the Free Software Foundation
1175 # gives unlimited permission to copy and/or distribute it,
1176 # with or without modifications, as long as this notice is preserved.
1180 # AM_PROG_AR([ACT-IF-FAIL])
1181 # -------------------------
1182 # Try to determine the archiver interface, and trigger the ar-lib wrapper
1183 # if it is needed. If the detection of archiver interface fails, run
1184 # ACT-IF-FAIL (default is to abort configure with a proper error message).
1185 AC_DEFUN([AM_PROG_AR],
1186 [AC_BEFORE([$0], [LT_INIT])dnl
1187 AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
1188 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1189 AC_REQUIRE_AUX_FILE([ar-lib])dnl
1190 AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
1193 AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
1194 [am_cv_ar_interface=ar
1195 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
1196 [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
1197 AC_TRY_EVAL([am_ar_try])
1198 if test "$ac_status" -eq 0; then
1199 am_cv_ar_interface=ar
1201 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
1202 AC_TRY_EVAL([am_ar_try])
1203 if test "$ac_status" -eq 0; then
1204 am_cv_ar_interface=lib
1206 am_cv_ar_interface=unknown
1209 rm -f conftest.lib libconftest.a
1213 case $am_cv_ar_interface in
1217 # Microsoft lib, so override with the ar-lib wrapper script.
1218 # FIXME: It is wrong to rewrite AR.
1219 # But if we don't then we get into trouble of one sort or another.
1220 # A longer-term fix would be to have automake use am__AR in this case,
1221 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
1223 AR="$am_aux_dir/ar-lib $AR"
1227 [AC_MSG_ERROR([could not determine $AR interface])])
1233 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
1235 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
1237 # This file is free software; the Free Software Foundation
1238 # gives unlimited permission to copy and/or distribute it,
1239 # with or without modifications, as long as this notice is preserved.
1243 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1244 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
1245 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
1247 # Of course, Automake must honor this variable whenever it calls a
1248 # tool from the auxiliary directory. The problem is that $srcdir (and
1249 # therefore $ac_aux_dir as well) can be either absolute or relative,
1250 # depending on how configure is run. This is pretty annoying, since
1251 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
1252 # source directory, any form will work fine, but in subdirectories a
1253 # relative path needs to be adjusted first.
1255 # $ac_aux_dir/missing
1256 # fails when called from a subdirectory if $ac_aux_dir is relative
1257 # $top_srcdir/$ac_aux_dir/missing
1258 # fails if $ac_aux_dir is absolute,
1259 # fails when called from a subdirectory in a VPATH build with
1260 # a relative $ac_aux_dir
1262 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1263 # are both prefixed by $srcdir. In an in-source build this is usually
1264 # harmless because $srcdir is '.', but things will broke when you
1265 # start a VPATH build or use an absolute $srcdir.
1267 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1268 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1269 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1270 # and then we would define $MISSING as
1271 # MISSING="\${SHELL} $am_aux_dir/missing"
1272 # This will work as long as MISSING is not called from configure, because
1273 # unfortunately $(top_srcdir) has no meaning in configure.
1274 # However there are other variables, like CC, which are often used in
1275 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1277 # Another solution, used here, is to always expand $ac_aux_dir to an
1278 # absolute PATH. The drawback is that using absolute paths prevent a
1279 # configured tree to be moved without reconfiguration.
1281 AC_DEFUN([AM_AUX_DIR_EXPAND],
1282 [dnl Rely on autoconf to set up CDPATH properly.
1283 AC_PREREQ([2.50])dnl
1284 # expand $ac_aux_dir to an absolute path
1285 am_aux_dir=`cd $ac_aux_dir && pwd`
1288 # AM_CONDITIONAL -*- Autoconf -*-
1290 # Copyright (C) 1997-2012 Free Software Foundation, Inc.
1292 # This file is free software; the Free Software Foundation
1293 # gives unlimited permission to copy and/or distribute it,
1294 # with or without modifications, as long as this notice is preserved.
1298 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1299 # -------------------------------------
1300 # Define a conditional.
1301 AC_DEFUN([AM_CONDITIONAL],
1302 [AC_PREREQ([2.52])dnl
1303 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1304 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1305 AC_SUBST([$1_TRUE])dnl
1306 AC_SUBST([$1_FALSE])dnl
1307 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
1308 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
1309 m4_define([_AM_COND_VALUE_$1], [$2])dnl
1317 AC_CONFIG_COMMANDS_PRE(
1318 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1319 AC_MSG_ERROR([[conditional "$1" was never defined.
1320 Usually this means the macro was only invoked conditionally.]])
1323 # Copyright (C) 1999-2012 Free Software Foundation, Inc.
1325 # This file is free software; the Free Software Foundation
1326 # gives unlimited permission to copy and/or distribute it,
1327 # with or without modifications, as long as this notice is preserved.
1331 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1332 # written in clear, in which case automake, when reading aclocal.m4,
1333 # will think it sees a *use*, and therefore will trigger all it's
1334 # C support machinery. Also note that it means that autoscan, seeing
1335 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1338 # _AM_DEPENDENCIES(NAME)
1339 # ----------------------
1340 # See how the compiler implements dependency checking.
1341 # NAME is "CC", "CXX", "GCJ", or "OBJC".
1342 # We try a few techniques and use that to set a single cache variable.
1344 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1345 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1346 # dependency, and given that the user is not expected to run this macro,
1347 # just rely on AC_PROG_CC.
1348 AC_DEFUN([_AM_DEPENDENCIES],
1349 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1350 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1351 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1352 AC_REQUIRE([AM_DEP_TRACK])dnl
1354 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
1355 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
1356 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1357 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
1358 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1359 [depcc="$$1" am_compiler_list=])
1361 AC_CACHE_CHECK([dependency style of $depcc],
1362 [am_cv_$1_dependencies_compiler_type],
1363 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1364 # We make a subdir and do the tests there. Otherwise we can end up
1365 # making bogus files that we don't know about and never remove. For
1366 # instance it was reported that on HP-UX the gcc test will end up
1367 # making a dummy file named 'D' -- because '-MD' means "put the output
1371 # Copy depcomp to subdir because otherwise we won't find it if we're
1372 # using a relative directory.
1373 cp "$am_depcomp" conftest.dir
1375 # We will build objects and dependencies in a subdirectory because
1376 # it helps to detect inapplicable dependency modes. For instance
1377 # both Tru64's cc and ICC support -MD to output dependencies as a
1378 # side effect of compilation, but ICC will put the dependencies in
1379 # the current directory while Tru64 will put them in the object
1383 am_cv_$1_dependencies_compiler_type=none
1384 if test "$am_compiler_list" = ""; then
1385 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1389 [case " $depcc " in #(
1390 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1393 [case " $depcc " in #(
1394 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1397 for depmode in $am_compiler_list; do
1398 # Setup a source with many dependencies, because some compilers
1399 # like to wrap large dependency lists on column 80 (with \), and
1400 # we should not choose a depcomp mode which is confused by this.
1402 # We need to recreate these files for each test, as the compiler may
1403 # overwrite some of them when testing with obscure command lines.
1404 # This happens at least with the AIX C compiler.
1406 for i in 1 2 3 4 5 6; do
1407 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1408 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1409 # Solaris 10 /bin/sh.
1410 echo '/* dummy */' > sub/conftst$i.h
1412 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1414 # We check with '-c' and '-o' for the sake of the "dashmstdout"
1415 # mode. It turns out that the SunPro C++ compiler does not properly
1416 # handle '-M -o', and we need to detect this. Also, some Intel
1417 # versions had trouble with output in subdirs.
1418 am__obj=sub/conftest.${OBJEXT-o}
1419 am__minus_obj="-o $am__obj"
1422 # This depmode causes a compiler race in universal mode.
1423 test "$am__universal" = false || continue
1426 # After this tag, mechanisms are not by side-effect, so they'll
1427 # only be used when explicitly requested.
1428 if test "x$enable_dependency_tracking" = xyes; then
1434 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1435 # This compiler won't grok '-c -o', but also, the minuso test has
1436 # not run yet. These depmodes are late enough in the game, and
1437 # so weak that their functioning should not be impacted.
1438 am__obj=conftest.${OBJEXT-o}
1443 if depmode=$depmode \
1444 source=sub/conftest.c object=$am__obj \
1445 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1446 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1447 >/dev/null 2>conftest.err &&
1448 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1449 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1450 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1451 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1452 # icc doesn't choke on unknown options, it will just issue warnings
1453 # or remarks (even with -Werror). So we grep stderr for any message
1454 # that says an option was ignored or not supported.
1455 # When given -MP, icc 7.0 and 7.1 complain thusly:
1456 # icc: Command line warning: ignoring option '-M'; no argument required
1457 # The diagnosis changed in icc 8.0:
1458 # icc: Command line remark: option '-MP' not supported
1459 if (grep 'ignoring option' conftest.err ||
1460 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1461 am_cv_$1_dependencies_compiler_type=$depmode
1470 am_cv_$1_dependencies_compiler_type=none
1473 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1474 AM_CONDITIONAL([am__fastdep$1], [
1475 test "x$enable_dependency_tracking" != xno \
1476 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1482 # Choose a directory name for dependency files.
1483 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1484 AC_DEFUN([AM_SET_DEPDIR],
1485 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1486 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1492 AC_DEFUN([AM_DEP_TRACK],
1493 [AC_ARG_ENABLE([dependency-tracking], [dnl
1495 [--enable-dependency-tracking],
1496 [do not reject slow dependency extractors])
1498 [--disable-dependency-tracking],
1499 [speeds up one-time build])])
1500 if test "x$enable_dependency_tracking" != xno; then
1501 am_depcomp="$ac_aux_dir/depcomp"
1505 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1506 AC_SUBST([AMDEPBACKSLASH])dnl
1507 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1508 AC_SUBST([am__nodep])dnl
1509 _AM_SUBST_NOTMAKE([am__nodep])dnl
1512 # Generate code to set up dependency tracking. -*- Autoconf -*-
1514 # Copyright (C) 1999-2012 Free Software Foundation, Inc.
1516 # This file is free software; the Free Software Foundation
1517 # gives unlimited permission to copy and/or distribute it,
1518 # with or without modifications, as long as this notice is preserved.
1522 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1523 # ------------------------------
1524 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1526 # Autoconf 2.62 quotes --file arguments for eval, but not when files
1527 # are listed without --file. Let's play safe and only enable the eval
1528 # if we detect the quoting.
1529 case $CONFIG_FILES in
1530 *\'*) eval set x "$CONFIG_FILES" ;;
1531 *) set x $CONFIG_FILES ;;
1536 # Strip MF so we end up with the name of the file.
1537 mf=`echo "$mf" | sed -e 's/:.*$//'`
1538 # Check whether this is an Automake generated Makefile or not.
1539 # We used to match only the files named 'Makefile.in', but
1540 # some people rename them; so instead we look at the file content.
1541 # Grep'ing the first line is not enough: some people post-process
1542 # each Makefile.in and add a new line on top of each file to say so.
1543 # Grep'ing the whole file is not good either: AIX grep has a line
1544 # limit of 2048, but all sed's we know have understand at least 4000.
1545 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1546 dirpart=`AS_DIRNAME("$mf")`
1550 # Extract the definition of DEPDIR, am__include, and am__quote
1551 # from the Makefile without running 'make'.
1552 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1553 test -z "$DEPDIR" && continue
1554 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1555 test -z "am__include" && continue
1556 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1557 # Find all dependency output files, they are included files with
1558 # $(DEPDIR) in their names. We invoke sed twice because it is the
1559 # simplest approach to changing $(DEPDIR) to its actual value in the
1561 for file in `sed -n "
1562 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1563 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1564 # Make sure the directory exists.
1565 test -f "$dirpart/$file" && continue
1566 fdir=`AS_DIRNAME(["$file"])`
1567 AS_MKDIR_P([$dirpart/$fdir])
1568 # echo "creating $dirpart/$file"
1569 echo '# dummy' > "$dirpart/$file"
1573 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1576 # AM_OUTPUT_DEPENDENCY_COMMANDS
1577 # -----------------------------
1578 # This macro should only be invoked once -- use via AC_REQUIRE.
1580 # This code is only required when automatic dependency tracking
1581 # is enabled. FIXME. This creates each '.P' file that we will
1582 # need in order to bootstrap the dependency handling code.
1583 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1584 [AC_CONFIG_COMMANDS([depfiles],
1585 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1586 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1589 # Do all the work for Automake. -*- Autoconf -*-
1591 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
1593 # This file is free software; the Free Software Foundation
1594 # gives unlimited permission to copy and/or distribute it,
1595 # with or without modifications, as long as this notice is preserved.
1599 # This macro actually does too much. Some checks are only needed if
1600 # your package does certain things. But this isn't really a big deal.
1602 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1603 # AM_INIT_AUTOMAKE([OPTIONS])
1604 # -----------------------------------------------
1605 # The call with PACKAGE and VERSION arguments is the old style
1606 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1607 # and VERSION should now be passed to AC_INIT and removed from
1608 # the call to AM_INIT_AUTOMAKE.
1609 # We support both call styles for the transition. After
1610 # the next Automake release, Autoconf can make the AC_INIT
1611 # arguments mandatory, and then we can depend on a new Autoconf
1612 # release and drop the old call support.
1613 AC_DEFUN([AM_INIT_AUTOMAKE],
1614 [AC_PREREQ([2.62])dnl
1615 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1616 dnl the ones we care about.
1617 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1618 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1619 AC_REQUIRE([AC_PROG_INSTALL])dnl
1620 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1621 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1622 # is not polluted with repeated "-I."
1623 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1624 # test to see if srcdir already configured
1625 if test -f $srcdir/config.status; then
1626 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1630 # test whether we have cygpath
1631 if test -z "$CYGPATH_W"; then
1632 if (cygpath --version) >/dev/null 2>/dev/null; then
1633 CYGPATH_W='cygpath -w'
1638 AC_SUBST([CYGPATH_W])
1640 # Define the identity of the package.
1641 dnl Distinguish between old-style and new-style calls.
1643 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1644 AC_SUBST([PACKAGE], [$1])dnl
1645 AC_SUBST([VERSION], [$2])],
1646 [_AM_SET_OPTIONS([$1])dnl
1647 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1649 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1651 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1652 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1653 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1655 _AM_IF_OPTION([no-define],,
1656 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1657 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1659 # Some tools Automake needs.
1660 AC_REQUIRE([AM_SANITY_CHECK])dnl
1661 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1662 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1663 AM_MISSING_PROG([AUTOCONF], [autoconf])
1664 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1665 AM_MISSING_PROG([AUTOHEADER], [autoheader])
1666 AM_MISSING_PROG([MAKEINFO], [makeinfo])
1667 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1668 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1669 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1670 # We need awk for the "check" target. The system "awk" is bad on
1672 AC_REQUIRE([AC_PROG_AWK])dnl
1673 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1674 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1675 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1676 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1677 [_AM_PROG_TAR([v7])])])
1678 _AM_IF_OPTION([no-dependencies],,
1679 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1680 [_AM_DEPENDENCIES([CC])],
1681 [define([AC_PROG_CC],
1682 defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1683 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1684 [_AM_DEPENDENCIES([CXX])],
1685 [define([AC_PROG_CXX],
1686 defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1687 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1688 [_AM_DEPENDENCIES([OBJC])],
1689 [define([AC_PROG_OBJC],
1690 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1692 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1693 dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
1694 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1695 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1696 AC_CONFIG_COMMANDS_PRE(dnl
1697 [m4_provide_if([_AM_COMPILER_EXEEXT],
1698 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1701 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1702 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1703 dnl mangled by Autoconf and run in a shell conditional statement.
1704 m4_define([_AC_COMPILER_EXEEXT],
1705 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1708 # When config.status generates a header, we must update the stamp-h file.
1709 # This file resides in the same directory as the config header
1710 # that is generated. The stamp files are numbered to have different names.
1712 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1713 # loop where config.status creates the headers, so we can generate
1714 # our stamp files there.
1715 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1716 [# Compute $1's index in $config_headers.
1719 for _am_header in $config_headers :; do
1721 $_am_arg | $_am_arg:* )
1724 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1727 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1729 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
1731 # This file is free software; the Free Software Foundation
1732 # gives unlimited permission to copy and/or distribute it,
1733 # with or without modifications, as long as this notice is preserved.
1737 # AM_PROG_INSTALL_SH
1738 # ------------------
1739 # Define $install_sh.
1740 AC_DEFUN([AM_PROG_INSTALL_SH],
1741 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1742 if test x"${install_sh}" != xset; then
1745 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1747 install_sh="\${SHELL} $am_aux_dir/install-sh"
1750 AC_SUBST([install_sh])])
1752 # Copyright (C) 2003-2012 Free Software Foundation, Inc.
1754 # This file is free software; the Free Software Foundation
1755 # gives unlimited permission to copy and/or distribute it,
1756 # with or without modifications, as long as this notice is preserved.
1760 # Check whether the underlying file-system supports filenames
1761 # with a leading dot. For instance MS-DOS doesn't.
1762 AC_DEFUN([AM_SET_LEADING_DOT],
1763 [rm -rf .tst 2>/dev/null
1764 mkdir .tst 2>/dev/null
1765 if test -d .tst; then
1770 rmdir .tst 2>/dev/null
1771 AC_SUBST([am__leading_dot])])
1773 # Check to see how 'make' treats includes. -*- Autoconf -*-
1775 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
1777 # This file is free software; the Free Software Foundation
1778 # gives unlimited permission to copy and/or distribute it,
1779 # with or without modifications, as long as this notice is preserved.
1785 # Check to see how make treats includes.
1786 AC_DEFUN([AM_MAKE_INCLUDE],
1787 [am_make=${MAKE-make}
1788 cat > confinc << 'END'
1790 @echo this is the am__doit target
1793 # If we don't find an include directive, just comment out the code.
1794 AC_MSG_CHECKING([for style of include used by $am_make])
1798 # First try GNU make style include.
1799 echo "include confinc" > confmf
1800 # Ignore all kinds of additional output from 'make'.
1801 case `$am_make -s -f confmf 2> /dev/null` in #(
1802 *the\ am__doit\ target*)
1808 # Now try BSD make style include.
1809 if test "$am__include" = "#"; then
1810 echo '.include "confinc"' > confmf
1811 case `$am_make -s -f confmf 2> /dev/null` in #(
1812 *the\ am__doit\ target*)
1813 am__include=.include
1819 AC_SUBST([am__include])
1820 AC_SUBST([am__quote])
1821 AC_MSG_RESULT([$_am_result])
1822 rm -f confinc confmf
1825 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1827 # Copyright (C) 1997-2012 Free Software Foundation, Inc.
1829 # This file is free software; the Free Software Foundation
1830 # gives unlimited permission to copy and/or distribute it,
1831 # with or without modifications, as long as this notice is preserved.
1835 # AM_MISSING_PROG(NAME, PROGRAM)
1836 # ------------------------------
1837 AC_DEFUN([AM_MISSING_PROG],
1838 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1839 $1=${$1-"${am_missing_run}$2"}
1843 # AM_MISSING_HAS_RUN
1844 # ------------------
1845 # Define MISSING if not defined so far and test if it supports --run.
1846 # If it does, set am_missing_run to use it, otherwise, to nothing.
1847 AC_DEFUN([AM_MISSING_HAS_RUN],
1848 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1849 AC_REQUIRE_AUX_FILE([missing])dnl
1850 if test x"${MISSING+set}" != xset; then
1853 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1855 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1858 # Use eval to expand $SHELL
1859 if eval "$MISSING --run true"; then
1860 am_missing_run="$MISSING --run "
1863 AC_MSG_WARN(['missing' script is too old or missing])
1867 # Copyright (C) 2003-2012 Free Software Foundation, Inc.
1869 # This file is free software; the Free Software Foundation
1870 # gives unlimited permission to copy and/or distribute it,
1871 # with or without modifications, as long as this notice is preserved.
1877 # Check for 'mkdir -p'.
1878 AC_DEFUN([AM_PROG_MKDIR_P],
1879 [AC_PREREQ([2.60])dnl
1880 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1881 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1882 dnl while keeping a definition of mkdir_p for backward compatibility.
1883 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1884 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1885 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1886 dnl adjustment using top_builddir (which is defined more often than
1888 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1890 [[\\/$]]* | ?:[[\\/]]*) ;;
1891 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1895 # Helper functions for option handling. -*- Autoconf -*-
1897 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
1899 # This file is free software; the Free Software Foundation
1900 # gives unlimited permission to copy and/or distribute it,
1901 # with or without modifications, as long as this notice is preserved.
1905 # _AM_MANGLE_OPTION(NAME)
1906 # -----------------------
1907 AC_DEFUN([_AM_MANGLE_OPTION],
1908 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1910 # _AM_SET_OPTION(NAME)
1911 # --------------------
1912 # Set option NAME. Presently that only means defining a flag for this option.
1913 AC_DEFUN([_AM_SET_OPTION],
1914 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1916 # _AM_SET_OPTIONS(OPTIONS)
1917 # ------------------------
1918 # OPTIONS is a space-separated list of Automake options.
1919 AC_DEFUN([_AM_SET_OPTIONS],
1920 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1922 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1923 # -------------------------------------------
1924 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1925 AC_DEFUN([_AM_IF_OPTION],
1926 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1928 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1930 # Copyright (C) 1996-2012 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 AC_DEFUN([AM_SANITY_CHECK],
1941 [AC_MSG_CHECKING([whether build environment is sane])
1942 # Reject unsafe characters in $srcdir or the absolute working directory
1943 # name. Accept space and tab only in the latter.
1947 *[[\\\"\#\$\&\'\`$am_lf]]*)
1948 AC_MSG_ERROR([unsafe absolute working directory name]);;
1951 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1952 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1955 # Do 'set' in a subshell so we don't clobber the current shell's
1956 # arguments. Must try -L first in case configure is actually a
1957 # symlink; some systems play weird games with the mod time of symlinks
1958 # (eg FreeBSD returns the mod time of the symlink's containing
1962 for am_try in 1 2; do
1963 echo "timestamp, slept: $am_has_slept" > conftest.file
1964 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1965 if test "$[*]" = "X"; then
1967 set X `ls -t "$srcdir/configure" conftest.file`
1969 if test "$[*]" != "X $srcdir/configure conftest.file" \
1970 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1972 # If neither matched, then we have a broken ls. This can happen
1973 # if, for instance, CONFIG_SHELL is bash and it inherits a
1974 # broken ls alias from the environment. This has actually
1975 # happened. Such a system could not be considered "sane".
1976 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1977 alias in your environment])
1979 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1986 test "$[2]" = conftest.file
1992 AC_MSG_ERROR([newly created file is older than distributed files!
1993 Check your system clock])
1995 AC_MSG_RESULT([yes])
1996 # If we didn't sleep, we still need to ensure time stamps of config.status and
1997 # generated files are strictly newer.
1999 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2003 AC_CONFIG_COMMANDS_PRE(
2004 [AC_MSG_CHECKING([that generated files are newer than configure])
2005 if test -n "$am_sleep_pid"; then
2006 # Hide warnings about reused PIDs.
2007 wait $am_sleep_pid 2>/dev/null
2009 AC_MSG_RESULT([done])])
2013 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
2015 # This file is free software; the Free Software Foundation
2016 # gives unlimited permission to copy and/or distribute it,
2017 # with or without modifications, as long as this notice is preserved.
2021 # AM_PROG_INSTALL_STRIP
2022 # ---------------------
2023 # One issue with vendor 'install' (even GNU) is that you can't
2024 # specify the program used to strip binaries. This is especially
2025 # annoying in cross-compiling environments, where the build's strip
2026 # is unlikely to handle the host's binaries.
2027 # Fortunately install-sh will honor a STRIPPROG variable, so we
2028 # always use install-sh in "make install-strip", and initialize
2029 # STRIPPROG with the value of the STRIP variable (set by the user).
2030 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2031 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2032 # Installed binaries are usually stripped using 'strip' when the user
2033 # run "make install-strip". However 'strip' might not be the right
2034 # tool to use in cross-compilation environments, therefore Automake
2035 # will honor the 'STRIP' environment variable to overrule this program.
2036 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
2037 if test "$cross_compiling" != no; then
2038 AC_CHECK_TOOL([STRIP], [strip], :)
2040 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2041 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2043 # Copyright (C) 2006-2012 Free Software Foundation, Inc.
2045 # This file is free software; the Free Software Foundation
2046 # gives unlimited permission to copy and/or distribute it,
2047 # with or without modifications, as long as this notice is preserved.
2051 # _AM_SUBST_NOTMAKE(VARIABLE)
2052 # ---------------------------
2053 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2054 # This macro is traced by Automake.
2055 AC_DEFUN([_AM_SUBST_NOTMAKE])
2057 # AM_SUBST_NOTMAKE(VARIABLE)
2058 # --------------------------
2059 # Public sister of _AM_SUBST_NOTMAKE.
2060 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2062 # Check how to create a tarball. -*- Autoconf -*-
2064 # Copyright (C) 2004-2012 Free Software Foundation, Inc.
2066 # This file is free software; the Free Software Foundation
2067 # gives unlimited permission to copy and/or distribute it,
2068 # with or without modifications, as long as this notice is preserved.
2072 # _AM_PROG_TAR(FORMAT)
2073 # --------------------
2074 # Check how to create a tarball in format FORMAT.
2075 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
2077 # Substitute a variable $(am__tar) that is a command
2078 # writing to stdout a FORMAT-tarball containing the directory
2080 # tardir=directory && $(am__tar) > result.tar
2082 # Substitute a variable $(am__untar) that extract such
2083 # a tarball read from stdin.
2084 # $(am__untar) < result.tar
2085 AC_DEFUN([_AM_PROG_TAR],
2086 [# Always define AMTAR for backward compatibility. Yes, it's still used
2087 # in the wild :-( We should find a proper way to deprecate it ...
2088 AC_SUBST([AMTAR], ['$${TAR-tar}'])
2090 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2091 [m4_case([$1], [ustar],, [pax],,
2092 [m4_fatal([Unknown tar format])])
2093 AC_MSG_CHECKING([how to create a $1 tar archive])
2094 # Loop over all known methods to create a tar archive until one works.
2095 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2096 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2097 # Do not fold the above two line into one, because Tru64 sh and
2098 # Solaris sh will not grok spaces in the rhs of '-'.
2099 for _am_tool in $_am_tools
2103 for _am_tar in tar gnutar gtar;
2105 AM_RUN_LOG([$_am_tar --version]) && break
2107 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2108 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2109 am__untar="$_am_tar -xf -"
2112 # Must skip GNU tar: if it does not support --format= it doesn't create
2113 # ustar tarball either.
2114 (tar --version) >/dev/null 2>&1 && continue
2115 am__tar='tar chf - "$$tardir"'
2116 am__tar_='tar chf - "$tardir"'
2117 am__untar='tar xf -'
2120 am__tar='pax -L -x $1 -w "$$tardir"'
2121 am__tar_='pax -L -x $1 -w "$tardir"'
2125 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2126 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2127 am__untar='cpio -i -H $1 -d'
2136 # If the value was cached, stop now. We just wanted to have am__tar
2137 # and am__untar set.
2138 test -n "${am_cv_prog_tar_$1}" && break
2140 # tar/untar a dummy directory, and stop if the command works
2143 echo GrepMe > conftest.dir/file
2144 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2146 if test -s conftest.tar; then
2147 AM_RUN_LOG([$am__untar <conftest.tar])
2148 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2153 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2154 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2156 AC_SUBST([am__untar])
2159 m4_include([m4/ax_prog_nasm.m4])
2160 m4_include([m4/iconv.m4])
2161 m4_include([m4/libtool.m4])
2162 m4_include([m4/ltoptions.m4])
2163 m4_include([m4/ltsugar.m4])
2164 m4_include([m4/ltversion.m4])
2165 m4_include([m4/lt~obsolete.m4])