1 # generated automatically by aclocal 1.15 -*- Autoconf -*-
3 # Copyright (C) 1996-2014 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'.])])
23 # iconv.m4 serial 19 (gettext-0.18.2)
24 dnl Copyright (C) 2000-2002, 2007-2014, 2016 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 From Bruno Haible.
31 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
33 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
34 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
35 AC_REQUIRE([AC_LIB_RPATH])
37 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
39 AC_LIB_LINKFLAGS_BODY([iconv])
42 AC_DEFUN([AM_ICONV_LINK],
44 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
45 dnl those with the standalone portable GNU libiconv installed).
46 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
48 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
50 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
52 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
53 dnl because if the user has installed libiconv and not disabled its use
54 dnl via --without-libiconv-prefix, he wants to use it. The first
55 dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
56 am_save_CPPFLAGS="$CPPFLAGS"
57 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
59 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
60 am_cv_func_iconv="no, consider installing GNU libiconv"
68 [[iconv_t cd = iconv_open("","");
69 iconv(cd,NULL,NULL,NULL,NULL);
71 [am_cv_func_iconv=yes])
72 if test "$am_cv_func_iconv" != yes; then
74 LIBS="$LIBS $LIBICONV"
81 [[iconv_t cd = iconv_open("","");
82 iconv(cd,NULL,NULL,NULL,NULL);
85 [am_cv_func_iconv=yes])
89 if test "$am_cv_func_iconv" = yes; then
90 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
91 dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
94 if test $am_cv_lib_iconv = yes; then
95 LIBS="$LIBS $LIBICONV"
97 am_cv_func_iconv_works=no
98 for ac_iconv_const in '' 'const'; do
106 # define ICONV_CONST $ac_iconv_const
110 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
113 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
114 if (cd_utf8_to_88591 != (iconv_t)(-1))
116 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
118 ICONV_CONST char *inptr = input;
119 size_t inbytesleft = strlen (input);
121 size_t outbytesleft = sizeof (buf);
122 size_t res = iconv (cd_utf8_to_88591,
123 &inptr, &inbytesleft,
124 &outptr, &outbytesleft);
127 iconv_close (cd_utf8_to_88591);
130 /* Test against Solaris 10 bug: Failures are not distinguishable from
131 successful returns. */
133 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
134 if (cd_ascii_to_88591 != (iconv_t)(-1))
136 static ICONV_CONST char input[] = "\263";
138 ICONV_CONST char *inptr = input;
139 size_t inbytesleft = strlen (input);
141 size_t outbytesleft = sizeof (buf);
142 size_t res = iconv (cd_ascii_to_88591,
143 &inptr, &inbytesleft,
144 &outptr, &outbytesleft);
147 iconv_close (cd_ascii_to_88591);
150 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
152 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
153 if (cd_88591_to_utf8 != (iconv_t)(-1))
155 static ICONV_CONST char input[] = "\304";
156 static char buf[2] = { (char)0xDE, (char)0xAD };
157 ICONV_CONST char *inptr = input;
158 size_t inbytesleft = 1;
160 size_t outbytesleft = 1;
161 size_t res = iconv (cd_88591_to_utf8,
162 &inptr, &inbytesleft,
163 &outptr, &outbytesleft);
164 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
166 iconv_close (cd_88591_to_utf8);
169 #if 0 /* This bug could be worked around by the caller. */
170 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
172 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
173 if (cd_88591_to_utf8 != (iconv_t)(-1))
175 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
177 ICONV_CONST char *inptr = input;
178 size_t inbytesleft = strlen (input);
180 size_t outbytesleft = sizeof (buf);
181 size_t res = iconv (cd_88591_to_utf8,
182 &inptr, &inbytesleft,
183 &outptr, &outbytesleft);
186 iconv_close (cd_88591_to_utf8);
190 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
192 if (/* Try standardized names. */
193 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
194 /* Try IRIX, OSF/1 names. */
195 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
197 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
198 /* Try HP-UX names. */
199 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
203 [am_cv_func_iconv_works=yes], ,
205 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
206 *) am_cv_func_iconv_works="guessing yes" ;;
208 test "$am_cv_func_iconv_works" = no || break
212 case "$am_cv_func_iconv_works" in
213 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
214 *) am_func_iconv=yes ;;
217 am_func_iconv=no am_cv_lib_iconv=no
219 if test "$am_func_iconv" = yes; then
220 AC_DEFINE([HAVE_ICONV], [1],
221 [Define if you have the iconv() function and it works.])
223 if test "$am_cv_lib_iconv" = yes; then
224 AC_MSG_CHECKING([how to link with libiconv])
225 AC_MSG_RESULT([$LIBICONV])
227 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
229 CPPFLAGS="$am_save_CPPFLAGS"
234 AC_SUBST([LTLIBICONV])
237 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
238 dnl avoid warnings like
239 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
240 dnl This is tricky because of the way 'aclocal' is implemented:
241 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
242 dnl Otherwise aclocal's initial scan pass would miss the macro definition.
243 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
244 dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
246 m4_define([gl_iconv_AC_DEFUN],
247 m4_version_prereq([2.64],
250 [m4_ifdef([gl_00GNULIB],
255 gl_iconv_AC_DEFUN([AM_ICONV],
258 if test "$am_cv_func_iconv" = yes; then
259 AC_MSG_CHECKING([for iconv declaration])
260 AC_CACHE_VAL([am_cv_proto_iconv], [
270 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
271 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
277 [am_cv_proto_iconv_arg1=""],
278 [am_cv_proto_iconv_arg1="const"])
279 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
280 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
283 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
284 [Define as const if the declaration of iconv() needs const.])
285 dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
286 m4_ifdef([gl_ICONV_H_DEFAULTS],
287 [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
288 if test -n "$am_cv_proto_iconv_arg1"; then
296 dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc.
297 dnl This file is free software; the Free Software Foundation
298 dnl gives unlimited permission to copy and/or distribute it,
299 dnl with or without modifications, as long as this notice is preserved.
301 dnl Subroutines of libtool.m4,
302 dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
303 dnl collision with libtool.m4.
305 dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
306 AC_DEFUN([AC_LIB_PROG_LD_GNU],
307 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
308 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
309 case `$LD -v 2>&1 </dev/null` in
310 *GNU* | *'with BFD'*)
311 acl_cv_prog_gnu_ld=yes
314 acl_cv_prog_gnu_ld=no
317 with_gnu_ld=$acl_cv_prog_gnu_ld
320 dnl From libtool-2.4. Sets the variable LD.
321 AC_DEFUN([AC_LIB_PROG_LD],
322 [AC_REQUIRE([AC_PROG_CC])dnl
323 AC_REQUIRE([AC_CANONICAL_HOST])dnl
325 AC_ARG_WITH([gnu-ld],
326 [AS_HELP_STRING([--with-gnu-ld],
327 [assume the C compiler uses GNU ld [default=no]])],
328 [test "$withval" = no || with_gnu_ld=yes],
331 # Prepare PATH_SEPARATOR.
332 # The user is always right.
333 if test "${PATH_SEPARATOR+set}" != set; then
334 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
335 # contains only /bin. Note that ksh looks also at the FPATH variable,
336 # so we have to set that as well for the test.
338 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
339 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
340 || PATH_SEPARATOR=';'
345 if test "$GCC" = yes; then
346 # Check if gcc -print-prog-name=ld gives a path.
347 AC_MSG_CHECKING([for ld used by $CC])
350 # gcc leaves a trailing carriage return which upsets mingw
351 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
353 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
356 # Accept absolute paths.
357 [[\\/]]* | ?:[[\\/]]*)
358 re_direlt='/[[^/]][[^/]]*/\.\./'
359 # Canonicalize the pathname of ld
360 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
361 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
362 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
364 test -z "$LD" && LD="$ac_prog"
367 # If it fails, then pretend we aren't using GCC.
371 # If it is relative, then search for the first ld in PATH.
375 elif test "$with_gnu_ld" = yes; then
376 AC_MSG_CHECKING([for GNU ld])
378 AC_MSG_CHECKING([for non-GNU ld])
380 AC_CACHE_VAL([acl_cv_path_LD],
381 [if test -z "$LD"; then
382 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
383 for ac_dir in $PATH; do
385 test -z "$ac_dir" && ac_dir=.
386 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
387 acl_cv_path_LD="$ac_dir/$ac_prog"
388 # Check to see if the program is GNU ld. I'd rather use --version,
389 # but apparently some variants of GNU ld only accept -v.
390 # Break only if it was the GNU/non-GNU ld that we prefer.
391 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
392 *GNU* | *'with BFD'*)
393 test "$with_gnu_ld" != no && break
396 test "$with_gnu_ld" != yes && break
403 acl_cv_path_LD="$LD" # Let the user override the test with a path.
406 if test -n "$LD"; then
411 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
415 # lib-link.m4 serial 26 (gettext-0.18.2)
416 dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
417 dnl This file is free software; the Free Software Foundation
418 dnl gives unlimited permission to copy and/or distribute it,
419 dnl with or without modifications, as long as this notice is preserved.
421 dnl From Bruno Haible.
425 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
426 dnl the libraries corresponding to explicit and implicit dependencies.
427 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
428 dnl augments the CPPFLAGS variable.
429 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
430 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
431 AC_DEFUN([AC_LIB_LINKFLAGS],
433 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
434 AC_REQUIRE([AC_LIB_RPATH])
435 pushdef([Name],[m4_translit([$1],[./+-], [____])])
436 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
437 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
438 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
439 AC_LIB_LINKFLAGS_BODY([$1], [$2])
440 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
441 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
442 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
443 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
445 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
446 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
447 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
448 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
449 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
451 AC_SUBST([LTLIB]NAME)
452 AC_SUBST([LIB]NAME[_PREFIX])
453 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
454 dnl results of this search when this library appears as a dependency.
460 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
461 dnl searches for libname and the libraries corresponding to explicit and
462 dnl implicit dependencies, together with the specified include files and
463 dnl the ability to compile and link the specified testcode. The missing-message
464 dnl defaults to 'no' and may contain additional hints for the user.
465 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
466 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
467 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
468 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
469 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
470 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
471 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
473 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
474 AC_REQUIRE([AC_LIB_RPATH])
475 pushdef([Name],[m4_translit([$1],[./+-], [____])])
476 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
477 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
479 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
481 AC_LIB_LINKFLAGS_BODY([$1], [$2])
483 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
484 dnl because if the user has installed lib[]Name and not disabled its use
485 dnl via --without-lib[]Name-prefix, he wants to use it.
486 ac_save_CPPFLAGS="$CPPFLAGS"
487 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
489 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
491 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
492 dnl because these -l options might require -L options that are present in
493 dnl LIBS. -l options benefit only from the -L options listed before it.
494 dnl Otherwise, add it to the front of LIBS, because it may be a static
495 dnl library that depends on another static library that is present in LIBS.
496 dnl Static libraries benefit only from the static libraries listed after
498 case " $LIB[]NAME" in
499 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
500 *) LIBS="$LIB[]NAME $LIBS" ;;
503 [AC_LANG_PROGRAM([[$3]], [[$4]])],
504 [ac_cv_lib[]Name=yes],
505 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
508 if test "$ac_cv_lib[]Name" = yes; then
510 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
511 AC_MSG_CHECKING([how to link with lib[]$1])
512 AC_MSG_RESULT([$LIB[]NAME])
515 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
516 dnl $INC[]NAME either.
517 CPPFLAGS="$ac_save_CPPFLAGS"
522 AC_SUBST([HAVE_LIB]NAME)
524 AC_SUBST([LTLIB]NAME)
525 AC_SUBST([LIB]NAME[_PREFIX])
530 dnl Determine the platform dependent parameters needed to use rpath:
533 dnl acl_libname_spec,
534 dnl acl_library_names_spec,
535 dnl acl_hardcode_libdir_flag_spec,
536 dnl acl_hardcode_libdir_separator,
537 dnl acl_hardcode_direct,
538 dnl acl_hardcode_minus_L.
539 AC_DEFUN([AC_LIB_RPATH],
541 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
542 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
543 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
544 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
545 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
546 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
547 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
548 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
549 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
555 acl_libext="$acl_cv_libext"
556 acl_shlibext="$acl_cv_shlibext"
557 acl_libname_spec="$acl_cv_libname_spec"
558 acl_library_names_spec="$acl_cv_library_names_spec"
559 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
560 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
561 acl_hardcode_direct="$acl_cv_hardcode_direct"
562 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
563 dnl Determine whether the user wants rpath handling at all.
564 AC_ARG_ENABLE([rpath],
565 [ --disable-rpath do not hardcode runtime library paths],
569 dnl AC_LIB_FROMPACKAGE(name, package)
570 dnl declares that libname comes from the given package. The configure file
571 dnl will then not have a --with-libname-prefix option but a
572 dnl --with-package-prefix option. Several libraries can come from the same
573 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
574 dnl macro call that searches for libname.
575 AC_DEFUN([AC_LIB_FROMPACKAGE],
577 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
578 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
579 define([acl_frompackage_]NAME, [$2])
582 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
583 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
584 define([acl_libsinpackage_]PACKUP,
585 m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
590 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
591 dnl the libraries corresponding to explicit and implicit dependencies.
592 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
593 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
594 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
595 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
597 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
598 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
599 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
600 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
601 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
602 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
603 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
604 dnl Autoconf >= 2.61 supports dots in --with options.
605 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
606 dnl By default, look in $includedir and $libdir.
608 AC_LIB_WITH_FINAL_PREFIX([
609 eval additional_includedir=\"$includedir\"
610 eval additional_libdir=\"$libdir\"
612 AC_ARG_WITH(P_A_C_K[-prefix],
613 [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
614 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
616 if test "X$withval" = "Xno"; then
619 if test "X$withval" = "X"; then
620 AC_LIB_WITH_FINAL_PREFIX([
621 eval additional_includedir=\"$includedir\"
622 eval additional_libdir=\"$libdir\"
625 additional_includedir="$withval/include"
626 additional_libdir="$withval/$acl_libdirstem"
627 if test "$acl_libdirstem2" != "$acl_libdirstem" \
628 && ! test -d "$withval/$acl_libdirstem"; then
629 additional_libdir="$withval/$acl_libdirstem2"
634 dnl Search the library and its dependencies in $additional_libdir and
635 dnl $LDFLAGS. Using breadth-first-seach.
640 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
641 dnl computed. So it has to be reset here.
645 names_already_handled=
646 names_next_round='$1 $2'
647 while test -n "$names_next_round"; do
648 names_this_round="$names_next_round"
650 for name in $names_this_round; do
652 for n in $names_already_handled; do
653 if test "$n" = "$name"; then
658 if test -z "$already_handled"; then
659 names_already_handled="$names_already_handled $name"
660 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
661 dnl or AC_LIB_HAVE_LINKFLAGS call.
662 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
663 eval value=\"\$HAVE_LIB$uppername\"
664 if test -n "$value"; then
665 if test "$value" = yes; then
666 eval value=\"\$LIB$uppername\"
667 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
668 eval value=\"\$LTLIB$uppername\"
669 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
671 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
672 dnl that this library doesn't exist. So just drop it.
676 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
677 dnl and the already constructed $LIBNAME/$LTLIBNAME.
682 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
683 if test -n "$acl_shlibext"; then
684 shrext=".$acl_shlibext" # typically: shrext=.so
688 if test $use_additional = yes; then
689 dir="$additional_libdir"
690 dnl The same code as in the loop below:
691 dnl First look for a shared library.
692 if test -n "$acl_shlibext"; then
693 if test -f "$dir/$libname$shrext"; then
695 found_so="$dir/$libname$shrext"
697 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
699 for f in "$libname$shrext".*; do echo "$f"; done \
700 | sed -e "s,^$libname$shrext\\\\.,," \
701 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
702 | sed 1q ) 2>/dev/null`
703 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
705 found_so="$dir/$libname$shrext.$ver"
708 eval library_names=\"$acl_library_names_spec\"
709 for f in $library_names; do
710 if test -f "$dir/$f"; then
719 dnl Then look for a static library.
720 if test "X$found_dir" = "X"; then
721 if test -f "$dir/$libname.$acl_libext"; then
723 found_a="$dir/$libname.$acl_libext"
726 if test "X$found_dir" != "X"; then
727 if test -f "$dir/$libname.la"; then
728 found_la="$dir/$libname.la"
732 if test "X$found_dir" = "X"; then
733 for x in $LDFLAGS $LTLIB[]NAME; do
734 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
737 dir=`echo "X$x" | sed -e 's/^X-L//'`
738 dnl First look for a shared library.
739 if test -n "$acl_shlibext"; then
740 if test -f "$dir/$libname$shrext"; then
742 found_so="$dir/$libname$shrext"
744 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
746 for f in "$libname$shrext".*; do echo "$f"; done \
747 | sed -e "s,^$libname$shrext\\\\.,," \
748 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
749 | sed 1q ) 2>/dev/null`
750 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
752 found_so="$dir/$libname$shrext.$ver"
755 eval library_names=\"$acl_library_names_spec\"
756 for f in $library_names; do
757 if test -f "$dir/$f"; then
766 dnl Then look for a static library.
767 if test "X$found_dir" = "X"; then
768 if test -f "$dir/$libname.$acl_libext"; then
770 found_a="$dir/$libname.$acl_libext"
773 if test "X$found_dir" != "X"; then
774 if test -f "$dir/$libname.la"; then
775 found_la="$dir/$libname.la"
780 if test "X$found_dir" != "X"; then
785 if test "X$found_dir" != "X"; then
786 dnl Found the library.
787 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
788 if test "X$found_so" != "X"; then
789 dnl Linking with a shared library. We attempt to hardcode its
790 dnl directory into the executable's runpath, unless it's the
791 dnl standard /usr/lib.
792 if test "$enable_rpath" = no \
793 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
794 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
795 dnl No hardcoding is needed.
796 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
798 dnl Use an explicit option to hardcode DIR into the resulting
800 dnl Potentially add DIR to ltrpathdirs.
801 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
803 for x in $ltrpathdirs; do
804 if test "X$x" = "X$found_dir"; then
809 if test -z "$haveit"; then
810 ltrpathdirs="$ltrpathdirs $found_dir"
812 dnl The hardcoding into $LIBNAME is system dependent.
813 if test "$acl_hardcode_direct" = yes; then
814 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
815 dnl resulting binary.
816 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
818 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
819 dnl Use an explicit option to hardcode DIR into the resulting
821 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
822 dnl Potentially add DIR to rpathdirs.
823 dnl The rpathdirs will be appended to $LIBNAME at the end.
825 for x in $rpathdirs; do
826 if test "X$x" = "X$found_dir"; then
831 if test -z "$haveit"; then
832 rpathdirs="$rpathdirs $found_dir"
835 dnl Rely on "-L$found_dir".
836 dnl But don't add it if it's already contained in the LDFLAGS
837 dnl or the already constructed $LIBNAME
839 for x in $LDFLAGS $LIB[]NAME; do
840 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
841 if test "X$x" = "X-L$found_dir"; then
846 if test -z "$haveit"; then
847 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
849 if test "$acl_hardcode_minus_L" != no; then
850 dnl FIXME: Not sure whether we should use
851 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
853 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
855 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
856 dnl here, because this doesn't fit in flags passed to the
857 dnl compiler. So give up. No hardcoding. This affects only
858 dnl very old systems.
859 dnl FIXME: Not sure whether we should use
860 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
862 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
868 if test "X$found_a" != "X"; then
869 dnl Linking with a static library.
870 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
872 dnl We shouldn't come here, but anyway it's good to have a
874 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
877 dnl Assume the include files are nearby.
878 additional_includedir=
880 */$acl_libdirstem | */$acl_libdirstem/)
881 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
882 if test "$name" = '$1'; then
883 LIB[]NAME[]_PREFIX="$basedir"
885 additional_includedir="$basedir/include"
887 */$acl_libdirstem2 | */$acl_libdirstem2/)
888 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
889 if test "$name" = '$1'; then
890 LIB[]NAME[]_PREFIX="$basedir"
892 additional_includedir="$basedir/include"
895 if test "X$additional_includedir" != "X"; then
896 dnl Potentially add $additional_includedir to $INCNAME.
898 dnl 1. if it's the standard /usr/include,
899 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
900 dnl 3. if it's already present in $CPPFLAGS or the already
901 dnl constructed $INCNAME,
902 dnl 4. if it doesn't exist as a directory.
903 if test "X$additional_includedir" != "X/usr/include"; then
905 if test "X$additional_includedir" = "X/usr/local/include"; then
906 if test -n "$GCC"; then
908 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
912 if test -z "$haveit"; then
913 for x in $CPPFLAGS $INC[]NAME; do
914 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
915 if test "X$x" = "X-I$additional_includedir"; then
920 if test -z "$haveit"; then
921 if test -d "$additional_includedir"; then
922 dnl Really add $additional_includedir to $INCNAME.
923 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
929 dnl Look for dependencies.
930 if test -n "$found_la"; then
931 dnl Read the .la file. It defines the variables
932 dnl dlname, library_names, old_library, dependency_libs, current,
933 dnl age, revision, installed, dlopen, dlpreopen, libdir.
934 save_libdir="$libdir"
936 */* | *\\*) . "$found_la" ;;
937 *) . "./$found_la" ;;
939 libdir="$save_libdir"
940 dnl We use only dependency_libs.
941 for dep in $dependency_libs; do
944 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
945 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
947 dnl 1. if it's the standard /usr/lib,
948 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
949 dnl 3. if it's already present in $LDFLAGS or the already
950 dnl constructed $LIBNAME,
951 dnl 4. if it doesn't exist as a directory.
952 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
953 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
955 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
956 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
957 if test -n "$GCC"; then
959 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
963 if test -z "$haveit"; then
965 for x in $LDFLAGS $LIB[]NAME; do
966 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
967 if test "X$x" = "X-L$additional_libdir"; then
972 if test -z "$haveit"; then
973 if test -d "$additional_libdir"; then
974 dnl Really add $additional_libdir to $LIBNAME.
975 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
979 for x in $LDFLAGS $LTLIB[]NAME; do
980 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
981 if test "X$x" = "X-L$additional_libdir"; then
986 if test -z "$haveit"; then
987 if test -d "$additional_libdir"; then
988 dnl Really add $additional_libdir to $LTLIBNAME.
989 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
996 dir=`echo "X$dep" | sed -e 's/^X-R//'`
997 if test "$enable_rpath" != no; then
998 dnl Potentially add DIR to rpathdirs.
999 dnl The rpathdirs will be appended to $LIBNAME at the end.
1001 for x in $rpathdirs; do
1002 if test "X$x" = "X$dir"; then
1007 if test -z "$haveit"; then
1008 rpathdirs="$rpathdirs $dir"
1010 dnl Potentially add DIR to ltrpathdirs.
1011 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1013 for x in $ltrpathdirs; do
1014 if test "X$x" = "X$dir"; then
1019 if test -z "$haveit"; then
1020 ltrpathdirs="$ltrpathdirs $dir"
1025 dnl Handle this in the next round.
1026 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1029 dnl Handle this in the next round. Throw away the .la's
1030 dnl directory; it is already contained in a preceding -L
1032 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1035 dnl Most likely an immediate library name.
1036 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1037 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1043 dnl Didn't find the library; assume it is in the system directories
1044 dnl known to the linker and runtime loader. (All the system
1045 dnl directories known to the linker should also be known to the
1046 dnl runtime loader, otherwise the system is severely misconfigured.)
1047 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1048 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1054 if test "X$rpathdirs" != "X"; then
1055 if test -n "$acl_hardcode_libdir_separator"; then
1056 dnl Weird platform: only the last -rpath option counts, the user must
1057 dnl pass all path elements in one option. We can arrange that for a
1058 dnl single library, but not when more than one $LIBNAMEs are used.
1060 for found_dir in $rpathdirs; do
1061 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1063 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1064 acl_save_libdir="$libdir"
1066 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1067 libdir="$acl_save_libdir"
1068 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1070 dnl The -rpath options are cumulative.
1071 for found_dir in $rpathdirs; do
1072 acl_save_libdir="$libdir"
1074 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1075 libdir="$acl_save_libdir"
1076 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1080 if test "X$ltrpathdirs" != "X"; then
1081 dnl When using libtool, the option that works for both libraries and
1082 dnl executables is -R. The -R options are cumulative.
1083 for found_dir in $ltrpathdirs; do
1084 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1094 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1095 dnl unless already present in VAR.
1096 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1097 dnl contains two or three consecutive elements that belong together.
1098 AC_DEFUN([AC_LIB_APPENDTOVAR],
1100 for element in [$2]; do
1103 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1104 if test "X$x" = "X$element"; then
1109 if test -z "$haveit"; then
1110 [$1]="${[$1]}${[$1]:+ }$element"
1115 dnl For those cases where a variable contains several -L and -l options
1116 dnl referring to unknown libraries and directories, this macro determines the
1117 dnl necessary additional linker options for the runtime path.
1118 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1119 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1120 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1121 dnl otherwise linking without libtool is assumed.
1122 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1124 AC_REQUIRE([AC_LIB_RPATH])
1125 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1127 if test "$enable_rpath" != no; then
1128 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1129 dnl Use an explicit option to hardcode directories into the resulting
1134 if test -n "$next"; then
1136 dnl No need to hardcode the standard /usr/lib.
1137 if test "X$dir" != "X/usr/$acl_libdirstem" \
1138 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1139 rpathdirs="$rpathdirs $dir"
1145 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1146 dnl No need to hardcode the standard /usr/lib.
1147 if test "X$dir" != "X/usr/$acl_libdirstem" \
1148 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1149 rpathdirs="$rpathdirs $dir"
1156 if test "X$rpathdirs" != "X"; then
1157 if test -n ""$3""; then
1158 dnl libtool is used for linking. Use -R options.
1159 for dir in $rpathdirs; do
1160 $1="${$1}${$1:+ }-R$dir"
1163 dnl The linker is used for linking directly.
1164 if test -n "$acl_hardcode_libdir_separator"; then
1165 dnl Weird platform: only the last -rpath option counts, the user
1166 dnl must pass all path elements in one option.
1168 for dir in $rpathdirs; do
1169 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1171 acl_save_libdir="$libdir"
1173 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1174 libdir="$acl_save_libdir"
1177 dnl The -rpath options are cumulative.
1178 for dir in $rpathdirs; do
1179 acl_save_libdir="$libdir"
1181 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1182 libdir="$acl_save_libdir"
1183 $1="${$1}${$1:+ }$flag"
1193 # lib-prefix.m4 serial 7 (gettext-0.18)
1194 dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc.
1195 dnl This file is free software; the Free Software Foundation
1196 dnl gives unlimited permission to copy and/or distribute it,
1197 dnl with or without modifications, as long as this notice is preserved.
1199 dnl From Bruno Haible.
1201 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1202 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1203 dnl require excessive bracketing.
1204 ifdef([AC_HELP_STRING],
1205 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1206 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1208 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1209 dnl to access previously installed libraries. The basic assumption is that
1210 dnl a user will want packages to use other packages he previously installed
1211 dnl with the same --prefix option.
1212 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1213 dnl libraries, but is otherwise very convenient.
1214 AC_DEFUN([AC_LIB_PREFIX],
1216 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1217 AC_REQUIRE([AC_PROG_CC])
1218 AC_REQUIRE([AC_CANONICAL_HOST])
1219 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1220 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1221 dnl By default, look in $includedir and $libdir.
1223 AC_LIB_WITH_FINAL_PREFIX([
1224 eval additional_includedir=\"$includedir\"
1225 eval additional_libdir=\"$libdir\"
1227 AC_LIB_ARG_WITH([lib-prefix],
1228 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1229 --without-lib-prefix don't search for libraries in includedir and libdir],
1231 if test "X$withval" = "Xno"; then
1234 if test "X$withval" = "X"; then
1235 AC_LIB_WITH_FINAL_PREFIX([
1236 eval additional_includedir=\"$includedir\"
1237 eval additional_libdir=\"$libdir\"
1240 additional_includedir="$withval/include"
1241 additional_libdir="$withval/$acl_libdirstem"
1245 if test $use_additional = yes; then
1246 dnl Potentially add $additional_includedir to $CPPFLAGS.
1247 dnl But don't add it
1248 dnl 1. if it's the standard /usr/include,
1249 dnl 2. if it's already present in $CPPFLAGS,
1250 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1251 dnl 4. if it doesn't exist as a directory.
1252 if test "X$additional_includedir" != "X/usr/include"; then
1254 for x in $CPPFLAGS; do
1255 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1256 if test "X$x" = "X-I$additional_includedir"; then
1261 if test -z "$haveit"; then
1262 if test "X$additional_includedir" = "X/usr/local/include"; then
1263 if test -n "$GCC"; then
1265 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1269 if test -z "$haveit"; then
1270 if test -d "$additional_includedir"; then
1271 dnl Really add $additional_includedir to $CPPFLAGS.
1272 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1277 dnl Potentially add $additional_libdir to $LDFLAGS.
1278 dnl But don't add it
1279 dnl 1. if it's the standard /usr/lib,
1280 dnl 2. if it's already present in $LDFLAGS,
1281 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1282 dnl 4. if it doesn't exist as a directory.
1283 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1285 for x in $LDFLAGS; do
1286 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1287 if test "X$x" = "X-L$additional_libdir"; then
1292 if test -z "$haveit"; then
1293 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1294 if test -n "$GCC"; then
1296 linux*) haveit=yes;;
1300 if test -z "$haveit"; then
1301 if test -d "$additional_libdir"; then
1302 dnl Really add $additional_libdir to $LDFLAGS.
1303 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1311 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1312 dnl acl_final_exec_prefix, containing the values to which $prefix and
1313 dnl $exec_prefix will expand at the end of the configure script.
1314 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1316 dnl Unfortunately, prefix and exec_prefix get only finally determined
1317 dnl at the end of configure.
1318 if test "X$prefix" = "XNONE"; then
1319 acl_final_prefix="$ac_default_prefix"
1321 acl_final_prefix="$prefix"
1323 if test "X$exec_prefix" = "XNONE"; then
1324 acl_final_exec_prefix='${prefix}'
1326 acl_final_exec_prefix="$exec_prefix"
1328 acl_save_prefix="$prefix"
1329 prefix="$acl_final_prefix"
1330 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1331 prefix="$acl_save_prefix"
1334 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1335 dnl variables prefix and exec_prefix bound to the values they will have
1336 dnl at the end of the configure script.
1337 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1339 acl_save_prefix="$prefix"
1340 prefix="$acl_final_prefix"
1341 acl_save_exec_prefix="$exec_prefix"
1342 exec_prefix="$acl_final_exec_prefix"
1344 exec_prefix="$acl_save_exec_prefix"
1345 prefix="$acl_save_prefix"
1348 dnl AC_LIB_PREPARE_MULTILIB creates
1349 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1350 dnl "lib" or "lib64" or "lib/64",
1351 dnl - a variable acl_libdirstem2, as a secondary possible value for
1352 dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1354 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1356 dnl There is no formal standard regarding lib and lib64.
1357 dnl On glibc systems, the current practice is that on a system supporting
1358 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1359 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1360 dnl the compiler's default mode by looking at the compiler's library search
1361 dnl path. If at least one of its elements ends in /lib64 or points to a
1362 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1363 dnl Otherwise we use the default, namely "lib".
1364 dnl On Solaris systems, the current practice is that on a system supporting
1365 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1366 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1367 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1368 AC_REQUIRE([AC_CANONICAL_HOST])
1373 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1374 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1375 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1376 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1377 dnl symlink is missing, so we set acl_libdirstem2 too.
1378 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1379 [AC_EGREP_CPP([sixtyfour bits], [
1383 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1385 if test $gl_cv_solaris_64bit = yes; then
1386 acl_libdirstem=lib/64
1388 sparc*) acl_libdirstem2=lib/sparcv9 ;;
1389 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1394 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1395 if test -n "$searchpath"; then
1396 acl_save_IFS="${IFS= }"; IFS=":"
1397 for searchdir in $searchpath; do
1398 if test -d "$searchdir"; then
1399 case "$searchdir" in
1400 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1402 # Better ignore directories of this form. They are misleading.
1404 *) searchdir=`cd "$searchdir" && pwd`
1405 case "$searchdir" in
1406 */lib64 ) acl_libdirstem=lib64 ;;
1415 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1418 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
1420 # This file is free software; the Free Software Foundation
1421 # gives unlimited permission to copy and/or distribute it,
1422 # with or without modifications, as long as this notice is preserved.
1424 # AM_AUTOMAKE_VERSION(VERSION)
1425 # ----------------------------
1426 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1427 # generated from the m4 files accompanying Automake X.Y.
1428 # (This private macro should not be called outside this file.)
1429 AC_DEFUN([AM_AUTOMAKE_VERSION],
1430 [am__api_version='1.15'
1431 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1432 dnl require some minimum version. Point them to the right macro.
1433 m4_if([$1], [1.15.1], [],
1434 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1437 # _AM_AUTOCONF_VERSION(VERSION)
1438 # -----------------------------
1439 # aclocal traces this macro to find the Autoconf version.
1440 # This is a private macro too. Using m4_define simplifies
1441 # the logic in aclocal, which can simply ignore this definition.
1442 m4_define([_AM_AUTOCONF_VERSION], [])
1444 # AM_SET_CURRENT_AUTOMAKE_VERSION
1445 # -------------------------------
1446 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1447 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1448 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1449 [AM_AUTOMAKE_VERSION([1.15.1])dnl
1450 m4_ifndef([AC_AUTOCONF_VERSION],
1451 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1452 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1454 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
1456 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
1458 # This file is free software; the Free Software Foundation
1459 # gives unlimited permission to copy and/or distribute it,
1460 # with or without modifications, as long as this notice is preserved.
1462 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1463 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
1464 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
1466 # Of course, Automake must honor this variable whenever it calls a
1467 # tool from the auxiliary directory. The problem is that $srcdir (and
1468 # therefore $ac_aux_dir as well) can be either absolute or relative,
1469 # depending on how configure is run. This is pretty annoying, since
1470 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
1471 # source directory, any form will work fine, but in subdirectories a
1472 # relative path needs to be adjusted first.
1474 # $ac_aux_dir/missing
1475 # fails when called from a subdirectory if $ac_aux_dir is relative
1476 # $top_srcdir/$ac_aux_dir/missing
1477 # fails if $ac_aux_dir is absolute,
1478 # fails when called from a subdirectory in a VPATH build with
1479 # a relative $ac_aux_dir
1481 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1482 # are both prefixed by $srcdir. In an in-source build this is usually
1483 # harmless because $srcdir is '.', but things will broke when you
1484 # start a VPATH build or use an absolute $srcdir.
1486 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1487 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1488 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1489 # and then we would define $MISSING as
1490 # MISSING="\${SHELL} $am_aux_dir/missing"
1491 # This will work as long as MISSING is not called from configure, because
1492 # unfortunately $(top_srcdir) has no meaning in configure.
1493 # However there are other variables, like CC, which are often used in
1494 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1496 # Another solution, used here, is to always expand $ac_aux_dir to an
1497 # absolute PATH. The drawback is that using absolute paths prevent a
1498 # configured tree to be moved without reconfiguration.
1500 AC_DEFUN([AM_AUX_DIR_EXPAND],
1501 [dnl Rely on autoconf to set up CDPATH properly.
1502 AC_PREREQ([2.50])dnl
1503 # expand $ac_aux_dir to an absolute path
1504 am_aux_dir=`cd $ac_aux_dir && pwd`
1507 # AM_CONDITIONAL -*- Autoconf -*-
1509 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
1511 # This file is free software; the Free Software Foundation
1512 # gives unlimited permission to copy and/or distribute it,
1513 # with or without modifications, as long as this notice is preserved.
1515 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1516 # -------------------------------------
1517 # Define a conditional.
1518 AC_DEFUN([AM_CONDITIONAL],
1519 [AC_PREREQ([2.52])dnl
1520 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1521 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1522 AC_SUBST([$1_TRUE])dnl
1523 AC_SUBST([$1_FALSE])dnl
1524 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
1525 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
1526 m4_define([_AM_COND_VALUE_$1], [$2])dnl
1534 AC_CONFIG_COMMANDS_PRE(
1535 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1536 AC_MSG_ERROR([[conditional "$1" was never defined.
1537 Usually this means the macro was only invoked conditionally.]])
1540 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
1542 # This file is free software; the Free Software Foundation
1543 # gives unlimited permission to copy and/or distribute it,
1544 # with or without modifications, as long as this notice is preserved.
1547 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1548 # written in clear, in which case automake, when reading aclocal.m4,
1549 # will think it sees a *use*, and therefore will trigger all it's
1550 # C support machinery. Also note that it means that autoscan, seeing
1551 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1554 # _AM_DEPENDENCIES(NAME)
1555 # ----------------------
1556 # See how the compiler implements dependency checking.
1557 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1558 # We try a few techniques and use that to set a single cache variable.
1560 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1561 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1562 # dependency, and given that the user is not expected to run this macro,
1563 # just rely on AC_PROG_CC.
1564 AC_DEFUN([_AM_DEPENDENCIES],
1565 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1566 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1567 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1568 AC_REQUIRE([AM_DEP_TRACK])dnl
1570 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
1571 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
1572 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1573 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1574 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
1575 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1576 [depcc="$$1" am_compiler_list=])
1578 AC_CACHE_CHECK([dependency style of $depcc],
1579 [am_cv_$1_dependencies_compiler_type],
1580 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1581 # We make a subdir and do the tests there. Otherwise we can end up
1582 # making bogus files that we don't know about and never remove. For
1583 # instance it was reported that on HP-UX the gcc test will end up
1584 # making a dummy file named 'D' -- because '-MD' means "put the output
1588 # Copy depcomp to subdir because otherwise we won't find it if we're
1589 # using a relative directory.
1590 cp "$am_depcomp" conftest.dir
1592 # We will build objects and dependencies in a subdirectory because
1593 # it helps to detect inapplicable dependency modes. For instance
1594 # both Tru64's cc and ICC support -MD to output dependencies as a
1595 # side effect of compilation, but ICC will put the dependencies in
1596 # the current directory while Tru64 will put them in the object
1600 am_cv_$1_dependencies_compiler_type=none
1601 if test "$am_compiler_list" = ""; then
1602 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1606 [case " $depcc " in #(
1607 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1610 [case " $depcc " in #(
1611 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1614 for depmode in $am_compiler_list; do
1615 # Setup a source with many dependencies, because some compilers
1616 # like to wrap large dependency lists on column 80 (with \), and
1617 # we should not choose a depcomp mode which is confused by this.
1619 # We need to recreate these files for each test, as the compiler may
1620 # overwrite some of them when testing with obscure command lines.
1621 # This happens at least with the AIX C compiler.
1623 for i in 1 2 3 4 5 6; do
1624 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1625 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1626 # Solaris 10 /bin/sh.
1627 echo '/* dummy */' > sub/conftst$i.h
1629 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1631 # We check with '-c' and '-o' for the sake of the "dashmstdout"
1632 # mode. It turns out that the SunPro C++ compiler does not properly
1633 # handle '-M -o', and we need to detect this. Also, some Intel
1634 # versions had trouble with output in subdirs.
1635 am__obj=sub/conftest.${OBJEXT-o}
1636 am__minus_obj="-o $am__obj"
1639 # This depmode causes a compiler race in universal mode.
1640 test "$am__universal" = false || continue
1643 # After this tag, mechanisms are not by side-effect, so they'll
1644 # only be used when explicitly requested.
1645 if test "x$enable_dependency_tracking" = xyes; then
1651 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1652 # This compiler won't grok '-c -o', but also, the minuso test has
1653 # not run yet. These depmodes are late enough in the game, and
1654 # so weak that their functioning should not be impacted.
1655 am__obj=conftest.${OBJEXT-o}
1660 if depmode=$depmode \
1661 source=sub/conftest.c object=$am__obj \
1662 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1663 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1664 >/dev/null 2>conftest.err &&
1665 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1666 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1667 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1668 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1669 # icc doesn't choke on unknown options, it will just issue warnings
1670 # or remarks (even with -Werror). So we grep stderr for any message
1671 # that says an option was ignored or not supported.
1672 # When given -MP, icc 7.0 and 7.1 complain thusly:
1673 # icc: Command line warning: ignoring option '-M'; no argument required
1674 # The diagnosis changed in icc 8.0:
1675 # icc: Command line remark: option '-MP' not supported
1676 if (grep 'ignoring option' conftest.err ||
1677 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1678 am_cv_$1_dependencies_compiler_type=$depmode
1687 am_cv_$1_dependencies_compiler_type=none
1690 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1691 AM_CONDITIONAL([am__fastdep$1], [
1692 test "x$enable_dependency_tracking" != xno \
1693 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1699 # Choose a directory name for dependency files.
1700 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1701 AC_DEFUN([AM_SET_DEPDIR],
1702 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1703 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1709 AC_DEFUN([AM_DEP_TRACK],
1710 [AC_ARG_ENABLE([dependency-tracking], [dnl
1712 [--enable-dependency-tracking],
1713 [do not reject slow dependency extractors])
1715 [--disable-dependency-tracking],
1716 [speeds up one-time build])])
1717 if test "x$enable_dependency_tracking" != xno; then
1718 am_depcomp="$ac_aux_dir/depcomp"
1722 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1723 AC_SUBST([AMDEPBACKSLASH])dnl
1724 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1725 AC_SUBST([am__nodep])dnl
1726 _AM_SUBST_NOTMAKE([am__nodep])dnl
1729 # Generate code to set up dependency tracking. -*- Autoconf -*-
1731 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
1733 # This file is free software; the Free Software Foundation
1734 # gives unlimited permission to copy and/or distribute it,
1735 # with or without modifications, as long as this notice is preserved.
1738 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1739 # ------------------------------
1740 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1742 # Older Autoconf quotes --file arguments for eval, but not when files
1743 # are listed without --file. Let's play safe and only enable the eval
1744 # if we detect the quoting.
1745 case $CONFIG_FILES in
1746 *\'*) eval set x "$CONFIG_FILES" ;;
1747 *) set x $CONFIG_FILES ;;
1752 # Strip MF so we end up with the name of the file.
1753 mf=`echo "$mf" | sed -e 's/:.*$//'`
1754 # Check whether this is an Automake generated Makefile or not.
1755 # We used to match only the files named 'Makefile.in', but
1756 # some people rename them; so instead we look at the file content.
1757 # Grep'ing the first line is not enough: some people post-process
1758 # each Makefile.in and add a new line on top of each file to say so.
1759 # Grep'ing the whole file is not good either: AIX grep has a line
1760 # limit of 2048, but all sed's we know have understand at least 4000.
1761 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1762 dirpart=`AS_DIRNAME("$mf")`
1766 # Extract the definition of DEPDIR, am__include, and am__quote
1767 # from the Makefile without running 'make'.
1768 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1769 test -z "$DEPDIR" && continue
1770 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1771 test -z "$am__include" && continue
1772 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1773 # Find all dependency output files, they are included files with
1774 # $(DEPDIR) in their names. We invoke sed twice because it is the
1775 # simplest approach to changing $(DEPDIR) to its actual value in the
1777 for file in `sed -n "
1778 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1779 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1780 # Make sure the directory exists.
1781 test -f "$dirpart/$file" && continue
1782 fdir=`AS_DIRNAME(["$file"])`
1783 AS_MKDIR_P([$dirpart/$fdir])
1784 # echo "creating $dirpart/$file"
1785 echo '# dummy' > "$dirpart/$file"
1789 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1792 # AM_OUTPUT_DEPENDENCY_COMMANDS
1793 # -----------------------------
1794 # This macro should only be invoked once -- use via AC_REQUIRE.
1796 # This code is only required when automatic dependency tracking
1797 # is enabled. FIXME. This creates each '.P' file that we will
1798 # need in order to bootstrap the dependency handling code.
1799 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1800 [AC_CONFIG_COMMANDS([depfiles],
1801 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1802 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1805 # Do all the work for Automake. -*- Autoconf -*-
1807 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
1809 # This file is free software; the Free Software Foundation
1810 # gives unlimited permission to copy and/or distribute it,
1811 # with or without modifications, as long as this notice is preserved.
1813 # This macro actually does too much. Some checks are only needed if
1814 # your package does certain things. But this isn't really a big deal.
1816 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
1817 m4_define([AC_PROG_CC],
1818 m4_defn([AC_PROG_CC])
1822 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1823 # AM_INIT_AUTOMAKE([OPTIONS])
1824 # -----------------------------------------------
1825 # The call with PACKAGE and VERSION arguments is the old style
1826 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1827 # and VERSION should now be passed to AC_INIT and removed from
1828 # the call to AM_INIT_AUTOMAKE.
1829 # We support both call styles for the transition. After
1830 # the next Automake release, Autoconf can make the AC_INIT
1831 # arguments mandatory, and then we can depend on a new Autoconf
1832 # release and drop the old call support.
1833 AC_DEFUN([AM_INIT_AUTOMAKE],
1834 [AC_PREREQ([2.65])dnl
1835 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1836 dnl the ones we care about.
1837 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1838 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1839 AC_REQUIRE([AC_PROG_INSTALL])dnl
1840 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1841 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1842 # is not polluted with repeated "-I."
1843 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1844 # test to see if srcdir already configured
1845 if test -f $srcdir/config.status; then
1846 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1850 # test whether we have cygpath
1851 if test -z "$CYGPATH_W"; then
1852 if (cygpath --version) >/dev/null 2>/dev/null; then
1853 CYGPATH_W='cygpath -w'
1858 AC_SUBST([CYGPATH_W])
1860 # Define the identity of the package.
1861 dnl Distinguish between old-style and new-style calls.
1863 [AC_DIAGNOSE([obsolete],
1864 [$0: two- and three-arguments forms are deprecated.])
1865 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1866 AC_SUBST([PACKAGE], [$1])dnl
1867 AC_SUBST([VERSION], [$2])],
1868 [_AM_SET_OPTIONS([$1])dnl
1869 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1871 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1873 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1874 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1875 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1877 _AM_IF_OPTION([no-define],,
1878 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1879 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1881 # Some tools Automake needs.
1882 AC_REQUIRE([AM_SANITY_CHECK])dnl
1883 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1884 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1885 AM_MISSING_PROG([AUTOCONF], [autoconf])
1886 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1887 AM_MISSING_PROG([AUTOHEADER], [autoheader])
1888 AM_MISSING_PROG([MAKEINFO], [makeinfo])
1889 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1890 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1891 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1892 # For better backward compatibility. To be removed once Automake 1.9.x
1893 # dies out for good. For more background, see:
1894 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1895 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1896 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1897 # We need awk for the "check" target (and possibly the TAP driver). The
1898 # system "awk" is bad on some platforms.
1899 AC_REQUIRE([AC_PROG_AWK])dnl
1900 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1901 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1902 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1903 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1904 [_AM_PROG_TAR([v7])])])
1905 _AM_IF_OPTION([no-dependencies],,
1906 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1907 [_AM_DEPENDENCIES([CC])],
1908 [m4_define([AC_PROG_CC],
1909 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1910 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1911 [_AM_DEPENDENCIES([CXX])],
1912 [m4_define([AC_PROG_CXX],
1913 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1914 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1915 [_AM_DEPENDENCIES([OBJC])],
1916 [m4_define([AC_PROG_OBJC],
1917 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1918 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1919 [_AM_DEPENDENCIES([OBJCXX])],
1920 [m4_define([AC_PROG_OBJCXX],
1921 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
1923 AC_REQUIRE([AM_SILENT_RULES])dnl
1924 dnl The testsuite driver may need to know about EXEEXT, so add the
1925 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
1926 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1927 AC_CONFIG_COMMANDS_PRE(dnl
1928 [m4_provide_if([_AM_COMPILER_EXEEXT],
1929 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1931 # POSIX will say in a future version that running "rm -f" with no argument
1932 # is OK; and we want to be able to make that assumption in our Makefile
1933 # recipes. So use an aggressive probe to check that the usage we want is
1934 # actually supported "in the wild" to an acceptable degree.
1935 # See automake bug#10828.
1936 # To make any issue more visible, cause the running configure to be aborted
1937 # by default if the 'rm' program in use doesn't match our expectations; the
1938 # user can still override this though.
1939 if rm -f && rm -fr && rm -rf; then : OK; else
1943 Your 'rm' program seems unable to run without file operands specified
1944 on the command line, even when the '-f' option is present. This is contrary
1945 to the behaviour of most rm programs out there, and not conforming with
1946 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1948 Please tell bug-automake@gnu.org about your system, including the value
1949 of your $PATH and any error possibly output before this message. This
1950 can help us improve future automake versions.
1953 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1954 echo 'Configuration will proceed anyway, since you have set the' >&2
1955 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1959 Aborting the configuration process, to ensure you take notice of the issue.
1961 You can download and install GNU coreutils to get an 'rm' implementation
1962 that behaves properly: <http://www.gnu.org/software/coreutils/>.
1964 If you want to complete the configuration process using your problematic
1965 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1966 to "yes", and re-run configure.
1969 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1972 dnl The trailing newline in this macro's definition is deliberate, for
1973 dnl backward compatibility and to allow trailing 'dnl'-style comments
1974 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
1977 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1978 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1979 dnl mangled by Autoconf and run in a shell conditional statement.
1980 m4_define([_AC_COMPILER_EXEEXT],
1981 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1983 # When config.status generates a header, we must update the stamp-h file.
1984 # This file resides in the same directory as the config header
1985 # that is generated. The stamp files are numbered to have different names.
1987 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1988 # loop where config.status creates the headers, so we can generate
1989 # our stamp files there.
1990 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1991 [# Compute $1's index in $config_headers.
1994 for _am_header in $config_headers :; do
1996 $_am_arg | $_am_arg:* )
1999 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
2002 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
2004 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
2006 # This file is free software; the Free Software Foundation
2007 # gives unlimited permission to copy and/or distribute it,
2008 # with or without modifications, as long as this notice is preserved.
2010 # AM_PROG_INSTALL_SH
2011 # ------------------
2012 # Define $install_sh.
2013 AC_DEFUN([AM_PROG_INSTALL_SH],
2014 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2015 if test x"${install_sh+set}" != xset; then
2018 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2020 install_sh="\${SHELL} $am_aux_dir/install-sh"
2023 AC_SUBST([install_sh])])
2025 # Copyright (C) 2003-2014 Free Software Foundation, Inc.
2027 # This file is free software; the Free Software Foundation
2028 # gives unlimited permission to copy and/or distribute it,
2029 # with or without modifications, as long as this notice is preserved.
2031 # Check whether the underlying file-system supports filenames
2032 # with a leading dot. For instance MS-DOS doesn't.
2033 AC_DEFUN([AM_SET_LEADING_DOT],
2034 [rm -rf .tst 2>/dev/null
2035 mkdir .tst 2>/dev/null
2036 if test -d .tst; then
2041 rmdir .tst 2>/dev/null
2042 AC_SUBST([am__leading_dot])])
2044 # Check to see how 'make' treats includes. -*- Autoconf -*-
2046 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
2048 # This file is free software; the Free Software Foundation
2049 # gives unlimited permission to copy and/or distribute it,
2050 # with or without modifications, as long as this notice is preserved.
2054 # Check to see how make treats includes.
2055 AC_DEFUN([AM_MAKE_INCLUDE],
2056 [am_make=${MAKE-make}
2057 cat > confinc << 'END'
2059 @echo this is the am__doit target
2062 # If we don't find an include directive, just comment out the code.
2063 AC_MSG_CHECKING([for style of include used by $am_make])
2067 # First try GNU make style include.
2068 echo "include confinc" > confmf
2069 # Ignore all kinds of additional output from 'make'.
2070 case `$am_make -s -f confmf 2> /dev/null` in #(
2071 *the\ am__doit\ target*)
2077 # Now try BSD make style include.
2078 if test "$am__include" = "#"; then
2079 echo '.include "confinc"' > confmf
2080 case `$am_make -s -f confmf 2> /dev/null` in #(
2081 *the\ am__doit\ target*)
2082 am__include=.include
2088 AC_SUBST([am__include])
2089 AC_SUBST([am__quote])
2090 AC_MSG_RESULT([$_am_result])
2091 rm -f confinc confmf
2094 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
2096 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
2098 # This file is free software; the Free Software Foundation
2099 # gives unlimited permission to copy and/or distribute it,
2100 # with or without modifications, as long as this notice is preserved.
2102 # AM_MISSING_PROG(NAME, PROGRAM)
2103 # ------------------------------
2104 AC_DEFUN([AM_MISSING_PROG],
2105 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2106 $1=${$1-"${am_missing_run}$2"}
2109 # AM_MISSING_HAS_RUN
2110 # ------------------
2111 # Define MISSING if not defined so far and test if it is modern enough.
2112 # If it is, set am_missing_run to use it, otherwise, to nothing.
2113 AC_DEFUN([AM_MISSING_HAS_RUN],
2114 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2115 AC_REQUIRE_AUX_FILE([missing])dnl
2116 if test x"${MISSING+set}" != xset; then
2119 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2121 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2124 # Use eval to expand $SHELL
2125 if eval "$MISSING --is-lightweight"; then
2126 am_missing_run="$MISSING "
2129 AC_MSG_WARN(['missing' script is too old or missing])
2133 # Helper functions for option handling. -*- Autoconf -*-
2135 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
2137 # This file is free software; the Free Software Foundation
2138 # gives unlimited permission to copy and/or distribute it,
2139 # with or without modifications, as long as this notice is preserved.
2141 # _AM_MANGLE_OPTION(NAME)
2142 # -----------------------
2143 AC_DEFUN([_AM_MANGLE_OPTION],
2144 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2146 # _AM_SET_OPTION(NAME)
2147 # --------------------
2148 # Set option NAME. Presently that only means defining a flag for this option.
2149 AC_DEFUN([_AM_SET_OPTION],
2150 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
2152 # _AM_SET_OPTIONS(OPTIONS)
2153 # ------------------------
2154 # OPTIONS is a space-separated list of Automake options.
2155 AC_DEFUN([_AM_SET_OPTIONS],
2156 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2158 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2159 # -------------------------------------------
2160 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2161 AC_DEFUN([_AM_IF_OPTION],
2162 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2164 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
2166 # This file is free software; the Free Software Foundation
2167 # gives unlimited permission to copy and/or distribute it,
2168 # with or without modifications, as long as this notice is preserved.
2172 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
2173 # to automatically call this.
2174 AC_DEFUN([_AM_PROG_CC_C_O],
2175 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2176 AC_REQUIRE_AUX_FILE([compile])dnl
2177 AC_LANG_PUSH([C])dnl
2179 [whether $CC understands -c and -o together],
2180 [am_cv_prog_cc_c_o],
2181 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
2182 # Make sure it works both with $CC and with simple cc.
2183 # Following AC_PROG_CC_C_O, we do the test twice because some
2184 # compilers refuse to overwrite an existing .o file with -o,
2185 # though they will create one.
2186 am_cv_prog_cc_c_o=yes
2188 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
2189 && test -f conftest2.$ac_objext; then
2192 am_cv_prog_cc_c_o=no
2196 rm -f core conftest*
2198 if test "$am_cv_prog_cc_c_o" != yes; then
2199 # Losing compiler, so override with the script.
2200 # FIXME: It is wrong to rewrite CC.
2201 # But if we don't then we get into trouble of one sort or another.
2202 # A longer-term fix would be to have automake use am__CC in this case,
2203 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2204 CC="$am_aux_dir/compile $CC"
2208 # For backward compatibility.
2209 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
2211 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
2213 # This file is free software; the Free Software Foundation
2214 # gives unlimited permission to copy and/or distribute it,
2215 # with or without modifications, as long as this notice is preserved.
2217 # AM_RUN_LOG(COMMAND)
2218 # -------------------
2219 # Run COMMAND, save the exit status in ac_status, and log it.
2220 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
2221 AC_DEFUN([AM_RUN_LOG],
2222 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
2223 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
2225 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2226 (exit $ac_status); }])
2228 # Check to make sure that the build environment is sane. -*- Autoconf -*-
2230 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
2232 # This file is free software; the Free Software Foundation
2233 # gives unlimited permission to copy and/or distribute it,
2234 # with or without modifications, as long as this notice is preserved.
2238 AC_DEFUN([AM_SANITY_CHECK],
2239 [AC_MSG_CHECKING([whether build environment is sane])
2240 # Reject unsafe characters in $srcdir or the absolute working directory
2241 # name. Accept space and tab only in the latter.
2245 *[[\\\"\#\$\&\'\`$am_lf]]*)
2246 AC_MSG_ERROR([unsafe absolute working directory name]);;
2249 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
2250 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
2253 # Do 'set' in a subshell so we don't clobber the current shell's
2254 # arguments. Must try -L first in case configure is actually a
2255 # symlink; some systems play weird games with the mod time of symlinks
2256 # (eg FreeBSD returns the mod time of the symlink's containing
2260 for am_try in 1 2; do
2261 echo "timestamp, slept: $am_has_slept" > conftest.file
2262 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2263 if test "$[*]" = "X"; then
2265 set X `ls -t "$srcdir/configure" conftest.file`
2267 if test "$[*]" != "X $srcdir/configure conftest.file" \
2268 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2270 # If neither matched, then we have a broken ls. This can happen
2271 # if, for instance, CONFIG_SHELL is bash and it inherits a
2272 # broken ls alias from the environment. This has actually
2273 # happened. Such a system could not be considered "sane".
2274 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2275 alias in your environment])
2277 if test "$[2]" = conftest.file || test $am_try -eq 2; then
2284 test "$[2]" = conftest.file
2290 AC_MSG_ERROR([newly created file is older than distributed files!
2291 Check your system clock])
2293 AC_MSG_RESULT([yes])
2294 # If we didn't sleep, we still need to ensure time stamps of config.status and
2295 # generated files are strictly newer.
2297 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2301 AC_CONFIG_COMMANDS_PRE(
2302 [AC_MSG_CHECKING([that generated files are newer than configure])
2303 if test -n "$am_sleep_pid"; then
2304 # Hide warnings about reused PIDs.
2305 wait $am_sleep_pid 2>/dev/null
2307 AC_MSG_RESULT([done])])
2311 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
2313 # This file is free software; the Free Software Foundation
2314 # gives unlimited permission to copy and/or distribute it,
2315 # with or without modifications, as long as this notice is preserved.
2317 # AM_SILENT_RULES([DEFAULT])
2318 # --------------------------
2319 # Enable less verbose build rules; with the default set to DEFAULT
2320 # ("yes" being less verbose, "no" or empty being verbose).
2321 AC_DEFUN([AM_SILENT_RULES],
2322 [AC_ARG_ENABLE([silent-rules], [dnl
2324 [--enable-silent-rules],
2325 [less verbose build output (undo: "make V=1")])
2327 [--disable-silent-rules],
2328 [verbose build output (undo: "make V=0")])dnl
2330 case $enable_silent_rules in @%:@ (((
2331 yes) AM_DEFAULT_VERBOSITY=0;;
2332 no) AM_DEFAULT_VERBOSITY=1;;
2333 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2336 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
2337 dnl do not support nested variable expansions.
2338 dnl See automake bug#9928 and bug#10237.
2339 am_make=${MAKE-make}
2340 AC_CACHE_CHECK([whether $am_make supports nested variables],
2341 [am_cv_make_support_nested_variables],
2342 [if AS_ECHO([['TRUE=$(BAR$(V))
2348 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
2349 am_cv_make_support_nested_variables=yes
2351 am_cv_make_support_nested_variables=no
2353 if test $am_cv_make_support_nested_variables = yes; then
2354 dnl Using '$V' instead of '$(V)' breaks IRIX make.
2356 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2358 AM_V=$AM_DEFAULT_VERBOSITY
2359 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2362 AM_SUBST_NOTMAKE([AM_V])dnl
2363 AC_SUBST([AM_DEFAULT_V])dnl
2364 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
2365 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2367 AC_SUBST([AM_BACKSLASH])dnl
2368 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2371 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
2373 # This file is free software; the Free Software Foundation
2374 # gives unlimited permission to copy and/or distribute it,
2375 # with or without modifications, as long as this notice is preserved.
2377 # AM_PROG_INSTALL_STRIP
2378 # ---------------------
2379 # One issue with vendor 'install' (even GNU) is that you can't
2380 # specify the program used to strip binaries. This is especially
2381 # annoying in cross-compiling environments, where the build's strip
2382 # is unlikely to handle the host's binaries.
2383 # Fortunately install-sh will honor a STRIPPROG variable, so we
2384 # always use install-sh in "make install-strip", and initialize
2385 # STRIPPROG with the value of the STRIP variable (set by the user).
2386 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2387 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2388 # Installed binaries are usually stripped using 'strip' when the user
2389 # run "make install-strip". However 'strip' might not be the right
2390 # tool to use in cross-compilation environments, therefore Automake
2391 # will honor the 'STRIP' environment variable to overrule this program.
2392 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
2393 if test "$cross_compiling" != no; then
2394 AC_CHECK_TOOL([STRIP], [strip], :)
2396 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2397 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2399 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
2401 # This file is free software; the Free Software Foundation
2402 # gives unlimited permission to copy and/or distribute it,
2403 # with or without modifications, as long as this notice is preserved.
2405 # _AM_SUBST_NOTMAKE(VARIABLE)
2406 # ---------------------------
2407 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2408 # This macro is traced by Automake.
2409 AC_DEFUN([_AM_SUBST_NOTMAKE])
2411 # AM_SUBST_NOTMAKE(VARIABLE)
2412 # --------------------------
2413 # Public sister of _AM_SUBST_NOTMAKE.
2414 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2416 # Check how to create a tarball. -*- Autoconf -*-
2418 # Copyright (C) 2004-2014 Free Software Foundation, Inc.
2420 # This file is free software; the Free Software Foundation
2421 # gives unlimited permission to copy and/or distribute it,
2422 # with or without modifications, as long as this notice is preserved.
2424 # _AM_PROG_TAR(FORMAT)
2425 # --------------------
2426 # Check how to create a tarball in format FORMAT.
2427 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
2429 # Substitute a variable $(am__tar) that is a command
2430 # writing to stdout a FORMAT-tarball containing the directory
2432 # tardir=directory && $(am__tar) > result.tar
2434 # Substitute a variable $(am__untar) that extract such
2435 # a tarball read from stdin.
2436 # $(am__untar) < result.tar
2438 AC_DEFUN([_AM_PROG_TAR],
2439 [# Always define AMTAR for backward compatibility. Yes, it's still used
2440 # in the wild :-( We should find a proper way to deprecate it ...
2441 AC_SUBST([AMTAR], ['$${TAR-tar}'])
2443 # We'll loop over all known methods to create a tar archive until one works.
2444 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2447 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2451 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
2452 # There is notably a 21 bits limit for the UID and the GID. In fact,
2453 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
2455 am_max_uid=2097151 # 2^21 - 1
2456 am_max_gid=$am_max_uid
2457 # The $UID and $GID variables are not portable, so we need to resort
2458 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
2459 # below are definitely unexpected, so allow the users to see them
2460 # (that is, avoid stderr redirection).
2461 am_uid=`id -u || echo unknown`
2462 am_gid=`id -g || echo unknown`
2463 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
2464 if test $am_uid -le $am_max_uid; then
2465 AC_MSG_RESULT([yes])
2470 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
2471 if test $am_gid -le $am_max_gid; then
2472 AC_MSG_RESULT([yes])
2481 [m4_fatal([Unknown tar format])])
2483 AC_MSG_CHECKING([how to create a $1 tar archive])
2485 # Go ahead even if we have the value already cached. We do so because we
2486 # need to set the values for the 'am__tar' and 'am__untar' variables.
2487 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2489 for _am_tool in $_am_tools; do
2492 for _am_tar in tar gnutar gtar; do
2493 AM_RUN_LOG([$_am_tar --version]) && break
2495 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2496 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2497 am__untar="$_am_tar -xf -"
2500 # Must skip GNU tar: if it does not support --format= it doesn't create
2501 # ustar tarball either.
2502 (tar --version) >/dev/null 2>&1 && continue
2503 am__tar='tar chf - "$$tardir"'
2504 am__tar_='tar chf - "$tardir"'
2505 am__untar='tar xf -'
2508 am__tar='pax -L -x $1 -w "$$tardir"'
2509 am__tar_='pax -L -x $1 -w "$tardir"'
2513 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2514 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2515 am__untar='cpio -i -H $1 -d'
2524 # If the value was cached, stop now. We just wanted to have am__tar
2525 # and am__untar set.
2526 test -n "${am_cv_prog_tar_$1}" && break
2528 # tar/untar a dummy directory, and stop if the command works.
2531 echo GrepMe > conftest.dir/file
2532 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2534 if test -s conftest.tar; then
2535 AM_RUN_LOG([$am__untar <conftest.tar])
2536 AM_RUN_LOG([cat conftest.dir/file])
2537 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2542 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2543 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2546 AC_SUBST([am__untar])
2549 m4_include([m4/libtool.m4])
2550 m4_include([m4/ltoptions.m4])
2551 m4_include([m4/ltsugar.m4])
2552 m4_include([m4/ltversion.m4])
2553 m4_include([m4/lt~obsolete.m4])