aclocal.m4 revision ec713c28
1ec713c28Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 21d54945dSmrg 31d54945dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4ec713c28Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 51d54945dSmrg# This file is free software; the Free Software Foundation 61d54945dSmrg# gives unlimited permission to copy and/or distribute it, 71d54945dSmrg# with or without modifications, as long as this notice is preserved. 81d54945dSmrg 91d54945dSmrg# This program is distributed in the hope that it will be useful, 101d54945dSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 111d54945dSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 121d54945dSmrg# PARTICULAR PURPOSE. 131d54945dSmrg 14ba85709eSmrgm4_ifndef([AC_AUTOCONF_VERSION], 15ba85709eSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16786a6f21Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 17ba85709eSmrg[m4_warning([this file was generated for autoconf 2.63. 18ba85709eSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19ba85709eSmrgIf you have problems, you may need to regenerate the build system entirely. 20ba85709eSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21ba85709eSmrg 221d54945dSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 231d54945dSmrg 24ec713c28Smrg# serial 52 AC_PROG_LIBTOOL 251d54945dSmrg 261d54945dSmrg 27ec713c28Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 28ec713c28Smrg# ----------------------------------------------------------- 29ec713c28Smrg# If this macro is not defined by Autoconf, define it here. 30ec713c28Smrgm4_ifdef([AC_PROVIDE_IFELSE], 31ec713c28Smrg [], 32ec713c28Smrg [m4_define([AC_PROVIDE_IFELSE], 33ec713c28Smrg [m4_ifdef([AC_PROVIDE_$1], 34ec713c28Smrg [$2], [$3])])]) 35786a6f21Smrg 36786a6f21Smrg 37ec713c28Smrg# AC_PROG_LIBTOOL 38ec713c28Smrg# --------------- 39ec713c28SmrgAC_DEFUN([AC_PROG_LIBTOOL], 40ec713c28Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 41ec713c28Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 42ec713c28Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 43ec713c28Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 44ec713c28Smrg [AC_LIBTOOL_CXX], 45ec713c28Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 46ec713c28Smrg ])]) 47ec713c28Smrgdnl And a similar setup for Fortran 77 support 48ec713c28Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 49ec713c28Smrg [AC_LIBTOOL_F77], 50ec713c28Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 51ec713c28Smrg])]) 52ec713c28Smrg 53ec713c28Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 54ec713c28Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 55ec713c28Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 56ec713c28Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 57ec713c28Smrg [AC_LIBTOOL_GCJ], 58ec713c28Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 59ec713c28Smrg [AC_LIBTOOL_GCJ], 60ec713c28Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 61ec713c28Smrg [AC_LIBTOOL_GCJ], 62ec713c28Smrg [ifdef([AC_PROG_GCJ], 63ec713c28Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 64ec713c28Smrg ifdef([A][M_PROG_GCJ], 65ec713c28Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 66ec713c28Smrg ifdef([LT_AC_PROG_GCJ], 67ec713c28Smrg [define([LT_AC_PROG_GCJ], 68ec713c28Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 69ec713c28Smrg])])# AC_PROG_LIBTOOL 70ec713c28Smrg 71ec713c28Smrg 72ec713c28Smrg# _AC_PROG_LIBTOOL 73ec713c28Smrg# ---------------- 74ec713c28SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 75ec713c28Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 76ec713c28SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 77ec713c28SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 78ec713c28SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 791d54945dSmrg 801d54945dSmrg# This can be used to rebuild libtool when needed 81ec713c28SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 821d54945dSmrg 831d54945dSmrg# Always use our own libtool. 841d54945dSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 851d54945dSmrgAC_SUBST(LIBTOOL)dnl 861d54945dSmrg 87ec713c28Smrg# Prevent multiple expansion 88ec713c28Smrgdefine([AC_PROG_LIBTOOL], []) 89ec713c28Smrg])# _AC_PROG_LIBTOOL 90786a6f21Smrg 91786a6f21Smrg 92ec713c28Smrg# AC_LIBTOOL_SETUP 93ec713c28Smrg# ---------------- 94ec713c28SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 95ec713c28Smrg[AC_PREREQ(2.50)dnl 96ec713c28SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 97ec713c28SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 98ec713c28SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 99ec713c28SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 1001d54945dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1011d54945dSmrgAC_REQUIRE([AC_PROG_CC])dnl 102ec713c28SmrgAC_REQUIRE([AC_PROG_LD])dnl 103ec713c28SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 104ec713c28SmrgAC_REQUIRE([AC_PROG_NM])dnl 105ec713c28Smrg 1061d54945dSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 107ec713c28SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 108ec713c28Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 109ec713c28SmrgAC_REQUIRE([AC_OBJEXT])dnl 110ec713c28SmrgAC_REQUIRE([AC_EXEEXT])dnl 111786a6f21Smrgdnl 112ec713c28SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 113ec713c28SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 114ec713c28SmrgAC_LIBTOOL_OBJDIR 115786a6f21Smrg 116ec713c28SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 117ec713c28Smrg_LT_AC_PROG_ECHO_BACKSLASH 1181d54945dSmrg 1191d54945dSmrgcase $host_os in 1201d54945dSmrgaix3*) 1211d54945dSmrg # AIX sometimes has problems with the GCC collect2 program. For some 1221d54945dSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 1231d54945dSmrg # vanish in a puff of smoke. 1241d54945dSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 1251d54945dSmrg COLLECT_NAMES= 1261d54945dSmrg export COLLECT_NAMES 1271d54945dSmrg fi 1281d54945dSmrg ;; 1291d54945dSmrgesac 1301d54945dSmrg 1311d54945dSmrg# Sed substitution that helps us do robust quoting. It backslashifies 1321d54945dSmrg# metacharacters that are still active within double-quoted strings. 133ec713c28SmrgXsed='sed -e 1s/^X//' 134ec713c28Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 1351d54945dSmrg 1361d54945dSmrg# Same as above, but do not quote variable references. 137ec713c28Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 1381d54945dSmrg 1391d54945dSmrg# Sed substitution to delay expansion of an escaped shell variable in a 1401d54945dSmrg# double_quote_subst'ed string. 1411d54945dSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1421d54945dSmrg 1431d54945dSmrg# Sed substitution to avoid accidental globbing in evaled expressions 1441d54945dSmrgno_glob_subst='s/\*/\\\*/g' 1451d54945dSmrg 146ec713c28Smrg# Constants: 147ec713c28Smrgrm="rm -f" 148ec713c28Smrg 1491d54945dSmrg# Global variables: 150ec713c28Smrgdefault_ofile=libtool 1511d54945dSmrgcan_build_shared=yes 1521d54945dSmrg 1531d54945dSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 1541d54945dSmrg# which needs '.lib'). 1551d54945dSmrglibext=a 156ec713c28Smrgltmain="$ac_aux_dir/ltmain.sh" 157ec713c28Smrgofile="$default_ofile" 158786a6f21Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1591d54945dSmrg 160ec713c28SmrgAC_CHECK_TOOL(AR, ar, false) 161ec713c28SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 162ec713c28SmrgAC_CHECK_TOOL(STRIP, strip, :) 163ec713c28Smrg 1641d54945dSmrgold_CC="$CC" 1651d54945dSmrgold_CFLAGS="$CFLAGS" 1661d54945dSmrg 1671d54945dSmrg# Set sane defaults for various variables 168ec713c28Smrgtest -z "$AR" && AR=ar 169ec713c28Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 170ec713c28Smrgtest -z "$AS" && AS=as 1711d54945dSmrgtest -z "$CC" && CC=cc 1721d54945dSmrgtest -z "$LTCC" && LTCC=$CC 1731d54945dSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 174ec713c28Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 1751d54945dSmrgtest -z "$LD" && LD=ld 176ec713c28Smrgtest -z "$LN_S" && LN_S="ln -s" 177ec713c28Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 178ec713c28Smrgtest -z "$NM" && NM=nm 179ec713c28Smrgtest -z "$SED" && SED=sed 180ec713c28Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 181ec713c28Smrgtest -z "$RANLIB" && RANLIB=: 182ec713c28Smrgtest -z "$STRIP" && STRIP=: 1831d54945dSmrgtest -z "$ac_objext" && ac_objext=o 1841d54945dSmrg 185ec713c28Smrg# Determine commands to create old-style static archives. 186ec713c28Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 187ec713c28Smrgold_postinstall_cmds='chmod 644 $oldlib' 188ec713c28Smrgold_postuninstall_cmds= 189ec713c28Smrg 190ec713c28Smrgif test -n "$RANLIB"; then 191ec713c28Smrg case $host_os in 192ec713c28Smrg openbsd*) 193ec713c28Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 194ec713c28Smrg ;; 195ec713c28Smrg *) 196ec713c28Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 197ec713c28Smrg ;; 198ec713c28Smrg esac 199ec713c28Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 200ec713c28Smrgfi 201ec713c28Smrg 2021d54945dSmrg_LT_CC_BASENAME([$compiler]) 2031d54945dSmrg 2041d54945dSmrg# Only perform the check for file, if the check method requires it 2051d54945dSmrgcase $deplibs_check_method in 2061d54945dSmrgfile_magic*) 2071d54945dSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 208ec713c28Smrg AC_PATH_MAGIC 2091d54945dSmrg fi 2101d54945dSmrg ;; 2111d54945dSmrgesac 2121d54945dSmrg 213ec713c28Smrg_LT_REQUIRED_DARWIN_CHECKS 214786a6f21Smrg 215ec713c28SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 216ec713c28SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 217ec713c28Smrgenable_win32_dll=yes, enable_win32_dll=no) 218786a6f21Smrg 219ec713c28SmrgAC_ARG_ENABLE([libtool-lock], 220ec713c28Smrg [AC_HELP_STRING([--disable-libtool-lock], 221ec713c28Smrg [avoid locking (might break parallel builds)])]) 222ec713c28Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 223786a6f21Smrg 224ec713c28SmrgAC_ARG_WITH([pic], 225ec713c28Smrg [AC_HELP_STRING([--with-pic], 226ec713c28Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 227ec713c28Smrg [pic_mode="$withval"], 228ec713c28Smrg [pic_mode=default]) 229ec713c28Smrgtest -z "$pic_mode" && pic_mode=default 230786a6f21Smrg 231ec713c28Smrg# Use C for the default configuration in the libtool script 232ec713c28Smrgtagname= 233ec713c28SmrgAC_LIBTOOL_LANG_C_CONFIG 234ec713c28Smrg_LT_AC_TAGCONFIG 235ec713c28Smrg])# AC_LIBTOOL_SETUP 236786a6f21Smrg 237786a6f21Smrg 238ec713c28Smrg# _LT_AC_SYS_COMPILER 2391d54945dSmrg# ------------------- 240ec713c28SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 2411d54945dSmrg[AC_REQUIRE([AC_PROG_CC])dnl 2421d54945dSmrg 2431d54945dSmrg# If no C compiler was specified, use CC. 2441d54945dSmrgLTCC=${LTCC-"$CC"} 2451d54945dSmrg 2461d54945dSmrg# If no C compiler flags were specified, use CFLAGS. 2471d54945dSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2481d54945dSmrg 2491d54945dSmrg# Allow CC to be a program name with arguments. 2501d54945dSmrgcompiler=$CC 251ec713c28Smrg])# _LT_AC_SYS_COMPILER 252ec713c28Smrg 253ec713c28Smrg 254ec713c28Smrg# _LT_CC_BASENAME(CC) 255ec713c28Smrg# ------------------- 256ec713c28Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 257ec713c28SmrgAC_DEFUN([_LT_CC_BASENAME], 258ec713c28Smrg[for cc_temp in $1""; do 259ec713c28Smrg case $cc_temp in 260ec713c28Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 261ec713c28Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 262ec713c28Smrg \-*) ;; 263ec713c28Smrg *) break;; 264ec713c28Smrg esac 265ec713c28Smrgdone 266ec713c28Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 267ec713c28Smrg]) 2681d54945dSmrg 2691d54945dSmrg 2701d54945dSmrg# _LT_COMPILER_BOILERPLATE 2711d54945dSmrg# ------------------------ 2721d54945dSmrg# Check for compiler boilerplate output or warnings with 2731d54945dSmrg# the simple compiler test code. 274ec713c28SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 275ec713c28Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 276ba85709eSmrgac_outfile=conftest.$ac_objext 277ba85709eSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 2781d54945dSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2791d54945dSmrg_lt_compiler_boilerplate=`cat conftest.err` 280ec713c28Smrg$rm conftest* 2811d54945dSmrg])# _LT_COMPILER_BOILERPLATE 2821d54945dSmrg 2831d54945dSmrg 2841d54945dSmrg# _LT_LINKER_BOILERPLATE 2851d54945dSmrg# ---------------------- 2861d54945dSmrg# Check for linker boilerplate output or warnings with 2871d54945dSmrg# the simple link test code. 288ec713c28SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 289ec713c28Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 290ba85709eSmrgac_outfile=conftest.$ac_objext 291ba85709eSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 2921d54945dSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2931d54945dSmrg_lt_linker_boilerplate=`cat conftest.err` 294ec713c28Smrg$rm -r conftest* 2951d54945dSmrg])# _LT_LINKER_BOILERPLATE 2961d54945dSmrg 297ba85709eSmrg# _LT_REQUIRED_DARWIN_CHECKS 298ec713c28Smrg# -------------------------- 299ec713c28Smrg# Check for some things on darwin 300ec713c28SmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ 301ba85709eSmrg case $host_os in 302ba85709eSmrg rhapsody* | darwin*) 303ba85709eSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 304ba85709eSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 305ba85709eSmrg 306ba85709eSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 307ba85709eSmrg [lt_cv_apple_cc_single_mod=no 308ba85709eSmrg if test -z "${LT_MULTI_MODULE}"; then 309ec713c28Smrg # By default we will add the -single_module flag. You can override 310ec713c28Smrg # by either setting the environment variable LT_MULTI_MODULE 311ec713c28Smrg # non-empty at configure time, or by adding -multi_module to the 312ec713c28Smrg # link flags. 313ec713c28Smrg echo "int foo(void){return 1;}" > conftest.c 314ec713c28Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 315ec713c28Smrg -dynamiclib ${wl}-single_module conftest.c 316ec713c28Smrg if test -f libconftest.dylib; then 317ec713c28Smrg lt_cv_apple_cc_single_mod=yes 318ec713c28Smrg rm -rf libconftest.dylib* 319ec713c28Smrg fi 320ec713c28Smrg rm conftest.c 321ba85709eSmrg fi]) 322ba85709eSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 323ba85709eSmrg [lt_cv_ld_exported_symbols_list], 324ba85709eSmrg [lt_cv_ld_exported_symbols_list=no 325ba85709eSmrg save_LDFLAGS=$LDFLAGS 326ba85709eSmrg echo "_main" > conftest.sym 327ba85709eSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 328ba85709eSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 329ec713c28Smrg [lt_cv_ld_exported_symbols_list=yes], 330ec713c28Smrg [lt_cv_ld_exported_symbols_list=no]) 331ec713c28Smrg LDFLAGS="$save_LDFLAGS" 332ba85709eSmrg ]) 333ba85709eSmrg case $host_os in 334ec713c28Smrg rhapsody* | darwin1.[[0123]]) 335ba85709eSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 336ba85709eSmrg darwin1.*) 337ec713c28Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 338ec713c28Smrg darwin*) 339ba85709eSmrg # if running on 10.5 or later, the deployment target defaults 340ba85709eSmrg # to the OS version, if on x86, and 10.4, the deployment 341ba85709eSmrg # target defaults to 10.4. Don't you love it? 342ba85709eSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 343ec713c28Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 344ec713c28Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 345ec713c28Smrg 10.[[012]]*) 346ec713c28Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 347ec713c28Smrg 10.*) 348ec713c28Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 349ba85709eSmrg esac 350ba85709eSmrg ;; 351ba85709eSmrg esac 352ba85709eSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 353ba85709eSmrg _lt_dar_single_mod='$single_module' 354ba85709eSmrg fi 355ba85709eSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 356ba85709eSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 357ba85709eSmrg else 358ec713c28Smrg _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 359ba85709eSmrg fi 360ba85709eSmrg if test "$DSYMUTIL" != ":"; then 361ec713c28Smrg _lt_dsymutil="~$DSYMUTIL \$lib || :" 362ba85709eSmrg else 363ba85709eSmrg _lt_dsymutil= 364ba85709eSmrg fi 365ba85709eSmrg ;; 366ba85709eSmrg esac 367ba85709eSmrg]) 3681d54945dSmrg 369ec713c28Smrg# _LT_AC_SYS_LIBPATH_AIX 370ec713c28Smrg# ---------------------- 3711d54945dSmrg# Links a minimal program and checks the executable 3721d54945dSmrg# for the system default hardcoded library path. In most cases, 3731d54945dSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 3741d54945dSmrg# the location of the communication and MPI libs are included too. 3751d54945dSmrg# If we don't find anything, use the default library path according 3761d54945dSmrg# to the aix ld manual. 377ec713c28SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 378ec713c28Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 379ba85709eSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 380ba85709eSmrglt_aix_libpath_sed=' 381ba85709eSmrg /Import File Strings/,/^$/ { 382ba85709eSmrg /^0/ { 383ba85709eSmrg s/^0 *\(.*\)$/\1/ 384ba85709eSmrg p 385ba85709eSmrg } 386ba85709eSmrg }' 387ba85709eSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3881d54945dSmrg# Check for a 64-bit object if we didn't find anything. 389ba85709eSmrgif test -z "$aix_libpath"; then 390ba85709eSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 391ba85709eSmrgfi],[]) 3921d54945dSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 393ec713c28Smrg])# _LT_AC_SYS_LIBPATH_AIX 3941d54945dSmrg 3951d54945dSmrg 396ec713c28Smrg# _LT_AC_SHELL_INIT(ARG) 397ec713c28Smrg# ---------------------- 398ec713c28SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 3991d54945dSmrg[ifdef([AC_DIVERSION_NOTICE], 4001d54945dSmrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 4011d54945dSmrg [AC_DIVERT_PUSH(NOTICE)]) 4021d54945dSmrg$1 4031d54945dSmrgAC_DIVERT_POP 404ec713c28Smrg])# _LT_AC_SHELL_INIT 4051d54945dSmrg 4061d54945dSmrg 407ec713c28Smrg# _LT_AC_PROG_ECHO_BACKSLASH 408ec713c28Smrg# -------------------------- 4091d54945dSmrg# Add some code to the start of the generated configure script which 4101d54945dSmrg# will find an echo command which doesn't interpret backslashes. 411ec713c28SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 412ec713c28Smrg[_LT_AC_SHELL_INIT([ 4131d54945dSmrg# Check that we are running under the correct shell. 4141d54945dSmrgSHELL=${CONFIG_SHELL-/bin/sh} 4151d54945dSmrg 416ec713c28Smrgcase X$ECHO in 4171d54945dSmrgX*--fallback-echo) 4181d54945dSmrg # Remove one level of quotation (which was required for Make). 419ec713c28Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 4201d54945dSmrg ;; 4211d54945dSmrgesac 4221d54945dSmrg 423ec713c28Smrgecho=${ECHO-echo} 4241d54945dSmrgif test "X[$]1" = X--no-reexec; then 4251d54945dSmrg # Discard the --no-reexec flag, and continue. 4261d54945dSmrg shift 4271d54945dSmrgelif test "X[$]1" = X--fallback-echo; then 4281d54945dSmrg # Avoid inline document here, it may be left over 4291d54945dSmrg : 430ec713c28Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 431ec713c28Smrg # Yippee, $echo works! 4321d54945dSmrg : 4331d54945dSmrgelse 4341d54945dSmrg # Restart under the correct shell. 4351d54945dSmrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 4361d54945dSmrgfi 4371d54945dSmrg 4381d54945dSmrgif test "X[$]1" = X--fallback-echo; then 4391d54945dSmrg # used as fallback echo 4401d54945dSmrg shift 441ec713c28Smrg cat <<EOF 4421d54945dSmrg[$]* 443ec713c28SmrgEOF 4441d54945dSmrg exit 0 4451d54945dSmrgfi 4461d54945dSmrg 4471d54945dSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 4481d54945dSmrg# if CDPATH is set. 4491d54945dSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4501d54945dSmrg 451ec713c28Smrgif test -z "$ECHO"; then 452ec713c28Smrgif test "X${echo_test_string+set}" != Xset; then 453ec713c28Smrg# find a string as large as possible, as long as the shell can cope with it 454ec713c28Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 455ec713c28Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 456ec713c28Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 457ec713c28Smrg echo_test_string=`eval $cmd` && 458ec713c28Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 459ec713c28Smrg then 460ec713c28Smrg break 461ec713c28Smrg fi 462ec713c28Smrg done 463ec713c28Smrgfi 4641d54945dSmrg 465ec713c28Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 466ec713c28Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 467ec713c28Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 468ec713c28Smrg : 469ec713c28Smrgelse 470ec713c28Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 471ec713c28Smrg # backslashes. This makes it impossible to quote backslashes using 472ec713c28Smrg # echo "$something" | sed 's/\\/\\\\/g' 473ec713c28Smrg # 474ec713c28Smrg # So, first we look for a working echo in the user's PATH. 4751d54945dSmrg 476ec713c28Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 477ec713c28Smrg for dir in $PATH /usr/ucb; do 4781d54945dSmrg IFS="$lt_save_ifs" 479ec713c28Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 480ec713c28Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 481ec713c28Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 482ec713c28Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 483ec713c28Smrg echo="$dir/echo" 484ec713c28Smrg break 485ec713c28Smrg fi 486ec713c28Smrg done 487ec713c28Smrg IFS="$lt_save_ifs" 4881d54945dSmrg 489ec713c28Smrg if test "X$echo" = Xecho; then 490ec713c28Smrg # We didn't find a better echo, so look for alternatives. 491ec713c28Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 492ec713c28Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 493ec713c28Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 494ec713c28Smrg # This shell has a builtin print -r that does the trick. 495ec713c28Smrg echo='print -r' 496ec713c28Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 497ec713c28Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 498ec713c28Smrg # If we have ksh, try running configure again with it. 499ec713c28Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 500ec713c28Smrg export ORIGINAL_CONFIG_SHELL 501ec713c28Smrg CONFIG_SHELL=/bin/ksh 502ec713c28Smrg export CONFIG_SHELL 503ec713c28Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 504ec713c28Smrg else 505ec713c28Smrg # Try using printf. 506ec713c28Smrg echo='printf %s\n' 507ec713c28Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 508ec713c28Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 509ec713c28Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 510ec713c28Smrg # Cool, printf works 511ec713c28Smrg : 512ec713c28Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 513ec713c28Smrg test "X$echo_testing_string" = 'X\t' && 514ec713c28Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 515786a6f21Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 516ec713c28Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 517ec713c28Smrg export CONFIG_SHELL 518ec713c28Smrg SHELL="$CONFIG_SHELL" 519ec713c28Smrg export SHELL 520ec713c28Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 521ec713c28Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 522ec713c28Smrg test "X$echo_testing_string" = 'X\t' && 523ec713c28Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 524ec713c28Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 525ec713c28Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 526ec713c28Smrg else 527ec713c28Smrg # maybe with a smaller string... 528ec713c28Smrg prev=: 5291d54945dSmrg 530ec713c28Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 531ec713c28Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 532ec713c28Smrg then 533ec713c28Smrg break 534786a6f21Smrg fi 535ec713c28Smrg prev="$cmd" 536ec713c28Smrg done 537ec713c28Smrg 538ec713c28Smrg if test "$prev" != 'sed 50q "[$]0"'; then 539ec713c28Smrg echo_test_string=`eval $prev` 540ec713c28Smrg export echo_test_string 541ec713c28Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 542ec713c28Smrg else 543ec713c28Smrg # Oops. We lost completely, so just stick with echo. 544ec713c28Smrg echo=echo 545ec713c28Smrg fi 5461d54945dSmrg fi 5471d54945dSmrg fi 5481d54945dSmrg fi 5491d54945dSmrgfi 550ec713c28Smrgfi 5511d54945dSmrg 5521d54945dSmrg# Copy echo and quote the copy suitably for passing to libtool from 5531d54945dSmrg# the Makefile, instead of quoting the original, which is used later. 554ec713c28SmrgECHO=$echo 555ec713c28Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 556ec713c28Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 5571d54945dSmrgfi 5581d54945dSmrg 559ec713c28SmrgAC_SUBST(ECHO) 560ec713c28Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 5611d54945dSmrg 5621d54945dSmrg 563ec713c28Smrg# _LT_AC_LOCK 564ec713c28Smrg# ----------- 565ec713c28SmrgAC_DEFUN([_LT_AC_LOCK], 5661d54945dSmrg[AC_ARG_ENABLE([libtool-lock], 567ec713c28Smrg [AC_HELP_STRING([--disable-libtool-lock], 568ec713c28Smrg [avoid locking (might break parallel builds)])]) 5691d54945dSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 5701d54945dSmrg 5711d54945dSmrg# Some flags need to be propagated to the compiler or linker for good 5721d54945dSmrg# libtool support. 5731d54945dSmrgcase $host in 5741d54945dSmrgia64-*-hpux*) 5751d54945dSmrg # Find out which ABI we are using. 5761d54945dSmrg echo 'int i;' > conftest.$ac_ext 5771d54945dSmrg if AC_TRY_EVAL(ac_compile); then 5781d54945dSmrg case `/usr/bin/file conftest.$ac_objext` in 579ec713c28Smrg *ELF-32*) 580ec713c28Smrg HPUX_IA64_MODE="32" 581ec713c28Smrg ;; 582ec713c28Smrg *ELF-64*) 583ec713c28Smrg HPUX_IA64_MODE="64" 584ec713c28Smrg ;; 5851d54945dSmrg esac 5861d54945dSmrg fi 5871d54945dSmrg rm -rf conftest* 5881d54945dSmrg ;; 5891d54945dSmrg*-*-irix6*) 5901d54945dSmrg # Find out which ABI we are using. 5911d54945dSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 5921d54945dSmrg if AC_TRY_EVAL(ac_compile); then 593ec713c28Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 594ec713c28Smrg case `/usr/bin/file conftest.$ac_objext` in 595ec713c28Smrg *32-bit*) 596ec713c28Smrg LD="${LD-ld} -melf32bsmip" 597ec713c28Smrg ;; 598ec713c28Smrg *N32*) 599ec713c28Smrg LD="${LD-ld} -melf32bmipn32" 600ec713c28Smrg ;; 601ec713c28Smrg *64-bit*) 602ec713c28Smrg LD="${LD-ld} -melf64bmip" 603ec713c28Smrg ;; 604ec713c28Smrg esac 605ec713c28Smrg else 606ec713c28Smrg case `/usr/bin/file conftest.$ac_objext` in 607ec713c28Smrg *32-bit*) 608ec713c28Smrg LD="${LD-ld} -32" 609ec713c28Smrg ;; 610ec713c28Smrg *N32*) 611ec713c28Smrg LD="${LD-ld} -n32" 612ec713c28Smrg ;; 613ec713c28Smrg *64-bit*) 614ec713c28Smrg LD="${LD-ld} -64" 615ec713c28Smrg ;; 616ec713c28Smrg esac 617ec713c28Smrg fi 6181d54945dSmrg fi 6191d54945dSmrg rm -rf conftest* 6201d54945dSmrg ;; 6211d54945dSmrg 622ba85709eSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 623ec713c28Smrgs390*-*linux*|sparc*-*linux*) 6241d54945dSmrg # Find out which ABI we are using. 6251d54945dSmrg echo 'int i;' > conftest.$ac_ext 6261d54945dSmrg if AC_TRY_EVAL(ac_compile); then 6271d54945dSmrg case `/usr/bin/file conftest.o` in 628ec713c28Smrg *32-bit*) 629ec713c28Smrg case $host in 630ec713c28Smrg x86_64-*kfreebsd*-gnu) 631ec713c28Smrg LD="${LD-ld} -m elf_i386_fbsd" 632ec713c28Smrg ;; 633ec713c28Smrg x86_64-*linux*) 634ec713c28Smrg LD="${LD-ld} -m elf_i386" 635ec713c28Smrg ;; 636ec713c28Smrg ppc64-*linux*|powerpc64-*linux*) 637ec713c28Smrg LD="${LD-ld} -m elf32ppclinux" 638ec713c28Smrg ;; 639ec713c28Smrg s390x-*linux*) 640ec713c28Smrg LD="${LD-ld} -m elf_s390" 641ec713c28Smrg ;; 642ec713c28Smrg sparc64-*linux*) 643ec713c28Smrg LD="${LD-ld} -m elf32_sparc" 644ec713c28Smrg ;; 645ec713c28Smrg esac 646ec713c28Smrg ;; 647ec713c28Smrg *64-bit*) 648ec713c28Smrg libsuff=64 649ec713c28Smrg case $host in 650ec713c28Smrg x86_64-*kfreebsd*-gnu) 651ec713c28Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 652ec713c28Smrg ;; 653ec713c28Smrg x86_64-*linux*) 654ec713c28Smrg LD="${LD-ld} -m elf_x86_64" 655ec713c28Smrg ;; 656ec713c28Smrg ppc*-*linux*|powerpc*-*linux*) 657ec713c28Smrg LD="${LD-ld} -m elf64ppc" 658ec713c28Smrg ;; 659ec713c28Smrg s390*-*linux*) 660ec713c28Smrg LD="${LD-ld} -m elf64_s390" 661ec713c28Smrg ;; 662ec713c28Smrg sparc*-*linux*) 663ec713c28Smrg LD="${LD-ld} -m elf64_sparc" 664ec713c28Smrg ;; 665ec713c28Smrg esac 666ec713c28Smrg ;; 6671d54945dSmrg esac 6681d54945dSmrg fi 6691d54945dSmrg rm -rf conftest* 6701d54945dSmrg ;; 6711d54945dSmrg 6721d54945dSmrg*-*-sco3.2v5*) 6731d54945dSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 6741d54945dSmrg SAVE_CFLAGS="$CFLAGS" 6751d54945dSmrg CFLAGS="$CFLAGS -belf" 6761d54945dSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 6771d54945dSmrg [AC_LANG_PUSH(C) 678ec713c28Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 6791d54945dSmrg AC_LANG_POP]) 6801d54945dSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 6811d54945dSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 6821d54945dSmrg CFLAGS="$SAVE_CFLAGS" 6831d54945dSmrg fi 6841d54945dSmrg ;; 6851d54945dSmrgsparc*-*solaris*) 6861d54945dSmrg # Find out which ABI we are using. 6871d54945dSmrg echo 'int i;' > conftest.$ac_ext 6881d54945dSmrg if AC_TRY_EVAL(ac_compile); then 6891d54945dSmrg case `/usr/bin/file conftest.o` in 6901d54945dSmrg *64-bit*) 6911d54945dSmrg case $lt_cv_prog_gnu_ld in 6921d54945dSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 693ba85709eSmrg *) 694ec713c28Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 695ba85709eSmrg LD="${LD-ld} -64" 696ba85709eSmrg fi 697ba85709eSmrg ;; 6981d54945dSmrg esac 6991d54945dSmrg ;; 7001d54945dSmrg esac 7011d54945dSmrg fi 7021d54945dSmrg rm -rf conftest* 7031d54945dSmrg ;; 704ec713c28Smrg 705ec713c28SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 706ec713c28Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 707ec713c28Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 708ec713c28Smrg AC_CHECK_TOOL(AS, as, false) 709ec713c28Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 710ec713c28Smrg ;; 711ec713c28Smrg ]) 7121d54945dSmrgesac 7131d54945dSmrg 7141d54945dSmrgneed_locks="$enable_libtool_lock" 715786a6f21Smrg 716ec713c28Smrg])# _LT_AC_LOCK 7171d54945dSmrg 7181d54945dSmrg 719ec713c28Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 7201d54945dSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 7211d54945dSmrg# ---------------------------------------------------------------- 7221d54945dSmrg# Check whether the given compiler option works 723ec713c28SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 724ec713c28Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 7251d54945dSmrgAC_CACHE_CHECK([$1], [$2], 7261d54945dSmrg [$2=no 727ec713c28Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 728ba85709eSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 7291d54945dSmrg lt_compiler_flag="$3" 7301d54945dSmrg # Insert the option either (1) after the last *FLAGS variable, or 7311d54945dSmrg # (2) before a word containing "conftest.", or (3) at the end. 7321d54945dSmrg # Note that $ac_compile itself does not contain backslashes and begins 7331d54945dSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 7341d54945dSmrg # The option is referenced via a variable to avoid confusing sed. 7351d54945dSmrg lt_compile=`echo "$ac_compile" | $SED \ 7361d54945dSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 7371d54945dSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 7381d54945dSmrg -e 's:$: $lt_compiler_flag:'` 7391d54945dSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 7401d54945dSmrg (eval "$lt_compile" 2>conftest.err) 7411d54945dSmrg ac_status=$? 7421d54945dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7431d54945dSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 7441d54945dSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 7451d54945dSmrg # The compiler can only warn and ignore the option if not recognized 7461d54945dSmrg # So say no if there are warnings other than the usual output. 747ec713c28Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 7481d54945dSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 7491d54945dSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 7501d54945dSmrg $2=yes 7511d54945dSmrg fi 7521d54945dSmrg fi 753ec713c28Smrg $rm conftest* 7541d54945dSmrg]) 7551d54945dSmrg 7561d54945dSmrgif test x"[$]$2" = xyes; then 757ec713c28Smrg ifelse([$5], , :, [$5]) 7581d54945dSmrgelse 759ec713c28Smrg ifelse([$6], , :, [$6]) 7601d54945dSmrgfi 761ec713c28Smrg])# AC_LIBTOOL_COMPILER_OPTION 7621d54945dSmrg 763786a6f21Smrg 764ec713c28Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 765ec713c28Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 766ec713c28Smrg# ------------------------------------------------------------ 767ec713c28Smrg# Check whether the given compiler option works 768ec713c28SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 769ec713c28Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 770ba85709eSmrgAC_CACHE_CHECK([$1], [$2], 7711d54945dSmrg [$2=no 7721d54945dSmrg save_LDFLAGS="$LDFLAGS" 7731d54945dSmrg LDFLAGS="$LDFLAGS $3" 774ba85709eSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 7751d54945dSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 7761d54945dSmrg # The linker can only warn and ignore the option if not recognized 7771d54945dSmrg # So say no if there are warnings 7781d54945dSmrg if test -s conftest.err; then 7791d54945dSmrg # Append any errors to the config.log. 7801d54945dSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 781ec713c28Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 7821d54945dSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 7831d54945dSmrg if diff conftest.exp conftest.er2 >/dev/null; then 7841d54945dSmrg $2=yes 7851d54945dSmrg fi 7861d54945dSmrg else 7871d54945dSmrg $2=yes 7881d54945dSmrg fi 7891d54945dSmrg fi 790ec713c28Smrg $rm -r conftest* 7911d54945dSmrg LDFLAGS="$save_LDFLAGS" 7921d54945dSmrg]) 7931d54945dSmrg 7941d54945dSmrgif test x"[$]$2" = xyes; then 795ec713c28Smrg ifelse([$4], , :, [$4]) 7961d54945dSmrgelse 797ec713c28Smrg ifelse([$5], , :, [$5]) 7981d54945dSmrgfi 799ec713c28Smrg])# AC_LIBTOOL_LINKER_OPTION 8001d54945dSmrg 8011d54945dSmrg 802ec713c28Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 803ec713c28Smrg# -------------------------- 804ec713c28SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 805ec713c28Smrg[# find the maximum length of command line arguments 8061d54945dSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 8071d54945dSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 8081d54945dSmrg i=0 8091d54945dSmrg teststring="ABCD" 8101d54945dSmrg 8111d54945dSmrg case $build_os in 8121d54945dSmrg msdosdjgpp*) 8131d54945dSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 8141d54945dSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 8151d54945dSmrg # during glob expansion). Even if it were fixed, the result of this 8161d54945dSmrg # check would be larger than it should be. 8171d54945dSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 8181d54945dSmrg ;; 8191d54945dSmrg 8201d54945dSmrg gnu*) 8211d54945dSmrg # Under GNU Hurd, this test is not required because there is 8221d54945dSmrg # no limit to the length of command line arguments. 8231d54945dSmrg # Libtool will interpret -1 as no limit whatsoever 8241d54945dSmrg lt_cv_sys_max_cmd_len=-1; 8251d54945dSmrg ;; 8261d54945dSmrg 827ec713c28Smrg cygwin* | mingw*) 8281d54945dSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 8291d54945dSmrg # about 5 minutes as the teststring grows exponentially. 8301d54945dSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 8311d54945dSmrg # you end up with a "frozen" computer, even though with patience 8321d54945dSmrg # the test eventually succeeds (with a max line length of 256k). 8331d54945dSmrg # Instead, let's just punt: use the minimum linelength reported by 8341d54945dSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 8351d54945dSmrg lt_cv_sys_max_cmd_len=8192; 8361d54945dSmrg ;; 8371d54945dSmrg 8381d54945dSmrg amigaos*) 8391d54945dSmrg # On AmigaOS with pdksh, this test takes hours, literally. 8401d54945dSmrg # So we just punt and use a minimum line length of 8192. 8411d54945dSmrg lt_cv_sys_max_cmd_len=8192; 8421d54945dSmrg ;; 8431d54945dSmrg 8441d54945dSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 8451d54945dSmrg # This has been around since 386BSD, at least. Likely further. 8461d54945dSmrg if test -x /sbin/sysctl; then 8471d54945dSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 8481d54945dSmrg elif test -x /usr/sbin/sysctl; then 8491d54945dSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 8501d54945dSmrg else 8511d54945dSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 8521d54945dSmrg fi 8531d54945dSmrg # And add a safety zone 8541d54945dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 8551d54945dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 8561d54945dSmrg ;; 8571d54945dSmrg 8581d54945dSmrg interix*) 8591d54945dSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 8601d54945dSmrg lt_cv_sys_max_cmd_len=196608 8611d54945dSmrg ;; 8621d54945dSmrg 8631d54945dSmrg osf*) 8641d54945dSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 8651d54945dSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 8661d54945dSmrg # nice to cause kernel panics so lets avoid the loop below. 8671d54945dSmrg # First set a reasonable default. 8681d54945dSmrg lt_cv_sys_max_cmd_len=16384 8691d54945dSmrg # 8701d54945dSmrg if test -x /sbin/sysconfig; then 8711d54945dSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 8721d54945dSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 8731d54945dSmrg esac 8741d54945dSmrg fi 8751d54945dSmrg ;; 8761d54945dSmrg sco3.2v5*) 8771d54945dSmrg lt_cv_sys_max_cmd_len=102400 8781d54945dSmrg ;; 8791d54945dSmrg sysv5* | sco5v6* | sysv4.2uw2*) 8801d54945dSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 8811d54945dSmrg if test -n "$kargmax"; then 882ec713c28Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 8831d54945dSmrg else 8841d54945dSmrg lt_cv_sys_max_cmd_len=32768 8851d54945dSmrg fi 8861d54945dSmrg ;; 8871d54945dSmrg *) 888ba85709eSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 889ba85709eSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 890ba85709eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 891ba85709eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 892ba85709eSmrg else 893ba85709eSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 894ec713c28Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 895ec713c28Smrg = "XX$teststring") >/dev/null 2>&1 && 896ec713c28Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 897ec713c28Smrg lt_cv_sys_max_cmd_len=$new_result && 898ba85709eSmrg test $i != 17 # 1/2 MB should be enough 899ba85709eSmrg do 900ba85709eSmrg i=`expr $i + 1` 901ba85709eSmrg teststring=$teststring$teststring 902ba85709eSmrg done 903ba85709eSmrg teststring= 904ec713c28Smrg # Add a significant safety factor because C++ compilers can tack on massive 905ec713c28Smrg # amounts of additional arguments before passing them to the linker. 906ec713c28Smrg # It appears as though 1/2 is a usable value. 907ba85709eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 908ba85709eSmrg fi 9091d54945dSmrg ;; 9101d54945dSmrg esac 9111d54945dSmrg]) 9121d54945dSmrgif test -n $lt_cv_sys_max_cmd_len ; then 9131d54945dSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 9141d54945dSmrgelse 9151d54945dSmrg AC_MSG_RESULT(none) 9161d54945dSmrgfi 917ec713c28Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 9181d54945dSmrg 9191d54945dSmrg 920ec713c28Smrg# _LT_AC_CHECK_DLFCN 921ec713c28Smrg# ------------------ 922ec713c28SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 923ec713c28Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 924ec713c28Smrg])# _LT_AC_CHECK_DLFCN 9251d54945dSmrg 9261d54945dSmrg 927ec713c28Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 928ec713c28Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 929ec713c28Smrg# --------------------------------------------------------------------- 930ec713c28SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 931ec713c28Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 9321d54945dSmrgif test "$cross_compiling" = yes; then : 9331d54945dSmrg [$4] 9341d54945dSmrgelse 9351d54945dSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 9361d54945dSmrg lt_status=$lt_dlunknown 937ec713c28Smrg cat > conftest.$ac_ext <<EOF 9381d54945dSmrg[#line __oline__ "configure" 9391d54945dSmrg#include "confdefs.h" 9401d54945dSmrg 9411d54945dSmrg#if HAVE_DLFCN_H 9421d54945dSmrg#include <dlfcn.h> 9431d54945dSmrg#endif 9441d54945dSmrg 9451d54945dSmrg#include <stdio.h> 9461d54945dSmrg 9471d54945dSmrg#ifdef RTLD_GLOBAL 9481d54945dSmrg# define LT_DLGLOBAL RTLD_GLOBAL 9491d54945dSmrg#else 9501d54945dSmrg# ifdef DL_GLOBAL 9511d54945dSmrg# define LT_DLGLOBAL DL_GLOBAL 9521d54945dSmrg# else 9531d54945dSmrg# define LT_DLGLOBAL 0 9541d54945dSmrg# endif 9551d54945dSmrg#endif 9561d54945dSmrg 9571d54945dSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 9581d54945dSmrg find out it does not work in some platform. */ 9591d54945dSmrg#ifndef LT_DLLAZY_OR_NOW 9601d54945dSmrg# ifdef RTLD_LAZY 9611d54945dSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 9621d54945dSmrg# else 9631d54945dSmrg# ifdef DL_LAZY 9641d54945dSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 9651d54945dSmrg# else 9661d54945dSmrg# ifdef RTLD_NOW 9671d54945dSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 9681d54945dSmrg# else 9691d54945dSmrg# ifdef DL_NOW 9701d54945dSmrg# define LT_DLLAZY_OR_NOW DL_NOW 9711d54945dSmrg# else 9721d54945dSmrg# define LT_DLLAZY_OR_NOW 0 9731d54945dSmrg# endif 9741d54945dSmrg# endif 9751d54945dSmrg# endif 9761d54945dSmrg# endif 9771d54945dSmrg#endif 9781d54945dSmrg 979ec713c28Smrg#ifdef __cplusplus 980ec713c28Smrgextern "C" void exit (int); 981ec713c28Smrg#endif 982ec713c28Smrg 9831d54945dSmrgvoid fnord() { int i=42;} 9841d54945dSmrgint main () 9851d54945dSmrg{ 9861d54945dSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 9871d54945dSmrg int status = $lt_dlunknown; 9881d54945dSmrg 9891d54945dSmrg if (self) 9901d54945dSmrg { 9911d54945dSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 9921d54945dSmrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 9931d54945dSmrg /* dlclose (self); */ 9941d54945dSmrg } 9951d54945dSmrg else 9961d54945dSmrg puts (dlerror ()); 9971d54945dSmrg 998ec713c28Smrg exit (status); 9991d54945dSmrg}] 1000ec713c28SmrgEOF 10011d54945dSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 10021d54945dSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 10031d54945dSmrg lt_status=$? 10041d54945dSmrg case x$lt_status in 10051d54945dSmrg x$lt_dlno_uscore) $1 ;; 10061d54945dSmrg x$lt_dlneed_uscore) $2 ;; 10071d54945dSmrg x$lt_dlunknown|x*) $3 ;; 10081d54945dSmrg esac 10091d54945dSmrg else : 10101d54945dSmrg # compilation failed 10111d54945dSmrg $3 10121d54945dSmrg fi 10131d54945dSmrgfi 10141d54945dSmrgrm -fr conftest* 1015ec713c28Smrg])# _LT_AC_TRY_DLOPEN_SELF 10161d54945dSmrg 10171d54945dSmrg 1018ec713c28Smrg# AC_LIBTOOL_DLOPEN_SELF 1019ec713c28Smrg# ---------------------- 1020ec713c28SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 1021ec713c28Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 10221d54945dSmrgif test "x$enable_dlopen" != xyes; then 10231d54945dSmrg enable_dlopen=unknown 10241d54945dSmrg enable_dlopen_self=unknown 10251d54945dSmrg enable_dlopen_self_static=unknown 10261d54945dSmrgelse 10271d54945dSmrg lt_cv_dlopen=no 10281d54945dSmrg lt_cv_dlopen_libs= 10291d54945dSmrg 10301d54945dSmrg case $host_os in 10311d54945dSmrg beos*) 10321d54945dSmrg lt_cv_dlopen="load_add_on" 10331d54945dSmrg lt_cv_dlopen_libs= 10341d54945dSmrg lt_cv_dlopen_self=yes 10351d54945dSmrg ;; 10361d54945dSmrg 1037ec713c28Smrg mingw* | pw32*) 10381d54945dSmrg lt_cv_dlopen="LoadLibrary" 10391d54945dSmrg lt_cv_dlopen_libs= 1040ec713c28Smrg ;; 10411d54945dSmrg 10421d54945dSmrg cygwin*) 10431d54945dSmrg lt_cv_dlopen="dlopen" 10441d54945dSmrg lt_cv_dlopen_libs= 1045ec713c28Smrg ;; 10461d54945dSmrg 10471d54945dSmrg darwin*) 10481d54945dSmrg # if libdl is installed we need to link against it 10491d54945dSmrg AC_CHECK_LIB([dl], [dlopen], 10501d54945dSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 10511d54945dSmrg lt_cv_dlopen="dyld" 10521d54945dSmrg lt_cv_dlopen_libs= 10531d54945dSmrg lt_cv_dlopen_self=yes 10541d54945dSmrg ]) 1055ec713c28Smrg ;; 10561d54945dSmrg 10571d54945dSmrg *) 10581d54945dSmrg AC_CHECK_FUNC([shl_load], 10591d54945dSmrg [lt_cv_dlopen="shl_load"], 10601d54945dSmrg [AC_CHECK_LIB([dld], [shl_load], 1061ba85709eSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 10621d54945dSmrg [AC_CHECK_FUNC([dlopen], 10631d54945dSmrg [lt_cv_dlopen="dlopen"], 10641d54945dSmrg [AC_CHECK_LIB([dl], [dlopen], 10651d54945dSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 10661d54945dSmrg [AC_CHECK_LIB([svld], [dlopen], 10671d54945dSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 10681d54945dSmrg [AC_CHECK_LIB([dld], [dld_link], 1069ba85709eSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 10701d54945dSmrg ]) 10711d54945dSmrg ]) 10721d54945dSmrg ]) 10731d54945dSmrg ]) 10741d54945dSmrg ]) 10751d54945dSmrg ;; 10761d54945dSmrg esac 10771d54945dSmrg 10781d54945dSmrg if test "x$lt_cv_dlopen" != xno; then 10791d54945dSmrg enable_dlopen=yes 10801d54945dSmrg else 10811d54945dSmrg enable_dlopen=no 10821d54945dSmrg fi 10831d54945dSmrg 10841d54945dSmrg case $lt_cv_dlopen in 10851d54945dSmrg dlopen) 10861d54945dSmrg save_CPPFLAGS="$CPPFLAGS" 10871d54945dSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 10881d54945dSmrg 10891d54945dSmrg save_LDFLAGS="$LDFLAGS" 10901d54945dSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 10911d54945dSmrg 10921d54945dSmrg save_LIBS="$LIBS" 10931d54945dSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 10941d54945dSmrg 10951d54945dSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 10961d54945dSmrg lt_cv_dlopen_self, [dnl 1097ec713c28Smrg _LT_AC_TRY_DLOPEN_SELF( 10981d54945dSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 10991d54945dSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 11001d54945dSmrg ]) 11011d54945dSmrg 11021d54945dSmrg if test "x$lt_cv_dlopen_self" = xyes; then 11031d54945dSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 11041d54945dSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1105ec713c28Smrg lt_cv_dlopen_self_static, [dnl 1106ec713c28Smrg _LT_AC_TRY_DLOPEN_SELF( 11071d54945dSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 11081d54945dSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 11091d54945dSmrg ]) 11101d54945dSmrg fi 11111d54945dSmrg 11121d54945dSmrg CPPFLAGS="$save_CPPFLAGS" 11131d54945dSmrg LDFLAGS="$save_LDFLAGS" 11141d54945dSmrg LIBS="$save_LIBS" 11151d54945dSmrg ;; 11161d54945dSmrg esac 11171d54945dSmrg 11181d54945dSmrg case $lt_cv_dlopen_self in 11191d54945dSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 11201d54945dSmrg *) enable_dlopen_self=unknown ;; 11211d54945dSmrg esac 11221d54945dSmrg 11231d54945dSmrg case $lt_cv_dlopen_self_static in 11241d54945dSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 11251d54945dSmrg *) enable_dlopen_self_static=unknown ;; 11261d54945dSmrg esac 11271d54945dSmrgfi 1128ec713c28Smrg])# AC_LIBTOOL_DLOPEN_SELF 11291d54945dSmrg 1130786a6f21Smrg 1131ec713c28Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 1132ec713c28Smrg# --------------------------------- 1133ec713c28Smrg# Check to see if options -c and -o are simultaneously supported by compiler 1134ec713c28SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 1135ec713c28Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1136ec713c28SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 11371d54945dSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1138ec713c28Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1139ec713c28Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1140ec713c28Smrg $rm -r conftest 2>/dev/null 11411d54945dSmrg mkdir conftest 11421d54945dSmrg cd conftest 11431d54945dSmrg mkdir out 1144ba85709eSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 11451d54945dSmrg 11461d54945dSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 11471d54945dSmrg # Insert the option either (1) after the last *FLAGS variable, or 11481d54945dSmrg # (2) before a word containing "conftest.", or (3) at the end. 11491d54945dSmrg # Note that $ac_compile itself does not contain backslashes and begins 11501d54945dSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 11511d54945dSmrg lt_compile=`echo "$ac_compile" | $SED \ 11521d54945dSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 11531d54945dSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 11541d54945dSmrg -e 's:$: $lt_compiler_flag:'` 11551d54945dSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 11561d54945dSmrg (eval "$lt_compile" 2>out/conftest.err) 11571d54945dSmrg ac_status=$? 11581d54945dSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 11591d54945dSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 11601d54945dSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 11611d54945dSmrg then 11621d54945dSmrg # The compiler can only warn and ignore the option if not recognized 11631d54945dSmrg # So say no if there are warnings 1164ec713c28Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 11651d54945dSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 11661d54945dSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1167ec713c28Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11681d54945dSmrg fi 11691d54945dSmrg fi 11701d54945dSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1171ec713c28Smrg $rm conftest* 11721d54945dSmrg # SGI C++ compiler will create directory out/ii_files/ for 11731d54945dSmrg # template instantiation 1174ec713c28Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1175ec713c28Smrg $rm out/* && rmdir out 11761d54945dSmrg cd .. 1177ec713c28Smrg rmdir conftest 1178ec713c28Smrg $rm conftest* 11791d54945dSmrg]) 1180ec713c28Smrg])# AC_LIBTOOL_PROG_CC_C_O 11811d54945dSmrg 11821d54945dSmrg 1183ec713c28Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1184ec713c28Smrg# ----------------------------------------- 11851d54945dSmrg# Check to see if we can do hard links to lock some files if needed 1186ec713c28SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1187ec713c28Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 11881d54945dSmrg 11891d54945dSmrghard_links="nottested" 1190ec713c28Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 11911d54945dSmrg # do not overwrite the value of need_locks provided by the user 11921d54945dSmrg AC_MSG_CHECKING([if we can lock with hard links]) 11931d54945dSmrg hard_links=yes 1194ec713c28Smrg $rm conftest* 11951d54945dSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 11961d54945dSmrg touch conftest.a 11971d54945dSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 11981d54945dSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 11991d54945dSmrg AC_MSG_RESULT([$hard_links]) 12001d54945dSmrg if test "$hard_links" = no; then 12011d54945dSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 12021d54945dSmrg need_locks=warn 12031d54945dSmrg fi 12041d54945dSmrgelse 12051d54945dSmrg need_locks=no 12061d54945dSmrgfi 1207ec713c28Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 12081d54945dSmrg 12091d54945dSmrg 1210ec713c28Smrg# AC_LIBTOOL_OBJDIR 1211ec713c28Smrg# ----------------- 1212ec713c28SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 12131d54945dSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 12141d54945dSmrg[rm -f .libs 2>/dev/null 12151d54945dSmrgmkdir .libs 2>/dev/null 12161d54945dSmrgif test -d .libs; then 12171d54945dSmrg lt_cv_objdir=.libs 12181d54945dSmrgelse 12191d54945dSmrg # MS-DOS does not allow filenames that begin with a dot. 12201d54945dSmrg lt_cv_objdir=_libs 12211d54945dSmrgfi 12221d54945dSmrgrmdir .libs 2>/dev/null]) 12231d54945dSmrgobjdir=$lt_cv_objdir 1224ec713c28Smrg])# AC_LIBTOOL_OBJDIR 12251d54945dSmrg 12261d54945dSmrg 1227ec713c28Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1228ec713c28Smrg# ---------------------------------------------- 12291d54945dSmrg# Check hardcoding attributes. 1230ec713c28SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 12311d54945dSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1232ec713c28Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 1233ec713c28Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1234ec713c28Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1235ec713c28Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 12361d54945dSmrg 1237ec713c28Smrg # We can hardcode non-existant directories. 1238ec713c28Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 12391d54945dSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 12401d54945dSmrg # have to relink, otherwise we might link with an installed library 12411d54945dSmrg # when we should be linking with a yet-to-be-installed one 1242ec713c28Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1243ec713c28Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 12441d54945dSmrg # Linking always hardcodes the temporary library directory. 1245ec713c28Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 12461d54945dSmrg else 12471d54945dSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1248ec713c28Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 12491d54945dSmrg fi 12501d54945dSmrgelse 12511d54945dSmrg # We cannot hardcode anything, or else we can only hardcode existing 12521d54945dSmrg # directories. 1253ec713c28Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 12541d54945dSmrgfi 1255ec713c28SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 12561d54945dSmrg 1257ec713c28Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 12581d54945dSmrg # Fast installation is not supported 12591d54945dSmrg enable_fast_install=no 12601d54945dSmrgelif test "$shlibpath_overrides_runpath" = yes || 12611d54945dSmrg test "$enable_shared" = no; then 12621d54945dSmrg # Fast installation is not necessary 12631d54945dSmrg enable_fast_install=needless 12641d54945dSmrgfi 1265ec713c28Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 12661d54945dSmrg 12671d54945dSmrg 1268ec713c28Smrg# AC_LIBTOOL_SYS_LIB_STRIP 1269ec713c28Smrg# ------------------------ 1270ec713c28SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1271ec713c28Smrg[striplib= 12721d54945dSmrgold_striplib= 12731d54945dSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 1274ec713c28Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 12751d54945dSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 12761d54945dSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 12771d54945dSmrg AC_MSG_RESULT([yes]) 12781d54945dSmrgelse 12791d54945dSmrg# FIXME - insert some real tests, host_os isn't really good enough 12801d54945dSmrg case $host_os in 1281ec713c28Smrg darwin*) 1282ec713c28Smrg if test -n "$STRIP" ; then 1283ec713c28Smrg striplib="$STRIP -x" 1284ec713c28Smrg old_striplib="$STRIP -S" 1285ec713c28Smrg AC_MSG_RESULT([yes]) 1286ec713c28Smrg else 1287ec713c28Smrg AC_MSG_RESULT([no]) 1288ec713c28Smrgfi 1289ec713c28Smrg ;; 1290ec713c28Smrg *) 1291ec713c28Smrg AC_MSG_RESULT([no]) 12921d54945dSmrg ;; 12931d54945dSmrg esac 12941d54945dSmrgfi 1295ec713c28Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 12961d54945dSmrg 12971d54945dSmrg 1298ec713c28Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 12991d54945dSmrg# ----------------------------- 13001d54945dSmrg# PORTME Fill in your ld.so characteristics 1301ec713c28SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1302ec713c28Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1303ba85709eSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 1304ec713c28Smrglibrary_names_spec= 1305ec713c28Smrglibname_spec='lib$name' 1306ec713c28Smrgsoname_spec= 1307ec713c28Smrgshrext_cmds=".so" 1308ec713c28Smrgpostinstall_cmds= 1309ec713c28Smrgpostuninstall_cmds= 1310ec713c28Smrgfinish_cmds= 1311ec713c28Smrgfinish_eval= 1312ec713c28Smrgshlibpath_var= 1313ec713c28Smrgshlibpath_overrides_runpath=unknown 1314ec713c28Smrgversion_type=none 1315ec713c28Smrgdynamic_linker="$host_os ld.so" 1316ec713c28Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 1317ec713c28Smrgm4_if($1,[],[ 13181d54945dSmrgif test "$GCC" = yes; then 1319ba85709eSmrg case $host_os in 1320ba85709eSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 1321ba85709eSmrg *) lt_awk_arg="/^libraries:/" ;; 1322ba85709eSmrg esac 1323ba85709eSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1324ec713c28Smrg if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 13251d54945dSmrg # if the path contains ";" then we assume it to be the separator 13261d54945dSmrg # otherwise default to the standard path separator (i.e. ":") - it is 13271d54945dSmrg # assumed that no part of a normal pathname contains ";" but that should 13281d54945dSmrg # okay in the real world where ";" in dirpaths is itself problematic. 1329ec713c28Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 13301d54945dSmrg else 1331ec713c28Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 13321d54945dSmrg fi 1333ba85709eSmrg # Ok, now we have the path, separated by spaces, we can step through it 1334ba85709eSmrg # and add multilib dir if necessary. 1335ba85709eSmrg lt_tmp_lt_search_path_spec= 1336ba85709eSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 1337ba85709eSmrg for lt_sys_path in $lt_search_path_spec; do 1338ba85709eSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 1339ba85709eSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 1340ba85709eSmrg else 1341ba85709eSmrg test -d "$lt_sys_path" && \ 1342ba85709eSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 1343ba85709eSmrg fi 1344ba85709eSmrg done 1345ec713c28Smrg lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 1346ba85709eSmrgBEGIN {RS=" "; FS="/|\n";} { 1347ba85709eSmrg lt_foo=""; 1348ba85709eSmrg lt_count=0; 1349ba85709eSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 1350ba85709eSmrg if ($lt_i != "" && $lt_i != ".") { 1351ba85709eSmrg if ($lt_i == "..") { 1352ba85709eSmrg lt_count++; 1353ba85709eSmrg } else { 1354ba85709eSmrg if (lt_count == 0) { 1355ba85709eSmrg lt_foo="/" $lt_i lt_foo; 1356ba85709eSmrg } else { 1357ba85709eSmrg lt_count--; 1358ba85709eSmrg } 1359ba85709eSmrg } 1360ba85709eSmrg } 1361ba85709eSmrg } 1362ba85709eSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 1363ba85709eSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 1364ba85709eSmrg}'` 1365ec713c28Smrg sys_lib_search_path_spec=`echo $lt_search_path_spec` 13661d54945dSmrgelse 13671d54945dSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 1368ba85709eSmrgfi]) 13691d54945dSmrgneed_lib_prefix=unknown 13701d54945dSmrghardcode_into_libs=no 13711d54945dSmrg 13721d54945dSmrg# when you set need_version to no, make sure it does not cause -set_version 13731d54945dSmrg# flags to be left without arguments 13741d54945dSmrgneed_version=unknown 13751d54945dSmrg 13761d54945dSmrgcase $host_os in 13771d54945dSmrgaix3*) 13781d54945dSmrg version_type=linux 13791d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 13801d54945dSmrg shlibpath_var=LIBPATH 13811d54945dSmrg 13821d54945dSmrg # AIX 3 has no versioning support, so we append a major version to the name. 13831d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 13841d54945dSmrg ;; 13851d54945dSmrg 1386ba85709eSmrgaix[[4-9]]*) 13871d54945dSmrg version_type=linux 13881d54945dSmrg need_lib_prefix=no 13891d54945dSmrg need_version=no 13901d54945dSmrg hardcode_into_libs=yes 13911d54945dSmrg if test "$host_cpu" = ia64; then 13921d54945dSmrg # AIX 5 supports IA64 13931d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 13941d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 13951d54945dSmrg else 13961d54945dSmrg # With GCC up to 2.95.x, collect2 would create an import file 13971d54945dSmrg # for dependence libraries. The import file would start with 13981d54945dSmrg # the line `#! .'. This would cause the generated library to 13991d54945dSmrg # depend on `.', always an invalid library. This was fixed in 14001d54945dSmrg # development snapshots of GCC prior to 3.0. 14011d54945dSmrg case $host_os in 14021d54945dSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 14031d54945dSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 14041d54945dSmrg echo ' yes ' 1405ec713c28Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 14061d54945dSmrg : 14071d54945dSmrg else 14081d54945dSmrg can_build_shared=no 14091d54945dSmrg fi 14101d54945dSmrg ;; 14111d54945dSmrg esac 14121d54945dSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 14131d54945dSmrg # soname into executable. Probably we can add versioning support to 14141d54945dSmrg # collect2, so additional links can be useful in future. 14151d54945dSmrg if test "$aix_use_runtimelinking" = yes; then 14161d54945dSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 14171d54945dSmrg # instead of lib<name>.a to let people know that these are not 14181d54945dSmrg # typical AIX shared libraries. 14191d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 14201d54945dSmrg else 14211d54945dSmrg # We preserve .a as extension for shared libraries through AIX4.2 14221d54945dSmrg # and later when we are not doing run time linking. 14231d54945dSmrg library_names_spec='${libname}${release}.a $libname.a' 14241d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 14251d54945dSmrg fi 14261d54945dSmrg shlibpath_var=LIBPATH 14271d54945dSmrg fi 14281d54945dSmrg ;; 14291d54945dSmrg 14301d54945dSmrgamigaos*) 1431ec713c28Smrg library_names_spec='$libname.ixlibrary $libname.a' 1432ec713c28Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 1433ec713c28Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 14341d54945dSmrg ;; 14351d54945dSmrg 14361d54945dSmrgbeos*) 14371d54945dSmrg library_names_spec='${libname}${shared_ext}' 14381d54945dSmrg dynamic_linker="$host_os ld.so" 14391d54945dSmrg shlibpath_var=LIBRARY_PATH 14401d54945dSmrg ;; 14411d54945dSmrg 14421d54945dSmrgbsdi[[45]]*) 14431d54945dSmrg version_type=linux 14441d54945dSmrg need_version=no 14451d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 14461d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 14471d54945dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 14481d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 14491d54945dSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 14501d54945dSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 14511d54945dSmrg # the default ld.so.conf also contains /usr/contrib/lib and 14521d54945dSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 14531d54945dSmrg # libtool to hard-code these into programs 14541d54945dSmrg ;; 14551d54945dSmrg 1456ec713c28Smrgcygwin* | mingw* | pw32*) 14571d54945dSmrg version_type=windows 14581d54945dSmrg shrext_cmds=".dll" 14591d54945dSmrg need_version=no 14601d54945dSmrg need_lib_prefix=no 14611d54945dSmrg 14621d54945dSmrg case $GCC,$host_os in 1463ec713c28Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 14641d54945dSmrg library_names_spec='$libname.dll.a' 14651d54945dSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 14661d54945dSmrg postinstall_cmds='base_file=`basename \${file}`~ 1467ec713c28Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 14681d54945dSmrg dldir=$destdir/`dirname \$dlpath`~ 14691d54945dSmrg test -d \$dldir || mkdir -p \$dldir~ 14701d54945dSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 1471ec713c28Smrg chmod a+x \$dldir/$dlname' 14721d54945dSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 14731d54945dSmrg dlpath=$dir/\$dldll~ 1474ec713c28Smrg $rm \$dlpath' 14751d54945dSmrg shlibpath_overrides_runpath=yes 14761d54945dSmrg 14771d54945dSmrg case $host_os in 14781d54945dSmrg cygwin*) 14791d54945dSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 14801d54945dSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 14811d54945dSmrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 14821d54945dSmrg ;; 1483ec713c28Smrg mingw*) 14841d54945dSmrg # MinGW DLLs use traditional 'lib' prefix 14851d54945dSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1486ec713c28Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1487ec713c28Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 14881d54945dSmrg # It is most probably a Windows format PATH printed by 14891d54945dSmrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 14901d54945dSmrg # path with ; separators, and with drive letters. We can handle the 14911d54945dSmrg # drive letters (cygwin fileutils understands them), so leave them, 14921d54945dSmrg # especially as we might pass files found there to a mingw objdump, 14931d54945dSmrg # which wouldn't understand a cygwinified path. Ahh. 1494ec713c28Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 14951d54945dSmrg else 1496ec713c28Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 14971d54945dSmrg fi 14981d54945dSmrg ;; 14991d54945dSmrg pw32*) 15001d54945dSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 15011d54945dSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 15021d54945dSmrg ;; 15031d54945dSmrg esac 15041d54945dSmrg ;; 15051d54945dSmrg 15061d54945dSmrg *) 15071d54945dSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 15081d54945dSmrg ;; 15091d54945dSmrg esac 15101d54945dSmrg dynamic_linker='Win32 ld.exe' 15111d54945dSmrg # FIXME: first we should search . and the directory the executable is in 15121d54945dSmrg shlibpath_var=PATH 15131d54945dSmrg ;; 15141d54945dSmrg 15151d54945dSmrgdarwin* | rhapsody*) 15161d54945dSmrg dynamic_linker="$host_os dyld" 15171d54945dSmrg version_type=darwin 15181d54945dSmrg need_lib_prefix=no 15191d54945dSmrg need_version=no 1520ec713c28Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 15211d54945dSmrg soname_spec='${libname}${release}${major}$shared_ext' 15221d54945dSmrg shlibpath_overrides_runpath=yes 15231d54945dSmrg shlibpath_var=DYLD_LIBRARY_PATH 15241d54945dSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 1525ec713c28Smrg m4_if([$1], [],[ 1526ec713c28Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 15271d54945dSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 15281d54945dSmrg ;; 15291d54945dSmrg 15301d54945dSmrgdgux*) 15311d54945dSmrg version_type=linux 15321d54945dSmrg need_lib_prefix=no 15331d54945dSmrg need_version=no 15341d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 15351d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 15361d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 15371d54945dSmrg ;; 15381d54945dSmrg 15391d54945dSmrgfreebsd1*) 15401d54945dSmrg dynamic_linker=no 15411d54945dSmrg ;; 15421d54945dSmrg 15431d54945dSmrgfreebsd* | dragonfly*) 15441d54945dSmrg # DragonFly does not have aout. When/if they implement a new 15451d54945dSmrg # versioning mechanism, adjust this. 15461d54945dSmrg if test -x /usr/bin/objformat; then 15471d54945dSmrg objformat=`/usr/bin/objformat` 15481d54945dSmrg else 15491d54945dSmrg case $host_os in 15501d54945dSmrg freebsd[[123]]*) objformat=aout ;; 15511d54945dSmrg *) objformat=elf ;; 15521d54945dSmrg esac 15531d54945dSmrg fi 15541d54945dSmrg version_type=freebsd-$objformat 15551d54945dSmrg case $version_type in 15561d54945dSmrg freebsd-elf*) 15571d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 15581d54945dSmrg need_version=no 15591d54945dSmrg need_lib_prefix=no 15601d54945dSmrg ;; 15611d54945dSmrg freebsd-*) 15621d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 15631d54945dSmrg need_version=yes 15641d54945dSmrg ;; 15651d54945dSmrg esac 15661d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 15671d54945dSmrg case $host_os in 15681d54945dSmrg freebsd2*) 15691d54945dSmrg shlibpath_overrides_runpath=yes 15701d54945dSmrg ;; 15711d54945dSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 15721d54945dSmrg shlibpath_overrides_runpath=yes 15731d54945dSmrg hardcode_into_libs=yes 15741d54945dSmrg ;; 15751d54945dSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 15761d54945dSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 15771d54945dSmrg shlibpath_overrides_runpath=no 15781d54945dSmrg hardcode_into_libs=yes 15791d54945dSmrg ;; 1580ba85709eSmrg *) # from 4.6 on, and DragonFly 15811d54945dSmrg shlibpath_overrides_runpath=yes 15821d54945dSmrg hardcode_into_libs=yes 15831d54945dSmrg ;; 15841d54945dSmrg esac 15851d54945dSmrg ;; 15861d54945dSmrg 15871d54945dSmrggnu*) 15881d54945dSmrg version_type=linux 15891d54945dSmrg need_lib_prefix=no 15901d54945dSmrg need_version=no 15911d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 15921d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 15931d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 15941d54945dSmrg hardcode_into_libs=yes 15951d54945dSmrg ;; 15961d54945dSmrg 15971d54945dSmrghpux9* | hpux10* | hpux11*) 15981d54945dSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 15991d54945dSmrg # link against other versions. 16001d54945dSmrg version_type=sunos 16011d54945dSmrg need_lib_prefix=no 16021d54945dSmrg need_version=no 16031d54945dSmrg case $host_cpu in 16041d54945dSmrg ia64*) 16051d54945dSmrg shrext_cmds='.so' 16061d54945dSmrg hardcode_into_libs=yes 16071d54945dSmrg dynamic_linker="$host_os dld.so" 16081d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 16091d54945dSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 16101d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 16111d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 16121d54945dSmrg if test "X$HPUX_IA64_MODE" = X32; then 16131d54945dSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 16141d54945dSmrg else 16151d54945dSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 16161d54945dSmrg fi 16171d54945dSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 16181d54945dSmrg ;; 1619ec713c28Smrg hppa*64*) 1620ec713c28Smrg shrext_cmds='.sl' 1621ec713c28Smrg hardcode_into_libs=yes 1622ec713c28Smrg dynamic_linker="$host_os dld.sl" 1623ec713c28Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1624ec713c28Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1625ec713c28Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1626ec713c28Smrg soname_spec='${libname}${release}${shared_ext}$major' 1627ec713c28Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1628ec713c28Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1629ec713c28Smrg ;; 1630ec713c28Smrg *) 16311d54945dSmrg shrext_cmds='.sl' 16321d54945dSmrg dynamic_linker="$host_os dld.sl" 16331d54945dSmrg shlibpath_var=SHLIB_PATH 16341d54945dSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 16351d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 16361d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 16371d54945dSmrg ;; 16381d54945dSmrg esac 16391d54945dSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 16401d54945dSmrg postinstall_cmds='chmod 555 $lib' 16411d54945dSmrg ;; 16421d54945dSmrg 1643ba85709eSmrginterix[[3-9]]*) 16441d54945dSmrg version_type=linux 16451d54945dSmrg need_lib_prefix=no 16461d54945dSmrg need_version=no 16471d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 16481d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 16491d54945dSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 16501d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 16511d54945dSmrg shlibpath_overrides_runpath=no 16521d54945dSmrg hardcode_into_libs=yes 16531d54945dSmrg ;; 16541d54945dSmrg 16551d54945dSmrgirix5* | irix6* | nonstopux*) 16561d54945dSmrg case $host_os in 16571d54945dSmrg nonstopux*) version_type=nonstopux ;; 16581d54945dSmrg *) 16591d54945dSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 16601d54945dSmrg version_type=linux 16611d54945dSmrg else 16621d54945dSmrg version_type=irix 16631d54945dSmrg fi ;; 16641d54945dSmrg esac 16651d54945dSmrg need_lib_prefix=no 16661d54945dSmrg need_version=no 16671d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 16681d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 16691d54945dSmrg case $host_os in 16701d54945dSmrg irix5* | nonstopux*) 16711d54945dSmrg libsuff= shlibsuff= 16721d54945dSmrg ;; 16731d54945dSmrg *) 16741d54945dSmrg case $LD in # libtool.m4 will add one of these switches to LD 16751d54945dSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 16761d54945dSmrg libsuff= shlibsuff= libmagic=32-bit;; 16771d54945dSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 16781d54945dSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 16791d54945dSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 16801d54945dSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 16811d54945dSmrg *) libsuff= shlibsuff= libmagic=never-match;; 16821d54945dSmrg esac 16831d54945dSmrg ;; 16841d54945dSmrg esac 16851d54945dSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 16861d54945dSmrg shlibpath_overrides_runpath=no 16871d54945dSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 16881d54945dSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 16891d54945dSmrg hardcode_into_libs=yes 16901d54945dSmrg ;; 16911d54945dSmrg 16921d54945dSmrg# No shared lib support for Linux oldld, aout, or coff. 16931d54945dSmrglinux*oldld* | linux*aout* | linux*coff*) 16941d54945dSmrg dynamic_linker=no 16951d54945dSmrg ;; 16961d54945dSmrg 16971d54945dSmrg# This must be Linux ELF. 1698ba85709eSmrglinux* | k*bsd*-gnu) 16991d54945dSmrg version_type=linux 17001d54945dSmrg need_lib_prefix=no 17011d54945dSmrg need_version=no 17021d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 17031d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 17041d54945dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 17051d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 17061d54945dSmrg shlibpath_overrides_runpath=no 17071d54945dSmrg # This implies no fast_install, which is unacceptable. 17081d54945dSmrg # Some rework will be needed to allow for fast_install 17091d54945dSmrg # before this can be enabled. 17101d54945dSmrg hardcode_into_libs=yes 1711ec713c28Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1712ec713c28Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 17131d54945dSmrg 17141d54945dSmrg # Append ld.so.conf contents to the search path 17151d54945dSmrg if test -f /etc/ld.so.conf; then 1716ec713c28Smrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 1717ba85709eSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 17181d54945dSmrg fi 17191d54945dSmrg 17201d54945dSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 17211d54945dSmrg # powerpc, because MkLinux only supported shared libraries with the 17221d54945dSmrg # GNU dynamic linker. Since this was broken with cross compilers, 17231d54945dSmrg # most powerpc-linux boxes support dynamic linking these days and 17241d54945dSmrg # people can always --disable-shared, the test was removed, and we 17251d54945dSmrg # assume the GNU/Linux dynamic linker is in use. 17261d54945dSmrg dynamic_linker='GNU/Linux ld.so' 17271d54945dSmrg ;; 17281d54945dSmrg 17291d54945dSmrgnetbsd*) 17301d54945dSmrg version_type=sunos 17311d54945dSmrg need_lib_prefix=no 17321d54945dSmrg need_version=no 1733ec713c28Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 17341d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 17351d54945dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 17361d54945dSmrg dynamic_linker='NetBSD (a.out) ld.so' 17371d54945dSmrg else 17381d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 17391d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 17401d54945dSmrg dynamic_linker='NetBSD ld.elf_so' 17411d54945dSmrg fi 17421d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 17431d54945dSmrg shlibpath_overrides_runpath=yes 17441d54945dSmrg hardcode_into_libs=yes 17451d54945dSmrg ;; 17461d54945dSmrg 17471d54945dSmrgnewsos6) 17481d54945dSmrg version_type=linux 17491d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 17501d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 17511d54945dSmrg shlibpath_overrides_runpath=yes 17521d54945dSmrg ;; 17531d54945dSmrg 1754ec713c28Smrgnto-qnx*) 1755ec713c28Smrg version_type=linux 17561d54945dSmrg need_lib_prefix=no 17571d54945dSmrg need_version=no 17581d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 17591d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 17601d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 1761ec713c28Smrg shlibpath_overrides_runpath=yes 17621d54945dSmrg ;; 17631d54945dSmrg 17641d54945dSmrgopenbsd*) 17651d54945dSmrg version_type=sunos 17661d54945dSmrg sys_lib_dlsearch_path_spec="/usr/lib" 17671d54945dSmrg need_lib_prefix=no 17681d54945dSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 17691d54945dSmrg case $host_os in 1770ec713c28Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 1771ec713c28Smrg *) need_version=no ;; 17721d54945dSmrg esac 17731d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 17741d54945dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 17751d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 1776ec713c28Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 17771d54945dSmrg case $host_os in 17781d54945dSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 17791d54945dSmrg shlibpath_overrides_runpath=no 17801d54945dSmrg ;; 17811d54945dSmrg *) 17821d54945dSmrg shlibpath_overrides_runpath=yes 17831d54945dSmrg ;; 17841d54945dSmrg esac 17851d54945dSmrg else 17861d54945dSmrg shlibpath_overrides_runpath=yes 17871d54945dSmrg fi 17881d54945dSmrg ;; 17891d54945dSmrg 17901d54945dSmrgos2*) 17911d54945dSmrg libname_spec='$name' 17921d54945dSmrg shrext_cmds=".dll" 17931d54945dSmrg need_lib_prefix=no 17941d54945dSmrg library_names_spec='$libname${shared_ext} $libname.a' 17951d54945dSmrg dynamic_linker='OS/2 ld.exe' 17961d54945dSmrg shlibpath_var=LIBPATH 17971d54945dSmrg ;; 17981d54945dSmrg 17991d54945dSmrgosf3* | osf4* | osf5*) 18001d54945dSmrg version_type=osf 18011d54945dSmrg need_lib_prefix=no 18021d54945dSmrg need_version=no 18031d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 18041d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 18051d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 18061d54945dSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 18071d54945dSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 18081d54945dSmrg ;; 18091d54945dSmrg 1810ba85709eSmrgrdos*) 1811ba85709eSmrg dynamic_linker=no 1812ba85709eSmrg ;; 1813ba85709eSmrg 18141d54945dSmrgsolaris*) 18151d54945dSmrg version_type=linux 18161d54945dSmrg need_lib_prefix=no 18171d54945dSmrg need_version=no 18181d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 18191d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 18201d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 18211d54945dSmrg shlibpath_overrides_runpath=yes 18221d54945dSmrg hardcode_into_libs=yes 18231d54945dSmrg # ldd complains unless libraries are executable 18241d54945dSmrg postinstall_cmds='chmod +x $lib' 18251d54945dSmrg ;; 18261d54945dSmrg 18271d54945dSmrgsunos4*) 18281d54945dSmrg version_type=sunos 18291d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 18301d54945dSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 18311d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 18321d54945dSmrg shlibpath_overrides_runpath=yes 18331d54945dSmrg if test "$with_gnu_ld" = yes; then 18341d54945dSmrg need_lib_prefix=no 18351d54945dSmrg fi 18361d54945dSmrg need_version=yes 18371d54945dSmrg ;; 18381d54945dSmrg 18391d54945dSmrgsysv4 | sysv4.3*) 18401d54945dSmrg version_type=linux 18411d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 18421d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 18431d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 18441d54945dSmrg case $host_vendor in 18451d54945dSmrg sni) 18461d54945dSmrg shlibpath_overrides_runpath=no 18471d54945dSmrg need_lib_prefix=no 1848ec713c28Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 18491d54945dSmrg runpath_var=LD_RUN_PATH 18501d54945dSmrg ;; 18511d54945dSmrg siemens) 18521d54945dSmrg need_lib_prefix=no 18531d54945dSmrg ;; 18541d54945dSmrg motorola) 18551d54945dSmrg need_lib_prefix=no 18561d54945dSmrg need_version=no 18571d54945dSmrg shlibpath_overrides_runpath=no 18581d54945dSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 18591d54945dSmrg ;; 18601d54945dSmrg esac 18611d54945dSmrg ;; 18621d54945dSmrg 18631d54945dSmrgsysv4*MP*) 18641d54945dSmrg if test -d /usr/nec ;then 18651d54945dSmrg version_type=linux 18661d54945dSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 18671d54945dSmrg soname_spec='$libname${shared_ext}.$major' 18681d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 18691d54945dSmrg fi 18701d54945dSmrg ;; 18711d54945dSmrg 18721d54945dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 18731d54945dSmrg version_type=freebsd-elf 18741d54945dSmrg need_lib_prefix=no 18751d54945dSmrg need_version=no 18761d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 18771d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 18781d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 18791d54945dSmrg hardcode_into_libs=yes 18801d54945dSmrg if test "$with_gnu_ld" = yes; then 18811d54945dSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 1882ec713c28Smrg shlibpath_overrides_runpath=no 18831d54945dSmrg else 18841d54945dSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 1885ec713c28Smrg shlibpath_overrides_runpath=yes 18861d54945dSmrg case $host_os in 18871d54945dSmrg sco3.2v5*) 18881d54945dSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 18891d54945dSmrg ;; 18901d54945dSmrg esac 18911d54945dSmrg fi 18921d54945dSmrg sys_lib_dlsearch_path_spec='/usr/lib' 18931d54945dSmrg ;; 18941d54945dSmrg 18951d54945dSmrguts4*) 18961d54945dSmrg version_type=linux 18971d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 18981d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 18991d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 19001d54945dSmrg ;; 19011d54945dSmrg 19021d54945dSmrg*) 19031d54945dSmrg dynamic_linker=no 19041d54945dSmrg ;; 19051d54945dSmrgesac 19061d54945dSmrgAC_MSG_RESULT([$dynamic_linker]) 19071d54945dSmrgtest "$dynamic_linker" = no && can_build_shared=no 19081d54945dSmrg 1909ec713c28SmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 1910ec713c28Smrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 1911ec713c28Smrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 1912ec713c28SmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 1913ec713c28Smrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 1914ec713c28Smrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 1915ec713c28Smrg 19161d54945dSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 19171d54945dSmrgif test "$GCC" = yes; then 19181d54945dSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 19191d54945dSmrgfi 1920ec713c28Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 19211d54945dSmrg 19221d54945dSmrg 1923ec713c28Smrg# _LT_AC_TAGCONFIG 1924ec713c28Smrg# ---------------- 1925ec713c28SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 1926ec713c28Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1927ec713c28SmrgAC_ARG_WITH([tags], 1928ec713c28Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 1929ec713c28Smrg [include additional configurations @<:@automatic@:>@])], 1930ec713c28Smrg [tagnames="$withval"]) 1931ec713c28Smrg 1932ec713c28Smrgif test -f "$ltmain" && test -n "$tagnames"; then 1933ec713c28Smrg if test ! -f "${ofile}"; then 1934ec713c28Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 1935ec713c28Smrg fi 1936ec713c28Smrg 1937ec713c28Smrg if test -z "$LTCC"; then 1938ec713c28Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 1939ec713c28Smrg if test -z "$LTCC"; then 1940ec713c28Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 1941ec713c28Smrg else 1942ec713c28Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 1943ec713c28Smrg fi 1944ec713c28Smrg fi 1945ec713c28Smrg if test -z "$LTCFLAGS"; then 1946ec713c28Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 1947ec713c28Smrg fi 1948ec713c28Smrg 1949ec713c28Smrg # Extract list of available tagged configurations in $ofile. 1950ec713c28Smrg # Note that this assumes the entire list is on one line. 1951ec713c28Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 1952ec713c28Smrg 1953ec713c28Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1954ec713c28Smrg for tagname in $tagnames; do 1955ec713c28Smrg IFS="$lt_save_ifs" 1956ec713c28Smrg # Check whether tagname contains only valid characters 1957ec713c28Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 1958ec713c28Smrg "") ;; 1959ec713c28Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 1960ec713c28Smrg ;; 1961ec713c28Smrg esac 1962ec713c28Smrg 1963ec713c28Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 1964ec713c28Smrg then 1965ec713c28Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 1966ec713c28Smrg fi 1967ec713c28Smrg 1968ec713c28Smrg # Update the list of available tags. 1969ec713c28Smrg if test -n "$tagname"; then 1970ec713c28Smrg echo appending configuration tag \"$tagname\" to $ofile 1971ec713c28Smrg 1972ec713c28Smrg case $tagname in 1973ec713c28Smrg CXX) 1974ec713c28Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 1975ec713c28Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 1976ec713c28Smrg (test "X$CXX" != "Xg++"))) ; then 1977ec713c28Smrg AC_LIBTOOL_LANG_CXX_CONFIG 1978ec713c28Smrg else 1979ec713c28Smrg tagname="" 1980ec713c28Smrg fi 1981ec713c28Smrg ;; 1982ec713c28Smrg 1983ec713c28Smrg F77) 1984ec713c28Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 1985ec713c28Smrg AC_LIBTOOL_LANG_F77_CONFIG 1986ec713c28Smrg else 1987ec713c28Smrg tagname="" 1988ec713c28Smrg fi 1989ec713c28Smrg ;; 1990ec713c28Smrg 1991ec713c28Smrg GCJ) 1992ec713c28Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 1993ec713c28Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 1994ec713c28Smrg else 1995ec713c28Smrg tagname="" 1996ec713c28Smrg fi 1997ec713c28Smrg ;; 1998ec713c28Smrg 1999ec713c28Smrg RC) 2000ec713c28Smrg AC_LIBTOOL_LANG_RC_CONFIG 2001ec713c28Smrg ;; 2002ec713c28Smrg 2003ec713c28Smrg *) 2004ec713c28Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 2005ec713c28Smrg ;; 2006ec713c28Smrg esac 2007ec713c28Smrg 2008ec713c28Smrg # Append the new tag name to the list of available tags. 2009ec713c28Smrg if test -n "$tagname" ; then 2010ec713c28Smrg available_tags="$available_tags $tagname" 2011ec713c28Smrg fi 2012ec713c28Smrg fi 2013ec713c28Smrg done 2014ec713c28Smrg IFS="$lt_save_ifs" 2015ec713c28Smrg 2016ec713c28Smrg # Now substitute the updated list of available tags. 2017ec713c28Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 2018ec713c28Smrg mv "${ofile}T" "$ofile" 2019ec713c28Smrg chmod +x "$ofile" 2020ec713c28Smrg else 2021ec713c28Smrg rm -f "${ofile}T" 2022ec713c28Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 2023ec713c28Smrg fi 2024ec713c28Smrgfi 2025ec713c28Smrg])# _LT_AC_TAGCONFIG 2026ec713c28Smrg 2027ec713c28Smrg 2028ec713c28Smrg# AC_LIBTOOL_DLOPEN 2029ec713c28Smrg# ----------------- 2030ec713c28Smrg# enable checks for dlopen support 2031ec713c28SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 2032ec713c28Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 2033ec713c28Smrg])# AC_LIBTOOL_DLOPEN 2034ec713c28Smrg 2035ec713c28Smrg 2036ec713c28Smrg# AC_LIBTOOL_WIN32_DLL 2037ec713c28Smrg# -------------------- 2038ec713c28Smrg# declare package support for building win32 DLLs 2039ec713c28SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 2040ec713c28Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 2041ec713c28Smrg])# AC_LIBTOOL_WIN32_DLL 2042ec713c28Smrg 2043ec713c28Smrg 2044ec713c28Smrg# AC_ENABLE_SHARED([DEFAULT]) 2045ec713c28Smrg# --------------------------- 2046ec713c28Smrg# implement the --enable-shared flag 2047ec713c28Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2048ec713c28SmrgAC_DEFUN([AC_ENABLE_SHARED], 2049ec713c28Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 2050ec713c28SmrgAC_ARG_ENABLE([shared], 2051ec713c28Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 2052ec713c28Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 2053ec713c28Smrg [p=${PACKAGE-default} 2054ec713c28Smrg case $enableval in 2055ec713c28Smrg yes) enable_shared=yes ;; 2056ec713c28Smrg no) enable_shared=no ;; 2057ec713c28Smrg *) 2058ec713c28Smrg enable_shared=no 2059ec713c28Smrg # Look at the argument we got. We use all the common list separators. 2060ec713c28Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2061ec713c28Smrg for pkg in $enableval; do 2062ec713c28Smrg IFS="$lt_save_ifs" 2063ec713c28Smrg if test "X$pkg" = "X$p"; then 2064ec713c28Smrg enable_shared=yes 2065ec713c28Smrg fi 2066ec713c28Smrg done 2067ec713c28Smrg IFS="$lt_save_ifs" 2068ec713c28Smrg ;; 2069ec713c28Smrg esac], 2070ec713c28Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 2071ec713c28Smrg])# AC_ENABLE_SHARED 2072ec713c28Smrg 2073ec713c28Smrg 2074ec713c28Smrg# AC_DISABLE_SHARED 2075ec713c28Smrg# ----------------- 2076ec713c28Smrg# set the default shared flag to --disable-shared 2077ec713c28SmrgAC_DEFUN([AC_DISABLE_SHARED], 2078ec713c28Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2079ec713c28SmrgAC_ENABLE_SHARED(no) 2080ec713c28Smrg])# AC_DISABLE_SHARED 2081ec713c28Smrg 2082ec713c28Smrg 2083ec713c28Smrg# AC_ENABLE_STATIC([DEFAULT]) 2084ec713c28Smrg# --------------------------- 2085ec713c28Smrg# implement the --enable-static flag 2086ec713c28Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2087ec713c28SmrgAC_DEFUN([AC_ENABLE_STATIC], 2088ec713c28Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 2089ec713c28SmrgAC_ARG_ENABLE([static], 2090ec713c28Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 2091ec713c28Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 2092ec713c28Smrg [p=${PACKAGE-default} 2093ec713c28Smrg case $enableval in 2094ec713c28Smrg yes) enable_static=yes ;; 2095ec713c28Smrg no) enable_static=no ;; 2096ec713c28Smrg *) 2097ec713c28Smrg enable_static=no 2098ec713c28Smrg # Look at the argument we got. We use all the common list separators. 2099ec713c28Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2100ec713c28Smrg for pkg in $enableval; do 2101ec713c28Smrg IFS="$lt_save_ifs" 2102ec713c28Smrg if test "X$pkg" = "X$p"; then 2103ec713c28Smrg enable_static=yes 2104ec713c28Smrg fi 2105ec713c28Smrg done 2106ec713c28Smrg IFS="$lt_save_ifs" 2107ec713c28Smrg ;; 2108ec713c28Smrg esac], 2109ec713c28Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 2110ec713c28Smrg])# AC_ENABLE_STATIC 2111ec713c28Smrg 2112ec713c28Smrg 2113ec713c28Smrg# AC_DISABLE_STATIC 2114ec713c28Smrg# ----------------- 2115ec713c28Smrg# set the default static flag to --disable-static 2116ec713c28SmrgAC_DEFUN([AC_DISABLE_STATIC], 2117ec713c28Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2118ec713c28SmrgAC_ENABLE_STATIC(no) 2119ec713c28Smrg])# AC_DISABLE_STATIC 2120ec713c28Smrg 2121ec713c28Smrg 2122ec713c28Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 2123ec713c28Smrg# --------------------------------- 2124ec713c28Smrg# implement the --enable-fast-install flag 2125ec713c28Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2126ec713c28SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 2127ec713c28Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2128ec713c28SmrgAC_ARG_ENABLE([fast-install], 2129ec713c28Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2130ec713c28Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2131ec713c28Smrg [p=${PACKAGE-default} 2132ec713c28Smrg case $enableval in 2133ec713c28Smrg yes) enable_fast_install=yes ;; 2134ec713c28Smrg no) enable_fast_install=no ;; 2135ec713c28Smrg *) 2136ec713c28Smrg enable_fast_install=no 2137ec713c28Smrg # Look at the argument we got. We use all the common list separators. 2138ec713c28Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2139ec713c28Smrg for pkg in $enableval; do 2140ec713c28Smrg IFS="$lt_save_ifs" 2141ec713c28Smrg if test "X$pkg" = "X$p"; then 2142ec713c28Smrg enable_fast_install=yes 2143ec713c28Smrg fi 2144ec713c28Smrg done 2145ec713c28Smrg IFS="$lt_save_ifs" 2146ec713c28Smrg ;; 2147ec713c28Smrg esac], 2148ec713c28Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 2149ec713c28Smrg])# AC_ENABLE_FAST_INSTALL 2150ec713c28Smrg 2151ec713c28Smrg 2152ec713c28Smrg# AC_DISABLE_FAST_INSTALL 2153ec713c28Smrg# ----------------------- 2154ec713c28Smrg# set the default to --disable-fast-install 2155ec713c28SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 2156ec713c28Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2157ec713c28SmrgAC_ENABLE_FAST_INSTALL(no) 2158ec713c28Smrg])# AC_DISABLE_FAST_INSTALL 2159ec713c28Smrg 2160ec713c28Smrg 2161ec713c28Smrg# AC_LIBTOOL_PICMODE([MODE]) 2162ec713c28Smrg# -------------------------- 2163ec713c28Smrg# implement the --with-pic flag 2164ec713c28Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 2165ec713c28SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 2166ec713c28Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2167ec713c28Smrgpic_mode=ifelse($#,1,$1,default) 2168ec713c28Smrg])# AC_LIBTOOL_PICMODE 2169ec713c28Smrg 2170ec713c28Smrg 2171ec713c28Smrg# AC_PROG_EGREP 2172ec713c28Smrg# ------------- 2173ec713c28Smrg# This is predefined starting with Autoconf 2.54, so this conditional 2174ec713c28Smrg# definition can be removed once we require Autoconf 2.54 or later. 2175ec713c28Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 2176ec713c28Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 2177ec713c28Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 2178ec713c28Smrg then ac_cv_prog_egrep='grep -E' 2179ec713c28Smrg else ac_cv_prog_egrep='egrep' 2180ec713c28Smrg fi]) 2181ec713c28Smrg EGREP=$ac_cv_prog_egrep 2182ec713c28Smrg AC_SUBST([EGREP]) 2183ec713c28Smrg])]) 2184ec713c28Smrg 2185ec713c28Smrg 2186ec713c28Smrg# AC_PATH_TOOL_PREFIX 2187ec713c28Smrg# ------------------- 2188ec713c28Smrg# find a file program which can recognize shared library 2189ec713c28SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 2190ec713c28Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2191ec713c28SmrgAC_MSG_CHECKING([for $1]) 2192ec713c28SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2193ec713c28Smrg[case $MAGIC_CMD in 21941d54945dSmrg[[\\/*] | ?:[\\/]*]) 21951d54945dSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 21961d54945dSmrg ;; 21971d54945dSmrg*) 21981d54945dSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 21991d54945dSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 22001d54945dSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 22011d54945dSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 22021d54945dSmrgdnl not every word. This closes a longstanding sh security hole. 2203ec713c28Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 22041d54945dSmrg for ac_dir in $ac_dummy; do 22051d54945dSmrg IFS="$lt_save_ifs" 22061d54945dSmrg test -z "$ac_dir" && ac_dir=. 22071d54945dSmrg if test -f $ac_dir/$1; then 22081d54945dSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 22091d54945dSmrg if test -n "$file_magic_test_file"; then 22101d54945dSmrg case $deplibs_check_method in 22111d54945dSmrg "file_magic "*) 22121d54945dSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 22131d54945dSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 22141d54945dSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 22151d54945dSmrg $EGREP "$file_magic_regex" > /dev/null; then 22161d54945dSmrg : 22171d54945dSmrg else 2218ec713c28Smrg cat <<EOF 1>&2 22191d54945dSmrg 22201d54945dSmrg*** Warning: the command libtool uses to detect shared libraries, 22211d54945dSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 22221d54945dSmrg*** The result is that libtool may fail to recognize shared libraries 22231d54945dSmrg*** as such. This will affect the creation of libtool libraries that 22241d54945dSmrg*** depend on shared libraries, but programs linked with such libtool 22251d54945dSmrg*** libraries will work regardless of this problem. Nevertheless, you 22261d54945dSmrg*** may want to report the problem to your system manager and/or to 22271d54945dSmrg*** bug-libtool@gnu.org 22281d54945dSmrg 2229ec713c28SmrgEOF 22301d54945dSmrg fi ;; 22311d54945dSmrg esac 22321d54945dSmrg fi 22331d54945dSmrg break 22341d54945dSmrg fi 22351d54945dSmrg done 22361d54945dSmrg IFS="$lt_save_ifs" 22371d54945dSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 22381d54945dSmrg ;; 22391d54945dSmrgesac]) 22401d54945dSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 22411d54945dSmrgif test -n "$MAGIC_CMD"; then 22421d54945dSmrg AC_MSG_RESULT($MAGIC_CMD) 22431d54945dSmrgelse 22441d54945dSmrg AC_MSG_RESULT(no) 22451d54945dSmrgfi 2246ec713c28Smrg])# AC_PATH_TOOL_PREFIX 22471d54945dSmrg 2248786a6f21Smrg 2249ec713c28Smrg# AC_PATH_MAGIC 2250ec713c28Smrg# ------------- 2251ba85709eSmrg# find a file program which can recognize a shared library 2252ec713c28SmrgAC_DEFUN([AC_PATH_MAGIC], 2253ec713c28Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 22541d54945dSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 22551d54945dSmrg if test -n "$ac_tool_prefix"; then 2256ec713c28Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 22571d54945dSmrg else 22581d54945dSmrg MAGIC_CMD=: 22591d54945dSmrg fi 22601d54945dSmrgfi 2261ec713c28Smrg])# AC_PATH_MAGIC 22621d54945dSmrg 22631d54945dSmrg 2264ec713c28Smrg# AC_PROG_LD 22651d54945dSmrg# ---------- 22661d54945dSmrg# find the pathname to the GNU or non-GNU linker 2267ec713c28SmrgAC_DEFUN([AC_PROG_LD], 2268ec713c28Smrg[AC_ARG_WITH([gnu-ld], 2269ec713c28Smrg [AC_HELP_STRING([--with-gnu-ld], 2270786a6f21Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2271786a6f21Smrg [test "$withval" = no || with_gnu_ld=yes], 2272ec713c28Smrg [with_gnu_ld=no]) 2273ec713c28SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 2274ec713c28SmrgAC_REQUIRE([AC_PROG_CC])dnl 2275ec713c28SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2276ec713c28SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 22771d54945dSmrgac_prog=ld 22781d54945dSmrgif test "$GCC" = yes; then 22791d54945dSmrg # Check if gcc -print-prog-name=ld gives a path. 22801d54945dSmrg AC_MSG_CHECKING([for ld used by $CC]) 22811d54945dSmrg case $host in 22821d54945dSmrg *-*-mingw*) 22831d54945dSmrg # gcc leaves a trailing carriage return which upsets mingw 22841d54945dSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 22851d54945dSmrg *) 22861d54945dSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 22871d54945dSmrg esac 22881d54945dSmrg case $ac_prog in 22891d54945dSmrg # Accept absolute paths. 22901d54945dSmrg [[\\/]]* | ?:[[\\/]]*) 22911d54945dSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 22921d54945dSmrg # Canonicalize the pathname of ld 2293ec713c28Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2294ec713c28Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2295ec713c28Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 22961d54945dSmrg done 22971d54945dSmrg test -z "$LD" && LD="$ac_prog" 22981d54945dSmrg ;; 22991d54945dSmrg "") 23001d54945dSmrg # If it fails, then pretend we aren't using GCC. 23011d54945dSmrg ac_prog=ld 23021d54945dSmrg ;; 23031d54945dSmrg *) 23041d54945dSmrg # If it is relative, then search for the first ld in PATH. 23051d54945dSmrg with_gnu_ld=unknown 23061d54945dSmrg ;; 23071d54945dSmrg esac 23081d54945dSmrgelif test "$with_gnu_ld" = yes; then 23091d54945dSmrg AC_MSG_CHECKING([for GNU ld]) 23101d54945dSmrgelse 23111d54945dSmrg AC_MSG_CHECKING([for non-GNU ld]) 23121d54945dSmrgfi 23131d54945dSmrgAC_CACHE_VAL(lt_cv_path_LD, 23141d54945dSmrg[if test -z "$LD"; then 23151d54945dSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 23161d54945dSmrg for ac_dir in $PATH; do 23171d54945dSmrg IFS="$lt_save_ifs" 23181d54945dSmrg test -z "$ac_dir" && ac_dir=. 23191d54945dSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 23201d54945dSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 23211d54945dSmrg # Check to see if the program is GNU ld. I'd rather use --version, 23221d54945dSmrg # but apparently some variants of GNU ld only accept -v. 23231d54945dSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 23241d54945dSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 23251d54945dSmrg *GNU* | *'with BFD'*) 23261d54945dSmrg test "$with_gnu_ld" != no && break 23271d54945dSmrg ;; 23281d54945dSmrg *) 23291d54945dSmrg test "$with_gnu_ld" != yes && break 23301d54945dSmrg ;; 23311d54945dSmrg esac 23321d54945dSmrg fi 23331d54945dSmrg done 23341d54945dSmrg IFS="$lt_save_ifs" 23351d54945dSmrgelse 23361d54945dSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 23371d54945dSmrgfi]) 23381d54945dSmrgLD="$lt_cv_path_LD" 23391d54945dSmrgif test -n "$LD"; then 23401d54945dSmrg AC_MSG_RESULT($LD) 23411d54945dSmrgelse 23421d54945dSmrg AC_MSG_RESULT(no) 23431d54945dSmrgfi 23441d54945dSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2345ec713c28SmrgAC_PROG_LD_GNU 2346ec713c28Smrg])# AC_PROG_LD 23471d54945dSmrg 23481d54945dSmrg 2349ec713c28Smrg# AC_PROG_LD_GNU 2350ec713c28Smrg# -------------- 2351ec713c28SmrgAC_DEFUN([AC_PROG_LD_GNU], 2352ec713c28Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2353ec713c28SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 23541d54945dSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 23551d54945dSmrgcase `$LD -v 2>&1 </dev/null` in 23561d54945dSmrg*GNU* | *'with BFD'*) 23571d54945dSmrg lt_cv_prog_gnu_ld=yes 23581d54945dSmrg ;; 23591d54945dSmrg*) 23601d54945dSmrg lt_cv_prog_gnu_ld=no 23611d54945dSmrg ;; 23621d54945dSmrgesac]) 23631d54945dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2364ec713c28Smrg])# AC_PROG_LD_GNU 23651d54945dSmrg 23661d54945dSmrg 2367ec713c28Smrg# AC_PROG_LD_RELOAD_FLAG 2368ec713c28Smrg# ---------------------- 23691d54945dSmrg# find reload flag for linker 23701d54945dSmrg# -- PORTME Some linkers may need a different reload flag. 2371ec713c28SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 23721d54945dSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 23731d54945dSmrg lt_cv_ld_reload_flag, 23741d54945dSmrg [lt_cv_ld_reload_flag='-r']) 23751d54945dSmrgreload_flag=$lt_cv_ld_reload_flag 23761d54945dSmrgcase $reload_flag in 23771d54945dSmrg"" | " "*) ;; 23781d54945dSmrg*) reload_flag=" $reload_flag" ;; 23791d54945dSmrgesac 23801d54945dSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 23811d54945dSmrgcase $host_os in 23821d54945dSmrg darwin*) 23831d54945dSmrg if test "$GCC" = yes; then 23841d54945dSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 23851d54945dSmrg else 23861d54945dSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 23871d54945dSmrg fi 23881d54945dSmrg ;; 23891d54945dSmrgesac 2390ec713c28Smrg])# AC_PROG_LD_RELOAD_FLAG 23911d54945dSmrg 23921d54945dSmrg 2393ec713c28Smrg# AC_DEPLIBS_CHECK_METHOD 2394ec713c28Smrg# ----------------------- 23951d54945dSmrg# how to check for library dependencies 23961d54945dSmrg# -- PORTME fill in with the dynamic library characteristics 2397ec713c28SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2398ec713c28Smrg[AC_CACHE_CHECK([how to recognize dependent libraries], 23991d54945dSmrglt_cv_deplibs_check_method, 24001d54945dSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 24011d54945dSmrglt_cv_file_magic_test_file= 24021d54945dSmrglt_cv_deplibs_check_method='unknown' 24031d54945dSmrg# Need to set the preceding variable on all platforms that support 24041d54945dSmrg# interlibrary dependencies. 24051d54945dSmrg# 'none' -- dependencies not supported. 24061d54945dSmrg# `unknown' -- same as none, but documents that we really don't know. 24071d54945dSmrg# 'pass_all' -- all dependencies passed with no checks. 24081d54945dSmrg# 'test_compile' -- check by making test program. 24091d54945dSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 24101d54945dSmrg# which responds to the $file_magic_cmd with a given extended regex. 24111d54945dSmrg# If you have `file' or equivalent on your system and you're not sure 24121d54945dSmrg# whether `pass_all' will *always* work, you probably want this one. 24131d54945dSmrg 24141d54945dSmrgcase $host_os in 2415ba85709eSmrgaix[[4-9]]*) 24161d54945dSmrg lt_cv_deplibs_check_method=pass_all 24171d54945dSmrg ;; 24181d54945dSmrg 24191d54945dSmrgbeos*) 24201d54945dSmrg lt_cv_deplibs_check_method=pass_all 24211d54945dSmrg ;; 24221d54945dSmrg 24231d54945dSmrgbsdi[[45]]*) 24241d54945dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 24251d54945dSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 24261d54945dSmrg lt_cv_file_magic_test_file=/shlib/libc.so 24271d54945dSmrg ;; 24281d54945dSmrg 24291d54945dSmrgcygwin*) 24301d54945dSmrg # func_win32_libid is a shell function defined in ltmain.sh 24311d54945dSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 24321d54945dSmrg lt_cv_file_magic_cmd='func_win32_libid' 24331d54945dSmrg ;; 24341d54945dSmrg 24351d54945dSmrgmingw* | pw32*) 24361d54945dSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 2437ba85709eSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 2438ba85709eSmrg # unless we find 'file', for example because we are cross-compiling. 2439ba85709eSmrg if ( file / ) >/dev/null 2>&1; then 2440ba85709eSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2441ba85709eSmrg lt_cv_file_magic_cmd='func_win32_libid' 2442ba85709eSmrg else 2443ba85709eSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 2444ba85709eSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 2445ba85709eSmrg fi 24461d54945dSmrg ;; 24471d54945dSmrg 24481d54945dSmrgdarwin* | rhapsody*) 24491d54945dSmrg lt_cv_deplibs_check_method=pass_all 24501d54945dSmrg ;; 24511d54945dSmrg 2452ba85709eSmrgfreebsd* | dragonfly*) 2453ec713c28Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 24541d54945dSmrg case $host_cpu in 24551d54945dSmrg i*86 ) 24561d54945dSmrg # Not sure whether the presence of OpenBSD here was a mistake. 24571d54945dSmrg # Let's accept both of them until this is cleared up. 24581d54945dSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 24591d54945dSmrg lt_cv_file_magic_cmd=/usr/bin/file 24601d54945dSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 24611d54945dSmrg ;; 24621d54945dSmrg esac 24631d54945dSmrg else 24641d54945dSmrg lt_cv_deplibs_check_method=pass_all 24651d54945dSmrg fi 24661d54945dSmrg ;; 24671d54945dSmrg 24681d54945dSmrggnu*) 24691d54945dSmrg lt_cv_deplibs_check_method=pass_all 24701d54945dSmrg ;; 24711d54945dSmrg 24721d54945dSmrghpux10.20* | hpux11*) 24731d54945dSmrg lt_cv_file_magic_cmd=/usr/bin/file 24741d54945dSmrg case $host_cpu in 24751d54945dSmrg ia64*) 24761d54945dSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 24771d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 24781d54945dSmrg ;; 24791d54945dSmrg hppa*64*) 24801d54945dSmrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] 24811d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 24821d54945dSmrg ;; 24831d54945dSmrg *) 24841d54945dSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 24851d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 24861d54945dSmrg ;; 24871d54945dSmrg esac 24881d54945dSmrg ;; 24891d54945dSmrg 2490ba85709eSmrginterix[[3-9]]*) 24911d54945dSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 24921d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 24931d54945dSmrg ;; 24941d54945dSmrg 24951d54945dSmrgirix5* | irix6* | nonstopux*) 24961d54945dSmrg case $LD in 24971d54945dSmrg *-32|*"-32 ") libmagic=32-bit;; 24981d54945dSmrg *-n32|*"-n32 ") libmagic=N32;; 24991d54945dSmrg *-64|*"-64 ") libmagic=64-bit;; 25001d54945dSmrg *) libmagic=never-match;; 25011d54945dSmrg esac 25021d54945dSmrg lt_cv_deplibs_check_method=pass_all 25031d54945dSmrg ;; 25041d54945dSmrg 25051d54945dSmrg# This must be Linux ELF. 2506ba85709eSmrglinux* | k*bsd*-gnu) 25071d54945dSmrg lt_cv_deplibs_check_method=pass_all 25081d54945dSmrg ;; 25091d54945dSmrg 25101d54945dSmrgnetbsd*) 2511ec713c28Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 25121d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 25131d54945dSmrg else 25141d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 25151d54945dSmrg fi 25161d54945dSmrg ;; 25171d54945dSmrg 25181d54945dSmrgnewos6*) 25191d54945dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 25201d54945dSmrg lt_cv_file_magic_cmd=/usr/bin/file 25211d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 25221d54945dSmrg ;; 25231d54945dSmrg 2524ec713c28Smrgnto-qnx*) 2525ec713c28Smrg lt_cv_deplibs_check_method=unknown 25261d54945dSmrg ;; 25271d54945dSmrg 25281d54945dSmrgopenbsd*) 2529ec713c28Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 25301d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 25311d54945dSmrg else 25321d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 25331d54945dSmrg fi 25341d54945dSmrg ;; 25351d54945dSmrg 25361d54945dSmrgosf3* | osf4* | osf5*) 25371d54945dSmrg lt_cv_deplibs_check_method=pass_all 25381d54945dSmrg ;; 25391d54945dSmrg 2540ba85709eSmrgrdos*) 2541ba85709eSmrg lt_cv_deplibs_check_method=pass_all 2542ba85709eSmrg ;; 2543ba85709eSmrg 25441d54945dSmrgsolaris*) 25451d54945dSmrg lt_cv_deplibs_check_method=pass_all 25461d54945dSmrg ;; 25471d54945dSmrg 25481d54945dSmrgsysv4 | sysv4.3*) 25491d54945dSmrg case $host_vendor in 25501d54945dSmrg motorola) 25511d54945dSmrg 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]]' 25521d54945dSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 25531d54945dSmrg ;; 25541d54945dSmrg ncr) 25551d54945dSmrg lt_cv_deplibs_check_method=pass_all 25561d54945dSmrg ;; 25571d54945dSmrg sequent) 25581d54945dSmrg lt_cv_file_magic_cmd='/bin/file' 25591d54945dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 25601d54945dSmrg ;; 25611d54945dSmrg sni) 25621d54945dSmrg lt_cv_file_magic_cmd='/bin/file' 25631d54945dSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 25641d54945dSmrg lt_cv_file_magic_test_file=/lib/libc.so 25651d54945dSmrg ;; 25661d54945dSmrg siemens) 25671d54945dSmrg lt_cv_deplibs_check_method=pass_all 25681d54945dSmrg ;; 25691d54945dSmrg pc) 25701d54945dSmrg lt_cv_deplibs_check_method=pass_all 25711d54945dSmrg ;; 25721d54945dSmrg esac 25731d54945dSmrg ;; 25741d54945dSmrg 2575ec713c28Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 25761d54945dSmrg lt_cv_deplibs_check_method=pass_all 25771d54945dSmrg ;; 25781d54945dSmrgesac 25791d54945dSmrg]) 25801d54945dSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 25811d54945dSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 25821d54945dSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 2583ec713c28Smrg])# AC_DEPLIBS_CHECK_METHOD 25841d54945dSmrg 25851d54945dSmrg 2586ec713c28Smrg# AC_PROG_NM 25871d54945dSmrg# ---------- 2588ec713c28Smrg# find the pathname to a BSD-compatible name lister 2589ec713c28SmrgAC_DEFUN([AC_PROG_NM], 2590ec713c28Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 25911d54945dSmrg[if test -n "$NM"; then 25921d54945dSmrg # Let the user override the test. 25931d54945dSmrg lt_cv_path_NM="$NM" 25941d54945dSmrgelse 25951d54945dSmrg lt_nm_to_check="${ac_tool_prefix}nm" 2596ba85709eSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 25971d54945dSmrg lt_nm_to_check="$lt_nm_to_check nm" 25981d54945dSmrg fi 25991d54945dSmrg for lt_tmp_nm in $lt_nm_to_check; do 26001d54945dSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 26011d54945dSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 26021d54945dSmrg IFS="$lt_save_ifs" 26031d54945dSmrg test -z "$ac_dir" && ac_dir=. 26041d54945dSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 26051d54945dSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 26061d54945dSmrg # Check to see if the nm accepts a BSD-compat flag. 26071d54945dSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 26081d54945dSmrg # nm: unknown option "B" ignored 26091d54945dSmrg # Tru64's nm complains that /dev/null is an invalid object file 26101d54945dSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 26111d54945dSmrg */dev/null* | *'Invalid file or object type'*) 26121d54945dSmrg lt_cv_path_NM="$tmp_nm -B" 26131d54945dSmrg break 26141d54945dSmrg ;; 26151d54945dSmrg *) 26161d54945dSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 26171d54945dSmrg */dev/null*) 26181d54945dSmrg lt_cv_path_NM="$tmp_nm -p" 26191d54945dSmrg break 26201d54945dSmrg ;; 26211d54945dSmrg *) 26221d54945dSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 26231d54945dSmrg continue # so that we can try to find one that supports BSD flags 26241d54945dSmrg ;; 26251d54945dSmrg esac 26261d54945dSmrg ;; 26271d54945dSmrg esac 26281d54945dSmrg fi 26291d54945dSmrg done 26301d54945dSmrg IFS="$lt_save_ifs" 26311d54945dSmrg done 2632ec713c28Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 26331d54945dSmrgfi]) 2634ec713c28SmrgNM="$lt_cv_path_NM" 2635ec713c28Smrg])# AC_PROG_NM 26361d54945dSmrg 2637786a6f21Smrg 2638ec713c28Smrg# AC_CHECK_LIBM 2639ec713c28Smrg# ------------- 26401d54945dSmrg# check for math library 2641ec713c28SmrgAC_DEFUN([AC_CHECK_LIBM], 26421d54945dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 26431d54945dSmrgLIBM= 26441d54945dSmrgcase $host in 26451d54945dSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 26461d54945dSmrg # These system don't have libm, or don't need it 26471d54945dSmrg ;; 26481d54945dSmrg*-ncr-sysv4.3*) 26491d54945dSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 26501d54945dSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 26511d54945dSmrg ;; 26521d54945dSmrg*) 26531d54945dSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 26541d54945dSmrg ;; 26551d54945dSmrgesac 2656ec713c28Smrg])# AC_CHECK_LIBM 26571d54945dSmrg 26581d54945dSmrg 2659ec713c28Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 2660ec713c28Smrg# ----------------------------------- 2661ec713c28Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 2662ec713c28Smrg# LTDLINCL to the include flags for the libltdl header and adds 2663ec713c28Smrg# --enable-ltdl-convenience to the configure arguments. Note that 2664ec713c28Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2665ec713c28Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 2666ec713c28Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 2667ec713c28Smrg# (note the single quotes!). If your package is not flat and you're not 2668ec713c28Smrg# using automake, define top_builddir and top_srcdir appropriately in 2669ec713c28Smrg# the Makefiles. 2670ec713c28SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 2671ec713c28Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2672ec713c28Smrg case $enable_ltdl_convenience in 2673ec713c28Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2674ec713c28Smrg "") enable_ltdl_convenience=yes 2675ec713c28Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2676ec713c28Smrg esac 2677ec713c28Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2678ec713c28Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2679ec713c28Smrg # For backwards non-gettext consistent compatibility... 2680ec713c28Smrg INCLTDL="$LTDLINCL" 2681ec713c28Smrg])# AC_LIBLTDL_CONVENIENCE 26821d54945dSmrg 26831d54945dSmrg 2684ec713c28Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 2685ec713c28Smrg# ----------------------------------- 2686ec713c28Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 2687ec713c28Smrg# LTDLINCL to the include flags for the libltdl header and adds 2688ec713c28Smrg# --enable-ltdl-install to the configure arguments. Note that 2689ec713c28Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2690ec713c28Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 2691ec713c28Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 2692ec713c28Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 2693ec713c28Smrg# flat and you're not using automake, define top_builddir and top_srcdir 2694ec713c28Smrg# appropriately in the Makefiles. 2695ec713c28Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2696ec713c28SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 2697ec713c28Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2698ec713c28Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 2699ec713c28Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2700ec713c28Smrg [if test x"$enable_ltdl_install" = xno; then 2701ec713c28Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 2702ec713c28Smrg else 2703ec713c28Smrg enable_ltdl_install=yes 2704ec713c28Smrg fi 2705ec713c28Smrg ]) 2706ec713c28Smrg if test x"$enable_ltdl_install" = x"yes"; then 2707ec713c28Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 2708ec713c28Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2709ec713c28Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2710ec713c28Smrg else 2711ec713c28Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2712ec713c28Smrg LIBLTDL="-lltdl" 2713ec713c28Smrg LTDLINCL= 2714ec713c28Smrg fi 2715ec713c28Smrg # For backwards non-gettext consistent compatibility... 2716ec713c28Smrg INCLTDL="$LTDLINCL" 2717ec713c28Smrg])# AC_LIBLTDL_INSTALLABLE 27181d54945dSmrg 27191d54945dSmrg 2720ec713c28Smrg# AC_LIBTOOL_CXX 2721ec713c28Smrg# -------------- 2722ec713c28Smrg# enable support for C++ libraries 2723ec713c28SmrgAC_DEFUN([AC_LIBTOOL_CXX], 2724ec713c28Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 2725ec713c28Smrg])# AC_LIBTOOL_CXX 27261d54945dSmrg 27271d54945dSmrg 2728ec713c28Smrg# _LT_AC_LANG_CXX 2729ec713c28Smrg# --------------- 2730ec713c28SmrgAC_DEFUN([_LT_AC_LANG_CXX], 2731ec713c28Smrg[AC_REQUIRE([AC_PROG_CXX]) 2732ec713c28SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2733ec713c28Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 2734ec713c28Smrg])# _LT_AC_LANG_CXX 27351d54945dSmrg 2736ec713c28Smrg# _LT_AC_PROG_CXXCPP 2737ec713c28Smrg# ------------------ 2738ec713c28SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 27391d54945dSmrg[ 2740ec713c28SmrgAC_REQUIRE([AC_PROG_CXX]) 2741ec713c28Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 2742ec713c28Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 2743ec713c28Smrg (test "X$CXX" != "Xg++"))) ; then 2744ec713c28Smrg AC_PROG_CXXCPP 2745ec713c28Smrgfi 2746ec713c28Smrg])# _LT_AC_PROG_CXXCPP 27471d54945dSmrg 2748ec713c28Smrg# AC_LIBTOOL_F77 2749ec713c28Smrg# -------------- 2750ec713c28Smrg# enable support for Fortran 77 libraries 2751ec713c28SmrgAC_DEFUN([AC_LIBTOOL_F77], 2752ec713c28Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 2753ec713c28Smrg])# AC_LIBTOOL_F77 27541d54945dSmrg 27551d54945dSmrg 2756ec713c28Smrg# _LT_AC_LANG_F77 2757ec713c28Smrg# --------------- 2758ec713c28SmrgAC_DEFUN([_LT_AC_LANG_F77], 2759ec713c28Smrg[AC_REQUIRE([AC_PROG_F77]) 2760ec713c28Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 2761ec713c28Smrg])# _LT_AC_LANG_F77 27621d54945dSmrg 27631d54945dSmrg 2764ec713c28Smrg# AC_LIBTOOL_GCJ 2765ec713c28Smrg# -------------- 2766ec713c28Smrg# enable support for GCJ libraries 2767ec713c28SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 2768ec713c28Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 2769ec713c28Smrg])# AC_LIBTOOL_GCJ 27701d54945dSmrg 27711d54945dSmrg 2772ec713c28Smrg# _LT_AC_LANG_GCJ 2773ec713c28Smrg# --------------- 2774ec713c28SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 2775ec713c28Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 2776ec713c28Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 2777ec713c28Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 2778ec713c28Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 2779ec713c28Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 2780ec713c28Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 2781ec713c28Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 2782ec713c28Smrg])# _LT_AC_LANG_GCJ 2783ec713c28Smrg 2784ec713c28Smrg 2785ec713c28Smrg# AC_LIBTOOL_RC 2786ec713c28Smrg# ------------- 2787ec713c28Smrg# enable support for Windows resource files 2788ec713c28SmrgAC_DEFUN([AC_LIBTOOL_RC], 2789ec713c28Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 2790ec713c28Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 2791ec713c28Smrg])# AC_LIBTOOL_RC 27921d54945dSmrg 27931d54945dSmrg 2794ec713c28Smrg# AC_LIBTOOL_LANG_C_CONFIG 2795ec713c28Smrg# ------------------------ 2796ec713c28Smrg# Ensure that the configuration vars for the C compiler are 2797ec713c28Smrg# suitably defined. Those variables are subsequently used by 2798ec713c28Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2799ec713c28SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 2800ec713c28SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 2801ec713c28Smrg[lt_save_CC="$CC" 2802ec713c28SmrgAC_LANG_PUSH(C) 28031d54945dSmrg 2804ec713c28Smrg# Source file extension for C test sources. 2805ec713c28Smrgac_ext=c 2806ec713c28Smrg 2807ec713c28Smrg# Object file extension for compiled C test sources. 2808ec713c28Smrgobjext=o 2809ec713c28Smrg_LT_AC_TAGVAR(objext, $1)=$objext 2810ec713c28Smrg 2811ec713c28Smrg# Code to be used in simple compile tests 2812ec713c28Smrglt_simple_compile_test_code="int some_variable = 0;" 2813ec713c28Smrg 2814ec713c28Smrg# Code to be used in simple link tests 2815ec713c28Smrglt_simple_link_test_code='int main(){return(0);}' 2816ec713c28Smrg 2817ec713c28Smrg_LT_AC_SYS_COMPILER 2818ec713c28Smrg 2819ec713c28Smrg# save warnings/boilerplate of simple test code 2820ec713c28Smrg_LT_COMPILER_BOILERPLATE 2821ec713c28Smrg_LT_LINKER_BOILERPLATE 2822ec713c28Smrg 2823ec713c28SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 2824ec713c28SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 2825ec713c28SmrgAC_LIBTOOL_PROG_CC_C_O($1) 2826ec713c28SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 2827ec713c28SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 2828ec713c28SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 2829ec713c28SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 2830ec713c28SmrgAC_LIBTOOL_SYS_LIB_STRIP 2831ec713c28SmrgAC_LIBTOOL_DLOPEN_SELF 2832ec713c28Smrg 2833ec713c28Smrg# Report which library types will actually be built 2834ec713c28SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 2835ec713c28SmrgAC_MSG_RESULT([$can_build_shared]) 2836ec713c28Smrg 2837ec713c28SmrgAC_MSG_CHECKING([whether to build shared libraries]) 2838ec713c28Smrgtest "$can_build_shared" = "no" && enable_shared=no 2839ec713c28Smrg 2840ec713c28Smrg# On AIX, shared libraries and static libraries use the same namespace, and 2841ec713c28Smrg# are all built from PIC. 2842ec713c28Smrgcase $host_os in 2843ec713c28Smrgaix3*) 2844ec713c28Smrg test "$enable_shared" = yes && enable_static=no 2845ec713c28Smrg if test -n "$RANLIB"; then 2846ec713c28Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 2847ec713c28Smrg postinstall_cmds='$RANLIB $lib' 28481d54945dSmrg fi 2849ec713c28Smrg ;; 28501d54945dSmrg 2851ec713c28Smrgaix[[4-9]]*) 2852ec713c28Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 2853ec713c28Smrg test "$enable_shared" = yes && enable_static=no 2854ec713c28Smrg fi 2855ec713c28Smrg ;; 2856ec713c28Smrgesac 2857ec713c28SmrgAC_MSG_RESULT([$enable_shared]) 28581d54945dSmrg 2859ec713c28SmrgAC_MSG_CHECKING([whether to build static libraries]) 2860ec713c28Smrg# Make sure either enable_shared or enable_static is yes. 2861ec713c28Smrgtest "$enable_shared" = yes || enable_static=yes 2862ec713c28SmrgAC_MSG_RESULT([$enable_static]) 28631d54945dSmrg 2864ec713c28SmrgAC_LIBTOOL_CONFIG($1) 28651d54945dSmrg 2866ec713c28SmrgAC_LANG_POP 2867ec713c28SmrgCC="$lt_save_CC" 2868ec713c28Smrg])# AC_LIBTOOL_LANG_C_CONFIG 28691d54945dSmrg 28701d54945dSmrg 2871ec713c28Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 2872ec713c28Smrg# -------------------------- 2873ec713c28Smrg# Ensure that the configuration vars for the C compiler are 2874ec713c28Smrg# suitably defined. Those variables are subsequently used by 2875ec713c28Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2876ec713c28SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 2877ec713c28SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 2878ec713c28Smrg[AC_LANG_PUSH(C++) 2879ec713c28SmrgAC_REQUIRE([AC_PROG_CXX]) 2880ec713c28SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2881ec713c28Smrg 2882ec713c28Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2883ec713c28Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 2884ec713c28Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 2885ec713c28Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 2886ec713c28Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 2887ec713c28Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 2888ec713c28Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 2889ec713c28Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 2890ec713c28Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2891ec713c28Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 2892ec713c28Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2893ec713c28Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 2894ec713c28Smrg_LT_AC_TAGVAR(module_cmds, $1)= 2895ec713c28Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 2896ec713c28Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 2897ec713c28Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 2898ec713c28Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 2899ec713c28Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2900ec713c28Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 29011d54945dSmrg 2902ec713c28Smrg# Dependencies to place before and after the object being linked: 2903ec713c28Smrg_LT_AC_TAGVAR(predep_objects, $1)= 2904ec713c28Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 2905ec713c28Smrg_LT_AC_TAGVAR(predeps, $1)= 2906ec713c28Smrg_LT_AC_TAGVAR(postdeps, $1)= 2907ec713c28Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 2908ec713c28Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 29091d54945dSmrg 2910ec713c28Smrg# Source file extension for C++ test sources. 2911ec713c28Smrgac_ext=cpp 29121d54945dSmrg 2913ec713c28Smrg# Object file extension for compiled C++ test sources. 2914ec713c28Smrgobjext=o 2915ec713c28Smrg_LT_AC_TAGVAR(objext, $1)=$objext 2916ec713c28Smrg 2917ec713c28Smrg# Code to be used in simple compile tests 2918ec713c28Smrglt_simple_compile_test_code="int some_variable = 0;" 2919ec713c28Smrg 2920ec713c28Smrg# Code to be used in simple link tests 2921ec713c28Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 2922ec713c28Smrg 2923ec713c28Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 2924ec713c28Smrg_LT_AC_SYS_COMPILER 2925ec713c28Smrg 2926ec713c28Smrg# save warnings/boilerplate of simple test code 2927ec713c28Smrg_LT_COMPILER_BOILERPLATE 2928ec713c28Smrg_LT_LINKER_BOILERPLATE 2929ec713c28Smrg 2930ec713c28Smrg# Allow CC to be a program name with arguments. 2931ec713c28Smrglt_save_CC=$CC 2932ec713c28Smrglt_save_LD=$LD 2933ec713c28Smrglt_save_GCC=$GCC 2934ec713c28SmrgGCC=$GXX 2935ec713c28Smrglt_save_with_gnu_ld=$with_gnu_ld 2936ec713c28Smrglt_save_path_LD=$lt_cv_path_LD 2937ec713c28Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 2938ec713c28Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 2939ec713c28Smrgelse 2940ec713c28Smrg $as_unset lt_cv_prog_gnu_ld 2941ec713c28Smrgfi 2942ec713c28Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 2943ec713c28Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 2944ec713c28Smrgelse 2945ec713c28Smrg $as_unset lt_cv_path_LD 2946ec713c28Smrgfi 2947ec713c28Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 2948ec713c28SmrgCC=${CXX-"c++"} 2949ec713c28Smrgcompiler=$CC 2950ec713c28Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 2951ec713c28Smrg_LT_CC_BASENAME([$compiler]) 2952ec713c28Smrg 2953ec713c28Smrg# We don't want -fno-exception wen compiling C++ code, so set the 2954ec713c28Smrg# no_builtin_flag separately 2955ec713c28Smrgif test "$GXX" = yes; then 2956ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 2957ec713c28Smrgelse 2958ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 2959ec713c28Smrgfi 2960ec713c28Smrg 2961ec713c28Smrgif test "$GXX" = yes; then 2962ec713c28Smrg # Set up default GNU C++ configuration 2963ec713c28Smrg 2964ec713c28Smrg AC_PROG_LD 2965ec713c28Smrg 2966ec713c28Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 2967ec713c28Smrg # archiving commands below assume that GNU ld is being used. 2968ec713c28Smrg if test "$with_gnu_ld" = yes; then 2969ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 2970ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 2971ec713c28Smrg 2972ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 2973ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 2974ec713c28Smrg 2975ec713c28Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 2976ec713c28Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 2977ec713c28Smrg # investigate it a little bit more. (MM) 2978ec713c28Smrg wlarc='${wl}' 2979ec713c28Smrg 2980ec713c28Smrg # ancient GNU ld didn't support --whole-archive et. al. 2981ec713c28Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 2982ec713c28Smrg grep 'no-whole-archive' > /dev/null; then 2983ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 29841d54945dSmrg else 2985ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 29861d54945dSmrg fi 29871d54945dSmrg else 2988ec713c28Smrg with_gnu_ld=no 2989ec713c28Smrg wlarc= 2990ec713c28Smrg 2991ec713c28Smrg # A generic and very simple default shared library creation 2992ec713c28Smrg # command for GNU C++ for the case where it uses the native 2993ec713c28Smrg # linker, instead of GNU ld. If possible, this setting should 2994ec713c28Smrg # overridden to take advantage of the native linker features on 2995ec713c28Smrg # the platform it is being used on. 2996ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 29971d54945dSmrg fi 29981d54945dSmrg 2999ec713c28Smrg # Commands to make compiler produce verbose output that lists 3000ec713c28Smrg # what "hidden" libraries, object files and flags are used when 3001ec713c28Smrg # linking a shared library. 3002ec713c28Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3003ec713c28Smrg 30041d54945dSmrgelse 3005ec713c28Smrg GXX=no 3006ec713c28Smrg with_gnu_ld=no 3007ec713c28Smrg wlarc= 30081d54945dSmrgfi 30091d54945dSmrg 3010ec713c28Smrg# PORTME: fill in a description of your system's C++ link characteristics 3011ec713c28SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 3012ec713c28Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 3013ec713c28Smrgcase $host_os in 3014ec713c28Smrg aix3*) 3015ec713c28Smrg # FIXME: insert proper C++ library support 3016ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3017ec713c28Smrg ;; 3018ec713c28Smrg aix[[4-9]]*) 3019ec713c28Smrg if test "$host_cpu" = ia64; then 3020ec713c28Smrg # On IA64, the linker does run time linking by default, so we don't 3021ec713c28Smrg # have to do anything special. 3022ec713c28Smrg aix_use_runtimelinking=no 3023ec713c28Smrg exp_sym_flag='-Bexport' 3024ec713c28Smrg no_entry_flag="" 3025ec713c28Smrg else 3026ec713c28Smrg aix_use_runtimelinking=no 3027ec713c28Smrg 3028ec713c28Smrg # Test if we are trying to use run time linking or normal 3029ec713c28Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 3030ec713c28Smrg # need to do runtime linking. 3031ec713c28Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 3032ec713c28Smrg for ld_flag in $LDFLAGS; do 3033ec713c28Smrg case $ld_flag in 3034ec713c28Smrg *-brtl*) 3035ec713c28Smrg aix_use_runtimelinking=yes 3036ec713c28Smrg break 3037ec713c28Smrg ;; 3038ec713c28Smrg esac 3039ec713c28Smrg done 3040ec713c28Smrg ;; 3041ec713c28Smrg esac 30421d54945dSmrg 3043ec713c28Smrg exp_sym_flag='-bexport' 3044ec713c28Smrg no_entry_flag='-bnoentry' 3045ec713c28Smrg fi 30461d54945dSmrg 3047ec713c28Smrg # When large executables or shared objects are built, AIX ld can 3048ec713c28Smrg # have problems creating the table of contents. If linking a library 3049ec713c28Smrg # or program results in "error TOC overflow" add -mminimal-toc to 3050ec713c28Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 3051ec713c28Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 30521d54945dSmrg 3053ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 3054ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3055ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3056ec713c28Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 30571d54945dSmrg 3058ec713c28Smrg if test "$GXX" = yes; then 3059ec713c28Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 3060ec713c28Smrg # We only want to do this on AIX 4.2 and lower, the check 3061ec713c28Smrg # below for broken collect2 doesn't work under 4.3+ 3062ec713c28Smrg collect2name=`${CC} -print-prog-name=collect2` 3063ec713c28Smrg if test -f "$collect2name" && \ 3064ec713c28Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 3065ec713c28Smrg then 3066ec713c28Smrg # We have reworked collect2 3067ec713c28Smrg : 3068ec713c28Smrg else 3069ec713c28Smrg # We have old collect2 3070ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 3071ec713c28Smrg # It fails to find uninstalled libraries when the uninstalled 3072ec713c28Smrg # path is not listed in the libpath. Setting hardcode_minus_L 3073ec713c28Smrg # to unsupported forces relinking 3074ec713c28Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 3075ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3076ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3077ec713c28Smrg fi 3078ec713c28Smrg ;; 3079ec713c28Smrg esac 3080ec713c28Smrg shared_flag='-shared' 3081ec713c28Smrg if test "$aix_use_runtimelinking" = yes; then 3082ec713c28Smrg shared_flag="$shared_flag "'${wl}-G' 3083ec713c28Smrg fi 3084ec713c28Smrg else 3085ec713c28Smrg # not using gcc 30861d54945dSmrg if test "$host_cpu" = ia64; then 3087ec713c28Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 3088ec713c28Smrg # chokes on -Wl,-G. The following line is correct: 3089ec713c28Smrg shared_flag='-G' 3090ec713c28Smrg else 3091ec713c28Smrg if test "$aix_use_runtimelinking" = yes; then 3092ec713c28Smrg shared_flag='${wl}-G' 3093ec713c28Smrg else 3094ec713c28Smrg shared_flag='${wl}-bM:SRE' 3095ec713c28Smrg fi 3096ec713c28Smrg fi 3097ec713c28Smrg fi 3098ec713c28Smrg 3099ec713c28Smrg # It seems that -bexpall does not export symbols beginning with 3100ec713c28Smrg # underscore (_), so it is better to generate a list of symbols to export. 3101ec713c28Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 3102ec713c28Smrg if test "$aix_use_runtimelinking" = yes; then 3103ec713c28Smrg # Warning - without using the other runtime loading flags (-brtl), 3104ec713c28Smrg # -berok will link without error, but may produce a broken library. 3105ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 3106ec713c28Smrg # Determine the default libpath from the value encoded in an empty executable. 3107ec713c28Smrg _LT_AC_SYS_LIBPATH_AIX 3108ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3109ec713c28Smrg 3110ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 3111ec713c28Smrg else 3112ec713c28Smrg if test "$host_cpu" = ia64; then 3113ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 3114ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 3115ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" 3116ec713c28Smrg else 3117ec713c28Smrg # Determine the default libpath from the value encoded in an empty executable. 3118ec713c28Smrg _LT_AC_SYS_LIBPATH_AIX 3119ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3120ec713c28Smrg # Warning - without using the other run time loading flags, 3121ec713c28Smrg # -berok will link without error, but may produce a broken library. 3122ec713c28Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 3123ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 3124ec713c28Smrg # Exported symbols can be pulled into shared objects from archives 3125ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 3126ec713c28Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 3127ec713c28Smrg # This is similar to how AIX traditionally builds its shared libraries. 3128ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 3129ec713c28Smrg fi 3130ec713c28Smrg fi 3131ec713c28Smrg ;; 3132ec713c28Smrg 3133ec713c28Smrg beos*) 3134ec713c28Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 3135ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3136ec713c28Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 3137ec713c28Smrg # support --undefined. This deserves some investigation. FIXME 3138ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3139ec713c28Smrg else 3140ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3141ec713c28Smrg fi 3142ec713c28Smrg ;; 3143ec713c28Smrg 3144ec713c28Smrg chorus*) 3145ec713c28Smrg case $cc_basename in 3146ec713c28Smrg *) 3147ec713c28Smrg # FIXME: insert proper C++ library support 3148ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3149ec713c28Smrg ;; 3150ec713c28Smrg esac 3151ec713c28Smrg ;; 3152ec713c28Smrg 3153ec713c28Smrg cygwin* | mingw* | pw32*) 3154ec713c28Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 3155ec713c28Smrg # as there is no search path for DLLs. 3156ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3157ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3158ec713c28Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 3159ec713c28Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 3160ec713c28Smrg 3161ec713c28Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 3162ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 3163ec713c28Smrg # If the export-symbols file already is a .def file (1st line 3164ec713c28Smrg # is EXPORTS), use it as is; otherwise, prepend... 3165ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 3166ec713c28Smrg cp $export_symbols $output_objdir/$soname.def; 3167ec713c28Smrg else 3168ec713c28Smrg echo EXPORTS > $output_objdir/$soname.def; 3169ec713c28Smrg cat $export_symbols >> $output_objdir/$soname.def; 3170ec713c28Smrg fi~ 3171ec713c28Smrg $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 3172ec713c28Smrg else 3173ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3174ec713c28Smrg fi 3175ec713c28Smrg ;; 3176ec713c28Smrg darwin* | rhapsody*) 3177ec713c28Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3178ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3179ec713c28Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 3180ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3181ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 3182ec713c28Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3183ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3184ec713c28Smrg if test "$GXX" = yes ; then 3185ec713c28Smrg output_verbose_link_cmd='echo' 3186ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" 3187ec713c28Smrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3188ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" 3189ec713c28Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" 3190ec713c28Smrg if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3191ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" 3192ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" 3193ec713c28Smrg fi 3194ec713c28Smrg else 3195ec713c28Smrg case $cc_basename in 3196ec713c28Smrg xlc*) 3197ec713c28Smrg output_verbose_link_cmd='echo' 3198ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' 3199ec713c28Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3200ec713c28Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3201ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3202ec713c28Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3203ec713c28Smrg ;; 3204ec713c28Smrg *) 3205ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3206ec713c28Smrg ;; 3207ec713c28Smrg esac 3208ec713c28Smrg fi 3209ec713c28Smrg ;; 3210ec713c28Smrg 3211ec713c28Smrg dgux*) 3212ec713c28Smrg case $cc_basename in 3213ec713c28Smrg ec++*) 3214ec713c28Smrg # FIXME: insert proper C++ library support 3215ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3216ec713c28Smrg ;; 3217ec713c28Smrg ghcx*) 3218ec713c28Smrg # Green Hills C++ Compiler 3219ec713c28Smrg # FIXME: insert proper C++ library support 3220ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3221ec713c28Smrg ;; 3222ec713c28Smrg *) 3223ec713c28Smrg # FIXME: insert proper C++ library support 3224ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3225ec713c28Smrg ;; 3226ec713c28Smrg esac 3227ec713c28Smrg ;; 3228ec713c28Smrg freebsd[[12]]*) 3229ec713c28Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 3230ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3231ec713c28Smrg ;; 3232ec713c28Smrg freebsd-elf*) 3233ec713c28Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3234ec713c28Smrg ;; 3235ec713c28Smrg freebsd* | dragonfly*) 3236ec713c28Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 3237ec713c28Smrg # conventions 3238ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 3239ec713c28Smrg ;; 3240ec713c28Smrg gnu*) 3241ec713c28Smrg ;; 3242ec713c28Smrg hpux9*) 3243ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3244ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3245ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3246ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3247ec713c28Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3248ec713c28Smrg # but as the default 3249ec713c28Smrg # location of the library. 3250ec713c28Smrg 3251ec713c28Smrg case $cc_basename in 3252ec713c28Smrg CC*) 3253ec713c28Smrg # FIXME: insert proper C++ library support 3254ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3255ec713c28Smrg ;; 3256ec713c28Smrg aCC*) 3257ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 3258ec713c28Smrg # Commands to make compiler produce verbose output that lists 3259ec713c28Smrg # what "hidden" libraries, object files and flags are used when 3260ec713c28Smrg # linking a shared library. 3261ec713c28Smrg # 3262ec713c28Smrg # There doesn't appear to be a way to prevent this compiler from 3263ec713c28Smrg # explicitly linking system object files so we need to strip them 3264ec713c28Smrg # from the output so that they don't get included in the library 3265ec713c28Smrg # dependencies. 3266ec713c28Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 3267ec713c28Smrg ;; 3268ec713c28Smrg *) 3269ec713c28Smrg if test "$GXX" = yes; then 3270ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 3271ec713c28Smrg else 3272ec713c28Smrg # FIXME: insert proper C++ library support 3273ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32741d54945dSmrg fi 3275786a6f21Smrg ;; 3276ec713c28Smrg esac 3277ec713c28Smrg ;; 3278ec713c28Smrg hpux10*|hpux11*) 3279ec713c28Smrg if test $with_gnu_ld = no; then 3280ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3281ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 32821d54945dSmrg 3283786a6f21Smrg case $host_cpu in 3284ec713c28Smrg hppa*64*|ia64*) ;; 3285ec713c28Smrg *) 3286ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3287786a6f21Smrg ;; 3288786a6f21Smrg esac 3289ec713c28Smrg fi 3290ec713c28Smrg case $host_cpu in 3291ec713c28Smrg hppa*64*|ia64*) 3292ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3293ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3294ec713c28Smrg ;; 3295ec713c28Smrg *) 3296ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3297ec713c28Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3298ec713c28Smrg # but as the default 3299ec713c28Smrg # location of the library. 3300786a6f21Smrg ;; 3301ec713c28Smrg esac 33021d54945dSmrg 3303ec713c28Smrg case $cc_basename in 3304ec713c28Smrg CC*) 3305ec713c28Smrg # FIXME: insert proper C++ library support 3306ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 33071d54945dSmrg ;; 3308ec713c28Smrg aCC*) 3309ec713c28Smrg case $host_cpu in 3310ec713c28Smrg hppa*64*) 3311ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3312ec713c28Smrg ;; 3313ec713c28Smrg ia64*) 3314ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3315ec713c28Smrg ;; 3316ec713c28Smrg *) 3317ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33181d54945dSmrg ;; 33191d54945dSmrg esac 3320ec713c28Smrg # Commands to make compiler produce verbose output that lists 3321ec713c28Smrg # what "hidden" libraries, object files and flags are used when 3322ec713c28Smrg # linking a shared library. 3323ec713c28Smrg # 3324ec713c28Smrg # There doesn't appear to be a way to prevent this compiler from 3325ec713c28Smrg # explicitly linking system object files so we need to strip them 3326ec713c28Smrg # from the output so that they don't get included in the library 3327ec713c28Smrg # dependencies. 3328ec713c28Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 33291d54945dSmrg ;; 3330ec713c28Smrg *) 3331ec713c28Smrg if test "$GXX" = yes; then 3332ec713c28Smrg if test $with_gnu_ld = no; then 33331d54945dSmrg case $host_cpu in 3334ec713c28Smrg hppa*64*) 3335ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3336ec713c28Smrg ;; 3337ec713c28Smrg ia64*) 3338ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33391d54945dSmrg ;; 33401d54945dSmrg *) 3341ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33421d54945dSmrg ;; 33431d54945dSmrg esac 3344ec713c28Smrg fi 3345ec713c28Smrg else 3346ec713c28Smrg # FIXME: insert proper C++ library support 3347ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3348ec713c28Smrg fi 33491d54945dSmrg ;; 3350ec713c28Smrg esac 3351ec713c28Smrg ;; 3352ec713c28Smrg interix[[3-9]]*) 3353ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3354ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3355ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3356ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3357ec713c28Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 3358ec713c28Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 3359ec713c28Smrg # default) and relocated if they conflict, which is a slow very memory 3360ec713c28Smrg # consuming and fragmenting process. To avoid this, we pick a random, 3361ec713c28Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 3362ec713c28Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 3363ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 3364ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 3365ec713c28Smrg ;; 3366ec713c28Smrg irix5* | irix6*) 3367ec713c28Smrg case $cc_basename in 3368ec713c28Smrg CC*) 3369ec713c28Smrg # SGI C++ 3370ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 3371ec713c28Smrg 3372ec713c28Smrg # Archives containing C++ object files must be created using 3373ec713c28Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 3374ec713c28Smrg # necessary to make sure instantiated templates are included 3375ec713c28Smrg # in the archive. 3376ec713c28Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 33771d54945dSmrg ;; 3378ec713c28Smrg *) 3379ec713c28Smrg if test "$GXX" = yes; then 3380ec713c28Smrg if test "$with_gnu_ld" = no; then 3381ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 3382ec713c28Smrg else 3383ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' 3384ec713c28Smrg fi 3385ec713c28Smrg fi 3386ec713c28Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3387ec713c28Smrg ;; 3388ec713c28Smrg esac 3389ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3390ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3391ec713c28Smrg ;; 3392ec713c28Smrg linux* | k*bsd*-gnu) 3393ec713c28Smrg case $cc_basename in 3394ec713c28Smrg KCC*) 3395ec713c28Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3396ec713c28Smrg 3397ec713c28Smrg # KCC will only create a shared library if the output file 3398ec713c28Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3399ec713c28Smrg # to its proper name (with version) after linking. 3400ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 3401ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' 3402ec713c28Smrg # Commands to make compiler produce verbose output that lists 3403ec713c28Smrg # what "hidden" libraries, object files and flags are used when 3404ec713c28Smrg # linking a shared library. 3405ec713c28Smrg # 3406ec713c28Smrg # There doesn't appear to be a way to prevent this compiler from 3407ec713c28Smrg # explicitly linking system object files so we need to strip them 3408ec713c28Smrg # from the output so that they don't get included in the library 3409ec713c28Smrg # dependencies. 3410ec713c28Smrg output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 3411ec713c28Smrg 3412ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 3413ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3414ec713c28Smrg 3415ec713c28Smrg # Archives containing C++ object files must be created using 3416ec713c28Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3417ec713c28Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3418ec713c28Smrg ;; 3419ec713c28Smrg icpc*) 3420ec713c28Smrg # Intel C++ 3421ec713c28Smrg with_gnu_ld=yes 3422ec713c28Smrg # version 8.0 and above of icpc choke on multiply defined symbols 3423ec713c28Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 3424ec713c28Smrg # earlier do not add the objects themselves. 3425ec713c28Smrg case `$CC -V 2>&1` in 3426ec713c28Smrg *"Version 7."*) 3427ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3428ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 3429ec713c28Smrg ;; 3430ec713c28Smrg *) # Version 8.0 or newer 3431ec713c28Smrg tmp_idyn= 3432ec713c28Smrg case $host_cpu in 3433ec713c28Smrg ia64*) tmp_idyn=' -i_dynamic';; 3434ec713c28Smrg esac 3435ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3436ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 3437ec713c28Smrg ;; 3438ba85709eSmrg esac 3439ec713c28Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3440ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3441ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3442ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 3443ba85709eSmrg ;; 3444ec713c28Smrg pgCC* | pgcpp*) 3445ec713c28Smrg # Portland Group C++ compiler 3446ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 3447ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 3448ec713c28Smrg 3449ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3450ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3451ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 3452ec713c28Smrg ;; 3453ec713c28Smrg cxx*) 3454ec713c28Smrg # Compaq C++ 3455ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3456ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' 3457ec713c28Smrg 3458ec713c28Smrg runpath_var=LD_RUN_PATH 3459ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3460ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3461ec713c28Smrg 3462ec713c28Smrg # Commands to make compiler produce verbose output that lists 3463ec713c28Smrg # what "hidden" libraries, object files and flags are used when 3464ec713c28Smrg # linking a shared library. 3465ec713c28Smrg # 3466ec713c28Smrg # There doesn't appear to be a way to prevent this compiler from 3467ec713c28Smrg # explicitly linking system object files so we need to strip them 3468ec713c28Smrg # from the output so that they don't get included in the library 3469ec713c28Smrg # dependencies. 3470ec713c28Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 3471ec713c28Smrg ;; 3472ec713c28Smrg *) 3473ec713c28Smrg case `$CC -V 2>&1 | sed 5q` in 3474ec713c28Smrg *Sun\ C*) 3475ec713c28Smrg # Sun C++ 5.9 3476ec713c28Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3477ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3478ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' 3479ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3480ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 3481ec713c28Smrg 3482ec713c28Smrg # Not sure whether something based on 3483ec713c28Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 3484ec713c28Smrg # would be better. 3485ec713c28Smrg output_verbose_link_cmd='echo' 3486ec713c28Smrg 3487ec713c28Smrg # Archives containing C++ object files must be created using 3488ec713c28Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 3489ec713c28Smrg # necessary to make sure instantiated templates are included 3490ec713c28Smrg # in the archive. 3491ec713c28Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3492ec713c28Smrg ;; 3493786a6f21Smrg esac 34941d54945dSmrg ;; 3495ec713c28Smrg esac 3496ec713c28Smrg ;; 3497ec713c28Smrg lynxos*) 3498ec713c28Smrg # FIXME: insert proper C++ library support 3499ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3500ec713c28Smrg ;; 3501ec713c28Smrg m88k*) 3502ec713c28Smrg # FIXME: insert proper C++ library support 3503ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3504ec713c28Smrg ;; 3505ec713c28Smrg mvs*) 3506ec713c28Smrg case $cc_basename in 3507ec713c28Smrg cxx*) 3508ec713c28Smrg # FIXME: insert proper C++ library support 3509ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35101d54945dSmrg ;; 3511ec713c28Smrg *) 3512ec713c28Smrg # FIXME: insert proper C++ library support 3513ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35141d54945dSmrg ;; 3515ec713c28Smrg esac 3516ec713c28Smrg ;; 3517ec713c28Smrg netbsd*) 3518ec713c28Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3519ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 3520ec713c28Smrg wlarc= 3521ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3522ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3523ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3524ec713c28Smrg fi 3525ec713c28Smrg # Workaround some broken pre-1.5 toolchains 3526ec713c28Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 3527ec713c28Smrg ;; 3528ec713c28Smrg openbsd2*) 3529ec713c28Smrg # C++ shared libraries are fairly broken 3530ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3531ec713c28Smrg ;; 3532ec713c28Smrg openbsd*) 3533ec713c28Smrg if test -f /usr/libexec/ld.so; then 3534ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3535ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3536ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3537ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3538ec713c28Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3539ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' 3540ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3541ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3542ec713c28Smrg fi 3543ec713c28Smrg output_verbose_link_cmd='echo' 3544ec713c28Smrg else 3545ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3546ec713c28Smrg fi 3547ec713c28Smrg ;; 3548ec713c28Smrg osf3*) 3549ec713c28Smrg case $cc_basename in 3550ec713c28Smrg KCC*) 3551ec713c28Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3552ec713c28Smrg 3553ec713c28Smrg # KCC will only create a shared library if the output file 3554ec713c28Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3555ec713c28Smrg # to its proper name (with version) after linking. 3556ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 3557ec713c28Smrg 3558ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3559ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3560ec713c28Smrg 3561ec713c28Smrg # Archives containing C++ object files must be created using 3562ec713c28Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3563ec713c28Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3564ec713c28Smrg 35651d54945dSmrg ;; 3566ec713c28Smrg RCC*) 3567ec713c28Smrg # Rational C++ 2.4.1 3568ec713c28Smrg # FIXME: insert proper C++ library support 3569ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35701d54945dSmrg ;; 3571ec713c28Smrg cxx*) 3572ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3573ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 3574ec713c28Smrg 3575ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3576ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3577ec713c28Smrg 3578ec713c28Smrg # Commands to make compiler produce verbose output that lists 3579ec713c28Smrg # what "hidden" libraries, object files and flags are used when 3580ec713c28Smrg # linking a shared library. 3581ec713c28Smrg # 3582ec713c28Smrg # There doesn't appear to be a way to prevent this compiler from 3583ec713c28Smrg # explicitly linking system object files so we need to strip them 3584ec713c28Smrg # from the output so that they don't get included in the library 3585ec713c28Smrg # dependencies. 3586ec713c28Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 35871d54945dSmrg ;; 3588ec713c28Smrg *) 3589ec713c28Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3590ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3591ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 3592ec713c28Smrg 3593ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3594ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3595ec713c28Smrg 3596ec713c28Smrg # Commands to make compiler produce verbose output that lists 3597ec713c28Smrg # what "hidden" libraries, object files and flags are used when 3598ec713c28Smrg # linking a shared library. 3599ec713c28Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3600ec713c28Smrg 3601ec713c28Smrg else 3602ec713c28Smrg # FIXME: insert proper C++ library support 3603ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3604ec713c28Smrg fi 36051d54945dSmrg ;; 3606ec713c28Smrg esac 3607ec713c28Smrg ;; 3608ec713c28Smrg osf4* | osf5*) 3609ec713c28Smrg case $cc_basename in 3610ec713c28Smrg KCC*) 3611ec713c28Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3612ec713c28Smrg 3613ec713c28Smrg # KCC will only create a shared library if the output file 3614ec713c28Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3615ec713c28Smrg # to its proper name (with version) after linking. 3616ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 3617ec713c28Smrg 3618ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3619ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3620ec713c28Smrg 3621ec713c28Smrg # Archives containing C++ object files must be created using 3622ec713c28Smrg # the KAI C++ compiler. 3623ec713c28Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 36241d54945dSmrg ;; 3625ec713c28Smrg RCC*) 3626ec713c28Smrg # Rational C++ 2.4.1 3627ec713c28Smrg # FIXME: insert proper C++ library support 3628ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36291d54945dSmrg ;; 3630ec713c28Smrg cxx*) 3631ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 3632ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 3633ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 3634ec713c28Smrg echo "-hidden">> $lib.exp~ 3635ec713c28Smrg $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ 3636ec713c28Smrg $rm $lib.exp' 3637ec713c28Smrg 3638ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3639ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3640ec713c28Smrg 3641ec713c28Smrg # Commands to make compiler produce verbose output that lists 3642ec713c28Smrg # what "hidden" libraries, object files and flags are used when 3643ec713c28Smrg # linking a shared library. 3644ec713c28Smrg # 3645ec713c28Smrg # There doesn't appear to be a way to prevent this compiler from 3646ec713c28Smrg # explicitly linking system object files so we need to strip them 3647ec713c28Smrg # from the output so that they don't get included in the library 3648ec713c28Smrg # dependencies. 3649ec713c28Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 36501d54945dSmrg ;; 3651ec713c28Smrg *) 3652ec713c28Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3653ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3654ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 3655ec713c28Smrg 3656ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3657ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3658ec713c28Smrg 3659ec713c28Smrg # Commands to make compiler produce verbose output that lists 3660ec713c28Smrg # what "hidden" libraries, object files and flags are used when 3661ec713c28Smrg # linking a shared library. 3662ec713c28Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3663ec713c28Smrg 3664ec713c28Smrg else 3665ec713c28Smrg # FIXME: insert proper C++ library support 3666ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3667ec713c28Smrg fi 3668ec713c28Smrg ;; 3669ec713c28Smrg esac 3670ec713c28Smrg ;; 3671ec713c28Smrg psos*) 3672ec713c28Smrg # FIXME: insert proper C++ library support 3673ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3674ec713c28Smrg ;; 3675ec713c28Smrg sunos4*) 3676ec713c28Smrg case $cc_basename in 3677ec713c28Smrg CC*) 3678ec713c28Smrg # Sun C++ 4.x 3679ec713c28Smrg # FIXME: insert proper C++ library support 3680ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3681ec713c28Smrg ;; 3682ec713c28Smrg lcc*) 3683ec713c28Smrg # Lucid 3684ec713c28Smrg # FIXME: insert proper C++ library support 3685ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3686ec713c28Smrg ;; 3687ec713c28Smrg *) 3688ec713c28Smrg # FIXME: insert proper C++ library support 3689ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3690ec713c28Smrg ;; 3691ec713c28Smrg esac 3692ec713c28Smrg ;; 3693ec713c28Smrg solaris*) 3694ec713c28Smrg case $cc_basename in 3695ec713c28Smrg CC*) 3696ec713c28Smrg # Sun C++ 4.2, 5.x and Centerline C++ 3697ec713c28Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 3698ec713c28Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3699ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3700ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3701ec713c28Smrg $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3702ec713c28Smrg 3703ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3704ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3705ec713c28Smrg case $host_os in 3706ec713c28Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3707786a6f21Smrg *) 3708ec713c28Smrg # The compiler driver will combine and reorder linker options, 3709ec713c28Smrg # but understands `-z linker_flag'. 3710ec713c28Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 3711ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 3712786a6f21Smrg ;; 3713786a6f21Smrg esac 3714ec713c28Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3715ec713c28Smrg 3716ec713c28Smrg output_verbose_link_cmd='echo' 3717ec713c28Smrg 3718ec713c28Smrg # Archives containing C++ object files must be created using 3719ec713c28Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 3720ec713c28Smrg # necessary to make sure instantiated templates are included 3721ec713c28Smrg # in the archive. 3722ec713c28Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 37231d54945dSmrg ;; 3724ec713c28Smrg gcx*) 3725ec713c28Smrg # Green Hills C++ Compiler 3726ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3727ec713c28Smrg 3728ec713c28Smrg # The C++ compiler must be used to create the archive. 3729ec713c28Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 37301d54945dSmrg ;; 37311d54945dSmrg *) 3732ec713c28Smrg # GNU C++ compiler with Solaris linker 3733ec713c28Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3734ec713c28Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 3735ec713c28Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 3736ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3737ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3738ec713c28Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 37391d54945dSmrg 3740ec713c28Smrg # Commands to make compiler produce verbose output that lists 3741ec713c28Smrg # what "hidden" libraries, object files and flags are used when 3742ec713c28Smrg # linking a shared library. 3743ec713c28Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3744ec713c28Smrg else 3745ec713c28Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 3746ec713c28Smrg # platform. 3747ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3748ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3749ec713c28Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 37501d54945dSmrg 3751ec713c28Smrg # Commands to make compiler produce verbose output that lists 3752ec713c28Smrg # what "hidden" libraries, object files and flags are used when 3753ec713c28Smrg # linking a shared library. 3754ec713c28Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3755ec713c28Smrg fi 37561d54945dSmrg 3757ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 3758ec713c28Smrg case $host_os in 3759ec713c28Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3760ec713c28Smrg *) 3761ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 3762ec713c28Smrg ;; 3763ec713c28Smrg esac 3764ec713c28Smrg fi 3765ec713c28Smrg ;; 3766ec713c28Smrg esac 3767ec713c28Smrg ;; 3768ec713c28Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 3769ec713c28Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3770ec713c28Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3771ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3772ec713c28Smrg runpath_var='LD_RUN_PATH' 3773ec713c28Smrg 3774ec713c28Smrg case $cc_basename in 3775ec713c28Smrg CC*) 3776ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3777ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3778786a6f21Smrg ;; 3779786a6f21Smrg *) 3780ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3781ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3782786a6f21Smrg ;; 37831d54945dSmrg esac 3784ec713c28Smrg ;; 3785ec713c28Smrg sysv5* | sco3.2v5* | sco5v6*) 3786ec713c28Smrg # Note: We can NOT use -z defs as we might desire, because we do not 3787ec713c28Smrg # link with -lc, and that would cause any symbols used from libc to 3788ec713c28Smrg # always be unresolved, which means just about no library would 3789ec713c28Smrg # ever link correctly. If we're not using GNU ld we use -z text 3790ec713c28Smrg # though, which does catch some bad symbols but isn't as heavy-handed 3791ec713c28Smrg # as -z defs. 3792ec713c28Smrg # For security reasons, it is highly recommended that you always 3793ec713c28Smrg # use absolute paths for naming shared libraries, and exclude the 3794ec713c28Smrg # DT_RUNPATH tag from executables and libraries. But doing so 3795ec713c28Smrg # requires that you compile everything twice, which is a pain. 3796ec713c28Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 3797ec713c28Smrg # non-empty value in the environment. Most likely only useful for 3798ec713c28Smrg # creating official distributions of packages. 3799ec713c28Smrg # This is a hack until libtool officially supports absolute path 3800ec713c28Smrg # names for shared libraries. 3801ec713c28Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3802ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 3803ec713c28Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3804ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3805ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 3806ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3807ec713c28Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3808ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 3809ec713c28Smrg runpath_var='LD_RUN_PATH' 3810ec713c28Smrg 3811ec713c28Smrg case $cc_basename in 3812ec713c28Smrg CC*) 3813ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3814ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3815786a6f21Smrg ;; 3816786a6f21Smrg *) 3817ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3818ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3819786a6f21Smrg ;; 3820ec713c28Smrg esac 3821ec713c28Smrg ;; 3822ec713c28Smrg tandem*) 3823ec713c28Smrg case $cc_basename in 3824ec713c28Smrg NCC*) 3825ec713c28Smrg # NonStop-UX NCC 3.20 3826ec713c28Smrg # FIXME: insert proper C++ library support 3827ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3828786a6f21Smrg ;; 3829786a6f21Smrg *) 3830ec713c28Smrg # FIXME: insert proper C++ library support 3831ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3832786a6f21Smrg ;; 3833ec713c28Smrg esac 3834ec713c28Smrg ;; 3835ec713c28Smrg vxworks*) 3836ec713c28Smrg # FIXME: insert proper C++ library support 3837ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3838ec713c28Smrg ;; 3839ec713c28Smrg *) 3840ec713c28Smrg # FIXME: insert proper C++ library support 3841ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3842ec713c28Smrg ;; 3843ec713c28Smrgesac 3844ec713c28SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 3845ec713c28Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 38461d54945dSmrg 3847ec713c28Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 3848ec713c28Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 3849ba85709eSmrg 3850ec713c28SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 3851ec713c28SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 3852ec713c28SmrgAC_LIBTOOL_PROG_CC_C_O($1) 3853ec713c28SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3854ec713c28SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 3855ec713c28SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3856ec713c28SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3857ba85709eSmrg 3858ec713c28SmrgAC_LIBTOOL_CONFIG($1) 38591d54945dSmrg 3860ec713c28SmrgAC_LANG_POP 3861ec713c28SmrgCC=$lt_save_CC 3862ec713c28SmrgLDCXX=$LD 3863ec713c28SmrgLD=$lt_save_LD 3864ec713c28SmrgGCC=$lt_save_GCC 3865ec713c28Smrgwith_gnu_ldcxx=$with_gnu_ld 3866ec713c28Smrgwith_gnu_ld=$lt_save_with_gnu_ld 3867ec713c28Smrglt_cv_path_LDCXX=$lt_cv_path_LD 3868ec713c28Smrglt_cv_path_LD=$lt_save_path_LD 3869ec713c28Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 3870ec713c28Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 3871ec713c28Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 3872ec713c28Smrg 3873ec713c28Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 3874ec713c28Smrg# ------------------------------------ 3875ec713c28Smrg# Figure out "hidden" library dependencies from verbose 3876ec713c28Smrg# compiler output when linking a shared library. 3877ec713c28Smrg# Parse the compiler output and extract the necessary 3878ec713c28Smrg# objects, libraries and library flags. 3879ec713c28SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 3880ec713c28Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 3881ec713c28Smrgdnl we can't use the lt_simple_compile_test_code here, 3882ec713c28Smrgdnl because it contains code intended for an executable, 3883ec713c28Smrgdnl not a library. It's possible we should let each 3884ec713c28Smrgdnl tag define a new lt_????_link_test_code variable, 3885ec713c28Smrgdnl but it's only used here... 3886ec713c28Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 3887ec713c28Smrgint a; 3888ec713c28Smrgvoid foo (void) { a = 0; } 3889ec713c28SmrgEOF 3890ec713c28Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 3891ec713c28Smrgclass Foo 3892ec713c28Smrg{ 3893ec713c28Smrgpublic: 3894ec713c28Smrg Foo (void) { a = 0; } 3895ec713c28Smrgprivate: 3896ec713c28Smrg int a; 3897ec713c28Smrg}; 3898ec713c28SmrgEOF 3899ec713c28Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 3900ec713c28Smrg subroutine foo 3901ec713c28Smrg implicit none 3902ec713c28Smrg integer*4 a 3903ec713c28Smrg a=0 3904ec713c28Smrg return 3905ec713c28Smrg end 3906ec713c28SmrgEOF 3907ec713c28Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 3908ec713c28Smrgpublic class foo { 3909ec713c28Smrg private int a; 3910ec713c28Smrg public void bar (void) { 3911ec713c28Smrg a = 0; 3912ec713c28Smrg } 3913ec713c28Smrg}; 3914ec713c28SmrgEOF 3915ec713c28Smrg]) 3916ec713c28Smrgdnl Parse the compiler output and extract the necessary 3917ec713c28Smrgdnl objects, libraries and library flags. 3918ec713c28Smrgif AC_TRY_EVAL(ac_compile); then 3919ec713c28Smrg # Parse the compiler output and extract the necessary 3920ec713c28Smrg # objects, libraries and library flags. 39211d54945dSmrg 3922ec713c28Smrg # Sentinel used to keep track of whether or not we are before 3923ec713c28Smrg # the conftest object file. 3924ec713c28Smrg pre_test_object_deps_done=no 39251d54945dSmrg 3926ec713c28Smrg # The `*' in the case matches for architectures that use `case' in 3927ec713c28Smrg # $output_verbose_cmd can trigger glob expansion during the loop 3928ec713c28Smrg # eval without this substitution. 3929ec713c28Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 39301d54945dSmrg 3931ec713c28Smrg for p in `eval $output_verbose_link_cmd`; do 3932ec713c28Smrg case $p in 39331d54945dSmrg 3934ec713c28Smrg -L* | -R* | -l*) 3935ec713c28Smrg # Some compilers place space between "-{L,R}" and the path. 3936ec713c28Smrg # Remove the space. 3937ec713c28Smrg if test $p = "-L" \ 3938ec713c28Smrg || test $p = "-R"; then 3939ec713c28Smrg prev=$p 3940ec713c28Smrg continue 3941ec713c28Smrg else 3942ec713c28Smrg prev= 3943ec713c28Smrg fi 39441d54945dSmrg 3945ec713c28Smrg if test "$pre_test_object_deps_done" = no; then 3946ec713c28Smrg case $p in 3947ec713c28Smrg -L* | -R*) 3948ec713c28Smrg # Internal compiler library paths should come after those 3949ec713c28Smrg # provided the user. The postdeps already come after the 3950ec713c28Smrg # user supplied libs so there is no need to process them. 3951ec713c28Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 3952ec713c28Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 3953ec713c28Smrg else 3954ec713c28Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 3955ec713c28Smrg fi 3956ec713c28Smrg ;; 3957ec713c28Smrg # The "-l" case would never come before the object being 3958ec713c28Smrg # linked, so don't bother handling this case. 3959ec713c28Smrg esac 3960ec713c28Smrg else 3961ec713c28Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 3962ec713c28Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 3963ec713c28Smrg else 3964ec713c28Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 3965ec713c28Smrg fi 3966ec713c28Smrg fi 3967ec713c28Smrg ;; 39681d54945dSmrg 3969ec713c28Smrg *.$objext) 3970ec713c28Smrg # This assumes that the test object file only shows up 3971ec713c28Smrg # once in the compiler output. 3972ec713c28Smrg if test "$p" = "conftest.$objext"; then 3973ec713c28Smrg pre_test_object_deps_done=yes 3974ec713c28Smrg continue 3975ec713c28Smrg fi 39761d54945dSmrg 3977ec713c28Smrg if test "$pre_test_object_deps_done" = no; then 3978ec713c28Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 3979ec713c28Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 3980ec713c28Smrg else 3981ec713c28Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 3982ec713c28Smrg fi 3983ec713c28Smrg else 3984ec713c28Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 3985ec713c28Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 3986ec713c28Smrg else 3987ec713c28Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 3988ec713c28Smrg fi 3989ec713c28Smrg fi 3990ec713c28Smrg ;; 3991ec713c28Smrg 3992ec713c28Smrg *) ;; # Ignore the rest. 39931d54945dSmrg 3994786a6f21Smrg esac 3995ec713c28Smrg done 39961d54945dSmrg 3997ec713c28Smrg # Clean up. 3998ec713c28Smrg rm -f a.out a.exe 3999ec713c28Smrgelse 4000ec713c28Smrg echo "libtool.m4: error: problem compiling $1 test program" 4001786a6f21Smrgfi 40021d54945dSmrg 4003ec713c28Smrg$rm -f confest.$objext 40041d54945dSmrg 4005ec713c28Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 4006ec713c28Smrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 4007ec713c28Smrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 4008ec713c28Smrgfi 40091d54945dSmrg 4010ec713c28Smrg# PORTME: override above test on systems where it is broken 4011ec713c28Smrgifelse([$1],[CXX], 4012ec713c28Smrg[case $host_os in 4013ec713c28Smrginterix[[3-9]]*) 4014ec713c28Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 4015ec713c28Smrg # hack all around it, let's just trust "g++" to DTRT. 4016ec713c28Smrg _LT_AC_TAGVAR(predep_objects,$1)= 4017ec713c28Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 4018ec713c28Smrg _LT_AC_TAGVAR(postdeps,$1)= 4019ec713c28Smrg ;; 4020ec713c28Smrg 4021ec713c28Smrglinux*) 4022ec713c28Smrg case `$CC -V 2>&1 | sed 5q` in 4023ec713c28Smrg *Sun\ C*) 4024ec713c28Smrg # Sun C++ 5.9 4025ec713c28Smrg # 4026ec713c28Smrg # The more standards-conforming stlport4 library is 4027ec713c28Smrg # incompatible with the Cstd library. Avoid specifying 4028ec713c28Smrg # it if it's in CXXFLAGS. Ignore libCrun as 4029ec713c28Smrg # -library=stlport4 depends on it. 4030ec713c28Smrg case " $CXX $CXXFLAGS " in 4031ec713c28Smrg *" -library=stlport4 "*) 4032ec713c28Smrg solaris_use_stlport4=yes 4033ec713c28Smrg ;; 4034ec713c28Smrg esac 4035ec713c28Smrg if test "$solaris_use_stlport4" != yes; then 4036ec713c28Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 4037786a6f21Smrg fi 4038786a6f21Smrg ;; 4039786a6f21Smrg esac 4040ec713c28Smrg ;; 40411d54945dSmrg 4042ec713c28Smrgsolaris*) 4043ec713c28Smrg case $cc_basename in 4044ec713c28Smrg CC*) 4045ec713c28Smrg # The more standards-conforming stlport4 library is 4046ec713c28Smrg # incompatible with the Cstd library. Avoid specifying 4047ec713c28Smrg # it if it's in CXXFLAGS. Ignore libCrun as 4048ec713c28Smrg # -library=stlport4 depends on it. 4049ec713c28Smrg case " $CXX $CXXFLAGS " in 4050ec713c28Smrg *" -library=stlport4 "*) 4051ec713c28Smrg solaris_use_stlport4=yes 4052ec713c28Smrg ;; 4053ec713c28Smrg esac 4054ec713c28Smrg 4055ec713c28Smrg # Adding this requires a known-good setup of shared libraries for 4056ec713c28Smrg # Sun compiler versions before 5.6, else PIC objects from an old 4057ec713c28Smrg # archive will be linked into the output, leading to subtle bugs. 4058ec713c28Smrg if test "$solaris_use_stlport4" != yes; then 4059ec713c28Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 4060786a6f21Smrg fi 4061786a6f21Smrg ;; 4062786a6f21Smrg esac 4063ec713c28Smrg ;; 4064ec713c28Smrgesac 4065ec713c28Smrg]) 4066ec713c28Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 4067ec713c28Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 4068ec713c28Smrgesac 4069ec713c28Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 40701d54945dSmrg 4071ec713c28Smrg# AC_LIBTOOL_LANG_F77_CONFIG 4072ec713c28Smrg# -------------------------- 4073ec713c28Smrg# Ensure that the configuration vars for the C compiler are 4074ec713c28Smrg# suitably defined. Those variables are subsequently used by 4075ec713c28Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4076ec713c28SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 4077ec713c28SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 4078ec713c28Smrg[AC_REQUIRE([AC_PROG_F77]) 4079ec713c28SmrgAC_LANG_PUSH(Fortran 77) 40801d54945dSmrg 4081ec713c28Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4082ec713c28Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4083ec713c28Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 4084ec713c28Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4085ec713c28Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4086ec713c28Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 4087ec713c28Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4088ec713c28Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4089ec713c28Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4090ec713c28Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4091ec713c28Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4092ec713c28Smrg_LT_AC_TAGVAR(module_cmds, $1)= 4093ec713c28Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4094ec713c28Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4095ec713c28Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4096ec713c28Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 4097ec713c28Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4098ec713c28Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 40991d54945dSmrg 4100ec713c28Smrg# Source file extension for f77 test sources. 4101ec713c28Smrgac_ext=f 41021d54945dSmrg 4103ec713c28Smrg# Object file extension for compiled f77 test sources. 4104ec713c28Smrgobjext=o 4105ec713c28Smrg_LT_AC_TAGVAR(objext, $1)=$objext 41061d54945dSmrg 4107ec713c28Smrg# Code to be used in simple compile tests 4108ec713c28Smrglt_simple_compile_test_code="\ 4109ec713c28Smrg subroutine t 4110ec713c28Smrg return 4111ec713c28Smrg end 4112ec713c28Smrg" 41131d54945dSmrg 4114ec713c28Smrg# Code to be used in simple link tests 4115ec713c28Smrglt_simple_link_test_code="\ 4116ec713c28Smrg program t 4117ec713c28Smrg end 4118ec713c28Smrg" 41191d54945dSmrg 4120ec713c28Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4121ec713c28Smrg_LT_AC_SYS_COMPILER 41221d54945dSmrg 4123ec713c28Smrg# save warnings/boilerplate of simple test code 4124ec713c28Smrg_LT_COMPILER_BOILERPLATE 4125ec713c28Smrg_LT_LINKER_BOILERPLATE 41261d54945dSmrg 4127ec713c28Smrg# Allow CC to be a program name with arguments. 4128ec713c28Smrglt_save_CC="$CC" 4129ec713c28SmrgCC=${F77-"f77"} 4130ec713c28Smrgcompiler=$CC 4131ec713c28Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 4132ec713c28Smrg_LT_CC_BASENAME([$compiler]) 41331d54945dSmrg 4134ec713c28SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 4135ec713c28SmrgAC_MSG_RESULT([$can_build_shared]) 41361d54945dSmrg 4137ec713c28SmrgAC_MSG_CHECKING([whether to build shared libraries]) 4138ec713c28Smrgtest "$can_build_shared" = "no" && enable_shared=no 41391d54945dSmrg 4140ec713c28Smrg# On AIX, shared libraries and static libraries use the same namespace, and 4141ec713c28Smrg# are all built from PIC. 4142ec713c28Smrgcase $host_os in 4143ec713c28Smrgaix3*) 4144ec713c28Smrg test "$enable_shared" = yes && enable_static=no 4145ec713c28Smrg if test -n "$RANLIB"; then 4146ec713c28Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 4147ec713c28Smrg postinstall_cmds='$RANLIB $lib' 4148ec713c28Smrg fi 4149ec713c28Smrg ;; 4150ec713c28Smrgaix[[4-9]]*) 4151ec713c28Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 4152ec713c28Smrg test "$enable_shared" = yes && enable_static=no 4153ec713c28Smrg fi 4154ec713c28Smrg ;; 4155ec713c28Smrgesac 4156ec713c28SmrgAC_MSG_RESULT([$enable_shared]) 41571d54945dSmrg 4158ec713c28SmrgAC_MSG_CHECKING([whether to build static libraries]) 4159ec713c28Smrg# Make sure either enable_shared or enable_static is yes. 4160ec713c28Smrgtest "$enable_shared" = yes || enable_static=yes 4161ec713c28SmrgAC_MSG_RESULT([$enable_static]) 41621d54945dSmrg 4163ec713c28Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 4164ec713c28Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 41651d54945dSmrg 4166ec713c28SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4167ec713c28SmrgAC_LIBTOOL_PROG_CC_C_O($1) 4168ec713c28SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4169ec713c28SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4170ec713c28SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4171ec713c28SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 41721d54945dSmrg 4173ec713c28SmrgAC_LIBTOOL_CONFIG($1) 41741d54945dSmrg 4175ec713c28SmrgAC_LANG_POP 4176ec713c28SmrgCC="$lt_save_CC" 4177ec713c28Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 41781d54945dSmrg 41791d54945dSmrg 4180ec713c28Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 4181ec713c28Smrg# -------------------------- 4182ec713c28Smrg# Ensure that the configuration vars for the C compiler are 4183ec713c28Smrg# suitably defined. Those variables are subsequently used by 4184ec713c28Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4185ec713c28SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 4186ec713c28SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 4187ec713c28Smrg[AC_LANG_SAVE 41881d54945dSmrg 4189ec713c28Smrg# Source file extension for Java test sources. 4190ec713c28Smrgac_ext=java 4191786a6f21Smrg 4192ec713c28Smrg# Object file extension for compiled Java test sources. 4193ec713c28Smrgobjext=o 4194ec713c28Smrg_LT_AC_TAGVAR(objext, $1)=$objext 41951d54945dSmrg 4196ec713c28Smrg# Code to be used in simple compile tests 4197ec713c28Smrglt_simple_compile_test_code="class foo {}" 41981d54945dSmrg 4199ec713c28Smrg# Code to be used in simple link tests 4200ec713c28Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 42011d54945dSmrg 4202ec713c28Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4203ec713c28Smrg_LT_AC_SYS_COMPILER 42041d54945dSmrg 4205ec713c28Smrg# save warnings/boilerplate of simple test code 4206ec713c28Smrg_LT_COMPILER_BOILERPLATE 4207ec713c28Smrg_LT_LINKER_BOILERPLATE 42081d54945dSmrg 4209ec713c28Smrg# Allow CC to be a program name with arguments. 4210ec713c28Smrglt_save_CC="$CC" 4211ec713c28SmrgCC=${GCJ-"gcj"} 4212ec713c28Smrgcompiler=$CC 4213ec713c28Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 4214ec713c28Smrg_LT_CC_BASENAME([$compiler]) 42151d54945dSmrg 4216ec713c28Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 4217ec713c28Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 42181d54945dSmrg 4219ec713c28Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 42201d54945dSmrg 4221ec713c28SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4222ec713c28SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4223ec713c28SmrgAC_LIBTOOL_PROG_CC_C_O($1) 4224ec713c28SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4225ec713c28SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4226ec713c28SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4227ec713c28SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 42281d54945dSmrg 4229ec713c28SmrgAC_LIBTOOL_CONFIG($1) 42301d54945dSmrg 4231ec713c28SmrgAC_LANG_RESTORE 4232ec713c28SmrgCC="$lt_save_CC" 4233ec713c28Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 42341d54945dSmrg 42351d54945dSmrg 4236ec713c28Smrg# AC_LIBTOOL_LANG_RC_CONFIG 4237ec713c28Smrg# ------------------------- 4238ec713c28Smrg# Ensure that the configuration vars for the Windows resource compiler are 4239ec713c28Smrg# suitably defined. Those variables are subsequently used by 4240ec713c28Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4241ec713c28SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 4242ec713c28SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 4243ec713c28Smrg[AC_LANG_SAVE 42441d54945dSmrg 4245ec713c28Smrg# Source file extension for RC test sources. 4246ec713c28Smrgac_ext=rc 42471d54945dSmrg 4248ec713c28Smrg# Object file extension for compiled RC test sources. 4249ec713c28Smrgobjext=o 4250ec713c28Smrg_LT_AC_TAGVAR(objext, $1)=$objext 42511d54945dSmrg 4252ec713c28Smrg# Code to be used in simple compile tests 4253ec713c28Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 42541d54945dSmrg 4255ec713c28Smrg# Code to be used in simple link tests 4256ec713c28Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 42571d54945dSmrg 4258ec713c28Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4259ec713c28Smrg_LT_AC_SYS_COMPILER 42601d54945dSmrg 4261ec713c28Smrg# save warnings/boilerplate of simple test code 4262ec713c28Smrg_LT_COMPILER_BOILERPLATE 4263ec713c28Smrg_LT_LINKER_BOILERPLATE 42641d54945dSmrg 4265ec713c28Smrg# Allow CC to be a program name with arguments. 4266ec713c28Smrglt_save_CC="$CC" 4267ec713c28SmrgCC=${RC-"windres"} 4268ec713c28Smrgcompiler=$CC 4269ec713c28Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 4270ec713c28Smrg_LT_CC_BASENAME([$compiler]) 4271ec713c28Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 42721d54945dSmrg 4273ec713c28SmrgAC_LIBTOOL_CONFIG($1) 42741d54945dSmrg 4275ec713c28SmrgAC_LANG_RESTORE 4276ec713c28SmrgCC="$lt_save_CC" 4277ec713c28Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 42781d54945dSmrg 42791d54945dSmrg 4280ec713c28Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 4281ec713c28Smrg# ---------------------------- 4282ec713c28Smrg# If TAGNAME is not passed, then create an initial libtool script 4283ec713c28Smrg# with a default configuration from the untagged config vars. Otherwise 4284ec713c28Smrg# add code to config.status for appending the configuration named by 4285ec713c28Smrg# TAGNAME from the matching tagged config vars. 4286ec713c28SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 4287ec713c28Smrg[# The else clause should only fire when bootstrapping the 4288ec713c28Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 4289ec713c28Smrg# with your package, and you will get complaints that there are 4290ec713c28Smrg# no rules to generate ltmain.sh. 4291ec713c28Smrgif test -f "$ltmain"; then 4292ec713c28Smrg # See if we are running on zsh, and set the options which allow our commands through 4293ec713c28Smrg # without removal of \ escapes. 4294ec713c28Smrg if test -n "${ZSH_VERSION+set}" ; then 4295ec713c28Smrg setopt NO_GLOB_SUBST 4296ec713c28Smrg fi 4297ec713c28Smrg # Now quote all the things that may contain metacharacters while being 4298ec713c28Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 4299ec713c28Smrg # variables and quote the copies for generation of the libtool script. 4300ec713c28Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 4301ec713c28Smrg SED SHELL STRIP \ 4302ec713c28Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 4303ec713c28Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 4304ec713c28Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 4305ec713c28Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 4306ec713c28Smrg lt_cv_sys_global_symbol_to_c_name_address \ 4307ec713c28Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4308ec713c28Smrg old_postinstall_cmds old_postuninstall_cmds \ 4309ec713c28Smrg _LT_AC_TAGVAR(compiler, $1) \ 4310ec713c28Smrg _LT_AC_TAGVAR(CC, $1) \ 4311ec713c28Smrg _LT_AC_TAGVAR(LD, $1) \ 4312ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4313ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4314ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4315ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4316ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4317ec713c28Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4318ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4319ec713c28Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4320ec713c28Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4321ec713c28Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4322ec713c28Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 4323ec713c28Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 4324ec713c28Smrg _LT_AC_TAGVAR(predeps, $1) \ 4325ec713c28Smrg _LT_AC_TAGVAR(postdeps, $1) \ 4326ec713c28Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4327ec713c28Smrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 4328ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 4329ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4330ec713c28Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4331ec713c28Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4332ec713c28Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 4333ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 4334ec713c28Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 4335ec713c28Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 4336ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 4337ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 4338ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 4339ec713c28Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 4340ec713c28Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 4341ec713c28Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 4342ec713c28Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 4343ec713c28Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 4344ec713c28Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 4345ec713c28Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 4346ec713c28Smrg 4347ec713c28Smrg case $var in 4348ec713c28Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 4349ec713c28Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 4350ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 4351ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 4352ec713c28Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 4353ec713c28Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 4354ec713c28Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 4355ec713c28Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 4356ec713c28Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 4357ec713c28Smrg postinstall_cmds | postuninstall_cmds | \ 4358ec713c28Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 4359ec713c28Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 4360ec713c28Smrg # Double-quote double-evaled strings. 4361ec713c28Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 4362786a6f21Smrg ;; 4363ec713c28Smrg *) 4364ec713c28Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 4365786a6f21Smrg ;; 4366ec713c28Smrg esac 4367ec713c28Smrg done 43681d54945dSmrg 4369ec713c28Smrg case $lt_echo in 4370ec713c28Smrg *'\[$]0 --fallback-echo"') 4371ec713c28Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 4372ec713c28Smrg ;; 4373ec713c28Smrg esac 43741d54945dSmrg 4375ec713c28Smrgifelse([$1], [], 4376ec713c28Smrg [cfgfile="${ofile}T" 4377ec713c28Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 4378ec713c28Smrg $rm -f "$cfgfile" 4379ec713c28Smrg AC_MSG_NOTICE([creating $ofile])], 4380ec713c28Smrg [cfgfile="$ofile"]) 43811d54945dSmrg 4382ec713c28Smrg cat <<__EOF__ >> "$cfgfile" 4383ec713c28Smrgifelse([$1], [], 4384ec713c28Smrg[#! $SHELL 43851d54945dSmrg 4386ec713c28Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 4387ec713c28Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 4388ec713c28Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4389ec713c28Smrg# 4390ec713c28Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 4391ec713c28Smrg# Free Software Foundation, Inc. 4392ec713c28Smrg# 4393ec713c28Smrg# This file is part of GNU Libtool: 4394ec713c28Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4395ec713c28Smrg# 4396ec713c28Smrg# This program is free software; you can redistribute it and/or modify 4397ec713c28Smrg# it under the terms of the GNU General Public License as published by 4398ec713c28Smrg# the Free Software Foundation; either version 2 of the License, or 4399ec713c28Smrg# (at your option) any later version. 4400ec713c28Smrg# 4401ec713c28Smrg# This program is distributed in the hope that it will be useful, but 4402ec713c28Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 4403ec713c28Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4404ec713c28Smrg# General Public License for more details. 4405ec713c28Smrg# 4406ec713c28Smrg# You should have received a copy of the GNU General Public License 4407ec713c28Smrg# along with this program; if not, write to the Free Software 4408ec713c28Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 4409ec713c28Smrg# 4410ec713c28Smrg# As a special exception to the GNU General Public License, if you 4411ec713c28Smrg# distribute this file as part of a program that contains a 4412ec713c28Smrg# configuration script generated by Autoconf, you may include it under 4413ec713c28Smrg# the same distribution terms that you use for the rest of that program. 44141d54945dSmrg 4415ec713c28Smrg# A sed program that does not truncate output. 4416ec713c28SmrgSED=$lt_SED 44171d54945dSmrg 4418ec713c28Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 4419ec713c28SmrgXsed="$SED -e 1s/^X//" 44201d54945dSmrg 4421ec713c28Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 4422ec713c28Smrg# if CDPATH is set. 4423ec713c28Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 44241d54945dSmrg 4425ec713c28Smrg# The names of the tagged configurations supported by this script. 4426ec713c28Smrgavailable_tags= 44271d54945dSmrg 4428ec713c28Smrg# ### BEGIN LIBTOOL CONFIG], 4429ec713c28Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 44301d54945dSmrg 4431ec713c28Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 44321d54945dSmrg 4433ec713c28Smrg# Shell to use when invoking shell scripts. 4434ec713c28SmrgSHELL=$lt_SHELL 44351d54945dSmrg 4436ec713c28Smrg# Whether or not to build shared libraries. 4437ec713c28Smrgbuild_libtool_libs=$enable_shared 44381d54945dSmrg 4439ec713c28Smrg# Whether or not to build static libraries. 4440ec713c28Smrgbuild_old_libs=$enable_static 44411d54945dSmrg 4442ec713c28Smrg# Whether or not to add -lc for building shared libraries. 4443ec713c28Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 44441d54945dSmrg 4445ec713c28Smrg# Whether or not to disallow shared libs when runtime libs are static 4446ec713c28Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 44471d54945dSmrg 4448ec713c28Smrg# Whether or not to optimize for fast installation. 4449ec713c28Smrgfast_install=$enable_fast_install 44501d54945dSmrg 4451ec713c28Smrg# The host system. 4452ec713c28Smrghost_alias=$host_alias 4453ec713c28Smrghost=$host 4454ec713c28Smrghost_os=$host_os 44551d54945dSmrg 4456ec713c28Smrg# The build system. 4457ec713c28Smrgbuild_alias=$build_alias 4458ec713c28Smrgbuild=$build 4459ec713c28Smrgbuild_os=$build_os 44601d54945dSmrg 4461ec713c28Smrg# An echo program that does not interpret backslashes. 4462ec713c28Smrgecho=$lt_echo 44631d54945dSmrg 4464ec713c28Smrg# The archiver. 4465ec713c28SmrgAR=$lt_AR 4466ec713c28SmrgAR_FLAGS=$lt_AR_FLAGS 44671d54945dSmrg 4468ec713c28Smrg# A C compiler. 4469ec713c28SmrgLTCC=$lt_LTCC 44701d54945dSmrg 4471ec713c28Smrg# LTCC compiler flags. 4472ec713c28SmrgLTCFLAGS=$lt_LTCFLAGS 44731d54945dSmrg 4474ec713c28Smrg# A language-specific compiler. 4475ec713c28SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 44761d54945dSmrg 4477ec713c28Smrg# Is the compiler the GNU C compiler? 4478ec713c28Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 44791d54945dSmrg 4480ec713c28Smrg# An ERE matcher. 4481ec713c28SmrgEGREP=$lt_EGREP 44821d54945dSmrg 4483ec713c28Smrg# The linker used to build libraries. 4484ec713c28SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 44851d54945dSmrg 4486ec713c28Smrg# Whether we need hard or soft links. 4487ec713c28SmrgLN_S=$lt_LN_S 44881d54945dSmrg 4489ec713c28Smrg# A BSD-compatible nm program. 4490ec713c28SmrgNM=$lt_NM 44911d54945dSmrg 4492ec713c28Smrg# A symbol stripping program 4493ec713c28SmrgSTRIP=$lt_STRIP 44941d54945dSmrg 4495ec713c28Smrg# Used to examine libraries when file_magic_cmd begins "file" 4496ec713c28SmrgMAGIC_CMD=$MAGIC_CMD 44971d54945dSmrg 4498ec713c28Smrg# Used on cygwin: DLL creation program. 4499ec713c28SmrgDLLTOOL="$DLLTOOL" 45001d54945dSmrg 4501ec713c28Smrg# Used on cygwin: object dumper. 4502ec713c28SmrgOBJDUMP="$OBJDUMP" 45031d54945dSmrg 4504ec713c28Smrg# Used on cygwin: assembler. 4505ec713c28SmrgAS="$AS" 45061d54945dSmrg 4507ec713c28Smrg# The name of the directory that contains temporary libtool files. 4508ec713c28Smrgobjdir=$objdir 45091d54945dSmrg 4510ec713c28Smrg# How to create reloadable object files. 4511ec713c28Smrgreload_flag=$lt_reload_flag 4512ec713c28Smrgreload_cmds=$lt_reload_cmds 45131d54945dSmrg 4514ec713c28Smrg# How to pass a linker flag through the compiler. 4515ec713c28Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 45161d54945dSmrg 4517ec713c28Smrg# Object file suffix (normally "o"). 4518ec713c28Smrgobjext="$ac_objext" 45191d54945dSmrg 4520ec713c28Smrg# Old archive suffix (normally "a"). 4521ec713c28Smrglibext="$libext" 45221d54945dSmrg 4523ec713c28Smrg# Shared library suffix (normally ".so"). 4524ec713c28Smrgshrext_cmds='$shrext_cmds' 4525ba85709eSmrg 4526ec713c28Smrg# Executable file suffix (normally ""). 4527ec713c28Smrgexeext="$exeext" 45281d54945dSmrg 4529ec713c28Smrg# Additional compiler flags for building library objects. 4530ec713c28Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 4531ec713c28Smrgpic_mode=$pic_mode 45321d54945dSmrg 4533ec713c28Smrg# What is the maximum length of a command? 4534ec713c28Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 45351d54945dSmrg 4536ec713c28Smrg# Does compiler simultaneously support -c and -o options? 4537ec713c28Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 45381d54945dSmrg 4539ec713c28Smrg# Must we lock files when doing compilation? 4540ec713c28Smrgneed_locks=$lt_need_locks 45411d54945dSmrg 4542ec713c28Smrg# Do we need the lib prefix for modules? 4543ec713c28Smrgneed_lib_prefix=$need_lib_prefix 45441d54945dSmrg 4545ec713c28Smrg# Do we need a version for libraries? 4546ec713c28Smrgneed_version=$need_version 45471d54945dSmrg 4548ec713c28Smrg# Whether dlopen is supported. 4549ec713c28Smrgdlopen_support=$enable_dlopen 45501d54945dSmrg 4551ec713c28Smrg# Whether dlopen of programs is supported. 4552ec713c28Smrgdlopen_self=$enable_dlopen_self 45531d54945dSmrg 4554ec713c28Smrg# Whether dlopen of statically linked programs is supported. 4555ec713c28Smrgdlopen_self_static=$enable_dlopen_self_static 45561d54945dSmrg 4557ec713c28Smrg# Compiler flag to prevent dynamic linking. 4558ec713c28Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 45591d54945dSmrg 4560ec713c28Smrg# Compiler flag to turn off builtin functions. 4561ec713c28Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 45621d54945dSmrg 4563ec713c28Smrg# Compiler flag to allow reflexive dlopens. 4564ec713c28Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 45651d54945dSmrg 4566ec713c28Smrg# Compiler flag to generate shared objects directly from archives. 4567ec713c28Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 45681d54945dSmrg 4569ec713c28Smrg# Compiler flag to generate thread-safe objects. 4570ec713c28Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 45711d54945dSmrg 4572ec713c28Smrg# Library versioning type. 4573ec713c28Smrgversion_type=$version_type 45741d54945dSmrg 4575ec713c28Smrg# Format of library name prefix. 4576ec713c28Smrglibname_spec=$lt_libname_spec 45771d54945dSmrg 4578ec713c28Smrg# List of archive names. First name is the real one, the rest are links. 4579ec713c28Smrg# The last name is the one that the linker finds with -lNAME. 4580ec713c28Smrglibrary_names_spec=$lt_library_names_spec 45811d54945dSmrg 4582ec713c28Smrg# The coded name of the library, if different from the real name. 4583ec713c28Smrgsoname_spec=$lt_soname_spec 45841d54945dSmrg 4585ec713c28Smrg# Commands used to build and install an old-style archive. 4586ec713c28SmrgRANLIB=$lt_RANLIB 4587ec713c28Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 4588ec713c28Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 4589ec713c28Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 45901d54945dSmrg 4591ec713c28Smrg# Create an old-style archive from a shared archive. 4592ec713c28Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 45931d54945dSmrg 4594ec713c28Smrg# Create a temporary old-style archive to link instead of a shared archive. 4595ec713c28Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 45961d54945dSmrg 4597ec713c28Smrg# Commands used to build and install a shared archive. 4598ec713c28Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 4599ec713c28Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 4600ec713c28Smrgpostinstall_cmds=$lt_postinstall_cmds 4601ec713c28Smrgpostuninstall_cmds=$lt_postuninstall_cmds 46021d54945dSmrg 4603ec713c28Smrg# Commands used to build a loadable module (assumed same as above if empty) 4604ec713c28Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 4605ec713c28Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 46061d54945dSmrg 4607ec713c28Smrg# Commands to strip libraries. 4608ec713c28Smrgold_striplib=$lt_old_striplib 4609ec713c28Smrgstriplib=$lt_striplib 46101d54945dSmrg 4611ec713c28Smrg# Dependencies to place before the objects being linked to create a 4612ec713c28Smrg# shared library. 4613ec713c28Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 46141d54945dSmrg 4615ec713c28Smrg# Dependencies to place after the objects being linked to create a 4616ec713c28Smrg# shared library. 4617ec713c28Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 46181d54945dSmrg 4619ec713c28Smrg# Dependencies to place before the objects being linked to create a 4620ec713c28Smrg# shared library. 4621ec713c28Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 46221d54945dSmrg 4623ec713c28Smrg# Dependencies to place after the objects being linked to create a 4624ec713c28Smrg# shared library. 4625ec713c28Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 46261d54945dSmrg 4627ec713c28Smrg# The directories searched by this compiler when creating a shared 4628ec713c28Smrg# library 4629ec713c28Smrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 46301d54945dSmrg 4631ec713c28Smrg# The library search path used internally by the compiler when linking 4632ec713c28Smrg# a shared library. 4633ec713c28Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 46341d54945dSmrg 4635ec713c28Smrg# Method to check whether dependent libraries are shared objects. 4636ec713c28Smrgdeplibs_check_method=$lt_deplibs_check_method 46371d54945dSmrg 4638ec713c28Smrg# Command to use when deplibs_check_method == file_magic. 4639ec713c28Smrgfile_magic_cmd=$lt_file_magic_cmd 46401d54945dSmrg 4641ec713c28Smrg# Flag that allows shared libraries with undefined symbols to be built. 4642ec713c28Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 46431d54945dSmrg 4644ec713c28Smrg# Flag that forces no undefined symbols. 4645ec713c28Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 46461d54945dSmrg 4647ec713c28Smrg# Commands used to finish a libtool library installation in a directory. 4648ec713c28Smrgfinish_cmds=$lt_finish_cmds 46491d54945dSmrg 4650ec713c28Smrg# Same as above, but a single script fragment to be evaled but not shown. 4651ec713c28Smrgfinish_eval=$lt_finish_eval 46521d54945dSmrg 4653ec713c28Smrg# Take the output of nm and produce a listing of raw symbols and C names. 4654ec713c28Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 46551d54945dSmrg 4656ec713c28Smrg# Transform the output of nm in a proper C declaration 4657ec713c28Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 46581d54945dSmrg 4659ec713c28Smrg# Transform the output of nm in a C name address pair 4660ec713c28Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 46611d54945dSmrg 4662ec713c28Smrg# This is the shared library runtime path variable. 4663ec713c28Smrgrunpath_var=$runpath_var 46641d54945dSmrg 4665ec713c28Smrg# This is the shared library path variable. 4666ec713c28Smrgshlibpath_var=$shlibpath_var 46671d54945dSmrg 4668ec713c28Smrg# Is shlibpath searched before the hard-coded library search path? 4669ec713c28Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 46701d54945dSmrg 4671ec713c28Smrg# How to hardcode a shared library path into an executable. 4672ec713c28Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 46731d54945dSmrg 4674ec713c28Smrg# Whether we should hardcode library paths into libraries. 4675ec713c28Smrghardcode_into_libs=$hardcode_into_libs 46761d54945dSmrg 4677ec713c28Smrg# Flag to hardcode \$libdir into a binary during linking. 4678ec713c28Smrg# This must work even if \$libdir does not exist. 4679ec713c28Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 46801d54945dSmrg 4681ec713c28Smrg# If ld is used when linking, flag to hardcode \$libdir into 4682ec713c28Smrg# a binary during linking. This must work even if \$libdir does 4683ec713c28Smrg# not exist. 4684ec713c28Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 46851d54945dSmrg 4686ec713c28Smrg# Whether we need a single -rpath flag with a separated argument. 4687ec713c28Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 46881d54945dSmrg 4689ec713c28Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 4690ec713c28Smrg# resulting binary. 4691ec713c28Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 46921d54945dSmrg 4693ec713c28Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 4694ec713c28Smrg# resulting binary. 4695ec713c28Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 46961d54945dSmrg 4697ec713c28Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 4698ec713c28Smrg# the resulting binary. 4699ec713c28Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 47001d54945dSmrg 4701ec713c28Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 4702ec713c28Smrg# and all subsequent libraries and executables linked against it. 4703ec713c28Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 47041d54945dSmrg 4705ec713c28Smrg# Variables whose values should be saved in libtool wrapper scripts and 4706ec713c28Smrg# restored at relink time. 4707ec713c28Smrgvariables_saved_for_relink="$variables_saved_for_relink" 47081d54945dSmrg 4709ec713c28Smrg# Whether libtool must link a program against all its dependency libraries. 4710ec713c28Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 47111d54945dSmrg 4712ec713c28Smrg# Compile-time system search path for libraries 4713ec713c28Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 47141d54945dSmrg 4715ec713c28Smrg# Run-time system search path for libraries 4716ec713c28Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 47171d54945dSmrg 4718ec713c28Smrg# Fix the shell variable \$srcfile for the compiler. 4719ec713c28Smrgfix_srcfile_path=$lt_fix_srcfile_path 47201d54945dSmrg 4721ec713c28Smrg# Set to yes if exported symbols are required. 4722ec713c28Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 47231d54945dSmrg 4724ec713c28Smrg# The commands to list exported symbols. 4725ec713c28Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 47261d54945dSmrg 4727ec713c28Smrg# The commands to extract the exported symbol list from a shared archive. 4728ec713c28Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 47291d54945dSmrg 4730ec713c28Smrg# Symbols that should not be listed in the preloaded symbols. 4731ec713c28Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 4732786a6f21Smrg 4733ec713c28Smrg# Symbols that must always be exported. 4734ec713c28Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 4735786a6f21Smrg 4736ec713c28Smrgifelse([$1],[], 4737ec713c28Smrg[# ### END LIBTOOL CONFIG], 4738ec713c28Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 4739786a6f21Smrg 4740ec713c28Smrg__EOF__ 4741786a6f21Smrg 4742ec713c28Smrgifelse([$1],[], [ 4743ec713c28Smrg case $host_os in 4744ec713c28Smrg aix3*) 4745ec713c28Smrg cat <<\EOF >> "$cfgfile" 4746786a6f21Smrg 4747ec713c28Smrg# AIX sometimes has problems with the GCC collect2 program. For some 4748ec713c28Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4749ec713c28Smrg# vanish in a puff of smoke. 4750ec713c28Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 4751ec713c28Smrg COLLECT_NAMES= 4752ec713c28Smrg export COLLECT_NAMES 4753ec713c28Smrgfi 4754ec713c28SmrgEOF 4755ec713c28Smrg ;; 4756ec713c28Smrg esac 4757786a6f21Smrg 4758ec713c28Smrg # We use sed instead of cat because bash on DJGPP gets confused if 4759ec713c28Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4760ec713c28Smrg # text mode, it properly converts lines to CR/LF. This bash problem 4761ec713c28Smrg # is reportedly fixed, but why not run on old versions too? 4762ec713c28Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 4763786a6f21Smrg 4764ec713c28Smrg mv -f "$cfgfile" "$ofile" || \ 4765ec713c28Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4766ec713c28Smrg chmod +x "$ofile" 4767ec713c28Smrg]) 47681d54945dSmrgelse 4769ec713c28Smrg # If there is no Makefile yet, we rely on a make rule to execute 4770ec713c28Smrg # `config.status --recheck' to rerun these tests and create the 4771ec713c28Smrg # libtool script then. 4772ec713c28Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 4773ec713c28Smrg if test -f "$ltmain_in"; then 4774ec713c28Smrg test -f Makefile && make "$ltmain" 4775ec713c28Smrg fi 47761d54945dSmrgfi 4777ec713c28Smrg])# AC_LIBTOOL_CONFIG 47781d54945dSmrg 47791d54945dSmrg 4780ec713c28Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 4781ec713c28Smrg# ------------------------------------------- 4782ec713c28SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 4783ec713c28Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 4784786a6f21Smrg 4785ec713c28Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4786786a6f21Smrg 4787ec713c28Smrgif test "$GCC" = yes; then 4788ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4789786a6f21Smrg 4790ec713c28Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4791ec713c28Smrg lt_cv_prog_compiler_rtti_exceptions, 4792ec713c28Smrg [-fno-rtti -fno-exceptions], [], 4793ec713c28Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4794786a6f21Smrgfi 4795ec713c28Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 4796786a6f21Smrg 4797786a6f21Smrg 4798ec713c28Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4799ec713c28Smrg# --------------------------------- 4800ec713c28SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 4801ec713c28Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 4802ec713c28SmrgAC_REQUIRE([LT_AC_PROG_SED]) 4803ec713c28SmrgAC_REQUIRE([AC_PROG_NM]) 4804ec713c28SmrgAC_REQUIRE([AC_OBJEXT]) 4805ec713c28Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 4806ec713c28SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4807ec713c28SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4808ec713c28Smrg[ 4809ec713c28Smrg# These are sane defaults that work on at least a few old systems. 4810ec713c28Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4811786a6f21Smrg 4812ec713c28Smrg# Character class describing NM global symbol codes. 4813ec713c28Smrgsymcode='[[BCDEGRST]]' 4814786a6f21Smrg 4815ec713c28Smrg# Regexp to match symbols that can be accessed directly from C. 4816ec713c28Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4817786a6f21Smrg 4818ec713c28Smrg# Transform an extracted symbol line into a proper C declaration 4819ec713c28Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 4820786a6f21Smrg 4821ec713c28Smrg# Transform an extracted symbol line into symbol name and symbol address 4822ec713c28Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 4823786a6f21Smrg 4824ec713c28Smrg# Define system-specific variables. 4825ec713c28Smrgcase $host_os in 4826ec713c28Smrgaix*) 4827ec713c28Smrg symcode='[[BCDT]]' 4828ec713c28Smrg ;; 4829ec713c28Smrgcygwin* | mingw* | pw32*) 4830ec713c28Smrg symcode='[[ABCDGISTW]]' 4831ec713c28Smrg ;; 4832ec713c28Smrghpux*) # Its linker distinguishes data from code symbols 4833ec713c28Smrg if test "$host_cpu" = ia64; then 4834ec713c28Smrg symcode='[[ABCDEGRST]]' 4835ec713c28Smrg fi 4836ec713c28Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4837ec713c28Smrg lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 4838ec713c28Smrg ;; 4839ec713c28Smrglinux* | k*bsd*-gnu) 4840ec713c28Smrg if test "$host_cpu" = ia64; then 4841ec713c28Smrg symcode='[[ABCDGIRSTW]]' 4842ec713c28Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4843ec713c28Smrg lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 4844ec713c28Smrg fi 4845ec713c28Smrg ;; 4846ec713c28Smrgirix* | nonstopux*) 4847ec713c28Smrg symcode='[[BCDEGRST]]' 4848ec713c28Smrg ;; 4849ec713c28Smrgosf*) 4850ec713c28Smrg symcode='[[BCDEGQRST]]' 4851ec713c28Smrg ;; 4852ec713c28Smrgsolaris*) 4853ec713c28Smrg symcode='[[BDRT]]' 4854ec713c28Smrg ;; 4855ec713c28Smrgsco3.2v5*) 4856ec713c28Smrg symcode='[[DT]]' 4857ec713c28Smrg ;; 4858ec713c28Smrgsysv4.2uw2*) 4859ec713c28Smrg symcode='[[DT]]' 4860ec713c28Smrg ;; 4861ec713c28Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 4862ec713c28Smrg symcode='[[ABDT]]' 4863ec713c28Smrg ;; 4864ec713c28Smrgsysv4) 4865ec713c28Smrg symcode='[[DFNSTU]]' 4866ec713c28Smrg ;; 4867ec713c28Smrgesac 4868786a6f21Smrg 4869ec713c28Smrg# Handle CRLF in mingw tool chain 4870ec713c28Smrgopt_cr= 4871ec713c28Smrgcase $build_os in 4872ec713c28Smrgmingw*) 4873ec713c28Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4874ec713c28Smrg ;; 4875ec713c28Smrgesac 4876786a6f21Smrg 4877ec713c28Smrg# If we're using GNU nm, then use its standard symbol codes. 4878ec713c28Smrgcase `$NM -V 2>&1` in 4879ec713c28Smrg*GNU* | *'with BFD'*) 4880ec713c28Smrg symcode='[[ABCDGIRSTW]]' ;; 4881ec713c28Smrgesac 4882786a6f21Smrg 4883ec713c28Smrg# Try without a prefix undercore, then with it. 4884ec713c28Smrgfor ac_symprfx in "" "_"; do 4885786a6f21Smrg 4886ec713c28Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4887ec713c28Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4888786a6f21Smrg 4889ec713c28Smrg # Write the raw and C identifiers. 4890ec713c28Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 48911d54945dSmrg 4892ec713c28Smrg # Check to see that the pipe works correctly. 4893ec713c28Smrg pipe_works=no 4894786a6f21Smrg 4895ec713c28Smrg rm -f conftest* 4896ec713c28Smrg cat > conftest.$ac_ext <<EOF 4897ec713c28Smrg#ifdef __cplusplus 4898ec713c28Smrgextern "C" { 4899ec713c28Smrg#endif 4900ec713c28Smrgchar nm_test_var; 4901ec713c28Smrgvoid nm_test_func(){} 4902ec713c28Smrg#ifdef __cplusplus 4903ec713c28Smrg} 4904ec713c28Smrg#endif 4905ec713c28Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 4906ec713c28SmrgEOF 4907786a6f21Smrg 4908ec713c28Smrg if AC_TRY_EVAL(ac_compile); then 4909ec713c28Smrg # Now try to grab the symbols. 4910ec713c28Smrg nlist=conftest.nm 4911ec713c28Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 4912ec713c28Smrg # Try sorting and uniquifying the output. 4913ec713c28Smrg if sort "$nlist" | uniq > "$nlist"T; then 4914ec713c28Smrg mv -f "$nlist"T "$nlist" 4915ec713c28Smrg else 4916ec713c28Smrg rm -f "$nlist"T 4917ec713c28Smrg fi 4918786a6f21Smrg 4919ec713c28Smrg # Make sure that we snagged all the symbols we need. 4920ec713c28Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 4921ec713c28Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 4922ec713c28Smrg cat <<EOF > conftest.$ac_ext 4923ec713c28Smrg#ifdef __cplusplus 4924ec713c28Smrgextern "C" { 4925ec713c28Smrg#endif 4926786a6f21Smrg 4927ec713c28SmrgEOF 4928ec713c28Smrg # Now generate the symbol file. 4929ec713c28Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 4930786a6f21Smrg 4931ec713c28Smrg cat <<EOF >> conftest.$ac_ext 4932ec713c28Smrg#if defined (__STDC__) && __STDC__ 4933ec713c28Smrg# define lt_ptr_t void * 4934ec713c28Smrg#else 4935ec713c28Smrg# define lt_ptr_t char * 4936ec713c28Smrg# define const 4937ec713c28Smrg#endif 4938786a6f21Smrg 4939ec713c28Smrg/* The mapping between symbol names and symbols. */ 4940ec713c28Smrgconst struct { 4941ec713c28Smrg const char *name; 4942ec713c28Smrg lt_ptr_t address; 4943ec713c28Smrg} 4944ec713c28Smrglt_preloaded_symbols[[]] = 4945ec713c28Smrg{ 4946ec713c28SmrgEOF 4947ec713c28Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 4948ec713c28Smrg cat <<\EOF >> conftest.$ac_ext 4949ec713c28Smrg {0, (lt_ptr_t) 0} 4950ec713c28Smrg}; 4951786a6f21Smrg 4952ec713c28Smrg#ifdef __cplusplus 4953ec713c28Smrg} 4954ec713c28Smrg#endif 4955ec713c28SmrgEOF 4956ec713c28Smrg # Now try linking the two files. 4957ec713c28Smrg mv conftest.$ac_objext conftstm.$ac_objext 4958ec713c28Smrg lt_save_LIBS="$LIBS" 4959ec713c28Smrg lt_save_CFLAGS="$CFLAGS" 4960ec713c28Smrg LIBS="conftstm.$ac_objext" 4961ec713c28Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4962ec713c28Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4963ec713c28Smrg pipe_works=yes 4964ec713c28Smrg fi 4965ec713c28Smrg LIBS="$lt_save_LIBS" 4966ec713c28Smrg CFLAGS="$lt_save_CFLAGS" 4967ec713c28Smrg else 4968ec713c28Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4969786a6f21Smrg fi 4970ec713c28Smrg else 4971ec713c28Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4972ec713c28Smrg fi 4973ec713c28Smrg else 4974ec713c28Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4975ec713c28Smrg fi 4976ec713c28Smrg else 4977ec713c28Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4978ec713c28Smrg cat conftest.$ac_ext >&5 4979ec713c28Smrg fi 4980ec713c28Smrg rm -rf conftest* conftst* 49811d54945dSmrg 4982ec713c28Smrg # Do not use the global_symbol_pipe unless it works. 4983ec713c28Smrg if test "$pipe_works" = yes; then 4984ec713c28Smrg break 4985ec713c28Smrg else 4986ec713c28Smrg lt_cv_sys_global_symbol_pipe= 4987ec713c28Smrg fi 4988ec713c28Smrgdone 4989ec713c28Smrg]) 4990ec713c28Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4991ec713c28Smrg lt_cv_sys_global_symbol_to_cdecl= 4992ec713c28Smrgfi 4993ec713c28Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4994ec713c28Smrg AC_MSG_RESULT(failed) 4995ec713c28Smrgelse 4996ec713c28Smrg AC_MSG_RESULT(ok) 4997ec713c28Smrgfi 4998ec713c28Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 49991d54945dSmrg 50001d54945dSmrg 5001ec713c28Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 5002ec713c28Smrg# --------------------------------------- 5003ec713c28SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 5004ec713c28Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 5005ec713c28Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5006ec713c28Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 50071d54945dSmrg 5008ec713c28SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 5009ec713c28Smrg ifelse([$1],[CXX],[ 5010ec713c28Smrg # C++ specific cases for pic, static, wl, etc. 5011ec713c28Smrg if test "$GXX" = yes; then 5012ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5013ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 50141d54945dSmrg 5015ec713c28Smrg case $host_os in 5016ec713c28Smrg aix*) 5017ec713c28Smrg # All AIX code is PIC. 5018ec713c28Smrg if test "$host_cpu" = ia64; then 5019ec713c28Smrg # AIX 5 now supports IA64 processor 5020ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5021ec713c28Smrg fi 5022ec713c28Smrg ;; 5023ec713c28Smrg amigaos*) 5024ec713c28Smrg # FIXME: we need at least 68020 code to build shared libraries, but 5025ec713c28Smrg # adding the `-m68020' flag to GCC prevents building anything better, 5026ec713c28Smrg # like `-m68040'. 5027ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5028ec713c28Smrg ;; 5029ec713c28Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5030ec713c28Smrg # PIC is the default for these OSes. 5031ec713c28Smrg ;; 5032ec713c28Smrg mingw* | cygwin* | os2* | pw32*) 5033ec713c28Smrg # This hack is so that the source file can tell whether it is being 5034ec713c28Smrg # built for inclusion in a dll (and should export symbols for example). 5035ec713c28Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5036ec713c28Smrg # (--disable-auto-import) libraries 5037ec713c28Smrg m4_if([$1], [GCJ], [], 5038ec713c28Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5039ec713c28Smrg ;; 5040ec713c28Smrg darwin* | rhapsody*) 5041ec713c28Smrg # PIC is the default on this platform 5042ec713c28Smrg # Common symbols not allowed in MH_DYLIB files 5043ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5044ec713c28Smrg ;; 5045ec713c28Smrg *djgpp*) 5046ec713c28Smrg # DJGPP does not support shared libraries at all 5047ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5048ec713c28Smrg ;; 5049ec713c28Smrg interix[[3-9]]*) 5050ec713c28Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5051ec713c28Smrg # Instead, we relocate shared libraries at runtime. 5052ec713c28Smrg ;; 5053ec713c28Smrg sysv4*MP*) 5054ec713c28Smrg if test -d /usr/nec; then 5055ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5056ec713c28Smrg fi 5057ec713c28Smrg ;; 5058ec713c28Smrg hpux*) 5059ec713c28Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5060ec713c28Smrg # not for PA HP-UX. 5061ec713c28Smrg case $host_cpu in 5062ec713c28Smrg hppa*64*|ia64*) 5063ec713c28Smrg ;; 5064ec713c28Smrg *) 5065ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5066ec713c28Smrg ;; 5067ec713c28Smrg esac 5068ec713c28Smrg ;; 5069ec713c28Smrg *) 5070ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5071ec713c28Smrg ;; 5072ec713c28Smrg esac 5073ec713c28Smrg else 5074ec713c28Smrg case $host_os in 5075ec713c28Smrg aix[[4-9]]*) 5076ec713c28Smrg # All AIX code is PIC. 5077ec713c28Smrg if test "$host_cpu" = ia64; then 5078ec713c28Smrg # AIX 5 now supports IA64 processor 5079ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5080ec713c28Smrg else 5081ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5082ec713c28Smrg fi 5083ec713c28Smrg ;; 5084ec713c28Smrg chorus*) 5085ec713c28Smrg case $cc_basename in 5086ec713c28Smrg cxch68*) 5087ec713c28Smrg # Green Hills C++ Compiler 5088ec713c28Smrg # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" 5089ec713c28Smrg ;; 5090ec713c28Smrg esac 5091ec713c28Smrg ;; 5092ec713c28Smrg darwin*) 5093ec713c28Smrg # PIC is the default on this platform 5094ec713c28Smrg # Common symbols not allowed in MH_DYLIB files 5095ec713c28Smrg case $cc_basename in 5096ec713c28Smrg xlc*) 5097ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5098ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5099ec713c28Smrg ;; 5100ec713c28Smrg esac 5101ec713c28Smrg ;; 5102ec713c28Smrg dgux*) 5103ec713c28Smrg case $cc_basename in 5104ec713c28Smrg ec++*) 5105ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5106ec713c28Smrg ;; 5107ec713c28Smrg ghcx*) 5108ec713c28Smrg # Green Hills C++ Compiler 5109ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5110ec713c28Smrg ;; 5111ec713c28Smrg *) 5112ec713c28Smrg ;; 5113ec713c28Smrg esac 5114ec713c28Smrg ;; 5115ec713c28Smrg freebsd* | dragonfly*) 5116ec713c28Smrg # FreeBSD uses GNU C++ 5117ec713c28Smrg ;; 5118ec713c28Smrg hpux9* | hpux10* | hpux11*) 5119ec713c28Smrg case $cc_basename in 5120ec713c28Smrg CC*) 5121ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5122ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5123ec713c28Smrg if test "$host_cpu" != ia64; then 5124ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5125ec713c28Smrg fi 5126ec713c28Smrg ;; 5127ec713c28Smrg aCC*) 5128ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5129ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5130ec713c28Smrg case $host_cpu in 5131ec713c28Smrg hppa*64*|ia64*) 5132ec713c28Smrg # +Z the default 5133ec713c28Smrg ;; 5134ec713c28Smrg *) 5135ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5136ec713c28Smrg ;; 5137ec713c28Smrg esac 5138ec713c28Smrg ;; 5139ec713c28Smrg *) 5140ec713c28Smrg ;; 5141ec713c28Smrg esac 5142ec713c28Smrg ;; 5143ec713c28Smrg interix*) 5144ec713c28Smrg # This is c89, which is MS Visual C++ (no shared libs) 5145ec713c28Smrg # Anyone wants to do a port? 5146ec713c28Smrg ;; 5147ec713c28Smrg irix5* | irix6* | nonstopux*) 5148ec713c28Smrg case $cc_basename in 5149ec713c28Smrg CC*) 5150ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5151ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5152ec713c28Smrg # CC pic flag -KPIC is the default. 5153ec713c28Smrg ;; 5154ec713c28Smrg *) 5155ec713c28Smrg ;; 5156ec713c28Smrg esac 5157ec713c28Smrg ;; 5158ec713c28Smrg linux* | k*bsd*-gnu) 5159ec713c28Smrg case $cc_basename in 5160ec713c28Smrg KCC*) 5161ec713c28Smrg # KAI C++ Compiler 5162ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5163ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5164ec713c28Smrg ;; 5165ec713c28Smrg icpc* | ecpc*) 5166ec713c28Smrg # Intel C++ 5167ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5168ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5169ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5170ec713c28Smrg ;; 5171ec713c28Smrg pgCC* | pgcpp*) 5172ec713c28Smrg # Portland Group C++ compiler. 5173ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5174ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5175ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5176ec713c28Smrg ;; 5177ec713c28Smrg cxx*) 5178ec713c28Smrg # Compaq C++ 5179ec713c28Smrg # Make sure the PIC flag is empty. It appears that all Alpha 5180ec713c28Smrg # Linux and Compaq Tru64 Unix objects are PIC. 5181ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5182ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5183ec713c28Smrg ;; 5184ec713c28Smrg *) 5185ec713c28Smrg case `$CC -V 2>&1 | sed 5q` in 5186ec713c28Smrg *Sun\ C*) 5187ec713c28Smrg # Sun C++ 5.9 5188ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5189ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5190ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5191ec713c28Smrg ;; 5192ec713c28Smrg esac 5193ec713c28Smrg ;; 5194ec713c28Smrg esac 5195ec713c28Smrg ;; 5196ec713c28Smrg lynxos*) 5197ec713c28Smrg ;; 5198ec713c28Smrg m88k*) 5199ec713c28Smrg ;; 5200ec713c28Smrg mvs*) 5201ec713c28Smrg case $cc_basename in 5202ec713c28Smrg cxx*) 5203ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5204ec713c28Smrg ;; 5205ec713c28Smrg *) 5206ec713c28Smrg ;; 5207ec713c28Smrg esac 5208ec713c28Smrg ;; 5209ec713c28Smrg netbsd*) 5210ec713c28Smrg ;; 5211ec713c28Smrg osf3* | osf4* | osf5*) 5212ec713c28Smrg case $cc_basename in 5213ec713c28Smrg KCC*) 5214ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5215ec713c28Smrg ;; 5216ec713c28Smrg RCC*) 5217ec713c28Smrg # Rational C++ 2.4.1 5218ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5219ec713c28Smrg ;; 5220ec713c28Smrg cxx*) 5221ec713c28Smrg # Digital/Compaq C++ 5222ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5223ec713c28Smrg # Make sure the PIC flag is empty. It appears that all Alpha 5224ec713c28Smrg # Linux and Compaq Tru64 Unix objects are PIC. 5225ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5226ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5227ec713c28Smrg ;; 5228ec713c28Smrg *) 5229ec713c28Smrg ;; 5230ec713c28Smrg esac 5231ec713c28Smrg ;; 5232ec713c28Smrg psos*) 5233ec713c28Smrg ;; 5234ec713c28Smrg solaris*) 5235ec713c28Smrg case $cc_basename in 5236ec713c28Smrg CC*) 5237ec713c28Smrg # Sun C++ 4.2, 5.x and Centerline C++ 5238ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5239ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5240ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5241ec713c28Smrg ;; 5242ec713c28Smrg gcx*) 5243ec713c28Smrg # Green Hills C++ Compiler 5244ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5245ec713c28Smrg ;; 5246ec713c28Smrg *) 5247ec713c28Smrg ;; 5248ec713c28Smrg esac 5249ec713c28Smrg ;; 5250ec713c28Smrg sunos4*) 5251ec713c28Smrg case $cc_basename in 5252ec713c28Smrg CC*) 5253ec713c28Smrg # Sun C++ 4.x 5254ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5255ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5256ec713c28Smrg ;; 5257ec713c28Smrg lcc*) 5258ec713c28Smrg # Lucid 5259ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5260ec713c28Smrg ;; 5261ec713c28Smrg *) 5262ec713c28Smrg ;; 5263ec713c28Smrg esac 5264ec713c28Smrg ;; 5265ec713c28Smrg tandem*) 5266ec713c28Smrg case $cc_basename in 5267ec713c28Smrg NCC*) 5268ec713c28Smrg # NonStop-UX NCC 3.20 5269ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5270ec713c28Smrg ;; 5271ec713c28Smrg *) 5272ec713c28Smrg ;; 5273ec713c28Smrg esac 5274ec713c28Smrg ;; 5275ec713c28Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5276ec713c28Smrg case $cc_basename in 5277ec713c28Smrg CC*) 5278ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5279ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5280ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5281ec713c28Smrg ;; 5282ec713c28Smrg esac 5283ec713c28Smrg ;; 5284ec713c28Smrg vxworks*) 5285ec713c28Smrg ;; 5286ec713c28Smrg *) 5287ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5288ec713c28Smrg ;; 5289ec713c28Smrg esac 5290ec713c28Smrg fi 5291ec713c28Smrg], 5292ec713c28Smrg[ 5293ec713c28Smrg if test "$GCC" = yes; then 5294ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5295ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5296786a6f21Smrg 5297ec713c28Smrg case $host_os in 5298ec713c28Smrg aix*) 5299ec713c28Smrg # All AIX code is PIC. 5300ec713c28Smrg if test "$host_cpu" = ia64; then 5301ec713c28Smrg # AIX 5 now supports IA64 processor 5302ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5303ec713c28Smrg fi 5304ec713c28Smrg ;; 5305786a6f21Smrg 5306ec713c28Smrg amigaos*) 5307ec713c28Smrg # FIXME: we need at least 68020 code to build shared libraries, but 5308ec713c28Smrg # adding the `-m68020' flag to GCC prevents building anything better, 5309ec713c28Smrg # like `-m68040'. 5310ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5311ec713c28Smrg ;; 5312786a6f21Smrg 5313ec713c28Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5314ec713c28Smrg # PIC is the default for these OSes. 5315ec713c28Smrg ;; 5316786a6f21Smrg 5317ec713c28Smrg mingw* | cygwin* | pw32* | os2*) 5318ec713c28Smrg # This hack is so that the source file can tell whether it is being 5319ec713c28Smrg # built for inclusion in a dll (and should export symbols for example). 5320ec713c28Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5321ec713c28Smrg # (--disable-auto-import) libraries 5322ec713c28Smrg m4_if([$1], [GCJ], [], 5323ec713c28Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5324ec713c28Smrg ;; 5325786a6f21Smrg 5326ec713c28Smrg darwin* | rhapsody*) 5327ec713c28Smrg # PIC is the default on this platform 5328ec713c28Smrg # Common symbols not allowed in MH_DYLIB files 5329ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5330ec713c28Smrg ;; 5331786a6f21Smrg 5332ec713c28Smrg interix[[3-9]]*) 5333ec713c28Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5334ec713c28Smrg # Instead, we relocate shared libraries at runtime. 5335ec713c28Smrg ;; 5336786a6f21Smrg 5337ec713c28Smrg msdosdjgpp*) 5338ec713c28Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 5339ec713c28Smrg # on systems that don't support them. 5340ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5341ec713c28Smrg enable_shared=no 5342ec713c28Smrg ;; 5343786a6f21Smrg 5344ec713c28Smrg sysv4*MP*) 5345ec713c28Smrg if test -d /usr/nec; then 5346ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5347ec713c28Smrg fi 5348ec713c28Smrg ;; 5349786a6f21Smrg 5350ec713c28Smrg hpux*) 5351ec713c28Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5352ec713c28Smrg # not for PA HP-UX. 5353ec713c28Smrg case $host_cpu in 5354ec713c28Smrg hppa*64*|ia64*) 5355ec713c28Smrg # +Z the default 5356ec713c28Smrg ;; 5357ec713c28Smrg *) 5358ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5359ec713c28Smrg ;; 5360ec713c28Smrg esac 5361ec713c28Smrg ;; 53621d54945dSmrg 5363ec713c28Smrg *) 5364ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5365ec713c28Smrg ;; 5366ec713c28Smrg esac 5367ec713c28Smrg else 5368ec713c28Smrg # PORTME Check for flag to pass linker flags through the system compiler. 5369ec713c28Smrg case $host_os in 5370ec713c28Smrg aix*) 5371ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5372ec713c28Smrg if test "$host_cpu" = ia64; then 5373ec713c28Smrg # AIX 5 now supports IA64 processor 5374ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5375ec713c28Smrg else 5376ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5377ec713c28Smrg fi 5378ec713c28Smrg ;; 5379ec713c28Smrg darwin*) 5380ec713c28Smrg # PIC is the default on this platform 5381ec713c28Smrg # Common symbols not allowed in MH_DYLIB files 5382ec713c28Smrg case $cc_basename in 5383ec713c28Smrg xlc*) 5384ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5385ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5386ec713c28Smrg ;; 5387ec713c28Smrg esac 5388ec713c28Smrg ;; 53891d54945dSmrg 5390ec713c28Smrg mingw* | cygwin* | pw32* | os2*) 5391ec713c28Smrg # This hack is so that the source file can tell whether it is being 5392ec713c28Smrg # built for inclusion in a dll (and should export symbols for example). 5393ec713c28Smrg m4_if([$1], [GCJ], [], 5394ec713c28Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5395ec713c28Smrg ;; 53961d54945dSmrg 5397ec713c28Smrg hpux9* | hpux10* | hpux11*) 5398ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5399ec713c28Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5400ec713c28Smrg # not for PA HP-UX. 5401ec713c28Smrg case $host_cpu in 5402ec713c28Smrg hppa*64*|ia64*) 5403ec713c28Smrg # +Z the default 5404ec713c28Smrg ;; 5405ec713c28Smrg *) 5406ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5407ec713c28Smrg ;; 5408ec713c28Smrg esac 5409ec713c28Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 5410ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5411ec713c28Smrg ;; 54121d54945dSmrg 5413ec713c28Smrg irix5* | irix6* | nonstopux*) 5414ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5415ec713c28Smrg # PIC (with -KPIC) is the default. 5416ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5417ec713c28Smrg ;; 54181d54945dSmrg 5419ec713c28Smrg newsos6) 5420ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5421ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5422ec713c28Smrg ;; 54231d54945dSmrg 5424ec713c28Smrg linux* | k*bsd*-gnu) 5425ec713c28Smrg case $cc_basename in 5426ec713c28Smrg icc* | ecc*) 5427ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5428ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5429ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5430ec713c28Smrg ;; 5431ec713c28Smrg pgcc* | pgf77* | pgf90* | pgf95*) 5432ec713c28Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 5433ec713c28Smrg # which looks to be a dead project) 5434ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5435ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5436ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5437ec713c28Smrg ;; 5438ec713c28Smrg ccc*) 5439ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5440ec713c28Smrg # All Alpha code is PIC. 5441ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5442ec713c28Smrg ;; 5443ec713c28Smrg *) 5444ec713c28Smrg case `$CC -V 2>&1 | sed 5q` in 5445ec713c28Smrg *Sun\ C*) 5446ec713c28Smrg # Sun C 5.9 5447ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5448ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5449ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5450ec713c28Smrg ;; 5451ec713c28Smrg *Sun\ F*) 5452ec713c28Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 5453ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5454ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5455ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 5456ec713c28Smrg ;; 5457ec713c28Smrg esac 5458ec713c28Smrg ;; 5459ec713c28Smrg esac 5460ec713c28Smrg ;; 54611d54945dSmrg 5462ec713c28Smrg osf3* | osf4* | osf5*) 5463ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5464ec713c28Smrg # All OSF/1 code is PIC. 5465ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5466ec713c28Smrg ;; 54671d54945dSmrg 5468ec713c28Smrg rdos*) 5469ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5470ec713c28Smrg ;; 5471ba85709eSmrg 5472ec713c28Smrg solaris*) 5473ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5474ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5475ec713c28Smrg case $cc_basename in 5476ec713c28Smrg f77* | f90* | f95*) 5477ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5478ec713c28Smrg *) 5479ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5480ec713c28Smrg esac 5481ec713c28Smrg ;; 54821d54945dSmrg 5483ec713c28Smrg sunos4*) 5484ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5485ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5486ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5487ec713c28Smrg ;; 54881d54945dSmrg 5489ec713c28Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 5490ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5491ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5492ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5493ec713c28Smrg ;; 54941d54945dSmrg 5495ec713c28Smrg sysv4*MP*) 5496ec713c28Smrg if test -d /usr/nec ;then 5497ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5498ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5499ec713c28Smrg fi 5500ec713c28Smrg ;; 55011d54945dSmrg 5502ec713c28Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5503ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5504ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5505ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5506ec713c28Smrg ;; 55071d54945dSmrg 5508ec713c28Smrg unicos*) 5509ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5510ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5511ec713c28Smrg ;; 55121d54945dSmrg 5513ec713c28Smrg uts4*) 5514ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5515ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5516ec713c28Smrg ;; 55171d54945dSmrg 5518ec713c28Smrg *) 5519ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5520ec713c28Smrg ;; 5521ec713c28Smrg esac 55221d54945dSmrg fi 55231d54945dSmrg]) 5524ec713c28SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 55251d54945dSmrg 5526ec713c28Smrg# 5527ec713c28Smrg# Check to make sure the PIC flag actually works. 5528ec713c28Smrg# 5529ec713c28Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 5530ec713c28Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 5531ec713c28Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 5532ec713c28Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 5533ec713c28Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 5534ec713c28Smrg "" | " "*) ;; 5535ec713c28Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5536ec713c28Smrg esac], 5537ec713c28Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5538ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 55391d54945dSmrgfi 5540ec713c28Smrgcase $host_os in 5541ec713c28Smrg # For platforms which do not support PIC, -DPIC is meaningless: 5542ec713c28Smrg *djgpp*) 5543ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5544ec713c28Smrg ;; 5545ec713c28Smrg *) 5546ec713c28Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 5547ec713c28Smrg ;; 55481d54945dSmrgesac 55491d54945dSmrg 5550ec713c28Smrg# 5551ec713c28Smrg# Check to make sure the static flag actually works. 5552ec713c28Smrg# 5553ec713c28Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 5554ec713c28SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5555ec713c28Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5556ec713c28Smrg $lt_tmp_static_flag, 5557ec713c28Smrg [], 5558ec713c28Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 5559ec713c28Smrg]) 5560786a6f21Smrg 5561786a6f21Smrg 5562ec713c28Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 5563ec713c28Smrg# ------------------------------------ 5564ec713c28Smrg# See if the linker supports building shared libraries. 5565ec713c28SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 5566ec713c28Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 5567ec713c28SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5568ec713c28Smrgifelse([$1],[CXX],[ 5569ec713c28Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5570ec713c28Smrg case $host_os in 5571ec713c28Smrg aix[[4-9]]*) 5572ec713c28Smrg # If we're using GNU nm, then we don't want the "-C" option. 5573ec713c28Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5574ec713c28Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5575ec713c28Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 5576ec713c28Smrg else 5577ec713c28Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 5578ec713c28Smrg fi 5579ec713c28Smrg ;; 5580ec713c28Smrg pw32*) 5581ec713c28Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5582ec713c28Smrg ;; 5583ec713c28Smrg cygwin* | mingw*) 5584ec713c28Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' 5585ec713c28Smrg ;; 5586ec713c28Smrg *) 5587ec713c28Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5588ec713c28Smrg ;; 55891d54945dSmrg esac 5590ec713c28Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5591ec713c28Smrg],[ 5592ec713c28Smrg runpath_var= 5593ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 5594ec713c28Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5595ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 5596ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5597ec713c28Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 5598ec713c28Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5599ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5600ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5601ec713c28Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 5602ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5603ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5604ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5605ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5606ec713c28Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5607ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5608ec713c28Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5609ec713c28Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 5610ec713c28Smrg _LT_AC_TAGVAR(module_cmds, $1)= 5611ec713c28Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 5612ec713c28Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5613ec713c28Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5614ec713c28Smrg # include_expsyms should be a list of space-separated symbols to be *always* 5615ec713c28Smrg # included in the symbol list 5616ec713c28Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 5617ec713c28Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 5618ec713c28Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 5619ec713c28Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5620ec713c28Smrg # as well as any symbol that contains `d'. 5621ec713c28Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5622ec713c28Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5623ec713c28Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 5624ec713c28Smrg # the symbol is explicitly referenced. Since portable code cannot 5625ec713c28Smrg # rely on this symbol name, it's probably fine to never include it in 5626ec713c28Smrg # preloaded symbol tables. 5627ec713c28Smrg # Exclude shared library initialization/finalization symbols. 5628ec713c28Smrgdnl Note also adjust exclude_expsyms for C++ above. 5629ec713c28Smrg extract_expsyms_cmds= 5630ec713c28Smrg # Just being paranoid about ensuring that cc_basename is set. 5631ec713c28Smrg _LT_CC_BASENAME([$compiler]) 5632ec713c28Smrg case $host_os in 5633ec713c28Smrg cygwin* | mingw* | pw32*) 5634ec713c28Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5635ec713c28Smrg # When not using gcc, we currently assume that we are using 5636ec713c28Smrg # Microsoft Visual C++. 5637ec713c28Smrg if test "$GCC" != yes; then 5638ec713c28Smrg with_gnu_ld=no 5639ec713c28Smrg fi 5640ec713c28Smrg ;; 5641ec713c28Smrg interix*) 5642ec713c28Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5643ec713c28Smrg with_gnu_ld=yes 5644ec713c28Smrg ;; 5645ec713c28Smrg openbsd*) 5646ec713c28Smrg with_gnu_ld=no 56471d54945dSmrg ;; 56481d54945dSmrg esac 56491d54945dSmrg 5650ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5651ec713c28Smrg if test "$with_gnu_ld" = yes; then 5652ec713c28Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5653ec713c28Smrg wlarc='${wl}' 56541d54945dSmrg 5655ec713c28Smrg # Set some defaults for GNU ld with shared library support. These 5656ec713c28Smrg # are reset later if shared libraries are not supported. Putting them 5657ec713c28Smrg # here allows them to be overridden if necessary. 5658ec713c28Smrg runpath_var=LD_RUN_PATH 5659ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5660ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5661ec713c28Smrg # ancient GNU ld didn't support --whole-archive et. al. 5662ec713c28Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 5663ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5664ec713c28Smrg else 5665ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5666ec713c28Smrg fi 5667ec713c28Smrg supports_anon_versioning=no 5668ec713c28Smrg case `$LD -v 2>/dev/null` in 5669ec713c28Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5670ec713c28Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5671ec713c28Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5672ec713c28Smrg *\ 2.11.*) ;; # other 2.11 versions 5673ec713c28Smrg *) supports_anon_versioning=yes ;; 5674ec713c28Smrg esac 56751d54945dSmrg 5676ec713c28Smrg # See if GNU ld supports shared libraries. 5677ec713c28Smrg case $host_os in 5678ec713c28Smrg aix[[3-9]]*) 5679ec713c28Smrg # On AIX/PPC, the GNU linker is very broken 5680ec713c28Smrg if test "$host_cpu" != ia64; then 5681ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5682ec713c28Smrg cat <<EOF 1>&2 56831d54945dSmrg 5684ec713c28Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 5685ec713c28Smrg*** to be unable to reliably create shared libraries on AIX. 5686ec713c28Smrg*** Therefore, libtool is disabling shared libraries support. If you 5687ec713c28Smrg*** really care for shared libraries, you may want to modify your PATH 5688ec713c28Smrg*** so that a non-GNU linker is found, and then restart. 56891d54945dSmrg 5690ec713c28SmrgEOF 5691ec713c28Smrg fi 5692ec713c28Smrg ;; 56931d54945dSmrg 5694ec713c28Smrg amigaos*) 5695ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 5696ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5697ec713c28Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5698ec713c28Smrg 5699ec713c28Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 5700ec713c28Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 5701ec713c28Smrg # to version 4, is to share data among multiple programs linked 5702ec713c28Smrg # with the same dynamic library. Since this doesn't match the 5703ec713c28Smrg # behavior of shared libraries on other platforms, we can't use 5704ec713c28Smrg # them. 5705ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5706ec713c28Smrg ;; 57071d54945dSmrg 5708ec713c28Smrg beos*) 5709ec713c28Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5710ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5711ec713c28Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5712ec713c28Smrg # support --undefined. This deserves some investigation. FIXME 5713ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5714ec713c28Smrg else 5715ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5716ec713c28Smrg fi 5717ec713c28Smrg ;; 57181d54945dSmrg 5719ec713c28Smrg cygwin* | mingw* | pw32*) 5720ec713c28Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5721ec713c28Smrg # as there is no search path for DLLs. 5722ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5723ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5724ec713c28Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5725ec713c28Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5726ec713c28Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' 5727ec713c28Smrg 5728ec713c28Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5729ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5730ec713c28Smrg # If the export-symbols file already is a .def file (1st line 5731ec713c28Smrg # is EXPORTS), use it as is; otherwise, prepend... 5732ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5733ec713c28Smrg cp $export_symbols $output_objdir/$soname.def; 5734ec713c28Smrg else 5735ec713c28Smrg echo EXPORTS > $output_objdir/$soname.def; 5736ec713c28Smrg cat $export_symbols >> $output_objdir/$soname.def; 5737ec713c28Smrg fi~ 5738ec713c28Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5739ec713c28Smrg else 5740ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5741ec713c28Smrg fi 5742ec713c28Smrg ;; 57431d54945dSmrg 5744ec713c28Smrg interix[[3-9]]*) 5745ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5746ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5747ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5748ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5749ec713c28Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5750ec713c28Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5751ec713c28Smrg # default) and relocated if they conflict, which is a slow very memory 5752ec713c28Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5753ec713c28Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5754ec713c28Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5755ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 5756ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 5757ec713c28Smrg ;; 57581d54945dSmrg 5759ec713c28Smrg gnu* | linux* | k*bsd*-gnu) 5760ec713c28Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5761ec713c28Smrg tmp_addflag= 5762ec713c28Smrg case $cc_basename,$host_cpu in 5763ec713c28Smrg pgcc*) # Portland Group C compiler 5764ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 5765ec713c28Smrg tmp_addflag=' $pic_flag' 5766ec713c28Smrg ;; 5767ec713c28Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 5768ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 5769ec713c28Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 5770ec713c28Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5771ec713c28Smrg tmp_addflag=' -i_dynamic' ;; 5772ec713c28Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5773ec713c28Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5774ec713c28Smrg ifc* | ifort*) # Intel Fortran compiler 5775ec713c28Smrg tmp_addflag=' -nofor_main' ;; 5776ec713c28Smrg esac 5777ec713c28Smrg case `$CC -V 2>&1 | sed 5q` in 5778ec713c28Smrg *Sun\ C*) # Sun C 5.9 5779ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 5780ec713c28Smrg tmp_sharedflag='-G' ;; 5781ec713c28Smrg *Sun\ F*) # Sun Fortran 8.3 5782ec713c28Smrg tmp_sharedflag='-G' ;; 5783ec713c28Smrg *) 5784ec713c28Smrg tmp_sharedflag='-shared' ;; 5785ec713c28Smrg esac 5786ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 57871d54945dSmrg 5788ec713c28Smrg if test $supports_anon_versioning = yes; then 5789ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 5790ec713c28Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5791ec713c28Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 5792ec713c28Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5793ec713c28Smrg fi 5794ec713c28Smrg else 5795ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5796ec713c28Smrg fi 5797ec713c28Smrg ;; 57981d54945dSmrg 5799ec713c28Smrg netbsd*) 5800ec713c28Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5801ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5802ec713c28Smrg wlarc= 5803ec713c28Smrg else 5804ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5805ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5806ec713c28Smrg fi 5807ec713c28Smrg ;; 58081d54945dSmrg 5809ec713c28Smrg solaris*) 5810ec713c28Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 5811ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5812ec713c28Smrg cat <<EOF 1>&2 58131d54945dSmrg 5814ec713c28Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5815ec713c28Smrg*** create shared libraries on Solaris systems. Therefore, libtool 5816ec713c28Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5817ec713c28Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 5818ec713c28Smrg*** your PATH or compiler configuration so that the native linker is 5819ec713c28Smrg*** used, and then restart. 58201d54945dSmrg 5821ec713c28SmrgEOF 5822ec713c28Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5823ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5824ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5825ec713c28Smrg else 5826ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5827ec713c28Smrg fi 5828ec713c28Smrg ;; 58291d54945dSmrg 5830ec713c28Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5831ec713c28Smrg case `$LD -v 2>&1` in 5832ec713c28Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5833ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5834ec713c28Smrg cat <<_LT_EOF 1>&2 58351d54945dSmrg 5836ec713c28Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5837ec713c28Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5838ec713c28Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5839ec713c28Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5840ec713c28Smrg*** your PATH or compiler configuration so that the native linker is 5841ec713c28Smrg*** used, and then restart. 58421d54945dSmrg 5843ec713c28Smrg_LT_EOF 5844ec713c28Smrg ;; 5845ec713c28Smrg *) 5846ec713c28Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5847ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 5848ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 5849ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' 5850ec713c28Smrg else 5851ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5852ec713c28Smrg fi 5853ec713c28Smrg ;; 5854ec713c28Smrg esac 5855ec713c28Smrg ;; 58561d54945dSmrg 5857ec713c28Smrg sunos4*) 5858ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5859ec713c28Smrg wlarc= 5860ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5861ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5862ec713c28Smrg ;; 58631d54945dSmrg 5864ec713c28Smrg *) 5865ec713c28Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5866ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5867ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5868ec713c28Smrg else 5869ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5870ec713c28Smrg fi 5871ec713c28Smrg ;; 5872ec713c28Smrg esac 58731d54945dSmrg 5874ec713c28Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 5875ec713c28Smrg runpath_var= 5876ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5877ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5878ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5879ec713c28Smrg fi 5880ec713c28Smrg else 5881ec713c28Smrg # PORTME fill in a description of your system's linker (not GNU ld) 5882ec713c28Smrg case $host_os in 5883ec713c28Smrg aix3*) 5884ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5885ec713c28Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5886ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' 5887ec713c28Smrg # Note: this linker hardcodes the directories in LIBPATH if there 5888ec713c28Smrg # are no directories specified by -L. 5889ec713c28Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5890ec713c28Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 5891ec713c28Smrg # Neither direct hardcoding nor static linking is supported with a 5892ec713c28Smrg # broken collect2. 5893ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5894ec713c28Smrg fi 5895ec713c28Smrg ;; 58961d54945dSmrg 5897ec713c28Smrg aix[[4-9]]*) 5898ec713c28Smrg if test "$host_cpu" = ia64; then 5899ec713c28Smrg # On IA64, the linker does run time linking by default, so we don't 5900ec713c28Smrg # have to do anything special. 5901ec713c28Smrg aix_use_runtimelinking=no 5902ec713c28Smrg exp_sym_flag='-Bexport' 5903ec713c28Smrg no_entry_flag="" 5904ec713c28Smrg else 5905ec713c28Smrg # If we're using GNU nm, then we don't want the "-C" option. 5906ec713c28Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5907ec713c28Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5908ec713c28Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 5909ec713c28Smrg else 5910ec713c28Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 5911ec713c28Smrg fi 5912ec713c28Smrg aix_use_runtimelinking=no 59131d54945dSmrg 5914ec713c28Smrg # Test if we are trying to use run time linking or normal 5915ec713c28Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5916ec713c28Smrg # need to do runtime linking. 5917ec713c28Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5918ec713c28Smrg for ld_flag in $LDFLAGS; do 5919ec713c28Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5920ec713c28Smrg aix_use_runtimelinking=yes 5921ec713c28Smrg break 5922ec713c28Smrg fi 5923ec713c28Smrg done 5924ec713c28Smrg ;; 5925ec713c28Smrg esac 59261d54945dSmrg 5927ec713c28Smrg exp_sym_flag='-bexport' 5928ec713c28Smrg no_entry_flag='-bnoentry' 5929ec713c28Smrg fi 5930786a6f21Smrg 5931ec713c28Smrg # When large executables or shared objects are built, AIX ld can 5932ec713c28Smrg # have problems creating the table of contents. If linking a library 5933ec713c28Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5934ec713c28Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5935ec713c28Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5936786a6f21Smrg 5937ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 5938ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5939ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5940ec713c28Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5941786a6f21Smrg 5942ec713c28Smrg if test "$GCC" = yes; then 5943ec713c28Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5944ec713c28Smrg # We only want to do this on AIX 4.2 and lower, the check 5945ec713c28Smrg # below for broken collect2 doesn't work under 4.3+ 5946ec713c28Smrg collect2name=`${CC} -print-prog-name=collect2` 5947ec713c28Smrg if test -f "$collect2name" && \ 5948ec713c28Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 5949ec713c28Smrg then 5950ec713c28Smrg # We have reworked collect2 5951ec713c28Smrg : 5952ec713c28Smrg else 5953ec713c28Smrg # We have old collect2 5954ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5955ec713c28Smrg # It fails to find uninstalled libraries when the uninstalled 5956ec713c28Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5957ec713c28Smrg # to unsupported forces relinking 5958ec713c28Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5959ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5960ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5961ec713c28Smrg fi 5962ec713c28Smrg ;; 5963ec713c28Smrg esac 5964ec713c28Smrg shared_flag='-shared' 5965ec713c28Smrg if test "$aix_use_runtimelinking" = yes; then 5966ec713c28Smrg shared_flag="$shared_flag "'${wl}-G' 5967ec713c28Smrg fi 5968ec713c28Smrg else 5969ec713c28Smrg # not using gcc 5970ec713c28Smrg if test "$host_cpu" = ia64; then 5971ec713c28Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5972ec713c28Smrg # chokes on -Wl,-G. The following line is correct: 5973ec713c28Smrg shared_flag='-G' 5974ec713c28Smrg else 5975ec713c28Smrg if test "$aix_use_runtimelinking" = yes; then 5976ec713c28Smrg shared_flag='${wl}-G' 5977ec713c28Smrg else 5978ec713c28Smrg shared_flag='${wl}-bM:SRE' 5979ec713c28Smrg fi 5980ec713c28Smrg fi 5981ec713c28Smrg fi 5982786a6f21Smrg 5983ec713c28Smrg # It seems that -bexpall does not export symbols beginning with 5984ec713c28Smrg # underscore (_), so it is better to generate a list of symbols to export. 5985ec713c28Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5986ec713c28Smrg if test "$aix_use_runtimelinking" = yes; then 5987ec713c28Smrg # Warning - without using the other runtime loading flags (-brtl), 5988ec713c28Smrg # -berok will link without error, but may produce a broken library. 5989ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5990ec713c28Smrg # Determine the default libpath from the value encoded in an empty executable. 5991ec713c28Smrg _LT_AC_SYS_LIBPATH_AIX 5992ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5993ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5994ec713c28Smrg else 5995ec713c28Smrg if test "$host_cpu" = ia64; then 5996ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5997ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5998ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" 5999ec713c28Smrg else 6000ec713c28Smrg # Determine the default libpath from the value encoded in an empty executable. 6001ec713c28Smrg _LT_AC_SYS_LIBPATH_AIX 6002ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6003ec713c28Smrg # Warning - without using the other run time loading flags, 6004ec713c28Smrg # -berok will link without error, but may produce a broken library. 6005ec713c28Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6006ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6007ec713c28Smrg # Exported symbols can be pulled into shared objects from archives 6008ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6009ec713c28Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6010ec713c28Smrg # This is similar to how AIX traditionally builds its shared libraries. 6011ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 6012ec713c28Smrg fi 6013ec713c28Smrg fi 6014ec713c28Smrg ;; 60151d54945dSmrg 6016ec713c28Smrg amigaos*) 6017ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 6018ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6019ec713c28Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6020ec713c28Smrg # see comment about different semantics on the GNU ld section 6021ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6022ec713c28Smrg ;; 60231d54945dSmrg 6024ec713c28Smrg bsdi[[45]]*) 6025ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6026ec713c28Smrg ;; 60271d54945dSmrg 6028ec713c28Smrg cygwin* | mingw* | pw32*) 6029ec713c28Smrg # When not using gcc, we currently assume that we are using 6030ec713c28Smrg # Microsoft Visual C++. 6031ec713c28Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6032ec713c28Smrg # no search path for DLLs. 6033ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6034ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6035ec713c28Smrg # Tell ltmain to make .lib files, not .a files. 6036ec713c28Smrg libext=lib 6037ec713c28Smrg # Tell ltmain to make .dll files, not .so files. 6038ec713c28Smrg shrext_cmds=".dll" 6039ec713c28Smrg # FIXME: Setting linknames here is a bad hack. 6040ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 6041ec713c28Smrg # The linker will automatically build a .lib file if we build a DLL. 6042ec713c28Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 6043ec713c28Smrg # FIXME: Should let the user specify the lib program. 6044ec713c28Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6045ec713c28Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 6046ec713c28Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6047ec713c28Smrg ;; 60481d54945dSmrg 6049ec713c28Smrg darwin* | rhapsody*) 6050ec713c28Smrg case $host_os in 6051ec713c28Smrg rhapsody* | darwin1.[[012]]) 6052ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 6053ec713c28Smrg ;; 6054ec713c28Smrg *) # Darwin 1.3 on 6055ec713c28Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 6056ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6057ec713c28Smrg else 6058ec713c28Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 6059ec713c28Smrg 10.[[012]]) 6060ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6061ec713c28Smrg ;; 6062ec713c28Smrg 10.*) 6063ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 6064ec713c28Smrg ;; 6065ec713c28Smrg esac 6066ec713c28Smrg fi 6067ec713c28Smrg ;; 6068ec713c28Smrg esac 6069ec713c28Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6070ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6071ec713c28Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 6072ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6073ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 6074ec713c28Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6075ec713c28Smrg if test "$GCC" = yes ; then 6076ec713c28Smrg output_verbose_link_cmd='echo' 6077ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" 6078ec713c28Smrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 6079ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" 6080ec713c28Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" 6081ec713c28Smrg else 6082ec713c28Smrg case $cc_basename in 6083ec713c28Smrg xlc*) 6084ec713c28Smrg output_verbose_link_cmd='echo' 6085ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' 6086ec713c28Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 6087ec713c28Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 6088ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 6089ec713c28Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 6090ec713c28Smrg ;; 6091ec713c28Smrg *) 6092ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6093ec713c28Smrg ;; 6094ec713c28Smrg esac 6095ec713c28Smrg fi 6096ec713c28Smrg ;; 60971d54945dSmrg 6098ec713c28Smrg dgux*) 6099ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6100ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6101ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6102ec713c28Smrg ;; 61031d54945dSmrg 6104ec713c28Smrg freebsd1*) 6105ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6106ec713c28Smrg ;; 61071d54945dSmrg 6108ec713c28Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6109ec713c28Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 6110ec713c28Smrg # does not break anything, and helps significantly (at the cost of a little 6111ec713c28Smrg # extra space). 6112ec713c28Smrg freebsd2.2*) 6113ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6114ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6115ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6116ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6117ec713c28Smrg ;; 61181d54945dSmrg 6119ec713c28Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6120ec713c28Smrg freebsd2*) 6121ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6122ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6123ec713c28Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6124ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61251d54945dSmrg ;; 61261d54945dSmrg 6127ec713c28Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6128ec713c28Smrg freebsd* | dragonfly*) 6129ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 6130ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6131ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6132ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6133ec713c28Smrg ;; 61341d54945dSmrg 6135ec713c28Smrg hpux9*) 6136ec713c28Smrg if test "$GCC" = yes; then 6137ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6138ec713c28Smrg else 6139ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6140ec713c28Smrg fi 6141ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6142ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6143ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61441d54945dSmrg 6145ec713c28Smrg # hardcode_minus_L: Not really in the search PATH, 6146ec713c28Smrg # but as the default location of the library. 6147ec713c28Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6148ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6149ec713c28Smrg ;; 61501d54945dSmrg 6151ec713c28Smrg hpux10*) 6152ec713c28Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6153ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6154ec713c28Smrg else 6155ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6156ec713c28Smrg fi 6157ec713c28Smrg if test "$with_gnu_ld" = no; then 6158ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6159ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 61601d54945dSmrg 6161ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6162ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 61631d54945dSmrg 6164ec713c28Smrg # hardcode_minus_L: Not really in the search PATH, 6165ec713c28Smrg # but as the default location of the library. 6166ec713c28Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6167ec713c28Smrg fi 6168ec713c28Smrg ;; 61691d54945dSmrg 6170ec713c28Smrg hpux11*) 6171ec713c28Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6172ec713c28Smrg case $host_cpu in 6173ec713c28Smrg hppa*64*) 6174ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6175ec713c28Smrg ;; 6176ec713c28Smrg ia64*) 6177ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6178ec713c28Smrg ;; 6179ec713c28Smrg *) 6180ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6181ec713c28Smrg ;; 6182ec713c28Smrg esac 6183ec713c28Smrg else 6184ec713c28Smrg case $host_cpu in 6185ec713c28Smrg hppa*64*) 6186ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6187ec713c28Smrg ;; 6188ec713c28Smrg ia64*) 6189ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6190ec713c28Smrg ;; 6191ec713c28Smrg *) 6192ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6193ec713c28Smrg ;; 6194ec713c28Smrg esac 6195ec713c28Smrg fi 6196ec713c28Smrg if test "$with_gnu_ld" = no; then 6197ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6198ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 61991d54945dSmrg 6200ec713c28Smrg case $host_cpu in 6201ec713c28Smrg hppa*64*|ia64*) 6202ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 6203ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6204ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6205ec713c28Smrg ;; 6206ec713c28Smrg *) 6207ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6208ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62091d54945dSmrg 6210ec713c28Smrg # hardcode_minus_L: Not really in the search PATH, 6211ec713c28Smrg # but as the default location of the library. 6212ec713c28Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6213ec713c28Smrg ;; 6214ec713c28Smrg esac 6215ec713c28Smrg fi 62161d54945dSmrg ;; 62171d54945dSmrg 6218ec713c28Smrg irix5* | irix6* | nonstopux*) 6219ec713c28Smrg if test "$GCC" = yes; then 6220ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6221ec713c28Smrg else 6222ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 6223ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6224ec713c28Smrg fi 6225ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6226ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6227ec713c28Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6228ec713c28Smrg ;; 62291d54945dSmrg 6230ec713c28Smrg netbsd*) 6231ec713c28Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6232ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6233ec713c28Smrg else 6234ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6235ec713c28Smrg fi 6236ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6237ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6238ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6239ec713c28Smrg ;; 62401d54945dSmrg 6241ec713c28Smrg newsos6) 6242ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6243ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6244ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6245ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6246ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6247ec713c28Smrg ;; 62481d54945dSmrg 6249ec713c28Smrg openbsd*) 6250ec713c28Smrg if test -f /usr/libexec/ld.so; then 6251ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6252ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6253ec713c28Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6254ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6255ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6256ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6257ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6258ec713c28Smrg else 6259ec713c28Smrg case $host_os in 6260ec713c28Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6261ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6262ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6263ec713c28Smrg ;; 6264ec713c28Smrg *) 6265ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6266ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6267ec713c28Smrg ;; 6268ec713c28Smrg esac 6269ec713c28Smrg fi 6270ec713c28Smrg else 6271ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6272ec713c28Smrg fi 6273ec713c28Smrg ;; 62741d54945dSmrg 6275ec713c28Smrg os2*) 6276ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6277ec713c28Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6278ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6279ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 6280ec713c28Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6281ec713c28Smrg ;; 62821d54945dSmrg 6283ec713c28Smrg osf3*) 6284ec713c28Smrg if test "$GCC" = yes; then 6285ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6286ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6287ec713c28Smrg else 6288ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6289ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 6290ec713c28Smrg fi 6291ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6292ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6293ec713c28Smrg ;; 62941d54945dSmrg 6295ec713c28Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 6296ec713c28Smrg if test "$GCC" = yes; then 6297ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6298ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6299ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6300ec713c28Smrg else 6301ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6302ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 6303ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ 6304ec713c28Smrg $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' 63051d54945dSmrg 6306ec713c28Smrg # Both c and cxx compiler support -rpath directly 6307ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6308ec713c28Smrg fi 6309ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6310ec713c28Smrg ;; 6311786a6f21Smrg 6312ec713c28Smrg solaris*) 6313ec713c28Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6314ec713c28Smrg if test "$GCC" = yes; then 6315ec713c28Smrg wlarc='${wl}' 6316ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6317ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6318ec713c28Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 6319ec713c28Smrg else 6320ec713c28Smrg wlarc='' 6321ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6322ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6323ec713c28Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6324ec713c28Smrg fi 6325ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6326ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6327ec713c28Smrg case $host_os in 6328ec713c28Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6329ec713c28Smrg *) 6330ec713c28Smrg # The compiler driver will combine and reorder linker options, 6331ec713c28Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 6332ec713c28Smrg # but is careful enough not to reorder. 6333ec713c28Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6334ec713c28Smrg if test "$GCC" = yes; then 6335ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6336ec713c28Smrg else 6337ec713c28Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6338ba85709eSmrg fi 6339ec713c28Smrg ;; 6340ec713c28Smrg esac 6341ec713c28Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 63421d54945dSmrg ;; 63431d54945dSmrg 6344ec713c28Smrg sunos4*) 6345ec713c28Smrg if test "x$host_vendor" = xsequent; then 6346ec713c28Smrg # Use $CC to link under sequent, because it throws in some extra .o 6347ec713c28Smrg # files that make .init and .fini sections work. 6348ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6349ec713c28Smrg else 6350ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6351ec713c28Smrg fi 6352ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6353ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6354ec713c28Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6355ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6356ec713c28Smrg ;; 63571d54945dSmrg 6358ec713c28Smrg sysv4) 6359ec713c28Smrg case $host_vendor in 6360ec713c28Smrg sni) 6361ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6362ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6363ec713c28Smrg ;; 6364ec713c28Smrg siemens) 6365ec713c28Smrg ## LD is ld it makes a PLAMLIB 6366ec713c28Smrg ## CC just makes a GrossModule. 6367ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6368ec713c28Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6369ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6370ec713c28Smrg ;; 6371ec713c28Smrg motorola) 6372ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6373ec713c28Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6374ec713c28Smrg ;; 6375ec713c28Smrg esac 6376ec713c28Smrg runpath_var='LD_RUN_PATH' 6377ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6378ec713c28Smrg ;; 63791d54945dSmrg 6380ec713c28Smrg sysv4.3*) 6381ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6382ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6383ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6384ec713c28Smrg ;; 63851d54945dSmrg 6386ec713c28Smrg sysv4*MP*) 6387ec713c28Smrg if test -d /usr/nec; then 6388ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6389ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6390ec713c28Smrg runpath_var=LD_RUN_PATH 6391ec713c28Smrg hardcode_runpath_var=yes 6392ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6393ec713c28Smrg fi 6394ec713c28Smrg ;; 63951d54945dSmrg 6396ec713c28Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6397ec713c28Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6398ec713c28Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6399ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6400ec713c28Smrg runpath_var='LD_RUN_PATH' 64011d54945dSmrg 6402ec713c28Smrg if test "$GCC" = yes; then 6403ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6404ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6405ec713c28Smrg else 6406ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6407ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6408ec713c28Smrg fi 6409ec713c28Smrg ;; 64101d54945dSmrg 6411ec713c28Smrg sysv5* | sco3.2v5* | sco5v6*) 6412ec713c28Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6413ec713c28Smrg # link with -lc, and that would cause any symbols used from libc to 6414ec713c28Smrg # always be unresolved, which means just about no library would 6415ec713c28Smrg # ever link correctly. If we're not using GNU ld we use -z text 6416ec713c28Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6417ec713c28Smrg # as -z defs. 6418ec713c28Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6419ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6420ec713c28Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6421ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6422ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 6423ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 6424ec713c28Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6425ec713c28Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6426ec713c28Smrg runpath_var='LD_RUN_PATH' 64271d54945dSmrg 6428ec713c28Smrg if test "$GCC" = yes; then 6429ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6430ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6431ec713c28Smrg else 6432ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6433ec713c28Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6434ec713c28Smrg fi 6435ec713c28Smrg ;; 64361d54945dSmrg 6437ec713c28Smrg uts4*) 6438ec713c28Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6439ec713c28Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6440ec713c28Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6441ec713c28Smrg ;; 6442786a6f21Smrg 6443ec713c28Smrg *) 6444ec713c28Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6445ec713c28Smrg ;; 6446ec713c28Smrg esac 6447ec713c28Smrg fi 64481d54945dSmrg]) 6449ec713c28SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 6450ec713c28Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 64511d54945dSmrg 6452ec713c28Smrg# 6453ec713c28Smrg# Do we need to explicitly link libc? 6454ec713c28Smrg# 6455ec713c28Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6456ec713c28Smrgx|xyes) 6457ec713c28Smrg # Assume -lc should be added 6458ec713c28Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 64591d54945dSmrg 6460ec713c28Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 6461ec713c28Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 6462ec713c28Smrg *'~'*) 6463ec713c28Smrg # FIXME: we may have to deal with multi-command sequences. 6464ec713c28Smrg ;; 6465ec713c28Smrg '$CC '*) 6466ec713c28Smrg # Test whether the compiler implicitly links with -lc since on some 6467ec713c28Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6468ec713c28Smrg # to ld, don't add -lc before -lgcc. 6469ec713c28Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6470ec713c28Smrg $rm conftest* 6471ec713c28Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 64721d54945dSmrg 6473ec713c28Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6474ec713c28Smrg soname=conftest 6475ec713c28Smrg lib=conftest 6476ec713c28Smrg libobjs=conftest.$ac_objext 6477ec713c28Smrg deplibs= 6478ec713c28Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6479ec713c28Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 6480ec713c28Smrg compiler_flags=-v 6481ec713c28Smrg linker_flags=-v 6482ec713c28Smrg verstring= 6483ec713c28Smrg output_objdir=. 6484ec713c28Smrg libname=conftest 6485ec713c28Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 6486ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6487ec713c28Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 6488ec713c28Smrg then 6489ec713c28Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6490ec713c28Smrg else 6491ec713c28Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6492ec713c28Smrg fi 6493ec713c28Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6494ec713c28Smrg else 6495ec713c28Smrg cat conftest.err 1>&5 6496ec713c28Smrg fi 6497ec713c28Smrg $rm conftest* 6498ec713c28Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 6499ec713c28Smrg ;; 6500ec713c28Smrg esac 6501ec713c28Smrg fi 6502ec713c28Smrg ;; 6503ec713c28Smrgesac 6504ec713c28Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 65051d54945dSmrg 65061d54945dSmrg 6507ec713c28Smrg# _LT_AC_FILE_LTDLL_C 6508ec713c28Smrg# ------------------- 6509ec713c28Smrg# Be careful that the start marker always follows a newline. 6510ec713c28SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 6511ec713c28Smrg# /* ltdll.c starts here */ 6512ec713c28Smrg# #define WIN32_LEAN_AND_MEAN 6513ec713c28Smrg# #include <windows.h> 6514ec713c28Smrg# #undef WIN32_LEAN_AND_MEAN 6515ec713c28Smrg# #include <stdio.h> 65161d54945dSmrg# 6517ec713c28Smrg# #ifndef __CYGWIN__ 6518ec713c28Smrg# # ifdef __CYGWIN32__ 6519ec713c28Smrg# # define __CYGWIN__ __CYGWIN32__ 6520ec713c28Smrg# # endif 6521ec713c28Smrg# #endif 65221d54945dSmrg# 6523ec713c28Smrg# #ifdef __cplusplus 6524ec713c28Smrg# extern "C" { 6525ec713c28Smrg# #endif 6526ec713c28Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 6527ec713c28Smrg# #ifdef __cplusplus 6528ec713c28Smrg# } 6529ec713c28Smrg# #endif 65301d54945dSmrg# 6531ec713c28Smrg# #ifdef __CYGWIN__ 6532ec713c28Smrg# #include <cygwin/cygwin_dll.h> 6533ec713c28Smrg# DECLARE_CYGWIN_DLL( DllMain ); 6534ec713c28Smrg# #endif 6535ec713c28Smrg# HINSTANCE __hDllInstance_base; 6536ec713c28Smrg# 6537ec713c28Smrg# BOOL APIENTRY 6538ec713c28Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 6539ec713c28Smrg# { 6540ec713c28Smrg# __hDllInstance_base = hInst; 6541ec713c28Smrg# return TRUE; 6542ec713c28Smrg# } 6543ec713c28Smrg# /* ltdll.c ends here */ 6544ec713c28Smrg])# _LT_AC_FILE_LTDLL_C 65451d54945dSmrg 6546786a6f21Smrg 6547ec713c28Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 6548ec713c28Smrg# --------------------------------- 6549ec713c28SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 65501d54945dSmrg 65511d54945dSmrg 6552ec713c28Smrg# old names 6553ec713c28SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 6554ec713c28SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 6555ec713c28SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 6556ec713c28SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 6557ec713c28SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 6558ec713c28SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 6559ec713c28SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 65601d54945dSmrg 6561ec713c28Smrg# This is just to silence aclocal about the macro not being used 6562ec713c28Smrgifelse([AC_DISABLE_FAST_INSTALL]) 65631d54945dSmrg 6564ec713c28SmrgAC_DEFUN([LT_AC_PROG_GCJ], 6565ec713c28Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 6566ec713c28Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6567ec713c28Smrg AC_SUBST(GCJFLAGS) 6568ec713c28Smrg]) 65691d54945dSmrg 6570ec713c28SmrgAC_DEFUN([LT_AC_PROG_RC], 6571ec713c28Smrg[AC_CHECK_TOOL(RC, windres, no) 65721d54945dSmrg]) 65731d54945dSmrg 6574ba85709eSmrg 6575ec713c28Smrg# Cheap backport of AS_EXECUTABLE_P and required macros 6576ec713c28Smrg# from Autoconf 2.59; we should not use $as_executable_p directly. 6577ba85709eSmrg 6578ec713c28Smrg# _AS_TEST_PREPARE 6579ec713c28Smrg# ---------------- 6580ec713c28Smrgm4_ifndef([_AS_TEST_PREPARE], 6581ec713c28Smrg[m4_defun([_AS_TEST_PREPARE], 6582ec713c28Smrg[if test -x / >/dev/null 2>&1; then 6583ec713c28Smrg as_executable_p='test -x' 6584ec713c28Smrgelse 6585ec713c28Smrg as_executable_p='test -f' 6586ec713c28Smrgfi 6587ec713c28Smrg])])# _AS_TEST_PREPARE 6588ba85709eSmrg 6589ec713c28Smrg# AS_EXECUTABLE_P 6590ec713c28Smrg# --------------- 6591ec713c28Smrg# Check whether a file is executable. 6592ec713c28Smrgm4_ifndef([AS_EXECUTABLE_P], 6593ec713c28Smrg[m4_defun([AS_EXECUTABLE_P], 6594ec713c28Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl 6595ec713c28Smrg$as_executable_p $1[]dnl 6596ec713c28Smrg])])# AS_EXECUTABLE_P 6597ba85709eSmrg 6598ec713c28Smrg# NOTE: This macro has been submitted for inclusion into # 6599ec713c28Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 6600ec713c28Smrg# a released version of Autoconf we should remove this # 6601ec713c28Smrg# macro and use it instead. # 6602ec713c28Smrg# LT_AC_PROG_SED 6603ec713c28Smrg# -------------- 6604ec713c28Smrg# Check for a fully-functional sed program, that truncates 6605ec713c28Smrg# as few characters as possible. Prefer GNU sed if found. 6606ec713c28SmrgAC_DEFUN([LT_AC_PROG_SED], 6607ec713c28Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 6608ec713c28SmrgAC_CACHE_VAL(lt_cv_path_SED, 6609ec713c28Smrg[# Loop through the user's path and test for sed and gsed. 6610ec713c28Smrg# Then use that list of sed's as ones to test for truncation. 6611ec713c28Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6612ec713c28Smrgfor as_dir in $PATH 6613ec713c28Smrgdo 6614ec713c28Smrg IFS=$as_save_IFS 6615ec713c28Smrg test -z "$as_dir" && as_dir=. 6616ec713c28Smrg for lt_ac_prog in sed gsed; do 6617ec713c28Smrg for ac_exec_ext in '' $ac_executable_extensions; do 6618ec713c28Smrg if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 6619ec713c28Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 6620ec713c28Smrg fi 6621ec713c28Smrg done 6622ec713c28Smrg done 6623ec713c28Smrgdone 6624ec713c28SmrgIFS=$as_save_IFS 6625ec713c28Smrglt_ac_max=0 6626ec713c28Smrglt_ac_count=0 6627ec713c28Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 6628ec713c28Smrg# along with /bin/sed that truncates output. 6629ec713c28Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 6630ec713c28Smrg test ! -f $lt_ac_sed && continue 6631ec713c28Smrg cat /dev/null > conftest.in 6632ec713c28Smrg lt_ac_count=0 6633ec713c28Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 6634ec713c28Smrg # Check for GNU sed and select it if it is found. 6635ec713c28Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 6636ec713c28Smrg lt_cv_path_SED=$lt_ac_sed 6637ec713c28Smrg break 6638ec713c28Smrg fi 6639ec713c28Smrg while true; do 6640ec713c28Smrg cat conftest.in conftest.in >conftest.tmp 6641ec713c28Smrg mv conftest.tmp conftest.in 6642ec713c28Smrg cp conftest.in conftest.nl 6643ec713c28Smrg echo >>conftest.nl 6644ec713c28Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 6645ec713c28Smrg cmp -s conftest.out conftest.nl || break 6646ec713c28Smrg # 10000 chars as input seems more than enough 6647ec713c28Smrg test $lt_ac_count -gt 10 && break 6648ec713c28Smrg lt_ac_count=`expr $lt_ac_count + 1` 6649ec713c28Smrg if test $lt_ac_count -gt $lt_ac_max; then 6650ec713c28Smrg lt_ac_max=$lt_ac_count 6651ec713c28Smrg lt_cv_path_SED=$lt_ac_sed 6652ec713c28Smrg fi 6653ec713c28Smrg done 6654ec713c28Smrgdone 6655ec713c28Smrg]) 6656ec713c28SmrgSED=$lt_cv_path_SED 6657ec713c28SmrgAC_SUBST([SED]) 6658ec713c28SmrgAC_MSG_RESULT([$SED]) 66591d54945dSmrg]) 6660786a6f21Smrg 66611d54945dSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 66621d54945dSmrg# 66631d54945dSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 66641d54945dSmrg# 66651d54945dSmrg# This program is free software; you can redistribute it and/or modify 66661d54945dSmrg# it under the terms of the GNU General Public License as published by 66671d54945dSmrg# the Free Software Foundation; either version 2 of the License, or 66681d54945dSmrg# (at your option) any later version. 66691d54945dSmrg# 66701d54945dSmrg# This program is distributed in the hope that it will be useful, but 66711d54945dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 66721d54945dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 66731d54945dSmrg# General Public License for more details. 66741d54945dSmrg# 66751d54945dSmrg# You should have received a copy of the GNU General Public License 66761d54945dSmrg# along with this program; if not, write to the Free Software 66771d54945dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 66781d54945dSmrg# 66791d54945dSmrg# As a special exception to the GNU General Public License, if you 66801d54945dSmrg# distribute this file as part of a program that contains a 66811d54945dSmrg# configuration script generated by Autoconf, you may include it under 66821d54945dSmrg# the same distribution terms that you use for the rest of that program. 66831d54945dSmrg 66841d54945dSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 66851d54945dSmrg# ---------------------------------- 66861d54945dSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 66871d54945dSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 66881d54945dSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 66891d54945dSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 66901d54945dSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 66911d54945dSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 66921d54945dSmrgfi 66931d54945dSmrgif test -n "$PKG_CONFIG"; then 66941d54945dSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 66951d54945dSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 66961d54945dSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 66971d54945dSmrg AC_MSG_RESULT([yes]) 66981d54945dSmrg else 66991d54945dSmrg AC_MSG_RESULT([no]) 67001d54945dSmrg PKG_CONFIG="" 67011d54945dSmrg fi 67021d54945dSmrg 67031d54945dSmrgfi[]dnl 67041d54945dSmrg])# PKG_PROG_PKG_CONFIG 67051d54945dSmrg 67061d54945dSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 67071d54945dSmrg# 67081d54945dSmrg# Check to see whether a particular set of modules exists. Similar 67091d54945dSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 67101d54945dSmrg# 67111d54945dSmrg# 67121d54945dSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 67131d54945dSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 67141d54945dSmrg# PKG_CHECK_EXISTS manually 67151d54945dSmrg# -------------------------------------------------------------- 67161d54945dSmrgAC_DEFUN([PKG_CHECK_EXISTS], 67171d54945dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 67181d54945dSmrgif test -n "$PKG_CONFIG" && \ 67191d54945dSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 67201d54945dSmrg m4_ifval([$2], [$2], [:]) 67211d54945dSmrgm4_ifvaln([$3], [else 67221d54945dSmrg $3])dnl 67231d54945dSmrgfi]) 67241d54945dSmrg 67251d54945dSmrg 67261d54945dSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 67271d54945dSmrg# --------------------------------------------- 67281d54945dSmrgm4_define([_PKG_CONFIG], 6729ba85709eSmrg[if test -n "$$1"; then 6730ba85709eSmrg pkg_cv_[]$1="$$1" 6731ba85709eSmrg elif test -n "$PKG_CONFIG"; then 6732ba85709eSmrg PKG_CHECK_EXISTS([$3], 6733ba85709eSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 6734ba85709eSmrg [pkg_failed=yes]) 6735ba85709eSmrg else 6736ba85709eSmrg pkg_failed=untried 67371d54945dSmrgfi[]dnl 67381d54945dSmrg])# _PKG_CONFIG 67391d54945dSmrg 67401d54945dSmrg# _PKG_SHORT_ERRORS_SUPPORTED 67411d54945dSmrg# ----------------------------- 67421d54945dSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 67431d54945dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 67441d54945dSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 67451d54945dSmrg _pkg_short_errors_supported=yes 67461d54945dSmrgelse 67471d54945dSmrg _pkg_short_errors_supported=no 67481d54945dSmrgfi[]dnl 67491d54945dSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 67501d54945dSmrg 67511d54945dSmrg 67521d54945dSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 67531d54945dSmrg# [ACTION-IF-NOT-FOUND]) 67541d54945dSmrg# 67551d54945dSmrg# 67561d54945dSmrg# Note that if there is a possibility the first call to 67571d54945dSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 67581d54945dSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 67591d54945dSmrg# 67601d54945dSmrg# 67611d54945dSmrg# -------------------------------------------------------------- 67621d54945dSmrgAC_DEFUN([PKG_CHECK_MODULES], 67631d54945dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 67641d54945dSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 67651d54945dSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 67661d54945dSmrg 67671d54945dSmrgpkg_failed=no 67681d54945dSmrgAC_MSG_CHECKING([for $1]) 67691d54945dSmrg 67701d54945dSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 67711d54945dSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 67721d54945dSmrg 67731d54945dSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 67741d54945dSmrgand $1[]_LIBS to avoid the need to call pkg-config. 67751d54945dSmrgSee the pkg-config man page for more details.]) 67761d54945dSmrg 67771d54945dSmrgif test $pkg_failed = yes; then 67781d54945dSmrg _PKG_SHORT_ERRORS_SUPPORTED 67791d54945dSmrg if test $_pkg_short_errors_supported = yes; then 6780ba85709eSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 67811d54945dSmrg else 6782ba85709eSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 67831d54945dSmrg fi 67841d54945dSmrg # Put the nasty error message in config.log where it belongs 67851d54945dSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 67861d54945dSmrg 67871d54945dSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 67881d54945dSmrg[Package requirements ($2) were not met: 67891d54945dSmrg 67901d54945dSmrg$$1_PKG_ERRORS 67911d54945dSmrg 67921d54945dSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 67931d54945dSmrginstalled software in a non-standard prefix. 67941d54945dSmrg 67951d54945dSmrg_PKG_TEXT 67961d54945dSmrg])], 6797ba85709eSmrg [AC_MSG_RESULT([no]) 6798ba85709eSmrg $4]) 67991d54945dSmrgelif test $pkg_failed = untried; then 68001d54945dSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 68011d54945dSmrg[The pkg-config script could not be found or is too old. Make sure it 68021d54945dSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 68031d54945dSmrgpath to pkg-config. 68041d54945dSmrg 68051d54945dSmrg_PKG_TEXT 68061d54945dSmrg 6807ba85709eSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 68081d54945dSmrg [$4]) 68091d54945dSmrgelse 68101d54945dSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 68111d54945dSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 68121d54945dSmrg AC_MSG_RESULT([yes]) 68131d54945dSmrg ifelse([$3], , :, [$3]) 68141d54945dSmrgfi[]dnl 68151d54945dSmrg])# PKG_CHECK_MODULES 68161d54945dSmrg 6817786a6f21Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 68181d54945dSmrgdnl 6819ba85709eSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 68201d54945dSmrgdnl 6821ba85709eSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 6822ba85709eSmrgdnl copy of this software and associated documentation files (the 6823ba85709eSmrgdnl "Software"), to deal in the Software without restriction, including 6824ba85709eSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 6825ba85709eSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 6826ba85709eSmrgdnl to whom the Software is furnished to do so, provided that the above 6827ba85709eSmrgdnl copyright notice(s) and this permission notice appear in all copies of 6828ba85709eSmrgdnl the Software and that both the above copyright notice(s) and this 6829ba85709eSmrgdnl permission notice appear in supporting documentation. 6830ba85709eSmrgdnl 68311d54945dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 68321d54945dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 6833ba85709eSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 6834ba85709eSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 6835ba85709eSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 6836ba85709eSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 6837ba85709eSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 6838ba85709eSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 6839ba85709eSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 6840ba85709eSmrgdnl 6841ba85709eSmrgdnl Except as contained in this notice, the name of a copyright holder 6842ba85709eSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 6843ba85709eSmrgdnl or other dealings in this Software without prior written authorization 6844ba85709eSmrgdnl of the copyright holder. 6845ba85709eSmrg 6846ba85709eSmrg# XORG_MACROS_VERSION(required-version) 6847ba85709eSmrg# ------------------------------------- 6848ba85709eSmrg# Minimum version: 1.1.0 6849ba85709eSmrg# 6850ba85709eSmrg# If you're using a macro added in Version 1.1 or newer, include this in 6851ba85709eSmrg# your configure.ac with the minimum required version, such as: 6852ba85709eSmrg# XORG_MACROS_VERSION(1.1) 6853ba85709eSmrg# 6854ba85709eSmrg# To force at least a version with this macro defined, also add: 6855ba85709eSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 6856ba85709eSmrg# 6857ba85709eSmrg# 6858ba85709eSmrg# See the "minimum version" comment for each macro you use to see what 6859ba85709eSmrg# version you require. 6860ba85709eSmrgAC_DEFUN([XORG_MACROS_VERSION],[ 6861ba85709eSmrg [XORG_MACROS_needed_version=$1 6862ba85709eSmrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 6863ba85709eSmrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 6864ba85709eSmrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 6865786a6f21Smrg [XORG_MACROS_version=1.2.1 6866ba85709eSmrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 6867ba85709eSmrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 6868ba85709eSmrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 6869ba85709eSmrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 6870ba85709eSmrg fi 6871ba85709eSmrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 6872ba85709eSmrg AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) 6873ba85709eSmrg fi 6874ba85709eSmrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 6875ba85709eSmrg]) # XORG_MACROS_VERSION 68761d54945dSmrg 68771d54945dSmrg# XORG_PROG_RAWCPP() 68781d54945dSmrg# ------------------ 6879ba85709eSmrg# Minimum version: 1.0.0 6880ba85709eSmrg# 68811d54945dSmrg# Find cpp program and necessary flags for use in pre-processing text files 68821d54945dSmrg# such as man pages and config files 68831d54945dSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 68841d54945dSmrgAC_REQUIRE([AC_PROG_CPP]) 68851d54945dSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 68861d54945dSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 68871d54945dSmrg 68881d54945dSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 68891d54945dSmrg# which is not the best choice for supporting other OS'es, but covers most 68901d54945dSmrg# of the ones we need for now. 68911d54945dSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 68921d54945dSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 68931d54945dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 68941d54945dSmrg AC_MSG_RESULT([no]) 68951d54945dSmrgelse 68961d54945dSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 68971d54945dSmrg RAWCPPFLAGS=-undef 68981d54945dSmrg AC_MSG_RESULT([yes]) 6899786a6f21Smrg # under Cygwin unix is still defined even with -undef 6900786a6f21Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 6901786a6f21Smrg RAWCPPFLAGS="-undef -ansi" 6902786a6f21Smrg AC_MSG_RESULT([yes, with -ansi]) 69031d54945dSmrg else 69041d54945dSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 69051d54945dSmrg fi 69061d54945dSmrgfi 69071d54945dSmrgrm -f conftest.$ac_ext 69081d54945dSmrg 69091d54945dSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 69101d54945dSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 69111d54945dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 69121d54945dSmrg AC_MSG_RESULT([no]) 69131d54945dSmrgelse 69141d54945dSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 69151d54945dSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 69161d54945dSmrg AC_MSG_RESULT([yes]) 69171d54945dSmrg else 69181d54945dSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 69191d54945dSmrg fi 69201d54945dSmrgfi 69211d54945dSmrgrm -f conftest.$ac_ext 69221d54945dSmrgAC_SUBST(RAWCPPFLAGS) 69231d54945dSmrg]) # XORG_PROG_RAWCPP 69241d54945dSmrg 69251d54945dSmrg# XORG_MANPAGE_SECTIONS() 69261d54945dSmrg# ----------------------- 6927ba85709eSmrg# Minimum version: 1.0.0 6928ba85709eSmrg# 69291d54945dSmrg# Determine which sections man pages go in for the different man page types 69301d54945dSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 69311d54945dSmrg# Not sure if there's any better way than just hardcoding by OS name. 69321d54945dSmrg# Override default settings by setting environment variables 69331d54945dSmrg 69341d54945dSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 69351d54945dSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 69361d54945dSmrg 69371d54945dSmrgif test x$APP_MAN_SUFFIX = x ; then 6938ba85709eSmrg APP_MAN_SUFFIX=1 69391d54945dSmrgfi 69401d54945dSmrgif test x$APP_MAN_DIR = x ; then 6941ba85709eSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 69421d54945dSmrgfi 69431d54945dSmrg 69441d54945dSmrgif test x$LIB_MAN_SUFFIX = x ; then 6945ba85709eSmrg LIB_MAN_SUFFIX=3 69461d54945dSmrgfi 69471d54945dSmrgif test x$LIB_MAN_DIR = x ; then 6948ba85709eSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 69491d54945dSmrgfi 69501d54945dSmrg 69511d54945dSmrgif test x$FILE_MAN_SUFFIX = x ; then 69521d54945dSmrg case $host_os in 69531d54945dSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 69541d54945dSmrg *) FILE_MAN_SUFFIX=5 ;; 69551d54945dSmrg esac 69561d54945dSmrgfi 69571d54945dSmrgif test x$FILE_MAN_DIR = x ; then 6958ba85709eSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 69591d54945dSmrgfi 69601d54945dSmrg 69611d54945dSmrgif test x$MISC_MAN_SUFFIX = x ; then 69621d54945dSmrg case $host_os in 69631d54945dSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 69641d54945dSmrg *) MISC_MAN_SUFFIX=7 ;; 69651d54945dSmrg esac 69661d54945dSmrgfi 69671d54945dSmrgif test x$MISC_MAN_DIR = x ; then 6968ba85709eSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 69691d54945dSmrgfi 69701d54945dSmrg 69711d54945dSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 69721d54945dSmrg case $host_os in 69731d54945dSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 69741d54945dSmrg *) DRIVER_MAN_SUFFIX=4 ;; 69751d54945dSmrg esac 69761d54945dSmrgfi 69771d54945dSmrgif test x$DRIVER_MAN_DIR = x ; then 6978ba85709eSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 69791d54945dSmrgfi 69801d54945dSmrg 69811d54945dSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 69821d54945dSmrg case $host_os in 69831d54945dSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 69841d54945dSmrg *) ADMIN_MAN_SUFFIX=8 ;; 69851d54945dSmrg esac 69861d54945dSmrgfi 69871d54945dSmrgif test x$ADMIN_MAN_DIR = x ; then 69881d54945dSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 69891d54945dSmrgfi 69901d54945dSmrg 69911d54945dSmrg 69921d54945dSmrgAC_SUBST([APP_MAN_SUFFIX]) 69931d54945dSmrgAC_SUBST([LIB_MAN_SUFFIX]) 69941d54945dSmrgAC_SUBST([FILE_MAN_SUFFIX]) 69951d54945dSmrgAC_SUBST([MISC_MAN_SUFFIX]) 69961d54945dSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 69971d54945dSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 69981d54945dSmrgAC_SUBST([APP_MAN_DIR]) 69991d54945dSmrgAC_SUBST([LIB_MAN_DIR]) 70001d54945dSmrgAC_SUBST([FILE_MAN_DIR]) 70011d54945dSmrgAC_SUBST([MISC_MAN_DIR]) 70021d54945dSmrgAC_SUBST([DRIVER_MAN_DIR]) 70031d54945dSmrgAC_SUBST([ADMIN_MAN_DIR]) 70041d54945dSmrg]) # XORG_MANPAGE_SECTIONS 70051d54945dSmrg 70061d54945dSmrg# XORG_CHECK_LINUXDOC 70071d54945dSmrg# ------------------- 7008ba85709eSmrg# Minimum version: 1.0.0 7009ba85709eSmrg# 70101d54945dSmrg# Defines the variable MAKE_TEXT if the necessary tools and 70111d54945dSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 70121d54945dSmrg# Whether or not the necessary tools and files are found can be checked 70131d54945dSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 70141d54945dSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 7015786a6f21Smrgif test x$XORG_SGML_PATH = x ; then 7016786a6f21Smrg XORG_SGML_PATH=$prefix/share/sgml 7017786a6f21Smrgfi 7018ba85709eSmrgHAVE_DEFS_ENT= 7019ba85709eSmrg 7020ba85709eSmrgif test x"$cross_compiling" = x"yes" ; then 7021ba85709eSmrg HAVE_DEFS_ENT=no 7022ba85709eSmrgelse 7023ba85709eSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 7024ba85709eSmrgfi 70251d54945dSmrg 70261d54945dSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 70271d54945dSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 70281d54945dSmrg 70291d54945dSmrgAC_MSG_CHECKING([Whether to build documentation]) 70301d54945dSmrg 7031ba85709eSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 70321d54945dSmrg BUILDDOC=yes 70331d54945dSmrgelse 70341d54945dSmrg BUILDDOC=no 70351d54945dSmrgfi 70361d54945dSmrg 70371d54945dSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 70381d54945dSmrg 70391d54945dSmrgAC_MSG_RESULT([$BUILDDOC]) 70401d54945dSmrg 70411d54945dSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 70421d54945dSmrg 7043ba85709eSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 70441d54945dSmrg BUILDPDFDOC=yes 70451d54945dSmrgelse 70461d54945dSmrg BUILDPDFDOC=no 70471d54945dSmrgfi 70481d54945dSmrg 70491d54945dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 70501d54945dSmrg 70511d54945dSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 70521d54945dSmrg 7053ba85709eSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 7054ba85709eSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 70551d54945dSmrgMAKE_PDF="$PS2PDF" 7056ba85709eSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 70571d54945dSmrg 70581d54945dSmrgAC_SUBST(MAKE_TEXT) 70591d54945dSmrgAC_SUBST(MAKE_PS) 70601d54945dSmrgAC_SUBST(MAKE_PDF) 70611d54945dSmrgAC_SUBST(MAKE_HTML) 70621d54945dSmrg]) # XORG_CHECK_LINUXDOC 70631d54945dSmrg 7064ba85709eSmrg# XORG_CHECK_DOCBOOK 7065ba85709eSmrg# ------------------- 7066ba85709eSmrg# Minimum version: 1.0.0 7067ba85709eSmrg# 7068ba85709eSmrg# Checks for the ability to build output formats from SGML DocBook source. 7069ba85709eSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 7070ba85709eSmrg# indicates whether the necessary tools and files are found and, if set, 7071ba85709eSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 7072ba85709eSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 7073786a6f21Smrgif test x$XORG_SGML_PATH = x ; then 7074786a6f21Smrg XORG_SGML_PATH=$prefix/share/sgml 7075786a6f21Smrgfi 7076ba85709eSmrgHAVE_DEFS_ENT= 7077ba85709eSmrgBUILDTXTDOC=no 7078ba85709eSmrgBUILDPDFDOC=no 7079ba85709eSmrgBUILDPSDOC=no 7080ba85709eSmrgBUILDHTMLDOC=no 7081ba85709eSmrg 7082ba85709eSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 7083ba85709eSmrg 7084ba85709eSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 7085ba85709eSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 7086ba85709eSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 7087ba85709eSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 7088ba85709eSmrg 7089ba85709eSmrgAC_MSG_CHECKING([Whether to build text documentation]) 7090ba85709eSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 7091ba85709eSmrg test x$BUILD_TXTDOC != xno; then 7092ba85709eSmrg BUILDTXTDOC=yes 7093ba85709eSmrgfi 7094ba85709eSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 7095ba85709eSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 7096ba85709eSmrg 7097ba85709eSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 7098ba85709eSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 7099ba85709eSmrg test x$BUILD_PDFDOC != xno; then 7100ba85709eSmrg BUILDPDFDOC=yes 7101ba85709eSmrgfi 7102ba85709eSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 7103ba85709eSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 7104ba85709eSmrg 7105ba85709eSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 7106ba85709eSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 7107ba85709eSmrg test x$BUILD_PSDOC != xno; then 7108ba85709eSmrg BUILDPSDOC=yes 7109ba85709eSmrgfi 7110ba85709eSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 7111ba85709eSmrgAC_MSG_RESULT([$BUILDPSDOC]) 7112ba85709eSmrg 7113ba85709eSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 7114ba85709eSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 7115ba85709eSmrg test x$BUILD_HTMLDOC != xno; then 7116ba85709eSmrg BUILDHTMLDOC=yes 7117ba85709eSmrgfi 7118ba85709eSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 7119ba85709eSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 7120ba85709eSmrg 7121ba85709eSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 7122ba85709eSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 7123ba85709eSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 7124ba85709eSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 7125ba85709eSmrg 7126ba85709eSmrgAC_SUBST(MAKE_TEXT) 7127ba85709eSmrgAC_SUBST(MAKE_PS) 7128ba85709eSmrgAC_SUBST(MAKE_PDF) 7129ba85709eSmrgAC_SUBST(MAKE_HTML) 7130ba85709eSmrg]) # XORG_CHECK_DOCBOOK 7131ba85709eSmrg 71321d54945dSmrg# XORG_CHECK_MALLOC_ZERO 71331d54945dSmrg# ---------------------- 7134ba85709eSmrg# Minimum version: 1.0.0 7135ba85709eSmrg# 71361d54945dSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 71371d54945dSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 71381d54945dSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 71391d54945dSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 71401d54945dSmrgAC_ARG_ENABLE(malloc0returnsnull, 71411d54945dSmrg AC_HELP_STRING([--enable-malloc0returnsnull], 71421d54945dSmrg [malloc(0) returns NULL (default: auto)]), 71431d54945dSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 71441d54945dSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 71451d54945dSmrg 71461d54945dSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 71471d54945dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 71481d54945dSmrg AC_RUN_IFELSE([ 71491d54945dSmrgchar *malloc(); 71501d54945dSmrgchar *realloc(); 71511d54945dSmrgchar *calloc(); 71521d54945dSmrgmain() { 71531d54945dSmrg char *m0, *r0, *c0, *p; 71541d54945dSmrg m0 = malloc(0); 71551d54945dSmrg p = malloc(10); 71561d54945dSmrg r0 = realloc(p,0); 71571d54945dSmrg c0 = calloc(0); 71581d54945dSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 71591d54945dSmrg}], 71601d54945dSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 71611d54945dSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 71621d54945dSmrgfi 71631d54945dSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 71641d54945dSmrg 71651d54945dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 71661d54945dSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 71671d54945dSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 71681d54945dSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 71691d54945dSmrgelse 71701d54945dSmrg MALLOC_ZERO_CFLAGS="" 71711d54945dSmrg XMALLOC_ZERO_CFLAGS="" 71721d54945dSmrg XTMALLOC_ZERO_CFLAGS="" 71731d54945dSmrgfi 71741d54945dSmrg 71751d54945dSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 71761d54945dSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 71771d54945dSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 71781d54945dSmrg]) # XORG_CHECK_MALLOC_ZERO 71791d54945dSmrg 7180ba85709eSmrg# XORG_WITH_LINT() 7181ba85709eSmrg# ---------------- 7182ba85709eSmrg# Minimum version: 1.1.0 7183ba85709eSmrg# 7184ba85709eSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 7185ba85709eSmrg# is specified. (Use --with-lint=sparse for sparse.) 7186ba85709eSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 7187ba85709eSmrg# Sets $LINT_FLAGS to flags to pass to source checker 7188ba85709eSmrg# Sets LINT automake conditional if enabled (default: disabled) 7189ba85709eSmrg# 7190ba85709eSmrgAC_DEFUN([XORG_WITH_LINT],[ 7191ba85709eSmrg 7192ba85709eSmrg# Allow checking code with lint, sparse, etc. 7193ba85709eSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 7194ba85709eSmrg [Use a lint-style source code checker (default: disabled)])], 7195ba85709eSmrg [use_lint=$withval], [use_lint=no]) 7196ba85709eSmrgif test "x$use_lint" = "xyes" ; then 7197ba85709eSmrg LINT="lint" 7198ba85709eSmrgelse 7199ba85709eSmrg LINT="$use_lint" 7200ba85709eSmrgfi 7201ba85709eSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 7202ba85709eSmrg case $LINT in 7203ba85709eSmrg lint|*/lint) 7204ba85709eSmrg case $host_os in 7205ba85709eSmrg solaris*) 7206ba85709eSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 7207ba85709eSmrg ;; 7208ba85709eSmrg esac 7209ba85709eSmrg ;; 7210ba85709eSmrg esac 7211ba85709eSmrgfi 7212ba85709eSmrg 7213ba85709eSmrgAC_SUBST(LINT) 7214ba85709eSmrgAC_SUBST(LINT_FLAGS) 7215ba85709eSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 7216ba85709eSmrg 7217ba85709eSmrg]) # XORG_WITH_LINT 7218ba85709eSmrg 7219ba85709eSmrg# XORG_LINT_LIBRARY(LIBNAME) 7220ba85709eSmrg# -------------------------- 7221ba85709eSmrg# Minimum version: 1.1.0 7222ba85709eSmrg# 7223ba85709eSmrg# Sets up flags for building lint libraries for checking programs that call 7224ba85709eSmrg# functions in the library. 7225ba85709eSmrg# Disabled by default, enable with --enable-lint-library 7226ba85709eSmrg# Sets: 7227ba85709eSmrg# @LINTLIB@ - name of lint library file to make 7228ba85709eSmrg# MAKE_LINT_LIB - automake conditional 7229ba85709eSmrg# 7230ba85709eSmrg 7231ba85709eSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 7232ba85709eSmrgAC_REQUIRE([XORG_WITH_LINT]) 7233ba85709eSmrg# Build lint "library" for more indepth checks of programs calling this library 7234ba85709eSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 7235ba85709eSmrg [Create lint library (default: disabled)])], 7236ba85709eSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 7237ba85709eSmrgif test "x$make_lint_lib" != "xno" ; then 7238ba85709eSmrg if test "x$LINT" = "xno" ; then 7239ba85709eSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 7240ba85709eSmrg fi 7241ba85709eSmrg if test "x$make_lint_lib" = "xyes" ; then 7242ba85709eSmrg LINTLIB=llib-l$1.ln 7243ba85709eSmrg else 7244ba85709eSmrg LINTLIB=$make_lint_lib 7245ba85709eSmrg fi 7246ba85709eSmrgfi 7247ba85709eSmrgAC_SUBST(LINTLIB) 7248ba85709eSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 7249ba85709eSmrg 7250ba85709eSmrg]) # XORG_LINT_LIBRARY 7251ba85709eSmrg 7252786a6f21Smrg# XORG_CWARNFLAGS 7253786a6f21Smrg# --------------- 7254786a6f21Smrg# Minimum version: 1.2.0 7255786a6f21Smrg# 7256786a6f21Smrg# Defines CWARNFLAGS to enable C compiler warnings. 7257786a6f21Smrg# 7258786a6f21SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 7259786a6f21SmrgAC_REQUIRE([AC_PROG_CC]) 7260786a6f21Smrgif test "x$GCC" = xyes ; then 7261786a6f21Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 7262786a6f21Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 7263786a6f21Smrg-Wbad-function-cast" 7264786a6f21Smrg case `gcc -dumpversion` in 7265786a6f21Smrg 3.4.* | 4.*) 7266786a6f21Smrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 7267786a6f21Smrg ;; 7268786a6f21Smrg esac 7269786a6f21Smrgelse 7270786a6f21Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 7271786a6f21Smrg if test "x$SUNCC" = "xyes"; then 7272786a6f21Smrg CWARNFLAGS="-v" 7273786a6f21Smrg fi 7274786a6f21Smrgfi 7275786a6f21SmrgAC_SUBST(CWARNFLAGS) 7276786a6f21Smrg]) # XORG_CWARNFLAGS 72771d54945dSmrgdnl Copyright 2005 Red Hat, Inc 72781d54945dSmrgdnl 72791d54945dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 72801d54945dSmrgdnl documentation for any purpose is hereby granted without fee, provided that 72811d54945dSmrgdnl the above copyright notice appear in all copies and that both that 72821d54945dSmrgdnl copyright notice and this permission notice appear in supporting 72831d54945dSmrgdnl documentation. 72841d54945dSmrgdnl 72851d54945dSmrgdnl The above copyright notice and this permission notice shall be included 72861d54945dSmrgdnl in all copies or substantial portions of the Software. 72871d54945dSmrgdnl 72881d54945dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 72891d54945dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 72901d54945dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 72911d54945dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 72921d54945dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 72931d54945dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 72941d54945dSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 72951d54945dSmrgdnl 72961d54945dSmrgdnl Except as contained in this notice, the name of the copyright holders shall 72971d54945dSmrgdnl not be used in advertising or otherwise to promote the sale, use or 72981d54945dSmrgdnl other dealings in this Software without prior written authorization 72991d54945dSmrgdnl from the copyright holders. 73001d54945dSmrgdnl 73011d54945dSmrg 73021d54945dSmrg# XORG_RELEASE_VERSION 73031d54945dSmrg# -------------------- 73041d54945dSmrg# Adds --with/without-release-string and changes the PACKAGE and 73051d54945dSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 7306ba85709eSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 7307ba85709eSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 73081d54945dSmrg 73091d54945dSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 73101d54945dSmrg AC_ARG_WITH(release-version, 73111d54945dSmrg AC_HELP_STRING([--with-release-version=STRING], 73121d54945dSmrg [Use release version string in package name]), 73131d54945dSmrg [RELEASE_VERSION="$withval"], 73141d54945dSmrg [RELEASE_VERSION=""]) 73151d54945dSmrg if test "x$RELEASE_VERSION" != "x"; then 73161d54945dSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 73171d54945dSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 73181d54945dSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 73191d54945dSmrg fi 7320ba85709eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 7321ba85709eSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 7322ba85709eSmrg [Major version of this package]) 7323ba85709eSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 7324ba85709eSmrg if test "x$PVM" = "x"; then 7325ba85709eSmrg PVM="0" 7326ba85709eSmrg fi 7327ba85709eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 7328ba85709eSmrg [$PVM], 7329ba85709eSmrg [Minor version of this package]) 7330ba85709eSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 7331ba85709eSmrg if test "x$PVP" = "x"; then 7332ba85709eSmrg PVP="0" 7333ba85709eSmrg fi 7334ba85709eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 7335ba85709eSmrg [$PVP], 7336ba85709eSmrg [Patch version of this package]) 73371d54945dSmrg]) 73381d54945dSmrg 7339786a6f21Smrg# XORG_CHANGELOG() 7340786a6f21Smrg# ---------------- 7341786a6f21Smrg# Minimum version: 1.2.0 7342786a6f21Smrg# 7343786a6f21Smrg# Defines the variable CHANGELOG_CMD as the command to generate 7344786a6f21Smrg# ChangeLog from git. 7345786a6f21Smrg# 7346786a6f21Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 7347786a6f21Smrg# 7348786a6f21SmrgAC_DEFUN([XORG_CHANGELOG], [ 7349786a6f21SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 7350786a6f21Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 7351786a6f21Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 7352786a6f21SmrgAC_SUBST([CHANGELOG_CMD]) 7353786a6f21SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 7354786a6f21Smrg]) # XORG_CHANGELOG 7355786a6f21Smrg 7356786a6f21Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 73571d54945dSmrg# 73581d54945dSmrg# This file is free software; the Free Software Foundation 73591d54945dSmrg# gives unlimited permission to copy and/or distribute it, 73601d54945dSmrg# with or without modifications, as long as this notice is preserved. 73611d54945dSmrg 73621d54945dSmrg# AM_AUTOMAKE_VERSION(VERSION) 73631d54945dSmrg# ---------------------------- 73641d54945dSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 73651d54945dSmrg# generated from the m4 files accompanying Automake X.Y. 7366ba85709eSmrg# (This private macro should not be called outside this file.) 7367ba85709eSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 7368ec713c28Smrg[am__api_version='1.11' 7369ba85709eSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 7370ba85709eSmrgdnl require some minimum version. Point them to the right macro. 7371ec713c28Smrgm4_if([$1], [1.11], [], 7372ba85709eSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 7373ba85709eSmrg]) 7374ba85709eSmrg 7375ba85709eSmrg# _AM_AUTOCONF_VERSION(VERSION) 7376ba85709eSmrg# ----------------------------- 7377ba85709eSmrg# aclocal traces this macro to find the Autoconf version. 7378ba85709eSmrg# This is a private macro too. Using m4_define simplifies 7379ba85709eSmrg# the logic in aclocal, which can simply ignore this definition. 7380ba85709eSmrgm4_define([_AM_AUTOCONF_VERSION], []) 73811d54945dSmrg 73821d54945dSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 73831d54945dSmrg# ------------------------------- 7384ba85709eSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 7385786a6f21Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 73861d54945dSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 7387ec713c28Smrg[AM_AUTOMAKE_VERSION([1.11])dnl 7388ba85709eSmrgm4_ifndef([AC_AUTOCONF_VERSION], 7389ba85709eSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 7390786a6f21Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 73911d54945dSmrg 73921d54945dSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 73931d54945dSmrg 73941d54945dSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 73951d54945dSmrg# 73961d54945dSmrg# This file is free software; the Free Software Foundation 73971d54945dSmrg# gives unlimited permission to copy and/or distribute it, 73981d54945dSmrg# with or without modifications, as long as this notice is preserved. 73991d54945dSmrg 74001d54945dSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 74011d54945dSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 74021d54945dSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 74031d54945dSmrg# 74041d54945dSmrg# Of course, Automake must honor this variable whenever it calls a 74051d54945dSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 74061d54945dSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74071d54945dSmrg# depending on how configure is run. This is pretty annoying, since 74081d54945dSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 74091d54945dSmrg# source directory, any form will work fine, but in subdirectories a 74101d54945dSmrg# relative path needs to be adjusted first. 74111d54945dSmrg# 74121d54945dSmrg# $ac_aux_dir/missing 74131d54945dSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 74141d54945dSmrg# $top_srcdir/$ac_aux_dir/missing 74151d54945dSmrg# fails if $ac_aux_dir is absolute, 74161d54945dSmrg# fails when called from a subdirectory in a VPATH build with 74171d54945dSmrg# a relative $ac_aux_dir 74181d54945dSmrg# 74191d54945dSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 74201d54945dSmrg# are both prefixed by $srcdir. In an in-source build this is usually 74211d54945dSmrg# harmless because $srcdir is `.', but things will broke when you 74221d54945dSmrg# start a VPATH build or use an absolute $srcdir. 74231d54945dSmrg# 74241d54945dSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 74251d54945dSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 74261d54945dSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 74271d54945dSmrg# and then we would define $MISSING as 74281d54945dSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 74291d54945dSmrg# This will work as long as MISSING is not called from configure, because 74301d54945dSmrg# unfortunately $(top_srcdir) has no meaning in configure. 74311d54945dSmrg# However there are other variables, like CC, which are often used in 74321d54945dSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 74331d54945dSmrg# 74341d54945dSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 74351d54945dSmrg# absolute PATH. The drawback is that using absolute paths prevent a 74361d54945dSmrg# configured tree to be moved without reconfiguration. 74371d54945dSmrg 74381d54945dSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 74391d54945dSmrg[dnl Rely on autoconf to set up CDPATH properly. 74401d54945dSmrgAC_PREREQ([2.50])dnl 74411d54945dSmrg# expand $ac_aux_dir to an absolute path 74421d54945dSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 74431d54945dSmrg]) 74441d54945dSmrg 74451d54945dSmrg# AM_CONDITIONAL -*- Autoconf -*- 74461d54945dSmrg 7447ec713c28Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 74481d54945dSmrg# Free Software Foundation, Inc. 74491d54945dSmrg# 74501d54945dSmrg# This file is free software; the Free Software Foundation 74511d54945dSmrg# gives unlimited permission to copy and/or distribute it, 74521d54945dSmrg# with or without modifications, as long as this notice is preserved. 74531d54945dSmrg 7454ec713c28Smrg# serial 9 74551d54945dSmrg 74561d54945dSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 74571d54945dSmrg# ------------------------------------- 74581d54945dSmrg# Define a conditional. 74591d54945dSmrgAC_DEFUN([AM_CONDITIONAL], 74601d54945dSmrg[AC_PREREQ(2.52)dnl 74611d54945dSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 74621d54945dSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 7463ba85709eSmrgAC_SUBST([$1_TRUE])dnl 7464ba85709eSmrgAC_SUBST([$1_FALSE])dnl 7465ba85709eSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 7466ba85709eSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 7467ec713c28Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 74681d54945dSmrgif $2; then 74691d54945dSmrg $1_TRUE= 74701d54945dSmrg $1_FALSE='#' 74711d54945dSmrgelse 74721d54945dSmrg $1_TRUE='#' 74731d54945dSmrg $1_FALSE= 74741d54945dSmrgfi 74751d54945dSmrgAC_CONFIG_COMMANDS_PRE( 74761d54945dSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 74771d54945dSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 74781d54945dSmrgUsually this means the macro was only invoked conditionally.]]) 74791d54945dSmrgfi])]) 74801d54945dSmrg 7481ec713c28Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 74821d54945dSmrg# Free Software Foundation, Inc. 74831d54945dSmrg# 74841d54945dSmrg# This file is free software; the Free Software Foundation 74851d54945dSmrg# gives unlimited permission to copy and/or distribute it, 74861d54945dSmrg# with or without modifications, as long as this notice is preserved. 74871d54945dSmrg 7488ec713c28Smrg# serial 10 74891d54945dSmrg 74901d54945dSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 74911d54945dSmrg# written in clear, in which case automake, when reading aclocal.m4, 74921d54945dSmrg# will think it sees a *use*, and therefore will trigger all it's 74931d54945dSmrg# C support machinery. Also note that it means that autoscan, seeing 74941d54945dSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 74951d54945dSmrg 74961d54945dSmrg 74971d54945dSmrg# _AM_DEPENDENCIES(NAME) 74981d54945dSmrg# ---------------------- 74991d54945dSmrg# See how the compiler implements dependency checking. 75001d54945dSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 75011d54945dSmrg# We try a few techniques and use that to set a single cache variable. 75021d54945dSmrg# 75031d54945dSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 75041d54945dSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 75051d54945dSmrg# dependency, and given that the user is not expected to run this macro, 75061d54945dSmrg# just rely on AC_PROG_CC. 75071d54945dSmrgAC_DEFUN([_AM_DEPENDENCIES], 75081d54945dSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 75091d54945dSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 75101d54945dSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 75111d54945dSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 75121d54945dSmrg 75131d54945dSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 75141d54945dSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 75151d54945dSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 7516ba85709eSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 75171d54945dSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 75181d54945dSmrg [depcc="$$1" am_compiler_list=]) 75191d54945dSmrg 75201d54945dSmrgAC_CACHE_CHECK([dependency style of $depcc], 75211d54945dSmrg [am_cv_$1_dependencies_compiler_type], 75221d54945dSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 75231d54945dSmrg # We make a subdir and do the tests there. Otherwise we can end up 75241d54945dSmrg # making bogus files that we don't know about and never remove. For 75251d54945dSmrg # instance it was reported that on HP-UX the gcc test will end up 75261d54945dSmrg # making a dummy file named `D' -- because `-MD' means `put the output 75271d54945dSmrg # in D'. 75281d54945dSmrg mkdir conftest.dir 75291d54945dSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 75301d54945dSmrg # using a relative directory. 75311d54945dSmrg cp "$am_depcomp" conftest.dir 75321d54945dSmrg cd conftest.dir 75331d54945dSmrg # We will build objects and dependencies in a subdirectory because 75341d54945dSmrg # it helps to detect inapplicable dependency modes. For instance 75351d54945dSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 75361d54945dSmrg # side effect of compilation, but ICC will put the dependencies in 75371d54945dSmrg # the current directory while Tru64 will put them in the object 75381d54945dSmrg # directory. 75391d54945dSmrg mkdir sub 75401d54945dSmrg 75411d54945dSmrg am_cv_$1_dependencies_compiler_type=none 75421d54945dSmrg if test "$am_compiler_list" = ""; then 75431d54945dSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 75441d54945dSmrg fi 7545ec713c28Smrg am__universal=false 7546ec713c28Smrg m4_case([$1], [CC], 7547ec713c28Smrg [case " $depcc " in #( 7548ec713c28Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 7549ec713c28Smrg esac], 7550ec713c28Smrg [CXX], 7551ec713c28Smrg [case " $depcc " in #( 7552ec713c28Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 7553ec713c28Smrg esac]) 7554ec713c28Smrg 75551d54945dSmrg for depmode in $am_compiler_list; do 75561d54945dSmrg # Setup a source with many dependencies, because some compilers 75571d54945dSmrg # like to wrap large dependency lists on column 80 (with \), and 75581d54945dSmrg # we should not choose a depcomp mode which is confused by this. 75591d54945dSmrg # 75601d54945dSmrg # We need to recreate these files for each test, as the compiler may 75611d54945dSmrg # overwrite some of them when testing with obscure command lines. 75621d54945dSmrg # This happens at least with the AIX C compiler. 75631d54945dSmrg : > sub/conftest.c 75641d54945dSmrg for i in 1 2 3 4 5 6; do 75651d54945dSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 75661d54945dSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 75671d54945dSmrg # Solaris 8's {/usr,}/bin/sh. 75681d54945dSmrg touch sub/conftst$i.h 75691d54945dSmrg done 75701d54945dSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 75711d54945dSmrg 7572ec713c28Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 7573ec713c28Smrg # mode. It turns out that the SunPro C++ compiler does not properly 7574ec713c28Smrg # handle `-M -o', and we need to detect this. Also, some Intel 7575ec713c28Smrg # versions had trouble with output in subdirs 7576ec713c28Smrg am__obj=sub/conftest.${OBJEXT-o} 7577ec713c28Smrg am__minus_obj="-o $am__obj" 75781d54945dSmrg case $depmode in 7579ec713c28Smrg gcc) 7580ec713c28Smrg # This depmode causes a compiler race in universal mode. 7581ec713c28Smrg test "$am__universal" = false || continue 7582ec713c28Smrg ;; 75831d54945dSmrg nosideeffect) 75841d54945dSmrg # after this tag, mechanisms are not by side-effect, so they'll 75851d54945dSmrg # only be used when explicitly requested 75861d54945dSmrg if test "x$enable_dependency_tracking" = xyes; then 75871d54945dSmrg continue 75881d54945dSmrg else 75891d54945dSmrg break 75901d54945dSmrg fi 75911d54945dSmrg ;; 7592ec713c28Smrg msvisualcpp | msvcmsys) 7593ec713c28Smrg # This compiler won't grok `-c -o', but also, the minuso test has 7594ec713c28Smrg # not run yet. These depmodes are late enough in the game, and 7595ec713c28Smrg # so weak that their functioning should not be impacted. 7596ec713c28Smrg am__obj=conftest.${OBJEXT-o} 7597ec713c28Smrg am__minus_obj= 7598ec713c28Smrg ;; 75991d54945dSmrg none) break ;; 76001d54945dSmrg esac 76011d54945dSmrg if depmode=$depmode \ 7602ec713c28Smrg source=sub/conftest.c object=$am__obj \ 76031d54945dSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 7604ec713c28Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 76051d54945dSmrg >/dev/null 2>conftest.err && 7606ba85709eSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 76071d54945dSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 7608ec713c28Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 76091d54945dSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 76101d54945dSmrg # icc doesn't choke on unknown options, it will just issue warnings 76111d54945dSmrg # or remarks (even with -Werror). So we grep stderr for any message 76121d54945dSmrg # that says an option was ignored or not supported. 76131d54945dSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 76141d54945dSmrg # icc: Command line warning: ignoring option '-M'; no argument required 76151d54945dSmrg # The diagnosis changed in icc 8.0: 76161d54945dSmrg # icc: Command line remark: option '-MP' not supported 76171d54945dSmrg if (grep 'ignoring option' conftest.err || 76181d54945dSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 76191d54945dSmrg am_cv_$1_dependencies_compiler_type=$depmode 76201d54945dSmrg break 76211d54945dSmrg fi 76221d54945dSmrg fi 76231d54945dSmrg done 76241d54945dSmrg 76251d54945dSmrg cd .. 76261d54945dSmrg rm -rf conftest.dir 76271d54945dSmrgelse 76281d54945dSmrg am_cv_$1_dependencies_compiler_type=none 76291d54945dSmrgfi 76301d54945dSmrg]) 76311d54945dSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 76321d54945dSmrgAM_CONDITIONAL([am__fastdep$1], [ 76331d54945dSmrg test "x$enable_dependency_tracking" != xno \ 76341d54945dSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 76351d54945dSmrg]) 76361d54945dSmrg 76371d54945dSmrg 76381d54945dSmrg# AM_SET_DEPDIR 76391d54945dSmrg# ------------- 76401d54945dSmrg# Choose a directory name for dependency files. 76411d54945dSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 76421d54945dSmrgAC_DEFUN([AM_SET_DEPDIR], 76431d54945dSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 76441d54945dSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 76451d54945dSmrg]) 76461d54945dSmrg 76471d54945dSmrg 76481d54945dSmrg# AM_DEP_TRACK 76491d54945dSmrg# ------------ 76501d54945dSmrgAC_DEFUN([AM_DEP_TRACK], 76511d54945dSmrg[AC_ARG_ENABLE(dependency-tracking, 76521d54945dSmrg[ --disable-dependency-tracking speeds up one-time build 76531d54945dSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 76541d54945dSmrgif test "x$enable_dependency_tracking" != xno; then 76551d54945dSmrg am_depcomp="$ac_aux_dir/depcomp" 76561d54945dSmrg AMDEPBACKSLASH='\' 76571d54945dSmrgfi 76581d54945dSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 7659ba85709eSmrgAC_SUBST([AMDEPBACKSLASH])dnl 7660ba85709eSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 76611d54945dSmrg]) 76621d54945dSmrg 76631d54945dSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 76641d54945dSmrg 7665786a6f21Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 76661d54945dSmrg# Free Software Foundation, Inc. 76671d54945dSmrg# 76681d54945dSmrg# This file is free software; the Free Software Foundation 76691d54945dSmrg# gives unlimited permission to copy and/or distribute it, 76701d54945dSmrg# with or without modifications, as long as this notice is preserved. 76711d54945dSmrg 7672ec713c28Smrg#serial 5 76731d54945dSmrg 76741d54945dSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 76751d54945dSmrg# ------------------------------ 76761d54945dSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 7677ec713c28Smrg[{ 7678ec713c28Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 7679ec713c28Smrg # are listed without --file. Let's play safe and only enable the eval 7680ec713c28Smrg # if we detect the quoting. 7681ec713c28Smrg case $CONFIG_FILES in 7682ec713c28Smrg *\'*) eval set x "$CONFIG_FILES" ;; 7683ec713c28Smrg *) set x $CONFIG_FILES ;; 7684ec713c28Smrg esac 7685ec713c28Smrg shift 7686ec713c28Smrg for mf 7687ec713c28Smrg do 7688ec713c28Smrg # Strip MF so we end up with the name of the file. 7689ec713c28Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 7690ec713c28Smrg # Check whether this is an Automake generated Makefile or not. 7691ec713c28Smrg # We used to match only the files named `Makefile.in', but 7692ec713c28Smrg # some people rename them; so instead we look at the file content. 7693ec713c28Smrg # Grep'ing the first line is not enough: some people post-process 7694ec713c28Smrg # each Makefile.in and add a new line on top of each file to say so. 7695ec713c28Smrg # Grep'ing the whole file is not good either: AIX grep has a line 7696ec713c28Smrg # limit of 2048, but all sed's we know have understand at least 4000. 7697ec713c28Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 7698ec713c28Smrg dirpart=`AS_DIRNAME("$mf")` 7699ec713c28Smrg else 7700ec713c28Smrg continue 7701ec713c28Smrg fi 7702ec713c28Smrg # Extract the definition of DEPDIR, am__include, and am__quote 7703ec713c28Smrg # from the Makefile without running `make'. 7704ec713c28Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 7705ec713c28Smrg test -z "$DEPDIR" && continue 7706ec713c28Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 7707ec713c28Smrg test -z "am__include" && continue 7708ec713c28Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 7709ec713c28Smrg # When using ansi2knr, U may be empty or an underscore; expand it 7710ec713c28Smrg U=`sed -n 's/^U = //p' < "$mf"` 7711ec713c28Smrg # Find all dependency output files, they are included files with 7712ec713c28Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 7713ec713c28Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 7714ec713c28Smrg # expansion. 7715ec713c28Smrg for file in `sed -n " 7716ec713c28Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 7717ec713c28Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 7718ec713c28Smrg # Make sure the directory exists. 7719ec713c28Smrg test -f "$dirpart/$file" && continue 7720ec713c28Smrg fdir=`AS_DIRNAME(["$file"])` 7721ec713c28Smrg AS_MKDIR_P([$dirpart/$fdir]) 7722ec713c28Smrg # echo "creating $dirpart/$file" 7723ec713c28Smrg echo '# dummy' > "$dirpart/$file" 7724ec713c28Smrg done 77251d54945dSmrg done 7726ec713c28Smrg} 77271d54945dSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 77281d54945dSmrg 77291d54945dSmrg 77301d54945dSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 77311d54945dSmrg# ----------------------------- 77321d54945dSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 77331d54945dSmrg# 77341d54945dSmrg# This code is only required when automatic dependency tracking 77351d54945dSmrg# is enabled. FIXME. This creates each `.P' file that we will 77361d54945dSmrg# need in order to bootstrap the dependency handling code. 77371d54945dSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 77381d54945dSmrg[AC_CONFIG_COMMANDS([depfiles], 77391d54945dSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 77401d54945dSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 77411d54945dSmrg]) 77421d54945dSmrg 77431d54945dSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 77441d54945dSmrg# Free Software Foundation, Inc. 77451d54945dSmrg# 77461d54945dSmrg# This file is free software; the Free Software Foundation 77471d54945dSmrg# gives unlimited permission to copy and/or distribute it, 77481d54945dSmrg# with or without modifications, as long as this notice is preserved. 77491d54945dSmrg 77501d54945dSmrg# serial 8 77511d54945dSmrg 77521d54945dSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 77531d54945dSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 77541d54945dSmrg 77551d54945dSmrg# Do all the work for Automake. -*- Autoconf -*- 77561d54945dSmrg 7757ba85709eSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 7758ec713c28Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 77591d54945dSmrg# 77601d54945dSmrg# This file is free software; the Free Software Foundation 77611d54945dSmrg# gives unlimited permission to copy and/or distribute it, 77621d54945dSmrg# with or without modifications, as long as this notice is preserved. 77631d54945dSmrg 7764ec713c28Smrg# serial 16 77651d54945dSmrg 77661d54945dSmrg# This macro actually does too much. Some checks are only needed if 77671d54945dSmrg# your package does certain things. But this isn't really a big deal. 77681d54945dSmrg 77691d54945dSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 77701d54945dSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 77711d54945dSmrg# ----------------------------------------------- 77721d54945dSmrg# The call with PACKAGE and VERSION arguments is the old style 77731d54945dSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 77741d54945dSmrg# and VERSION should now be passed to AC_INIT and removed from 77751d54945dSmrg# the call to AM_INIT_AUTOMAKE. 77761d54945dSmrg# We support both call styles for the transition. After 77771d54945dSmrg# the next Automake release, Autoconf can make the AC_INIT 77781d54945dSmrg# arguments mandatory, and then we can depend on a new Autoconf 77791d54945dSmrg# release and drop the old call support. 77801d54945dSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 7781ec713c28Smrg[AC_PREREQ([2.62])dnl 77821d54945dSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 77831d54945dSmrgdnl the ones we care about. 77841d54945dSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 77851d54945dSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 77861d54945dSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 7787ba85709eSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 7788ba85709eSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 7789ba85709eSmrg # is not polluted with repeated "-I." 7790ba85709eSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 7791ba85709eSmrg # test to see if srcdir already configured 7792ba85709eSmrg if test -f $srcdir/config.status; then 7793ba85709eSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 7794ba85709eSmrg fi 77951d54945dSmrgfi 77961d54945dSmrg 77971d54945dSmrg# test whether we have cygpath 77981d54945dSmrgif test -z "$CYGPATH_W"; then 77991d54945dSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 78001d54945dSmrg CYGPATH_W='cygpath -w' 78011d54945dSmrg else 78021d54945dSmrg CYGPATH_W=echo 78031d54945dSmrg fi 78041d54945dSmrgfi 78051d54945dSmrgAC_SUBST([CYGPATH_W]) 78061d54945dSmrg 78071d54945dSmrg# Define the identity of the package. 78081d54945dSmrgdnl Distinguish between old-style and new-style calls. 78091d54945dSmrgm4_ifval([$2], 78101d54945dSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 78111d54945dSmrg AC_SUBST([PACKAGE], [$1])dnl 78121d54945dSmrg AC_SUBST([VERSION], [$2])], 78131d54945dSmrg[_AM_SET_OPTIONS([$1])dnl 7814ba85709eSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 7815ba85709eSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 7816ba85709eSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 78171d54945dSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 78181d54945dSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 78191d54945dSmrg 78201d54945dSmrg_AM_IF_OPTION([no-define],, 78211d54945dSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 78221d54945dSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 78231d54945dSmrg 78241d54945dSmrg# Some tools Automake needs. 78251d54945dSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 78261d54945dSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 78271d54945dSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 78281d54945dSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 78291d54945dSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 78301d54945dSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 78311d54945dSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 7832ec713c28SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 7833ec713c28SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 78341d54945dSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 78351d54945dSmrg# We need awk for the "check" target. The system "awk" is bad on 78361d54945dSmrg# some platforms. 78371d54945dSmrgAC_REQUIRE([AC_PROG_AWK])dnl 78381d54945dSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 78391d54945dSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 78401d54945dSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 7841ec713c28Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 7842ec713c28Smrg [_AM_PROG_TAR([v7])])]) 78431d54945dSmrg_AM_IF_OPTION([no-dependencies],, 78441d54945dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 7845ec713c28Smrg [_AM_DEPENDENCIES(CC)], 7846ec713c28Smrg [define([AC_PROG_CC], 7847ec713c28Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 78481d54945dSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 7849ec713c28Smrg [_AM_DEPENDENCIES(CXX)], 7850ec713c28Smrg [define([AC_PROG_CXX], 7851ec713c28Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 7852ba85709eSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 7853ec713c28Smrg [_AM_DEPENDENCIES(OBJC)], 7854ec713c28Smrg [define([AC_PROG_OBJC], 7855ec713c28Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 78561d54945dSmrg]) 7857ec713c28Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 7858ec713c28Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 7859ec713c28Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 7860ec713c28Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 7861ec713c28SmrgAC_CONFIG_COMMANDS_PRE(dnl 7862ec713c28Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 7863ec713c28Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 78641d54945dSmrg]) 78651d54945dSmrg 7866ec713c28Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 7867ec713c28Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 7868ec713c28Smrgdnl mangled by Autoconf and run in a shell conditional statement. 7869ec713c28Smrgm4_define([_AC_COMPILER_EXEEXT], 7870ec713c28Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 7871ec713c28Smrg 78721d54945dSmrg 78731d54945dSmrg# When config.status generates a header, we must update the stamp-h file. 78741d54945dSmrg# This file resides in the same directory as the config header 78751d54945dSmrg# that is generated. The stamp files are numbered to have different names. 78761d54945dSmrg 78771d54945dSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 78781d54945dSmrg# loop where config.status creates the headers, so we can generate 78791d54945dSmrg# our stamp files there. 78801d54945dSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 78811d54945dSmrg[# Compute $1's index in $config_headers. 7882ba85709eSmrg_am_arg=$1 78831d54945dSmrg_am_stamp_count=1 78841d54945dSmrgfor _am_header in $config_headers :; do 78851d54945dSmrg case $_am_header in 7886ba85709eSmrg $_am_arg | $_am_arg:* ) 78871d54945dSmrg break ;; 78881d54945dSmrg * ) 78891d54945dSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 78901d54945dSmrg esac 78911d54945dSmrgdone 7892ba85709eSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 78931d54945dSmrg 7894ec713c28Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 78951d54945dSmrg# 78961d54945dSmrg# This file is free software; the Free Software Foundation 78971d54945dSmrg# gives unlimited permission to copy and/or distribute it, 78981d54945dSmrg# with or without modifications, as long as this notice is preserved. 78991d54945dSmrg 79001d54945dSmrg# AM_PROG_INSTALL_SH 79011d54945dSmrg# ------------------ 79021d54945dSmrg# Define $install_sh. 79031d54945dSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 79041d54945dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7905ec713c28Smrgif test x"${install_sh}" != xset; then 7906ec713c28Smrg case $am_aux_dir in 7907ec713c28Smrg *\ * | *\ *) 7908ec713c28Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 7909ec713c28Smrg *) 7910ec713c28Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 7911ec713c28Smrg esac 7912ec713c28Smrgfi 79131d54945dSmrgAC_SUBST(install_sh)]) 79141d54945dSmrg 79151d54945dSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 79161d54945dSmrg# 79171d54945dSmrg# This file is free software; the Free Software Foundation 79181d54945dSmrg# gives unlimited permission to copy and/or distribute it, 79191d54945dSmrg# with or without modifications, as long as this notice is preserved. 79201d54945dSmrg 79211d54945dSmrg# serial 2 79221d54945dSmrg 79231d54945dSmrg# Check whether the underlying file-system supports filenames 79241d54945dSmrg# with a leading dot. For instance MS-DOS doesn't. 79251d54945dSmrgAC_DEFUN([AM_SET_LEADING_DOT], 79261d54945dSmrg[rm -rf .tst 2>/dev/null 79271d54945dSmrgmkdir .tst 2>/dev/null 79281d54945dSmrgif test -d .tst; then 79291d54945dSmrg am__leading_dot=. 79301d54945dSmrgelse 79311d54945dSmrg am__leading_dot=_ 79321d54945dSmrgfi 79331d54945dSmrgrmdir .tst 2>/dev/null 79341d54945dSmrgAC_SUBST([am__leading_dot])]) 79351d54945dSmrg 79361d54945dSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 79371d54945dSmrg# From Jim Meyering 79381d54945dSmrg 7939ec713c28Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 79401d54945dSmrg# Free Software Foundation, Inc. 79411d54945dSmrg# 79421d54945dSmrg# This file is free software; the Free Software Foundation 79431d54945dSmrg# gives unlimited permission to copy and/or distribute it, 79441d54945dSmrg# with or without modifications, as long as this notice is preserved. 79451d54945dSmrg 7946ec713c28Smrg# serial 5 79471d54945dSmrg 7948ec713c28Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 7949ec713c28Smrg# ---------------------------------- 7950ec713c28Smrg# Control maintainer-specific portions of Makefiles. 7951ec713c28Smrg# Default is to disable them, unless `enable' is passed literally. 7952ec713c28Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 7953ec713c28Smrg# can override the default with the --enable/--disable switch. 79541d54945dSmrgAC_DEFUN([AM_MAINTAINER_MODE], 7955ec713c28Smrg[m4_case(m4_default([$1], [disable]), 7956ec713c28Smrg [enable], [m4_define([am_maintainer_other], [disable])], 7957ec713c28Smrg [disable], [m4_define([am_maintainer_other], [enable])], 7958ec713c28Smrg [m4_define([am_maintainer_other], [enable]) 7959ec713c28Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 7960ec713c28SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 7961ec713c28Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 7962ec713c28Smrg AC_ARG_ENABLE([maintainer-mode], 7963ec713c28Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 79641d54945dSmrg (and sometimes confusing) to the casual installer], 7965ec713c28Smrg [USE_MAINTAINER_MODE=$enableval], 7966ec713c28Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 79671d54945dSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 7968ec713c28Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 79691d54945dSmrg MAINT=$MAINTAINER_MODE_TRUE 7970ec713c28Smrg AC_SUBST([MAINT])dnl 79711d54945dSmrg] 79721d54945dSmrg) 79731d54945dSmrg 79741d54945dSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 79751d54945dSmrg 79761d54945dSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 79771d54945dSmrg 7978ec713c28Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 79791d54945dSmrg# 79801d54945dSmrg# This file is free software; the Free Software Foundation 79811d54945dSmrg# gives unlimited permission to copy and/or distribute it, 79821d54945dSmrg# with or without modifications, as long as this notice is preserved. 79831d54945dSmrg 7984ec713c28Smrg# serial 4 79851d54945dSmrg 79861d54945dSmrg# AM_MAKE_INCLUDE() 79871d54945dSmrg# ----------------- 79881d54945dSmrg# Check to see how make treats includes. 79891d54945dSmrgAC_DEFUN([AM_MAKE_INCLUDE], 79901d54945dSmrg[am_make=${MAKE-make} 79911d54945dSmrgcat > confinc << 'END' 79921d54945dSmrgam__doit: 7993ec713c28Smrg @echo this is the am__doit target 79941d54945dSmrg.PHONY: am__doit 79951d54945dSmrgEND 79961d54945dSmrg# If we don't find an include directive, just comment out the code. 79971d54945dSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 79981d54945dSmrgam__include="#" 79991d54945dSmrgam__quote= 80001d54945dSmrg_am_result=none 80011d54945dSmrg# First try GNU make style include. 80021d54945dSmrgecho "include confinc" > confmf 8003ec713c28Smrg# Ignore all kinds of additional output from `make'. 8004ec713c28Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 8005ec713c28Smrg*the\ am__doit\ target*) 8006ec713c28Smrg am__include=include 8007ec713c28Smrg am__quote= 8008ec713c28Smrg _am_result=GNU 8009ec713c28Smrg ;; 8010ec713c28Smrgesac 80111d54945dSmrg# Now try BSD make style include. 80121d54945dSmrgif test "$am__include" = "#"; then 80131d54945dSmrg echo '.include "confinc"' > confmf 8014ec713c28Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 8015ec713c28Smrg *the\ am__doit\ target*) 8016ec713c28Smrg am__include=.include 8017ec713c28Smrg am__quote="\"" 8018ec713c28Smrg _am_result=BSD 8019ec713c28Smrg ;; 8020ec713c28Smrg esac 80211d54945dSmrgfi 80221d54945dSmrgAC_SUBST([am__include]) 80231d54945dSmrgAC_SUBST([am__quote]) 80241d54945dSmrgAC_MSG_RESULT([$_am_result]) 80251d54945dSmrgrm -f confinc confmf 80261d54945dSmrg]) 80271d54945dSmrg 80281d54945dSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 80291d54945dSmrg 8030ec713c28Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 80311d54945dSmrg# Free Software Foundation, Inc. 80321d54945dSmrg# 80331d54945dSmrg# This file is free software; the Free Software Foundation 80341d54945dSmrg# gives unlimited permission to copy and/or distribute it, 80351d54945dSmrg# with or without modifications, as long as this notice is preserved. 80361d54945dSmrg 8037ec713c28Smrg# serial 6 80381d54945dSmrg 80391d54945dSmrg# AM_MISSING_PROG(NAME, PROGRAM) 80401d54945dSmrg# ------------------------------ 80411d54945dSmrgAC_DEFUN([AM_MISSING_PROG], 80421d54945dSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 80431d54945dSmrg$1=${$1-"${am_missing_run}$2"} 80441d54945dSmrgAC_SUBST($1)]) 80451d54945dSmrg 80461d54945dSmrg 80471d54945dSmrg# AM_MISSING_HAS_RUN 80481d54945dSmrg# ------------------ 80491d54945dSmrg# Define MISSING if not defined so far and test if it supports --run. 80501d54945dSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 80511d54945dSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 80521d54945dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 8053ba85709eSmrgAC_REQUIRE_AUX_FILE([missing])dnl 8054ec713c28Smrgif test x"${MISSING+set}" != xset; then 8055ec713c28Smrg case $am_aux_dir in 8056ec713c28Smrg *\ * | *\ *) 8057ec713c28Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 8058ec713c28Smrg *) 8059ec713c28Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 8060ec713c28Smrg esac 8061ec713c28Smrgfi 80621d54945dSmrg# Use eval to expand $SHELL 80631d54945dSmrgif eval "$MISSING --run true"; then 80641d54945dSmrg am_missing_run="$MISSING --run " 80651d54945dSmrgelse 80661d54945dSmrg am_missing_run= 80671d54945dSmrg AC_MSG_WARN([`missing' script is too old or missing]) 80681d54945dSmrgfi 80691d54945dSmrg]) 80701d54945dSmrg 8071ba85709eSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 80721d54945dSmrg# 80731d54945dSmrg# This file is free software; the Free Software Foundation 80741d54945dSmrg# gives unlimited permission to copy and/or distribute it, 80751d54945dSmrg# with or without modifications, as long as this notice is preserved. 80761d54945dSmrg 80771d54945dSmrg# AM_PROG_MKDIR_P 80781d54945dSmrg# --------------- 8079ba85709eSmrg# Check for `mkdir -p'. 80801d54945dSmrgAC_DEFUN([AM_PROG_MKDIR_P], 8081ba85709eSmrg[AC_PREREQ([2.60])dnl 8082ba85709eSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 8083ba85709eSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 8084ba85709eSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 8085ba85709eSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 8086ba85709eSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 8087ba85709eSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 8088ba85709eSmrgdnl adjustment using top_builddir (which is defined more often than 8089ba85709eSmrgdnl MKDIR_P). 8090ba85709eSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 8091ba85709eSmrgcase $mkdir_p in 8092ba85709eSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 8093ba85709eSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 8094ba85709eSmrgesac 8095ba85709eSmrg]) 80961d54945dSmrg 80971d54945dSmrg# Helper functions for option handling. -*- Autoconf -*- 80981d54945dSmrg 8099786a6f21Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 81001d54945dSmrg# 81011d54945dSmrg# This file is free software; the Free Software Foundation 81021d54945dSmrg# gives unlimited permission to copy and/or distribute it, 81031d54945dSmrg# with or without modifications, as long as this notice is preserved. 81041d54945dSmrg 8105786a6f21Smrg# serial 4 81061d54945dSmrg 81071d54945dSmrg# _AM_MANGLE_OPTION(NAME) 81081d54945dSmrg# ----------------------- 81091d54945dSmrgAC_DEFUN([_AM_MANGLE_OPTION], 81101d54945dSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 81111d54945dSmrg 81121d54945dSmrg# _AM_SET_OPTION(NAME) 81131d54945dSmrg# ------------------------------ 81141d54945dSmrg# Set option NAME. Presently that only means defining a flag for this option. 81151d54945dSmrgAC_DEFUN([_AM_SET_OPTION], 81161d54945dSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 81171d54945dSmrg 81181d54945dSmrg# _AM_SET_OPTIONS(OPTIONS) 81191d54945dSmrg# ---------------------------------- 81201d54945dSmrg# OPTIONS is a space-separated list of Automake options. 81211d54945dSmrgAC_DEFUN([_AM_SET_OPTIONS], 8122786a6f21Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 81231d54945dSmrg 81241d54945dSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 81251d54945dSmrg# ------------------------------------------- 81261d54945dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 81271d54945dSmrgAC_DEFUN([_AM_IF_OPTION], 81281d54945dSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 81291d54945dSmrg 81301d54945dSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 81311d54945dSmrg 8132ec713c28Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 81331d54945dSmrg# Free Software Foundation, Inc. 81341d54945dSmrg# 81351d54945dSmrg# This file is free software; the Free Software Foundation 81361d54945dSmrg# gives unlimited permission to copy and/or distribute it, 81371d54945dSmrg# with or without modifications, as long as this notice is preserved. 81381d54945dSmrg 8139ec713c28Smrg# serial 5 81401d54945dSmrg 81411d54945dSmrg# AM_SANITY_CHECK 81421d54945dSmrg# --------------- 81431d54945dSmrgAC_DEFUN([AM_SANITY_CHECK], 81441d54945dSmrg[AC_MSG_CHECKING([whether build environment is sane]) 81451d54945dSmrg# Just in case 81461d54945dSmrgsleep 1 81471d54945dSmrgecho timestamp > conftest.file 8148ec713c28Smrg# Reject unsafe characters in $srcdir or the absolute working directory 8149ec713c28Smrg# name. Accept space and tab only in the latter. 8150ec713c28Smrgam_lf=' 8151ec713c28Smrg' 8152ec713c28Smrgcase `pwd` in 8153ec713c28Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8154ec713c28Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8155ec713c28Smrgesac 8156ec713c28Smrgcase $srcdir in 8157ec713c28Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8158ec713c28Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 8159ec713c28Smrgesac 8160ec713c28Smrg 81611d54945dSmrg# Do `set' in a subshell so we don't clobber the current shell's 81621d54945dSmrg# arguments. Must try -L first in case configure is actually a 81631d54945dSmrg# symlink; some systems play weird games with the mod time of symlinks 81641d54945dSmrg# (eg FreeBSD returns the mod time of the symlink's containing 81651d54945dSmrg# directory). 81661d54945dSmrgif ( 8167ec713c28Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 81681d54945dSmrg if test "$[*]" = "X"; then 81691d54945dSmrg # -L didn't work. 8170ec713c28Smrg set X `ls -t "$srcdir/configure" conftest.file` 81711d54945dSmrg fi 81721d54945dSmrg rm -f conftest.file 81731d54945dSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 81741d54945dSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 81751d54945dSmrg 81761d54945dSmrg # If neither matched, then we have a broken ls. This can happen 81771d54945dSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 81781d54945dSmrg # broken ls alias from the environment. This has actually 81791d54945dSmrg # happened. Such a system could not be considered "sane". 81801d54945dSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 81811d54945dSmrgalias in your environment]) 81821d54945dSmrg fi 81831d54945dSmrg 81841d54945dSmrg test "$[2]" = conftest.file 81851d54945dSmrg ) 81861d54945dSmrgthen 81871d54945dSmrg # Ok. 81881d54945dSmrg : 81891d54945dSmrgelse 81901d54945dSmrg AC_MSG_ERROR([newly created file is older than distributed files! 81911d54945dSmrgCheck your system clock]) 81921d54945dSmrgfi 81931d54945dSmrgAC_MSG_RESULT(yes)]) 81941d54945dSmrg 81951d54945dSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 81961d54945dSmrg# 81971d54945dSmrg# This file is free software; the Free Software Foundation 81981d54945dSmrg# gives unlimited permission to copy and/or distribute it, 81991d54945dSmrg# with or without modifications, as long as this notice is preserved. 82001d54945dSmrg 82011d54945dSmrg# AM_PROG_INSTALL_STRIP 82021d54945dSmrg# --------------------- 82031d54945dSmrg# One issue with vendor `install' (even GNU) is that you can't 82041d54945dSmrg# specify the program used to strip binaries. This is especially 82051d54945dSmrg# annoying in cross-compiling environments, where the build's strip 82061d54945dSmrg# is unlikely to handle the host's binaries. 82071d54945dSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 82081d54945dSmrg# always use install-sh in `make install-strip', and initialize 82091d54945dSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 82101d54945dSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 82111d54945dSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 82121d54945dSmrg# Installed binaries are usually stripped using `strip' when the user 82131d54945dSmrg# run `make install-strip'. However `strip' might not be the right 82141d54945dSmrg# tool to use in cross-compilation environments, therefore Automake 82151d54945dSmrg# will honor the `STRIP' environment variable to overrule this program. 82161d54945dSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 82171d54945dSmrgif test "$cross_compiling" != no; then 82181d54945dSmrg AC_CHECK_TOOL([STRIP], [strip], :) 82191d54945dSmrgfi 8220ba85709eSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 82211d54945dSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 82221d54945dSmrg 8223ec713c28Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 8224ba85709eSmrg# 8225ba85709eSmrg# This file is free software; the Free Software Foundation 8226ba85709eSmrg# gives unlimited permission to copy and/or distribute it, 8227ba85709eSmrg# with or without modifications, as long as this notice is preserved. 8228ba85709eSmrg 8229ec713c28Smrg# serial 2 8230ec713c28Smrg 8231ba85709eSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 8232ba85709eSmrg# --------------------------- 8233ba85709eSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 8234ba85709eSmrg# This macro is traced by Automake. 8235ba85709eSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 8236ba85709eSmrg 8237ec713c28Smrg# AM_SUBST_NOTMAKE(VARIABLE) 8238ec713c28Smrg# --------------------------- 8239ec713c28Smrg# Public sister of _AM_SUBST_NOTMAKE. 8240ec713c28SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 8241ec713c28Smrg 82421d54945dSmrg# Check how to create a tarball. -*- Autoconf -*- 82431d54945dSmrg 82441d54945dSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 82451d54945dSmrg# 82461d54945dSmrg# This file is free software; the Free Software Foundation 82471d54945dSmrg# gives unlimited permission to copy and/or distribute it, 82481d54945dSmrg# with or without modifications, as long as this notice is preserved. 82491d54945dSmrg 82501d54945dSmrg# serial 2 82511d54945dSmrg 82521d54945dSmrg# _AM_PROG_TAR(FORMAT) 82531d54945dSmrg# -------------------- 82541d54945dSmrg# Check how to create a tarball in format FORMAT. 82551d54945dSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 82561d54945dSmrg# 82571d54945dSmrg# Substitute a variable $(am__tar) that is a command 82581d54945dSmrg# writing to stdout a FORMAT-tarball containing the directory 82591d54945dSmrg# $tardir. 82601d54945dSmrg# tardir=directory && $(am__tar) > result.tar 82611d54945dSmrg# 82621d54945dSmrg# Substitute a variable $(am__untar) that extract such 82631d54945dSmrg# a tarball read from stdin. 82641d54945dSmrg# $(am__untar) < result.tar 82651d54945dSmrgAC_DEFUN([_AM_PROG_TAR], 82661d54945dSmrg[# Always define AMTAR for backward compatibility. 82671d54945dSmrgAM_MISSING_PROG([AMTAR], [tar]) 82681d54945dSmrgm4_if([$1], [v7], 82691d54945dSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 82701d54945dSmrg [m4_case([$1], [ustar],, [pax],, 82711d54945dSmrg [m4_fatal([Unknown tar format])]) 82721d54945dSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 82731d54945dSmrg# Loop over all known methods to create a tar archive until one works. 82741d54945dSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 82751d54945dSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 82761d54945dSmrg# Do not fold the above two line into one, because Tru64 sh and 82771d54945dSmrg# Solaris sh will not grok spaces in the rhs of `-'. 82781d54945dSmrgfor _am_tool in $_am_tools 82791d54945dSmrgdo 82801d54945dSmrg case $_am_tool in 82811d54945dSmrg gnutar) 82821d54945dSmrg for _am_tar in tar gnutar gtar; 82831d54945dSmrg do 82841d54945dSmrg AM_RUN_LOG([$_am_tar --version]) && break 82851d54945dSmrg done 82861d54945dSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 82871d54945dSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 82881d54945dSmrg am__untar="$_am_tar -xf -" 82891d54945dSmrg ;; 82901d54945dSmrg plaintar) 82911d54945dSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 82921d54945dSmrg # ustar tarball either. 82931d54945dSmrg (tar --version) >/dev/null 2>&1 && continue 82941d54945dSmrg am__tar='tar chf - "$$tardir"' 82951d54945dSmrg am__tar_='tar chf - "$tardir"' 82961d54945dSmrg am__untar='tar xf -' 82971d54945dSmrg ;; 82981d54945dSmrg pax) 82991d54945dSmrg am__tar='pax -L -x $1 -w "$$tardir"' 83001d54945dSmrg am__tar_='pax -L -x $1 -w "$tardir"' 83011d54945dSmrg am__untar='pax -r' 83021d54945dSmrg ;; 83031d54945dSmrg cpio) 83041d54945dSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 83051d54945dSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 83061d54945dSmrg am__untar='cpio -i -H $1 -d' 83071d54945dSmrg ;; 83081d54945dSmrg none) 83091d54945dSmrg am__tar=false 83101d54945dSmrg am__tar_=false 83111d54945dSmrg am__untar=false 83121d54945dSmrg ;; 83131d54945dSmrg esac 83141d54945dSmrg 83151d54945dSmrg # If the value was cached, stop now. We just wanted to have am__tar 83161d54945dSmrg # and am__untar set. 83171d54945dSmrg test -n "${am_cv_prog_tar_$1}" && break 83181d54945dSmrg 83191d54945dSmrg # tar/untar a dummy directory, and stop if the command works 83201d54945dSmrg rm -rf conftest.dir 83211d54945dSmrg mkdir conftest.dir 83221d54945dSmrg echo GrepMe > conftest.dir/file 83231d54945dSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 83241d54945dSmrg rm -rf conftest.dir 83251d54945dSmrg if test -s conftest.tar; then 83261d54945dSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 83271d54945dSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 83281d54945dSmrg fi 83291d54945dSmrgdone 83301d54945dSmrgrm -rf conftest.dir 83311d54945dSmrg 83321d54945dSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 83331d54945dSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 83341d54945dSmrgAC_SUBST([am__tar]) 83351d54945dSmrgAC_SUBST([am__untar]) 83361d54945dSmrg]) # _AM_PROG_TAR 83371d54945dSmrg 8338ec713c28Smrgdnl Copyright 2005 Red Hat, Inc 8339ec713c28Smrgdnl 8340ec713c28Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 8341ec713c28Smrgdnl documentation for any purpose is hereby granted without fee, provided that 8342ec713c28Smrgdnl the above copyright notice appear in all copies and that both that 8343ec713c28Smrgdnl copyright notice and this permission notice appear in supporting 8344ec713c28Smrgdnl documentation. 8345ec713c28Smrgdnl 8346ec713c28Smrgdnl The above copyright notice and this permission notice shall be included 8347ec713c28Smrgdnl in all copies or substantial portions of the Software. 8348ec713c28Smrgdnl 8349ec713c28Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 8350ec713c28Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 8351ec713c28Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 8352ec713c28Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 8353ec713c28Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 8354ec713c28Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 8355ec713c28Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 8356ec713c28Smrgdnl 8357ec713c28Smrgdnl Except as contained in this notice, the name of the copyright holders shall 8358ec713c28Smrgdnl not be used in advertising or otherwise to promote the sale, use or 8359ec713c28Smrgdnl other dealings in this Software without prior written authorization 8360ec713c28Smrgdnl from the copyright holders. 8361ec713c28Smrgdnl 8362ec713c28Smrg 8363ec713c28Smrg# XORG_DRIVER_CHECK_EXT() 8364ec713c28Smrg# -------------------------- 8365ec713c28Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 8366ec713c28Smrg# is defined, then add $1 to $REQUIRED_MODULES. 8367ec713c28Smrg 8368ec713c28SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 8369ec713c28Smrg SAVE_CFLAGS="$CFLAGS" 8370ec713c28Smrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 8371ec713c28Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 8372ec713c28Smrg#include "xorg-server.h" 8373ec713c28Smrg#if !defined $1 8374ec713c28Smrg#error $1 not defined 8375ec713c28Smrg#endif 8376ec713c28Smrg ]])], 8377ec713c28Smrg [_EXT_CHECK=yes], 8378ec713c28Smrg [_EXT_CHECK=no]) 8379ec713c28Smrg CFLAGS="$SAVE_CFLAGS" 8380ec713c28Smrg AC_MSG_CHECKING([if $1 is defined]) 8381ec713c28Smrg AC_MSG_RESULT([$_EXT_CHECK]) 8382ec713c28Smrg if test "$_EXT_CHECK" != no; then 8383ec713c28Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 8384ec713c28Smrg fi 8385ec713c28Smrg]) 8386ec713c28Smrg 8387