aclocal.m4 revision e6f085ba
1e6f085baSmrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 295b296d0Smrg 395b296d0Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4e6f085baSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 595b296d0Smrg# This file is free software; the Free Software Foundation 695b296d0Smrg# gives unlimited permission to copy and/or distribute it, 795b296d0Smrg# with or without modifications, as long as this notice is preserved. 895b296d0Smrg 995b296d0Smrg# This program is distributed in the hope that it will be useful, 1095b296d0Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1195b296d0Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1295b296d0Smrg# PARTICULAR PURPOSE. 1395b296d0Smrg 14ff89ac2bSmrgm4_ifndef([AC_AUTOCONF_VERSION], 15ff89ac2bSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1639713583Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 17ff89ac2bSmrg[m4_warning([this file was generated for autoconf 2.63. 18ff89ac2bSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19ff89ac2bSmrgIf you have problems, you may need to regenerate the build system entirely. 20ff89ac2bSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21ff89ac2bSmrg 2295b296d0Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2395b296d0Smrg 24e6f085baSmrg# serial 52 AC_PROG_LIBTOOL 2595b296d0Smrg 2695b296d0Smrg 27e6f085baSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 28e6f085baSmrg# ----------------------------------------------------------- 29e6f085baSmrg# If this macro is not defined by Autoconf, define it here. 30e6f085baSmrgm4_ifdef([AC_PROVIDE_IFELSE], 31e6f085baSmrg [], 32e6f085baSmrg [m4_define([AC_PROVIDE_IFELSE], 33e6f085baSmrg [m4_ifdef([AC_PROVIDE_$1], 34e6f085baSmrg [$2], [$3])])]) 3539713583Smrg 3639713583Smrg 37e6f085baSmrg# AC_PROG_LIBTOOL 38e6f085baSmrg# --------------- 39e6f085baSmrgAC_DEFUN([AC_PROG_LIBTOOL], 40e6f085baSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 41e6f085baSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 42e6f085baSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 43e6f085baSmrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 44e6f085baSmrg [AC_LIBTOOL_CXX], 45e6f085baSmrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 46e6f085baSmrg ])]) 47e6f085baSmrgdnl And a similar setup for Fortran 77 support 48e6f085baSmrg AC_PROVIDE_IFELSE([AC_PROG_F77], 49e6f085baSmrg [AC_LIBTOOL_F77], 50e6f085baSmrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 51e6f085baSmrg])]) 52e6f085baSmrg 53e6f085baSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 54e6f085baSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 55e6f085baSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 56e6f085baSmrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 57e6f085baSmrg [AC_LIBTOOL_GCJ], 58e6f085baSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 59e6f085baSmrg [AC_LIBTOOL_GCJ], 60e6f085baSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 61e6f085baSmrg [AC_LIBTOOL_GCJ], 62e6f085baSmrg [ifdef([AC_PROG_GCJ], 63e6f085baSmrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 64e6f085baSmrg ifdef([A][M_PROG_GCJ], 65e6f085baSmrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 66e6f085baSmrg ifdef([LT_AC_PROG_GCJ], 67e6f085baSmrg [define([LT_AC_PROG_GCJ], 68e6f085baSmrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 69e6f085baSmrg])])# AC_PROG_LIBTOOL 70e6f085baSmrg 71e6f085baSmrg 72e6f085baSmrg# _AC_PROG_LIBTOOL 73e6f085baSmrg# ---------------- 74e6f085baSmrgAC_DEFUN([_AC_PROG_LIBTOOL], 75e6f085baSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 76e6f085baSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 77e6f085baSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 78e6f085baSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 7995b296d0Smrg 8095b296d0Smrg# This can be used to rebuild libtool when needed 81e6f085baSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 8295b296d0Smrg 8395b296d0Smrg# Always use our own libtool. 8495b296d0SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 8595b296d0SmrgAC_SUBST(LIBTOOL)dnl 8695b296d0Smrg 87e6f085baSmrg# Prevent multiple expansion 88e6f085baSmrgdefine([AC_PROG_LIBTOOL], []) 89e6f085baSmrg])# _AC_PROG_LIBTOOL 9039713583Smrg 9139713583Smrg 92e6f085baSmrg# AC_LIBTOOL_SETUP 93e6f085baSmrg# ---------------- 94e6f085baSmrgAC_DEFUN([AC_LIBTOOL_SETUP], 95e6f085baSmrg[AC_PREREQ(2.50)dnl 96e6f085baSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 97e6f085baSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 98e6f085baSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 99e6f085baSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 10095b296d0SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 10195b296d0SmrgAC_REQUIRE([AC_PROG_CC])dnl 102e6f085baSmrgAC_REQUIRE([AC_PROG_LD])dnl 103e6f085baSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 104e6f085baSmrgAC_REQUIRE([AC_PROG_NM])dnl 105e6f085baSmrg 10695b296d0SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 107e6f085baSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 108e6f085baSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 109e6f085baSmrgAC_REQUIRE([AC_OBJEXT])dnl 110e6f085baSmrgAC_REQUIRE([AC_EXEEXT])dnl 11139713583Smrgdnl 112e6f085baSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 113e6f085baSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 114e6f085baSmrgAC_LIBTOOL_OBJDIR 11539713583Smrg 116e6f085baSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 117e6f085baSmrg_LT_AC_PROG_ECHO_BACKSLASH 11895b296d0Smrg 11995b296d0Smrgcase $host_os in 12095b296d0Smrgaix3*) 12195b296d0Smrg # AIX sometimes has problems with the GCC collect2 program. For some 12295b296d0Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 12395b296d0Smrg # vanish in a puff of smoke. 12495b296d0Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 12595b296d0Smrg COLLECT_NAMES= 12695b296d0Smrg export COLLECT_NAMES 12795b296d0Smrg fi 12895b296d0Smrg ;; 12995b296d0Smrgesac 13095b296d0Smrg 13195b296d0Smrg# Sed substitution that helps us do robust quoting. It backslashifies 13295b296d0Smrg# metacharacters that are still active within double-quoted strings. 133e6f085baSmrgXsed='sed -e 1s/^X//' 134e6f085baSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 13595b296d0Smrg 13695b296d0Smrg# Same as above, but do not quote variable references. 137e6f085baSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 13895b296d0Smrg 13995b296d0Smrg# Sed substitution to delay expansion of an escaped shell variable in a 14095b296d0Smrg# double_quote_subst'ed string. 14195b296d0Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 14295b296d0Smrg 14395b296d0Smrg# Sed substitution to avoid accidental globbing in evaled expressions 14495b296d0Smrgno_glob_subst='s/\*/\\\*/g' 14595b296d0Smrg 146e6f085baSmrg# Constants: 147e6f085baSmrgrm="rm -f" 148e6f085baSmrg 14995b296d0Smrg# Global variables: 150e6f085baSmrgdefault_ofile=libtool 15195b296d0Smrgcan_build_shared=yes 15295b296d0Smrg 15395b296d0Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 15495b296d0Smrg# which needs '.lib'). 15595b296d0Smrglibext=a 156e6f085baSmrgltmain="$ac_aux_dir/ltmain.sh" 157e6f085baSmrgofile="$default_ofile" 15839713583Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 15995b296d0Smrg 160e6f085baSmrgAC_CHECK_TOOL(AR, ar, false) 161e6f085baSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 162e6f085baSmrgAC_CHECK_TOOL(STRIP, strip, :) 163e6f085baSmrg 16495b296d0Smrgold_CC="$CC" 16595b296d0Smrgold_CFLAGS="$CFLAGS" 16695b296d0Smrg 16795b296d0Smrg# Set sane defaults for various variables 168e6f085baSmrgtest -z "$AR" && AR=ar 169e6f085baSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 170e6f085baSmrgtest -z "$AS" && AS=as 17195b296d0Smrgtest -z "$CC" && CC=cc 17295b296d0Smrgtest -z "$LTCC" && LTCC=$CC 17395b296d0Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 174e6f085baSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 17595b296d0Smrgtest -z "$LD" && LD=ld 176e6f085baSmrgtest -z "$LN_S" && LN_S="ln -s" 177e6f085baSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 178e6f085baSmrgtest -z "$NM" && NM=nm 179e6f085baSmrgtest -z "$SED" && SED=sed 180e6f085baSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 181e6f085baSmrgtest -z "$RANLIB" && RANLIB=: 182e6f085baSmrgtest -z "$STRIP" && STRIP=: 18395b296d0Smrgtest -z "$ac_objext" && ac_objext=o 18495b296d0Smrg 185e6f085baSmrg# Determine commands to create old-style static archives. 186e6f085baSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 187e6f085baSmrgold_postinstall_cmds='chmod 644 $oldlib' 188e6f085baSmrgold_postuninstall_cmds= 189e6f085baSmrg 190e6f085baSmrgif test -n "$RANLIB"; then 191e6f085baSmrg case $host_os in 192e6f085baSmrg openbsd*) 193e6f085baSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 194e6f085baSmrg ;; 195e6f085baSmrg *) 196e6f085baSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 197e6f085baSmrg ;; 198e6f085baSmrg esac 199e6f085baSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 200e6f085baSmrgfi 201e6f085baSmrg 20295b296d0Smrg_LT_CC_BASENAME([$compiler]) 20395b296d0Smrg 20495b296d0Smrg# Only perform the check for file, if the check method requires it 20595b296d0Smrgcase $deplibs_check_method in 20695b296d0Smrgfile_magic*) 20795b296d0Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 208e6f085baSmrg AC_PATH_MAGIC 20995b296d0Smrg fi 21095b296d0Smrg ;; 21195b296d0Smrgesac 21295b296d0Smrg 213e6f085baSmrg_LT_REQUIRED_DARWIN_CHECKS 21439713583Smrg 215e6f085baSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 216e6f085baSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 217e6f085baSmrgenable_win32_dll=yes, enable_win32_dll=no) 21839713583Smrg 219e6f085baSmrgAC_ARG_ENABLE([libtool-lock], 220e6f085baSmrg [AC_HELP_STRING([--disable-libtool-lock], 221e6f085baSmrg [avoid locking (might break parallel builds)])]) 222e6f085baSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 22339713583Smrg 224e6f085baSmrgAC_ARG_WITH([pic], 225e6f085baSmrg [AC_HELP_STRING([--with-pic], 226e6f085baSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 227e6f085baSmrg [pic_mode="$withval"], 228e6f085baSmrg [pic_mode=default]) 229e6f085baSmrgtest -z "$pic_mode" && pic_mode=default 23039713583Smrg 231e6f085baSmrg# Use C for the default configuration in the libtool script 232e6f085baSmrgtagname= 233e6f085baSmrgAC_LIBTOOL_LANG_C_CONFIG 234e6f085baSmrg_LT_AC_TAGCONFIG 235e6f085baSmrg])# AC_LIBTOOL_SETUP 23639713583Smrg 23739713583Smrg 238e6f085baSmrg# _LT_AC_SYS_COMPILER 23995b296d0Smrg# ------------------- 240e6f085baSmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 24195b296d0Smrg[AC_REQUIRE([AC_PROG_CC])dnl 24295b296d0Smrg 24395b296d0Smrg# If no C compiler was specified, use CC. 24495b296d0SmrgLTCC=${LTCC-"$CC"} 24595b296d0Smrg 24695b296d0Smrg# If no C compiler flags were specified, use CFLAGS. 24795b296d0SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 24895b296d0Smrg 24995b296d0Smrg# Allow CC to be a program name with arguments. 25095b296d0Smrgcompiler=$CC 251e6f085baSmrg])# _LT_AC_SYS_COMPILER 252e6f085baSmrg 253e6f085baSmrg 254e6f085baSmrg# _LT_CC_BASENAME(CC) 255e6f085baSmrg# ------------------- 256e6f085baSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 257e6f085baSmrgAC_DEFUN([_LT_CC_BASENAME], 258e6f085baSmrg[for cc_temp in $1""; do 259e6f085baSmrg case $cc_temp in 260e6f085baSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 261e6f085baSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 262e6f085baSmrg \-*) ;; 263e6f085baSmrg *) break;; 264e6f085baSmrg esac 265e6f085baSmrgdone 266e6f085baSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 267e6f085baSmrg]) 26895b296d0Smrg 26995b296d0Smrg 27095b296d0Smrg# _LT_COMPILER_BOILERPLATE 27195b296d0Smrg# ------------------------ 27295b296d0Smrg# Check for compiler boilerplate output or warnings with 27395b296d0Smrg# the simple compiler test code. 274e6f085baSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 275e6f085baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 276ff89ac2bSmrgac_outfile=conftest.$ac_objext 277ff89ac2bSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 27895b296d0Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 27995b296d0Smrg_lt_compiler_boilerplate=`cat conftest.err` 280e6f085baSmrg$rm conftest* 28195b296d0Smrg])# _LT_COMPILER_BOILERPLATE 28295b296d0Smrg 28395b296d0Smrg 28495b296d0Smrg# _LT_LINKER_BOILERPLATE 28595b296d0Smrg# ---------------------- 28695b296d0Smrg# Check for linker boilerplate output or warnings with 28795b296d0Smrg# the simple link test code. 288e6f085baSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 289e6f085baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 290ff89ac2bSmrgac_outfile=conftest.$ac_objext 291ff89ac2bSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 29295b296d0Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 29395b296d0Smrg_lt_linker_boilerplate=`cat conftest.err` 294e6f085baSmrg$rm -r conftest* 29595b296d0Smrg])# _LT_LINKER_BOILERPLATE 29695b296d0Smrg 297ff89ac2bSmrg# _LT_REQUIRED_DARWIN_CHECKS 298e6f085baSmrg# -------------------------- 299e6f085baSmrg# Check for some things on darwin 300e6f085baSmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ 301ff89ac2bSmrg case $host_os in 302ff89ac2bSmrg rhapsody* | darwin*) 303ff89ac2bSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 304ff89ac2bSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 305ff89ac2bSmrg 306ff89ac2bSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 307ff89ac2bSmrg [lt_cv_apple_cc_single_mod=no 308ff89ac2bSmrg if test -z "${LT_MULTI_MODULE}"; then 309e6f085baSmrg # By default we will add the -single_module flag. You can override 310e6f085baSmrg # by either setting the environment variable LT_MULTI_MODULE 311e6f085baSmrg # non-empty at configure time, or by adding -multi_module to the 312e6f085baSmrg # link flags. 313e6f085baSmrg echo "int foo(void){return 1;}" > conftest.c 314e6f085baSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 315e6f085baSmrg -dynamiclib ${wl}-single_module conftest.c 316e6f085baSmrg if test -f libconftest.dylib; then 317e6f085baSmrg lt_cv_apple_cc_single_mod=yes 318e6f085baSmrg rm -rf libconftest.dylib* 319e6f085baSmrg fi 320e6f085baSmrg rm conftest.c 321ff89ac2bSmrg fi]) 322ff89ac2bSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 323ff89ac2bSmrg [lt_cv_ld_exported_symbols_list], 324ff89ac2bSmrg [lt_cv_ld_exported_symbols_list=no 325ff89ac2bSmrg save_LDFLAGS=$LDFLAGS 326ff89ac2bSmrg echo "_main" > conftest.sym 327ff89ac2bSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 328ff89ac2bSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 329e6f085baSmrg [lt_cv_ld_exported_symbols_list=yes], 330e6f085baSmrg [lt_cv_ld_exported_symbols_list=no]) 331e6f085baSmrg LDFLAGS="$save_LDFLAGS" 332ff89ac2bSmrg ]) 333ff89ac2bSmrg case $host_os in 334e6f085baSmrg rhapsody* | darwin1.[[0123]]) 335ff89ac2bSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 336ff89ac2bSmrg darwin1.*) 337e6f085baSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 338e6f085baSmrg darwin*) 339ff89ac2bSmrg # if running on 10.5 or later, the deployment target defaults 340ff89ac2bSmrg # to the OS version, if on x86, and 10.4, the deployment 341ff89ac2bSmrg # target defaults to 10.4. Don't you love it? 342ff89ac2bSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 343e6f085baSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 344e6f085baSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 345e6f085baSmrg 10.[[012]]*) 346e6f085baSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 347e6f085baSmrg 10.*) 348e6f085baSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 349ff89ac2bSmrg esac 350ff89ac2bSmrg ;; 351ff89ac2bSmrg esac 352ff89ac2bSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 353ff89ac2bSmrg _lt_dar_single_mod='$single_module' 354ff89ac2bSmrg fi 355ff89ac2bSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 356ff89ac2bSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 357ff89ac2bSmrg else 358e6f085baSmrg _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 359ff89ac2bSmrg fi 360ff89ac2bSmrg if test "$DSYMUTIL" != ":"; then 361e6f085baSmrg _lt_dsymutil="~$DSYMUTIL \$lib || :" 362ff89ac2bSmrg else 363ff89ac2bSmrg _lt_dsymutil= 364ff89ac2bSmrg fi 365ff89ac2bSmrg ;; 366ff89ac2bSmrg esac 367ff89ac2bSmrg]) 36895b296d0Smrg 369e6f085baSmrg# _LT_AC_SYS_LIBPATH_AIX 370e6f085baSmrg# ---------------------- 37195b296d0Smrg# Links a minimal program and checks the executable 37295b296d0Smrg# for the system default hardcoded library path. In most cases, 37395b296d0Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 37495b296d0Smrg# the location of the communication and MPI libs are included too. 37595b296d0Smrg# If we don't find anything, use the default library path according 37695b296d0Smrg# to the aix ld manual. 377e6f085baSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 378e6f085baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 379ff89ac2bSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 380ff89ac2bSmrglt_aix_libpath_sed=' 381ff89ac2bSmrg /Import File Strings/,/^$/ { 382ff89ac2bSmrg /^0/ { 383ff89ac2bSmrg s/^0 *\(.*\)$/\1/ 384ff89ac2bSmrg p 385ff89ac2bSmrg } 386ff89ac2bSmrg }' 387ff89ac2bSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 38895b296d0Smrg# Check for a 64-bit object if we didn't find anything. 389ff89ac2bSmrgif test -z "$aix_libpath"; then 390ff89ac2bSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 391ff89ac2bSmrgfi],[]) 39295b296d0Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 393e6f085baSmrg])# _LT_AC_SYS_LIBPATH_AIX 39495b296d0Smrg 39595b296d0Smrg 396e6f085baSmrg# _LT_AC_SHELL_INIT(ARG) 397e6f085baSmrg# ---------------------- 398e6f085baSmrgAC_DEFUN([_LT_AC_SHELL_INIT], 39995b296d0Smrg[ifdef([AC_DIVERSION_NOTICE], 40095b296d0Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 40195b296d0Smrg [AC_DIVERT_PUSH(NOTICE)]) 40295b296d0Smrg$1 40395b296d0SmrgAC_DIVERT_POP 404e6f085baSmrg])# _LT_AC_SHELL_INIT 40595b296d0Smrg 40695b296d0Smrg 407e6f085baSmrg# _LT_AC_PROG_ECHO_BACKSLASH 408e6f085baSmrg# -------------------------- 40995b296d0Smrg# Add some code to the start of the generated configure script which 41095b296d0Smrg# will find an echo command which doesn't interpret backslashes. 411e6f085baSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 412e6f085baSmrg[_LT_AC_SHELL_INIT([ 41395b296d0Smrg# Check that we are running under the correct shell. 41495b296d0SmrgSHELL=${CONFIG_SHELL-/bin/sh} 41595b296d0Smrg 416e6f085baSmrgcase X$ECHO in 41795b296d0SmrgX*--fallback-echo) 41895b296d0Smrg # Remove one level of quotation (which was required for Make). 419e6f085baSmrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 42095b296d0Smrg ;; 42195b296d0Smrgesac 42295b296d0Smrg 423e6f085baSmrgecho=${ECHO-echo} 42495b296d0Smrgif test "X[$]1" = X--no-reexec; then 42595b296d0Smrg # Discard the --no-reexec flag, and continue. 42695b296d0Smrg shift 42795b296d0Smrgelif test "X[$]1" = X--fallback-echo; then 42895b296d0Smrg # Avoid inline document here, it may be left over 42995b296d0Smrg : 430e6f085baSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 431e6f085baSmrg # Yippee, $echo works! 43295b296d0Smrg : 43395b296d0Smrgelse 43495b296d0Smrg # Restart under the correct shell. 43595b296d0Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 43695b296d0Smrgfi 43795b296d0Smrg 43895b296d0Smrgif test "X[$]1" = X--fallback-echo; then 43995b296d0Smrg # used as fallback echo 44095b296d0Smrg shift 441e6f085baSmrg cat <<EOF 44295b296d0Smrg[$]* 443e6f085baSmrgEOF 44495b296d0Smrg exit 0 44595b296d0Smrgfi 44695b296d0Smrg 44795b296d0Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 44895b296d0Smrg# if CDPATH is set. 44995b296d0Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 45095b296d0Smrg 451e6f085baSmrgif test -z "$ECHO"; then 452e6f085baSmrgif test "X${echo_test_string+set}" != Xset; then 453e6f085baSmrg# find a string as large as possible, as long as the shell can cope with it 454e6f085baSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 455e6f085baSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 456e6f085baSmrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 457e6f085baSmrg echo_test_string=`eval $cmd` && 458e6f085baSmrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 459e6f085baSmrg then 460e6f085baSmrg break 461e6f085baSmrg fi 462e6f085baSmrg done 463e6f085baSmrgfi 46495b296d0Smrg 465e6f085baSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 466e6f085baSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 467e6f085baSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 468e6f085baSmrg : 469e6f085baSmrgelse 470e6f085baSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 471e6f085baSmrg # backslashes. This makes it impossible to quote backslashes using 472e6f085baSmrg # echo "$something" | sed 's/\\/\\\\/g' 473e6f085baSmrg # 474e6f085baSmrg # So, first we look for a working echo in the user's PATH. 47595b296d0Smrg 476e6f085baSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 477e6f085baSmrg for dir in $PATH /usr/ucb; do 47895b296d0Smrg IFS="$lt_save_ifs" 479e6f085baSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 480e6f085baSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 481e6f085baSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 482e6f085baSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 483e6f085baSmrg echo="$dir/echo" 484e6f085baSmrg break 485e6f085baSmrg fi 486e6f085baSmrg done 487e6f085baSmrg IFS="$lt_save_ifs" 48895b296d0Smrg 489e6f085baSmrg if test "X$echo" = Xecho; then 490e6f085baSmrg # We didn't find a better echo, so look for alternatives. 491e6f085baSmrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 492e6f085baSmrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 493e6f085baSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 494e6f085baSmrg # This shell has a builtin print -r that does the trick. 495e6f085baSmrg echo='print -r' 496e6f085baSmrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 497e6f085baSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 498e6f085baSmrg # If we have ksh, try running configure again with it. 499e6f085baSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 500e6f085baSmrg export ORIGINAL_CONFIG_SHELL 501e6f085baSmrg CONFIG_SHELL=/bin/ksh 502e6f085baSmrg export CONFIG_SHELL 503e6f085baSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 504e6f085baSmrg else 505e6f085baSmrg # Try using printf. 506e6f085baSmrg echo='printf %s\n' 507e6f085baSmrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 508e6f085baSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 509e6f085baSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 510e6f085baSmrg # Cool, printf works 511e6f085baSmrg : 512e6f085baSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 513e6f085baSmrg test "X$echo_testing_string" = 'X\t' && 514e6f085baSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 51539713583Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 516e6f085baSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 517e6f085baSmrg export CONFIG_SHELL 518e6f085baSmrg SHELL="$CONFIG_SHELL" 519e6f085baSmrg export SHELL 520e6f085baSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 521e6f085baSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 522e6f085baSmrg test "X$echo_testing_string" = 'X\t' && 523e6f085baSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 524e6f085baSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 525e6f085baSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 526e6f085baSmrg else 527e6f085baSmrg # maybe with a smaller string... 528e6f085baSmrg prev=: 52995b296d0Smrg 530e6f085baSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 531e6f085baSmrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 532e6f085baSmrg then 533e6f085baSmrg break 53439713583Smrg fi 535e6f085baSmrg prev="$cmd" 536e6f085baSmrg done 537e6f085baSmrg 538e6f085baSmrg if test "$prev" != 'sed 50q "[$]0"'; then 539e6f085baSmrg echo_test_string=`eval $prev` 540e6f085baSmrg export echo_test_string 541e6f085baSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 542e6f085baSmrg else 543e6f085baSmrg # Oops. We lost completely, so just stick with echo. 544e6f085baSmrg echo=echo 545e6f085baSmrg fi 54695b296d0Smrg fi 54795b296d0Smrg fi 54895b296d0Smrg fi 54995b296d0Smrgfi 550e6f085baSmrgfi 55195b296d0Smrg 55295b296d0Smrg# Copy echo and quote the copy suitably for passing to libtool from 55395b296d0Smrg# the Makefile, instead of quoting the original, which is used later. 554e6f085baSmrgECHO=$echo 555e6f085baSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 556e6f085baSmrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 55795b296d0Smrgfi 55895b296d0Smrg 559e6f085baSmrgAC_SUBST(ECHO) 560e6f085baSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH 56195b296d0Smrg 56295b296d0Smrg 563e6f085baSmrg# _LT_AC_LOCK 564e6f085baSmrg# ----------- 565e6f085baSmrgAC_DEFUN([_LT_AC_LOCK], 56695b296d0Smrg[AC_ARG_ENABLE([libtool-lock], 567e6f085baSmrg [AC_HELP_STRING([--disable-libtool-lock], 568e6f085baSmrg [avoid locking (might break parallel builds)])]) 56995b296d0Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 57095b296d0Smrg 57195b296d0Smrg# Some flags need to be propagated to the compiler or linker for good 57295b296d0Smrg# libtool support. 57395b296d0Smrgcase $host in 57495b296d0Smrgia64-*-hpux*) 57595b296d0Smrg # Find out which ABI we are using. 57695b296d0Smrg echo 'int i;' > conftest.$ac_ext 57795b296d0Smrg if AC_TRY_EVAL(ac_compile); then 57895b296d0Smrg case `/usr/bin/file conftest.$ac_objext` in 579e6f085baSmrg *ELF-32*) 580e6f085baSmrg HPUX_IA64_MODE="32" 581e6f085baSmrg ;; 582e6f085baSmrg *ELF-64*) 583e6f085baSmrg HPUX_IA64_MODE="64" 584e6f085baSmrg ;; 58595b296d0Smrg esac 58695b296d0Smrg fi 58795b296d0Smrg rm -rf conftest* 58895b296d0Smrg ;; 58995b296d0Smrg*-*-irix6*) 59095b296d0Smrg # Find out which ABI we are using. 59195b296d0Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 59295b296d0Smrg if AC_TRY_EVAL(ac_compile); then 593e6f085baSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 594e6f085baSmrg case `/usr/bin/file conftest.$ac_objext` in 595e6f085baSmrg *32-bit*) 596e6f085baSmrg LD="${LD-ld} -melf32bsmip" 597e6f085baSmrg ;; 598e6f085baSmrg *N32*) 599e6f085baSmrg LD="${LD-ld} -melf32bmipn32" 600e6f085baSmrg ;; 601e6f085baSmrg *64-bit*) 602e6f085baSmrg LD="${LD-ld} -melf64bmip" 603e6f085baSmrg ;; 604e6f085baSmrg esac 605e6f085baSmrg else 606e6f085baSmrg case `/usr/bin/file conftest.$ac_objext` in 607e6f085baSmrg *32-bit*) 608e6f085baSmrg LD="${LD-ld} -32" 609e6f085baSmrg ;; 610e6f085baSmrg *N32*) 611e6f085baSmrg LD="${LD-ld} -n32" 612e6f085baSmrg ;; 613e6f085baSmrg *64-bit*) 614e6f085baSmrg LD="${LD-ld} -64" 615e6f085baSmrg ;; 616e6f085baSmrg esac 617e6f085baSmrg fi 61895b296d0Smrg fi 61995b296d0Smrg rm -rf conftest* 62095b296d0Smrg ;; 62195b296d0Smrg 622ff89ac2bSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 623e6f085baSmrgs390*-*linux*|sparc*-*linux*) 62495b296d0Smrg # Find out which ABI we are using. 62595b296d0Smrg echo 'int i;' > conftest.$ac_ext 62695b296d0Smrg if AC_TRY_EVAL(ac_compile); then 62795b296d0Smrg case `/usr/bin/file conftest.o` in 628e6f085baSmrg *32-bit*) 629e6f085baSmrg case $host in 630e6f085baSmrg x86_64-*kfreebsd*-gnu) 631e6f085baSmrg LD="${LD-ld} -m elf_i386_fbsd" 632e6f085baSmrg ;; 633e6f085baSmrg x86_64-*linux*) 634e6f085baSmrg LD="${LD-ld} -m elf_i386" 635e6f085baSmrg ;; 636e6f085baSmrg ppc64-*linux*|powerpc64-*linux*) 637e6f085baSmrg LD="${LD-ld} -m elf32ppclinux" 638e6f085baSmrg ;; 639e6f085baSmrg s390x-*linux*) 640e6f085baSmrg LD="${LD-ld} -m elf_s390" 641e6f085baSmrg ;; 642e6f085baSmrg sparc64-*linux*) 643e6f085baSmrg LD="${LD-ld} -m elf32_sparc" 644e6f085baSmrg ;; 645e6f085baSmrg esac 646e6f085baSmrg ;; 647e6f085baSmrg *64-bit*) 648e6f085baSmrg libsuff=64 649e6f085baSmrg case $host in 650e6f085baSmrg x86_64-*kfreebsd*-gnu) 651e6f085baSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 652e6f085baSmrg ;; 653e6f085baSmrg x86_64-*linux*) 654e6f085baSmrg LD="${LD-ld} -m elf_x86_64" 655e6f085baSmrg ;; 656e6f085baSmrg ppc*-*linux*|powerpc*-*linux*) 657e6f085baSmrg LD="${LD-ld} -m elf64ppc" 658e6f085baSmrg ;; 659e6f085baSmrg s390*-*linux*) 660e6f085baSmrg LD="${LD-ld} -m elf64_s390" 661e6f085baSmrg ;; 662e6f085baSmrg sparc*-*linux*) 663e6f085baSmrg LD="${LD-ld} -m elf64_sparc" 664e6f085baSmrg ;; 665e6f085baSmrg esac 666e6f085baSmrg ;; 66795b296d0Smrg esac 66895b296d0Smrg fi 66995b296d0Smrg rm -rf conftest* 67095b296d0Smrg ;; 67195b296d0Smrg 67295b296d0Smrg*-*-sco3.2v5*) 67395b296d0Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 67495b296d0Smrg SAVE_CFLAGS="$CFLAGS" 67595b296d0Smrg CFLAGS="$CFLAGS -belf" 67695b296d0Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 67795b296d0Smrg [AC_LANG_PUSH(C) 678e6f085baSmrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 67995b296d0Smrg AC_LANG_POP]) 68095b296d0Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 68195b296d0Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 68295b296d0Smrg CFLAGS="$SAVE_CFLAGS" 68395b296d0Smrg fi 68495b296d0Smrg ;; 68595b296d0Smrgsparc*-*solaris*) 68695b296d0Smrg # Find out which ABI we are using. 68795b296d0Smrg echo 'int i;' > conftest.$ac_ext 68895b296d0Smrg if AC_TRY_EVAL(ac_compile); then 68995b296d0Smrg case `/usr/bin/file conftest.o` in 69095b296d0Smrg *64-bit*) 69195b296d0Smrg case $lt_cv_prog_gnu_ld in 69295b296d0Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 693ff89ac2bSmrg *) 694e6f085baSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 695ff89ac2bSmrg LD="${LD-ld} -64" 696ff89ac2bSmrg fi 697ff89ac2bSmrg ;; 69895b296d0Smrg esac 69995b296d0Smrg ;; 70095b296d0Smrg esac 70195b296d0Smrg fi 70295b296d0Smrg rm -rf conftest* 70395b296d0Smrg ;; 704e6f085baSmrg 705e6f085baSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 706e6f085baSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 707e6f085baSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 708e6f085baSmrg AC_CHECK_TOOL(AS, as, false) 709e6f085baSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 710e6f085baSmrg ;; 711e6f085baSmrg ]) 71295b296d0Smrgesac 71395b296d0Smrg 71495b296d0Smrgneed_locks="$enable_libtool_lock" 71539713583Smrg 716e6f085baSmrg])# _LT_AC_LOCK 71795b296d0Smrg 71895b296d0Smrg 719e6f085baSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 72095b296d0Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 72195b296d0Smrg# ---------------------------------------------------------------- 72295b296d0Smrg# Check whether the given compiler option works 723e6f085baSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 724e6f085baSmrg[AC_REQUIRE([LT_AC_PROG_SED]) 72595b296d0SmrgAC_CACHE_CHECK([$1], [$2], 72695b296d0Smrg [$2=no 727e6f085baSmrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 728ff89ac2bSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 72995b296d0Smrg lt_compiler_flag="$3" 73095b296d0Smrg # Insert the option either (1) after the last *FLAGS variable, or 73195b296d0Smrg # (2) before a word containing "conftest.", or (3) at the end. 73295b296d0Smrg # Note that $ac_compile itself does not contain backslashes and begins 73395b296d0Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 73495b296d0Smrg # The option is referenced via a variable to avoid confusing sed. 73595b296d0Smrg lt_compile=`echo "$ac_compile" | $SED \ 73695b296d0Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 73795b296d0Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 73895b296d0Smrg -e 's:$: $lt_compiler_flag:'` 73995b296d0Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 74095b296d0Smrg (eval "$lt_compile" 2>conftest.err) 74195b296d0Smrg ac_status=$? 74295b296d0Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 74395b296d0Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 74495b296d0Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 74595b296d0Smrg # The compiler can only warn and ignore the option if not recognized 74695b296d0Smrg # So say no if there are warnings other than the usual output. 747e6f085baSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 74895b296d0Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 74995b296d0Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 75095b296d0Smrg $2=yes 75195b296d0Smrg fi 75295b296d0Smrg fi 753e6f085baSmrg $rm conftest* 75495b296d0Smrg]) 75595b296d0Smrg 75695b296d0Smrgif test x"[$]$2" = xyes; then 757e6f085baSmrg ifelse([$5], , :, [$5]) 75895b296d0Smrgelse 759e6f085baSmrg ifelse([$6], , :, [$6]) 76095b296d0Smrgfi 761e6f085baSmrg])# AC_LIBTOOL_COMPILER_OPTION 76295b296d0Smrg 76339713583Smrg 764e6f085baSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 765e6f085baSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 766e6f085baSmrg# ------------------------------------------------------------ 767e6f085baSmrg# Check whether the given compiler option works 768e6f085baSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 769e6f085baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 770ff89ac2bSmrgAC_CACHE_CHECK([$1], [$2], 77195b296d0Smrg [$2=no 77295b296d0Smrg save_LDFLAGS="$LDFLAGS" 77395b296d0Smrg LDFLAGS="$LDFLAGS $3" 774ff89ac2bSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 77595b296d0Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 77695b296d0Smrg # The linker can only warn and ignore the option if not recognized 77795b296d0Smrg # So say no if there are warnings 77895b296d0Smrg if test -s conftest.err; then 77995b296d0Smrg # Append any errors to the config.log. 78095b296d0Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 781e6f085baSmrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 78295b296d0Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 78395b296d0Smrg if diff conftest.exp conftest.er2 >/dev/null; then 78495b296d0Smrg $2=yes 78595b296d0Smrg fi 78695b296d0Smrg else 78795b296d0Smrg $2=yes 78895b296d0Smrg fi 78995b296d0Smrg fi 790e6f085baSmrg $rm -r conftest* 79195b296d0Smrg LDFLAGS="$save_LDFLAGS" 79295b296d0Smrg]) 79395b296d0Smrg 79495b296d0Smrgif test x"[$]$2" = xyes; then 795e6f085baSmrg ifelse([$4], , :, [$4]) 79695b296d0Smrgelse 797e6f085baSmrg ifelse([$5], , :, [$5]) 79895b296d0Smrgfi 799e6f085baSmrg])# AC_LIBTOOL_LINKER_OPTION 80095b296d0Smrg 80195b296d0Smrg 802e6f085baSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 803e6f085baSmrg# -------------------------- 804e6f085baSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 805e6f085baSmrg[# find the maximum length of command line arguments 80695b296d0SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 80795b296d0SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 80895b296d0Smrg i=0 80995b296d0Smrg teststring="ABCD" 81095b296d0Smrg 81195b296d0Smrg case $build_os in 81295b296d0Smrg msdosdjgpp*) 81395b296d0Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 81495b296d0Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 81595b296d0Smrg # during glob expansion). Even if it were fixed, the result of this 81695b296d0Smrg # check would be larger than it should be. 81795b296d0Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 81895b296d0Smrg ;; 81995b296d0Smrg 82095b296d0Smrg gnu*) 82195b296d0Smrg # Under GNU Hurd, this test is not required because there is 82295b296d0Smrg # no limit to the length of command line arguments. 82395b296d0Smrg # Libtool will interpret -1 as no limit whatsoever 82495b296d0Smrg lt_cv_sys_max_cmd_len=-1; 82595b296d0Smrg ;; 82695b296d0Smrg 827e6f085baSmrg cygwin* | mingw*) 82895b296d0Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 82995b296d0Smrg # about 5 minutes as the teststring grows exponentially. 83095b296d0Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 83195b296d0Smrg # you end up with a "frozen" computer, even though with patience 83295b296d0Smrg # the test eventually succeeds (with a max line length of 256k). 83395b296d0Smrg # Instead, let's just punt: use the minimum linelength reported by 83495b296d0Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 83595b296d0Smrg lt_cv_sys_max_cmd_len=8192; 83695b296d0Smrg ;; 83795b296d0Smrg 83895b296d0Smrg amigaos*) 83995b296d0Smrg # On AmigaOS with pdksh, this test takes hours, literally. 84095b296d0Smrg # So we just punt and use a minimum line length of 8192. 84195b296d0Smrg lt_cv_sys_max_cmd_len=8192; 84295b296d0Smrg ;; 84395b296d0Smrg 84495b296d0Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 84595b296d0Smrg # This has been around since 386BSD, at least. Likely further. 84695b296d0Smrg if test -x /sbin/sysctl; then 84795b296d0Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 84895b296d0Smrg elif test -x /usr/sbin/sysctl; then 84995b296d0Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 85095b296d0Smrg else 85195b296d0Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 85295b296d0Smrg fi 85395b296d0Smrg # And add a safety zone 85495b296d0Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 85595b296d0Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 85695b296d0Smrg ;; 85795b296d0Smrg 85895b296d0Smrg interix*) 85995b296d0Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 86095b296d0Smrg lt_cv_sys_max_cmd_len=196608 86195b296d0Smrg ;; 86295b296d0Smrg 86395b296d0Smrg osf*) 86495b296d0Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 86595b296d0Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 86695b296d0Smrg # nice to cause kernel panics so lets avoid the loop below. 86795b296d0Smrg # First set a reasonable default. 86895b296d0Smrg lt_cv_sys_max_cmd_len=16384 86995b296d0Smrg # 87095b296d0Smrg if test -x /sbin/sysconfig; then 87195b296d0Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 87295b296d0Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 87395b296d0Smrg esac 87495b296d0Smrg fi 87595b296d0Smrg ;; 87695b296d0Smrg sco3.2v5*) 87795b296d0Smrg lt_cv_sys_max_cmd_len=102400 87895b296d0Smrg ;; 87995b296d0Smrg sysv5* | sco5v6* | sysv4.2uw2*) 88095b296d0Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 88195b296d0Smrg if test -n "$kargmax"; then 882e6f085baSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 88395b296d0Smrg else 88495b296d0Smrg lt_cv_sys_max_cmd_len=32768 88595b296d0Smrg fi 88695b296d0Smrg ;; 88795b296d0Smrg *) 888ff89ac2bSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 889ff89ac2bSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 890ff89ac2bSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 891ff89ac2bSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 892ff89ac2bSmrg else 893ff89ac2bSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 894e6f085baSmrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 895e6f085baSmrg = "XX$teststring") >/dev/null 2>&1 && 896e6f085baSmrg new_result=`expr "X$teststring" : ".*" 2>&1` && 897e6f085baSmrg lt_cv_sys_max_cmd_len=$new_result && 898ff89ac2bSmrg test $i != 17 # 1/2 MB should be enough 899ff89ac2bSmrg do 900ff89ac2bSmrg i=`expr $i + 1` 901ff89ac2bSmrg teststring=$teststring$teststring 902ff89ac2bSmrg done 903ff89ac2bSmrg teststring= 904e6f085baSmrg # Add a significant safety factor because C++ compilers can tack on massive 905e6f085baSmrg # amounts of additional arguments before passing them to the linker. 906e6f085baSmrg # It appears as though 1/2 is a usable value. 907ff89ac2bSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 908ff89ac2bSmrg fi 90995b296d0Smrg ;; 91095b296d0Smrg esac 91195b296d0Smrg]) 91295b296d0Smrgif test -n $lt_cv_sys_max_cmd_len ; then 91395b296d0Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 91495b296d0Smrgelse 91595b296d0Smrg AC_MSG_RESULT(none) 91695b296d0Smrgfi 917e6f085baSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 91895b296d0Smrg 91995b296d0Smrg 920e6f085baSmrg# _LT_AC_CHECK_DLFCN 921e6f085baSmrg# ------------------ 922e6f085baSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 923e6f085baSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl 924e6f085baSmrg])# _LT_AC_CHECK_DLFCN 92595b296d0Smrg 92695b296d0Smrg 927e6f085baSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 928e6f085baSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 929e6f085baSmrg# --------------------------------------------------------------------- 930e6f085baSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 931e6f085baSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 93295b296d0Smrgif test "$cross_compiling" = yes; then : 93395b296d0Smrg [$4] 93495b296d0Smrgelse 93595b296d0Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 93695b296d0Smrg lt_status=$lt_dlunknown 937e6f085baSmrg cat > conftest.$ac_ext <<EOF 93895b296d0Smrg[#line __oline__ "configure" 93995b296d0Smrg#include "confdefs.h" 94095b296d0Smrg 94195b296d0Smrg#if HAVE_DLFCN_H 94295b296d0Smrg#include <dlfcn.h> 94395b296d0Smrg#endif 94495b296d0Smrg 94595b296d0Smrg#include <stdio.h> 94695b296d0Smrg 94795b296d0Smrg#ifdef RTLD_GLOBAL 94895b296d0Smrg# define LT_DLGLOBAL RTLD_GLOBAL 94995b296d0Smrg#else 95095b296d0Smrg# ifdef DL_GLOBAL 95195b296d0Smrg# define LT_DLGLOBAL DL_GLOBAL 95295b296d0Smrg# else 95395b296d0Smrg# define LT_DLGLOBAL 0 95495b296d0Smrg# endif 95595b296d0Smrg#endif 95695b296d0Smrg 95795b296d0Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 95895b296d0Smrg find out it does not work in some platform. */ 95995b296d0Smrg#ifndef LT_DLLAZY_OR_NOW 96095b296d0Smrg# ifdef RTLD_LAZY 96195b296d0Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 96295b296d0Smrg# else 96395b296d0Smrg# ifdef DL_LAZY 96495b296d0Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 96595b296d0Smrg# else 96695b296d0Smrg# ifdef RTLD_NOW 96795b296d0Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 96895b296d0Smrg# else 96995b296d0Smrg# ifdef DL_NOW 97095b296d0Smrg# define LT_DLLAZY_OR_NOW DL_NOW 97195b296d0Smrg# else 97295b296d0Smrg# define LT_DLLAZY_OR_NOW 0 97395b296d0Smrg# endif 97495b296d0Smrg# endif 97595b296d0Smrg# endif 97695b296d0Smrg# endif 97795b296d0Smrg#endif 97895b296d0Smrg 979e6f085baSmrg#ifdef __cplusplus 980e6f085baSmrgextern "C" void exit (int); 981e6f085baSmrg#endif 982e6f085baSmrg 98395b296d0Smrgvoid fnord() { int i=42;} 98495b296d0Smrgint main () 98595b296d0Smrg{ 98695b296d0Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 98795b296d0Smrg int status = $lt_dlunknown; 98895b296d0Smrg 98995b296d0Smrg if (self) 99095b296d0Smrg { 99195b296d0Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 99295b296d0Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 99395b296d0Smrg /* dlclose (self); */ 99495b296d0Smrg } 99595b296d0Smrg else 99695b296d0Smrg puts (dlerror ()); 99795b296d0Smrg 998e6f085baSmrg exit (status); 99995b296d0Smrg}] 1000e6f085baSmrgEOF 100195b296d0Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 100295b296d0Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 100395b296d0Smrg lt_status=$? 100495b296d0Smrg case x$lt_status in 100595b296d0Smrg x$lt_dlno_uscore) $1 ;; 100695b296d0Smrg x$lt_dlneed_uscore) $2 ;; 100795b296d0Smrg x$lt_dlunknown|x*) $3 ;; 100895b296d0Smrg esac 100995b296d0Smrg else : 101095b296d0Smrg # compilation failed 101195b296d0Smrg $3 101295b296d0Smrg fi 101395b296d0Smrgfi 101495b296d0Smrgrm -fr conftest* 1015e6f085baSmrg])# _LT_AC_TRY_DLOPEN_SELF 101695b296d0Smrg 101795b296d0Smrg 1018e6f085baSmrg# AC_LIBTOOL_DLOPEN_SELF 1019e6f085baSmrg# ---------------------- 1020e6f085baSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 1021e6f085baSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 102295b296d0Smrgif test "x$enable_dlopen" != xyes; then 102395b296d0Smrg enable_dlopen=unknown 102495b296d0Smrg enable_dlopen_self=unknown 102595b296d0Smrg enable_dlopen_self_static=unknown 102695b296d0Smrgelse 102795b296d0Smrg lt_cv_dlopen=no 102895b296d0Smrg lt_cv_dlopen_libs= 102995b296d0Smrg 103095b296d0Smrg case $host_os in 103195b296d0Smrg beos*) 103295b296d0Smrg lt_cv_dlopen="load_add_on" 103395b296d0Smrg lt_cv_dlopen_libs= 103495b296d0Smrg lt_cv_dlopen_self=yes 103595b296d0Smrg ;; 103695b296d0Smrg 1037e6f085baSmrg mingw* | pw32*) 103895b296d0Smrg lt_cv_dlopen="LoadLibrary" 103995b296d0Smrg lt_cv_dlopen_libs= 1040e6f085baSmrg ;; 104195b296d0Smrg 104295b296d0Smrg cygwin*) 104395b296d0Smrg lt_cv_dlopen="dlopen" 104495b296d0Smrg lt_cv_dlopen_libs= 1045e6f085baSmrg ;; 104695b296d0Smrg 104795b296d0Smrg darwin*) 104895b296d0Smrg # if libdl is installed we need to link against it 104995b296d0Smrg AC_CHECK_LIB([dl], [dlopen], 105095b296d0Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 105195b296d0Smrg lt_cv_dlopen="dyld" 105295b296d0Smrg lt_cv_dlopen_libs= 105395b296d0Smrg lt_cv_dlopen_self=yes 105495b296d0Smrg ]) 1055e6f085baSmrg ;; 105695b296d0Smrg 105795b296d0Smrg *) 105895b296d0Smrg AC_CHECK_FUNC([shl_load], 105995b296d0Smrg [lt_cv_dlopen="shl_load"], 106095b296d0Smrg [AC_CHECK_LIB([dld], [shl_load], 1061ff89ac2bSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 106295b296d0Smrg [AC_CHECK_FUNC([dlopen], 106395b296d0Smrg [lt_cv_dlopen="dlopen"], 106495b296d0Smrg [AC_CHECK_LIB([dl], [dlopen], 106595b296d0Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 106695b296d0Smrg [AC_CHECK_LIB([svld], [dlopen], 106795b296d0Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 106895b296d0Smrg [AC_CHECK_LIB([dld], [dld_link], 1069ff89ac2bSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 107095b296d0Smrg ]) 107195b296d0Smrg ]) 107295b296d0Smrg ]) 107395b296d0Smrg ]) 107495b296d0Smrg ]) 107595b296d0Smrg ;; 107695b296d0Smrg esac 107795b296d0Smrg 107895b296d0Smrg if test "x$lt_cv_dlopen" != xno; then 107995b296d0Smrg enable_dlopen=yes 108095b296d0Smrg else 108195b296d0Smrg enable_dlopen=no 108295b296d0Smrg fi 108395b296d0Smrg 108495b296d0Smrg case $lt_cv_dlopen in 108595b296d0Smrg dlopen) 108695b296d0Smrg save_CPPFLAGS="$CPPFLAGS" 108795b296d0Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 108895b296d0Smrg 108995b296d0Smrg save_LDFLAGS="$LDFLAGS" 109095b296d0Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 109195b296d0Smrg 109295b296d0Smrg save_LIBS="$LIBS" 109395b296d0Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 109495b296d0Smrg 109595b296d0Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 109695b296d0Smrg lt_cv_dlopen_self, [dnl 1097e6f085baSmrg _LT_AC_TRY_DLOPEN_SELF( 109895b296d0Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 109995b296d0Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 110095b296d0Smrg ]) 110195b296d0Smrg 110295b296d0Smrg if test "x$lt_cv_dlopen_self" = xyes; then 110395b296d0Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 110495b296d0Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1105e6f085baSmrg lt_cv_dlopen_self_static, [dnl 1106e6f085baSmrg _LT_AC_TRY_DLOPEN_SELF( 110795b296d0Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 110895b296d0Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 110995b296d0Smrg ]) 111095b296d0Smrg fi 111195b296d0Smrg 111295b296d0Smrg CPPFLAGS="$save_CPPFLAGS" 111395b296d0Smrg LDFLAGS="$save_LDFLAGS" 111495b296d0Smrg LIBS="$save_LIBS" 111595b296d0Smrg ;; 111695b296d0Smrg esac 111795b296d0Smrg 111895b296d0Smrg case $lt_cv_dlopen_self in 111995b296d0Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 112095b296d0Smrg *) enable_dlopen_self=unknown ;; 112195b296d0Smrg esac 112295b296d0Smrg 112395b296d0Smrg case $lt_cv_dlopen_self_static in 112495b296d0Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 112595b296d0Smrg *) enable_dlopen_self_static=unknown ;; 112695b296d0Smrg esac 112795b296d0Smrgfi 1128e6f085baSmrg])# AC_LIBTOOL_DLOPEN_SELF 112995b296d0Smrg 113039713583Smrg 1131e6f085baSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 1132e6f085baSmrg# --------------------------------- 1133e6f085baSmrg# Check to see if options -c and -o are simultaneously supported by compiler 1134e6f085baSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 1135e6f085baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1136e6f085baSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 113795b296d0SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1138e6f085baSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1139e6f085baSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1140e6f085baSmrg $rm -r conftest 2>/dev/null 114195b296d0Smrg mkdir conftest 114295b296d0Smrg cd conftest 114395b296d0Smrg mkdir out 1144ff89ac2bSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 114595b296d0Smrg 114695b296d0Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 114795b296d0Smrg # Insert the option either (1) after the last *FLAGS variable, or 114895b296d0Smrg # (2) before a word containing "conftest.", or (3) at the end. 114995b296d0Smrg # Note that $ac_compile itself does not contain backslashes and begins 115095b296d0Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 115195b296d0Smrg lt_compile=`echo "$ac_compile" | $SED \ 115295b296d0Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 115395b296d0Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 115495b296d0Smrg -e 's:$: $lt_compiler_flag:'` 115595b296d0Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 115695b296d0Smrg (eval "$lt_compile" 2>out/conftest.err) 115795b296d0Smrg ac_status=$? 115895b296d0Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 115995b296d0Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 116095b296d0Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 116195b296d0Smrg then 116295b296d0Smrg # The compiler can only warn and ignore the option if not recognized 116395b296d0Smrg # So say no if there are warnings 1164e6f085baSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 116595b296d0Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 116695b296d0Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1167e6f085baSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 116895b296d0Smrg fi 116995b296d0Smrg fi 117095b296d0Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1171e6f085baSmrg $rm conftest* 117295b296d0Smrg # SGI C++ compiler will create directory out/ii_files/ for 117395b296d0Smrg # template instantiation 1174e6f085baSmrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1175e6f085baSmrg $rm out/* && rmdir out 117695b296d0Smrg cd .. 1177e6f085baSmrg rmdir conftest 1178e6f085baSmrg $rm conftest* 117995b296d0Smrg]) 1180e6f085baSmrg])# AC_LIBTOOL_PROG_CC_C_O 118195b296d0Smrg 118295b296d0Smrg 1183e6f085baSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1184e6f085baSmrg# ----------------------------------------- 118595b296d0Smrg# Check to see if we can do hard links to lock some files if needed 1186e6f085baSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1187e6f085baSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl 118895b296d0Smrg 118995b296d0Smrghard_links="nottested" 1190e6f085baSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 119195b296d0Smrg # do not overwrite the value of need_locks provided by the user 119295b296d0Smrg AC_MSG_CHECKING([if we can lock with hard links]) 119395b296d0Smrg hard_links=yes 1194e6f085baSmrg $rm conftest* 119595b296d0Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 119695b296d0Smrg touch conftest.a 119795b296d0Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 119895b296d0Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 119995b296d0Smrg AC_MSG_RESULT([$hard_links]) 120095b296d0Smrg if test "$hard_links" = no; then 120195b296d0Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 120295b296d0Smrg need_locks=warn 120395b296d0Smrg fi 120495b296d0Smrgelse 120595b296d0Smrg need_locks=no 120695b296d0Smrgfi 1207e6f085baSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 120895b296d0Smrg 120995b296d0Smrg 1210e6f085baSmrg# AC_LIBTOOL_OBJDIR 1211e6f085baSmrg# ----------------- 1212e6f085baSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 121395b296d0Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 121495b296d0Smrg[rm -f .libs 2>/dev/null 121595b296d0Smrgmkdir .libs 2>/dev/null 121695b296d0Smrgif test -d .libs; then 121795b296d0Smrg lt_cv_objdir=.libs 121895b296d0Smrgelse 121995b296d0Smrg # MS-DOS does not allow filenames that begin with a dot. 122095b296d0Smrg lt_cv_objdir=_libs 122195b296d0Smrgfi 122295b296d0Smrgrmdir .libs 2>/dev/null]) 122395b296d0Smrgobjdir=$lt_cv_objdir 1224e6f085baSmrg])# AC_LIBTOOL_OBJDIR 122595b296d0Smrg 122695b296d0Smrg 1227e6f085baSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1228e6f085baSmrg# ---------------------------------------------- 122995b296d0Smrg# Check hardcoding attributes. 1230e6f085baSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 123195b296d0Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1232e6f085baSmrg_LT_AC_TAGVAR(hardcode_action, $1)= 1233e6f085baSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1234e6f085baSmrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1235e6f085baSmrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 123695b296d0Smrg 1237e6f085baSmrg # We can hardcode non-existant directories. 1238e6f085baSmrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 123995b296d0Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 124095b296d0Smrg # have to relink, otherwise we might link with an installed library 124195b296d0Smrg # when we should be linking with a yet-to-be-installed one 1242e6f085baSmrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1243e6f085baSmrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 124495b296d0Smrg # Linking always hardcodes the temporary library directory. 1245e6f085baSmrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 124695b296d0Smrg else 124795b296d0Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1248e6f085baSmrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 124995b296d0Smrg fi 125095b296d0Smrgelse 125195b296d0Smrg # We cannot hardcode anything, or else we can only hardcode existing 125295b296d0Smrg # directories. 1253e6f085baSmrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 125495b296d0Smrgfi 1255e6f085baSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 125695b296d0Smrg 1257e6f085baSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 125895b296d0Smrg # Fast installation is not supported 125995b296d0Smrg enable_fast_install=no 126095b296d0Smrgelif test "$shlibpath_overrides_runpath" = yes || 126195b296d0Smrg test "$enable_shared" = no; then 126295b296d0Smrg # Fast installation is not necessary 126395b296d0Smrg enable_fast_install=needless 126495b296d0Smrgfi 1265e6f085baSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 126695b296d0Smrg 126795b296d0Smrg 1268e6f085baSmrg# AC_LIBTOOL_SYS_LIB_STRIP 1269e6f085baSmrg# ------------------------ 1270e6f085baSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1271e6f085baSmrg[striplib= 127295b296d0Smrgold_striplib= 127395b296d0SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 1274e6f085baSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 127595b296d0Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 127695b296d0Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 127795b296d0Smrg AC_MSG_RESULT([yes]) 127895b296d0Smrgelse 127995b296d0Smrg# FIXME - insert some real tests, host_os isn't really good enough 128095b296d0Smrg case $host_os in 1281e6f085baSmrg darwin*) 1282e6f085baSmrg if test -n "$STRIP" ; then 1283e6f085baSmrg striplib="$STRIP -x" 1284e6f085baSmrg old_striplib="$STRIP -S" 1285e6f085baSmrg AC_MSG_RESULT([yes]) 1286e6f085baSmrg else 1287e6f085baSmrg AC_MSG_RESULT([no]) 1288e6f085baSmrgfi 1289e6f085baSmrg ;; 1290e6f085baSmrg *) 1291e6f085baSmrg AC_MSG_RESULT([no]) 129295b296d0Smrg ;; 129395b296d0Smrg esac 129495b296d0Smrgfi 1295e6f085baSmrg])# AC_LIBTOOL_SYS_LIB_STRIP 129695b296d0Smrg 129795b296d0Smrg 1298e6f085baSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 129995b296d0Smrg# ----------------------------- 130095b296d0Smrg# PORTME Fill in your ld.so characteristics 1301e6f085baSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1302e6f085baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1303ff89ac2bSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 1304e6f085baSmrglibrary_names_spec= 1305e6f085baSmrglibname_spec='lib$name' 1306e6f085baSmrgsoname_spec= 1307e6f085baSmrgshrext_cmds=".so" 1308e6f085baSmrgpostinstall_cmds= 1309e6f085baSmrgpostuninstall_cmds= 1310e6f085baSmrgfinish_cmds= 1311e6f085baSmrgfinish_eval= 1312e6f085baSmrgshlibpath_var= 1313e6f085baSmrgshlibpath_overrides_runpath=unknown 1314e6f085baSmrgversion_type=none 1315e6f085baSmrgdynamic_linker="$host_os ld.so" 1316e6f085baSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 1317e6f085baSmrgm4_if($1,[],[ 131895b296d0Smrgif test "$GCC" = yes; then 1319ff89ac2bSmrg case $host_os in 1320ff89ac2bSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 1321ff89ac2bSmrg *) lt_awk_arg="/^libraries:/" ;; 1322ff89ac2bSmrg esac 1323ff89ac2bSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1324e6f085baSmrg if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 132595b296d0Smrg # if the path contains ";" then we assume it to be the separator 132695b296d0Smrg # otherwise default to the standard path separator (i.e. ":") - it is 132795b296d0Smrg # assumed that no part of a normal pathname contains ";" but that should 132895b296d0Smrg # okay in the real world where ";" in dirpaths is itself problematic. 1329e6f085baSmrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 133095b296d0Smrg else 1331e6f085baSmrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 133295b296d0Smrg fi 1333ff89ac2bSmrg # Ok, now we have the path, separated by spaces, we can step through it 1334ff89ac2bSmrg # and add multilib dir if necessary. 1335ff89ac2bSmrg lt_tmp_lt_search_path_spec= 1336ff89ac2bSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 1337ff89ac2bSmrg for lt_sys_path in $lt_search_path_spec; do 1338ff89ac2bSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 1339ff89ac2bSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 1340ff89ac2bSmrg else 1341ff89ac2bSmrg test -d "$lt_sys_path" && \ 1342ff89ac2bSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 1343ff89ac2bSmrg fi 1344ff89ac2bSmrg done 1345e6f085baSmrg lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 1346ff89ac2bSmrgBEGIN {RS=" "; FS="/|\n";} { 1347ff89ac2bSmrg lt_foo=""; 1348ff89ac2bSmrg lt_count=0; 1349ff89ac2bSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 1350ff89ac2bSmrg if ($lt_i != "" && $lt_i != ".") { 1351ff89ac2bSmrg if ($lt_i == "..") { 1352ff89ac2bSmrg lt_count++; 1353ff89ac2bSmrg } else { 1354ff89ac2bSmrg if (lt_count == 0) { 1355ff89ac2bSmrg lt_foo="/" $lt_i lt_foo; 1356ff89ac2bSmrg } else { 1357ff89ac2bSmrg lt_count--; 1358ff89ac2bSmrg } 1359ff89ac2bSmrg } 1360ff89ac2bSmrg } 1361ff89ac2bSmrg } 1362ff89ac2bSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 1363ff89ac2bSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 1364ff89ac2bSmrg}'` 1365e6f085baSmrg sys_lib_search_path_spec=`echo $lt_search_path_spec` 136695b296d0Smrgelse 136795b296d0Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 1368ff89ac2bSmrgfi]) 136995b296d0Smrgneed_lib_prefix=unknown 137095b296d0Smrghardcode_into_libs=no 137195b296d0Smrg 137295b296d0Smrg# when you set need_version to no, make sure it does not cause -set_version 137395b296d0Smrg# flags to be left without arguments 137495b296d0Smrgneed_version=unknown 137595b296d0Smrg 137695b296d0Smrgcase $host_os in 137795b296d0Smrgaix3*) 137895b296d0Smrg version_type=linux 137995b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 138095b296d0Smrg shlibpath_var=LIBPATH 138195b296d0Smrg 138295b296d0Smrg # AIX 3 has no versioning support, so we append a major version to the name. 138395b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 138495b296d0Smrg ;; 138595b296d0Smrg 1386ff89ac2bSmrgaix[[4-9]]*) 138795b296d0Smrg version_type=linux 138895b296d0Smrg need_lib_prefix=no 138995b296d0Smrg need_version=no 139095b296d0Smrg hardcode_into_libs=yes 139195b296d0Smrg if test "$host_cpu" = ia64; then 139295b296d0Smrg # AIX 5 supports IA64 139395b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 139495b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 139595b296d0Smrg else 139695b296d0Smrg # With GCC up to 2.95.x, collect2 would create an import file 139795b296d0Smrg # for dependence libraries. The import file would start with 139895b296d0Smrg # the line `#! .'. This would cause the generated library to 139995b296d0Smrg # depend on `.', always an invalid library. This was fixed in 140095b296d0Smrg # development snapshots of GCC prior to 3.0. 140195b296d0Smrg case $host_os in 140295b296d0Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 140395b296d0Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 140495b296d0Smrg echo ' yes ' 1405e6f085baSmrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 140695b296d0Smrg : 140795b296d0Smrg else 140895b296d0Smrg can_build_shared=no 140995b296d0Smrg fi 141095b296d0Smrg ;; 141195b296d0Smrg esac 141295b296d0Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 141395b296d0Smrg # soname into executable. Probably we can add versioning support to 141495b296d0Smrg # collect2, so additional links can be useful in future. 141595b296d0Smrg if test "$aix_use_runtimelinking" = yes; then 141695b296d0Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 141795b296d0Smrg # instead of lib<name>.a to let people know that these are not 141895b296d0Smrg # typical AIX shared libraries. 141995b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 142095b296d0Smrg else 142195b296d0Smrg # We preserve .a as extension for shared libraries through AIX4.2 142295b296d0Smrg # and later when we are not doing run time linking. 142395b296d0Smrg library_names_spec='${libname}${release}.a $libname.a' 142495b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 142595b296d0Smrg fi 142695b296d0Smrg shlibpath_var=LIBPATH 142795b296d0Smrg fi 142895b296d0Smrg ;; 142995b296d0Smrg 143095b296d0Smrgamigaos*) 1431e6f085baSmrg library_names_spec='$libname.ixlibrary $libname.a' 1432e6f085baSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 1433e6f085baSmrg 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' 143495b296d0Smrg ;; 143595b296d0Smrg 143695b296d0Smrgbeos*) 143795b296d0Smrg library_names_spec='${libname}${shared_ext}' 143895b296d0Smrg dynamic_linker="$host_os ld.so" 143995b296d0Smrg shlibpath_var=LIBRARY_PATH 144095b296d0Smrg ;; 144195b296d0Smrg 144295b296d0Smrgbsdi[[45]]*) 144395b296d0Smrg version_type=linux 144495b296d0Smrg need_version=no 144595b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 144695b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 144795b296d0Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 144895b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 144995b296d0Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 145095b296d0Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 145195b296d0Smrg # the default ld.so.conf also contains /usr/contrib/lib and 145295b296d0Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 145395b296d0Smrg # libtool to hard-code these into programs 145495b296d0Smrg ;; 145595b296d0Smrg 1456e6f085baSmrgcygwin* | mingw* | pw32*) 145795b296d0Smrg version_type=windows 145895b296d0Smrg shrext_cmds=".dll" 145995b296d0Smrg need_version=no 146095b296d0Smrg need_lib_prefix=no 146195b296d0Smrg 146295b296d0Smrg case $GCC,$host_os in 1463e6f085baSmrg yes,cygwin* | yes,mingw* | yes,pw32*) 146495b296d0Smrg library_names_spec='$libname.dll.a' 146595b296d0Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 146695b296d0Smrg postinstall_cmds='base_file=`basename \${file}`~ 1467e6f085baSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 146895b296d0Smrg dldir=$destdir/`dirname \$dlpath`~ 146995b296d0Smrg test -d \$dldir || mkdir -p \$dldir~ 147095b296d0Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 1471e6f085baSmrg chmod a+x \$dldir/$dlname' 147295b296d0Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 147395b296d0Smrg dlpath=$dir/\$dldll~ 1474e6f085baSmrg $rm \$dlpath' 147595b296d0Smrg shlibpath_overrides_runpath=yes 147695b296d0Smrg 147795b296d0Smrg case $host_os in 147895b296d0Smrg cygwin*) 147995b296d0Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 148095b296d0Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 148195b296d0Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 148295b296d0Smrg ;; 1483e6f085baSmrg mingw*) 148495b296d0Smrg # MinGW DLLs use traditional 'lib' prefix 148595b296d0Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1486e6f085baSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1487e6f085baSmrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 148895b296d0Smrg # It is most probably a Windows format PATH printed by 148995b296d0Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 149095b296d0Smrg # path with ; separators, and with drive letters. We can handle the 149195b296d0Smrg # drive letters (cygwin fileutils understands them), so leave them, 149295b296d0Smrg # especially as we might pass files found there to a mingw objdump, 149395b296d0Smrg # which wouldn't understand a cygwinified path. Ahh. 1494e6f085baSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 149595b296d0Smrg else 1496e6f085baSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 149795b296d0Smrg fi 149895b296d0Smrg ;; 149995b296d0Smrg pw32*) 150095b296d0Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 150195b296d0Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 150295b296d0Smrg ;; 150395b296d0Smrg esac 150495b296d0Smrg ;; 150595b296d0Smrg 150695b296d0Smrg *) 150795b296d0Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 150895b296d0Smrg ;; 150995b296d0Smrg esac 151095b296d0Smrg dynamic_linker='Win32 ld.exe' 151195b296d0Smrg # FIXME: first we should search . and the directory the executable is in 151295b296d0Smrg shlibpath_var=PATH 151395b296d0Smrg ;; 151495b296d0Smrg 151595b296d0Smrgdarwin* | rhapsody*) 151695b296d0Smrg dynamic_linker="$host_os dyld" 151795b296d0Smrg version_type=darwin 151895b296d0Smrg need_lib_prefix=no 151995b296d0Smrg need_version=no 1520e6f085baSmrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 152195b296d0Smrg soname_spec='${libname}${release}${major}$shared_ext' 152295b296d0Smrg shlibpath_overrides_runpath=yes 152395b296d0Smrg shlibpath_var=DYLD_LIBRARY_PATH 152495b296d0Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 1525e6f085baSmrg m4_if([$1], [],[ 1526e6f085baSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 152795b296d0Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 152895b296d0Smrg ;; 152995b296d0Smrg 153095b296d0Smrgdgux*) 153195b296d0Smrg version_type=linux 153295b296d0Smrg need_lib_prefix=no 153395b296d0Smrg need_version=no 153495b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 153595b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 153695b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 153795b296d0Smrg ;; 153895b296d0Smrg 153995b296d0Smrgfreebsd1*) 154095b296d0Smrg dynamic_linker=no 154195b296d0Smrg ;; 154295b296d0Smrg 154395b296d0Smrgfreebsd* | dragonfly*) 154495b296d0Smrg # DragonFly does not have aout. When/if they implement a new 154595b296d0Smrg # versioning mechanism, adjust this. 154695b296d0Smrg if test -x /usr/bin/objformat; then 154795b296d0Smrg objformat=`/usr/bin/objformat` 154895b296d0Smrg else 154995b296d0Smrg case $host_os in 155095b296d0Smrg freebsd[[123]]*) objformat=aout ;; 155195b296d0Smrg *) objformat=elf ;; 155295b296d0Smrg esac 155395b296d0Smrg fi 1554ff89ac2bSmrg version_type=freebsd-$objformat 155595b296d0Smrg case $version_type in 155695b296d0Smrg freebsd-elf*) 155795b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 155895b296d0Smrg need_version=no 155995b296d0Smrg need_lib_prefix=no 156095b296d0Smrg ;; 156195b296d0Smrg freebsd-*) 156295b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 156395b296d0Smrg need_version=yes 156495b296d0Smrg ;; 156595b296d0Smrg esac 156695b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 156795b296d0Smrg case $host_os in 156895b296d0Smrg freebsd2*) 156995b296d0Smrg shlibpath_overrides_runpath=yes 157095b296d0Smrg ;; 157195b296d0Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 157295b296d0Smrg shlibpath_overrides_runpath=yes 157395b296d0Smrg hardcode_into_libs=yes 157495b296d0Smrg ;; 157595b296d0Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 157695b296d0Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 157795b296d0Smrg shlibpath_overrides_runpath=no 157895b296d0Smrg hardcode_into_libs=yes 157995b296d0Smrg ;; 1580ff89ac2bSmrg *) # from 4.6 on, and DragonFly 158195b296d0Smrg shlibpath_overrides_runpath=yes 158295b296d0Smrg hardcode_into_libs=yes 158395b296d0Smrg ;; 158495b296d0Smrg esac 158595b296d0Smrg ;; 158695b296d0Smrg 158795b296d0Smrggnu*) 158895b296d0Smrg version_type=linux 158995b296d0Smrg need_lib_prefix=no 159095b296d0Smrg need_version=no 159195b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 159295b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 159395b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 159495b296d0Smrg hardcode_into_libs=yes 159595b296d0Smrg ;; 159695b296d0Smrg 159795b296d0Smrghpux9* | hpux10* | hpux11*) 159895b296d0Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 159995b296d0Smrg # link against other versions. 160095b296d0Smrg version_type=sunos 160195b296d0Smrg need_lib_prefix=no 160295b296d0Smrg need_version=no 160395b296d0Smrg case $host_cpu in 160495b296d0Smrg ia64*) 160595b296d0Smrg shrext_cmds='.so' 160695b296d0Smrg hardcode_into_libs=yes 160795b296d0Smrg dynamic_linker="$host_os dld.so" 160895b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 160995b296d0Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 161095b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 161195b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 161295b296d0Smrg if test "X$HPUX_IA64_MODE" = X32; then 161395b296d0Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 161495b296d0Smrg else 161595b296d0Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 161695b296d0Smrg fi 161795b296d0Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 161895b296d0Smrg ;; 1619e6f085baSmrg hppa*64*) 1620e6f085baSmrg shrext_cmds='.sl' 1621e6f085baSmrg hardcode_into_libs=yes 1622e6f085baSmrg dynamic_linker="$host_os dld.sl" 1623e6f085baSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1624e6f085baSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1625e6f085baSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1626e6f085baSmrg soname_spec='${libname}${release}${shared_ext}$major' 1627e6f085baSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1628e6f085baSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1629e6f085baSmrg ;; 1630e6f085baSmrg *) 163195b296d0Smrg shrext_cmds='.sl' 163295b296d0Smrg dynamic_linker="$host_os dld.sl" 163395b296d0Smrg shlibpath_var=SHLIB_PATH 163495b296d0Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 163595b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 163695b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 163795b296d0Smrg ;; 163895b296d0Smrg esac 163995b296d0Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 164095b296d0Smrg postinstall_cmds='chmod 555 $lib' 164195b296d0Smrg ;; 164295b296d0Smrg 1643ff89ac2bSmrginterix[[3-9]]*) 164495b296d0Smrg version_type=linux 164595b296d0Smrg need_lib_prefix=no 164695b296d0Smrg need_version=no 164795b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 164895b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 164995b296d0Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 165095b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 165195b296d0Smrg shlibpath_overrides_runpath=no 165295b296d0Smrg hardcode_into_libs=yes 165395b296d0Smrg ;; 165495b296d0Smrg 165595b296d0Smrgirix5* | irix6* | nonstopux*) 165695b296d0Smrg case $host_os in 165795b296d0Smrg nonstopux*) version_type=nonstopux ;; 165895b296d0Smrg *) 165995b296d0Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 166095b296d0Smrg version_type=linux 166195b296d0Smrg else 166295b296d0Smrg version_type=irix 166395b296d0Smrg fi ;; 166495b296d0Smrg esac 166595b296d0Smrg need_lib_prefix=no 166695b296d0Smrg need_version=no 166795b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 166895b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 166995b296d0Smrg case $host_os in 167095b296d0Smrg irix5* | nonstopux*) 167195b296d0Smrg libsuff= shlibsuff= 167295b296d0Smrg ;; 167395b296d0Smrg *) 167495b296d0Smrg case $LD in # libtool.m4 will add one of these switches to LD 167595b296d0Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 167695b296d0Smrg libsuff= shlibsuff= libmagic=32-bit;; 167795b296d0Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 167895b296d0Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 167995b296d0Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 168095b296d0Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 168195b296d0Smrg *) libsuff= shlibsuff= libmagic=never-match;; 168295b296d0Smrg esac 168395b296d0Smrg ;; 168495b296d0Smrg esac 168595b296d0Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 168695b296d0Smrg shlibpath_overrides_runpath=no 168795b296d0Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 168895b296d0Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 168995b296d0Smrg hardcode_into_libs=yes 169095b296d0Smrg ;; 169195b296d0Smrg 169295b296d0Smrg# No shared lib support for Linux oldld, aout, or coff. 169395b296d0Smrglinux*oldld* | linux*aout* | linux*coff*) 169495b296d0Smrg dynamic_linker=no 169595b296d0Smrg ;; 169695b296d0Smrg 169795b296d0Smrg# This must be Linux ELF. 1698ff89ac2bSmrglinux* | k*bsd*-gnu) 169995b296d0Smrg version_type=linux 170095b296d0Smrg need_lib_prefix=no 170195b296d0Smrg need_version=no 170295b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 170395b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 170495b296d0Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 170595b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 170695b296d0Smrg shlibpath_overrides_runpath=no 170795b296d0Smrg # This implies no fast_install, which is unacceptable. 170895b296d0Smrg # Some rework will be needed to allow for fast_install 170995b296d0Smrg # before this can be enabled. 171095b296d0Smrg hardcode_into_libs=yes 1711e6f085baSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1712e6f085baSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 171395b296d0Smrg 171495b296d0Smrg # Append ld.so.conf contents to the search path 171595b296d0Smrg if test -f /etc/ld.so.conf; then 1716e6f085baSmrg 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' ' '` 1717ff89ac2bSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 171895b296d0Smrg fi 171995b296d0Smrg 172095b296d0Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 172195b296d0Smrg # powerpc, because MkLinux only supported shared libraries with the 172295b296d0Smrg # GNU dynamic linker. Since this was broken with cross compilers, 172395b296d0Smrg # most powerpc-linux boxes support dynamic linking these days and 172495b296d0Smrg # people can always --disable-shared, the test was removed, and we 172595b296d0Smrg # assume the GNU/Linux dynamic linker is in use. 172695b296d0Smrg dynamic_linker='GNU/Linux ld.so' 172795b296d0Smrg ;; 172895b296d0Smrg 172995b296d0Smrgnetbsd*) 173095b296d0Smrg version_type=sunos 173195b296d0Smrg need_lib_prefix=no 173295b296d0Smrg need_version=no 1733e6f085baSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 173495b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 173595b296d0Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 173695b296d0Smrg dynamic_linker='NetBSD (a.out) ld.so' 173795b296d0Smrg else 173895b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 173995b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 174095b296d0Smrg dynamic_linker='NetBSD ld.elf_so' 174195b296d0Smrg fi 174295b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 174395b296d0Smrg shlibpath_overrides_runpath=yes 174495b296d0Smrg hardcode_into_libs=yes 174595b296d0Smrg ;; 174695b296d0Smrg 174795b296d0Smrgnewsos6) 174895b296d0Smrg version_type=linux 174995b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 175095b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 175195b296d0Smrg shlibpath_overrides_runpath=yes 175295b296d0Smrg ;; 175395b296d0Smrg 1754e6f085baSmrgnto-qnx*) 1755e6f085baSmrg version_type=linux 175695b296d0Smrg need_lib_prefix=no 175795b296d0Smrg need_version=no 175895b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 175995b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 176095b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 1761e6f085baSmrg shlibpath_overrides_runpath=yes 176295b296d0Smrg ;; 176395b296d0Smrg 176495b296d0Smrgopenbsd*) 176595b296d0Smrg version_type=sunos 176695b296d0Smrg sys_lib_dlsearch_path_spec="/usr/lib" 176795b296d0Smrg need_lib_prefix=no 176895b296d0Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 176995b296d0Smrg case $host_os in 1770e6f085baSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 1771e6f085baSmrg *) need_version=no ;; 177295b296d0Smrg esac 177395b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 177495b296d0Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 177595b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 1776e6f085baSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 177795b296d0Smrg case $host_os in 177895b296d0Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 177995b296d0Smrg shlibpath_overrides_runpath=no 178095b296d0Smrg ;; 178195b296d0Smrg *) 178295b296d0Smrg shlibpath_overrides_runpath=yes 178395b296d0Smrg ;; 178495b296d0Smrg esac 178595b296d0Smrg else 178695b296d0Smrg shlibpath_overrides_runpath=yes 178795b296d0Smrg fi 178895b296d0Smrg ;; 178995b296d0Smrg 179095b296d0Smrgos2*) 179195b296d0Smrg libname_spec='$name' 179295b296d0Smrg shrext_cmds=".dll" 179395b296d0Smrg need_lib_prefix=no 179495b296d0Smrg library_names_spec='$libname${shared_ext} $libname.a' 179595b296d0Smrg dynamic_linker='OS/2 ld.exe' 179695b296d0Smrg shlibpath_var=LIBPATH 179795b296d0Smrg ;; 179895b296d0Smrg 179995b296d0Smrgosf3* | osf4* | osf5*) 180095b296d0Smrg version_type=osf 180195b296d0Smrg need_lib_prefix=no 180295b296d0Smrg need_version=no 180395b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 180495b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 180595b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 180695b296d0Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 180795b296d0Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 180895b296d0Smrg ;; 180995b296d0Smrg 1810ff89ac2bSmrgrdos*) 1811ff89ac2bSmrg dynamic_linker=no 1812ff89ac2bSmrg ;; 1813ff89ac2bSmrg 181495b296d0Smrgsolaris*) 181595b296d0Smrg version_type=linux 181695b296d0Smrg need_lib_prefix=no 181795b296d0Smrg need_version=no 181895b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 181995b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 182095b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 182195b296d0Smrg shlibpath_overrides_runpath=yes 182295b296d0Smrg hardcode_into_libs=yes 182395b296d0Smrg # ldd complains unless libraries are executable 182495b296d0Smrg postinstall_cmds='chmod +x $lib' 182595b296d0Smrg ;; 182695b296d0Smrg 182795b296d0Smrgsunos4*) 182895b296d0Smrg version_type=sunos 182995b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 183095b296d0Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 183195b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 183295b296d0Smrg shlibpath_overrides_runpath=yes 183395b296d0Smrg if test "$with_gnu_ld" = yes; then 183495b296d0Smrg need_lib_prefix=no 183595b296d0Smrg fi 183695b296d0Smrg need_version=yes 183795b296d0Smrg ;; 183895b296d0Smrg 183995b296d0Smrgsysv4 | sysv4.3*) 184095b296d0Smrg version_type=linux 184195b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 184295b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 184395b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 184495b296d0Smrg case $host_vendor in 184595b296d0Smrg sni) 184695b296d0Smrg shlibpath_overrides_runpath=no 184795b296d0Smrg need_lib_prefix=no 1848e6f085baSmrg export_dynamic_flag_spec='${wl}-Blargedynsym' 184995b296d0Smrg runpath_var=LD_RUN_PATH 185095b296d0Smrg ;; 185195b296d0Smrg siemens) 185295b296d0Smrg need_lib_prefix=no 185395b296d0Smrg ;; 185495b296d0Smrg motorola) 185595b296d0Smrg need_lib_prefix=no 185695b296d0Smrg need_version=no 185795b296d0Smrg shlibpath_overrides_runpath=no 185895b296d0Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 185995b296d0Smrg ;; 186095b296d0Smrg esac 186195b296d0Smrg ;; 186295b296d0Smrg 186395b296d0Smrgsysv4*MP*) 186495b296d0Smrg if test -d /usr/nec ;then 186595b296d0Smrg version_type=linux 186695b296d0Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 186795b296d0Smrg soname_spec='$libname${shared_ext}.$major' 186895b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 186995b296d0Smrg fi 187095b296d0Smrg ;; 187195b296d0Smrg 187295b296d0Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 187395b296d0Smrg version_type=freebsd-elf 187495b296d0Smrg need_lib_prefix=no 187595b296d0Smrg need_version=no 187695b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 187795b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 187895b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 187995b296d0Smrg hardcode_into_libs=yes 188095b296d0Smrg if test "$with_gnu_ld" = yes; then 188195b296d0Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 1882e6f085baSmrg shlibpath_overrides_runpath=no 188395b296d0Smrg else 188495b296d0Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 1885e6f085baSmrg shlibpath_overrides_runpath=yes 188695b296d0Smrg case $host_os in 188795b296d0Smrg sco3.2v5*) 188895b296d0Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 188995b296d0Smrg ;; 189095b296d0Smrg esac 189195b296d0Smrg fi 189295b296d0Smrg sys_lib_dlsearch_path_spec='/usr/lib' 189395b296d0Smrg ;; 189495b296d0Smrg 189595b296d0Smrguts4*) 189695b296d0Smrg version_type=linux 189795b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 189895b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 189995b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 190095b296d0Smrg ;; 190195b296d0Smrg 190295b296d0Smrg*) 190395b296d0Smrg dynamic_linker=no 190495b296d0Smrg ;; 190595b296d0Smrgesac 190695b296d0SmrgAC_MSG_RESULT([$dynamic_linker]) 190795b296d0Smrgtest "$dynamic_linker" = no && can_build_shared=no 190895b296d0Smrg 1909e6f085baSmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 1910e6f085baSmrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 1911e6f085baSmrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 1912e6f085baSmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 1913e6f085baSmrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 1914e6f085baSmrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 1915e6f085baSmrg 191695b296d0Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 191795b296d0Smrgif test "$GCC" = yes; then 191895b296d0Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 191995b296d0Smrgfi 1920e6f085baSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 192195b296d0Smrg 192295b296d0Smrg 1923e6f085baSmrg# _LT_AC_TAGCONFIG 1924e6f085baSmrg# ---------------- 1925e6f085baSmrgAC_DEFUN([_LT_AC_TAGCONFIG], 1926e6f085baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1927e6f085baSmrgAC_ARG_WITH([tags], 1928e6f085baSmrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 1929e6f085baSmrg [include additional configurations @<:@automatic@:>@])], 1930e6f085baSmrg [tagnames="$withval"]) 1931e6f085baSmrg 1932e6f085baSmrgif test -f "$ltmain" && test -n "$tagnames"; then 1933e6f085baSmrg if test ! -f "${ofile}"; then 1934e6f085baSmrg AC_MSG_WARN([output file `$ofile' does not exist]) 1935e6f085baSmrg fi 1936e6f085baSmrg 1937e6f085baSmrg if test -z "$LTCC"; then 1938e6f085baSmrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 1939e6f085baSmrg if test -z "$LTCC"; then 1940e6f085baSmrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 1941e6f085baSmrg else 1942e6f085baSmrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 1943e6f085baSmrg fi 1944e6f085baSmrg fi 1945e6f085baSmrg if test -z "$LTCFLAGS"; then 1946e6f085baSmrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 1947e6f085baSmrg fi 1948e6f085baSmrg 1949e6f085baSmrg # Extract list of available tagged configurations in $ofile. 1950e6f085baSmrg # Note that this assumes the entire list is on one line. 1951e6f085baSmrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 1952e6f085baSmrg 1953e6f085baSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1954e6f085baSmrg for tagname in $tagnames; do 1955e6f085baSmrg IFS="$lt_save_ifs" 1956e6f085baSmrg # Check whether tagname contains only valid characters 1957e6f085baSmrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 1958e6f085baSmrg "") ;; 1959e6f085baSmrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 1960e6f085baSmrg ;; 1961e6f085baSmrg esac 1962e6f085baSmrg 1963e6f085baSmrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 1964e6f085baSmrg then 1965e6f085baSmrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 1966e6f085baSmrg fi 1967e6f085baSmrg 1968e6f085baSmrg # Update the list of available tags. 1969e6f085baSmrg if test -n "$tagname"; then 1970e6f085baSmrg echo appending configuration tag \"$tagname\" to $ofile 1971e6f085baSmrg 1972e6f085baSmrg case $tagname in 1973e6f085baSmrg CXX) 1974e6f085baSmrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 1975e6f085baSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 1976e6f085baSmrg (test "X$CXX" != "Xg++"))) ; then 1977e6f085baSmrg AC_LIBTOOL_LANG_CXX_CONFIG 1978e6f085baSmrg else 1979e6f085baSmrg tagname="" 1980e6f085baSmrg fi 1981e6f085baSmrg ;; 1982e6f085baSmrg 1983e6f085baSmrg F77) 1984e6f085baSmrg if test -n "$F77" && test "X$F77" != "Xno"; then 1985e6f085baSmrg AC_LIBTOOL_LANG_F77_CONFIG 1986e6f085baSmrg else 1987e6f085baSmrg tagname="" 1988e6f085baSmrg fi 1989e6f085baSmrg ;; 1990e6f085baSmrg 1991e6f085baSmrg GCJ) 1992e6f085baSmrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 1993e6f085baSmrg AC_LIBTOOL_LANG_GCJ_CONFIG 1994e6f085baSmrg else 1995e6f085baSmrg tagname="" 1996e6f085baSmrg fi 1997e6f085baSmrg ;; 1998e6f085baSmrg 1999e6f085baSmrg RC) 2000e6f085baSmrg AC_LIBTOOL_LANG_RC_CONFIG 2001e6f085baSmrg ;; 2002e6f085baSmrg 2003e6f085baSmrg *) 2004e6f085baSmrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 2005e6f085baSmrg ;; 2006e6f085baSmrg esac 2007e6f085baSmrg 2008e6f085baSmrg # Append the new tag name to the list of available tags. 2009e6f085baSmrg if test -n "$tagname" ; then 2010e6f085baSmrg available_tags="$available_tags $tagname" 2011e6f085baSmrg fi 2012e6f085baSmrg fi 2013e6f085baSmrg done 2014e6f085baSmrg IFS="$lt_save_ifs" 2015e6f085baSmrg 2016e6f085baSmrg # Now substitute the updated list of available tags. 2017e6f085baSmrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 2018e6f085baSmrg mv "${ofile}T" "$ofile" 2019e6f085baSmrg chmod +x "$ofile" 2020e6f085baSmrg else 2021e6f085baSmrg rm -f "${ofile}T" 2022e6f085baSmrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 2023e6f085baSmrg fi 2024e6f085baSmrgfi 2025e6f085baSmrg])# _LT_AC_TAGCONFIG 2026e6f085baSmrg 2027e6f085baSmrg 2028e6f085baSmrg# AC_LIBTOOL_DLOPEN 2029e6f085baSmrg# ----------------- 2030e6f085baSmrg# enable checks for dlopen support 2031e6f085baSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 2032e6f085baSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 2033e6f085baSmrg])# AC_LIBTOOL_DLOPEN 2034e6f085baSmrg 2035e6f085baSmrg 2036e6f085baSmrg# AC_LIBTOOL_WIN32_DLL 2037e6f085baSmrg# -------------------- 2038e6f085baSmrg# declare package support for building win32 DLLs 2039e6f085baSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 2040e6f085baSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 2041e6f085baSmrg])# AC_LIBTOOL_WIN32_DLL 2042e6f085baSmrg 2043e6f085baSmrg 2044e6f085baSmrg# AC_ENABLE_SHARED([DEFAULT]) 2045e6f085baSmrg# --------------------------- 2046e6f085baSmrg# implement the --enable-shared flag 2047e6f085baSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2048e6f085baSmrgAC_DEFUN([AC_ENABLE_SHARED], 2049e6f085baSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 2050e6f085baSmrgAC_ARG_ENABLE([shared], 2051e6f085baSmrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 2052e6f085baSmrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 2053e6f085baSmrg [p=${PACKAGE-default} 2054e6f085baSmrg case $enableval in 2055e6f085baSmrg yes) enable_shared=yes ;; 2056e6f085baSmrg no) enable_shared=no ;; 2057e6f085baSmrg *) 2058e6f085baSmrg enable_shared=no 2059e6f085baSmrg # Look at the argument we got. We use all the common list separators. 2060e6f085baSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2061e6f085baSmrg for pkg in $enableval; do 2062e6f085baSmrg IFS="$lt_save_ifs" 2063e6f085baSmrg if test "X$pkg" = "X$p"; then 2064e6f085baSmrg enable_shared=yes 2065e6f085baSmrg fi 2066e6f085baSmrg done 2067e6f085baSmrg IFS="$lt_save_ifs" 2068e6f085baSmrg ;; 2069e6f085baSmrg esac], 2070e6f085baSmrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 2071e6f085baSmrg])# AC_ENABLE_SHARED 2072e6f085baSmrg 2073e6f085baSmrg 2074e6f085baSmrg# AC_DISABLE_SHARED 2075e6f085baSmrg# ----------------- 2076e6f085baSmrg# set the default shared flag to --disable-shared 2077e6f085baSmrgAC_DEFUN([AC_DISABLE_SHARED], 2078e6f085baSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2079e6f085baSmrgAC_ENABLE_SHARED(no) 2080e6f085baSmrg])# AC_DISABLE_SHARED 2081e6f085baSmrg 2082e6f085baSmrg 2083e6f085baSmrg# AC_ENABLE_STATIC([DEFAULT]) 2084e6f085baSmrg# --------------------------- 2085e6f085baSmrg# implement the --enable-static flag 2086e6f085baSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2087e6f085baSmrgAC_DEFUN([AC_ENABLE_STATIC], 2088e6f085baSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 2089e6f085baSmrgAC_ARG_ENABLE([static], 2090e6f085baSmrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 2091e6f085baSmrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 2092e6f085baSmrg [p=${PACKAGE-default} 2093e6f085baSmrg case $enableval in 2094e6f085baSmrg yes) enable_static=yes ;; 2095e6f085baSmrg no) enable_static=no ;; 2096e6f085baSmrg *) 2097e6f085baSmrg enable_static=no 2098e6f085baSmrg # Look at the argument we got. We use all the common list separators. 2099e6f085baSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2100e6f085baSmrg for pkg in $enableval; do 2101e6f085baSmrg IFS="$lt_save_ifs" 2102e6f085baSmrg if test "X$pkg" = "X$p"; then 2103e6f085baSmrg enable_static=yes 2104e6f085baSmrg fi 2105e6f085baSmrg done 2106e6f085baSmrg IFS="$lt_save_ifs" 2107e6f085baSmrg ;; 2108e6f085baSmrg esac], 2109e6f085baSmrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 2110e6f085baSmrg])# AC_ENABLE_STATIC 2111e6f085baSmrg 2112e6f085baSmrg 2113e6f085baSmrg# AC_DISABLE_STATIC 2114e6f085baSmrg# ----------------- 2115e6f085baSmrg# set the default static flag to --disable-static 2116e6f085baSmrgAC_DEFUN([AC_DISABLE_STATIC], 2117e6f085baSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2118e6f085baSmrgAC_ENABLE_STATIC(no) 2119e6f085baSmrg])# AC_DISABLE_STATIC 2120e6f085baSmrg 2121e6f085baSmrg 2122e6f085baSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 2123e6f085baSmrg# --------------------------------- 2124e6f085baSmrg# implement the --enable-fast-install flag 2125e6f085baSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2126e6f085baSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 2127e6f085baSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2128e6f085baSmrgAC_ARG_ENABLE([fast-install], 2129e6f085baSmrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2130e6f085baSmrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2131e6f085baSmrg [p=${PACKAGE-default} 2132e6f085baSmrg case $enableval in 2133e6f085baSmrg yes) enable_fast_install=yes ;; 2134e6f085baSmrg no) enable_fast_install=no ;; 2135e6f085baSmrg *) 2136e6f085baSmrg enable_fast_install=no 2137e6f085baSmrg # Look at the argument we got. We use all the common list separators. 2138e6f085baSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2139e6f085baSmrg for pkg in $enableval; do 2140e6f085baSmrg IFS="$lt_save_ifs" 2141e6f085baSmrg if test "X$pkg" = "X$p"; then 2142e6f085baSmrg enable_fast_install=yes 2143e6f085baSmrg fi 2144e6f085baSmrg done 2145e6f085baSmrg IFS="$lt_save_ifs" 2146e6f085baSmrg ;; 2147e6f085baSmrg esac], 2148e6f085baSmrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 2149e6f085baSmrg])# AC_ENABLE_FAST_INSTALL 2150e6f085baSmrg 2151e6f085baSmrg 2152e6f085baSmrg# AC_DISABLE_FAST_INSTALL 2153e6f085baSmrg# ----------------------- 2154e6f085baSmrg# set the default to --disable-fast-install 2155e6f085baSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 2156e6f085baSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2157e6f085baSmrgAC_ENABLE_FAST_INSTALL(no) 2158e6f085baSmrg])# AC_DISABLE_FAST_INSTALL 2159e6f085baSmrg 2160e6f085baSmrg 2161e6f085baSmrg# AC_LIBTOOL_PICMODE([MODE]) 2162e6f085baSmrg# -------------------------- 2163e6f085baSmrg# implement the --with-pic flag 2164e6f085baSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 2165e6f085baSmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 2166e6f085baSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2167e6f085baSmrgpic_mode=ifelse($#,1,$1,default) 2168e6f085baSmrg])# AC_LIBTOOL_PICMODE 2169e6f085baSmrg 2170e6f085baSmrg 2171e6f085baSmrg# AC_PROG_EGREP 2172e6f085baSmrg# ------------- 2173e6f085baSmrg# This is predefined starting with Autoconf 2.54, so this conditional 2174e6f085baSmrg# definition can be removed once we require Autoconf 2.54 or later. 2175e6f085baSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 2176e6f085baSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 2177e6f085baSmrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 2178e6f085baSmrg then ac_cv_prog_egrep='grep -E' 2179e6f085baSmrg else ac_cv_prog_egrep='egrep' 2180e6f085baSmrg fi]) 2181e6f085baSmrg EGREP=$ac_cv_prog_egrep 2182e6f085baSmrg AC_SUBST([EGREP]) 2183e6f085baSmrg])]) 2184e6f085baSmrg 2185e6f085baSmrg 2186e6f085baSmrg# AC_PATH_TOOL_PREFIX 2187e6f085baSmrg# ------------------- 2188e6f085baSmrg# find a file program which can recognize shared library 2189e6f085baSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 2190e6f085baSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2191e6f085baSmrgAC_MSG_CHECKING([for $1]) 2192e6f085baSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2193e6f085baSmrg[case $MAGIC_CMD in 219495b296d0Smrg[[\\/*] | ?:[\\/]*]) 219595b296d0Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 219695b296d0Smrg ;; 219795b296d0Smrg*) 219895b296d0Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 219995b296d0Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 220095b296d0Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 220195b296d0Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 220295b296d0Smrgdnl not every word. This closes a longstanding sh security hole. 2203e6f085baSmrg ac_dummy="ifelse([$2], , $PATH, [$2])" 220495b296d0Smrg for ac_dir in $ac_dummy; do 220595b296d0Smrg IFS="$lt_save_ifs" 220695b296d0Smrg test -z "$ac_dir" && ac_dir=. 220795b296d0Smrg if test -f $ac_dir/$1; then 220895b296d0Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 220995b296d0Smrg if test -n "$file_magic_test_file"; then 221095b296d0Smrg case $deplibs_check_method in 221195b296d0Smrg "file_magic "*) 221295b296d0Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 221395b296d0Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 221495b296d0Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 221595b296d0Smrg $EGREP "$file_magic_regex" > /dev/null; then 221695b296d0Smrg : 221795b296d0Smrg else 2218e6f085baSmrg cat <<EOF 1>&2 221995b296d0Smrg 222095b296d0Smrg*** Warning: the command libtool uses to detect shared libraries, 222195b296d0Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 222295b296d0Smrg*** The result is that libtool may fail to recognize shared libraries 222395b296d0Smrg*** as such. This will affect the creation of libtool libraries that 222495b296d0Smrg*** depend on shared libraries, but programs linked with such libtool 222595b296d0Smrg*** libraries will work regardless of this problem. Nevertheless, you 222695b296d0Smrg*** may want to report the problem to your system manager and/or to 222795b296d0Smrg*** bug-libtool@gnu.org 222895b296d0Smrg 2229e6f085baSmrgEOF 223095b296d0Smrg fi ;; 223195b296d0Smrg esac 223295b296d0Smrg fi 223395b296d0Smrg break 223495b296d0Smrg fi 223595b296d0Smrg done 223695b296d0Smrg IFS="$lt_save_ifs" 223795b296d0Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 223895b296d0Smrg ;; 223995b296d0Smrgesac]) 224095b296d0SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 224195b296d0Smrgif test -n "$MAGIC_CMD"; then 224295b296d0Smrg AC_MSG_RESULT($MAGIC_CMD) 224395b296d0Smrgelse 224495b296d0Smrg AC_MSG_RESULT(no) 224595b296d0Smrgfi 2246e6f085baSmrg])# AC_PATH_TOOL_PREFIX 224795b296d0Smrg 224839713583Smrg 2249e6f085baSmrg# AC_PATH_MAGIC 2250e6f085baSmrg# ------------- 2251ff89ac2bSmrg# find a file program which can recognize a shared library 2252e6f085baSmrgAC_DEFUN([AC_PATH_MAGIC], 2253e6f085baSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 225495b296d0Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 225595b296d0Smrg if test -n "$ac_tool_prefix"; then 2256e6f085baSmrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 225795b296d0Smrg else 225895b296d0Smrg MAGIC_CMD=: 225995b296d0Smrg fi 226095b296d0Smrgfi 2261e6f085baSmrg])# AC_PATH_MAGIC 226295b296d0Smrg 226395b296d0Smrg 2264e6f085baSmrg# AC_PROG_LD 226595b296d0Smrg# ---------- 226695b296d0Smrg# find the pathname to the GNU or non-GNU linker 2267e6f085baSmrgAC_DEFUN([AC_PROG_LD], 2268e6f085baSmrg[AC_ARG_WITH([gnu-ld], 2269e6f085baSmrg [AC_HELP_STRING([--with-gnu-ld], 227039713583Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 227139713583Smrg [test "$withval" = no || with_gnu_ld=yes], 2272e6f085baSmrg [with_gnu_ld=no]) 2273e6f085baSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 2274e6f085baSmrgAC_REQUIRE([AC_PROG_CC])dnl 2275e6f085baSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2276e6f085baSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 227795b296d0Smrgac_prog=ld 227895b296d0Smrgif test "$GCC" = yes; then 227995b296d0Smrg # Check if gcc -print-prog-name=ld gives a path. 228095b296d0Smrg AC_MSG_CHECKING([for ld used by $CC]) 228195b296d0Smrg case $host in 228295b296d0Smrg *-*-mingw*) 228395b296d0Smrg # gcc leaves a trailing carriage return which upsets mingw 228495b296d0Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 228595b296d0Smrg *) 228695b296d0Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 228795b296d0Smrg esac 228895b296d0Smrg case $ac_prog in 228995b296d0Smrg # Accept absolute paths. 229095b296d0Smrg [[\\/]]* | ?:[[\\/]]*) 229195b296d0Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 229295b296d0Smrg # Canonicalize the pathname of ld 2293e6f085baSmrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2294e6f085baSmrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2295e6f085baSmrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 229695b296d0Smrg done 229795b296d0Smrg test -z "$LD" && LD="$ac_prog" 229895b296d0Smrg ;; 229995b296d0Smrg "") 230095b296d0Smrg # If it fails, then pretend we aren't using GCC. 230195b296d0Smrg ac_prog=ld 230295b296d0Smrg ;; 230395b296d0Smrg *) 230495b296d0Smrg # If it is relative, then search for the first ld in PATH. 230595b296d0Smrg with_gnu_ld=unknown 230695b296d0Smrg ;; 230795b296d0Smrg esac 230895b296d0Smrgelif test "$with_gnu_ld" = yes; then 230995b296d0Smrg AC_MSG_CHECKING([for GNU ld]) 231095b296d0Smrgelse 231195b296d0Smrg AC_MSG_CHECKING([for non-GNU ld]) 231295b296d0Smrgfi 231395b296d0SmrgAC_CACHE_VAL(lt_cv_path_LD, 231495b296d0Smrg[if test -z "$LD"; then 231595b296d0Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 231695b296d0Smrg for ac_dir in $PATH; do 231795b296d0Smrg IFS="$lt_save_ifs" 231895b296d0Smrg test -z "$ac_dir" && ac_dir=. 231995b296d0Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 232095b296d0Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 232195b296d0Smrg # Check to see if the program is GNU ld. I'd rather use --version, 232295b296d0Smrg # but apparently some variants of GNU ld only accept -v. 232395b296d0Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 232495b296d0Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 232595b296d0Smrg *GNU* | *'with BFD'*) 232695b296d0Smrg test "$with_gnu_ld" != no && break 232795b296d0Smrg ;; 232895b296d0Smrg *) 232995b296d0Smrg test "$with_gnu_ld" != yes && break 233095b296d0Smrg ;; 233195b296d0Smrg esac 233295b296d0Smrg fi 233395b296d0Smrg done 233495b296d0Smrg IFS="$lt_save_ifs" 233595b296d0Smrgelse 233695b296d0Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 233795b296d0Smrgfi]) 233895b296d0SmrgLD="$lt_cv_path_LD" 233995b296d0Smrgif test -n "$LD"; then 234095b296d0Smrg AC_MSG_RESULT($LD) 234195b296d0Smrgelse 234295b296d0Smrg AC_MSG_RESULT(no) 234395b296d0Smrgfi 234495b296d0Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2345e6f085baSmrgAC_PROG_LD_GNU 2346e6f085baSmrg])# AC_PROG_LD 234795b296d0Smrg 234895b296d0Smrg 2349e6f085baSmrg# AC_PROG_LD_GNU 2350e6f085baSmrg# -------------- 2351e6f085baSmrgAC_DEFUN([AC_PROG_LD_GNU], 2352e6f085baSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2353e6f085baSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 235495b296d0Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 235595b296d0Smrgcase `$LD -v 2>&1 </dev/null` in 235695b296d0Smrg*GNU* | *'with BFD'*) 235795b296d0Smrg lt_cv_prog_gnu_ld=yes 235895b296d0Smrg ;; 235995b296d0Smrg*) 236095b296d0Smrg lt_cv_prog_gnu_ld=no 236195b296d0Smrg ;; 236295b296d0Smrgesac]) 236395b296d0Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2364e6f085baSmrg])# AC_PROG_LD_GNU 236595b296d0Smrg 236695b296d0Smrg 2367e6f085baSmrg# AC_PROG_LD_RELOAD_FLAG 2368e6f085baSmrg# ---------------------- 236995b296d0Smrg# find reload flag for linker 237095b296d0Smrg# -- PORTME Some linkers may need a different reload flag. 2371e6f085baSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 237295b296d0Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 237395b296d0Smrg lt_cv_ld_reload_flag, 237495b296d0Smrg [lt_cv_ld_reload_flag='-r']) 237595b296d0Smrgreload_flag=$lt_cv_ld_reload_flag 237695b296d0Smrgcase $reload_flag in 237795b296d0Smrg"" | " "*) ;; 237895b296d0Smrg*) reload_flag=" $reload_flag" ;; 237995b296d0Smrgesac 238095b296d0Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 238195b296d0Smrgcase $host_os in 238295b296d0Smrg darwin*) 238395b296d0Smrg if test "$GCC" = yes; then 238495b296d0Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 238595b296d0Smrg else 238695b296d0Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 238795b296d0Smrg fi 238895b296d0Smrg ;; 238995b296d0Smrgesac 2390e6f085baSmrg])# AC_PROG_LD_RELOAD_FLAG 239195b296d0Smrg 239295b296d0Smrg 2393e6f085baSmrg# AC_DEPLIBS_CHECK_METHOD 2394e6f085baSmrg# ----------------------- 239595b296d0Smrg# how to check for library dependencies 239695b296d0Smrg# -- PORTME fill in with the dynamic library characteristics 2397e6f085baSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2398e6f085baSmrg[AC_CACHE_CHECK([how to recognize dependent libraries], 239995b296d0Smrglt_cv_deplibs_check_method, 240095b296d0Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 240195b296d0Smrglt_cv_file_magic_test_file= 240295b296d0Smrglt_cv_deplibs_check_method='unknown' 240395b296d0Smrg# Need to set the preceding variable on all platforms that support 240495b296d0Smrg# interlibrary dependencies. 240595b296d0Smrg# 'none' -- dependencies not supported. 240695b296d0Smrg# `unknown' -- same as none, but documents that we really don't know. 240795b296d0Smrg# 'pass_all' -- all dependencies passed with no checks. 240895b296d0Smrg# 'test_compile' -- check by making test program. 240995b296d0Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 241095b296d0Smrg# which responds to the $file_magic_cmd with a given extended regex. 241195b296d0Smrg# If you have `file' or equivalent on your system and you're not sure 241295b296d0Smrg# whether `pass_all' will *always* work, you probably want this one. 241395b296d0Smrg 241495b296d0Smrgcase $host_os in 2415ff89ac2bSmrgaix[[4-9]]*) 241695b296d0Smrg lt_cv_deplibs_check_method=pass_all 241795b296d0Smrg ;; 241895b296d0Smrg 241995b296d0Smrgbeos*) 242095b296d0Smrg lt_cv_deplibs_check_method=pass_all 242195b296d0Smrg ;; 242295b296d0Smrg 242395b296d0Smrgbsdi[[45]]*) 242495b296d0Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 242595b296d0Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 242695b296d0Smrg lt_cv_file_magic_test_file=/shlib/libc.so 242795b296d0Smrg ;; 242895b296d0Smrg 242995b296d0Smrgcygwin*) 243095b296d0Smrg # func_win32_libid is a shell function defined in ltmain.sh 243195b296d0Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 243295b296d0Smrg lt_cv_file_magic_cmd='func_win32_libid' 243395b296d0Smrg ;; 243495b296d0Smrg 243595b296d0Smrgmingw* | pw32*) 243695b296d0Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 2437ff89ac2bSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 2438ff89ac2bSmrg # unless we find 'file', for example because we are cross-compiling. 2439ff89ac2bSmrg if ( file / ) >/dev/null 2>&1; then 2440ff89ac2bSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2441ff89ac2bSmrg lt_cv_file_magic_cmd='func_win32_libid' 2442ff89ac2bSmrg else 2443ff89ac2bSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 2444ff89ac2bSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 2445ff89ac2bSmrg fi 244695b296d0Smrg ;; 244795b296d0Smrg 244895b296d0Smrgdarwin* | rhapsody*) 244995b296d0Smrg lt_cv_deplibs_check_method=pass_all 245095b296d0Smrg ;; 245195b296d0Smrg 2452ff89ac2bSmrgfreebsd* | dragonfly*) 2453e6f085baSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 245495b296d0Smrg case $host_cpu in 245595b296d0Smrg i*86 ) 245695b296d0Smrg # Not sure whether the presence of OpenBSD here was a mistake. 245795b296d0Smrg # Let's accept both of them until this is cleared up. 245895b296d0Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 245995b296d0Smrg lt_cv_file_magic_cmd=/usr/bin/file 246095b296d0Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 246195b296d0Smrg ;; 246295b296d0Smrg esac 246395b296d0Smrg else 246495b296d0Smrg lt_cv_deplibs_check_method=pass_all 246595b296d0Smrg fi 246695b296d0Smrg ;; 246795b296d0Smrg 246895b296d0Smrggnu*) 246995b296d0Smrg lt_cv_deplibs_check_method=pass_all 247095b296d0Smrg ;; 247195b296d0Smrg 247295b296d0Smrghpux10.20* | hpux11*) 247395b296d0Smrg lt_cv_file_magic_cmd=/usr/bin/file 247495b296d0Smrg case $host_cpu in 247595b296d0Smrg ia64*) 247695b296d0Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 247795b296d0Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 247895b296d0Smrg ;; 247995b296d0Smrg hppa*64*) 248095b296d0Smrg [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]'] 248195b296d0Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 248295b296d0Smrg ;; 248395b296d0Smrg *) 248495b296d0Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 248595b296d0Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 248695b296d0Smrg ;; 248795b296d0Smrg esac 248895b296d0Smrg ;; 248995b296d0Smrg 2490ff89ac2bSmrginterix[[3-9]]*) 249195b296d0Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 249295b296d0Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 249395b296d0Smrg ;; 249495b296d0Smrg 249595b296d0Smrgirix5* | irix6* | nonstopux*) 249695b296d0Smrg case $LD in 249795b296d0Smrg *-32|*"-32 ") libmagic=32-bit;; 249895b296d0Smrg *-n32|*"-n32 ") libmagic=N32;; 249995b296d0Smrg *-64|*"-64 ") libmagic=64-bit;; 250095b296d0Smrg *) libmagic=never-match;; 250195b296d0Smrg esac 250295b296d0Smrg lt_cv_deplibs_check_method=pass_all 250395b296d0Smrg ;; 250495b296d0Smrg 250595b296d0Smrg# This must be Linux ELF. 2506ff89ac2bSmrglinux* | k*bsd*-gnu) 250795b296d0Smrg lt_cv_deplibs_check_method=pass_all 250895b296d0Smrg ;; 250995b296d0Smrg 251095b296d0Smrgnetbsd*) 2511e6f085baSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 251295b296d0Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 251395b296d0Smrg else 251495b296d0Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 251595b296d0Smrg fi 251695b296d0Smrg ;; 251795b296d0Smrg 251895b296d0Smrgnewos6*) 251995b296d0Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 252095b296d0Smrg lt_cv_file_magic_cmd=/usr/bin/file 252195b296d0Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 252295b296d0Smrg ;; 252395b296d0Smrg 2524e6f085baSmrgnto-qnx*) 2525e6f085baSmrg lt_cv_deplibs_check_method=unknown 252695b296d0Smrg ;; 252795b296d0Smrg 252895b296d0Smrgopenbsd*) 2529e6f085baSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 253095b296d0Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 253195b296d0Smrg else 253295b296d0Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 253395b296d0Smrg fi 253495b296d0Smrg ;; 253595b296d0Smrg 253695b296d0Smrgosf3* | osf4* | osf5*) 253795b296d0Smrg lt_cv_deplibs_check_method=pass_all 253895b296d0Smrg ;; 253995b296d0Smrg 2540ff89ac2bSmrgrdos*) 2541ff89ac2bSmrg lt_cv_deplibs_check_method=pass_all 2542ff89ac2bSmrg ;; 2543ff89ac2bSmrg 254495b296d0Smrgsolaris*) 254595b296d0Smrg lt_cv_deplibs_check_method=pass_all 254695b296d0Smrg ;; 254795b296d0Smrg 254895b296d0Smrgsysv4 | sysv4.3*) 254995b296d0Smrg case $host_vendor in 255095b296d0Smrg motorola) 255195b296d0Smrg 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]]' 255295b296d0Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 255395b296d0Smrg ;; 255495b296d0Smrg ncr) 255595b296d0Smrg lt_cv_deplibs_check_method=pass_all 255695b296d0Smrg ;; 255795b296d0Smrg sequent) 255895b296d0Smrg lt_cv_file_magic_cmd='/bin/file' 255995b296d0Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 256095b296d0Smrg ;; 256195b296d0Smrg sni) 256295b296d0Smrg lt_cv_file_magic_cmd='/bin/file' 256395b296d0Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 256495b296d0Smrg lt_cv_file_magic_test_file=/lib/libc.so 256595b296d0Smrg ;; 256695b296d0Smrg siemens) 256795b296d0Smrg lt_cv_deplibs_check_method=pass_all 256895b296d0Smrg ;; 256995b296d0Smrg pc) 257095b296d0Smrg lt_cv_deplibs_check_method=pass_all 257195b296d0Smrg ;; 257295b296d0Smrg esac 257395b296d0Smrg ;; 257495b296d0Smrg 2575e6f085baSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 257695b296d0Smrg lt_cv_deplibs_check_method=pass_all 257795b296d0Smrg ;; 257895b296d0Smrgesac 257995b296d0Smrg]) 258095b296d0Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 258195b296d0Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 258295b296d0Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 2583e6f085baSmrg])# AC_DEPLIBS_CHECK_METHOD 258495b296d0Smrg 258595b296d0Smrg 2586e6f085baSmrg# AC_PROG_NM 258795b296d0Smrg# ---------- 2588e6f085baSmrg# find the pathname to a BSD-compatible name lister 2589e6f085baSmrgAC_DEFUN([AC_PROG_NM], 2590e6f085baSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 259195b296d0Smrg[if test -n "$NM"; then 259295b296d0Smrg # Let the user override the test. 259395b296d0Smrg lt_cv_path_NM="$NM" 259495b296d0Smrgelse 259595b296d0Smrg lt_nm_to_check="${ac_tool_prefix}nm" 2596ff89ac2bSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 259795b296d0Smrg lt_nm_to_check="$lt_nm_to_check nm" 259895b296d0Smrg fi 259995b296d0Smrg for lt_tmp_nm in $lt_nm_to_check; do 260095b296d0Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 260195b296d0Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 260295b296d0Smrg IFS="$lt_save_ifs" 260395b296d0Smrg test -z "$ac_dir" && ac_dir=. 260495b296d0Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 260595b296d0Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 260695b296d0Smrg # Check to see if the nm accepts a BSD-compat flag. 260795b296d0Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 260895b296d0Smrg # nm: unknown option "B" ignored 260995b296d0Smrg # Tru64's nm complains that /dev/null is an invalid object file 261095b296d0Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 261195b296d0Smrg */dev/null* | *'Invalid file or object type'*) 261295b296d0Smrg lt_cv_path_NM="$tmp_nm -B" 261395b296d0Smrg break 261495b296d0Smrg ;; 261595b296d0Smrg *) 261695b296d0Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 261795b296d0Smrg */dev/null*) 261895b296d0Smrg lt_cv_path_NM="$tmp_nm -p" 261995b296d0Smrg break 262095b296d0Smrg ;; 262195b296d0Smrg *) 262295b296d0Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 262395b296d0Smrg continue # so that we can try to find one that supports BSD flags 262495b296d0Smrg ;; 262595b296d0Smrg esac 262695b296d0Smrg ;; 262795b296d0Smrg esac 262895b296d0Smrg fi 262995b296d0Smrg done 263095b296d0Smrg IFS="$lt_save_ifs" 263195b296d0Smrg done 2632e6f085baSmrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 263395b296d0Smrgfi]) 2634e6f085baSmrgNM="$lt_cv_path_NM" 2635e6f085baSmrg])# AC_PROG_NM 263695b296d0Smrg 263739713583Smrg 2638e6f085baSmrg# AC_CHECK_LIBM 2639e6f085baSmrg# ------------- 264095b296d0Smrg# check for math library 2641e6f085baSmrgAC_DEFUN([AC_CHECK_LIBM], 264295b296d0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 264395b296d0SmrgLIBM= 264495b296d0Smrgcase $host in 264595b296d0Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 264695b296d0Smrg # These system don't have libm, or don't need it 264795b296d0Smrg ;; 264895b296d0Smrg*-ncr-sysv4.3*) 264995b296d0Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 265095b296d0Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 265195b296d0Smrg ;; 265295b296d0Smrg*) 265395b296d0Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 265495b296d0Smrg ;; 265595b296d0Smrgesac 2656e6f085baSmrg])# AC_CHECK_LIBM 265795b296d0Smrg 265895b296d0Smrg 2659e6f085baSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 2660e6f085baSmrg# ----------------------------------- 2661e6f085baSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and 2662e6f085baSmrg# LTDLINCL to the include flags for the libltdl header and adds 2663e6f085baSmrg# --enable-ltdl-convenience to the configure arguments. Note that 2664e6f085baSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2665e6f085baSmrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 2666e6f085baSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 2667e6f085baSmrg# (note the single quotes!). If your package is not flat and you're not 2668e6f085baSmrg# using automake, define top_builddir and top_srcdir appropriately in 2669e6f085baSmrg# the Makefiles. 2670e6f085baSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 2671e6f085baSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2672e6f085baSmrg case $enable_ltdl_convenience in 2673e6f085baSmrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2674e6f085baSmrg "") enable_ltdl_convenience=yes 2675e6f085baSmrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2676e6f085baSmrg esac 2677e6f085baSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2678e6f085baSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2679e6f085baSmrg # For backwards non-gettext consistent compatibility... 2680e6f085baSmrg INCLTDL="$LTDLINCL" 2681e6f085baSmrg])# AC_LIBLTDL_CONVENIENCE 268295b296d0Smrg 268395b296d0Smrg 2684e6f085baSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 2685e6f085baSmrg# ----------------------------------- 2686e6f085baSmrg# sets LIBLTDL to the link flags for the libltdl installable library and 2687e6f085baSmrg# LTDLINCL to the include flags for the libltdl header and adds 2688e6f085baSmrg# --enable-ltdl-install to the configure arguments. Note that 2689e6f085baSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2690e6f085baSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 2691e6f085baSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 2692e6f085baSmrg# '${top_srcdir}/' (note the single quotes!). If your package is not 2693e6f085baSmrg# flat and you're not using automake, define top_builddir and top_srcdir 2694e6f085baSmrg# appropriately in the Makefiles. 2695e6f085baSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2696e6f085baSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 2697e6f085baSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2698e6f085baSmrg AC_CHECK_LIB(ltdl, lt_dlinit, 2699e6f085baSmrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2700e6f085baSmrg [if test x"$enable_ltdl_install" = xno; then 2701e6f085baSmrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 2702e6f085baSmrg else 2703e6f085baSmrg enable_ltdl_install=yes 2704e6f085baSmrg fi 2705e6f085baSmrg ]) 2706e6f085baSmrg if test x"$enable_ltdl_install" = x"yes"; then 2707e6f085baSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 2708e6f085baSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2709e6f085baSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2710e6f085baSmrg else 2711e6f085baSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2712e6f085baSmrg LIBLTDL="-lltdl" 2713e6f085baSmrg LTDLINCL= 2714e6f085baSmrg fi 2715e6f085baSmrg # For backwards non-gettext consistent compatibility... 2716e6f085baSmrg INCLTDL="$LTDLINCL" 2717e6f085baSmrg])# AC_LIBLTDL_INSTALLABLE 271895b296d0Smrg 271995b296d0Smrg 2720e6f085baSmrg# AC_LIBTOOL_CXX 2721e6f085baSmrg# -------------- 2722e6f085baSmrg# enable support for C++ libraries 2723e6f085baSmrgAC_DEFUN([AC_LIBTOOL_CXX], 2724e6f085baSmrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 2725e6f085baSmrg])# AC_LIBTOOL_CXX 272695b296d0Smrg 272795b296d0Smrg 2728e6f085baSmrg# _LT_AC_LANG_CXX 2729e6f085baSmrg# --------------- 2730e6f085baSmrgAC_DEFUN([_LT_AC_LANG_CXX], 2731e6f085baSmrg[AC_REQUIRE([AC_PROG_CXX]) 2732e6f085baSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2733e6f085baSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 2734e6f085baSmrg])# _LT_AC_LANG_CXX 273595b296d0Smrg 2736e6f085baSmrg# _LT_AC_PROG_CXXCPP 2737e6f085baSmrg# ------------------ 2738e6f085baSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 273995b296d0Smrg[ 2740e6f085baSmrgAC_REQUIRE([AC_PROG_CXX]) 2741e6f085baSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 2742e6f085baSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 2743e6f085baSmrg (test "X$CXX" != "Xg++"))) ; then 2744e6f085baSmrg AC_PROG_CXXCPP 2745e6f085baSmrgfi 2746e6f085baSmrg])# _LT_AC_PROG_CXXCPP 274795b296d0Smrg 2748e6f085baSmrg# AC_LIBTOOL_F77 2749e6f085baSmrg# -------------- 2750e6f085baSmrg# enable support for Fortran 77 libraries 2751e6f085baSmrgAC_DEFUN([AC_LIBTOOL_F77], 2752e6f085baSmrg[AC_REQUIRE([_LT_AC_LANG_F77]) 2753e6f085baSmrg])# AC_LIBTOOL_F77 275495b296d0Smrg 275595b296d0Smrg 2756e6f085baSmrg# _LT_AC_LANG_F77 2757e6f085baSmrg# --------------- 2758e6f085baSmrgAC_DEFUN([_LT_AC_LANG_F77], 2759e6f085baSmrg[AC_REQUIRE([AC_PROG_F77]) 2760e6f085baSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 2761e6f085baSmrg])# _LT_AC_LANG_F77 276295b296d0Smrg 276395b296d0Smrg 2764e6f085baSmrg# AC_LIBTOOL_GCJ 2765e6f085baSmrg# -------------- 2766e6f085baSmrg# enable support for GCJ libraries 2767e6f085baSmrgAC_DEFUN([AC_LIBTOOL_GCJ], 2768e6f085baSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 2769e6f085baSmrg])# AC_LIBTOOL_GCJ 277095b296d0Smrg 277195b296d0Smrg 2772e6f085baSmrg# _LT_AC_LANG_GCJ 2773e6f085baSmrg# --------------- 2774e6f085baSmrgAC_DEFUN([_LT_AC_LANG_GCJ], 2775e6f085baSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 2776e6f085baSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 2777e6f085baSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 2778e6f085baSmrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 2779e6f085baSmrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 2780e6f085baSmrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 2781e6f085baSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 2782e6f085baSmrg])# _LT_AC_LANG_GCJ 2783e6f085baSmrg 2784e6f085baSmrg 2785e6f085baSmrg# AC_LIBTOOL_RC 2786e6f085baSmrg# ------------- 2787e6f085baSmrg# enable support for Windows resource files 2788e6f085baSmrgAC_DEFUN([AC_LIBTOOL_RC], 2789e6f085baSmrg[AC_REQUIRE([LT_AC_PROG_RC]) 2790e6f085baSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 2791e6f085baSmrg])# AC_LIBTOOL_RC 279295b296d0Smrg 279395b296d0Smrg 2794e6f085baSmrg# AC_LIBTOOL_LANG_C_CONFIG 2795e6f085baSmrg# ------------------------ 2796e6f085baSmrg# Ensure that the configuration vars for the C compiler are 2797e6f085baSmrg# suitably defined. Those variables are subsequently used by 2798e6f085baSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2799e6f085baSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 2800e6f085baSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 2801e6f085baSmrg[lt_save_CC="$CC" 2802e6f085baSmrgAC_LANG_PUSH(C) 280395b296d0Smrg 2804e6f085baSmrg# Source file extension for C test sources. 2805e6f085baSmrgac_ext=c 2806e6f085baSmrg 2807e6f085baSmrg# Object file extension for compiled C test sources. 2808e6f085baSmrgobjext=o 2809e6f085baSmrg_LT_AC_TAGVAR(objext, $1)=$objext 2810e6f085baSmrg 2811e6f085baSmrg# Code to be used in simple compile tests 2812e6f085baSmrglt_simple_compile_test_code="int some_variable = 0;" 2813e6f085baSmrg 2814e6f085baSmrg# Code to be used in simple link tests 2815e6f085baSmrglt_simple_link_test_code='int main(){return(0);}' 2816e6f085baSmrg 2817e6f085baSmrg_LT_AC_SYS_COMPILER 2818e6f085baSmrg 2819e6f085baSmrg# save warnings/boilerplate of simple test code 2820e6f085baSmrg_LT_COMPILER_BOILERPLATE 2821e6f085baSmrg_LT_LINKER_BOILERPLATE 2822e6f085baSmrg 2823e6f085baSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 2824e6f085baSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 2825e6f085baSmrgAC_LIBTOOL_PROG_CC_C_O($1) 2826e6f085baSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 2827e6f085baSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 2828e6f085baSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 2829e6f085baSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 2830e6f085baSmrgAC_LIBTOOL_SYS_LIB_STRIP 2831e6f085baSmrgAC_LIBTOOL_DLOPEN_SELF 2832e6f085baSmrg 2833e6f085baSmrg# Report which library types will actually be built 2834e6f085baSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 2835e6f085baSmrgAC_MSG_RESULT([$can_build_shared]) 2836e6f085baSmrg 2837e6f085baSmrgAC_MSG_CHECKING([whether to build shared libraries]) 2838e6f085baSmrgtest "$can_build_shared" = "no" && enable_shared=no 2839e6f085baSmrg 2840e6f085baSmrg# On AIX, shared libraries and static libraries use the same namespace, and 2841e6f085baSmrg# are all built from PIC. 2842e6f085baSmrgcase $host_os in 2843e6f085baSmrgaix3*) 2844e6f085baSmrg test "$enable_shared" = yes && enable_static=no 2845e6f085baSmrg if test -n "$RANLIB"; then 2846e6f085baSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 2847e6f085baSmrg postinstall_cmds='$RANLIB $lib' 284895b296d0Smrg fi 2849e6f085baSmrg ;; 285095b296d0Smrg 2851e6f085baSmrgaix[[4-9]]*) 2852e6f085baSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 2853e6f085baSmrg test "$enable_shared" = yes && enable_static=no 2854e6f085baSmrg fi 2855e6f085baSmrg ;; 2856e6f085baSmrgesac 2857e6f085baSmrgAC_MSG_RESULT([$enable_shared]) 285895b296d0Smrg 2859e6f085baSmrgAC_MSG_CHECKING([whether to build static libraries]) 2860e6f085baSmrg# Make sure either enable_shared or enable_static is yes. 2861e6f085baSmrgtest "$enable_shared" = yes || enable_static=yes 2862e6f085baSmrgAC_MSG_RESULT([$enable_static]) 286395b296d0Smrg 2864e6f085baSmrgAC_LIBTOOL_CONFIG($1) 286595b296d0Smrg 2866e6f085baSmrgAC_LANG_POP 2867e6f085baSmrgCC="$lt_save_CC" 2868e6f085baSmrg])# AC_LIBTOOL_LANG_C_CONFIG 286995b296d0Smrg 287095b296d0Smrg 2871e6f085baSmrg# AC_LIBTOOL_LANG_CXX_CONFIG 2872e6f085baSmrg# -------------------------- 2873e6f085baSmrg# Ensure that the configuration vars for the C compiler are 2874e6f085baSmrg# suitably defined. Those variables are subsequently used by 2875e6f085baSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2876e6f085baSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 2877e6f085baSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 2878e6f085baSmrg[AC_LANG_PUSH(C++) 2879e6f085baSmrgAC_REQUIRE([AC_PROG_CXX]) 2880e6f085baSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2881e6f085baSmrg 2882e6f085baSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2883e6f085baSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 2884e6f085baSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 2885e6f085baSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 2886e6f085baSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 2887e6f085baSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 2888e6f085baSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 2889e6f085baSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 2890e6f085baSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2891e6f085baSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 2892e6f085baSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2893e6f085baSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 2894e6f085baSmrg_LT_AC_TAGVAR(module_cmds, $1)= 2895e6f085baSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 2896e6f085baSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 2897e6f085baSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 2898e6f085baSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 2899e6f085baSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2900e6f085baSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 290195b296d0Smrg 2902e6f085baSmrg# Dependencies to place before and after the object being linked: 2903e6f085baSmrg_LT_AC_TAGVAR(predep_objects, $1)= 2904e6f085baSmrg_LT_AC_TAGVAR(postdep_objects, $1)= 2905e6f085baSmrg_LT_AC_TAGVAR(predeps, $1)= 2906e6f085baSmrg_LT_AC_TAGVAR(postdeps, $1)= 2907e6f085baSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 2908e6f085baSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 290995b296d0Smrg 2910e6f085baSmrg# Source file extension for C++ test sources. 2911e6f085baSmrgac_ext=cpp 291295b296d0Smrg 2913e6f085baSmrg# Object file extension for compiled C++ test sources. 2914e6f085baSmrgobjext=o 2915e6f085baSmrg_LT_AC_TAGVAR(objext, $1)=$objext 2916e6f085baSmrg 2917e6f085baSmrg# Code to be used in simple compile tests 2918e6f085baSmrglt_simple_compile_test_code="int some_variable = 0;" 2919e6f085baSmrg 2920e6f085baSmrg# Code to be used in simple link tests 2921e6f085baSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 2922e6f085baSmrg 2923e6f085baSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 2924e6f085baSmrg_LT_AC_SYS_COMPILER 2925e6f085baSmrg 2926e6f085baSmrg# save warnings/boilerplate of simple test code 2927e6f085baSmrg_LT_COMPILER_BOILERPLATE 2928e6f085baSmrg_LT_LINKER_BOILERPLATE 2929e6f085baSmrg 2930e6f085baSmrg# Allow CC to be a program name with arguments. 2931e6f085baSmrglt_save_CC=$CC 2932e6f085baSmrglt_save_LD=$LD 2933e6f085baSmrglt_save_GCC=$GCC 2934e6f085baSmrgGCC=$GXX 2935e6f085baSmrglt_save_with_gnu_ld=$with_gnu_ld 2936e6f085baSmrglt_save_path_LD=$lt_cv_path_LD 2937e6f085baSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 2938e6f085baSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 2939e6f085baSmrgelse 2940e6f085baSmrg $as_unset lt_cv_prog_gnu_ld 2941e6f085baSmrgfi 2942e6f085baSmrgif test -n "${lt_cv_path_LDCXX+set}"; then 2943e6f085baSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 2944e6f085baSmrgelse 2945e6f085baSmrg $as_unset lt_cv_path_LD 2946e6f085baSmrgfi 2947e6f085baSmrgtest -z "${LDCXX+set}" || LD=$LDCXX 2948e6f085baSmrgCC=${CXX-"c++"} 2949e6f085baSmrgcompiler=$CC 2950e6f085baSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 2951e6f085baSmrg_LT_CC_BASENAME([$compiler]) 2952e6f085baSmrg 2953e6f085baSmrg# We don't want -fno-exception wen compiling C++ code, so set the 2954e6f085baSmrg# no_builtin_flag separately 2955e6f085baSmrgif test "$GXX" = yes; then 2956e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 2957e6f085baSmrgelse 2958e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 2959e6f085baSmrgfi 2960e6f085baSmrg 2961e6f085baSmrgif test "$GXX" = yes; then 2962e6f085baSmrg # Set up default GNU C++ configuration 2963e6f085baSmrg 2964e6f085baSmrg AC_PROG_LD 2965e6f085baSmrg 2966e6f085baSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 2967e6f085baSmrg # archiving commands below assume that GNU ld is being used. 2968e6f085baSmrg if test "$with_gnu_ld" = yes; then 2969e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 2970e6f085baSmrg _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' 2971e6f085baSmrg 2972e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 2973e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 2974e6f085baSmrg 2975e6f085baSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 2976e6f085baSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 2977e6f085baSmrg # investigate it a little bit more. (MM) 2978e6f085baSmrg wlarc='${wl}' 2979e6f085baSmrg 2980e6f085baSmrg # ancient GNU ld didn't support --whole-archive et. al. 2981e6f085baSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 2982e6f085baSmrg grep 'no-whole-archive' > /dev/null; then 2983e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 298495b296d0Smrg else 2985e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 298695b296d0Smrg fi 298795b296d0Smrg else 2988e6f085baSmrg with_gnu_ld=no 2989e6f085baSmrg wlarc= 2990e6f085baSmrg 2991e6f085baSmrg # A generic and very simple default shared library creation 2992e6f085baSmrg # command for GNU C++ for the case where it uses the native 2993e6f085baSmrg # linker, instead of GNU ld. If possible, this setting should 2994e6f085baSmrg # overridden to take advantage of the native linker features on 2995e6f085baSmrg # the platform it is being used on. 2996e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 299795b296d0Smrg fi 299895b296d0Smrg 2999e6f085baSmrg # Commands to make compiler produce verbose output that lists 3000e6f085baSmrg # what "hidden" libraries, object files and flags are used when 3001e6f085baSmrg # linking a shared library. 3002e6f085baSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3003e6f085baSmrg 300495b296d0Smrgelse 3005e6f085baSmrg GXX=no 3006e6f085baSmrg with_gnu_ld=no 3007e6f085baSmrg wlarc= 300895b296d0Smrgfi 300995b296d0Smrg 3010e6f085baSmrg# PORTME: fill in a description of your system's C++ link characteristics 3011e6f085baSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 3012e6f085baSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 3013e6f085baSmrgcase $host_os in 3014e6f085baSmrg aix3*) 3015e6f085baSmrg # FIXME: insert proper C++ library support 3016e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3017e6f085baSmrg ;; 3018e6f085baSmrg aix[[4-9]]*) 3019e6f085baSmrg if test "$host_cpu" = ia64; then 3020e6f085baSmrg # On IA64, the linker does run time linking by default, so we don't 3021e6f085baSmrg # have to do anything special. 3022e6f085baSmrg aix_use_runtimelinking=no 3023e6f085baSmrg exp_sym_flag='-Bexport' 3024e6f085baSmrg no_entry_flag="" 3025e6f085baSmrg else 3026e6f085baSmrg aix_use_runtimelinking=no 3027e6f085baSmrg 3028e6f085baSmrg # Test if we are trying to use run time linking or normal 3029e6f085baSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 3030e6f085baSmrg # need to do runtime linking. 3031e6f085baSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 3032e6f085baSmrg for ld_flag in $LDFLAGS; do 3033e6f085baSmrg case $ld_flag in 3034e6f085baSmrg *-brtl*) 3035e6f085baSmrg aix_use_runtimelinking=yes 3036e6f085baSmrg break 3037e6f085baSmrg ;; 3038e6f085baSmrg esac 3039e6f085baSmrg done 3040e6f085baSmrg ;; 3041e6f085baSmrg esac 304295b296d0Smrg 3043e6f085baSmrg exp_sym_flag='-bexport' 3044e6f085baSmrg no_entry_flag='-bnoentry' 3045e6f085baSmrg fi 304695b296d0Smrg 3047e6f085baSmrg # When large executables or shared objects are built, AIX ld can 3048e6f085baSmrg # have problems creating the table of contents. If linking a library 3049e6f085baSmrg # or program results in "error TOC overflow" add -mminimal-toc to 3050e6f085baSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 3051e6f085baSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 305295b296d0Smrg 3053e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 3054e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3055e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3056e6f085baSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 305795b296d0Smrg 3058e6f085baSmrg if test "$GXX" = yes; then 3059e6f085baSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 3060e6f085baSmrg # We only want to do this on AIX 4.2 and lower, the check 3061e6f085baSmrg # below for broken collect2 doesn't work under 4.3+ 3062e6f085baSmrg collect2name=`${CC} -print-prog-name=collect2` 3063e6f085baSmrg if test -f "$collect2name" && \ 3064e6f085baSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 3065e6f085baSmrg then 3066e6f085baSmrg # We have reworked collect2 3067e6f085baSmrg : 3068e6f085baSmrg else 3069e6f085baSmrg # We have old collect2 3070e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 3071e6f085baSmrg # It fails to find uninstalled libraries when the uninstalled 3072e6f085baSmrg # path is not listed in the libpath. Setting hardcode_minus_L 3073e6f085baSmrg # to unsupported forces relinking 3074e6f085baSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 3075e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3076e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3077e6f085baSmrg fi 3078e6f085baSmrg ;; 3079e6f085baSmrg esac 3080e6f085baSmrg shared_flag='-shared' 3081e6f085baSmrg if test "$aix_use_runtimelinking" = yes; then 3082e6f085baSmrg shared_flag="$shared_flag "'${wl}-G' 3083e6f085baSmrg fi 3084e6f085baSmrg else 3085e6f085baSmrg # not using gcc 308695b296d0Smrg if test "$host_cpu" = ia64; then 3087e6f085baSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 3088e6f085baSmrg # chokes on -Wl,-G. The following line is correct: 3089e6f085baSmrg shared_flag='-G' 3090e6f085baSmrg else 3091e6f085baSmrg if test "$aix_use_runtimelinking" = yes; then 3092e6f085baSmrg shared_flag='${wl}-G' 3093e6f085baSmrg else 3094e6f085baSmrg shared_flag='${wl}-bM:SRE' 3095e6f085baSmrg fi 3096e6f085baSmrg fi 3097e6f085baSmrg fi 3098e6f085baSmrg 3099e6f085baSmrg # It seems that -bexpall does not export symbols beginning with 3100e6f085baSmrg # underscore (_), so it is better to generate a list of symbols to export. 3101e6f085baSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 3102e6f085baSmrg if test "$aix_use_runtimelinking" = yes; then 3103e6f085baSmrg # Warning - without using the other runtime loading flags (-brtl), 3104e6f085baSmrg # -berok will link without error, but may produce a broken library. 3105e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 3106e6f085baSmrg # Determine the default libpath from the value encoded in an empty executable. 3107e6f085baSmrg _LT_AC_SYS_LIBPATH_AIX 3108e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3109e6f085baSmrg 3110e6f085baSmrg _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" 3111e6f085baSmrg else 3112e6f085baSmrg if test "$host_cpu" = ia64; then 3113e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 3114e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 3115e6f085baSmrg _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" 3116e6f085baSmrg else 3117e6f085baSmrg # Determine the default libpath from the value encoded in an empty executable. 3118e6f085baSmrg _LT_AC_SYS_LIBPATH_AIX 3119e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3120e6f085baSmrg # Warning - without using the other run time loading flags, 3121e6f085baSmrg # -berok will link without error, but may produce a broken library. 3122e6f085baSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 3123e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 3124e6f085baSmrg # Exported symbols can be pulled into shared objects from archives 3125e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 3126e6f085baSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 3127e6f085baSmrg # This is similar to how AIX traditionally builds its shared libraries. 3128e6f085baSmrg _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' 3129e6f085baSmrg fi 3130e6f085baSmrg fi 3131e6f085baSmrg ;; 3132e6f085baSmrg 3133e6f085baSmrg beos*) 3134e6f085baSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 3135e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3136e6f085baSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 3137e6f085baSmrg # support --undefined. This deserves some investigation. FIXME 3138e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3139e6f085baSmrg else 3140e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3141e6f085baSmrg fi 3142e6f085baSmrg ;; 3143e6f085baSmrg 3144e6f085baSmrg chorus*) 3145e6f085baSmrg case $cc_basename in 3146e6f085baSmrg *) 3147e6f085baSmrg # FIXME: insert proper C++ library support 3148e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3149e6f085baSmrg ;; 3150e6f085baSmrg esac 3151e6f085baSmrg ;; 3152e6f085baSmrg 3153e6f085baSmrg cygwin* | mingw* | pw32*) 3154e6f085baSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 3155e6f085baSmrg # as there is no search path for DLLs. 3156e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3157e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3158e6f085baSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 3159e6f085baSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 3160e6f085baSmrg 3161e6f085baSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 3162e6f085baSmrg _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' 3163e6f085baSmrg # If the export-symbols file already is a .def file (1st line 3164e6f085baSmrg # is EXPORTS), use it as is; otherwise, prepend... 3165e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 3166e6f085baSmrg cp $export_symbols $output_objdir/$soname.def; 3167e6f085baSmrg else 3168e6f085baSmrg echo EXPORTS > $output_objdir/$soname.def; 3169e6f085baSmrg cat $export_symbols >> $output_objdir/$soname.def; 3170e6f085baSmrg fi~ 3171e6f085baSmrg $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' 3172e6f085baSmrg else 3173e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3174e6f085baSmrg fi 3175e6f085baSmrg ;; 3176e6f085baSmrg darwin* | rhapsody*) 3177e6f085baSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3178e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3179e6f085baSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 3180e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3181e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 3182e6f085baSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3183e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3184e6f085baSmrg if test "$GXX" = yes ; then 3185e6f085baSmrg output_verbose_link_cmd='echo' 3186e6f085baSmrg _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}" 3187e6f085baSmrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3188e6f085baSmrg _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}" 3189e6f085baSmrg _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}" 3190e6f085baSmrg if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3191e6f085baSmrg _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}" 3192e6f085baSmrg _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}" 3193e6f085baSmrg fi 3194e6f085baSmrg else 3195e6f085baSmrg case $cc_basename in 3196e6f085baSmrg xlc*) 3197e6f085baSmrg output_verbose_link_cmd='echo' 3198e6f085baSmrg _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' 3199e6f085baSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3200e6f085baSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3201e6f085baSmrg _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}' 3202e6f085baSmrg _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}' 3203e6f085baSmrg ;; 3204e6f085baSmrg *) 3205e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3206e6f085baSmrg ;; 3207e6f085baSmrg esac 3208e6f085baSmrg fi 3209e6f085baSmrg ;; 3210e6f085baSmrg 3211e6f085baSmrg dgux*) 3212e6f085baSmrg case $cc_basename in 3213e6f085baSmrg ec++*) 3214e6f085baSmrg # FIXME: insert proper C++ library support 3215e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3216e6f085baSmrg ;; 3217e6f085baSmrg ghcx*) 3218e6f085baSmrg # Green Hills C++ Compiler 3219e6f085baSmrg # FIXME: insert proper C++ library support 3220e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3221e6f085baSmrg ;; 3222e6f085baSmrg *) 3223e6f085baSmrg # FIXME: insert proper C++ library support 3224e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3225e6f085baSmrg ;; 3226e6f085baSmrg esac 3227e6f085baSmrg ;; 3228e6f085baSmrg freebsd[[12]]*) 3229e6f085baSmrg # C++ shared libraries reported to be fairly broken before switch to ELF 3230e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3231e6f085baSmrg ;; 3232e6f085baSmrg freebsd-elf*) 3233e6f085baSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3234e6f085baSmrg ;; 3235e6f085baSmrg freebsd* | dragonfly*) 3236e6f085baSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 3237e6f085baSmrg # conventions 3238e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 3239e6f085baSmrg ;; 3240e6f085baSmrg gnu*) 3241e6f085baSmrg ;; 3242e6f085baSmrg hpux9*) 3243e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3244e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3245e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3246e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3247e6f085baSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3248e6f085baSmrg # but as the default 3249e6f085baSmrg # location of the library. 3250e6f085baSmrg 3251e6f085baSmrg case $cc_basename in 3252e6f085baSmrg CC*) 3253e6f085baSmrg # FIXME: insert proper C++ library support 3254e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3255e6f085baSmrg ;; 3256e6f085baSmrg aCC*) 3257e6f085baSmrg _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' 3258e6f085baSmrg # Commands to make compiler produce verbose output that lists 3259e6f085baSmrg # what "hidden" libraries, object files and flags are used when 3260e6f085baSmrg # linking a shared library. 3261e6f085baSmrg # 3262e6f085baSmrg # There doesn't appear to be a way to prevent this compiler from 3263e6f085baSmrg # explicitly linking system object files so we need to strip them 3264e6f085baSmrg # from the output so that they don't get included in the library 3265e6f085baSmrg # dependencies. 3266e6f085baSmrg 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' 3267e6f085baSmrg ;; 3268e6f085baSmrg *) 3269e6f085baSmrg if test "$GXX" = yes; then 3270e6f085baSmrg _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' 3271e6f085baSmrg else 3272e6f085baSmrg # FIXME: insert proper C++ library support 3273e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 327495b296d0Smrg fi 327539713583Smrg ;; 3276e6f085baSmrg esac 3277e6f085baSmrg ;; 3278e6f085baSmrg hpux10*|hpux11*) 3279e6f085baSmrg if test $with_gnu_ld = no; then 3280e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3281e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 328295b296d0Smrg 328339713583Smrg case $host_cpu in 3284e6f085baSmrg hppa*64*|ia64*) ;; 3285e6f085baSmrg *) 3286e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 328739713583Smrg ;; 328839713583Smrg esac 3289e6f085baSmrg fi 3290e6f085baSmrg case $host_cpu in 3291e6f085baSmrg hppa*64*|ia64*) 3292e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3293e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3294e6f085baSmrg ;; 3295e6f085baSmrg *) 3296e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3297e6f085baSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3298e6f085baSmrg # but as the default 3299e6f085baSmrg # location of the library. 330039713583Smrg ;; 3301e6f085baSmrg esac 330295b296d0Smrg 3303e6f085baSmrg case $cc_basename in 3304e6f085baSmrg CC*) 3305e6f085baSmrg # FIXME: insert proper C++ library support 3306e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 330795b296d0Smrg ;; 3308e6f085baSmrg aCC*) 3309e6f085baSmrg case $host_cpu in 3310e6f085baSmrg hppa*64*) 3311e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3312e6f085baSmrg ;; 3313e6f085baSmrg ia64*) 3314e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3315e6f085baSmrg ;; 3316e6f085baSmrg *) 3317e6f085baSmrg _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' 331895b296d0Smrg ;; 331995b296d0Smrg esac 3320e6f085baSmrg # Commands to make compiler produce verbose output that lists 3321e6f085baSmrg # what "hidden" libraries, object files and flags are used when 3322e6f085baSmrg # linking a shared library. 3323e6f085baSmrg # 3324e6f085baSmrg # There doesn't appear to be a way to prevent this compiler from 3325e6f085baSmrg # explicitly linking system object files so we need to strip them 3326e6f085baSmrg # from the output so that they don't get included in the library 3327e6f085baSmrg # dependencies. 3328e6f085baSmrg 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' 332995b296d0Smrg ;; 3330e6f085baSmrg *) 3331e6f085baSmrg if test "$GXX" = yes; then 3332e6f085baSmrg if test $with_gnu_ld = no; then 333395b296d0Smrg case $host_cpu in 3334e6f085baSmrg hppa*64*) 3335e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3336e6f085baSmrg ;; 3337e6f085baSmrg ia64*) 3338e6f085baSmrg _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' 333995b296d0Smrg ;; 334095b296d0Smrg *) 3341e6f085baSmrg _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' 334295b296d0Smrg ;; 334395b296d0Smrg esac 3344e6f085baSmrg fi 3345e6f085baSmrg else 3346e6f085baSmrg # FIXME: insert proper C++ library support 3347e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3348e6f085baSmrg fi 334995b296d0Smrg ;; 3350e6f085baSmrg esac 3351e6f085baSmrg ;; 3352e6f085baSmrg interix[[3-9]]*) 3353e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3354e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3355e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3356e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3357e6f085baSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 3358e6f085baSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 3359e6f085baSmrg # default) and relocated if they conflict, which is a slow very memory 3360e6f085baSmrg # consuming and fragmenting process. To avoid this, we pick a random, 3361e6f085baSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 3362e6f085baSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 3363e6f085baSmrg _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' 3364e6f085baSmrg _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' 3365e6f085baSmrg ;; 3366e6f085baSmrg irix5* | irix6*) 3367e6f085baSmrg case $cc_basename in 3368e6f085baSmrg CC*) 3369e6f085baSmrg # SGI C++ 3370e6f085baSmrg _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' 3371e6f085baSmrg 3372e6f085baSmrg # Archives containing C++ object files must be created using 3373e6f085baSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 3374e6f085baSmrg # necessary to make sure instantiated templates are included 3375e6f085baSmrg # in the archive. 3376e6f085baSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 337795b296d0Smrg ;; 3378e6f085baSmrg *) 3379e6f085baSmrg if test "$GXX" = yes; then 3380e6f085baSmrg if test "$with_gnu_ld" = no; then 3381e6f085baSmrg _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' 3382e6f085baSmrg else 3383e6f085baSmrg _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' 3384e6f085baSmrg fi 3385e6f085baSmrg fi 3386e6f085baSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3387e6f085baSmrg ;; 3388e6f085baSmrg esac 3389e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3390e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3391e6f085baSmrg ;; 3392e6f085baSmrg linux* | k*bsd*-gnu) 3393e6f085baSmrg case $cc_basename in 3394e6f085baSmrg KCC*) 3395e6f085baSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3396e6f085baSmrg 3397e6f085baSmrg # KCC will only create a shared library if the output file 3398e6f085baSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3399e6f085baSmrg # to its proper name (with version) after linking. 3400e6f085baSmrg _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' 3401e6f085baSmrg _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' 3402e6f085baSmrg # Commands to make compiler produce verbose output that lists 3403e6f085baSmrg # what "hidden" libraries, object files and flags are used when 3404e6f085baSmrg # linking a shared library. 3405e6f085baSmrg # 3406e6f085baSmrg # There doesn't appear to be a way to prevent this compiler from 3407e6f085baSmrg # explicitly linking system object files so we need to strip them 3408e6f085baSmrg # from the output so that they don't get included in the library 3409e6f085baSmrg # dependencies. 3410e6f085baSmrg 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' 3411e6f085baSmrg 3412e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 3413e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3414e6f085baSmrg 3415e6f085baSmrg # Archives containing C++ object files must be created using 3416e6f085baSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3417e6f085baSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3418e6f085baSmrg ;; 3419e6f085baSmrg icpc*) 3420e6f085baSmrg # Intel C++ 3421e6f085baSmrg with_gnu_ld=yes 3422e6f085baSmrg # version 8.0 and above of icpc choke on multiply defined symbols 3423e6f085baSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 3424e6f085baSmrg # earlier do not add the objects themselves. 3425e6f085baSmrg case `$CC -V 2>&1` in 3426e6f085baSmrg *"Version 7."*) 3427e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3428e6f085baSmrg _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' 3429e6f085baSmrg ;; 3430e6f085baSmrg *) # Version 8.0 or newer 3431e6f085baSmrg tmp_idyn= 3432e6f085baSmrg case $host_cpu in 3433e6f085baSmrg ia64*) tmp_idyn=' -i_dynamic';; 3434e6f085baSmrg esac 3435e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3436e6f085baSmrg _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' 3437e6f085baSmrg ;; 3438ff89ac2bSmrg esac 3439e6f085baSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3440e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3441e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3442e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 3443ff89ac2bSmrg ;; 3444e6f085baSmrg pgCC* | pgcpp*) 3445e6f085baSmrg # Portland Group C++ compiler 3446e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 3447e6f085baSmrg _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' 3448e6f085baSmrg 3449e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3450e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3451e6f085baSmrg _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' 3452e6f085baSmrg ;; 3453e6f085baSmrg cxx*) 3454e6f085baSmrg # Compaq C++ 3455e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3456e6f085baSmrg _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' 3457e6f085baSmrg 3458e6f085baSmrg runpath_var=LD_RUN_PATH 3459e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3460e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3461e6f085baSmrg 3462e6f085baSmrg # Commands to make compiler produce verbose output that lists 3463e6f085baSmrg # what "hidden" libraries, object files and flags are used when 3464e6f085baSmrg # linking a shared library. 3465e6f085baSmrg # 3466e6f085baSmrg # There doesn't appear to be a way to prevent this compiler from 3467e6f085baSmrg # explicitly linking system object files so we need to strip them 3468e6f085baSmrg # from the output so that they don't get included in the library 3469e6f085baSmrg # dependencies. 3470e6f085baSmrg 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' 3471e6f085baSmrg ;; 3472e6f085baSmrg *) 3473e6f085baSmrg case `$CC -V 2>&1 | sed 5q` in 3474e6f085baSmrg *Sun\ C*) 3475e6f085baSmrg # Sun C++ 5.9 3476e6f085baSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3477e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3478e6f085baSmrg _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' 3479e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3480e6f085baSmrg _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' 3481e6f085baSmrg 3482e6f085baSmrg # Not sure whether something based on 3483e6f085baSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 3484e6f085baSmrg # would be better. 3485e6f085baSmrg output_verbose_link_cmd='echo' 3486e6f085baSmrg 3487e6f085baSmrg # Archives containing C++ object files must be created using 3488e6f085baSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 3489e6f085baSmrg # necessary to make sure instantiated templates are included 3490e6f085baSmrg # in the archive. 3491e6f085baSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3492e6f085baSmrg ;; 349339713583Smrg esac 349495b296d0Smrg ;; 3495e6f085baSmrg esac 3496e6f085baSmrg ;; 3497e6f085baSmrg lynxos*) 3498e6f085baSmrg # FIXME: insert proper C++ library support 3499e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3500e6f085baSmrg ;; 3501e6f085baSmrg m88k*) 3502e6f085baSmrg # FIXME: insert proper C++ library support 3503e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3504e6f085baSmrg ;; 3505e6f085baSmrg mvs*) 3506e6f085baSmrg case $cc_basename in 3507e6f085baSmrg cxx*) 3508e6f085baSmrg # FIXME: insert proper C++ library support 3509e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 351095b296d0Smrg ;; 3511e6f085baSmrg *) 3512e6f085baSmrg # FIXME: insert proper C++ library support 3513e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 351495b296d0Smrg ;; 3515e6f085baSmrg esac 3516e6f085baSmrg ;; 3517e6f085baSmrg netbsd*) 3518e6f085baSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3519e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 3520e6f085baSmrg wlarc= 3521e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3522e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3523e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3524e6f085baSmrg fi 3525e6f085baSmrg # Workaround some broken pre-1.5 toolchains 3526e6f085baSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 3527e6f085baSmrg ;; 3528e6f085baSmrg openbsd2*) 3529e6f085baSmrg # C++ shared libraries are fairly broken 3530e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3531e6f085baSmrg ;; 3532e6f085baSmrg openbsd*) 3533e6f085baSmrg if test -f /usr/libexec/ld.so; then 3534e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3535e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3536e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3537e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3538e6f085baSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3539e6f085baSmrg _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' 3540e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3541e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3542e6f085baSmrg fi 3543e6f085baSmrg output_verbose_link_cmd='echo' 3544e6f085baSmrg else 3545e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3546e6f085baSmrg fi 3547e6f085baSmrg ;; 3548e6f085baSmrg osf3*) 3549e6f085baSmrg case $cc_basename in 3550e6f085baSmrg KCC*) 3551e6f085baSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3552e6f085baSmrg 3553e6f085baSmrg # KCC will only create a shared library if the output file 3554e6f085baSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3555e6f085baSmrg # to its proper name (with version) after linking. 3556e6f085baSmrg _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' 3557e6f085baSmrg 3558e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3559e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3560e6f085baSmrg 3561e6f085baSmrg # Archives containing C++ object files must be created using 3562e6f085baSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3563e6f085baSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3564e6f085baSmrg 356595b296d0Smrg ;; 3566e6f085baSmrg RCC*) 3567e6f085baSmrg # Rational C++ 2.4.1 3568e6f085baSmrg # FIXME: insert proper C++ library support 3569e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 357095b296d0Smrg ;; 3571e6f085baSmrg cxx*) 3572e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3573e6f085baSmrg _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' 3574e6f085baSmrg 3575e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3576e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3577e6f085baSmrg 3578e6f085baSmrg # Commands to make compiler produce verbose output that lists 3579e6f085baSmrg # what "hidden" libraries, object files and flags are used when 3580e6f085baSmrg # linking a shared library. 3581e6f085baSmrg # 3582e6f085baSmrg # There doesn't appear to be a way to prevent this compiler from 3583e6f085baSmrg # explicitly linking system object files so we need to strip them 3584e6f085baSmrg # from the output so that they don't get included in the library 3585e6f085baSmrg # dependencies. 3586e6f085baSmrg 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' 358795b296d0Smrg ;; 3588e6f085baSmrg *) 3589e6f085baSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3590e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3591e6f085baSmrg _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' 3592e6f085baSmrg 3593e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3594e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3595e6f085baSmrg 3596e6f085baSmrg # Commands to make compiler produce verbose output that lists 3597e6f085baSmrg # what "hidden" libraries, object files and flags are used when 3598e6f085baSmrg # linking a shared library. 3599e6f085baSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3600e6f085baSmrg 3601e6f085baSmrg else 3602e6f085baSmrg # FIXME: insert proper C++ library support 3603e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3604e6f085baSmrg fi 360595b296d0Smrg ;; 3606e6f085baSmrg esac 3607e6f085baSmrg ;; 3608e6f085baSmrg osf4* | osf5*) 3609e6f085baSmrg case $cc_basename in 3610e6f085baSmrg KCC*) 3611e6f085baSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3612e6f085baSmrg 3613e6f085baSmrg # KCC will only create a shared library if the output file 3614e6f085baSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3615e6f085baSmrg # to its proper name (with version) after linking. 3616e6f085baSmrg _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' 3617e6f085baSmrg 3618e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3619e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3620e6f085baSmrg 3621e6f085baSmrg # Archives containing C++ object files must be created using 3622e6f085baSmrg # the KAI C++ compiler. 3623e6f085baSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 362495b296d0Smrg ;; 3625e6f085baSmrg RCC*) 3626e6f085baSmrg # Rational C++ 2.4.1 3627e6f085baSmrg # FIXME: insert proper C++ library support 3628e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 362995b296d0Smrg ;; 3630e6f085baSmrg cxx*) 3631e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 3632e6f085baSmrg _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' 3633e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 3634e6f085baSmrg echo "-hidden">> $lib.exp~ 3635e6f085baSmrg $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~ 3636e6f085baSmrg $rm $lib.exp' 3637e6f085baSmrg 3638e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3639e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3640e6f085baSmrg 3641e6f085baSmrg # Commands to make compiler produce verbose output that lists 3642e6f085baSmrg # what "hidden" libraries, object files and flags are used when 3643e6f085baSmrg # linking a shared library. 3644e6f085baSmrg # 3645e6f085baSmrg # There doesn't appear to be a way to prevent this compiler from 3646e6f085baSmrg # explicitly linking system object files so we need to strip them 3647e6f085baSmrg # from the output so that they don't get included in the library 3648e6f085baSmrg # dependencies. 3649e6f085baSmrg 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' 365095b296d0Smrg ;; 3651e6f085baSmrg *) 3652e6f085baSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3653e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3654e6f085baSmrg _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' 3655e6f085baSmrg 3656e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3657e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3658e6f085baSmrg 3659e6f085baSmrg # Commands to make compiler produce verbose output that lists 3660e6f085baSmrg # what "hidden" libraries, object files and flags are used when 3661e6f085baSmrg # linking a shared library. 3662e6f085baSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3663e6f085baSmrg 3664e6f085baSmrg else 3665e6f085baSmrg # FIXME: insert proper C++ library support 3666e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3667e6f085baSmrg fi 3668e6f085baSmrg ;; 3669e6f085baSmrg esac 3670e6f085baSmrg ;; 3671e6f085baSmrg psos*) 3672e6f085baSmrg # FIXME: insert proper C++ library support 3673e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3674e6f085baSmrg ;; 3675e6f085baSmrg sunos4*) 3676e6f085baSmrg case $cc_basename in 3677e6f085baSmrg CC*) 3678e6f085baSmrg # Sun C++ 4.x 3679e6f085baSmrg # FIXME: insert proper C++ library support 3680e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3681e6f085baSmrg ;; 3682e6f085baSmrg lcc*) 3683e6f085baSmrg # Lucid 3684e6f085baSmrg # FIXME: insert proper C++ library support 3685e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3686e6f085baSmrg ;; 3687e6f085baSmrg *) 3688e6f085baSmrg # FIXME: insert proper C++ library support 3689e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3690e6f085baSmrg ;; 3691e6f085baSmrg esac 3692e6f085baSmrg ;; 3693e6f085baSmrg solaris*) 3694e6f085baSmrg case $cc_basename in 3695e6f085baSmrg CC*) 3696e6f085baSmrg # Sun C++ 4.2, 5.x and Centerline C++ 3697e6f085baSmrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 3698e6f085baSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3699e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3700e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3701e6f085baSmrg $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' 3702e6f085baSmrg 3703e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3704e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3705e6f085baSmrg case $host_os in 3706e6f085baSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 370739713583Smrg *) 3708e6f085baSmrg # The compiler driver will combine and reorder linker options, 3709e6f085baSmrg # but understands `-z linker_flag'. 3710e6f085baSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 3711e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 371239713583Smrg ;; 371339713583Smrg esac 3714e6f085baSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3715e6f085baSmrg 3716e6f085baSmrg output_verbose_link_cmd='echo' 3717e6f085baSmrg 3718e6f085baSmrg # Archives containing C++ object files must be created using 3719e6f085baSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 3720e6f085baSmrg # necessary to make sure instantiated templates are included 3721e6f085baSmrg # in the archive. 3722e6f085baSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 372395b296d0Smrg ;; 3724e6f085baSmrg gcx*) 3725e6f085baSmrg # Green Hills C++ Compiler 3726e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3727e6f085baSmrg 3728e6f085baSmrg # The C++ compiler must be used to create the archive. 3729e6f085baSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 373095b296d0Smrg ;; 373195b296d0Smrg *) 3732e6f085baSmrg # GNU C++ compiler with Solaris linker 3733e6f085baSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3734e6f085baSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 3735e6f085baSmrg if $CC --version | grep -v '^2\.7' > /dev/null; then 3736e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3737e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3738e6f085baSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 373995b296d0Smrg 3740e6f085baSmrg # Commands to make compiler produce verbose output that lists 3741e6f085baSmrg # what "hidden" libraries, object files and flags are used when 3742e6f085baSmrg # linking a shared library. 3743e6f085baSmrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3744e6f085baSmrg else 3745e6f085baSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 3746e6f085baSmrg # platform. 3747e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3748e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3749e6f085baSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 375095b296d0Smrg 3751e6f085baSmrg # Commands to make compiler produce verbose output that lists 3752e6f085baSmrg # what "hidden" libraries, object files and flags are used when 3753e6f085baSmrg # linking a shared library. 3754e6f085baSmrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3755e6f085baSmrg fi 375695b296d0Smrg 3757e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 3758e6f085baSmrg case $host_os in 3759e6f085baSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3760e6f085baSmrg *) 3761e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 3762e6f085baSmrg ;; 3763e6f085baSmrg esac 3764e6f085baSmrg fi 3765e6f085baSmrg ;; 3766e6f085baSmrg esac 3767e6f085baSmrg ;; 3768e6f085baSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 3769e6f085baSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3770e6f085baSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3771e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3772e6f085baSmrg runpath_var='LD_RUN_PATH' 3773e6f085baSmrg 3774e6f085baSmrg case $cc_basename in 3775e6f085baSmrg CC*) 3776e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3777e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 377839713583Smrg ;; 377939713583Smrg *) 3780e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3781e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 378239713583Smrg ;; 378395b296d0Smrg esac 3784e6f085baSmrg ;; 3785e6f085baSmrg sysv5* | sco3.2v5* | sco5v6*) 3786e6f085baSmrg # Note: We can NOT use -z defs as we might desire, because we do not 3787e6f085baSmrg # link with -lc, and that would cause any symbols used from libc to 3788e6f085baSmrg # always be unresolved, which means just about no library would 3789e6f085baSmrg # ever link correctly. If we're not using GNU ld we use -z text 3790e6f085baSmrg # though, which does catch some bad symbols but isn't as heavy-handed 3791e6f085baSmrg # as -z defs. 3792e6f085baSmrg # For security reasons, it is highly recommended that you always 3793e6f085baSmrg # use absolute paths for naming shared libraries, and exclude the 3794e6f085baSmrg # DT_RUNPATH tag from executables and libraries. But doing so 3795e6f085baSmrg # requires that you compile everything twice, which is a pain. 3796e6f085baSmrg # So that behaviour is only enabled if SCOABSPATH is set to a 3797e6f085baSmrg # non-empty value in the environment. Most likely only useful for 3798e6f085baSmrg # creating official distributions of packages. 3799e6f085baSmrg # This is a hack until libtool officially supports absolute path 3800e6f085baSmrg # names for shared libraries. 3801e6f085baSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3802e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 3803e6f085baSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3804e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3805e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 3806e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3807e6f085baSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3808e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 3809e6f085baSmrg runpath_var='LD_RUN_PATH' 3810e6f085baSmrg 3811e6f085baSmrg case $cc_basename in 3812e6f085baSmrg CC*) 3813e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3814e6f085baSmrg _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' 381539713583Smrg ;; 381639713583Smrg *) 3817e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3818e6f085baSmrg _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' 381939713583Smrg ;; 3820e6f085baSmrg esac 3821e6f085baSmrg ;; 3822e6f085baSmrg tandem*) 3823e6f085baSmrg case $cc_basename in 3824e6f085baSmrg NCC*) 3825e6f085baSmrg # NonStop-UX NCC 3.20 3826e6f085baSmrg # FIXME: insert proper C++ library support 3827e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 382839713583Smrg ;; 382939713583Smrg *) 3830e6f085baSmrg # FIXME: insert proper C++ library support 3831e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 383239713583Smrg ;; 3833e6f085baSmrg esac 3834e6f085baSmrg ;; 3835e6f085baSmrg vxworks*) 3836e6f085baSmrg # FIXME: insert proper C++ library support 3837e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3838e6f085baSmrg ;; 3839e6f085baSmrg *) 3840e6f085baSmrg # FIXME: insert proper C++ library support 3841e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3842e6f085baSmrg ;; 3843e6f085baSmrgesac 3844e6f085baSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 3845e6f085baSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 384695b296d0Smrg 3847e6f085baSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 3848e6f085baSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 3849ff89ac2bSmrg 3850e6f085baSmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 3851e6f085baSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 3852e6f085baSmrgAC_LIBTOOL_PROG_CC_C_O($1) 3853e6f085baSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3854e6f085baSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 3855e6f085baSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3856e6f085baSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3857ff89ac2bSmrg 3858e6f085baSmrgAC_LIBTOOL_CONFIG($1) 385995b296d0Smrg 3860e6f085baSmrgAC_LANG_POP 3861e6f085baSmrgCC=$lt_save_CC 3862e6f085baSmrgLDCXX=$LD 3863e6f085baSmrgLD=$lt_save_LD 3864e6f085baSmrgGCC=$lt_save_GCC 3865e6f085baSmrgwith_gnu_ldcxx=$with_gnu_ld 3866e6f085baSmrgwith_gnu_ld=$lt_save_with_gnu_ld 3867e6f085baSmrglt_cv_path_LDCXX=$lt_cv_path_LD 3868e6f085baSmrglt_cv_path_LD=$lt_save_path_LD 3869e6f085baSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 3870e6f085baSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 3871e6f085baSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG 3872e6f085baSmrg 3873e6f085baSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 3874e6f085baSmrg# ------------------------------------ 3875e6f085baSmrg# Figure out "hidden" library dependencies from verbose 3876e6f085baSmrg# compiler output when linking a shared library. 3877e6f085baSmrg# Parse the compiler output and extract the necessary 3878e6f085baSmrg# objects, libraries and library flags. 3879e6f085baSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 3880e6f085baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 3881e6f085baSmrgdnl we can't use the lt_simple_compile_test_code here, 3882e6f085baSmrgdnl because it contains code intended for an executable, 3883e6f085baSmrgdnl not a library. It's possible we should let each 3884e6f085baSmrgdnl tag define a new lt_????_link_test_code variable, 3885e6f085baSmrgdnl but it's only used here... 3886e6f085baSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 3887e6f085baSmrgint a; 3888e6f085baSmrgvoid foo (void) { a = 0; } 3889e6f085baSmrgEOF 3890e6f085baSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 3891e6f085baSmrgclass Foo 3892e6f085baSmrg{ 3893e6f085baSmrgpublic: 3894e6f085baSmrg Foo (void) { a = 0; } 3895e6f085baSmrgprivate: 3896e6f085baSmrg int a; 3897e6f085baSmrg}; 3898e6f085baSmrgEOF 3899e6f085baSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 3900e6f085baSmrg subroutine foo 3901e6f085baSmrg implicit none 3902e6f085baSmrg integer*4 a 3903e6f085baSmrg a=0 3904e6f085baSmrg return 3905e6f085baSmrg end 3906e6f085baSmrgEOF 3907e6f085baSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 3908e6f085baSmrgpublic class foo { 3909e6f085baSmrg private int a; 3910e6f085baSmrg public void bar (void) { 3911e6f085baSmrg a = 0; 3912e6f085baSmrg } 3913e6f085baSmrg}; 3914e6f085baSmrgEOF 3915e6f085baSmrg]) 3916e6f085baSmrgdnl Parse the compiler output and extract the necessary 3917e6f085baSmrgdnl objects, libraries and library flags. 3918e6f085baSmrgif AC_TRY_EVAL(ac_compile); then 3919e6f085baSmrg # Parse the compiler output and extract the necessary 3920e6f085baSmrg # objects, libraries and library flags. 392195b296d0Smrg 3922e6f085baSmrg # Sentinel used to keep track of whether or not we are before 3923e6f085baSmrg # the conftest object file. 3924e6f085baSmrg pre_test_object_deps_done=no 392595b296d0Smrg 3926e6f085baSmrg # The `*' in the case matches for architectures that use `case' in 3927e6f085baSmrg # $output_verbose_cmd can trigger glob expansion during the loop 3928e6f085baSmrg # eval without this substitution. 3929e6f085baSmrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 393095b296d0Smrg 3931e6f085baSmrg for p in `eval $output_verbose_link_cmd`; do 3932e6f085baSmrg case $p in 393395b296d0Smrg 3934e6f085baSmrg -L* | -R* | -l*) 3935e6f085baSmrg # Some compilers place space between "-{L,R}" and the path. 3936e6f085baSmrg # Remove the space. 3937e6f085baSmrg if test $p = "-L" \ 3938e6f085baSmrg || test $p = "-R"; then 3939e6f085baSmrg prev=$p 3940e6f085baSmrg continue 3941e6f085baSmrg else 3942e6f085baSmrg prev= 3943e6f085baSmrg fi 394495b296d0Smrg 3945e6f085baSmrg if test "$pre_test_object_deps_done" = no; then 3946e6f085baSmrg case $p in 3947e6f085baSmrg -L* | -R*) 3948e6f085baSmrg # Internal compiler library paths should come after those 3949e6f085baSmrg # provided the user. The postdeps already come after the 3950e6f085baSmrg # user supplied libs so there is no need to process them. 3951e6f085baSmrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 3952e6f085baSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 3953e6f085baSmrg else 3954e6f085baSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 3955e6f085baSmrg fi 3956e6f085baSmrg ;; 3957e6f085baSmrg # The "-l" case would never come before the object being 3958e6f085baSmrg # linked, so don't bother handling this case. 3959e6f085baSmrg esac 3960e6f085baSmrg else 3961e6f085baSmrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 3962e6f085baSmrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 3963e6f085baSmrg else 3964e6f085baSmrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 3965e6f085baSmrg fi 3966e6f085baSmrg fi 3967e6f085baSmrg ;; 396895b296d0Smrg 3969e6f085baSmrg *.$objext) 3970e6f085baSmrg # This assumes that the test object file only shows up 3971e6f085baSmrg # once in the compiler output. 3972e6f085baSmrg if test "$p" = "conftest.$objext"; then 3973e6f085baSmrg pre_test_object_deps_done=yes 3974e6f085baSmrg continue 3975e6f085baSmrg fi 397695b296d0Smrg 3977e6f085baSmrg if test "$pre_test_object_deps_done" = no; then 3978e6f085baSmrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 3979e6f085baSmrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 3980e6f085baSmrg else 3981e6f085baSmrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 3982e6f085baSmrg fi 3983e6f085baSmrg else 3984e6f085baSmrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 3985e6f085baSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 3986e6f085baSmrg else 3987e6f085baSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 3988e6f085baSmrg fi 3989e6f085baSmrg fi 3990e6f085baSmrg ;; 3991e6f085baSmrg 3992e6f085baSmrg *) ;; # Ignore the rest. 399395b296d0Smrg 399439713583Smrg esac 3995e6f085baSmrg done 399695b296d0Smrg 3997e6f085baSmrg # Clean up. 3998e6f085baSmrg rm -f a.out a.exe 3999e6f085baSmrgelse 4000e6f085baSmrg echo "libtool.m4: error: problem compiling $1 test program" 400139713583Smrgfi 400295b296d0Smrg 4003e6f085baSmrg$rm -f confest.$objext 400495b296d0Smrg 4005e6f085baSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 4006e6f085baSmrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 4007e6f085baSmrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 4008e6f085baSmrgfi 400995b296d0Smrg 4010e6f085baSmrg# PORTME: override above test on systems where it is broken 4011e6f085baSmrgifelse([$1],[CXX], 4012e6f085baSmrg[case $host_os in 4013e6f085baSmrginterix[[3-9]]*) 4014e6f085baSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 4015e6f085baSmrg # hack all around it, let's just trust "g++" to DTRT. 4016e6f085baSmrg _LT_AC_TAGVAR(predep_objects,$1)= 4017e6f085baSmrg _LT_AC_TAGVAR(postdep_objects,$1)= 4018e6f085baSmrg _LT_AC_TAGVAR(postdeps,$1)= 4019e6f085baSmrg ;; 4020e6f085baSmrg 4021e6f085baSmrglinux*) 4022e6f085baSmrg case `$CC -V 2>&1 | sed 5q` in 4023e6f085baSmrg *Sun\ C*) 4024e6f085baSmrg # Sun C++ 5.9 4025e6f085baSmrg # 4026e6f085baSmrg # The more standards-conforming stlport4 library is 4027e6f085baSmrg # incompatible with the Cstd library. Avoid specifying 4028e6f085baSmrg # it if it's in CXXFLAGS. Ignore libCrun as 4029e6f085baSmrg # -library=stlport4 depends on it. 4030e6f085baSmrg case " $CXX $CXXFLAGS " in 4031e6f085baSmrg *" -library=stlport4 "*) 4032e6f085baSmrg solaris_use_stlport4=yes 4033e6f085baSmrg ;; 4034e6f085baSmrg esac 4035e6f085baSmrg if test "$solaris_use_stlport4" != yes; then 4036e6f085baSmrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 403739713583Smrg fi 403839713583Smrg ;; 403939713583Smrg esac 4040e6f085baSmrg ;; 404195b296d0Smrg 4042e6f085baSmrgsolaris*) 4043e6f085baSmrg case $cc_basename in 4044e6f085baSmrg CC*) 4045e6f085baSmrg # The more standards-conforming stlport4 library is 4046e6f085baSmrg # incompatible with the Cstd library. Avoid specifying 4047e6f085baSmrg # it if it's in CXXFLAGS. Ignore libCrun as 4048e6f085baSmrg # -library=stlport4 depends on it. 4049e6f085baSmrg case " $CXX $CXXFLAGS " in 4050e6f085baSmrg *" -library=stlport4 "*) 4051e6f085baSmrg solaris_use_stlport4=yes 4052e6f085baSmrg ;; 4053e6f085baSmrg esac 4054e6f085baSmrg 4055e6f085baSmrg # Adding this requires a known-good setup of shared libraries for 4056e6f085baSmrg # Sun compiler versions before 5.6, else PIC objects from an old 4057e6f085baSmrg # archive will be linked into the output, leading to subtle bugs. 4058e6f085baSmrg if test "$solaris_use_stlport4" != yes; then 4059e6f085baSmrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 406039713583Smrg fi 406139713583Smrg ;; 406239713583Smrg esac 4063e6f085baSmrg ;; 4064e6f085baSmrgesac 4065e6f085baSmrg]) 4066e6f085baSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 4067e6f085baSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 4068e6f085baSmrgesac 4069e6f085baSmrg])# AC_LIBTOOL_POSTDEP_PREDEP 407095b296d0Smrg 4071e6f085baSmrg# AC_LIBTOOL_LANG_F77_CONFIG 4072e6f085baSmrg# -------------------------- 4073e6f085baSmrg# Ensure that the configuration vars for the C compiler are 4074e6f085baSmrg# suitably defined. Those variables are subsequently used by 4075e6f085baSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4076e6f085baSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 4077e6f085baSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 4078e6f085baSmrg[AC_REQUIRE([AC_PROG_F77]) 4079e6f085baSmrgAC_LANG_PUSH(Fortran 77) 408095b296d0Smrg 4081e6f085baSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4082e6f085baSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4083e6f085baSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 4084e6f085baSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4085e6f085baSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4086e6f085baSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 4087e6f085baSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4088e6f085baSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4089e6f085baSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4090e6f085baSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4091e6f085baSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4092e6f085baSmrg_LT_AC_TAGVAR(module_cmds, $1)= 4093e6f085baSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4094e6f085baSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4095e6f085baSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4096e6f085baSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 4097e6f085baSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4098e6f085baSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 409995b296d0Smrg 4100e6f085baSmrg# Source file extension for f77 test sources. 4101e6f085baSmrgac_ext=f 410295b296d0Smrg 4103e6f085baSmrg# Object file extension for compiled f77 test sources. 4104e6f085baSmrgobjext=o 4105e6f085baSmrg_LT_AC_TAGVAR(objext, $1)=$objext 410695b296d0Smrg 4107e6f085baSmrg# Code to be used in simple compile tests 4108e6f085baSmrglt_simple_compile_test_code="\ 4109e6f085baSmrg subroutine t 4110e6f085baSmrg return 4111e6f085baSmrg end 4112e6f085baSmrg" 411395b296d0Smrg 4114e6f085baSmrg# Code to be used in simple link tests 4115e6f085baSmrglt_simple_link_test_code="\ 4116e6f085baSmrg program t 4117e6f085baSmrg end 4118e6f085baSmrg" 411995b296d0Smrg 4120e6f085baSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4121e6f085baSmrg_LT_AC_SYS_COMPILER 412295b296d0Smrg 4123e6f085baSmrg# save warnings/boilerplate of simple test code 4124e6f085baSmrg_LT_COMPILER_BOILERPLATE 4125e6f085baSmrg_LT_LINKER_BOILERPLATE 412695b296d0Smrg 4127e6f085baSmrg# Allow CC to be a program name with arguments. 4128e6f085baSmrglt_save_CC="$CC" 4129e6f085baSmrgCC=${F77-"f77"} 4130e6f085baSmrgcompiler=$CC 4131e6f085baSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 4132e6f085baSmrg_LT_CC_BASENAME([$compiler]) 413395b296d0Smrg 4134e6f085baSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 4135e6f085baSmrgAC_MSG_RESULT([$can_build_shared]) 413695b296d0Smrg 4137e6f085baSmrgAC_MSG_CHECKING([whether to build shared libraries]) 4138e6f085baSmrgtest "$can_build_shared" = "no" && enable_shared=no 413995b296d0Smrg 4140e6f085baSmrg# On AIX, shared libraries and static libraries use the same namespace, and 4141e6f085baSmrg# are all built from PIC. 4142e6f085baSmrgcase $host_os in 4143e6f085baSmrgaix3*) 4144e6f085baSmrg test "$enable_shared" = yes && enable_static=no 4145e6f085baSmrg if test -n "$RANLIB"; then 4146e6f085baSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 4147e6f085baSmrg postinstall_cmds='$RANLIB $lib' 4148e6f085baSmrg fi 4149e6f085baSmrg ;; 4150e6f085baSmrgaix[[4-9]]*) 4151e6f085baSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 4152e6f085baSmrg test "$enable_shared" = yes && enable_static=no 4153e6f085baSmrg fi 4154e6f085baSmrg ;; 4155e6f085baSmrgesac 4156e6f085baSmrgAC_MSG_RESULT([$enable_shared]) 415795b296d0Smrg 4158e6f085baSmrgAC_MSG_CHECKING([whether to build static libraries]) 4159e6f085baSmrg# Make sure either enable_shared or enable_static is yes. 4160e6f085baSmrgtest "$enable_shared" = yes || enable_static=yes 4161e6f085baSmrgAC_MSG_RESULT([$enable_static]) 416295b296d0Smrg 4163e6f085baSmrg_LT_AC_TAGVAR(GCC, $1)="$G77" 4164e6f085baSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 416595b296d0Smrg 4166e6f085baSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4167e6f085baSmrgAC_LIBTOOL_PROG_CC_C_O($1) 4168e6f085baSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4169e6f085baSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4170e6f085baSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4171e6f085baSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 417295b296d0Smrg 4173e6f085baSmrgAC_LIBTOOL_CONFIG($1) 417495b296d0Smrg 4175e6f085baSmrgAC_LANG_POP 4176e6f085baSmrgCC="$lt_save_CC" 4177e6f085baSmrg])# AC_LIBTOOL_LANG_F77_CONFIG 417895b296d0Smrg 417995b296d0Smrg 4180e6f085baSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG 4181e6f085baSmrg# -------------------------- 4182e6f085baSmrg# Ensure that the configuration vars for the C compiler are 4183e6f085baSmrg# suitably defined. Those variables are subsequently used by 4184e6f085baSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4185e6f085baSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 4186e6f085baSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 4187e6f085baSmrg[AC_LANG_SAVE 418895b296d0Smrg 4189e6f085baSmrg# Source file extension for Java test sources. 4190e6f085baSmrgac_ext=java 419139713583Smrg 4192e6f085baSmrg# Object file extension for compiled Java test sources. 4193e6f085baSmrgobjext=o 4194e6f085baSmrg_LT_AC_TAGVAR(objext, $1)=$objext 419595b296d0Smrg 4196e6f085baSmrg# Code to be used in simple compile tests 4197e6f085baSmrglt_simple_compile_test_code="class foo {}" 419895b296d0Smrg 4199e6f085baSmrg# Code to be used in simple link tests 4200e6f085baSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 420195b296d0Smrg 4202e6f085baSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4203e6f085baSmrg_LT_AC_SYS_COMPILER 420495b296d0Smrg 4205e6f085baSmrg# save warnings/boilerplate of simple test code 4206e6f085baSmrg_LT_COMPILER_BOILERPLATE 4207e6f085baSmrg_LT_LINKER_BOILERPLATE 420895b296d0Smrg 4209e6f085baSmrg# Allow CC to be a program name with arguments. 4210e6f085baSmrglt_save_CC="$CC" 4211e6f085baSmrgCC=${GCJ-"gcj"} 4212e6f085baSmrgcompiler=$CC 4213e6f085baSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 4214e6f085baSmrg_LT_CC_BASENAME([$compiler]) 421595b296d0Smrg 4216e6f085baSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 4217e6f085baSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 421895b296d0Smrg 4219e6f085baSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 422095b296d0Smrg 4221e6f085baSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4222e6f085baSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4223e6f085baSmrgAC_LIBTOOL_PROG_CC_C_O($1) 4224e6f085baSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4225e6f085baSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4226e6f085baSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4227e6f085baSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 422895b296d0Smrg 4229e6f085baSmrgAC_LIBTOOL_CONFIG($1) 423095b296d0Smrg 4231e6f085baSmrgAC_LANG_RESTORE 4232e6f085baSmrgCC="$lt_save_CC" 4233e6f085baSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 423495b296d0Smrg 423595b296d0Smrg 4236e6f085baSmrg# AC_LIBTOOL_LANG_RC_CONFIG 4237e6f085baSmrg# ------------------------- 4238e6f085baSmrg# Ensure that the configuration vars for the Windows resource compiler are 4239e6f085baSmrg# suitably defined. Those variables are subsequently used by 4240e6f085baSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4241e6f085baSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 4242e6f085baSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 4243e6f085baSmrg[AC_LANG_SAVE 424495b296d0Smrg 4245e6f085baSmrg# Source file extension for RC test sources. 4246e6f085baSmrgac_ext=rc 424795b296d0Smrg 4248e6f085baSmrg# Object file extension for compiled RC test sources. 4249e6f085baSmrgobjext=o 4250e6f085baSmrg_LT_AC_TAGVAR(objext, $1)=$objext 425195b296d0Smrg 4252e6f085baSmrg# Code to be used in simple compile tests 4253e6f085baSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 425495b296d0Smrg 4255e6f085baSmrg# Code to be used in simple link tests 4256e6f085baSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 425795b296d0Smrg 4258e6f085baSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4259e6f085baSmrg_LT_AC_SYS_COMPILER 426095b296d0Smrg 4261e6f085baSmrg# save warnings/boilerplate of simple test code 4262e6f085baSmrg_LT_COMPILER_BOILERPLATE 4263e6f085baSmrg_LT_LINKER_BOILERPLATE 426495b296d0Smrg 4265e6f085baSmrg# Allow CC to be a program name with arguments. 4266e6f085baSmrglt_save_CC="$CC" 4267e6f085baSmrgCC=${RC-"windres"} 4268e6f085baSmrgcompiler=$CC 4269e6f085baSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 4270e6f085baSmrg_LT_CC_BASENAME([$compiler]) 4271e6f085baSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 427295b296d0Smrg 4273e6f085baSmrgAC_LIBTOOL_CONFIG($1) 427495b296d0Smrg 4275e6f085baSmrgAC_LANG_RESTORE 4276e6f085baSmrgCC="$lt_save_CC" 4277e6f085baSmrg])# AC_LIBTOOL_LANG_RC_CONFIG 427895b296d0Smrg 427995b296d0Smrg 4280e6f085baSmrg# AC_LIBTOOL_CONFIG([TAGNAME]) 4281e6f085baSmrg# ---------------------------- 4282e6f085baSmrg# If TAGNAME is not passed, then create an initial libtool script 4283e6f085baSmrg# with a default configuration from the untagged config vars. Otherwise 4284e6f085baSmrg# add code to config.status for appending the configuration named by 4285e6f085baSmrg# TAGNAME from the matching tagged config vars. 4286e6f085baSmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 4287e6f085baSmrg[# The else clause should only fire when bootstrapping the 4288e6f085baSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh 4289e6f085baSmrg# with your package, and you will get complaints that there are 4290e6f085baSmrg# no rules to generate ltmain.sh. 4291e6f085baSmrgif test -f "$ltmain"; then 4292e6f085baSmrg # See if we are running on zsh, and set the options which allow our commands through 4293e6f085baSmrg # without removal of \ escapes. 4294e6f085baSmrg if test -n "${ZSH_VERSION+set}" ; then 4295e6f085baSmrg setopt NO_GLOB_SUBST 4296e6f085baSmrg fi 4297e6f085baSmrg # Now quote all the things that may contain metacharacters while being 4298e6f085baSmrg # careful not to overquote the AC_SUBSTed values. We take copies of the 4299e6f085baSmrg # variables and quote the copies for generation of the libtool script. 4300e6f085baSmrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 4301e6f085baSmrg SED SHELL STRIP \ 4302e6f085baSmrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 4303e6f085baSmrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 4304e6f085baSmrg deplibs_check_method reload_flag reload_cmds need_locks \ 4305e6f085baSmrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 4306e6f085baSmrg lt_cv_sys_global_symbol_to_c_name_address \ 4307e6f085baSmrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4308e6f085baSmrg old_postinstall_cmds old_postuninstall_cmds \ 4309e6f085baSmrg _LT_AC_TAGVAR(compiler, $1) \ 4310e6f085baSmrg _LT_AC_TAGVAR(CC, $1) \ 4311e6f085baSmrg _LT_AC_TAGVAR(LD, $1) \ 4312e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4313e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4314e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4315e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4316e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4317e6f085baSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4318e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4319e6f085baSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4320e6f085baSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4321e6f085baSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4322e6f085baSmrg _LT_AC_TAGVAR(predep_objects, $1) \ 4323e6f085baSmrg _LT_AC_TAGVAR(postdep_objects, $1) \ 4324e6f085baSmrg _LT_AC_TAGVAR(predeps, $1) \ 4325e6f085baSmrg _LT_AC_TAGVAR(postdeps, $1) \ 4326e6f085baSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4327e6f085baSmrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 4328e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1) \ 4329e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4330e6f085baSmrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4331e6f085baSmrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4332e6f085baSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 4333e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 4334e6f085baSmrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 4335e6f085baSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 4336e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 4337e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 4338e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 4339e6f085baSmrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 4340e6f085baSmrg _LT_AC_TAGVAR(module_cmds, $1) \ 4341e6f085baSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 4342e6f085baSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 4343e6f085baSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 4344e6f085baSmrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 4345e6f085baSmrg _LT_AC_TAGVAR(include_expsyms, $1); do 4346e6f085baSmrg 4347e6f085baSmrg case $var in 4348e6f085baSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 4349e6f085baSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 4350e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 4351e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 4352e6f085baSmrg _LT_AC_TAGVAR(module_cmds, $1) | \ 4353e6f085baSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 4354e6f085baSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 4355e6f085baSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 4356e6f085baSmrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 4357e6f085baSmrg postinstall_cmds | postuninstall_cmds | \ 4358e6f085baSmrg old_postinstall_cmds | old_postuninstall_cmds | \ 4359e6f085baSmrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 4360e6f085baSmrg # Double-quote double-evaled strings. 4361e6f085baSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 436239713583Smrg ;; 4363e6f085baSmrg *) 4364e6f085baSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 436539713583Smrg ;; 4366e6f085baSmrg esac 4367e6f085baSmrg done 436895b296d0Smrg 4369e6f085baSmrg case $lt_echo in 4370e6f085baSmrg *'\[$]0 --fallback-echo"') 4371e6f085baSmrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 4372e6f085baSmrg ;; 4373e6f085baSmrg esac 437495b296d0Smrg 4375e6f085baSmrgifelse([$1], [], 4376e6f085baSmrg [cfgfile="${ofile}T" 4377e6f085baSmrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 4378e6f085baSmrg $rm -f "$cfgfile" 4379e6f085baSmrg AC_MSG_NOTICE([creating $ofile])], 4380e6f085baSmrg [cfgfile="$ofile"]) 438195b296d0Smrg 4382e6f085baSmrg cat <<__EOF__ >> "$cfgfile" 4383e6f085baSmrgifelse([$1], [], 4384e6f085baSmrg[#! $SHELL 438595b296d0Smrg 4386e6f085baSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 4387e6f085baSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 4388e6f085baSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4389e6f085baSmrg# 4390e6f085baSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 4391e6f085baSmrg# Free Software Foundation, Inc. 4392e6f085baSmrg# 4393e6f085baSmrg# This file is part of GNU Libtool: 4394e6f085baSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4395e6f085baSmrg# 4396e6f085baSmrg# This program is free software; you can redistribute it and/or modify 4397e6f085baSmrg# it under the terms of the GNU General Public License as published by 4398e6f085baSmrg# the Free Software Foundation; either version 2 of the License, or 4399e6f085baSmrg# (at your option) any later version. 4400e6f085baSmrg# 4401e6f085baSmrg# This program is distributed in the hope that it will be useful, but 4402e6f085baSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 4403e6f085baSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4404e6f085baSmrg# General Public License for more details. 4405e6f085baSmrg# 4406e6f085baSmrg# You should have received a copy of the GNU General Public License 4407e6f085baSmrg# along with this program; if not, write to the Free Software 4408e6f085baSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 4409e6f085baSmrg# 4410e6f085baSmrg# As a special exception to the GNU General Public License, if you 4411e6f085baSmrg# distribute this file as part of a program that contains a 4412e6f085baSmrg# configuration script generated by Autoconf, you may include it under 4413e6f085baSmrg# the same distribution terms that you use for the rest of that program. 441495b296d0Smrg 4415e6f085baSmrg# A sed program that does not truncate output. 4416e6f085baSmrgSED=$lt_SED 441795b296d0Smrg 4418e6f085baSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 4419e6f085baSmrgXsed="$SED -e 1s/^X//" 442095b296d0Smrg 4421e6f085baSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 4422e6f085baSmrg# if CDPATH is set. 4423e6f085baSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 442495b296d0Smrg 4425e6f085baSmrg# The names of the tagged configurations supported by this script. 4426e6f085baSmrgavailable_tags= 442795b296d0Smrg 4428e6f085baSmrg# ### BEGIN LIBTOOL CONFIG], 4429e6f085baSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 443095b296d0Smrg 4431e6f085baSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 443295b296d0Smrg 4433e6f085baSmrg# Shell to use when invoking shell scripts. 4434e6f085baSmrgSHELL=$lt_SHELL 443595b296d0Smrg 4436e6f085baSmrg# Whether or not to build shared libraries. 4437e6f085baSmrgbuild_libtool_libs=$enable_shared 443895b296d0Smrg 4439e6f085baSmrg# Whether or not to build static libraries. 4440e6f085baSmrgbuild_old_libs=$enable_static 444195b296d0Smrg 4442e6f085baSmrg# Whether or not to add -lc for building shared libraries. 4443e6f085baSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 444495b296d0Smrg 4445e6f085baSmrg# Whether or not to disallow shared libs when runtime libs are static 4446e6f085baSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 444795b296d0Smrg 4448e6f085baSmrg# Whether or not to optimize for fast installation. 4449e6f085baSmrgfast_install=$enable_fast_install 445095b296d0Smrg 4451e6f085baSmrg# The host system. 4452e6f085baSmrghost_alias=$host_alias 4453e6f085baSmrghost=$host 4454e6f085baSmrghost_os=$host_os 445595b296d0Smrg 4456e6f085baSmrg# The build system. 4457e6f085baSmrgbuild_alias=$build_alias 4458e6f085baSmrgbuild=$build 4459e6f085baSmrgbuild_os=$build_os 446095b296d0Smrg 4461e6f085baSmrg# An echo program that does not interpret backslashes. 4462e6f085baSmrgecho=$lt_echo 446395b296d0Smrg 4464e6f085baSmrg# The archiver. 4465e6f085baSmrgAR=$lt_AR 4466e6f085baSmrgAR_FLAGS=$lt_AR_FLAGS 446795b296d0Smrg 4468e6f085baSmrg# A C compiler. 4469e6f085baSmrgLTCC=$lt_LTCC 447095b296d0Smrg 4471e6f085baSmrg# LTCC compiler flags. 4472e6f085baSmrgLTCFLAGS=$lt_LTCFLAGS 447395b296d0Smrg 4474e6f085baSmrg# A language-specific compiler. 4475e6f085baSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 447695b296d0Smrg 4477e6f085baSmrg# Is the compiler the GNU C compiler? 4478e6f085baSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 447995b296d0Smrg 4480e6f085baSmrg# An ERE matcher. 4481e6f085baSmrgEGREP=$lt_EGREP 448295b296d0Smrg 4483e6f085baSmrg# The linker used to build libraries. 4484e6f085baSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 448595b296d0Smrg 4486e6f085baSmrg# Whether we need hard or soft links. 4487e6f085baSmrgLN_S=$lt_LN_S 448895b296d0Smrg 4489e6f085baSmrg# A BSD-compatible nm program. 4490e6f085baSmrgNM=$lt_NM 449195b296d0Smrg 4492e6f085baSmrg# A symbol stripping program 4493e6f085baSmrgSTRIP=$lt_STRIP 449495b296d0Smrg 4495e6f085baSmrg# Used to examine libraries when file_magic_cmd begins "file" 4496e6f085baSmrgMAGIC_CMD=$MAGIC_CMD 449795b296d0Smrg 4498e6f085baSmrg# Used on cygwin: DLL creation program. 4499e6f085baSmrgDLLTOOL="$DLLTOOL" 450095b296d0Smrg 4501e6f085baSmrg# Used on cygwin: object dumper. 4502e6f085baSmrgOBJDUMP="$OBJDUMP" 450395b296d0Smrg 4504e6f085baSmrg# Used on cygwin: assembler. 4505e6f085baSmrgAS="$AS" 450695b296d0Smrg 4507e6f085baSmrg# The name of the directory that contains temporary libtool files. 4508e6f085baSmrgobjdir=$objdir 450995b296d0Smrg 4510e6f085baSmrg# How to create reloadable object files. 4511e6f085baSmrgreload_flag=$lt_reload_flag 4512e6f085baSmrgreload_cmds=$lt_reload_cmds 451395b296d0Smrg 4514e6f085baSmrg# How to pass a linker flag through the compiler. 4515e6f085baSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 451695b296d0Smrg 4517e6f085baSmrg# Object file suffix (normally "o"). 4518e6f085baSmrgobjext="$ac_objext" 451995b296d0Smrg 4520e6f085baSmrg# Old archive suffix (normally "a"). 4521e6f085baSmrglibext="$libext" 452295b296d0Smrg 4523e6f085baSmrg# Shared library suffix (normally ".so"). 4524e6f085baSmrgshrext_cmds='$shrext_cmds' 4525ff89ac2bSmrg 4526e6f085baSmrg# Executable file suffix (normally ""). 4527e6f085baSmrgexeext="$exeext" 452895b296d0Smrg 4529e6f085baSmrg# Additional compiler flags for building library objects. 4530e6f085baSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 4531e6f085baSmrgpic_mode=$pic_mode 453295b296d0Smrg 4533e6f085baSmrg# What is the maximum length of a command? 4534e6f085baSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 453595b296d0Smrg 4536e6f085baSmrg# Does compiler simultaneously support -c and -o options? 4537e6f085baSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 453895b296d0Smrg 4539e6f085baSmrg# Must we lock files when doing compilation? 4540e6f085baSmrgneed_locks=$lt_need_locks 454195b296d0Smrg 4542e6f085baSmrg# Do we need the lib prefix for modules? 4543e6f085baSmrgneed_lib_prefix=$need_lib_prefix 454495b296d0Smrg 4545e6f085baSmrg# Do we need a version for libraries? 4546e6f085baSmrgneed_version=$need_version 454795b296d0Smrg 4548e6f085baSmrg# Whether dlopen is supported. 4549e6f085baSmrgdlopen_support=$enable_dlopen 455095b296d0Smrg 4551e6f085baSmrg# Whether dlopen of programs is supported. 4552e6f085baSmrgdlopen_self=$enable_dlopen_self 455395b296d0Smrg 4554e6f085baSmrg# Whether dlopen of statically linked programs is supported. 4555e6f085baSmrgdlopen_self_static=$enable_dlopen_self_static 455695b296d0Smrg 4557e6f085baSmrg# Compiler flag to prevent dynamic linking. 4558e6f085baSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 455995b296d0Smrg 4560e6f085baSmrg# Compiler flag to turn off builtin functions. 4561e6f085baSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 456295b296d0Smrg 4563e6f085baSmrg# Compiler flag to allow reflexive dlopens. 4564e6f085baSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 456595b296d0Smrg 4566e6f085baSmrg# Compiler flag to generate shared objects directly from archives. 4567e6f085baSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 456895b296d0Smrg 4569e6f085baSmrg# Compiler flag to generate thread-safe objects. 4570e6f085baSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 457195b296d0Smrg 4572e6f085baSmrg# Library versioning type. 4573e6f085baSmrgversion_type=$version_type 457495b296d0Smrg 4575e6f085baSmrg# Format of library name prefix. 4576e6f085baSmrglibname_spec=$lt_libname_spec 457795b296d0Smrg 4578e6f085baSmrg# List of archive names. First name is the real one, the rest are links. 4579e6f085baSmrg# The last name is the one that the linker finds with -lNAME. 4580e6f085baSmrglibrary_names_spec=$lt_library_names_spec 458195b296d0Smrg 4582e6f085baSmrg# The coded name of the library, if different from the real name. 4583e6f085baSmrgsoname_spec=$lt_soname_spec 458495b296d0Smrg 4585e6f085baSmrg# Commands used to build and install an old-style archive. 4586e6f085baSmrgRANLIB=$lt_RANLIB 4587e6f085baSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 4588e6f085baSmrgold_postinstall_cmds=$lt_old_postinstall_cmds 4589e6f085baSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 459095b296d0Smrg 4591e6f085baSmrg# Create an old-style archive from a shared archive. 4592e6f085baSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 459395b296d0Smrg 4594e6f085baSmrg# Create a temporary old-style archive to link instead of a shared archive. 4595e6f085baSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 459695b296d0Smrg 4597e6f085baSmrg# Commands used to build and install a shared archive. 4598e6f085baSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 4599e6f085baSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 4600e6f085baSmrgpostinstall_cmds=$lt_postinstall_cmds 4601e6f085baSmrgpostuninstall_cmds=$lt_postuninstall_cmds 460295b296d0Smrg 4603e6f085baSmrg# Commands used to build a loadable module (assumed same as above if empty) 4604e6f085baSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 4605e6f085baSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 460695b296d0Smrg 4607e6f085baSmrg# Commands to strip libraries. 4608e6f085baSmrgold_striplib=$lt_old_striplib 4609e6f085baSmrgstriplib=$lt_striplib 461095b296d0Smrg 4611e6f085baSmrg# Dependencies to place before the objects being linked to create a 4612e6f085baSmrg# shared library. 4613e6f085baSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 461495b296d0Smrg 4615e6f085baSmrg# Dependencies to place after the objects being linked to create a 4616e6f085baSmrg# shared library. 4617e6f085baSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 461895b296d0Smrg 4619e6f085baSmrg# Dependencies to place before the objects being linked to create a 4620e6f085baSmrg# shared library. 4621e6f085baSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 462295b296d0Smrg 4623e6f085baSmrg# Dependencies to place after the objects being linked to create a 4624e6f085baSmrg# shared library. 4625e6f085baSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 462695b296d0Smrg 4627e6f085baSmrg# The directories searched by this compiler when creating a shared 4628e6f085baSmrg# library 4629e6f085baSmrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 463095b296d0Smrg 4631e6f085baSmrg# The library search path used internally by the compiler when linking 4632e6f085baSmrg# a shared library. 4633e6f085baSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 463495b296d0Smrg 4635e6f085baSmrg# Method to check whether dependent libraries are shared objects. 4636e6f085baSmrgdeplibs_check_method=$lt_deplibs_check_method 463795b296d0Smrg 4638e6f085baSmrg# Command to use when deplibs_check_method == file_magic. 4639e6f085baSmrgfile_magic_cmd=$lt_file_magic_cmd 464095b296d0Smrg 4641e6f085baSmrg# Flag that allows shared libraries with undefined symbols to be built. 4642e6f085baSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 464395b296d0Smrg 4644e6f085baSmrg# Flag that forces no undefined symbols. 4645e6f085baSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 464695b296d0Smrg 4647e6f085baSmrg# Commands used to finish a libtool library installation in a directory. 4648e6f085baSmrgfinish_cmds=$lt_finish_cmds 464995b296d0Smrg 4650e6f085baSmrg# Same as above, but a single script fragment to be evaled but not shown. 4651e6f085baSmrgfinish_eval=$lt_finish_eval 465295b296d0Smrg 4653e6f085baSmrg# Take the output of nm and produce a listing of raw symbols and C names. 4654e6f085baSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 465595b296d0Smrg 4656e6f085baSmrg# Transform the output of nm in a proper C declaration 4657e6f085baSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 465895b296d0Smrg 4659e6f085baSmrg# Transform the output of nm in a C name address pair 4660e6f085baSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 466195b296d0Smrg 4662e6f085baSmrg# This is the shared library runtime path variable. 4663e6f085baSmrgrunpath_var=$runpath_var 466495b296d0Smrg 4665e6f085baSmrg# This is the shared library path variable. 4666e6f085baSmrgshlibpath_var=$shlibpath_var 466795b296d0Smrg 4668e6f085baSmrg# Is shlibpath searched before the hard-coded library search path? 4669e6f085baSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 467095b296d0Smrg 4671e6f085baSmrg# How to hardcode a shared library path into an executable. 4672e6f085baSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 467395b296d0Smrg 4674e6f085baSmrg# Whether we should hardcode library paths into libraries. 4675e6f085baSmrghardcode_into_libs=$hardcode_into_libs 467695b296d0Smrg 4677e6f085baSmrg# Flag to hardcode \$libdir into a binary during linking. 4678e6f085baSmrg# This must work even if \$libdir does not exist. 4679e6f085baSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 468095b296d0Smrg 4681e6f085baSmrg# If ld is used when linking, flag to hardcode \$libdir into 4682e6f085baSmrg# a binary during linking. This must work even if \$libdir does 4683e6f085baSmrg# not exist. 4684e6f085baSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 468595b296d0Smrg 4686e6f085baSmrg# Whether we need a single -rpath flag with a separated argument. 4687e6f085baSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 468895b296d0Smrg 4689e6f085baSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 4690e6f085baSmrg# resulting binary. 4691e6f085baSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 469295b296d0Smrg 4693e6f085baSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 4694e6f085baSmrg# resulting binary. 4695e6f085baSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 469695b296d0Smrg 4697e6f085baSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 4698e6f085baSmrg# the resulting binary. 4699e6f085baSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 470095b296d0Smrg 4701e6f085baSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library 4702e6f085baSmrg# and all subsequent libraries and executables linked against it. 4703e6f085baSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 470495b296d0Smrg 4705e6f085baSmrg# Variables whose values should be saved in libtool wrapper scripts and 4706e6f085baSmrg# restored at relink time. 4707e6f085baSmrgvariables_saved_for_relink="$variables_saved_for_relink" 470895b296d0Smrg 4709e6f085baSmrg# Whether libtool must link a program against all its dependency libraries. 4710e6f085baSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 471195b296d0Smrg 4712e6f085baSmrg# Compile-time system search path for libraries 4713e6f085baSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 471495b296d0Smrg 4715e6f085baSmrg# Run-time system search path for libraries 4716e6f085baSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 471795b296d0Smrg 4718e6f085baSmrg# Fix the shell variable \$srcfile for the compiler. 4719e6f085baSmrgfix_srcfile_path=$lt_fix_srcfile_path 472095b296d0Smrg 4721e6f085baSmrg# Set to yes if exported symbols are required. 4722e6f085baSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 472395b296d0Smrg 4724e6f085baSmrg# The commands to list exported symbols. 4725e6f085baSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 472695b296d0Smrg 4727e6f085baSmrg# The commands to extract the exported symbol list from a shared archive. 4728e6f085baSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 472995b296d0Smrg 4730e6f085baSmrg# Symbols that should not be listed in the preloaded symbols. 4731e6f085baSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 473239713583Smrg 4733e6f085baSmrg# Symbols that must always be exported. 4734e6f085baSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 473539713583Smrg 4736e6f085baSmrgifelse([$1],[], 4737e6f085baSmrg[# ### END LIBTOOL CONFIG], 4738e6f085baSmrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 473939713583Smrg 4740e6f085baSmrg__EOF__ 474139713583Smrg 4742e6f085baSmrgifelse([$1],[], [ 4743e6f085baSmrg case $host_os in 4744e6f085baSmrg aix3*) 4745e6f085baSmrg cat <<\EOF >> "$cfgfile" 474639713583Smrg 4747e6f085baSmrg# AIX sometimes has problems with the GCC collect2 program. For some 4748e6f085baSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4749e6f085baSmrg# vanish in a puff of smoke. 4750e6f085baSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 4751e6f085baSmrg COLLECT_NAMES= 4752e6f085baSmrg export COLLECT_NAMES 4753e6f085baSmrgfi 4754e6f085baSmrgEOF 4755e6f085baSmrg ;; 4756e6f085baSmrg esac 475739713583Smrg 4758e6f085baSmrg # We use sed instead of cat because bash on DJGPP gets confused if 4759e6f085baSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4760e6f085baSmrg # text mode, it properly converts lines to CR/LF. This bash problem 4761e6f085baSmrg # is reportedly fixed, but why not run on old versions too? 4762e6f085baSmrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 476339713583Smrg 4764e6f085baSmrg mv -f "$cfgfile" "$ofile" || \ 4765e6f085baSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4766e6f085baSmrg chmod +x "$ofile" 4767e6f085baSmrg]) 476895b296d0Smrgelse 4769e6f085baSmrg # If there is no Makefile yet, we rely on a make rule to execute 4770e6f085baSmrg # `config.status --recheck' to rerun these tests and create the 4771e6f085baSmrg # libtool script then. 4772e6f085baSmrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 4773e6f085baSmrg if test -f "$ltmain_in"; then 4774e6f085baSmrg test -f Makefile && make "$ltmain" 4775e6f085baSmrg fi 477695b296d0Smrgfi 4777e6f085baSmrg])# AC_LIBTOOL_CONFIG 477895b296d0Smrg 477995b296d0Smrg 4780e6f085baSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 4781e6f085baSmrg# ------------------------------------------- 4782e6f085baSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 4783e6f085baSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 478439713583Smrg 4785e6f085baSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 478639713583Smrg 4787e6f085baSmrgif test "$GCC" = yes; then 4788e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 478939713583Smrg 4790e6f085baSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4791e6f085baSmrg lt_cv_prog_compiler_rtti_exceptions, 4792e6f085baSmrg [-fno-rtti -fno-exceptions], [], 4793e6f085baSmrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 479439713583Smrgfi 4795e6f085baSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 479639713583Smrg 479739713583Smrg 4798e6f085baSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4799e6f085baSmrg# --------------------------------- 4800e6f085baSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 4801e6f085baSmrg[AC_REQUIRE([AC_CANONICAL_HOST]) 4802e6f085baSmrgAC_REQUIRE([LT_AC_PROG_SED]) 4803e6f085baSmrgAC_REQUIRE([AC_PROG_NM]) 4804e6f085baSmrgAC_REQUIRE([AC_OBJEXT]) 4805e6f085baSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 4806e6f085baSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4807e6f085baSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4808e6f085baSmrg[ 4809e6f085baSmrg# These are sane defaults that work on at least a few old systems. 4810e6f085baSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 481139713583Smrg 4812e6f085baSmrg# Character class describing NM global symbol codes. 4813e6f085baSmrgsymcode='[[BCDEGRST]]' 481439713583Smrg 4815e6f085baSmrg# Regexp to match symbols that can be accessed directly from C. 4816e6f085baSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 481739713583Smrg 4818e6f085baSmrg# Transform an extracted symbol line into a proper C declaration 4819e6f085baSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 482039713583Smrg 4821e6f085baSmrg# Transform an extracted symbol line into symbol name and symbol address 4822e6f085baSmrglt_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'" 482339713583Smrg 4824e6f085baSmrg# Define system-specific variables. 4825e6f085baSmrgcase $host_os in 4826e6f085baSmrgaix*) 4827e6f085baSmrg symcode='[[BCDT]]' 4828e6f085baSmrg ;; 4829e6f085baSmrgcygwin* | mingw* | pw32*) 4830e6f085baSmrg symcode='[[ABCDGISTW]]' 4831e6f085baSmrg ;; 4832e6f085baSmrghpux*) # Its linker distinguishes data from code symbols 4833e6f085baSmrg if test "$host_cpu" = ia64; then 4834e6f085baSmrg symcode='[[ABCDEGRST]]' 4835e6f085baSmrg fi 4836e6f085baSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4837e6f085baSmrg 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'" 4838e6f085baSmrg ;; 4839e6f085baSmrglinux* | k*bsd*-gnu) 4840e6f085baSmrg if test "$host_cpu" = ia64; then 4841e6f085baSmrg symcode='[[ABCDGIRSTW]]' 4842e6f085baSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4843e6f085baSmrg 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'" 4844e6f085baSmrg fi 4845e6f085baSmrg ;; 4846e6f085baSmrgirix* | nonstopux*) 4847e6f085baSmrg symcode='[[BCDEGRST]]' 4848e6f085baSmrg ;; 4849e6f085baSmrgosf*) 4850e6f085baSmrg symcode='[[BCDEGQRST]]' 4851e6f085baSmrg ;; 4852e6f085baSmrgsolaris*) 4853e6f085baSmrg symcode='[[BDRT]]' 4854e6f085baSmrg ;; 4855e6f085baSmrgsco3.2v5*) 4856e6f085baSmrg symcode='[[DT]]' 4857e6f085baSmrg ;; 4858e6f085baSmrgsysv4.2uw2*) 4859e6f085baSmrg symcode='[[DT]]' 4860e6f085baSmrg ;; 4861e6f085baSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 4862e6f085baSmrg symcode='[[ABDT]]' 4863e6f085baSmrg ;; 4864e6f085baSmrgsysv4) 4865e6f085baSmrg symcode='[[DFNSTU]]' 4866e6f085baSmrg ;; 4867e6f085baSmrgesac 486839713583Smrg 4869e6f085baSmrg# Handle CRLF in mingw tool chain 4870e6f085baSmrgopt_cr= 4871e6f085baSmrgcase $build_os in 4872e6f085baSmrgmingw*) 4873e6f085baSmrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4874e6f085baSmrg ;; 4875e6f085baSmrgesac 487639713583Smrg 4877e6f085baSmrg# If we're using GNU nm, then use its standard symbol codes. 4878e6f085baSmrgcase `$NM -V 2>&1` in 4879e6f085baSmrg*GNU* | *'with BFD'*) 4880e6f085baSmrg symcode='[[ABCDGIRSTW]]' ;; 4881e6f085baSmrgesac 488239713583Smrg 4883e6f085baSmrg# Try without a prefix undercore, then with it. 4884e6f085baSmrgfor ac_symprfx in "" "_"; do 488539713583Smrg 4886e6f085baSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4887e6f085baSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 488839713583Smrg 4889e6f085baSmrg # Write the raw and C identifiers. 4890e6f085baSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 489195b296d0Smrg 4892e6f085baSmrg # Check to see that the pipe works correctly. 4893e6f085baSmrg pipe_works=no 489439713583Smrg 4895e6f085baSmrg rm -f conftest* 4896e6f085baSmrg cat > conftest.$ac_ext <<EOF 4897e6f085baSmrg#ifdef __cplusplus 4898e6f085baSmrgextern "C" { 4899e6f085baSmrg#endif 4900e6f085baSmrgchar nm_test_var; 4901e6f085baSmrgvoid nm_test_func(){} 4902e6f085baSmrg#ifdef __cplusplus 4903e6f085baSmrg} 4904e6f085baSmrg#endif 4905e6f085baSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 4906e6f085baSmrgEOF 490739713583Smrg 4908e6f085baSmrg if AC_TRY_EVAL(ac_compile); then 4909e6f085baSmrg # Now try to grab the symbols. 4910e6f085baSmrg nlist=conftest.nm 4911e6f085baSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 4912e6f085baSmrg # Try sorting and uniquifying the output. 4913e6f085baSmrg if sort "$nlist" | uniq > "$nlist"T; then 4914e6f085baSmrg mv -f "$nlist"T "$nlist" 4915e6f085baSmrg else 4916e6f085baSmrg rm -f "$nlist"T 4917e6f085baSmrg fi 491839713583Smrg 4919e6f085baSmrg # Make sure that we snagged all the symbols we need. 4920e6f085baSmrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 4921e6f085baSmrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 4922e6f085baSmrg cat <<EOF > conftest.$ac_ext 4923e6f085baSmrg#ifdef __cplusplus 4924e6f085baSmrgextern "C" { 4925e6f085baSmrg#endif 492639713583Smrg 4927e6f085baSmrgEOF 4928e6f085baSmrg # Now generate the symbol file. 4929e6f085baSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 493039713583Smrg 4931e6f085baSmrg cat <<EOF >> conftest.$ac_ext 4932e6f085baSmrg#if defined (__STDC__) && __STDC__ 4933e6f085baSmrg# define lt_ptr_t void * 4934e6f085baSmrg#else 4935e6f085baSmrg# define lt_ptr_t char * 4936e6f085baSmrg# define const 4937e6f085baSmrg#endif 493839713583Smrg 4939e6f085baSmrg/* The mapping between symbol names and symbols. */ 4940e6f085baSmrgconst struct { 4941e6f085baSmrg const char *name; 4942e6f085baSmrg lt_ptr_t address; 4943e6f085baSmrg} 4944e6f085baSmrglt_preloaded_symbols[[]] = 4945e6f085baSmrg{ 4946e6f085baSmrgEOF 4947e6f085baSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 4948e6f085baSmrg cat <<\EOF >> conftest.$ac_ext 4949e6f085baSmrg {0, (lt_ptr_t) 0} 4950e6f085baSmrg}; 495139713583Smrg 4952e6f085baSmrg#ifdef __cplusplus 4953e6f085baSmrg} 4954e6f085baSmrg#endif 4955e6f085baSmrgEOF 4956e6f085baSmrg # Now try linking the two files. 4957e6f085baSmrg mv conftest.$ac_objext conftstm.$ac_objext 4958e6f085baSmrg lt_save_LIBS="$LIBS" 4959e6f085baSmrg lt_save_CFLAGS="$CFLAGS" 4960e6f085baSmrg LIBS="conftstm.$ac_objext" 4961e6f085baSmrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4962e6f085baSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4963e6f085baSmrg pipe_works=yes 4964e6f085baSmrg fi 4965e6f085baSmrg LIBS="$lt_save_LIBS" 4966e6f085baSmrg CFLAGS="$lt_save_CFLAGS" 4967e6f085baSmrg else 4968e6f085baSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 496939713583Smrg fi 4970e6f085baSmrg else 4971e6f085baSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4972e6f085baSmrg fi 4973e6f085baSmrg else 4974e6f085baSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4975e6f085baSmrg fi 4976e6f085baSmrg else 4977e6f085baSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4978e6f085baSmrg cat conftest.$ac_ext >&5 4979e6f085baSmrg fi 4980e6f085baSmrg rm -rf conftest* conftst* 498195b296d0Smrg 4982e6f085baSmrg # Do not use the global_symbol_pipe unless it works. 4983e6f085baSmrg if test "$pipe_works" = yes; then 4984e6f085baSmrg break 4985e6f085baSmrg else 4986e6f085baSmrg lt_cv_sys_global_symbol_pipe= 4987e6f085baSmrg fi 4988e6f085baSmrgdone 4989e6f085baSmrg]) 4990e6f085baSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4991e6f085baSmrg lt_cv_sys_global_symbol_to_cdecl= 4992e6f085baSmrgfi 4993e6f085baSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4994e6f085baSmrg AC_MSG_RESULT(failed) 4995e6f085baSmrgelse 4996e6f085baSmrg AC_MSG_RESULT(ok) 4997e6f085baSmrgfi 4998e6f085baSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 499995b296d0Smrg 500095b296d0Smrg 5001e6f085baSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 5002e6f085baSmrg# --------------------------------------- 5003e6f085baSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 5004e6f085baSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 5005e6f085baSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5006e6f085baSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 500795b296d0Smrg 5008e6f085baSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 5009e6f085baSmrg ifelse([$1],[CXX],[ 5010e6f085baSmrg # C++ specific cases for pic, static, wl, etc. 5011e6f085baSmrg if test "$GXX" = yes; then 5012e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5013e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 501495b296d0Smrg 5015e6f085baSmrg case $host_os in 5016e6f085baSmrg aix*) 5017e6f085baSmrg # All AIX code is PIC. 5018e6f085baSmrg if test "$host_cpu" = ia64; then 5019e6f085baSmrg # AIX 5 now supports IA64 processor 5020e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5021e6f085baSmrg fi 5022e6f085baSmrg ;; 5023e6f085baSmrg amigaos*) 5024e6f085baSmrg # FIXME: we need at least 68020 code to build shared libraries, but 5025e6f085baSmrg # adding the `-m68020' flag to GCC prevents building anything better, 5026e6f085baSmrg # like `-m68040'. 5027e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5028e6f085baSmrg ;; 5029e6f085baSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5030e6f085baSmrg # PIC is the default for these OSes. 5031e6f085baSmrg ;; 5032e6f085baSmrg mingw* | cygwin* | os2* | pw32*) 5033e6f085baSmrg # This hack is so that the source file can tell whether it is being 5034e6f085baSmrg # built for inclusion in a dll (and should export symbols for example). 5035e6f085baSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5036e6f085baSmrg # (--disable-auto-import) libraries 5037e6f085baSmrg m4_if([$1], [GCJ], [], 5038e6f085baSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5039e6f085baSmrg ;; 5040e6f085baSmrg darwin* | rhapsody*) 5041e6f085baSmrg # PIC is the default on this platform 5042e6f085baSmrg # Common symbols not allowed in MH_DYLIB files 5043e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5044e6f085baSmrg ;; 5045e6f085baSmrg *djgpp*) 5046e6f085baSmrg # DJGPP does not support shared libraries at all 5047e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5048e6f085baSmrg ;; 5049e6f085baSmrg interix[[3-9]]*) 5050e6f085baSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5051e6f085baSmrg # Instead, we relocate shared libraries at runtime. 5052e6f085baSmrg ;; 5053e6f085baSmrg sysv4*MP*) 5054e6f085baSmrg if test -d /usr/nec; then 5055e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5056e6f085baSmrg fi 5057e6f085baSmrg ;; 5058e6f085baSmrg hpux*) 5059e6f085baSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5060e6f085baSmrg # not for PA HP-UX. 5061e6f085baSmrg case $host_cpu in 5062e6f085baSmrg hppa*64*|ia64*) 5063e6f085baSmrg ;; 5064e6f085baSmrg *) 5065e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5066e6f085baSmrg ;; 5067e6f085baSmrg esac 5068e6f085baSmrg ;; 5069e6f085baSmrg *) 5070e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5071e6f085baSmrg ;; 5072e6f085baSmrg esac 5073e6f085baSmrg else 5074e6f085baSmrg case $host_os in 5075e6f085baSmrg aix[[4-9]]*) 5076e6f085baSmrg # All AIX code is PIC. 5077e6f085baSmrg if test "$host_cpu" = ia64; then 5078e6f085baSmrg # AIX 5 now supports IA64 processor 5079e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5080e6f085baSmrg else 5081e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5082e6f085baSmrg fi 5083e6f085baSmrg ;; 5084e6f085baSmrg chorus*) 5085e6f085baSmrg case $cc_basename in 5086e6f085baSmrg cxch68*) 5087e6f085baSmrg # Green Hills C++ Compiler 5088e6f085baSmrg # _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" 5089e6f085baSmrg ;; 5090e6f085baSmrg esac 5091e6f085baSmrg ;; 5092e6f085baSmrg darwin*) 5093e6f085baSmrg # PIC is the default on this platform 5094e6f085baSmrg # Common symbols not allowed in MH_DYLIB files 5095e6f085baSmrg case $cc_basename in 5096e6f085baSmrg xlc*) 5097e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5098e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5099e6f085baSmrg ;; 5100e6f085baSmrg esac 5101e6f085baSmrg ;; 5102e6f085baSmrg dgux*) 5103e6f085baSmrg case $cc_basename in 5104e6f085baSmrg ec++*) 5105e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5106e6f085baSmrg ;; 5107e6f085baSmrg ghcx*) 5108e6f085baSmrg # Green Hills C++ Compiler 5109e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5110e6f085baSmrg ;; 5111e6f085baSmrg *) 5112e6f085baSmrg ;; 5113e6f085baSmrg esac 5114e6f085baSmrg ;; 5115e6f085baSmrg freebsd* | dragonfly*) 5116e6f085baSmrg # FreeBSD uses GNU C++ 5117e6f085baSmrg ;; 5118e6f085baSmrg hpux9* | hpux10* | hpux11*) 5119e6f085baSmrg case $cc_basename in 5120e6f085baSmrg CC*) 5121e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5122e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5123e6f085baSmrg if test "$host_cpu" != ia64; then 5124e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5125e6f085baSmrg fi 5126e6f085baSmrg ;; 5127e6f085baSmrg aCC*) 5128e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5129e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5130e6f085baSmrg case $host_cpu in 5131e6f085baSmrg hppa*64*|ia64*) 5132e6f085baSmrg # +Z the default 5133e6f085baSmrg ;; 5134e6f085baSmrg *) 5135e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5136e6f085baSmrg ;; 5137e6f085baSmrg esac 5138e6f085baSmrg ;; 5139e6f085baSmrg *) 5140e6f085baSmrg ;; 5141e6f085baSmrg esac 5142e6f085baSmrg ;; 5143e6f085baSmrg interix*) 5144e6f085baSmrg # This is c89, which is MS Visual C++ (no shared libs) 5145e6f085baSmrg # Anyone wants to do a port? 5146e6f085baSmrg ;; 5147e6f085baSmrg irix5* | irix6* | nonstopux*) 5148e6f085baSmrg case $cc_basename in 5149e6f085baSmrg CC*) 5150e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5151e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5152e6f085baSmrg # CC pic flag -KPIC is the default. 5153e6f085baSmrg ;; 5154e6f085baSmrg *) 5155e6f085baSmrg ;; 5156e6f085baSmrg esac 5157e6f085baSmrg ;; 5158e6f085baSmrg linux* | k*bsd*-gnu) 5159e6f085baSmrg case $cc_basename in 5160e6f085baSmrg KCC*) 5161e6f085baSmrg # KAI C++ Compiler 5162e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5163e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5164e6f085baSmrg ;; 5165e6f085baSmrg icpc* | ecpc*) 5166e6f085baSmrg # Intel C++ 5167e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5168e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5169e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5170e6f085baSmrg ;; 5171e6f085baSmrg pgCC* | pgcpp*) 5172e6f085baSmrg # Portland Group C++ compiler. 5173e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5174e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5175e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5176e6f085baSmrg ;; 5177e6f085baSmrg cxx*) 5178e6f085baSmrg # Compaq C++ 5179e6f085baSmrg # Make sure the PIC flag is empty. It appears that all Alpha 5180e6f085baSmrg # Linux and Compaq Tru64 Unix objects are PIC. 5181e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5182e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5183e6f085baSmrg ;; 5184e6f085baSmrg *) 5185e6f085baSmrg case `$CC -V 2>&1 | sed 5q` in 5186e6f085baSmrg *Sun\ C*) 5187e6f085baSmrg # Sun C++ 5.9 5188e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5189e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5190e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5191e6f085baSmrg ;; 5192e6f085baSmrg esac 5193e6f085baSmrg ;; 5194e6f085baSmrg esac 5195e6f085baSmrg ;; 5196e6f085baSmrg lynxos*) 5197e6f085baSmrg ;; 5198e6f085baSmrg m88k*) 5199e6f085baSmrg ;; 5200e6f085baSmrg mvs*) 5201e6f085baSmrg case $cc_basename in 5202e6f085baSmrg cxx*) 5203e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5204e6f085baSmrg ;; 5205e6f085baSmrg *) 5206e6f085baSmrg ;; 5207e6f085baSmrg esac 5208e6f085baSmrg ;; 5209e6f085baSmrg netbsd*) 5210e6f085baSmrg ;; 5211e6f085baSmrg osf3* | osf4* | osf5*) 5212e6f085baSmrg case $cc_basename in 5213e6f085baSmrg KCC*) 5214e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5215e6f085baSmrg ;; 5216e6f085baSmrg RCC*) 5217e6f085baSmrg # Rational C++ 2.4.1 5218e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5219e6f085baSmrg ;; 5220e6f085baSmrg cxx*) 5221e6f085baSmrg # Digital/Compaq C++ 5222e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5223e6f085baSmrg # Make sure the PIC flag is empty. It appears that all Alpha 5224e6f085baSmrg # Linux and Compaq Tru64 Unix objects are PIC. 5225e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5226e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5227e6f085baSmrg ;; 5228e6f085baSmrg *) 5229e6f085baSmrg ;; 5230e6f085baSmrg esac 5231e6f085baSmrg ;; 5232e6f085baSmrg psos*) 5233e6f085baSmrg ;; 5234e6f085baSmrg solaris*) 5235e6f085baSmrg case $cc_basename in 5236e6f085baSmrg CC*) 5237e6f085baSmrg # Sun C++ 4.2, 5.x and Centerline C++ 5238e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5239e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5240e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5241e6f085baSmrg ;; 5242e6f085baSmrg gcx*) 5243e6f085baSmrg # Green Hills C++ Compiler 5244e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5245e6f085baSmrg ;; 5246e6f085baSmrg *) 5247e6f085baSmrg ;; 5248e6f085baSmrg esac 5249e6f085baSmrg ;; 5250e6f085baSmrg sunos4*) 5251e6f085baSmrg case $cc_basename in 5252e6f085baSmrg CC*) 5253e6f085baSmrg # Sun C++ 4.x 5254e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5255e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5256e6f085baSmrg ;; 5257e6f085baSmrg lcc*) 5258e6f085baSmrg # Lucid 5259e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5260e6f085baSmrg ;; 5261e6f085baSmrg *) 5262e6f085baSmrg ;; 5263e6f085baSmrg esac 5264e6f085baSmrg ;; 5265e6f085baSmrg tandem*) 5266e6f085baSmrg case $cc_basename in 5267e6f085baSmrg NCC*) 5268e6f085baSmrg # NonStop-UX NCC 3.20 5269e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5270e6f085baSmrg ;; 5271e6f085baSmrg *) 5272e6f085baSmrg ;; 5273e6f085baSmrg esac 5274e6f085baSmrg ;; 5275e6f085baSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5276e6f085baSmrg case $cc_basename in 5277e6f085baSmrg CC*) 5278e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5279e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5280e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5281e6f085baSmrg ;; 5282e6f085baSmrg esac 5283e6f085baSmrg ;; 5284e6f085baSmrg vxworks*) 5285e6f085baSmrg ;; 5286e6f085baSmrg *) 5287e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5288e6f085baSmrg ;; 5289e6f085baSmrg esac 5290e6f085baSmrg fi 5291e6f085baSmrg], 5292e6f085baSmrg[ 5293e6f085baSmrg if test "$GCC" = yes; then 5294e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5295e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 529639713583Smrg 5297e6f085baSmrg case $host_os in 5298e6f085baSmrg aix*) 5299e6f085baSmrg # All AIX code is PIC. 5300e6f085baSmrg if test "$host_cpu" = ia64; then 5301e6f085baSmrg # AIX 5 now supports IA64 processor 5302e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5303e6f085baSmrg fi 5304e6f085baSmrg ;; 530539713583Smrg 5306e6f085baSmrg amigaos*) 5307e6f085baSmrg # FIXME: we need at least 68020 code to build shared libraries, but 5308e6f085baSmrg # adding the `-m68020' flag to GCC prevents building anything better, 5309e6f085baSmrg # like `-m68040'. 5310e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5311e6f085baSmrg ;; 531239713583Smrg 5313e6f085baSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5314e6f085baSmrg # PIC is the default for these OSes. 5315e6f085baSmrg ;; 531639713583Smrg 5317e6f085baSmrg mingw* | cygwin* | pw32* | os2*) 5318e6f085baSmrg # This hack is so that the source file can tell whether it is being 5319e6f085baSmrg # built for inclusion in a dll (and should export symbols for example). 5320e6f085baSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5321e6f085baSmrg # (--disable-auto-import) libraries 5322e6f085baSmrg m4_if([$1], [GCJ], [], 5323e6f085baSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5324e6f085baSmrg ;; 532539713583Smrg 5326e6f085baSmrg darwin* | rhapsody*) 5327e6f085baSmrg # PIC is the default on this platform 5328e6f085baSmrg # Common symbols not allowed in MH_DYLIB files 5329e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5330e6f085baSmrg ;; 533139713583Smrg 5332e6f085baSmrg interix[[3-9]]*) 5333e6f085baSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5334e6f085baSmrg # Instead, we relocate shared libraries at runtime. 5335e6f085baSmrg ;; 533639713583Smrg 5337e6f085baSmrg msdosdjgpp*) 5338e6f085baSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 5339e6f085baSmrg # on systems that don't support them. 5340e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5341e6f085baSmrg enable_shared=no 5342e6f085baSmrg ;; 534339713583Smrg 5344e6f085baSmrg sysv4*MP*) 5345e6f085baSmrg if test -d /usr/nec; then 5346e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5347e6f085baSmrg fi 5348e6f085baSmrg ;; 534939713583Smrg 5350e6f085baSmrg hpux*) 5351e6f085baSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5352e6f085baSmrg # not for PA HP-UX. 5353e6f085baSmrg case $host_cpu in 5354e6f085baSmrg hppa*64*|ia64*) 5355e6f085baSmrg # +Z the default 5356e6f085baSmrg ;; 5357e6f085baSmrg *) 5358e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5359e6f085baSmrg ;; 5360e6f085baSmrg esac 5361e6f085baSmrg ;; 536295b296d0Smrg 5363e6f085baSmrg *) 5364e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5365e6f085baSmrg ;; 5366e6f085baSmrg esac 5367e6f085baSmrg else 5368e6f085baSmrg # PORTME Check for flag to pass linker flags through the system compiler. 5369e6f085baSmrg case $host_os in 5370e6f085baSmrg aix*) 5371e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5372e6f085baSmrg if test "$host_cpu" = ia64; then 5373e6f085baSmrg # AIX 5 now supports IA64 processor 5374e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5375e6f085baSmrg else 5376e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5377e6f085baSmrg fi 5378e6f085baSmrg ;; 5379e6f085baSmrg darwin*) 5380e6f085baSmrg # PIC is the default on this platform 5381e6f085baSmrg # Common symbols not allowed in MH_DYLIB files 5382e6f085baSmrg case $cc_basename in 5383e6f085baSmrg xlc*) 5384e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5385e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5386e6f085baSmrg ;; 5387e6f085baSmrg esac 5388e6f085baSmrg ;; 538995b296d0Smrg 5390e6f085baSmrg mingw* | cygwin* | pw32* | os2*) 5391e6f085baSmrg # This hack is so that the source file can tell whether it is being 5392e6f085baSmrg # built for inclusion in a dll (and should export symbols for example). 5393e6f085baSmrg m4_if([$1], [GCJ], [], 5394e6f085baSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5395e6f085baSmrg ;; 539695b296d0Smrg 5397e6f085baSmrg hpux9* | hpux10* | hpux11*) 5398e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5399e6f085baSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5400e6f085baSmrg # not for PA HP-UX. 5401e6f085baSmrg case $host_cpu in 5402e6f085baSmrg hppa*64*|ia64*) 5403e6f085baSmrg # +Z the default 5404e6f085baSmrg ;; 5405e6f085baSmrg *) 5406e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5407e6f085baSmrg ;; 5408e6f085baSmrg esac 5409e6f085baSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 5410e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5411e6f085baSmrg ;; 541295b296d0Smrg 5413e6f085baSmrg irix5* | irix6* | nonstopux*) 5414e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5415e6f085baSmrg # PIC (with -KPIC) is the default. 5416e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5417e6f085baSmrg ;; 541895b296d0Smrg 5419e6f085baSmrg newsos6) 5420e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5421e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5422e6f085baSmrg ;; 542395b296d0Smrg 5424e6f085baSmrg linux* | k*bsd*-gnu) 5425e6f085baSmrg case $cc_basename in 5426e6f085baSmrg icc* | ecc*) 5427e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5428e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5429e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5430e6f085baSmrg ;; 5431e6f085baSmrg pgcc* | pgf77* | pgf90* | pgf95*) 5432e6f085baSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 5433e6f085baSmrg # which looks to be a dead project) 5434e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5435e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5436e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5437e6f085baSmrg ;; 5438e6f085baSmrg ccc*) 5439e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5440e6f085baSmrg # All Alpha code is PIC. 5441e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5442e6f085baSmrg ;; 5443e6f085baSmrg *) 5444e6f085baSmrg case `$CC -V 2>&1 | sed 5q` in 5445e6f085baSmrg *Sun\ C*) 5446e6f085baSmrg # Sun C 5.9 5447e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5448e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5449e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5450e6f085baSmrg ;; 5451e6f085baSmrg *Sun\ F*) 5452e6f085baSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 5453e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5454e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5455e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 5456e6f085baSmrg ;; 5457e6f085baSmrg esac 5458e6f085baSmrg ;; 5459e6f085baSmrg esac 5460e6f085baSmrg ;; 546195b296d0Smrg 5462e6f085baSmrg osf3* | osf4* | osf5*) 5463e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5464e6f085baSmrg # All OSF/1 code is PIC. 5465e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5466e6f085baSmrg ;; 546795b296d0Smrg 5468e6f085baSmrg rdos*) 5469e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5470e6f085baSmrg ;; 5471ff89ac2bSmrg 5472e6f085baSmrg solaris*) 5473e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5474e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5475e6f085baSmrg case $cc_basename in 5476e6f085baSmrg f77* | f90* | f95*) 5477e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5478e6f085baSmrg *) 5479e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5480e6f085baSmrg esac 5481e6f085baSmrg ;; 548295b296d0Smrg 5483e6f085baSmrg sunos4*) 5484e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5485e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5486e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5487e6f085baSmrg ;; 548895b296d0Smrg 5489e6f085baSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 5490e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5491e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5492e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5493e6f085baSmrg ;; 549495b296d0Smrg 5495e6f085baSmrg sysv4*MP*) 5496e6f085baSmrg if test -d /usr/nec ;then 5497e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5498e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5499e6f085baSmrg fi 5500e6f085baSmrg ;; 550195b296d0Smrg 5502e6f085baSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5503e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5504e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5505e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5506e6f085baSmrg ;; 550795b296d0Smrg 5508e6f085baSmrg unicos*) 5509e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5510e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5511e6f085baSmrg ;; 551295b296d0Smrg 5513e6f085baSmrg uts4*) 5514e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5515e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5516e6f085baSmrg ;; 551795b296d0Smrg 5518e6f085baSmrg *) 5519e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5520e6f085baSmrg ;; 5521e6f085baSmrg esac 552295b296d0Smrg fi 552395b296d0Smrg]) 5524e6f085baSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 552595b296d0Smrg 5526e6f085baSmrg# 5527e6f085baSmrg# Check to make sure the PIC flag actually works. 5528e6f085baSmrg# 5529e6f085baSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 5530e6f085baSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 5531e6f085baSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 5532e6f085baSmrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 5533e6f085baSmrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 5534e6f085baSmrg "" | " "*) ;; 5535e6f085baSmrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5536e6f085baSmrg esac], 5537e6f085baSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5538e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 553995b296d0Smrgfi 5540e6f085baSmrgcase $host_os in 5541e6f085baSmrg # For platforms which do not support PIC, -DPIC is meaningless: 5542e6f085baSmrg *djgpp*) 5543e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5544e6f085baSmrg ;; 5545e6f085baSmrg *) 5546e6f085baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 5547e6f085baSmrg ;; 554895b296d0Smrgesac 554995b296d0Smrg 5550e6f085baSmrg# 5551e6f085baSmrg# Check to make sure the static flag actually works. 5552e6f085baSmrg# 5553e6f085baSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 5554e6f085baSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5555e6f085baSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5556e6f085baSmrg $lt_tmp_static_flag, 5557e6f085baSmrg [], 5558e6f085baSmrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 5559e6f085baSmrg]) 556039713583Smrg 556139713583Smrg 5562e6f085baSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 5563e6f085baSmrg# ------------------------------------ 5564e6f085baSmrg# See if the linker supports building shared libraries. 5565e6f085baSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 5566e6f085baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 5567e6f085baSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5568e6f085baSmrgifelse([$1],[CXX],[ 5569e6f085baSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5570e6f085baSmrg case $host_os in 5571e6f085baSmrg aix[[4-9]]*) 5572e6f085baSmrg # If we're using GNU nm, then we don't want the "-C" option. 5573e6f085baSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5574e6f085baSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5575e6f085baSmrg _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' 5576e6f085baSmrg else 5577e6f085baSmrg _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' 5578e6f085baSmrg fi 5579e6f085baSmrg ;; 5580e6f085baSmrg pw32*) 5581e6f085baSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5582e6f085baSmrg ;; 5583e6f085baSmrg cygwin* | mingw*) 5584e6f085baSmrg _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' 5585e6f085baSmrg ;; 5586e6f085baSmrg *) 5587e6f085baSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5588e6f085baSmrg ;; 558995b296d0Smrg esac 5590e6f085baSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5591e6f085baSmrg],[ 5592e6f085baSmrg runpath_var= 5593e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 5594e6f085baSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5595e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)= 5596e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5597e6f085baSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 5598e6f085baSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5599e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5600e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5601e6f085baSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 5602e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5603e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5604e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5605e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5606e6f085baSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5607e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5608e6f085baSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5609e6f085baSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 5610e6f085baSmrg _LT_AC_TAGVAR(module_cmds, $1)= 5611e6f085baSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 5612e6f085baSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5613e6f085baSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5614e6f085baSmrg # include_expsyms should be a list of space-separated symbols to be *always* 5615e6f085baSmrg # included in the symbol list 5616e6f085baSmrg _LT_AC_TAGVAR(include_expsyms, $1)= 5617e6f085baSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 5618e6f085baSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 5619e6f085baSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5620e6f085baSmrg # as well as any symbol that contains `d'. 5621e6f085baSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5622e6f085baSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5623e6f085baSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 5624e6f085baSmrg # the symbol is explicitly referenced. Since portable code cannot 5625e6f085baSmrg # rely on this symbol name, it's probably fine to never include it in 5626e6f085baSmrg # preloaded symbol tables. 5627e6f085baSmrg # Exclude shared library initialization/finalization symbols. 5628e6f085baSmrgdnl Note also adjust exclude_expsyms for C++ above. 5629e6f085baSmrg extract_expsyms_cmds= 5630e6f085baSmrg # Just being paranoid about ensuring that cc_basename is set. 5631e6f085baSmrg _LT_CC_BASENAME([$compiler]) 5632e6f085baSmrg case $host_os in 5633e6f085baSmrg cygwin* | mingw* | pw32*) 5634e6f085baSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5635e6f085baSmrg # When not using gcc, we currently assume that we are using 5636e6f085baSmrg # Microsoft Visual C++. 5637e6f085baSmrg if test "$GCC" != yes; then 5638e6f085baSmrg with_gnu_ld=no 5639e6f085baSmrg fi 5640e6f085baSmrg ;; 5641e6f085baSmrg interix*) 5642e6f085baSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5643e6f085baSmrg with_gnu_ld=yes 5644e6f085baSmrg ;; 5645e6f085baSmrg openbsd*) 5646e6f085baSmrg with_gnu_ld=no 564795b296d0Smrg ;; 564895b296d0Smrg esac 564995b296d0Smrg 5650e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5651e6f085baSmrg if test "$with_gnu_ld" = yes; then 5652e6f085baSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5653e6f085baSmrg wlarc='${wl}' 565495b296d0Smrg 5655e6f085baSmrg # Set some defaults for GNU ld with shared library support. These 5656e6f085baSmrg # are reset later if shared libraries are not supported. Putting them 5657e6f085baSmrg # here allows them to be overridden if necessary. 5658e6f085baSmrg runpath_var=LD_RUN_PATH 5659e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5660e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5661e6f085baSmrg # ancient GNU ld didn't support --whole-archive et. al. 5662e6f085baSmrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 5663e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5664e6f085baSmrg else 5665e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5666e6f085baSmrg fi 5667e6f085baSmrg supports_anon_versioning=no 5668e6f085baSmrg case `$LD -v 2>/dev/null` in 5669e6f085baSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5670e6f085baSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5671e6f085baSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5672e6f085baSmrg *\ 2.11.*) ;; # other 2.11 versions 5673e6f085baSmrg *) supports_anon_versioning=yes ;; 5674e6f085baSmrg esac 567595b296d0Smrg 5676e6f085baSmrg # See if GNU ld supports shared libraries. 5677e6f085baSmrg case $host_os in 5678e6f085baSmrg aix[[3-9]]*) 5679e6f085baSmrg # On AIX/PPC, the GNU linker is very broken 5680e6f085baSmrg if test "$host_cpu" != ia64; then 5681e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5682e6f085baSmrg cat <<EOF 1>&2 568395b296d0Smrg 5684e6f085baSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 5685e6f085baSmrg*** to be unable to reliably create shared libraries on AIX. 5686e6f085baSmrg*** Therefore, libtool is disabling shared libraries support. If you 5687e6f085baSmrg*** really care for shared libraries, you may want to modify your PATH 5688e6f085baSmrg*** so that a non-GNU linker is found, and then restart. 568995b296d0Smrg 5690e6f085baSmrgEOF 5691e6f085baSmrg fi 5692e6f085baSmrg ;; 569395b296d0Smrg 5694e6f085baSmrg amigaos*) 5695e6f085baSmrg _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)' 5696e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5697e6f085baSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5698e6f085baSmrg 5699e6f085baSmrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 5700e6f085baSmrg # that the semantics of dynamic libraries on AmigaOS, at least up 5701e6f085baSmrg # to version 4, is to share data among multiple programs linked 5702e6f085baSmrg # with the same dynamic library. Since this doesn't match the 5703e6f085baSmrg # behavior of shared libraries on other platforms, we can't use 5704e6f085baSmrg # them. 5705e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5706e6f085baSmrg ;; 570795b296d0Smrg 5708e6f085baSmrg beos*) 5709e6f085baSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5710e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5711e6f085baSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5712e6f085baSmrg # support --undefined. This deserves some investigation. FIXME 5713e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5714e6f085baSmrg else 5715e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5716e6f085baSmrg fi 5717e6f085baSmrg ;; 571895b296d0Smrg 5719e6f085baSmrg cygwin* | mingw* | pw32*) 5720e6f085baSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5721e6f085baSmrg # as there is no search path for DLLs. 5722e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5723e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5724e6f085baSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5725e6f085baSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5726e6f085baSmrg _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' 5727e6f085baSmrg 5728e6f085baSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5729e6f085baSmrg _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' 5730e6f085baSmrg # If the export-symbols file already is a .def file (1st line 5731e6f085baSmrg # is EXPORTS), use it as is; otherwise, prepend... 5732e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5733e6f085baSmrg cp $export_symbols $output_objdir/$soname.def; 5734e6f085baSmrg else 5735e6f085baSmrg echo EXPORTS > $output_objdir/$soname.def; 5736e6f085baSmrg cat $export_symbols >> $output_objdir/$soname.def; 5737e6f085baSmrg fi~ 5738e6f085baSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5739e6f085baSmrg else 5740e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5741e6f085baSmrg fi 5742e6f085baSmrg ;; 574395b296d0Smrg 5744e6f085baSmrg interix[[3-9]]*) 5745e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5746e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5747e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5748e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5749e6f085baSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5750e6f085baSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5751e6f085baSmrg # default) and relocated if they conflict, which is a slow very memory 5752e6f085baSmrg # consuming and fragmenting process. To avoid this, we pick a random, 5753e6f085baSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5754e6f085baSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5755e6f085baSmrg _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' 5756e6f085baSmrg _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' 5757e6f085baSmrg ;; 575895b296d0Smrg 5759e6f085baSmrg gnu* | linux* | k*bsd*-gnu) 5760e6f085baSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5761e6f085baSmrg tmp_addflag= 5762e6f085baSmrg case $cc_basename,$host_cpu in 5763e6f085baSmrg pgcc*) # Portland Group C compiler 5764e6f085baSmrg _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' 5765e6f085baSmrg tmp_addflag=' $pic_flag' 5766e6f085baSmrg ;; 5767e6f085baSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 5768e6f085baSmrg _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' 5769e6f085baSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 5770e6f085baSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5771e6f085baSmrg tmp_addflag=' -i_dynamic' ;; 5772e6f085baSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5773e6f085baSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5774e6f085baSmrg ifc* | ifort*) # Intel Fortran compiler 5775e6f085baSmrg tmp_addflag=' -nofor_main' ;; 5776e6f085baSmrg esac 5777e6f085baSmrg case `$CC -V 2>&1 | sed 5q` in 5778e6f085baSmrg *Sun\ C*) # Sun C 5.9 5779e6f085baSmrg _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' 5780e6f085baSmrg tmp_sharedflag='-G' ;; 5781e6f085baSmrg *Sun\ F*) # Sun Fortran 8.3 5782e6f085baSmrg tmp_sharedflag='-G' ;; 5783e6f085baSmrg *) 5784e6f085baSmrg tmp_sharedflag='-shared' ;; 5785e6f085baSmrg esac 5786e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 578795b296d0Smrg 5788e6f085baSmrg if test $supports_anon_versioning = yes; then 5789e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 5790e6f085baSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5791e6f085baSmrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 5792e6f085baSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5793e6f085baSmrg fi 5794e6f085baSmrg else 5795e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5796e6f085baSmrg fi 5797e6f085baSmrg ;; 579895b296d0Smrg 5799e6f085baSmrg netbsd*) 5800e6f085baSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5801e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5802e6f085baSmrg wlarc= 5803e6f085baSmrg else 5804e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5805e6f085baSmrg _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' 5806e6f085baSmrg fi 5807e6f085baSmrg ;; 580895b296d0Smrg 5809e6f085baSmrg solaris*) 5810e6f085baSmrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 5811e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5812e6f085baSmrg cat <<EOF 1>&2 581395b296d0Smrg 5814e6f085baSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5815e6f085baSmrg*** create shared libraries on Solaris systems. Therefore, libtool 5816e6f085baSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5817e6f085baSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 5818e6f085baSmrg*** your PATH or compiler configuration so that the native linker is 5819e6f085baSmrg*** used, and then restart. 582095b296d0Smrg 5821e6f085baSmrgEOF 5822e6f085baSmrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5823e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5824e6f085baSmrg _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' 5825e6f085baSmrg else 5826e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5827e6f085baSmrg fi 5828e6f085baSmrg ;; 582995b296d0Smrg 5830e6f085baSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5831e6f085baSmrg case `$LD -v 2>&1` in 5832e6f085baSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5833e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5834e6f085baSmrg cat <<_LT_EOF 1>&2 583595b296d0Smrg 5836e6f085baSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5837e6f085baSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5838e6f085baSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5839e6f085baSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5840e6f085baSmrg*** your PATH or compiler configuration so that the native linker is 5841e6f085baSmrg*** used, and then restart. 584295b296d0Smrg 5843e6f085baSmrg_LT_EOF 5844e6f085baSmrg ;; 5845e6f085baSmrg *) 5846e6f085baSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5847e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 5848e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 5849e6f085baSmrg _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' 5850e6f085baSmrg else 5851e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5852e6f085baSmrg fi 5853e6f085baSmrg ;; 5854e6f085baSmrg esac 5855e6f085baSmrg ;; 585695b296d0Smrg 5857e6f085baSmrg sunos4*) 5858e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5859e6f085baSmrg wlarc= 5860e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5861e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5862e6f085baSmrg ;; 586395b296d0Smrg 5864e6f085baSmrg *) 5865e6f085baSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5866e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5867e6f085baSmrg _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' 5868e6f085baSmrg else 5869e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5870e6f085baSmrg fi 5871e6f085baSmrg ;; 5872e6f085baSmrg esac 587395b296d0Smrg 5874e6f085baSmrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 5875e6f085baSmrg runpath_var= 5876e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5877e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5878e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5879e6f085baSmrg fi 5880e6f085baSmrg else 5881e6f085baSmrg # PORTME fill in a description of your system's linker (not GNU ld) 5882e6f085baSmrg case $host_os in 5883e6f085baSmrg aix3*) 5884e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5885e6f085baSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5886e6f085baSmrg _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' 5887e6f085baSmrg # Note: this linker hardcodes the directories in LIBPATH if there 5888e6f085baSmrg # are no directories specified by -L. 5889e6f085baSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5890e6f085baSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 5891e6f085baSmrg # Neither direct hardcoding nor static linking is supported with a 5892e6f085baSmrg # broken collect2. 5893e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5894e6f085baSmrg fi 5895e6f085baSmrg ;; 589695b296d0Smrg 5897e6f085baSmrg aix[[4-9]]*) 5898e6f085baSmrg if test "$host_cpu" = ia64; then 5899e6f085baSmrg # On IA64, the linker does run time linking by default, so we don't 5900e6f085baSmrg # have to do anything special. 5901e6f085baSmrg aix_use_runtimelinking=no 5902e6f085baSmrg exp_sym_flag='-Bexport' 5903e6f085baSmrg no_entry_flag="" 5904e6f085baSmrg else 5905e6f085baSmrg # If we're using GNU nm, then we don't want the "-C" option. 5906e6f085baSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5907e6f085baSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5908e6f085baSmrg _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' 5909e6f085baSmrg else 5910e6f085baSmrg _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' 5911e6f085baSmrg fi 5912e6f085baSmrg aix_use_runtimelinking=no 591395b296d0Smrg 5914e6f085baSmrg # Test if we are trying to use run time linking or normal 5915e6f085baSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5916e6f085baSmrg # need to do runtime linking. 5917e6f085baSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5918e6f085baSmrg for ld_flag in $LDFLAGS; do 5919e6f085baSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5920e6f085baSmrg aix_use_runtimelinking=yes 5921e6f085baSmrg break 5922e6f085baSmrg fi 5923e6f085baSmrg done 5924e6f085baSmrg ;; 5925e6f085baSmrg esac 592695b296d0Smrg 5927e6f085baSmrg exp_sym_flag='-bexport' 5928e6f085baSmrg no_entry_flag='-bnoentry' 5929e6f085baSmrg fi 593039713583Smrg 5931e6f085baSmrg # When large executables or shared objects are built, AIX ld can 5932e6f085baSmrg # have problems creating the table of contents. If linking a library 5933e6f085baSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5934e6f085baSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5935e6f085baSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 593639713583Smrg 5937e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 5938e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5939e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5940e6f085baSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 594139713583Smrg 5942e6f085baSmrg if test "$GCC" = yes; then 5943e6f085baSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5944e6f085baSmrg # We only want to do this on AIX 4.2 and lower, the check 5945e6f085baSmrg # below for broken collect2 doesn't work under 4.3+ 5946e6f085baSmrg collect2name=`${CC} -print-prog-name=collect2` 5947e6f085baSmrg if test -f "$collect2name" && \ 5948e6f085baSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 5949e6f085baSmrg then 5950e6f085baSmrg # We have reworked collect2 5951e6f085baSmrg : 5952e6f085baSmrg else 5953e6f085baSmrg # We have old collect2 5954e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5955e6f085baSmrg # It fails to find uninstalled libraries when the uninstalled 5956e6f085baSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5957e6f085baSmrg # to unsupported forces relinking 5958e6f085baSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5959e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5960e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5961e6f085baSmrg fi 5962e6f085baSmrg ;; 5963e6f085baSmrg esac 5964e6f085baSmrg shared_flag='-shared' 5965e6f085baSmrg if test "$aix_use_runtimelinking" = yes; then 5966e6f085baSmrg shared_flag="$shared_flag "'${wl}-G' 5967e6f085baSmrg fi 5968e6f085baSmrg else 5969e6f085baSmrg # not using gcc 5970e6f085baSmrg if test "$host_cpu" = ia64; then 5971e6f085baSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5972e6f085baSmrg # chokes on -Wl,-G. The following line is correct: 5973e6f085baSmrg shared_flag='-G' 5974e6f085baSmrg else 5975e6f085baSmrg if test "$aix_use_runtimelinking" = yes; then 5976e6f085baSmrg shared_flag='${wl}-G' 5977e6f085baSmrg else 5978e6f085baSmrg shared_flag='${wl}-bM:SRE' 5979e6f085baSmrg fi 5980e6f085baSmrg fi 5981e6f085baSmrg fi 598239713583Smrg 5983e6f085baSmrg # It seems that -bexpall does not export symbols beginning with 5984e6f085baSmrg # underscore (_), so it is better to generate a list of symbols to export. 5985e6f085baSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5986e6f085baSmrg if test "$aix_use_runtimelinking" = yes; then 5987e6f085baSmrg # Warning - without using the other runtime loading flags (-brtl), 5988e6f085baSmrg # -berok will link without error, but may produce a broken library. 5989e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5990e6f085baSmrg # Determine the default libpath from the value encoded in an empty executable. 5991e6f085baSmrg _LT_AC_SYS_LIBPATH_AIX 5992e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5993e6f085baSmrg _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" 5994e6f085baSmrg else 5995e6f085baSmrg if test "$host_cpu" = ia64; then 5996e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5997e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5998e6f085baSmrg _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" 5999e6f085baSmrg else 6000e6f085baSmrg # Determine the default libpath from the value encoded in an empty executable. 6001e6f085baSmrg _LT_AC_SYS_LIBPATH_AIX 6002e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6003e6f085baSmrg # Warning - without using the other run time loading flags, 6004e6f085baSmrg # -berok will link without error, but may produce a broken library. 6005e6f085baSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6006e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6007e6f085baSmrg # Exported symbols can be pulled into shared objects from archives 6008e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6009e6f085baSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6010e6f085baSmrg # This is similar to how AIX traditionally builds its shared libraries. 6011e6f085baSmrg _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' 6012e6f085baSmrg fi 6013e6f085baSmrg fi 6014e6f085baSmrg ;; 601595b296d0Smrg 6016e6f085baSmrg amigaos*) 6017e6f085baSmrg _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)' 6018e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6019e6f085baSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6020e6f085baSmrg # see comment about different semantics on the GNU ld section 6021e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6022e6f085baSmrg ;; 602395b296d0Smrg 6024e6f085baSmrg bsdi[[45]]*) 6025e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6026e6f085baSmrg ;; 602795b296d0Smrg 6028e6f085baSmrg cygwin* | mingw* | pw32*) 6029e6f085baSmrg # When not using gcc, we currently assume that we are using 6030e6f085baSmrg # Microsoft Visual C++. 6031e6f085baSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6032e6f085baSmrg # no search path for DLLs. 6033e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6034e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6035e6f085baSmrg # Tell ltmain to make .lib files, not .a files. 6036e6f085baSmrg libext=lib 6037e6f085baSmrg # Tell ltmain to make .dll files, not .so files. 6038e6f085baSmrg shrext_cmds=".dll" 6039e6f085baSmrg # FIXME: Setting linknames here is a bad hack. 6040e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 6041e6f085baSmrg # The linker will automatically build a .lib file if we build a DLL. 6042e6f085baSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 6043e6f085baSmrg # FIXME: Should let the user specify the lib program. 6044e6f085baSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6045e6f085baSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 6046e6f085baSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6047e6f085baSmrg ;; 604895b296d0Smrg 6049e6f085baSmrg darwin* | rhapsody*) 6050e6f085baSmrg case $host_os in 6051e6f085baSmrg rhapsody* | darwin1.[[012]]) 6052e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 6053e6f085baSmrg ;; 6054e6f085baSmrg *) # Darwin 1.3 on 6055e6f085baSmrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 6056e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6057e6f085baSmrg else 6058e6f085baSmrg case ${MACOSX_DEPLOYMENT_TARGET} in 6059e6f085baSmrg 10.[[012]]) 6060e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6061e6f085baSmrg ;; 6062e6f085baSmrg 10.*) 6063e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 6064e6f085baSmrg ;; 6065e6f085baSmrg esac 6066e6f085baSmrg fi 6067e6f085baSmrg ;; 6068e6f085baSmrg esac 6069e6f085baSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6070e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6071e6f085baSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 6072e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6073e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 6074e6f085baSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6075e6f085baSmrg if test "$GCC" = yes ; then 6076e6f085baSmrg output_verbose_link_cmd='echo' 6077e6f085baSmrg _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}" 6078e6f085baSmrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 6079e6f085baSmrg _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}" 6080e6f085baSmrg _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}" 6081e6f085baSmrg else 6082e6f085baSmrg case $cc_basename in 6083e6f085baSmrg xlc*) 6084e6f085baSmrg output_verbose_link_cmd='echo' 6085e6f085baSmrg _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' 6086e6f085baSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 6087e6f085baSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 6088e6f085baSmrg _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}' 6089e6f085baSmrg _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}' 6090e6f085baSmrg ;; 6091e6f085baSmrg *) 6092e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6093e6f085baSmrg ;; 6094e6f085baSmrg esac 6095e6f085baSmrg fi 6096e6f085baSmrg ;; 609795b296d0Smrg 6098e6f085baSmrg dgux*) 6099e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6100e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6101e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6102e6f085baSmrg ;; 610395b296d0Smrg 6104e6f085baSmrg freebsd1*) 6105e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6106e6f085baSmrg ;; 610795b296d0Smrg 6108e6f085baSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6109e6f085baSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 6110e6f085baSmrg # does not break anything, and helps significantly (at the cost of a little 6111e6f085baSmrg # extra space). 6112e6f085baSmrg freebsd2.2*) 6113e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6114e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6115e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6116e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6117e6f085baSmrg ;; 611895b296d0Smrg 6119e6f085baSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6120e6f085baSmrg freebsd2*) 6121e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6122e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6123e6f085baSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6124e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 612595b296d0Smrg ;; 612695b296d0Smrg 6127e6f085baSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6128e6f085baSmrg freebsd* | dragonfly*) 6129e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 6130e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6131e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6132e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6133e6f085baSmrg ;; 613495b296d0Smrg 6135e6f085baSmrg hpux9*) 6136e6f085baSmrg if test "$GCC" = yes; then 6137e6f085baSmrg _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' 6138e6f085baSmrg else 6139e6f085baSmrg _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' 6140e6f085baSmrg fi 6141e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6142e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6143e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 614495b296d0Smrg 6145e6f085baSmrg # hardcode_minus_L: Not really in the search PATH, 6146e6f085baSmrg # but as the default location of the library. 6147e6f085baSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6148e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6149e6f085baSmrg ;; 615095b296d0Smrg 6151e6f085baSmrg hpux10*) 6152e6f085baSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6153e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6154e6f085baSmrg else 6155e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6156e6f085baSmrg fi 6157e6f085baSmrg if test "$with_gnu_ld" = no; then 6158e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6159e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 616095b296d0Smrg 6161e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6162e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 616395b296d0Smrg 6164e6f085baSmrg # hardcode_minus_L: Not really in the search PATH, 6165e6f085baSmrg # but as the default location of the library. 6166e6f085baSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6167e6f085baSmrg fi 6168e6f085baSmrg ;; 616995b296d0Smrg 6170e6f085baSmrg hpux11*) 6171e6f085baSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6172e6f085baSmrg case $host_cpu in 6173e6f085baSmrg hppa*64*) 6174e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6175e6f085baSmrg ;; 6176e6f085baSmrg ia64*) 6177e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6178e6f085baSmrg ;; 6179e6f085baSmrg *) 6180e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6181e6f085baSmrg ;; 6182e6f085baSmrg esac 6183e6f085baSmrg else 6184e6f085baSmrg case $host_cpu in 6185e6f085baSmrg hppa*64*) 6186e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6187e6f085baSmrg ;; 6188e6f085baSmrg ia64*) 6189e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6190e6f085baSmrg ;; 6191e6f085baSmrg *) 6192e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6193e6f085baSmrg ;; 6194e6f085baSmrg esac 6195e6f085baSmrg fi 6196e6f085baSmrg if test "$with_gnu_ld" = no; then 6197e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6198e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 619995b296d0Smrg 6200e6f085baSmrg case $host_cpu in 6201e6f085baSmrg hppa*64*|ia64*) 6202e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 6203e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6204e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6205e6f085baSmrg ;; 6206e6f085baSmrg *) 6207e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6208e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 620995b296d0Smrg 6210e6f085baSmrg # hardcode_minus_L: Not really in the search PATH, 6211e6f085baSmrg # but as the default location of the library. 6212e6f085baSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6213e6f085baSmrg ;; 6214e6f085baSmrg esac 6215e6f085baSmrg fi 621695b296d0Smrg ;; 621795b296d0Smrg 6218e6f085baSmrg irix5* | irix6* | nonstopux*) 6219e6f085baSmrg if test "$GCC" = yes; then 6220e6f085baSmrg _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' 6221e6f085baSmrg else 6222e6f085baSmrg _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' 6223e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6224e6f085baSmrg fi 6225e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6226e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6227e6f085baSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6228e6f085baSmrg ;; 622995b296d0Smrg 6230e6f085baSmrg netbsd*) 6231e6f085baSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6232e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6233e6f085baSmrg else 6234e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6235e6f085baSmrg fi 6236e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6237e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6238e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6239e6f085baSmrg ;; 624095b296d0Smrg 6241e6f085baSmrg newsos6) 6242e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6243e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6244e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6245e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6246e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6247e6f085baSmrg ;; 624895b296d0Smrg 6249e6f085baSmrg openbsd*) 6250e6f085baSmrg if test -f /usr/libexec/ld.so; then 6251e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6252e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6253e6f085baSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6254e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6255e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6256e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6257e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6258e6f085baSmrg else 6259e6f085baSmrg case $host_os in 6260e6f085baSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6261e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6262e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6263e6f085baSmrg ;; 6264e6f085baSmrg *) 6265e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6266e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6267e6f085baSmrg ;; 6268e6f085baSmrg esac 6269e6f085baSmrg fi 6270e6f085baSmrg else 6271e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6272e6f085baSmrg fi 6273e6f085baSmrg ;; 627495b296d0Smrg 6275e6f085baSmrg os2*) 6276e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6277e6f085baSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6278e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6279e6f085baSmrg _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' 6280e6f085baSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6281e6f085baSmrg ;; 628295b296d0Smrg 6283e6f085baSmrg osf3*) 6284e6f085baSmrg if test "$GCC" = yes; then 6285e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6286e6f085baSmrg _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' 6287e6f085baSmrg else 6288e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6289e6f085baSmrg _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' 6290e6f085baSmrg fi 6291e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6292e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6293e6f085baSmrg ;; 629495b296d0Smrg 6295e6f085baSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 6296e6f085baSmrg if test "$GCC" = yes; then 6297e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6298e6f085baSmrg _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' 6299e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6300e6f085baSmrg else 6301e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6302e6f085baSmrg _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' 6303e6f085baSmrg _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~ 6304e6f085baSmrg $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' 630595b296d0Smrg 6306e6f085baSmrg # Both c and cxx compiler support -rpath directly 6307e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6308e6f085baSmrg fi 6309e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6310e6f085baSmrg ;; 631139713583Smrg 6312e6f085baSmrg solaris*) 6313e6f085baSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6314e6f085baSmrg if test "$GCC" = yes; then 6315e6f085baSmrg wlarc='${wl}' 6316e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6317e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6318e6f085baSmrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 6319e6f085baSmrg else 6320e6f085baSmrg wlarc='' 6321e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6322e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6323e6f085baSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6324e6f085baSmrg fi 6325e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6326e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6327e6f085baSmrg case $host_os in 6328e6f085baSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6329e6f085baSmrg *) 6330e6f085baSmrg # The compiler driver will combine and reorder linker options, 6331e6f085baSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 6332e6f085baSmrg # but is careful enough not to reorder. 6333e6f085baSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6334e6f085baSmrg if test "$GCC" = yes; then 6335e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6336e6f085baSmrg else 6337e6f085baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6338ff89ac2bSmrg fi 6339e6f085baSmrg ;; 6340e6f085baSmrg esac 6341e6f085baSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 634295b296d0Smrg ;; 634395b296d0Smrg 6344e6f085baSmrg sunos4*) 6345e6f085baSmrg if test "x$host_vendor" = xsequent; then 6346e6f085baSmrg # Use $CC to link under sequent, because it throws in some extra .o 6347e6f085baSmrg # files that make .init and .fini sections work. 6348e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6349e6f085baSmrg else 6350e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6351e6f085baSmrg fi 6352e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6353e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6354e6f085baSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6355e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6356e6f085baSmrg ;; 635795b296d0Smrg 6358e6f085baSmrg sysv4) 6359e6f085baSmrg case $host_vendor in 6360e6f085baSmrg sni) 6361e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6362e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6363e6f085baSmrg ;; 6364e6f085baSmrg siemens) 6365e6f085baSmrg ## LD is ld it makes a PLAMLIB 6366e6f085baSmrg ## CC just makes a GrossModule. 6367e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6368e6f085baSmrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6369e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6370e6f085baSmrg ;; 6371e6f085baSmrg motorola) 6372e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6373e6f085baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6374e6f085baSmrg ;; 6375e6f085baSmrg esac 6376e6f085baSmrg runpath_var='LD_RUN_PATH' 6377e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6378e6f085baSmrg ;; 637995b296d0Smrg 6380e6f085baSmrg sysv4.3*) 6381e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6382e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6383e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6384e6f085baSmrg ;; 638595b296d0Smrg 6386e6f085baSmrg sysv4*MP*) 6387e6f085baSmrg if test -d /usr/nec; then 6388e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6389e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6390e6f085baSmrg runpath_var=LD_RUN_PATH 6391e6f085baSmrg hardcode_runpath_var=yes 6392e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6393e6f085baSmrg fi 6394e6f085baSmrg ;; 639595b296d0Smrg 6396e6f085baSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6397e6f085baSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6398e6f085baSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6399e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6400e6f085baSmrg runpath_var='LD_RUN_PATH' 640195b296d0Smrg 6402e6f085baSmrg if test "$GCC" = yes; then 6403e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6404e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6405e6f085baSmrg else 6406e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6407e6f085baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6408e6f085baSmrg fi 6409e6f085baSmrg ;; 641095b296d0Smrg 6411e6f085baSmrg sysv5* | sco3.2v5* | sco5v6*) 6412e6f085baSmrg # Note: We can NOT use -z defs as we might desire, because we do not 6413e6f085baSmrg # link with -lc, and that would cause any symbols used from libc to 6414e6f085baSmrg # always be unresolved, which means just about no library would 6415e6f085baSmrg # ever link correctly. If we're not using GNU ld we use -z text 6416e6f085baSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6417e6f085baSmrg # as -z defs. 6418e6f085baSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6419e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6420e6f085baSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6421e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6422e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 6423e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 6424e6f085baSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6425e6f085baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6426e6f085baSmrg runpath_var='LD_RUN_PATH' 642795b296d0Smrg 6428e6f085baSmrg if test "$GCC" = yes; then 6429e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6430e6f085baSmrg _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' 6431e6f085baSmrg else 6432e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6433e6f085baSmrg _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' 6434e6f085baSmrg fi 6435e6f085baSmrg ;; 643695b296d0Smrg 6437e6f085baSmrg uts4*) 6438e6f085baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6439e6f085baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6440e6f085baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6441e6f085baSmrg ;; 644239713583Smrg 6443e6f085baSmrg *) 6444e6f085baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6445e6f085baSmrg ;; 6446e6f085baSmrg esac 6447e6f085baSmrg fi 644895b296d0Smrg]) 6449e6f085baSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 6450e6f085baSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 645195b296d0Smrg 6452e6f085baSmrg# 6453e6f085baSmrg# Do we need to explicitly link libc? 6454e6f085baSmrg# 6455e6f085baSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6456e6f085baSmrgx|xyes) 6457e6f085baSmrg # Assume -lc should be added 6458e6f085baSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 645995b296d0Smrg 6460e6f085baSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 6461e6f085baSmrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 6462e6f085baSmrg *'~'*) 6463e6f085baSmrg # FIXME: we may have to deal with multi-command sequences. 6464e6f085baSmrg ;; 6465e6f085baSmrg '$CC '*) 6466e6f085baSmrg # Test whether the compiler implicitly links with -lc since on some 6467e6f085baSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6468e6f085baSmrg # to ld, don't add -lc before -lgcc. 6469e6f085baSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6470e6f085baSmrg $rm conftest* 6471e6f085baSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 647295b296d0Smrg 6473e6f085baSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6474e6f085baSmrg soname=conftest 6475e6f085baSmrg lib=conftest 6476e6f085baSmrg libobjs=conftest.$ac_objext 6477e6f085baSmrg deplibs= 6478e6f085baSmrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6479e6f085baSmrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 6480e6f085baSmrg compiler_flags=-v 6481e6f085baSmrg linker_flags=-v 6482e6f085baSmrg verstring= 6483e6f085baSmrg output_objdir=. 6484e6f085baSmrg libname=conftest 6485e6f085baSmrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 6486e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6487e6f085baSmrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 6488e6f085baSmrg then 6489e6f085baSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6490e6f085baSmrg else 6491e6f085baSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6492e6f085baSmrg fi 6493e6f085baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6494e6f085baSmrg else 6495e6f085baSmrg cat conftest.err 1>&5 6496e6f085baSmrg fi 6497e6f085baSmrg $rm conftest* 6498e6f085baSmrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 6499e6f085baSmrg ;; 6500e6f085baSmrg esac 6501e6f085baSmrg fi 6502e6f085baSmrg ;; 6503e6f085baSmrgesac 6504e6f085baSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS 650595b296d0Smrg 650695b296d0Smrg 6507e6f085baSmrg# _LT_AC_FILE_LTDLL_C 6508e6f085baSmrg# ------------------- 6509e6f085baSmrg# Be careful that the start marker always follows a newline. 6510e6f085baSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 6511e6f085baSmrg# /* ltdll.c starts here */ 6512e6f085baSmrg# #define WIN32_LEAN_AND_MEAN 6513e6f085baSmrg# #include <windows.h> 6514e6f085baSmrg# #undef WIN32_LEAN_AND_MEAN 6515e6f085baSmrg# #include <stdio.h> 651695b296d0Smrg# 6517e6f085baSmrg# #ifndef __CYGWIN__ 6518e6f085baSmrg# # ifdef __CYGWIN32__ 6519e6f085baSmrg# # define __CYGWIN__ __CYGWIN32__ 6520e6f085baSmrg# # endif 6521e6f085baSmrg# #endif 652295b296d0Smrg# 6523e6f085baSmrg# #ifdef __cplusplus 6524e6f085baSmrg# extern "C" { 6525e6f085baSmrg# #endif 6526e6f085baSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 6527e6f085baSmrg# #ifdef __cplusplus 6528e6f085baSmrg# } 6529e6f085baSmrg# #endif 653095b296d0Smrg# 6531e6f085baSmrg# #ifdef __CYGWIN__ 6532e6f085baSmrg# #include <cygwin/cygwin_dll.h> 6533e6f085baSmrg# DECLARE_CYGWIN_DLL( DllMain ); 6534e6f085baSmrg# #endif 6535e6f085baSmrg# HINSTANCE __hDllInstance_base; 6536e6f085baSmrg# 6537e6f085baSmrg# BOOL APIENTRY 6538e6f085baSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 6539e6f085baSmrg# { 6540e6f085baSmrg# __hDllInstance_base = hInst; 6541e6f085baSmrg# return TRUE; 6542e6f085baSmrg# } 6543e6f085baSmrg# /* ltdll.c ends here */ 6544e6f085baSmrg])# _LT_AC_FILE_LTDLL_C 654595b296d0Smrg 654639713583Smrg 6547e6f085baSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 6548e6f085baSmrg# --------------------------------- 6549e6f085baSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 655095b296d0Smrg 655195b296d0Smrg 6552e6f085baSmrg# old names 6553e6f085baSmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 6554e6f085baSmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 6555e6f085baSmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 6556e6f085baSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 6557e6f085baSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 6558e6f085baSmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 6559e6f085baSmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 656095b296d0Smrg 6561e6f085baSmrg# This is just to silence aclocal about the macro not being used 6562e6f085baSmrgifelse([AC_DISABLE_FAST_INSTALL]) 656395b296d0Smrg 6564e6f085baSmrgAC_DEFUN([LT_AC_PROG_GCJ], 6565e6f085baSmrg[AC_CHECK_TOOL(GCJ, gcj, no) 6566e6f085baSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6567e6f085baSmrg AC_SUBST(GCJFLAGS) 6568e6f085baSmrg]) 656995b296d0Smrg 6570e6f085baSmrgAC_DEFUN([LT_AC_PROG_RC], 6571e6f085baSmrg[AC_CHECK_TOOL(RC, windres, no) 657295b296d0Smrg]) 657395b296d0Smrg 6574ff89ac2bSmrg 6575e6f085baSmrg# Cheap backport of AS_EXECUTABLE_P and required macros 6576e6f085baSmrg# from Autoconf 2.59; we should not use $as_executable_p directly. 6577ff89ac2bSmrg 6578e6f085baSmrg# _AS_TEST_PREPARE 6579e6f085baSmrg# ---------------- 6580e6f085baSmrgm4_ifndef([_AS_TEST_PREPARE], 6581e6f085baSmrg[m4_defun([_AS_TEST_PREPARE], 6582e6f085baSmrg[if test -x / >/dev/null 2>&1; then 6583e6f085baSmrg as_executable_p='test -x' 6584e6f085baSmrgelse 6585e6f085baSmrg as_executable_p='test -f' 6586e6f085baSmrgfi 6587e6f085baSmrg])])# _AS_TEST_PREPARE 6588ff89ac2bSmrg 6589e6f085baSmrg# AS_EXECUTABLE_P 6590e6f085baSmrg# --------------- 6591e6f085baSmrg# Check whether a file is executable. 6592e6f085baSmrgm4_ifndef([AS_EXECUTABLE_P], 6593e6f085baSmrg[m4_defun([AS_EXECUTABLE_P], 6594e6f085baSmrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl 6595e6f085baSmrg$as_executable_p $1[]dnl 6596e6f085baSmrg])])# AS_EXECUTABLE_P 6597ff89ac2bSmrg 6598e6f085baSmrg# NOTE: This macro has been submitted for inclusion into # 6599e6f085baSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 6600e6f085baSmrg# a released version of Autoconf we should remove this # 6601e6f085baSmrg# macro and use it instead. # 6602e6f085baSmrg# LT_AC_PROG_SED 6603e6f085baSmrg# -------------- 6604e6f085baSmrg# Check for a fully-functional sed program, that truncates 6605e6f085baSmrg# as few characters as possible. Prefer GNU sed if found. 6606e6f085baSmrgAC_DEFUN([LT_AC_PROG_SED], 6607e6f085baSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 6608e6f085baSmrgAC_CACHE_VAL(lt_cv_path_SED, 6609e6f085baSmrg[# Loop through the user's path and test for sed and gsed. 6610e6f085baSmrg# Then use that list of sed's as ones to test for truncation. 6611e6f085baSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6612e6f085baSmrgfor as_dir in $PATH 6613e6f085baSmrgdo 6614e6f085baSmrg IFS=$as_save_IFS 6615e6f085baSmrg test -z "$as_dir" && as_dir=. 6616e6f085baSmrg for lt_ac_prog in sed gsed; do 6617e6f085baSmrg for ac_exec_ext in '' $ac_executable_extensions; do 6618e6f085baSmrg if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 6619e6f085baSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 6620e6f085baSmrg fi 6621e6f085baSmrg done 6622e6f085baSmrg done 6623e6f085baSmrgdone 6624e6f085baSmrgIFS=$as_save_IFS 6625e6f085baSmrglt_ac_max=0 6626e6f085baSmrglt_ac_count=0 6627e6f085baSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 6628e6f085baSmrg# along with /bin/sed that truncates output. 6629e6f085baSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 6630e6f085baSmrg test ! -f $lt_ac_sed && continue 6631e6f085baSmrg cat /dev/null > conftest.in 6632e6f085baSmrg lt_ac_count=0 6633e6f085baSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 6634e6f085baSmrg # Check for GNU sed and select it if it is found. 6635e6f085baSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 6636e6f085baSmrg lt_cv_path_SED=$lt_ac_sed 6637e6f085baSmrg break 6638e6f085baSmrg fi 6639e6f085baSmrg while true; do 6640e6f085baSmrg cat conftest.in conftest.in >conftest.tmp 6641e6f085baSmrg mv conftest.tmp conftest.in 6642e6f085baSmrg cp conftest.in conftest.nl 6643e6f085baSmrg echo >>conftest.nl 6644e6f085baSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 6645e6f085baSmrg cmp -s conftest.out conftest.nl || break 6646e6f085baSmrg # 10000 chars as input seems more than enough 6647e6f085baSmrg test $lt_ac_count -gt 10 && break 6648e6f085baSmrg lt_ac_count=`expr $lt_ac_count + 1` 6649e6f085baSmrg if test $lt_ac_count -gt $lt_ac_max; then 6650e6f085baSmrg lt_ac_max=$lt_ac_count 6651e6f085baSmrg lt_cv_path_SED=$lt_ac_sed 6652e6f085baSmrg fi 6653e6f085baSmrg done 6654e6f085baSmrgdone 6655e6f085baSmrg]) 6656e6f085baSmrgSED=$lt_cv_path_SED 6657e6f085baSmrgAC_SUBST([SED]) 6658e6f085baSmrgAC_MSG_RESULT([$SED]) 665995b296d0Smrg]) 666039713583Smrg 666195b296d0Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 666295b296d0Smrg# 666395b296d0Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 666495b296d0Smrg# 666595b296d0Smrg# This program is free software; you can redistribute it and/or modify 666695b296d0Smrg# it under the terms of the GNU General Public License as published by 666795b296d0Smrg# the Free Software Foundation; either version 2 of the License, or 666895b296d0Smrg# (at your option) any later version. 666995b296d0Smrg# 667095b296d0Smrg# This program is distributed in the hope that it will be useful, but 667195b296d0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 667295b296d0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 667395b296d0Smrg# General Public License for more details. 667495b296d0Smrg# 667595b296d0Smrg# You should have received a copy of the GNU General Public License 667695b296d0Smrg# along with this program; if not, write to the Free Software 667795b296d0Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 667895b296d0Smrg# 667995b296d0Smrg# As a special exception to the GNU General Public License, if you 668095b296d0Smrg# distribute this file as part of a program that contains a 668195b296d0Smrg# configuration script generated by Autoconf, you may include it under 668295b296d0Smrg# the same distribution terms that you use for the rest of that program. 668395b296d0Smrg 668495b296d0Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 668595b296d0Smrg# ---------------------------------- 668695b296d0SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 668795b296d0Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 668895b296d0Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 668995b296d0SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 669095b296d0Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 669195b296d0Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 669295b296d0Smrgfi 669395b296d0Smrgif test -n "$PKG_CONFIG"; then 669495b296d0Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 669595b296d0Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 669695b296d0Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 669795b296d0Smrg AC_MSG_RESULT([yes]) 669895b296d0Smrg else 669995b296d0Smrg AC_MSG_RESULT([no]) 670095b296d0Smrg PKG_CONFIG="" 670195b296d0Smrg fi 670295b296d0Smrg 670395b296d0Smrgfi[]dnl 670495b296d0Smrg])# PKG_PROG_PKG_CONFIG 670595b296d0Smrg 670695b296d0Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 670795b296d0Smrg# 670895b296d0Smrg# Check to see whether a particular set of modules exists. Similar 670995b296d0Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 671095b296d0Smrg# 671195b296d0Smrg# 671295b296d0Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 671395b296d0Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 671495b296d0Smrg# PKG_CHECK_EXISTS manually 671595b296d0Smrg# -------------------------------------------------------------- 671695b296d0SmrgAC_DEFUN([PKG_CHECK_EXISTS], 671795b296d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 671895b296d0Smrgif test -n "$PKG_CONFIG" && \ 671995b296d0Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 672095b296d0Smrg m4_ifval([$2], [$2], [:]) 672195b296d0Smrgm4_ifvaln([$3], [else 672295b296d0Smrg $3])dnl 672395b296d0Smrgfi]) 672495b296d0Smrg 672595b296d0Smrg 672695b296d0Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 672795b296d0Smrg# --------------------------------------------- 672895b296d0Smrgm4_define([_PKG_CONFIG], 6729ff89ac2bSmrg[if test -n "$$1"; then 6730ff89ac2bSmrg pkg_cv_[]$1="$$1" 6731ff89ac2bSmrg elif test -n "$PKG_CONFIG"; then 6732ff89ac2bSmrg PKG_CHECK_EXISTS([$3], 6733ff89ac2bSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 6734ff89ac2bSmrg [pkg_failed=yes]) 6735ff89ac2bSmrg else 6736ff89ac2bSmrg pkg_failed=untried 673795b296d0Smrgfi[]dnl 673895b296d0Smrg])# _PKG_CONFIG 673995b296d0Smrg 674095b296d0Smrg# _PKG_SHORT_ERRORS_SUPPORTED 674195b296d0Smrg# ----------------------------- 674295b296d0SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 674395b296d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 674495b296d0Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 674595b296d0Smrg _pkg_short_errors_supported=yes 674695b296d0Smrgelse 674795b296d0Smrg _pkg_short_errors_supported=no 674895b296d0Smrgfi[]dnl 674995b296d0Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 675095b296d0Smrg 675195b296d0Smrg 675295b296d0Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 675395b296d0Smrg# [ACTION-IF-NOT-FOUND]) 675495b296d0Smrg# 675595b296d0Smrg# 675695b296d0Smrg# Note that if there is a possibility the first call to 675795b296d0Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 675895b296d0Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 675995b296d0Smrg# 676095b296d0Smrg# 676195b296d0Smrg# -------------------------------------------------------------- 676295b296d0SmrgAC_DEFUN([PKG_CHECK_MODULES], 676395b296d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 676495b296d0SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 676595b296d0SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 676695b296d0Smrg 676795b296d0Smrgpkg_failed=no 676895b296d0SmrgAC_MSG_CHECKING([for $1]) 676995b296d0Smrg 677095b296d0Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 677195b296d0Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 677295b296d0Smrg 677395b296d0Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 677495b296d0Smrgand $1[]_LIBS to avoid the need to call pkg-config. 677595b296d0SmrgSee the pkg-config man page for more details.]) 677695b296d0Smrg 677795b296d0Smrgif test $pkg_failed = yes; then 677895b296d0Smrg _PKG_SHORT_ERRORS_SUPPORTED 677995b296d0Smrg if test $_pkg_short_errors_supported = yes; then 6780ff89ac2bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 678195b296d0Smrg else 6782ff89ac2bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 678395b296d0Smrg fi 678495b296d0Smrg # Put the nasty error message in config.log where it belongs 678595b296d0Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 678695b296d0Smrg 678795b296d0Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 678895b296d0Smrg[Package requirements ($2) were not met: 678995b296d0Smrg 679095b296d0Smrg$$1_PKG_ERRORS 679195b296d0Smrg 679295b296d0SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 679395b296d0Smrginstalled software in a non-standard prefix. 679495b296d0Smrg 679595b296d0Smrg_PKG_TEXT 679695b296d0Smrg])], 6797ff89ac2bSmrg [AC_MSG_RESULT([no]) 6798ff89ac2bSmrg $4]) 679995b296d0Smrgelif test $pkg_failed = untried; then 680095b296d0Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 680195b296d0Smrg[The pkg-config script could not be found or is too old. Make sure it 680295b296d0Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 680395b296d0Smrgpath to pkg-config. 680495b296d0Smrg 680595b296d0Smrg_PKG_TEXT 680695b296d0Smrg 6807ff89ac2bSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 680895b296d0Smrg [$4]) 680995b296d0Smrgelse 681095b296d0Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 681195b296d0Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 681295b296d0Smrg AC_MSG_RESULT([yes]) 681395b296d0Smrg ifelse([$3], , :, [$3]) 681495b296d0Smrgfi[]dnl 681595b296d0Smrg])# PKG_CHECK_MODULES 681695b296d0Smrg 681739713583Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 681895b296d0Smrgdnl 681995b296d0Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 682095b296d0Smrgdnl 682195b296d0Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 682295b296d0Smrgdnl copy of this software and associated documentation files (the 682395b296d0Smrgdnl "Software"), to deal in the Software without restriction, including 682495b296d0Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 682595b296d0Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 682695b296d0Smrgdnl to whom the Software is furnished to do so, provided that the above 682795b296d0Smrgdnl copyright notice(s) and this permission notice appear in all copies of 682895b296d0Smrgdnl the Software and that both the above copyright notice(s) and this 682995b296d0Smrgdnl permission notice appear in supporting documentation. 683095b296d0Smrgdnl 683195b296d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 683295b296d0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 683395b296d0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 683495b296d0Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 683595b296d0Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 683695b296d0Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 683795b296d0Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 683895b296d0Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 683995b296d0Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 684095b296d0Smrgdnl 684195b296d0Smrgdnl Except as contained in this notice, the name of a copyright holder 684295b296d0Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 684395b296d0Smrgdnl or other dealings in this Software without prior written authorization 684495b296d0Smrgdnl of the copyright holder. 684595b296d0Smrg 684695b296d0Smrg# XORG_MACROS_VERSION(required-version) 684795b296d0Smrg# ------------------------------------- 684895b296d0Smrg# Minimum version: 1.1.0 684995b296d0Smrg# 685095b296d0Smrg# If you're using a macro added in Version 1.1 or newer, include this in 685195b296d0Smrg# your configure.ac with the minimum required version, such as: 685295b296d0Smrg# XORG_MACROS_VERSION(1.1) 685395b296d0Smrg# 685495b296d0Smrg# To force at least a version with this macro defined, also add: 685595b296d0Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 685695b296d0Smrg# 685795b296d0Smrg# 685895b296d0Smrg# See the "minimum version" comment for each macro you use to see what 685995b296d0Smrg# version you require. 686095b296d0SmrgAC_DEFUN([XORG_MACROS_VERSION],[ 686195b296d0Smrg [XORG_MACROS_needed_version=$1 686295b296d0Smrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 686395b296d0Smrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 686495b296d0Smrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 686539713583Smrg [XORG_MACROS_version=1.2.1 686695b296d0Smrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 686795b296d0Smrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 686895b296d0Smrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 686995b296d0Smrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 687095b296d0Smrg fi 687195b296d0Smrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 687295b296d0Smrg 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]) 687395b296d0Smrg fi 687495b296d0Smrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 687595b296d0Smrg]) # XORG_MACROS_VERSION 687695b296d0Smrg 687795b296d0Smrg# XORG_PROG_RAWCPP() 687895b296d0Smrg# ------------------ 687995b296d0Smrg# Minimum version: 1.0.0 688095b296d0Smrg# 688195b296d0Smrg# Find cpp program and necessary flags for use in pre-processing text files 688295b296d0Smrg# such as man pages and config files 688395b296d0SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 688495b296d0SmrgAC_REQUIRE([AC_PROG_CPP]) 688595b296d0SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 688695b296d0Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 688795b296d0Smrg 688895b296d0Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 688995b296d0Smrg# which is not the best choice for supporting other OS'es, but covers most 689095b296d0Smrg# of the ones we need for now. 689195b296d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 689295b296d0SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 689395b296d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 689495b296d0Smrg AC_MSG_RESULT([no]) 689595b296d0Smrgelse 689695b296d0Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 689795b296d0Smrg RAWCPPFLAGS=-undef 689895b296d0Smrg AC_MSG_RESULT([yes]) 689939713583Smrg # under Cygwin unix is still defined even with -undef 690039713583Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 690139713583Smrg RAWCPPFLAGS="-undef -ansi" 690239713583Smrg AC_MSG_RESULT([yes, with -ansi]) 690395b296d0Smrg else 690495b296d0Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 690595b296d0Smrg fi 690695b296d0Smrgfi 690795b296d0Smrgrm -f conftest.$ac_ext 690895b296d0Smrg 690995b296d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 691095b296d0SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 691195b296d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 691295b296d0Smrg AC_MSG_RESULT([no]) 691395b296d0Smrgelse 691495b296d0Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 691595b296d0Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 691695b296d0Smrg AC_MSG_RESULT([yes]) 691795b296d0Smrg else 691895b296d0Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 691995b296d0Smrg fi 692095b296d0Smrgfi 692195b296d0Smrgrm -f conftest.$ac_ext 692295b296d0SmrgAC_SUBST(RAWCPPFLAGS) 692395b296d0Smrg]) # XORG_PROG_RAWCPP 692495b296d0Smrg 692595b296d0Smrg# XORG_MANPAGE_SECTIONS() 692695b296d0Smrg# ----------------------- 692795b296d0Smrg# Minimum version: 1.0.0 692895b296d0Smrg# 692995b296d0Smrg# Determine which sections man pages go in for the different man page types 693095b296d0Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 693195b296d0Smrg# Not sure if there's any better way than just hardcoding by OS name. 693295b296d0Smrg# Override default settings by setting environment variables 693395b296d0Smrg 693495b296d0SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 693595b296d0SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 693695b296d0Smrg 693795b296d0Smrgif test x$APP_MAN_SUFFIX = x ; then 6938ff89ac2bSmrg APP_MAN_SUFFIX=1 693995b296d0Smrgfi 694095b296d0Smrgif test x$APP_MAN_DIR = x ; then 6941ff89ac2bSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 694295b296d0Smrgfi 694395b296d0Smrg 694495b296d0Smrgif test x$LIB_MAN_SUFFIX = x ; then 6945ff89ac2bSmrg LIB_MAN_SUFFIX=3 694695b296d0Smrgfi 694795b296d0Smrgif test x$LIB_MAN_DIR = x ; then 6948ff89ac2bSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 694995b296d0Smrgfi 695095b296d0Smrg 695195b296d0Smrgif test x$FILE_MAN_SUFFIX = x ; then 695295b296d0Smrg case $host_os in 695395b296d0Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 695495b296d0Smrg *) FILE_MAN_SUFFIX=5 ;; 695595b296d0Smrg esac 695695b296d0Smrgfi 695795b296d0Smrgif test x$FILE_MAN_DIR = x ; then 6958ff89ac2bSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 695995b296d0Smrgfi 696095b296d0Smrg 696195b296d0Smrgif test x$MISC_MAN_SUFFIX = x ; then 696295b296d0Smrg case $host_os in 696395b296d0Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 696495b296d0Smrg *) MISC_MAN_SUFFIX=7 ;; 696595b296d0Smrg esac 696695b296d0Smrgfi 696795b296d0Smrgif test x$MISC_MAN_DIR = x ; then 6968ff89ac2bSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 696995b296d0Smrgfi 697095b296d0Smrg 697195b296d0Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 697295b296d0Smrg case $host_os in 697395b296d0Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 697495b296d0Smrg *) DRIVER_MAN_SUFFIX=4 ;; 697595b296d0Smrg esac 697695b296d0Smrgfi 697795b296d0Smrgif test x$DRIVER_MAN_DIR = x ; then 6978ff89ac2bSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 697995b296d0Smrgfi 698095b296d0Smrg 698195b296d0Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 698295b296d0Smrg case $host_os in 698395b296d0Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 698495b296d0Smrg *) ADMIN_MAN_SUFFIX=8 ;; 698595b296d0Smrg esac 698695b296d0Smrgfi 698795b296d0Smrgif test x$ADMIN_MAN_DIR = x ; then 698895b296d0Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 698995b296d0Smrgfi 699095b296d0Smrg 699195b296d0Smrg 699295b296d0SmrgAC_SUBST([APP_MAN_SUFFIX]) 699395b296d0SmrgAC_SUBST([LIB_MAN_SUFFIX]) 699495b296d0SmrgAC_SUBST([FILE_MAN_SUFFIX]) 699595b296d0SmrgAC_SUBST([MISC_MAN_SUFFIX]) 699695b296d0SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 699795b296d0SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 699895b296d0SmrgAC_SUBST([APP_MAN_DIR]) 699995b296d0SmrgAC_SUBST([LIB_MAN_DIR]) 700095b296d0SmrgAC_SUBST([FILE_MAN_DIR]) 700195b296d0SmrgAC_SUBST([MISC_MAN_DIR]) 700295b296d0SmrgAC_SUBST([DRIVER_MAN_DIR]) 700395b296d0SmrgAC_SUBST([ADMIN_MAN_DIR]) 700495b296d0Smrg]) # XORG_MANPAGE_SECTIONS 700595b296d0Smrg 700695b296d0Smrg# XORG_CHECK_LINUXDOC 700795b296d0Smrg# ------------------- 700895b296d0Smrg# Minimum version: 1.0.0 700995b296d0Smrg# 701095b296d0Smrg# Defines the variable MAKE_TEXT if the necessary tools and 701195b296d0Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 701295b296d0Smrg# Whether or not the necessary tools and files are found can be checked 701395b296d0Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 701495b296d0SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 701539713583Smrgif test x$XORG_SGML_PATH = x ; then 701639713583Smrg XORG_SGML_PATH=$prefix/share/sgml 701739713583Smrgfi 7018ff89ac2bSmrgHAVE_DEFS_ENT= 7019ff89ac2bSmrg 7020ff89ac2bSmrgif test x"$cross_compiling" = x"yes" ; then 7021ff89ac2bSmrg HAVE_DEFS_ENT=no 7022ff89ac2bSmrgelse 7023ff89ac2bSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 7024ff89ac2bSmrgfi 702595b296d0Smrg 702695b296d0SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 702795b296d0SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 702895b296d0Smrg 702995b296d0SmrgAC_MSG_CHECKING([Whether to build documentation]) 703095b296d0Smrg 7031ff89ac2bSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 703295b296d0Smrg BUILDDOC=yes 703395b296d0Smrgelse 703495b296d0Smrg BUILDDOC=no 703595b296d0Smrgfi 703695b296d0Smrg 703795b296d0SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 703895b296d0Smrg 703995b296d0SmrgAC_MSG_RESULT([$BUILDDOC]) 704095b296d0Smrg 704195b296d0SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 704295b296d0Smrg 7043ff89ac2bSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 704495b296d0Smrg BUILDPDFDOC=yes 704595b296d0Smrgelse 704695b296d0Smrg BUILDPDFDOC=no 704795b296d0Smrgfi 704895b296d0Smrg 704995b296d0SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 705095b296d0Smrg 705195b296d0SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 705295b296d0Smrg 7053ff89ac2bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 7054ff89ac2bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 705595b296d0SmrgMAKE_PDF="$PS2PDF" 7056ff89ac2bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 705795b296d0Smrg 705895b296d0SmrgAC_SUBST(MAKE_TEXT) 705995b296d0SmrgAC_SUBST(MAKE_PS) 706095b296d0SmrgAC_SUBST(MAKE_PDF) 706195b296d0SmrgAC_SUBST(MAKE_HTML) 706295b296d0Smrg]) # XORG_CHECK_LINUXDOC 706395b296d0Smrg 7064ff89ac2bSmrg# XORG_CHECK_DOCBOOK 7065ff89ac2bSmrg# ------------------- 7066ff89ac2bSmrg# Minimum version: 1.0.0 7067ff89ac2bSmrg# 7068ff89ac2bSmrg# Checks for the ability to build output formats from SGML DocBook source. 7069ff89ac2bSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 7070ff89ac2bSmrg# indicates whether the necessary tools and files are found and, if set, 7071ff89ac2bSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 7072ff89ac2bSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 707339713583Smrgif test x$XORG_SGML_PATH = x ; then 707439713583Smrg XORG_SGML_PATH=$prefix/share/sgml 707539713583Smrgfi 7076ff89ac2bSmrgHAVE_DEFS_ENT= 7077ff89ac2bSmrgBUILDTXTDOC=no 7078ff89ac2bSmrgBUILDPDFDOC=no 7079ff89ac2bSmrgBUILDPSDOC=no 7080ff89ac2bSmrgBUILDHTMLDOC=no 7081ff89ac2bSmrg 7082ff89ac2bSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 7083ff89ac2bSmrg 7084ff89ac2bSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 7085ff89ac2bSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 7086ff89ac2bSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 7087ff89ac2bSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 7088ff89ac2bSmrg 7089ff89ac2bSmrgAC_MSG_CHECKING([Whether to build text documentation]) 7090ff89ac2bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 7091ff89ac2bSmrg test x$BUILD_TXTDOC != xno; then 7092ff89ac2bSmrg BUILDTXTDOC=yes 7093ff89ac2bSmrgfi 7094ff89ac2bSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 7095ff89ac2bSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 7096ff89ac2bSmrg 7097ff89ac2bSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 7098ff89ac2bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 7099ff89ac2bSmrg test x$BUILD_PDFDOC != xno; then 7100ff89ac2bSmrg BUILDPDFDOC=yes 7101ff89ac2bSmrgfi 7102ff89ac2bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 7103ff89ac2bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 7104ff89ac2bSmrg 7105ff89ac2bSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 7106ff89ac2bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 7107ff89ac2bSmrg test x$BUILD_PSDOC != xno; then 7108ff89ac2bSmrg BUILDPSDOC=yes 7109ff89ac2bSmrgfi 7110ff89ac2bSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 7111ff89ac2bSmrgAC_MSG_RESULT([$BUILDPSDOC]) 7112ff89ac2bSmrg 7113ff89ac2bSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 7114ff89ac2bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 7115ff89ac2bSmrg test x$BUILD_HTMLDOC != xno; then 7116ff89ac2bSmrg BUILDHTMLDOC=yes 7117ff89ac2bSmrgfi 7118ff89ac2bSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 7119ff89ac2bSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 7120ff89ac2bSmrg 7121ff89ac2bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 7122ff89ac2bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 7123ff89ac2bSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 7124ff89ac2bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 7125ff89ac2bSmrg 7126ff89ac2bSmrgAC_SUBST(MAKE_TEXT) 7127ff89ac2bSmrgAC_SUBST(MAKE_PS) 7128ff89ac2bSmrgAC_SUBST(MAKE_PDF) 7129ff89ac2bSmrgAC_SUBST(MAKE_HTML) 7130ff89ac2bSmrg]) # XORG_CHECK_DOCBOOK 7131ff89ac2bSmrg 713295b296d0Smrg# XORG_CHECK_MALLOC_ZERO 713395b296d0Smrg# ---------------------- 713495b296d0Smrg# Minimum version: 1.0.0 713595b296d0Smrg# 713695b296d0Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 713795b296d0Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 713895b296d0Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 713995b296d0SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 714095b296d0SmrgAC_ARG_ENABLE(malloc0returnsnull, 714195b296d0Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 714295b296d0Smrg [malloc(0) returns NULL (default: auto)]), 714395b296d0Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 714495b296d0Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 714595b296d0Smrg 714695b296d0SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 714795b296d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 714895b296d0Smrg AC_RUN_IFELSE([ 714995b296d0Smrgchar *malloc(); 715095b296d0Smrgchar *realloc(); 715195b296d0Smrgchar *calloc(); 715295b296d0Smrgmain() { 715395b296d0Smrg char *m0, *r0, *c0, *p; 715495b296d0Smrg m0 = malloc(0); 715595b296d0Smrg p = malloc(10); 715695b296d0Smrg r0 = realloc(p,0); 715795b296d0Smrg c0 = calloc(0); 715895b296d0Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 715995b296d0Smrg}], 716095b296d0Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 716195b296d0Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 716295b296d0Smrgfi 716395b296d0SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 716495b296d0Smrg 716595b296d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 716695b296d0Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 716795b296d0Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 716895b296d0Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 716995b296d0Smrgelse 717095b296d0Smrg MALLOC_ZERO_CFLAGS="" 717195b296d0Smrg XMALLOC_ZERO_CFLAGS="" 717295b296d0Smrg XTMALLOC_ZERO_CFLAGS="" 717395b296d0Smrgfi 717495b296d0Smrg 717595b296d0SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 717695b296d0SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 717795b296d0SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 717895b296d0Smrg]) # XORG_CHECK_MALLOC_ZERO 717995b296d0Smrg 718095b296d0Smrg# XORG_WITH_LINT() 718195b296d0Smrg# ---------------- 718295b296d0Smrg# Minimum version: 1.1.0 718395b296d0Smrg# 718495b296d0Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 718595b296d0Smrg# is specified. (Use --with-lint=sparse for sparse.) 718695b296d0Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 718795b296d0Smrg# Sets $LINT_FLAGS to flags to pass to source checker 718895b296d0Smrg# Sets LINT automake conditional if enabled (default: disabled) 718995b296d0Smrg# 719095b296d0SmrgAC_DEFUN([XORG_WITH_LINT],[ 719195b296d0Smrg 719295b296d0Smrg# Allow checking code with lint, sparse, etc. 719395b296d0SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 719495b296d0Smrg [Use a lint-style source code checker (default: disabled)])], 719595b296d0Smrg [use_lint=$withval], [use_lint=no]) 719695b296d0Smrgif test "x$use_lint" = "xyes" ; then 719795b296d0Smrg LINT="lint" 719895b296d0Smrgelse 719995b296d0Smrg LINT="$use_lint" 720095b296d0Smrgfi 720195b296d0Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 720295b296d0Smrg case $LINT in 720395b296d0Smrg lint|*/lint) 720495b296d0Smrg case $host_os in 720595b296d0Smrg solaris*) 720695b296d0Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 720795b296d0Smrg ;; 720895b296d0Smrg esac 720995b296d0Smrg ;; 721095b296d0Smrg esac 721195b296d0Smrgfi 721295b296d0Smrg 721395b296d0SmrgAC_SUBST(LINT) 721495b296d0SmrgAC_SUBST(LINT_FLAGS) 721595b296d0SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 721695b296d0Smrg 721795b296d0Smrg]) # XORG_WITH_LINT 721895b296d0Smrg 721995b296d0Smrg# XORG_LINT_LIBRARY(LIBNAME) 722095b296d0Smrg# -------------------------- 722195b296d0Smrg# Minimum version: 1.1.0 722295b296d0Smrg# 722395b296d0Smrg# Sets up flags for building lint libraries for checking programs that call 722495b296d0Smrg# functions in the library. 722595b296d0Smrg# Disabled by default, enable with --enable-lint-library 722695b296d0Smrg# Sets: 722795b296d0Smrg# @LINTLIB@ - name of lint library file to make 722895b296d0Smrg# MAKE_LINT_LIB - automake conditional 722995b296d0Smrg# 723095b296d0Smrg 723195b296d0SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 723295b296d0SmrgAC_REQUIRE([XORG_WITH_LINT]) 723395b296d0Smrg# Build lint "library" for more indepth checks of programs calling this library 723495b296d0SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 723595b296d0Smrg [Create lint library (default: disabled)])], 723695b296d0Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 723795b296d0Smrgif test "x$make_lint_lib" != "xno" ; then 723895b296d0Smrg if test "x$LINT" = "xno" ; then 723995b296d0Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 724095b296d0Smrg fi 724195b296d0Smrg if test "x$make_lint_lib" = "xyes" ; then 724295b296d0Smrg LINTLIB=llib-l$1.ln 724395b296d0Smrg else 724495b296d0Smrg LINTLIB=$make_lint_lib 724595b296d0Smrg fi 724695b296d0Smrgfi 724795b296d0SmrgAC_SUBST(LINTLIB) 724895b296d0SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 724995b296d0Smrg 725095b296d0Smrg]) # XORG_LINT_LIBRARY 725195b296d0Smrg 725239713583Smrg# XORG_CWARNFLAGS 725339713583Smrg# --------------- 725439713583Smrg# Minimum version: 1.2.0 725539713583Smrg# 725639713583Smrg# Defines CWARNFLAGS to enable C compiler warnings. 725739713583Smrg# 725839713583SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 725939713583SmrgAC_REQUIRE([AC_PROG_CC]) 726039713583Smrgif test "x$GCC" = xyes ; then 726139713583Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 726239713583Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 726339713583Smrg-Wbad-function-cast" 726439713583Smrg case `gcc -dumpversion` in 726539713583Smrg 3.4.* | 4.*) 726639713583Smrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 726739713583Smrg ;; 726839713583Smrg esac 726939713583Smrgelse 727039713583Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 727139713583Smrg if test "x$SUNCC" = "xyes"; then 727239713583Smrg CWARNFLAGS="-v" 727339713583Smrg fi 727439713583Smrgfi 727539713583SmrgAC_SUBST(CWARNFLAGS) 727639713583Smrg]) # XORG_CWARNFLAGS 727795b296d0Smrgdnl Copyright 2005 Red Hat, Inc 727895b296d0Smrgdnl 727995b296d0Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 728095b296d0Smrgdnl documentation for any purpose is hereby granted without fee, provided that 728195b296d0Smrgdnl the above copyright notice appear in all copies and that both that 728295b296d0Smrgdnl copyright notice and this permission notice appear in supporting 728395b296d0Smrgdnl documentation. 728495b296d0Smrgdnl 728595b296d0Smrgdnl The above copyright notice and this permission notice shall be included 728695b296d0Smrgdnl in all copies or substantial portions of the Software. 728795b296d0Smrgdnl 728895b296d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 728995b296d0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 729095b296d0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 729195b296d0Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 729295b296d0Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 729395b296d0Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 729495b296d0Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 729595b296d0Smrgdnl 729695b296d0Smrgdnl Except as contained in this notice, the name of the copyright holders shall 729795b296d0Smrgdnl not be used in advertising or otherwise to promote the sale, use or 729895b296d0Smrgdnl other dealings in this Software without prior written authorization 729995b296d0Smrgdnl from the copyright holders. 730095b296d0Smrgdnl 730195b296d0Smrg 730295b296d0Smrg# XORG_RELEASE_VERSION 730395b296d0Smrg# -------------------- 730495b296d0Smrg# Adds --with/without-release-string and changes the PACKAGE and 730595b296d0Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 7306ff89ac2bSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 7307ff89ac2bSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 730895b296d0Smrg 730995b296d0SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 731095b296d0Smrg AC_ARG_WITH(release-version, 731195b296d0Smrg AC_HELP_STRING([--with-release-version=STRING], 731295b296d0Smrg [Use release version string in package name]), 731395b296d0Smrg [RELEASE_VERSION="$withval"], 731495b296d0Smrg [RELEASE_VERSION=""]) 731595b296d0Smrg if test "x$RELEASE_VERSION" != "x"; then 731695b296d0Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 731795b296d0Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 731895b296d0Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 731995b296d0Smrg fi 7320ff89ac2bSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 7321ff89ac2bSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 7322ff89ac2bSmrg [Major version of this package]) 7323ff89ac2bSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 7324ff89ac2bSmrg if test "x$PVM" = "x"; then 7325ff89ac2bSmrg PVM="0" 7326ff89ac2bSmrg fi 7327ff89ac2bSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 7328ff89ac2bSmrg [$PVM], 7329ff89ac2bSmrg [Minor version of this package]) 7330ff89ac2bSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 7331ff89ac2bSmrg if test "x$PVP" = "x"; then 7332ff89ac2bSmrg PVP="0" 7333ff89ac2bSmrg fi 7334ff89ac2bSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 7335ff89ac2bSmrg [$PVP], 7336ff89ac2bSmrg [Patch version of this package]) 733795b296d0Smrg]) 733895b296d0Smrg 733939713583Smrg# XORG_CHANGELOG() 734039713583Smrg# ---------------- 734139713583Smrg# Minimum version: 1.2.0 734239713583Smrg# 734339713583Smrg# Defines the variable CHANGELOG_CMD as the command to generate 734439713583Smrg# ChangeLog from git. 734539713583Smrg# 734639713583Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 734739713583Smrg# 734839713583SmrgAC_DEFUN([XORG_CHANGELOG], [ 734939713583SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 735039713583Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 735139713583Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 735239713583SmrgAC_SUBST([CHANGELOG_CMD]) 735339713583SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 735439713583Smrg]) # XORG_CHANGELOG 735539713583Smrg 735639713583Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 735795b296d0Smrg# 735895b296d0Smrg# This file is free software; the Free Software Foundation 735995b296d0Smrg# gives unlimited permission to copy and/or distribute it, 736095b296d0Smrg# with or without modifications, as long as this notice is preserved. 736195b296d0Smrg 736295b296d0Smrg# AM_AUTOMAKE_VERSION(VERSION) 736395b296d0Smrg# ---------------------------- 736495b296d0Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 736595b296d0Smrg# generated from the m4 files accompanying Automake X.Y. 7366ff89ac2bSmrg# (This private macro should not be called outside this file.) 7367ff89ac2bSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 7368e6f085baSmrg[am__api_version='1.11' 7369ff89ac2bSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 7370ff89ac2bSmrgdnl require some minimum version. Point them to the right macro. 7371e6f085baSmrgm4_if([$1], [1.11], [], 7372ff89ac2bSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 7373ff89ac2bSmrg]) 7374ff89ac2bSmrg 7375ff89ac2bSmrg# _AM_AUTOCONF_VERSION(VERSION) 7376ff89ac2bSmrg# ----------------------------- 7377ff89ac2bSmrg# aclocal traces this macro to find the Autoconf version. 7378ff89ac2bSmrg# This is a private macro too. Using m4_define simplifies 7379ff89ac2bSmrg# the logic in aclocal, which can simply ignore this definition. 7380ff89ac2bSmrgm4_define([_AM_AUTOCONF_VERSION], []) 738195b296d0Smrg 738295b296d0Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 738395b296d0Smrg# ------------------------------- 7384ff89ac2bSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 738539713583Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 738695b296d0SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 7387e6f085baSmrg[AM_AUTOMAKE_VERSION([1.11])dnl 7388ff89ac2bSmrgm4_ifndef([AC_AUTOCONF_VERSION], 7389ff89ac2bSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 739039713583Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 739195b296d0Smrg 739295b296d0Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 739395b296d0Smrg 739495b296d0Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 739595b296d0Smrg# 739695b296d0Smrg# This file is free software; the Free Software Foundation 739795b296d0Smrg# gives unlimited permission to copy and/or distribute it, 739895b296d0Smrg# with or without modifications, as long as this notice is preserved. 739995b296d0Smrg 740095b296d0Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 740195b296d0Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 740295b296d0Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 740395b296d0Smrg# 740495b296d0Smrg# Of course, Automake must honor this variable whenever it calls a 740595b296d0Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 740695b296d0Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 740795b296d0Smrg# depending on how configure is run. This is pretty annoying, since 740895b296d0Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 740995b296d0Smrg# source directory, any form will work fine, but in subdirectories a 741095b296d0Smrg# relative path needs to be adjusted first. 741195b296d0Smrg# 741295b296d0Smrg# $ac_aux_dir/missing 741395b296d0Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 741495b296d0Smrg# $top_srcdir/$ac_aux_dir/missing 741595b296d0Smrg# fails if $ac_aux_dir is absolute, 741695b296d0Smrg# fails when called from a subdirectory in a VPATH build with 741795b296d0Smrg# a relative $ac_aux_dir 741895b296d0Smrg# 741995b296d0Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 742095b296d0Smrg# are both prefixed by $srcdir. In an in-source build this is usually 742195b296d0Smrg# harmless because $srcdir is `.', but things will broke when you 742295b296d0Smrg# start a VPATH build or use an absolute $srcdir. 742395b296d0Smrg# 742495b296d0Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 742595b296d0Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 742695b296d0Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 742795b296d0Smrg# and then we would define $MISSING as 742895b296d0Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 742995b296d0Smrg# This will work as long as MISSING is not called from configure, because 743095b296d0Smrg# unfortunately $(top_srcdir) has no meaning in configure. 743195b296d0Smrg# However there are other variables, like CC, which are often used in 743295b296d0Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 743395b296d0Smrg# 743495b296d0Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 743595b296d0Smrg# absolute PATH. The drawback is that using absolute paths prevent a 743695b296d0Smrg# configured tree to be moved without reconfiguration. 743795b296d0Smrg 743895b296d0SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 743995b296d0Smrg[dnl Rely on autoconf to set up CDPATH properly. 744095b296d0SmrgAC_PREREQ([2.50])dnl 744195b296d0Smrg# expand $ac_aux_dir to an absolute path 744295b296d0Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 744395b296d0Smrg]) 744495b296d0Smrg 744595b296d0Smrg# AM_CONDITIONAL -*- Autoconf -*- 744695b296d0Smrg 7447e6f085baSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 744895b296d0Smrg# Free Software Foundation, Inc. 744995b296d0Smrg# 745095b296d0Smrg# This file is free software; the Free Software Foundation 745195b296d0Smrg# gives unlimited permission to copy and/or distribute it, 745295b296d0Smrg# with or without modifications, as long as this notice is preserved. 745395b296d0Smrg 7454e6f085baSmrg# serial 9 745595b296d0Smrg 745695b296d0Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 745795b296d0Smrg# ------------------------------------- 745895b296d0Smrg# Define a conditional. 745995b296d0SmrgAC_DEFUN([AM_CONDITIONAL], 746095b296d0Smrg[AC_PREREQ(2.52)dnl 746195b296d0Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 746295b296d0Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 7463ff89ac2bSmrgAC_SUBST([$1_TRUE])dnl 7464ff89ac2bSmrgAC_SUBST([$1_FALSE])dnl 7465ff89ac2bSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 7466ff89ac2bSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 7467e6f085baSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 746895b296d0Smrgif $2; then 746995b296d0Smrg $1_TRUE= 747095b296d0Smrg $1_FALSE='#' 747195b296d0Smrgelse 747295b296d0Smrg $1_TRUE='#' 747395b296d0Smrg $1_FALSE= 747495b296d0Smrgfi 747595b296d0SmrgAC_CONFIG_COMMANDS_PRE( 747695b296d0Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 747795b296d0Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 747895b296d0SmrgUsually this means the macro was only invoked conditionally.]]) 747995b296d0Smrgfi])]) 748095b296d0Smrg 7481e6f085baSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 748295b296d0Smrg# Free Software Foundation, Inc. 748395b296d0Smrg# 748495b296d0Smrg# This file is free software; the Free Software Foundation 748595b296d0Smrg# gives unlimited permission to copy and/or distribute it, 748695b296d0Smrg# with or without modifications, as long as this notice is preserved. 748795b296d0Smrg 7488e6f085baSmrg# serial 10 748995b296d0Smrg 749095b296d0Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 749195b296d0Smrg# written in clear, in which case automake, when reading aclocal.m4, 749295b296d0Smrg# will think it sees a *use*, and therefore will trigger all it's 749395b296d0Smrg# C support machinery. Also note that it means that autoscan, seeing 749495b296d0Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 749595b296d0Smrg 749695b296d0Smrg 749795b296d0Smrg# _AM_DEPENDENCIES(NAME) 749895b296d0Smrg# ---------------------- 749995b296d0Smrg# See how the compiler implements dependency checking. 750095b296d0Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 750195b296d0Smrg# We try a few techniques and use that to set a single cache variable. 750295b296d0Smrg# 750395b296d0Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 750495b296d0Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 750595b296d0Smrg# dependency, and given that the user is not expected to run this macro, 750695b296d0Smrg# just rely on AC_PROG_CC. 750795b296d0SmrgAC_DEFUN([_AM_DEPENDENCIES], 750895b296d0Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 750995b296d0SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 751095b296d0SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 751195b296d0SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 751295b296d0Smrg 751395b296d0Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 751495b296d0Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 751595b296d0Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 7516ff89ac2bSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 751795b296d0Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 751895b296d0Smrg [depcc="$$1" am_compiler_list=]) 751995b296d0Smrg 752095b296d0SmrgAC_CACHE_CHECK([dependency style of $depcc], 752195b296d0Smrg [am_cv_$1_dependencies_compiler_type], 752295b296d0Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 752395b296d0Smrg # We make a subdir and do the tests there. Otherwise we can end up 752495b296d0Smrg # making bogus files that we don't know about and never remove. For 752595b296d0Smrg # instance it was reported that on HP-UX the gcc test will end up 752695b296d0Smrg # making a dummy file named `D' -- because `-MD' means `put the output 752795b296d0Smrg # in D'. 752895b296d0Smrg mkdir conftest.dir 752995b296d0Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 753095b296d0Smrg # using a relative directory. 753195b296d0Smrg cp "$am_depcomp" conftest.dir 753295b296d0Smrg cd conftest.dir 753395b296d0Smrg # We will build objects and dependencies in a subdirectory because 753495b296d0Smrg # it helps to detect inapplicable dependency modes. For instance 753595b296d0Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 753695b296d0Smrg # side effect of compilation, but ICC will put the dependencies in 753795b296d0Smrg # the current directory while Tru64 will put them in the object 753895b296d0Smrg # directory. 753995b296d0Smrg mkdir sub 754095b296d0Smrg 754195b296d0Smrg am_cv_$1_dependencies_compiler_type=none 754295b296d0Smrg if test "$am_compiler_list" = ""; then 754395b296d0Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 754495b296d0Smrg fi 7545e6f085baSmrg am__universal=false 7546e6f085baSmrg m4_case([$1], [CC], 7547e6f085baSmrg [case " $depcc " in #( 7548e6f085baSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 7549e6f085baSmrg esac], 7550e6f085baSmrg [CXX], 7551e6f085baSmrg [case " $depcc " in #( 7552e6f085baSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 7553e6f085baSmrg esac]) 7554e6f085baSmrg 755595b296d0Smrg for depmode in $am_compiler_list; do 755695b296d0Smrg # Setup a source with many dependencies, because some compilers 755795b296d0Smrg # like to wrap large dependency lists on column 80 (with \), and 755895b296d0Smrg # we should not choose a depcomp mode which is confused by this. 755995b296d0Smrg # 756095b296d0Smrg # We need to recreate these files for each test, as the compiler may 756195b296d0Smrg # overwrite some of them when testing with obscure command lines. 756295b296d0Smrg # This happens at least with the AIX C compiler. 756395b296d0Smrg : > sub/conftest.c 756495b296d0Smrg for i in 1 2 3 4 5 6; do 756595b296d0Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 756695b296d0Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 756795b296d0Smrg # Solaris 8's {/usr,}/bin/sh. 756895b296d0Smrg touch sub/conftst$i.h 756995b296d0Smrg done 757095b296d0Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 757195b296d0Smrg 7572e6f085baSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 7573e6f085baSmrg # mode. It turns out that the SunPro C++ compiler does not properly 7574e6f085baSmrg # handle `-M -o', and we need to detect this. Also, some Intel 7575e6f085baSmrg # versions had trouble with output in subdirs 7576e6f085baSmrg am__obj=sub/conftest.${OBJEXT-o} 7577e6f085baSmrg am__minus_obj="-o $am__obj" 757895b296d0Smrg case $depmode in 7579e6f085baSmrg gcc) 7580e6f085baSmrg # This depmode causes a compiler race in universal mode. 7581e6f085baSmrg test "$am__universal" = false || continue 7582e6f085baSmrg ;; 758395b296d0Smrg nosideeffect) 758495b296d0Smrg # after this tag, mechanisms are not by side-effect, so they'll 758595b296d0Smrg # only be used when explicitly requested 758695b296d0Smrg if test "x$enable_dependency_tracking" = xyes; then 758795b296d0Smrg continue 758895b296d0Smrg else 758995b296d0Smrg break 759095b296d0Smrg fi 759195b296d0Smrg ;; 7592e6f085baSmrg msvisualcpp | msvcmsys) 7593e6f085baSmrg # This compiler won't grok `-c -o', but also, the minuso test has 7594e6f085baSmrg # not run yet. These depmodes are late enough in the game, and 7595e6f085baSmrg # so weak that their functioning should not be impacted. 7596e6f085baSmrg am__obj=conftest.${OBJEXT-o} 7597e6f085baSmrg am__minus_obj= 7598e6f085baSmrg ;; 759995b296d0Smrg none) break ;; 760095b296d0Smrg esac 760195b296d0Smrg if depmode=$depmode \ 7602e6f085baSmrg source=sub/conftest.c object=$am__obj \ 760395b296d0Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 7604e6f085baSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 760595b296d0Smrg >/dev/null 2>conftest.err && 7606ff89ac2bSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 760795b296d0Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 7608e6f085baSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 760995b296d0Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 761095b296d0Smrg # icc doesn't choke on unknown options, it will just issue warnings 761195b296d0Smrg # or remarks (even with -Werror). So we grep stderr for any message 761295b296d0Smrg # that says an option was ignored or not supported. 761395b296d0Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 761495b296d0Smrg # icc: Command line warning: ignoring option '-M'; no argument required 761595b296d0Smrg # The diagnosis changed in icc 8.0: 761695b296d0Smrg # icc: Command line remark: option '-MP' not supported 761795b296d0Smrg if (grep 'ignoring option' conftest.err || 761895b296d0Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 761995b296d0Smrg am_cv_$1_dependencies_compiler_type=$depmode 762095b296d0Smrg break 762195b296d0Smrg fi 762295b296d0Smrg fi 762395b296d0Smrg done 762495b296d0Smrg 762595b296d0Smrg cd .. 762695b296d0Smrg rm -rf conftest.dir 762795b296d0Smrgelse 762895b296d0Smrg am_cv_$1_dependencies_compiler_type=none 762995b296d0Smrgfi 763095b296d0Smrg]) 763195b296d0SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 763295b296d0SmrgAM_CONDITIONAL([am__fastdep$1], [ 763395b296d0Smrg test "x$enable_dependency_tracking" != xno \ 763495b296d0Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 763595b296d0Smrg]) 763695b296d0Smrg 763795b296d0Smrg 763895b296d0Smrg# AM_SET_DEPDIR 763995b296d0Smrg# ------------- 764095b296d0Smrg# Choose a directory name for dependency files. 764195b296d0Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 764295b296d0SmrgAC_DEFUN([AM_SET_DEPDIR], 764395b296d0Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 764495b296d0SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 764595b296d0Smrg]) 764695b296d0Smrg 764795b296d0Smrg 764895b296d0Smrg# AM_DEP_TRACK 764995b296d0Smrg# ------------ 765095b296d0SmrgAC_DEFUN([AM_DEP_TRACK], 765195b296d0Smrg[AC_ARG_ENABLE(dependency-tracking, 765295b296d0Smrg[ --disable-dependency-tracking speeds up one-time build 765395b296d0Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 765495b296d0Smrgif test "x$enable_dependency_tracking" != xno; then 765595b296d0Smrg am_depcomp="$ac_aux_dir/depcomp" 765695b296d0Smrg AMDEPBACKSLASH='\' 765795b296d0Smrgfi 765895b296d0SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 7659ff89ac2bSmrgAC_SUBST([AMDEPBACKSLASH])dnl 7660ff89ac2bSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 766195b296d0Smrg]) 766295b296d0Smrg 766395b296d0Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 766495b296d0Smrg 766539713583Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 766695b296d0Smrg# Free Software Foundation, Inc. 766795b296d0Smrg# 766895b296d0Smrg# This file is free software; the Free Software Foundation 766995b296d0Smrg# gives unlimited permission to copy and/or distribute it, 767095b296d0Smrg# with or without modifications, as long as this notice is preserved. 767195b296d0Smrg 7672e6f085baSmrg#serial 5 767395b296d0Smrg 767495b296d0Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 767595b296d0Smrg# ------------------------------ 767695b296d0SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 7677e6f085baSmrg[{ 7678e6f085baSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 7679e6f085baSmrg # are listed without --file. Let's play safe and only enable the eval 7680e6f085baSmrg # if we detect the quoting. 7681e6f085baSmrg case $CONFIG_FILES in 7682e6f085baSmrg *\'*) eval set x "$CONFIG_FILES" ;; 7683e6f085baSmrg *) set x $CONFIG_FILES ;; 7684e6f085baSmrg esac 7685e6f085baSmrg shift 7686e6f085baSmrg for mf 7687e6f085baSmrg do 7688e6f085baSmrg # Strip MF so we end up with the name of the file. 7689e6f085baSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 7690e6f085baSmrg # Check whether this is an Automake generated Makefile or not. 7691e6f085baSmrg # We used to match only the files named `Makefile.in', but 7692e6f085baSmrg # some people rename them; so instead we look at the file content. 7693e6f085baSmrg # Grep'ing the first line is not enough: some people post-process 7694e6f085baSmrg # each Makefile.in and add a new line on top of each file to say so. 7695e6f085baSmrg # Grep'ing the whole file is not good either: AIX grep has a line 7696e6f085baSmrg # limit of 2048, but all sed's we know have understand at least 4000. 7697e6f085baSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 7698e6f085baSmrg dirpart=`AS_DIRNAME("$mf")` 7699e6f085baSmrg else 7700e6f085baSmrg continue 7701e6f085baSmrg fi 7702e6f085baSmrg # Extract the definition of DEPDIR, am__include, and am__quote 7703e6f085baSmrg # from the Makefile without running `make'. 7704e6f085baSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 7705e6f085baSmrg test -z "$DEPDIR" && continue 7706e6f085baSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 7707e6f085baSmrg test -z "am__include" && continue 7708e6f085baSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 7709e6f085baSmrg # When using ansi2knr, U may be empty or an underscore; expand it 7710e6f085baSmrg U=`sed -n 's/^U = //p' < "$mf"` 7711e6f085baSmrg # Find all dependency output files, they are included files with 7712e6f085baSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 7713e6f085baSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 7714e6f085baSmrg # expansion. 7715e6f085baSmrg for file in `sed -n " 7716e6f085baSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 7717e6f085baSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 7718e6f085baSmrg # Make sure the directory exists. 7719e6f085baSmrg test -f "$dirpart/$file" && continue 7720e6f085baSmrg fdir=`AS_DIRNAME(["$file"])` 7721e6f085baSmrg AS_MKDIR_P([$dirpart/$fdir]) 7722e6f085baSmrg # echo "creating $dirpart/$file" 7723e6f085baSmrg echo '# dummy' > "$dirpart/$file" 7724e6f085baSmrg done 772595b296d0Smrg done 7726e6f085baSmrg} 772795b296d0Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 772895b296d0Smrg 772995b296d0Smrg 773095b296d0Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 773195b296d0Smrg# ----------------------------- 773295b296d0Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 773395b296d0Smrg# 773495b296d0Smrg# This code is only required when automatic dependency tracking 773595b296d0Smrg# is enabled. FIXME. This creates each `.P' file that we will 773695b296d0Smrg# need in order to bootstrap the dependency handling code. 773795b296d0SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 773895b296d0Smrg[AC_CONFIG_COMMANDS([depfiles], 773995b296d0Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 774095b296d0Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 774195b296d0Smrg]) 774295b296d0Smrg 774395b296d0Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 774495b296d0Smrg# Free Software Foundation, Inc. 774595b296d0Smrg# 774695b296d0Smrg# This file is free software; the Free Software Foundation 774795b296d0Smrg# gives unlimited permission to copy and/or distribute it, 774895b296d0Smrg# with or without modifications, as long as this notice is preserved. 774995b296d0Smrg 775095b296d0Smrg# serial 8 775195b296d0Smrg 775295b296d0Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 775395b296d0SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 775495b296d0Smrg 775595b296d0Smrg# Do all the work for Automake. -*- Autoconf -*- 775695b296d0Smrg 7757ff89ac2bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 7758e6f085baSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 775995b296d0Smrg# 776095b296d0Smrg# This file is free software; the Free Software Foundation 776195b296d0Smrg# gives unlimited permission to copy and/or distribute it, 776295b296d0Smrg# with or without modifications, as long as this notice is preserved. 776395b296d0Smrg 7764e6f085baSmrg# serial 16 776595b296d0Smrg 776695b296d0Smrg# This macro actually does too much. Some checks are only needed if 776795b296d0Smrg# your package does certain things. But this isn't really a big deal. 776895b296d0Smrg 776995b296d0Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 777095b296d0Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 777195b296d0Smrg# ----------------------------------------------- 777295b296d0Smrg# The call with PACKAGE and VERSION arguments is the old style 777395b296d0Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 777495b296d0Smrg# and VERSION should now be passed to AC_INIT and removed from 777595b296d0Smrg# the call to AM_INIT_AUTOMAKE. 777695b296d0Smrg# We support both call styles for the transition. After 777795b296d0Smrg# the next Automake release, Autoconf can make the AC_INIT 777895b296d0Smrg# arguments mandatory, and then we can depend on a new Autoconf 777995b296d0Smrg# release and drop the old call support. 778095b296d0SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 7781e6f085baSmrg[AC_PREREQ([2.62])dnl 778295b296d0Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 778395b296d0Smrgdnl the ones we care about. 778495b296d0Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 778595b296d0SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 778695b296d0SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 7787ff89ac2bSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 7788ff89ac2bSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 7789ff89ac2bSmrg # is not polluted with repeated "-I." 7790ff89ac2bSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 7791ff89ac2bSmrg # test to see if srcdir already configured 7792ff89ac2bSmrg if test -f $srcdir/config.status; then 7793ff89ac2bSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 7794ff89ac2bSmrg fi 779595b296d0Smrgfi 779695b296d0Smrg 779795b296d0Smrg# test whether we have cygpath 779895b296d0Smrgif test -z "$CYGPATH_W"; then 779995b296d0Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 780095b296d0Smrg CYGPATH_W='cygpath -w' 780195b296d0Smrg else 780295b296d0Smrg CYGPATH_W=echo 780395b296d0Smrg fi 780495b296d0Smrgfi 780595b296d0SmrgAC_SUBST([CYGPATH_W]) 780695b296d0Smrg 780795b296d0Smrg# Define the identity of the package. 780895b296d0Smrgdnl Distinguish between old-style and new-style calls. 780995b296d0Smrgm4_ifval([$2], 781095b296d0Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 781195b296d0Smrg AC_SUBST([PACKAGE], [$1])dnl 781295b296d0Smrg AC_SUBST([VERSION], [$2])], 781395b296d0Smrg[_AM_SET_OPTIONS([$1])dnl 7814ff89ac2bSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 7815ff89ac2bSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 7816ff89ac2bSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 781795b296d0Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 781895b296d0Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 781995b296d0Smrg 782095b296d0Smrg_AM_IF_OPTION([no-define],, 782195b296d0Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 782295b296d0Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 782395b296d0Smrg 782495b296d0Smrg# Some tools Automake needs. 782595b296d0SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 782695b296d0SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 782795b296d0SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 782895b296d0SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 782995b296d0SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 783095b296d0SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 783195b296d0SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 7832e6f085baSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 7833e6f085baSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 783495b296d0SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 783595b296d0Smrg# We need awk for the "check" target. The system "awk" is bad on 783695b296d0Smrg# some platforms. 783795b296d0SmrgAC_REQUIRE([AC_PROG_AWK])dnl 783895b296d0SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 783995b296d0SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 784095b296d0Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 7841e6f085baSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 7842e6f085baSmrg [_AM_PROG_TAR([v7])])]) 784395b296d0Smrg_AM_IF_OPTION([no-dependencies],, 784495b296d0Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 7845e6f085baSmrg [_AM_DEPENDENCIES(CC)], 7846e6f085baSmrg [define([AC_PROG_CC], 7847e6f085baSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 784895b296d0SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 7849e6f085baSmrg [_AM_DEPENDENCIES(CXX)], 7850e6f085baSmrg [define([AC_PROG_CXX], 7851e6f085baSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 7852ff89ac2bSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 7853e6f085baSmrg [_AM_DEPENDENCIES(OBJC)], 7854e6f085baSmrg [define([AC_PROG_OBJC], 7855e6f085baSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 785695b296d0Smrg]) 7857e6f085baSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 7858e6f085baSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 7859e6f085baSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 7860e6f085baSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 7861e6f085baSmrgAC_CONFIG_COMMANDS_PRE(dnl 7862e6f085baSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 7863e6f085baSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 786495b296d0Smrg]) 786595b296d0Smrg 7866e6f085baSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 7867e6f085baSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 7868e6f085baSmrgdnl mangled by Autoconf and run in a shell conditional statement. 7869e6f085baSmrgm4_define([_AC_COMPILER_EXEEXT], 7870e6f085baSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 7871e6f085baSmrg 787295b296d0Smrg 787395b296d0Smrg# When config.status generates a header, we must update the stamp-h file. 787495b296d0Smrg# This file resides in the same directory as the config header 787595b296d0Smrg# that is generated. The stamp files are numbered to have different names. 787695b296d0Smrg 787795b296d0Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 787895b296d0Smrg# loop where config.status creates the headers, so we can generate 787995b296d0Smrg# our stamp files there. 788095b296d0SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 788195b296d0Smrg[# Compute $1's index in $config_headers. 7882ff89ac2bSmrg_am_arg=$1 788395b296d0Smrg_am_stamp_count=1 788495b296d0Smrgfor _am_header in $config_headers :; do 788595b296d0Smrg case $_am_header in 7886ff89ac2bSmrg $_am_arg | $_am_arg:* ) 788795b296d0Smrg break ;; 788895b296d0Smrg * ) 788995b296d0Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 789095b296d0Smrg esac 789195b296d0Smrgdone 7892ff89ac2bSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 789395b296d0Smrg 7894e6f085baSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 789595b296d0Smrg# 789695b296d0Smrg# This file is free software; the Free Software Foundation 789795b296d0Smrg# gives unlimited permission to copy and/or distribute it, 789895b296d0Smrg# with or without modifications, as long as this notice is preserved. 789995b296d0Smrg 790095b296d0Smrg# AM_PROG_INSTALL_SH 790195b296d0Smrg# ------------------ 790295b296d0Smrg# Define $install_sh. 790395b296d0SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 790495b296d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7905e6f085baSmrgif test x"${install_sh}" != xset; then 7906e6f085baSmrg case $am_aux_dir in 7907e6f085baSmrg *\ * | *\ *) 7908e6f085baSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 7909e6f085baSmrg *) 7910e6f085baSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 7911e6f085baSmrg esac 7912e6f085baSmrgfi 791395b296d0SmrgAC_SUBST(install_sh)]) 791495b296d0Smrg 791595b296d0Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 791695b296d0Smrg# 791795b296d0Smrg# This file is free software; the Free Software Foundation 791895b296d0Smrg# gives unlimited permission to copy and/or distribute it, 791995b296d0Smrg# with or without modifications, as long as this notice is preserved. 792095b296d0Smrg 792195b296d0Smrg# serial 2 792295b296d0Smrg 792395b296d0Smrg# Check whether the underlying file-system supports filenames 792495b296d0Smrg# with a leading dot. For instance MS-DOS doesn't. 792595b296d0SmrgAC_DEFUN([AM_SET_LEADING_DOT], 792695b296d0Smrg[rm -rf .tst 2>/dev/null 792795b296d0Smrgmkdir .tst 2>/dev/null 792895b296d0Smrgif test -d .tst; then 792995b296d0Smrg am__leading_dot=. 793095b296d0Smrgelse 793195b296d0Smrg am__leading_dot=_ 793295b296d0Smrgfi 793395b296d0Smrgrmdir .tst 2>/dev/null 793495b296d0SmrgAC_SUBST([am__leading_dot])]) 793595b296d0Smrg 793695b296d0Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 793795b296d0Smrg# From Jim Meyering 793895b296d0Smrg 7939e6f085baSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 794095b296d0Smrg# Free Software Foundation, Inc. 794195b296d0Smrg# 794295b296d0Smrg# This file is free software; the Free Software Foundation 794395b296d0Smrg# gives unlimited permission to copy and/or distribute it, 794495b296d0Smrg# with or without modifications, as long as this notice is preserved. 794595b296d0Smrg 7946e6f085baSmrg# serial 5 794795b296d0Smrg 7948e6f085baSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 7949e6f085baSmrg# ---------------------------------- 7950e6f085baSmrg# Control maintainer-specific portions of Makefiles. 7951e6f085baSmrg# Default is to disable them, unless `enable' is passed literally. 7952e6f085baSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 7953e6f085baSmrg# can override the default with the --enable/--disable switch. 795495b296d0SmrgAC_DEFUN([AM_MAINTAINER_MODE], 7955e6f085baSmrg[m4_case(m4_default([$1], [disable]), 7956e6f085baSmrg [enable], [m4_define([am_maintainer_other], [disable])], 7957e6f085baSmrg [disable], [m4_define([am_maintainer_other], [enable])], 7958e6f085baSmrg [m4_define([am_maintainer_other], [enable]) 7959e6f085baSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 7960e6f085baSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 7961e6f085baSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 7962e6f085baSmrg AC_ARG_ENABLE([maintainer-mode], 7963e6f085baSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 796495b296d0Smrg (and sometimes confusing) to the casual installer], 7965e6f085baSmrg [USE_MAINTAINER_MODE=$enableval], 7966e6f085baSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 796795b296d0Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 7968e6f085baSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 796995b296d0Smrg MAINT=$MAINTAINER_MODE_TRUE 7970e6f085baSmrg AC_SUBST([MAINT])dnl 797195b296d0Smrg] 797295b296d0Smrg) 797395b296d0Smrg 797495b296d0SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 797595b296d0Smrg 797695b296d0Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 797795b296d0Smrg 7978e6f085baSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 797995b296d0Smrg# 798095b296d0Smrg# This file is free software; the Free Software Foundation 798195b296d0Smrg# gives unlimited permission to copy and/or distribute it, 798295b296d0Smrg# with or without modifications, as long as this notice is preserved. 798395b296d0Smrg 7984e6f085baSmrg# serial 4 798595b296d0Smrg 798695b296d0Smrg# AM_MAKE_INCLUDE() 798795b296d0Smrg# ----------------- 798895b296d0Smrg# Check to see how make treats includes. 798995b296d0SmrgAC_DEFUN([AM_MAKE_INCLUDE], 799095b296d0Smrg[am_make=${MAKE-make} 799195b296d0Smrgcat > confinc << 'END' 799295b296d0Smrgam__doit: 7993e6f085baSmrg @echo this is the am__doit target 799495b296d0Smrg.PHONY: am__doit 799595b296d0SmrgEND 799695b296d0Smrg# If we don't find an include directive, just comment out the code. 799795b296d0SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 799895b296d0Smrgam__include="#" 799995b296d0Smrgam__quote= 800095b296d0Smrg_am_result=none 800195b296d0Smrg# First try GNU make style include. 800295b296d0Smrgecho "include confinc" > confmf 8003e6f085baSmrg# Ignore all kinds of additional output from `make'. 8004e6f085baSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 8005e6f085baSmrg*the\ am__doit\ target*) 8006e6f085baSmrg am__include=include 8007e6f085baSmrg am__quote= 8008e6f085baSmrg _am_result=GNU 8009e6f085baSmrg ;; 8010e6f085baSmrgesac 801195b296d0Smrg# Now try BSD make style include. 801295b296d0Smrgif test "$am__include" = "#"; then 801395b296d0Smrg echo '.include "confinc"' > confmf 8014e6f085baSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 8015e6f085baSmrg *the\ am__doit\ target*) 8016e6f085baSmrg am__include=.include 8017e6f085baSmrg am__quote="\"" 8018e6f085baSmrg _am_result=BSD 8019e6f085baSmrg ;; 8020e6f085baSmrg esac 802195b296d0Smrgfi 802295b296d0SmrgAC_SUBST([am__include]) 802395b296d0SmrgAC_SUBST([am__quote]) 802495b296d0SmrgAC_MSG_RESULT([$_am_result]) 802595b296d0Smrgrm -f confinc confmf 802695b296d0Smrg]) 802795b296d0Smrg 802895b296d0Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 802995b296d0Smrg 8030e6f085baSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 803195b296d0Smrg# Free Software Foundation, Inc. 803295b296d0Smrg# 803395b296d0Smrg# This file is free software; the Free Software Foundation 803495b296d0Smrg# gives unlimited permission to copy and/or distribute it, 803595b296d0Smrg# with or without modifications, as long as this notice is preserved. 803695b296d0Smrg 8037e6f085baSmrg# serial 6 803895b296d0Smrg 803995b296d0Smrg# AM_MISSING_PROG(NAME, PROGRAM) 804095b296d0Smrg# ------------------------------ 804195b296d0SmrgAC_DEFUN([AM_MISSING_PROG], 804295b296d0Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 804395b296d0Smrg$1=${$1-"${am_missing_run}$2"} 804495b296d0SmrgAC_SUBST($1)]) 804595b296d0Smrg 804695b296d0Smrg 804795b296d0Smrg# AM_MISSING_HAS_RUN 804895b296d0Smrg# ------------------ 804995b296d0Smrg# Define MISSING if not defined so far and test if it supports --run. 805095b296d0Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 805195b296d0SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 805295b296d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 8053ff89ac2bSmrgAC_REQUIRE_AUX_FILE([missing])dnl 8054e6f085baSmrgif test x"${MISSING+set}" != xset; then 8055e6f085baSmrg case $am_aux_dir in 8056e6f085baSmrg *\ * | *\ *) 8057e6f085baSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 8058e6f085baSmrg *) 8059e6f085baSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 8060e6f085baSmrg esac 8061e6f085baSmrgfi 806295b296d0Smrg# Use eval to expand $SHELL 806395b296d0Smrgif eval "$MISSING --run true"; then 806495b296d0Smrg am_missing_run="$MISSING --run " 806595b296d0Smrgelse 806695b296d0Smrg am_missing_run= 806795b296d0Smrg AC_MSG_WARN([`missing' script is too old or missing]) 806895b296d0Smrgfi 806995b296d0Smrg]) 807095b296d0Smrg 8071ff89ac2bSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 807295b296d0Smrg# 807395b296d0Smrg# This file is free software; the Free Software Foundation 807495b296d0Smrg# gives unlimited permission to copy and/or distribute it, 807595b296d0Smrg# with or without modifications, as long as this notice is preserved. 807695b296d0Smrg 807795b296d0Smrg# AM_PROG_MKDIR_P 807895b296d0Smrg# --------------- 8079ff89ac2bSmrg# Check for `mkdir -p'. 808095b296d0SmrgAC_DEFUN([AM_PROG_MKDIR_P], 8081ff89ac2bSmrg[AC_PREREQ([2.60])dnl 8082ff89ac2bSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 8083ff89ac2bSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 8084ff89ac2bSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 8085ff89ac2bSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 8086ff89ac2bSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 8087ff89ac2bSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 8088ff89ac2bSmrgdnl adjustment using top_builddir (which is defined more often than 8089ff89ac2bSmrgdnl MKDIR_P). 8090ff89ac2bSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 8091ff89ac2bSmrgcase $mkdir_p in 8092ff89ac2bSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 8093ff89ac2bSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 8094ff89ac2bSmrgesac 8095ff89ac2bSmrg]) 809695b296d0Smrg 809795b296d0Smrg# Helper functions for option handling. -*- Autoconf -*- 809895b296d0Smrg 809939713583Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 810095b296d0Smrg# 810195b296d0Smrg# This file is free software; the Free Software Foundation 810295b296d0Smrg# gives unlimited permission to copy and/or distribute it, 810395b296d0Smrg# with or without modifications, as long as this notice is preserved. 810495b296d0Smrg 810539713583Smrg# serial 4 810695b296d0Smrg 810795b296d0Smrg# _AM_MANGLE_OPTION(NAME) 810895b296d0Smrg# ----------------------- 810995b296d0SmrgAC_DEFUN([_AM_MANGLE_OPTION], 811095b296d0Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 811195b296d0Smrg 811295b296d0Smrg# _AM_SET_OPTION(NAME) 811395b296d0Smrg# ------------------------------ 811495b296d0Smrg# Set option NAME. Presently that only means defining a flag for this option. 811595b296d0SmrgAC_DEFUN([_AM_SET_OPTION], 811695b296d0Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 811795b296d0Smrg 811895b296d0Smrg# _AM_SET_OPTIONS(OPTIONS) 811995b296d0Smrg# ---------------------------------- 812095b296d0Smrg# OPTIONS is a space-separated list of Automake options. 812195b296d0SmrgAC_DEFUN([_AM_SET_OPTIONS], 812239713583Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 812395b296d0Smrg 812495b296d0Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 812595b296d0Smrg# ------------------------------------------- 812695b296d0Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 812795b296d0SmrgAC_DEFUN([_AM_IF_OPTION], 812895b296d0Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 812995b296d0Smrg 813095b296d0Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 813195b296d0Smrg 8132e6f085baSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 813395b296d0Smrg# Free Software Foundation, Inc. 813495b296d0Smrg# 813595b296d0Smrg# This file is free software; the Free Software Foundation 813695b296d0Smrg# gives unlimited permission to copy and/or distribute it, 813795b296d0Smrg# with or without modifications, as long as this notice is preserved. 813895b296d0Smrg 8139e6f085baSmrg# serial 5 814095b296d0Smrg 814195b296d0Smrg# AM_SANITY_CHECK 814295b296d0Smrg# --------------- 814395b296d0SmrgAC_DEFUN([AM_SANITY_CHECK], 814495b296d0Smrg[AC_MSG_CHECKING([whether build environment is sane]) 814595b296d0Smrg# Just in case 814695b296d0Smrgsleep 1 814795b296d0Smrgecho timestamp > conftest.file 8148e6f085baSmrg# Reject unsafe characters in $srcdir or the absolute working directory 8149e6f085baSmrg# name. Accept space and tab only in the latter. 8150e6f085baSmrgam_lf=' 8151e6f085baSmrg' 8152e6f085baSmrgcase `pwd` in 8153e6f085baSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8154e6f085baSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8155e6f085baSmrgesac 8156e6f085baSmrgcase $srcdir in 8157e6f085baSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8158e6f085baSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 8159e6f085baSmrgesac 8160e6f085baSmrg 816195b296d0Smrg# Do `set' in a subshell so we don't clobber the current shell's 816295b296d0Smrg# arguments. Must try -L first in case configure is actually a 816395b296d0Smrg# symlink; some systems play weird games with the mod time of symlinks 816495b296d0Smrg# (eg FreeBSD returns the mod time of the symlink's containing 816595b296d0Smrg# directory). 816695b296d0Smrgif ( 8167e6f085baSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 816895b296d0Smrg if test "$[*]" = "X"; then 816995b296d0Smrg # -L didn't work. 8170e6f085baSmrg set X `ls -t "$srcdir/configure" conftest.file` 817195b296d0Smrg fi 817295b296d0Smrg rm -f conftest.file 817395b296d0Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 817495b296d0Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 817595b296d0Smrg 817695b296d0Smrg # If neither matched, then we have a broken ls. This can happen 817795b296d0Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 817895b296d0Smrg # broken ls alias from the environment. This has actually 817995b296d0Smrg # happened. Such a system could not be considered "sane". 818095b296d0Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 818195b296d0Smrgalias in your environment]) 818295b296d0Smrg fi 818395b296d0Smrg 818495b296d0Smrg test "$[2]" = conftest.file 818595b296d0Smrg ) 818695b296d0Smrgthen 818795b296d0Smrg # Ok. 818895b296d0Smrg : 818995b296d0Smrgelse 819095b296d0Smrg AC_MSG_ERROR([newly created file is older than distributed files! 819195b296d0SmrgCheck your system clock]) 819295b296d0Smrgfi 819395b296d0SmrgAC_MSG_RESULT(yes)]) 819495b296d0Smrg 819595b296d0Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 819695b296d0Smrg# 819795b296d0Smrg# This file is free software; the Free Software Foundation 819895b296d0Smrg# gives unlimited permission to copy and/or distribute it, 819995b296d0Smrg# with or without modifications, as long as this notice is preserved. 820095b296d0Smrg 820195b296d0Smrg# AM_PROG_INSTALL_STRIP 820295b296d0Smrg# --------------------- 820395b296d0Smrg# One issue with vendor `install' (even GNU) is that you can't 820495b296d0Smrg# specify the program used to strip binaries. This is especially 820595b296d0Smrg# annoying in cross-compiling environments, where the build's strip 820695b296d0Smrg# is unlikely to handle the host's binaries. 820795b296d0Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 820895b296d0Smrg# always use install-sh in `make install-strip', and initialize 820995b296d0Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 821095b296d0SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 821195b296d0Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 821295b296d0Smrg# Installed binaries are usually stripped using `strip' when the user 821395b296d0Smrg# run `make install-strip'. However `strip' might not be the right 821495b296d0Smrg# tool to use in cross-compilation environments, therefore Automake 821595b296d0Smrg# will honor the `STRIP' environment variable to overrule this program. 821695b296d0Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 821795b296d0Smrgif test "$cross_compiling" != no; then 821895b296d0Smrg AC_CHECK_TOOL([STRIP], [strip], :) 821995b296d0Smrgfi 8220ff89ac2bSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 822195b296d0SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 822295b296d0Smrg 8223e6f085baSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 8224ff89ac2bSmrg# 8225ff89ac2bSmrg# This file is free software; the Free Software Foundation 8226ff89ac2bSmrg# gives unlimited permission to copy and/or distribute it, 8227ff89ac2bSmrg# with or without modifications, as long as this notice is preserved. 8228ff89ac2bSmrg 8229e6f085baSmrg# serial 2 8230e6f085baSmrg 8231ff89ac2bSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 8232ff89ac2bSmrg# --------------------------- 8233ff89ac2bSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 8234ff89ac2bSmrg# This macro is traced by Automake. 8235ff89ac2bSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 8236ff89ac2bSmrg 8237e6f085baSmrg# AM_SUBST_NOTMAKE(VARIABLE) 8238e6f085baSmrg# --------------------------- 8239e6f085baSmrg# Public sister of _AM_SUBST_NOTMAKE. 8240e6f085baSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 8241e6f085baSmrg 824295b296d0Smrg# Check how to create a tarball. -*- Autoconf -*- 824395b296d0Smrg 824495b296d0Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 824595b296d0Smrg# 824695b296d0Smrg# This file is free software; the Free Software Foundation 824795b296d0Smrg# gives unlimited permission to copy and/or distribute it, 824895b296d0Smrg# with or without modifications, as long as this notice is preserved. 824995b296d0Smrg 825095b296d0Smrg# serial 2 825195b296d0Smrg 825295b296d0Smrg# _AM_PROG_TAR(FORMAT) 825395b296d0Smrg# -------------------- 825495b296d0Smrg# Check how to create a tarball in format FORMAT. 825595b296d0Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 825695b296d0Smrg# 825795b296d0Smrg# Substitute a variable $(am__tar) that is a command 825895b296d0Smrg# writing to stdout a FORMAT-tarball containing the directory 825995b296d0Smrg# $tardir. 826095b296d0Smrg# tardir=directory && $(am__tar) > result.tar 826195b296d0Smrg# 826295b296d0Smrg# Substitute a variable $(am__untar) that extract such 826395b296d0Smrg# a tarball read from stdin. 826495b296d0Smrg# $(am__untar) < result.tar 826595b296d0SmrgAC_DEFUN([_AM_PROG_TAR], 826695b296d0Smrg[# Always define AMTAR for backward compatibility. 826795b296d0SmrgAM_MISSING_PROG([AMTAR], [tar]) 826895b296d0Smrgm4_if([$1], [v7], 826995b296d0Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 827095b296d0Smrg [m4_case([$1], [ustar],, [pax],, 827195b296d0Smrg [m4_fatal([Unknown tar format])]) 827295b296d0SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 827395b296d0Smrg# Loop over all known methods to create a tar archive until one works. 827495b296d0Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 827595b296d0Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 827695b296d0Smrg# Do not fold the above two line into one, because Tru64 sh and 827795b296d0Smrg# Solaris sh will not grok spaces in the rhs of `-'. 827895b296d0Smrgfor _am_tool in $_am_tools 827995b296d0Smrgdo 828095b296d0Smrg case $_am_tool in 828195b296d0Smrg gnutar) 828295b296d0Smrg for _am_tar in tar gnutar gtar; 828395b296d0Smrg do 828495b296d0Smrg AM_RUN_LOG([$_am_tar --version]) && break 828595b296d0Smrg done 828695b296d0Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 828795b296d0Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 828895b296d0Smrg am__untar="$_am_tar -xf -" 828995b296d0Smrg ;; 829095b296d0Smrg plaintar) 829195b296d0Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 829295b296d0Smrg # ustar tarball either. 829395b296d0Smrg (tar --version) >/dev/null 2>&1 && continue 829495b296d0Smrg am__tar='tar chf - "$$tardir"' 829595b296d0Smrg am__tar_='tar chf - "$tardir"' 829695b296d0Smrg am__untar='tar xf -' 829795b296d0Smrg ;; 829895b296d0Smrg pax) 829995b296d0Smrg am__tar='pax -L -x $1 -w "$$tardir"' 830095b296d0Smrg am__tar_='pax -L -x $1 -w "$tardir"' 830195b296d0Smrg am__untar='pax -r' 830295b296d0Smrg ;; 830395b296d0Smrg cpio) 830495b296d0Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 830595b296d0Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 830695b296d0Smrg am__untar='cpio -i -H $1 -d' 830795b296d0Smrg ;; 830895b296d0Smrg none) 830995b296d0Smrg am__tar=false 831095b296d0Smrg am__tar_=false 831195b296d0Smrg am__untar=false 831295b296d0Smrg ;; 831395b296d0Smrg esac 831495b296d0Smrg 831595b296d0Smrg # If the value was cached, stop now. We just wanted to have am__tar 831695b296d0Smrg # and am__untar set. 831795b296d0Smrg test -n "${am_cv_prog_tar_$1}" && break 831895b296d0Smrg 831995b296d0Smrg # tar/untar a dummy directory, and stop if the command works 832095b296d0Smrg rm -rf conftest.dir 832195b296d0Smrg mkdir conftest.dir 832295b296d0Smrg echo GrepMe > conftest.dir/file 832395b296d0Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 832495b296d0Smrg rm -rf conftest.dir 832595b296d0Smrg if test -s conftest.tar; then 832695b296d0Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 832795b296d0Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 832895b296d0Smrg fi 832995b296d0Smrgdone 833095b296d0Smrgrm -rf conftest.dir 833195b296d0Smrg 833295b296d0SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 833395b296d0SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 833495b296d0SmrgAC_SUBST([am__tar]) 833595b296d0SmrgAC_SUBST([am__untar]) 833695b296d0Smrg]) # _AM_PROG_TAR 833795b296d0Smrg 8338e6f085baSmrgdnl Copyright 2005 Red Hat, Inc 8339e6f085baSmrgdnl 8340e6f085baSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 8341e6f085baSmrgdnl documentation for any purpose is hereby granted without fee, provided that 8342e6f085baSmrgdnl the above copyright notice appear in all copies and that both that 8343e6f085baSmrgdnl copyright notice and this permission notice appear in supporting 8344e6f085baSmrgdnl documentation. 8345e6f085baSmrgdnl 8346e6f085baSmrgdnl The above copyright notice and this permission notice shall be included 8347e6f085baSmrgdnl in all copies or substantial portions of the Software. 8348e6f085baSmrgdnl 8349e6f085baSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 8350e6f085baSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 8351e6f085baSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 8352e6f085baSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 8353e6f085baSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 8354e6f085baSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 8355e6f085baSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 8356e6f085baSmrgdnl 8357e6f085baSmrgdnl Except as contained in this notice, the name of the copyright holders shall 8358e6f085baSmrgdnl not be used in advertising or otherwise to promote the sale, use or 8359e6f085baSmrgdnl other dealings in this Software without prior written authorization 8360e6f085baSmrgdnl from the copyright holders. 8361e6f085baSmrgdnl 8362e6f085baSmrg 8363e6f085baSmrg# XORG_DRIVER_CHECK_EXT() 8364e6f085baSmrg# -------------------------- 8365e6f085baSmrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 8366e6f085baSmrg# is defined, then add $1 to $REQUIRED_MODULES. 8367e6f085baSmrg 8368e6f085baSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 8369e6f085baSmrg SAVE_CFLAGS="$CFLAGS" 8370e6f085baSmrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 8371e6f085baSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 8372e6f085baSmrg#include "xorg-server.h" 8373e6f085baSmrg#if !defined $1 8374e6f085baSmrg#error $1 not defined 8375e6f085baSmrg#endif 8376e6f085baSmrg ]])], 8377e6f085baSmrg [_EXT_CHECK=yes], 8378e6f085baSmrg [_EXT_CHECK=no]) 8379e6f085baSmrg CFLAGS="$SAVE_CFLAGS" 8380e6f085baSmrg AC_MSG_CHECKING([if $1 is defined]) 8381e6f085baSmrg AC_MSG_RESULT([$_EXT_CHECK]) 8382e6f085baSmrg if test "$_EXT_CHECK" != no; then 8383e6f085baSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 8384e6f085baSmrg fi 8385e6f085baSmrg]) 8386e6f085baSmrg 8387