1 # generated automatically by aclocal 1.11 -*- Autoconf -*- 2 3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5 # This file is free software; the Free Software Foundation 6 # gives unlimited permission to copy and/or distribute it, 7 # with or without modifications, as long as this notice is preserved. 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 14 m4_ifndef([AC_AUTOCONF_VERSION], 15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 17 [m4_warning([this file was generated for autoconf 2.63. 18 You have another version of autoconf. It may work, but is not guaranteed to. 19 If you have problems, you may need to regenerate the build system entirely. 20 To do so, use the procedure documented by the package, typically `autoreconf'.])]) 21 22 # iconv.m4 serial AM6 (gettext-0.17) 23 dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. 24 dnl This file is free software; the Free Software Foundation 25 dnl gives unlimited permission to copy and/or distribute it, 26 dnl with or without modifications, as long as this notice is preserved. 27 28 dnl From Bruno Haible. 29 30 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], 31 [ 32 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 33 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 34 AC_REQUIRE([AC_LIB_RPATH]) 35 36 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 37 dnl accordingly. 38 AC_LIB_LINKFLAGS_BODY([iconv]) 39 ]) 40 41 AC_DEFUN([AM_ICONV_LINK], 42 [ 43 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 44 dnl those with the standalone portable GNU libiconv installed). 45 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles 46 47 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 48 dnl accordingly. 49 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 50 51 dnl Add $INCICONV to CPPFLAGS before performing the following checks, 52 dnl because if the user has installed libiconv and not disabled its use 53 dnl via --without-libiconv-prefix, he wants to use it. The first 54 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. 55 am_save_CPPFLAGS="$CPPFLAGS" 56 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 57 58 AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ 59 am_cv_func_iconv="no, consider installing GNU libiconv" 60 am_cv_lib_iconv=no 61 AC_TRY_LINK([#include <stdlib.h> 62 #include <iconv.h>], 63 [iconv_t cd = iconv_open("",""); 64 iconv(cd,NULL,NULL,NULL,NULL); 65 iconv_close(cd);], 66 am_cv_func_iconv=yes) 67 if test "$am_cv_func_iconv" != yes; then 68 am_save_LIBS="$LIBS" 69 LIBS="$LIBS $LIBICONV" 70 AC_TRY_LINK([#include <stdlib.h> 71 #include <iconv.h>], 72 [iconv_t cd = iconv_open("",""); 73 iconv(cd,NULL,NULL,NULL,NULL); 74 iconv_close(cd);], 75 am_cv_lib_iconv=yes 76 am_cv_func_iconv=yes) 77 LIBS="$am_save_LIBS" 78 fi 79 ]) 80 if test "$am_cv_func_iconv" = yes; then 81 AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ 82 dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. 83 am_save_LIBS="$LIBS" 84 if test $am_cv_lib_iconv = yes; then 85 LIBS="$LIBS $LIBICONV" 86 fi 87 AC_TRY_RUN([ 88 #include <iconv.h> 89 #include <string.h> 90 int main () 91 { 92 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful 93 returns. */ 94 { 95 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); 96 if (cd_utf8_to_88591 != (iconv_t)(-1)) 97 { 98 static const char input[] = "\342\202\254"; /* EURO SIGN */ 99 char buf[10]; 100 const char *inptr = input; 101 size_t inbytesleft = strlen (input); 102 char *outptr = buf; 103 size_t outbytesleft = sizeof (buf); 104 size_t res = iconv (cd_utf8_to_88591, 105 (char **) &inptr, &inbytesleft, 106 &outptr, &outbytesleft); 107 if (res == 0) 108 return 1; 109 } 110 } 111 #if 0 /* This bug could be worked around by the caller. */ 112 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ 113 { 114 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); 115 if (cd_88591_to_utf8 != (iconv_t)(-1)) 116 { 117 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; 118 char buf[50]; 119 const char *inptr = input; 120 size_t inbytesleft = strlen (input); 121 char *outptr = buf; 122 size_t outbytesleft = sizeof (buf); 123 size_t res = iconv (cd_88591_to_utf8, 124 (char **) &inptr, &inbytesleft, 125 &outptr, &outbytesleft); 126 if ((int)res > 0) 127 return 1; 128 } 129 } 130 #endif 131 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is 132 provided. */ 133 if (/* Try standardized names. */ 134 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) 135 /* Try IRIX, OSF/1 names. */ 136 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) 137 /* Try AIX names. */ 138 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) 139 /* Try HP-UX names. */ 140 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) 141 return 1; 142 return 0; 143 }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], 144 [case "$host_os" in 145 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; 146 *) am_cv_func_iconv_works="guessing yes" ;; 147 esac]) 148 LIBS="$am_save_LIBS" 149 ]) 150 case "$am_cv_func_iconv_works" in 151 *no) am_func_iconv=no am_cv_lib_iconv=no ;; 152 *) am_func_iconv=yes ;; 153 esac 154 else 155 am_func_iconv=no am_cv_lib_iconv=no 156 fi 157 if test "$am_func_iconv" = yes; then 158 AC_DEFINE(HAVE_ICONV, 1, 159 [Define if you have the iconv() function and it works.]) 160 fi 161 if test "$am_cv_lib_iconv" = yes; then 162 AC_MSG_CHECKING([how to link with libiconv]) 163 AC_MSG_RESULT([$LIBICONV]) 164 else 165 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV 166 dnl either. 167 CPPFLAGS="$am_save_CPPFLAGS" 168 LIBICONV= 169 LTLIBICONV= 170 fi 171 AC_SUBST(LIBICONV) 172 AC_SUBST(LTLIBICONV) 173 ]) 174 175 AC_DEFUN([AM_ICONV], 176 [ 177 AM_ICONV_LINK 178 if test "$am_cv_func_iconv" = yes; then 179 AC_MSG_CHECKING([for iconv declaration]) 180 AC_CACHE_VAL(am_cv_proto_iconv, [ 181 AC_TRY_COMPILE([ 182 #include <stdlib.h> 183 #include <iconv.h> 184 extern 185 #ifdef __cplusplus 186 "C" 187 #endif 188 #if defined(__STDC__) || defined(__cplusplus) 189 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); 190 #else 191 size_t iconv(); 192 #endif 193 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") 194 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) 195 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 196 AC_MSG_RESULT([$]{ac_t:- 197 }[$]am_cv_proto_iconv) 198 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, 199 [Define as const if the declaration of iconv() needs const.]) 200 fi 201 ]) 202 203 # lib-ld.m4 serial 3 (gettext-0.13) 204 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. 205 dnl This file is free software; the Free Software Foundation 206 dnl gives unlimited permission to copy and/or distribute it, 207 dnl with or without modifications, as long as this notice is preserved. 208 209 dnl Subroutines of libtool.m4, 210 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision 211 dnl with libtool.m4. 212 213 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. 214 AC_DEFUN([AC_LIB_PROG_LD_GNU], 215 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, 216 [# I'd rather use --version here, but apparently some GNU ld's only accept -v. 217 case `$LD -v 2>&1 </dev/null` in 218 *GNU* | *'with BFD'*) 219 acl_cv_prog_gnu_ld=yes ;; 220 *) 221 acl_cv_prog_gnu_ld=no ;; 222 esac]) 223 with_gnu_ld=$acl_cv_prog_gnu_ld 224 ]) 225 226 dnl From libtool-1.4. Sets the variable LD. 227 AC_DEFUN([AC_LIB_PROG_LD], 228 [AC_ARG_WITH(gnu-ld, 229 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], 230 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) 231 AC_REQUIRE([AC_PROG_CC])dnl 232 AC_REQUIRE([AC_CANONICAL_HOST])dnl 233 # Prepare PATH_SEPARATOR. 234 # The user is always right. 235 if test "${PATH_SEPARATOR+set}" != set; then 236 echo "#! /bin/sh" >conf$$.sh 237 echo "exit 0" >>conf$$.sh 238 chmod +x conf$$.sh 239 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 240 PATH_SEPARATOR=';' 241 else 242 PATH_SEPARATOR=: 243 fi 244 rm -f conf$$.sh 245 fi 246 ac_prog=ld 247 if test "$GCC" = yes; then 248 # Check if gcc -print-prog-name=ld gives a path. 249 AC_MSG_CHECKING([for ld used by GCC]) 250 case $host in 251 *-*-mingw*) 252 # gcc leaves a trailing carriage return which upsets mingw 253 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 254 *) 255 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 256 esac 257 case $ac_prog in 258 # Accept absolute paths. 259 [[\\/]* | [A-Za-z]:[\\/]*)] 260 [re_direlt='/[^/][^/]*/\.\./'] 261 # Canonicalize the path of ld 262 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 263 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 264 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 265 done 266 test -z "$LD" && LD="$ac_prog" 267 ;; 268 "") 269 # If it fails, then pretend we aren't using GCC. 270 ac_prog=ld 271 ;; 272 *) 273 # If it is relative, then search for the first ld in PATH. 274 with_gnu_ld=unknown 275 ;; 276 esac 277 elif test "$with_gnu_ld" = yes; then 278 AC_MSG_CHECKING([for GNU ld]) 279 else 280 AC_MSG_CHECKING([for non-GNU ld]) 281 fi 282 AC_CACHE_VAL(acl_cv_path_LD, 283 [if test -z "$LD"; then 284 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 285 for ac_dir in $PATH; do 286 test -z "$ac_dir" && ac_dir=. 287 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 288 acl_cv_path_LD="$ac_dir/$ac_prog" 289 # Check to see if the program is GNU ld. I'd rather use --version, 290 # but apparently some GNU ld's only accept -v. 291 # Break only if it was the GNU/non-GNU ld that we prefer. 292 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in 293 *GNU* | *'with BFD'*) 294 test "$with_gnu_ld" != no && break ;; 295 *) 296 test "$with_gnu_ld" != yes && break ;; 297 esac 298 fi 299 done 300 IFS="$ac_save_ifs" 301 else 302 acl_cv_path_LD="$LD" # Let the user override the test with a path. 303 fi]) 304 LD="$acl_cv_path_LD" 305 if test -n "$LD"; then 306 AC_MSG_RESULT($LD) 307 else 308 AC_MSG_RESULT(no) 309 fi 310 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 311 AC_LIB_PROG_LD_GNU 312 ]) 313 314 # lib-link.m4 serial 13 (gettext-0.17) 315 dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. 316 dnl This file is free software; the Free Software Foundation 317 dnl gives unlimited permission to copy and/or distribute it, 318 dnl with or without modifications, as long as this notice is preserved. 319 320 dnl From Bruno Haible. 321 322 AC_PREREQ(2.54) 323 324 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and 325 dnl the libraries corresponding to explicit and implicit dependencies. 326 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and 327 dnl augments the CPPFLAGS variable. 328 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname 329 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 330 AC_DEFUN([AC_LIB_LINKFLAGS], 331 [ 332 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 333 AC_REQUIRE([AC_LIB_RPATH]) 334 define([Name],[translit([$1],[./-], [___])]) 335 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 336 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 337 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ 338 AC_LIB_LINKFLAGS_BODY([$1], [$2]) 339 ac_cv_lib[]Name[]_libs="$LIB[]NAME" 340 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" 341 ac_cv_lib[]Name[]_cppflags="$INC[]NAME" 342 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" 343 ]) 344 LIB[]NAME="$ac_cv_lib[]Name[]_libs" 345 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" 346 INC[]NAME="$ac_cv_lib[]Name[]_cppflags" 347 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" 348 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 349 AC_SUBST([LIB]NAME) 350 AC_SUBST([LTLIB]NAME) 351 AC_SUBST([LIB]NAME[_PREFIX]) 352 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the 353 dnl results of this search when this library appears as a dependency. 354 HAVE_LIB[]NAME=yes 355 undefine([Name]) 356 undefine([NAME]) 357 ]) 358 359 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) 360 dnl searches for libname and the libraries corresponding to explicit and 361 dnl implicit dependencies, together with the specified include files and 362 dnl the ability to compile and link the specified testcode. If found, it 363 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and 364 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and 365 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs 366 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. 367 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname 368 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 369 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], 370 [ 371 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 372 AC_REQUIRE([AC_LIB_RPATH]) 373 define([Name],[translit([$1],[./-], [___])]) 374 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 375 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 376 377 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME 378 dnl accordingly. 379 AC_LIB_LINKFLAGS_BODY([$1], [$2]) 380 381 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, 382 dnl because if the user has installed lib[]Name and not disabled its use 383 dnl via --without-lib[]Name-prefix, he wants to use it. 384 ac_save_CPPFLAGS="$CPPFLAGS" 385 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 386 387 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ 388 ac_save_LIBS="$LIBS" 389 LIBS="$LIBS $LIB[]NAME" 390 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) 391 LIBS="$ac_save_LIBS" 392 ]) 393 if test "$ac_cv_lib[]Name" = yes; then 394 HAVE_LIB[]NAME=yes 395 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) 396 AC_MSG_CHECKING([how to link with lib[]$1]) 397 AC_MSG_RESULT([$LIB[]NAME]) 398 else 399 HAVE_LIB[]NAME=no 400 dnl If $LIB[]NAME didn't lead to a usable library, we don't need 401 dnl $INC[]NAME either. 402 CPPFLAGS="$ac_save_CPPFLAGS" 403 LIB[]NAME= 404 LTLIB[]NAME= 405 LIB[]NAME[]_PREFIX= 406 fi 407 AC_SUBST([HAVE_LIB]NAME) 408 AC_SUBST([LIB]NAME) 409 AC_SUBST([LTLIB]NAME) 410 AC_SUBST([LIB]NAME[_PREFIX]) 411 undefine([Name]) 412 undefine([NAME]) 413 ]) 414 415 dnl Determine the platform dependent parameters needed to use rpath: 416 dnl acl_libext, 417 dnl acl_shlibext, 418 dnl acl_hardcode_libdir_flag_spec, 419 dnl acl_hardcode_libdir_separator, 420 dnl acl_hardcode_direct, 421 dnl acl_hardcode_minus_L. 422 AC_DEFUN([AC_LIB_RPATH], 423 [ 424 dnl Tell automake >= 1.10 to complain if config.rpath is missing. 425 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) 426 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS 427 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld 428 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host 429 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir 430 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ 431 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ 432 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh 433 . ./conftest.sh 434 rm -f ./conftest.sh 435 acl_cv_rpath=done 436 ]) 437 wl="$acl_cv_wl" 438 acl_libext="$acl_cv_libext" 439 acl_shlibext="$acl_cv_shlibext" 440 acl_libname_spec="$acl_cv_libname_spec" 441 acl_library_names_spec="$acl_cv_library_names_spec" 442 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" 443 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" 444 acl_hardcode_direct="$acl_cv_hardcode_direct" 445 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" 446 dnl Determine whether the user wants rpath handling at all. 447 AC_ARG_ENABLE(rpath, 448 [ --disable-rpath do not hardcode runtime library paths], 449 :, enable_rpath=yes) 450 ]) 451 452 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and 453 dnl the libraries corresponding to explicit and implicit dependencies. 454 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. 455 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found 456 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 457 AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 458 [ 459 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 460 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 461 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 462 dnl Autoconf >= 2.61 supports dots in --with options. 463 define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) 464 dnl By default, look in $includedir and $libdir. 465 use_additional=yes 466 AC_LIB_WITH_FINAL_PREFIX([ 467 eval additional_includedir=\"$includedir\" 468 eval additional_libdir=\"$libdir\" 469 ]) 470 AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], 471 [ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib 472 --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], 473 [ 474 if test "X$withval" = "Xno"; then 475 use_additional=no 476 else 477 if test "X$withval" = "X"; then 478 AC_LIB_WITH_FINAL_PREFIX([ 479 eval additional_includedir=\"$includedir\" 480 eval additional_libdir=\"$libdir\" 481 ]) 482 else 483 additional_includedir="$withval/include" 484 additional_libdir="$withval/$acl_libdirstem" 485 fi 486 fi 487 ]) 488 dnl Search the library and its dependencies in $additional_libdir and 489 dnl $LDFLAGS. Using breadth-first-seach. 490 LIB[]NAME= 491 LTLIB[]NAME= 492 INC[]NAME= 493 LIB[]NAME[]_PREFIX= 494 rpathdirs= 495 ltrpathdirs= 496 names_already_handled= 497 names_next_round='$1 $2' 498 while test -n "$names_next_round"; do 499 names_this_round="$names_next_round" 500 names_next_round= 501 for name in $names_this_round; do 502 already_handled= 503 for n in $names_already_handled; do 504 if test "$n" = "$name"; then 505 already_handled=yes 506 break 507 fi 508 done 509 if test -z "$already_handled"; then 510 names_already_handled="$names_already_handled $name" 511 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS 512 dnl or AC_LIB_HAVE_LINKFLAGS call. 513 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` 514 eval value=\"\$HAVE_LIB$uppername\" 515 if test -n "$value"; then 516 if test "$value" = yes; then 517 eval value=\"\$LIB$uppername\" 518 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" 519 eval value=\"\$LTLIB$uppername\" 520 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" 521 else 522 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined 523 dnl that this library doesn't exist. So just drop it. 524 : 525 fi 526 else 527 dnl Search the library lib$name in $additional_libdir and $LDFLAGS 528 dnl and the already constructed $LIBNAME/$LTLIBNAME. 529 found_dir= 530 found_la= 531 found_so= 532 found_a= 533 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name 534 if test -n "$acl_shlibext"; then 535 shrext=".$acl_shlibext" # typically: shrext=.so 536 else 537 shrext= 538 fi 539 if test $use_additional = yes; then 540 dir="$additional_libdir" 541 dnl The same code as in the loop below: 542 dnl First look for a shared library. 543 if test -n "$acl_shlibext"; then 544 if test -f "$dir/$libname$shrext"; then 545 found_dir="$dir" 546 found_so="$dir/$libname$shrext" 547 else 548 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 549 ver=`(cd "$dir" && \ 550 for f in "$libname$shrext".*; do echo "$f"; done \ 551 | sed -e "s,^$libname$shrext\\\\.,," \ 552 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 553 | sed 1q ) 2>/dev/null` 554 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then 555 found_dir="$dir" 556 found_so="$dir/$libname$shrext.$ver" 557 fi 558 else 559 eval library_names=\"$acl_library_names_spec\" 560 for f in $library_names; do 561 if test -f "$dir/$f"; then 562 found_dir="$dir" 563 found_so="$dir/$f" 564 break 565 fi 566 done 567 fi 568 fi 569 fi 570 dnl Then look for a static library. 571 if test "X$found_dir" = "X"; then 572 if test -f "$dir/$libname.$acl_libext"; then 573 found_dir="$dir" 574 found_a="$dir/$libname.$acl_libext" 575 fi 576 fi 577 if test "X$found_dir" != "X"; then 578 if test -f "$dir/$libname.la"; then 579 found_la="$dir/$libname.la" 580 fi 581 fi 582 fi 583 if test "X$found_dir" = "X"; then 584 for x in $LDFLAGS $LTLIB[]NAME; do 585 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 586 case "$x" in 587 -L*) 588 dir=`echo "X$x" | sed -e 's/^X-L//'` 589 dnl First look for a shared library. 590 if test -n "$acl_shlibext"; then 591 if test -f "$dir/$libname$shrext"; then 592 found_dir="$dir" 593 found_so="$dir/$libname$shrext" 594 else 595 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 596 ver=`(cd "$dir" && \ 597 for f in "$libname$shrext".*; do echo "$f"; done \ 598 | sed -e "s,^$libname$shrext\\\\.,," \ 599 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 600 | sed 1q ) 2>/dev/null` 601 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then 602 found_dir="$dir" 603 found_so="$dir/$libname$shrext.$ver" 604 fi 605 else 606 eval library_names=\"$acl_library_names_spec\" 607 for f in $library_names; do 608 if test -f "$dir/$f"; then 609 found_dir="$dir" 610 found_so="$dir/$f" 611 break 612 fi 613 done 614 fi 615 fi 616 fi 617 dnl Then look for a static library. 618 if test "X$found_dir" = "X"; then 619 if test -f "$dir/$libname.$acl_libext"; then 620 found_dir="$dir" 621 found_a="$dir/$libname.$acl_libext" 622 fi 623 fi 624 if test "X$found_dir" != "X"; then 625 if test -f "$dir/$libname.la"; then 626 found_la="$dir/$libname.la" 627 fi 628 fi 629 ;; 630 esac 631 if test "X$found_dir" != "X"; then 632 break 633 fi 634 done 635 fi 636 if test "X$found_dir" != "X"; then 637 dnl Found the library. 638 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" 639 if test "X$found_so" != "X"; then 640 dnl Linking with a shared library. We attempt to hardcode its 641 dnl directory into the executable's runpath, unless it's the 642 dnl standard /usr/lib. 643 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then 644 dnl No hardcoding is needed. 645 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 646 else 647 dnl Use an explicit option to hardcode DIR into the resulting 648 dnl binary. 649 dnl Potentially add DIR to ltrpathdirs. 650 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 651 haveit= 652 for x in $ltrpathdirs; do 653 if test "X$x" = "X$found_dir"; then 654 haveit=yes 655 break 656 fi 657 done 658 if test -z "$haveit"; then 659 ltrpathdirs="$ltrpathdirs $found_dir" 660 fi 661 dnl The hardcoding into $LIBNAME is system dependent. 662 if test "$acl_hardcode_direct" = yes; then 663 dnl Using DIR/libNAME.so during linking hardcodes DIR into the 664 dnl resulting binary. 665 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 666 else 667 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then 668 dnl Use an explicit option to hardcode DIR into the resulting 669 dnl binary. 670 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 671 dnl Potentially add DIR to rpathdirs. 672 dnl The rpathdirs will be appended to $LIBNAME at the end. 673 haveit= 674 for x in $rpathdirs; do 675 if test "X$x" = "X$found_dir"; then 676 haveit=yes 677 break 678 fi 679 done 680 if test -z "$haveit"; then 681 rpathdirs="$rpathdirs $found_dir" 682 fi 683 else 684 dnl Rely on "-L$found_dir". 685 dnl But don't add it if it's already contained in the LDFLAGS 686 dnl or the already constructed $LIBNAME 687 haveit= 688 for x in $LDFLAGS $LIB[]NAME; do 689 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 690 if test "X$x" = "X-L$found_dir"; then 691 haveit=yes 692 break 693 fi 694 done 695 if test -z "$haveit"; then 696 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" 697 fi 698 if test "$acl_hardcode_minus_L" != no; then 699 dnl FIXME: Not sure whether we should use 700 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 701 dnl here. 702 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 703 else 704 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH 705 dnl here, because this doesn't fit in flags passed to the 706 dnl compiler. So give up. No hardcoding. This affects only 707 dnl very old systems. 708 dnl FIXME: Not sure whether we should use 709 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 710 dnl here. 711 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 712 fi 713 fi 714 fi 715 fi 716 else 717 if test "X$found_a" != "X"; then 718 dnl Linking with a static library. 719 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" 720 else 721 dnl We shouldn't come here, but anyway it's good to have a 722 dnl fallback. 723 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" 724 fi 725 fi 726 dnl Assume the include files are nearby. 727 additional_includedir= 728 case "$found_dir" in 729 */$acl_libdirstem | */$acl_libdirstem/) 730 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` 731 LIB[]NAME[]_PREFIX="$basedir" 732 additional_includedir="$basedir/include" 733 ;; 734 esac 735 if test "X$additional_includedir" != "X"; then 736 dnl Potentially add $additional_includedir to $INCNAME. 737 dnl But don't add it 738 dnl 1. if it's the standard /usr/include, 739 dnl 2. if it's /usr/local/include and we are using GCC on Linux, 740 dnl 3. if it's already present in $CPPFLAGS or the already 741 dnl constructed $INCNAME, 742 dnl 4. if it doesn't exist as a directory. 743 if test "X$additional_includedir" != "X/usr/include"; then 744 haveit= 745 if test "X$additional_includedir" = "X/usr/local/include"; then 746 if test -n "$GCC"; then 747 case $host_os in 748 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 749 esac 750 fi 751 fi 752 if test -z "$haveit"; then 753 for x in $CPPFLAGS $INC[]NAME; do 754 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 755 if test "X$x" = "X-I$additional_includedir"; then 756 haveit=yes 757 break 758 fi 759 done 760 if test -z "$haveit"; then 761 if test -d "$additional_includedir"; then 762 dnl Really add $additional_includedir to $INCNAME. 763 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" 764 fi 765 fi 766 fi 767 fi 768 fi 769 dnl Look for dependencies. 770 if test -n "$found_la"; then 771 dnl Read the .la file. It defines the variables 772 dnl dlname, library_names, old_library, dependency_libs, current, 773 dnl age, revision, installed, dlopen, dlpreopen, libdir. 774 save_libdir="$libdir" 775 case "$found_la" in 776 */* | *\\*) . "$found_la" ;; 777 *) . "./$found_la" ;; 778 esac 779 libdir="$save_libdir" 780 dnl We use only dependency_libs. 781 for dep in $dependency_libs; do 782 case "$dep" in 783 -L*) 784 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` 785 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. 786 dnl But don't add it 787 dnl 1. if it's the standard /usr/lib, 788 dnl 2. if it's /usr/local/lib and we are using GCC on Linux, 789 dnl 3. if it's already present in $LDFLAGS or the already 790 dnl constructed $LIBNAME, 791 dnl 4. if it doesn't exist as a directory. 792 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then 793 haveit= 794 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then 795 if test -n "$GCC"; then 796 case $host_os in 797 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 798 esac 799 fi 800 fi 801 if test -z "$haveit"; then 802 haveit= 803 for x in $LDFLAGS $LIB[]NAME; do 804 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 805 if test "X$x" = "X-L$additional_libdir"; then 806 haveit=yes 807 break 808 fi 809 done 810 if test -z "$haveit"; then 811 if test -d "$additional_libdir"; then 812 dnl Really add $additional_libdir to $LIBNAME. 813 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" 814 fi 815 fi 816 haveit= 817 for x in $LDFLAGS $LTLIB[]NAME; do 818 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 819 if test "X$x" = "X-L$additional_libdir"; then 820 haveit=yes 821 break 822 fi 823 done 824 if test -z "$haveit"; then 825 if test -d "$additional_libdir"; then 826 dnl Really add $additional_libdir to $LTLIBNAME. 827 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" 828 fi 829 fi 830 fi 831 fi 832 ;; 833 -R*) 834 dir=`echo "X$dep" | sed -e 's/^X-R//'` 835 if test "$enable_rpath" != no; then 836 dnl Potentially add DIR to rpathdirs. 837 dnl The rpathdirs will be appended to $LIBNAME at the end. 838 haveit= 839 for x in $rpathdirs; do 840 if test "X$x" = "X$dir"; then 841 haveit=yes 842 break 843 fi 844 done 845 if test -z "$haveit"; then 846 rpathdirs="$rpathdirs $dir" 847 fi 848 dnl Potentially add DIR to ltrpathdirs. 849 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 850 haveit= 851 for x in $ltrpathdirs; do 852 if test "X$x" = "X$dir"; then 853 haveit=yes 854 break 855 fi 856 done 857 if test -z "$haveit"; then 858 ltrpathdirs="$ltrpathdirs $dir" 859 fi 860 fi 861 ;; 862 -l*) 863 dnl Handle this in the next round. 864 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` 865 ;; 866 *.la) 867 dnl Handle this in the next round. Throw away the .la's 868 dnl directory; it is already contained in a preceding -L 869 dnl option. 870 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` 871 ;; 872 *) 873 dnl Most likely an immediate library name. 874 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" 875 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" 876 ;; 877 esac 878 done 879 fi 880 else 881 dnl Didn't find the library; assume it is in the system directories 882 dnl known to the linker and runtime loader. (All the system 883 dnl directories known to the linker should also be known to the 884 dnl runtime loader, otherwise the system is severely misconfigured.) 885 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 886 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" 887 fi 888 fi 889 fi 890 done 891 done 892 if test "X$rpathdirs" != "X"; then 893 if test -n "$acl_hardcode_libdir_separator"; then 894 dnl Weird platform: only the last -rpath option counts, the user must 895 dnl pass all path elements in one option. We can arrange that for a 896 dnl single library, but not when more than one $LIBNAMEs are used. 897 alldirs= 898 for found_dir in $rpathdirs; do 899 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" 900 done 901 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. 902 acl_save_libdir="$libdir" 903 libdir="$alldirs" 904 eval flag=\"$acl_hardcode_libdir_flag_spec\" 905 libdir="$acl_save_libdir" 906 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 907 else 908 dnl The -rpath options are cumulative. 909 for found_dir in $rpathdirs; do 910 acl_save_libdir="$libdir" 911 libdir="$found_dir" 912 eval flag=\"$acl_hardcode_libdir_flag_spec\" 913 libdir="$acl_save_libdir" 914 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 915 done 916 fi 917 fi 918 if test "X$ltrpathdirs" != "X"; then 919 dnl When using libtool, the option that works for both libraries and 920 dnl executables is -R. The -R options are cumulative. 921 for found_dir in $ltrpathdirs; do 922 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" 923 done 924 fi 925 ]) 926 927 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, 928 dnl unless already present in VAR. 929 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes 930 dnl contains two or three consecutive elements that belong together. 931 AC_DEFUN([AC_LIB_APPENDTOVAR], 932 [ 933 for element in [$2]; do 934 haveit= 935 for x in $[$1]; do 936 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 937 if test "X$x" = "X$element"; then 938 haveit=yes 939 break 940 fi 941 done 942 if test -z "$haveit"; then 943 [$1]="${[$1]}${[$1]:+ }$element" 944 fi 945 done 946 ]) 947 948 dnl For those cases where a variable contains several -L and -l options 949 dnl referring to unknown libraries and directories, this macro determines the 950 dnl necessary additional linker options for the runtime path. 951 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) 952 dnl sets LDADDVAR to linker options needed together with LIBSVALUE. 953 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, 954 dnl otherwise linking without libtool is assumed. 955 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], 956 [ 957 AC_REQUIRE([AC_LIB_RPATH]) 958 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 959 $1= 960 if test "$enable_rpath" != no; then 961 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then 962 dnl Use an explicit option to hardcode directories into the resulting 963 dnl binary. 964 rpathdirs= 965 next= 966 for opt in $2; do 967 if test -n "$next"; then 968 dir="$next" 969 dnl No need to hardcode the standard /usr/lib. 970 if test "X$dir" != "X/usr/$acl_libdirstem"; then 971 rpathdirs="$rpathdirs $dir" 972 fi 973 next= 974 else 975 case $opt in 976 -L) next=yes ;; 977 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` 978 dnl No need to hardcode the standard /usr/lib. 979 if test "X$dir" != "X/usr/$acl_libdirstem"; then 980 rpathdirs="$rpathdirs $dir" 981 fi 982 next= ;; 983 *) next= ;; 984 esac 985 fi 986 done 987 if test "X$rpathdirs" != "X"; then 988 if test -n ""$3""; then 989 dnl libtool is used for linking. Use -R options. 990 for dir in $rpathdirs; do 991 $1="${$1}${$1:+ }-R$dir" 992 done 993 else 994 dnl The linker is used for linking directly. 995 if test -n "$acl_hardcode_libdir_separator"; then 996 dnl Weird platform: only the last -rpath option counts, the user 997 dnl must pass all path elements in one option. 998 alldirs= 999 for dir in $rpathdirs; do 1000 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" 1001 done 1002 acl_save_libdir="$libdir" 1003 libdir="$alldirs" 1004 eval flag=\"$acl_hardcode_libdir_flag_spec\" 1005 libdir="$acl_save_libdir" 1006 $1="$flag" 1007 else 1008 dnl The -rpath options are cumulative. 1009 for dir in $rpathdirs; do 1010 acl_save_libdir="$libdir" 1011 libdir="$dir" 1012 eval flag=\"$acl_hardcode_libdir_flag_spec\" 1013 libdir="$acl_save_libdir" 1014 $1="${$1}${$1:+ }$flag" 1015 done 1016 fi 1017 fi 1018 fi 1019 fi 1020 fi 1021 AC_SUBST([$1]) 1022 ]) 1023 1024 # lib-prefix.m4 serial 5 (gettext-0.15) 1025 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. 1026 dnl This file is free software; the Free Software Foundation 1027 dnl gives unlimited permission to copy and/or distribute it, 1028 dnl with or without modifications, as long as this notice is preserved. 1029 1030 dnl From Bruno Haible. 1031 1032 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and 1033 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't 1034 dnl require excessive bracketing. 1035 ifdef([AC_HELP_STRING], 1036 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], 1037 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) 1038 1039 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed 1040 dnl to access previously installed libraries. The basic assumption is that 1041 dnl a user will want packages to use other packages he previously installed 1042 dnl with the same --prefix option. 1043 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate 1044 dnl libraries, but is otherwise very convenient. 1045 AC_DEFUN([AC_LIB_PREFIX], 1046 [ 1047 AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) 1048 AC_REQUIRE([AC_PROG_CC]) 1049 AC_REQUIRE([AC_CANONICAL_HOST]) 1050 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 1051 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 1052 dnl By default, look in $includedir and $libdir. 1053 use_additional=yes 1054 AC_LIB_WITH_FINAL_PREFIX([ 1055 eval additional_includedir=\"$includedir\" 1056 eval additional_libdir=\"$libdir\" 1057 ]) 1058 AC_LIB_ARG_WITH([lib-prefix], 1059 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib 1060 --without-lib-prefix don't search for libraries in includedir and libdir], 1061 [ 1062 if test "X$withval" = "Xno"; then 1063 use_additional=no 1064 else 1065 if test "X$withval" = "X"; then 1066 AC_LIB_WITH_FINAL_PREFIX([ 1067 eval additional_includedir=\"$includedir\" 1068 eval additional_libdir=\"$libdir\" 1069 ]) 1070 else 1071 additional_includedir="$withval/include" 1072 additional_libdir="$withval/$acl_libdirstem" 1073 fi 1074 fi 1075 ]) 1076 if test $use_additional = yes; then 1077 dnl Potentially add $additional_includedir to $CPPFLAGS. 1078 dnl But don't add it 1079 dnl 1. if it's the standard /usr/include, 1080 dnl 2. if it's already present in $CPPFLAGS, 1081 dnl 3. if it's /usr/local/include and we are using GCC on Linux, 1082 dnl 4. if it doesn't exist as a directory. 1083 if test "X$additional_includedir" != "X/usr/include"; then 1084 haveit= 1085 for x in $CPPFLAGS; do 1086 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1087 if test "X$x" = "X-I$additional_includedir"; then 1088 haveit=yes 1089 break 1090 fi 1091 done 1092 if test -z "$haveit"; then 1093 if test "X$additional_includedir" = "X/usr/local/include"; then 1094 if test -n "$GCC"; then 1095 case $host_os in 1096 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 1097 esac 1098 fi 1099 fi 1100 if test -z "$haveit"; then 1101 if test -d "$additional_includedir"; then 1102 dnl Really add $additional_includedir to $CPPFLAGS. 1103 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" 1104 fi 1105 fi 1106 fi 1107 fi 1108 dnl Potentially add $additional_libdir to $LDFLAGS. 1109 dnl But don't add it 1110 dnl 1. if it's the standard /usr/lib, 1111 dnl 2. if it's already present in $LDFLAGS, 1112 dnl 3. if it's /usr/local/lib and we are using GCC on Linux, 1113 dnl 4. if it doesn't exist as a directory. 1114 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then 1115 haveit= 1116 for x in $LDFLAGS; do 1117 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1118 if test "X$x" = "X-L$additional_libdir"; then 1119 haveit=yes 1120 break 1121 fi 1122 done 1123 if test -z "$haveit"; then 1124 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then 1125 if test -n "$GCC"; then 1126 case $host_os in 1127 linux*) haveit=yes;; 1128 esac 1129 fi 1130 fi 1131 if test -z "$haveit"; then 1132 if test -d "$additional_libdir"; then 1133 dnl Really add $additional_libdir to $LDFLAGS. 1134 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" 1135 fi 1136 fi 1137 fi 1138 fi 1139 fi 1140 ]) 1141 1142 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, 1143 dnl acl_final_exec_prefix, containing the values to which $prefix and 1144 dnl $exec_prefix will expand at the end of the configure script. 1145 AC_DEFUN([AC_LIB_PREPARE_PREFIX], 1146 [ 1147 dnl Unfortunately, prefix and exec_prefix get only finally determined 1148 dnl at the end of configure. 1149 if test "X$prefix" = "XNONE"; then 1150 acl_final_prefix="$ac_default_prefix" 1151 else 1152 acl_final_prefix="$prefix" 1153 fi 1154 if test "X$exec_prefix" = "XNONE"; then 1155 acl_final_exec_prefix='${prefix}' 1156 else 1157 acl_final_exec_prefix="$exec_prefix" 1158 fi 1159 acl_save_prefix="$prefix" 1160 prefix="$acl_final_prefix" 1161 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" 1162 prefix="$acl_save_prefix" 1163 ]) 1164 1165 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the 1166 dnl variables prefix and exec_prefix bound to the values they will have 1167 dnl at the end of the configure script. 1168 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], 1169 [ 1170 acl_save_prefix="$prefix" 1171 prefix="$acl_final_prefix" 1172 acl_save_exec_prefix="$exec_prefix" 1173 exec_prefix="$acl_final_exec_prefix" 1174 $1 1175 exec_prefix="$acl_save_exec_prefix" 1176 prefix="$acl_save_prefix" 1177 ]) 1178 1179 dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing 1180 dnl the basename of the libdir, either "lib" or "lib64". 1181 AC_DEFUN([AC_LIB_PREPARE_MULTILIB], 1182 [ 1183 dnl There is no formal standard regarding lib and lib64. The current 1184 dnl practice is that on a system supporting 32-bit and 64-bit instruction 1185 dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit 1186 dnl libraries go under $prefix/lib. We determine the compiler's default 1187 dnl mode by looking at the compiler's library search path. If at least 1188 dnl of its elements ends in /lib64 or points to a directory whose absolute 1189 dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the 1190 dnl default, namely "lib". 1191 acl_libdirstem=lib 1192 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` 1193 if test -n "$searchpath"; then 1194 acl_save_IFS="${IFS= }"; IFS=":" 1195 for searchdir in $searchpath; do 1196 if test -d "$searchdir"; then 1197 case "$searchdir" in 1198 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; 1199 *) searchdir=`cd "$searchdir" && pwd` 1200 case "$searchdir" in 1201 */lib64 ) acl_libdirstem=lib64 ;; 1202 esac ;; 1203 esac 1204 fi 1205 done 1206 IFS="$acl_save_IFS" 1207 fi 1208 ]) 1209 1210 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 1211 # 1212 # This file is free software; the Free Software Foundation 1213 # gives unlimited permission to copy and/or distribute it, 1214 # with or without modifications, as long as this notice is preserved. 1215 1216 # AM_AUTOMAKE_VERSION(VERSION) 1217 # ---------------------------- 1218 # Automake X.Y traces this macro to ensure aclocal.m4 has been 1219 # generated from the m4 files accompanying Automake X.Y. 1220 # (This private macro should not be called outside this file.) 1221 AC_DEFUN([AM_AUTOMAKE_VERSION], 1222 [am__api_version='1.11' 1223 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 1224 dnl require some minimum version. Point them to the right macro. 1225 m4_if([$1], [1.11], [], 1226 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 1227 ]) 1228 1229 # _AM_AUTOCONF_VERSION(VERSION) 1230 # ----------------------------- 1231 # aclocal traces this macro to find the Autoconf version. 1232 # This is a private macro too. Using m4_define simplifies 1233 # the logic in aclocal, which can simply ignore this definition. 1234 m4_define([_AM_AUTOCONF_VERSION], []) 1235 1236 # AM_SET_CURRENT_AUTOMAKE_VERSION 1237 # ------------------------------- 1238 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 1239 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 1240 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1241 [AM_AUTOMAKE_VERSION([1.11])dnl 1242 m4_ifndef([AC_AUTOCONF_VERSION], 1243 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1244 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 1245 1246 # AM_AUX_DIR_EXPAND -*- Autoconf -*- 1247 1248 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 1249 # 1250 # This file is free software; the Free Software Foundation 1251 # gives unlimited permission to copy and/or distribute it, 1252 # with or without modifications, as long as this notice is preserved. 1253 1254 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 1255 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 1256 # `$srcdir', `$srcdir/..', or `$srcdir/../..'. 1257 # 1258 # Of course, Automake must honor this variable whenever it calls a 1259 # tool from the auxiliary directory. The problem is that $srcdir (and 1260 # therefore $ac_aux_dir as well) can be either absolute or relative, 1261 # depending on how configure is run. This is pretty annoying, since 1262 # it makes $ac_aux_dir quite unusable in subdirectories: in the top 1263 # source directory, any form will work fine, but in subdirectories a 1264 # relative path needs to be adjusted first. 1265 # 1266 # $ac_aux_dir/missing 1267 # fails when called from a subdirectory if $ac_aux_dir is relative 1268 # $top_srcdir/$ac_aux_dir/missing 1269 # fails if $ac_aux_dir is absolute, 1270 # fails when called from a subdirectory in a VPATH build with 1271 # a relative $ac_aux_dir 1272 # 1273 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir 1274 # are both prefixed by $srcdir. In an in-source build this is usually 1275 # harmless because $srcdir is `.', but things will broke when you 1276 # start a VPATH build or use an absolute $srcdir. 1277 # 1278 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 1279 # iff we strip the leading $srcdir from $ac_aux_dir. That would be: 1280 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 1281 # and then we would define $MISSING as 1282 # MISSING="\${SHELL} $am_aux_dir/missing" 1283 # This will work as long as MISSING is not called from configure, because 1284 # unfortunately $(top_srcdir) has no meaning in configure. 1285 # However there are other variables, like CC, which are often used in 1286 # configure, and could therefore not use this "fixed" $ac_aux_dir. 1287 # 1288 # Another solution, used here, is to always expand $ac_aux_dir to an 1289 # absolute PATH. The drawback is that using absolute paths prevent a 1290 # configured tree to be moved without reconfiguration. 1291 1292 AC_DEFUN([AM_AUX_DIR_EXPAND], 1293 [dnl Rely on autoconf to set up CDPATH properly. 1294 AC_PREREQ([2.50])dnl 1295 # expand $ac_aux_dir to an absolute path 1296 am_aux_dir=`cd $ac_aux_dir && pwd` 1297 ]) 1298 1299 # AM_CONDITIONAL -*- Autoconf -*- 1300 1301 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 1302 # Free Software Foundation, Inc. 1303 # 1304 # This file is free software; the Free Software Foundation 1305 # gives unlimited permission to copy and/or distribute it, 1306 # with or without modifications, as long as this notice is preserved. 1307 1308 # serial 9 1309 1310 # AM_CONDITIONAL(NAME, SHELL-CONDITION) 1311 # ------------------------------------- 1312 # Define a conditional. 1313 AC_DEFUN([AM_CONDITIONAL], 1314 [AC_PREREQ(2.52)dnl 1315 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1316 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1317 AC_SUBST([$1_TRUE])dnl 1318 AC_SUBST([$1_FALSE])dnl 1319 _AM_SUBST_NOTMAKE([$1_TRUE])dnl 1320 _AM_SUBST_NOTMAKE([$1_FALSE])dnl 1321 m4_define([_AM_COND_VALUE_$1], [$2])dnl 1322 if $2; then 1323 $1_TRUE= 1324 $1_FALSE='#' 1325 else 1326 $1_TRUE='#' 1327 $1_FALSE= 1328 fi 1329 AC_CONFIG_COMMANDS_PRE( 1330 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1331 AC_MSG_ERROR([[conditional "$1" was never defined. 1332 Usually this means the macro was only invoked conditionally.]]) 1333 fi])]) 1334 1335 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 1336 # Free Software Foundation, Inc. 1337 # 1338 # This file is free software; the Free Software Foundation 1339 # gives unlimited permission to copy and/or distribute it, 1340 # with or without modifications, as long as this notice is preserved. 1341 1342 # serial 10 1343 1344 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 1345 # written in clear, in which case automake, when reading aclocal.m4, 1346 # will think it sees a *use*, and therefore will trigger all it's 1347 # C support machinery. Also note that it means that autoscan, seeing 1348 # CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1349 1350 1351 # _AM_DEPENDENCIES(NAME) 1352 # ---------------------- 1353 # See how the compiler implements dependency checking. 1354 # NAME is "CC", "CXX", "GCJ", or "OBJC". 1355 # We try a few techniques and use that to set a single cache variable. 1356 # 1357 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1358 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1359 # dependency, and given that the user is not expected to run this macro, 1360 # just rely on AC_PROG_CC. 1361 AC_DEFUN([_AM_DEPENDENCIES], 1362 [AC_REQUIRE([AM_SET_DEPDIR])dnl 1363 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1364 AC_REQUIRE([AM_MAKE_INCLUDE])dnl 1365 AC_REQUIRE([AM_DEP_TRACK])dnl 1366 1367 ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 1368 [$1], CXX, [depcc="$CXX" am_compiler_list=], 1369 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1370 [$1], UPC, [depcc="$UPC" am_compiler_list=], 1371 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1372 [depcc="$$1" am_compiler_list=]) 1373 1374 AC_CACHE_CHECK([dependency style of $depcc], 1375 [am_cv_$1_dependencies_compiler_type], 1376 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1377 # We make a subdir and do the tests there. Otherwise we can end up 1378 # making bogus files that we don't know about and never remove. For 1379 # instance it was reported that on HP-UX the gcc test will end up 1380 # making a dummy file named `D' -- because `-MD' means `put the output 1381 # in D'. 1382 mkdir conftest.dir 1383 # Copy depcomp to subdir because otherwise we won't find it if we're 1384 # using a relative directory. 1385 cp "$am_depcomp" conftest.dir 1386 cd conftest.dir 1387 # We will build objects and dependencies in a subdirectory because 1388 # it helps to detect inapplicable dependency modes. For instance 1389 # both Tru64's cc and ICC support -MD to output dependencies as a 1390 # side effect of compilation, but ICC will put the dependencies in 1391 # the current directory while Tru64 will put them in the object 1392 # directory. 1393 mkdir sub 1394 1395 am_cv_$1_dependencies_compiler_type=none 1396 if test "$am_compiler_list" = ""; then 1397 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 1398 fi 1399 am__universal=false 1400 m4_case([$1], [CC], 1401 [case " $depcc " in #( 1402 *\ -arch\ *\ -arch\ *) am__universal=true ;; 1403 esac], 1404 [CXX], 1405 [case " $depcc " in #( 1406 *\ -arch\ *\ -arch\ *) am__universal=true ;; 1407 esac]) 1408 1409 for depmode in $am_compiler_list; do 1410 # Setup a source with many dependencies, because some compilers 1411 # like to wrap large dependency lists on column 80 (with \), and 1412 # we should not choose a depcomp mode which is confused by this. 1413 # 1414 # We need to recreate these files for each test, as the compiler may 1415 # overwrite some of them when testing with obscure command lines. 1416 # This happens at least with the AIX C compiler. 1417 : > sub/conftest.c 1418 for i in 1 2 3 4 5 6; do 1419 echo '#include "conftst'$i'.h"' >> sub/conftest.c 1420 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 1421 # Solaris 8's {/usr,}/bin/sh. 1422 touch sub/conftst$i.h 1423 done 1424 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1425 1426 # We check with `-c' and `-o' for the sake of the "dashmstdout" 1427 # mode. It turns out that the SunPro C++ compiler does not properly 1428 # handle `-M -o', and we need to detect this. Also, some Intel 1429 # versions had trouble with output in subdirs 1430 am__obj=sub/conftest.${OBJEXT-o} 1431 am__minus_obj="-o $am__obj" 1432 case $depmode in 1433 gcc) 1434 # This depmode causes a compiler race in universal mode. 1435 test "$am__universal" = false || continue 1436 ;; 1437 nosideeffect) 1438 # after this tag, mechanisms are not by side-effect, so they'll 1439 # only be used when explicitly requested 1440 if test "x$enable_dependency_tracking" = xyes; then 1441 continue 1442 else 1443 break 1444 fi 1445 ;; 1446 msvisualcpp | msvcmsys) 1447 # This compiler won't grok `-c -o', but also, the minuso test has 1448 # not run yet. These depmodes are late enough in the game, and 1449 # so weak that their functioning should not be impacted. 1450 am__obj=conftest.${OBJEXT-o} 1451 am__minus_obj= 1452 ;; 1453 none) break ;; 1454 esac 1455 if depmode=$depmode \ 1456 source=sub/conftest.c object=$am__obj \ 1457 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 1458 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1459 >/dev/null 2>conftest.err && 1460 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1461 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 1462 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1463 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1464 # icc doesn't choke on unknown options, it will just issue warnings 1465 # or remarks (even with -Werror). So we grep stderr for any message 1466 # that says an option was ignored or not supported. 1467 # When given -MP, icc 7.0 and 7.1 complain thusly: 1468 # icc: Command line warning: ignoring option '-M'; no argument required 1469 # The diagnosis changed in icc 8.0: 1470 # icc: Command line remark: option '-MP' not supported 1471 if (grep 'ignoring option' conftest.err || 1472 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1473 am_cv_$1_dependencies_compiler_type=$depmode 1474 break 1475 fi 1476 fi 1477 done 1478 1479 cd .. 1480 rm -rf conftest.dir 1481 else 1482 am_cv_$1_dependencies_compiler_type=none 1483 fi 1484 ]) 1485 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1486 AM_CONDITIONAL([am__fastdep$1], [ 1487 test "x$enable_dependency_tracking" != xno \ 1488 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1489 ]) 1490 1491 1492 # AM_SET_DEPDIR 1493 # ------------- 1494 # Choose a directory name for dependency files. 1495 # This macro is AC_REQUIREd in _AM_DEPENDENCIES 1496 AC_DEFUN([AM_SET_DEPDIR], 1497 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1498 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1499 ]) 1500 1501 1502 # AM_DEP_TRACK 1503 # ------------ 1504 AC_DEFUN([AM_DEP_TRACK], 1505 [AC_ARG_ENABLE(dependency-tracking, 1506 [ --disable-dependency-tracking speeds up one-time build 1507 --enable-dependency-tracking do not reject slow dependency extractors]) 1508 if test "x$enable_dependency_tracking" != xno; then 1509 am_depcomp="$ac_aux_dir/depcomp" 1510 AMDEPBACKSLASH='\' 1511 fi 1512 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1513 AC_SUBST([AMDEPBACKSLASH])dnl 1514 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1515 ]) 1516 1517 # Generate code to set up dependency tracking. -*- Autoconf -*- 1518 1519 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 1520 # 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 #serial 5 1527 1528 # _AM_OUTPUT_DEPENDENCY_COMMANDS 1529 # ------------------------------ 1530 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 1531 [{ 1532 # Autoconf 2.62 quotes --file arguments for eval, but not when files 1533 # are listed without --file. Let's play safe and only enable the eval 1534 # if we detect the quoting. 1535 case $CONFIG_FILES in 1536 *\'*) eval set x "$CONFIG_FILES" ;; 1537 *) set x $CONFIG_FILES ;; 1538 esac 1539 shift 1540 for mf 1541 do 1542 # Strip MF so we end up with the name of the file. 1543 mf=`echo "$mf" | sed -e 's/:.*$//'` 1544 # Check whether this is an Automake generated Makefile or not. 1545 # We used to match only the files named `Makefile.in', but 1546 # some people rename them; so instead we look at the file content. 1547 # Grep'ing the first line is not enough: some people post-process 1548 # each Makefile.in and add a new line on top of each file to say so. 1549 # Grep'ing the whole file is not good either: AIX grep has a line 1550 # limit of 2048, but all sed's we know have understand at least 4000. 1551 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 1552 dirpart=`AS_DIRNAME("$mf")` 1553 else 1554 continue 1555 fi 1556 # Extract the definition of DEPDIR, am__include, and am__quote 1557 # from the Makefile without running `make'. 1558 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 1559 test -z "$DEPDIR" && continue 1560 am__include=`sed -n 's/^am__include = //p' < "$mf"` 1561 test -z "am__include" && continue 1562 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 1563 # When using ansi2knr, U may be empty or an underscore; expand it 1564 U=`sed -n 's/^U = //p' < "$mf"` 1565 # Find all dependency output files, they are included files with 1566 # $(DEPDIR) in their names. We invoke sed twice because it is the 1567 # simplest approach to changing $(DEPDIR) to its actual value in the 1568 # expansion. 1569 for file in `sed -n " 1570 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 1571 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 1572 # Make sure the directory exists. 1573 test -f "$dirpart/$file" && continue 1574 fdir=`AS_DIRNAME(["$file"])` 1575 AS_MKDIR_P([$dirpart/$fdir]) 1576 # echo "creating $dirpart/$file" 1577 echo '# dummy' > "$dirpart/$file" 1578 done 1579 done 1580 } 1581 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1582 1583 1584 # AM_OUTPUT_DEPENDENCY_COMMANDS 1585 # ----------------------------- 1586 # This macro should only be invoked once -- use via AC_REQUIRE. 1587 # 1588 # This code is only required when automatic dependency tracking 1589 # is enabled. FIXME. This creates each `.P' file that we will 1590 # need in order to bootstrap the dependency handling code. 1591 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1592 [AC_CONFIG_COMMANDS([depfiles], 1593 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1594 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 1595 ]) 1596 1597 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 1598 # Free Software Foundation, Inc. 1599 # 1600 # This file is free software; the Free Software Foundation 1601 # gives unlimited permission to copy and/or distribute it, 1602 # with or without modifications, as long as this notice is preserved. 1603 1604 # serial 8 1605 1606 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 1607 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 1608 1609 # Do all the work for Automake. -*- Autoconf -*- 1610 1611 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 1612 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 1613 # 1614 # This file is free software; the Free Software Foundation 1615 # gives unlimited permission to copy and/or distribute it, 1616 # with or without modifications, as long as this notice is preserved. 1617 1618 # serial 16 1619 1620 # This macro actually does too much. Some checks are only needed if 1621 # your package does certain things. But this isn't really a big deal. 1622 1623 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1624 # AM_INIT_AUTOMAKE([OPTIONS]) 1625 # ----------------------------------------------- 1626 # The call with PACKAGE and VERSION arguments is the old style 1627 # call (pre autoconf-2.50), which is being phased out. PACKAGE 1628 # and VERSION should now be passed to AC_INIT and removed from 1629 # the call to AM_INIT_AUTOMAKE. 1630 # We support both call styles for the transition. After 1631 # the next Automake release, Autoconf can make the AC_INIT 1632 # arguments mandatory, and then we can depend on a new Autoconf 1633 # release and drop the old call support. 1634 AC_DEFUN([AM_INIT_AUTOMAKE], 1635 [AC_PREREQ([2.62])dnl 1636 dnl Autoconf wants to disallow AM_ names. We explicitly allow 1637 dnl the ones we care about. 1638 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1639 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1640 AC_REQUIRE([AC_PROG_INSTALL])dnl 1641 if test "`cd $srcdir && pwd`" != "`pwd`"; then 1642 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1643 # is not polluted with repeated "-I." 1644 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1645 # test to see if srcdir already configured 1646 if test -f $srcdir/config.status; then 1647 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1648 fi 1649 fi 1650 1651 # test whether we have cygpath 1652 if test -z "$CYGPATH_W"; then 1653 if (cygpath --version) >/dev/null 2>/dev/null; then 1654 CYGPATH_W='cygpath -w' 1655 else 1656 CYGPATH_W=echo 1657 fi 1658 fi 1659 AC_SUBST([CYGPATH_W]) 1660 1661 # Define the identity of the package. 1662 dnl Distinguish between old-style and new-style calls. 1663 m4_ifval([$2], 1664 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1665 AC_SUBST([PACKAGE], [$1])dnl 1666 AC_SUBST([VERSION], [$2])], 1667 [_AM_SET_OPTIONS([$1])dnl 1668 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1669 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 1670 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1671 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1672 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1673 1674 _AM_IF_OPTION([no-define],, 1675 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 1676 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 1677 1678 # Some tools Automake needs. 1679 AC_REQUIRE([AM_SANITY_CHECK])dnl 1680 AC_REQUIRE([AC_ARG_PROGRAM])dnl 1681 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 1682 AM_MISSING_PROG(AUTOCONF, autoconf) 1683 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 1684 AM_MISSING_PROG(AUTOHEADER, autoheader) 1685 AM_MISSING_PROG(MAKEINFO, makeinfo) 1686 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1687 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1688 AC_REQUIRE([AM_PROG_MKDIR_P])dnl 1689 # We need awk for the "check" target. The system "awk" is bad on 1690 # some platforms. 1691 AC_REQUIRE([AC_PROG_AWK])dnl 1692 AC_REQUIRE([AC_PROG_MAKE_SET])dnl 1693 AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1694 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1695 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1696 [_AM_PROG_TAR([v7])])]) 1697 _AM_IF_OPTION([no-dependencies],, 1698 [AC_PROVIDE_IFELSE([AC_PROG_CC], 1699 [_AM_DEPENDENCIES(CC)], 1700 [define([AC_PROG_CC], 1701 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 1702 AC_PROVIDE_IFELSE([AC_PROG_CXX], 1703 [_AM_DEPENDENCIES(CXX)], 1704 [define([AC_PROG_CXX], 1705 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 1706 AC_PROVIDE_IFELSE([AC_PROG_OBJC], 1707 [_AM_DEPENDENCIES(OBJC)], 1708 [define([AC_PROG_OBJC], 1709 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 1710 ]) 1711 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 1712 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the 1713 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 1714 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 1715 AC_CONFIG_COMMANDS_PRE(dnl 1716 [m4_provide_if([_AM_COMPILER_EXEEXT], 1717 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1718 ]) 1719 1720 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 1721 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 1722 dnl mangled by Autoconf and run in a shell conditional statement. 1723 m4_define([_AC_COMPILER_EXEEXT], 1724 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1725 1726 1727 # When config.status generates a header, we must update the stamp-h file. 1728 # This file resides in the same directory as the config header 1729 # that is generated. The stamp files are numbered to have different names. 1730 1731 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1732 # loop where config.status creates the headers, so we can generate 1733 # our stamp files there. 1734 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1735 [# Compute $1's index in $config_headers. 1736 _am_arg=$1 1737 _am_stamp_count=1 1738 for _am_header in $config_headers :; do 1739 case $_am_header in 1740 $_am_arg | $_am_arg:* ) 1741 break ;; 1742 * ) 1743 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1744 esac 1745 done 1746 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1747 1748 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 1749 # 1750 # This file is free software; the Free Software Foundation 1751 # gives unlimited permission to copy and/or distribute it, 1752 # with or without modifications, as long as this notice is preserved. 1753 1754 # AM_PROG_INSTALL_SH 1755 # ------------------ 1756 # Define $install_sh. 1757 AC_DEFUN([AM_PROG_INSTALL_SH], 1758 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1759 if test x"${install_sh}" != xset; then 1760 case $am_aux_dir in 1761 *\ * | *\ *) 1762 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 1763 *) 1764 install_sh="\${SHELL} $am_aux_dir/install-sh" 1765 esac 1766 fi 1767 AC_SUBST(install_sh)]) 1768 1769 # Copyright (C) 2003, 2005 Free Software Foundation, Inc. 1770 # 1771 # This file is free software; the Free Software Foundation 1772 # gives unlimited permission to copy and/or distribute it, 1773 # with or without modifications, as long as this notice is preserved. 1774 1775 # serial 2 1776 1777 # Check whether the underlying file-system supports filenames 1778 # with a leading dot. For instance MS-DOS doesn't. 1779 AC_DEFUN([AM_SET_LEADING_DOT], 1780 [rm -rf .tst 2>/dev/null 1781 mkdir .tst 2>/dev/null 1782 if test -d .tst; then 1783 am__leading_dot=. 1784 else 1785 am__leading_dot=_ 1786 fi 1787 rmdir .tst 2>/dev/null 1788 AC_SUBST([am__leading_dot])]) 1789 1790 # Check to see how 'make' treats includes. -*- Autoconf -*- 1791 1792 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 1793 # 1794 # This file is free software; the Free Software Foundation 1795 # gives unlimited permission to copy and/or distribute it, 1796 # with or without modifications, as long as this notice is preserved. 1797 1798 # serial 4 1799 1800 # AM_MAKE_INCLUDE() 1801 # ----------------- 1802 # Check to see how make treats includes. 1803 AC_DEFUN([AM_MAKE_INCLUDE], 1804 [am_make=${MAKE-make} 1805 cat > confinc << 'END' 1806 am__doit: 1807 @echo this is the am__doit target 1808 .PHONY: am__doit 1809 END 1810 # If we don't find an include directive, just comment out the code. 1811 AC_MSG_CHECKING([for style of include used by $am_make]) 1812 am__include="#" 1813 am__quote= 1814 _am_result=none 1815 # First try GNU make style include. 1816 echo "include confinc" > confmf 1817 # Ignore all kinds of additional output from `make'. 1818 case `$am_make -s -f confmf 2> /dev/null` in #( 1819 *the\ am__doit\ target*) 1820 am__include=include 1821 am__quote= 1822 _am_result=GNU 1823 ;; 1824 esac 1825 # Now try BSD make style include. 1826 if test "$am__include" = "#"; then 1827 echo '.include "confinc"' > confmf 1828 case `$am_make -s -f confmf 2> /dev/null` in #( 1829 *the\ am__doit\ target*) 1830 am__include=.include 1831 am__quote="\"" 1832 _am_result=BSD 1833 ;; 1834 esac 1835 fi 1836 AC_SUBST([am__include]) 1837 AC_SUBST([am__quote]) 1838 AC_MSG_RESULT([$_am_result]) 1839 rm -f confinc confmf 1840 ]) 1841 1842 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1843 1844 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 1845 # Free Software Foundation, Inc. 1846 # 1847 # This file is free software; the Free Software Foundation 1848 # gives unlimited permission to copy and/or distribute it, 1849 # with or without modifications, as long as this notice is preserved. 1850 1851 # serial 6 1852 1853 # AM_MISSING_PROG(NAME, PROGRAM) 1854 # ------------------------------ 1855 AC_DEFUN([AM_MISSING_PROG], 1856 [AC_REQUIRE([AM_MISSING_HAS_RUN]) 1857 $1=${$1-"${am_missing_run}$2"} 1858 AC_SUBST($1)]) 1859 1860 1861 # AM_MISSING_HAS_RUN 1862 # ------------------ 1863 # Define MISSING if not defined so far and test if it supports --run. 1864 # If it does, set am_missing_run to use it, otherwise, to nothing. 1865 AC_DEFUN([AM_MISSING_HAS_RUN], 1866 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1867 AC_REQUIRE_AUX_FILE([missing])dnl 1868 if test x"${MISSING+set}" != xset; then 1869 case $am_aux_dir in 1870 *\ * | *\ *) 1871 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 1872 *) 1873 MISSING="\${SHELL} $am_aux_dir/missing" ;; 1874 esac 1875 fi 1876 # Use eval to expand $SHELL 1877 if eval "$MISSING --run true"; then 1878 am_missing_run="$MISSING --run " 1879 else 1880 am_missing_run= 1881 AC_MSG_WARN([`missing' script is too old or missing]) 1882 fi 1883 ]) 1884 1885 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 1886 # 1887 # This file is free software; the Free Software Foundation 1888 # gives unlimited permission to copy and/or distribute it, 1889 # with or without modifications, as long as this notice is preserved. 1890 1891 # AM_PROG_MKDIR_P 1892 # --------------- 1893 # Check for `mkdir -p'. 1894 AC_DEFUN([AM_PROG_MKDIR_P], 1895 [AC_PREREQ([2.60])dnl 1896 AC_REQUIRE([AC_PROG_MKDIR_P])dnl 1897 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 1898 dnl while keeping a definition of mkdir_p for backward compatibility. 1899 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 1900 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 1901 dnl Makefile.ins that do not define MKDIR_P, so we do our own 1902 dnl adjustment using top_builddir (which is defined more often than 1903 dnl MKDIR_P). 1904 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 1905 case $mkdir_p in 1906 [[\\/$]]* | ?:[[\\/]]*) ;; 1907 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 1908 esac 1909 ]) 1910 1911 # Helper functions for option handling. -*- Autoconf -*- 1912 1913 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 1914 # 1915 # This file is free software; the Free Software Foundation 1916 # gives unlimited permission to copy and/or distribute it, 1917 # with or without modifications, as long as this notice is preserved. 1918 1919 # serial 4 1920 1921 # _AM_MANGLE_OPTION(NAME) 1922 # ----------------------- 1923 AC_DEFUN([_AM_MANGLE_OPTION], 1924 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1925 1926 # _AM_SET_OPTION(NAME) 1927 # ------------------------------ 1928 # Set option NAME. Presently that only means defining a flag for this option. 1929 AC_DEFUN([_AM_SET_OPTION], 1930 [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1931 1932 # _AM_SET_OPTIONS(OPTIONS) 1933 # ---------------------------------- 1934 # OPTIONS is a space-separated list of Automake options. 1935 AC_DEFUN([_AM_SET_OPTIONS], 1936 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1937 1938 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1939 # ------------------------------------------- 1940 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1941 AC_DEFUN([_AM_IF_OPTION], 1942 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1943 1944 # Check to make sure that the build environment is sane. -*- Autoconf -*- 1945 1946 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 1947 # Free Software Foundation, Inc. 1948 # 1949 # This file is free software; the Free Software Foundation 1950 # gives unlimited permission to copy and/or distribute it, 1951 # with or without modifications, as long as this notice is preserved. 1952 1953 # serial 5 1954 1955 # AM_SANITY_CHECK 1956 # --------------- 1957 AC_DEFUN([AM_SANITY_CHECK], 1958 [AC_MSG_CHECKING([whether build environment is sane]) 1959 # Just in case 1960 sleep 1 1961 echo timestamp > conftest.file 1962 # Reject unsafe characters in $srcdir or the absolute working directory 1963 # name. Accept space and tab only in the latter. 1964 am_lf=' 1965 ' 1966 case `pwd` in 1967 *[[\\\"\#\$\&\'\`$am_lf]]*) 1968 AC_MSG_ERROR([unsafe absolute working directory name]);; 1969 esac 1970 case $srcdir in 1971 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1972 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 1973 esac 1974 1975 # Do `set' in a subshell so we don't clobber the current shell's 1976 # arguments. Must try -L first in case configure is actually a 1977 # symlink; some systems play weird games with the mod time of symlinks 1978 # (eg FreeBSD returns the mod time of the symlink's containing 1979 # directory). 1980 if ( 1981 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1982 if test "$[*]" = "X"; then 1983 # -L didn't work. 1984 set X `ls -t "$srcdir/configure" conftest.file` 1985 fi 1986 rm -f conftest.file 1987 if test "$[*]" != "X $srcdir/configure conftest.file" \ 1988 && test "$[*]" != "X conftest.file $srcdir/configure"; then 1989 1990 # If neither matched, then we have a broken ls. This can happen 1991 # if, for instance, CONFIG_SHELL is bash and it inherits a 1992 # broken ls alias from the environment. This has actually 1993 # happened. Such a system could not be considered "sane". 1994 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1995 alias in your environment]) 1996 fi 1997 1998 test "$[2]" = conftest.file 1999 ) 2000 then 2001 # Ok. 2002 : 2003 else 2004 AC_MSG_ERROR([newly created file is older than distributed files! 2005 Check your system clock]) 2006 fi 2007 AC_MSG_RESULT(yes)]) 2008 2009 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 2010 # 2011 # This file is free software; the Free Software Foundation 2012 # gives unlimited permission to copy and/or distribute it, 2013 # with or without modifications, as long as this notice is preserved. 2014 2015 # AM_PROG_INSTALL_STRIP 2016 # --------------------- 2017 # One issue with vendor `install' (even GNU) is that you can't 2018 # specify the program used to strip binaries. This is especially 2019 # annoying in cross-compiling environments, where the build's strip 2020 # is unlikely to handle the host's binaries. 2021 # Fortunately install-sh will honor a STRIPPROG variable, so we 2022 # always use install-sh in `make install-strip', and initialize 2023 # STRIPPROG with the value of the STRIP variable (set by the user). 2024 AC_DEFUN([AM_PROG_INSTALL_STRIP], 2025 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 2026 # Installed binaries are usually stripped using `strip' when the user 2027 # run `make install-strip'. However `strip' might not be the right 2028 # tool to use in cross-compilation environments, therefore Automake 2029 # will honor the `STRIP' environment variable to overrule this program. 2030 dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 2031 if test "$cross_compiling" != no; then 2032 AC_CHECK_TOOL([STRIP], [strip], :) 2033 fi 2034 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 2035 AC_SUBST([INSTALL_STRIP_PROGRAM])]) 2036 2037 # Copyright (C) 2006, 2008 Free Software Foundation, Inc. 2038 # 2039 # This file is free software; the Free Software Foundation 2040 # gives unlimited permission to copy and/or distribute it, 2041 # with or without modifications, as long as this notice is preserved. 2042 2043 # serial 2 2044 2045 # _AM_SUBST_NOTMAKE(VARIABLE) 2046 # --------------------------- 2047 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 2048 # This macro is traced by Automake. 2049 AC_DEFUN([_AM_SUBST_NOTMAKE]) 2050 2051 # AM_SUBST_NOTMAKE(VARIABLE) 2052 # --------------------------- 2053 # Public sister of _AM_SUBST_NOTMAKE. 2054 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 2055 2056 # Check how to create a tarball. -*- Autoconf -*- 2057 2058 # Copyright (C) 2004, 2005 Free Software Foundation, Inc. 2059 # 2060 # This file is free software; the Free Software Foundation 2061 # gives unlimited permission to copy and/or distribute it, 2062 # with or without modifications, as long as this notice is preserved. 2063 2064 # serial 2 2065 2066 # _AM_PROG_TAR(FORMAT) 2067 # -------------------- 2068 # Check how to create a tarball in format FORMAT. 2069 # FORMAT should be one of `v7', `ustar', or `pax'. 2070 # 2071 # Substitute a variable $(am__tar) that is a command 2072 # writing to stdout a FORMAT-tarball containing the directory 2073 # $tardir. 2074 # tardir=directory && $(am__tar) > result.tar 2075 # 2076 # Substitute a variable $(am__untar) that extract such 2077 # a tarball read from stdin. 2078 # $(am__untar) < result.tar 2079 AC_DEFUN([_AM_PROG_TAR], 2080 [# Always define AMTAR for backward compatibility. 2081 AM_MISSING_PROG([AMTAR], [tar]) 2082 m4_if([$1], [v7], 2083 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 2084 [m4_case([$1], [ustar],, [pax],, 2085 [m4_fatal([Unknown tar format])]) 2086 AC_MSG_CHECKING([how to create a $1 tar archive]) 2087 # Loop over all known methods to create a tar archive until one works. 2088 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 2089 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 2090 # Do not fold the above two line into one, because Tru64 sh and 2091 # Solaris sh will not grok spaces in the rhs of `-'. 2092 for _am_tool in $_am_tools 2093 do 2094 case $_am_tool in 2095 gnutar) 2096 for _am_tar in tar gnutar gtar; 2097 do 2098 AM_RUN_LOG([$_am_tar --version]) && break 2099 done 2100 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 2101 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 2102 am__untar="$_am_tar -xf -" 2103 ;; 2104 plaintar) 2105 # Must skip GNU tar: if it does not support --format= it doesn't create 2106 # ustar tarball either. 2107 (tar --version) >/dev/null 2>&1 && continue 2108 am__tar='tar chf - "$$tardir"' 2109 am__tar_='tar chf - "$tardir"' 2110 am__untar='tar xf -' 2111 ;; 2112 pax) 2113 am__tar='pax -L -x $1 -w "$$tardir"' 2114 am__tar_='pax -L -x $1 -w "$tardir"' 2115 am__untar='pax -r' 2116 ;; 2117 cpio) 2118 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 2119 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 2120 am__untar='cpio -i -H $1 -d' 2121 ;; 2122 none) 2123 am__tar=false 2124 am__tar_=false 2125 am__untar=false 2126 ;; 2127 esac 2128 2129 # If the value was cached, stop now. We just wanted to have am__tar 2130 # and am__untar set. 2131 test -n "${am_cv_prog_tar_$1}" && break 2132 2133 # tar/untar a dummy directory, and stop if the command works 2134 rm -rf conftest.dir 2135 mkdir conftest.dir 2136 echo GrepMe > conftest.dir/file 2137 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 2138 rm -rf conftest.dir 2139 if test -s conftest.tar; then 2140 AM_RUN_LOG([$am__untar <conftest.tar]) 2141 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 2142 fi 2143 done 2144 rm -rf conftest.dir 2145 2146 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 2147 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 2148 AC_SUBST([am__tar]) 2149 AC_SUBST([am__untar]) 2150 ]) # _AM_PROG_TAR 2151 2152 m4_include([m4/byteorder.m4]) 2153 m4_include([m4/libtool.m4]) 2154 m4_include([m4/ltoptions.m4]) 2155 m4_include([m4/ltsugar.m4]) 2156 m4_include([m4/ltversion.m4]) 2157 m4_include([m4/lt~obsolete.m4]) 2158 m4_include([m4/stdint.m4]) 2159