aclocal.m4 revision b698ba48
1b698ba48Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 209885543Smrg 309885543Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4b698ba48Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 509885543Smrg# This file is free software; the Free Software Foundation 609885543Smrg# gives unlimited permission to copy and/or distribute it, 709885543Smrg# with or without modifications, as long as this notice is preserved. 809885543Smrg 909885543Smrg# This program is distributed in the hope that it will be useful, 1009885543Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1109885543Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1209885543Smrg# PARTICULAR PURPOSE. 1309885543Smrg 147104f784Smrgm4_ifndef([AC_AUTOCONF_VERSION], 157104f784Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 167104f784Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 177104f784Smrg[m4_warning([this file was generated for autoconf 2.63. 187104f784SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 197104f784SmrgIf you have problems, you may need to regenerate the build system entirely. 207104f784SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 217104f784Smrg 2209885543Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2309885543Smrg 24b698ba48Smrg# serial 52 AC_PROG_LIBTOOL 2509885543Smrg 2609885543Smrg 27b698ba48Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 28b698ba48Smrg# ----------------------------------------------------------- 29b698ba48Smrg# If this macro is not defined by Autoconf, define it here. 30b698ba48Smrgm4_ifdef([AC_PROVIDE_IFELSE], 31b698ba48Smrg [], 32b698ba48Smrg [m4_define([AC_PROVIDE_IFELSE], 33b698ba48Smrg [m4_ifdef([AC_PROVIDE_$1], 34b698ba48Smrg [$2], [$3])])]) 352ec8c4b4Smrg 362ec8c4b4Smrg 37b698ba48Smrg# AC_PROG_LIBTOOL 38b698ba48Smrg# --------------- 39b698ba48SmrgAC_DEFUN([AC_PROG_LIBTOOL], 40b698ba48Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 41b698ba48Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 42b698ba48Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 43b698ba48Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 44b698ba48Smrg [AC_LIBTOOL_CXX], 45b698ba48Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 46b698ba48Smrg ])]) 47b698ba48Smrgdnl And a similar setup for Fortran 77 support 48b698ba48Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 49b698ba48Smrg [AC_LIBTOOL_F77], 50b698ba48Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 51b698ba48Smrg])]) 52b698ba48Smrg 53b698ba48Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 54b698ba48Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 55b698ba48Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 56b698ba48Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 57b698ba48Smrg [AC_LIBTOOL_GCJ], 58b698ba48Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 59b698ba48Smrg [AC_LIBTOOL_GCJ], 60b698ba48Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 61b698ba48Smrg [AC_LIBTOOL_GCJ], 62b698ba48Smrg [ifdef([AC_PROG_GCJ], 63b698ba48Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 64b698ba48Smrg ifdef([A][M_PROG_GCJ], 65b698ba48Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 66b698ba48Smrg ifdef([LT_AC_PROG_GCJ], 67b698ba48Smrg [define([LT_AC_PROG_GCJ], 68b698ba48Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 69b698ba48Smrg])])# AC_PROG_LIBTOOL 70b698ba48Smrg 71b698ba48Smrg 72b698ba48Smrg# _AC_PROG_LIBTOOL 73b698ba48Smrg# ---------------- 74b698ba48SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 75b698ba48Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 76b698ba48SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 77b698ba48SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 78b698ba48SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 7909885543Smrg 8009885543Smrg# This can be used to rebuild libtool when needed 81b698ba48SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 8209885543Smrg 8309885543Smrg# Always use our own libtool. 8409885543SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 8509885543SmrgAC_SUBST(LIBTOOL)dnl 8609885543Smrg 87b698ba48Smrg# Prevent multiple expansion 88b698ba48Smrgdefine([AC_PROG_LIBTOOL], []) 89b698ba48Smrg])# _AC_PROG_LIBTOOL 902ec8c4b4Smrg 912ec8c4b4Smrg 92b698ba48Smrg# AC_LIBTOOL_SETUP 93b698ba48Smrg# ---------------- 94b698ba48SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 95b698ba48Smrg[AC_PREREQ(2.50)dnl 96b698ba48SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 97b698ba48SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 98b698ba48SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 99b698ba48SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 10009885543SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 10109885543SmrgAC_REQUIRE([AC_PROG_CC])dnl 102b698ba48SmrgAC_REQUIRE([AC_PROG_LD])dnl 103b698ba48SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 104b698ba48SmrgAC_REQUIRE([AC_PROG_NM])dnl 105b698ba48Smrg 10609885543SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 107b698ba48SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 108b698ba48Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 109b698ba48SmrgAC_REQUIRE([AC_OBJEXT])dnl 110b698ba48SmrgAC_REQUIRE([AC_EXEEXT])dnl 1112ec8c4b4Smrgdnl 112b698ba48SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 113b698ba48SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 114b698ba48SmrgAC_LIBTOOL_OBJDIR 1152ec8c4b4Smrg 116b698ba48SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 117b698ba48Smrg_LT_AC_PROG_ECHO_BACKSLASH 11809885543Smrg 11909885543Smrgcase $host_os in 12009885543Smrgaix3*) 12109885543Smrg # AIX sometimes has problems with the GCC collect2 program. For some 12209885543Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 12309885543Smrg # vanish in a puff of smoke. 12409885543Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 12509885543Smrg COLLECT_NAMES= 12609885543Smrg export COLLECT_NAMES 12709885543Smrg fi 12809885543Smrg ;; 12909885543Smrgesac 13009885543Smrg 13109885543Smrg# Sed substitution that helps us do robust quoting. It backslashifies 13209885543Smrg# metacharacters that are still active within double-quoted strings. 133b698ba48SmrgXsed='sed -e 1s/^X//' 134b698ba48Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 13509885543Smrg 13609885543Smrg# Same as above, but do not quote variable references. 137b698ba48Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 13809885543Smrg 13909885543Smrg# Sed substitution to delay expansion of an escaped shell variable in a 14009885543Smrg# double_quote_subst'ed string. 14109885543Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 14209885543Smrg 14309885543Smrg# Sed substitution to avoid accidental globbing in evaled expressions 14409885543Smrgno_glob_subst='s/\*/\\\*/g' 14509885543Smrg 146b698ba48Smrg# Constants: 147b698ba48Smrgrm="rm -f" 148b698ba48Smrg 14909885543Smrg# Global variables: 150b698ba48Smrgdefault_ofile=libtool 15109885543Smrgcan_build_shared=yes 15209885543Smrg 15309885543Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 15409885543Smrg# which needs '.lib'). 15509885543Smrglibext=a 156b698ba48Smrgltmain="$ac_aux_dir/ltmain.sh" 157b698ba48Smrgofile="$default_ofile" 1582ec8c4b4Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 15909885543Smrg 160b698ba48SmrgAC_CHECK_TOOL(AR, ar, false) 161b698ba48SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 162b698ba48SmrgAC_CHECK_TOOL(STRIP, strip, :) 163b698ba48Smrg 16409885543Smrgold_CC="$CC" 16509885543Smrgold_CFLAGS="$CFLAGS" 16609885543Smrg 16709885543Smrg# Set sane defaults for various variables 168b698ba48Smrgtest -z "$AR" && AR=ar 169b698ba48Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 170b698ba48Smrgtest -z "$AS" && AS=as 17109885543Smrgtest -z "$CC" && CC=cc 17209885543Smrgtest -z "$LTCC" && LTCC=$CC 17309885543Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 174b698ba48Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 17509885543Smrgtest -z "$LD" && LD=ld 176b698ba48Smrgtest -z "$LN_S" && LN_S="ln -s" 177b698ba48Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 178b698ba48Smrgtest -z "$NM" && NM=nm 179b698ba48Smrgtest -z "$SED" && SED=sed 180b698ba48Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 181b698ba48Smrgtest -z "$RANLIB" && RANLIB=: 182b698ba48Smrgtest -z "$STRIP" && STRIP=: 18309885543Smrgtest -z "$ac_objext" && ac_objext=o 18409885543Smrg 185b698ba48Smrg# Determine commands to create old-style static archives. 186b698ba48Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 187b698ba48Smrgold_postinstall_cmds='chmod 644 $oldlib' 188b698ba48Smrgold_postuninstall_cmds= 189b698ba48Smrg 190b698ba48Smrgif test -n "$RANLIB"; then 191b698ba48Smrg case $host_os in 192b698ba48Smrg openbsd*) 193b698ba48Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 194b698ba48Smrg ;; 195b698ba48Smrg *) 196b698ba48Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 197b698ba48Smrg ;; 198b698ba48Smrg esac 199b698ba48Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 200b698ba48Smrgfi 201b698ba48Smrg 20209885543Smrg_LT_CC_BASENAME([$compiler]) 20309885543Smrg 20409885543Smrg# Only perform the check for file, if the check method requires it 20509885543Smrgcase $deplibs_check_method in 20609885543Smrgfile_magic*) 20709885543Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 208b698ba48Smrg AC_PATH_MAGIC 20909885543Smrg fi 21009885543Smrg ;; 21109885543Smrgesac 21209885543Smrg 213b698ba48Smrg_LT_REQUIRED_DARWIN_CHECKS 21409885543Smrg 215b698ba48SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 216b698ba48SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 217b698ba48Smrgenable_win32_dll=yes, enable_win32_dll=no) 2187104f784Smrg 219b698ba48SmrgAC_ARG_ENABLE([libtool-lock], 220b698ba48Smrg [AC_HELP_STRING([--disable-libtool-lock], 221b698ba48Smrg [avoid locking (might break parallel builds)])]) 222b698ba48Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2232ec8c4b4Smrg 224b698ba48SmrgAC_ARG_WITH([pic], 225b698ba48Smrg [AC_HELP_STRING([--with-pic], 226b698ba48Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 227b698ba48Smrg [pic_mode="$withval"], 228b698ba48Smrg [pic_mode=default]) 229b698ba48Smrgtest -z "$pic_mode" && pic_mode=default 2302ec8c4b4Smrg 231b698ba48Smrg# Use C for the default configuration in the libtool script 232b698ba48Smrgtagname= 233b698ba48SmrgAC_LIBTOOL_LANG_C_CONFIG 234b698ba48Smrg_LT_AC_TAGCONFIG 235b698ba48Smrg])# AC_LIBTOOL_SETUP 2362ec8c4b4Smrg 2372ec8c4b4Smrg 238b698ba48Smrg# _LT_AC_SYS_COMPILER 2392ec8c4b4Smrg# ------------------- 240b698ba48SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 24109885543Smrg[AC_REQUIRE([AC_PROG_CC])dnl 24209885543Smrg 24309885543Smrg# If no C compiler was specified, use CC. 24409885543SmrgLTCC=${LTCC-"$CC"} 24509885543Smrg 24609885543Smrg# If no C compiler flags were specified, use CFLAGS. 24709885543SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 24809885543Smrg 24909885543Smrg# Allow CC to be a program name with arguments. 25009885543Smrgcompiler=$CC 251b698ba48Smrg])# _LT_AC_SYS_COMPILER 252b698ba48Smrg 253b698ba48Smrg 254b698ba48Smrg# _LT_CC_BASENAME(CC) 255b698ba48Smrg# ------------------- 256b698ba48Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 257b698ba48SmrgAC_DEFUN([_LT_CC_BASENAME], 258b698ba48Smrg[for cc_temp in $1""; do 259b698ba48Smrg case $cc_temp in 260b698ba48Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 261b698ba48Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 262b698ba48Smrg \-*) ;; 263b698ba48Smrg *) break;; 264b698ba48Smrg esac 265b698ba48Smrgdone 266b698ba48Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 267b698ba48Smrg]) 26809885543Smrg 26909885543Smrg 27009885543Smrg# _LT_COMPILER_BOILERPLATE 27109885543Smrg# ------------------------ 27209885543Smrg# Check for compiler boilerplate output or warnings with 27309885543Smrg# the simple compiler test code. 274b698ba48SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 275b698ba48Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 2767104f784Smrgac_outfile=conftest.$ac_objext 2777104f784Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 27809885543Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 27909885543Smrg_lt_compiler_boilerplate=`cat conftest.err` 280b698ba48Smrg$rm conftest* 28109885543Smrg])# _LT_COMPILER_BOILERPLATE 28209885543Smrg 28309885543Smrg 28409885543Smrg# _LT_LINKER_BOILERPLATE 28509885543Smrg# ---------------------- 28609885543Smrg# Check for linker boilerplate output or warnings with 28709885543Smrg# the simple link test code. 288b698ba48SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 289b698ba48Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 2907104f784Smrgac_outfile=conftest.$ac_objext 2917104f784Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 29209885543Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 29309885543Smrg_lt_linker_boilerplate=`cat conftest.err` 294b698ba48Smrg$rm -r conftest* 29509885543Smrg])# _LT_LINKER_BOILERPLATE 29609885543Smrg 2977104f784Smrg# _LT_REQUIRED_DARWIN_CHECKS 298b698ba48Smrg# -------------------------- 299b698ba48Smrg# Check for some things on darwin 300b698ba48SmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ 3017104f784Smrg case $host_os in 3027104f784Smrg rhapsody* | darwin*) 3037104f784Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 3047104f784Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 3057104f784Smrg 3067104f784Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 3077104f784Smrg [lt_cv_apple_cc_single_mod=no 3087104f784Smrg if test -z "${LT_MULTI_MODULE}"; then 309b698ba48Smrg # By default we will add the -single_module flag. You can override 310b698ba48Smrg # by either setting the environment variable LT_MULTI_MODULE 311b698ba48Smrg # non-empty at configure time, or by adding -multi_module to the 312b698ba48Smrg # link flags. 313b698ba48Smrg echo "int foo(void){return 1;}" > conftest.c 314b698ba48Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 315b698ba48Smrg -dynamiclib ${wl}-single_module conftest.c 316b698ba48Smrg if test -f libconftest.dylib; then 317b698ba48Smrg lt_cv_apple_cc_single_mod=yes 318b698ba48Smrg rm -rf libconftest.dylib* 319b698ba48Smrg fi 320b698ba48Smrg rm conftest.c 3217104f784Smrg fi]) 3227104f784Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 3237104f784Smrg [lt_cv_ld_exported_symbols_list], 3247104f784Smrg [lt_cv_ld_exported_symbols_list=no 3257104f784Smrg save_LDFLAGS=$LDFLAGS 3267104f784Smrg echo "_main" > conftest.sym 3277104f784Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 3287104f784Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 329b698ba48Smrg [lt_cv_ld_exported_symbols_list=yes], 330b698ba48Smrg [lt_cv_ld_exported_symbols_list=no]) 331b698ba48Smrg LDFLAGS="$save_LDFLAGS" 3327104f784Smrg ]) 3337104f784Smrg case $host_os in 334b698ba48Smrg rhapsody* | darwin1.[[0123]]) 3357104f784Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 3367104f784Smrg darwin1.*) 337b698ba48Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 338b698ba48Smrg darwin*) 3397104f784Smrg # if running on 10.5 or later, the deployment target defaults 3407104f784Smrg # to the OS version, if on x86, and 10.4, the deployment 3417104f784Smrg # target defaults to 10.4. Don't you love it? 3427104f784Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 343b698ba48Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 344b698ba48Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 345b698ba48Smrg 10.[[012]]*) 346b698ba48Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 347b698ba48Smrg 10.*) 348b698ba48Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3497104f784Smrg esac 3507104f784Smrg ;; 3517104f784Smrg esac 3527104f784Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 3537104f784Smrg _lt_dar_single_mod='$single_module' 3547104f784Smrg fi 3557104f784Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 3567104f784Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 3577104f784Smrg else 358b698ba48Smrg _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 3597104f784Smrg fi 3607104f784Smrg if test "$DSYMUTIL" != ":"; then 361b698ba48Smrg _lt_dsymutil="~$DSYMUTIL \$lib || :" 3627104f784Smrg else 3637104f784Smrg _lt_dsymutil= 3647104f784Smrg fi 3657104f784Smrg ;; 3667104f784Smrg esac 3677104f784Smrg]) 36809885543Smrg 369b698ba48Smrg# _LT_AC_SYS_LIBPATH_AIX 370b698ba48Smrg# ---------------------- 3712ec8c4b4Smrg# Links a minimal program and checks the executable 3722ec8c4b4Smrg# for the system default hardcoded library path. In most cases, 3732ec8c4b4Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 3742ec8c4b4Smrg# the location of the communication and MPI libs are included too. 3752ec8c4b4Smrg# If we don't find anything, use the default library path according 37609885543Smrg# to the aix ld manual. 377b698ba48SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 378b698ba48Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 3797104f784SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 3807104f784Smrglt_aix_libpath_sed=' 3817104f784Smrg /Import File Strings/,/^$/ { 3827104f784Smrg /^0/ { 3837104f784Smrg s/^0 *\(.*\)$/\1/ 3847104f784Smrg p 3857104f784Smrg } 3867104f784Smrg }' 3877104f784Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 38809885543Smrg# Check for a 64-bit object if we didn't find anything. 3897104f784Smrgif test -z "$aix_libpath"; then 3907104f784Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3917104f784Smrgfi],[]) 39209885543Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 393b698ba48Smrg])# _LT_AC_SYS_LIBPATH_AIX 39409885543Smrg 39509885543Smrg 396b698ba48Smrg# _LT_AC_SHELL_INIT(ARG) 397b698ba48Smrg# ---------------------- 398b698ba48SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 39909885543Smrg[ifdef([AC_DIVERSION_NOTICE], 40009885543Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 40109885543Smrg [AC_DIVERT_PUSH(NOTICE)]) 40209885543Smrg$1 40309885543SmrgAC_DIVERT_POP 404b698ba48Smrg])# _LT_AC_SHELL_INIT 40509885543Smrg 40609885543Smrg 407b698ba48Smrg# _LT_AC_PROG_ECHO_BACKSLASH 408b698ba48Smrg# -------------------------- 40909885543Smrg# Add some code to the start of the generated configure script which 41009885543Smrg# will find an echo command which doesn't interpret backslashes. 411b698ba48SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 412b698ba48Smrg[_LT_AC_SHELL_INIT([ 41309885543Smrg# Check that we are running under the correct shell. 41409885543SmrgSHELL=${CONFIG_SHELL-/bin/sh} 41509885543Smrg 416b698ba48Smrgcase X$ECHO in 41709885543SmrgX*--fallback-echo) 41809885543Smrg # Remove one level of quotation (which was required for Make). 419b698ba48Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 42009885543Smrg ;; 42109885543Smrgesac 42209885543Smrg 423b698ba48Smrgecho=${ECHO-echo} 42409885543Smrgif test "X[$]1" = X--no-reexec; then 42509885543Smrg # Discard the --no-reexec flag, and continue. 42609885543Smrg shift 42709885543Smrgelif test "X[$]1" = X--fallback-echo; then 42809885543Smrg # Avoid inline document here, it may be left over 42909885543Smrg : 430b698ba48Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 431b698ba48Smrg # Yippee, $echo works! 43209885543Smrg : 43309885543Smrgelse 43409885543Smrg # Restart under the correct shell. 43509885543Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 43609885543Smrgfi 43709885543Smrg 43809885543Smrgif test "X[$]1" = X--fallback-echo; then 43909885543Smrg # used as fallback echo 44009885543Smrg shift 441b698ba48Smrg cat <<EOF 44209885543Smrg[$]* 443b698ba48SmrgEOF 44409885543Smrg exit 0 44509885543Smrgfi 44609885543Smrg 44709885543Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 44809885543Smrg# if CDPATH is set. 44909885543Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 45009885543Smrg 451b698ba48Smrgif test -z "$ECHO"; then 452b698ba48Smrgif test "X${echo_test_string+set}" != Xset; then 453b698ba48Smrg# find a string as large as possible, as long as the shell can cope with it 454b698ba48Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 455b698ba48Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 456b698ba48Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 457b698ba48Smrg echo_test_string=`eval $cmd` && 458b698ba48Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 459b698ba48Smrg then 460b698ba48Smrg break 461b698ba48Smrg fi 462b698ba48Smrg done 463b698ba48Smrgfi 46409885543Smrg 465b698ba48Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 466b698ba48Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 467b698ba48Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 468b698ba48Smrg : 469b698ba48Smrgelse 470b698ba48Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 471b698ba48Smrg # backslashes. This makes it impossible to quote backslashes using 472b698ba48Smrg # echo "$something" | sed 's/\\/\\\\/g' 473b698ba48Smrg # 474b698ba48Smrg # So, first we look for a working echo in the user's PATH. 47509885543Smrg 476b698ba48Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 477b698ba48Smrg for dir in $PATH /usr/ucb; do 47809885543Smrg IFS="$lt_save_ifs" 479b698ba48Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 480b698ba48Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 481b698ba48Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 482b698ba48Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 483b698ba48Smrg echo="$dir/echo" 484b698ba48Smrg break 485b698ba48Smrg fi 486b698ba48Smrg done 487b698ba48Smrg IFS="$lt_save_ifs" 48809885543Smrg 489b698ba48Smrg if test "X$echo" = Xecho; then 490b698ba48Smrg # We didn't find a better echo, so look for alternatives. 491b698ba48Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 492b698ba48Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 493b698ba48Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 494b698ba48Smrg # This shell has a builtin print -r that does the trick. 495b698ba48Smrg echo='print -r' 496b698ba48Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 497b698ba48Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 498b698ba48Smrg # If we have ksh, try running configure again with it. 499b698ba48Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 500b698ba48Smrg export ORIGINAL_CONFIG_SHELL 501b698ba48Smrg CONFIG_SHELL=/bin/ksh 502b698ba48Smrg export CONFIG_SHELL 503b698ba48Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 504b698ba48Smrg else 505b698ba48Smrg # Try using printf. 506b698ba48Smrg echo='printf %s\n' 507b698ba48Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 508b698ba48Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 509b698ba48Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 510b698ba48Smrg # Cool, printf works 511b698ba48Smrg : 512b698ba48Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 513b698ba48Smrg test "X$echo_testing_string" = 'X\t' && 514b698ba48Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 5152ec8c4b4Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 516b698ba48Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 517b698ba48Smrg export CONFIG_SHELL 518b698ba48Smrg SHELL="$CONFIG_SHELL" 519b698ba48Smrg export SHELL 520b698ba48Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 521b698ba48Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 522b698ba48Smrg test "X$echo_testing_string" = 'X\t' && 523b698ba48Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 524b698ba48Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 525b698ba48Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 526b698ba48Smrg else 527b698ba48Smrg # maybe with a smaller string... 528b698ba48Smrg prev=: 52909885543Smrg 530b698ba48Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 531b698ba48Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 532b698ba48Smrg then 533b698ba48Smrg break 5342ec8c4b4Smrg fi 535b698ba48Smrg prev="$cmd" 536b698ba48Smrg done 537b698ba48Smrg 538b698ba48Smrg if test "$prev" != 'sed 50q "[$]0"'; then 539b698ba48Smrg echo_test_string=`eval $prev` 540b698ba48Smrg export echo_test_string 541b698ba48Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 542b698ba48Smrg else 543b698ba48Smrg # Oops. We lost completely, so just stick with echo. 544b698ba48Smrg echo=echo 545b698ba48Smrg fi 54609885543Smrg fi 54709885543Smrg fi 54809885543Smrg fi 54909885543Smrgfi 550b698ba48Smrgfi 55109885543Smrg 55209885543Smrg# Copy echo and quote the copy suitably for passing to libtool from 55309885543Smrg# the Makefile, instead of quoting the original, which is used later. 554b698ba48SmrgECHO=$echo 555b698ba48Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 556b698ba48Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 55709885543Smrgfi 55809885543Smrg 559b698ba48SmrgAC_SUBST(ECHO) 560b698ba48Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 56109885543Smrg 56209885543Smrg 563b698ba48Smrg# _LT_AC_LOCK 564b698ba48Smrg# ----------- 565b698ba48SmrgAC_DEFUN([_LT_AC_LOCK], 56609885543Smrg[AC_ARG_ENABLE([libtool-lock], 567b698ba48Smrg [AC_HELP_STRING([--disable-libtool-lock], 568b698ba48Smrg [avoid locking (might break parallel builds)])]) 56909885543Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 57009885543Smrg 57109885543Smrg# Some flags need to be propagated to the compiler or linker for good 57209885543Smrg# libtool support. 57309885543Smrgcase $host in 57409885543Smrgia64-*-hpux*) 57509885543Smrg # Find out which ABI we are using. 57609885543Smrg echo 'int i;' > conftest.$ac_ext 57709885543Smrg if AC_TRY_EVAL(ac_compile); then 57809885543Smrg case `/usr/bin/file conftest.$ac_objext` in 579b698ba48Smrg *ELF-32*) 580b698ba48Smrg HPUX_IA64_MODE="32" 581b698ba48Smrg ;; 582b698ba48Smrg *ELF-64*) 583b698ba48Smrg HPUX_IA64_MODE="64" 584b698ba48Smrg ;; 58509885543Smrg esac 58609885543Smrg fi 58709885543Smrg rm -rf conftest* 58809885543Smrg ;; 58909885543Smrg*-*-irix6*) 59009885543Smrg # Find out which ABI we are using. 59109885543Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 59209885543Smrg if AC_TRY_EVAL(ac_compile); then 593b698ba48Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 594b698ba48Smrg case `/usr/bin/file conftest.$ac_objext` in 595b698ba48Smrg *32-bit*) 596b698ba48Smrg LD="${LD-ld} -melf32bsmip" 597b698ba48Smrg ;; 598b698ba48Smrg *N32*) 599b698ba48Smrg LD="${LD-ld} -melf32bmipn32" 600b698ba48Smrg ;; 601b698ba48Smrg *64-bit*) 602b698ba48Smrg LD="${LD-ld} -melf64bmip" 603b698ba48Smrg ;; 604b698ba48Smrg esac 605b698ba48Smrg else 606b698ba48Smrg case `/usr/bin/file conftest.$ac_objext` in 607b698ba48Smrg *32-bit*) 608b698ba48Smrg LD="${LD-ld} -32" 609b698ba48Smrg ;; 610b698ba48Smrg *N32*) 611b698ba48Smrg LD="${LD-ld} -n32" 612b698ba48Smrg ;; 613b698ba48Smrg *64-bit*) 614b698ba48Smrg LD="${LD-ld} -64" 615b698ba48Smrg ;; 616b698ba48Smrg esac 617b698ba48Smrg fi 61809885543Smrg fi 61909885543Smrg rm -rf conftest* 62009885543Smrg ;; 62109885543Smrg 6227104f784Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 623b698ba48Smrgs390*-*linux*|sparc*-*linux*) 62409885543Smrg # Find out which ABI we are using. 62509885543Smrg echo 'int i;' > conftest.$ac_ext 62609885543Smrg if AC_TRY_EVAL(ac_compile); then 62709885543Smrg case `/usr/bin/file conftest.o` in 628b698ba48Smrg *32-bit*) 629b698ba48Smrg case $host in 630b698ba48Smrg x86_64-*kfreebsd*-gnu) 631b698ba48Smrg LD="${LD-ld} -m elf_i386_fbsd" 632b698ba48Smrg ;; 633b698ba48Smrg x86_64-*linux*) 634b698ba48Smrg LD="${LD-ld} -m elf_i386" 635b698ba48Smrg ;; 636b698ba48Smrg ppc64-*linux*|powerpc64-*linux*) 637b698ba48Smrg LD="${LD-ld} -m elf32ppclinux" 638b698ba48Smrg ;; 639b698ba48Smrg s390x-*linux*) 640b698ba48Smrg LD="${LD-ld} -m elf_s390" 641b698ba48Smrg ;; 642b698ba48Smrg sparc64-*linux*) 643b698ba48Smrg LD="${LD-ld} -m elf32_sparc" 644b698ba48Smrg ;; 645b698ba48Smrg esac 646b698ba48Smrg ;; 647b698ba48Smrg *64-bit*) 648b698ba48Smrg libsuff=64 649b698ba48Smrg case $host in 650b698ba48Smrg x86_64-*kfreebsd*-gnu) 651b698ba48Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 652b698ba48Smrg ;; 653b698ba48Smrg x86_64-*linux*) 654b698ba48Smrg LD="${LD-ld} -m elf_x86_64" 655b698ba48Smrg ;; 656b698ba48Smrg ppc*-*linux*|powerpc*-*linux*) 657b698ba48Smrg LD="${LD-ld} -m elf64ppc" 658b698ba48Smrg ;; 659b698ba48Smrg s390*-*linux*) 660b698ba48Smrg LD="${LD-ld} -m elf64_s390" 661b698ba48Smrg ;; 662b698ba48Smrg sparc*-*linux*) 663b698ba48Smrg LD="${LD-ld} -m elf64_sparc" 664b698ba48Smrg ;; 665b698ba48Smrg esac 666b698ba48Smrg ;; 66709885543Smrg esac 66809885543Smrg fi 66909885543Smrg rm -rf conftest* 67009885543Smrg ;; 67109885543Smrg 67209885543Smrg*-*-sco3.2v5*) 67309885543Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 67409885543Smrg SAVE_CFLAGS="$CFLAGS" 67509885543Smrg CFLAGS="$CFLAGS -belf" 67609885543Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 67709885543Smrg [AC_LANG_PUSH(C) 678b698ba48Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 67909885543Smrg AC_LANG_POP]) 68009885543Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 68109885543Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 68209885543Smrg CFLAGS="$SAVE_CFLAGS" 68309885543Smrg fi 68409885543Smrg ;; 68509885543Smrgsparc*-*solaris*) 68609885543Smrg # Find out which ABI we are using. 68709885543Smrg echo 'int i;' > conftest.$ac_ext 68809885543Smrg if AC_TRY_EVAL(ac_compile); then 68909885543Smrg case `/usr/bin/file conftest.o` in 69009885543Smrg *64-bit*) 69109885543Smrg case $lt_cv_prog_gnu_ld in 69209885543Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 6937104f784Smrg *) 694b698ba48Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 6957104f784Smrg LD="${LD-ld} -64" 6967104f784Smrg fi 6977104f784Smrg ;; 69809885543Smrg esac 69909885543Smrg ;; 70009885543Smrg esac 70109885543Smrg fi 70209885543Smrg rm -rf conftest* 70309885543Smrg ;; 704b698ba48Smrg 705b698ba48SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 706b698ba48Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 707b698ba48Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 708b698ba48Smrg AC_CHECK_TOOL(AS, as, false) 709b698ba48Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 710b698ba48Smrg ;; 711b698ba48Smrg ]) 71209885543Smrgesac 71309885543Smrg 71409885543Smrgneed_locks="$enable_libtool_lock" 7152ec8c4b4Smrg 716b698ba48Smrg])# _LT_AC_LOCK 71709885543Smrg 71809885543Smrg 719b698ba48Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 72009885543Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 72109885543Smrg# ---------------------------------------------------------------- 72209885543Smrg# Check whether the given compiler option works 723b698ba48SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 724b698ba48Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 72509885543SmrgAC_CACHE_CHECK([$1], [$2], 72609885543Smrg [$2=no 727b698ba48Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 7287104f784Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 72909885543Smrg lt_compiler_flag="$3" 73009885543Smrg # Insert the option either (1) after the last *FLAGS variable, or 73109885543Smrg # (2) before a word containing "conftest.", or (3) at the end. 73209885543Smrg # Note that $ac_compile itself does not contain backslashes and begins 73309885543Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 73409885543Smrg # The option is referenced via a variable to avoid confusing sed. 73509885543Smrg lt_compile=`echo "$ac_compile" | $SED \ 73609885543Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 73709885543Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 73809885543Smrg -e 's:$: $lt_compiler_flag:'` 73909885543Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 74009885543Smrg (eval "$lt_compile" 2>conftest.err) 74109885543Smrg ac_status=$? 74209885543Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 74309885543Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 74409885543Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 74509885543Smrg # The compiler can only warn and ignore the option if not recognized 74609885543Smrg # So say no if there are warnings other than the usual output. 747b698ba48Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 74809885543Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 74909885543Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 75009885543Smrg $2=yes 75109885543Smrg fi 75209885543Smrg fi 753b698ba48Smrg $rm conftest* 75409885543Smrg]) 75509885543Smrg 75609885543Smrgif test x"[$]$2" = xyes; then 757b698ba48Smrg ifelse([$5], , :, [$5]) 75809885543Smrgelse 759b698ba48Smrg ifelse([$6], , :, [$6]) 76009885543Smrgfi 761b698ba48Smrg])# AC_LIBTOOL_COMPILER_OPTION 76209885543Smrg 7632ec8c4b4Smrg 764b698ba48Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 765b698ba48Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 766b698ba48Smrg# ------------------------------------------------------------ 767b698ba48Smrg# Check whether the given compiler option works 768b698ba48SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 769b698ba48Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 7707104f784SmrgAC_CACHE_CHECK([$1], [$2], 77109885543Smrg [$2=no 77209885543Smrg save_LDFLAGS="$LDFLAGS" 77309885543Smrg LDFLAGS="$LDFLAGS $3" 7747104f784Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 77509885543Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 77609885543Smrg # The linker can only warn and ignore the option if not recognized 77709885543Smrg # So say no if there are warnings 77809885543Smrg if test -s conftest.err; then 77909885543Smrg # Append any errors to the config.log. 78009885543Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 781b698ba48Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 78209885543Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 78309885543Smrg if diff conftest.exp conftest.er2 >/dev/null; then 78409885543Smrg $2=yes 78509885543Smrg fi 78609885543Smrg else 78709885543Smrg $2=yes 78809885543Smrg fi 78909885543Smrg fi 790b698ba48Smrg $rm -r conftest* 79109885543Smrg LDFLAGS="$save_LDFLAGS" 79209885543Smrg]) 79309885543Smrg 79409885543Smrgif test x"[$]$2" = xyes; then 795b698ba48Smrg ifelse([$4], , :, [$4]) 79609885543Smrgelse 797b698ba48Smrg ifelse([$5], , :, [$5]) 79809885543Smrgfi 799b698ba48Smrg])# AC_LIBTOOL_LINKER_OPTION 80009885543Smrg 80109885543Smrg 802b698ba48Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 803b698ba48Smrg# -------------------------- 804b698ba48SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 805b698ba48Smrg[# find the maximum length of command line arguments 80609885543SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 80709885543SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 80809885543Smrg i=0 80909885543Smrg teststring="ABCD" 81009885543Smrg 81109885543Smrg case $build_os in 81209885543Smrg msdosdjgpp*) 81309885543Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 81409885543Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 81509885543Smrg # during glob expansion). Even if it were fixed, the result of this 81609885543Smrg # check would be larger than it should be. 81709885543Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 81809885543Smrg ;; 81909885543Smrg 82009885543Smrg gnu*) 82109885543Smrg # Under GNU Hurd, this test is not required because there is 82209885543Smrg # no limit to the length of command line arguments. 82309885543Smrg # Libtool will interpret -1 as no limit whatsoever 82409885543Smrg lt_cv_sys_max_cmd_len=-1; 82509885543Smrg ;; 82609885543Smrg 827b698ba48Smrg cygwin* | mingw*) 82809885543Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 82909885543Smrg # about 5 minutes as the teststring grows exponentially. 83009885543Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 83109885543Smrg # you end up with a "frozen" computer, even though with patience 83209885543Smrg # the test eventually succeeds (with a max line length of 256k). 83309885543Smrg # Instead, let's just punt: use the minimum linelength reported by 83409885543Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 83509885543Smrg lt_cv_sys_max_cmd_len=8192; 83609885543Smrg ;; 83709885543Smrg 83809885543Smrg amigaos*) 83909885543Smrg # On AmigaOS with pdksh, this test takes hours, literally. 84009885543Smrg # So we just punt and use a minimum line length of 8192. 84109885543Smrg lt_cv_sys_max_cmd_len=8192; 84209885543Smrg ;; 84309885543Smrg 84409885543Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 84509885543Smrg # This has been around since 386BSD, at least. Likely further. 84609885543Smrg if test -x /sbin/sysctl; then 84709885543Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 84809885543Smrg elif test -x /usr/sbin/sysctl; then 84909885543Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 85009885543Smrg else 85109885543Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 85209885543Smrg fi 85309885543Smrg # And add a safety zone 85409885543Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 85509885543Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 85609885543Smrg ;; 85709885543Smrg 85809885543Smrg interix*) 85909885543Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 86009885543Smrg lt_cv_sys_max_cmd_len=196608 86109885543Smrg ;; 86209885543Smrg 86309885543Smrg osf*) 86409885543Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 86509885543Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 86609885543Smrg # nice to cause kernel panics so lets avoid the loop below. 86709885543Smrg # First set a reasonable default. 86809885543Smrg lt_cv_sys_max_cmd_len=16384 86909885543Smrg # 87009885543Smrg if test -x /sbin/sysconfig; then 87109885543Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 87209885543Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 87309885543Smrg esac 87409885543Smrg fi 87509885543Smrg ;; 87609885543Smrg sco3.2v5*) 87709885543Smrg lt_cv_sys_max_cmd_len=102400 87809885543Smrg ;; 87909885543Smrg sysv5* | sco5v6* | sysv4.2uw2*) 88009885543Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 88109885543Smrg if test -n "$kargmax"; then 882b698ba48Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 88309885543Smrg else 88409885543Smrg lt_cv_sys_max_cmd_len=32768 88509885543Smrg fi 88609885543Smrg ;; 88709885543Smrg *) 8887104f784Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 8897104f784Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 8907104f784Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 8917104f784Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 8927104f784Smrg else 8937104f784Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 894b698ba48Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 895b698ba48Smrg = "XX$teststring") >/dev/null 2>&1 && 896b698ba48Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 897b698ba48Smrg lt_cv_sys_max_cmd_len=$new_result && 8987104f784Smrg test $i != 17 # 1/2 MB should be enough 8997104f784Smrg do 9007104f784Smrg i=`expr $i + 1` 9017104f784Smrg teststring=$teststring$teststring 9027104f784Smrg done 9037104f784Smrg teststring= 904b698ba48Smrg # Add a significant safety factor because C++ compilers can tack on massive 905b698ba48Smrg # amounts of additional arguments before passing them to the linker. 906b698ba48Smrg # It appears as though 1/2 is a usable value. 9077104f784Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 9087104f784Smrg fi 90909885543Smrg ;; 91009885543Smrg esac 91109885543Smrg]) 91209885543Smrgif test -n $lt_cv_sys_max_cmd_len ; then 91309885543Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 91409885543Smrgelse 91509885543Smrg AC_MSG_RESULT(none) 91609885543Smrgfi 917b698ba48Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 91809885543Smrg 91909885543Smrg 920b698ba48Smrg# _LT_AC_CHECK_DLFCN 921b698ba48Smrg# ------------------ 922b698ba48SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 923b698ba48Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 924b698ba48Smrg])# _LT_AC_CHECK_DLFCN 92509885543Smrg 92609885543Smrg 927b698ba48Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 928b698ba48Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 929b698ba48Smrg# --------------------------------------------------------------------- 930b698ba48SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 931b698ba48Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 93209885543Smrgif test "$cross_compiling" = yes; then : 93309885543Smrg [$4] 93409885543Smrgelse 93509885543Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 93609885543Smrg lt_status=$lt_dlunknown 937b698ba48Smrg cat > conftest.$ac_ext <<EOF 93809885543Smrg[#line __oline__ "configure" 93909885543Smrg#include "confdefs.h" 94009885543Smrg 94109885543Smrg#if HAVE_DLFCN_H 94209885543Smrg#include <dlfcn.h> 94309885543Smrg#endif 94409885543Smrg 94509885543Smrg#include <stdio.h> 94609885543Smrg 94709885543Smrg#ifdef RTLD_GLOBAL 94809885543Smrg# define LT_DLGLOBAL RTLD_GLOBAL 94909885543Smrg#else 95009885543Smrg# ifdef DL_GLOBAL 95109885543Smrg# define LT_DLGLOBAL DL_GLOBAL 95209885543Smrg# else 95309885543Smrg# define LT_DLGLOBAL 0 95409885543Smrg# endif 95509885543Smrg#endif 95609885543Smrg 95709885543Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 95809885543Smrg find out it does not work in some platform. */ 95909885543Smrg#ifndef LT_DLLAZY_OR_NOW 96009885543Smrg# ifdef RTLD_LAZY 96109885543Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 96209885543Smrg# else 96309885543Smrg# ifdef DL_LAZY 96409885543Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 96509885543Smrg# else 96609885543Smrg# ifdef RTLD_NOW 96709885543Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 96809885543Smrg# else 96909885543Smrg# ifdef DL_NOW 97009885543Smrg# define LT_DLLAZY_OR_NOW DL_NOW 97109885543Smrg# else 97209885543Smrg# define LT_DLLAZY_OR_NOW 0 97309885543Smrg# endif 97409885543Smrg# endif 97509885543Smrg# endif 97609885543Smrg# endif 97709885543Smrg#endif 97809885543Smrg 979b698ba48Smrg#ifdef __cplusplus 980b698ba48Smrgextern "C" void exit (int); 981b698ba48Smrg#endif 982b698ba48Smrg 98309885543Smrgvoid fnord() { int i=42;} 98409885543Smrgint main () 98509885543Smrg{ 98609885543Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 98709885543Smrg int status = $lt_dlunknown; 98809885543Smrg 98909885543Smrg if (self) 99009885543Smrg { 99109885543Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 99209885543Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 99309885543Smrg /* dlclose (self); */ 99409885543Smrg } 99509885543Smrg else 99609885543Smrg puts (dlerror ()); 99709885543Smrg 998b698ba48Smrg exit (status); 99909885543Smrg}] 1000b698ba48SmrgEOF 100109885543Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 100209885543Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 100309885543Smrg lt_status=$? 100409885543Smrg case x$lt_status in 100509885543Smrg x$lt_dlno_uscore) $1 ;; 100609885543Smrg x$lt_dlneed_uscore) $2 ;; 100709885543Smrg x$lt_dlunknown|x*) $3 ;; 100809885543Smrg esac 100909885543Smrg else : 101009885543Smrg # compilation failed 101109885543Smrg $3 101209885543Smrg fi 101309885543Smrgfi 101409885543Smrgrm -fr conftest* 1015b698ba48Smrg])# _LT_AC_TRY_DLOPEN_SELF 101609885543Smrg 101709885543Smrg 1018b698ba48Smrg# AC_LIBTOOL_DLOPEN_SELF 1019b698ba48Smrg# ---------------------- 1020b698ba48SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 1021b698ba48Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 102209885543Smrgif test "x$enable_dlopen" != xyes; then 102309885543Smrg enable_dlopen=unknown 102409885543Smrg enable_dlopen_self=unknown 102509885543Smrg enable_dlopen_self_static=unknown 102609885543Smrgelse 102709885543Smrg lt_cv_dlopen=no 102809885543Smrg lt_cv_dlopen_libs= 102909885543Smrg 103009885543Smrg case $host_os in 103109885543Smrg beos*) 103209885543Smrg lt_cv_dlopen="load_add_on" 103309885543Smrg lt_cv_dlopen_libs= 103409885543Smrg lt_cv_dlopen_self=yes 103509885543Smrg ;; 103609885543Smrg 1037b698ba48Smrg mingw* | pw32*) 103809885543Smrg lt_cv_dlopen="LoadLibrary" 103909885543Smrg lt_cv_dlopen_libs= 1040b698ba48Smrg ;; 104109885543Smrg 104209885543Smrg cygwin*) 104309885543Smrg lt_cv_dlopen="dlopen" 104409885543Smrg lt_cv_dlopen_libs= 1045b698ba48Smrg ;; 104609885543Smrg 104709885543Smrg darwin*) 104809885543Smrg # if libdl is installed we need to link against it 104909885543Smrg AC_CHECK_LIB([dl], [dlopen], 105009885543Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 105109885543Smrg lt_cv_dlopen="dyld" 105209885543Smrg lt_cv_dlopen_libs= 105309885543Smrg lt_cv_dlopen_self=yes 105409885543Smrg ]) 1055b698ba48Smrg ;; 105609885543Smrg 105709885543Smrg *) 105809885543Smrg AC_CHECK_FUNC([shl_load], 105909885543Smrg [lt_cv_dlopen="shl_load"], 106009885543Smrg [AC_CHECK_LIB([dld], [shl_load], 10617104f784Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 106209885543Smrg [AC_CHECK_FUNC([dlopen], 106309885543Smrg [lt_cv_dlopen="dlopen"], 106409885543Smrg [AC_CHECK_LIB([dl], [dlopen], 106509885543Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 106609885543Smrg [AC_CHECK_LIB([svld], [dlopen], 106709885543Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 106809885543Smrg [AC_CHECK_LIB([dld], [dld_link], 10697104f784Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 107009885543Smrg ]) 107109885543Smrg ]) 107209885543Smrg ]) 107309885543Smrg ]) 107409885543Smrg ]) 107509885543Smrg ;; 107609885543Smrg esac 107709885543Smrg 107809885543Smrg if test "x$lt_cv_dlopen" != xno; then 107909885543Smrg enable_dlopen=yes 108009885543Smrg else 108109885543Smrg enable_dlopen=no 108209885543Smrg fi 108309885543Smrg 108409885543Smrg case $lt_cv_dlopen in 108509885543Smrg dlopen) 108609885543Smrg save_CPPFLAGS="$CPPFLAGS" 108709885543Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 108809885543Smrg 108909885543Smrg save_LDFLAGS="$LDFLAGS" 109009885543Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 109109885543Smrg 109209885543Smrg save_LIBS="$LIBS" 109309885543Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 109409885543Smrg 109509885543Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 109609885543Smrg lt_cv_dlopen_self, [dnl 1097b698ba48Smrg _LT_AC_TRY_DLOPEN_SELF( 109809885543Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 109909885543Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 110009885543Smrg ]) 110109885543Smrg 110209885543Smrg if test "x$lt_cv_dlopen_self" = xyes; then 110309885543Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 110409885543Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1105b698ba48Smrg lt_cv_dlopen_self_static, [dnl 1106b698ba48Smrg _LT_AC_TRY_DLOPEN_SELF( 110709885543Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 110809885543Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 110909885543Smrg ]) 111009885543Smrg fi 111109885543Smrg 111209885543Smrg CPPFLAGS="$save_CPPFLAGS" 111309885543Smrg LDFLAGS="$save_LDFLAGS" 111409885543Smrg LIBS="$save_LIBS" 111509885543Smrg ;; 111609885543Smrg esac 111709885543Smrg 111809885543Smrg case $lt_cv_dlopen_self in 111909885543Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 112009885543Smrg *) enable_dlopen_self=unknown ;; 112109885543Smrg esac 112209885543Smrg 112309885543Smrg case $lt_cv_dlopen_self_static in 112409885543Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 112509885543Smrg *) enable_dlopen_self_static=unknown ;; 112609885543Smrg esac 112709885543Smrgfi 1128b698ba48Smrg])# AC_LIBTOOL_DLOPEN_SELF 112909885543Smrg 11302ec8c4b4Smrg 1131b698ba48Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 1132b698ba48Smrg# --------------------------------- 1133b698ba48Smrg# Check to see if options -c and -o are simultaneously supported by compiler 1134b698ba48SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 1135b698ba48Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1136b698ba48SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 113709885543SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1138b698ba48Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1139b698ba48Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1140b698ba48Smrg $rm -r conftest 2>/dev/null 114109885543Smrg mkdir conftest 114209885543Smrg cd conftest 114309885543Smrg mkdir out 11447104f784Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 114509885543Smrg 114609885543Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 114709885543Smrg # Insert the option either (1) after the last *FLAGS variable, or 114809885543Smrg # (2) before a word containing "conftest.", or (3) at the end. 114909885543Smrg # Note that $ac_compile itself does not contain backslashes and begins 115009885543Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 115109885543Smrg lt_compile=`echo "$ac_compile" | $SED \ 115209885543Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 115309885543Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 115409885543Smrg -e 's:$: $lt_compiler_flag:'` 115509885543Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 115609885543Smrg (eval "$lt_compile" 2>out/conftest.err) 115709885543Smrg ac_status=$? 115809885543Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 115909885543Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 116009885543Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 116109885543Smrg then 116209885543Smrg # The compiler can only warn and ignore the option if not recognized 116309885543Smrg # So say no if there are warnings 1164b698ba48Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 116509885543Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 116609885543Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1167b698ba48Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 116809885543Smrg fi 116909885543Smrg fi 117009885543Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1171b698ba48Smrg $rm conftest* 117209885543Smrg # SGI C++ compiler will create directory out/ii_files/ for 117309885543Smrg # template instantiation 1174b698ba48Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1175b698ba48Smrg $rm out/* && rmdir out 117609885543Smrg cd .. 1177b698ba48Smrg rmdir conftest 1178b698ba48Smrg $rm conftest* 117909885543Smrg]) 1180b698ba48Smrg])# AC_LIBTOOL_PROG_CC_C_O 118109885543Smrg 118209885543Smrg 1183b698ba48Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1184b698ba48Smrg# ----------------------------------------- 118509885543Smrg# Check to see if we can do hard links to lock some files if needed 1186b698ba48SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1187b698ba48Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 118809885543Smrg 118909885543Smrghard_links="nottested" 1190b698ba48Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 119109885543Smrg # do not overwrite the value of need_locks provided by the user 119209885543Smrg AC_MSG_CHECKING([if we can lock with hard links]) 119309885543Smrg hard_links=yes 1194b698ba48Smrg $rm conftest* 119509885543Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 119609885543Smrg touch conftest.a 119709885543Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 119809885543Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 119909885543Smrg AC_MSG_RESULT([$hard_links]) 120009885543Smrg if test "$hard_links" = no; then 120109885543Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 120209885543Smrg need_locks=warn 120309885543Smrg fi 120409885543Smrgelse 120509885543Smrg need_locks=no 120609885543Smrgfi 1207b698ba48Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 120809885543Smrg 120909885543Smrg 1210b698ba48Smrg# AC_LIBTOOL_OBJDIR 1211b698ba48Smrg# ----------------- 1212b698ba48SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 121309885543Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 121409885543Smrg[rm -f .libs 2>/dev/null 121509885543Smrgmkdir .libs 2>/dev/null 121609885543Smrgif test -d .libs; then 121709885543Smrg lt_cv_objdir=.libs 121809885543Smrgelse 121909885543Smrg # MS-DOS does not allow filenames that begin with a dot. 122009885543Smrg lt_cv_objdir=_libs 122109885543Smrgfi 122209885543Smrgrmdir .libs 2>/dev/null]) 122309885543Smrgobjdir=$lt_cv_objdir 1224b698ba48Smrg])# AC_LIBTOOL_OBJDIR 122509885543Smrg 122609885543Smrg 1227b698ba48Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1228b698ba48Smrg# ---------------------------------------------- 122909885543Smrg# Check hardcoding attributes. 1230b698ba48SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 123109885543Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1232b698ba48Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 1233b698ba48Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1234b698ba48Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1235b698ba48Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 123609885543Smrg 1237b698ba48Smrg # We can hardcode non-existant directories. 1238b698ba48Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 123909885543Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 124009885543Smrg # have to relink, otherwise we might link with an installed library 124109885543Smrg # when we should be linking with a yet-to-be-installed one 1242b698ba48Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1243b698ba48Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 124409885543Smrg # Linking always hardcodes the temporary library directory. 1245b698ba48Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 124609885543Smrg else 124709885543Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1248b698ba48Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 124909885543Smrg fi 125009885543Smrgelse 125109885543Smrg # We cannot hardcode anything, or else we can only hardcode existing 125209885543Smrg # directories. 1253b698ba48Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 125409885543Smrgfi 1255b698ba48SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 125609885543Smrg 1257b698ba48Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 125809885543Smrg # Fast installation is not supported 125909885543Smrg enable_fast_install=no 126009885543Smrgelif test "$shlibpath_overrides_runpath" = yes || 126109885543Smrg test "$enable_shared" = no; then 126209885543Smrg # Fast installation is not necessary 126309885543Smrg enable_fast_install=needless 126409885543Smrgfi 1265b698ba48Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 126609885543Smrg 126709885543Smrg 1268b698ba48Smrg# AC_LIBTOOL_SYS_LIB_STRIP 1269b698ba48Smrg# ------------------------ 1270b698ba48SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1271b698ba48Smrg[striplib= 127209885543Smrgold_striplib= 127309885543SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 1274b698ba48Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 127509885543Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 127609885543Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 127709885543Smrg AC_MSG_RESULT([yes]) 127809885543Smrgelse 127909885543Smrg# FIXME - insert some real tests, host_os isn't really good enough 128009885543Smrg case $host_os in 1281b698ba48Smrg darwin*) 1282b698ba48Smrg if test -n "$STRIP" ; then 1283b698ba48Smrg striplib="$STRIP -x" 1284b698ba48Smrg old_striplib="$STRIP -S" 1285b698ba48Smrg AC_MSG_RESULT([yes]) 1286b698ba48Smrg else 1287b698ba48Smrg AC_MSG_RESULT([no]) 1288b698ba48Smrgfi 1289b698ba48Smrg ;; 1290b698ba48Smrg *) 1291b698ba48Smrg AC_MSG_RESULT([no]) 129209885543Smrg ;; 129309885543Smrg esac 129409885543Smrgfi 1295b698ba48Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 129609885543Smrg 129709885543Smrg 1298b698ba48Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 129909885543Smrg# ----------------------------- 130009885543Smrg# PORTME Fill in your ld.so characteristics 1301b698ba48SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1302b698ba48Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 13037104f784SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 1304b698ba48Smrglibrary_names_spec= 1305b698ba48Smrglibname_spec='lib$name' 1306b698ba48Smrgsoname_spec= 1307b698ba48Smrgshrext_cmds=".so" 1308b698ba48Smrgpostinstall_cmds= 1309b698ba48Smrgpostuninstall_cmds= 1310b698ba48Smrgfinish_cmds= 1311b698ba48Smrgfinish_eval= 1312b698ba48Smrgshlibpath_var= 1313b698ba48Smrgshlibpath_overrides_runpath=unknown 1314b698ba48Smrgversion_type=none 1315b698ba48Smrgdynamic_linker="$host_os ld.so" 1316b698ba48Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 1317b698ba48Smrgm4_if($1,[],[ 131809885543Smrgif test "$GCC" = yes; then 13197104f784Smrg case $host_os in 13207104f784Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 13217104f784Smrg *) lt_awk_arg="/^libraries:/" ;; 13227104f784Smrg esac 13237104f784Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1324b698ba48Smrg if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 132509885543Smrg # if the path contains ";" then we assume it to be the separator 132609885543Smrg # otherwise default to the standard path separator (i.e. ":") - it is 132709885543Smrg # assumed that no part of a normal pathname contains ";" but that should 132809885543Smrg # okay in the real world where ";" in dirpaths is itself problematic. 1329b698ba48Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 133009885543Smrg else 1331b698ba48Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 133209885543Smrg fi 13337104f784Smrg # Ok, now we have the path, separated by spaces, we can step through it 13347104f784Smrg # and add multilib dir if necessary. 13357104f784Smrg lt_tmp_lt_search_path_spec= 13367104f784Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 13377104f784Smrg for lt_sys_path in $lt_search_path_spec; do 13387104f784Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 13397104f784Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 13407104f784Smrg else 13417104f784Smrg test -d "$lt_sys_path" && \ 13427104f784Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 13437104f784Smrg fi 13447104f784Smrg done 1345b698ba48Smrg lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 13467104f784SmrgBEGIN {RS=" "; FS="/|\n";} { 13477104f784Smrg lt_foo=""; 13487104f784Smrg lt_count=0; 13497104f784Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 13507104f784Smrg if ($lt_i != "" && $lt_i != ".") { 13517104f784Smrg if ($lt_i == "..") { 13527104f784Smrg lt_count++; 13537104f784Smrg } else { 13547104f784Smrg if (lt_count == 0) { 13557104f784Smrg lt_foo="/" $lt_i lt_foo; 13567104f784Smrg } else { 13577104f784Smrg lt_count--; 13587104f784Smrg } 13597104f784Smrg } 13607104f784Smrg } 13617104f784Smrg } 13627104f784Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 13637104f784Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 13647104f784Smrg}'` 1365b698ba48Smrg sys_lib_search_path_spec=`echo $lt_search_path_spec` 136609885543Smrgelse 136709885543Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 13687104f784Smrgfi]) 136909885543Smrgneed_lib_prefix=unknown 137009885543Smrghardcode_into_libs=no 137109885543Smrg 137209885543Smrg# when you set need_version to no, make sure it does not cause -set_version 137309885543Smrg# flags to be left without arguments 137409885543Smrgneed_version=unknown 137509885543Smrg 137609885543Smrgcase $host_os in 137709885543Smrgaix3*) 137809885543Smrg version_type=linux 137909885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 138009885543Smrg shlibpath_var=LIBPATH 138109885543Smrg 138209885543Smrg # AIX 3 has no versioning support, so we append a major version to the name. 138309885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 138409885543Smrg ;; 138509885543Smrg 13867104f784Smrgaix[[4-9]]*) 138709885543Smrg version_type=linux 138809885543Smrg need_lib_prefix=no 138909885543Smrg need_version=no 139009885543Smrg hardcode_into_libs=yes 139109885543Smrg if test "$host_cpu" = ia64; then 139209885543Smrg # AIX 5 supports IA64 139309885543Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 139409885543Smrg shlibpath_var=LD_LIBRARY_PATH 139509885543Smrg else 139609885543Smrg # With GCC up to 2.95.x, collect2 would create an import file 139709885543Smrg # for dependence libraries. The import file would start with 139809885543Smrg # the line `#! .'. This would cause the generated library to 139909885543Smrg # depend on `.', always an invalid library. This was fixed in 140009885543Smrg # development snapshots of GCC prior to 3.0. 140109885543Smrg case $host_os in 140209885543Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 140309885543Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 140409885543Smrg echo ' yes ' 1405b698ba48Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 140609885543Smrg : 140709885543Smrg else 140809885543Smrg can_build_shared=no 140909885543Smrg fi 141009885543Smrg ;; 141109885543Smrg esac 141209885543Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 141309885543Smrg # soname into executable. Probably we can add versioning support to 141409885543Smrg # collect2, so additional links can be useful in future. 141509885543Smrg if test "$aix_use_runtimelinking" = yes; then 141609885543Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 141709885543Smrg # instead of lib<name>.a to let people know that these are not 141809885543Smrg # typical AIX shared libraries. 141909885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 142009885543Smrg else 142109885543Smrg # We preserve .a as extension for shared libraries through AIX4.2 142209885543Smrg # and later when we are not doing run time linking. 142309885543Smrg library_names_spec='${libname}${release}.a $libname.a' 142409885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 142509885543Smrg fi 142609885543Smrg shlibpath_var=LIBPATH 142709885543Smrg fi 142809885543Smrg ;; 142909885543Smrg 143009885543Smrgamigaos*) 1431b698ba48Smrg library_names_spec='$libname.ixlibrary $libname.a' 1432b698ba48Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 1433b698ba48Smrg 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' 143409885543Smrg ;; 143509885543Smrg 143609885543Smrgbeos*) 143709885543Smrg library_names_spec='${libname}${shared_ext}' 143809885543Smrg dynamic_linker="$host_os ld.so" 143909885543Smrg shlibpath_var=LIBRARY_PATH 144009885543Smrg ;; 144109885543Smrg 144209885543Smrgbsdi[[45]]*) 144309885543Smrg version_type=linux 144409885543Smrg need_version=no 144509885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 144609885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 144709885543Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 144809885543Smrg shlibpath_var=LD_LIBRARY_PATH 144909885543Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 145009885543Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 145109885543Smrg # the default ld.so.conf also contains /usr/contrib/lib and 145209885543Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 145309885543Smrg # libtool to hard-code these into programs 145409885543Smrg ;; 145509885543Smrg 1456b698ba48Smrgcygwin* | mingw* | pw32*) 145709885543Smrg version_type=windows 145809885543Smrg shrext_cmds=".dll" 145909885543Smrg need_version=no 146009885543Smrg need_lib_prefix=no 146109885543Smrg 146209885543Smrg case $GCC,$host_os in 1463b698ba48Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 146409885543Smrg library_names_spec='$libname.dll.a' 146509885543Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 146609885543Smrg postinstall_cmds='base_file=`basename \${file}`~ 1467b698ba48Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 146809885543Smrg dldir=$destdir/`dirname \$dlpath`~ 146909885543Smrg test -d \$dldir || mkdir -p \$dldir~ 147009885543Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 1471b698ba48Smrg chmod a+x \$dldir/$dlname' 147209885543Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 147309885543Smrg dlpath=$dir/\$dldll~ 1474b698ba48Smrg $rm \$dlpath' 147509885543Smrg shlibpath_overrides_runpath=yes 147609885543Smrg 147709885543Smrg case $host_os in 147809885543Smrg cygwin*) 147909885543Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 148009885543Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 148109885543Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 148209885543Smrg ;; 1483b698ba48Smrg mingw*) 148409885543Smrg # MinGW DLLs use traditional 'lib' prefix 148509885543Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1486b698ba48Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1487b698ba48Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 148809885543Smrg # It is most probably a Windows format PATH printed by 148909885543Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 149009885543Smrg # path with ; separators, and with drive letters. We can handle the 149109885543Smrg # drive letters (cygwin fileutils understands them), so leave them, 149209885543Smrg # especially as we might pass files found there to a mingw objdump, 149309885543Smrg # which wouldn't understand a cygwinified path. Ahh. 1494b698ba48Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 149509885543Smrg else 1496b698ba48Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 149709885543Smrg fi 149809885543Smrg ;; 149909885543Smrg pw32*) 150009885543Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 150109885543Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 150209885543Smrg ;; 150309885543Smrg esac 150409885543Smrg ;; 150509885543Smrg 150609885543Smrg *) 150709885543Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 150809885543Smrg ;; 150909885543Smrg esac 151009885543Smrg dynamic_linker='Win32 ld.exe' 151109885543Smrg # FIXME: first we should search . and the directory the executable is in 151209885543Smrg shlibpath_var=PATH 151309885543Smrg ;; 151409885543Smrg 151509885543Smrgdarwin* | rhapsody*) 151609885543Smrg dynamic_linker="$host_os dyld" 151709885543Smrg version_type=darwin 151809885543Smrg need_lib_prefix=no 151909885543Smrg need_version=no 1520b698ba48Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 152109885543Smrg soname_spec='${libname}${release}${major}$shared_ext' 152209885543Smrg shlibpath_overrides_runpath=yes 152309885543Smrg shlibpath_var=DYLD_LIBRARY_PATH 152409885543Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 1525b698ba48Smrg m4_if([$1], [],[ 1526b698ba48Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 152709885543Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 152809885543Smrg ;; 152909885543Smrg 153009885543Smrgdgux*) 153109885543Smrg version_type=linux 153209885543Smrg need_lib_prefix=no 153309885543Smrg need_version=no 153409885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 153509885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 153609885543Smrg shlibpath_var=LD_LIBRARY_PATH 153709885543Smrg ;; 153809885543Smrg 153909885543Smrgfreebsd1*) 154009885543Smrg dynamic_linker=no 154109885543Smrg ;; 154209885543Smrg 154309885543Smrgfreebsd* | dragonfly*) 154409885543Smrg # DragonFly does not have aout. When/if they implement a new 154509885543Smrg # versioning mechanism, adjust this. 154609885543Smrg if test -x /usr/bin/objformat; then 154709885543Smrg objformat=`/usr/bin/objformat` 154809885543Smrg else 154909885543Smrg case $host_os in 155009885543Smrg freebsd[[123]]*) objformat=aout ;; 155109885543Smrg *) objformat=elf ;; 155209885543Smrg esac 155309885543Smrg fi 15542ec8c4b4Smrg version_type=freebsd-$objformat 155509885543Smrg case $version_type in 155609885543Smrg freebsd-elf*) 155709885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 155809885543Smrg need_version=no 155909885543Smrg need_lib_prefix=no 156009885543Smrg ;; 156109885543Smrg freebsd-*) 156209885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 156309885543Smrg need_version=yes 156409885543Smrg ;; 156509885543Smrg esac 156609885543Smrg shlibpath_var=LD_LIBRARY_PATH 156709885543Smrg case $host_os in 156809885543Smrg freebsd2*) 156909885543Smrg shlibpath_overrides_runpath=yes 157009885543Smrg ;; 157109885543Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 157209885543Smrg shlibpath_overrides_runpath=yes 157309885543Smrg hardcode_into_libs=yes 157409885543Smrg ;; 157509885543Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 157609885543Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 157709885543Smrg shlibpath_overrides_runpath=no 157809885543Smrg hardcode_into_libs=yes 157909885543Smrg ;; 15807104f784Smrg *) # from 4.6 on, and DragonFly 158109885543Smrg shlibpath_overrides_runpath=yes 158209885543Smrg hardcode_into_libs=yes 158309885543Smrg ;; 158409885543Smrg esac 158509885543Smrg ;; 158609885543Smrg 158709885543Smrggnu*) 158809885543Smrg version_type=linux 158909885543Smrg need_lib_prefix=no 159009885543Smrg need_version=no 159109885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 159209885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 159309885543Smrg shlibpath_var=LD_LIBRARY_PATH 159409885543Smrg hardcode_into_libs=yes 159509885543Smrg ;; 159609885543Smrg 159709885543Smrghpux9* | hpux10* | hpux11*) 159809885543Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 159909885543Smrg # link against other versions. 160009885543Smrg version_type=sunos 160109885543Smrg need_lib_prefix=no 160209885543Smrg need_version=no 160309885543Smrg case $host_cpu in 160409885543Smrg ia64*) 160509885543Smrg shrext_cmds='.so' 160609885543Smrg hardcode_into_libs=yes 160709885543Smrg dynamic_linker="$host_os dld.so" 160809885543Smrg shlibpath_var=LD_LIBRARY_PATH 160909885543Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 161009885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 161109885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 161209885543Smrg if test "X$HPUX_IA64_MODE" = X32; then 161309885543Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 161409885543Smrg else 161509885543Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 161609885543Smrg fi 161709885543Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 161809885543Smrg ;; 1619b698ba48Smrg hppa*64*) 1620b698ba48Smrg shrext_cmds='.sl' 1621b698ba48Smrg hardcode_into_libs=yes 1622b698ba48Smrg dynamic_linker="$host_os dld.sl" 1623b698ba48Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1624b698ba48Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1625b698ba48Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1626b698ba48Smrg soname_spec='${libname}${release}${shared_ext}$major' 1627b698ba48Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1628b698ba48Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1629b698ba48Smrg ;; 1630b698ba48Smrg *) 163109885543Smrg shrext_cmds='.sl' 163209885543Smrg dynamic_linker="$host_os dld.sl" 163309885543Smrg shlibpath_var=SHLIB_PATH 163409885543Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 163509885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 163609885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 163709885543Smrg ;; 163809885543Smrg esac 163909885543Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 164009885543Smrg postinstall_cmds='chmod 555 $lib' 164109885543Smrg ;; 164209885543Smrg 16437104f784Smrginterix[[3-9]]*) 164409885543Smrg version_type=linux 164509885543Smrg need_lib_prefix=no 164609885543Smrg need_version=no 164709885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 164809885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 164909885543Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 165009885543Smrg shlibpath_var=LD_LIBRARY_PATH 165109885543Smrg shlibpath_overrides_runpath=no 165209885543Smrg hardcode_into_libs=yes 165309885543Smrg ;; 165409885543Smrg 165509885543Smrgirix5* | irix6* | nonstopux*) 165609885543Smrg case $host_os in 165709885543Smrg nonstopux*) version_type=nonstopux ;; 165809885543Smrg *) 165909885543Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 166009885543Smrg version_type=linux 166109885543Smrg else 166209885543Smrg version_type=irix 166309885543Smrg fi ;; 166409885543Smrg esac 166509885543Smrg need_lib_prefix=no 166609885543Smrg need_version=no 166709885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 166809885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 166909885543Smrg case $host_os in 167009885543Smrg irix5* | nonstopux*) 167109885543Smrg libsuff= shlibsuff= 167209885543Smrg ;; 167309885543Smrg *) 167409885543Smrg case $LD in # libtool.m4 will add one of these switches to LD 167509885543Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 167609885543Smrg libsuff= shlibsuff= libmagic=32-bit;; 167709885543Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 167809885543Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 167909885543Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 168009885543Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 168109885543Smrg *) libsuff= shlibsuff= libmagic=never-match;; 168209885543Smrg esac 168309885543Smrg ;; 168409885543Smrg esac 168509885543Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 168609885543Smrg shlibpath_overrides_runpath=no 168709885543Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 168809885543Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 168909885543Smrg hardcode_into_libs=yes 169009885543Smrg ;; 169109885543Smrg 169209885543Smrg# No shared lib support for Linux oldld, aout, or coff. 169309885543Smrglinux*oldld* | linux*aout* | linux*coff*) 169409885543Smrg dynamic_linker=no 169509885543Smrg ;; 169609885543Smrg 169709885543Smrg# This must be Linux ELF. 169809885543Smrglinux* | k*bsd*-gnu) 169909885543Smrg version_type=linux 170009885543Smrg need_lib_prefix=no 170109885543Smrg need_version=no 170209885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 170309885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 170409885543Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 170509885543Smrg shlibpath_var=LD_LIBRARY_PATH 170609885543Smrg shlibpath_overrides_runpath=no 170709885543Smrg # This implies no fast_install, which is unacceptable. 170809885543Smrg # Some rework will be needed to allow for fast_install 170909885543Smrg # before this can be enabled. 171009885543Smrg hardcode_into_libs=yes 1711b698ba48Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1712b698ba48Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 17132ec8c4b4Smrg 171409885543Smrg # Append ld.so.conf contents to the search path 171509885543Smrg if test -f /etc/ld.so.conf; then 1716b698ba48Smrg 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' ' '` 17172ec8c4b4Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 171809885543Smrg fi 171909885543Smrg 172009885543Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 172109885543Smrg # powerpc, because MkLinux only supported shared libraries with the 172209885543Smrg # GNU dynamic linker. Since this was broken with cross compilers, 172309885543Smrg # most powerpc-linux boxes support dynamic linking these days and 172409885543Smrg # people can always --disable-shared, the test was removed, and we 172509885543Smrg # assume the GNU/Linux dynamic linker is in use. 172609885543Smrg dynamic_linker='GNU/Linux ld.so' 172709885543Smrg ;; 172809885543Smrg 172909885543Smrgnetbsd*) 173009885543Smrg version_type=sunos 173109885543Smrg need_lib_prefix=no 173209885543Smrg need_version=no 1733b698ba48Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 173409885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 173509885543Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 173609885543Smrg dynamic_linker='NetBSD (a.out) ld.so' 173709885543Smrg else 173809885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 173909885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 174009885543Smrg dynamic_linker='NetBSD ld.elf_so' 174109885543Smrg fi 174209885543Smrg shlibpath_var=LD_LIBRARY_PATH 174309885543Smrg shlibpath_overrides_runpath=yes 174409885543Smrg hardcode_into_libs=yes 174509885543Smrg ;; 174609885543Smrg 174709885543Smrgnewsos6) 174809885543Smrg version_type=linux 174909885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 175009885543Smrg shlibpath_var=LD_LIBRARY_PATH 175109885543Smrg shlibpath_overrides_runpath=yes 175209885543Smrg ;; 175309885543Smrg 1754b698ba48Smrgnto-qnx*) 1755b698ba48Smrg version_type=linux 175609885543Smrg need_lib_prefix=no 175709885543Smrg need_version=no 175809885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 175909885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 176009885543Smrg shlibpath_var=LD_LIBRARY_PATH 1761b698ba48Smrg shlibpath_overrides_runpath=yes 176209885543Smrg ;; 176309885543Smrg 176409885543Smrgopenbsd*) 176509885543Smrg version_type=sunos 176609885543Smrg sys_lib_dlsearch_path_spec="/usr/lib" 176709885543Smrg need_lib_prefix=no 176809885543Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 176909885543Smrg case $host_os in 1770b698ba48Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 1771b698ba48Smrg *) need_version=no ;; 177209885543Smrg esac 177309885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 177409885543Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 177509885543Smrg shlibpath_var=LD_LIBRARY_PATH 1776b698ba48Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 177709885543Smrg case $host_os in 177809885543Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 177909885543Smrg shlibpath_overrides_runpath=no 178009885543Smrg ;; 178109885543Smrg *) 178209885543Smrg shlibpath_overrides_runpath=yes 178309885543Smrg ;; 178409885543Smrg esac 178509885543Smrg else 178609885543Smrg shlibpath_overrides_runpath=yes 178709885543Smrg fi 178809885543Smrg ;; 178909885543Smrg 179009885543Smrgos2*) 179109885543Smrg libname_spec='$name' 179209885543Smrg shrext_cmds=".dll" 179309885543Smrg need_lib_prefix=no 179409885543Smrg library_names_spec='$libname${shared_ext} $libname.a' 179509885543Smrg dynamic_linker='OS/2 ld.exe' 179609885543Smrg shlibpath_var=LIBPATH 179709885543Smrg ;; 179809885543Smrg 179909885543Smrgosf3* | osf4* | osf5*) 180009885543Smrg version_type=osf 180109885543Smrg need_lib_prefix=no 180209885543Smrg need_version=no 180309885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 180409885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 180509885543Smrg shlibpath_var=LD_LIBRARY_PATH 180609885543Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 180709885543Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 180809885543Smrg ;; 180909885543Smrg 18107104f784Smrgrdos*) 18117104f784Smrg dynamic_linker=no 18127104f784Smrg ;; 18137104f784Smrg 181409885543Smrgsolaris*) 181509885543Smrg version_type=linux 181609885543Smrg need_lib_prefix=no 181709885543Smrg need_version=no 181809885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 181909885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 182009885543Smrg shlibpath_var=LD_LIBRARY_PATH 182109885543Smrg shlibpath_overrides_runpath=yes 182209885543Smrg hardcode_into_libs=yes 182309885543Smrg # ldd complains unless libraries are executable 182409885543Smrg postinstall_cmds='chmod +x $lib' 182509885543Smrg ;; 182609885543Smrg 182709885543Smrgsunos4*) 182809885543Smrg version_type=sunos 182909885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 183009885543Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 183109885543Smrg shlibpath_var=LD_LIBRARY_PATH 183209885543Smrg shlibpath_overrides_runpath=yes 183309885543Smrg if test "$with_gnu_ld" = yes; then 183409885543Smrg need_lib_prefix=no 183509885543Smrg fi 183609885543Smrg need_version=yes 183709885543Smrg ;; 183809885543Smrg 183909885543Smrgsysv4 | sysv4.3*) 184009885543Smrg version_type=linux 184109885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 184209885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 184309885543Smrg shlibpath_var=LD_LIBRARY_PATH 184409885543Smrg case $host_vendor in 184509885543Smrg sni) 184609885543Smrg shlibpath_overrides_runpath=no 184709885543Smrg need_lib_prefix=no 1848b698ba48Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 184909885543Smrg runpath_var=LD_RUN_PATH 185009885543Smrg ;; 185109885543Smrg siemens) 185209885543Smrg need_lib_prefix=no 185309885543Smrg ;; 185409885543Smrg motorola) 185509885543Smrg need_lib_prefix=no 185609885543Smrg need_version=no 185709885543Smrg shlibpath_overrides_runpath=no 185809885543Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 185909885543Smrg ;; 186009885543Smrg esac 186109885543Smrg ;; 186209885543Smrg 186309885543Smrgsysv4*MP*) 186409885543Smrg if test -d /usr/nec ;then 186509885543Smrg version_type=linux 186609885543Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 186709885543Smrg soname_spec='$libname${shared_ext}.$major' 186809885543Smrg shlibpath_var=LD_LIBRARY_PATH 186909885543Smrg fi 187009885543Smrg ;; 187109885543Smrg 187209885543Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 187309885543Smrg version_type=freebsd-elf 187409885543Smrg need_lib_prefix=no 187509885543Smrg need_version=no 187609885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 187709885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 187809885543Smrg shlibpath_var=LD_LIBRARY_PATH 187909885543Smrg hardcode_into_libs=yes 188009885543Smrg if test "$with_gnu_ld" = yes; then 188109885543Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 1882b698ba48Smrg shlibpath_overrides_runpath=no 188309885543Smrg else 188409885543Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 1885b698ba48Smrg shlibpath_overrides_runpath=yes 188609885543Smrg case $host_os in 188709885543Smrg sco3.2v5*) 188809885543Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 188909885543Smrg ;; 189009885543Smrg esac 189109885543Smrg fi 189209885543Smrg sys_lib_dlsearch_path_spec='/usr/lib' 189309885543Smrg ;; 189409885543Smrg 189509885543Smrguts4*) 189609885543Smrg version_type=linux 189709885543Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 189809885543Smrg soname_spec='${libname}${release}${shared_ext}$major' 189909885543Smrg shlibpath_var=LD_LIBRARY_PATH 190009885543Smrg ;; 190109885543Smrg 190209885543Smrg*) 190309885543Smrg dynamic_linker=no 190409885543Smrg ;; 190509885543Smrgesac 190609885543SmrgAC_MSG_RESULT([$dynamic_linker]) 190709885543Smrgtest "$dynamic_linker" = no && can_build_shared=no 190809885543Smrg 1909b698ba48SmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 1910b698ba48Smrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 1911b698ba48Smrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 1912b698ba48SmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 1913b698ba48Smrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 1914b698ba48Smrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 1915b698ba48Smrg 191609885543Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 191709885543Smrgif test "$GCC" = yes; then 191809885543Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 191909885543Smrgfi 1920b698ba48Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 192109885543Smrg 192209885543Smrg 1923b698ba48Smrg# _LT_AC_TAGCONFIG 1924b698ba48Smrg# ---------------- 1925b698ba48SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 1926b698ba48Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1927b698ba48SmrgAC_ARG_WITH([tags], 1928b698ba48Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 1929b698ba48Smrg [include additional configurations @<:@automatic@:>@])], 1930b698ba48Smrg [tagnames="$withval"]) 1931b698ba48Smrg 1932b698ba48Smrgif test -f "$ltmain" && test -n "$tagnames"; then 1933b698ba48Smrg if test ! -f "${ofile}"; then 1934b698ba48Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 1935b698ba48Smrg fi 1936b698ba48Smrg 1937b698ba48Smrg if test -z "$LTCC"; then 1938b698ba48Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 1939b698ba48Smrg if test -z "$LTCC"; then 1940b698ba48Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 1941b698ba48Smrg else 1942b698ba48Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 1943b698ba48Smrg fi 1944b698ba48Smrg fi 1945b698ba48Smrg if test -z "$LTCFLAGS"; then 1946b698ba48Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 1947b698ba48Smrg fi 1948b698ba48Smrg 1949b698ba48Smrg # Extract list of available tagged configurations in $ofile. 1950b698ba48Smrg # Note that this assumes the entire list is on one line. 1951b698ba48Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 1952b698ba48Smrg 1953b698ba48Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1954b698ba48Smrg for tagname in $tagnames; do 1955b698ba48Smrg IFS="$lt_save_ifs" 1956b698ba48Smrg # Check whether tagname contains only valid characters 1957b698ba48Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 1958b698ba48Smrg "") ;; 1959b698ba48Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 1960b698ba48Smrg ;; 1961b698ba48Smrg esac 1962b698ba48Smrg 1963b698ba48Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 1964b698ba48Smrg then 1965b698ba48Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 1966b698ba48Smrg fi 1967b698ba48Smrg 1968b698ba48Smrg # Update the list of available tags. 1969b698ba48Smrg if test -n "$tagname"; then 1970b698ba48Smrg echo appending configuration tag \"$tagname\" to $ofile 1971b698ba48Smrg 1972b698ba48Smrg case $tagname in 1973b698ba48Smrg CXX) 1974b698ba48Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 1975b698ba48Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 1976b698ba48Smrg (test "X$CXX" != "Xg++"))) ; then 1977b698ba48Smrg AC_LIBTOOL_LANG_CXX_CONFIG 1978b698ba48Smrg else 1979b698ba48Smrg tagname="" 1980b698ba48Smrg fi 1981b698ba48Smrg ;; 1982b698ba48Smrg 1983b698ba48Smrg F77) 1984b698ba48Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 1985b698ba48Smrg AC_LIBTOOL_LANG_F77_CONFIG 1986b698ba48Smrg else 1987b698ba48Smrg tagname="" 1988b698ba48Smrg fi 1989b698ba48Smrg ;; 1990b698ba48Smrg 1991b698ba48Smrg GCJ) 1992b698ba48Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 1993b698ba48Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 1994b698ba48Smrg else 1995b698ba48Smrg tagname="" 1996b698ba48Smrg fi 1997b698ba48Smrg ;; 1998b698ba48Smrg 1999b698ba48Smrg RC) 2000b698ba48Smrg AC_LIBTOOL_LANG_RC_CONFIG 2001b698ba48Smrg ;; 2002b698ba48Smrg 2003b698ba48Smrg *) 2004b698ba48Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 2005b698ba48Smrg ;; 2006b698ba48Smrg esac 2007b698ba48Smrg 2008b698ba48Smrg # Append the new tag name to the list of available tags. 2009b698ba48Smrg if test -n "$tagname" ; then 2010b698ba48Smrg available_tags="$available_tags $tagname" 2011b698ba48Smrg fi 2012b698ba48Smrg fi 2013b698ba48Smrg done 2014b698ba48Smrg IFS="$lt_save_ifs" 2015b698ba48Smrg 2016b698ba48Smrg # Now substitute the updated list of available tags. 2017b698ba48Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 2018b698ba48Smrg mv "${ofile}T" "$ofile" 2019b698ba48Smrg chmod +x "$ofile" 2020b698ba48Smrg else 2021b698ba48Smrg rm -f "${ofile}T" 2022b698ba48Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 2023b698ba48Smrg fi 2024b698ba48Smrgfi 2025b698ba48Smrg])# _LT_AC_TAGCONFIG 2026b698ba48Smrg 2027b698ba48Smrg 2028b698ba48Smrg# AC_LIBTOOL_DLOPEN 2029b698ba48Smrg# ----------------- 2030b698ba48Smrg# enable checks for dlopen support 2031b698ba48SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 2032b698ba48Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 2033b698ba48Smrg])# AC_LIBTOOL_DLOPEN 2034b698ba48Smrg 2035b698ba48Smrg 2036b698ba48Smrg# AC_LIBTOOL_WIN32_DLL 2037b698ba48Smrg# -------------------- 2038b698ba48Smrg# declare package support for building win32 DLLs 2039b698ba48SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 2040b698ba48Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 2041b698ba48Smrg])# AC_LIBTOOL_WIN32_DLL 2042b698ba48Smrg 2043b698ba48Smrg 2044b698ba48Smrg# AC_ENABLE_SHARED([DEFAULT]) 2045b698ba48Smrg# --------------------------- 2046b698ba48Smrg# implement the --enable-shared flag 2047b698ba48Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2048b698ba48SmrgAC_DEFUN([AC_ENABLE_SHARED], 2049b698ba48Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 2050b698ba48SmrgAC_ARG_ENABLE([shared], 2051b698ba48Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 2052b698ba48Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 2053b698ba48Smrg [p=${PACKAGE-default} 2054b698ba48Smrg case $enableval in 2055b698ba48Smrg yes) enable_shared=yes ;; 2056b698ba48Smrg no) enable_shared=no ;; 2057b698ba48Smrg *) 2058b698ba48Smrg enable_shared=no 2059b698ba48Smrg # Look at the argument we got. We use all the common list separators. 2060b698ba48Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2061b698ba48Smrg for pkg in $enableval; do 2062b698ba48Smrg IFS="$lt_save_ifs" 2063b698ba48Smrg if test "X$pkg" = "X$p"; then 2064b698ba48Smrg enable_shared=yes 2065b698ba48Smrg fi 2066b698ba48Smrg done 2067b698ba48Smrg IFS="$lt_save_ifs" 2068b698ba48Smrg ;; 2069b698ba48Smrg esac], 2070b698ba48Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 2071b698ba48Smrg])# AC_ENABLE_SHARED 2072b698ba48Smrg 2073b698ba48Smrg 2074b698ba48Smrg# AC_DISABLE_SHARED 2075b698ba48Smrg# ----------------- 2076b698ba48Smrg# set the default shared flag to --disable-shared 2077b698ba48SmrgAC_DEFUN([AC_DISABLE_SHARED], 2078b698ba48Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2079b698ba48SmrgAC_ENABLE_SHARED(no) 2080b698ba48Smrg])# AC_DISABLE_SHARED 2081b698ba48Smrg 2082b698ba48Smrg 2083b698ba48Smrg# AC_ENABLE_STATIC([DEFAULT]) 2084b698ba48Smrg# --------------------------- 2085b698ba48Smrg# implement the --enable-static flag 2086b698ba48Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2087b698ba48SmrgAC_DEFUN([AC_ENABLE_STATIC], 2088b698ba48Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 2089b698ba48SmrgAC_ARG_ENABLE([static], 2090b698ba48Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 2091b698ba48Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 2092b698ba48Smrg [p=${PACKAGE-default} 2093b698ba48Smrg case $enableval in 2094b698ba48Smrg yes) enable_static=yes ;; 2095b698ba48Smrg no) enable_static=no ;; 2096b698ba48Smrg *) 2097b698ba48Smrg enable_static=no 2098b698ba48Smrg # Look at the argument we got. We use all the common list separators. 2099b698ba48Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2100b698ba48Smrg for pkg in $enableval; do 2101b698ba48Smrg IFS="$lt_save_ifs" 2102b698ba48Smrg if test "X$pkg" = "X$p"; then 2103b698ba48Smrg enable_static=yes 2104b698ba48Smrg fi 2105b698ba48Smrg done 2106b698ba48Smrg IFS="$lt_save_ifs" 2107b698ba48Smrg ;; 2108b698ba48Smrg esac], 2109b698ba48Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 2110b698ba48Smrg])# AC_ENABLE_STATIC 2111b698ba48Smrg 2112b698ba48Smrg 2113b698ba48Smrg# AC_DISABLE_STATIC 2114b698ba48Smrg# ----------------- 2115b698ba48Smrg# set the default static flag to --disable-static 2116b698ba48SmrgAC_DEFUN([AC_DISABLE_STATIC], 2117b698ba48Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2118b698ba48SmrgAC_ENABLE_STATIC(no) 2119b698ba48Smrg])# AC_DISABLE_STATIC 2120b698ba48Smrg 2121b698ba48Smrg 2122b698ba48Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 2123b698ba48Smrg# --------------------------------- 2124b698ba48Smrg# implement the --enable-fast-install flag 2125b698ba48Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2126b698ba48SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 2127b698ba48Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2128b698ba48SmrgAC_ARG_ENABLE([fast-install], 2129b698ba48Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2130b698ba48Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2131b698ba48Smrg [p=${PACKAGE-default} 2132b698ba48Smrg case $enableval in 2133b698ba48Smrg yes) enable_fast_install=yes ;; 2134b698ba48Smrg no) enable_fast_install=no ;; 2135b698ba48Smrg *) 2136b698ba48Smrg enable_fast_install=no 2137b698ba48Smrg # Look at the argument we got. We use all the common list separators. 2138b698ba48Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2139b698ba48Smrg for pkg in $enableval; do 2140b698ba48Smrg IFS="$lt_save_ifs" 2141b698ba48Smrg if test "X$pkg" = "X$p"; then 2142b698ba48Smrg enable_fast_install=yes 2143b698ba48Smrg fi 2144b698ba48Smrg done 2145b698ba48Smrg IFS="$lt_save_ifs" 2146b698ba48Smrg ;; 2147b698ba48Smrg esac], 2148b698ba48Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 2149b698ba48Smrg])# AC_ENABLE_FAST_INSTALL 2150b698ba48Smrg 2151b698ba48Smrg 2152b698ba48Smrg# AC_DISABLE_FAST_INSTALL 2153b698ba48Smrg# ----------------------- 2154b698ba48Smrg# set the default to --disable-fast-install 2155b698ba48SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 2156b698ba48Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2157b698ba48SmrgAC_ENABLE_FAST_INSTALL(no) 2158b698ba48Smrg])# AC_DISABLE_FAST_INSTALL 2159b698ba48Smrg 2160b698ba48Smrg 2161b698ba48Smrg# AC_LIBTOOL_PICMODE([MODE]) 2162b698ba48Smrg# -------------------------- 2163b698ba48Smrg# implement the --with-pic flag 2164b698ba48Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 2165b698ba48SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 2166b698ba48Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2167b698ba48Smrgpic_mode=ifelse($#,1,$1,default) 2168b698ba48Smrg])# AC_LIBTOOL_PICMODE 2169b698ba48Smrg 2170b698ba48Smrg 2171b698ba48Smrg# AC_PROG_EGREP 2172b698ba48Smrg# ------------- 2173b698ba48Smrg# This is predefined starting with Autoconf 2.54, so this conditional 2174b698ba48Smrg# definition can be removed once we require Autoconf 2.54 or later. 2175b698ba48Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 2176b698ba48Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 2177b698ba48Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 2178b698ba48Smrg then ac_cv_prog_egrep='grep -E' 2179b698ba48Smrg else ac_cv_prog_egrep='egrep' 2180b698ba48Smrg fi]) 2181b698ba48Smrg EGREP=$ac_cv_prog_egrep 2182b698ba48Smrg AC_SUBST([EGREP]) 2183b698ba48Smrg])]) 2184b698ba48Smrg 2185b698ba48Smrg 2186b698ba48Smrg# AC_PATH_TOOL_PREFIX 2187b698ba48Smrg# ------------------- 2188b698ba48Smrg# find a file program which can recognize shared library 2189b698ba48SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 2190b698ba48Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2191b698ba48SmrgAC_MSG_CHECKING([for $1]) 2192b698ba48SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2193b698ba48Smrg[case $MAGIC_CMD in 219409885543Smrg[[\\/*] | ?:[\\/]*]) 219509885543Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 219609885543Smrg ;; 219709885543Smrg*) 219809885543Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 219909885543Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 220009885543Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 220109885543Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 220209885543Smrgdnl not every word. This closes a longstanding sh security hole. 2203b698ba48Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 220409885543Smrg for ac_dir in $ac_dummy; do 220509885543Smrg IFS="$lt_save_ifs" 220609885543Smrg test -z "$ac_dir" && ac_dir=. 220709885543Smrg if test -f $ac_dir/$1; then 220809885543Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 220909885543Smrg if test -n "$file_magic_test_file"; then 221009885543Smrg case $deplibs_check_method in 221109885543Smrg "file_magic "*) 221209885543Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 221309885543Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 221409885543Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 221509885543Smrg $EGREP "$file_magic_regex" > /dev/null; then 221609885543Smrg : 221709885543Smrg else 2218b698ba48Smrg cat <<EOF 1>&2 221909885543Smrg 222009885543Smrg*** Warning: the command libtool uses to detect shared libraries, 222109885543Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 222209885543Smrg*** The result is that libtool may fail to recognize shared libraries 222309885543Smrg*** as such. This will affect the creation of libtool libraries that 222409885543Smrg*** depend on shared libraries, but programs linked with such libtool 222509885543Smrg*** libraries will work regardless of this problem. Nevertheless, you 222609885543Smrg*** may want to report the problem to your system manager and/or to 222709885543Smrg*** bug-libtool@gnu.org 222809885543Smrg 2229b698ba48SmrgEOF 223009885543Smrg fi ;; 223109885543Smrg esac 223209885543Smrg fi 223309885543Smrg break 223409885543Smrg fi 223509885543Smrg done 223609885543Smrg IFS="$lt_save_ifs" 223709885543Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 223809885543Smrg ;; 223909885543Smrgesac]) 224009885543SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 224109885543Smrgif test -n "$MAGIC_CMD"; then 224209885543Smrg AC_MSG_RESULT($MAGIC_CMD) 224309885543Smrgelse 224409885543Smrg AC_MSG_RESULT(no) 224509885543Smrgfi 2246b698ba48Smrg])# AC_PATH_TOOL_PREFIX 224709885543Smrg 22482ec8c4b4Smrg 2249b698ba48Smrg# AC_PATH_MAGIC 2250b698ba48Smrg# ------------- 22517104f784Smrg# find a file program which can recognize a shared library 2252b698ba48SmrgAC_DEFUN([AC_PATH_MAGIC], 2253b698ba48Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 225409885543Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 225509885543Smrg if test -n "$ac_tool_prefix"; then 2256b698ba48Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 225709885543Smrg else 225809885543Smrg MAGIC_CMD=: 225909885543Smrg fi 226009885543Smrgfi 2261b698ba48Smrg])# AC_PATH_MAGIC 226209885543Smrg 226309885543Smrg 2264b698ba48Smrg# AC_PROG_LD 226509885543Smrg# ---------- 226609885543Smrg# find the pathname to the GNU or non-GNU linker 2267b698ba48SmrgAC_DEFUN([AC_PROG_LD], 2268b698ba48Smrg[AC_ARG_WITH([gnu-ld], 2269b698ba48Smrg [AC_HELP_STRING([--with-gnu-ld], 22702ec8c4b4Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 22712ec8c4b4Smrg [test "$withval" = no || with_gnu_ld=yes], 2272b698ba48Smrg [with_gnu_ld=no]) 2273b698ba48SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 2274b698ba48SmrgAC_REQUIRE([AC_PROG_CC])dnl 2275b698ba48SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2276b698ba48SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 227709885543Smrgac_prog=ld 227809885543Smrgif test "$GCC" = yes; then 227909885543Smrg # Check if gcc -print-prog-name=ld gives a path. 228009885543Smrg AC_MSG_CHECKING([for ld used by $CC]) 228109885543Smrg case $host in 228209885543Smrg *-*-mingw*) 228309885543Smrg # gcc leaves a trailing carriage return which upsets mingw 228409885543Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 228509885543Smrg *) 228609885543Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 228709885543Smrg esac 228809885543Smrg case $ac_prog in 228909885543Smrg # Accept absolute paths. 229009885543Smrg [[\\/]]* | ?:[[\\/]]*) 229109885543Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 229209885543Smrg # Canonicalize the pathname of ld 2293b698ba48Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2294b698ba48Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2295b698ba48Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 229609885543Smrg done 229709885543Smrg test -z "$LD" && LD="$ac_prog" 229809885543Smrg ;; 229909885543Smrg "") 230009885543Smrg # If it fails, then pretend we aren't using GCC. 230109885543Smrg ac_prog=ld 230209885543Smrg ;; 230309885543Smrg *) 230409885543Smrg # If it is relative, then search for the first ld in PATH. 230509885543Smrg with_gnu_ld=unknown 230609885543Smrg ;; 230709885543Smrg esac 230809885543Smrgelif test "$with_gnu_ld" = yes; then 230909885543Smrg AC_MSG_CHECKING([for GNU ld]) 231009885543Smrgelse 231109885543Smrg AC_MSG_CHECKING([for non-GNU ld]) 231209885543Smrgfi 231309885543SmrgAC_CACHE_VAL(lt_cv_path_LD, 231409885543Smrg[if test -z "$LD"; then 231509885543Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 231609885543Smrg for ac_dir in $PATH; do 231709885543Smrg IFS="$lt_save_ifs" 231809885543Smrg test -z "$ac_dir" && ac_dir=. 231909885543Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 232009885543Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 232109885543Smrg # Check to see if the program is GNU ld. I'd rather use --version, 232209885543Smrg # but apparently some variants of GNU ld only accept -v. 232309885543Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 232409885543Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 232509885543Smrg *GNU* | *'with BFD'*) 232609885543Smrg test "$with_gnu_ld" != no && break 232709885543Smrg ;; 232809885543Smrg *) 232909885543Smrg test "$with_gnu_ld" != yes && break 233009885543Smrg ;; 233109885543Smrg esac 233209885543Smrg fi 233309885543Smrg done 233409885543Smrg IFS="$lt_save_ifs" 233509885543Smrgelse 233609885543Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 233709885543Smrgfi]) 233809885543SmrgLD="$lt_cv_path_LD" 233909885543Smrgif test -n "$LD"; then 234009885543Smrg AC_MSG_RESULT($LD) 234109885543Smrgelse 234209885543Smrg AC_MSG_RESULT(no) 234309885543Smrgfi 234409885543Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2345b698ba48SmrgAC_PROG_LD_GNU 2346b698ba48Smrg])# AC_PROG_LD 234709885543Smrg 234809885543Smrg 2349b698ba48Smrg# AC_PROG_LD_GNU 2350b698ba48Smrg# -------------- 2351b698ba48SmrgAC_DEFUN([AC_PROG_LD_GNU], 2352b698ba48Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2353b698ba48SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 235409885543Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 235509885543Smrgcase `$LD -v 2>&1 </dev/null` in 235609885543Smrg*GNU* | *'with BFD'*) 235709885543Smrg lt_cv_prog_gnu_ld=yes 235809885543Smrg ;; 235909885543Smrg*) 236009885543Smrg lt_cv_prog_gnu_ld=no 236109885543Smrg ;; 236209885543Smrgesac]) 236309885543Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2364b698ba48Smrg])# AC_PROG_LD_GNU 236509885543Smrg 236609885543Smrg 2367b698ba48Smrg# AC_PROG_LD_RELOAD_FLAG 2368b698ba48Smrg# ---------------------- 236909885543Smrg# find reload flag for linker 237009885543Smrg# -- PORTME Some linkers may need a different reload flag. 2371b698ba48SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 237209885543Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 237309885543Smrg lt_cv_ld_reload_flag, 237409885543Smrg [lt_cv_ld_reload_flag='-r']) 237509885543Smrgreload_flag=$lt_cv_ld_reload_flag 237609885543Smrgcase $reload_flag in 237709885543Smrg"" | " "*) ;; 237809885543Smrg*) reload_flag=" $reload_flag" ;; 237909885543Smrgesac 238009885543Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 238109885543Smrgcase $host_os in 238209885543Smrg darwin*) 238309885543Smrg if test "$GCC" = yes; then 238409885543Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 238509885543Smrg else 238609885543Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 238709885543Smrg fi 238809885543Smrg ;; 238909885543Smrgesac 2390b698ba48Smrg])# AC_PROG_LD_RELOAD_FLAG 239109885543Smrg 239209885543Smrg 2393b698ba48Smrg# AC_DEPLIBS_CHECK_METHOD 2394b698ba48Smrg# ----------------------- 239509885543Smrg# how to check for library dependencies 239609885543Smrg# -- PORTME fill in with the dynamic library characteristics 2397b698ba48SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2398b698ba48Smrg[AC_CACHE_CHECK([how to recognize dependent libraries], 239909885543Smrglt_cv_deplibs_check_method, 240009885543Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 240109885543Smrglt_cv_file_magic_test_file= 240209885543Smrglt_cv_deplibs_check_method='unknown' 240309885543Smrg# Need to set the preceding variable on all platforms that support 240409885543Smrg# interlibrary dependencies. 240509885543Smrg# 'none' -- dependencies not supported. 240609885543Smrg# `unknown' -- same as none, but documents that we really don't know. 240709885543Smrg# 'pass_all' -- all dependencies passed with no checks. 240809885543Smrg# 'test_compile' -- check by making test program. 240909885543Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 241009885543Smrg# which responds to the $file_magic_cmd with a given extended regex. 241109885543Smrg# If you have `file' or equivalent on your system and you're not sure 241209885543Smrg# whether `pass_all' will *always* work, you probably want this one. 241309885543Smrg 241409885543Smrgcase $host_os in 24157104f784Smrgaix[[4-9]]*) 241609885543Smrg lt_cv_deplibs_check_method=pass_all 241709885543Smrg ;; 241809885543Smrg 241909885543Smrgbeos*) 242009885543Smrg lt_cv_deplibs_check_method=pass_all 242109885543Smrg ;; 242209885543Smrg 242309885543Smrgbsdi[[45]]*) 242409885543Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 242509885543Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 242609885543Smrg lt_cv_file_magic_test_file=/shlib/libc.so 242709885543Smrg ;; 242809885543Smrg 242909885543Smrgcygwin*) 243009885543Smrg # func_win32_libid is a shell function defined in ltmain.sh 243109885543Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 243209885543Smrg lt_cv_file_magic_cmd='func_win32_libid' 243309885543Smrg ;; 243409885543Smrg 243509885543Smrgmingw* | pw32*) 243609885543Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 24377104f784Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 24387104f784Smrg # unless we find 'file', for example because we are cross-compiling. 24397104f784Smrg if ( file / ) >/dev/null 2>&1; then 24407104f784Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 24417104f784Smrg lt_cv_file_magic_cmd='func_win32_libid' 24427104f784Smrg else 24437104f784Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 24447104f784Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 24457104f784Smrg fi 244609885543Smrg ;; 244709885543Smrg 244809885543Smrgdarwin* | rhapsody*) 244909885543Smrg lt_cv_deplibs_check_method=pass_all 245009885543Smrg ;; 245109885543Smrg 245209885543Smrgfreebsd* | dragonfly*) 2453b698ba48Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 245409885543Smrg case $host_cpu in 245509885543Smrg i*86 ) 245609885543Smrg # Not sure whether the presence of OpenBSD here was a mistake. 245709885543Smrg # Let's accept both of them until this is cleared up. 245809885543Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 245909885543Smrg lt_cv_file_magic_cmd=/usr/bin/file 246009885543Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 246109885543Smrg ;; 246209885543Smrg esac 246309885543Smrg else 246409885543Smrg lt_cv_deplibs_check_method=pass_all 246509885543Smrg fi 246609885543Smrg ;; 246709885543Smrg 246809885543Smrggnu*) 246909885543Smrg lt_cv_deplibs_check_method=pass_all 247009885543Smrg ;; 247109885543Smrg 247209885543Smrghpux10.20* | hpux11*) 247309885543Smrg lt_cv_file_magic_cmd=/usr/bin/file 247409885543Smrg case $host_cpu in 247509885543Smrg ia64*) 247609885543Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 247709885543Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 247809885543Smrg ;; 247909885543Smrg hppa*64*) 248009885543Smrg [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]'] 248109885543Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 248209885543Smrg ;; 248309885543Smrg *) 248409885543Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 248509885543Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 248609885543Smrg ;; 248709885543Smrg esac 248809885543Smrg ;; 248909885543Smrg 24907104f784Smrginterix[[3-9]]*) 249109885543Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 249209885543Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 249309885543Smrg ;; 249409885543Smrg 249509885543Smrgirix5* | irix6* | nonstopux*) 249609885543Smrg case $LD in 249709885543Smrg *-32|*"-32 ") libmagic=32-bit;; 249809885543Smrg *-n32|*"-n32 ") libmagic=N32;; 249909885543Smrg *-64|*"-64 ") libmagic=64-bit;; 250009885543Smrg *) libmagic=never-match;; 250109885543Smrg esac 250209885543Smrg lt_cv_deplibs_check_method=pass_all 250309885543Smrg ;; 250409885543Smrg 250509885543Smrg# This must be Linux ELF. 250609885543Smrglinux* | k*bsd*-gnu) 250709885543Smrg lt_cv_deplibs_check_method=pass_all 250809885543Smrg ;; 250909885543Smrg 25107104f784Smrgnetbsd*) 2511b698ba48Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 251209885543Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 251309885543Smrg else 251409885543Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 251509885543Smrg fi 251609885543Smrg ;; 251709885543Smrg 251809885543Smrgnewos6*) 251909885543Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 252009885543Smrg lt_cv_file_magic_cmd=/usr/bin/file 252109885543Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 252209885543Smrg ;; 252309885543Smrg 2524b698ba48Smrgnto-qnx*) 2525b698ba48Smrg lt_cv_deplibs_check_method=unknown 252609885543Smrg ;; 252709885543Smrg 252809885543Smrgopenbsd*) 2529b698ba48Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 253009885543Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 253109885543Smrg else 253209885543Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 253309885543Smrg fi 253409885543Smrg ;; 253509885543Smrg 253609885543Smrgosf3* | osf4* | osf5*) 253709885543Smrg lt_cv_deplibs_check_method=pass_all 253809885543Smrg ;; 253909885543Smrg 25407104f784Smrgrdos*) 25417104f784Smrg lt_cv_deplibs_check_method=pass_all 25427104f784Smrg ;; 25437104f784Smrg 254409885543Smrgsolaris*) 254509885543Smrg lt_cv_deplibs_check_method=pass_all 254609885543Smrg ;; 254709885543Smrg 254809885543Smrgsysv4 | sysv4.3*) 254909885543Smrg case $host_vendor in 255009885543Smrg motorola) 255109885543Smrg 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]]' 255209885543Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 255309885543Smrg ;; 255409885543Smrg ncr) 255509885543Smrg lt_cv_deplibs_check_method=pass_all 255609885543Smrg ;; 255709885543Smrg sequent) 255809885543Smrg lt_cv_file_magic_cmd='/bin/file' 255909885543Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 256009885543Smrg ;; 256109885543Smrg sni) 256209885543Smrg lt_cv_file_magic_cmd='/bin/file' 256309885543Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 256409885543Smrg lt_cv_file_magic_test_file=/lib/libc.so 256509885543Smrg ;; 256609885543Smrg siemens) 256709885543Smrg lt_cv_deplibs_check_method=pass_all 256809885543Smrg ;; 256909885543Smrg pc) 257009885543Smrg lt_cv_deplibs_check_method=pass_all 257109885543Smrg ;; 257209885543Smrg esac 257309885543Smrg ;; 257409885543Smrg 2575b698ba48Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 257609885543Smrg lt_cv_deplibs_check_method=pass_all 257709885543Smrg ;; 257809885543Smrgesac 257909885543Smrg]) 258009885543Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 258109885543Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 258209885543Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 2583b698ba48Smrg])# AC_DEPLIBS_CHECK_METHOD 258409885543Smrg 258509885543Smrg 2586b698ba48Smrg# AC_PROG_NM 258709885543Smrg# ---------- 2588b698ba48Smrg# find the pathname to a BSD-compatible name lister 2589b698ba48SmrgAC_DEFUN([AC_PROG_NM], 2590b698ba48Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 259109885543Smrg[if test -n "$NM"; then 259209885543Smrg # Let the user override the test. 259309885543Smrg lt_cv_path_NM="$NM" 259409885543Smrgelse 259509885543Smrg lt_nm_to_check="${ac_tool_prefix}nm" 25967104f784Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 259709885543Smrg lt_nm_to_check="$lt_nm_to_check nm" 259809885543Smrg fi 259909885543Smrg for lt_tmp_nm in $lt_nm_to_check; do 260009885543Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 260109885543Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 260209885543Smrg IFS="$lt_save_ifs" 260309885543Smrg test -z "$ac_dir" && ac_dir=. 260409885543Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 260509885543Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 260609885543Smrg # Check to see if the nm accepts a BSD-compat flag. 260709885543Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 260809885543Smrg # nm: unknown option "B" ignored 260909885543Smrg # Tru64's nm complains that /dev/null is an invalid object file 261009885543Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 261109885543Smrg */dev/null* | *'Invalid file or object type'*) 261209885543Smrg lt_cv_path_NM="$tmp_nm -B" 261309885543Smrg break 261409885543Smrg ;; 261509885543Smrg *) 261609885543Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 261709885543Smrg */dev/null*) 261809885543Smrg lt_cv_path_NM="$tmp_nm -p" 261909885543Smrg break 262009885543Smrg ;; 262109885543Smrg *) 262209885543Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 262309885543Smrg continue # so that we can try to find one that supports BSD flags 262409885543Smrg ;; 262509885543Smrg esac 262609885543Smrg ;; 262709885543Smrg esac 262809885543Smrg fi 262909885543Smrg done 263009885543Smrg IFS="$lt_save_ifs" 263109885543Smrg done 2632b698ba48Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 263309885543Smrgfi]) 2634b698ba48SmrgNM="$lt_cv_path_NM" 2635b698ba48Smrg])# AC_PROG_NM 263609885543Smrg 26372ec8c4b4Smrg 2638b698ba48Smrg# AC_CHECK_LIBM 2639b698ba48Smrg# ------------- 264009885543Smrg# check for math library 2641b698ba48SmrgAC_DEFUN([AC_CHECK_LIBM], 264209885543Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 264309885543SmrgLIBM= 264409885543Smrgcase $host in 264509885543Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 264609885543Smrg # These system don't have libm, or don't need it 264709885543Smrg ;; 264809885543Smrg*-ncr-sysv4.3*) 264909885543Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 265009885543Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 265109885543Smrg ;; 265209885543Smrg*) 265309885543Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 265409885543Smrg ;; 265509885543Smrgesac 2656b698ba48Smrg])# AC_CHECK_LIBM 265709885543Smrg 265809885543Smrg 2659b698ba48Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 2660b698ba48Smrg# ----------------------------------- 2661b698ba48Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 2662b698ba48Smrg# LTDLINCL to the include flags for the libltdl header and adds 2663b698ba48Smrg# --enable-ltdl-convenience to the configure arguments. Note that 2664b698ba48Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2665b698ba48Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 2666b698ba48Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 2667b698ba48Smrg# (note the single quotes!). If your package is not flat and you're not 2668b698ba48Smrg# using automake, define top_builddir and top_srcdir appropriately in 2669b698ba48Smrg# the Makefiles. 2670b698ba48SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 2671b698ba48Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2672b698ba48Smrg case $enable_ltdl_convenience in 2673b698ba48Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2674b698ba48Smrg "") enable_ltdl_convenience=yes 2675b698ba48Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2676b698ba48Smrg esac 2677b698ba48Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2678b698ba48Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2679b698ba48Smrg # For backwards non-gettext consistent compatibility... 2680b698ba48Smrg INCLTDL="$LTDLINCL" 2681b698ba48Smrg])# AC_LIBLTDL_CONVENIENCE 268209885543Smrg 268309885543Smrg 2684b698ba48Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 2685b698ba48Smrg# ----------------------------------- 2686b698ba48Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 2687b698ba48Smrg# LTDLINCL to the include flags for the libltdl header and adds 2688b698ba48Smrg# --enable-ltdl-install to the configure arguments. Note that 2689b698ba48Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2690b698ba48Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 2691b698ba48Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 2692b698ba48Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 2693b698ba48Smrg# flat and you're not using automake, define top_builddir and top_srcdir 2694b698ba48Smrg# appropriately in the Makefiles. 2695b698ba48Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2696b698ba48SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 2697b698ba48Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2698b698ba48Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 2699b698ba48Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2700b698ba48Smrg [if test x"$enable_ltdl_install" = xno; then 2701b698ba48Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 2702b698ba48Smrg else 2703b698ba48Smrg enable_ltdl_install=yes 2704b698ba48Smrg fi 2705b698ba48Smrg ]) 2706b698ba48Smrg if test x"$enable_ltdl_install" = x"yes"; then 2707b698ba48Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 2708b698ba48Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2709b698ba48Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2710b698ba48Smrg else 2711b698ba48Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2712b698ba48Smrg LIBLTDL="-lltdl" 2713b698ba48Smrg LTDLINCL= 2714b698ba48Smrg fi 2715b698ba48Smrg # For backwards non-gettext consistent compatibility... 2716b698ba48Smrg INCLTDL="$LTDLINCL" 2717b698ba48Smrg])# AC_LIBLTDL_INSTALLABLE 271809885543Smrg 271909885543Smrg 2720b698ba48Smrg# AC_LIBTOOL_CXX 2721b698ba48Smrg# -------------- 2722b698ba48Smrg# enable support for C++ libraries 2723b698ba48SmrgAC_DEFUN([AC_LIBTOOL_CXX], 2724b698ba48Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 2725b698ba48Smrg])# AC_LIBTOOL_CXX 272609885543Smrg 272709885543Smrg 2728b698ba48Smrg# _LT_AC_LANG_CXX 2729b698ba48Smrg# --------------- 2730b698ba48SmrgAC_DEFUN([_LT_AC_LANG_CXX], 2731b698ba48Smrg[AC_REQUIRE([AC_PROG_CXX]) 2732b698ba48SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2733b698ba48Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 2734b698ba48Smrg])# _LT_AC_LANG_CXX 273509885543Smrg 2736b698ba48Smrg# _LT_AC_PROG_CXXCPP 2737b698ba48Smrg# ------------------ 2738b698ba48SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 273909885543Smrg[ 2740b698ba48SmrgAC_REQUIRE([AC_PROG_CXX]) 2741b698ba48Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 2742b698ba48Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 2743b698ba48Smrg (test "X$CXX" != "Xg++"))) ; then 2744b698ba48Smrg AC_PROG_CXXCPP 2745b698ba48Smrgfi 2746b698ba48Smrg])# _LT_AC_PROG_CXXCPP 274709885543Smrg 2748b698ba48Smrg# AC_LIBTOOL_F77 2749b698ba48Smrg# -------------- 2750b698ba48Smrg# enable support for Fortran 77 libraries 2751b698ba48SmrgAC_DEFUN([AC_LIBTOOL_F77], 2752b698ba48Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 2753b698ba48Smrg])# AC_LIBTOOL_F77 275409885543Smrg 275509885543Smrg 2756b698ba48Smrg# _LT_AC_LANG_F77 2757b698ba48Smrg# --------------- 2758b698ba48SmrgAC_DEFUN([_LT_AC_LANG_F77], 2759b698ba48Smrg[AC_REQUIRE([AC_PROG_F77]) 2760b698ba48Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 2761b698ba48Smrg])# _LT_AC_LANG_F77 276209885543Smrg 276309885543Smrg 2764b698ba48Smrg# AC_LIBTOOL_GCJ 2765b698ba48Smrg# -------------- 2766b698ba48Smrg# enable support for GCJ libraries 2767b698ba48SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 2768b698ba48Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 2769b698ba48Smrg])# AC_LIBTOOL_GCJ 277009885543Smrg 277109885543Smrg 2772b698ba48Smrg# _LT_AC_LANG_GCJ 2773b698ba48Smrg# --------------- 2774b698ba48SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 2775b698ba48Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 2776b698ba48Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 2777b698ba48Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 2778b698ba48Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 2779b698ba48Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 2780b698ba48Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 2781b698ba48Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 2782b698ba48Smrg])# _LT_AC_LANG_GCJ 2783b698ba48Smrg 2784b698ba48Smrg 2785b698ba48Smrg# AC_LIBTOOL_RC 2786b698ba48Smrg# ------------- 2787b698ba48Smrg# enable support for Windows resource files 2788b698ba48SmrgAC_DEFUN([AC_LIBTOOL_RC], 2789b698ba48Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 2790b698ba48Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 2791b698ba48Smrg])# AC_LIBTOOL_RC 279209885543Smrg 279309885543Smrg 2794b698ba48Smrg# AC_LIBTOOL_LANG_C_CONFIG 2795b698ba48Smrg# ------------------------ 2796b698ba48Smrg# Ensure that the configuration vars for the C compiler are 2797b698ba48Smrg# suitably defined. Those variables are subsequently used by 2798b698ba48Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2799b698ba48SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 2800b698ba48SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 2801b698ba48Smrg[lt_save_CC="$CC" 2802b698ba48SmrgAC_LANG_PUSH(C) 280309885543Smrg 2804b698ba48Smrg# Source file extension for C test sources. 2805b698ba48Smrgac_ext=c 2806b698ba48Smrg 2807b698ba48Smrg# Object file extension for compiled C test sources. 2808b698ba48Smrgobjext=o 2809b698ba48Smrg_LT_AC_TAGVAR(objext, $1)=$objext 2810b698ba48Smrg 2811b698ba48Smrg# Code to be used in simple compile tests 2812b698ba48Smrglt_simple_compile_test_code="int some_variable = 0;" 2813b698ba48Smrg 2814b698ba48Smrg# Code to be used in simple link tests 2815b698ba48Smrglt_simple_link_test_code='int main(){return(0);}' 2816b698ba48Smrg 2817b698ba48Smrg_LT_AC_SYS_COMPILER 2818b698ba48Smrg 2819b698ba48Smrg# save warnings/boilerplate of simple test code 2820b698ba48Smrg_LT_COMPILER_BOILERPLATE 2821b698ba48Smrg_LT_LINKER_BOILERPLATE 2822b698ba48Smrg 2823b698ba48SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 2824b698ba48SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 2825b698ba48SmrgAC_LIBTOOL_PROG_CC_C_O($1) 2826b698ba48SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 2827b698ba48SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 2828b698ba48SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 2829b698ba48SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 2830b698ba48SmrgAC_LIBTOOL_SYS_LIB_STRIP 2831b698ba48SmrgAC_LIBTOOL_DLOPEN_SELF 2832b698ba48Smrg 2833b698ba48Smrg# Report which library types will actually be built 2834b698ba48SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 2835b698ba48SmrgAC_MSG_RESULT([$can_build_shared]) 2836b698ba48Smrg 2837b698ba48SmrgAC_MSG_CHECKING([whether to build shared libraries]) 2838b698ba48Smrgtest "$can_build_shared" = "no" && enable_shared=no 2839b698ba48Smrg 2840b698ba48Smrg# On AIX, shared libraries and static libraries use the same namespace, and 2841b698ba48Smrg# are all built from PIC. 2842b698ba48Smrgcase $host_os in 2843b698ba48Smrgaix3*) 2844b698ba48Smrg test "$enable_shared" = yes && enable_static=no 2845b698ba48Smrg if test -n "$RANLIB"; then 2846b698ba48Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 2847b698ba48Smrg postinstall_cmds='$RANLIB $lib' 28482ec8c4b4Smrg fi 2849b698ba48Smrg ;; 285009885543Smrg 2851b698ba48Smrgaix[[4-9]]*) 2852b698ba48Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 2853b698ba48Smrg test "$enable_shared" = yes && enable_static=no 2854b698ba48Smrg fi 2855b698ba48Smrg ;; 2856b698ba48Smrgesac 2857b698ba48SmrgAC_MSG_RESULT([$enable_shared]) 285809885543Smrg 2859b698ba48SmrgAC_MSG_CHECKING([whether to build static libraries]) 2860b698ba48Smrg# Make sure either enable_shared or enable_static is yes. 2861b698ba48Smrgtest "$enable_shared" = yes || enable_static=yes 2862b698ba48SmrgAC_MSG_RESULT([$enable_static]) 286309885543Smrg 2864b698ba48SmrgAC_LIBTOOL_CONFIG($1) 286509885543Smrg 2866b698ba48SmrgAC_LANG_POP 2867b698ba48SmrgCC="$lt_save_CC" 2868b698ba48Smrg])# AC_LIBTOOL_LANG_C_CONFIG 286909885543Smrg 287009885543Smrg 2871b698ba48Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 2872b698ba48Smrg# -------------------------- 2873b698ba48Smrg# Ensure that the configuration vars for the C compiler are 2874b698ba48Smrg# suitably defined. Those variables are subsequently used by 2875b698ba48Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2876b698ba48SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 2877b698ba48SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 2878b698ba48Smrg[AC_LANG_PUSH(C++) 2879b698ba48SmrgAC_REQUIRE([AC_PROG_CXX]) 2880b698ba48SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2881b698ba48Smrg 2882b698ba48Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2883b698ba48Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 2884b698ba48Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 2885b698ba48Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 2886b698ba48Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 2887b698ba48Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 2888b698ba48Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 2889b698ba48Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 2890b698ba48Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2891b698ba48Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 2892b698ba48Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2893b698ba48Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 2894b698ba48Smrg_LT_AC_TAGVAR(module_cmds, $1)= 2895b698ba48Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 2896b698ba48Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 2897b698ba48Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 2898b698ba48Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 2899b698ba48Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2900b698ba48Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 290109885543Smrg 2902b698ba48Smrg# Dependencies to place before and after the object being linked: 2903b698ba48Smrg_LT_AC_TAGVAR(predep_objects, $1)= 2904b698ba48Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 2905b698ba48Smrg_LT_AC_TAGVAR(predeps, $1)= 2906b698ba48Smrg_LT_AC_TAGVAR(postdeps, $1)= 2907b698ba48Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 2908b698ba48Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 290909885543Smrg 2910b698ba48Smrg# Source file extension for C++ test sources. 2911b698ba48Smrgac_ext=cpp 291209885543Smrg 2913b698ba48Smrg# Object file extension for compiled C++ test sources. 2914b698ba48Smrgobjext=o 2915b698ba48Smrg_LT_AC_TAGVAR(objext, $1)=$objext 2916b698ba48Smrg 2917b698ba48Smrg# Code to be used in simple compile tests 2918b698ba48Smrglt_simple_compile_test_code="int some_variable = 0;" 2919b698ba48Smrg 2920b698ba48Smrg# Code to be used in simple link tests 2921b698ba48Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 2922b698ba48Smrg 2923b698ba48Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 2924b698ba48Smrg_LT_AC_SYS_COMPILER 2925b698ba48Smrg 2926b698ba48Smrg# save warnings/boilerplate of simple test code 2927b698ba48Smrg_LT_COMPILER_BOILERPLATE 2928b698ba48Smrg_LT_LINKER_BOILERPLATE 2929b698ba48Smrg 2930b698ba48Smrg# Allow CC to be a program name with arguments. 2931b698ba48Smrglt_save_CC=$CC 2932b698ba48Smrglt_save_LD=$LD 2933b698ba48Smrglt_save_GCC=$GCC 2934b698ba48SmrgGCC=$GXX 2935b698ba48Smrglt_save_with_gnu_ld=$with_gnu_ld 2936b698ba48Smrglt_save_path_LD=$lt_cv_path_LD 2937b698ba48Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 2938b698ba48Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 2939b698ba48Smrgelse 2940b698ba48Smrg $as_unset lt_cv_prog_gnu_ld 2941b698ba48Smrgfi 2942b698ba48Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 2943b698ba48Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 2944b698ba48Smrgelse 2945b698ba48Smrg $as_unset lt_cv_path_LD 2946b698ba48Smrgfi 2947b698ba48Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 2948b698ba48SmrgCC=${CXX-"c++"} 2949b698ba48Smrgcompiler=$CC 2950b698ba48Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 2951b698ba48Smrg_LT_CC_BASENAME([$compiler]) 2952b698ba48Smrg 2953b698ba48Smrg# We don't want -fno-exception wen compiling C++ code, so set the 2954b698ba48Smrg# no_builtin_flag separately 2955b698ba48Smrgif test "$GXX" = yes; then 2956b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 2957b698ba48Smrgelse 2958b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 2959b698ba48Smrgfi 2960b698ba48Smrg 2961b698ba48Smrgif test "$GXX" = yes; then 2962b698ba48Smrg # Set up default GNU C++ configuration 2963b698ba48Smrg 2964b698ba48Smrg AC_PROG_LD 2965b698ba48Smrg 2966b698ba48Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 2967b698ba48Smrg # archiving commands below assume that GNU ld is being used. 2968b698ba48Smrg if test "$with_gnu_ld" = yes; then 2969b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 2970b698ba48Smrg _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' 2971b698ba48Smrg 2972b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 2973b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 2974b698ba48Smrg 2975b698ba48Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 2976b698ba48Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 2977b698ba48Smrg # investigate it a little bit more. (MM) 2978b698ba48Smrg wlarc='${wl}' 2979b698ba48Smrg 2980b698ba48Smrg # ancient GNU ld didn't support --whole-archive et. al. 2981b698ba48Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 2982b698ba48Smrg grep 'no-whole-archive' > /dev/null; then 2983b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 298409885543Smrg else 2985b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 298609885543Smrg fi 298709885543Smrg else 2988b698ba48Smrg with_gnu_ld=no 2989b698ba48Smrg wlarc= 2990b698ba48Smrg 2991b698ba48Smrg # A generic and very simple default shared library creation 2992b698ba48Smrg # command for GNU C++ for the case where it uses the native 2993b698ba48Smrg # linker, instead of GNU ld. If possible, this setting should 2994b698ba48Smrg # overridden to take advantage of the native linker features on 2995b698ba48Smrg # the platform it is being used on. 2996b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 299709885543Smrg fi 299809885543Smrg 2999b698ba48Smrg # Commands to make compiler produce verbose output that lists 3000b698ba48Smrg # what "hidden" libraries, object files and flags are used when 3001b698ba48Smrg # linking a shared library. 3002b698ba48Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3003b698ba48Smrg 300409885543Smrgelse 3005b698ba48Smrg GXX=no 3006b698ba48Smrg with_gnu_ld=no 3007b698ba48Smrg wlarc= 300809885543Smrgfi 300909885543Smrg 3010b698ba48Smrg# PORTME: fill in a description of your system's C++ link characteristics 3011b698ba48SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 3012b698ba48Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 3013b698ba48Smrgcase $host_os in 3014b698ba48Smrg aix3*) 3015b698ba48Smrg # FIXME: insert proper C++ library support 3016b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3017b698ba48Smrg ;; 3018b698ba48Smrg aix[[4-9]]*) 3019b698ba48Smrg if test "$host_cpu" = ia64; then 3020b698ba48Smrg # On IA64, the linker does run time linking by default, so we don't 3021b698ba48Smrg # have to do anything special. 3022b698ba48Smrg aix_use_runtimelinking=no 3023b698ba48Smrg exp_sym_flag='-Bexport' 3024b698ba48Smrg no_entry_flag="" 3025b698ba48Smrg else 3026b698ba48Smrg aix_use_runtimelinking=no 3027b698ba48Smrg 3028b698ba48Smrg # Test if we are trying to use run time linking or normal 3029b698ba48Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 3030b698ba48Smrg # need to do runtime linking. 3031b698ba48Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 3032b698ba48Smrg for ld_flag in $LDFLAGS; do 3033b698ba48Smrg case $ld_flag in 3034b698ba48Smrg *-brtl*) 3035b698ba48Smrg aix_use_runtimelinking=yes 3036b698ba48Smrg break 3037b698ba48Smrg ;; 3038b698ba48Smrg esac 3039b698ba48Smrg done 3040b698ba48Smrg ;; 3041b698ba48Smrg esac 304209885543Smrg 3043b698ba48Smrg exp_sym_flag='-bexport' 3044b698ba48Smrg no_entry_flag='-bnoentry' 3045b698ba48Smrg fi 304609885543Smrg 3047b698ba48Smrg # When large executables or shared objects are built, AIX ld can 3048b698ba48Smrg # have problems creating the table of contents. If linking a library 3049b698ba48Smrg # or program results in "error TOC overflow" add -mminimal-toc to 3050b698ba48Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 3051b698ba48Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 305209885543Smrg 3053b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 3054b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3055b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3056b698ba48Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 305709885543Smrg 3058b698ba48Smrg if test "$GXX" = yes; then 3059b698ba48Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 3060b698ba48Smrg # We only want to do this on AIX 4.2 and lower, the check 3061b698ba48Smrg # below for broken collect2 doesn't work under 4.3+ 3062b698ba48Smrg collect2name=`${CC} -print-prog-name=collect2` 3063b698ba48Smrg if test -f "$collect2name" && \ 3064b698ba48Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 3065b698ba48Smrg then 3066b698ba48Smrg # We have reworked collect2 3067b698ba48Smrg : 3068b698ba48Smrg else 3069b698ba48Smrg # We have old collect2 3070b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 3071b698ba48Smrg # It fails to find uninstalled libraries when the uninstalled 3072b698ba48Smrg # path is not listed in the libpath. Setting hardcode_minus_L 3073b698ba48Smrg # to unsupported forces relinking 3074b698ba48Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 3075b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3076b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3077b698ba48Smrg fi 3078b698ba48Smrg ;; 3079b698ba48Smrg esac 3080b698ba48Smrg shared_flag='-shared' 3081b698ba48Smrg if test "$aix_use_runtimelinking" = yes; then 3082b698ba48Smrg shared_flag="$shared_flag "'${wl}-G' 3083b698ba48Smrg fi 3084b698ba48Smrg else 3085b698ba48Smrg # not using gcc 308609885543Smrg if test "$host_cpu" = ia64; then 3087b698ba48Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 3088b698ba48Smrg # chokes on -Wl,-G. The following line is correct: 3089b698ba48Smrg shared_flag='-G' 3090b698ba48Smrg else 3091b698ba48Smrg if test "$aix_use_runtimelinking" = yes; then 3092b698ba48Smrg shared_flag='${wl}-G' 3093b698ba48Smrg else 3094b698ba48Smrg shared_flag='${wl}-bM:SRE' 3095b698ba48Smrg fi 3096b698ba48Smrg fi 3097b698ba48Smrg fi 3098b698ba48Smrg 3099b698ba48Smrg # It seems that -bexpall does not export symbols beginning with 3100b698ba48Smrg # underscore (_), so it is better to generate a list of symbols to export. 3101b698ba48Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 3102b698ba48Smrg if test "$aix_use_runtimelinking" = yes; then 3103b698ba48Smrg # Warning - without using the other runtime loading flags (-brtl), 3104b698ba48Smrg # -berok will link without error, but may produce a broken library. 3105b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 3106b698ba48Smrg # Determine the default libpath from the value encoded in an empty executable. 3107b698ba48Smrg _LT_AC_SYS_LIBPATH_AIX 3108b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3109b698ba48Smrg 3110b698ba48Smrg _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" 3111b698ba48Smrg else 3112b698ba48Smrg if test "$host_cpu" = ia64; then 3113b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 3114b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 3115b698ba48Smrg _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" 3116b698ba48Smrg else 3117b698ba48Smrg # Determine the default libpath from the value encoded in an empty executable. 3118b698ba48Smrg _LT_AC_SYS_LIBPATH_AIX 3119b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3120b698ba48Smrg # Warning - without using the other run time loading flags, 3121b698ba48Smrg # -berok will link without error, but may produce a broken library. 3122b698ba48Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 3123b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 3124b698ba48Smrg # Exported symbols can be pulled into shared objects from archives 3125b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 3126b698ba48Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 3127b698ba48Smrg # This is similar to how AIX traditionally builds its shared libraries. 3128b698ba48Smrg _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' 3129b698ba48Smrg fi 3130b698ba48Smrg fi 3131b698ba48Smrg ;; 3132b698ba48Smrg 3133b698ba48Smrg beos*) 3134b698ba48Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 3135b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3136b698ba48Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 3137b698ba48Smrg # support --undefined. This deserves some investigation. FIXME 3138b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3139b698ba48Smrg else 3140b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3141b698ba48Smrg fi 3142b698ba48Smrg ;; 3143b698ba48Smrg 3144b698ba48Smrg chorus*) 3145b698ba48Smrg case $cc_basename in 3146b698ba48Smrg *) 3147b698ba48Smrg # FIXME: insert proper C++ library support 3148b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3149b698ba48Smrg ;; 3150b698ba48Smrg esac 3151b698ba48Smrg ;; 3152b698ba48Smrg 3153b698ba48Smrg cygwin* | mingw* | pw32*) 3154b698ba48Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 3155b698ba48Smrg # as there is no search path for DLLs. 3156b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3157b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3158b698ba48Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 3159b698ba48Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 3160b698ba48Smrg 3161b698ba48Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 3162b698ba48Smrg _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' 3163b698ba48Smrg # If the export-symbols file already is a .def file (1st line 3164b698ba48Smrg # is EXPORTS), use it as is; otherwise, prepend... 3165b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 3166b698ba48Smrg cp $export_symbols $output_objdir/$soname.def; 3167b698ba48Smrg else 3168b698ba48Smrg echo EXPORTS > $output_objdir/$soname.def; 3169b698ba48Smrg cat $export_symbols >> $output_objdir/$soname.def; 3170b698ba48Smrg fi~ 3171b698ba48Smrg $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' 3172b698ba48Smrg else 3173b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3174b698ba48Smrg fi 3175b698ba48Smrg ;; 3176b698ba48Smrg darwin* | rhapsody*) 3177b698ba48Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3178b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3179b698ba48Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 3180b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3181b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 3182b698ba48Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3183b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3184b698ba48Smrg if test "$GXX" = yes ; then 3185b698ba48Smrg output_verbose_link_cmd='echo' 3186b698ba48Smrg _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}" 3187b698ba48Smrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3188b698ba48Smrg _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}" 3189b698ba48Smrg _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}" 3190b698ba48Smrg if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3191b698ba48Smrg _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}" 3192b698ba48Smrg _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}" 3193b698ba48Smrg fi 3194b698ba48Smrg else 3195b698ba48Smrg case $cc_basename in 3196b698ba48Smrg xlc*) 3197b698ba48Smrg output_verbose_link_cmd='echo' 3198b698ba48Smrg _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' 3199b698ba48Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3200b698ba48Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3201b698ba48Smrg _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}' 3202b698ba48Smrg _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}' 3203b698ba48Smrg ;; 3204b698ba48Smrg *) 3205b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3206b698ba48Smrg ;; 3207b698ba48Smrg esac 3208b698ba48Smrg fi 3209b698ba48Smrg ;; 3210b698ba48Smrg 3211b698ba48Smrg dgux*) 3212b698ba48Smrg case $cc_basename in 3213b698ba48Smrg ec++*) 3214b698ba48Smrg # FIXME: insert proper C++ library support 3215b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3216b698ba48Smrg ;; 3217b698ba48Smrg ghcx*) 3218b698ba48Smrg # Green Hills C++ Compiler 3219b698ba48Smrg # FIXME: insert proper C++ library support 3220b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3221b698ba48Smrg ;; 3222b698ba48Smrg *) 3223b698ba48Smrg # FIXME: insert proper C++ library support 3224b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3225b698ba48Smrg ;; 3226b698ba48Smrg esac 3227b698ba48Smrg ;; 3228b698ba48Smrg freebsd[[12]]*) 3229b698ba48Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 3230b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3231b698ba48Smrg ;; 3232b698ba48Smrg freebsd-elf*) 3233b698ba48Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3234b698ba48Smrg ;; 3235b698ba48Smrg freebsd* | dragonfly*) 3236b698ba48Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 3237b698ba48Smrg # conventions 3238b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 3239b698ba48Smrg ;; 3240b698ba48Smrg gnu*) 3241b698ba48Smrg ;; 3242b698ba48Smrg hpux9*) 3243b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3244b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3245b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3246b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3247b698ba48Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3248b698ba48Smrg # but as the default 3249b698ba48Smrg # location of the library. 3250b698ba48Smrg 3251b698ba48Smrg case $cc_basename in 3252b698ba48Smrg CC*) 3253b698ba48Smrg # FIXME: insert proper C++ library support 3254b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3255b698ba48Smrg ;; 3256b698ba48Smrg aCC*) 3257b698ba48Smrg _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' 3258b698ba48Smrg # Commands to make compiler produce verbose output that lists 3259b698ba48Smrg # what "hidden" libraries, object files and flags are used when 3260b698ba48Smrg # linking a shared library. 3261b698ba48Smrg # 3262b698ba48Smrg # There doesn't appear to be a way to prevent this compiler from 3263b698ba48Smrg # explicitly linking system object files so we need to strip them 3264b698ba48Smrg # from the output so that they don't get included in the library 3265b698ba48Smrg # dependencies. 3266b698ba48Smrg 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' 3267b698ba48Smrg ;; 3268b698ba48Smrg *) 3269b698ba48Smrg if test "$GXX" = yes; then 3270b698ba48Smrg _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' 3271b698ba48Smrg else 3272b698ba48Smrg # FIXME: insert proper C++ library support 3273b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 327409885543Smrg fi 32752ec8c4b4Smrg ;; 3276b698ba48Smrg esac 3277b698ba48Smrg ;; 3278b698ba48Smrg hpux10*|hpux11*) 3279b698ba48Smrg if test $with_gnu_ld = no; then 3280b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3281b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 328209885543Smrg 32832ec8c4b4Smrg case $host_cpu in 3284b698ba48Smrg hppa*64*|ia64*) ;; 3285b698ba48Smrg *) 3286b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 328709885543Smrg ;; 32882ec8c4b4Smrg esac 3289b698ba48Smrg fi 3290b698ba48Smrg case $host_cpu in 3291b698ba48Smrg hppa*64*|ia64*) 3292b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3293b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3294b698ba48Smrg ;; 3295b698ba48Smrg *) 3296b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3297b698ba48Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3298b698ba48Smrg # but as the default 3299b698ba48Smrg # location of the library. 33002ec8c4b4Smrg ;; 3301b698ba48Smrg esac 330209885543Smrg 3303b698ba48Smrg case $cc_basename in 3304b698ba48Smrg CC*) 3305b698ba48Smrg # FIXME: insert proper C++ library support 3306b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 330709885543Smrg ;; 3308b698ba48Smrg aCC*) 3309b698ba48Smrg case $host_cpu in 3310b698ba48Smrg hppa*64*) 3311b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3312b698ba48Smrg ;; 3313b698ba48Smrg ia64*) 3314b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3315b698ba48Smrg ;; 3316b698ba48Smrg *) 3317b698ba48Smrg _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' 331809885543Smrg ;; 331909885543Smrg esac 3320b698ba48Smrg # Commands to make compiler produce verbose output that lists 3321b698ba48Smrg # what "hidden" libraries, object files and flags are used when 3322b698ba48Smrg # linking a shared library. 3323b698ba48Smrg # 3324b698ba48Smrg # There doesn't appear to be a way to prevent this compiler from 3325b698ba48Smrg # explicitly linking system object files so we need to strip them 3326b698ba48Smrg # from the output so that they don't get included in the library 3327b698ba48Smrg # dependencies. 3328b698ba48Smrg 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' 332909885543Smrg ;; 3330b698ba48Smrg *) 3331b698ba48Smrg if test "$GXX" = yes; then 3332b698ba48Smrg if test $with_gnu_ld = no; then 333309885543Smrg case $host_cpu in 3334b698ba48Smrg hppa*64*) 3335b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3336b698ba48Smrg ;; 3337b698ba48Smrg ia64*) 3338b698ba48Smrg _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' 333909885543Smrg ;; 334009885543Smrg *) 3341b698ba48Smrg _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' 334209885543Smrg ;; 334309885543Smrg esac 3344b698ba48Smrg fi 3345b698ba48Smrg else 3346b698ba48Smrg # FIXME: insert proper C++ library support 3347b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3348b698ba48Smrg fi 334909885543Smrg ;; 3350b698ba48Smrg esac 3351b698ba48Smrg ;; 3352b698ba48Smrg interix[[3-9]]*) 3353b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3354b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3355b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3356b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3357b698ba48Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 3358b698ba48Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 3359b698ba48Smrg # default) and relocated if they conflict, which is a slow very memory 3360b698ba48Smrg # consuming and fragmenting process. To avoid this, we pick a random, 3361b698ba48Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 3362b698ba48Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 3363b698ba48Smrg _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' 3364b698ba48Smrg _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' 3365b698ba48Smrg ;; 3366b698ba48Smrg irix5* | irix6*) 3367b698ba48Smrg case $cc_basename in 3368b698ba48Smrg CC*) 3369b698ba48Smrg # SGI C++ 3370b698ba48Smrg _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' 3371b698ba48Smrg 3372b698ba48Smrg # Archives containing C++ object files must be created using 3373b698ba48Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 3374b698ba48Smrg # necessary to make sure instantiated templates are included 3375b698ba48Smrg # in the archive. 3376b698ba48Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 337709885543Smrg ;; 3378b698ba48Smrg *) 3379b698ba48Smrg if test "$GXX" = yes; then 3380b698ba48Smrg if test "$with_gnu_ld" = no; then 3381b698ba48Smrg _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' 3382b698ba48Smrg else 3383b698ba48Smrg _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' 3384b698ba48Smrg fi 3385b698ba48Smrg fi 3386b698ba48Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3387b698ba48Smrg ;; 3388b698ba48Smrg esac 3389b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3390b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3391b698ba48Smrg ;; 3392b698ba48Smrg linux* | k*bsd*-gnu) 3393b698ba48Smrg case $cc_basename in 3394b698ba48Smrg KCC*) 3395b698ba48Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3396b698ba48Smrg 3397b698ba48Smrg # KCC will only create a shared library if the output file 3398b698ba48Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3399b698ba48Smrg # to its proper name (with version) after linking. 3400b698ba48Smrg _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' 3401b698ba48Smrg _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' 3402b698ba48Smrg # Commands to make compiler produce verbose output that lists 3403b698ba48Smrg # what "hidden" libraries, object files and flags are used when 3404b698ba48Smrg # linking a shared library. 3405b698ba48Smrg # 3406b698ba48Smrg # There doesn't appear to be a way to prevent this compiler from 3407b698ba48Smrg # explicitly linking system object files so we need to strip them 3408b698ba48Smrg # from the output so that they don't get included in the library 3409b698ba48Smrg # dependencies. 3410b698ba48Smrg 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' 3411b698ba48Smrg 3412b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 3413b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3414b698ba48Smrg 3415b698ba48Smrg # Archives containing C++ object files must be created using 3416b698ba48Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3417b698ba48Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3418b698ba48Smrg ;; 3419b698ba48Smrg icpc*) 3420b698ba48Smrg # Intel C++ 3421b698ba48Smrg with_gnu_ld=yes 3422b698ba48Smrg # version 8.0 and above of icpc choke on multiply defined symbols 3423b698ba48Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 3424b698ba48Smrg # earlier do not add the objects themselves. 3425b698ba48Smrg case `$CC -V 2>&1` in 3426b698ba48Smrg *"Version 7."*) 3427b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3428b698ba48Smrg _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' 3429b698ba48Smrg ;; 3430b698ba48Smrg *) # Version 8.0 or newer 3431b698ba48Smrg tmp_idyn= 3432b698ba48Smrg case $host_cpu in 3433b698ba48Smrg ia64*) tmp_idyn=' -i_dynamic';; 3434b698ba48Smrg esac 3435b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3436b698ba48Smrg _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' 3437b698ba48Smrg ;; 34387104f784Smrg esac 3439b698ba48Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3440b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3441b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3442b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 34437104f784Smrg ;; 3444b698ba48Smrg pgCC* | pgcpp*) 3445b698ba48Smrg # Portland Group C++ compiler 3446b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 3447b698ba48Smrg _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' 3448b698ba48Smrg 3449b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3450b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3451b698ba48Smrg _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' 3452b698ba48Smrg ;; 3453b698ba48Smrg cxx*) 3454b698ba48Smrg # Compaq C++ 3455b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3456b698ba48Smrg _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' 3457b698ba48Smrg 3458b698ba48Smrg runpath_var=LD_RUN_PATH 3459b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3460b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3461b698ba48Smrg 3462b698ba48Smrg # Commands to make compiler produce verbose output that lists 3463b698ba48Smrg # what "hidden" libraries, object files and flags are used when 3464b698ba48Smrg # linking a shared library. 3465b698ba48Smrg # 3466b698ba48Smrg # There doesn't appear to be a way to prevent this compiler from 3467b698ba48Smrg # explicitly linking system object files so we need to strip them 3468b698ba48Smrg # from the output so that they don't get included in the library 3469b698ba48Smrg # dependencies. 3470b698ba48Smrg 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' 3471b698ba48Smrg ;; 3472b698ba48Smrg *) 3473b698ba48Smrg case `$CC -V 2>&1 | sed 5q` in 3474b698ba48Smrg *Sun\ C*) 3475b698ba48Smrg # Sun C++ 5.9 3476b698ba48Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3477b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3478b698ba48Smrg _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' 3479b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3480b698ba48Smrg _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' 3481b698ba48Smrg 3482b698ba48Smrg # Not sure whether something based on 3483b698ba48Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 3484b698ba48Smrg # would be better. 3485b698ba48Smrg output_verbose_link_cmd='echo' 3486b698ba48Smrg 3487b698ba48Smrg # Archives containing C++ object files must be created using 3488b698ba48Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 3489b698ba48Smrg # necessary to make sure instantiated templates are included 3490b698ba48Smrg # in the archive. 3491b698ba48Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3492b698ba48Smrg ;; 34932ec8c4b4Smrg esac 349409885543Smrg ;; 3495b698ba48Smrg esac 3496b698ba48Smrg ;; 3497b698ba48Smrg lynxos*) 3498b698ba48Smrg # FIXME: insert proper C++ library support 3499b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3500b698ba48Smrg ;; 3501b698ba48Smrg m88k*) 3502b698ba48Smrg # FIXME: insert proper C++ library support 3503b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3504b698ba48Smrg ;; 3505b698ba48Smrg mvs*) 3506b698ba48Smrg case $cc_basename in 3507b698ba48Smrg cxx*) 3508b698ba48Smrg # FIXME: insert proper C++ library support 3509b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 351009885543Smrg ;; 3511b698ba48Smrg *) 3512b698ba48Smrg # FIXME: insert proper C++ library support 3513b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 351409885543Smrg ;; 3515b698ba48Smrg esac 3516b698ba48Smrg ;; 3517b698ba48Smrg netbsd*) 3518b698ba48Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3519b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 3520b698ba48Smrg wlarc= 3521b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3522b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3523b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3524b698ba48Smrg fi 3525b698ba48Smrg # Workaround some broken pre-1.5 toolchains 3526b698ba48Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 3527b698ba48Smrg ;; 3528b698ba48Smrg openbsd2*) 3529b698ba48Smrg # C++ shared libraries are fairly broken 3530b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3531b698ba48Smrg ;; 3532b698ba48Smrg openbsd*) 3533b698ba48Smrg if test -f /usr/libexec/ld.so; then 3534b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3535b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3536b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3537b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3538b698ba48Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3539b698ba48Smrg _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' 3540b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3541b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3542b698ba48Smrg fi 3543b698ba48Smrg output_verbose_link_cmd='echo' 3544b698ba48Smrg else 3545b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3546b698ba48Smrg fi 3547b698ba48Smrg ;; 3548b698ba48Smrg osf3*) 3549b698ba48Smrg case $cc_basename in 3550b698ba48Smrg KCC*) 3551b698ba48Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3552b698ba48Smrg 3553b698ba48Smrg # KCC will only create a shared library if the output file 3554b698ba48Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3555b698ba48Smrg # to its proper name (with version) after linking. 3556b698ba48Smrg _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' 3557b698ba48Smrg 3558b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3559b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3560b698ba48Smrg 3561b698ba48Smrg # Archives containing C++ object files must be created using 3562b698ba48Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3563b698ba48Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3564b698ba48Smrg 356509885543Smrg ;; 3566b698ba48Smrg RCC*) 3567b698ba48Smrg # Rational C++ 2.4.1 3568b698ba48Smrg # FIXME: insert proper C++ library support 3569b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 357009885543Smrg ;; 3571b698ba48Smrg cxx*) 3572b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3573b698ba48Smrg _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' 3574b698ba48Smrg 3575b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3576b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3577b698ba48Smrg 3578b698ba48Smrg # Commands to make compiler produce verbose output that lists 3579b698ba48Smrg # what "hidden" libraries, object files and flags are used when 3580b698ba48Smrg # linking a shared library. 3581b698ba48Smrg # 3582b698ba48Smrg # There doesn't appear to be a way to prevent this compiler from 3583b698ba48Smrg # explicitly linking system object files so we need to strip them 3584b698ba48Smrg # from the output so that they don't get included in the library 3585b698ba48Smrg # dependencies. 3586b698ba48Smrg 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' 358709885543Smrg ;; 3588b698ba48Smrg *) 3589b698ba48Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3590b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3591b698ba48Smrg _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' 3592b698ba48Smrg 3593b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3594b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3595b698ba48Smrg 3596b698ba48Smrg # Commands to make compiler produce verbose output that lists 3597b698ba48Smrg # what "hidden" libraries, object files and flags are used when 3598b698ba48Smrg # linking a shared library. 3599b698ba48Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3600b698ba48Smrg 3601b698ba48Smrg else 3602b698ba48Smrg # FIXME: insert proper C++ library support 3603b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3604b698ba48Smrg fi 360509885543Smrg ;; 3606b698ba48Smrg esac 3607b698ba48Smrg ;; 3608b698ba48Smrg osf4* | osf5*) 3609b698ba48Smrg case $cc_basename in 3610b698ba48Smrg KCC*) 3611b698ba48Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3612b698ba48Smrg 3613b698ba48Smrg # KCC will only create a shared library if the output file 3614b698ba48Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3615b698ba48Smrg # to its proper name (with version) after linking. 3616b698ba48Smrg _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' 3617b698ba48Smrg 3618b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3619b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3620b698ba48Smrg 3621b698ba48Smrg # Archives containing C++ object files must be created using 3622b698ba48Smrg # the KAI C++ compiler. 3623b698ba48Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 362409885543Smrg ;; 3625b698ba48Smrg RCC*) 3626b698ba48Smrg # Rational C++ 2.4.1 3627b698ba48Smrg # FIXME: insert proper C++ library support 3628b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 362909885543Smrg ;; 3630b698ba48Smrg cxx*) 3631b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 3632b698ba48Smrg _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' 3633b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 3634b698ba48Smrg echo "-hidden">> $lib.exp~ 3635b698ba48Smrg $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~ 3636b698ba48Smrg $rm $lib.exp' 3637b698ba48Smrg 3638b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3639b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3640b698ba48Smrg 3641b698ba48Smrg # Commands to make compiler produce verbose output that lists 3642b698ba48Smrg # what "hidden" libraries, object files and flags are used when 3643b698ba48Smrg # linking a shared library. 3644b698ba48Smrg # 3645b698ba48Smrg # There doesn't appear to be a way to prevent this compiler from 3646b698ba48Smrg # explicitly linking system object files so we need to strip them 3647b698ba48Smrg # from the output so that they don't get included in the library 3648b698ba48Smrg # dependencies. 3649b698ba48Smrg 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' 365009885543Smrg ;; 3651b698ba48Smrg *) 3652b698ba48Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3653b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3654b698ba48Smrg _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' 3655b698ba48Smrg 3656b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3657b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3658b698ba48Smrg 3659b698ba48Smrg # Commands to make compiler produce verbose output that lists 3660b698ba48Smrg # what "hidden" libraries, object files and flags are used when 3661b698ba48Smrg # linking a shared library. 3662b698ba48Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3663b698ba48Smrg 3664b698ba48Smrg else 3665b698ba48Smrg # FIXME: insert proper C++ library support 3666b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3667b698ba48Smrg fi 3668b698ba48Smrg ;; 3669b698ba48Smrg esac 3670b698ba48Smrg ;; 3671b698ba48Smrg psos*) 3672b698ba48Smrg # FIXME: insert proper C++ library support 3673b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3674b698ba48Smrg ;; 3675b698ba48Smrg sunos4*) 3676b698ba48Smrg case $cc_basename in 3677b698ba48Smrg CC*) 3678b698ba48Smrg # Sun C++ 4.x 3679b698ba48Smrg # FIXME: insert proper C++ library support 3680b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3681b698ba48Smrg ;; 3682b698ba48Smrg lcc*) 3683b698ba48Smrg # Lucid 3684b698ba48Smrg # FIXME: insert proper C++ library support 3685b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3686b698ba48Smrg ;; 3687b698ba48Smrg *) 3688b698ba48Smrg # FIXME: insert proper C++ library support 3689b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3690b698ba48Smrg ;; 3691b698ba48Smrg esac 3692b698ba48Smrg ;; 3693b698ba48Smrg solaris*) 3694b698ba48Smrg case $cc_basename in 3695b698ba48Smrg CC*) 3696b698ba48Smrg # Sun C++ 4.2, 5.x and Centerline C++ 3697b698ba48Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 3698b698ba48Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3699b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3700b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3701b698ba48Smrg $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' 3702b698ba48Smrg 3703b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3704b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3705b698ba48Smrg case $host_os in 3706b698ba48Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 37072ec8c4b4Smrg *) 3708b698ba48Smrg # The compiler driver will combine and reorder linker options, 3709b698ba48Smrg # but understands `-z linker_flag'. 3710b698ba48Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 3711b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 37122ec8c4b4Smrg ;; 37132ec8c4b4Smrg esac 3714b698ba48Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3715b698ba48Smrg 3716b698ba48Smrg output_verbose_link_cmd='echo' 3717b698ba48Smrg 3718b698ba48Smrg # Archives containing C++ object files must be created using 3719b698ba48Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 3720b698ba48Smrg # necessary to make sure instantiated templates are included 3721b698ba48Smrg # in the archive. 3722b698ba48Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 372309885543Smrg ;; 3724b698ba48Smrg gcx*) 3725b698ba48Smrg # Green Hills C++ Compiler 3726b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3727b698ba48Smrg 3728b698ba48Smrg # The C++ compiler must be used to create the archive. 3729b698ba48Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 373009885543Smrg ;; 373109885543Smrg *) 3732b698ba48Smrg # GNU C++ compiler with Solaris linker 3733b698ba48Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3734b698ba48Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 3735b698ba48Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 3736b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3737b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3738b698ba48Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 373909885543Smrg 3740b698ba48Smrg # Commands to make compiler produce verbose output that lists 3741b698ba48Smrg # what "hidden" libraries, object files and flags are used when 3742b698ba48Smrg # linking a shared library. 3743b698ba48Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3744b698ba48Smrg else 3745b698ba48Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 3746b698ba48Smrg # platform. 3747b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3748b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3749b698ba48Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 375009885543Smrg 3751b698ba48Smrg # Commands to make compiler produce verbose output that lists 3752b698ba48Smrg # what "hidden" libraries, object files and flags are used when 3753b698ba48Smrg # linking a shared library. 3754b698ba48Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3755b698ba48Smrg fi 375609885543Smrg 3757b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 3758b698ba48Smrg case $host_os in 3759b698ba48Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3760b698ba48Smrg *) 3761b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 3762b698ba48Smrg ;; 3763b698ba48Smrg esac 3764b698ba48Smrg fi 3765b698ba48Smrg ;; 3766b698ba48Smrg esac 3767b698ba48Smrg ;; 3768b698ba48Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 3769b698ba48Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3770b698ba48Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3771b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3772b698ba48Smrg runpath_var='LD_RUN_PATH' 3773b698ba48Smrg 3774b698ba48Smrg case $cc_basename in 3775b698ba48Smrg CC*) 3776b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3777b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37782ec8c4b4Smrg ;; 37792ec8c4b4Smrg *) 3780b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3781b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37822ec8c4b4Smrg ;; 37832ec8c4b4Smrg esac 3784b698ba48Smrg ;; 3785b698ba48Smrg sysv5* | sco3.2v5* | sco5v6*) 3786b698ba48Smrg # Note: We can NOT use -z defs as we might desire, because we do not 3787b698ba48Smrg # link with -lc, and that would cause any symbols used from libc to 3788b698ba48Smrg # always be unresolved, which means just about no library would 3789b698ba48Smrg # ever link correctly. If we're not using GNU ld we use -z text 3790b698ba48Smrg # though, which does catch some bad symbols but isn't as heavy-handed 3791b698ba48Smrg # as -z defs. 3792b698ba48Smrg # For security reasons, it is highly recommended that you always 3793b698ba48Smrg # use absolute paths for naming shared libraries, and exclude the 3794b698ba48Smrg # DT_RUNPATH tag from executables and libraries. But doing so 3795b698ba48Smrg # requires that you compile everything twice, which is a pain. 3796b698ba48Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 3797b698ba48Smrg # non-empty value in the environment. Most likely only useful for 3798b698ba48Smrg # creating official distributions of packages. 3799b698ba48Smrg # This is a hack until libtool officially supports absolute path 3800b698ba48Smrg # names for shared libraries. 3801b698ba48Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3802b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 3803b698ba48Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3804b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3805b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 3806b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3807b698ba48Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3808b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 3809b698ba48Smrg runpath_var='LD_RUN_PATH' 3810b698ba48Smrg 3811b698ba48Smrg case $cc_basename in 3812b698ba48Smrg CC*) 3813b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3814b698ba48Smrg _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' 38152ec8c4b4Smrg ;; 38162ec8c4b4Smrg *) 3817b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3818b698ba48Smrg _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' 38192ec8c4b4Smrg ;; 3820b698ba48Smrg esac 3821b698ba48Smrg ;; 3822b698ba48Smrg tandem*) 3823b698ba48Smrg case $cc_basename in 3824b698ba48Smrg NCC*) 3825b698ba48Smrg # NonStop-UX NCC 3.20 3826b698ba48Smrg # FIXME: insert proper C++ library support 3827b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 38282ec8c4b4Smrg ;; 38292ec8c4b4Smrg *) 3830b698ba48Smrg # FIXME: insert proper C++ library support 3831b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 38322ec8c4b4Smrg ;; 3833b698ba48Smrg esac 3834b698ba48Smrg ;; 3835b698ba48Smrg vxworks*) 3836b698ba48Smrg # FIXME: insert proper C++ library support 3837b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3838b698ba48Smrg ;; 3839b698ba48Smrg *) 3840b698ba48Smrg # FIXME: insert proper C++ library support 3841b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3842b698ba48Smrg ;; 3843b698ba48Smrgesac 3844b698ba48SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 3845b698ba48Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 384609885543Smrg 3847b698ba48Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 3848b698ba48Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 38497104f784Smrg 3850b698ba48SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 3851b698ba48SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 3852b698ba48SmrgAC_LIBTOOL_PROG_CC_C_O($1) 3853b698ba48SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3854b698ba48SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 3855b698ba48SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3856b698ba48SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 385709885543Smrg 3858b698ba48SmrgAC_LIBTOOL_CONFIG($1) 38597104f784Smrg 3860b698ba48SmrgAC_LANG_POP 3861b698ba48SmrgCC=$lt_save_CC 3862b698ba48SmrgLDCXX=$LD 3863b698ba48SmrgLD=$lt_save_LD 3864b698ba48SmrgGCC=$lt_save_GCC 3865b698ba48Smrgwith_gnu_ldcxx=$with_gnu_ld 3866b698ba48Smrgwith_gnu_ld=$lt_save_with_gnu_ld 3867b698ba48Smrglt_cv_path_LDCXX=$lt_cv_path_LD 3868b698ba48Smrglt_cv_path_LD=$lt_save_path_LD 3869b698ba48Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 3870b698ba48Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 3871b698ba48Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 3872b698ba48Smrg 3873b698ba48Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 3874b698ba48Smrg# ------------------------------------ 3875b698ba48Smrg# Figure out "hidden" library dependencies from verbose 3876b698ba48Smrg# compiler output when linking a shared library. 3877b698ba48Smrg# Parse the compiler output and extract the necessary 3878b698ba48Smrg# objects, libraries and library flags. 3879b698ba48SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 3880b698ba48Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 3881b698ba48Smrgdnl we can't use the lt_simple_compile_test_code here, 3882b698ba48Smrgdnl because it contains code intended for an executable, 3883b698ba48Smrgdnl not a library. It's possible we should let each 3884b698ba48Smrgdnl tag define a new lt_????_link_test_code variable, 3885b698ba48Smrgdnl but it's only used here... 3886b698ba48Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 3887b698ba48Smrgint a; 3888b698ba48Smrgvoid foo (void) { a = 0; } 3889b698ba48SmrgEOF 3890b698ba48Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 3891b698ba48Smrgclass Foo 3892b698ba48Smrg{ 3893b698ba48Smrgpublic: 3894b698ba48Smrg Foo (void) { a = 0; } 3895b698ba48Smrgprivate: 3896b698ba48Smrg int a; 3897b698ba48Smrg}; 3898b698ba48SmrgEOF 3899b698ba48Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 3900b698ba48Smrg subroutine foo 3901b698ba48Smrg implicit none 3902b698ba48Smrg integer*4 a 3903b698ba48Smrg a=0 3904b698ba48Smrg return 3905b698ba48Smrg end 3906b698ba48SmrgEOF 3907b698ba48Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 3908b698ba48Smrgpublic class foo { 3909b698ba48Smrg private int a; 3910b698ba48Smrg public void bar (void) { 3911b698ba48Smrg a = 0; 3912b698ba48Smrg } 3913b698ba48Smrg}; 3914b698ba48SmrgEOF 3915b698ba48Smrg]) 3916b698ba48Smrgdnl Parse the compiler output and extract the necessary 3917b698ba48Smrgdnl objects, libraries and library flags. 3918b698ba48Smrgif AC_TRY_EVAL(ac_compile); then 3919b698ba48Smrg # Parse the compiler output and extract the necessary 3920b698ba48Smrg # objects, libraries and library flags. 39217104f784Smrg 3922b698ba48Smrg # Sentinel used to keep track of whether or not we are before 3923b698ba48Smrg # the conftest object file. 3924b698ba48Smrg pre_test_object_deps_done=no 392509885543Smrg 3926b698ba48Smrg # The `*' in the case matches for architectures that use `case' in 3927b698ba48Smrg # $output_verbose_cmd can trigger glob expansion during the loop 3928b698ba48Smrg # eval without this substitution. 3929b698ba48Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 393009885543Smrg 3931b698ba48Smrg for p in `eval $output_verbose_link_cmd`; do 3932b698ba48Smrg case $p in 393309885543Smrg 3934b698ba48Smrg -L* | -R* | -l*) 3935b698ba48Smrg # Some compilers place space between "-{L,R}" and the path. 3936b698ba48Smrg # Remove the space. 3937b698ba48Smrg if test $p = "-L" \ 3938b698ba48Smrg || test $p = "-R"; then 3939b698ba48Smrg prev=$p 3940b698ba48Smrg continue 3941b698ba48Smrg else 3942b698ba48Smrg prev= 3943b698ba48Smrg fi 394409885543Smrg 3945b698ba48Smrg if test "$pre_test_object_deps_done" = no; then 3946b698ba48Smrg case $p in 3947b698ba48Smrg -L* | -R*) 3948b698ba48Smrg # Internal compiler library paths should come after those 3949b698ba48Smrg # provided the user. The postdeps already come after the 3950b698ba48Smrg # user supplied libs so there is no need to process them. 3951b698ba48Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 3952b698ba48Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 3953b698ba48Smrg else 3954b698ba48Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 3955b698ba48Smrg fi 3956b698ba48Smrg ;; 3957b698ba48Smrg # The "-l" case would never come before the object being 3958b698ba48Smrg # linked, so don't bother handling this case. 3959b698ba48Smrg esac 3960b698ba48Smrg else 3961b698ba48Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 3962b698ba48Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 3963b698ba48Smrg else 3964b698ba48Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 3965b698ba48Smrg fi 3966b698ba48Smrg fi 3967b698ba48Smrg ;; 396809885543Smrg 3969b698ba48Smrg *.$objext) 3970b698ba48Smrg # This assumes that the test object file only shows up 3971b698ba48Smrg # once in the compiler output. 3972b698ba48Smrg if test "$p" = "conftest.$objext"; then 3973b698ba48Smrg pre_test_object_deps_done=yes 3974b698ba48Smrg continue 3975b698ba48Smrg fi 397609885543Smrg 3977b698ba48Smrg if test "$pre_test_object_deps_done" = no; then 3978b698ba48Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 3979b698ba48Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 3980b698ba48Smrg else 3981b698ba48Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 3982b698ba48Smrg fi 3983b698ba48Smrg else 3984b698ba48Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 3985b698ba48Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 3986b698ba48Smrg else 3987b698ba48Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 3988b698ba48Smrg fi 3989b698ba48Smrg fi 3990b698ba48Smrg ;; 3991b698ba48Smrg 3992b698ba48Smrg *) ;; # Ignore the rest. 399309885543Smrg 39942ec8c4b4Smrg esac 3995b698ba48Smrg done 399609885543Smrg 3997b698ba48Smrg # Clean up. 3998b698ba48Smrg rm -f a.out a.exe 3999b698ba48Smrgelse 4000b698ba48Smrg echo "libtool.m4: error: problem compiling $1 test program" 40012ec8c4b4Smrgfi 400209885543Smrg 4003b698ba48Smrg$rm -f confest.$objext 400409885543Smrg 4005b698ba48Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 4006b698ba48Smrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 4007b698ba48Smrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 4008b698ba48Smrgfi 400909885543Smrg 4010b698ba48Smrg# PORTME: override above test on systems where it is broken 4011b698ba48Smrgifelse([$1],[CXX], 4012b698ba48Smrg[case $host_os in 4013b698ba48Smrginterix[[3-9]]*) 4014b698ba48Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 4015b698ba48Smrg # hack all around it, let's just trust "g++" to DTRT. 4016b698ba48Smrg _LT_AC_TAGVAR(predep_objects,$1)= 4017b698ba48Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 4018b698ba48Smrg _LT_AC_TAGVAR(postdeps,$1)= 4019b698ba48Smrg ;; 4020b698ba48Smrg 4021b698ba48Smrglinux*) 4022b698ba48Smrg case `$CC -V 2>&1 | sed 5q` in 4023b698ba48Smrg *Sun\ C*) 4024b698ba48Smrg # Sun C++ 5.9 4025b698ba48Smrg # 4026b698ba48Smrg # The more standards-conforming stlport4 library is 4027b698ba48Smrg # incompatible with the Cstd library. Avoid specifying 4028b698ba48Smrg # it if it's in CXXFLAGS. Ignore libCrun as 4029b698ba48Smrg # -library=stlport4 depends on it. 4030b698ba48Smrg case " $CXX $CXXFLAGS " in 4031b698ba48Smrg *" -library=stlport4 "*) 4032b698ba48Smrg solaris_use_stlport4=yes 4033b698ba48Smrg ;; 4034b698ba48Smrg esac 4035b698ba48Smrg if test "$solaris_use_stlport4" != yes; then 4036b698ba48Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 40372ec8c4b4Smrg fi 40382ec8c4b4Smrg ;; 40392ec8c4b4Smrg esac 4040b698ba48Smrg ;; 404109885543Smrg 4042b698ba48Smrgsolaris*) 4043b698ba48Smrg case $cc_basename in 4044b698ba48Smrg CC*) 4045b698ba48Smrg # The more standards-conforming stlport4 library is 4046b698ba48Smrg # incompatible with the Cstd library. Avoid specifying 4047b698ba48Smrg # it if it's in CXXFLAGS. Ignore libCrun as 4048b698ba48Smrg # -library=stlport4 depends on it. 4049b698ba48Smrg case " $CXX $CXXFLAGS " in 4050b698ba48Smrg *" -library=stlport4 "*) 4051b698ba48Smrg solaris_use_stlport4=yes 4052b698ba48Smrg ;; 4053b698ba48Smrg esac 4054b698ba48Smrg 4055b698ba48Smrg # Adding this requires a known-good setup of shared libraries for 4056b698ba48Smrg # Sun compiler versions before 5.6, else PIC objects from an old 4057b698ba48Smrg # archive will be linked into the output, leading to subtle bugs. 4058b698ba48Smrg if test "$solaris_use_stlport4" != yes; then 4059b698ba48Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 40602ec8c4b4Smrg fi 40612ec8c4b4Smrg ;; 40622ec8c4b4Smrg esac 4063b698ba48Smrg ;; 4064b698ba48Smrgesac 4065b698ba48Smrg]) 4066b698ba48Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 4067b698ba48Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 4068b698ba48Smrgesac 4069b698ba48Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 407009885543Smrg 4071b698ba48Smrg# AC_LIBTOOL_LANG_F77_CONFIG 4072b698ba48Smrg# -------------------------- 4073b698ba48Smrg# Ensure that the configuration vars for the C compiler are 4074b698ba48Smrg# suitably defined. Those variables are subsequently used by 4075b698ba48Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4076b698ba48SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 4077b698ba48SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 4078b698ba48Smrg[AC_REQUIRE([AC_PROG_F77]) 4079b698ba48SmrgAC_LANG_PUSH(Fortran 77) 408009885543Smrg 4081b698ba48Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4082b698ba48Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4083b698ba48Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 4084b698ba48Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4085b698ba48Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4086b698ba48Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 4087b698ba48Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4088b698ba48Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4089b698ba48Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4090b698ba48Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4091b698ba48Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4092b698ba48Smrg_LT_AC_TAGVAR(module_cmds, $1)= 4093b698ba48Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4094b698ba48Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4095b698ba48Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4096b698ba48Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 4097b698ba48Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4098b698ba48Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 409909885543Smrg 4100b698ba48Smrg# Source file extension for f77 test sources. 4101b698ba48Smrgac_ext=f 410209885543Smrg 4103b698ba48Smrg# Object file extension for compiled f77 test sources. 4104b698ba48Smrgobjext=o 4105b698ba48Smrg_LT_AC_TAGVAR(objext, $1)=$objext 410609885543Smrg 4107b698ba48Smrg# Code to be used in simple compile tests 4108b698ba48Smrglt_simple_compile_test_code="\ 4109b698ba48Smrg subroutine t 4110b698ba48Smrg return 4111b698ba48Smrg end 4112b698ba48Smrg" 411309885543Smrg 4114b698ba48Smrg# Code to be used in simple link tests 4115b698ba48Smrglt_simple_link_test_code="\ 4116b698ba48Smrg program t 4117b698ba48Smrg end 4118b698ba48Smrg" 411909885543Smrg 4120b698ba48Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4121b698ba48Smrg_LT_AC_SYS_COMPILER 412209885543Smrg 4123b698ba48Smrg# save warnings/boilerplate of simple test code 4124b698ba48Smrg_LT_COMPILER_BOILERPLATE 4125b698ba48Smrg_LT_LINKER_BOILERPLATE 412609885543Smrg 4127b698ba48Smrg# Allow CC to be a program name with arguments. 4128b698ba48Smrglt_save_CC="$CC" 4129b698ba48SmrgCC=${F77-"f77"} 4130b698ba48Smrgcompiler=$CC 4131b698ba48Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 4132b698ba48Smrg_LT_CC_BASENAME([$compiler]) 413309885543Smrg 4134b698ba48SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 4135b698ba48SmrgAC_MSG_RESULT([$can_build_shared]) 413609885543Smrg 4137b698ba48SmrgAC_MSG_CHECKING([whether to build shared libraries]) 4138b698ba48Smrgtest "$can_build_shared" = "no" && enable_shared=no 413909885543Smrg 4140b698ba48Smrg# On AIX, shared libraries and static libraries use the same namespace, and 4141b698ba48Smrg# are all built from PIC. 4142b698ba48Smrgcase $host_os in 4143b698ba48Smrgaix3*) 4144b698ba48Smrg test "$enable_shared" = yes && enable_static=no 4145b698ba48Smrg if test -n "$RANLIB"; then 4146b698ba48Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 4147b698ba48Smrg postinstall_cmds='$RANLIB $lib' 4148b698ba48Smrg fi 4149b698ba48Smrg ;; 4150b698ba48Smrgaix[[4-9]]*) 4151b698ba48Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 4152b698ba48Smrg test "$enable_shared" = yes && enable_static=no 4153b698ba48Smrg fi 4154b698ba48Smrg ;; 4155b698ba48Smrgesac 4156b698ba48SmrgAC_MSG_RESULT([$enable_shared]) 415709885543Smrg 4158b698ba48SmrgAC_MSG_CHECKING([whether to build static libraries]) 4159b698ba48Smrg# Make sure either enable_shared or enable_static is yes. 4160b698ba48Smrgtest "$enable_shared" = yes || enable_static=yes 4161b698ba48SmrgAC_MSG_RESULT([$enable_static]) 416209885543Smrg 4163b698ba48Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 4164b698ba48Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 416509885543Smrg 4166b698ba48SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4167b698ba48SmrgAC_LIBTOOL_PROG_CC_C_O($1) 4168b698ba48SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4169b698ba48SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4170b698ba48SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4171b698ba48SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 417209885543Smrg 4173b698ba48SmrgAC_LIBTOOL_CONFIG($1) 417409885543Smrg 4175b698ba48SmrgAC_LANG_POP 4176b698ba48SmrgCC="$lt_save_CC" 4177b698ba48Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 417809885543Smrg 417909885543Smrg 4180b698ba48Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 4181b698ba48Smrg# -------------------------- 4182b698ba48Smrg# Ensure that the configuration vars for the C compiler are 4183b698ba48Smrg# suitably defined. Those variables are subsequently used by 4184b698ba48Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4185b698ba48SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 4186b698ba48SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 4187b698ba48Smrg[AC_LANG_SAVE 418809885543Smrg 4189b698ba48Smrg# Source file extension for Java test sources. 4190b698ba48Smrgac_ext=java 41912ec8c4b4Smrg 4192b698ba48Smrg# Object file extension for compiled Java test sources. 4193b698ba48Smrgobjext=o 4194b698ba48Smrg_LT_AC_TAGVAR(objext, $1)=$objext 419509885543Smrg 4196b698ba48Smrg# Code to be used in simple compile tests 4197b698ba48Smrglt_simple_compile_test_code="class foo {}" 419809885543Smrg 4199b698ba48Smrg# Code to be used in simple link tests 4200b698ba48Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 420109885543Smrg 4202b698ba48Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4203b698ba48Smrg_LT_AC_SYS_COMPILER 420409885543Smrg 4205b698ba48Smrg# save warnings/boilerplate of simple test code 4206b698ba48Smrg_LT_COMPILER_BOILERPLATE 4207b698ba48Smrg_LT_LINKER_BOILERPLATE 420809885543Smrg 4209b698ba48Smrg# Allow CC to be a program name with arguments. 4210b698ba48Smrglt_save_CC="$CC" 4211b698ba48SmrgCC=${GCJ-"gcj"} 4212b698ba48Smrgcompiler=$CC 4213b698ba48Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 4214b698ba48Smrg_LT_CC_BASENAME([$compiler]) 421509885543Smrg 4216b698ba48Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 4217b698ba48Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 421809885543Smrg 4219b698ba48Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 422009885543Smrg 4221b698ba48SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4222b698ba48SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4223b698ba48SmrgAC_LIBTOOL_PROG_CC_C_O($1) 4224b698ba48SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4225b698ba48SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4226b698ba48SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4227b698ba48SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 422809885543Smrg 4229b698ba48SmrgAC_LIBTOOL_CONFIG($1) 423009885543Smrg 4231b698ba48SmrgAC_LANG_RESTORE 4232b698ba48SmrgCC="$lt_save_CC" 4233b698ba48Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 423409885543Smrg 423509885543Smrg 4236b698ba48Smrg# AC_LIBTOOL_LANG_RC_CONFIG 4237b698ba48Smrg# ------------------------- 4238b698ba48Smrg# Ensure that the configuration vars for the Windows resource compiler are 4239b698ba48Smrg# suitably defined. Those variables are subsequently used by 4240b698ba48Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4241b698ba48SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 4242b698ba48SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 4243b698ba48Smrg[AC_LANG_SAVE 424409885543Smrg 4245b698ba48Smrg# Source file extension for RC test sources. 4246b698ba48Smrgac_ext=rc 424709885543Smrg 4248b698ba48Smrg# Object file extension for compiled RC test sources. 4249b698ba48Smrgobjext=o 4250b698ba48Smrg_LT_AC_TAGVAR(objext, $1)=$objext 425109885543Smrg 4252b698ba48Smrg# Code to be used in simple compile tests 4253b698ba48Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 425409885543Smrg 4255b698ba48Smrg# Code to be used in simple link tests 4256b698ba48Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 425709885543Smrg 4258b698ba48Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4259b698ba48Smrg_LT_AC_SYS_COMPILER 426009885543Smrg 4261b698ba48Smrg# save warnings/boilerplate of simple test code 4262b698ba48Smrg_LT_COMPILER_BOILERPLATE 4263b698ba48Smrg_LT_LINKER_BOILERPLATE 426409885543Smrg 4265b698ba48Smrg# Allow CC to be a program name with arguments. 4266b698ba48Smrglt_save_CC="$CC" 4267b698ba48SmrgCC=${RC-"windres"} 4268b698ba48Smrgcompiler=$CC 4269b698ba48Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 4270b698ba48Smrg_LT_CC_BASENAME([$compiler]) 4271b698ba48Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 427209885543Smrg 4273b698ba48SmrgAC_LIBTOOL_CONFIG($1) 427409885543Smrg 4275b698ba48SmrgAC_LANG_RESTORE 4276b698ba48SmrgCC="$lt_save_CC" 4277b698ba48Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 427809885543Smrg 427909885543Smrg 4280b698ba48Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 4281b698ba48Smrg# ---------------------------- 4282b698ba48Smrg# If TAGNAME is not passed, then create an initial libtool script 4283b698ba48Smrg# with a default configuration from the untagged config vars. Otherwise 4284b698ba48Smrg# add code to config.status for appending the configuration named by 4285b698ba48Smrg# TAGNAME from the matching tagged config vars. 4286b698ba48SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 4287b698ba48Smrg[# The else clause should only fire when bootstrapping the 4288b698ba48Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 4289b698ba48Smrg# with your package, and you will get complaints that there are 4290b698ba48Smrg# no rules to generate ltmain.sh. 4291b698ba48Smrgif test -f "$ltmain"; then 4292b698ba48Smrg # See if we are running on zsh, and set the options which allow our commands through 4293b698ba48Smrg # without removal of \ escapes. 4294b698ba48Smrg if test -n "${ZSH_VERSION+set}" ; then 4295b698ba48Smrg setopt NO_GLOB_SUBST 4296b698ba48Smrg fi 4297b698ba48Smrg # Now quote all the things that may contain metacharacters while being 4298b698ba48Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 4299b698ba48Smrg # variables and quote the copies for generation of the libtool script. 4300b698ba48Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 4301b698ba48Smrg SED SHELL STRIP \ 4302b698ba48Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 4303b698ba48Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 4304b698ba48Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 4305b698ba48Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 4306b698ba48Smrg lt_cv_sys_global_symbol_to_c_name_address \ 4307b698ba48Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4308b698ba48Smrg old_postinstall_cmds old_postuninstall_cmds \ 4309b698ba48Smrg _LT_AC_TAGVAR(compiler, $1) \ 4310b698ba48Smrg _LT_AC_TAGVAR(CC, $1) \ 4311b698ba48Smrg _LT_AC_TAGVAR(LD, $1) \ 4312b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4313b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4314b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4315b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4316b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4317b698ba48Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4318b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4319b698ba48Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4320b698ba48Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4321b698ba48Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4322b698ba48Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 4323b698ba48Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 4324b698ba48Smrg _LT_AC_TAGVAR(predeps, $1) \ 4325b698ba48Smrg _LT_AC_TAGVAR(postdeps, $1) \ 4326b698ba48Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4327b698ba48Smrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 4328b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 4329b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4330b698ba48Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4331b698ba48Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4332b698ba48Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 4333b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 4334b698ba48Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 4335b698ba48Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 4336b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 4337b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 4338b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 4339b698ba48Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 4340b698ba48Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 4341b698ba48Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 4342b698ba48Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 4343b698ba48Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 4344b698ba48Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 4345b698ba48Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 4346b698ba48Smrg 4347b698ba48Smrg case $var in 4348b698ba48Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 4349b698ba48Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 4350b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 4351b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 4352b698ba48Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 4353b698ba48Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 4354b698ba48Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 4355b698ba48Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 4356b698ba48Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 4357b698ba48Smrg postinstall_cmds | postuninstall_cmds | \ 4358b698ba48Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 4359b698ba48Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 4360b698ba48Smrg # Double-quote double-evaled strings. 4361b698ba48Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 43622ec8c4b4Smrg ;; 4363b698ba48Smrg *) 4364b698ba48Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 43652ec8c4b4Smrg ;; 4366b698ba48Smrg esac 4367b698ba48Smrg done 436809885543Smrg 4369b698ba48Smrg case $lt_echo in 4370b698ba48Smrg *'\[$]0 --fallback-echo"') 4371b698ba48Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 4372b698ba48Smrg ;; 4373b698ba48Smrg esac 437409885543Smrg 4375b698ba48Smrgifelse([$1], [], 4376b698ba48Smrg [cfgfile="${ofile}T" 4377b698ba48Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 4378b698ba48Smrg $rm -f "$cfgfile" 4379b698ba48Smrg AC_MSG_NOTICE([creating $ofile])], 4380b698ba48Smrg [cfgfile="$ofile"]) 438109885543Smrg 4382b698ba48Smrg cat <<__EOF__ >> "$cfgfile" 4383b698ba48Smrgifelse([$1], [], 4384b698ba48Smrg[#! $SHELL 438509885543Smrg 4386b698ba48Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 4387b698ba48Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 4388b698ba48Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4389b698ba48Smrg# 4390b698ba48Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 4391b698ba48Smrg# Free Software Foundation, Inc. 4392b698ba48Smrg# 4393b698ba48Smrg# This file is part of GNU Libtool: 4394b698ba48Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4395b698ba48Smrg# 4396b698ba48Smrg# This program is free software; you can redistribute it and/or modify 4397b698ba48Smrg# it under the terms of the GNU General Public License as published by 4398b698ba48Smrg# the Free Software Foundation; either version 2 of the License, or 4399b698ba48Smrg# (at your option) any later version. 4400b698ba48Smrg# 4401b698ba48Smrg# This program is distributed in the hope that it will be useful, but 4402b698ba48Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 4403b698ba48Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4404b698ba48Smrg# General Public License for more details. 4405b698ba48Smrg# 4406b698ba48Smrg# You should have received a copy of the GNU General Public License 4407b698ba48Smrg# along with this program; if not, write to the Free Software 4408b698ba48Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 4409b698ba48Smrg# 4410b698ba48Smrg# As a special exception to the GNU General Public License, if you 4411b698ba48Smrg# distribute this file as part of a program that contains a 4412b698ba48Smrg# configuration script generated by Autoconf, you may include it under 4413b698ba48Smrg# the same distribution terms that you use for the rest of that program. 441409885543Smrg 4415b698ba48Smrg# A sed program that does not truncate output. 4416b698ba48SmrgSED=$lt_SED 441709885543Smrg 4418b698ba48Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 4419b698ba48SmrgXsed="$SED -e 1s/^X//" 442009885543Smrg 4421b698ba48Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 4422b698ba48Smrg# if CDPATH is set. 4423b698ba48Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 442409885543Smrg 4425b698ba48Smrg# The names of the tagged configurations supported by this script. 4426b698ba48Smrgavailable_tags= 442709885543Smrg 4428b698ba48Smrg# ### BEGIN LIBTOOL CONFIG], 4429b698ba48Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 443009885543Smrg 4431b698ba48Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 443209885543Smrg 4433b698ba48Smrg# Shell to use when invoking shell scripts. 4434b698ba48SmrgSHELL=$lt_SHELL 443509885543Smrg 4436b698ba48Smrg# Whether or not to build shared libraries. 4437b698ba48Smrgbuild_libtool_libs=$enable_shared 443809885543Smrg 4439b698ba48Smrg# Whether or not to build static libraries. 4440b698ba48Smrgbuild_old_libs=$enable_static 444109885543Smrg 4442b698ba48Smrg# Whether or not to add -lc for building shared libraries. 4443b698ba48Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 444409885543Smrg 4445b698ba48Smrg# Whether or not to disallow shared libs when runtime libs are static 4446b698ba48Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 444709885543Smrg 4448b698ba48Smrg# Whether or not to optimize for fast installation. 4449b698ba48Smrgfast_install=$enable_fast_install 445009885543Smrg 4451b698ba48Smrg# The host system. 4452b698ba48Smrghost_alias=$host_alias 4453b698ba48Smrghost=$host 4454b698ba48Smrghost_os=$host_os 445509885543Smrg 4456b698ba48Smrg# The build system. 4457b698ba48Smrgbuild_alias=$build_alias 4458b698ba48Smrgbuild=$build 4459b698ba48Smrgbuild_os=$build_os 446009885543Smrg 4461b698ba48Smrg# An echo program that does not interpret backslashes. 4462b698ba48Smrgecho=$lt_echo 446309885543Smrg 4464b698ba48Smrg# The archiver. 4465b698ba48SmrgAR=$lt_AR 4466b698ba48SmrgAR_FLAGS=$lt_AR_FLAGS 446709885543Smrg 4468b698ba48Smrg# A C compiler. 4469b698ba48SmrgLTCC=$lt_LTCC 447009885543Smrg 4471b698ba48Smrg# LTCC compiler flags. 4472b698ba48SmrgLTCFLAGS=$lt_LTCFLAGS 447309885543Smrg 4474b698ba48Smrg# A language-specific compiler. 4475b698ba48SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 447609885543Smrg 4477b698ba48Smrg# Is the compiler the GNU C compiler? 4478b698ba48Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 447909885543Smrg 4480b698ba48Smrg# An ERE matcher. 4481b698ba48SmrgEGREP=$lt_EGREP 448209885543Smrg 4483b698ba48Smrg# The linker used to build libraries. 4484b698ba48SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 448509885543Smrg 4486b698ba48Smrg# Whether we need hard or soft links. 4487b698ba48SmrgLN_S=$lt_LN_S 448809885543Smrg 4489b698ba48Smrg# A BSD-compatible nm program. 4490b698ba48SmrgNM=$lt_NM 449109885543Smrg 4492b698ba48Smrg# A symbol stripping program 4493b698ba48SmrgSTRIP=$lt_STRIP 449409885543Smrg 4495b698ba48Smrg# Used to examine libraries when file_magic_cmd begins "file" 4496b698ba48SmrgMAGIC_CMD=$MAGIC_CMD 449709885543Smrg 4498b698ba48Smrg# Used on cygwin: DLL creation program. 4499b698ba48SmrgDLLTOOL="$DLLTOOL" 450009885543Smrg 4501b698ba48Smrg# Used on cygwin: object dumper. 4502b698ba48SmrgOBJDUMP="$OBJDUMP" 450309885543Smrg 4504b698ba48Smrg# Used on cygwin: assembler. 4505b698ba48SmrgAS="$AS" 450609885543Smrg 4507b698ba48Smrg# The name of the directory that contains temporary libtool files. 4508b698ba48Smrgobjdir=$objdir 450909885543Smrg 4510b698ba48Smrg# How to create reloadable object files. 4511b698ba48Smrgreload_flag=$lt_reload_flag 4512b698ba48Smrgreload_cmds=$lt_reload_cmds 451309885543Smrg 4514b698ba48Smrg# How to pass a linker flag through the compiler. 4515b698ba48Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 451609885543Smrg 4517b698ba48Smrg# Object file suffix (normally "o"). 4518b698ba48Smrgobjext="$ac_objext" 451909885543Smrg 4520b698ba48Smrg# Old archive suffix (normally "a"). 4521b698ba48Smrglibext="$libext" 452209885543Smrg 4523b698ba48Smrg# Shared library suffix (normally ".so"). 4524b698ba48Smrgshrext_cmds='$shrext_cmds' 452509885543Smrg 4526b698ba48Smrg# Executable file suffix (normally ""). 4527b698ba48Smrgexeext="$exeext" 452809885543Smrg 4529b698ba48Smrg# Additional compiler flags for building library objects. 4530b698ba48Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 4531b698ba48Smrgpic_mode=$pic_mode 453209885543Smrg 4533b698ba48Smrg# What is the maximum length of a command? 4534b698ba48Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 45357104f784Smrg 4536b698ba48Smrg# Does compiler simultaneously support -c and -o options? 4537b698ba48Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 453809885543Smrg 4539b698ba48Smrg# Must we lock files when doing compilation? 4540b698ba48Smrgneed_locks=$lt_need_locks 454109885543Smrg 4542b698ba48Smrg# Do we need the lib prefix for modules? 4543b698ba48Smrgneed_lib_prefix=$need_lib_prefix 454409885543Smrg 4545b698ba48Smrg# Do we need a version for libraries? 4546b698ba48Smrgneed_version=$need_version 454709885543Smrg 4548b698ba48Smrg# Whether dlopen is supported. 4549b698ba48Smrgdlopen_support=$enable_dlopen 455009885543Smrg 4551b698ba48Smrg# Whether dlopen of programs is supported. 4552b698ba48Smrgdlopen_self=$enable_dlopen_self 455309885543Smrg 4554b698ba48Smrg# Whether dlopen of statically linked programs is supported. 4555b698ba48Smrgdlopen_self_static=$enable_dlopen_self_static 455609885543Smrg 4557b698ba48Smrg# Compiler flag to prevent dynamic linking. 4558b698ba48Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 455909885543Smrg 4560b698ba48Smrg# Compiler flag to turn off builtin functions. 4561b698ba48Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 456209885543Smrg 4563b698ba48Smrg# Compiler flag to allow reflexive dlopens. 4564b698ba48Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 456509885543Smrg 4566b698ba48Smrg# Compiler flag to generate shared objects directly from archives. 4567b698ba48Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 456809885543Smrg 4569b698ba48Smrg# Compiler flag to generate thread-safe objects. 4570b698ba48Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 457109885543Smrg 4572b698ba48Smrg# Library versioning type. 4573b698ba48Smrgversion_type=$version_type 457409885543Smrg 4575b698ba48Smrg# Format of library name prefix. 4576b698ba48Smrglibname_spec=$lt_libname_spec 457709885543Smrg 4578b698ba48Smrg# List of archive names. First name is the real one, the rest are links. 4579b698ba48Smrg# The last name is the one that the linker finds with -lNAME. 4580b698ba48Smrglibrary_names_spec=$lt_library_names_spec 458109885543Smrg 4582b698ba48Smrg# The coded name of the library, if different from the real name. 4583b698ba48Smrgsoname_spec=$lt_soname_spec 458409885543Smrg 4585b698ba48Smrg# Commands used to build and install an old-style archive. 4586b698ba48SmrgRANLIB=$lt_RANLIB 4587b698ba48Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 4588b698ba48Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 4589b698ba48Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 459009885543Smrg 4591b698ba48Smrg# Create an old-style archive from a shared archive. 4592b698ba48Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 459309885543Smrg 4594b698ba48Smrg# Create a temporary old-style archive to link instead of a shared archive. 4595b698ba48Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 459609885543Smrg 4597b698ba48Smrg# Commands used to build and install a shared archive. 4598b698ba48Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 4599b698ba48Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 4600b698ba48Smrgpostinstall_cmds=$lt_postinstall_cmds 4601b698ba48Smrgpostuninstall_cmds=$lt_postuninstall_cmds 460209885543Smrg 4603b698ba48Smrg# Commands used to build a loadable module (assumed same as above if empty) 4604b698ba48Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 4605b698ba48Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 460609885543Smrg 4607b698ba48Smrg# Commands to strip libraries. 4608b698ba48Smrgold_striplib=$lt_old_striplib 4609b698ba48Smrgstriplib=$lt_striplib 461009885543Smrg 4611b698ba48Smrg# Dependencies to place before the objects being linked to create a 4612b698ba48Smrg# shared library. 4613b698ba48Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 461409885543Smrg 4615b698ba48Smrg# Dependencies to place after the objects being linked to create a 4616b698ba48Smrg# shared library. 4617b698ba48Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 461809885543Smrg 4619b698ba48Smrg# Dependencies to place before the objects being linked to create a 4620b698ba48Smrg# shared library. 4621b698ba48Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 462209885543Smrg 4623b698ba48Smrg# Dependencies to place after the objects being linked to create a 4624b698ba48Smrg# shared library. 4625b698ba48Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 462609885543Smrg 4627b698ba48Smrg# The directories searched by this compiler when creating a shared 4628b698ba48Smrg# library 4629b698ba48Smrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 463009885543Smrg 4631b698ba48Smrg# The library search path used internally by the compiler when linking 4632b698ba48Smrg# a shared library. 4633b698ba48Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 463409885543Smrg 4635b698ba48Smrg# Method to check whether dependent libraries are shared objects. 4636b698ba48Smrgdeplibs_check_method=$lt_deplibs_check_method 463709885543Smrg 4638b698ba48Smrg# Command to use when deplibs_check_method == file_magic. 4639b698ba48Smrgfile_magic_cmd=$lt_file_magic_cmd 464009885543Smrg 4641b698ba48Smrg# Flag that allows shared libraries with undefined symbols to be built. 4642b698ba48Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 464309885543Smrg 4644b698ba48Smrg# Flag that forces no undefined symbols. 4645b698ba48Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 464609885543Smrg 4647b698ba48Smrg# Commands used to finish a libtool library installation in a directory. 4648b698ba48Smrgfinish_cmds=$lt_finish_cmds 464909885543Smrg 4650b698ba48Smrg# Same as above, but a single script fragment to be evaled but not shown. 4651b698ba48Smrgfinish_eval=$lt_finish_eval 465209885543Smrg 4653b698ba48Smrg# Take the output of nm and produce a listing of raw symbols and C names. 4654b698ba48Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 465509885543Smrg 4656b698ba48Smrg# Transform the output of nm in a proper C declaration 4657b698ba48Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 465809885543Smrg 4659b698ba48Smrg# Transform the output of nm in a C name address pair 4660b698ba48Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 466109885543Smrg 4662b698ba48Smrg# This is the shared library runtime path variable. 4663b698ba48Smrgrunpath_var=$runpath_var 466409885543Smrg 4665b698ba48Smrg# This is the shared library path variable. 4666b698ba48Smrgshlibpath_var=$shlibpath_var 466709885543Smrg 4668b698ba48Smrg# Is shlibpath searched before the hard-coded library search path? 4669b698ba48Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 467009885543Smrg 4671b698ba48Smrg# How to hardcode a shared library path into an executable. 4672b698ba48Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 467309885543Smrg 4674b698ba48Smrg# Whether we should hardcode library paths into libraries. 4675b698ba48Smrghardcode_into_libs=$hardcode_into_libs 467609885543Smrg 4677b698ba48Smrg# Flag to hardcode \$libdir into a binary during linking. 4678b698ba48Smrg# This must work even if \$libdir does not exist. 4679b698ba48Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 468009885543Smrg 4681b698ba48Smrg# If ld is used when linking, flag to hardcode \$libdir into 4682b698ba48Smrg# a binary during linking. This must work even if \$libdir does 4683b698ba48Smrg# not exist. 4684b698ba48Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 468509885543Smrg 4686b698ba48Smrg# Whether we need a single -rpath flag with a separated argument. 4687b698ba48Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 468809885543Smrg 4689b698ba48Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 4690b698ba48Smrg# resulting binary. 4691b698ba48Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 469209885543Smrg 4693b698ba48Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 4694b698ba48Smrg# resulting binary. 4695b698ba48Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 469609885543Smrg 4697b698ba48Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 4698b698ba48Smrg# the resulting binary. 4699b698ba48Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 470009885543Smrg 4701b698ba48Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 4702b698ba48Smrg# and all subsequent libraries and executables linked against it. 4703b698ba48Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 470409885543Smrg 4705b698ba48Smrg# Variables whose values should be saved in libtool wrapper scripts and 4706b698ba48Smrg# restored at relink time. 4707b698ba48Smrgvariables_saved_for_relink="$variables_saved_for_relink" 470809885543Smrg 4709b698ba48Smrg# Whether libtool must link a program against all its dependency libraries. 4710b698ba48Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 471109885543Smrg 4712b698ba48Smrg# Compile-time system search path for libraries 4713b698ba48Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 471409885543Smrg 4715b698ba48Smrg# Run-time system search path for libraries 4716b698ba48Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 471709885543Smrg 4718b698ba48Smrg# Fix the shell variable \$srcfile for the compiler. 4719b698ba48Smrgfix_srcfile_path=$lt_fix_srcfile_path 472009885543Smrg 4721b698ba48Smrg# Set to yes if exported symbols are required. 4722b698ba48Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 472309885543Smrg 4724b698ba48Smrg# The commands to list exported symbols. 4725b698ba48Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 472609885543Smrg 4727b698ba48Smrg# The commands to extract the exported symbol list from a shared archive. 4728b698ba48Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 472909885543Smrg 4730b698ba48Smrg# Symbols that should not be listed in the preloaded symbols. 4731b698ba48Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 47322ec8c4b4Smrg 4733b698ba48Smrg# Symbols that must always be exported. 4734b698ba48Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 47352ec8c4b4Smrg 4736b698ba48Smrgifelse([$1],[], 4737b698ba48Smrg[# ### END LIBTOOL CONFIG], 4738b698ba48Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 47392ec8c4b4Smrg 4740b698ba48Smrg__EOF__ 47412ec8c4b4Smrg 4742b698ba48Smrgifelse([$1],[], [ 4743b698ba48Smrg case $host_os in 4744b698ba48Smrg aix3*) 4745b698ba48Smrg cat <<\EOF >> "$cfgfile" 47462ec8c4b4Smrg 4747b698ba48Smrg# AIX sometimes has problems with the GCC collect2 program. For some 4748b698ba48Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4749b698ba48Smrg# vanish in a puff of smoke. 4750b698ba48Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 4751b698ba48Smrg COLLECT_NAMES= 4752b698ba48Smrg export COLLECT_NAMES 4753b698ba48Smrgfi 4754b698ba48SmrgEOF 4755b698ba48Smrg ;; 4756b698ba48Smrg esac 47572ec8c4b4Smrg 4758b698ba48Smrg # We use sed instead of cat because bash on DJGPP gets confused if 4759b698ba48Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4760b698ba48Smrg # text mode, it properly converts lines to CR/LF. This bash problem 4761b698ba48Smrg # is reportedly fixed, but why not run on old versions too? 4762b698ba48Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 47632ec8c4b4Smrg 4764b698ba48Smrg mv -f "$cfgfile" "$ofile" || \ 4765b698ba48Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4766b698ba48Smrg chmod +x "$ofile" 4767b698ba48Smrg]) 476809885543Smrgelse 4769b698ba48Smrg # If there is no Makefile yet, we rely on a make rule to execute 4770b698ba48Smrg # `config.status --recheck' to rerun these tests and create the 4771b698ba48Smrg # libtool script then. 4772b698ba48Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 4773b698ba48Smrg if test -f "$ltmain_in"; then 4774b698ba48Smrg test -f Makefile && make "$ltmain" 4775b698ba48Smrg fi 477609885543Smrgfi 4777b698ba48Smrg])# AC_LIBTOOL_CONFIG 477809885543Smrg 477909885543Smrg 4780b698ba48Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 4781b698ba48Smrg# ------------------------------------------- 4782b698ba48SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 4783b698ba48Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 47842ec8c4b4Smrg 4785b698ba48Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 47862ec8c4b4Smrg 4787b698ba48Smrgif test "$GCC" = yes; then 4788b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 47892ec8c4b4Smrg 4790b698ba48Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4791b698ba48Smrg lt_cv_prog_compiler_rtti_exceptions, 4792b698ba48Smrg [-fno-rtti -fno-exceptions], [], 4793b698ba48Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 47942ec8c4b4Smrgfi 4795b698ba48Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 47962ec8c4b4Smrg 47972ec8c4b4Smrg 4798b698ba48Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4799b698ba48Smrg# --------------------------------- 4800b698ba48SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 4801b698ba48Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 4802b698ba48SmrgAC_REQUIRE([LT_AC_PROG_SED]) 4803b698ba48SmrgAC_REQUIRE([AC_PROG_NM]) 4804b698ba48SmrgAC_REQUIRE([AC_OBJEXT]) 4805b698ba48Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 4806b698ba48SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4807b698ba48SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4808b698ba48Smrg[ 4809b698ba48Smrg# These are sane defaults that work on at least a few old systems. 4810b698ba48Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 48112ec8c4b4Smrg 4812b698ba48Smrg# Character class describing NM global symbol codes. 4813b698ba48Smrgsymcode='[[BCDEGRST]]' 48142ec8c4b4Smrg 4815b698ba48Smrg# Regexp to match symbols that can be accessed directly from C. 4816b698ba48Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 48172ec8c4b4Smrg 4818b698ba48Smrg# Transform an extracted symbol line into a proper C declaration 4819b698ba48Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 48202ec8c4b4Smrg 4821b698ba48Smrg# Transform an extracted symbol line into symbol name and symbol address 4822b698ba48Smrglt_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'" 48232ec8c4b4Smrg 4824b698ba48Smrg# Define system-specific variables. 4825b698ba48Smrgcase $host_os in 4826b698ba48Smrgaix*) 4827b698ba48Smrg symcode='[[BCDT]]' 4828b698ba48Smrg ;; 4829b698ba48Smrgcygwin* | mingw* | pw32*) 4830b698ba48Smrg symcode='[[ABCDGISTW]]' 4831b698ba48Smrg ;; 4832b698ba48Smrghpux*) # Its linker distinguishes data from code symbols 4833b698ba48Smrg if test "$host_cpu" = ia64; then 4834b698ba48Smrg symcode='[[ABCDEGRST]]' 4835b698ba48Smrg fi 4836b698ba48Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4837b698ba48Smrg 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'" 4838b698ba48Smrg ;; 4839b698ba48Smrglinux* | k*bsd*-gnu) 4840b698ba48Smrg if test "$host_cpu" = ia64; then 4841b698ba48Smrg symcode='[[ABCDGIRSTW]]' 4842b698ba48Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4843b698ba48Smrg 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'" 4844b698ba48Smrg fi 4845b698ba48Smrg ;; 4846b698ba48Smrgirix* | nonstopux*) 4847b698ba48Smrg symcode='[[BCDEGRST]]' 4848b698ba48Smrg ;; 4849b698ba48Smrgosf*) 4850b698ba48Smrg symcode='[[BCDEGQRST]]' 4851b698ba48Smrg ;; 4852b698ba48Smrgsolaris*) 4853b698ba48Smrg symcode='[[BDRT]]' 4854b698ba48Smrg ;; 4855b698ba48Smrgsco3.2v5*) 4856b698ba48Smrg symcode='[[DT]]' 4857b698ba48Smrg ;; 4858b698ba48Smrgsysv4.2uw2*) 4859b698ba48Smrg symcode='[[DT]]' 4860b698ba48Smrg ;; 4861b698ba48Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 4862b698ba48Smrg symcode='[[ABDT]]' 4863b698ba48Smrg ;; 4864b698ba48Smrgsysv4) 4865b698ba48Smrg symcode='[[DFNSTU]]' 4866b698ba48Smrg ;; 4867b698ba48Smrgesac 48682ec8c4b4Smrg 4869b698ba48Smrg# Handle CRLF in mingw tool chain 4870b698ba48Smrgopt_cr= 4871b698ba48Smrgcase $build_os in 4872b698ba48Smrgmingw*) 4873b698ba48Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4874b698ba48Smrg ;; 4875b698ba48Smrgesac 48762ec8c4b4Smrg 4877b698ba48Smrg# If we're using GNU nm, then use its standard symbol codes. 4878b698ba48Smrgcase `$NM -V 2>&1` in 4879b698ba48Smrg*GNU* | *'with BFD'*) 4880b698ba48Smrg symcode='[[ABCDGIRSTW]]' ;; 4881b698ba48Smrgesac 48822ec8c4b4Smrg 4883b698ba48Smrg# Try without a prefix undercore, then with it. 4884b698ba48Smrgfor ac_symprfx in "" "_"; do 48852ec8c4b4Smrg 4886b698ba48Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4887b698ba48Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 48882ec8c4b4Smrg 4889b698ba48Smrg # Write the raw and C identifiers. 4890b698ba48Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 48912ec8c4b4Smrg 4892b698ba48Smrg # Check to see that the pipe works correctly. 4893b698ba48Smrg pipe_works=no 48942ec8c4b4Smrg 4895b698ba48Smrg rm -f conftest* 4896b698ba48Smrg cat > conftest.$ac_ext <<EOF 4897b698ba48Smrg#ifdef __cplusplus 4898b698ba48Smrgextern "C" { 4899b698ba48Smrg#endif 4900b698ba48Smrgchar nm_test_var; 4901b698ba48Smrgvoid nm_test_func(){} 4902b698ba48Smrg#ifdef __cplusplus 4903b698ba48Smrg} 4904b698ba48Smrg#endif 4905b698ba48Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 4906b698ba48SmrgEOF 490709885543Smrg 4908b698ba48Smrg if AC_TRY_EVAL(ac_compile); then 4909b698ba48Smrg # Now try to grab the symbols. 4910b698ba48Smrg nlist=conftest.nm 4911b698ba48Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 4912b698ba48Smrg # Try sorting and uniquifying the output. 4913b698ba48Smrg if sort "$nlist" | uniq > "$nlist"T; then 4914b698ba48Smrg mv -f "$nlist"T "$nlist" 4915b698ba48Smrg else 4916b698ba48Smrg rm -f "$nlist"T 4917b698ba48Smrg fi 49182ec8c4b4Smrg 4919b698ba48Smrg # Make sure that we snagged all the symbols we need. 4920b698ba48Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 4921b698ba48Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 4922b698ba48Smrg cat <<EOF > conftest.$ac_ext 4923b698ba48Smrg#ifdef __cplusplus 4924b698ba48Smrgextern "C" { 4925b698ba48Smrg#endif 49262ec8c4b4Smrg 4927b698ba48SmrgEOF 4928b698ba48Smrg # Now generate the symbol file. 4929b698ba48Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 49302ec8c4b4Smrg 4931b698ba48Smrg cat <<EOF >> conftest.$ac_ext 4932b698ba48Smrg#if defined (__STDC__) && __STDC__ 4933b698ba48Smrg# define lt_ptr_t void * 4934b698ba48Smrg#else 4935b698ba48Smrg# define lt_ptr_t char * 4936b698ba48Smrg# define const 4937b698ba48Smrg#endif 49382ec8c4b4Smrg 4939b698ba48Smrg/* The mapping between symbol names and symbols. */ 4940b698ba48Smrgconst struct { 4941b698ba48Smrg const char *name; 4942b698ba48Smrg lt_ptr_t address; 4943b698ba48Smrg} 4944b698ba48Smrglt_preloaded_symbols[[]] = 4945b698ba48Smrg{ 4946b698ba48SmrgEOF 4947b698ba48Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 4948b698ba48Smrg cat <<\EOF >> conftest.$ac_ext 4949b698ba48Smrg {0, (lt_ptr_t) 0} 4950b698ba48Smrg}; 49512ec8c4b4Smrg 4952b698ba48Smrg#ifdef __cplusplus 4953b698ba48Smrg} 4954b698ba48Smrg#endif 4955b698ba48SmrgEOF 4956b698ba48Smrg # Now try linking the two files. 4957b698ba48Smrg mv conftest.$ac_objext conftstm.$ac_objext 4958b698ba48Smrg lt_save_LIBS="$LIBS" 4959b698ba48Smrg lt_save_CFLAGS="$CFLAGS" 4960b698ba48Smrg LIBS="conftstm.$ac_objext" 4961b698ba48Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4962b698ba48Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4963b698ba48Smrg pipe_works=yes 4964b698ba48Smrg fi 4965b698ba48Smrg LIBS="$lt_save_LIBS" 4966b698ba48Smrg CFLAGS="$lt_save_CFLAGS" 4967b698ba48Smrg else 4968b698ba48Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 49692ec8c4b4Smrg fi 4970b698ba48Smrg else 4971b698ba48Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4972b698ba48Smrg fi 4973b698ba48Smrg else 4974b698ba48Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4975b698ba48Smrg fi 4976b698ba48Smrg else 4977b698ba48Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4978b698ba48Smrg cat conftest.$ac_ext >&5 4979b698ba48Smrg fi 4980b698ba48Smrg rm -rf conftest* conftst* 498109885543Smrg 4982b698ba48Smrg # Do not use the global_symbol_pipe unless it works. 4983b698ba48Smrg if test "$pipe_works" = yes; then 4984b698ba48Smrg break 4985b698ba48Smrg else 4986b698ba48Smrg lt_cv_sys_global_symbol_pipe= 4987b698ba48Smrg fi 4988b698ba48Smrgdone 4989b698ba48Smrg]) 4990b698ba48Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4991b698ba48Smrg lt_cv_sys_global_symbol_to_cdecl= 4992b698ba48Smrgfi 4993b698ba48Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4994b698ba48Smrg AC_MSG_RESULT(failed) 4995b698ba48Smrgelse 4996b698ba48Smrg AC_MSG_RESULT(ok) 4997b698ba48Smrgfi 4998b698ba48Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 499909885543Smrg 500009885543Smrg 5001b698ba48Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 5002b698ba48Smrg# --------------------------------------- 5003b698ba48SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 5004b698ba48Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 5005b698ba48Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5006b698ba48Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 500709885543Smrg 5008b698ba48SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 5009b698ba48Smrg ifelse([$1],[CXX],[ 5010b698ba48Smrg # C++ specific cases for pic, static, wl, etc. 5011b698ba48Smrg if test "$GXX" = yes; then 5012b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5013b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 501409885543Smrg 5015b698ba48Smrg case $host_os in 5016b698ba48Smrg aix*) 5017b698ba48Smrg # All AIX code is PIC. 5018b698ba48Smrg if test "$host_cpu" = ia64; then 5019b698ba48Smrg # AIX 5 now supports IA64 processor 5020b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5021b698ba48Smrg fi 5022b698ba48Smrg ;; 5023b698ba48Smrg amigaos*) 5024b698ba48Smrg # FIXME: we need at least 68020 code to build shared libraries, but 5025b698ba48Smrg # adding the `-m68020' flag to GCC prevents building anything better, 5026b698ba48Smrg # like `-m68040'. 5027b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5028b698ba48Smrg ;; 5029b698ba48Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5030b698ba48Smrg # PIC is the default for these OSes. 5031b698ba48Smrg ;; 5032b698ba48Smrg mingw* | cygwin* | os2* | pw32*) 5033b698ba48Smrg # This hack is so that the source file can tell whether it is being 5034b698ba48Smrg # built for inclusion in a dll (and should export symbols for example). 5035b698ba48Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5036b698ba48Smrg # (--disable-auto-import) libraries 5037b698ba48Smrg m4_if([$1], [GCJ], [], 5038b698ba48Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5039b698ba48Smrg ;; 5040b698ba48Smrg darwin* | rhapsody*) 5041b698ba48Smrg # PIC is the default on this platform 5042b698ba48Smrg # Common symbols not allowed in MH_DYLIB files 5043b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5044b698ba48Smrg ;; 5045b698ba48Smrg *djgpp*) 5046b698ba48Smrg # DJGPP does not support shared libraries at all 5047b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5048b698ba48Smrg ;; 5049b698ba48Smrg interix[[3-9]]*) 5050b698ba48Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5051b698ba48Smrg # Instead, we relocate shared libraries at runtime. 5052b698ba48Smrg ;; 5053b698ba48Smrg sysv4*MP*) 5054b698ba48Smrg if test -d /usr/nec; then 5055b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5056b698ba48Smrg fi 5057b698ba48Smrg ;; 5058b698ba48Smrg hpux*) 5059b698ba48Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5060b698ba48Smrg # not for PA HP-UX. 5061b698ba48Smrg case $host_cpu in 5062b698ba48Smrg hppa*64*|ia64*) 5063b698ba48Smrg ;; 5064b698ba48Smrg *) 5065b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5066b698ba48Smrg ;; 5067b698ba48Smrg esac 5068b698ba48Smrg ;; 5069b698ba48Smrg *) 5070b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5071b698ba48Smrg ;; 5072b698ba48Smrg esac 5073b698ba48Smrg else 5074b698ba48Smrg case $host_os in 5075b698ba48Smrg aix[[4-9]]*) 5076b698ba48Smrg # All AIX code is PIC. 5077b698ba48Smrg if test "$host_cpu" = ia64; then 5078b698ba48Smrg # AIX 5 now supports IA64 processor 5079b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5080b698ba48Smrg else 5081b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5082b698ba48Smrg fi 5083b698ba48Smrg ;; 5084b698ba48Smrg chorus*) 5085b698ba48Smrg case $cc_basename in 5086b698ba48Smrg cxch68*) 5087b698ba48Smrg # Green Hills C++ Compiler 5088b698ba48Smrg # _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" 5089b698ba48Smrg ;; 5090b698ba48Smrg esac 5091b698ba48Smrg ;; 5092b698ba48Smrg darwin*) 5093b698ba48Smrg # PIC is the default on this platform 5094b698ba48Smrg # Common symbols not allowed in MH_DYLIB files 5095b698ba48Smrg case $cc_basename in 5096b698ba48Smrg xlc*) 5097b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5098b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5099b698ba48Smrg ;; 5100b698ba48Smrg esac 5101b698ba48Smrg ;; 5102b698ba48Smrg dgux*) 5103b698ba48Smrg case $cc_basename in 5104b698ba48Smrg ec++*) 5105b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5106b698ba48Smrg ;; 5107b698ba48Smrg ghcx*) 5108b698ba48Smrg # Green Hills C++ Compiler 5109b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5110b698ba48Smrg ;; 5111b698ba48Smrg *) 5112b698ba48Smrg ;; 5113b698ba48Smrg esac 5114b698ba48Smrg ;; 5115b698ba48Smrg freebsd* | dragonfly*) 5116b698ba48Smrg # FreeBSD uses GNU C++ 5117b698ba48Smrg ;; 5118b698ba48Smrg hpux9* | hpux10* | hpux11*) 5119b698ba48Smrg case $cc_basename in 5120b698ba48Smrg CC*) 5121b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5122b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5123b698ba48Smrg if test "$host_cpu" != ia64; then 5124b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5125b698ba48Smrg fi 5126b698ba48Smrg ;; 5127b698ba48Smrg aCC*) 5128b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5129b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5130b698ba48Smrg case $host_cpu in 5131b698ba48Smrg hppa*64*|ia64*) 5132b698ba48Smrg # +Z the default 5133b698ba48Smrg ;; 5134b698ba48Smrg *) 5135b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5136b698ba48Smrg ;; 5137b698ba48Smrg esac 5138b698ba48Smrg ;; 5139b698ba48Smrg *) 5140b698ba48Smrg ;; 5141b698ba48Smrg esac 5142b698ba48Smrg ;; 5143b698ba48Smrg interix*) 5144b698ba48Smrg # This is c89, which is MS Visual C++ (no shared libs) 5145b698ba48Smrg # Anyone wants to do a port? 5146b698ba48Smrg ;; 5147b698ba48Smrg irix5* | irix6* | nonstopux*) 5148b698ba48Smrg case $cc_basename in 5149b698ba48Smrg CC*) 5150b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5151b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5152b698ba48Smrg # CC pic flag -KPIC is the default. 5153b698ba48Smrg ;; 5154b698ba48Smrg *) 5155b698ba48Smrg ;; 5156b698ba48Smrg esac 5157b698ba48Smrg ;; 5158b698ba48Smrg linux* | k*bsd*-gnu) 5159b698ba48Smrg case $cc_basename in 5160b698ba48Smrg KCC*) 5161b698ba48Smrg # KAI C++ Compiler 5162b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5163b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5164b698ba48Smrg ;; 5165b698ba48Smrg icpc* | ecpc*) 5166b698ba48Smrg # Intel C++ 5167b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5168b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5169b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5170b698ba48Smrg ;; 5171b698ba48Smrg pgCC* | pgcpp*) 5172b698ba48Smrg # Portland Group C++ compiler. 5173b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5174b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5175b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5176b698ba48Smrg ;; 5177b698ba48Smrg cxx*) 5178b698ba48Smrg # Compaq C++ 5179b698ba48Smrg # Make sure the PIC flag is empty. It appears that all Alpha 5180b698ba48Smrg # Linux and Compaq Tru64 Unix objects are PIC. 5181b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5182b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5183b698ba48Smrg ;; 5184b698ba48Smrg *) 5185b698ba48Smrg case `$CC -V 2>&1 | sed 5q` in 5186b698ba48Smrg *Sun\ C*) 5187b698ba48Smrg # Sun C++ 5.9 5188b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5189b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5190b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5191b698ba48Smrg ;; 5192b698ba48Smrg esac 5193b698ba48Smrg ;; 5194b698ba48Smrg esac 5195b698ba48Smrg ;; 5196b698ba48Smrg lynxos*) 5197b698ba48Smrg ;; 5198b698ba48Smrg m88k*) 5199b698ba48Smrg ;; 5200b698ba48Smrg mvs*) 5201b698ba48Smrg case $cc_basename in 5202b698ba48Smrg cxx*) 5203b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5204b698ba48Smrg ;; 5205b698ba48Smrg *) 5206b698ba48Smrg ;; 5207b698ba48Smrg esac 5208b698ba48Smrg ;; 5209b698ba48Smrg netbsd*) 5210b698ba48Smrg ;; 5211b698ba48Smrg osf3* | osf4* | osf5*) 5212b698ba48Smrg case $cc_basename in 5213b698ba48Smrg KCC*) 5214b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5215b698ba48Smrg ;; 5216b698ba48Smrg RCC*) 5217b698ba48Smrg # Rational C++ 2.4.1 5218b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5219b698ba48Smrg ;; 5220b698ba48Smrg cxx*) 5221b698ba48Smrg # Digital/Compaq C++ 5222b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5223b698ba48Smrg # Make sure the PIC flag is empty. It appears that all Alpha 5224b698ba48Smrg # Linux and Compaq Tru64 Unix objects are PIC. 5225b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5226b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5227b698ba48Smrg ;; 5228b698ba48Smrg *) 5229b698ba48Smrg ;; 5230b698ba48Smrg esac 5231b698ba48Smrg ;; 5232b698ba48Smrg psos*) 5233b698ba48Smrg ;; 5234b698ba48Smrg solaris*) 5235b698ba48Smrg case $cc_basename in 5236b698ba48Smrg CC*) 5237b698ba48Smrg # Sun C++ 4.2, 5.x and Centerline C++ 5238b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5239b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5240b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5241b698ba48Smrg ;; 5242b698ba48Smrg gcx*) 5243b698ba48Smrg # Green Hills C++ Compiler 5244b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5245b698ba48Smrg ;; 5246b698ba48Smrg *) 5247b698ba48Smrg ;; 5248b698ba48Smrg esac 5249b698ba48Smrg ;; 5250b698ba48Smrg sunos4*) 5251b698ba48Smrg case $cc_basename in 5252b698ba48Smrg CC*) 5253b698ba48Smrg # Sun C++ 4.x 5254b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5255b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5256b698ba48Smrg ;; 5257b698ba48Smrg lcc*) 5258b698ba48Smrg # Lucid 5259b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5260b698ba48Smrg ;; 5261b698ba48Smrg *) 5262b698ba48Smrg ;; 5263b698ba48Smrg esac 5264b698ba48Smrg ;; 5265b698ba48Smrg tandem*) 5266b698ba48Smrg case $cc_basename in 5267b698ba48Smrg NCC*) 5268b698ba48Smrg # NonStop-UX NCC 3.20 5269b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5270b698ba48Smrg ;; 5271b698ba48Smrg *) 5272b698ba48Smrg ;; 5273b698ba48Smrg esac 5274b698ba48Smrg ;; 5275b698ba48Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5276b698ba48Smrg case $cc_basename in 5277b698ba48Smrg CC*) 5278b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5279b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5280b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5281b698ba48Smrg ;; 5282b698ba48Smrg esac 5283b698ba48Smrg ;; 5284b698ba48Smrg vxworks*) 5285b698ba48Smrg ;; 5286b698ba48Smrg *) 5287b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5288b698ba48Smrg ;; 5289b698ba48Smrg esac 5290b698ba48Smrg fi 5291b698ba48Smrg], 5292b698ba48Smrg[ 5293b698ba48Smrg if test "$GCC" = yes; then 5294b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5295b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 52962ec8c4b4Smrg 5297b698ba48Smrg case $host_os in 5298b698ba48Smrg aix*) 5299b698ba48Smrg # All AIX code is PIC. 5300b698ba48Smrg if test "$host_cpu" = ia64; then 5301b698ba48Smrg # AIX 5 now supports IA64 processor 5302b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5303b698ba48Smrg fi 5304b698ba48Smrg ;; 53052ec8c4b4Smrg 5306b698ba48Smrg amigaos*) 5307b698ba48Smrg # FIXME: we need at least 68020 code to build shared libraries, but 5308b698ba48Smrg # adding the `-m68020' flag to GCC prevents building anything better, 5309b698ba48Smrg # like `-m68040'. 5310b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5311b698ba48Smrg ;; 53122ec8c4b4Smrg 5313b698ba48Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5314b698ba48Smrg # PIC is the default for these OSes. 5315b698ba48Smrg ;; 53162ec8c4b4Smrg 5317b698ba48Smrg mingw* | cygwin* | pw32* | os2*) 5318b698ba48Smrg # This hack is so that the source file can tell whether it is being 5319b698ba48Smrg # built for inclusion in a dll (and should export symbols for example). 5320b698ba48Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5321b698ba48Smrg # (--disable-auto-import) libraries 5322b698ba48Smrg m4_if([$1], [GCJ], [], 5323b698ba48Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5324b698ba48Smrg ;; 53252ec8c4b4Smrg 5326b698ba48Smrg darwin* | rhapsody*) 5327b698ba48Smrg # PIC is the default on this platform 5328b698ba48Smrg # Common symbols not allowed in MH_DYLIB files 5329b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5330b698ba48Smrg ;; 53312ec8c4b4Smrg 5332b698ba48Smrg interix[[3-9]]*) 5333b698ba48Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5334b698ba48Smrg # Instead, we relocate shared libraries at runtime. 5335b698ba48Smrg ;; 53362ec8c4b4Smrg 5337b698ba48Smrg msdosdjgpp*) 5338b698ba48Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 5339b698ba48Smrg # on systems that don't support them. 5340b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5341b698ba48Smrg enable_shared=no 5342b698ba48Smrg ;; 53432ec8c4b4Smrg 5344b698ba48Smrg sysv4*MP*) 5345b698ba48Smrg if test -d /usr/nec; then 5346b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5347b698ba48Smrg fi 5348b698ba48Smrg ;; 53492ec8c4b4Smrg 5350b698ba48Smrg hpux*) 5351b698ba48Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5352b698ba48Smrg # not for PA HP-UX. 5353b698ba48Smrg case $host_cpu in 5354b698ba48Smrg hppa*64*|ia64*) 5355b698ba48Smrg # +Z the default 5356b698ba48Smrg ;; 5357b698ba48Smrg *) 5358b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5359b698ba48Smrg ;; 5360b698ba48Smrg esac 5361b698ba48Smrg ;; 53622ec8c4b4Smrg 5363b698ba48Smrg *) 5364b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5365b698ba48Smrg ;; 5366b698ba48Smrg esac 5367b698ba48Smrg else 5368b698ba48Smrg # PORTME Check for flag to pass linker flags through the system compiler. 5369b698ba48Smrg case $host_os in 5370b698ba48Smrg aix*) 5371b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5372b698ba48Smrg if test "$host_cpu" = ia64; then 5373b698ba48Smrg # AIX 5 now supports IA64 processor 5374b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5375b698ba48Smrg else 5376b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5377b698ba48Smrg fi 5378b698ba48Smrg ;; 5379b698ba48Smrg darwin*) 5380b698ba48Smrg # PIC is the default on this platform 5381b698ba48Smrg # Common symbols not allowed in MH_DYLIB files 5382b698ba48Smrg case $cc_basename in 5383b698ba48Smrg xlc*) 5384b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5385b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5386b698ba48Smrg ;; 5387b698ba48Smrg esac 5388b698ba48Smrg ;; 53892ec8c4b4Smrg 5390b698ba48Smrg mingw* | cygwin* | pw32* | os2*) 5391b698ba48Smrg # This hack is so that the source file can tell whether it is being 5392b698ba48Smrg # built for inclusion in a dll (and should export symbols for example). 5393b698ba48Smrg m4_if([$1], [GCJ], [], 5394b698ba48Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5395b698ba48Smrg ;; 53962ec8c4b4Smrg 5397b698ba48Smrg hpux9* | hpux10* | hpux11*) 5398b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5399b698ba48Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5400b698ba48Smrg # not for PA HP-UX. 5401b698ba48Smrg case $host_cpu in 5402b698ba48Smrg hppa*64*|ia64*) 5403b698ba48Smrg # +Z the default 5404b698ba48Smrg ;; 5405b698ba48Smrg *) 5406b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5407b698ba48Smrg ;; 5408b698ba48Smrg esac 5409b698ba48Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 5410b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5411b698ba48Smrg ;; 54122ec8c4b4Smrg 5413b698ba48Smrg irix5* | irix6* | nonstopux*) 5414b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5415b698ba48Smrg # PIC (with -KPIC) is the default. 5416b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5417b698ba48Smrg ;; 54182ec8c4b4Smrg 5419b698ba48Smrg newsos6) 5420b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5421b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5422b698ba48Smrg ;; 54232ec8c4b4Smrg 5424b698ba48Smrg linux* | k*bsd*-gnu) 5425b698ba48Smrg case $cc_basename in 5426b698ba48Smrg icc* | ecc*) 5427b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5428b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5429b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5430b698ba48Smrg ;; 5431b698ba48Smrg pgcc* | pgf77* | pgf90* | pgf95*) 5432b698ba48Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 5433b698ba48Smrg # which looks to be a dead project) 5434b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5435b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5436b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5437b698ba48Smrg ;; 5438b698ba48Smrg ccc*) 5439b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5440b698ba48Smrg # All Alpha code is PIC. 5441b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5442b698ba48Smrg ;; 5443b698ba48Smrg *) 5444b698ba48Smrg case `$CC -V 2>&1 | sed 5q` in 5445b698ba48Smrg *Sun\ C*) 5446b698ba48Smrg # Sun C 5.9 5447b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5448b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5449b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5450b698ba48Smrg ;; 5451b698ba48Smrg *Sun\ F*) 5452b698ba48Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 5453b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5454b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5455b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 5456b698ba48Smrg ;; 5457b698ba48Smrg esac 5458b698ba48Smrg ;; 5459b698ba48Smrg esac 5460b698ba48Smrg ;; 54612ec8c4b4Smrg 5462b698ba48Smrg osf3* | osf4* | osf5*) 5463b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5464b698ba48Smrg # All OSF/1 code is PIC. 5465b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5466b698ba48Smrg ;; 54672ec8c4b4Smrg 5468b698ba48Smrg rdos*) 5469b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5470b698ba48Smrg ;; 54712ec8c4b4Smrg 5472b698ba48Smrg solaris*) 5473b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5474b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5475b698ba48Smrg case $cc_basename in 5476b698ba48Smrg f77* | f90* | f95*) 5477b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5478b698ba48Smrg *) 5479b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5480b698ba48Smrg esac 5481b698ba48Smrg ;; 54822ec8c4b4Smrg 5483b698ba48Smrg sunos4*) 5484b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5485b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5486b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5487b698ba48Smrg ;; 54882ec8c4b4Smrg 5489b698ba48Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 5490b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5491b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5492b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5493b698ba48Smrg ;; 54942ec8c4b4Smrg 5495b698ba48Smrg sysv4*MP*) 5496b698ba48Smrg if test -d /usr/nec ;then 5497b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5498b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5499b698ba48Smrg fi 5500b698ba48Smrg ;; 55012ec8c4b4Smrg 5502b698ba48Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5503b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5504b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5505b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5506b698ba48Smrg ;; 55072ec8c4b4Smrg 5508b698ba48Smrg unicos*) 5509b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5510b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5511b698ba48Smrg ;; 55122ec8c4b4Smrg 5513b698ba48Smrg uts4*) 5514b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5515b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5516b698ba48Smrg ;; 55172ec8c4b4Smrg 5518b698ba48Smrg *) 5519b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5520b698ba48Smrg ;; 5521b698ba48Smrg esac 55222ec8c4b4Smrg fi 55232ec8c4b4Smrg]) 5524b698ba48SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 552509885543Smrg 5526b698ba48Smrg# 5527b698ba48Smrg# Check to make sure the PIC flag actually works. 5528b698ba48Smrg# 5529b698ba48Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 5530b698ba48Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 5531b698ba48Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 5532b698ba48Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 5533b698ba48Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 5534b698ba48Smrg "" | " "*) ;; 5535b698ba48Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5536b698ba48Smrg esac], 5537b698ba48Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5538b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 55392ec8c4b4Smrgfi 5540b698ba48Smrgcase $host_os in 5541b698ba48Smrg # For platforms which do not support PIC, -DPIC is meaningless: 5542b698ba48Smrg *djgpp*) 5543b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5544b698ba48Smrg ;; 5545b698ba48Smrg *) 5546b698ba48Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 5547b698ba48Smrg ;; 55482ec8c4b4Smrgesac 554909885543Smrg 5550b698ba48Smrg# 5551b698ba48Smrg# Check to make sure the static flag actually works. 5552b698ba48Smrg# 5553b698ba48Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 5554b698ba48SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5555b698ba48Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5556b698ba48Smrg $lt_tmp_static_flag, 5557b698ba48Smrg [], 5558b698ba48Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 5559b698ba48Smrg]) 556009885543Smrg 556109885543Smrg 5562b698ba48Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 5563b698ba48Smrg# ------------------------------------ 5564b698ba48Smrg# See if the linker supports building shared libraries. 5565b698ba48SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 5566b698ba48Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 5567b698ba48SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5568b698ba48Smrgifelse([$1],[CXX],[ 5569b698ba48Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5570b698ba48Smrg case $host_os in 5571b698ba48Smrg aix[[4-9]]*) 5572b698ba48Smrg # If we're using GNU nm, then we don't want the "-C" option. 5573b698ba48Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5574b698ba48Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5575b698ba48Smrg _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' 5576b698ba48Smrg else 5577b698ba48Smrg _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' 5578b698ba48Smrg fi 5579b698ba48Smrg ;; 5580b698ba48Smrg pw32*) 5581b698ba48Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5582b698ba48Smrg ;; 5583b698ba48Smrg cygwin* | mingw*) 5584b698ba48Smrg _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' 5585b698ba48Smrg ;; 5586b698ba48Smrg *) 5587b698ba48Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5588b698ba48Smrg ;; 55892ec8c4b4Smrg esac 5590b698ba48Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5591b698ba48Smrg],[ 5592b698ba48Smrg runpath_var= 5593b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 5594b698ba48Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5595b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 5596b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5597b698ba48Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 5598b698ba48Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5599b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5600b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5601b698ba48Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 5602b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5603b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5604b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5605b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5606b698ba48Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5607b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5608b698ba48Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5609b698ba48Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 5610b698ba48Smrg _LT_AC_TAGVAR(module_cmds, $1)= 5611b698ba48Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 5612b698ba48Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5613b698ba48Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5614b698ba48Smrg # include_expsyms should be a list of space-separated symbols to be *always* 5615b698ba48Smrg # included in the symbol list 5616b698ba48Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 5617b698ba48Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 5618b698ba48Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 5619b698ba48Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5620b698ba48Smrg # as well as any symbol that contains `d'. 5621b698ba48Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5622b698ba48Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5623b698ba48Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 5624b698ba48Smrg # the symbol is explicitly referenced. Since portable code cannot 5625b698ba48Smrg # rely on this symbol name, it's probably fine to never include it in 5626b698ba48Smrg # preloaded symbol tables. 5627b698ba48Smrg # Exclude shared library initialization/finalization symbols. 5628b698ba48Smrgdnl Note also adjust exclude_expsyms for C++ above. 5629b698ba48Smrg extract_expsyms_cmds= 5630b698ba48Smrg # Just being paranoid about ensuring that cc_basename is set. 5631b698ba48Smrg _LT_CC_BASENAME([$compiler]) 5632b698ba48Smrg case $host_os in 5633b698ba48Smrg cygwin* | mingw* | pw32*) 5634b698ba48Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5635b698ba48Smrg # When not using gcc, we currently assume that we are using 5636b698ba48Smrg # Microsoft Visual C++. 5637b698ba48Smrg if test "$GCC" != yes; then 5638b698ba48Smrg with_gnu_ld=no 5639b698ba48Smrg fi 5640b698ba48Smrg ;; 5641b698ba48Smrg interix*) 5642b698ba48Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5643b698ba48Smrg with_gnu_ld=yes 5644b698ba48Smrg ;; 5645b698ba48Smrg openbsd*) 5646b698ba48Smrg with_gnu_ld=no 564709885543Smrg ;; 564809885543Smrg esac 564909885543Smrg 5650b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5651b698ba48Smrg if test "$with_gnu_ld" = yes; then 5652b698ba48Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5653b698ba48Smrg wlarc='${wl}' 565409885543Smrg 5655b698ba48Smrg # Set some defaults for GNU ld with shared library support. These 5656b698ba48Smrg # are reset later if shared libraries are not supported. Putting them 5657b698ba48Smrg # here allows them to be overridden if necessary. 5658b698ba48Smrg runpath_var=LD_RUN_PATH 5659b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5660b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5661b698ba48Smrg # ancient GNU ld didn't support --whole-archive et. al. 5662b698ba48Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 5663b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5664b698ba48Smrg else 5665b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5666b698ba48Smrg fi 5667b698ba48Smrg supports_anon_versioning=no 5668b698ba48Smrg case `$LD -v 2>/dev/null` in 5669b698ba48Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5670b698ba48Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5671b698ba48Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5672b698ba48Smrg *\ 2.11.*) ;; # other 2.11 versions 5673b698ba48Smrg *) supports_anon_versioning=yes ;; 5674b698ba48Smrg esac 567509885543Smrg 5676b698ba48Smrg # See if GNU ld supports shared libraries. 5677b698ba48Smrg case $host_os in 5678b698ba48Smrg aix[[3-9]]*) 5679b698ba48Smrg # On AIX/PPC, the GNU linker is very broken 5680b698ba48Smrg if test "$host_cpu" != ia64; then 5681b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5682b698ba48Smrg cat <<EOF 1>&2 568309885543Smrg 5684b698ba48Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 5685b698ba48Smrg*** to be unable to reliably create shared libraries on AIX. 5686b698ba48Smrg*** Therefore, libtool is disabling shared libraries support. If you 5687b698ba48Smrg*** really care for shared libraries, you may want to modify your PATH 5688b698ba48Smrg*** so that a non-GNU linker is found, and then restart. 568909885543Smrg 5690b698ba48SmrgEOF 5691b698ba48Smrg fi 5692b698ba48Smrg ;; 569309885543Smrg 5694b698ba48Smrg amigaos*) 5695b698ba48Smrg _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)' 5696b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5697b698ba48Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5698b698ba48Smrg 5699b698ba48Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 5700b698ba48Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 5701b698ba48Smrg # to version 4, is to share data among multiple programs linked 5702b698ba48Smrg # with the same dynamic library. Since this doesn't match the 5703b698ba48Smrg # behavior of shared libraries on other platforms, we can't use 5704b698ba48Smrg # them. 5705b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5706b698ba48Smrg ;; 570709885543Smrg 5708b698ba48Smrg beos*) 5709b698ba48Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5710b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5711b698ba48Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5712b698ba48Smrg # support --undefined. This deserves some investigation. FIXME 5713b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5714b698ba48Smrg else 5715b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5716b698ba48Smrg fi 5717b698ba48Smrg ;; 571809885543Smrg 5719b698ba48Smrg cygwin* | mingw* | pw32*) 5720b698ba48Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5721b698ba48Smrg # as there is no search path for DLLs. 5722b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5723b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5724b698ba48Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5725b698ba48Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5726b698ba48Smrg _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' 5727b698ba48Smrg 5728b698ba48Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5729b698ba48Smrg _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' 5730b698ba48Smrg # If the export-symbols file already is a .def file (1st line 5731b698ba48Smrg # is EXPORTS), use it as is; otherwise, prepend... 5732b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5733b698ba48Smrg cp $export_symbols $output_objdir/$soname.def; 5734b698ba48Smrg else 5735b698ba48Smrg echo EXPORTS > $output_objdir/$soname.def; 5736b698ba48Smrg cat $export_symbols >> $output_objdir/$soname.def; 5737b698ba48Smrg fi~ 5738b698ba48Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5739b698ba48Smrg else 5740b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5741b698ba48Smrg fi 5742b698ba48Smrg ;; 574309885543Smrg 5744b698ba48Smrg interix[[3-9]]*) 5745b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5746b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5747b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5748b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5749b698ba48Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5750b698ba48Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5751b698ba48Smrg # default) and relocated if they conflict, which is a slow very memory 5752b698ba48Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5753b698ba48Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5754b698ba48Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5755b698ba48Smrg _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' 5756b698ba48Smrg _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' 5757b698ba48Smrg ;; 57582ec8c4b4Smrg 5759b698ba48Smrg gnu* | linux* | k*bsd*-gnu) 5760b698ba48Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5761b698ba48Smrg tmp_addflag= 5762b698ba48Smrg case $cc_basename,$host_cpu in 5763b698ba48Smrg pgcc*) # Portland Group C compiler 5764b698ba48Smrg _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' 5765b698ba48Smrg tmp_addflag=' $pic_flag' 5766b698ba48Smrg ;; 5767b698ba48Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 5768b698ba48Smrg _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' 5769b698ba48Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 5770b698ba48Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5771b698ba48Smrg tmp_addflag=' -i_dynamic' ;; 5772b698ba48Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5773b698ba48Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5774b698ba48Smrg ifc* | ifort*) # Intel Fortran compiler 5775b698ba48Smrg tmp_addflag=' -nofor_main' ;; 5776b698ba48Smrg esac 5777b698ba48Smrg case `$CC -V 2>&1 | sed 5q` in 5778b698ba48Smrg *Sun\ C*) # Sun C 5.9 5779b698ba48Smrg _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' 5780b698ba48Smrg tmp_sharedflag='-G' ;; 5781b698ba48Smrg *Sun\ F*) # Sun Fortran 8.3 5782b698ba48Smrg tmp_sharedflag='-G' ;; 5783b698ba48Smrg *) 5784b698ba48Smrg tmp_sharedflag='-shared' ;; 5785b698ba48Smrg esac 5786b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 57872ec8c4b4Smrg 5788b698ba48Smrg if test $supports_anon_versioning = yes; then 5789b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 5790b698ba48Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5791b698ba48Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 5792b698ba48Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5793b698ba48Smrg fi 5794b698ba48Smrg else 5795b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5796b698ba48Smrg fi 5797b698ba48Smrg ;; 57982ec8c4b4Smrg 5799b698ba48Smrg netbsd*) 5800b698ba48Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5801b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5802b698ba48Smrg wlarc= 5803b698ba48Smrg else 5804b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5805b698ba48Smrg _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' 5806b698ba48Smrg fi 5807b698ba48Smrg ;; 58082ec8c4b4Smrg 5809b698ba48Smrg solaris*) 5810b698ba48Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 5811b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5812b698ba48Smrg cat <<EOF 1>&2 581309885543Smrg 5814b698ba48Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5815b698ba48Smrg*** create shared libraries on Solaris systems. Therefore, libtool 5816b698ba48Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5817b698ba48Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 5818b698ba48Smrg*** your PATH or compiler configuration so that the native linker is 5819b698ba48Smrg*** used, and then restart. 582009885543Smrg 5821b698ba48SmrgEOF 5822b698ba48Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5823b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5824b698ba48Smrg _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' 5825b698ba48Smrg else 5826b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5827b698ba48Smrg fi 5828b698ba48Smrg ;; 582909885543Smrg 5830b698ba48Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5831b698ba48Smrg case `$LD -v 2>&1` in 5832b698ba48Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5833b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5834b698ba48Smrg cat <<_LT_EOF 1>&2 583509885543Smrg 5836b698ba48Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5837b698ba48Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5838b698ba48Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5839b698ba48Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5840b698ba48Smrg*** your PATH or compiler configuration so that the native linker is 5841b698ba48Smrg*** used, and then restart. 584209885543Smrg 5843b698ba48Smrg_LT_EOF 5844b698ba48Smrg ;; 5845b698ba48Smrg *) 5846b698ba48Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5847b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 5848b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 5849b698ba48Smrg _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' 5850b698ba48Smrg else 5851b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5852b698ba48Smrg fi 5853b698ba48Smrg ;; 5854b698ba48Smrg esac 5855b698ba48Smrg ;; 585609885543Smrg 5857b698ba48Smrg sunos4*) 5858b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5859b698ba48Smrg wlarc= 5860b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5861b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5862b698ba48Smrg ;; 586309885543Smrg 5864b698ba48Smrg *) 5865b698ba48Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5866b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5867b698ba48Smrg _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' 5868b698ba48Smrg else 5869b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5870b698ba48Smrg fi 5871b698ba48Smrg ;; 5872b698ba48Smrg esac 587309885543Smrg 5874b698ba48Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 5875b698ba48Smrg runpath_var= 5876b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5877b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5878b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5879b698ba48Smrg fi 5880b698ba48Smrg else 5881b698ba48Smrg # PORTME fill in a description of your system's linker (not GNU ld) 5882b698ba48Smrg case $host_os in 5883b698ba48Smrg aix3*) 5884b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5885b698ba48Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5886b698ba48Smrg _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' 5887b698ba48Smrg # Note: this linker hardcodes the directories in LIBPATH if there 5888b698ba48Smrg # are no directories specified by -L. 5889b698ba48Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5890b698ba48Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 5891b698ba48Smrg # Neither direct hardcoding nor static linking is supported with a 5892b698ba48Smrg # broken collect2. 5893b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5894b698ba48Smrg fi 5895b698ba48Smrg ;; 589609885543Smrg 5897b698ba48Smrg aix[[4-9]]*) 5898b698ba48Smrg if test "$host_cpu" = ia64; then 5899b698ba48Smrg # On IA64, the linker does run time linking by default, so we don't 5900b698ba48Smrg # have to do anything special. 5901b698ba48Smrg aix_use_runtimelinking=no 5902b698ba48Smrg exp_sym_flag='-Bexport' 5903b698ba48Smrg no_entry_flag="" 5904b698ba48Smrg else 5905b698ba48Smrg # If we're using GNU nm, then we don't want the "-C" option. 5906b698ba48Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5907b698ba48Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5908b698ba48Smrg _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' 5909b698ba48Smrg else 5910b698ba48Smrg _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' 5911b698ba48Smrg fi 5912b698ba48Smrg aix_use_runtimelinking=no 591309885543Smrg 5914b698ba48Smrg # Test if we are trying to use run time linking or normal 5915b698ba48Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5916b698ba48Smrg # need to do runtime linking. 5917b698ba48Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5918b698ba48Smrg for ld_flag in $LDFLAGS; do 5919b698ba48Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5920b698ba48Smrg aix_use_runtimelinking=yes 5921b698ba48Smrg break 5922b698ba48Smrg fi 5923b698ba48Smrg done 5924b698ba48Smrg ;; 5925b698ba48Smrg esac 592609885543Smrg 5927b698ba48Smrg exp_sym_flag='-bexport' 5928b698ba48Smrg no_entry_flag='-bnoentry' 5929b698ba48Smrg fi 593009885543Smrg 5931b698ba48Smrg # When large executables or shared objects are built, AIX ld can 5932b698ba48Smrg # have problems creating the table of contents. If linking a library 5933b698ba48Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5934b698ba48Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5935b698ba48Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 593609885543Smrg 5937b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 5938b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5939b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5940b698ba48Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 594109885543Smrg 5942b698ba48Smrg if test "$GCC" = yes; then 5943b698ba48Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5944b698ba48Smrg # We only want to do this on AIX 4.2 and lower, the check 5945b698ba48Smrg # below for broken collect2 doesn't work under 4.3+ 5946b698ba48Smrg collect2name=`${CC} -print-prog-name=collect2` 5947b698ba48Smrg if test -f "$collect2name" && \ 5948b698ba48Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 5949b698ba48Smrg then 5950b698ba48Smrg # We have reworked collect2 5951b698ba48Smrg : 5952b698ba48Smrg else 5953b698ba48Smrg # We have old collect2 5954b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5955b698ba48Smrg # It fails to find uninstalled libraries when the uninstalled 5956b698ba48Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5957b698ba48Smrg # to unsupported forces relinking 5958b698ba48Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5959b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5960b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5961b698ba48Smrg fi 5962b698ba48Smrg ;; 5963b698ba48Smrg esac 5964b698ba48Smrg shared_flag='-shared' 5965b698ba48Smrg if test "$aix_use_runtimelinking" = yes; then 5966b698ba48Smrg shared_flag="$shared_flag "'${wl}-G' 5967b698ba48Smrg fi 5968b698ba48Smrg else 5969b698ba48Smrg # not using gcc 5970b698ba48Smrg if test "$host_cpu" = ia64; then 5971b698ba48Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5972b698ba48Smrg # chokes on -Wl,-G. The following line is correct: 5973b698ba48Smrg shared_flag='-G' 5974b698ba48Smrg else 5975b698ba48Smrg if test "$aix_use_runtimelinking" = yes; then 5976b698ba48Smrg shared_flag='${wl}-G' 5977b698ba48Smrg else 5978b698ba48Smrg shared_flag='${wl}-bM:SRE' 5979b698ba48Smrg fi 5980b698ba48Smrg fi 5981b698ba48Smrg fi 598209885543Smrg 5983b698ba48Smrg # It seems that -bexpall does not export symbols beginning with 5984b698ba48Smrg # underscore (_), so it is better to generate a list of symbols to export. 5985b698ba48Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5986b698ba48Smrg if test "$aix_use_runtimelinking" = yes; then 5987b698ba48Smrg # Warning - without using the other runtime loading flags (-brtl), 5988b698ba48Smrg # -berok will link without error, but may produce a broken library. 5989b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5990b698ba48Smrg # Determine the default libpath from the value encoded in an empty executable. 5991b698ba48Smrg _LT_AC_SYS_LIBPATH_AIX 5992b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5993b698ba48Smrg _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" 5994b698ba48Smrg else 5995b698ba48Smrg if test "$host_cpu" = ia64; then 5996b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5997b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5998b698ba48Smrg _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" 5999b698ba48Smrg else 6000b698ba48Smrg # Determine the default libpath from the value encoded in an empty executable. 6001b698ba48Smrg _LT_AC_SYS_LIBPATH_AIX 6002b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6003b698ba48Smrg # Warning - without using the other run time loading flags, 6004b698ba48Smrg # -berok will link without error, but may produce a broken library. 6005b698ba48Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6006b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6007b698ba48Smrg # Exported symbols can be pulled into shared objects from archives 6008b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6009b698ba48Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6010b698ba48Smrg # This is similar to how AIX traditionally builds its shared libraries. 6011b698ba48Smrg _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' 6012b698ba48Smrg fi 6013b698ba48Smrg fi 6014b698ba48Smrg ;; 601509885543Smrg 6016b698ba48Smrg amigaos*) 6017b698ba48Smrg _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)' 6018b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6019b698ba48Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6020b698ba48Smrg # see comment about different semantics on the GNU ld section 6021b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6022b698ba48Smrg ;; 602309885543Smrg 6024b698ba48Smrg bsdi[[45]]*) 6025b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6026b698ba48Smrg ;; 602709885543Smrg 6028b698ba48Smrg cygwin* | mingw* | pw32*) 6029b698ba48Smrg # When not using gcc, we currently assume that we are using 6030b698ba48Smrg # Microsoft Visual C++. 6031b698ba48Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6032b698ba48Smrg # no search path for DLLs. 6033b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6034b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6035b698ba48Smrg # Tell ltmain to make .lib files, not .a files. 6036b698ba48Smrg libext=lib 6037b698ba48Smrg # Tell ltmain to make .dll files, not .so files. 6038b698ba48Smrg shrext_cmds=".dll" 6039b698ba48Smrg # FIXME: Setting linknames here is a bad hack. 6040b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 6041b698ba48Smrg # The linker will automatically build a .lib file if we build a DLL. 6042b698ba48Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 6043b698ba48Smrg # FIXME: Should let the user specify the lib program. 6044b698ba48Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6045b698ba48Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 6046b698ba48Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6047b698ba48Smrg ;; 604809885543Smrg 6049b698ba48Smrg darwin* | rhapsody*) 6050b698ba48Smrg case $host_os in 6051b698ba48Smrg rhapsody* | darwin1.[[012]]) 6052b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 6053b698ba48Smrg ;; 6054b698ba48Smrg *) # Darwin 1.3 on 6055b698ba48Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 6056b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6057b698ba48Smrg else 6058b698ba48Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 6059b698ba48Smrg 10.[[012]]) 6060b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6061b698ba48Smrg ;; 6062b698ba48Smrg 10.*) 6063b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 6064b698ba48Smrg ;; 6065b698ba48Smrg esac 6066b698ba48Smrg fi 6067b698ba48Smrg ;; 6068b698ba48Smrg esac 6069b698ba48Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6070b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6071b698ba48Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 6072b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6073b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 6074b698ba48Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6075b698ba48Smrg if test "$GCC" = yes ; then 6076b698ba48Smrg output_verbose_link_cmd='echo' 6077b698ba48Smrg _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}" 6078b698ba48Smrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 6079b698ba48Smrg _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}" 6080b698ba48Smrg _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}" 6081b698ba48Smrg else 6082b698ba48Smrg case $cc_basename in 6083b698ba48Smrg xlc*) 6084b698ba48Smrg output_verbose_link_cmd='echo' 6085b698ba48Smrg _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' 6086b698ba48Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 6087b698ba48Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 6088b698ba48Smrg _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}' 6089b698ba48Smrg _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}' 6090b698ba48Smrg ;; 6091b698ba48Smrg *) 6092b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6093b698ba48Smrg ;; 6094b698ba48Smrg esac 6095b698ba48Smrg fi 6096b698ba48Smrg ;; 609709885543Smrg 6098b698ba48Smrg dgux*) 6099b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6100b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6101b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6102b698ba48Smrg ;; 610309885543Smrg 6104b698ba48Smrg freebsd1*) 6105b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6106b698ba48Smrg ;; 610709885543Smrg 6108b698ba48Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6109b698ba48Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 6110b698ba48Smrg # does not break anything, and helps significantly (at the cost of a little 6111b698ba48Smrg # extra space). 6112b698ba48Smrg freebsd2.2*) 6113b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6114b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6115b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6116b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6117b698ba48Smrg ;; 611809885543Smrg 6119b698ba48Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6120b698ba48Smrg freebsd2*) 6121b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6122b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6123b698ba48Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6124b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 612509885543Smrg ;; 612609885543Smrg 6127b698ba48Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6128b698ba48Smrg freebsd* | dragonfly*) 6129b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 6130b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6131b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6132b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6133b698ba48Smrg ;; 613409885543Smrg 6135b698ba48Smrg hpux9*) 6136b698ba48Smrg if test "$GCC" = yes; then 6137b698ba48Smrg _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' 6138b698ba48Smrg else 6139b698ba48Smrg _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' 6140b698ba48Smrg fi 6141b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6142b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6143b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 614409885543Smrg 6145b698ba48Smrg # hardcode_minus_L: Not really in the search PATH, 6146b698ba48Smrg # but as the default location of the library. 6147b698ba48Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6148b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6149b698ba48Smrg ;; 615009885543Smrg 6151b698ba48Smrg hpux10*) 6152b698ba48Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6153b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6154b698ba48Smrg else 6155b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6156b698ba48Smrg fi 6157b698ba48Smrg if test "$with_gnu_ld" = no; then 6158b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6159b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 616009885543Smrg 6161b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6162b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 616309885543Smrg 6164b698ba48Smrg # hardcode_minus_L: Not really in the search PATH, 6165b698ba48Smrg # but as the default location of the library. 6166b698ba48Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6167b698ba48Smrg fi 6168b698ba48Smrg ;; 616909885543Smrg 6170b698ba48Smrg hpux11*) 6171b698ba48Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6172b698ba48Smrg case $host_cpu in 6173b698ba48Smrg hppa*64*) 6174b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6175b698ba48Smrg ;; 6176b698ba48Smrg ia64*) 6177b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6178b698ba48Smrg ;; 6179b698ba48Smrg *) 6180b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6181b698ba48Smrg ;; 6182b698ba48Smrg esac 6183b698ba48Smrg else 6184b698ba48Smrg case $host_cpu in 6185b698ba48Smrg hppa*64*) 6186b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6187b698ba48Smrg ;; 6188b698ba48Smrg ia64*) 6189b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6190b698ba48Smrg ;; 6191b698ba48Smrg *) 6192b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6193b698ba48Smrg ;; 6194b698ba48Smrg esac 6195b698ba48Smrg fi 6196b698ba48Smrg if test "$with_gnu_ld" = no; then 6197b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6198b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 619909885543Smrg 6200b698ba48Smrg case $host_cpu in 6201b698ba48Smrg hppa*64*|ia64*) 6202b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 6203b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6204b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6205b698ba48Smrg ;; 6206b698ba48Smrg *) 6207b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6208b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62092ec8c4b4Smrg 6210b698ba48Smrg # hardcode_minus_L: Not really in the search PATH, 6211b698ba48Smrg # but as the default location of the library. 6212b698ba48Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6213b698ba48Smrg ;; 6214b698ba48Smrg esac 6215b698ba48Smrg fi 621609885543Smrg ;; 621709885543Smrg 6218b698ba48Smrg irix5* | irix6* | nonstopux*) 6219b698ba48Smrg if test "$GCC" = yes; then 6220b698ba48Smrg _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' 6221b698ba48Smrg else 6222b698ba48Smrg _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' 6223b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6224b698ba48Smrg fi 6225b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6226b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6227b698ba48Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6228b698ba48Smrg ;; 622909885543Smrg 6230b698ba48Smrg netbsd*) 6231b698ba48Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6232b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6233b698ba48Smrg else 6234b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6235b698ba48Smrg fi 6236b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6237b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6238b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6239b698ba48Smrg ;; 624009885543Smrg 6241b698ba48Smrg newsos6) 6242b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6243b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6244b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6245b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6246b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6247b698ba48Smrg ;; 624809885543Smrg 6249b698ba48Smrg openbsd*) 6250b698ba48Smrg if test -f /usr/libexec/ld.so; then 6251b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6252b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6253b698ba48Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6254b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6255b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6256b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6257b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6258b698ba48Smrg else 6259b698ba48Smrg case $host_os in 6260b698ba48Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6261b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6262b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6263b698ba48Smrg ;; 6264b698ba48Smrg *) 6265b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6266b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6267b698ba48Smrg ;; 6268b698ba48Smrg esac 6269b698ba48Smrg fi 6270b698ba48Smrg else 6271b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6272b698ba48Smrg fi 6273b698ba48Smrg ;; 627409885543Smrg 6275b698ba48Smrg os2*) 6276b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6277b698ba48Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6278b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6279b698ba48Smrg _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' 6280b698ba48Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6281b698ba48Smrg ;; 628209885543Smrg 6283b698ba48Smrg osf3*) 6284b698ba48Smrg if test "$GCC" = yes; then 6285b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6286b698ba48Smrg _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' 6287b698ba48Smrg else 6288b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6289b698ba48Smrg _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' 6290b698ba48Smrg fi 6291b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6292b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6293b698ba48Smrg ;; 629409885543Smrg 6295b698ba48Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 6296b698ba48Smrg if test "$GCC" = yes; then 6297b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6298b698ba48Smrg _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' 6299b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6300b698ba48Smrg else 6301b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6302b698ba48Smrg _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' 6303b698ba48Smrg _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~ 6304b698ba48Smrg $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' 630509885543Smrg 6306b698ba48Smrg # Both c and cxx compiler support -rpath directly 6307b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6308b698ba48Smrg fi 6309b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6310b698ba48Smrg ;; 631109885543Smrg 6312b698ba48Smrg solaris*) 6313b698ba48Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6314b698ba48Smrg if test "$GCC" = yes; then 6315b698ba48Smrg wlarc='${wl}' 6316b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6317b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6318b698ba48Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 6319b698ba48Smrg else 6320b698ba48Smrg wlarc='' 6321b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6322b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6323b698ba48Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6324b698ba48Smrg fi 6325b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6326b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6327b698ba48Smrg case $host_os in 6328b698ba48Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6329b698ba48Smrg *) 6330b698ba48Smrg # The compiler driver will combine and reorder linker options, 6331b698ba48Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 6332b698ba48Smrg # but is careful enough not to reorder. 6333b698ba48Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6334b698ba48Smrg if test "$GCC" = yes; then 6335b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6336b698ba48Smrg else 6337b698ba48Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 63387104f784Smrg fi 6339b698ba48Smrg ;; 6340b698ba48Smrg esac 6341b698ba48Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 634209885543Smrg ;; 634309885543Smrg 6344b698ba48Smrg sunos4*) 6345b698ba48Smrg if test "x$host_vendor" = xsequent; then 6346b698ba48Smrg # Use $CC to link under sequent, because it throws in some extra .o 6347b698ba48Smrg # files that make .init and .fini sections work. 6348b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6349b698ba48Smrg else 6350b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6351b698ba48Smrg fi 6352b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6353b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6354b698ba48Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6355b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6356b698ba48Smrg ;; 635709885543Smrg 6358b698ba48Smrg sysv4) 6359b698ba48Smrg case $host_vendor in 6360b698ba48Smrg sni) 6361b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6362b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6363b698ba48Smrg ;; 6364b698ba48Smrg siemens) 6365b698ba48Smrg ## LD is ld it makes a PLAMLIB 6366b698ba48Smrg ## CC just makes a GrossModule. 6367b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6368b698ba48Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6369b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6370b698ba48Smrg ;; 6371b698ba48Smrg motorola) 6372b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6373b698ba48Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6374b698ba48Smrg ;; 6375b698ba48Smrg esac 6376b698ba48Smrg runpath_var='LD_RUN_PATH' 6377b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6378b698ba48Smrg ;; 637909885543Smrg 6380b698ba48Smrg sysv4.3*) 6381b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6382b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6383b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6384b698ba48Smrg ;; 638509885543Smrg 6386b698ba48Smrg sysv4*MP*) 6387b698ba48Smrg if test -d /usr/nec; then 6388b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6389b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6390b698ba48Smrg runpath_var=LD_RUN_PATH 6391b698ba48Smrg hardcode_runpath_var=yes 6392b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6393b698ba48Smrg fi 6394b698ba48Smrg ;; 639509885543Smrg 6396b698ba48Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6397b698ba48Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6398b698ba48Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6399b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6400b698ba48Smrg runpath_var='LD_RUN_PATH' 640109885543Smrg 6402b698ba48Smrg if test "$GCC" = yes; then 6403b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6404b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6405b698ba48Smrg else 6406b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6407b698ba48Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6408b698ba48Smrg fi 6409b698ba48Smrg ;; 641009885543Smrg 6411b698ba48Smrg sysv5* | sco3.2v5* | sco5v6*) 6412b698ba48Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6413b698ba48Smrg # link with -lc, and that would cause any symbols used from libc to 6414b698ba48Smrg # always be unresolved, which means just about no library would 6415b698ba48Smrg # ever link correctly. If we're not using GNU ld we use -z text 6416b698ba48Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6417b698ba48Smrg # as -z defs. 6418b698ba48Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6419b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6420b698ba48Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6421b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6422b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 6423b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 6424b698ba48Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6425b698ba48Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6426b698ba48Smrg runpath_var='LD_RUN_PATH' 642709885543Smrg 6428b698ba48Smrg if test "$GCC" = yes; then 6429b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6430b698ba48Smrg _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' 6431b698ba48Smrg else 6432b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6433b698ba48Smrg _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' 6434b698ba48Smrg fi 6435b698ba48Smrg ;; 643609885543Smrg 6437b698ba48Smrg uts4*) 6438b698ba48Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6439b698ba48Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6440b698ba48Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6441b698ba48Smrg ;; 64422ec8c4b4Smrg 6443b698ba48Smrg *) 6444b698ba48Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6445b698ba48Smrg ;; 6446b698ba48Smrg esac 6447b698ba48Smrg fi 644809885543Smrg]) 6449b698ba48SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 6450b698ba48Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 645109885543Smrg 6452b698ba48Smrg# 6453b698ba48Smrg# Do we need to explicitly link libc? 6454b698ba48Smrg# 6455b698ba48Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6456b698ba48Smrgx|xyes) 6457b698ba48Smrg # Assume -lc should be added 6458b698ba48Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 645909885543Smrg 6460b698ba48Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 6461b698ba48Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 6462b698ba48Smrg *'~'*) 6463b698ba48Smrg # FIXME: we may have to deal with multi-command sequences. 6464b698ba48Smrg ;; 6465b698ba48Smrg '$CC '*) 6466b698ba48Smrg # Test whether the compiler implicitly links with -lc since on some 6467b698ba48Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6468b698ba48Smrg # to ld, don't add -lc before -lgcc. 6469b698ba48Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6470b698ba48Smrg $rm conftest* 6471b698ba48Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 647209885543Smrg 6473b698ba48Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6474b698ba48Smrg soname=conftest 6475b698ba48Smrg lib=conftest 6476b698ba48Smrg libobjs=conftest.$ac_objext 6477b698ba48Smrg deplibs= 6478b698ba48Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6479b698ba48Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 6480b698ba48Smrg compiler_flags=-v 6481b698ba48Smrg linker_flags=-v 6482b698ba48Smrg verstring= 6483b698ba48Smrg output_objdir=. 6484b698ba48Smrg libname=conftest 6485b698ba48Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 6486b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6487b698ba48Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 6488b698ba48Smrg then 6489b698ba48Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6490b698ba48Smrg else 6491b698ba48Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6492b698ba48Smrg fi 6493b698ba48Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6494b698ba48Smrg else 6495b698ba48Smrg cat conftest.err 1>&5 6496b698ba48Smrg fi 6497b698ba48Smrg $rm conftest* 6498b698ba48Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 6499b698ba48Smrg ;; 6500b698ba48Smrg esac 6501b698ba48Smrg fi 6502b698ba48Smrg ;; 6503b698ba48Smrgesac 6504b698ba48Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 650509885543Smrg 650609885543Smrg 6507b698ba48Smrg# _LT_AC_FILE_LTDLL_C 6508b698ba48Smrg# ------------------- 6509b698ba48Smrg# Be careful that the start marker always follows a newline. 6510b698ba48SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 6511b698ba48Smrg# /* ltdll.c starts here */ 6512b698ba48Smrg# #define WIN32_LEAN_AND_MEAN 6513b698ba48Smrg# #include <windows.h> 6514b698ba48Smrg# #undef WIN32_LEAN_AND_MEAN 6515b698ba48Smrg# #include <stdio.h> 651609885543Smrg# 6517b698ba48Smrg# #ifndef __CYGWIN__ 6518b698ba48Smrg# # ifdef __CYGWIN32__ 6519b698ba48Smrg# # define __CYGWIN__ __CYGWIN32__ 6520b698ba48Smrg# # endif 6521b698ba48Smrg# #endif 652209885543Smrg# 6523b698ba48Smrg# #ifdef __cplusplus 6524b698ba48Smrg# extern "C" { 6525b698ba48Smrg# #endif 6526b698ba48Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 6527b698ba48Smrg# #ifdef __cplusplus 6528b698ba48Smrg# } 6529b698ba48Smrg# #endif 653009885543Smrg# 6531b698ba48Smrg# #ifdef __CYGWIN__ 6532b698ba48Smrg# #include <cygwin/cygwin_dll.h> 6533b698ba48Smrg# DECLARE_CYGWIN_DLL( DllMain ); 6534b698ba48Smrg# #endif 6535b698ba48Smrg# HINSTANCE __hDllInstance_base; 6536b698ba48Smrg# 6537b698ba48Smrg# BOOL APIENTRY 6538b698ba48Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 6539b698ba48Smrg# { 6540b698ba48Smrg# __hDllInstance_base = hInst; 6541b698ba48Smrg# return TRUE; 6542b698ba48Smrg# } 6543b698ba48Smrg# /* ltdll.c ends here */ 6544b698ba48Smrg])# _LT_AC_FILE_LTDLL_C 654509885543Smrg 654609885543Smrg 6547b698ba48Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 6548b698ba48Smrg# --------------------------------- 6549b698ba48SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 655009885543Smrg 655109885543Smrg 6552b698ba48Smrg# old names 6553b698ba48SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 6554b698ba48SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 6555b698ba48SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 6556b698ba48SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 6557b698ba48SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 6558b698ba48SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 6559b698ba48SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 656009885543Smrg 6561b698ba48Smrg# This is just to silence aclocal about the macro not being used 6562b698ba48Smrgifelse([AC_DISABLE_FAST_INSTALL]) 656309885543Smrg 6564b698ba48SmrgAC_DEFUN([LT_AC_PROG_GCJ], 6565b698ba48Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 6566b698ba48Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6567b698ba48Smrg AC_SUBST(GCJFLAGS) 6568b698ba48Smrg]) 65692ec8c4b4Smrg 6570b698ba48SmrgAC_DEFUN([LT_AC_PROG_RC], 6571b698ba48Smrg[AC_CHECK_TOOL(RC, windres, no) 657209885543Smrg]) 657309885543Smrg 65747104f784Smrg 6575b698ba48Smrg# Cheap backport of AS_EXECUTABLE_P and required macros 6576b698ba48Smrg# from Autoconf 2.59; we should not use $as_executable_p directly. 65777104f784Smrg 6578b698ba48Smrg# _AS_TEST_PREPARE 6579b698ba48Smrg# ---------------- 6580b698ba48Smrgm4_ifndef([_AS_TEST_PREPARE], 6581b698ba48Smrg[m4_defun([_AS_TEST_PREPARE], 6582b698ba48Smrg[if test -x / >/dev/null 2>&1; then 6583b698ba48Smrg as_executable_p='test -x' 6584b698ba48Smrgelse 6585b698ba48Smrg as_executable_p='test -f' 6586b698ba48Smrgfi 6587b698ba48Smrg])])# _AS_TEST_PREPARE 65887104f784Smrg 6589b698ba48Smrg# AS_EXECUTABLE_P 6590b698ba48Smrg# --------------- 6591b698ba48Smrg# Check whether a file is executable. 6592b698ba48Smrgm4_ifndef([AS_EXECUTABLE_P], 6593b698ba48Smrg[m4_defun([AS_EXECUTABLE_P], 6594b698ba48Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl 6595b698ba48Smrg$as_executable_p $1[]dnl 6596b698ba48Smrg])])# AS_EXECUTABLE_P 65977104f784Smrg 6598b698ba48Smrg# NOTE: This macro has been submitted for inclusion into # 6599b698ba48Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 6600b698ba48Smrg# a released version of Autoconf we should remove this # 6601b698ba48Smrg# macro and use it instead. # 6602b698ba48Smrg# LT_AC_PROG_SED 6603b698ba48Smrg# -------------- 6604b698ba48Smrg# Check for a fully-functional sed program, that truncates 6605b698ba48Smrg# as few characters as possible. Prefer GNU sed if found. 6606b698ba48SmrgAC_DEFUN([LT_AC_PROG_SED], 6607b698ba48Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 6608b698ba48SmrgAC_CACHE_VAL(lt_cv_path_SED, 6609b698ba48Smrg[# Loop through the user's path and test for sed and gsed. 6610b698ba48Smrg# Then use that list of sed's as ones to test for truncation. 6611b698ba48Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6612b698ba48Smrgfor as_dir in $PATH 6613b698ba48Smrgdo 6614b698ba48Smrg IFS=$as_save_IFS 6615b698ba48Smrg test -z "$as_dir" && as_dir=. 6616b698ba48Smrg for lt_ac_prog in sed gsed; do 6617b698ba48Smrg for ac_exec_ext in '' $ac_executable_extensions; do 6618b698ba48Smrg if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 6619b698ba48Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 6620b698ba48Smrg fi 6621b698ba48Smrg done 6622b698ba48Smrg done 6623b698ba48Smrgdone 6624b698ba48SmrgIFS=$as_save_IFS 6625b698ba48Smrglt_ac_max=0 6626b698ba48Smrglt_ac_count=0 6627b698ba48Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 6628b698ba48Smrg# along with /bin/sed that truncates output. 6629b698ba48Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 6630b698ba48Smrg test ! -f $lt_ac_sed && continue 6631b698ba48Smrg cat /dev/null > conftest.in 6632b698ba48Smrg lt_ac_count=0 6633b698ba48Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 6634b698ba48Smrg # Check for GNU sed and select it if it is found. 6635b698ba48Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 6636b698ba48Smrg lt_cv_path_SED=$lt_ac_sed 6637b698ba48Smrg break 6638b698ba48Smrg fi 6639b698ba48Smrg while true; do 6640b698ba48Smrg cat conftest.in conftest.in >conftest.tmp 6641b698ba48Smrg mv conftest.tmp conftest.in 6642b698ba48Smrg cp conftest.in conftest.nl 6643b698ba48Smrg echo >>conftest.nl 6644b698ba48Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 6645b698ba48Smrg cmp -s conftest.out conftest.nl || break 6646b698ba48Smrg # 10000 chars as input seems more than enough 6647b698ba48Smrg test $lt_ac_count -gt 10 && break 6648b698ba48Smrg lt_ac_count=`expr $lt_ac_count + 1` 6649b698ba48Smrg if test $lt_ac_count -gt $lt_ac_max; then 6650b698ba48Smrg lt_ac_max=$lt_ac_count 6651b698ba48Smrg lt_cv_path_SED=$lt_ac_sed 6652b698ba48Smrg fi 6653b698ba48Smrg done 6654b698ba48Smrgdone 6655b698ba48Smrg]) 6656b698ba48SmrgSED=$lt_cv_path_SED 6657b698ba48SmrgAC_SUBST([SED]) 6658b698ba48SmrgAC_MSG_RESULT([$SED]) 665909885543Smrg]) 66602ec8c4b4Smrg 666109885543Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 666209885543Smrg# 666309885543Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 666409885543Smrg# 666509885543Smrg# This program is free software; you can redistribute it and/or modify 666609885543Smrg# it under the terms of the GNU General Public License as published by 666709885543Smrg# the Free Software Foundation; either version 2 of the License, or 666809885543Smrg# (at your option) any later version. 666909885543Smrg# 667009885543Smrg# This program is distributed in the hope that it will be useful, but 667109885543Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 667209885543Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 667309885543Smrg# General Public License for more details. 667409885543Smrg# 667509885543Smrg# You should have received a copy of the GNU General Public License 667609885543Smrg# along with this program; if not, write to the Free Software 667709885543Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 667809885543Smrg# 667909885543Smrg# As a special exception to the GNU General Public License, if you 668009885543Smrg# distribute this file as part of a program that contains a 668109885543Smrg# configuration script generated by Autoconf, you may include it under 668209885543Smrg# the same distribution terms that you use for the rest of that program. 668309885543Smrg 668409885543Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 668509885543Smrg# ---------------------------------- 668609885543SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 668709885543Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 668809885543Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 668909885543SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 669009885543Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 669109885543Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 669209885543Smrgfi 669309885543Smrgif test -n "$PKG_CONFIG"; then 669409885543Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 669509885543Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 669609885543Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 669709885543Smrg AC_MSG_RESULT([yes]) 669809885543Smrg else 669909885543Smrg AC_MSG_RESULT([no]) 670009885543Smrg PKG_CONFIG="" 670109885543Smrg fi 670209885543Smrg 670309885543Smrgfi[]dnl 670409885543Smrg])# PKG_PROG_PKG_CONFIG 670509885543Smrg 670609885543Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 670709885543Smrg# 670809885543Smrg# Check to see whether a particular set of modules exists. Similar 670909885543Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 671009885543Smrg# 671109885543Smrg# 671209885543Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 671309885543Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 671409885543Smrg# PKG_CHECK_EXISTS manually 671509885543Smrg# -------------------------------------------------------------- 671609885543SmrgAC_DEFUN([PKG_CHECK_EXISTS], 671709885543Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 671809885543Smrgif test -n "$PKG_CONFIG" && \ 671909885543Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 672009885543Smrg m4_ifval([$2], [$2], [:]) 672109885543Smrgm4_ifvaln([$3], [else 672209885543Smrg $3])dnl 672309885543Smrgfi]) 672409885543Smrg 672509885543Smrg 672609885543Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 672709885543Smrg# --------------------------------------------- 672809885543Smrgm4_define([_PKG_CONFIG], 67297104f784Smrg[if test -n "$$1"; then 67307104f784Smrg pkg_cv_[]$1="$$1" 67317104f784Smrg elif test -n "$PKG_CONFIG"; then 67327104f784Smrg PKG_CHECK_EXISTS([$3], 67337104f784Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 67347104f784Smrg [pkg_failed=yes]) 67357104f784Smrg else 67367104f784Smrg pkg_failed=untried 673709885543Smrgfi[]dnl 673809885543Smrg])# _PKG_CONFIG 673909885543Smrg 674009885543Smrg# _PKG_SHORT_ERRORS_SUPPORTED 674109885543Smrg# ----------------------------- 674209885543SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 674309885543Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 674409885543Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 674509885543Smrg _pkg_short_errors_supported=yes 674609885543Smrgelse 674709885543Smrg _pkg_short_errors_supported=no 674809885543Smrgfi[]dnl 674909885543Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 675009885543Smrg 675109885543Smrg 675209885543Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 675309885543Smrg# [ACTION-IF-NOT-FOUND]) 675409885543Smrg# 675509885543Smrg# 675609885543Smrg# Note that if there is a possibility the first call to 675709885543Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 675809885543Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 675909885543Smrg# 676009885543Smrg# 676109885543Smrg# -------------------------------------------------------------- 676209885543SmrgAC_DEFUN([PKG_CHECK_MODULES], 676309885543Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 676409885543SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 676509885543SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 676609885543Smrg 676709885543Smrgpkg_failed=no 676809885543SmrgAC_MSG_CHECKING([for $1]) 676909885543Smrg 677009885543Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 677109885543Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 677209885543Smrg 677309885543Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 677409885543Smrgand $1[]_LIBS to avoid the need to call pkg-config. 677509885543SmrgSee the pkg-config man page for more details.]) 677609885543Smrg 677709885543Smrgif test $pkg_failed = yes; then 677809885543Smrg _PKG_SHORT_ERRORS_SUPPORTED 677909885543Smrg if test $_pkg_short_errors_supported = yes; then 67807104f784Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 678109885543Smrg else 67827104f784Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 678309885543Smrg fi 678409885543Smrg # Put the nasty error message in config.log where it belongs 678509885543Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 678609885543Smrg 678709885543Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 678809885543Smrg[Package requirements ($2) were not met: 678909885543Smrg 679009885543Smrg$$1_PKG_ERRORS 679109885543Smrg 679209885543SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 679309885543Smrginstalled software in a non-standard prefix. 679409885543Smrg 679509885543Smrg_PKG_TEXT 679609885543Smrg])], 679709885543Smrg [AC_MSG_RESULT([no]) 679809885543Smrg $4]) 679909885543Smrgelif test $pkg_failed = untried; then 680009885543Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 680109885543Smrg[The pkg-config script could not be found or is too old. Make sure it 680209885543Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 680309885543Smrgpath to pkg-config. 680409885543Smrg 680509885543Smrg_PKG_TEXT 680609885543Smrg 68077104f784SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 680809885543Smrg [$4]) 680909885543Smrgelse 681009885543Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 681109885543Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 681209885543Smrg AC_MSG_RESULT([yes]) 681309885543Smrg ifelse([$3], , :, [$3]) 681409885543Smrgfi[]dnl 681509885543Smrg])# PKG_CHECK_MODULES 681609885543Smrg 68177104f784Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 681809885543Smrgdnl 681909885543Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 682009885543Smrgdnl 682109885543Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 682209885543Smrgdnl copy of this software and associated documentation files (the 682309885543Smrgdnl "Software"), to deal in the Software without restriction, including 682409885543Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 682509885543Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 682609885543Smrgdnl to whom the Software is furnished to do so, provided that the above 682709885543Smrgdnl copyright notice(s) and this permission notice appear in all copies of 682809885543Smrgdnl the Software and that both the above copyright notice(s) and this 682909885543Smrgdnl permission notice appear in supporting documentation. 683009885543Smrgdnl 683109885543Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 683209885543Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 683309885543Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 683409885543Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 683509885543Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 683609885543Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 683709885543Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 683809885543Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 683909885543Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 684009885543Smrgdnl 684109885543Smrgdnl Except as contained in this notice, the name of a copyright holder 684209885543Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 684309885543Smrgdnl or other dealings in this Software without prior written authorization 684409885543Smrgdnl of the copyright holder. 684509885543Smrg 684609885543Smrg# XORG_MACROS_VERSION(required-version) 684709885543Smrg# ------------------------------------- 684809885543Smrg# Minimum version: 1.1.0 684909885543Smrg# 685009885543Smrg# If you're using a macro added in Version 1.1 or newer, include this in 685109885543Smrg# your configure.ac with the minimum required version, such as: 685209885543Smrg# XORG_MACROS_VERSION(1.1) 685309885543Smrg# 685409885543Smrg# To force at least a version with this macro defined, also add: 685509885543Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 685609885543Smrg# 685709885543Smrg# 685809885543Smrg# See the "minimum version" comment for each macro you use to see what 685909885543Smrg# version you require. 686009885543SmrgAC_DEFUN([XORG_MACROS_VERSION],[ 686109885543Smrg [XORG_MACROS_needed_version=$1 686209885543Smrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 686309885543Smrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 686409885543Smrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 68657104f784Smrg [XORG_MACROS_version=1.2.1 686609885543Smrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 686709885543Smrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 686809885543Smrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 686909885543Smrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 687009885543Smrg fi 687109885543Smrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 687209885543Smrg 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]) 687309885543Smrg fi 687409885543Smrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 687509885543Smrg]) # XORG_MACROS_VERSION 687609885543Smrg 687709885543Smrg# XORG_PROG_RAWCPP() 687809885543Smrg# ------------------ 687909885543Smrg# Minimum version: 1.0.0 688009885543Smrg# 688109885543Smrg# Find cpp program and necessary flags for use in pre-processing text files 688209885543Smrg# such as man pages and config files 688309885543SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 688409885543SmrgAC_REQUIRE([AC_PROG_CPP]) 688509885543SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 688609885543Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 688709885543Smrg 688809885543Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 688909885543Smrg# which is not the best choice for supporting other OS'es, but covers most 689009885543Smrg# of the ones we need for now. 689109885543SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 689209885543SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 689309885543Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 689409885543Smrg AC_MSG_RESULT([no]) 689509885543Smrgelse 689609885543Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 689709885543Smrg RAWCPPFLAGS=-undef 689809885543Smrg AC_MSG_RESULT([yes]) 68997104f784Smrg # under Cygwin unix is still defined even with -undef 69007104f784Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 69017104f784Smrg RAWCPPFLAGS="-undef -ansi" 69027104f784Smrg AC_MSG_RESULT([yes, with -ansi]) 690309885543Smrg else 690409885543Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 690509885543Smrg fi 690609885543Smrgfi 690709885543Smrgrm -f conftest.$ac_ext 690809885543Smrg 690909885543SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 691009885543SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 691109885543Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 691209885543Smrg AC_MSG_RESULT([no]) 691309885543Smrgelse 691409885543Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 691509885543Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 691609885543Smrg AC_MSG_RESULT([yes]) 691709885543Smrg else 691809885543Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 691909885543Smrg fi 692009885543Smrgfi 692109885543Smrgrm -f conftest.$ac_ext 692209885543SmrgAC_SUBST(RAWCPPFLAGS) 692309885543Smrg]) # XORG_PROG_RAWCPP 692409885543Smrg 692509885543Smrg# XORG_MANPAGE_SECTIONS() 692609885543Smrg# ----------------------- 692709885543Smrg# Minimum version: 1.0.0 692809885543Smrg# 692909885543Smrg# Determine which sections man pages go in for the different man page types 693009885543Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 693109885543Smrg# Not sure if there's any better way than just hardcoding by OS name. 693209885543Smrg# Override default settings by setting environment variables 693309885543Smrg 693409885543SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 693509885543SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 693609885543Smrg 693709885543Smrgif test x$APP_MAN_SUFFIX = x ; then 693809885543Smrg APP_MAN_SUFFIX=1 693909885543Smrgfi 694009885543Smrgif test x$APP_MAN_DIR = x ; then 694109885543Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 694209885543Smrgfi 694309885543Smrg 694409885543Smrgif test x$LIB_MAN_SUFFIX = x ; then 694509885543Smrg LIB_MAN_SUFFIX=3 694609885543Smrgfi 694709885543Smrgif test x$LIB_MAN_DIR = x ; then 694809885543Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 694909885543Smrgfi 695009885543Smrg 695109885543Smrgif test x$FILE_MAN_SUFFIX = x ; then 695209885543Smrg case $host_os in 695309885543Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 695409885543Smrg *) FILE_MAN_SUFFIX=5 ;; 695509885543Smrg esac 695609885543Smrgfi 695709885543Smrgif test x$FILE_MAN_DIR = x ; then 695809885543Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 695909885543Smrgfi 696009885543Smrg 696109885543Smrgif test x$MISC_MAN_SUFFIX = x ; then 696209885543Smrg case $host_os in 696309885543Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 696409885543Smrg *) MISC_MAN_SUFFIX=7 ;; 696509885543Smrg esac 696609885543Smrgfi 696709885543Smrgif test x$MISC_MAN_DIR = x ; then 696809885543Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 696909885543Smrgfi 697009885543Smrg 697109885543Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 697209885543Smrg case $host_os in 697309885543Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 697409885543Smrg *) DRIVER_MAN_SUFFIX=4 ;; 697509885543Smrg esac 697609885543Smrgfi 697709885543Smrgif test x$DRIVER_MAN_DIR = x ; then 697809885543Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 697909885543Smrgfi 698009885543Smrg 698109885543Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 698209885543Smrg case $host_os in 698309885543Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 698409885543Smrg *) ADMIN_MAN_SUFFIX=8 ;; 698509885543Smrg esac 698609885543Smrgfi 698709885543Smrgif test x$ADMIN_MAN_DIR = x ; then 698809885543Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 698909885543Smrgfi 699009885543Smrg 699109885543Smrg 699209885543SmrgAC_SUBST([APP_MAN_SUFFIX]) 699309885543SmrgAC_SUBST([LIB_MAN_SUFFIX]) 699409885543SmrgAC_SUBST([FILE_MAN_SUFFIX]) 699509885543SmrgAC_SUBST([MISC_MAN_SUFFIX]) 699609885543SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 699709885543SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 699809885543SmrgAC_SUBST([APP_MAN_DIR]) 699909885543SmrgAC_SUBST([LIB_MAN_DIR]) 700009885543SmrgAC_SUBST([FILE_MAN_DIR]) 700109885543SmrgAC_SUBST([MISC_MAN_DIR]) 700209885543SmrgAC_SUBST([DRIVER_MAN_DIR]) 700309885543SmrgAC_SUBST([ADMIN_MAN_DIR]) 700409885543Smrg]) # XORG_MANPAGE_SECTIONS 700509885543Smrg 700609885543Smrg# XORG_CHECK_LINUXDOC 700709885543Smrg# ------------------- 700809885543Smrg# Minimum version: 1.0.0 700909885543Smrg# 701009885543Smrg# Defines the variable MAKE_TEXT if the necessary tools and 701109885543Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 701209885543Smrg# Whether or not the necessary tools and files are found can be checked 701309885543Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 701409885543SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 70157104f784Smrgif test x$XORG_SGML_PATH = x ; then 70167104f784Smrg XORG_SGML_PATH=$prefix/share/sgml 70177104f784Smrgfi 701809885543SmrgHAVE_DEFS_ENT= 701909885543Smrg 70207104f784Smrgif test x"$cross_compiling" = x"yes" ; then 70217104f784Smrg HAVE_DEFS_ENT=no 70227104f784Smrgelse 70237104f784Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 70247104f784Smrgfi 702509885543Smrg 702609885543SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 702709885543SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 702809885543Smrg 702909885543SmrgAC_MSG_CHECKING([Whether to build documentation]) 703009885543Smrg 703109885543Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 703209885543Smrg BUILDDOC=yes 703309885543Smrgelse 703409885543Smrg BUILDDOC=no 703509885543Smrgfi 703609885543Smrg 703709885543SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 703809885543Smrg 703909885543SmrgAC_MSG_RESULT([$BUILDDOC]) 704009885543Smrg 704109885543SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 704209885543Smrg 704309885543Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 704409885543Smrg BUILDPDFDOC=yes 704509885543Smrgelse 704609885543Smrg BUILDPDFDOC=no 704709885543Smrgfi 704809885543Smrg 704909885543SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 705009885543Smrg 705109885543SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 705209885543Smrg 705309885543SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 705409885543SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 705509885543SmrgMAKE_PDF="$PS2PDF" 705609885543SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 705709885543Smrg 705809885543SmrgAC_SUBST(MAKE_TEXT) 705909885543SmrgAC_SUBST(MAKE_PS) 706009885543SmrgAC_SUBST(MAKE_PDF) 706109885543SmrgAC_SUBST(MAKE_HTML) 706209885543Smrg]) # XORG_CHECK_LINUXDOC 706309885543Smrg 706409885543Smrg# XORG_CHECK_DOCBOOK 706509885543Smrg# ------------------- 706609885543Smrg# Minimum version: 1.0.0 706709885543Smrg# 706809885543Smrg# Checks for the ability to build output formats from SGML DocBook source. 706909885543Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 707009885543Smrg# indicates whether the necessary tools and files are found and, if set, 707109885543Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 707209885543SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 70737104f784Smrgif test x$XORG_SGML_PATH = x ; then 70747104f784Smrg XORG_SGML_PATH=$prefix/share/sgml 70757104f784Smrgfi 707609885543SmrgHAVE_DEFS_ENT= 707709885543SmrgBUILDTXTDOC=no 707809885543SmrgBUILDPDFDOC=no 707909885543SmrgBUILDPSDOC=no 708009885543SmrgBUILDHTMLDOC=no 708109885543Smrg 708209885543SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 708309885543Smrg 708409885543SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 708509885543SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 708609885543SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 708709885543SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 708809885543Smrg 708909885543SmrgAC_MSG_CHECKING([Whether to build text documentation]) 709009885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 709109885543Smrg test x$BUILD_TXTDOC != xno; then 709209885543Smrg BUILDTXTDOC=yes 709309885543Smrgfi 709409885543SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 709509885543SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 709609885543Smrg 709709885543SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 709809885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 709909885543Smrg test x$BUILD_PDFDOC != xno; then 710009885543Smrg BUILDPDFDOC=yes 710109885543Smrgfi 710209885543SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 710309885543SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 710409885543Smrg 710509885543SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 710609885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 710709885543Smrg test x$BUILD_PSDOC != xno; then 710809885543Smrg BUILDPSDOC=yes 710909885543Smrgfi 711009885543SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 711109885543SmrgAC_MSG_RESULT([$BUILDPSDOC]) 711209885543Smrg 711309885543SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 711409885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 711509885543Smrg test x$BUILD_HTMLDOC != xno; then 711609885543Smrg BUILDHTMLDOC=yes 711709885543Smrgfi 711809885543SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 711909885543SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 712009885543Smrg 712109885543SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 712209885543SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 712309885543SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 712409885543SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 712509885543Smrg 712609885543SmrgAC_SUBST(MAKE_TEXT) 712709885543SmrgAC_SUBST(MAKE_PS) 712809885543SmrgAC_SUBST(MAKE_PDF) 712909885543SmrgAC_SUBST(MAKE_HTML) 713009885543Smrg]) # XORG_CHECK_DOCBOOK 713109885543Smrg 713209885543Smrg# XORG_CHECK_MALLOC_ZERO 713309885543Smrg# ---------------------- 713409885543Smrg# Minimum version: 1.0.0 713509885543Smrg# 713609885543Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 713709885543Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 713809885543Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 713909885543SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 714009885543SmrgAC_ARG_ENABLE(malloc0returnsnull, 714109885543Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 714209885543Smrg [malloc(0) returns NULL (default: auto)]), 714309885543Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 714409885543Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 714509885543Smrg 714609885543SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 714709885543Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 714809885543Smrg AC_RUN_IFELSE([ 714909885543Smrgchar *malloc(); 715009885543Smrgchar *realloc(); 715109885543Smrgchar *calloc(); 715209885543Smrgmain() { 715309885543Smrg char *m0, *r0, *c0, *p; 715409885543Smrg m0 = malloc(0); 715509885543Smrg p = malloc(10); 715609885543Smrg r0 = realloc(p,0); 715709885543Smrg c0 = calloc(0); 715809885543Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 715909885543Smrg}], 716009885543Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 716109885543Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 716209885543Smrgfi 716309885543SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 716409885543Smrg 716509885543Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 716609885543Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 716709885543Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 716809885543Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 716909885543Smrgelse 717009885543Smrg MALLOC_ZERO_CFLAGS="" 717109885543Smrg XMALLOC_ZERO_CFLAGS="" 717209885543Smrg XTMALLOC_ZERO_CFLAGS="" 717309885543Smrgfi 717409885543Smrg 717509885543SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 717609885543SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 717709885543SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 717809885543Smrg]) # XORG_CHECK_MALLOC_ZERO 717909885543Smrg 718009885543Smrg# XORG_WITH_LINT() 718109885543Smrg# ---------------- 718209885543Smrg# Minimum version: 1.1.0 718309885543Smrg# 718409885543Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 718509885543Smrg# is specified. (Use --with-lint=sparse for sparse.) 718609885543Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 718709885543Smrg# Sets $LINT_FLAGS to flags to pass to source checker 718809885543Smrg# Sets LINT automake conditional if enabled (default: disabled) 718909885543Smrg# 719009885543SmrgAC_DEFUN([XORG_WITH_LINT],[ 719109885543Smrg 719209885543Smrg# Allow checking code with lint, sparse, etc. 719309885543SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 719409885543Smrg [Use a lint-style source code checker (default: disabled)])], 719509885543Smrg [use_lint=$withval], [use_lint=no]) 719609885543Smrgif test "x$use_lint" = "xyes" ; then 719709885543Smrg LINT="lint" 719809885543Smrgelse 719909885543Smrg LINT="$use_lint" 720009885543Smrgfi 720109885543Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 720209885543Smrg case $LINT in 720309885543Smrg lint|*/lint) 720409885543Smrg case $host_os in 720509885543Smrg solaris*) 720609885543Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 720709885543Smrg ;; 720809885543Smrg esac 720909885543Smrg ;; 721009885543Smrg esac 721109885543Smrgfi 721209885543Smrg 721309885543SmrgAC_SUBST(LINT) 721409885543SmrgAC_SUBST(LINT_FLAGS) 721509885543SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 721609885543Smrg 721709885543Smrg]) # XORG_WITH_LINT 721809885543Smrg 721909885543Smrg# XORG_LINT_LIBRARY(LIBNAME) 722009885543Smrg# -------------------------- 722109885543Smrg# Minimum version: 1.1.0 722209885543Smrg# 722309885543Smrg# Sets up flags for building lint libraries for checking programs that call 722409885543Smrg# functions in the library. 722509885543Smrg# Disabled by default, enable with --enable-lint-library 722609885543Smrg# Sets: 722709885543Smrg# @LINTLIB@ - name of lint library file to make 722809885543Smrg# MAKE_LINT_LIB - automake conditional 722909885543Smrg# 723009885543Smrg 723109885543SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 723209885543SmrgAC_REQUIRE([XORG_WITH_LINT]) 723309885543Smrg# Build lint "library" for more indepth checks of programs calling this library 723409885543SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 723509885543Smrg [Create lint library (default: disabled)])], 723609885543Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 723709885543Smrgif test "x$make_lint_lib" != "xno" ; then 723809885543Smrg if test "x$LINT" = "xno" ; then 723909885543Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 724009885543Smrg fi 724109885543Smrg if test "x$make_lint_lib" = "xyes" ; then 724209885543Smrg LINTLIB=llib-l$1.ln 724309885543Smrg else 724409885543Smrg LINTLIB=$make_lint_lib 724509885543Smrg fi 724609885543Smrgfi 724709885543SmrgAC_SUBST(LINTLIB) 724809885543SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 724909885543Smrg 725009885543Smrg]) # XORG_LINT_LIBRARY 725109885543Smrg 72527104f784Smrg# XORG_CWARNFLAGS 72537104f784Smrg# --------------- 72547104f784Smrg# Minimum version: 1.2.0 72557104f784Smrg# 72567104f784Smrg# Defines CWARNFLAGS to enable C compiler warnings. 72577104f784Smrg# 72587104f784SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 72597104f784SmrgAC_REQUIRE([AC_PROG_CC]) 72607104f784Smrgif test "x$GCC" = xyes ; then 72617104f784Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 72627104f784Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 72637104f784Smrg-Wbad-function-cast" 72647104f784Smrg case `gcc -dumpversion` in 72657104f784Smrg 3.4.* | 4.*) 72667104f784Smrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 72677104f784Smrg ;; 72687104f784Smrg esac 72697104f784Smrgelse 72707104f784Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 72717104f784Smrg if test "x$SUNCC" = "xyes"; then 72727104f784Smrg CWARNFLAGS="-v" 72737104f784Smrg fi 72747104f784Smrgfi 72757104f784SmrgAC_SUBST(CWARNFLAGS) 72767104f784Smrg]) # XORG_CWARNFLAGS 727709885543Smrgdnl Copyright 2005 Red Hat, Inc 727809885543Smrgdnl 727909885543Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 728009885543Smrgdnl documentation for any purpose is hereby granted without fee, provided that 728109885543Smrgdnl the above copyright notice appear in all copies and that both that 728209885543Smrgdnl copyright notice and this permission notice appear in supporting 728309885543Smrgdnl documentation. 728409885543Smrgdnl 728509885543Smrgdnl The above copyright notice and this permission notice shall be included 728609885543Smrgdnl in all copies or substantial portions of the Software. 728709885543Smrgdnl 728809885543Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 728909885543Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 729009885543Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 729109885543Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 729209885543Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 729309885543Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 729409885543Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 729509885543Smrgdnl 729609885543Smrgdnl Except as contained in this notice, the name of the copyright holders shall 729709885543Smrgdnl not be used in advertising or otherwise to promote the sale, use or 729809885543Smrgdnl other dealings in this Software without prior written authorization 729909885543Smrgdnl from the copyright holders. 730009885543Smrgdnl 730109885543Smrg 730209885543Smrg# XORG_RELEASE_VERSION 730309885543Smrg# -------------------- 730409885543Smrg# Adds --with/without-release-string and changes the PACKAGE and 730509885543Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 730609885543Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 730709885543Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 730809885543Smrg 730909885543SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 731009885543Smrg AC_ARG_WITH(release-version, 731109885543Smrg AC_HELP_STRING([--with-release-version=STRING], 731209885543Smrg [Use release version string in package name]), 731309885543Smrg [RELEASE_VERSION="$withval"], 731409885543Smrg [RELEASE_VERSION=""]) 731509885543Smrg if test "x$RELEASE_VERSION" != "x"; then 731609885543Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 731709885543Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 731809885543Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 731909885543Smrg fi 732009885543Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 732109885543Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 732209885543Smrg [Major version of this package]) 73237104f784Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 732409885543Smrg if test "x$PVM" = "x"; then 732509885543Smrg PVM="0" 732609885543Smrg fi 732709885543Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 732809885543Smrg [$PVM], 732909885543Smrg [Minor version of this package]) 73307104f784Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 733109885543Smrg if test "x$PVP" = "x"; then 733209885543Smrg PVP="0" 733309885543Smrg fi 733409885543Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 733509885543Smrg [$PVP], 733609885543Smrg [Patch version of this package]) 733709885543Smrg]) 733809885543Smrg 73397104f784Smrg# XORG_CHANGELOG() 73407104f784Smrg# ---------------- 73417104f784Smrg# Minimum version: 1.2.0 73427104f784Smrg# 73437104f784Smrg# Defines the variable CHANGELOG_CMD as the command to generate 73447104f784Smrg# ChangeLog from git. 73457104f784Smrg# 73467104f784Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 73477104f784Smrg# 73487104f784SmrgAC_DEFUN([XORG_CHANGELOG], [ 73497104f784SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 73507104f784Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 73517104f784Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 73527104f784SmrgAC_SUBST([CHANGELOG_CMD]) 73537104f784SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 73547104f784Smrg]) # XORG_CHANGELOG 73557104f784Smrg 73567104f784Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 735709885543Smrg# 735809885543Smrg# This file is free software; the Free Software Foundation 735909885543Smrg# gives unlimited permission to copy and/or distribute it, 736009885543Smrg# with or without modifications, as long as this notice is preserved. 736109885543Smrg 736209885543Smrg# AM_AUTOMAKE_VERSION(VERSION) 736309885543Smrg# ---------------------------- 736409885543Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 736509885543Smrg# generated from the m4 files accompanying Automake X.Y. 73667104f784Smrg# (This private macro should not be called outside this file.) 73677104f784SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 7368b698ba48Smrg[am__api_version='1.11' 73697104f784Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 73707104f784Smrgdnl require some minimum version. Point them to the right macro. 7371b698ba48Smrgm4_if([$1], [1.11], [], 73727104f784Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 73737104f784Smrg]) 73747104f784Smrg 73757104f784Smrg# _AM_AUTOCONF_VERSION(VERSION) 73767104f784Smrg# ----------------------------- 73777104f784Smrg# aclocal traces this macro to find the Autoconf version. 73787104f784Smrg# This is a private macro too. Using m4_define simplifies 73797104f784Smrg# the logic in aclocal, which can simply ignore this definition. 73807104f784Smrgm4_define([_AM_AUTOCONF_VERSION], []) 738109885543Smrg 738209885543Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 738309885543Smrg# ------------------------------- 73847104f784Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 73857104f784Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 738609885543SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 7387b698ba48Smrg[AM_AUTOMAKE_VERSION([1.11])dnl 73887104f784Smrgm4_ifndef([AC_AUTOCONF_VERSION], 73897104f784Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 73907104f784Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 739109885543Smrg 739209885543Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 739309885543Smrg 739409885543Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 739509885543Smrg# 739609885543Smrg# This file is free software; the Free Software Foundation 739709885543Smrg# gives unlimited permission to copy and/or distribute it, 739809885543Smrg# with or without modifications, as long as this notice is preserved. 739909885543Smrg 740009885543Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 740109885543Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 740209885543Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 740309885543Smrg# 740409885543Smrg# Of course, Automake must honor this variable whenever it calls a 740509885543Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 740609885543Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 740709885543Smrg# depending on how configure is run. This is pretty annoying, since 740809885543Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 740909885543Smrg# source directory, any form will work fine, but in subdirectories a 741009885543Smrg# relative path needs to be adjusted first. 741109885543Smrg# 741209885543Smrg# $ac_aux_dir/missing 741309885543Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 741409885543Smrg# $top_srcdir/$ac_aux_dir/missing 741509885543Smrg# fails if $ac_aux_dir is absolute, 741609885543Smrg# fails when called from a subdirectory in a VPATH build with 741709885543Smrg# a relative $ac_aux_dir 741809885543Smrg# 741909885543Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 742009885543Smrg# are both prefixed by $srcdir. In an in-source build this is usually 742109885543Smrg# harmless because $srcdir is `.', but things will broke when you 742209885543Smrg# start a VPATH build or use an absolute $srcdir. 742309885543Smrg# 742409885543Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 742509885543Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 742609885543Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 742709885543Smrg# and then we would define $MISSING as 742809885543Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 742909885543Smrg# This will work as long as MISSING is not called from configure, because 743009885543Smrg# unfortunately $(top_srcdir) has no meaning in configure. 743109885543Smrg# However there are other variables, like CC, which are often used in 743209885543Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 743309885543Smrg# 743409885543Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 743509885543Smrg# absolute PATH. The drawback is that using absolute paths prevent a 743609885543Smrg# configured tree to be moved without reconfiguration. 743709885543Smrg 743809885543SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 743909885543Smrg[dnl Rely on autoconf to set up CDPATH properly. 744009885543SmrgAC_PREREQ([2.50])dnl 744109885543Smrg# expand $ac_aux_dir to an absolute path 744209885543Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 744309885543Smrg]) 744409885543Smrg 744509885543Smrg# AM_CONDITIONAL -*- Autoconf -*- 744609885543Smrg 7447b698ba48Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 744809885543Smrg# Free Software Foundation, Inc. 744909885543Smrg# 745009885543Smrg# This file is free software; the Free Software Foundation 745109885543Smrg# gives unlimited permission to copy and/or distribute it, 745209885543Smrg# with or without modifications, as long as this notice is preserved. 745309885543Smrg 7454b698ba48Smrg# serial 9 745509885543Smrg 745609885543Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 745709885543Smrg# ------------------------------------- 745809885543Smrg# Define a conditional. 745909885543SmrgAC_DEFUN([AM_CONDITIONAL], 746009885543Smrg[AC_PREREQ(2.52)dnl 746109885543Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 746209885543Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 74637104f784SmrgAC_SUBST([$1_TRUE])dnl 74647104f784SmrgAC_SUBST([$1_FALSE])dnl 74657104f784Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 74667104f784Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 7467b698ba48Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 746809885543Smrgif $2; then 746909885543Smrg $1_TRUE= 747009885543Smrg $1_FALSE='#' 747109885543Smrgelse 747209885543Smrg $1_TRUE='#' 747309885543Smrg $1_FALSE= 747409885543Smrgfi 747509885543SmrgAC_CONFIG_COMMANDS_PRE( 747609885543Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 747709885543Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 747809885543SmrgUsually this means the macro was only invoked conditionally.]]) 747909885543Smrgfi])]) 748009885543Smrg 7481b698ba48Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 748209885543Smrg# Free Software Foundation, Inc. 748309885543Smrg# 748409885543Smrg# This file is free software; the Free Software Foundation 748509885543Smrg# gives unlimited permission to copy and/or distribute it, 748609885543Smrg# with or without modifications, as long as this notice is preserved. 748709885543Smrg 7488b698ba48Smrg# serial 10 748909885543Smrg 749009885543Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 749109885543Smrg# written in clear, in which case automake, when reading aclocal.m4, 749209885543Smrg# will think it sees a *use*, and therefore will trigger all it's 749309885543Smrg# C support machinery. Also note that it means that autoscan, seeing 749409885543Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 749509885543Smrg 749609885543Smrg 749709885543Smrg# _AM_DEPENDENCIES(NAME) 749809885543Smrg# ---------------------- 749909885543Smrg# See how the compiler implements dependency checking. 750009885543Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 750109885543Smrg# We try a few techniques and use that to set a single cache variable. 750209885543Smrg# 750309885543Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 750409885543Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 750509885543Smrg# dependency, and given that the user is not expected to run this macro, 750609885543Smrg# just rely on AC_PROG_CC. 750709885543SmrgAC_DEFUN([_AM_DEPENDENCIES], 750809885543Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 750909885543SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 751009885543SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 751109885543SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 751209885543Smrg 751309885543Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 751409885543Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 751509885543Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 75167104f784Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 751709885543Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 751809885543Smrg [depcc="$$1" am_compiler_list=]) 751909885543Smrg 752009885543SmrgAC_CACHE_CHECK([dependency style of $depcc], 752109885543Smrg [am_cv_$1_dependencies_compiler_type], 752209885543Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 752309885543Smrg # We make a subdir and do the tests there. Otherwise we can end up 752409885543Smrg # making bogus files that we don't know about and never remove. For 752509885543Smrg # instance it was reported that on HP-UX the gcc test will end up 752609885543Smrg # making a dummy file named `D' -- because `-MD' means `put the output 752709885543Smrg # in D'. 752809885543Smrg mkdir conftest.dir 752909885543Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 753009885543Smrg # using a relative directory. 753109885543Smrg cp "$am_depcomp" conftest.dir 753209885543Smrg cd conftest.dir 753309885543Smrg # We will build objects and dependencies in a subdirectory because 753409885543Smrg # it helps to detect inapplicable dependency modes. For instance 753509885543Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 753609885543Smrg # side effect of compilation, but ICC will put the dependencies in 753709885543Smrg # the current directory while Tru64 will put them in the object 753809885543Smrg # directory. 753909885543Smrg mkdir sub 754009885543Smrg 754109885543Smrg am_cv_$1_dependencies_compiler_type=none 754209885543Smrg if test "$am_compiler_list" = ""; then 754309885543Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 754409885543Smrg fi 7545b698ba48Smrg am__universal=false 7546b698ba48Smrg m4_case([$1], [CC], 7547b698ba48Smrg [case " $depcc " in #( 7548b698ba48Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 7549b698ba48Smrg esac], 7550b698ba48Smrg [CXX], 7551b698ba48Smrg [case " $depcc " in #( 7552b698ba48Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 7553b698ba48Smrg esac]) 7554b698ba48Smrg 755509885543Smrg for depmode in $am_compiler_list; do 755609885543Smrg # Setup a source with many dependencies, because some compilers 755709885543Smrg # like to wrap large dependency lists on column 80 (with \), and 755809885543Smrg # we should not choose a depcomp mode which is confused by this. 755909885543Smrg # 756009885543Smrg # We need to recreate these files for each test, as the compiler may 756109885543Smrg # overwrite some of them when testing with obscure command lines. 756209885543Smrg # This happens at least with the AIX C compiler. 756309885543Smrg : > sub/conftest.c 756409885543Smrg for i in 1 2 3 4 5 6; do 756509885543Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 756609885543Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 756709885543Smrg # Solaris 8's {/usr,}/bin/sh. 756809885543Smrg touch sub/conftst$i.h 756909885543Smrg done 757009885543Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 757109885543Smrg 7572b698ba48Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 7573b698ba48Smrg # mode. It turns out that the SunPro C++ compiler does not properly 7574b698ba48Smrg # handle `-M -o', and we need to detect this. Also, some Intel 7575b698ba48Smrg # versions had trouble with output in subdirs 7576b698ba48Smrg am__obj=sub/conftest.${OBJEXT-o} 7577b698ba48Smrg am__minus_obj="-o $am__obj" 757809885543Smrg case $depmode in 7579b698ba48Smrg gcc) 7580b698ba48Smrg # This depmode causes a compiler race in universal mode. 7581b698ba48Smrg test "$am__universal" = false || continue 7582b698ba48Smrg ;; 758309885543Smrg nosideeffect) 758409885543Smrg # after this tag, mechanisms are not by side-effect, so they'll 758509885543Smrg # only be used when explicitly requested 758609885543Smrg if test "x$enable_dependency_tracking" = xyes; then 758709885543Smrg continue 758809885543Smrg else 758909885543Smrg break 759009885543Smrg fi 759109885543Smrg ;; 7592b698ba48Smrg msvisualcpp | msvcmsys) 7593b698ba48Smrg # This compiler won't grok `-c -o', but also, the minuso test has 7594b698ba48Smrg # not run yet. These depmodes are late enough in the game, and 7595b698ba48Smrg # so weak that their functioning should not be impacted. 7596b698ba48Smrg am__obj=conftest.${OBJEXT-o} 7597b698ba48Smrg am__minus_obj= 7598b698ba48Smrg ;; 759909885543Smrg none) break ;; 760009885543Smrg esac 760109885543Smrg if depmode=$depmode \ 7602b698ba48Smrg source=sub/conftest.c object=$am__obj \ 760309885543Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 7604b698ba48Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 760509885543Smrg >/dev/null 2>conftest.err && 76067104f784Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 760709885543Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 7608b698ba48Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 760909885543Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 761009885543Smrg # icc doesn't choke on unknown options, it will just issue warnings 761109885543Smrg # or remarks (even with -Werror). So we grep stderr for any message 761209885543Smrg # that says an option was ignored or not supported. 761309885543Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 761409885543Smrg # icc: Command line warning: ignoring option '-M'; no argument required 761509885543Smrg # The diagnosis changed in icc 8.0: 761609885543Smrg # icc: Command line remark: option '-MP' not supported 761709885543Smrg if (grep 'ignoring option' conftest.err || 761809885543Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 761909885543Smrg am_cv_$1_dependencies_compiler_type=$depmode 762009885543Smrg break 762109885543Smrg fi 762209885543Smrg fi 762309885543Smrg done 762409885543Smrg 762509885543Smrg cd .. 762609885543Smrg rm -rf conftest.dir 762709885543Smrgelse 762809885543Smrg am_cv_$1_dependencies_compiler_type=none 762909885543Smrgfi 763009885543Smrg]) 763109885543SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 763209885543SmrgAM_CONDITIONAL([am__fastdep$1], [ 763309885543Smrg test "x$enable_dependency_tracking" != xno \ 763409885543Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 763509885543Smrg]) 763609885543Smrg 763709885543Smrg 763809885543Smrg# AM_SET_DEPDIR 763909885543Smrg# ------------- 764009885543Smrg# Choose a directory name for dependency files. 764109885543Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 764209885543SmrgAC_DEFUN([AM_SET_DEPDIR], 764309885543Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 764409885543SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 764509885543Smrg]) 764609885543Smrg 764709885543Smrg 764809885543Smrg# AM_DEP_TRACK 764909885543Smrg# ------------ 765009885543SmrgAC_DEFUN([AM_DEP_TRACK], 765109885543Smrg[AC_ARG_ENABLE(dependency-tracking, 765209885543Smrg[ --disable-dependency-tracking speeds up one-time build 765309885543Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 765409885543Smrgif test "x$enable_dependency_tracking" != xno; then 765509885543Smrg am_depcomp="$ac_aux_dir/depcomp" 765609885543Smrg AMDEPBACKSLASH='\' 765709885543Smrgfi 765809885543SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 76597104f784SmrgAC_SUBST([AMDEPBACKSLASH])dnl 76607104f784Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 766109885543Smrg]) 766209885543Smrg 766309885543Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 766409885543Smrg 76657104f784Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 766609885543Smrg# Free Software Foundation, Inc. 766709885543Smrg# 766809885543Smrg# This file is free software; the Free Software Foundation 766909885543Smrg# gives unlimited permission to copy and/or distribute it, 767009885543Smrg# with or without modifications, as long as this notice is preserved. 767109885543Smrg 7672b698ba48Smrg#serial 5 767309885543Smrg 767409885543Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 767509885543Smrg# ------------------------------ 767609885543SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 7677b698ba48Smrg[{ 7678b698ba48Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 7679b698ba48Smrg # are listed without --file. Let's play safe and only enable the eval 7680b698ba48Smrg # if we detect the quoting. 7681b698ba48Smrg case $CONFIG_FILES in 7682b698ba48Smrg *\'*) eval set x "$CONFIG_FILES" ;; 7683b698ba48Smrg *) set x $CONFIG_FILES ;; 7684b698ba48Smrg esac 7685b698ba48Smrg shift 7686b698ba48Smrg for mf 7687b698ba48Smrg do 7688b698ba48Smrg # Strip MF so we end up with the name of the file. 7689b698ba48Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 7690b698ba48Smrg # Check whether this is an Automake generated Makefile or not. 7691b698ba48Smrg # We used to match only the files named `Makefile.in', but 7692b698ba48Smrg # some people rename them; so instead we look at the file content. 7693b698ba48Smrg # Grep'ing the first line is not enough: some people post-process 7694b698ba48Smrg # each Makefile.in and add a new line on top of each file to say so. 7695b698ba48Smrg # Grep'ing the whole file is not good either: AIX grep has a line 7696b698ba48Smrg # limit of 2048, but all sed's we know have understand at least 4000. 7697b698ba48Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 7698b698ba48Smrg dirpart=`AS_DIRNAME("$mf")` 7699b698ba48Smrg else 7700b698ba48Smrg continue 7701b698ba48Smrg fi 7702b698ba48Smrg # Extract the definition of DEPDIR, am__include, and am__quote 7703b698ba48Smrg # from the Makefile without running `make'. 7704b698ba48Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 7705b698ba48Smrg test -z "$DEPDIR" && continue 7706b698ba48Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 7707b698ba48Smrg test -z "am__include" && continue 7708b698ba48Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 7709b698ba48Smrg # When using ansi2knr, U may be empty or an underscore; expand it 7710b698ba48Smrg U=`sed -n 's/^U = //p' < "$mf"` 7711b698ba48Smrg # Find all dependency output files, they are included files with 7712b698ba48Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 7713b698ba48Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 7714b698ba48Smrg # expansion. 7715b698ba48Smrg for file in `sed -n " 7716b698ba48Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 7717b698ba48Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 7718b698ba48Smrg # Make sure the directory exists. 7719b698ba48Smrg test -f "$dirpart/$file" && continue 7720b698ba48Smrg fdir=`AS_DIRNAME(["$file"])` 7721b698ba48Smrg AS_MKDIR_P([$dirpart/$fdir]) 7722b698ba48Smrg # echo "creating $dirpart/$file" 7723b698ba48Smrg echo '# dummy' > "$dirpart/$file" 7724b698ba48Smrg done 772509885543Smrg done 7726b698ba48Smrg} 772709885543Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 772809885543Smrg 772909885543Smrg 773009885543Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 773109885543Smrg# ----------------------------- 773209885543Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 773309885543Smrg# 773409885543Smrg# This code is only required when automatic dependency tracking 773509885543Smrg# is enabled. FIXME. This creates each `.P' file that we will 773609885543Smrg# need in order to bootstrap the dependency handling code. 773709885543SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 773809885543Smrg[AC_CONFIG_COMMANDS([depfiles], 773909885543Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 774009885543Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 774109885543Smrg]) 774209885543Smrg 774309885543Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 774409885543Smrg# Free Software Foundation, Inc. 774509885543Smrg# 774609885543Smrg# This file is free software; the Free Software Foundation 774709885543Smrg# gives unlimited permission to copy and/or distribute it, 774809885543Smrg# with or without modifications, as long as this notice is preserved. 774909885543Smrg 775009885543Smrg# serial 8 775109885543Smrg 775209885543Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 775309885543SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 775409885543Smrg 775509885543Smrg# Do all the work for Automake. -*- Autoconf -*- 775609885543Smrg 77577104f784Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 7758b698ba48Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 775909885543Smrg# 776009885543Smrg# This file is free software; the Free Software Foundation 776109885543Smrg# gives unlimited permission to copy and/or distribute it, 776209885543Smrg# with or without modifications, as long as this notice is preserved. 776309885543Smrg 7764b698ba48Smrg# serial 16 776509885543Smrg 776609885543Smrg# This macro actually does too much. Some checks are only needed if 776709885543Smrg# your package does certain things. But this isn't really a big deal. 776809885543Smrg 776909885543Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 777009885543Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 777109885543Smrg# ----------------------------------------------- 777209885543Smrg# The call with PACKAGE and VERSION arguments is the old style 777309885543Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 777409885543Smrg# and VERSION should now be passed to AC_INIT and removed from 777509885543Smrg# the call to AM_INIT_AUTOMAKE. 777609885543Smrg# We support both call styles for the transition. After 777709885543Smrg# the next Automake release, Autoconf can make the AC_INIT 777809885543Smrg# arguments mandatory, and then we can depend on a new Autoconf 777909885543Smrg# release and drop the old call support. 778009885543SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 7781b698ba48Smrg[AC_PREREQ([2.62])dnl 778209885543Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 778309885543Smrgdnl the ones we care about. 778409885543Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 778509885543SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 778609885543SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 77877104f784Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 77887104f784Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 77897104f784Smrg # is not polluted with repeated "-I." 77907104f784Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 77917104f784Smrg # test to see if srcdir already configured 77927104f784Smrg if test -f $srcdir/config.status; then 77937104f784Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 77947104f784Smrg fi 779509885543Smrgfi 779609885543Smrg 779709885543Smrg# test whether we have cygpath 779809885543Smrgif test -z "$CYGPATH_W"; then 779909885543Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 780009885543Smrg CYGPATH_W='cygpath -w' 780109885543Smrg else 780209885543Smrg CYGPATH_W=echo 780309885543Smrg fi 780409885543Smrgfi 780509885543SmrgAC_SUBST([CYGPATH_W]) 780609885543Smrg 780709885543Smrg# Define the identity of the package. 780809885543Smrgdnl Distinguish between old-style and new-style calls. 780909885543Smrgm4_ifval([$2], 781009885543Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 781109885543Smrg AC_SUBST([PACKAGE], [$1])dnl 781209885543Smrg AC_SUBST([VERSION], [$2])], 781309885543Smrg[_AM_SET_OPTIONS([$1])dnl 78147104f784Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 78157104f784Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 78167104f784Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 781709885543Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 781809885543Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 781909885543Smrg 782009885543Smrg_AM_IF_OPTION([no-define],, 782109885543Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 782209885543Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 782309885543Smrg 782409885543Smrg# Some tools Automake needs. 782509885543SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 782609885543SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 782709885543SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 782809885543SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 782909885543SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 783009885543SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 783109885543SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 7832b698ba48SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 7833b698ba48SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 783409885543SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 783509885543Smrg# We need awk for the "check" target. The system "awk" is bad on 783609885543Smrg# some platforms. 783709885543SmrgAC_REQUIRE([AC_PROG_AWK])dnl 783809885543SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 783909885543SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 784009885543Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 7841b698ba48Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 7842b698ba48Smrg [_AM_PROG_TAR([v7])])]) 784309885543Smrg_AM_IF_OPTION([no-dependencies],, 784409885543Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 7845b698ba48Smrg [_AM_DEPENDENCIES(CC)], 7846b698ba48Smrg [define([AC_PROG_CC], 7847b698ba48Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 784809885543SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 7849b698ba48Smrg [_AM_DEPENDENCIES(CXX)], 7850b698ba48Smrg [define([AC_PROG_CXX], 7851b698ba48Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 78527104f784SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 7853b698ba48Smrg [_AM_DEPENDENCIES(OBJC)], 7854b698ba48Smrg [define([AC_PROG_OBJC], 7855b698ba48Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 785609885543Smrg]) 7857b698ba48Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 7858b698ba48Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 7859b698ba48Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 7860b698ba48Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 7861b698ba48SmrgAC_CONFIG_COMMANDS_PRE(dnl 7862b698ba48Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 7863b698ba48Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 786409885543Smrg]) 786509885543Smrg 7866b698ba48Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 7867b698ba48Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 7868b698ba48Smrgdnl mangled by Autoconf and run in a shell conditional statement. 7869b698ba48Smrgm4_define([_AC_COMPILER_EXEEXT], 7870b698ba48Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 7871b698ba48Smrg 787209885543Smrg 787309885543Smrg# When config.status generates a header, we must update the stamp-h file. 787409885543Smrg# This file resides in the same directory as the config header 787509885543Smrg# that is generated. The stamp files are numbered to have different names. 787609885543Smrg 787709885543Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 787809885543Smrg# loop where config.status creates the headers, so we can generate 787909885543Smrg# our stamp files there. 788009885543SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 788109885543Smrg[# Compute $1's index in $config_headers. 78827104f784Smrg_am_arg=$1 788309885543Smrg_am_stamp_count=1 788409885543Smrgfor _am_header in $config_headers :; do 788509885543Smrg case $_am_header in 78867104f784Smrg $_am_arg | $_am_arg:* ) 788709885543Smrg break ;; 788809885543Smrg * ) 788909885543Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 789009885543Smrg esac 789109885543Smrgdone 78927104f784Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 789309885543Smrg 7894b698ba48Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 789509885543Smrg# 789609885543Smrg# This file is free software; the Free Software Foundation 789709885543Smrg# gives unlimited permission to copy and/or distribute it, 789809885543Smrg# with or without modifications, as long as this notice is preserved. 789909885543Smrg 790009885543Smrg# AM_PROG_INSTALL_SH 790109885543Smrg# ------------------ 790209885543Smrg# Define $install_sh. 790309885543SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 790409885543Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7905b698ba48Smrgif test x"${install_sh}" != xset; then 7906b698ba48Smrg case $am_aux_dir in 7907b698ba48Smrg *\ * | *\ *) 7908b698ba48Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 7909b698ba48Smrg *) 7910b698ba48Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 7911b698ba48Smrg esac 7912b698ba48Smrgfi 791309885543SmrgAC_SUBST(install_sh)]) 791409885543Smrg 791509885543Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 791609885543Smrg# 791709885543Smrg# This file is free software; the Free Software Foundation 791809885543Smrg# gives unlimited permission to copy and/or distribute it, 791909885543Smrg# with or without modifications, as long as this notice is preserved. 792009885543Smrg 792109885543Smrg# serial 2 792209885543Smrg 792309885543Smrg# Check whether the underlying file-system supports filenames 792409885543Smrg# with a leading dot. For instance MS-DOS doesn't. 792509885543SmrgAC_DEFUN([AM_SET_LEADING_DOT], 792609885543Smrg[rm -rf .tst 2>/dev/null 792709885543Smrgmkdir .tst 2>/dev/null 792809885543Smrgif test -d .tst; then 792909885543Smrg am__leading_dot=. 793009885543Smrgelse 793109885543Smrg am__leading_dot=_ 793209885543Smrgfi 793309885543Smrgrmdir .tst 2>/dev/null 793409885543SmrgAC_SUBST([am__leading_dot])]) 793509885543Smrg 793609885543Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 793709885543Smrg# From Jim Meyering 793809885543Smrg 7939b698ba48Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 794009885543Smrg# Free Software Foundation, Inc. 794109885543Smrg# 794209885543Smrg# This file is free software; the Free Software Foundation 794309885543Smrg# gives unlimited permission to copy and/or distribute it, 794409885543Smrg# with or without modifications, as long as this notice is preserved. 794509885543Smrg 7946b698ba48Smrg# serial 5 794709885543Smrg 7948b698ba48Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 7949b698ba48Smrg# ---------------------------------- 7950b698ba48Smrg# Control maintainer-specific portions of Makefiles. 7951b698ba48Smrg# Default is to disable them, unless `enable' is passed literally. 7952b698ba48Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 7953b698ba48Smrg# can override the default with the --enable/--disable switch. 795409885543SmrgAC_DEFUN([AM_MAINTAINER_MODE], 7955b698ba48Smrg[m4_case(m4_default([$1], [disable]), 7956b698ba48Smrg [enable], [m4_define([am_maintainer_other], [disable])], 7957b698ba48Smrg [disable], [m4_define([am_maintainer_other], [enable])], 7958b698ba48Smrg [m4_define([am_maintainer_other], [enable]) 7959b698ba48Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 7960b698ba48SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 7961b698ba48Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 7962b698ba48Smrg AC_ARG_ENABLE([maintainer-mode], 7963b698ba48Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 796409885543Smrg (and sometimes confusing) to the casual installer], 7965b698ba48Smrg [USE_MAINTAINER_MODE=$enableval], 7966b698ba48Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 796709885543Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 7968b698ba48Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 796909885543Smrg MAINT=$MAINTAINER_MODE_TRUE 7970b698ba48Smrg AC_SUBST([MAINT])dnl 797109885543Smrg] 797209885543Smrg) 797309885543Smrg 797409885543SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 797509885543Smrg 797609885543Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 797709885543Smrg 7978b698ba48Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 797909885543Smrg# 798009885543Smrg# This file is free software; the Free Software Foundation 798109885543Smrg# gives unlimited permission to copy and/or distribute it, 798209885543Smrg# with or without modifications, as long as this notice is preserved. 798309885543Smrg 7984b698ba48Smrg# serial 4 798509885543Smrg 798609885543Smrg# AM_MAKE_INCLUDE() 798709885543Smrg# ----------------- 798809885543Smrg# Check to see how make treats includes. 798909885543SmrgAC_DEFUN([AM_MAKE_INCLUDE], 799009885543Smrg[am_make=${MAKE-make} 799109885543Smrgcat > confinc << 'END' 799209885543Smrgam__doit: 7993b698ba48Smrg @echo this is the am__doit target 799409885543Smrg.PHONY: am__doit 799509885543SmrgEND 799609885543Smrg# If we don't find an include directive, just comment out the code. 799709885543SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 799809885543Smrgam__include="#" 799909885543Smrgam__quote= 800009885543Smrg_am_result=none 800109885543Smrg# First try GNU make style include. 800209885543Smrgecho "include confinc" > confmf 8003b698ba48Smrg# Ignore all kinds of additional output from `make'. 8004b698ba48Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 8005b698ba48Smrg*the\ am__doit\ target*) 8006b698ba48Smrg am__include=include 8007b698ba48Smrg am__quote= 8008b698ba48Smrg _am_result=GNU 8009b698ba48Smrg ;; 8010b698ba48Smrgesac 801109885543Smrg# Now try BSD make style include. 801209885543Smrgif test "$am__include" = "#"; then 801309885543Smrg echo '.include "confinc"' > confmf 8014b698ba48Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 8015b698ba48Smrg *the\ am__doit\ target*) 8016b698ba48Smrg am__include=.include 8017b698ba48Smrg am__quote="\"" 8018b698ba48Smrg _am_result=BSD 8019b698ba48Smrg ;; 8020b698ba48Smrg esac 802109885543Smrgfi 802209885543SmrgAC_SUBST([am__include]) 802309885543SmrgAC_SUBST([am__quote]) 802409885543SmrgAC_MSG_RESULT([$_am_result]) 802509885543Smrgrm -f confinc confmf 802609885543Smrg]) 802709885543Smrg 802809885543Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 802909885543Smrg 8030b698ba48Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 803109885543Smrg# Free Software Foundation, Inc. 803209885543Smrg# 803309885543Smrg# This file is free software; the Free Software Foundation 803409885543Smrg# gives unlimited permission to copy and/or distribute it, 803509885543Smrg# with or without modifications, as long as this notice is preserved. 803609885543Smrg 8037b698ba48Smrg# serial 6 803809885543Smrg 803909885543Smrg# AM_MISSING_PROG(NAME, PROGRAM) 804009885543Smrg# ------------------------------ 804109885543SmrgAC_DEFUN([AM_MISSING_PROG], 804209885543Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 804309885543Smrg$1=${$1-"${am_missing_run}$2"} 804409885543SmrgAC_SUBST($1)]) 804509885543Smrg 804609885543Smrg 804709885543Smrg# AM_MISSING_HAS_RUN 804809885543Smrg# ------------------ 804909885543Smrg# Define MISSING if not defined so far and test if it supports --run. 805009885543Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 805109885543SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 805209885543Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 80537104f784SmrgAC_REQUIRE_AUX_FILE([missing])dnl 8054b698ba48Smrgif test x"${MISSING+set}" != xset; then 8055b698ba48Smrg case $am_aux_dir in 8056b698ba48Smrg *\ * | *\ *) 8057b698ba48Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 8058b698ba48Smrg *) 8059b698ba48Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 8060b698ba48Smrg esac 8061b698ba48Smrgfi 806209885543Smrg# Use eval to expand $SHELL 806309885543Smrgif eval "$MISSING --run true"; then 806409885543Smrg am_missing_run="$MISSING --run " 806509885543Smrgelse 806609885543Smrg am_missing_run= 806709885543Smrg AC_MSG_WARN([`missing' script is too old or missing]) 806809885543Smrgfi 806909885543Smrg]) 807009885543Smrg 80717104f784Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 807209885543Smrg# 807309885543Smrg# This file is free software; the Free Software Foundation 807409885543Smrg# gives unlimited permission to copy and/or distribute it, 807509885543Smrg# with or without modifications, as long as this notice is preserved. 807609885543Smrg 807709885543Smrg# AM_PROG_MKDIR_P 807809885543Smrg# --------------- 80797104f784Smrg# Check for `mkdir -p'. 808009885543SmrgAC_DEFUN([AM_PROG_MKDIR_P], 80817104f784Smrg[AC_PREREQ([2.60])dnl 80827104f784SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 80837104f784Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 80847104f784Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 80857104f784Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 80867104f784Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 80877104f784Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 80887104f784Smrgdnl adjustment using top_builddir (which is defined more often than 80897104f784Smrgdnl MKDIR_P). 80907104f784SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 80917104f784Smrgcase $mkdir_p in 80927104f784Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 80937104f784Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 80947104f784Smrgesac 80957104f784Smrg]) 809609885543Smrg 809709885543Smrg# Helper functions for option handling. -*- Autoconf -*- 809809885543Smrg 80997104f784Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 810009885543Smrg# 810109885543Smrg# This file is free software; the Free Software Foundation 810209885543Smrg# gives unlimited permission to copy and/or distribute it, 810309885543Smrg# with or without modifications, as long as this notice is preserved. 810409885543Smrg 81057104f784Smrg# serial 4 810609885543Smrg 810709885543Smrg# _AM_MANGLE_OPTION(NAME) 810809885543Smrg# ----------------------- 810909885543SmrgAC_DEFUN([_AM_MANGLE_OPTION], 811009885543Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 811109885543Smrg 811209885543Smrg# _AM_SET_OPTION(NAME) 811309885543Smrg# ------------------------------ 811409885543Smrg# Set option NAME. Presently that only means defining a flag for this option. 811509885543SmrgAC_DEFUN([_AM_SET_OPTION], 811609885543Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 811709885543Smrg 811809885543Smrg# _AM_SET_OPTIONS(OPTIONS) 811909885543Smrg# ---------------------------------- 812009885543Smrg# OPTIONS is a space-separated list of Automake options. 812109885543SmrgAC_DEFUN([_AM_SET_OPTIONS], 81227104f784Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 812309885543Smrg 812409885543Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 812509885543Smrg# ------------------------------------------- 812609885543Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 812709885543SmrgAC_DEFUN([_AM_IF_OPTION], 812809885543Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 812909885543Smrg 813009885543Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 813109885543Smrg 8132b698ba48Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 813309885543Smrg# Free Software Foundation, Inc. 813409885543Smrg# 813509885543Smrg# This file is free software; the Free Software Foundation 813609885543Smrg# gives unlimited permission to copy and/or distribute it, 813709885543Smrg# with or without modifications, as long as this notice is preserved. 813809885543Smrg 8139b698ba48Smrg# serial 5 814009885543Smrg 814109885543Smrg# AM_SANITY_CHECK 814209885543Smrg# --------------- 814309885543SmrgAC_DEFUN([AM_SANITY_CHECK], 814409885543Smrg[AC_MSG_CHECKING([whether build environment is sane]) 814509885543Smrg# Just in case 814609885543Smrgsleep 1 814709885543Smrgecho timestamp > conftest.file 8148b698ba48Smrg# Reject unsafe characters in $srcdir or the absolute working directory 8149b698ba48Smrg# name. Accept space and tab only in the latter. 8150b698ba48Smrgam_lf=' 8151b698ba48Smrg' 8152b698ba48Smrgcase `pwd` in 8153b698ba48Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8154b698ba48Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8155b698ba48Smrgesac 8156b698ba48Smrgcase $srcdir in 8157b698ba48Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8158b698ba48Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 8159b698ba48Smrgesac 8160b698ba48Smrg 816109885543Smrg# Do `set' in a subshell so we don't clobber the current shell's 816209885543Smrg# arguments. Must try -L first in case configure is actually a 816309885543Smrg# symlink; some systems play weird games with the mod time of symlinks 816409885543Smrg# (eg FreeBSD returns the mod time of the symlink's containing 816509885543Smrg# directory). 816609885543Smrgif ( 8167b698ba48Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 816809885543Smrg if test "$[*]" = "X"; then 816909885543Smrg # -L didn't work. 8170b698ba48Smrg set X `ls -t "$srcdir/configure" conftest.file` 817109885543Smrg fi 817209885543Smrg rm -f conftest.file 817309885543Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 817409885543Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 817509885543Smrg 817609885543Smrg # If neither matched, then we have a broken ls. This can happen 817709885543Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 817809885543Smrg # broken ls alias from the environment. This has actually 817909885543Smrg # happened. Such a system could not be considered "sane". 818009885543Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 818109885543Smrgalias in your environment]) 818209885543Smrg fi 818309885543Smrg 818409885543Smrg test "$[2]" = conftest.file 818509885543Smrg ) 818609885543Smrgthen 818709885543Smrg # Ok. 818809885543Smrg : 818909885543Smrgelse 819009885543Smrg AC_MSG_ERROR([newly created file is older than distributed files! 819109885543SmrgCheck your system clock]) 819209885543Smrgfi 819309885543SmrgAC_MSG_RESULT(yes)]) 819409885543Smrg 819509885543Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 819609885543Smrg# 819709885543Smrg# This file is free software; the Free Software Foundation 819809885543Smrg# gives unlimited permission to copy and/or distribute it, 819909885543Smrg# with or without modifications, as long as this notice is preserved. 820009885543Smrg 820109885543Smrg# AM_PROG_INSTALL_STRIP 820209885543Smrg# --------------------- 820309885543Smrg# One issue with vendor `install' (even GNU) is that you can't 820409885543Smrg# specify the program used to strip binaries. This is especially 820509885543Smrg# annoying in cross-compiling environments, where the build's strip 820609885543Smrg# is unlikely to handle the host's binaries. 820709885543Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 820809885543Smrg# always use install-sh in `make install-strip', and initialize 820909885543Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 821009885543SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 821109885543Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 821209885543Smrg# Installed binaries are usually stripped using `strip' when the user 821309885543Smrg# run `make install-strip'. However `strip' might not be the right 821409885543Smrg# tool to use in cross-compilation environments, therefore Automake 821509885543Smrg# will honor the `STRIP' environment variable to overrule this program. 821609885543Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 821709885543Smrgif test "$cross_compiling" != no; then 821809885543Smrg AC_CHECK_TOOL([STRIP], [strip], :) 821909885543Smrgfi 82207104f784SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 822109885543SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 822209885543Smrg 8223b698ba48Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 82247104f784Smrg# 82257104f784Smrg# This file is free software; the Free Software Foundation 82267104f784Smrg# gives unlimited permission to copy and/or distribute it, 82277104f784Smrg# with or without modifications, as long as this notice is preserved. 82287104f784Smrg 8229b698ba48Smrg# serial 2 8230b698ba48Smrg 82317104f784Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 82327104f784Smrg# --------------------------- 82337104f784Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 82347104f784Smrg# This macro is traced by Automake. 82357104f784SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 82367104f784Smrg 8237b698ba48Smrg# AM_SUBST_NOTMAKE(VARIABLE) 8238b698ba48Smrg# --------------------------- 8239b698ba48Smrg# Public sister of _AM_SUBST_NOTMAKE. 8240b698ba48SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 8241b698ba48Smrg 824209885543Smrg# Check how to create a tarball. -*- Autoconf -*- 824309885543Smrg 824409885543Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 824509885543Smrg# 824609885543Smrg# This file is free software; the Free Software Foundation 824709885543Smrg# gives unlimited permission to copy and/or distribute it, 824809885543Smrg# with or without modifications, as long as this notice is preserved. 824909885543Smrg 825009885543Smrg# serial 2 825109885543Smrg 825209885543Smrg# _AM_PROG_TAR(FORMAT) 825309885543Smrg# -------------------- 825409885543Smrg# Check how to create a tarball in format FORMAT. 825509885543Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 825609885543Smrg# 825709885543Smrg# Substitute a variable $(am__tar) that is a command 825809885543Smrg# writing to stdout a FORMAT-tarball containing the directory 825909885543Smrg# $tardir. 826009885543Smrg# tardir=directory && $(am__tar) > result.tar 826109885543Smrg# 826209885543Smrg# Substitute a variable $(am__untar) that extract such 826309885543Smrg# a tarball read from stdin. 826409885543Smrg# $(am__untar) < result.tar 826509885543SmrgAC_DEFUN([_AM_PROG_TAR], 826609885543Smrg[# Always define AMTAR for backward compatibility. 826709885543SmrgAM_MISSING_PROG([AMTAR], [tar]) 826809885543Smrgm4_if([$1], [v7], 826909885543Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 827009885543Smrg [m4_case([$1], [ustar],, [pax],, 827109885543Smrg [m4_fatal([Unknown tar format])]) 827209885543SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 827309885543Smrg# Loop over all known methods to create a tar archive until one works. 827409885543Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 827509885543Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 827609885543Smrg# Do not fold the above two line into one, because Tru64 sh and 827709885543Smrg# Solaris sh will not grok spaces in the rhs of `-'. 827809885543Smrgfor _am_tool in $_am_tools 827909885543Smrgdo 828009885543Smrg case $_am_tool in 828109885543Smrg gnutar) 828209885543Smrg for _am_tar in tar gnutar gtar; 828309885543Smrg do 828409885543Smrg AM_RUN_LOG([$_am_tar --version]) && break 828509885543Smrg done 828609885543Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 828709885543Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 828809885543Smrg am__untar="$_am_tar -xf -" 828909885543Smrg ;; 829009885543Smrg plaintar) 829109885543Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 829209885543Smrg # ustar tarball either. 829309885543Smrg (tar --version) >/dev/null 2>&1 && continue 829409885543Smrg am__tar='tar chf - "$$tardir"' 829509885543Smrg am__tar_='tar chf - "$tardir"' 829609885543Smrg am__untar='tar xf -' 829709885543Smrg ;; 829809885543Smrg pax) 829909885543Smrg am__tar='pax -L -x $1 -w "$$tardir"' 830009885543Smrg am__tar_='pax -L -x $1 -w "$tardir"' 830109885543Smrg am__untar='pax -r' 830209885543Smrg ;; 830309885543Smrg cpio) 830409885543Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 830509885543Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 830609885543Smrg am__untar='cpio -i -H $1 -d' 830709885543Smrg ;; 830809885543Smrg none) 830909885543Smrg am__tar=false 831009885543Smrg am__tar_=false 831109885543Smrg am__untar=false 831209885543Smrg ;; 831309885543Smrg esac 831409885543Smrg 831509885543Smrg # If the value was cached, stop now. We just wanted to have am__tar 831609885543Smrg # and am__untar set. 831709885543Smrg test -n "${am_cv_prog_tar_$1}" && break 831809885543Smrg 831909885543Smrg # tar/untar a dummy directory, and stop if the command works 832009885543Smrg rm -rf conftest.dir 832109885543Smrg mkdir conftest.dir 832209885543Smrg echo GrepMe > conftest.dir/file 832309885543Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 832409885543Smrg rm -rf conftest.dir 832509885543Smrg if test -s conftest.tar; then 832609885543Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 832709885543Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 832809885543Smrg fi 832909885543Smrgdone 833009885543Smrgrm -rf conftest.dir 833109885543Smrg 833209885543SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 833309885543SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 833409885543SmrgAC_SUBST([am__tar]) 833509885543SmrgAC_SUBST([am__untar]) 833609885543Smrg]) # _AM_PROG_TAR 833709885543Smrg 8338b698ba48Smrgdnl Copyright 2005 Red Hat, Inc 8339b698ba48Smrgdnl 8340b698ba48Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 8341b698ba48Smrgdnl documentation for any purpose is hereby granted without fee, provided that 8342b698ba48Smrgdnl the above copyright notice appear in all copies and that both that 8343b698ba48Smrgdnl copyright notice and this permission notice appear in supporting 8344b698ba48Smrgdnl documentation. 8345b698ba48Smrgdnl 8346b698ba48Smrgdnl The above copyright notice and this permission notice shall be included 8347b698ba48Smrgdnl in all copies or substantial portions of the Software. 8348b698ba48Smrgdnl 8349b698ba48Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 8350b698ba48Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 8351b698ba48Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 8352b698ba48Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 8353b698ba48Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 8354b698ba48Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 8355b698ba48Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 8356b698ba48Smrgdnl 8357b698ba48Smrgdnl Except as contained in this notice, the name of the copyright holders shall 8358b698ba48Smrgdnl not be used in advertising or otherwise to promote the sale, use or 8359b698ba48Smrgdnl other dealings in this Software without prior written authorization 8360b698ba48Smrgdnl from the copyright holders. 8361b698ba48Smrgdnl 8362b698ba48Smrg 8363b698ba48Smrg# XORG_DRIVER_CHECK_EXT() 8364b698ba48Smrg# -------------------------- 8365b698ba48Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 8366b698ba48Smrg# is defined, then add $1 to $REQUIRED_MODULES. 8367b698ba48Smrg 8368b698ba48SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 8369b698ba48Smrg SAVE_CFLAGS="$CFLAGS" 8370b698ba48Smrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 8371b698ba48Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 8372b698ba48Smrg#include "xorg-server.h" 8373b698ba48Smrg#if !defined $1 8374b698ba48Smrg#error $1 not defined 8375b698ba48Smrg#endif 8376b698ba48Smrg ]])], 8377b698ba48Smrg [_EXT_CHECK=yes], 8378b698ba48Smrg [_EXT_CHECK=no]) 8379b698ba48Smrg CFLAGS="$SAVE_CFLAGS" 8380b698ba48Smrg AC_MSG_CHECKING([if $1 is defined]) 8381b698ba48Smrg AC_MSG_RESULT([$_EXT_CHECK]) 8382b698ba48Smrg if test "$_EXT_CHECK" != no; then 8383b698ba48Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 8384b698ba48Smrg fi 8385b698ba48Smrg]) 8386b698ba48Smrg 8387