1 # generated automatically by aclocal 1.13.4 -*- Autoconf -*-
3 # Copyright (C) 1996-2013 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_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
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'.])])
24 dnl Copyright (C) 1996-2003, 2009-2014 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/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
31 dnl collision with libtool.m4.
33 dnl From libtool-2.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 lds only accept -v.
37 case `$LD -v 2>&1 </dev/null` in
39 acl_cv_prog_gnu_ld=yes
45 with_gnu_ld=$acl_cv_prog_gnu_ld
48 dnl From libtool-2.4. Sets the variable LD.
49 AC_DEFUN([AC_LIB_PROG_LD],
50 [AC_REQUIRE([AC_PROG_CC])dnl
51 AC_REQUIRE([AC_CANONICAL_HOST])dnl
54 [AS_HELP_STRING([--with-gnu-ld],
55 [assume the C compiler uses GNU ld [default=no]])],
56 [test "$withval" = no || with_gnu_ld=yes],
59 # Prepare PATH_SEPARATOR.
60 # The user is always right.
61 if test "${PATH_SEPARATOR+set}" != set; then
62 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
63 # contains only /bin. Note that ksh looks also at the FPATH variable,
64 # so we have to set that as well for the test.
66 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
67 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
73 if test "$GCC" = yes; then
74 # Check if gcc -print-prog-name=ld gives a path.
75 AC_MSG_CHECKING([for ld used by $CC])
78 # gcc leaves a trailing carriage return which upsets mingw
79 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
81 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
84 # Accept absolute paths.
85 [[\\/]]* | ?:[[\\/]]*)
86 re_direlt='/[[^/]][[^/]]*/\.\./'
87 # Canonicalize the pathname of ld
88 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
89 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
90 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
92 test -z "$LD" && LD="$ac_prog"
95 # If it fails, then pretend we aren't using GCC.
99 # If it is relative, then search for the first ld in PATH.
103 elif test "$with_gnu_ld" = yes; then
104 AC_MSG_CHECKING([for GNU ld])
106 AC_MSG_CHECKING([for non-GNU ld])
108 AC_CACHE_VAL([acl_cv_path_LD],
109 [if test -z "$LD"; then
110 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
111 for ac_dir in $PATH; do
113 test -z "$ac_dir" && ac_dir=.
114 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
115 acl_cv_path_LD="$ac_dir/$ac_prog"
116 # Check to see if the program is GNU ld. I'd rather use --version,
117 # but apparently some variants of GNU ld only accept -v.
118 # Break only if it was the GNU/non-GNU ld that we prefer.
119 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
120 *GNU* | *'with BFD'*)
121 test "$with_gnu_ld" != no && break
124 test "$with_gnu_ld" != yes && break
131 acl_cv_path_LD="$LD" # Let the user override the test with a path.
134 if test -n "$LD"; then
139 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
143 # lib-link.m4 serial 26 (gettext-0.18.2)
144 dnl Copyright (C) 2001-2014 Free Software Foundation, Inc.
145 dnl This file is free software; the Free Software Foundation
146 dnl gives unlimited permission to copy and/or distribute it,
147 dnl with or without modifications, as long as this notice is preserved.
149 dnl From Bruno Haible.
153 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
154 dnl the libraries corresponding to explicit and implicit dependencies.
155 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
156 dnl augments the CPPFLAGS variable.
157 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
158 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
159 AC_DEFUN([AC_LIB_LINKFLAGS],
161 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
162 AC_REQUIRE([AC_LIB_RPATH])
163 pushdef([Name],[m4_translit([$1],[./+-], [____])])
164 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
165 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
166 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
167 AC_LIB_LINKFLAGS_BODY([$1], [$2])
168 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
169 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
170 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
171 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
173 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
174 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
175 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
176 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
177 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
179 AC_SUBST([LTLIB]NAME)
180 AC_SUBST([LIB]NAME[_PREFIX])
181 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
182 dnl results of this search when this library appears as a dependency.
188 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
189 dnl searches for libname and the libraries corresponding to explicit and
190 dnl implicit dependencies, together with the specified include files and
191 dnl the ability to compile and link the specified testcode. The missing-message
192 dnl defaults to 'no' and may contain additional hints for the user.
193 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
194 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
195 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
196 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
197 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
198 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
199 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
201 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
202 AC_REQUIRE([AC_LIB_RPATH])
203 pushdef([Name],[m4_translit([$1],[./+-], [____])])
204 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
205 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
207 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
209 AC_LIB_LINKFLAGS_BODY([$1], [$2])
211 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
212 dnl because if the user has installed lib[]Name and not disabled its use
213 dnl via --without-lib[]Name-prefix, he wants to use it.
214 ac_save_CPPFLAGS="$CPPFLAGS"
215 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
217 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
219 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
220 dnl because these -l options might require -L options that are present in
221 dnl LIBS. -l options benefit only from the -L options listed before it.
222 dnl Otherwise, add it to the front of LIBS, because it may be a static
223 dnl library that depends on another static library that is present in LIBS.
224 dnl Static libraries benefit only from the static libraries listed after
226 case " $LIB[]NAME" in
227 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
228 *) LIBS="$LIB[]NAME $LIBS" ;;
231 [AC_LANG_PROGRAM([[$3]], [[$4]])],
232 [ac_cv_lib[]Name=yes],
233 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
236 if test "$ac_cv_lib[]Name" = yes; then
238 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
239 AC_MSG_CHECKING([how to link with lib[]$1])
240 AC_MSG_RESULT([$LIB[]NAME])
243 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
244 dnl $INC[]NAME either.
245 CPPFLAGS="$ac_save_CPPFLAGS"
250 AC_SUBST([HAVE_LIB]NAME)
252 AC_SUBST([LTLIB]NAME)
253 AC_SUBST([LIB]NAME[_PREFIX])
258 dnl Determine the platform dependent parameters needed to use rpath:
261 dnl acl_libname_spec,
262 dnl acl_library_names_spec,
263 dnl acl_hardcode_libdir_flag_spec,
264 dnl acl_hardcode_libdir_separator,
265 dnl acl_hardcode_direct,
266 dnl acl_hardcode_minus_L.
267 AC_DEFUN([AC_LIB_RPATH],
269 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
270 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
271 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
272 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
273 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
274 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
275 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
276 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
277 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
283 acl_libext="$acl_cv_libext"
284 acl_shlibext="$acl_cv_shlibext"
285 acl_libname_spec="$acl_cv_libname_spec"
286 acl_library_names_spec="$acl_cv_library_names_spec"
287 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
288 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
289 acl_hardcode_direct="$acl_cv_hardcode_direct"
290 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
291 dnl Determine whether the user wants rpath handling at all.
292 AC_ARG_ENABLE([rpath],
293 [ --disable-rpath do not hardcode runtime library paths],
297 dnl AC_LIB_FROMPACKAGE(name, package)
298 dnl declares that libname comes from the given package. The configure file
299 dnl will then not have a --with-libname-prefix option but a
300 dnl --with-package-prefix option. Several libraries can come from the same
301 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
302 dnl macro call that searches for libname.
303 AC_DEFUN([AC_LIB_FROMPACKAGE],
305 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
306 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
307 define([acl_frompackage_]NAME, [$2])
310 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
311 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
312 define([acl_libsinpackage_]PACKUP,
313 m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
318 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
319 dnl the libraries corresponding to explicit and implicit dependencies.
320 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
321 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
322 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
323 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
325 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
326 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
327 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
328 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
329 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
330 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
331 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
332 dnl Autoconf >= 2.61 supports dots in --with options.
333 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
334 dnl By default, look in $includedir and $libdir.
336 AC_LIB_WITH_FINAL_PREFIX([
337 eval additional_includedir=\"$includedir\"
338 eval additional_libdir=\"$libdir\"
340 AC_ARG_WITH(P_A_C_K[-prefix],
341 [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
342 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
344 if test "X$withval" = "Xno"; then
347 if test "X$withval" = "X"; then
348 AC_LIB_WITH_FINAL_PREFIX([
349 eval additional_includedir=\"$includedir\"
350 eval additional_libdir=\"$libdir\"
353 additional_includedir="$withval/include"
354 additional_libdir="$withval/$acl_libdirstem"
355 if test "$acl_libdirstem2" != "$acl_libdirstem" \
356 && ! test -d "$withval/$acl_libdirstem"; then
357 additional_libdir="$withval/$acl_libdirstem2"
362 dnl Search the library and its dependencies in $additional_libdir and
363 dnl $LDFLAGS. Using breadth-first-seach.
368 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
369 dnl computed. So it has to be reset here.
373 names_already_handled=
374 names_next_round='$1 $2'
375 while test -n "$names_next_round"; do
376 names_this_round="$names_next_round"
378 for name in $names_this_round; do
380 for n in $names_already_handled; do
381 if test "$n" = "$name"; then
386 if test -z "$already_handled"; then
387 names_already_handled="$names_already_handled $name"
388 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
389 dnl or AC_LIB_HAVE_LINKFLAGS call.
390 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
391 eval value=\"\$HAVE_LIB$uppername\"
392 if test -n "$value"; then
393 if test "$value" = yes; then
394 eval value=\"\$LIB$uppername\"
395 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
396 eval value=\"\$LTLIB$uppername\"
397 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
399 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
400 dnl that this library doesn't exist. So just drop it.
404 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
405 dnl and the already constructed $LIBNAME/$LTLIBNAME.
410 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
411 if test -n "$acl_shlibext"; then
412 shrext=".$acl_shlibext" # typically: shrext=.so
416 if test $use_additional = yes; then
417 dir="$additional_libdir"
418 dnl The same code as in the loop below:
419 dnl First look for a shared library.
420 if test -n "$acl_shlibext"; then
421 if test -f "$dir/$libname$shrext"; then
423 found_so="$dir/$libname$shrext"
425 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
427 for f in "$libname$shrext".*; do echo "$f"; done \
428 | sed -e "s,^$libname$shrext\\\\.,," \
429 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
430 | sed 1q ) 2>/dev/null`
431 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
433 found_so="$dir/$libname$shrext.$ver"
436 eval library_names=\"$acl_library_names_spec\"
437 for f in $library_names; do
438 if test -f "$dir/$f"; then
447 dnl Then look for a static library.
448 if test "X$found_dir" = "X"; then
449 if test -f "$dir/$libname.$acl_libext"; then
451 found_a="$dir/$libname.$acl_libext"
454 if test "X$found_dir" != "X"; then
455 if test -f "$dir/$libname.la"; then
456 found_la="$dir/$libname.la"
460 if test "X$found_dir" = "X"; then
461 for x in $LDFLAGS $LTLIB[]NAME; do
462 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
465 dir=`echo "X$x" | sed -e 's/^X-L//'`
466 dnl First look for a shared library.
467 if test -n "$acl_shlibext"; then
468 if test -f "$dir/$libname$shrext"; then
470 found_so="$dir/$libname$shrext"
472 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
474 for f in "$libname$shrext".*; do echo "$f"; done \
475 | sed -e "s,^$libname$shrext\\\\.,," \
476 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
477 | sed 1q ) 2>/dev/null`
478 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
480 found_so="$dir/$libname$shrext.$ver"
483 eval library_names=\"$acl_library_names_spec\"
484 for f in $library_names; do
485 if test -f "$dir/$f"; then
494 dnl Then look for a static library.
495 if test "X$found_dir" = "X"; then
496 if test -f "$dir/$libname.$acl_libext"; then
498 found_a="$dir/$libname.$acl_libext"
501 if test "X$found_dir" != "X"; then
502 if test -f "$dir/$libname.la"; then
503 found_la="$dir/$libname.la"
508 if test "X$found_dir" != "X"; then
513 if test "X$found_dir" != "X"; then
514 dnl Found the library.
515 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
516 if test "X$found_so" != "X"; then
517 dnl Linking with a shared library. We attempt to hardcode its
518 dnl directory into the executable's runpath, unless it's the
519 dnl standard /usr/lib.
520 if test "$enable_rpath" = no \
521 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
522 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
523 dnl No hardcoding is needed.
524 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
526 dnl Use an explicit option to hardcode DIR into the resulting
528 dnl Potentially add DIR to ltrpathdirs.
529 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
531 for x in $ltrpathdirs; do
532 if test "X$x" = "X$found_dir"; then
537 if test -z "$haveit"; then
538 ltrpathdirs="$ltrpathdirs $found_dir"
540 dnl The hardcoding into $LIBNAME is system dependent.
541 if test "$acl_hardcode_direct" = yes; then
542 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
543 dnl resulting binary.
544 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
546 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
547 dnl Use an explicit option to hardcode DIR into the resulting
549 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
550 dnl Potentially add DIR to rpathdirs.
551 dnl The rpathdirs will be appended to $LIBNAME at the end.
553 for x in $rpathdirs; do
554 if test "X$x" = "X$found_dir"; then
559 if test -z "$haveit"; then
560 rpathdirs="$rpathdirs $found_dir"
563 dnl Rely on "-L$found_dir".
564 dnl But don't add it if it's already contained in the LDFLAGS
565 dnl or the already constructed $LIBNAME
567 for x in $LDFLAGS $LIB[]NAME; do
568 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
569 if test "X$x" = "X-L$found_dir"; then
574 if test -z "$haveit"; then
575 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
577 if test "$acl_hardcode_minus_L" != no; then
578 dnl FIXME: Not sure whether we should use
579 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
581 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
583 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
584 dnl here, because this doesn't fit in flags passed to the
585 dnl compiler. So give up. No hardcoding. This affects only
586 dnl very old systems.
587 dnl FIXME: Not sure whether we should use
588 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
590 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
596 if test "X$found_a" != "X"; then
597 dnl Linking with a static library.
598 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
600 dnl We shouldn't come here, but anyway it's good to have a
602 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
605 dnl Assume the include files are nearby.
606 additional_includedir=
608 */$acl_libdirstem | */$acl_libdirstem/)
609 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
610 if test "$name" = '$1'; then
611 LIB[]NAME[]_PREFIX="$basedir"
613 additional_includedir="$basedir/include"
615 */$acl_libdirstem2 | */$acl_libdirstem2/)
616 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
617 if test "$name" = '$1'; then
618 LIB[]NAME[]_PREFIX="$basedir"
620 additional_includedir="$basedir/include"
623 if test "X$additional_includedir" != "X"; then
624 dnl Potentially add $additional_includedir to $INCNAME.
626 dnl 1. if it's the standard /usr/include,
627 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
628 dnl 3. if it's already present in $CPPFLAGS or the already
629 dnl constructed $INCNAME,
630 dnl 4. if it doesn't exist as a directory.
631 if test "X$additional_includedir" != "X/usr/include"; then
633 if test "X$additional_includedir" = "X/usr/local/include"; then
634 if test -n "$GCC"; then
636 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
640 if test -z "$haveit"; then
641 for x in $CPPFLAGS $INC[]NAME; do
642 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
643 if test "X$x" = "X-I$additional_includedir"; then
648 if test -z "$haveit"; then
649 if test -d "$additional_includedir"; then
650 dnl Really add $additional_includedir to $INCNAME.
651 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
657 dnl Look for dependencies.
658 if test -n "$found_la"; then
659 dnl Read the .la file. It defines the variables
660 dnl dlname, library_names, old_library, dependency_libs, current,
661 dnl age, revision, installed, dlopen, dlpreopen, libdir.
662 save_libdir="$libdir"
664 */* | *\\*) . "$found_la" ;;
665 *) . "./$found_la" ;;
667 libdir="$save_libdir"
668 dnl We use only dependency_libs.
669 for dep in $dependency_libs; do
672 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
673 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
675 dnl 1. if it's the standard /usr/lib,
676 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
677 dnl 3. if it's already present in $LDFLAGS or the already
678 dnl constructed $LIBNAME,
679 dnl 4. if it doesn't exist as a directory.
680 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
681 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
683 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
684 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
685 if test -n "$GCC"; then
687 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
691 if test -z "$haveit"; then
693 for x in $LDFLAGS $LIB[]NAME; do
694 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
695 if test "X$x" = "X-L$additional_libdir"; then
700 if test -z "$haveit"; then
701 if test -d "$additional_libdir"; then
702 dnl Really add $additional_libdir to $LIBNAME.
703 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
707 for x in $LDFLAGS $LTLIB[]NAME; do
708 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
709 if test "X$x" = "X-L$additional_libdir"; then
714 if test -z "$haveit"; then
715 if test -d "$additional_libdir"; then
716 dnl Really add $additional_libdir to $LTLIBNAME.
717 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
724 dir=`echo "X$dep" | sed -e 's/^X-R//'`
725 if test "$enable_rpath" != no; then
726 dnl Potentially add DIR to rpathdirs.
727 dnl The rpathdirs will be appended to $LIBNAME at the end.
729 for x in $rpathdirs; do
730 if test "X$x" = "X$dir"; then
735 if test -z "$haveit"; then
736 rpathdirs="$rpathdirs $dir"
738 dnl Potentially add DIR to ltrpathdirs.
739 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
741 for x in $ltrpathdirs; do
742 if test "X$x" = "X$dir"; then
747 if test -z "$haveit"; then
748 ltrpathdirs="$ltrpathdirs $dir"
753 dnl Handle this in the next round.
754 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
757 dnl Handle this in the next round. Throw away the .la's
758 dnl directory; it is already contained in a preceding -L
760 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
763 dnl Most likely an immediate library name.
764 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
765 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
771 dnl Didn't find the library; assume it is in the system directories
772 dnl known to the linker and runtime loader. (All the system
773 dnl directories known to the linker should also be known to the
774 dnl runtime loader, otherwise the system is severely misconfigured.)
775 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
776 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
782 if test "X$rpathdirs" != "X"; then
783 if test -n "$acl_hardcode_libdir_separator"; then
784 dnl Weird platform: only the last -rpath option counts, the user must
785 dnl pass all path elements in one option. We can arrange that for a
786 dnl single library, but not when more than one $LIBNAMEs are used.
788 for found_dir in $rpathdirs; do
789 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
791 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
792 acl_save_libdir="$libdir"
794 eval flag=\"$acl_hardcode_libdir_flag_spec\"
795 libdir="$acl_save_libdir"
796 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
798 dnl The -rpath options are cumulative.
799 for found_dir in $rpathdirs; do
800 acl_save_libdir="$libdir"
802 eval flag=\"$acl_hardcode_libdir_flag_spec\"
803 libdir="$acl_save_libdir"
804 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
808 if test "X$ltrpathdirs" != "X"; then
809 dnl When using libtool, the option that works for both libraries and
810 dnl executables is -R. The -R options are cumulative.
811 for found_dir in $ltrpathdirs; do
812 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
822 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
823 dnl unless already present in VAR.
824 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
825 dnl contains two or three consecutive elements that belong together.
826 AC_DEFUN([AC_LIB_APPENDTOVAR],
828 for element in [$2]; do
831 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
832 if test "X$x" = "X$element"; then
837 if test -z "$haveit"; then
838 [$1]="${[$1]}${[$1]:+ }$element"
843 dnl For those cases where a variable contains several -L and -l options
844 dnl referring to unknown libraries and directories, this macro determines the
845 dnl necessary additional linker options for the runtime path.
846 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
847 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
848 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
849 dnl otherwise linking without libtool is assumed.
850 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
852 AC_REQUIRE([AC_LIB_RPATH])
853 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
855 if test "$enable_rpath" != no; then
856 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
857 dnl Use an explicit option to hardcode directories into the resulting
862 if test -n "$next"; then
864 dnl No need to hardcode the standard /usr/lib.
865 if test "X$dir" != "X/usr/$acl_libdirstem" \
866 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
867 rpathdirs="$rpathdirs $dir"
873 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
874 dnl No need to hardcode the standard /usr/lib.
875 if test "X$dir" != "X/usr/$acl_libdirstem" \
876 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
877 rpathdirs="$rpathdirs $dir"
884 if test "X$rpathdirs" != "X"; then
885 if test -n ""$3""; then
886 dnl libtool is used for linking. Use -R options.
887 for dir in $rpathdirs; do
888 $1="${$1}${$1:+ }-R$dir"
891 dnl The linker is used for linking directly.
892 if test -n "$acl_hardcode_libdir_separator"; then
893 dnl Weird platform: only the last -rpath option counts, the user
894 dnl must pass all path elements in one option.
896 for dir in $rpathdirs; do
897 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
899 acl_save_libdir="$libdir"
901 eval flag=\"$acl_hardcode_libdir_flag_spec\"
902 libdir="$acl_save_libdir"
905 dnl The -rpath options are cumulative.
906 for dir in $rpathdirs; do
907 acl_save_libdir="$libdir"
909 eval flag=\"$acl_hardcode_libdir_flag_spec\"
910 libdir="$acl_save_libdir"
911 $1="${$1}${$1:+ }$flag"
921 # lib-prefix.m4 serial 7 (gettext-0.18)
922 dnl Copyright (C) 2001-2005, 2008-2014 Free Software Foundation, Inc.
923 dnl This file is free software; the Free Software Foundation
924 dnl gives unlimited permission to copy and/or distribute it,
925 dnl with or without modifications, as long as this notice is preserved.
927 dnl From Bruno Haible.
929 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
930 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
931 dnl require excessive bracketing.
932 ifdef([AC_HELP_STRING],
933 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
934 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
936 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
937 dnl to access previously installed libraries. The basic assumption is that
938 dnl a user will want packages to use other packages he previously installed
939 dnl with the same --prefix option.
940 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
941 dnl libraries, but is otherwise very convenient.
942 AC_DEFUN([AC_LIB_PREFIX],
944 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
945 AC_REQUIRE([AC_PROG_CC])
946 AC_REQUIRE([AC_CANONICAL_HOST])
947 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
948 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
949 dnl By default, look in $includedir and $libdir.
951 AC_LIB_WITH_FINAL_PREFIX([
952 eval additional_includedir=\"$includedir\"
953 eval additional_libdir=\"$libdir\"
955 AC_LIB_ARG_WITH([lib-prefix],
956 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
957 --without-lib-prefix don't search for libraries in includedir and libdir],
959 if test "X$withval" = "Xno"; then
962 if test "X$withval" = "X"; then
963 AC_LIB_WITH_FINAL_PREFIX([
964 eval additional_includedir=\"$includedir\"
965 eval additional_libdir=\"$libdir\"
968 additional_includedir="$withval/include"
969 additional_libdir="$withval/$acl_libdirstem"
973 if test $use_additional = yes; then
974 dnl Potentially add $additional_includedir to $CPPFLAGS.
976 dnl 1. if it's the standard /usr/include,
977 dnl 2. if it's already present in $CPPFLAGS,
978 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
979 dnl 4. if it doesn't exist as a directory.
980 if test "X$additional_includedir" != "X/usr/include"; then
982 for x in $CPPFLAGS; do
983 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
984 if test "X$x" = "X-I$additional_includedir"; then
989 if test -z "$haveit"; then
990 if test "X$additional_includedir" = "X/usr/local/include"; then
991 if test -n "$GCC"; then
993 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
997 if test -z "$haveit"; then
998 if test -d "$additional_includedir"; then
999 dnl Really add $additional_includedir to $CPPFLAGS.
1000 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1005 dnl Potentially add $additional_libdir to $LDFLAGS.
1006 dnl But don't add it
1007 dnl 1. if it's the standard /usr/lib,
1008 dnl 2. if it's already present in $LDFLAGS,
1009 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1010 dnl 4. if it doesn't exist as a directory.
1011 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1013 for x in $LDFLAGS; do
1014 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1015 if test "X$x" = "X-L$additional_libdir"; then
1020 if test -z "$haveit"; then
1021 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1022 if test -n "$GCC"; then
1024 linux*) haveit=yes;;
1028 if test -z "$haveit"; then
1029 if test -d "$additional_libdir"; then
1030 dnl Really add $additional_libdir to $LDFLAGS.
1031 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1039 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1040 dnl acl_final_exec_prefix, containing the values to which $prefix and
1041 dnl $exec_prefix will expand at the end of the configure script.
1042 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1044 dnl Unfortunately, prefix and exec_prefix get only finally determined
1045 dnl at the end of configure.
1046 if test "X$prefix" = "XNONE"; then
1047 acl_final_prefix="$ac_default_prefix"
1049 acl_final_prefix="$prefix"
1051 if test "X$exec_prefix" = "XNONE"; then
1052 acl_final_exec_prefix='${prefix}'
1054 acl_final_exec_prefix="$exec_prefix"
1056 acl_save_prefix="$prefix"
1057 prefix="$acl_final_prefix"
1058 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1059 prefix="$acl_save_prefix"
1062 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1063 dnl variables prefix and exec_prefix bound to the values they will have
1064 dnl at the end of the configure script.
1065 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1067 acl_save_prefix="$prefix"
1068 prefix="$acl_final_prefix"
1069 acl_save_exec_prefix="$exec_prefix"
1070 exec_prefix="$acl_final_exec_prefix"
1072 exec_prefix="$acl_save_exec_prefix"
1073 prefix="$acl_save_prefix"
1076 dnl AC_LIB_PREPARE_MULTILIB creates
1077 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1078 dnl "lib" or "lib64" or "lib/64",
1079 dnl - a variable acl_libdirstem2, as a secondary possible value for
1080 dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1082 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1084 dnl There is no formal standard regarding lib and lib64.
1085 dnl On glibc systems, the current practice is that on a system supporting
1086 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1087 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1088 dnl the compiler's default mode by looking at the compiler's library search
1089 dnl path. If at least one of its elements ends in /lib64 or points to a
1090 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1091 dnl Otherwise we use the default, namely "lib".
1092 dnl On Solaris systems, the current practice is that on a system supporting
1093 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1094 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1095 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1096 AC_REQUIRE([AC_CANONICAL_HOST])
1101 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1102 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1103 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1104 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1105 dnl symlink is missing, so we set acl_libdirstem2 too.
1106 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1107 [AC_EGREP_CPP([sixtyfour bits], [
1111 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1113 if test $gl_cv_solaris_64bit = yes; then
1114 acl_libdirstem=lib/64
1116 sparc*) acl_libdirstem2=lib/sparcv9 ;;
1117 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1122 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1123 if test -n "$searchpath"; then
1124 acl_save_IFS="${IFS= }"; IFS=":"
1125 for searchdir in $searchpath; do
1126 if test -d "$searchdir"; then
1127 case "$searchdir" in
1128 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1130 # Better ignore directories of this form. They are misleading.
1132 *) searchdir=`cd "$searchdir" && pwd`
1133 case "$searchdir" in
1134 */lib64 ) acl_libdirstem=lib64 ;;
1143 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1146 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1147 # serial 1 (pkg-config-0.24)
1149 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1151 # This program is free software; you can redistribute it and/or modify
1152 # it under the terms of the GNU General Public License as published by
1153 # the Free Software Foundation; either version 2 of the License, or
1154 # (at your option) any later version.
1156 # This program is distributed in the hope that it will be useful, but
1157 # WITHOUT ANY WARRANTY; without even the implied warranty of
1158 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1159 # General Public License for more details.
1161 # You should have received a copy of the GNU General Public License
1162 # along with this program; if not, write to the Free Software
1163 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1165 # As a special exception to the GNU General Public License, if you
1166 # distribute this file as part of a program that contains a
1167 # configuration script generated by Autoconf, you may include it under
1168 # the same distribution terms that you use for the rest of that program.
1170 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
1171 # ----------------------------------
1172 AC_DEFUN([PKG_PROG_PKG_CONFIG],
1173 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1174 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1175 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1176 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1177 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1178 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1180 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1181 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1183 if test -n "$PKG_CONFIG"; then
1184 _pkg_min_version=m4_default([$1], [0.9.0])
1185 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1186 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1187 AC_MSG_RESULT([yes])
1193 ])# PKG_PROG_PKG_CONFIG
1195 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1197 # Check to see whether a particular set of modules exists. Similar
1198 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
1200 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1201 # only at the first occurence in configure.ac, so if the first place
1202 # it's called might be skipped (such as if it is within an "if", you
1203 # have to call PKG_CHECK_EXISTS manually
1204 # --------------------------------------------------------------
1205 AC_DEFUN([PKG_CHECK_EXISTS],
1206 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1207 if test -n "$PKG_CONFIG" && \
1208 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1209 m4_default([$2], [:])
1210 m4_ifvaln([$3], [else
1214 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1215 # ---------------------------------------------
1216 m4_define([_PKG_CONFIG],
1217 [if test -n "$$1"; then
1219 elif test -n "$PKG_CONFIG"; then
1220 PKG_CHECK_EXISTS([$3],
1221 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1222 test "x$?" != "x0" && pkg_failed=yes ],
1229 # _PKG_SHORT_ERRORS_SUPPORTED
1230 # -----------------------------
1231 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1232 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1233 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1234 _pkg_short_errors_supported=yes
1236 _pkg_short_errors_supported=no
1238 ])# _PKG_SHORT_ERRORS_SUPPORTED
1241 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1242 # [ACTION-IF-NOT-FOUND])
1245 # Note that if there is a possibility the first call to
1246 # PKG_CHECK_MODULES might not happen, you should be sure to include an
1247 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1250 # --------------------------------------------------------------
1251 AC_DEFUN([PKG_CHECK_MODULES],
1252 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1253 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1254 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1257 AC_MSG_CHECKING([for $1])
1259 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1260 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
1262 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1263 and $1[]_LIBS to avoid the need to call pkg-config.
1264 See the pkg-config man page for more details.])
1266 if test $pkg_failed = yes; then
1268 _PKG_SHORT_ERRORS_SUPPORTED
1269 if test $_pkg_short_errors_supported = yes; then
1270 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1272 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1274 # Put the nasty error message in config.log where it belongs
1275 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1277 m4_default([$4], [AC_MSG_ERROR(
1278 [Package requirements ($2) were not met:
1282 Consider adjusting the PKG_CONFIG_PATH environment variable if you
1283 installed software in a non-standard prefix.
1287 elif test $pkg_failed = untried; then
1289 m4_default([$4], [AC_MSG_FAILURE(
1290 [The pkg-config script could not be found or is too old. Make sure it
1291 is in your PATH or set the PKG_CONFIG environment variable to the full
1296 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1299 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1300 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1301 AC_MSG_RESULT([yes])
1304 ])# PKG_CHECK_MODULES
1307 # PKG_INSTALLDIR(DIRECTORY)
1308 # -------------------------
1309 # Substitutes the variable pkgconfigdir as the location where a module
1310 # should install pkg-config .pc files. By default the directory is
1311 # $libdir/pkgconfig, but the default can be changed by passing
1312 # DIRECTORY. The user can override through the --with-pkgconfigdir
1314 AC_DEFUN([PKG_INSTALLDIR],
1315 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
1316 m4_pushdef([pkg_description],
1317 [pkg-config installation directory @<:@]pkg_default[@:>@])
1318 AC_ARG_WITH([pkgconfigdir],
1319 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
1320 [with_pkgconfigdir=]pkg_default)
1321 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
1322 m4_popdef([pkg_default])
1323 m4_popdef([pkg_description])
1324 ]) dnl PKG_INSTALLDIR
1327 # PKG_NOARCH_INSTALLDIR(DIRECTORY)
1328 # -------------------------
1329 # Substitutes the variable noarch_pkgconfigdir as the location where a
1330 # module should install arch-independent pkg-config .pc files. By
1331 # default the directory is $datadir/pkgconfig, but the default can be
1332 # changed by passing DIRECTORY. The user can override through the
1333 # --with-noarch-pkgconfigdir parameter.
1334 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
1335 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
1336 m4_pushdef([pkg_description],
1337 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
1338 AC_ARG_WITH([noarch-pkgconfigdir],
1339 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
1340 [with_noarch_pkgconfigdir=]pkg_default)
1341 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
1342 m4_popdef([pkg_default])
1343 m4_popdef([pkg_description])
1344 ]) dnl PKG_NOARCH_INSTALLDIR
1347 # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
1348 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1349 # -------------------------------------------
1350 # Retrieves the value of the pkg-config variable for the given module.
1351 AC_DEFUN([PKG_CHECK_VAR],
1352 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1353 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
1355 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
1356 AS_VAR_COPY([$1], [pkg_cv_][$1])
1358 AS_VAR_IF([$1], [""], [$5], [$4])dnl
1361 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
1363 # This file is free software; the Free Software Foundation
1364 # gives unlimited permission to copy and/or distribute it,
1365 # with or without modifications, as long as this notice is preserved.
1367 # AM_AUTOMAKE_VERSION(VERSION)
1368 # ----------------------------
1369 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1370 # generated from the m4 files accompanying Automake X.Y.
1371 # (This private macro should not be called outside this file.)
1372 AC_DEFUN([AM_AUTOMAKE_VERSION],
1373 [am__api_version='1.13'
1374 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1375 dnl require some minimum version. Point them to the right macro.
1376 m4_if([$1], [1.13.4], [],
1377 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1380 # _AM_AUTOCONF_VERSION(VERSION)
1381 # -----------------------------
1382 # aclocal traces this macro to find the Autoconf version.
1383 # This is a private macro too. Using m4_define simplifies
1384 # the logic in aclocal, which can simply ignore this definition.
1385 m4_define([_AM_AUTOCONF_VERSION], [])
1387 # AM_SET_CURRENT_AUTOMAKE_VERSION
1388 # -------------------------------
1389 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1390 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1391 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1392 [AM_AUTOMAKE_VERSION([1.13.4])dnl
1393 m4_ifndef([AC_AUTOCONF_VERSION],
1394 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1395 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1397 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
1399 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1401 # This file is free software; the Free Software Foundation
1402 # gives unlimited permission to copy and/or distribute it,
1403 # with or without modifications, as long as this notice is preserved.
1405 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1406 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
1407 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
1409 # Of course, Automake must honor this variable whenever it calls a
1410 # tool from the auxiliary directory. The problem is that $srcdir (and
1411 # therefore $ac_aux_dir as well) can be either absolute or relative,
1412 # depending on how configure is run. This is pretty annoying, since
1413 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
1414 # source directory, any form will work fine, but in subdirectories a
1415 # relative path needs to be adjusted first.
1417 # $ac_aux_dir/missing
1418 # fails when called from a subdirectory if $ac_aux_dir is relative
1419 # $top_srcdir/$ac_aux_dir/missing
1420 # fails if $ac_aux_dir is absolute,
1421 # fails when called from a subdirectory in a VPATH build with
1422 # a relative $ac_aux_dir
1424 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1425 # are both prefixed by $srcdir. In an in-source build this is usually
1426 # harmless because $srcdir is '.', but things will broke when you
1427 # start a VPATH build or use an absolute $srcdir.
1429 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1430 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1431 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1432 # and then we would define $MISSING as
1433 # MISSING="\${SHELL} $am_aux_dir/missing"
1434 # This will work as long as MISSING is not called from configure, because
1435 # unfortunately $(top_srcdir) has no meaning in configure.
1436 # However there are other variables, like CC, which are often used in
1437 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1439 # Another solution, used here, is to always expand $ac_aux_dir to an
1440 # absolute PATH. The drawback is that using absolute paths prevent a
1441 # configured tree to be moved without reconfiguration.
1443 AC_DEFUN([AM_AUX_DIR_EXPAND],
1444 [dnl Rely on autoconf to set up CDPATH properly.
1445 AC_PREREQ([2.50])dnl
1446 # expand $ac_aux_dir to an absolute path
1447 am_aux_dir=`cd $ac_aux_dir && pwd`
1450 # AM_CONDITIONAL -*- Autoconf -*-
1452 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
1454 # This file is free software; the Free Software Foundation
1455 # gives unlimited permission to copy and/or distribute it,
1456 # with or without modifications, as long as this notice is preserved.
1458 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1459 # -------------------------------------
1460 # Define a conditional.
1461 AC_DEFUN([AM_CONDITIONAL],
1462 [AC_PREREQ([2.52])dnl
1463 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1464 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1465 AC_SUBST([$1_TRUE])dnl
1466 AC_SUBST([$1_FALSE])dnl
1467 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
1468 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
1469 m4_define([_AM_COND_VALUE_$1], [$2])dnl
1477 AC_CONFIG_COMMANDS_PRE(
1478 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1479 AC_MSG_ERROR([[conditional "$1" was never defined.
1480 Usually this means the macro was only invoked conditionally.]])
1483 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
1485 # This file is free software; the Free Software Foundation
1486 # gives unlimited permission to copy and/or distribute it,
1487 # with or without modifications, as long as this notice is preserved.
1490 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1491 # written in clear, in which case automake, when reading aclocal.m4,
1492 # will think it sees a *use*, and therefore will trigger all it's
1493 # C support machinery. Also note that it means that autoscan, seeing
1494 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1497 # _AM_DEPENDENCIES(NAME)
1498 # ----------------------
1499 # See how the compiler implements dependency checking.
1500 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1501 # We try a few techniques and use that to set a single cache variable.
1503 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1504 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1505 # dependency, and given that the user is not expected to run this macro,
1506 # just rely on AC_PROG_CC.
1507 AC_DEFUN([_AM_DEPENDENCIES],
1508 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1509 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1510 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1511 AC_REQUIRE([AM_DEP_TRACK])dnl
1513 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
1514 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
1515 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1516 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1517 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
1518 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1519 [depcc="$$1" am_compiler_list=])
1521 AC_CACHE_CHECK([dependency style of $depcc],
1522 [am_cv_$1_dependencies_compiler_type],
1523 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1524 # We make a subdir and do the tests there. Otherwise we can end up
1525 # making bogus files that we don't know about and never remove. For
1526 # instance it was reported that on HP-UX the gcc test will end up
1527 # making a dummy file named 'D' -- because '-MD' means "put the output
1531 # Copy depcomp to subdir because otherwise we won't find it if we're
1532 # using a relative directory.
1533 cp "$am_depcomp" conftest.dir
1535 # We will build objects and dependencies in a subdirectory because
1536 # it helps to detect inapplicable dependency modes. For instance
1537 # both Tru64's cc and ICC support -MD to output dependencies as a
1538 # side effect of compilation, but ICC will put the dependencies in
1539 # the current directory while Tru64 will put them in the object
1543 am_cv_$1_dependencies_compiler_type=none
1544 if test "$am_compiler_list" = ""; then
1545 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1549 [case " $depcc " in #(
1550 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1553 [case " $depcc " in #(
1554 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1557 for depmode in $am_compiler_list; do
1558 # Setup a source with many dependencies, because some compilers
1559 # like to wrap large dependency lists on column 80 (with \), and
1560 # we should not choose a depcomp mode which is confused by this.
1562 # We need to recreate these files for each test, as the compiler may
1563 # overwrite some of them when testing with obscure command lines.
1564 # This happens at least with the AIX C compiler.
1566 for i in 1 2 3 4 5 6; do
1567 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1568 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1569 # Solaris 10 /bin/sh.
1570 echo '/* dummy */' > sub/conftst$i.h
1572 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1574 # We check with '-c' and '-o' for the sake of the "dashmstdout"
1575 # mode. It turns out that the SunPro C++ compiler does not properly
1576 # handle '-M -o', and we need to detect this. Also, some Intel
1577 # versions had trouble with output in subdirs.
1578 am__obj=sub/conftest.${OBJEXT-o}
1579 am__minus_obj="-o $am__obj"
1582 # This depmode causes a compiler race in universal mode.
1583 test "$am__universal" = false || continue
1586 # After this tag, mechanisms are not by side-effect, so they'll
1587 # only be used when explicitly requested.
1588 if test "x$enable_dependency_tracking" = xyes; then
1594 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1595 # This compiler won't grok '-c -o', but also, the minuso test has
1596 # not run yet. These depmodes are late enough in the game, and
1597 # so weak that their functioning should not be impacted.
1598 am__obj=conftest.${OBJEXT-o}
1603 if depmode=$depmode \
1604 source=sub/conftest.c object=$am__obj \
1605 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1606 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1607 >/dev/null 2>conftest.err &&
1608 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1609 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1610 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1611 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1612 # icc doesn't choke on unknown options, it will just issue warnings
1613 # or remarks (even with -Werror). So we grep stderr for any message
1614 # that says an option was ignored or not supported.
1615 # When given -MP, icc 7.0 and 7.1 complain thusly:
1616 # icc: Command line warning: ignoring option '-M'; no argument required
1617 # The diagnosis changed in icc 8.0:
1618 # icc: Command line remark: option '-MP' not supported
1619 if (grep 'ignoring option' conftest.err ||
1620 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1621 am_cv_$1_dependencies_compiler_type=$depmode
1630 am_cv_$1_dependencies_compiler_type=none
1633 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1634 AM_CONDITIONAL([am__fastdep$1], [
1635 test "x$enable_dependency_tracking" != xno \
1636 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1642 # Choose a directory name for dependency files.
1643 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1644 AC_DEFUN([AM_SET_DEPDIR],
1645 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1646 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1652 AC_DEFUN([AM_DEP_TRACK],
1653 [AC_ARG_ENABLE([dependency-tracking], [dnl
1655 [--enable-dependency-tracking],
1656 [do not reject slow dependency extractors])
1658 [--disable-dependency-tracking],
1659 [speeds up one-time build])])
1660 if test "x$enable_dependency_tracking" != xno; then
1661 am_depcomp="$ac_aux_dir/depcomp"
1665 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1666 AC_SUBST([AMDEPBACKSLASH])dnl
1667 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1668 AC_SUBST([am__nodep])dnl
1669 _AM_SUBST_NOTMAKE([am__nodep])dnl
1672 # Generate code to set up dependency tracking. -*- Autoconf -*-
1674 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
1676 # This file is free software; the Free Software Foundation
1677 # gives unlimited permission to copy and/or distribute it,
1678 # with or without modifications, as long as this notice is preserved.
1681 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1682 # ------------------------------
1683 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1685 # Older Autoconf quotes --file arguments for eval, but not when files
1686 # are listed without --file. Let's play safe and only enable the eval
1687 # if we detect the quoting.
1688 case $CONFIG_FILES in
1689 *\'*) eval set x "$CONFIG_FILES" ;;
1690 *) set x $CONFIG_FILES ;;
1695 # Strip MF so we end up with the name of the file.
1696 mf=`echo "$mf" | sed -e 's/:.*$//'`
1697 # Check whether this is an Automake generated Makefile or not.
1698 # We used to match only the files named 'Makefile.in', but
1699 # some people rename them; so instead we look at the file content.
1700 # Grep'ing the first line is not enough: some people post-process
1701 # each Makefile.in and add a new line on top of each file to say so.
1702 # Grep'ing the whole file is not good either: AIX grep has a line
1703 # limit of 2048, but all sed's we know have understand at least 4000.
1704 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1705 dirpart=`AS_DIRNAME("$mf")`
1709 # Extract the definition of DEPDIR, am__include, and am__quote
1710 # from the Makefile without running 'make'.
1711 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1712 test -z "$DEPDIR" && continue
1713 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1714 test -z "$am__include" && continue
1715 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1716 # Find all dependency output files, they are included files with
1717 # $(DEPDIR) in their names. We invoke sed twice because it is the
1718 # simplest approach to changing $(DEPDIR) to its actual value in the
1720 for file in `sed -n "
1721 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1722 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1723 # Make sure the directory exists.
1724 test -f "$dirpart/$file" && continue
1725 fdir=`AS_DIRNAME(["$file"])`
1726 AS_MKDIR_P([$dirpart/$fdir])
1727 # echo "creating $dirpart/$file"
1728 echo '# dummy' > "$dirpart/$file"
1732 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1735 # AM_OUTPUT_DEPENDENCY_COMMANDS
1736 # -----------------------------
1737 # This macro should only be invoked once -- use via AC_REQUIRE.
1739 # This code is only required when automatic dependency tracking
1740 # is enabled. FIXME. This creates each '.P' file that we will
1741 # need in order to bootstrap the dependency handling code.
1742 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1743 [AC_CONFIG_COMMANDS([depfiles],
1744 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1745 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1748 # Do all the work for Automake. -*- Autoconf -*-
1750 # Copyright (C) 1996-2013 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.
1756 # This macro actually does too much. Some checks are only needed if
1757 # your package does certain things. But this isn't really a big deal.
1759 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1760 # AM_INIT_AUTOMAKE([OPTIONS])
1761 # -----------------------------------------------
1762 # The call with PACKAGE and VERSION arguments is the old style
1763 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1764 # and VERSION should now be passed to AC_INIT and removed from
1765 # the call to AM_INIT_AUTOMAKE.
1766 # We support both call styles for the transition. After
1767 # the next Automake release, Autoconf can make the AC_INIT
1768 # arguments mandatory, and then we can depend on a new Autoconf
1769 # release and drop the old call support.
1770 AC_DEFUN([AM_INIT_AUTOMAKE],
1771 [AC_PREREQ([2.65])dnl
1772 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1773 dnl the ones we care about.
1774 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1775 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1776 AC_REQUIRE([AC_PROG_INSTALL])dnl
1777 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1778 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1779 # is not polluted with repeated "-I."
1780 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1781 # test to see if srcdir already configured
1782 if test -f $srcdir/config.status; then
1783 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1787 # test whether we have cygpath
1788 if test -z "$CYGPATH_W"; then
1789 if (cygpath --version) >/dev/null 2>/dev/null; then
1790 CYGPATH_W='cygpath -w'
1795 AC_SUBST([CYGPATH_W])
1797 # Define the identity of the package.
1798 dnl Distinguish between old-style and new-style calls.
1800 [AC_DIAGNOSE([obsolete],
1801 [$0: two- and three-arguments forms are deprecated.])
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.
1808 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1810 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1811 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1812 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1814 _AM_IF_OPTION([no-define],,
1815 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1816 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1818 # Some tools Automake needs.
1819 AC_REQUIRE([AM_SANITY_CHECK])dnl
1820 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1821 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1822 AM_MISSING_PROG([AUTOCONF], [autoconf])
1823 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1824 AM_MISSING_PROG([AUTOHEADER], [autoheader])
1825 AM_MISSING_PROG([MAKEINFO], [makeinfo])
1826 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1827 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1828 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1829 # For better backward compatibility. To be removed once Automake 1.9.x
1830 # dies out for good. For more background, see:
1831 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1832 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1833 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1834 # We need awk for the "check" target. The system "awk" is bad on
1836 AC_REQUIRE([AC_PROG_AWK])dnl
1837 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1838 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1839 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1840 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1841 [_AM_PROG_TAR([v7])])])
1842 _AM_IF_OPTION([no-dependencies],,
1843 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1844 [_AM_DEPENDENCIES([CC])],
1845 [m4_define([AC_PROG_CC],
1846 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1847 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1848 [_AM_DEPENDENCIES([CXX])],
1849 [m4_define([AC_PROG_CXX],
1850 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1851 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1852 [_AM_DEPENDENCIES([OBJC])],
1853 [m4_define([AC_PROG_OBJC],
1854 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1855 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1856 [_AM_DEPENDENCIES([OBJCXX])],
1857 [m4_define([AC_PROG_OBJCXX],
1858 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
1860 AC_REQUIRE([AM_SILENT_RULES])dnl
1861 dnl The testsuite driver may need to know about EXEEXT, so add the
1862 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
1863 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1864 AC_CONFIG_COMMANDS_PRE(dnl
1865 [m4_provide_if([_AM_COMPILER_EXEEXT],
1866 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1869 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1870 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1871 dnl mangled by Autoconf and run in a shell conditional statement.
1872 m4_define([_AC_COMPILER_EXEEXT],
1873 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1876 # When config.status generates a header, we must update the stamp-h file.
1877 # This file resides in the same directory as the config header
1878 # that is generated. The stamp files are numbered to have different names.
1880 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1881 # loop where config.status creates the headers, so we can generate
1882 # our stamp files there.
1883 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1884 [# Compute $1's index in $config_headers.
1887 for _am_header in $config_headers :; do
1889 $_am_arg | $_am_arg:* )
1892 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1895 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1897 # Copyright (C) 2001-2013 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.
1903 # AM_PROG_INSTALL_SH
1904 # ------------------
1905 # Define $install_sh.
1906 AC_DEFUN([AM_PROG_INSTALL_SH],
1907 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1908 if test x"${install_sh}" != xset; then
1911 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1913 install_sh="\${SHELL} $am_aux_dir/install-sh"
1916 AC_SUBST([install_sh])])
1918 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
1920 # This file is free software; the Free Software Foundation
1921 # gives unlimited permission to copy and/or distribute it,
1922 # with or without modifications, as long as this notice is preserved.
1924 # Check whether the underlying file-system supports filenames
1925 # with a leading dot. For instance MS-DOS doesn't.
1926 AC_DEFUN([AM_SET_LEADING_DOT],
1927 [rm -rf .tst 2>/dev/null
1928 mkdir .tst 2>/dev/null
1929 if test -d .tst; then
1934 rmdir .tst 2>/dev/null
1935 AC_SUBST([am__leading_dot])])
1937 # Check to see how 'make' treats includes. -*- Autoconf -*-
1939 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1941 # This file is free software; the Free Software Foundation
1942 # gives unlimited permission to copy and/or distribute it,
1943 # with or without modifications, as long as this notice is preserved.
1947 # Check to see how make treats includes.
1948 AC_DEFUN([AM_MAKE_INCLUDE],
1949 [am_make=${MAKE-make}
1950 cat > confinc << 'END'
1952 @echo this is the am__doit target
1955 # If we don't find an include directive, just comment out the code.
1956 AC_MSG_CHECKING([for style of include used by $am_make])
1960 # First try GNU make style include.
1961 echo "include confinc" > confmf
1962 # Ignore all kinds of additional output from 'make'.
1963 case `$am_make -s -f confmf 2> /dev/null` in #(
1964 *the\ am__doit\ target*)
1970 # Now try BSD make style include.
1971 if test "$am__include" = "#"; then
1972 echo '.include "confinc"' > confmf
1973 case `$am_make -s -f confmf 2> /dev/null` in #(
1974 *the\ am__doit\ target*)
1975 am__include=.include
1981 AC_SUBST([am__include])
1982 AC_SUBST([am__quote])
1983 AC_MSG_RESULT([$_am_result])
1984 rm -f confinc confmf
1987 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1989 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
1991 # This file is free software; the Free Software Foundation
1992 # gives unlimited permission to copy and/or distribute it,
1993 # with or without modifications, as long as this notice is preserved.
1995 # AM_MISSING_PROG(NAME, PROGRAM)
1996 # ------------------------------
1997 AC_DEFUN([AM_MISSING_PROG],
1998 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1999 $1=${$1-"${am_missing_run}$2"}
2002 # AM_MISSING_HAS_RUN
2003 # ------------------
2004 # Define MISSING if not defined so far and test if it is modern enough.
2005 # If it is, set am_missing_run to use it, otherwise, to nothing.
2006 AC_DEFUN([AM_MISSING_HAS_RUN],
2007 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2008 AC_REQUIRE_AUX_FILE([missing])dnl
2009 if test x"${MISSING+set}" != xset; then
2012 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2014 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2017 # Use eval to expand $SHELL
2018 if eval "$MISSING --is-lightweight"; then
2019 am_missing_run="$MISSING "
2022 AC_MSG_WARN(['missing' script is too old or missing])
2027 # Obsolete and "removed" macros, that must however still report explicit
2028 # error messages when used, to smooth transition.
2030 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
2032 # This file is free software; the Free Software Foundation
2033 # gives unlimited permission to copy and/or distribute it,
2034 # with or without modifications, as long as this notice is preserved.
2036 AC_DEFUN([AM_CONFIG_HEADER],
2037 [AC_DIAGNOSE([obsolete],
2038 ['$0': this macro is obsolete.
2039 You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
2040 AC_CONFIG_HEADERS($@)])
2042 AC_DEFUN([AM_PROG_CC_STDC],
2044 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
2045 AC_DIAGNOSE([obsolete],
2046 ['$0': this macro is obsolete.
2047 You should simply use the 'AC][_PROG_CC' macro instead.
2048 Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
2049 but upon 'ac_cv_prog_cc_stdc'.])])
2051 AC_DEFUN([AM_C_PROTOTYPES],
2052 [AC_FATAL([automatic de-ANSI-fication support has been removed])])
2053 AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
2055 # Helper functions for option handling. -*- Autoconf -*-
2057 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
2059 # This file is free software; the Free Software Foundation
2060 # gives unlimited permission to copy and/or distribute it,
2061 # with or without modifications, as long as this notice is preserved.
2063 # _AM_MANGLE_OPTION(NAME)
2064 # -----------------------
2065 AC_DEFUN([_AM_MANGLE_OPTION],
2066 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2068 # _AM_SET_OPTION(NAME)
2069 # --------------------
2070 # Set option NAME. Presently that only means defining a flag for this option.
2071 AC_DEFUN([_AM_SET_OPTION],
2072 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
2074 # _AM_SET_OPTIONS(OPTIONS)
2075 # ------------------------
2076 # OPTIONS is a space-separated list of Automake options.
2077 AC_DEFUN([_AM_SET_OPTIONS],
2078 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2080 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2081 # -------------------------------------------
2082 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2083 AC_DEFUN([_AM_IF_OPTION],
2084 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2086 # Check to make sure that the build environment is sane. -*- Autoconf -*-
2088 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
2090 # This file is free software; the Free Software Foundation
2091 # gives unlimited permission to copy and/or distribute it,
2092 # with or without modifications, as long as this notice is preserved.
2096 AC_DEFUN([AM_SANITY_CHECK],
2097 [AC_MSG_CHECKING([whether build environment is sane])
2098 # Reject unsafe characters in $srcdir or the absolute working directory
2099 # name. Accept space and tab only in the latter.
2103 *[[\\\"\#\$\&\'\`$am_lf]]*)
2104 AC_MSG_ERROR([unsafe absolute working directory name]);;
2107 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
2108 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
2111 # Do 'set' in a subshell so we don't clobber the current shell's
2112 # arguments. Must try -L first in case configure is actually a
2113 # symlink; some systems play weird games with the mod time of symlinks
2114 # (eg FreeBSD returns the mod time of the symlink's containing
2118 for am_try in 1 2; do
2119 echo "timestamp, slept: $am_has_slept" > conftest.file
2120 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2121 if test "$[*]" = "X"; then
2123 set X `ls -t "$srcdir/configure" conftest.file`
2125 if test "$[*]" != "X $srcdir/configure conftest.file" \
2126 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2128 # If neither matched, then we have a broken ls. This can happen
2129 # if, for instance, CONFIG_SHELL is bash and it inherits a
2130 # broken ls alias from the environment. This has actually
2131 # happened. Such a system could not be considered "sane".
2132 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2133 alias in your environment])
2135 if test "$[2]" = conftest.file || test $am_try -eq 2; then
2142 test "$[2]" = conftest.file
2148 AC_MSG_ERROR([newly created file is older than distributed files!
2149 Check your system clock])
2151 AC_MSG_RESULT([yes])
2152 # If we didn't sleep, we still need to ensure time stamps of config.status and
2153 # generated files are strictly newer.
2155 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2159 AC_CONFIG_COMMANDS_PRE(
2160 [AC_MSG_CHECKING([that generated files are newer than configure])
2161 if test -n "$am_sleep_pid"; then
2162 # Hide warnings about reused PIDs.
2163 wait $am_sleep_pid 2>/dev/null
2165 AC_MSG_RESULT([done])])
2169 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
2171 # This file is free software; the Free Software Foundation
2172 # gives unlimited permission to copy and/or distribute it,
2173 # with or without modifications, as long as this notice is preserved.
2175 # AM_SILENT_RULES([DEFAULT])
2176 # --------------------------
2177 # Enable less verbose build rules; with the default set to DEFAULT
2178 # ("yes" being less verbose, "no" or empty being verbose).
2179 AC_DEFUN([AM_SILENT_RULES],
2180 [AC_ARG_ENABLE([silent-rules], [dnl
2182 [--enable-silent-rules],
2183 [less verbose build output (undo: "make V=1")])
2185 [--disable-silent-rules],
2186 [verbose build output (undo: "make V=0")])dnl
2188 case $enable_silent_rules in @%:@ (((
2189 yes) AM_DEFAULT_VERBOSITY=0;;
2190 no) AM_DEFAULT_VERBOSITY=1;;
2191 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2194 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
2195 dnl do not support nested variable expansions.
2196 dnl See automake bug#9928 and bug#10237.
2197 am_make=${MAKE-make}
2198 AC_CACHE_CHECK([whether $am_make supports nested variables],
2199 [am_cv_make_support_nested_variables],
2200 [if AS_ECHO([['TRUE=$(BAR$(V))
2206 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
2207 am_cv_make_support_nested_variables=yes
2209 am_cv_make_support_nested_variables=no
2211 if test $am_cv_make_support_nested_variables = yes; then
2212 dnl Using '$V' instead of '$(V)' breaks IRIX make.
2214 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2216 AM_V=$AM_DEFAULT_VERBOSITY
2217 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2220 AM_SUBST_NOTMAKE([AM_V])dnl
2221 AC_SUBST([AM_DEFAULT_V])dnl
2222 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
2223 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2225 AC_SUBST([AM_BACKSLASH])dnl
2226 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2229 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
2231 # This file is free software; the Free Software Foundation
2232 # gives unlimited permission to copy and/or distribute it,
2233 # with or without modifications, as long as this notice is preserved.
2235 # AM_PROG_INSTALL_STRIP
2236 # ---------------------
2237 # One issue with vendor 'install' (even GNU) is that you can't
2238 # specify the program used to strip binaries. This is especially
2239 # annoying in cross-compiling environments, where the build's strip
2240 # is unlikely to handle the host's binaries.
2241 # Fortunately install-sh will honor a STRIPPROG variable, so we
2242 # always use install-sh in "make install-strip", and initialize
2243 # STRIPPROG with the value of the STRIP variable (set by the user).
2244 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2245 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2246 # Installed binaries are usually stripped using 'strip' when the user
2247 # run "make install-strip". However 'strip' might not be the right
2248 # tool to use in cross-compilation environments, therefore Automake
2249 # will honor the 'STRIP' environment variable to overrule this program.
2250 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
2251 if test "$cross_compiling" != no; then
2252 AC_CHECK_TOOL([STRIP], [strip], :)
2254 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2255 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2257 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
2259 # This file is free software; the Free Software Foundation
2260 # gives unlimited permission to copy and/or distribute it,
2261 # with or without modifications, as long as this notice is preserved.
2263 # _AM_SUBST_NOTMAKE(VARIABLE)
2264 # ---------------------------
2265 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2266 # This macro is traced by Automake.
2267 AC_DEFUN([_AM_SUBST_NOTMAKE])
2269 # AM_SUBST_NOTMAKE(VARIABLE)
2270 # --------------------------
2271 # Public sister of _AM_SUBST_NOTMAKE.
2272 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2274 # Check how to create a tarball. -*- Autoconf -*-
2276 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
2278 # This file is free software; the Free Software Foundation
2279 # gives unlimited permission to copy and/or distribute it,
2280 # with or without modifications, as long as this notice is preserved.
2282 # _AM_PROG_TAR(FORMAT)
2283 # --------------------
2284 # Check how to create a tarball in format FORMAT.
2285 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
2287 # Substitute a variable $(am__tar) that is a command
2288 # writing to stdout a FORMAT-tarball containing the directory
2290 # tardir=directory && $(am__tar) > result.tar
2292 # Substitute a variable $(am__untar) that extract such
2293 # a tarball read from stdin.
2294 # $(am__untar) < result.tar
2296 AC_DEFUN([_AM_PROG_TAR],
2297 [# Always define AMTAR for backward compatibility. Yes, it's still used
2298 # in the wild :-( We should find a proper way to deprecate it ...
2299 AC_SUBST([AMTAR], ['$${TAR-tar}'])
2301 # We'll loop over all known methods to create a tar archive until one works.
2302 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2305 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2309 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
2310 # There is notably a 21 bits limit for the UID and the GID. In fact,
2311 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
2313 am_max_uid=2097151 # 2^21 - 1
2314 am_max_gid=$am_max_uid
2315 # The $UID and $GID variables are not portable, so we need to resort
2316 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
2317 # below are definitely unexpected, so allow the users to see them
2318 # (that is, avoid stderr redirection).
2319 am_uid=`id -u || echo unknown`
2320 am_gid=`id -g || echo unknown`
2321 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
2322 if test $am_uid -le $am_max_uid; then
2323 AC_MSG_RESULT([yes])
2328 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
2329 if test $am_gid -le $am_max_gid; then
2330 AC_MSG_RESULT([yes])
2339 [m4_fatal([Unknown tar format])])
2341 AC_MSG_CHECKING([how to create a $1 tar archive])
2343 # Go ahead even if we have the value already cached. We do so because we
2344 # need to set the values for the 'am__tar' and 'am__untar' variables.
2345 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2347 for _am_tool in $_am_tools; do
2350 for _am_tar in tar gnutar gtar; do
2351 AM_RUN_LOG([$_am_tar --version]) && break
2353 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2354 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2355 am__untar="$_am_tar -xf -"
2358 # Must skip GNU tar: if it does not support --format= it doesn't create
2359 # ustar tarball either.
2360 (tar --version) >/dev/null 2>&1 && continue
2361 am__tar='tar chf - "$$tardir"'
2362 am__tar_='tar chf - "$tardir"'
2363 am__untar='tar xf -'
2366 am__tar='pax -L -x $1 -w "$$tardir"'
2367 am__tar_='pax -L -x $1 -w "$tardir"'
2371 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2372 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2373 am__untar='cpio -i -H $1 -d'
2382 # If the value was cached, stop now. We just wanted to have am__tar
2383 # and am__untar set.
2384 test -n "${am_cv_prog_tar_$1}" && break
2386 # tar/untar a dummy directory, and stop if the command works.
2389 echo GrepMe > conftest.dir/file
2390 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2392 if test -s conftest.tar; then
2393 AM_RUN_LOG([$am__untar <conftest.tar])
2394 AM_RUN_LOG([cat conftest.dir/file])
2395 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2400 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2401 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2404 AC_SUBST([am__untar])
2407 m4_include([m4/byteorder.m4])
2408 m4_include([m4/iconv.m4])
2409 m4_include([m4/libtool.m4])
2410 m4_include([m4/ltoptions.m4])
2411 m4_include([m4/ltsugar.m4])
2412 m4_include([m4/ltversion.m4])
2413 m4_include([m4/lt~obsolete.m4])
2414 m4_include([m4/stdint.m4])