1# generated automatically by aclocal 1.11.1 -*- 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 14m4_ifndef([AC_AUTOCONF_VERSION], 15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, 17[m4_warning([this file was generated for autoconf 2.65. 18You have another version of autoconf. It may work, but is not guaranteed to. 19If you have problems, you may need to regenerate the build system entirely. 20To do so, use the procedure documented by the package, typically `autoreconf'.])]) 21 22# iconv.m4 serial AM6 (gettext-0.17) 23dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. 24dnl This file is free software; the Free Software Foundation 25dnl gives unlimited permission to copy and/or distribute it, 26dnl with or without modifications, as long as this notice is preserved. 27 28dnl From Bruno Haible. 29 30AC_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 41AC_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> 90int 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 175AC_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> 184extern 185#ifdef __cplusplus 186"C" 187#endif 188#if defined(__STDC__) || defined(__cplusplus) 189size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); 190#else 191size_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) 204dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. 205dnl This file is free software; the Free Software Foundation 206dnl gives unlimited permission to copy and/or distribute it, 207dnl with or without modifications, as long as this notice is preserved. 208 209dnl Subroutines of libtool.m4, 210dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision 211dnl with libtool.m4. 212 213dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. 214AC_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. 217case `$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 ;; 222esac]) 223with_gnu_ld=$acl_cv_prog_gnu_ld 224]) 225 226dnl From libtool-1.4. Sets the variable LD. 227AC_DEFUN([AC_LIB_PROG_LD], 228[AC_ARG_WITH(gnu-ld, 229[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], 230test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) 231AC_REQUIRE([AC_PROG_CC])dnl 232AC_REQUIRE([AC_CANONICAL_HOST])dnl 233# Prepare PATH_SEPARATOR. 234# The user is always right. 235if 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 245fi 246ac_prog=ld 247if 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 277elif test "$with_gnu_ld" = yes; then 278 AC_MSG_CHECKING([for GNU ld]) 279else 280 AC_MSG_CHECKING([for non-GNU ld]) 281fi 282AC_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" 301else 302 acl_cv_path_LD="$LD" # Let the user override the test with a path. 303fi]) 304LD="$acl_cv_path_LD" 305if test -n "$LD"; then 306 AC_MSG_RESULT($LD) 307else 308 AC_MSG_RESULT(no) 309fi 310test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 311AC_LIB_PROG_LD_GNU 312]) 313 314# lib-link.m4 serial 13 (gettext-0.17) 315dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. 316dnl This file is free software; the Free Software Foundation 317dnl gives unlimited permission to copy and/or distribute it, 318dnl with or without modifications, as long as this notice is preserved. 319 320dnl From Bruno Haible. 321 322AC_PREREQ(2.54) 323 324dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and 325dnl the libraries corresponding to explicit and implicit dependencies. 326dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and 327dnl augments the CPPFLAGS variable. 328dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname 329dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 330AC_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 359dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) 360dnl searches for libname and the libraries corresponding to explicit and 361dnl implicit dependencies, together with the specified include files and 362dnl the ability to compile and link the specified testcode. If found, it 363dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and 364dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and 365dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs 366dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. 367dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname 368dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 369AC_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 415dnl Determine the platform dependent parameters needed to use rpath: 416dnl acl_libext, 417dnl acl_shlibext, 418dnl acl_hardcode_libdir_flag_spec, 419dnl acl_hardcode_libdir_separator, 420dnl acl_hardcode_direct, 421dnl acl_hardcode_minus_L. 422AC_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 452dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and 453dnl the libraries corresponding to explicit and implicit dependencies. 454dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. 455dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found 456dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 457AC_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 927dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, 928dnl unless already present in VAR. 929dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes 930dnl contains two or three consecutive elements that belong together. 931AC_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 948dnl For those cases where a variable contains several -L and -l options 949dnl referring to unknown libraries and directories, this macro determines the 950dnl necessary additional linker options for the runtime path. 951dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) 952dnl sets LDADDVAR to linker options needed together with LIBSVALUE. 953dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, 954dnl otherwise linking without libtool is assumed. 955AC_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) 1025dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. 1026dnl This file is free software; the Free Software Foundation 1027dnl gives unlimited permission to copy and/or distribute it, 1028dnl with or without modifications, as long as this notice is preserved. 1029 1030dnl From Bruno Haible. 1031 1032dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and 1033dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't 1034dnl require excessive bracketing. 1035ifdef([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 1039dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed 1040dnl to access previously installed libraries. The basic assumption is that 1041dnl a user will want packages to use other packages he previously installed 1042dnl with the same --prefix option. 1043dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate 1044dnl libraries, but is otherwise very convenient. 1045AC_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 1142dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, 1143dnl acl_final_exec_prefix, containing the values to which $prefix and 1144dnl $exec_prefix will expand at the end of the configure script. 1145AC_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 1165dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the 1166dnl variables prefix and exec_prefix bound to the values they will have 1167dnl at the end of the configure script. 1168AC_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 1179dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing 1180dnl the basename of the libdir, either "lib" or "lib64". 1181AC_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# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1211# 1212# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1213# 1214# This program is free software; you can redistribute it and/or modify 1215# it under the terms of the GNU General Public License as published by 1216# the Free Software Foundation; either version 2 of the License, or 1217# (at your option) any later version. 1218# 1219# This program is distributed in the hope that it will be useful, but 1220# WITHOUT ANY WARRANTY; without even the implied warranty of 1221# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1222# General Public License for more details. 1223# 1224# You should have received a copy of the GNU General Public License 1225# along with this program; if not, write to the Free Software 1226# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 1227# 1228# As a special exception to the GNU General Public License, if you 1229# distribute this file as part of a program that contains a 1230# configuration script generated by Autoconf, you may include it under 1231# the same distribution terms that you use for the rest of that program. 1232 1233# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1234# ---------------------------------- 1235AC_DEFUN([PKG_PROG_PKG_CONFIG], 1236[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1237m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 1238AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 1239if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1240 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1241fi 1242if test -n "$PKG_CONFIG"; then 1243 _pkg_min_version=m4_default([$1], [0.9.0]) 1244 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1245 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1246 AC_MSG_RESULT([yes]) 1247 else 1248 AC_MSG_RESULT([no]) 1249 PKG_CONFIG="" 1250 fi 1251 1252fi[]dnl 1253])# PKG_PROG_PKG_CONFIG 1254 1255# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1256# 1257# Check to see whether a particular set of modules exists. Similar 1258# to PKG_CHECK_MODULES(), but does not set variables or print errors. 1259# 1260# 1261# Similar to PKG_CHECK_MODULES, make sure that the first instance of 1262# this or PKG_CHECK_MODULES is called, or make sure to call 1263# PKG_CHECK_EXISTS manually 1264# -------------------------------------------------------------- 1265AC_DEFUN([PKG_CHECK_EXISTS], 1266[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1267if test -n "$PKG_CONFIG" && \ 1268 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1269 m4_ifval([$2], [$2], [:]) 1270m4_ifvaln([$3], [else 1271 $3])dnl 1272fi]) 1273 1274 1275# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1276# --------------------------------------------- 1277m4_define([_PKG_CONFIG], 1278[if test -n "$$1"; then 1279 pkg_cv_[]$1="$$1" 1280 elif test -n "$PKG_CONFIG"; then 1281 PKG_CHECK_EXISTS([$3], 1282 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 1283 [pkg_failed=yes]) 1284 else 1285 pkg_failed=untried 1286fi[]dnl 1287])# _PKG_CONFIG 1288 1289# _PKG_SHORT_ERRORS_SUPPORTED 1290# ----------------------------- 1291AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1292[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1293if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1294 _pkg_short_errors_supported=yes 1295else 1296 _pkg_short_errors_supported=no 1297fi[]dnl 1298])# _PKG_SHORT_ERRORS_SUPPORTED 1299 1300 1301# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1302# [ACTION-IF-NOT-FOUND]) 1303# 1304# 1305# Note that if there is a possibility the first call to 1306# PKG_CHECK_MODULES might not happen, you should be sure to include an 1307# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1308# 1309# 1310# -------------------------------------------------------------- 1311AC_DEFUN([PKG_CHECK_MODULES], 1312[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1313AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1314AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1315 1316pkg_failed=no 1317AC_MSG_CHECKING([for $1]) 1318 1319_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1320_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1321 1322m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1323and $1[]_LIBS to avoid the need to call pkg-config. 1324See the pkg-config man page for more details.]) 1325 1326if test $pkg_failed = yes; then 1327 _PKG_SHORT_ERRORS_SUPPORTED 1328 if test $_pkg_short_errors_supported = yes; then 1329 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 1330 else 1331 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 1332 fi 1333 # Put the nasty error message in config.log where it belongs 1334 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1335 1336 ifelse([$4], , [AC_MSG_ERROR(dnl 1337[Package requirements ($2) were not met: 1338 1339$$1_PKG_ERRORS 1340 1341Consider adjusting the PKG_CONFIG_PATH environment variable if you 1342installed software in a non-standard prefix. 1343 1344_PKG_TEXT 1345])], 1346 [AC_MSG_RESULT([no]) 1347 $4]) 1348elif test $pkg_failed = untried; then 1349 ifelse([$4], , [AC_MSG_FAILURE(dnl 1350[The pkg-config script could not be found or is too old. Make sure it 1351is in your PATH or set the PKG_CONFIG environment variable to the full 1352path to pkg-config. 1353 1354_PKG_TEXT 1355 1356To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 1357 [$4]) 1358else 1359 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1360 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1361 AC_MSG_RESULT([yes]) 1362 ifelse([$3], , :, [$3]) 1363fi[]dnl 1364])# PKG_CHECK_MODULES 1365 1366# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 1367# 1368# This file is free software; the Free Software Foundation 1369# gives unlimited permission to copy and/or distribute it, 1370# with or without modifications, as long as this notice is preserved. 1371 1372# AM_AUTOMAKE_VERSION(VERSION) 1373# ---------------------------- 1374# Automake X.Y traces this macro to ensure aclocal.m4 has been 1375# generated from the m4 files accompanying Automake X.Y. 1376# (This private macro should not be called outside this file.) 1377AC_DEFUN([AM_AUTOMAKE_VERSION], 1378[am__api_version='1.11' 1379dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 1380dnl require some minimum version. Point them to the right macro. 1381m4_if([$1], [1.11.1], [], 1382 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 1383]) 1384 1385# _AM_AUTOCONF_VERSION(VERSION) 1386# ----------------------------- 1387# aclocal traces this macro to find the Autoconf version. 1388# This is a private macro too. Using m4_define simplifies 1389# the logic in aclocal, which can simply ignore this definition. 1390m4_define([_AM_AUTOCONF_VERSION], []) 1391 1392# AM_SET_CURRENT_AUTOMAKE_VERSION 1393# ------------------------------- 1394# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 1395# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 1396AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1397[AM_AUTOMAKE_VERSION([1.11.1])dnl 1398m4_ifndef([AC_AUTOCONF_VERSION], 1399 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1400_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 1401 1402# AM_AUX_DIR_EXPAND -*- Autoconf -*- 1403 1404# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 1405# 1406# This file is free software; the Free Software Foundation 1407# gives unlimited permission to copy and/or distribute it, 1408# with or without modifications, as long as this notice is preserved. 1409 1410# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 1411# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 1412# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 1413# 1414# Of course, Automake must honor this variable whenever it calls a 1415# tool from the auxiliary directory. The problem is that $srcdir (and 1416# therefore $ac_aux_dir as well) can be either absolute or relative, 1417# depending on how configure is run. This is pretty annoying, since 1418# it makes $ac_aux_dir quite unusable in subdirectories: in the top 1419# source directory, any form will work fine, but in subdirectories a 1420# relative path needs to be adjusted first. 1421# 1422# $ac_aux_dir/missing 1423# fails when called from a subdirectory if $ac_aux_dir is relative 1424# $top_srcdir/$ac_aux_dir/missing 1425# fails if $ac_aux_dir is absolute, 1426# fails when called from a subdirectory in a VPATH build with 1427# a relative $ac_aux_dir 1428# 1429# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 1430# are both prefixed by $srcdir. In an in-source build this is usually 1431# harmless because $srcdir is `.', but things will broke when you 1432# start a VPATH build or use an absolute $srcdir. 1433# 1434# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 1435# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 1436# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 1437# and then we would define $MISSING as 1438# MISSING="\${SHELL} $am_aux_dir/missing" 1439# This will work as long as MISSING is not called from configure, because 1440# unfortunately $(top_srcdir) has no meaning in configure. 1441# However there are other variables, like CC, which are often used in 1442# configure, and could therefore not use this "fixed" $ac_aux_dir. 1443# 1444# Another solution, used here, is to always expand $ac_aux_dir to an 1445# absolute PATH. The drawback is that using absolute paths prevent a 1446# configured tree to be moved without reconfiguration. 1447 1448AC_DEFUN([AM_AUX_DIR_EXPAND], 1449[dnl Rely on autoconf to set up CDPATH properly. 1450AC_PREREQ([2.50])dnl 1451# expand $ac_aux_dir to an absolute path 1452am_aux_dir=`cd $ac_aux_dir && pwd` 1453]) 1454 1455# AM_CONDITIONAL -*- Autoconf -*- 1456 1457# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 1458# 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# serial 9 1465 1466# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1467# ------------------------------------- 1468# Define a conditional. 1469AC_DEFUN([AM_CONDITIONAL], 1470[AC_PREREQ(2.52)dnl 1471 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1472 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1473AC_SUBST([$1_TRUE])dnl 1474AC_SUBST([$1_FALSE])dnl 1475_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1476_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1477m4_define([_AM_COND_VALUE_$1], [$2])dnl 1478if $2; then 1479 $1_TRUE= 1480 $1_FALSE='#' 1481else 1482 $1_TRUE='#' 1483 $1_FALSE= 1484fi 1485AC_CONFIG_COMMANDS_PRE( 1486[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1487 AC_MSG_ERROR([[conditional "$1" was never defined. 1488Usually this means the macro was only invoked conditionally.]]) 1489fi])]) 1490 1491# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 1492# Free Software Foundation, Inc. 1493# 1494# This file is free software; the Free Software Foundation 1495# gives unlimited permission to copy and/or distribute it, 1496# with or without modifications, as long as this notice is preserved. 1497 1498# serial 10 1499 1500# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 1501# written in clear, in which case automake, when reading aclocal.m4, 1502# will think it sees a *use*, and therefore will trigger all it's 1503# C support machinery. Also note that it means that autoscan, seeing 1504# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1505 1506 1507# _AM_DEPENDENCIES(NAME) 1508# ---------------------- 1509# See how the compiler implements dependency checking. 1510# NAME is "CC", "CXX", "GCJ", or "OBJC". 1511# We try a few techniques and use that to set a single cache variable. 1512# 1513# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1514# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1515# dependency, and given that the user is not expected to run this macro, 1516# just rely on AC_PROG_CC. 1517AC_DEFUN([_AM_DEPENDENCIES], 1518[AC_REQUIRE([AM_SET_DEPDIR])dnl 1519AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1520AC_REQUIRE([AM_MAKE_INCLUDE])dnl 1521AC_REQUIRE([AM_DEP_TRACK])dnl 1522 1523ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 1524 [$1], CXX, [depcc="$CXX" am_compiler_list=], 1525 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1526 [$1], UPC, [depcc="$UPC" am_compiler_list=], 1527 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1528 [depcc="$$1" am_compiler_list=]) 1529 1530AC_CACHE_CHECK([dependency style of $depcc], 1531 [am_cv_$1_dependencies_compiler_type], 1532[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1533 # We make a subdir and do the tests there. Otherwise we can end up 1534 # making bogus files that we don't know about and never remove. For 1535 # instance it was reported that on HP-UX the gcc test will end up 1536 # making a dummy file named `D' -- because `-MD' means `put the output 1537 # in D'. 1538 mkdir conftest.dir 1539 # Copy depcomp to subdir because otherwise we won't find it if we're 1540 # using a relative directory. 1541 cp "$am_depcomp" conftest.dir 1542 cd conftest.dir 1543 # We will build objects and dependencies in a subdirectory because 1544 # it helps to detect inapplicable dependency modes. For instance 1545 # both Tru64's cc and ICC support -MD to output dependencies as a 1546 # side effect of compilation, but ICC will put the dependencies in 1547 # the current directory while Tru64 will put them in the object 1548 # directory. 1549 mkdir sub 1550 1551 am_cv_$1_dependencies_compiler_type=none 1552 if test "$am_compiler_list" = ""; then 1553 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 1554 fi 1555 am__universal=false 1556 m4_case([$1], [CC], 1557 [case " $depcc " in #( 1558 *\ -arch\ *\ -arch\ *) am__universal=true ;; 1559 esac], 1560 [CXX], 1561 [case " $depcc " in #( 1562 *\ -arch\ *\ -arch\ *) am__universal=true ;; 1563 esac]) 1564 1565 for depmode in $am_compiler_list; do 1566 # Setup a source with many dependencies, because some compilers 1567 # like to wrap large dependency lists on column 80 (with \), and 1568 # we should not choose a depcomp mode which is confused by this. 1569 # 1570 # We need to recreate these files for each test, as the compiler may 1571 # overwrite some of them when testing with obscure command lines. 1572 # This happens at least with the AIX C compiler. 1573 : > sub/conftest.c 1574 for i in 1 2 3 4 5 6; do 1575 echo '#include "conftst'$i'.h"' >> sub/conftest.c 1576 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 1577 # Solaris 8's {/usr,}/bin/sh. 1578 touch sub/conftst$i.h 1579 done 1580 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1581 1582 # We check with `-c' and `-o' for the sake of the "dashmstdout" 1583 # mode. It turns out that the SunPro C++ compiler does not properly 1584 # handle `-M -o', and we need to detect this. Also, some Intel 1585 # versions had trouble with output in subdirs 1586 am__obj=sub/conftest.${OBJEXT-o} 1587 am__minus_obj="-o $am__obj" 1588 case $depmode in 1589 gcc) 1590 # This depmode causes a compiler race in universal mode. 1591 test "$am__universal" = false || continue 1592 ;; 1593 nosideeffect) 1594 # after this tag, mechanisms are not by side-effect, so they'll 1595 # only be used when explicitly requested 1596 if test "x$enable_dependency_tracking" = xyes; then 1597 continue 1598 else 1599 break 1600 fi 1601 ;; 1602 msvisualcpp | msvcmsys) 1603 # This compiler won't grok `-c -o', but also, the minuso test has 1604 # not run yet. These depmodes are late enough in the game, and 1605 # so weak that their functioning should not be impacted. 1606 am__obj=conftest.${OBJEXT-o} 1607 am__minus_obj= 1608 ;; 1609 none) break ;; 1610 esac 1611 if depmode=$depmode \ 1612 source=sub/conftest.c object=$am__obj \ 1613 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 1614 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1615 >/dev/null 2>conftest.err && 1616 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1617 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 1618 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1619 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1620 # icc doesn't choke on unknown options, it will just issue warnings 1621 # or remarks (even with -Werror). So we grep stderr for any message 1622 # that says an option was ignored or not supported. 1623 # When given -MP, icc 7.0 and 7.1 complain thusly: 1624 # icc: Command line warning: ignoring option '-M'; no argument required 1625 # The diagnosis changed in icc 8.0: 1626 # icc: Command line remark: option '-MP' not supported 1627 if (grep 'ignoring option' conftest.err || 1628 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1629 am_cv_$1_dependencies_compiler_type=$depmode 1630 break 1631 fi 1632 fi 1633 done 1634 1635 cd .. 1636 rm -rf conftest.dir 1637else 1638 am_cv_$1_dependencies_compiler_type=none 1639fi 1640]) 1641AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1642AM_CONDITIONAL([am__fastdep$1], [ 1643 test "x$enable_dependency_tracking" != xno \ 1644 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1645]) 1646 1647 1648# AM_SET_DEPDIR 1649# ------------- 1650# Choose a directory name for dependency files. 1651# This macro is AC_REQUIREd in _AM_DEPENDENCIES 1652AC_DEFUN([AM_SET_DEPDIR], 1653[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1654AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1655]) 1656 1657 1658# AM_DEP_TRACK 1659# ------------ 1660AC_DEFUN([AM_DEP_TRACK], 1661[AC_ARG_ENABLE(dependency-tracking, 1662[ --disable-dependency-tracking speeds up one-time build 1663 --enable-dependency-tracking do not reject slow dependency extractors]) 1664if test "x$enable_dependency_tracking" != xno; then 1665 am_depcomp="$ac_aux_dir/depcomp" 1666 AMDEPBACKSLASH='\' 1667fi 1668AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1669AC_SUBST([AMDEPBACKSLASH])dnl 1670_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1671]) 1672 1673# Generate code to set up dependency tracking. -*- Autoconf -*- 1674 1675# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 1676# Free Software Foundation, Inc. 1677# 1678# This file is free software; the Free Software Foundation 1679# gives unlimited permission to copy and/or distribute it, 1680# with or without modifications, as long as this notice is preserved. 1681 1682#serial 5 1683 1684# _AM_OUTPUT_DEPENDENCY_COMMANDS 1685# ------------------------------ 1686AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 1687[{ 1688 # Autoconf 2.62 quotes --file arguments for eval, but not when files 1689 # are listed without --file. Let's play safe and only enable the eval 1690 # if we detect the quoting. 1691 case $CONFIG_FILES in 1692 *\'*) eval set x "$CONFIG_FILES" ;; 1693 *) set x $CONFIG_FILES ;; 1694 esac 1695 shift 1696 for mf 1697 do 1698 # Strip MF so we end up with the name of the file. 1699 mf=`echo "$mf" | sed -e 's/:.*$//'` 1700 # Check whether this is an Automake generated Makefile or not. 1701 # We used to match only the files named `Makefile.in', but 1702 # some people rename them; so instead we look at the file content. 1703 # Grep'ing the first line is not enough: some people post-process 1704 # each Makefile.in and add a new line on top of each file to say so. 1705 # Grep'ing the whole file is not good either: AIX grep has a line 1706 # limit of 2048, but all sed's we know have understand at least 4000. 1707 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 1708 dirpart=`AS_DIRNAME("$mf")` 1709 else 1710 continue 1711 fi 1712 # Extract the definition of DEPDIR, am__include, and am__quote 1713 # from the Makefile without running `make'. 1714 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 1715 test -z "$DEPDIR" && continue 1716 am__include=`sed -n 's/^am__include = //p' < "$mf"` 1717 test -z "am__include" && continue 1718 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 1719 # When using ansi2knr, U may be empty or an underscore; expand it 1720 U=`sed -n 's/^U = //p' < "$mf"` 1721 # Find all dependency output files, they are included files with 1722 # $(DEPDIR) in their names. We invoke sed twice because it is the 1723 # simplest approach to changing $(DEPDIR) to its actual value in the 1724 # expansion. 1725 for file in `sed -n " 1726 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 1727 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 1728 # Make sure the directory exists. 1729 test -f "$dirpart/$file" && continue 1730 fdir=`AS_DIRNAME(["$file"])` 1731 AS_MKDIR_P([$dirpart/$fdir]) 1732 # echo "creating $dirpart/$file" 1733 echo '# dummy' > "$dirpart/$file" 1734 done 1735 done 1736} 1737])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1738 1739 1740# AM_OUTPUT_DEPENDENCY_COMMANDS 1741# ----------------------------- 1742# This macro should only be invoked once -- use via AC_REQUIRE. 1743# 1744# This code is only required when automatic dependency tracking 1745# is enabled. FIXME. This creates each `.P' file that we will 1746# need in order to bootstrap the dependency handling code. 1747AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1748[AC_CONFIG_COMMANDS([depfiles], 1749 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1750 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 1751]) 1752 1753# Do all the work for Automake. -*- Autoconf -*- 1754 1755# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 1756# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 1757# 1758# This file is free software; the Free Software Foundation 1759# gives unlimited permission to copy and/or distribute it, 1760# with or without modifications, as long as this notice is preserved. 1761 1762# serial 16 1763 1764# This macro actually does too much. Some checks are only needed if 1765# your package does certain things. But this isn't really a big deal. 1766 1767# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1768# AM_INIT_AUTOMAKE([OPTIONS]) 1769# ----------------------------------------------- 1770# The call with PACKAGE and VERSION arguments is the old style 1771# call (pre autoconf-2.50), which is being phased out. PACKAGE 1772# and VERSION should now be passed to AC_INIT and removed from 1773# the call to AM_INIT_AUTOMAKE. 1774# We support both call styles for the transition. After 1775# the next Automake release, Autoconf can make the AC_INIT 1776# arguments mandatory, and then we can depend on a new Autoconf 1777# release and drop the old call support. 1778AC_DEFUN([AM_INIT_AUTOMAKE], 1779[AC_PREREQ([2.62])dnl 1780dnl Autoconf wants to disallow AM_ names. We explicitly allow 1781dnl the ones we care about. 1782m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1783AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1784AC_REQUIRE([AC_PROG_INSTALL])dnl 1785if test "`cd $srcdir && pwd`" != "`pwd`"; then 1786 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1787 # is not polluted with repeated "-I." 1788 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1789 # test to see if srcdir already configured 1790 if test -f $srcdir/config.status; then 1791 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1792 fi 1793fi 1794 1795# test whether we have cygpath 1796if test -z "$CYGPATH_W"; then 1797 if (cygpath --version) >/dev/null 2>/dev/null; then 1798 CYGPATH_W='cygpath -w' 1799 else 1800 CYGPATH_W=echo 1801 fi 1802fi 1803AC_SUBST([CYGPATH_W]) 1804 1805# Define the identity of the package. 1806dnl Distinguish between old-style and new-style calls. 1807m4_ifval([$2], 1808[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1809 AC_SUBST([PACKAGE], [$1])dnl 1810 AC_SUBST([VERSION], [$2])], 1811[_AM_SET_OPTIONS([$1])dnl 1812dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1813m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 1814 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1815 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1816 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1817 1818_AM_IF_OPTION([no-define],, 1819[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 1820 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 1821 1822# Some tools Automake needs. 1823AC_REQUIRE([AM_SANITY_CHECK])dnl 1824AC_REQUIRE([AC_ARG_PROGRAM])dnl 1825AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 1826AM_MISSING_PROG(AUTOCONF, autoconf) 1827AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 1828AM_MISSING_PROG(AUTOHEADER, autoheader) 1829AM_MISSING_PROG(MAKEINFO, makeinfo) 1830AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1831AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1832AC_REQUIRE([AM_PROG_MKDIR_P])dnl 1833# We need awk for the "check" target. The system "awk" is bad on 1834# some platforms. 1835AC_REQUIRE([AC_PROG_AWK])dnl 1836AC_REQUIRE([AC_PROG_MAKE_SET])dnl 1837AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1838_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1839 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1840 [_AM_PROG_TAR([v7])])]) 1841_AM_IF_OPTION([no-dependencies],, 1842[AC_PROVIDE_IFELSE([AC_PROG_CC], 1843 [_AM_DEPENDENCIES(CC)], 1844 [define([AC_PROG_CC], 1845 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 1846AC_PROVIDE_IFELSE([AC_PROG_CXX], 1847 [_AM_DEPENDENCIES(CXX)], 1848 [define([AC_PROG_CXX], 1849 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 1850AC_PROVIDE_IFELSE([AC_PROG_OBJC], 1851 [_AM_DEPENDENCIES(OBJC)], 1852 [define([AC_PROG_OBJC], 1853 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 1854]) 1855_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 1856dnl The `parallel-tests' driver may need to know about EXEEXT, so add the 1857dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 1858dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 1859AC_CONFIG_COMMANDS_PRE(dnl 1860[m4_provide_if([_AM_COMPILER_EXEEXT], 1861 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1862]) 1863 1864dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 1865dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 1866dnl mangled by Autoconf and run in a shell conditional statement. 1867m4_define([_AC_COMPILER_EXEEXT], 1868m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1869 1870 1871# When config.status generates a header, we must update the stamp-h file. 1872# This file resides in the same directory as the config header 1873# that is generated. The stamp files are numbered to have different names. 1874 1875# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1876# loop where config.status creates the headers, so we can generate 1877# our stamp files there. 1878AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1879[# Compute $1's index in $config_headers. 1880_am_arg=$1 1881_am_stamp_count=1 1882for _am_header in $config_headers :; do 1883 case $_am_header in 1884 $_am_arg | $_am_arg:* ) 1885 break ;; 1886 * ) 1887 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1888 esac 1889done 1890echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1891 1892# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 1893# 1894# This file is free software; the Free Software Foundation 1895# gives unlimited permission to copy and/or distribute it, 1896# with or without modifications, as long as this notice is preserved. 1897 1898# AM_PROG_INSTALL_SH 1899# ------------------ 1900# Define $install_sh. 1901AC_DEFUN([AM_PROG_INSTALL_SH], 1902[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1903if test x"${install_sh}" != xset; then 1904 case $am_aux_dir in 1905 *\ * | *\ *) 1906 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 1907 *) 1908 install_sh="\${SHELL} $am_aux_dir/install-sh" 1909 esac 1910fi 1911AC_SUBST(install_sh)]) 1912 1913# Copyright (C) 2003, 2005 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 2 1920 1921# Check whether the underlying file-system supports filenames 1922# with a leading dot. For instance MS-DOS doesn't. 1923AC_DEFUN([AM_SET_LEADING_DOT], 1924[rm -rf .tst 2>/dev/null 1925mkdir .tst 2>/dev/null 1926if test -d .tst; then 1927 am__leading_dot=. 1928else 1929 am__leading_dot=_ 1930fi 1931rmdir .tst 2>/dev/null 1932AC_SUBST([am__leading_dot])]) 1933 1934# Check to see how 'make' treats includes. -*- Autoconf -*- 1935 1936# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 1937# 1938# This file is free software; the Free Software Foundation 1939# gives unlimited permission to copy and/or distribute it, 1940# with or without modifications, as long as this notice is preserved. 1941 1942# serial 4 1943 1944# AM_MAKE_INCLUDE() 1945# ----------------- 1946# Check to see how make treats includes. 1947AC_DEFUN([AM_MAKE_INCLUDE], 1948[am_make=${MAKE-make} 1949cat > confinc << 'END' 1950am__doit: 1951 @echo this is the am__doit target 1952.PHONY: am__doit 1953END 1954# If we don't find an include directive, just comment out the code. 1955AC_MSG_CHECKING([for style of include used by $am_make]) 1956am__include="#" 1957am__quote= 1958_am_result=none 1959# First try GNU make style include. 1960echo "include confinc" > confmf 1961# Ignore all kinds of additional output from `make'. 1962case `$am_make -s -f confmf 2> /dev/null` in #( 1963*the\ am__doit\ target*) 1964 am__include=include 1965 am__quote= 1966 _am_result=GNU 1967 ;; 1968esac 1969# Now try BSD make style include. 1970if test "$am__include" = "#"; then 1971 echo '.include "confinc"' > confmf 1972 case `$am_make -s -f confmf 2> /dev/null` in #( 1973 *the\ am__doit\ target*) 1974 am__include=.include 1975 am__quote="\"" 1976 _am_result=BSD 1977 ;; 1978 esac 1979fi 1980AC_SUBST([am__include]) 1981AC_SUBST([am__quote]) 1982AC_MSG_RESULT([$_am_result]) 1983rm -f confinc confmf 1984]) 1985 1986# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1987 1988# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 1989# Free Software Foundation, Inc. 1990# 1991# This file is free software; the Free Software Foundation 1992# gives unlimited permission to copy and/or distribute it, 1993# with or without modifications, as long as this notice is preserved. 1994 1995# serial 6 1996 1997# AM_MISSING_PROG(NAME, PROGRAM) 1998# ------------------------------ 1999AC_DEFUN([AM_MISSING_PROG], 2000[AC_REQUIRE([AM_MISSING_HAS_RUN]) 2001$1=${$1-"${am_missing_run}$2"} 2002AC_SUBST($1)]) 2003 2004 2005# AM_MISSING_HAS_RUN 2006# ------------------ 2007# Define MISSING if not defined so far and test if it supports --run. 2008# If it does, set am_missing_run to use it, otherwise, to nothing. 2009AC_DEFUN([AM_MISSING_HAS_RUN], 2010[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 2011AC_REQUIRE_AUX_FILE([missing])dnl 2012if test x"${MISSING+set}" != xset; then 2013 case $am_aux_dir in 2014 *\ * | *\ *) 2015 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 2016 *) 2017 MISSING="\${SHELL} $am_aux_dir/missing" ;; 2018 esac 2019fi 2020# Use eval to expand $SHELL 2021if eval "$MISSING --run true"; then 2022 am_missing_run="$MISSING --run " 2023else 2024 am_missing_run= 2025 AC_MSG_WARN([`missing' script is too old or missing]) 2026fi 2027]) 2028 2029# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 2030# 2031# This file is free software; the Free Software Foundation 2032# gives unlimited permission to copy and/or distribute it, 2033# with or without modifications, as long as this notice is preserved. 2034 2035# AM_PROG_MKDIR_P 2036# --------------- 2037# Check for `mkdir -p'. 2038AC_DEFUN([AM_PROG_MKDIR_P], 2039[AC_PREREQ([2.60])dnl 2040AC_REQUIRE([AC_PROG_MKDIR_P])dnl 2041dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 2042dnl while keeping a definition of mkdir_p for backward compatibility. 2043dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 2044dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 2045dnl Makefile.ins that do not define MKDIR_P, so we do our own 2046dnl adjustment using top_builddir (which is defined more often than 2047dnl MKDIR_P). 2048AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 2049case $mkdir_p in 2050 [[\\/$]]* | ?:[[\\/]]*) ;; 2051 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 2052esac 2053]) 2054 2055# Helper functions for option handling. -*- Autoconf -*- 2056 2057# Copyright (C) 2001, 2002, 2003, 2005, 2008 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# serial 4 2064 2065# _AM_MANGLE_OPTION(NAME) 2066# ----------------------- 2067AC_DEFUN([_AM_MANGLE_OPTION], 2068[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 2069 2070# _AM_SET_OPTION(NAME) 2071# ------------------------------ 2072# Set option NAME. Presently that only means defining a flag for this option. 2073AC_DEFUN([_AM_SET_OPTION], 2074[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 2075 2076# _AM_SET_OPTIONS(OPTIONS) 2077# ---------------------------------- 2078# OPTIONS is a space-separated list of Automake options. 2079AC_DEFUN([_AM_SET_OPTIONS], 2080[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 2081 2082# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 2083# ------------------------------------------- 2084# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 2085AC_DEFUN([_AM_IF_OPTION], 2086[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 2087 2088# Check to make sure that the build environment is sane. -*- Autoconf -*- 2089 2090# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 2091# Free Software Foundation, Inc. 2092# 2093# This file is free software; the Free Software Foundation 2094# gives unlimited permission to copy and/or distribute it, 2095# with or without modifications, as long as this notice is preserved. 2096 2097# serial 5 2098 2099# AM_SANITY_CHECK 2100# --------------- 2101AC_DEFUN([AM_SANITY_CHECK], 2102[AC_MSG_CHECKING([whether build environment is sane]) 2103# Just in case 2104sleep 1 2105echo timestamp > conftest.file 2106# Reject unsafe characters in $srcdir or the absolute working directory 2107# name. Accept space and tab only in the latter. 2108am_lf=' 2109' 2110case `pwd` in 2111 *[[\\\"\#\$\&\'\`$am_lf]]*) 2112 AC_MSG_ERROR([unsafe absolute working directory name]);; 2113esac 2114case $srcdir in 2115 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 2116 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 2117esac 2118 2119# Do `set' in a subshell so we don't clobber the current shell's 2120# arguments. Must try -L first in case configure is actually a 2121# symlink; some systems play weird games with the mod time of symlinks 2122# (eg FreeBSD returns the mod time of the symlink's containing 2123# directory). 2124if ( 2125 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 2126 if test "$[*]" = "X"; then 2127 # -L didn't work. 2128 set X `ls -t "$srcdir/configure" conftest.file` 2129 fi 2130 rm -f conftest.file 2131 if test "$[*]" != "X $srcdir/configure conftest.file" \ 2132 && test "$[*]" != "X conftest.file $srcdir/configure"; then 2133 2134 # If neither matched, then we have a broken ls. This can happen 2135 # if, for instance, CONFIG_SHELL is bash and it inherits a 2136 # broken ls alias from the environment. This has actually 2137 # happened. Such a system could not be considered "sane". 2138 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 2139alias in your environment]) 2140 fi 2141 2142 test "$[2]" = conftest.file 2143 ) 2144then 2145 # Ok. 2146 : 2147else 2148 AC_MSG_ERROR([newly created file is older than distributed files! 2149Check your system clock]) 2150fi 2151AC_MSG_RESULT(yes)]) 2152 2153# Copyright (C) 2001, 2003, 2005 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_PROG_INSTALL_STRIP 2160# --------------------- 2161# One issue with vendor `install' (even GNU) is that you can't 2162# specify the program used to strip binaries. This is especially 2163# annoying in cross-compiling environments, where the build's strip 2164# is unlikely to handle the host's binaries. 2165# Fortunately install-sh will honor a STRIPPROG variable, so we 2166# always use install-sh in `make install-strip', and initialize 2167# STRIPPROG with the value of the STRIP variable (set by the user). 2168AC_DEFUN([AM_PROG_INSTALL_STRIP], 2169[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 2170# Installed binaries are usually stripped using `strip' when the user 2171# run `make install-strip'. However `strip' might not be the right 2172# tool to use in cross-compilation environments, therefore Automake 2173# will honor the `STRIP' environment variable to overrule this program. 2174dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 2175if test "$cross_compiling" != no; then 2176 AC_CHECK_TOOL([STRIP], [strip], :) 2177fi 2178INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 2179AC_SUBST([INSTALL_STRIP_PROGRAM])]) 2180 2181# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 2182# 2183# This file is free software; the Free Software Foundation 2184# gives unlimited permission to copy and/or distribute it, 2185# with or without modifications, as long as this notice is preserved. 2186 2187# serial 2 2188 2189# _AM_SUBST_NOTMAKE(VARIABLE) 2190# --------------------------- 2191# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 2192# This macro is traced by Automake. 2193AC_DEFUN([_AM_SUBST_NOTMAKE]) 2194 2195# AM_SUBST_NOTMAKE(VARIABLE) 2196# --------------------------- 2197# Public sister of _AM_SUBST_NOTMAKE. 2198AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 2199 2200# Check how to create a tarball. -*- Autoconf -*- 2201 2202# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 2203# 2204# This file is free software; the Free Software Foundation 2205# gives unlimited permission to copy and/or distribute it, 2206# with or without modifications, as long as this notice is preserved. 2207 2208# serial 2 2209 2210# _AM_PROG_TAR(FORMAT) 2211# -------------------- 2212# Check how to create a tarball in format FORMAT. 2213# FORMAT should be one of `v7', `ustar', or `pax'. 2214# 2215# Substitute a variable $(am__tar) that is a command 2216# writing to stdout a FORMAT-tarball containing the directory 2217# $tardir. 2218# tardir=directory && $(am__tar) > result.tar 2219# 2220# Substitute a variable $(am__untar) that extract such 2221# a tarball read from stdin. 2222# $(am__untar) < result.tar 2223AC_DEFUN([_AM_PROG_TAR], 2224[# Always define AMTAR for backward compatibility. 2225AM_MISSING_PROG([AMTAR], [tar]) 2226m4_if([$1], [v7], 2227 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 2228 [m4_case([$1], [ustar],, [pax],, 2229 [m4_fatal([Unknown tar format])]) 2230AC_MSG_CHECKING([how to create a $1 tar archive]) 2231# Loop over all known methods to create a tar archive until one works. 2232_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 2233_am_tools=${am_cv_prog_tar_$1-$_am_tools} 2234# Do not fold the above two line into one, because Tru64 sh and 2235# Solaris sh will not grok spaces in the rhs of `-'. 2236for _am_tool in $_am_tools 2237do 2238 case $_am_tool in 2239 gnutar) 2240 for _am_tar in tar gnutar gtar; 2241 do 2242 AM_RUN_LOG([$_am_tar --version]) && break 2243 done 2244 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 2245 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 2246 am__untar="$_am_tar -xf -" 2247 ;; 2248 plaintar) 2249 # Must skip GNU tar: if it does not support --format= it doesn't create 2250 # ustar tarball either. 2251 (tar --version) >/dev/null 2>&1 && continue 2252 am__tar='tar chf - "$$tardir"' 2253 am__tar_='tar chf - "$tardir"' 2254 am__untar='tar xf -' 2255 ;; 2256 pax) 2257 am__tar='pax -L -x $1 -w "$$tardir"' 2258 am__tar_='pax -L -x $1 -w "$tardir"' 2259 am__untar='pax -r' 2260 ;; 2261 cpio) 2262 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 2263 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 2264 am__untar='cpio -i -H $1 -d' 2265 ;; 2266 none) 2267 am__tar=false 2268 am__tar_=false 2269 am__untar=false 2270 ;; 2271 esac 2272 2273 # If the value was cached, stop now. We just wanted to have am__tar 2274 # and am__untar set. 2275 test -n "${am_cv_prog_tar_$1}" && break 2276 2277 # tar/untar a dummy directory, and stop if the command works 2278 rm -rf conftest.dir 2279 mkdir conftest.dir 2280 echo GrepMe > conftest.dir/file 2281 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 2282 rm -rf conftest.dir 2283 if test -s conftest.tar; then 2284 AM_RUN_LOG([$am__untar <conftest.tar]) 2285 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 2286 fi 2287done 2288rm -rf conftest.dir 2289 2290AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 2291AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 2292AC_SUBST([am__tar]) 2293AC_SUBST([am__untar]) 2294]) # _AM_PROG_TAR 2295 2296m4_include([m4/argz.m4]) 2297m4_include([m4/ax_cflags_gcc_option.m4]) 2298m4_include([m4/ax_check_uname_syscall.m4]) 2299m4_include([m4/ax_compare_version.m4]) 2300m4_include([m4/ax_func_posix_memalign.m4]) 2301m4_include([m4/ax_path_bdb.m4]) 2302m4_include([m4/ax_pthread.m4]) 2303m4_include([m4/ax_require_defined.m4]) 2304m4_include([m4/ax_with_curses.m4]) 2305m4_include([m4/libtool.m4]) 2306m4_include([m4/lrintf.m4]) 2307m4_include([m4/ltdl.m4]) 2308m4_include([m4/ltoptions.m4]) 2309m4_include([m4/ltsugar.m4]) 2310m4_include([m4/ltversion.m4]) 2311m4_include([m4/lt~obsolete.m4]) 2312