1# generated automatically by aclocal 1.16.1 -*- Autoconf -*- 2 3# Copyright (C) 1996-2018 Free Software Foundation, Inc. 4 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. 8 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 12# PARTICULAR PURPOSE. 13 14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15m4_ifndef([AC_AUTOCONF_VERSION], 16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18[m4_warning([this file was generated for autoconf 2.69. 19You have another version of autoconf. It may work, but is not guaranteed to. 20If you have problems, you may need to regenerate the build system entirely. 21To do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22 23# lib-ld.m4 serial 6 24dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc. 25dnl This file is free software; the Free Software Foundation 26dnl gives unlimited permission to copy and/or distribute it, 27dnl with or without modifications, as long as this notice is preserved. 28 29dnl Subroutines of libtool.m4, 30dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid 31dnl collision with libtool.m4. 32 33dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. 34AC_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. 37case `$LD -v 2>&1 </dev/null` in 38*GNU* | *'with BFD'*) 39 acl_cv_prog_gnu_ld=yes 40 ;; 41*) 42 acl_cv_prog_gnu_ld=no 43 ;; 44esac]) 45with_gnu_ld=$acl_cv_prog_gnu_ld 46]) 47 48dnl From libtool-2.4. Sets the variable LD. 49AC_DEFUN([AC_LIB_PROG_LD], 50[AC_REQUIRE([AC_PROG_CC])dnl 51AC_REQUIRE([AC_CANONICAL_HOST])dnl 52 53AC_ARG_WITH([gnu-ld], 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], 57 [with_gnu_ld=no])dnl 58 59# Prepare PATH_SEPARATOR. 60# The user is always right. 61if 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. 65 PATH_SEPARATOR=: 66 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ 67 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ 68 || PATH_SEPARATOR=';' 69 } 70fi 71 72ac_prog=ld 73if test "$GCC" = yes; then 74 # Check if gcc -print-prog-name=ld gives a path. 75 AC_MSG_CHECKING([for ld used by $CC]) 76 case $host in 77 *-*-mingw*) 78 # gcc leaves a trailing carriage return which upsets mingw 79 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 80 *) 81 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 82 esac 83 case $ac_prog in 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%/%"` 91 done 92 test -z "$LD" && LD="$ac_prog" 93 ;; 94 "") 95 # If it fails, then pretend we aren't using GCC. 96 ac_prog=ld 97 ;; 98 *) 99 # If it is relative, then search for the first ld in PATH. 100 with_gnu_ld=unknown 101 ;; 102 esac 103elif test "$with_gnu_ld" = yes; then 104 AC_MSG_CHECKING([for GNU ld]) 105else 106 AC_MSG_CHECKING([for non-GNU ld]) 107fi 108AC_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 112 IFS="$acl_save_ifs" 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 122 ;; 123 *) 124 test "$with_gnu_ld" != yes && break 125 ;; 126 esac 127 fi 128 done 129 IFS="$acl_save_ifs" 130else 131 acl_cv_path_LD="$LD" # Let the user override the test with a path. 132fi]) 133LD="$acl_cv_path_LD" 134if test -n "$LD"; then 135 AC_MSG_RESULT([$LD]) 136else 137 AC_MSG_RESULT([no]) 138fi 139test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 140AC_LIB_PROG_LD_GNU 141]) 142 143# lib-link.m4 serial 26 (gettext-0.18.2) 144dnl Copyright (C) 2001-2016 Free Software Foundation, Inc. 145dnl This file is free software; the Free Software Foundation 146dnl gives unlimited permission to copy and/or distribute it, 147dnl with or without modifications, as long as this notice is preserved. 148 149dnl From Bruno Haible. 150 151AC_PREREQ([2.54]) 152 153dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and 154dnl the libraries corresponding to explicit and implicit dependencies. 155dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and 156dnl augments the CPPFLAGS variable. 157dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname 158dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 159AC_DEFUN([AC_LIB_LINKFLAGS], 160[ 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" 172 ]) 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) 178 AC_SUBST([LIB]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. 183 HAVE_LIB[]NAME=yes 184 popdef([NAME]) 185 popdef([Name]) 186]) 187 188dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) 189dnl searches for libname and the libraries corresponding to explicit and 190dnl implicit dependencies, together with the specified include files and 191dnl the ability to compile and link the specified testcode. The missing-message 192dnl defaults to 'no' and may contain additional hints for the user. 193dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} 194dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and 195dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs 196dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. 197dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname 198dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 199AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], 200[ 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____])]) 206 207 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME 208 dnl accordingly. 209 AC_LIB_LINKFLAGS_BODY([$1], [$2]) 210 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) 216 217 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ 218 ac_save_LIBS="$LIBS" 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 225 dnl it. 226 case " $LIB[]NAME" in 227 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; 228 *) LIBS="$LIB[]NAME $LIBS" ;; 229 esac 230 AC_LINK_IFELSE( 231 [AC_LANG_PROGRAM([[$3]], [[$4]])], 232 [ac_cv_lib[]Name=yes], 233 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) 234 LIBS="$ac_save_LIBS" 235 ]) 236 if test "$ac_cv_lib[]Name" = yes; then 237 HAVE_LIB[]NAME=yes 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]) 241 else 242 HAVE_LIB[]NAME=no 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" 246 LIB[]NAME= 247 LTLIB[]NAME= 248 LIB[]NAME[]_PREFIX= 249 fi 250 AC_SUBST([HAVE_LIB]NAME) 251 AC_SUBST([LIB]NAME) 252 AC_SUBST([LTLIB]NAME) 253 AC_SUBST([LIB]NAME[_PREFIX]) 254 popdef([NAME]) 255 popdef([Name]) 256]) 257 258dnl Determine the platform dependent parameters needed to use rpath: 259dnl acl_libext, 260dnl acl_shlibext, 261dnl acl_libname_spec, 262dnl acl_library_names_spec, 263dnl acl_hardcode_libdir_flag_spec, 264dnl acl_hardcode_libdir_separator, 265dnl acl_hardcode_direct, 266dnl acl_hardcode_minus_L. 267AC_DEFUN([AC_LIB_RPATH], 268[ 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 278 . ./conftest.sh 279 rm -f ./conftest.sh 280 acl_cv_rpath=done 281 ]) 282 wl="$acl_cv_wl" 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], 294 :, enable_rpath=yes) 295]) 296 297dnl AC_LIB_FROMPACKAGE(name, package) 298dnl declares that libname comes from the given package. The configure file 299dnl will then not have a --with-libname-prefix option but a 300dnl --with-package-prefix option. Several libraries can come from the same 301dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar 302dnl macro call that searches for libname. 303AC_DEFUN([AC_LIB_FROMPACKAGE], 304[ 305 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], 306 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) 307 define([acl_frompackage_]NAME, [$2]) 308 popdef([NAME]) 309 pushdef([PACK],[$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]) 314 popdef([PACKUP]) 315 popdef([PACK]) 316]) 317 318dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and 319dnl the libraries corresponding to explicit and implicit dependencies. 320dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. 321dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found 322dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 323AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 324[ 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. 335 use_additional=yes 336 AC_LIB_WITH_FINAL_PREFIX([ 337 eval additional_includedir=\"$includedir\" 338 eval additional_libdir=\"$libdir\" 339 ]) 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]], 343[ 344 if test "X$withval" = "Xno"; then 345 use_additional=no 346 else 347 if test "X$withval" = "X"; then 348 AC_LIB_WITH_FINAL_PREFIX([ 349 eval additional_includedir=\"$includedir\" 350 eval additional_libdir=\"$libdir\" 351 ]) 352 else 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" 358 fi 359 fi 360 fi 361]) 362 dnl Search the library and its dependencies in $additional_libdir and 363 dnl $LDFLAGS. Using breadth-first-seach. 364 LIB[]NAME= 365 LTLIB[]NAME= 366 INC[]NAME= 367 LIB[]NAME[]_PREFIX= 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. 370 HAVE_LIB[]NAME= 371 rpathdirs= 372 ltrpathdirs= 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" 377 names_next_round= 378 for name in $names_this_round; do 379 already_handled= 380 for n in $names_already_handled; do 381 if test "$n" = "$name"; then 382 already_handled=yes 383 break 384 fi 385 done 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" 398 else 399 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined 400 dnl that this library doesn't exist. So just drop it. 401 : 402 fi 403 else 404 dnl Search the library lib$name in $additional_libdir and $LDFLAGS 405 dnl and the already constructed $LIBNAME/$LTLIBNAME. 406 found_dir= 407 found_la= 408 found_so= 409 found_a= 410 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name 411 if test -n "$acl_shlibext"; then 412 shrext=".$acl_shlibext" # typically: shrext=.so 413 else 414 shrext= 415 fi 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 422 found_dir="$dir" 423 found_so="$dir/$libname$shrext" 424 else 425 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 426 ver=`(cd "$dir" && \ 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 432 found_dir="$dir" 433 found_so="$dir/$libname$shrext.$ver" 434 fi 435 else 436 eval library_names=\"$acl_library_names_spec\" 437 for f in $library_names; do 438 if test -f "$dir/$f"; then 439 found_dir="$dir" 440 found_so="$dir/$f" 441 break 442 fi 443 done 444 fi 445 fi 446 fi 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 450 found_dir="$dir" 451 found_a="$dir/$libname.$acl_libext" 452 fi 453 fi 454 if test "X$found_dir" != "X"; then 455 if test -f "$dir/$libname.la"; then 456 found_la="$dir/$libname.la" 457 fi 458 fi 459 fi 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\"]) 463 case "$x" in 464 -L*) 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 469 found_dir="$dir" 470 found_so="$dir/$libname$shrext" 471 else 472 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 473 ver=`(cd "$dir" && \ 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 479 found_dir="$dir" 480 found_so="$dir/$libname$shrext.$ver" 481 fi 482 else 483 eval library_names=\"$acl_library_names_spec\" 484 for f in $library_names; do 485 if test -f "$dir/$f"; then 486 found_dir="$dir" 487 found_so="$dir/$f" 488 break 489 fi 490 done 491 fi 492 fi 493 fi 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 497 found_dir="$dir" 498 found_a="$dir/$libname.$acl_libext" 499 fi 500 fi 501 if test "X$found_dir" != "X"; then 502 if test -f "$dir/$libname.la"; then 503 found_la="$dir/$libname.la" 504 fi 505 fi 506 ;; 507 esac 508 if test "X$found_dir" != "X"; then 509 break 510 fi 511 done 512 fi 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" 525 else 526 dnl Use an explicit option to hardcode DIR into the resulting 527 dnl binary. 528 dnl Potentially add DIR to ltrpathdirs. 529 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 530 haveit= 531 for x in $ltrpathdirs; do 532 if test "X$x" = "X$found_dir"; then 533 haveit=yes 534 break 535 fi 536 done 537 if test -z "$haveit"; then 538 ltrpathdirs="$ltrpathdirs $found_dir" 539 fi 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" 545 else 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 548 dnl binary. 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. 552 haveit= 553 for x in $rpathdirs; do 554 if test "X$x" = "X$found_dir"; then 555 haveit=yes 556 break 557 fi 558 done 559 if test -z "$haveit"; then 560 rpathdirs="$rpathdirs $found_dir" 561 fi 562 else 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 566 haveit= 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 570 haveit=yes 571 break 572 fi 573 done 574 if test -z "$haveit"; then 575 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" 576 fi 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" 580 dnl here. 581 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 582 else 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" 589 dnl here. 590 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 591 fi 592 fi 593 fi 594 fi 595 else 596 if test "X$found_a" != "X"; then 597 dnl Linking with a static library. 598 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" 599 else 600 dnl We shouldn't come here, but anyway it's good to have a 601 dnl fallback. 602 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" 603 fi 604 fi 605 dnl Assume the include files are nearby. 606 additional_includedir= 607 case "$found_dir" in 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" 612 fi 613 additional_includedir="$basedir/include" 614 ;; 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" 619 fi 620 additional_includedir="$basedir/include" 621 ;; 622 esac 623 if test "X$additional_includedir" != "X"; then 624 dnl Potentially add $additional_includedir to $INCNAME. 625 dnl But don't add it 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 632 haveit= 633 if test "X$additional_includedir" = "X/usr/local/include"; then 634 if test -n "$GCC"; then 635 case $host_os in 636 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 637 esac 638 fi 639 fi 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 644 haveit=yes 645 break 646 fi 647 done 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" 652 fi 653 fi 654 fi 655 fi 656 fi 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" 663 case "$found_la" in 664 */* | *\\*) . "$found_la" ;; 665 *) . "./$found_la" ;; 666 esac 667 libdir="$save_libdir" 668 dnl We use only dependency_libs. 669 for dep in $dependency_libs; do 670 case "$dep" in 671 -L*) 672 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` 673 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. 674 dnl But don't add it 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 682 haveit= 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 686 case $host_os in 687 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 688 esac 689 fi 690 fi 691 if test -z "$haveit"; then 692 haveit= 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 696 haveit=yes 697 break 698 fi 699 done 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" 704 fi 705 fi 706 haveit= 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 710 haveit=yes 711 break 712 fi 713 done 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" 718 fi 719 fi 720 fi 721 fi 722 ;; 723 -R*) 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. 728 haveit= 729 for x in $rpathdirs; do 730 if test "X$x" = "X$dir"; then 731 haveit=yes 732 break 733 fi 734 done 735 if test -z "$haveit"; then 736 rpathdirs="$rpathdirs $dir" 737 fi 738 dnl Potentially add DIR to ltrpathdirs. 739 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 740 haveit= 741 for x in $ltrpathdirs; do 742 if test "X$x" = "X$dir"; then 743 haveit=yes 744 break 745 fi 746 done 747 if test -z "$haveit"; then 748 ltrpathdirs="$ltrpathdirs $dir" 749 fi 750 fi 751 ;; 752 -l*) 753 dnl Handle this in the next round. 754 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` 755 ;; 756 *.la) 757 dnl Handle this in the next round. Throw away the .la's 758 dnl directory; it is already contained in a preceding -L 759 dnl option. 760 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` 761 ;; 762 *) 763 dnl Most likely an immediate library name. 764 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" 765 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" 766 ;; 767 esac 768 done 769 fi 770 else 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" 777 fi 778 fi 779 fi 780 done 781 done 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. 787 alldirs= 788 for found_dir in $rpathdirs; do 789 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" 790 done 791 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. 792 acl_save_libdir="$libdir" 793 libdir="$alldirs" 794 eval flag=\"$acl_hardcode_libdir_flag_spec\" 795 libdir="$acl_save_libdir" 796 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 797 else 798 dnl The -rpath options are cumulative. 799 for found_dir in $rpathdirs; do 800 acl_save_libdir="$libdir" 801 libdir="$found_dir" 802 eval flag=\"$acl_hardcode_libdir_flag_spec\" 803 libdir="$acl_save_libdir" 804 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 805 done 806 fi 807 fi 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" 813 done 814 fi 815 popdef([P_A_C_K]) 816 popdef([PACKLIBS]) 817 popdef([PACKUP]) 818 popdef([PACK]) 819 popdef([NAME]) 820]) 821 822dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, 823dnl unless already present in VAR. 824dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes 825dnl contains two or three consecutive elements that belong together. 826AC_DEFUN([AC_LIB_APPENDTOVAR], 827[ 828 for element in [$2]; do 829 haveit= 830 for x in $[$1]; do 831 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 832 if test "X$x" = "X$element"; then 833 haveit=yes 834 break 835 fi 836 done 837 if test -z "$haveit"; then 838 [$1]="${[$1]}${[$1]:+ }$element" 839 fi 840 done 841]) 842 843dnl For those cases where a variable contains several -L and -l options 844dnl referring to unknown libraries and directories, this macro determines the 845dnl necessary additional linker options for the runtime path. 846dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) 847dnl sets LDADDVAR to linker options needed together with LIBSVALUE. 848dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, 849dnl otherwise linking without libtool is assumed. 850AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], 851[ 852 AC_REQUIRE([AC_LIB_RPATH]) 853 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 854 $1= 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 858 dnl binary. 859 rpathdirs= 860 next= 861 for opt in $2; do 862 if test -n "$next"; then 863 dir="$next" 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" 868 fi 869 next= 870 else 871 case $opt in 872 -L) next=yes ;; 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" 878 fi 879 next= ;; 880 *) next= ;; 881 esac 882 fi 883 done 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" 889 done 890 else 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. 895 alldirs= 896 for dir in $rpathdirs; do 897 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" 898 done 899 acl_save_libdir="$libdir" 900 libdir="$alldirs" 901 eval flag=\"$acl_hardcode_libdir_flag_spec\" 902 libdir="$acl_save_libdir" 903 $1="$flag" 904 else 905 dnl The -rpath options are cumulative. 906 for dir in $rpathdirs; do 907 acl_save_libdir="$libdir" 908 libdir="$dir" 909 eval flag=\"$acl_hardcode_libdir_flag_spec\" 910 libdir="$acl_save_libdir" 911 $1="${$1}${$1:+ }$flag" 912 done 913 fi 914 fi 915 fi 916 fi 917 fi 918 AC_SUBST([$1]) 919]) 920 921# lib-prefix.m4 serial 7 (gettext-0.18) 922dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc. 923dnl This file is free software; the Free Software Foundation 924dnl gives unlimited permission to copy and/or distribute it, 925dnl with or without modifications, as long as this notice is preserved. 926 927dnl From Bruno Haible. 928 929dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and 930dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't 931dnl require excessive bracketing. 932ifdef([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])])]) 935 936dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed 937dnl to access previously installed libraries. The basic assumption is that 938dnl a user will want packages to use other packages he previously installed 939dnl with the same --prefix option. 940dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate 941dnl libraries, but is otherwise very convenient. 942AC_DEFUN([AC_LIB_PREFIX], 943[ 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. 950 use_additional=yes 951 AC_LIB_WITH_FINAL_PREFIX([ 952 eval additional_includedir=\"$includedir\" 953 eval additional_libdir=\"$libdir\" 954 ]) 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], 958[ 959 if test "X$withval" = "Xno"; then 960 use_additional=no 961 else 962 if test "X$withval" = "X"; then 963 AC_LIB_WITH_FINAL_PREFIX([ 964 eval additional_includedir=\"$includedir\" 965 eval additional_libdir=\"$libdir\" 966 ]) 967 else 968 additional_includedir="$withval/include" 969 additional_libdir="$withval/$acl_libdirstem" 970 fi 971 fi 972]) 973 if test $use_additional = yes; then 974 dnl Potentially add $additional_includedir to $CPPFLAGS. 975 dnl But don't add it 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 981 haveit= 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 985 haveit=yes 986 break 987 fi 988 done 989 if test -z "$haveit"; then 990 if test "X$additional_includedir" = "X/usr/local/include"; then 991 if test -n "$GCC"; then 992 case $host_os in 993 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 994 esac 995 fi 996 fi 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" 1001 fi 1002 fi 1003 fi 1004 fi 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 1012 haveit= 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 1016 haveit=yes 1017 break 1018 fi 1019 done 1020 if test -z "$haveit"; then 1021 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then 1022 if test -n "$GCC"; then 1023 case $host_os in 1024 linux*) haveit=yes;; 1025 esac 1026 fi 1027 fi 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" 1032 fi 1033 fi 1034 fi 1035 fi 1036 fi 1037]) 1038 1039dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, 1040dnl acl_final_exec_prefix, containing the values to which $prefix and 1041dnl $exec_prefix will expand at the end of the configure script. 1042AC_DEFUN([AC_LIB_PREPARE_PREFIX], 1043[ 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" 1048 else 1049 acl_final_prefix="$prefix" 1050 fi 1051 if test "X$exec_prefix" = "XNONE"; then 1052 acl_final_exec_prefix='${prefix}' 1053 else 1054 acl_final_exec_prefix="$exec_prefix" 1055 fi 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" 1060]) 1061 1062dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the 1063dnl variables prefix and exec_prefix bound to the values they will have 1064dnl at the end of the configure script. 1065AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], 1066[ 1067 acl_save_prefix="$prefix" 1068 prefix="$acl_final_prefix" 1069 acl_save_exec_prefix="$exec_prefix" 1070 exec_prefix="$acl_final_exec_prefix" 1071 $1 1072 exec_prefix="$acl_save_exec_prefix" 1073 prefix="$acl_save_prefix" 1074]) 1075 1076dnl AC_LIB_PREPARE_MULTILIB creates 1077dnl - a variable acl_libdirstem, containing the basename of the libdir, either 1078dnl "lib" or "lib64" or "lib/64", 1079dnl - a variable acl_libdirstem2, as a secondary possible value for 1080dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or 1081dnl "lib/amd64". 1082AC_DEFUN([AC_LIB_PREPARE_MULTILIB], 1083[ 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]) 1097 acl_libdirstem=lib 1098 acl_libdirstem2= 1099 case "$host_os" in 1100 solaris*) 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], [ 1108#ifdef _LP64 1109sixtyfour bits 1110#endif 1111 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) 1112 ]) 1113 if test $gl_cv_solaris_64bit = yes; then 1114 acl_libdirstem=lib/64 1115 case "$host_cpu" in 1116 sparc*) acl_libdirstem2=lib/sparcv9 ;; 1117 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; 1118 esac 1119 fi 1120 ;; 1121 *) 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 ;; 1129 */../ | */.. ) 1130 # Better ignore directories of this form. They are misleading. 1131 ;; 1132 *) searchdir=`cd "$searchdir" && pwd` 1133 case "$searchdir" in 1134 */lib64 ) acl_libdirstem=lib64 ;; 1135 esac ;; 1136 esac 1137 fi 1138 done 1139 IFS="$acl_save_IFS" 1140 fi 1141 ;; 1142 esac 1143 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" 1144]) 1145 1146dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1147dnl serial 11 (pkg-config-0.29) 1148dnl 1149dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1150dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 1151dnl 1152dnl This program is free software; you can redistribute it and/or modify 1153dnl it under the terms of the GNU General Public License as published by 1154dnl the Free Software Foundation; either version 2 of the License, or 1155dnl (at your option) any later version. 1156dnl 1157dnl This program is distributed in the hope that it will be useful, but 1158dnl WITHOUT ANY WARRANTY; without even the implied warranty of 1159dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1160dnl General Public License for more details. 1161dnl 1162dnl You should have received a copy of the GNU General Public License 1163dnl along with this program; if not, write to the Free Software 1164dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1165dnl 02111-1307, USA. 1166dnl 1167dnl As a special exception to the GNU General Public License, if you 1168dnl distribute this file as part of a program that contains a 1169dnl configuration script generated by Autoconf, you may include it under 1170dnl the same distribution terms that you use for the rest of that 1171dnl program. 1172 1173dnl PKG_PREREQ(MIN-VERSION) 1174dnl ----------------------- 1175dnl Since: 0.29 1176dnl 1177dnl Verify that the version of the pkg-config macros are at least 1178dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 1179dnl installed version of pkg-config, this checks the developer's version 1180dnl of pkg.m4 when generating configure. 1181dnl 1182dnl To ensure that this macro is defined, also add: 1183dnl m4_ifndef([PKG_PREREQ], 1184dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 1185dnl 1186dnl See the "Since" comment for each macro you use to see what version 1187dnl of the macros you require. 1188m4_defun([PKG_PREREQ], 1189[m4_define([PKG_MACROS_VERSION], [0.29]) 1190m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 1191 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 1192])dnl PKG_PREREQ 1193 1194dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1195dnl ---------------------------------- 1196dnl Since: 0.16 1197dnl 1198dnl Search for the pkg-config tool and set the PKG_CONFIG variable to 1199dnl first found in the path. Checks that the version of pkg-config found 1200dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 1201dnl used since that's the first version where most current features of 1202dnl pkg-config existed. 1203AC_DEFUN([PKG_PROG_PKG_CONFIG], 1204[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1205m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 1206m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 1207AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1208AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1209AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 1210 1211if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1212 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1213fi 1214if test -n "$PKG_CONFIG"; then 1215 _pkg_min_version=m4_default([$1], [0.9.0]) 1216 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1217 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1218 AC_MSG_RESULT([yes]) 1219 else 1220 AC_MSG_RESULT([no]) 1221 PKG_CONFIG="" 1222 fi 1223fi[]dnl 1224])dnl PKG_PROG_PKG_CONFIG 1225 1226dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1227dnl ------------------------------------------------------------------- 1228dnl Since: 0.18 1229dnl 1230dnl Check to see whether a particular set of modules exists. Similar to 1231dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 1232dnl 1233dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1234dnl only at the first occurence in configure.ac, so if the first place 1235dnl it's called might be skipped (such as if it is within an "if", you 1236dnl have to call PKG_CHECK_EXISTS manually 1237AC_DEFUN([PKG_CHECK_EXISTS], 1238[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1239if test -n "$PKG_CONFIG" && \ 1240 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1241 m4_default([$2], [:]) 1242m4_ifvaln([$3], [else 1243 $3])dnl 1244fi]) 1245 1246dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1247dnl --------------------------------------------- 1248dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 1249dnl pkg_failed based on the result. 1250m4_define([_PKG_CONFIG], 1251[if test -n "$$1"; then 1252 pkg_cv_[]$1="$$1" 1253 elif test -n "$PKG_CONFIG"; then 1254 PKG_CHECK_EXISTS([$3], 1255 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 1256 test "x$?" != "x0" && pkg_failed=yes ], 1257 [pkg_failed=yes]) 1258 else 1259 pkg_failed=untried 1260fi[]dnl 1261])dnl _PKG_CONFIG 1262 1263dnl _PKG_SHORT_ERRORS_SUPPORTED 1264dnl --------------------------- 1265dnl Internal check to see if pkg-config supports short errors. 1266AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1267[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1268if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1269 _pkg_short_errors_supported=yes 1270else 1271 _pkg_short_errors_supported=no 1272fi[]dnl 1273])dnl _PKG_SHORT_ERRORS_SUPPORTED 1274 1275 1276dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1277dnl [ACTION-IF-NOT-FOUND]) 1278dnl -------------------------------------------------------------- 1279dnl Since: 0.4.0 1280dnl 1281dnl Note that if there is a possibility the first call to 1282dnl PKG_CHECK_MODULES might not happen, you should be sure to include an 1283dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1284AC_DEFUN([PKG_CHECK_MODULES], 1285[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1286AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1287AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1288 1289pkg_failed=no 1290AC_MSG_CHECKING([for $1]) 1291 1292_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1293_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1294 1295m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1296and $1[]_LIBS to avoid the need to call pkg-config. 1297See the pkg-config man page for more details.]) 1298 1299if test $pkg_failed = yes; then 1300 AC_MSG_RESULT([no]) 1301 _PKG_SHORT_ERRORS_SUPPORTED 1302 if test $_pkg_short_errors_supported = yes; then 1303 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1304 else 1305 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1306 fi 1307 # Put the nasty error message in config.log where it belongs 1308 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1309 1310 m4_default([$4], [AC_MSG_ERROR( 1311[Package requirements ($2) were not met: 1312 1313$$1_PKG_ERRORS 1314 1315Consider adjusting the PKG_CONFIG_PATH environment variable if you 1316installed software in a non-standard prefix. 1317 1318_PKG_TEXT])[]dnl 1319 ]) 1320elif test $pkg_failed = untried; then 1321 AC_MSG_RESULT([no]) 1322 m4_default([$4], [AC_MSG_FAILURE( 1323[The pkg-config script could not be found or is too old. Make sure it 1324is in your PATH or set the PKG_CONFIG environment variable to the full 1325path to pkg-config. 1326 1327_PKG_TEXT 1328 1329To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 1330 ]) 1331else 1332 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1333 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1334 AC_MSG_RESULT([yes]) 1335 $3 1336fi[]dnl 1337])dnl PKG_CHECK_MODULES 1338 1339 1340dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1341dnl [ACTION-IF-NOT-FOUND]) 1342dnl --------------------------------------------------------------------- 1343dnl Since: 0.29 1344dnl 1345dnl Checks for existence of MODULES and gathers its build flags with 1346dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 1347dnl and VARIABLE-PREFIX_LIBS from --libs. 1348dnl 1349dnl Note that if there is a possibility the first call to 1350dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 1351dnl include an explicit call to PKG_PROG_PKG_CONFIG in your 1352dnl configure.ac. 1353AC_DEFUN([PKG_CHECK_MODULES_STATIC], 1354[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1355_save_PKG_CONFIG=$PKG_CONFIG 1356PKG_CONFIG="$PKG_CONFIG --static" 1357PKG_CHECK_MODULES($@) 1358PKG_CONFIG=$_save_PKG_CONFIG[]dnl 1359])dnl PKG_CHECK_MODULES_STATIC 1360 1361 1362dnl PKG_INSTALLDIR([DIRECTORY]) 1363dnl ------------------------- 1364dnl Since: 0.27 1365dnl 1366dnl Substitutes the variable pkgconfigdir as the location where a module 1367dnl should install pkg-config .pc files. By default the directory is 1368dnl $libdir/pkgconfig, but the default can be changed by passing 1369dnl DIRECTORY. The user can override through the --with-pkgconfigdir 1370dnl parameter. 1371AC_DEFUN([PKG_INSTALLDIR], 1372[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 1373m4_pushdef([pkg_description], 1374 [pkg-config installation directory @<:@]pkg_default[@:>@]) 1375AC_ARG_WITH([pkgconfigdir], 1376 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 1377 [with_pkgconfigdir=]pkg_default) 1378AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 1379m4_popdef([pkg_default]) 1380m4_popdef([pkg_description]) 1381])dnl PKG_INSTALLDIR 1382 1383 1384dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 1385dnl -------------------------------- 1386dnl Since: 0.27 1387dnl 1388dnl Substitutes the variable noarch_pkgconfigdir as the location where a 1389dnl module should install arch-independent pkg-config .pc files. By 1390dnl default the directory is $datadir/pkgconfig, but the default can be 1391dnl changed by passing DIRECTORY. The user can override through the 1392dnl --with-noarch-pkgconfigdir parameter. 1393AC_DEFUN([PKG_NOARCH_INSTALLDIR], 1394[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 1395m4_pushdef([pkg_description], 1396 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 1397AC_ARG_WITH([noarch-pkgconfigdir], 1398 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 1399 [with_noarch_pkgconfigdir=]pkg_default) 1400AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 1401m4_popdef([pkg_default]) 1402m4_popdef([pkg_description]) 1403])dnl PKG_NOARCH_INSTALLDIR 1404 1405 1406dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 1407dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1408dnl ------------------------------------------- 1409dnl Since: 0.28 1410dnl 1411dnl Retrieves the value of the pkg-config variable for the given module. 1412AC_DEFUN([PKG_CHECK_VAR], 1413[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1414AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 1415 1416_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 1417AS_VAR_COPY([$1], [pkg_cv_][$1]) 1418 1419AS_VAR_IF([$1], [""], [$5], [$4])dnl 1420])dnl PKG_CHECK_VAR 1421 1422# Copyright (C) 2002-2018 Free Software Foundation, Inc. 1423# 1424# This file is free software; the Free Software Foundation 1425# gives unlimited permission to copy and/or distribute it, 1426# with or without modifications, as long as this notice is preserved. 1427 1428# AM_AUTOMAKE_VERSION(VERSION) 1429# ---------------------------- 1430# Automake X.Y traces this macro to ensure aclocal.m4 has been 1431# generated from the m4 files accompanying Automake X.Y. 1432# (This private macro should not be called outside this file.) 1433AC_DEFUN([AM_AUTOMAKE_VERSION], 1434[am__api_version='1.16' 1435dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 1436dnl require some minimum version. Point them to the right macro. 1437m4_if([$1], [1.16.1], [], 1438 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 1439]) 1440 1441# _AM_AUTOCONF_VERSION(VERSION) 1442# ----------------------------- 1443# aclocal traces this macro to find the Autoconf version. 1444# This is a private macro too. Using m4_define simplifies 1445# the logic in aclocal, which can simply ignore this definition. 1446m4_define([_AM_AUTOCONF_VERSION], []) 1447 1448# AM_SET_CURRENT_AUTOMAKE_VERSION 1449# ------------------------------- 1450# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 1451# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 1452AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1453[AM_AUTOMAKE_VERSION([1.16.1])dnl 1454m4_ifndef([AC_AUTOCONF_VERSION], 1455 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1456_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 1457 1458# Copyright (C) 2011-2018 Free Software Foundation, Inc. 1459# 1460# This file is free software; the Free Software Foundation 1461# gives unlimited permission to copy and/or distribute it, 1462# with or without modifications, as long as this notice is preserved. 1463 1464# AM_PROG_AR([ACT-IF-FAIL]) 1465# ------------------------- 1466# Try to determine the archiver interface, and trigger the ar-lib wrapper 1467# if it is needed. If the detection of archiver interface fails, run 1468# ACT-IF-FAIL (default is to abort configure with a proper error message). 1469AC_DEFUN([AM_PROG_AR], 1470[AC_BEFORE([$0], [LT_INIT])dnl 1471AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl 1472AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1473AC_REQUIRE_AUX_FILE([ar-lib])dnl 1474AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) 1475: ${AR=ar} 1476 1477AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], 1478 [AC_LANG_PUSH([C]) 1479 am_cv_ar_interface=ar 1480 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], 1481 [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' 1482 AC_TRY_EVAL([am_ar_try]) 1483 if test "$ac_status" -eq 0; then 1484 am_cv_ar_interface=ar 1485 else 1486 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' 1487 AC_TRY_EVAL([am_ar_try]) 1488 if test "$ac_status" -eq 0; then 1489 am_cv_ar_interface=lib 1490 else 1491 am_cv_ar_interface=unknown 1492 fi 1493 fi 1494 rm -f conftest.lib libconftest.a 1495 ]) 1496 AC_LANG_POP([C])]) 1497 1498case $am_cv_ar_interface in 1499ar) 1500 ;; 1501lib) 1502 # Microsoft lib, so override with the ar-lib wrapper script. 1503 # FIXME: It is wrong to rewrite AR. 1504 # But if we don't then we get into trouble of one sort or another. 1505 # A longer-term fix would be to have automake use am__AR in this case, 1506 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something 1507 # similar. 1508 AR="$am_aux_dir/ar-lib $AR" 1509 ;; 1510unknown) 1511 m4_default([$1], 1512 [AC_MSG_ERROR([could not determine $AR interface])]) 1513 ;; 1514esac 1515AC_SUBST([AR])dnl 1516]) 1517 1518# AM_AUX_DIR_EXPAND -*- Autoconf -*- 1519 1520# Copyright (C) 2001-2018 Free Software Foundation, Inc. 1521# 1522# This file is free software; the Free Software Foundation 1523# gives unlimited permission to copy and/or distribute it, 1524# with or without modifications, as long as this notice is preserved. 1525 1526# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 1527# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 1528# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 1529# 1530# Of course, Automake must honor this variable whenever it calls a 1531# tool from the auxiliary directory. The problem is that $srcdir (and 1532# therefore $ac_aux_dir as well) can be either absolute or relative, 1533# depending on how configure is run. This is pretty annoying, since 1534# it makes $ac_aux_dir quite unusable in subdirectories: in the top 1535# source directory, any form will work fine, but in subdirectories a 1536# relative path needs to be adjusted first. 1537# 1538# $ac_aux_dir/missing 1539# fails when called from a subdirectory if $ac_aux_dir is relative 1540# $top_srcdir/$ac_aux_dir/missing 1541# fails if $ac_aux_dir is absolute, 1542# fails when called from a subdirectory in a VPATH build with 1543# a relative $ac_aux_dir 1544# 1545# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 1546# are both prefixed by $srcdir. In an in-source build this is usually 1547# harmless because $srcdir is '.', but things will broke when you 1548# start a VPATH build or use an absolute $srcdir. 1549# 1550# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 1551# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 1552# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 1553# and then we would define $MISSING as 1554# MISSING="\${SHELL} $am_aux_dir/missing" 1555# This will work as long as MISSING is not called from configure, because 1556# unfortunately $(top_srcdir) has no meaning in configure. 1557# However there are other variables, like CC, which are often used in 1558# configure, and could therefore not use this "fixed" $ac_aux_dir. 1559# 1560# Another solution, used here, is to always expand $ac_aux_dir to an 1561# absolute PATH. The drawback is that using absolute paths prevent a 1562# configured tree to be moved without reconfiguration. 1563 1564AC_DEFUN([AM_AUX_DIR_EXPAND], 1565[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1566# Expand $ac_aux_dir to an absolute path. 1567am_aux_dir=`cd "$ac_aux_dir" && pwd` 1568]) 1569 1570# AM_CONDITIONAL -*- Autoconf -*- 1571 1572# Copyright (C) 1997-2018 Free Software Foundation, Inc. 1573# 1574# This file is free software; the Free Software Foundation 1575# gives unlimited permission to copy and/or distribute it, 1576# with or without modifications, as long as this notice is preserved. 1577 1578# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1579# ------------------------------------- 1580# Define a conditional. 1581AC_DEFUN([AM_CONDITIONAL], 1582[AC_PREREQ([2.52])dnl 1583 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1584 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1585AC_SUBST([$1_TRUE])dnl 1586AC_SUBST([$1_FALSE])dnl 1587_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1588_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1589m4_define([_AM_COND_VALUE_$1], [$2])dnl 1590if $2; then 1591 $1_TRUE= 1592 $1_FALSE='#' 1593else 1594 $1_TRUE='#' 1595 $1_FALSE= 1596fi 1597AC_CONFIG_COMMANDS_PRE( 1598[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1599 AC_MSG_ERROR([[conditional "$1" was never defined. 1600Usually this means the macro was only invoked conditionally.]]) 1601fi])]) 1602 1603# Copyright (C) 1999-2018 Free Software Foundation, Inc. 1604# 1605# This file is free software; the Free Software Foundation 1606# gives unlimited permission to copy and/or distribute it, 1607# with or without modifications, as long as this notice is preserved. 1608 1609 1610# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1611# written in clear, in which case automake, when reading aclocal.m4, 1612# will think it sees a *use*, and therefore will trigger all it's 1613# C support machinery. Also note that it means that autoscan, seeing 1614# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1615 1616 1617# _AM_DEPENDENCIES(NAME) 1618# ---------------------- 1619# See how the compiler implements dependency checking. 1620# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1621# We try a few techniques and use that to set a single cache variable. 1622# 1623# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1624# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1625# dependency, and given that the user is not expected to run this macro, 1626# just rely on AC_PROG_CC. 1627AC_DEFUN([_AM_DEPENDENCIES], 1628[AC_REQUIRE([AM_SET_DEPDIR])dnl 1629AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1630AC_REQUIRE([AM_MAKE_INCLUDE])dnl 1631AC_REQUIRE([AM_DEP_TRACK])dnl 1632 1633m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1634 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1635 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1636 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1637 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1638 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1639 [depcc="$$1" am_compiler_list=]) 1640 1641AC_CACHE_CHECK([dependency style of $depcc], 1642 [am_cv_$1_dependencies_compiler_type], 1643[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1644 # We make a subdir and do the tests there. Otherwise we can end up 1645 # making bogus files that we don't know about and never remove. For 1646 # instance it was reported that on HP-UX the gcc test will end up 1647 # making a dummy file named 'D' -- because '-MD' means "put the output 1648 # in D". 1649 rm -rf conftest.dir 1650 mkdir conftest.dir 1651 # Copy depcomp to subdir because otherwise we won't find it if we're 1652 # using a relative directory. 1653 cp "$am_depcomp" conftest.dir 1654 cd conftest.dir 1655 # We will build objects and dependencies in a subdirectory because 1656 # it helps to detect inapplicable dependency modes. For instance 1657 # both Tru64's cc and ICC support -MD to output dependencies as a 1658 # side effect of compilation, but ICC will put the dependencies in 1659 # the current directory while Tru64 will put them in the object 1660 # directory. 1661 mkdir sub 1662 1663 am_cv_$1_dependencies_compiler_type=none 1664 if test "$am_compiler_list" = ""; then 1665 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 1666 fi 1667 am__universal=false 1668 m4_case([$1], [CC], 1669 [case " $depcc " in #( 1670 *\ -arch\ *\ -arch\ *) am__universal=true ;; 1671 esac], 1672 [CXX], 1673 [case " $depcc " in #( 1674 *\ -arch\ *\ -arch\ *) am__universal=true ;; 1675 esac]) 1676 1677 for depmode in $am_compiler_list; do 1678 # Setup a source with many dependencies, because some compilers 1679 # like to wrap large dependency lists on column 80 (with \), and 1680 # we should not choose a depcomp mode which is confused by this. 1681 # 1682 # We need to recreate these files for each test, as the compiler may 1683 # overwrite some of them when testing with obscure command lines. 1684 # This happens at least with the AIX C compiler. 1685 : > sub/conftest.c 1686 for i in 1 2 3 4 5 6; do 1687 echo '#include "conftst'$i'.h"' >> sub/conftest.c 1688 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 1689 # Solaris 10 /bin/sh. 1690 echo '/* dummy */' > sub/conftst$i.h 1691 done 1692 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1693 1694 # We check with '-c' and '-o' for the sake of the "dashmstdout" 1695 # mode. It turns out that the SunPro C++ compiler does not properly 1696 # handle '-M -o', and we need to detect this. Also, some Intel 1697 # versions had trouble with output in subdirs. 1698 am__obj=sub/conftest.${OBJEXT-o} 1699 am__minus_obj="-o $am__obj" 1700 case $depmode in 1701 gcc) 1702 # This depmode causes a compiler race in universal mode. 1703 test "$am__universal" = false || continue 1704 ;; 1705 nosideeffect) 1706 # After this tag, mechanisms are not by side-effect, so they'll 1707 # only be used when explicitly requested. 1708 if test "x$enable_dependency_tracking" = xyes; then 1709 continue 1710 else 1711 break 1712 fi 1713 ;; 1714 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 1715 # This compiler won't grok '-c -o', but also, the minuso test has 1716 # not run yet. These depmodes are late enough in the game, and 1717 # so weak that their functioning should not be impacted. 1718 am__obj=conftest.${OBJEXT-o} 1719 am__minus_obj= 1720 ;; 1721 none) break ;; 1722 esac 1723 if depmode=$depmode \ 1724 source=sub/conftest.c object=$am__obj \ 1725 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 1726 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1727 >/dev/null 2>conftest.err && 1728 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1729 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 1730 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1731 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1732 # icc doesn't choke on unknown options, it will just issue warnings 1733 # or remarks (even with -Werror). So we grep stderr for any message 1734 # that says an option was ignored or not supported. 1735 # When given -MP, icc 7.0 and 7.1 complain thusly: 1736 # icc: Command line warning: ignoring option '-M'; no argument required 1737 # The diagnosis changed in icc 8.0: 1738 # icc: Command line remark: option '-MP' not supported 1739 if (grep 'ignoring option' conftest.err || 1740 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1741 am_cv_$1_dependencies_compiler_type=$depmode 1742 break 1743 fi 1744 fi 1745 done 1746 1747 cd .. 1748 rm -rf conftest.dir 1749else 1750 am_cv_$1_dependencies_compiler_type=none 1751fi 1752]) 1753AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1754AM_CONDITIONAL([am__fastdep$1], [ 1755 test "x$enable_dependency_tracking" != xno \ 1756 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1757]) 1758 1759 1760# AM_SET_DEPDIR 1761# ------------- 1762# Choose a directory name for dependency files. 1763# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 1764AC_DEFUN([AM_SET_DEPDIR], 1765[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1766AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1767]) 1768 1769 1770# AM_DEP_TRACK 1771# ------------ 1772AC_DEFUN([AM_DEP_TRACK], 1773[AC_ARG_ENABLE([dependency-tracking], [dnl 1774AS_HELP_STRING( 1775 [--enable-dependency-tracking], 1776 [do not reject slow dependency extractors]) 1777AS_HELP_STRING( 1778 [--disable-dependency-tracking], 1779 [speeds up one-time build])]) 1780if test "x$enable_dependency_tracking" != xno; then 1781 am_depcomp="$ac_aux_dir/depcomp" 1782 AMDEPBACKSLASH='\' 1783 am__nodep='_no' 1784fi 1785AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1786AC_SUBST([AMDEPBACKSLASH])dnl 1787_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1788AC_SUBST([am__nodep])dnl 1789_AM_SUBST_NOTMAKE([am__nodep])dnl 1790]) 1791 1792# Generate code to set up dependency tracking. -*- Autoconf -*- 1793 1794# Copyright (C) 1999-2018 Free Software Foundation, Inc. 1795# 1796# This file is free software; the Free Software Foundation 1797# gives unlimited permission to copy and/or distribute it, 1798# with or without modifications, as long as this notice is preserved. 1799 1800# _AM_OUTPUT_DEPENDENCY_COMMANDS 1801# ------------------------------ 1802AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 1803[{ 1804 # Older Autoconf quotes --file arguments for eval, but not when files 1805 # are listed without --file. Let's play safe and only enable the eval 1806 # if we detect the quoting. 1807 # TODO: see whether this extra hack can be removed once we start 1808 # requiring Autoconf 2.70 or later. 1809 AS_CASE([$CONFIG_FILES], 1810 [*\'*], [eval set x "$CONFIG_FILES"], 1811 [*], [set x $CONFIG_FILES]) 1812 shift 1813 # Used to flag and report bootstrapping failures. 1814 am_rc=0 1815 for am_mf 1816 do 1817 # Strip MF so we end up with the name of the file. 1818 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 1819 # Check whether this is an Automake generated Makefile which includes 1820 # dependency-tracking related rules and includes. 1821 # Grep'ing the whole file directly is not great: AIX grep has a line 1822 # limit of 2048, but all sed's we know have understand at least 4000. 1823 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 1824 || continue 1825 am_dirpart=`AS_DIRNAME(["$am_mf"])` 1826 am_filepart=`AS_BASENAME(["$am_mf"])` 1827 AM_RUN_LOG([cd "$am_dirpart" \ 1828 && sed -e '/# am--include-marker/d' "$am_filepart" \ 1829 | $MAKE -f - am--depfiles]) || am_rc=$? 1830 done 1831 if test $am_rc -ne 0; then 1832 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 1833 for automatic dependency tracking. Try re-running configure with the 1834 '--disable-dependency-tracking' option to at least be able to build 1835 the package (albeit without support for automatic dependency tracking).]) 1836 fi 1837 AS_UNSET([am_dirpart]) 1838 AS_UNSET([am_filepart]) 1839 AS_UNSET([am_mf]) 1840 AS_UNSET([am_rc]) 1841 rm -f conftest-deps.mk 1842} 1843])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1844 1845 1846# AM_OUTPUT_DEPENDENCY_COMMANDS 1847# ----------------------------- 1848# This macro should only be invoked once -- use via AC_REQUIRE. 1849# 1850# This code is only required when automatic dependency tracking is enabled. 1851# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 1852# order to bootstrap the dependency handling code. 1853AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1854[AC_CONFIG_COMMANDS([depfiles], 1855 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1856 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 1857 1858# Do all the work for Automake. -*- Autoconf -*- 1859 1860# Copyright (C) 1996-2018 Free Software Foundation, Inc. 1861# 1862# This file is free software; the Free Software Foundation 1863# gives unlimited permission to copy and/or distribute it, 1864# with or without modifications, as long as this notice is preserved. 1865 1866# This macro actually does too much. Some checks are only needed if 1867# your package does certain things. But this isn't really a big deal. 1868 1869dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 1870m4_define([AC_PROG_CC], 1871m4_defn([AC_PROG_CC]) 1872[_AM_PROG_CC_C_O 1873]) 1874 1875# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1876# AM_INIT_AUTOMAKE([OPTIONS]) 1877# ----------------------------------------------- 1878# The call with PACKAGE and VERSION arguments is the old style 1879# call (pre autoconf-2.50), which is being phased out. PACKAGE 1880# and VERSION should now be passed to AC_INIT and removed from 1881# the call to AM_INIT_AUTOMAKE. 1882# We support both call styles for the transition. After 1883# the next Automake release, Autoconf can make the AC_INIT 1884# arguments mandatory, and then we can depend on a new Autoconf 1885# release and drop the old call support. 1886AC_DEFUN([AM_INIT_AUTOMAKE], 1887[AC_PREREQ([2.65])dnl 1888dnl Autoconf wants to disallow AM_ names. We explicitly allow 1889dnl the ones we care about. 1890m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1891AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1892AC_REQUIRE([AC_PROG_INSTALL])dnl 1893if test "`cd $srcdir && pwd`" != "`pwd`"; then 1894 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1895 # is not polluted with repeated "-I." 1896 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1897 # test to see if srcdir already configured 1898 if test -f $srcdir/config.status; then 1899 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1900 fi 1901fi 1902 1903# test whether we have cygpath 1904if test -z "$CYGPATH_W"; then 1905 if (cygpath --version) >/dev/null 2>/dev/null; then 1906 CYGPATH_W='cygpath -w' 1907 else 1908 CYGPATH_W=echo 1909 fi 1910fi 1911AC_SUBST([CYGPATH_W]) 1912 1913# Define the identity of the package. 1914dnl Distinguish between old-style and new-style calls. 1915m4_ifval([$2], 1916[AC_DIAGNOSE([obsolete], 1917 [$0: two- and three-arguments forms are deprecated.]) 1918m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1919 AC_SUBST([PACKAGE], [$1])dnl 1920 AC_SUBST([VERSION], [$2])], 1921[_AM_SET_OPTIONS([$1])dnl 1922dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1923m4_if( 1924 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 1925 [ok:ok],, 1926 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1927 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1928 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1929 1930_AM_IF_OPTION([no-define],, 1931[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 1932 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 1933 1934# Some tools Automake needs. 1935AC_REQUIRE([AM_SANITY_CHECK])dnl 1936AC_REQUIRE([AC_ARG_PROGRAM])dnl 1937AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 1938AM_MISSING_PROG([AUTOCONF], [autoconf]) 1939AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 1940AM_MISSING_PROG([AUTOHEADER], [autoheader]) 1941AM_MISSING_PROG([MAKEINFO], [makeinfo]) 1942AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1943AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1944AC_REQUIRE([AC_PROG_MKDIR_P])dnl 1945# For better backward compatibility. To be removed once Automake 1.9.x 1946# dies out for good. For more background, see: 1947# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 1948# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 1949AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 1950# We need awk for the "check" target (and possibly the TAP driver). The 1951# system "awk" is bad on some platforms. 1952AC_REQUIRE([AC_PROG_AWK])dnl 1953AC_REQUIRE([AC_PROG_MAKE_SET])dnl 1954AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1955_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1956 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1957 [_AM_PROG_TAR([v7])])]) 1958_AM_IF_OPTION([no-dependencies],, 1959[AC_PROVIDE_IFELSE([AC_PROG_CC], 1960 [_AM_DEPENDENCIES([CC])], 1961 [m4_define([AC_PROG_CC], 1962 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 1963AC_PROVIDE_IFELSE([AC_PROG_CXX], 1964 [_AM_DEPENDENCIES([CXX])], 1965 [m4_define([AC_PROG_CXX], 1966 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 1967AC_PROVIDE_IFELSE([AC_PROG_OBJC], 1968 [_AM_DEPENDENCIES([OBJC])], 1969 [m4_define([AC_PROG_OBJC], 1970 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 1971AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 1972 [_AM_DEPENDENCIES([OBJCXX])], 1973 [m4_define([AC_PROG_OBJCXX], 1974 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 1975]) 1976AC_REQUIRE([AM_SILENT_RULES])dnl 1977dnl The testsuite driver may need to know about EXEEXT, so add the 1978dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 1979dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 1980AC_CONFIG_COMMANDS_PRE(dnl 1981[m4_provide_if([_AM_COMPILER_EXEEXT], 1982 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1983 1984# POSIX will say in a future version that running "rm -f" with no argument 1985# is OK; and we want to be able to make that assumption in our Makefile 1986# recipes. So use an aggressive probe to check that the usage we want is 1987# actually supported "in the wild" to an acceptable degree. 1988# See automake bug#10828. 1989# To make any issue more visible, cause the running configure to be aborted 1990# by default if the 'rm' program in use doesn't match our expectations; the 1991# user can still override this though. 1992if rm -f && rm -fr && rm -rf; then : OK; else 1993 cat >&2 <<'END' 1994Oops! 1995 1996Your 'rm' program seems unable to run without file operands specified 1997on the command line, even when the '-f' option is present. This is contrary 1998to the behaviour of most rm programs out there, and not conforming with 1999the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 2000 2001Please tell bug-automake@gnu.org about your system, including the value 2002of your $PATH and any error possibly output before this message. This 2003can help us improve future automake versions. 2004 2005END 2006 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 2007 echo 'Configuration will proceed anyway, since you have set the' >&2 2008 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 2009 echo >&2 2010 else 2011 cat >&2 <<'END' 2012Aborting the configuration process, to ensure you take notice of the issue. 2013 2014You can download and install GNU coreutils to get an 'rm' implementation 2015that behaves properly: <https://www.gnu.org/software/coreutils/>. 2016 2017If you want to complete the configuration process using your problematic 2018'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 2019to "yes", and re-run configure. 2020 2021END 2022 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 2023 fi 2024fi 2025dnl The trailing newline in this macro's definition is deliberate, for 2026dnl backward compatibility and to allow trailing 'dnl'-style comments 2027dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 2028]) 2029 2030dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 2031dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 2032dnl mangled by Autoconf and run in a shell conditional statement. 2033m4_define([_AC_COMPILER_EXEEXT], 2034m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 2035 2036# When config.status generates a header, we must update the stamp-h file. 2037# This file resides in the same directory as the config header 2038# that is generated. The stamp files are numbered to have different names. 2039 2040# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 2041# loop where config.status creates the headers, so we can generate 2042# our stamp files there. 2043AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 2044[# Compute $1's index in $config_headers. 2045_am_arg=$1 2046_am_stamp_count=1 2047for _am_header in $config_headers :; do 2048 case $_am_header in 2049 $_am_arg | $_am_arg:* ) 2050 break ;; 2051 * ) 2052 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 2053 esac 2054done 2055echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 2056 2057# Copyright (C) 2001-2018 Free Software Foundation, Inc. 2058# 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. 2062 2063# AM_PROG_INSTALL_SH 2064# ------------------ 2065# Define $install_sh. 2066AC_DEFUN([AM_PROG_INSTALL_SH], 2067[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 2068if test x"${install_sh+set}" != xset; then 2069 case $am_aux_dir in 2070 *\ * | *\ *) 2071 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 2072 *) 2073 install_sh="\${SHELL} $am_aux_dir/install-sh" 2074 esac 2075fi 2076AC_SUBST([install_sh])]) 2077 2078# Copyright (C) 2003-2018 Free Software Foundation, Inc. 2079# 2080# This file is free software; the Free Software Foundation 2081# gives unlimited permission to copy and/or distribute it, 2082# with or without modifications, as long as this notice is preserved. 2083 2084# Check whether the underlying file-system supports filenames 2085# with a leading dot. For instance MS-DOS doesn't. 2086AC_DEFUN([AM_SET_LEADING_DOT], 2087[rm -rf .tst 2>/dev/null 2088mkdir .tst 2>/dev/null 2089if test -d .tst; then 2090 am__leading_dot=. 2091else 2092 am__leading_dot=_ 2093fi 2094rmdir .tst 2>/dev/null 2095AC_SUBST([am__leading_dot])]) 2096 2097# Copyright (C) 1998-2018 Free Software Foundation, Inc. 2098# 2099# This file is free software; the Free Software Foundation 2100# gives unlimited permission to copy and/or distribute it, 2101# with or without modifications, as long as this notice is preserved. 2102 2103# AM_PROG_LEX 2104# ----------- 2105# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a 2106# "missing" invocation, for better error output. 2107AC_DEFUN([AM_PROG_LEX], 2108[AC_PREREQ([2.50])dnl 2109AC_REQUIRE([AM_MISSING_HAS_RUN])dnl 2110AC_REQUIRE([AC_PROG_LEX])dnl 2111if test "$LEX" = :; then 2112 LEX=${am_missing_run}flex 2113fi]) 2114 2115# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 2116# From Jim Meyering 2117 2118# Copyright (C) 1996-2018 Free Software Foundation, Inc. 2119# 2120# This file is free software; the Free Software Foundation 2121# gives unlimited permission to copy and/or distribute it, 2122# with or without modifications, as long as this notice is preserved. 2123 2124# AM_MAINTAINER_MODE([DEFAULT-MODE]) 2125# ---------------------------------- 2126# Control maintainer-specific portions of Makefiles. 2127# Default is to disable them, unless 'enable' is passed literally. 2128# For symmetry, 'disable' may be passed as well. Anyway, the user 2129# can override the default with the --enable/--disable switch. 2130AC_DEFUN([AM_MAINTAINER_MODE], 2131[m4_case(m4_default([$1], [disable]), 2132 [enable], [m4_define([am_maintainer_other], [disable])], 2133 [disable], [m4_define([am_maintainer_other], [enable])], 2134 [m4_define([am_maintainer_other], [enable]) 2135 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 2136AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 2137 dnl maintainer-mode's default is 'disable' unless 'enable' is passed 2138 AC_ARG_ENABLE([maintainer-mode], 2139 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 2140 am_maintainer_other[ make rules and dependencies not useful 2141 (and sometimes confusing) to the casual installer])], 2142 [USE_MAINTAINER_MODE=$enableval], 2143 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 2144 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 2145 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 2146 MAINT=$MAINTAINER_MODE_TRUE 2147 AC_SUBST([MAINT])dnl 2148] 2149) 2150 2151# Check to see how 'make' treats includes. -*- Autoconf -*- 2152 2153# Copyright (C) 2001-2018 Free Software Foundation, Inc. 2154# 2155# This file is free software; the Free Software Foundation 2156# gives unlimited permission to copy and/or distribute it, 2157# with or without modifications, as long as this notice is preserved. 2158 2159# AM_MAKE_INCLUDE() 2160# ----------------- 2161# Check whether make has an 'include' directive that can support all 2162# the idioms we need for our automatic dependency tracking code. 2163AC_DEFUN([AM_MAKE_INCLUDE], 2164[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 2165cat > confinc.mk << 'END' 2166am__doit: 2167 @echo this is the am__doit target >confinc.out 2168.PHONY: am__doit 2169END 2170am__include="#" 2171am__quote= 2172# BSD make does it like this. 2173echo '.include "confinc.mk" # ignored' > confmf.BSD 2174# Other make implementations (GNU, Solaris 10, AIX) do it like this. 2175echo 'include confinc.mk # ignored' > confmf.GNU 2176_am_result=no 2177for s in GNU BSD; do 2178 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 2179 AS_CASE([$?:`cat confinc.out 2>/dev/null`], 2180 ['0:this is the am__doit target'], 2181 [AS_CASE([$s], 2182 [BSD], [am__include='.include' am__quote='"'], 2183 [am__include='include' am__quote=''])]) 2184 if test "$am__include" != "#"; then 2185 _am_result="yes ($s style)" 2186 break 2187 fi 2188done 2189rm -f confinc.* confmf.* 2190AC_MSG_RESULT([${_am_result}]) 2191AC_SUBST([am__include])]) 2192AC_SUBST([am__quote])]) 2193 2194# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 2195 2196# Copyright (C) 1997-2018 Free Software Foundation, Inc. 2197# 2198# This file is free software; the Free Software Foundation 2199# gives unlimited permission to copy and/or distribute it, 2200# with or without modifications, as long as this notice is preserved. 2201 2202# AM_MISSING_PROG(NAME, PROGRAM) 2203# ------------------------------ 2204AC_DEFUN([AM_MISSING_PROG], 2205[AC_REQUIRE([AM_MISSING_HAS_RUN]) 2206$1=${$1-"${am_missing_run}$2"} 2207AC_SUBST($1)]) 2208 2209# AM_MISSING_HAS_RUN 2210# ------------------ 2211# Define MISSING if not defined so far and test if it is modern enough. 2212# If it is, set am_missing_run to use it, otherwise, to nothing. 2213AC_DEFUN([AM_MISSING_HAS_RUN], 2214[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 2215AC_REQUIRE_AUX_FILE([missing])dnl 2216if test x"${MISSING+set}" != xset; then 2217 case $am_aux_dir in 2218 *\ * | *\ *) 2219 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 2220 *) 2221 MISSING="\${SHELL} $am_aux_dir/missing" ;; 2222 esac 2223fi 2224# Use eval to expand $SHELL 2225if eval "$MISSING --is-lightweight"; then 2226 am_missing_run="$MISSING " 2227else 2228 am_missing_run= 2229 AC_MSG_WARN(['missing' script is too old or missing]) 2230fi 2231]) 2232 2233# Helper functions for option handling. -*- Autoconf -*- 2234 2235# Copyright (C) 2001-2018 Free Software Foundation, Inc. 2236# 2237# This file is free software; the Free Software Foundation 2238# gives unlimited permission to copy and/or distribute it, 2239# with or without modifications, as long as this notice is preserved. 2240 2241# _AM_MANGLE_OPTION(NAME) 2242# ----------------------- 2243AC_DEFUN([_AM_MANGLE_OPTION], 2244[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 2245 2246# _AM_SET_OPTION(NAME) 2247# -------------------- 2248# Set option NAME. Presently that only means defining a flag for this option. 2249AC_DEFUN([_AM_SET_OPTION], 2250[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 2251 2252# _AM_SET_OPTIONS(OPTIONS) 2253# ------------------------ 2254# OPTIONS is a space-separated list of Automake options. 2255AC_DEFUN([_AM_SET_OPTIONS], 2256[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 2257 2258# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 2259# ------------------------------------------- 2260# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 2261AC_DEFUN([_AM_IF_OPTION], 2262[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 2263 2264# Copyright (C) 1999-2018 Free Software Foundation, Inc. 2265# 2266# This file is free software; the Free Software Foundation 2267# gives unlimited permission to copy and/or distribute it, 2268# with or without modifications, as long as this notice is preserved. 2269 2270# _AM_PROG_CC_C_O 2271# --------------- 2272# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 2273# to automatically call this. 2274AC_DEFUN([_AM_PROG_CC_C_O], 2275[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 2276AC_REQUIRE_AUX_FILE([compile])dnl 2277AC_LANG_PUSH([C])dnl 2278AC_CACHE_CHECK( 2279 [whether $CC understands -c and -o together], 2280 [am_cv_prog_cc_c_o], 2281 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 2282 # Make sure it works both with $CC and with simple cc. 2283 # Following AC_PROG_CC_C_O, we do the test twice because some 2284 # compilers refuse to overwrite an existing .o file with -o, 2285 # though they will create one. 2286 am_cv_prog_cc_c_o=yes 2287 for am_i in 1 2; do 2288 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 2289 && test -f conftest2.$ac_objext; then 2290 : OK 2291 else 2292 am_cv_prog_cc_c_o=no 2293 break 2294 fi 2295 done 2296 rm -f core conftest* 2297 unset am_i]) 2298if test "$am_cv_prog_cc_c_o" != yes; then 2299 # Losing compiler, so override with the script. 2300 # FIXME: It is wrong to rewrite CC. 2301 # But if we don't then we get into trouble of one sort or another. 2302 # A longer-term fix would be to have automake use am__CC in this case, 2303 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 2304 CC="$am_aux_dir/compile $CC" 2305fi 2306AC_LANG_POP([C])]) 2307 2308# For backward compatibility. 2309AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 2310 2311# Copyright (C) 2001-2018 Free Software Foundation, Inc. 2312# 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. 2316 2317# AM_RUN_LOG(COMMAND) 2318# ------------------- 2319# Run COMMAND, save the exit status in ac_status, and log it. 2320# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 2321AC_DEFUN([AM_RUN_LOG], 2322[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 2323 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 2324 ac_status=$? 2325 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2326 (exit $ac_status); }]) 2327 2328# Check to make sure that the build environment is sane. -*- Autoconf -*- 2329 2330# Copyright (C) 1996-2018 Free Software Foundation, Inc. 2331# 2332# This file is free software; the Free Software Foundation 2333# gives unlimited permission to copy and/or distribute it, 2334# with or without modifications, as long as this notice is preserved. 2335 2336# AM_SANITY_CHECK 2337# --------------- 2338AC_DEFUN([AM_SANITY_CHECK], 2339[AC_MSG_CHECKING([whether build environment is sane]) 2340# Reject unsafe characters in $srcdir or the absolute working directory 2341# name. Accept space and tab only in the latter. 2342am_lf=' 2343' 2344case `pwd` in 2345 *[[\\\"\#\$\&\'\`$am_lf]]*) 2346 AC_MSG_ERROR([unsafe absolute working directory name]);; 2347esac 2348case $srcdir in 2349 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 2350 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 2351esac 2352 2353# Do 'set' in a subshell so we don't clobber the current shell's 2354# arguments. Must try -L first in case configure is actually a 2355# symlink; some systems play weird games with the mod time of symlinks 2356# (eg FreeBSD returns the mod time of the symlink's containing 2357# directory). 2358if ( 2359 am_has_slept=no 2360 for am_try in 1 2; do 2361 echo "timestamp, slept: $am_has_slept" > conftest.file 2362 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 2363 if test "$[*]" = "X"; then 2364 # -L didn't work. 2365 set X `ls -t "$srcdir/configure" conftest.file` 2366 fi 2367 if test "$[*]" != "X $srcdir/configure conftest.file" \ 2368 && test "$[*]" != "X conftest.file $srcdir/configure"; then 2369 2370 # If neither matched, then we have a broken ls. This can happen 2371 # if, for instance, CONFIG_SHELL is bash and it inherits a 2372 # broken ls alias from the environment. This has actually 2373 # happened. Such a system could not be considered "sane". 2374 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 2375 alias in your environment]) 2376 fi 2377 if test "$[2]" = conftest.file || test $am_try -eq 2; then 2378 break 2379 fi 2380 # Just in case. 2381 sleep 1 2382 am_has_slept=yes 2383 done 2384 test "$[2]" = conftest.file 2385 ) 2386then 2387 # Ok. 2388 : 2389else 2390 AC_MSG_ERROR([newly created file is older than distributed files! 2391Check your system clock]) 2392fi 2393AC_MSG_RESULT([yes]) 2394# If we didn't sleep, we still need to ensure time stamps of config.status and 2395# generated files are strictly newer. 2396am_sleep_pid= 2397if grep 'slept: no' conftest.file >/dev/null 2>&1; then 2398 ( sleep 1 ) & 2399 am_sleep_pid=$! 2400fi 2401AC_CONFIG_COMMANDS_PRE( 2402 [AC_MSG_CHECKING([that generated files are newer than configure]) 2403 if test -n "$am_sleep_pid"; then 2404 # Hide warnings about reused PIDs. 2405 wait $am_sleep_pid 2>/dev/null 2406 fi 2407 AC_MSG_RESULT([done])]) 2408rm -f conftest.file 2409]) 2410 2411# Copyright (C) 2009-2018 Free Software Foundation, Inc. 2412# 2413# This file is free software; the Free Software Foundation 2414# gives unlimited permission to copy and/or distribute it, 2415# with or without modifications, as long as this notice is preserved. 2416 2417# AM_SILENT_RULES([DEFAULT]) 2418# -------------------------- 2419# Enable less verbose build rules; with the default set to DEFAULT 2420# ("yes" being less verbose, "no" or empty being verbose). 2421AC_DEFUN([AM_SILENT_RULES], 2422[AC_ARG_ENABLE([silent-rules], [dnl 2423AS_HELP_STRING( 2424 [--enable-silent-rules], 2425 [less verbose build output (undo: "make V=1")]) 2426AS_HELP_STRING( 2427 [--disable-silent-rules], 2428 [verbose build output (undo: "make V=0")])dnl 2429]) 2430case $enable_silent_rules in @%:@ ((( 2431 yes) AM_DEFAULT_VERBOSITY=0;; 2432 no) AM_DEFAULT_VERBOSITY=1;; 2433 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 2434esac 2435dnl 2436dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 2437dnl do not support nested variable expansions. 2438dnl See automake bug#9928 and bug#10237. 2439am_make=${MAKE-make} 2440AC_CACHE_CHECK([whether $am_make supports nested variables], 2441 [am_cv_make_support_nested_variables], 2442 [if AS_ECHO([['TRUE=$(BAR$(V)) 2443BAR0=false 2444BAR1=true 2445V=1 2446am__doit: 2447 @$(TRUE) 2448.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 2449 am_cv_make_support_nested_variables=yes 2450else 2451 am_cv_make_support_nested_variables=no 2452fi]) 2453if test $am_cv_make_support_nested_variables = yes; then 2454 dnl Using '$V' instead of '$(V)' breaks IRIX make. 2455 AM_V='$(V)' 2456 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 2457else 2458 AM_V=$AM_DEFAULT_VERBOSITY 2459 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 2460fi 2461AC_SUBST([AM_V])dnl 2462AM_SUBST_NOTMAKE([AM_V])dnl 2463AC_SUBST([AM_DEFAULT_V])dnl 2464AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 2465AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 2466AM_BACKSLASH='\' 2467AC_SUBST([AM_BACKSLASH])dnl 2468_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 2469]) 2470 2471# Copyright (C) 2001-2018 Free Software Foundation, Inc. 2472# 2473# This file is free software; the Free Software Foundation 2474# gives unlimited permission to copy and/or distribute it, 2475# with or without modifications, as long as this notice is preserved. 2476 2477# AM_PROG_INSTALL_STRIP 2478# --------------------- 2479# One issue with vendor 'install' (even GNU) is that you can't 2480# specify the program used to strip binaries. This is especially 2481# annoying in cross-compiling environments, where the build's strip 2482# is unlikely to handle the host's binaries. 2483# Fortunately install-sh will honor a STRIPPROG variable, so we 2484# always use install-sh in "make install-strip", and initialize 2485# STRIPPROG with the value of the STRIP variable (set by the user). 2486AC_DEFUN([AM_PROG_INSTALL_STRIP], 2487[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 2488# Installed binaries are usually stripped using 'strip' when the user 2489# run "make install-strip". However 'strip' might not be the right 2490# tool to use in cross-compilation environments, therefore Automake 2491# will honor the 'STRIP' environment variable to overrule this program. 2492dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 2493if test "$cross_compiling" != no; then 2494 AC_CHECK_TOOL([STRIP], [strip], :) 2495fi 2496INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 2497AC_SUBST([INSTALL_STRIP_PROGRAM])]) 2498 2499# Copyright (C) 2006-2018 Free Software Foundation, Inc. 2500# 2501# This file is free software; the Free Software Foundation 2502# gives unlimited permission to copy and/or distribute it, 2503# with or without modifications, as long as this notice is preserved. 2504 2505# _AM_SUBST_NOTMAKE(VARIABLE) 2506# --------------------------- 2507# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 2508# This macro is traced by Automake. 2509AC_DEFUN([_AM_SUBST_NOTMAKE]) 2510 2511# AM_SUBST_NOTMAKE(VARIABLE) 2512# -------------------------- 2513# Public sister of _AM_SUBST_NOTMAKE. 2514AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 2515 2516# Check how to create a tarball. -*- Autoconf -*- 2517 2518# Copyright (C) 2004-2018 Free Software Foundation, Inc. 2519# 2520# This file is free software; the Free Software Foundation 2521# gives unlimited permission to copy and/or distribute it, 2522# with or without modifications, as long as this notice is preserved. 2523 2524# _AM_PROG_TAR(FORMAT) 2525# -------------------- 2526# Check how to create a tarball in format FORMAT. 2527# FORMAT should be one of 'v7', 'ustar', or 'pax'. 2528# 2529# Substitute a variable $(am__tar) that is a command 2530# writing to stdout a FORMAT-tarball containing the directory 2531# $tardir. 2532# tardir=directory && $(am__tar) > result.tar 2533# 2534# Substitute a variable $(am__untar) that extract such 2535# a tarball read from stdin. 2536# $(am__untar) < result.tar 2537# 2538AC_DEFUN([_AM_PROG_TAR], 2539[# Always define AMTAR for backward compatibility. Yes, it's still used 2540# in the wild :-( We should find a proper way to deprecate it ... 2541AC_SUBST([AMTAR], ['$${TAR-tar}']) 2542 2543# We'll loop over all known methods to create a tar archive until one works. 2544_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 2545 2546m4_if([$1], [v7], 2547 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 2548 2549 [m4_case([$1], 2550 [ustar], 2551 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 2552 # There is notably a 21 bits limit for the UID and the GID. In fact, 2553 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 2554 # and bug#13588). 2555 am_max_uid=2097151 # 2^21 - 1 2556 am_max_gid=$am_max_uid 2557 # The $UID and $GID variables are not portable, so we need to resort 2558 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 2559 # below are definitely unexpected, so allow the users to see them 2560 # (that is, avoid stderr redirection). 2561 am_uid=`id -u || echo unknown` 2562 am_gid=`id -g || echo unknown` 2563 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 2564 if test $am_uid -le $am_max_uid; then 2565 AC_MSG_RESULT([yes]) 2566 else 2567 AC_MSG_RESULT([no]) 2568 _am_tools=none 2569 fi 2570 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 2571 if test $am_gid -le $am_max_gid; then 2572 AC_MSG_RESULT([yes]) 2573 else 2574 AC_MSG_RESULT([no]) 2575 _am_tools=none 2576 fi], 2577 2578 [pax], 2579 [], 2580 2581 [m4_fatal([Unknown tar format])]) 2582 2583 AC_MSG_CHECKING([how to create a $1 tar archive]) 2584 2585 # Go ahead even if we have the value already cached. We do so because we 2586 # need to set the values for the 'am__tar' and 'am__untar' variables. 2587 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 2588 2589 for _am_tool in $_am_tools; do 2590 case $_am_tool in 2591 gnutar) 2592 for _am_tar in tar gnutar gtar; do 2593 AM_RUN_LOG([$_am_tar --version]) && break 2594 done 2595 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 2596 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 2597 am__untar="$_am_tar -xf -" 2598 ;; 2599 plaintar) 2600 # Must skip GNU tar: if it does not support --format= it doesn't create 2601 # ustar tarball either. 2602 (tar --version) >/dev/null 2>&1 && continue 2603 am__tar='tar chf - "$$tardir"' 2604 am__tar_='tar chf - "$tardir"' 2605 am__untar='tar xf -' 2606 ;; 2607 pax) 2608 am__tar='pax -L -x $1 -w "$$tardir"' 2609 am__tar_='pax -L -x $1 -w "$tardir"' 2610 am__untar='pax -r' 2611 ;; 2612 cpio) 2613 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 2614 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 2615 am__untar='cpio -i -H $1 -d' 2616 ;; 2617 none) 2618 am__tar=false 2619 am__tar_=false 2620 am__untar=false 2621 ;; 2622 esac 2623 2624 # If the value was cached, stop now. We just wanted to have am__tar 2625 # and am__untar set. 2626 test -n "${am_cv_prog_tar_$1}" && break 2627 2628 # tar/untar a dummy directory, and stop if the command works. 2629 rm -rf conftest.dir 2630 mkdir conftest.dir 2631 echo GrepMe > conftest.dir/file 2632 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 2633 rm -rf conftest.dir 2634 if test -s conftest.tar; then 2635 AM_RUN_LOG([$am__untar <conftest.tar]) 2636 AM_RUN_LOG([cat conftest.dir/file]) 2637 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 2638 fi 2639 done 2640 rm -rf conftest.dir 2641 2642 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 2643 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 2644 2645AC_SUBST([am__tar]) 2646AC_SUBST([am__untar]) 2647]) # _AM_PROG_TAR 2648 2649m4_include([m4/ax_pthread.m4]) 2650m4_include([m4/iconv.m4]) 2651m4_include([m4/libtool.m4]) 2652m4_include([m4/ltoptions.m4]) 2653m4_include([m4/ltsugar.m4]) 2654m4_include([m4/ltversion.m4]) 2655m4_include([m4/lt~obsolete.m4]) 2656