1dnl aclocal.m4 generated automatically by aclocal 1.4-p6 2 3dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. 4dnl This file is free software; the Free Software Foundation 5dnl gives unlimited permission to copy and/or distribute it, 6dnl with or without modifications, as long as this notice is preserved. 7 8dnl This program is distributed in the hope that it will be useful, 9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without 10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11dnl PARTICULAR PURPOSE. 12 13dnl This provides configure definitions used by all the newlib 14dnl configure.in files. 15 16dnl Basic newlib configury. This calls basic introductory stuff, 17dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs 18dnl configure.host. The only argument is the relative path to the top 19dnl newlib directory. 20 21AC_DEFUN(NEWLIB_CONFIGURE, 22[ 23dnl Default to --enable-multilib 24AC_ARG_ENABLE(multilib, 25[ --enable-multilib build many library versions (default)], 26[case "${enableval}" in 27 yes) multilib=yes ;; 28 no) multilib=no ;; 29 *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;; 30 esac], [multilib=yes])dnl 31 32dnl Support --enable-target-optspace 33AC_ARG_ENABLE(target-optspace, 34[ --enable-target-optspace optimize for space], 35[case "${enableval}" in 36 yes) target_optspace=yes ;; 37 no) target_optspace=no ;; 38 *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;; 39 esac], [target_optspace=])dnl 40 41dnl Support --enable-malloc-debugging - currently only supported for Cygwin 42AC_ARG_ENABLE(malloc-debugging, 43[ --enable-malloc-debugging indicate malloc debugging requested], 44[case "${enableval}" in 45 yes) malloc_debugging=yes ;; 46 no) malloc_debugging=no ;; 47 *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;; 48 esac], [malloc_debugging=])dnl 49 50dnl Support --enable-newlib-mb 51AC_ARG_ENABLE(newlib-mb, 52[ --enable-newlib-mb enable multibyte support], 53[case "${enableval}" in 54 yes) newlib_mb=yes ;; 55 no) newlib_mb=no ;; 56 *) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;; 57 esac], [newlib_mb=])dnl 58 59dnl Support --enable-newlib-iconv 60AC_ARG_ENABLE(newlib-iconv, 61[ --enable-newlib-iconv enable iconv library support], 62[case "${enableval}" in 63 yes) newlib_iconv=yes ;; 64 no) newlib_iconv=no ;; 65 *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;; 66 esac], [newlib_iconv=])dnl 67 68dnl Support --enable-newlib-builtin-converters 69AC_ARG_ENABLE(newlib-builtin-converters, 70[ --enable-newlib-builtin-converters enable specific comma-separated list of iconv converters to be built-in], 71[if test x${enableval} = x; then 72 AC_MSG_ERROR(bad value ${enableval} for newlib-builtin-converters option - use comma-separated list) 73 fi 74 builtin_converters=${enableval} 75 ], [builtin_converters=])dnl 76 77dnl Support --enable-newlib-multithread 78AC_ARG_ENABLE(newlib-multithread, 79[ --enable-newlib-multithread enable support for multiple threads], 80[case "${enableval}" in 81 yes) newlib_multithread=yes ;; 82 no) newlib_multithread=no ;; 83 *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;; 84 esac], [newlib_multithread=yes])dnl 85 86dnl Support --enable-newlib-elix-level 87AC_ARG_ENABLE(newlib-elix-level, 88[ --enable-newlib-elix-level supply desired elix library level (1-4)], 89[case "${enableval}" in 90 0) newlib_elix_level=0 ;; 91 1) newlib_elix_level=1 ;; 92 2) newlib_elix_level=2 ;; 93 3) newlib_elix_level=3 ;; 94 4) newlib_elix_level=4 ;; 95 *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;; 96 esac], [newlib_elix_level=0])dnl 97 98dnl Support --disable-newlib-io-float 99AC_ARG_ENABLE(newlib-io-float, 100[ --disable-newlib-io-float disable printf/scanf family float support], 101[case "${enableval}" in 102 yes) newlib_io_float=yes ;; 103 no) newlib_io_float=no ;; 104 *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;; 105 esac], [newlib_io_float=yes])dnl 106 107dnl Support --disable-newlib-supplied-syscalls 108AC_ARG_ENABLE(newlib-supplied-syscalls, 109[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls], 110[case "${enableval}" in 111 yes) newlib_may_supply_syscalls=yes ;; 112 no) newlib_may_supply_syscalls=no ;; 113 *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;; 114 esac], [newlib_may_supply_syscalls=yes])dnl 115 116AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes) 117 118dnl We may get other options which we don't document: 119dnl --with-target-subdir, --with-multisrctop, --with-multisubdir 120 121test -z "[$]{with_target_subdir}" && with_target_subdir=. 122 123if test "[$]{srcdir}" = "."; then 124 if test "[$]{with_target_subdir}" != "."; then 125 newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1" 126 else 127 newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1" 128 fi 129else 130 newlib_basedir="[$]{srcdir}/$1" 131fi 132AC_SUBST(newlib_basedir) 133 134AC_CANONICAL_SYSTEM 135 136AM_INIT_AUTOMAKE(newlib, 1.12.0) 137 138# FIXME: We temporarily define our own version of AC_PROG_CC. This is 139# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We 140# are probably using a cross compiler, which will not be able to fully 141# link an executable. This should really be fixed in autoconf 142# itself. 143 144AC_DEFUN(LIB_AC_PROG_CC, 145[AC_BEFORE([$0], [AC_PROG_CPP])dnl 146AC_CHECK_PROG(CC, gcc, gcc) 147if test -z "$CC"; then 148 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) 149 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) 150fi 151 152AC_PROG_CC_GNU 153 154if test $ac_cv_prog_gcc = yes; then 155 GCC=yes 156dnl Check whether -g works, even if CFLAGS is set, in case the package 157dnl plays around with CFLAGS (such as to build both debugging and 158dnl normal versions of a library), tasteless as that idea is. 159 ac_test_CFLAGS="${CFLAGS+set}" 160 ac_save_CFLAGS="$CFLAGS" 161 CFLAGS= 162 AC_PROG_CC_G 163 if test "$ac_test_CFLAGS" = set; then 164 CFLAGS="$ac_save_CFLAGS" 165 elif test $ac_cv_prog_cc_g = yes; then 166 CFLAGS="-g -O2" 167 else 168 CFLAGS="-O2" 169 fi 170else 171 GCC= 172 test "${CFLAGS+set}" = set || CFLAGS="-g" 173fi 174]) 175 176LIB_AC_PROG_CC 177 178AC_CHECK_TOOL(AS, as) 179AC_CHECK_TOOL(AR, ar) 180AC_CHECK_TOOL(RANLIB, ranlib, :) 181 182AC_PROG_INSTALL 183 184AM_MAINTAINER_MODE 185 186# We need AC_EXEEXT to keep automake happy in cygnus mode. However, 187# at least currently, we never actually build a program, so we never 188# need to use $(EXEEXT). Moreover, the test for EXEEXT normally 189# fails, because we are probably configuring with a cross compiler 190# which can't create executables. So we include AC_EXEEXT to keep 191# automake happy, but we don't execute it, since we don't care about 192# the result. 193if false; then 194 AC_EXEEXT 195fi 196 197. [$]{newlib_basedir}/configure.host 198 199newlib_cflags="[$]{newlib_cflags} -fno-builtin" 200 201NEWLIB_CFLAGS=${newlib_cflags} 202AC_SUBST(NEWLIB_CFLAGS) 203 204LDFLAGS=${ldflags} 205AC_SUBST(LDFLAGS) 206 207AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0) 208AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1) 209AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2) 210AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3) 211AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4) 212 213AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes) 214 215# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we 216# use oext, which is set in configure.host based on the target platform. 217OBJEXT=${oext} 218 219AC_SUBST(OBJEXT) 220AC_SUBST(oext) 221AC_SUBST(aext) 222 223AC_SUBST(libm_machine_dir) 224AC_SUBST(machine_dir) 225AC_SUBST(sys_dir) 226]) 227 228# Do all the work for Automake. This macro actually does too much -- 229# some checks are only needed if your package does certain things. 230# But this isn't really a big deal. 231 232# serial 1 233 234dnl Usage: 235dnl AM_INIT_AUTOMAKE(package,version, [no-define]) 236 237AC_DEFUN([AM_INIT_AUTOMAKE], 238[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 239AC_REQUIRE([AC_PROG_INSTALL]) 240PACKAGE=[$1] 241AC_SUBST(PACKAGE) 242VERSION=[$2] 243AC_SUBST(VERSION) 244dnl test to see if srcdir already configured 245if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then 246 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 247fi 248ifelse([$3],, 249AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 250AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) 251AC_REQUIRE([AM_SANITY_CHECK]) 252AC_REQUIRE([AC_ARG_PROGRAM]) 253dnl FIXME This is truly gross. 254missing_dir=`cd $ac_aux_dir && pwd` 255AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) 256AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) 257AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) 258AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) 259AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) 260AC_REQUIRE([AC_PROG_MAKE_SET])]) 261 262# Copyright 2002 Free Software Foundation, Inc. 263 264# This program is free software; you can redistribute it and/or modify 265# it under the terms of the GNU General Public License as published by 266# the Free Software Foundation; either version 2, or (at your option) 267# any later version. 268 269# This program is distributed in the hope that it will be useful, 270# but WITHOUT ANY WARRANTY; without even the implied warranty of 271# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 272# GNU General Public License for more details. 273 274# You should have received a copy of the GNU General Public License 275# along with this program; if not, write to the Free Software 276# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 277 278# AM_AUTOMAKE_VERSION(VERSION) 279# ---------------------------- 280# Automake X.Y traces this macro to ensure aclocal.m4 has been 281# generated from the m4 files accompanying Automake X.Y. 282AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) 283 284# AM_SET_CURRENT_AUTOMAKE_VERSION 285# ------------------------------- 286# Call AM_AUTOMAKE_VERSION so it can be traced. 287# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 288AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 289 [AM_AUTOMAKE_VERSION([1.4-p6])]) 290 291# 292# Check to make sure that the build environment is sane. 293# 294 295AC_DEFUN([AM_SANITY_CHECK], 296[AC_MSG_CHECKING([whether build environment is sane]) 297# Just in case 298sleep 1 299echo timestamp > conftestfile 300# Do `set' in a subshell so we don't clobber the current shell's 301# arguments. Must try -L first in case configure is actually a 302# symlink; some systems play weird games with the mod time of symlinks 303# (eg FreeBSD returns the mod time of the symlink's containing 304# directory). 305if ( 306 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` 307 if test "[$]*" = "X"; then 308 # -L didn't work. 309 set X `ls -t $srcdir/configure conftestfile` 310 fi 311 if test "[$]*" != "X $srcdir/configure conftestfile" \ 312 && test "[$]*" != "X conftestfile $srcdir/configure"; then 313 314 # If neither matched, then we have a broken ls. This can happen 315 # if, for instance, CONFIG_SHELL is bash and it inherits a 316 # broken ls alias from the environment. This has actually 317 # happened. Such a system could not be considered "sane". 318 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 319alias in your environment]) 320 fi 321 322 test "[$]2" = conftestfile 323 ) 324then 325 # Ok. 326 : 327else 328 AC_MSG_ERROR([newly created file is older than distributed files! 329Check your system clock]) 330fi 331rm -f conftest* 332AC_MSG_RESULT(yes)]) 333 334dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) 335dnl The program must properly implement --version. 336AC_DEFUN([AM_MISSING_PROG], 337[AC_MSG_CHECKING(for working $2) 338# Run test in a subshell; some versions of sh will print an error if 339# an executable is not found, even if stderr is redirected. 340# Redirect stdin to placate older versions of autoconf. Sigh. 341if ($2 --version) < /dev/null > /dev/null 2>&1; then 342 $1=$2 343 AC_MSG_RESULT(found) 344else 345 $1="$3/missing $2" 346 AC_MSG_RESULT(missing) 347fi 348AC_SUBST($1)]) 349 350# Define a conditional. 351 352AC_DEFUN([AM_CONDITIONAL], 353[AC_SUBST($1_TRUE) 354AC_SUBST($1_FALSE) 355if $2; then 356 $1_TRUE= 357 $1_FALSE='#' 358else 359 $1_TRUE='#' 360 $1_FALSE= 361fi]) 362 363# Add --enable-maintainer-mode option to configure. 364# From Jim Meyering 365 366# serial 1 367 368AC_DEFUN([AM_MAINTAINER_MODE], 369[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 370 dnl maintainer-mode is disabled by default 371 AC_ARG_ENABLE(maintainer-mode, 372[ --enable-maintainer-mode enable make rules and dependencies not useful 373 (and sometimes confusing) to the casual installer], 374 USE_MAINTAINER_MODE=$enableval, 375 USE_MAINTAINER_MODE=no) 376 AC_MSG_RESULT($USE_MAINTAINER_MODE) 377 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) 378 MAINT=$MAINTAINER_MODE_TRUE 379 AC_SUBST(MAINT)dnl 380] 381) 382 383# Like AC_CONFIG_HEADER, but automatically create stamp file. 384 385AC_DEFUN([AM_CONFIG_HEADER], 386[AC_PREREQ([2.12]) 387AC_CONFIG_HEADER([$1]) 388dnl When config.status generates a header, we must update the stamp-h file. 389dnl This file resides in the same directory as the config header 390dnl that is generated. We must strip everything past the first ":", 391dnl and everything past the last "/". 392AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl 393ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, 394<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, 395<<am_indx=1 396for am_file in <<$1>>; do 397 case " <<$>>CONFIG_HEADERS " in 398 *" <<$>>am_file "*<<)>> 399 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx 400 ;; 401 esac 402 am_indx=`expr "<<$>>am_indx" + 1` 403done<<>>dnl>>) 404changequote([,]))]) 405 406 407# serial 46 AC_PROG_LIBTOOL 408AC_DEFUN([AC_PROG_LIBTOOL], 409[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 410dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 411dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 412 AC_PROVIDE_IFELSE([AC_PROG_CXX], 413 [AC_LIBTOOL_CXX], 414 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 415])]) 416 417dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 418dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 419dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 420 AC_PROVIDE_IFELSE([AC_PROG_GCJ], 421 [AC_LIBTOOL_GCJ], 422 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 423 [AC_LIBTOOL_GCJ], 424 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 425 [AC_LIBTOOL_GCJ], 426 [ifdef([AC_PROG_GCJ], 427 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ 428])]) 429 ifdef([A][M_PROG_GCJ], 430 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ 431])]) 432 ifdef([LT_AC_PROG_GCJ], 433 [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ 434])])])])])]) 435 436AC_DEFUN([_AC_PROG_LIBTOOL], 437[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 438AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 439AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 440 441# Save cache, so that ltconfig can load it 442AC_CACHE_SAVE 443 444# Actually configure libtool. ac_aux_dir is where install-sh is found. 445AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ 446MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ 447LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ 448AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ 449objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ 450deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ 451${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ 452$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \ 453|| AC_MSG_ERROR([libtool configure failed]) 454 455# Reload cache, that may have been modified by ltconfig 456AC_CACHE_LOAD 457 458# This can be used to rebuild libtool when needed 459LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh" 460 461# Always use our own libtool. 462LIBTOOL='$(SHELL) $(top_builddir)/libtool' 463AC_SUBST(LIBTOOL)dnl 464 465# Redirect the config.log output again, so that the ltconfig log is not 466# clobbered by the next message. 467exec 5>>./config.log 468]) 469 470AC_DEFUN([AC_LIBTOOL_SETUP], 471[AC_PREREQ(2.13)dnl 472AC_REQUIRE([AC_ENABLE_SHARED])dnl 473AC_REQUIRE([AC_ENABLE_STATIC])dnl 474AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 475AC_REQUIRE([AC_CANONICAL_HOST])dnl 476AC_REQUIRE([AC_CANONICAL_BUILD])dnl 477AC_REQUIRE([AC_PROG_CC])dnl 478AC_REQUIRE([AC_PROG_LD])dnl 479AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 480AC_REQUIRE([AC_PROG_NM])dnl 481AC_REQUIRE([AC_PROG_LN_S])dnl 482AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 483# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 484AC_REQUIRE([AC_OBJEXT])dnl 485AC_REQUIRE([AC_EXEEXT])dnl 486dnl 487 488# Only perform the check for file, if the check method requires it 489case $deplibs_check_method in 490file_magic*) 491 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 492 AC_PATH_MAGIC 493 fi 494 ;; 495esac 496 497AC_CHECK_TOOL(RANLIB, ranlib, :) 498AC_CHECK_TOOL(STRIP, strip, :) 499 500# Check for any special flags to pass to ltconfig. 501libtool_flags="--cache-file=$cache_file" 502test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" 503test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" 504test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" 505test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc" 506test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" 507ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], 508[libtool_flags="$libtool_flags --enable-dlopen"]) 509ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], 510[libtool_flags="$libtool_flags --enable-win32-dll"]) 511AC_ARG_ENABLE(libtool-lock, 512 [ --disable-libtool-lock avoid locking (might break parallel builds)]) 513test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" 514test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" 515 516AC_ARG_WITH(pic, 517 [ --with-pic try to use only PIC/non-PIC objects [default=use both]], 518 pic_mode="$withval", pic_mode=default) 519test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic" 520test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" 521 522# Some flags need to be propagated to the compiler or linker for good 523# libtool support. 524case $host in 525*-*-irix6*) 526 # Find out which ABI we are using. 527 echo '[#]line __oline__ "configure"' > conftest.$ac_ext 528 if AC_TRY_EVAL(ac_compile); then 529 case `/usr/bin/file conftest.$ac_objext` in 530 *32-bit*) 531 LD="${LD-ld} -32" 532 ;; 533 *N32*) 534 LD="${LD-ld} -n32" 535 ;; 536 *64-bit*) 537 LD="${LD-ld} -64" 538 ;; 539 esac 540 fi 541 rm -rf conftest* 542 ;; 543 544ia64-*-hpux*) 545 # Find out which ABI we are using. 546 echo 'int i;' > conftest.$ac_ext 547 if AC_TRY_EVAL(ac_compile); then 548 case "`/usr/bin/file conftest.o`" in 549 *ELF-32*) 550 HPUX_IA64_MODE="32" 551 ;; 552 *ELF-64*) 553 HPUX_IA64_MODE="64" 554 ;; 555 esac 556 fi 557 rm -rf conftest* 558 ;; 559 560*-*-sco3.2v5*) 561 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 562 SAVE_CFLAGS="$CFLAGS" 563 CFLAGS="$CFLAGS -belf" 564 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 565 [AC_LANG_SAVE 566 AC_LANG_C 567 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 568 AC_LANG_RESTORE]) 569 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 570 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 571 CFLAGS="$SAVE_CFLAGS" 572 fi 573 ;; 574 575ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], 576[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 577 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 578 AC_CHECK_TOOL(AS, as, false) 579 AC_CHECK_TOOL(OBJDUMP, objdump, false) 580 581 # recent cygwin and mingw systems supply a stub DllMain which the user 582 # can override, but on older systems we have to supply one 583 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, 584 [AC_TRY_LINK([], 585 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); 586 DllMain (0, 0, 0);], 587 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) 588 589 case $host/$CC in 590 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) 591 # old mingw systems require "-dll" to link a DLL, while more recent ones 592 # require "-mdll" 593 SAVE_CFLAGS="$CFLAGS" 594 CFLAGS="$CFLAGS -mdll" 595 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, 596 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) 597 CFLAGS="$SAVE_CFLAGS" ;; 598 *-*-cygwin* | *-*-pw32*) 599 # cygwin systems need to pass --dll to the linker, and not link 600 # crt.o which will require a WinMain@16 definition. 601 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; 602 esac 603 ;; 604 ]) 605esac 606]) 607 608# AC_LIBTOOL_DLOPEN - enable checks for dlopen support 609AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) 610 611# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's 612AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) 613 614# AC_ENABLE_SHARED - implement the --enable-shared flag 615# Usage: AC_ENABLE_SHARED[(DEFAULT)] 616# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to 617# `yes'. 618AC_DEFUN([AC_ENABLE_SHARED], 619[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 620AC_ARG_ENABLE(shared, 621changequote(<<, >>)dnl 622<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], 623changequote([, ])dnl 624[p=${PACKAGE-default} 625case $enableval in 626yes) enable_shared=yes ;; 627no) enable_shared=no ;; 628*) 629 enable_shared=no 630 # Look at the argument we got. We use all the common list separators. 631 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," 632 for pkg in $enableval; do 633 if test "X$pkg" = "X$p"; then 634 enable_shared=yes 635 fi 636 done 637 IFS="$ac_save_ifs" 638 ;; 639esac], 640enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl 641]) 642 643# AC_DISABLE_SHARED - set the default shared flag to --disable-shared 644AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 645AC_ENABLE_SHARED(no)]) 646 647# AC_ENABLE_STATIC - implement the --enable-static flag 648# Usage: AC_ENABLE_STATIC[(DEFAULT)] 649# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to 650# `yes'. 651AC_DEFUN([AC_ENABLE_STATIC], 652[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 653AC_ARG_ENABLE(static, 654changequote(<<, >>)dnl 655<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], 656changequote([, ])dnl 657[p=${PACKAGE-default} 658case $enableval in 659yes) enable_static=yes ;; 660no) enable_static=no ;; 661*) 662 enable_static=no 663 # Look at the argument we got. We use all the common list separators. 664 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," 665 for pkg in $enableval; do 666 if test "X$pkg" = "X$p"; then 667 enable_static=yes 668 fi 669 done 670 IFS="$ac_save_ifs" 671 ;; 672esac], 673enable_static=AC_ENABLE_STATIC_DEFAULT)dnl 674]) 675 676# AC_DISABLE_STATIC - set the default static flag to --disable-static 677AC_DEFUN([AC_DISABLE_STATIC], 678[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 679AC_ENABLE_STATIC(no)]) 680 681 682# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag 683# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] 684# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to 685# `yes'. 686AC_DEFUN([AC_ENABLE_FAST_INSTALL], 687[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 688AC_ARG_ENABLE(fast-install, 689changequote(<<, >>)dnl 690<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], 691changequote([, ])dnl 692[p=${PACKAGE-default} 693case $enableval in 694yes) enable_fast_install=yes ;; 695no) enable_fast_install=no ;; 696*) 697 enable_fast_install=no 698 # Look at the argument we got. We use all the common list separators. 699 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," 700 for pkg in $enableval; do 701 if test "X$pkg" = "X$p"; then 702 enable_fast_install=yes 703 fi 704 done 705 IFS="$ac_save_ifs" 706 ;; 707esac], 708enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl 709]) 710 711# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install 712AC_DEFUN([AC_DISABLE_FAST_INSTALL], 713[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 714AC_ENABLE_FAST_INSTALL(no)]) 715 716# AC_LIBTOOL_PICMODE - implement the --with-pic flag 717# Usage: AC_LIBTOOL_PICMODE[(MODE)] 718# Where MODE is either `yes' or `no'. If omitted, it defaults to 719# `both'. 720AC_DEFUN([AC_LIBTOOL_PICMODE], 721[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 722pic_mode=ifelse($#,1,$1,default)]) 723 724 725# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library 726AC_DEFUN([AC_PATH_TOOL_PREFIX], 727[AC_MSG_CHECKING([for $1]) 728AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 729[case $MAGIC_CMD in 730 /*) 731 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 732 ;; 733 ?:/*) 734 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. 735 ;; 736 *) 737 ac_save_MAGIC_CMD="$MAGIC_CMD" 738 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 739dnl $ac_dummy forces splitting on constant user-supplied paths. 740dnl POSIX.2 word splitting is done only on the output of word expansions, 741dnl not every word. This closes a longstanding sh security hole. 742 ac_dummy="ifelse([$2], , $PATH, [$2])" 743 for ac_dir in $ac_dummy; do 744 test -z "$ac_dir" && ac_dir=. 745 if test -f $ac_dir/$1; then 746 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 747 if test -n "$file_magic_test_file"; then 748 case $deplibs_check_method in 749 "file_magic "*) 750 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" 751 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 752 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 753 egrep "$file_magic_regex" > /dev/null; then 754 : 755 else 756 cat <<EOF 1>&2 757 758*** Warning: the command libtool uses to detect shared libraries, 759*** $file_magic_cmd, produces output that libtool cannot recognize. 760*** The result is that libtool may fail to recognize shared libraries 761*** as such. This will affect the creation of libtool libraries that 762*** depend on shared libraries, but programs linked with such libtool 763*** libraries will work regardless of this problem. Nevertheless, you 764*** may want to report the problem to your system manager and/or to 765*** bug-libtool@gnu.org 766 767EOF 768 fi ;; 769 esac 770 fi 771 break 772 fi 773 done 774 IFS="$ac_save_ifs" 775 MAGIC_CMD="$ac_save_MAGIC_CMD" 776 ;; 777esac]) 778MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 779if test -n "$MAGIC_CMD"; then 780 AC_MSG_RESULT($MAGIC_CMD) 781else 782 AC_MSG_RESULT(no) 783fi 784]) 785 786 787# AC_PATH_MAGIC - find a file program which can recognise a shared library 788AC_DEFUN([AC_PATH_MAGIC], 789[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl 790AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) 791if test -z "$lt_cv_path_MAGIC_CMD"; then 792 if test -n "$ac_tool_prefix"; then 793 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) 794 else 795 MAGIC_CMD=: 796 fi 797fi 798]) 799 800 801# AC_PROG_LD - find the path to the GNU or non-GNU linker 802AC_DEFUN([AC_PROG_LD], 803[AC_ARG_WITH(gnu-ld, 804[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], 805test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) 806AC_REQUIRE([AC_PROG_CC])dnl 807AC_REQUIRE([AC_CANONICAL_HOST])dnl 808AC_REQUIRE([AC_CANONICAL_BUILD])dnl 809ac_prog=ld 810if test "$GCC" = yes; then 811 # Check if gcc -print-prog-name=ld gives a path. 812 AC_MSG_CHECKING([for ld used by GCC]) 813 case $host in 814 *-*-mingw*) 815 # gcc leaves a trailing carriage return which upsets mingw 816 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 817 *) 818 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 819 esac 820 case $ac_prog in 821 # Accept absolute paths. 822 [[\\/]* | [A-Za-z]:[\\/]*)] 823 re_direlt=['/[^/][^/]*/\.\./'] 824 # Canonicalize the path of ld 825 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 826 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 827 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 828 done 829 test -z "$LD" && LD="$ac_prog" 830 ;; 831 "") 832 # If it fails, then pretend we aren't using GCC. 833 ac_prog=ld 834 ;; 835 *) 836 # If it is relative, then search for the first ld in PATH. 837 with_gnu_ld=unknown 838 ;; 839 esac 840elif test "$with_gnu_ld" = yes; then 841 AC_MSG_CHECKING([for GNU ld]) 842else 843 AC_MSG_CHECKING([for non-GNU ld]) 844fi 845AC_CACHE_VAL(lt_cv_path_LD, 846[if test -z "$LD"; then 847 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 848 for ac_dir in $PATH; do 849 test -z "$ac_dir" && ac_dir=. 850 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 851 lt_cv_path_LD="$ac_dir/$ac_prog" 852 # Check to see if the program is GNU ld. I'd rather use --version, 853 # but apparently some GNU ld's only accept -v. 854 # Break only if it was the GNU/non-GNU ld that we prefer. 855 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then 856 test "$with_gnu_ld" != no && break 857 else 858 test "$with_gnu_ld" != yes && break 859 fi 860 fi 861 done 862 IFS="$ac_save_ifs" 863else 864 lt_cv_path_LD="$LD" # Let the user override the test with a path. 865fi]) 866LD="$lt_cv_path_LD" 867if test -n "$LD"; then 868 AC_MSG_RESULT($LD) 869else 870 AC_MSG_RESULT(no) 871fi 872test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 873AC_PROG_LD_GNU 874]) 875 876AC_DEFUN([AC_PROG_LD_GNU], 877[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 878[# I'd rather use --version here, but apparently some GNU ld's only accept -v. 879if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then 880 lt_cv_prog_gnu_ld=yes 881else 882 lt_cv_prog_gnu_ld=no 883fi]) 884with_gnu_ld=$lt_cv_prog_gnu_ld 885]) 886 887# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker 888# -- PORTME Some linkers may need a different reload flag. 889AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 890[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, 891[lt_cv_ld_reload_flag='-r']) 892reload_flag=$lt_cv_ld_reload_flag 893test -n "$reload_flag" && reload_flag=" $reload_flag" 894]) 895 896# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies 897# -- PORTME fill in with the dynamic library characteristics 898AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 899[AC_CACHE_CHECK([how to recognise dependant libraries], 900lt_cv_deplibs_check_method, 901[lt_cv_file_magic_cmd='$MAGIC_CMD' 902lt_cv_file_magic_test_file= 903lt_cv_deplibs_check_method='unknown' 904# Need to set the preceding variable on all platforms that support 905# interlibrary dependencies. 906# 'none' -- dependencies not supported. 907# `unknown' -- same as none, but documents that we really don't know. 908# 'pass_all' -- all dependencies passed with no checks. 909# 'test_compile' -- check by making test program. 910# 'file_magic [regex]' -- check by looking for files in library path 911# which responds to the $file_magic_cmd with a given egrep regex. 912# If you have `file' or equivalent on your system and you're not sure 913# whether `pass_all' will *always* work, you probably want this one. 914 915case $host_os in 916aix*) 917 lt_cv_deplibs_check_method=pass_all 918 ;; 919 920beos*) 921 lt_cv_deplibs_check_method=pass_all 922 ;; 923 924bsdi4*) 925 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'] 926 lt_cv_file_magic_cmd='/usr/bin/file -L' 927 lt_cv_file_magic_test_file=/shlib/libc.so 928 ;; 929 930cygwin* | mingw* |pw32*) 931 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 932 lt_cv_file_magic_cmd='$OBJDUMP -f' 933 ;; 934 935darwin* | rhapsody*) 936 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' 937 lt_cv_file_magic_cmd='/usr/bin/file -L' 938 case "$host_os" in 939 rhapsody* | darwin1.[012]) 940 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System' 941 ;; 942 *) # Darwin 1.3 on 943 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' 944 ;; 945 esac 946 ;; 947 948freebsd* ) 949 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 950 case $host_cpu in 951 i*86 ) 952 # Not sure whether the presence of OpenBSD here was a mistake. 953 # Let's accept both of them until this is cleared up. 954 lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'] 955 lt_cv_file_magic_cmd=/usr/bin/file 956 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 957 ;; 958 esac 959 else 960 lt_cv_deplibs_check_method=pass_all 961 fi 962 ;; 963 964gnu*) 965 lt_cv_deplibs_check_method=pass_all 966 ;; 967 968hpux10.20*|hpux11*) 969 case $host_cpu in 970 hppa*) 971 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'] 972 lt_cv_file_magic_cmd=/usr/bin/file 973 lt_cv_file_magic_test_file=/usr/lib/libc.sl 974 ;; 975 ia64*) 976 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'] 977 lt_cv_file_magic_cmd=/usr/bin/file 978 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 979 ;; 980 esac 981 ;; 982 983irix5* | irix6*) 984 case $host_os in 985 irix5*) 986 # this will be overridden with pass_all, but let us keep it just in case 987 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" 988 ;; 989 *) 990 case $LD in 991 *-32|*"-32 ") libmagic=32-bit;; 992 *-n32|*"-n32 ") libmagic=N32;; 993 *-64|*"-64 ") libmagic=64-bit;; 994 *) libmagic=never-match;; 995 esac 996 # this will be overridden with pass_all, but let us keep it just in case 997 lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"] 998 ;; 999 esac 1000 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` 1001 lt_cv_deplibs_check_method=pass_all 1002 ;; 1003 1004# This must be Linux ELF. 1005linux-gnu*) 1006 case $host_cpu in 1007 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) 1008 lt_cv_deplibs_check_method=pass_all ;; 1009 *) 1010 # glibc up to 2.1.1 does not perform some relocations on ARM 1011 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;; 1012 esac 1013 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` 1014 ;; 1015 1016netbsd*) 1017 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 1018 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] 1019 else 1020 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'] 1021 fi 1022 ;; 1023 1024newsos6) 1025 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'] 1026 lt_cv_file_magic_cmd=/usr/bin/file 1027 lt_cv_file_magic_test_file=/usr/lib/libnls.so 1028 ;; 1029 1030osf3* | osf4* | osf5*) 1031 # this will be overridden with pass_all, but let us keep it just in case 1032 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' 1033 lt_cv_file_magic_test_file=/shlib/libc.so 1034 lt_cv_deplibs_check_method=pass_all 1035 ;; 1036 1037sco3.2v5*) 1038 lt_cv_deplibs_check_method=pass_all 1039 ;; 1040 1041solaris*) 1042 lt_cv_deplibs_check_method=pass_all 1043 lt_cv_file_magic_test_file=/lib/libc.so 1044 ;; 1045 1046[sysv5uw[78]* | sysv4*uw2*)] 1047 lt_cv_deplibs_check_method=pass_all 1048 ;; 1049 1050sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 1051 case $host_vendor in 1052 ncr) 1053 lt_cv_deplibs_check_method=pass_all 1054 ;; 1055 motorola) 1056 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'] 1057 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 1058 ;; 1059 esac 1060 ;; 1061esac 1062]) 1063file_magic_cmd=$lt_cv_file_magic_cmd 1064deplibs_check_method=$lt_cv_deplibs_check_method 1065]) 1066 1067 1068# AC_PROG_NM - find the path to a BSD-compatible name lister 1069AC_DEFUN([AC_PROG_NM], 1070[AC_MSG_CHECKING([for BSD-compatible nm]) 1071AC_CACHE_VAL(lt_cv_path_NM, 1072[if test -n "$NM"; then 1073 # Let the user override the test. 1074 lt_cv_path_NM="$NM" 1075else 1076 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 1077 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do 1078 test -z "$ac_dir" && ac_dir=. 1079 tmp_nm=$ac_dir/${ac_tool_prefix}nm 1080 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then 1081 # Check to see if the nm accepts a BSD-compat flag. 1082 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 1083 # nm: unknown option "B" ignored 1084 # Tru64's nm complains that /dev/null is an invalid object file 1085 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then 1086 lt_cv_path_NM="$tmp_nm -B" 1087 break 1088 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then 1089 lt_cv_path_NM="$tmp_nm -p" 1090 break 1091 else 1092 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 1093 continue # so that we can try to find one that supports BSD flags 1094 fi 1095 fi 1096 done 1097 IFS="$ac_save_ifs" 1098 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 1099fi]) 1100NM="$lt_cv_path_NM" 1101AC_MSG_RESULT([$NM]) 1102]) 1103 1104# AC_CHECK_LIBM - check for math library 1105AC_DEFUN([AC_CHECK_LIBM], 1106[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1107LIBM= 1108case $host in 1109*-*-beos* | *-*-cygwin* | *-*-pw32*) 1110 # These system don't have libm 1111 ;; 1112*-ncr-sysv4.3*) 1113 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 1114 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") 1115 ;; 1116*) 1117 AC_CHECK_LIB(m, main, LIBM="-lm") 1118 ;; 1119esac 1120]) 1121 1122# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for 1123# the libltdl convenience library and INCLTDL to the include flags for 1124# the libltdl header and adds --enable-ltdl-convenience to the 1125# configure arguments. Note that LIBLTDL and INCLTDL are not 1126# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not 1127# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed 1128# with '${top_builddir}/' and INCLTDL will be prefixed with 1129# '${top_srcdir}/' (note the single quotes!). If your package is not 1130# flat and you're not using automake, define top_builddir and 1131# top_srcdir appropriately in the Makefiles. 1132AC_DEFUN([AC_LIBLTDL_CONVENIENCE], 1133[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1134 case $enable_ltdl_convenience in 1135 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 1136 "") enable_ltdl_convenience=yes 1137 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 1138 esac 1139 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 1140 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 1141]) 1142 1143# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for 1144# the libltdl installable library and INCLTDL to the include flags for 1145# the libltdl header and adds --enable-ltdl-install to the configure 1146# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is 1147# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed 1148# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will 1149# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed 1150# with '${top_srcdir}/' (note the single quotes!). If your package is 1151# not flat and you're not using automake, define top_builddir and 1152# top_srcdir appropriately in the Makefiles. 1153# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 1154AC_DEFUN([AC_LIBLTDL_INSTALLABLE], 1155[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1156 AC_CHECK_LIB(ltdl, main, 1157 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 1158 [if test x"$enable_ltdl_install" = xno; then 1159 AC_MSG_WARN([libltdl not installed, but installation disabled]) 1160 else 1161 enable_ltdl_install=yes 1162 fi 1163 ]) 1164 if test x"$enable_ltdl_install" = x"yes"; then 1165 ac_configure_args="$ac_configure_args --enable-ltdl-install" 1166 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 1167 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 1168 else 1169 ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 1170 LIBLTDL="-lltdl" 1171 INCLTDL= 1172 fi 1173]) 1174 1175# If this macro is not defined by Autoconf, define it here. 1176ifdef([AC_PROVIDE_IFELSE], 1177 [], 1178 [define([AC_PROVIDE_IFELSE], 1179 [ifdef([AC_PROVIDE_$1], 1180 [$2], [$3])])]) 1181 1182# AC_LIBTOOL_CXX - enable support for C++ libraries 1183AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])]) 1184 1185AC_DEFUN([_AC_LIBTOOL_CXX], 1186[AC_REQUIRE([AC_PROG_CXX]) 1187AC_REQUIRE([AC_PROG_CXXCPP]) 1188LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh" 1189lt_save_CC="$CC" 1190lt_save_CFLAGS="$CFLAGS" 1191dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC 1192dnl is set to the C++ compiler. 1193AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \ 1194MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ 1195LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ 1196AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ 1197objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ 1198deplibs_check_method="$deplibs_check_method" \ 1199file_magic_cmd="$file_magic_cmd" \ 1200${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \ 1201--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \ 1202|| AC_MSG_ERROR([libtool tag configuration failed]) 1203CC="$lt_save_CC" 1204CFLAGS="$lt_save_CFLAGS" 1205 1206# Redirect the config.log output again, so that the ltconfig log is not 1207# clobbered by the next message. 1208exec 5>>./config.log 1209]) 1210 1211# AC_LIBTOOL_GCJ - enable support for GCJ libraries 1212AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])]) 1213 1214AC_DEFUN([_AC_LIBTOOL_GCJ], 1215[AC_REQUIRE([AC_PROG_LIBTOOL]) 1216AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 1217 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 1218 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 1219 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 1220 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 1221 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 1222LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh" 1223lt_save_CC="$CC" 1224lt_save_CFLAGS="$CFLAGS" 1225dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC 1226dnl is set to the C++ compiler. 1227AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \ 1228MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ 1229LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ 1230AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ 1231objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ 1232deplibs_check_method="$deplibs_check_method" \ 1233file_magic_cmd="$file_magic_cmd" \ 1234${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \ 1235--build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \ 1236|| AC_MSG_ERROR([libtool tag configuration failed]) 1237CC="$lt_save_CC" 1238CFLAGS="$lt_save_CFLAGS" 1239 1240# Redirect the config.log output again, so that the ltconfig log is not 1241# clobbered by the next message. 1242exec 5>>./config.log 1243]) 1244 1245dnl old names 1246AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 1247AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 1248AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 1249AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 1250AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 1251AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 1252AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 1253 1254dnl This is just to silence aclocal about the macro not being used 1255ifelse([AC_DISABLE_FAST_INSTALL])dnl 1256 1257AC_DEFUN([LT_AC_PROG_GCJ], 1258[AC_CHECK_TOOL(GCJ, gcj, no) 1259 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 1260 AC_SUBST(GCJFLAGS) 1261]) 1262 1263