aclocal.m4 revision 518bcf38
1518bcf38Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 2c35d236eSmrg 3c35d236eSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4518bcf38Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5c35d236eSmrg# This file is free software; the Free Software Foundation 6c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8c35d236eSmrg 9c35d236eSmrg# This program is distributed in the hope that it will be useful, 10c35d236eSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11c35d236eSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12c35d236eSmrg# PARTICULAR PURPOSE. 13c35d236eSmrg 144f6cd06fSmrgm4_ifndef([AC_AUTOCONF_VERSION], 154f6cd06fSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16f55e6a01Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 174f6cd06fSmrg[m4_warning([this file was generated for autoconf 2.63. 184f6cd06fSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 194f6cd06fSmrgIf you have problems, you may need to regenerate the build system entirely. 204f6cd06fSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 214f6cd06fSmrg 22c35d236eSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23c35d236eSmrg 24518bcf38Smrg# serial 52 AC_PROG_LIBTOOL 25c35d236eSmrg 26c35d236eSmrg 27518bcf38Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 28518bcf38Smrg# ----------------------------------------------------------- 29518bcf38Smrg# If this macro is not defined by Autoconf, define it here. 30518bcf38Smrgm4_ifdef([AC_PROVIDE_IFELSE], 31518bcf38Smrg [], 32518bcf38Smrg [m4_define([AC_PROVIDE_IFELSE], 33518bcf38Smrg [m4_ifdef([AC_PROVIDE_$1], 34518bcf38Smrg [$2], [$3])])]) 35f55e6a01Smrg 36f55e6a01Smrg 37518bcf38Smrg# AC_PROG_LIBTOOL 38518bcf38Smrg# --------------- 39518bcf38SmrgAC_DEFUN([AC_PROG_LIBTOOL], 40518bcf38Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 41518bcf38Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 42518bcf38Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 43518bcf38Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 44518bcf38Smrg [AC_LIBTOOL_CXX], 45518bcf38Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 46518bcf38Smrg ])]) 47518bcf38Smrgdnl And a similar setup for Fortran 77 support 48518bcf38Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 49518bcf38Smrg [AC_LIBTOOL_F77], 50518bcf38Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 51518bcf38Smrg])]) 52518bcf38Smrg 53518bcf38Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 54518bcf38Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 55518bcf38Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 56518bcf38Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 57518bcf38Smrg [AC_LIBTOOL_GCJ], 58518bcf38Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 59518bcf38Smrg [AC_LIBTOOL_GCJ], 60518bcf38Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 61518bcf38Smrg [AC_LIBTOOL_GCJ], 62518bcf38Smrg [ifdef([AC_PROG_GCJ], 63518bcf38Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 64518bcf38Smrg ifdef([A][M_PROG_GCJ], 65518bcf38Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 66518bcf38Smrg ifdef([LT_AC_PROG_GCJ], 67518bcf38Smrg [define([LT_AC_PROG_GCJ], 68518bcf38Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 69518bcf38Smrg])])# AC_PROG_LIBTOOL 70518bcf38Smrg 71518bcf38Smrg 72518bcf38Smrg# _AC_PROG_LIBTOOL 73518bcf38Smrg# ---------------- 74518bcf38SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 75518bcf38Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 76518bcf38SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 77518bcf38SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 78518bcf38SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 79c35d236eSmrg 80c35d236eSmrg# This can be used to rebuild libtool when needed 81518bcf38SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 82c35d236eSmrg 83c35d236eSmrg# Always use our own libtool. 84c35d236eSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 85c35d236eSmrgAC_SUBST(LIBTOOL)dnl 86c35d236eSmrg 87518bcf38Smrg# Prevent multiple expansion 88518bcf38Smrgdefine([AC_PROG_LIBTOOL], []) 89518bcf38Smrg])# _AC_PROG_LIBTOOL 90f55e6a01Smrg 91f55e6a01Smrg 92518bcf38Smrg# AC_LIBTOOL_SETUP 93518bcf38Smrg# ---------------- 94518bcf38SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 95518bcf38Smrg[AC_PREREQ(2.50)dnl 96518bcf38SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 97518bcf38SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 98518bcf38SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 99518bcf38SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 100c35d236eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 101c35d236eSmrgAC_REQUIRE([AC_PROG_CC])dnl 102518bcf38SmrgAC_REQUIRE([AC_PROG_LD])dnl 103518bcf38SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 104518bcf38SmrgAC_REQUIRE([AC_PROG_NM])dnl 105518bcf38Smrg 106c35d236eSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 107518bcf38SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 108518bcf38Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 109518bcf38SmrgAC_REQUIRE([AC_OBJEXT])dnl 110518bcf38SmrgAC_REQUIRE([AC_EXEEXT])dnl 111f55e6a01Smrgdnl 112518bcf38SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 113518bcf38SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 114518bcf38SmrgAC_LIBTOOL_OBJDIR 115f55e6a01Smrg 116518bcf38SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 117518bcf38Smrg_LT_AC_PROG_ECHO_BACKSLASH 118c35d236eSmrg 119c35d236eSmrgcase $host_os in 120c35d236eSmrgaix3*) 121c35d236eSmrg # AIX sometimes has problems with the GCC collect2 program. For some 122c35d236eSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 123c35d236eSmrg # vanish in a puff of smoke. 124c35d236eSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 125c35d236eSmrg COLLECT_NAMES= 126c35d236eSmrg export COLLECT_NAMES 127c35d236eSmrg fi 128c35d236eSmrg ;; 129c35d236eSmrgesac 130c35d236eSmrg 131c35d236eSmrg# Sed substitution that helps us do robust quoting. It backslashifies 132c35d236eSmrg# metacharacters that are still active within double-quoted strings. 133518bcf38SmrgXsed='sed -e 1s/^X//' 134518bcf38Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 135c35d236eSmrg 136c35d236eSmrg# Same as above, but do not quote variable references. 137518bcf38Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 138c35d236eSmrg 139c35d236eSmrg# Sed substitution to delay expansion of an escaped shell variable in a 140c35d236eSmrg# double_quote_subst'ed string. 141c35d236eSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 142c35d236eSmrg 143c35d236eSmrg# Sed substitution to avoid accidental globbing in evaled expressions 144c35d236eSmrgno_glob_subst='s/\*/\\\*/g' 145c35d236eSmrg 146518bcf38Smrg# Constants: 147518bcf38Smrgrm="rm -f" 148518bcf38Smrg 149c35d236eSmrg# Global variables: 150518bcf38Smrgdefault_ofile=libtool 151c35d236eSmrgcan_build_shared=yes 152c35d236eSmrg 153c35d236eSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 154c35d236eSmrg# which needs '.lib'). 155c35d236eSmrglibext=a 156518bcf38Smrgltmain="$ac_aux_dir/ltmain.sh" 157518bcf38Smrgofile="$default_ofile" 158f55e6a01Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 159c35d236eSmrg 160518bcf38SmrgAC_CHECK_TOOL(AR, ar, false) 161518bcf38SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 162518bcf38SmrgAC_CHECK_TOOL(STRIP, strip, :) 163518bcf38Smrg 164c35d236eSmrgold_CC="$CC" 165c35d236eSmrgold_CFLAGS="$CFLAGS" 166c35d236eSmrg 167c35d236eSmrg# Set sane defaults for various variables 168518bcf38Smrgtest -z "$AR" && AR=ar 169518bcf38Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 170518bcf38Smrgtest -z "$AS" && AS=as 171c35d236eSmrgtest -z "$CC" && CC=cc 172c35d236eSmrgtest -z "$LTCC" && LTCC=$CC 173c35d236eSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 174518bcf38Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 175c35d236eSmrgtest -z "$LD" && LD=ld 176518bcf38Smrgtest -z "$LN_S" && LN_S="ln -s" 177518bcf38Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 178518bcf38Smrgtest -z "$NM" && NM=nm 179518bcf38Smrgtest -z "$SED" && SED=sed 180518bcf38Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 181518bcf38Smrgtest -z "$RANLIB" && RANLIB=: 182518bcf38Smrgtest -z "$STRIP" && STRIP=: 183c35d236eSmrgtest -z "$ac_objext" && ac_objext=o 184c35d236eSmrg 185518bcf38Smrg# Determine commands to create old-style static archives. 186518bcf38Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 187518bcf38Smrgold_postinstall_cmds='chmod 644 $oldlib' 188518bcf38Smrgold_postuninstall_cmds= 189518bcf38Smrg 190518bcf38Smrgif test -n "$RANLIB"; then 191518bcf38Smrg case $host_os in 192518bcf38Smrg openbsd*) 193518bcf38Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 194518bcf38Smrg ;; 195518bcf38Smrg *) 196518bcf38Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 197518bcf38Smrg ;; 198518bcf38Smrg esac 199518bcf38Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 200518bcf38Smrgfi 201518bcf38Smrg 202c35d236eSmrg_LT_CC_BASENAME([$compiler]) 203c35d236eSmrg 204c35d236eSmrg# Only perform the check for file, if the check method requires it 205c35d236eSmrgcase $deplibs_check_method in 206c35d236eSmrgfile_magic*) 207c35d236eSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 208518bcf38Smrg AC_PATH_MAGIC 209c35d236eSmrg fi 210c35d236eSmrg ;; 211c35d236eSmrgesac 212c35d236eSmrg 213518bcf38Smrg_LT_REQUIRED_DARWIN_CHECKS 214f55e6a01Smrg 215518bcf38SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 216518bcf38SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 217518bcf38Smrgenable_win32_dll=yes, enable_win32_dll=no) 218f55e6a01Smrg 219518bcf38SmrgAC_ARG_ENABLE([libtool-lock], 220518bcf38Smrg [AC_HELP_STRING([--disable-libtool-lock], 221518bcf38Smrg [avoid locking (might break parallel builds)])]) 222518bcf38Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 223f55e6a01Smrg 224518bcf38SmrgAC_ARG_WITH([pic], 225518bcf38Smrg [AC_HELP_STRING([--with-pic], 226518bcf38Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 227518bcf38Smrg [pic_mode="$withval"], 228518bcf38Smrg [pic_mode=default]) 229518bcf38Smrgtest -z "$pic_mode" && pic_mode=default 230f55e6a01Smrg 231518bcf38Smrg# Use C for the default configuration in the libtool script 232518bcf38Smrgtagname= 233518bcf38SmrgAC_LIBTOOL_LANG_C_CONFIG 234518bcf38Smrg_LT_AC_TAGCONFIG 235518bcf38Smrg])# AC_LIBTOOL_SETUP 236f55e6a01Smrg 237f55e6a01Smrg 238518bcf38Smrg# _LT_AC_SYS_COMPILER 239c35d236eSmrg# ------------------- 240518bcf38SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 241c35d236eSmrg[AC_REQUIRE([AC_PROG_CC])dnl 242c35d236eSmrg 243c35d236eSmrg# If no C compiler was specified, use CC. 244c35d236eSmrgLTCC=${LTCC-"$CC"} 245c35d236eSmrg 246c35d236eSmrg# If no C compiler flags were specified, use CFLAGS. 247c35d236eSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 248c35d236eSmrg 249c35d236eSmrg# Allow CC to be a program name with arguments. 250c35d236eSmrgcompiler=$CC 251518bcf38Smrg])# _LT_AC_SYS_COMPILER 252518bcf38Smrg 253518bcf38Smrg 254518bcf38Smrg# _LT_CC_BASENAME(CC) 255518bcf38Smrg# ------------------- 256518bcf38Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 257518bcf38SmrgAC_DEFUN([_LT_CC_BASENAME], 258518bcf38Smrg[for cc_temp in $1""; do 259518bcf38Smrg case $cc_temp in 260518bcf38Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 261518bcf38Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 262518bcf38Smrg \-*) ;; 263518bcf38Smrg *) break;; 264518bcf38Smrg esac 265518bcf38Smrgdone 266518bcf38Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 267518bcf38Smrg]) 268c35d236eSmrg 269c35d236eSmrg 270c35d236eSmrg# _LT_COMPILER_BOILERPLATE 271c35d236eSmrg# ------------------------ 272c35d236eSmrg# Check for compiler boilerplate output or warnings with 273c35d236eSmrg# the simple compiler test code. 274518bcf38SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 275518bcf38Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 2764f6cd06fSmrgac_outfile=conftest.$ac_objext 2774f6cd06fSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 278c35d236eSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 279c35d236eSmrg_lt_compiler_boilerplate=`cat conftest.err` 280518bcf38Smrg$rm conftest* 281c35d236eSmrg])# _LT_COMPILER_BOILERPLATE 282c35d236eSmrg 283c35d236eSmrg 284c35d236eSmrg# _LT_LINKER_BOILERPLATE 285c35d236eSmrg# ---------------------- 286c35d236eSmrg# Check for linker boilerplate output or warnings with 287c35d236eSmrg# the simple link test code. 288518bcf38SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 289518bcf38Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 2904f6cd06fSmrgac_outfile=conftest.$ac_objext 2914f6cd06fSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 292c35d236eSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 293c35d236eSmrg_lt_linker_boilerplate=`cat conftest.err` 294518bcf38Smrg$rm -r conftest* 295c35d236eSmrg])# _LT_LINKER_BOILERPLATE 296c35d236eSmrg 2974f6cd06fSmrg# _LT_REQUIRED_DARWIN_CHECKS 298518bcf38Smrg# -------------------------- 299518bcf38Smrg# Check for some things on darwin 300518bcf38SmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ 3014f6cd06fSmrg case $host_os in 3024f6cd06fSmrg rhapsody* | darwin*) 3034f6cd06fSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 3044f6cd06fSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 3054f6cd06fSmrg 3064f6cd06fSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 3074f6cd06fSmrg [lt_cv_apple_cc_single_mod=no 3084f6cd06fSmrg if test -z "${LT_MULTI_MODULE}"; then 309518bcf38Smrg # By default we will add the -single_module flag. You can override 310518bcf38Smrg # by either setting the environment variable LT_MULTI_MODULE 311518bcf38Smrg # non-empty at configure time, or by adding -multi_module to the 312518bcf38Smrg # link flags. 313518bcf38Smrg echo "int foo(void){return 1;}" > conftest.c 314518bcf38Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 315518bcf38Smrg -dynamiclib ${wl}-single_module conftest.c 316518bcf38Smrg if test -f libconftest.dylib; then 317518bcf38Smrg lt_cv_apple_cc_single_mod=yes 318518bcf38Smrg rm -rf libconftest.dylib* 319518bcf38Smrg fi 320518bcf38Smrg rm conftest.c 3214f6cd06fSmrg fi]) 3224f6cd06fSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 3234f6cd06fSmrg [lt_cv_ld_exported_symbols_list], 3244f6cd06fSmrg [lt_cv_ld_exported_symbols_list=no 3254f6cd06fSmrg save_LDFLAGS=$LDFLAGS 3264f6cd06fSmrg echo "_main" > conftest.sym 3274f6cd06fSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 3284f6cd06fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 329518bcf38Smrg [lt_cv_ld_exported_symbols_list=yes], 330518bcf38Smrg [lt_cv_ld_exported_symbols_list=no]) 331518bcf38Smrg LDFLAGS="$save_LDFLAGS" 3324f6cd06fSmrg ]) 3334f6cd06fSmrg case $host_os in 334518bcf38Smrg rhapsody* | darwin1.[[0123]]) 3354f6cd06fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 3364f6cd06fSmrg darwin1.*) 337518bcf38Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 338518bcf38Smrg darwin*) 3394f6cd06fSmrg # if running on 10.5 or later, the deployment target defaults 3404f6cd06fSmrg # to the OS version, if on x86, and 10.4, the deployment 3414f6cd06fSmrg # target defaults to 10.4. Don't you love it? 3424f6cd06fSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 343518bcf38Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 344518bcf38Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 345518bcf38Smrg 10.[[012]]*) 346518bcf38Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 347518bcf38Smrg 10.*) 348518bcf38Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3494f6cd06fSmrg esac 3504f6cd06fSmrg ;; 3514f6cd06fSmrg esac 3524f6cd06fSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 3534f6cd06fSmrg _lt_dar_single_mod='$single_module' 3544f6cd06fSmrg fi 3554f6cd06fSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 3564f6cd06fSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 3574f6cd06fSmrg else 358518bcf38Smrg _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 3594f6cd06fSmrg fi 3604f6cd06fSmrg if test "$DSYMUTIL" != ":"; then 361518bcf38Smrg _lt_dsymutil="~$DSYMUTIL \$lib || :" 3624f6cd06fSmrg else 3634f6cd06fSmrg _lt_dsymutil= 3644f6cd06fSmrg fi 3654f6cd06fSmrg ;; 3664f6cd06fSmrg esac 3674f6cd06fSmrg]) 368c35d236eSmrg 369518bcf38Smrg# _LT_AC_SYS_LIBPATH_AIX 370518bcf38Smrg# ---------------------- 371c35d236eSmrg# Links a minimal program and checks the executable 372c35d236eSmrg# for the system default hardcoded library path. In most cases, 373c35d236eSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 374c35d236eSmrg# the location of the communication and MPI libs are included too. 375c35d236eSmrg# If we don't find anything, use the default library path according 376c35d236eSmrg# to the aix ld manual. 377518bcf38SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 378518bcf38Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 3794f6cd06fSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 3804f6cd06fSmrglt_aix_libpath_sed=' 3814f6cd06fSmrg /Import File Strings/,/^$/ { 3824f6cd06fSmrg /^0/ { 3834f6cd06fSmrg s/^0 *\(.*\)$/\1/ 3844f6cd06fSmrg p 3854f6cd06fSmrg } 3864f6cd06fSmrg }' 3874f6cd06fSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 388c35d236eSmrg# Check for a 64-bit object if we didn't find anything. 3894f6cd06fSmrgif test -z "$aix_libpath"; then 3904f6cd06fSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3914f6cd06fSmrgfi],[]) 392c35d236eSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 393518bcf38Smrg])# _LT_AC_SYS_LIBPATH_AIX 394c35d236eSmrg 395c35d236eSmrg 396518bcf38Smrg# _LT_AC_SHELL_INIT(ARG) 397518bcf38Smrg# ---------------------- 398518bcf38SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 399c35d236eSmrg[ifdef([AC_DIVERSION_NOTICE], 400c35d236eSmrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 401c35d236eSmrg [AC_DIVERT_PUSH(NOTICE)]) 402c35d236eSmrg$1 403c35d236eSmrgAC_DIVERT_POP 404518bcf38Smrg])# _LT_AC_SHELL_INIT 405c35d236eSmrg 406c35d236eSmrg 407518bcf38Smrg# _LT_AC_PROG_ECHO_BACKSLASH 408518bcf38Smrg# -------------------------- 409c35d236eSmrg# Add some code to the start of the generated configure script which 410c35d236eSmrg# will find an echo command which doesn't interpret backslashes. 411518bcf38SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 412518bcf38Smrg[_LT_AC_SHELL_INIT([ 413c35d236eSmrg# Check that we are running under the correct shell. 414c35d236eSmrgSHELL=${CONFIG_SHELL-/bin/sh} 415c35d236eSmrg 416518bcf38Smrgcase X$ECHO in 417c35d236eSmrgX*--fallback-echo) 418c35d236eSmrg # Remove one level of quotation (which was required for Make). 419518bcf38Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 420c35d236eSmrg ;; 421c35d236eSmrgesac 422c35d236eSmrg 423518bcf38Smrgecho=${ECHO-echo} 424c35d236eSmrgif test "X[$]1" = X--no-reexec; then 425c35d236eSmrg # Discard the --no-reexec flag, and continue. 426c35d236eSmrg shift 427c35d236eSmrgelif test "X[$]1" = X--fallback-echo; then 428c35d236eSmrg # Avoid inline document here, it may be left over 429c35d236eSmrg : 430518bcf38Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 431518bcf38Smrg # Yippee, $echo works! 432c35d236eSmrg : 433c35d236eSmrgelse 434c35d236eSmrg # Restart under the correct shell. 435c35d236eSmrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 436c35d236eSmrgfi 437c35d236eSmrg 438c35d236eSmrgif test "X[$]1" = X--fallback-echo; then 439c35d236eSmrg # used as fallback echo 440c35d236eSmrg shift 441518bcf38Smrg cat <<EOF 442c35d236eSmrg[$]* 443518bcf38SmrgEOF 444c35d236eSmrg exit 0 445c35d236eSmrgfi 446c35d236eSmrg 447c35d236eSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 448c35d236eSmrg# if CDPATH is set. 449c35d236eSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 450c35d236eSmrg 451518bcf38Smrgif test -z "$ECHO"; then 452518bcf38Smrgif test "X${echo_test_string+set}" != Xset; then 453518bcf38Smrg# find a string as large as possible, as long as the shell can cope with it 454518bcf38Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 455518bcf38Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 456518bcf38Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 457518bcf38Smrg echo_test_string=`eval $cmd` && 458518bcf38Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 459518bcf38Smrg then 460518bcf38Smrg break 461518bcf38Smrg fi 462518bcf38Smrg done 463518bcf38Smrgfi 464c35d236eSmrg 465518bcf38Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 466518bcf38Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 467518bcf38Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 468518bcf38Smrg : 469518bcf38Smrgelse 470518bcf38Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 471518bcf38Smrg # backslashes. This makes it impossible to quote backslashes using 472518bcf38Smrg # echo "$something" | sed 's/\\/\\\\/g' 473518bcf38Smrg # 474518bcf38Smrg # So, first we look for a working echo in the user's PATH. 475c35d236eSmrg 476518bcf38Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 477518bcf38Smrg for dir in $PATH /usr/ucb; do 478c35d236eSmrg IFS="$lt_save_ifs" 479518bcf38Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 480518bcf38Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 481518bcf38Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 482518bcf38Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 483518bcf38Smrg echo="$dir/echo" 484518bcf38Smrg break 485518bcf38Smrg fi 486518bcf38Smrg done 487518bcf38Smrg IFS="$lt_save_ifs" 488c35d236eSmrg 489518bcf38Smrg if test "X$echo" = Xecho; then 490518bcf38Smrg # We didn't find a better echo, so look for alternatives. 491518bcf38Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 492518bcf38Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 493518bcf38Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 494518bcf38Smrg # This shell has a builtin print -r that does the trick. 495518bcf38Smrg echo='print -r' 496518bcf38Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 497518bcf38Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 498518bcf38Smrg # If we have ksh, try running configure again with it. 499518bcf38Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 500518bcf38Smrg export ORIGINAL_CONFIG_SHELL 501518bcf38Smrg CONFIG_SHELL=/bin/ksh 502518bcf38Smrg export CONFIG_SHELL 503518bcf38Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 504518bcf38Smrg else 505518bcf38Smrg # Try using printf. 506518bcf38Smrg echo='printf %s\n' 507518bcf38Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 508518bcf38Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 509518bcf38Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 510518bcf38Smrg # Cool, printf works 511518bcf38Smrg : 512518bcf38Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 513518bcf38Smrg test "X$echo_testing_string" = 'X\t' && 514518bcf38Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 515f55e6a01Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 516518bcf38Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 517518bcf38Smrg export CONFIG_SHELL 518518bcf38Smrg SHELL="$CONFIG_SHELL" 519518bcf38Smrg export SHELL 520518bcf38Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 521518bcf38Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 522518bcf38Smrg test "X$echo_testing_string" = 'X\t' && 523518bcf38Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 524518bcf38Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 525518bcf38Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 526518bcf38Smrg else 527518bcf38Smrg # maybe with a smaller string... 528518bcf38Smrg prev=: 529c35d236eSmrg 530518bcf38Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 531518bcf38Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 532518bcf38Smrg then 533518bcf38Smrg break 534f55e6a01Smrg fi 535518bcf38Smrg prev="$cmd" 536518bcf38Smrg done 537518bcf38Smrg 538518bcf38Smrg if test "$prev" != 'sed 50q "[$]0"'; then 539518bcf38Smrg echo_test_string=`eval $prev` 540518bcf38Smrg export echo_test_string 541518bcf38Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 542518bcf38Smrg else 543518bcf38Smrg # Oops. We lost completely, so just stick with echo. 544518bcf38Smrg echo=echo 545518bcf38Smrg fi 546c35d236eSmrg fi 547c35d236eSmrg fi 548c35d236eSmrg fi 549c35d236eSmrgfi 550518bcf38Smrgfi 551c35d236eSmrg 552c35d236eSmrg# Copy echo and quote the copy suitably for passing to libtool from 553c35d236eSmrg# the Makefile, instead of quoting the original, which is used later. 554518bcf38SmrgECHO=$echo 555518bcf38Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 556518bcf38Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 557c35d236eSmrgfi 558c35d236eSmrg 559518bcf38SmrgAC_SUBST(ECHO) 560518bcf38Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 561c35d236eSmrg 562c35d236eSmrg 563518bcf38Smrg# _LT_AC_LOCK 564518bcf38Smrg# ----------- 565518bcf38SmrgAC_DEFUN([_LT_AC_LOCK], 566c35d236eSmrg[AC_ARG_ENABLE([libtool-lock], 567518bcf38Smrg [AC_HELP_STRING([--disable-libtool-lock], 568518bcf38Smrg [avoid locking (might break parallel builds)])]) 569c35d236eSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 570c35d236eSmrg 571c35d236eSmrg# Some flags need to be propagated to the compiler or linker for good 572c35d236eSmrg# libtool support. 573c35d236eSmrgcase $host in 574c35d236eSmrgia64-*-hpux*) 575c35d236eSmrg # Find out which ABI we are using. 576c35d236eSmrg echo 'int i;' > conftest.$ac_ext 577c35d236eSmrg if AC_TRY_EVAL(ac_compile); then 578c35d236eSmrg case `/usr/bin/file conftest.$ac_objext` in 579518bcf38Smrg *ELF-32*) 580518bcf38Smrg HPUX_IA64_MODE="32" 581518bcf38Smrg ;; 582518bcf38Smrg *ELF-64*) 583518bcf38Smrg HPUX_IA64_MODE="64" 584518bcf38Smrg ;; 585c35d236eSmrg esac 586c35d236eSmrg fi 587c35d236eSmrg rm -rf conftest* 588c35d236eSmrg ;; 589c35d236eSmrg*-*-irix6*) 590c35d236eSmrg # Find out which ABI we are using. 591c35d236eSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 592c35d236eSmrg if AC_TRY_EVAL(ac_compile); then 593518bcf38Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 594518bcf38Smrg case `/usr/bin/file conftest.$ac_objext` in 595518bcf38Smrg *32-bit*) 596518bcf38Smrg LD="${LD-ld} -melf32bsmip" 597518bcf38Smrg ;; 598518bcf38Smrg *N32*) 599518bcf38Smrg LD="${LD-ld} -melf32bmipn32" 600518bcf38Smrg ;; 601518bcf38Smrg *64-bit*) 602518bcf38Smrg LD="${LD-ld} -melf64bmip" 603518bcf38Smrg ;; 604518bcf38Smrg esac 605518bcf38Smrg else 606518bcf38Smrg case `/usr/bin/file conftest.$ac_objext` in 607518bcf38Smrg *32-bit*) 608518bcf38Smrg LD="${LD-ld} -32" 609518bcf38Smrg ;; 610518bcf38Smrg *N32*) 611518bcf38Smrg LD="${LD-ld} -n32" 612518bcf38Smrg ;; 613518bcf38Smrg *64-bit*) 614518bcf38Smrg LD="${LD-ld} -64" 615518bcf38Smrg ;; 616518bcf38Smrg esac 617518bcf38Smrg fi 618c35d236eSmrg fi 619c35d236eSmrg rm -rf conftest* 620c35d236eSmrg ;; 621c35d236eSmrg 6224f6cd06fSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 623518bcf38Smrgs390*-*linux*|sparc*-*linux*) 624c35d236eSmrg # Find out which ABI we are using. 625c35d236eSmrg echo 'int i;' > conftest.$ac_ext 626c35d236eSmrg if AC_TRY_EVAL(ac_compile); then 627c35d236eSmrg case `/usr/bin/file conftest.o` in 628518bcf38Smrg *32-bit*) 629518bcf38Smrg case $host in 630518bcf38Smrg x86_64-*kfreebsd*-gnu) 631518bcf38Smrg LD="${LD-ld} -m elf_i386_fbsd" 632518bcf38Smrg ;; 633518bcf38Smrg x86_64-*linux*) 634518bcf38Smrg LD="${LD-ld} -m elf_i386" 635518bcf38Smrg ;; 636518bcf38Smrg ppc64-*linux*|powerpc64-*linux*) 637518bcf38Smrg LD="${LD-ld} -m elf32ppclinux" 638518bcf38Smrg ;; 639518bcf38Smrg s390x-*linux*) 640518bcf38Smrg LD="${LD-ld} -m elf_s390" 641518bcf38Smrg ;; 642518bcf38Smrg sparc64-*linux*) 643518bcf38Smrg LD="${LD-ld} -m elf32_sparc" 644518bcf38Smrg ;; 645518bcf38Smrg esac 646518bcf38Smrg ;; 647518bcf38Smrg *64-bit*) 648518bcf38Smrg libsuff=64 649518bcf38Smrg case $host in 650518bcf38Smrg x86_64-*kfreebsd*-gnu) 651518bcf38Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 652518bcf38Smrg ;; 653518bcf38Smrg x86_64-*linux*) 654518bcf38Smrg LD="${LD-ld} -m elf_x86_64" 655518bcf38Smrg ;; 656518bcf38Smrg ppc*-*linux*|powerpc*-*linux*) 657518bcf38Smrg LD="${LD-ld} -m elf64ppc" 658518bcf38Smrg ;; 659518bcf38Smrg s390*-*linux*) 660518bcf38Smrg LD="${LD-ld} -m elf64_s390" 661518bcf38Smrg ;; 662518bcf38Smrg sparc*-*linux*) 663518bcf38Smrg LD="${LD-ld} -m elf64_sparc" 664518bcf38Smrg ;; 665518bcf38Smrg esac 666518bcf38Smrg ;; 667c35d236eSmrg esac 668c35d236eSmrg fi 669c35d236eSmrg rm -rf conftest* 670c35d236eSmrg ;; 671c35d236eSmrg 672c35d236eSmrg*-*-sco3.2v5*) 673c35d236eSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 674c35d236eSmrg SAVE_CFLAGS="$CFLAGS" 675c35d236eSmrg CFLAGS="$CFLAGS -belf" 676c35d236eSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 677c35d236eSmrg [AC_LANG_PUSH(C) 678518bcf38Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 679c35d236eSmrg AC_LANG_POP]) 680c35d236eSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 681c35d236eSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 682c35d236eSmrg CFLAGS="$SAVE_CFLAGS" 683c35d236eSmrg fi 684c35d236eSmrg ;; 685c35d236eSmrgsparc*-*solaris*) 686c35d236eSmrg # Find out which ABI we are using. 687c35d236eSmrg echo 'int i;' > conftest.$ac_ext 688c35d236eSmrg if AC_TRY_EVAL(ac_compile); then 689c35d236eSmrg case `/usr/bin/file conftest.o` in 690c35d236eSmrg *64-bit*) 691c35d236eSmrg case $lt_cv_prog_gnu_ld in 692c35d236eSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 6934f6cd06fSmrg *) 694518bcf38Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 6954f6cd06fSmrg LD="${LD-ld} -64" 6964f6cd06fSmrg fi 6974f6cd06fSmrg ;; 698c35d236eSmrg esac 699c35d236eSmrg ;; 700c35d236eSmrg esac 701c35d236eSmrg fi 702c35d236eSmrg rm -rf conftest* 703c35d236eSmrg ;; 704518bcf38Smrg 705518bcf38SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 706518bcf38Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 707518bcf38Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 708518bcf38Smrg AC_CHECK_TOOL(AS, as, false) 709518bcf38Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 710518bcf38Smrg ;; 711518bcf38Smrg ]) 712c35d236eSmrgesac 713c35d236eSmrg 714c35d236eSmrgneed_locks="$enable_libtool_lock" 715f55e6a01Smrg 716518bcf38Smrg])# _LT_AC_LOCK 717c35d236eSmrg 718c35d236eSmrg 719518bcf38Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 720c35d236eSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 721c35d236eSmrg# ---------------------------------------------------------------- 722c35d236eSmrg# Check whether the given compiler option works 723518bcf38SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 724518bcf38Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 725c35d236eSmrgAC_CACHE_CHECK([$1], [$2], 726c35d236eSmrg [$2=no 727518bcf38Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 7284f6cd06fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 729c35d236eSmrg lt_compiler_flag="$3" 730c35d236eSmrg # Insert the option either (1) after the last *FLAGS variable, or 731c35d236eSmrg # (2) before a word containing "conftest.", or (3) at the end. 732c35d236eSmrg # Note that $ac_compile itself does not contain backslashes and begins 733c35d236eSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 734c35d236eSmrg # The option is referenced via a variable to avoid confusing sed. 735c35d236eSmrg lt_compile=`echo "$ac_compile" | $SED \ 736c35d236eSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 737c35d236eSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 738c35d236eSmrg -e 's:$: $lt_compiler_flag:'` 739c35d236eSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 740c35d236eSmrg (eval "$lt_compile" 2>conftest.err) 741c35d236eSmrg ac_status=$? 742c35d236eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 743c35d236eSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 744c35d236eSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 745c35d236eSmrg # The compiler can only warn and ignore the option if not recognized 746c35d236eSmrg # So say no if there are warnings other than the usual output. 747518bcf38Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 748c35d236eSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 749c35d236eSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 750c35d236eSmrg $2=yes 751c35d236eSmrg fi 752c35d236eSmrg fi 753518bcf38Smrg $rm conftest* 754c35d236eSmrg]) 755c35d236eSmrg 756c35d236eSmrgif test x"[$]$2" = xyes; then 757518bcf38Smrg ifelse([$5], , :, [$5]) 758c35d236eSmrgelse 759518bcf38Smrg ifelse([$6], , :, [$6]) 760c35d236eSmrgfi 761518bcf38Smrg])# AC_LIBTOOL_COMPILER_OPTION 762c35d236eSmrg 763f55e6a01Smrg 764518bcf38Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 765518bcf38Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 766518bcf38Smrg# ------------------------------------------------------------ 767518bcf38Smrg# Check whether the given compiler option works 768518bcf38SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 769518bcf38Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 7704f6cd06fSmrgAC_CACHE_CHECK([$1], [$2], 771c35d236eSmrg [$2=no 772c35d236eSmrg save_LDFLAGS="$LDFLAGS" 773c35d236eSmrg LDFLAGS="$LDFLAGS $3" 7744f6cd06fSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 775c35d236eSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 776c35d236eSmrg # The linker can only warn and ignore the option if not recognized 777c35d236eSmrg # So say no if there are warnings 778c35d236eSmrg if test -s conftest.err; then 779c35d236eSmrg # Append any errors to the config.log. 780c35d236eSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 781518bcf38Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 782c35d236eSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 783c35d236eSmrg if diff conftest.exp conftest.er2 >/dev/null; then 784c35d236eSmrg $2=yes 785c35d236eSmrg fi 786c35d236eSmrg else 787c35d236eSmrg $2=yes 788c35d236eSmrg fi 789c35d236eSmrg fi 790518bcf38Smrg $rm -r conftest* 791c35d236eSmrg LDFLAGS="$save_LDFLAGS" 792c35d236eSmrg]) 793c35d236eSmrg 794c35d236eSmrgif test x"[$]$2" = xyes; then 795518bcf38Smrg ifelse([$4], , :, [$4]) 796c35d236eSmrgelse 797518bcf38Smrg ifelse([$5], , :, [$5]) 798c35d236eSmrgfi 799518bcf38Smrg])# AC_LIBTOOL_LINKER_OPTION 800c35d236eSmrg 801c35d236eSmrg 802518bcf38Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 803518bcf38Smrg# -------------------------- 804518bcf38SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 805518bcf38Smrg[# find the maximum length of command line arguments 806c35d236eSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 807c35d236eSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 808c35d236eSmrg i=0 809c35d236eSmrg teststring="ABCD" 810c35d236eSmrg 811c35d236eSmrg case $build_os in 812c35d236eSmrg msdosdjgpp*) 813c35d236eSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 814c35d236eSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 815c35d236eSmrg # during glob expansion). Even if it were fixed, the result of this 816c35d236eSmrg # check would be larger than it should be. 817c35d236eSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 818c35d236eSmrg ;; 819c35d236eSmrg 820c35d236eSmrg gnu*) 821c35d236eSmrg # Under GNU Hurd, this test is not required because there is 822c35d236eSmrg # no limit to the length of command line arguments. 823c35d236eSmrg # Libtool will interpret -1 as no limit whatsoever 824c35d236eSmrg lt_cv_sys_max_cmd_len=-1; 825c35d236eSmrg ;; 826c35d236eSmrg 827518bcf38Smrg cygwin* | mingw*) 828c35d236eSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 829c35d236eSmrg # about 5 minutes as the teststring grows exponentially. 830c35d236eSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 831c35d236eSmrg # you end up with a "frozen" computer, even though with patience 832c35d236eSmrg # the test eventually succeeds (with a max line length of 256k). 833c35d236eSmrg # Instead, let's just punt: use the minimum linelength reported by 834c35d236eSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 835c35d236eSmrg lt_cv_sys_max_cmd_len=8192; 836c35d236eSmrg ;; 837c35d236eSmrg 838c35d236eSmrg amigaos*) 839c35d236eSmrg # On AmigaOS with pdksh, this test takes hours, literally. 840c35d236eSmrg # So we just punt and use a minimum line length of 8192. 841c35d236eSmrg lt_cv_sys_max_cmd_len=8192; 842c35d236eSmrg ;; 843c35d236eSmrg 844c35d236eSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 845c35d236eSmrg # This has been around since 386BSD, at least. Likely further. 846c35d236eSmrg if test -x /sbin/sysctl; then 847c35d236eSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 848c35d236eSmrg elif test -x /usr/sbin/sysctl; then 849c35d236eSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 850c35d236eSmrg else 851c35d236eSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 852c35d236eSmrg fi 853c35d236eSmrg # And add a safety zone 854c35d236eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 855c35d236eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 856c35d236eSmrg ;; 857c35d236eSmrg 858c35d236eSmrg interix*) 859c35d236eSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 860c35d236eSmrg lt_cv_sys_max_cmd_len=196608 861c35d236eSmrg ;; 862c35d236eSmrg 863c35d236eSmrg osf*) 864c35d236eSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 865c35d236eSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 866c35d236eSmrg # nice to cause kernel panics so lets avoid the loop below. 867c35d236eSmrg # First set a reasonable default. 868c35d236eSmrg lt_cv_sys_max_cmd_len=16384 869c35d236eSmrg # 870c35d236eSmrg if test -x /sbin/sysconfig; then 871c35d236eSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 872c35d236eSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 873c35d236eSmrg esac 874c35d236eSmrg fi 875c35d236eSmrg ;; 876c35d236eSmrg sco3.2v5*) 877c35d236eSmrg lt_cv_sys_max_cmd_len=102400 878c35d236eSmrg ;; 879c35d236eSmrg sysv5* | sco5v6* | sysv4.2uw2*) 880c35d236eSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 881c35d236eSmrg if test -n "$kargmax"; then 882518bcf38Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 883c35d236eSmrg else 884c35d236eSmrg lt_cv_sys_max_cmd_len=32768 885c35d236eSmrg fi 886c35d236eSmrg ;; 887c35d236eSmrg *) 8884f6cd06fSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 8894f6cd06fSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 8904f6cd06fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 8914f6cd06fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 8924f6cd06fSmrg else 8934f6cd06fSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 894518bcf38Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 895518bcf38Smrg = "XX$teststring") >/dev/null 2>&1 && 896518bcf38Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 897518bcf38Smrg lt_cv_sys_max_cmd_len=$new_result && 8984f6cd06fSmrg test $i != 17 # 1/2 MB should be enough 8994f6cd06fSmrg do 9004f6cd06fSmrg i=`expr $i + 1` 9014f6cd06fSmrg teststring=$teststring$teststring 9024f6cd06fSmrg done 9034f6cd06fSmrg teststring= 904518bcf38Smrg # Add a significant safety factor because C++ compilers can tack on massive 905518bcf38Smrg # amounts of additional arguments before passing them to the linker. 906518bcf38Smrg # It appears as though 1/2 is a usable value. 9074f6cd06fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 9084f6cd06fSmrg fi 909c35d236eSmrg ;; 910c35d236eSmrg esac 911c35d236eSmrg]) 912c35d236eSmrgif test -n $lt_cv_sys_max_cmd_len ; then 913c35d236eSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 914c35d236eSmrgelse 915c35d236eSmrg AC_MSG_RESULT(none) 916c35d236eSmrgfi 917518bcf38Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 918c35d236eSmrg 919c35d236eSmrg 920518bcf38Smrg# _LT_AC_CHECK_DLFCN 921518bcf38Smrg# ------------------ 922518bcf38SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 923518bcf38Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 924518bcf38Smrg])# _LT_AC_CHECK_DLFCN 925c35d236eSmrg 926c35d236eSmrg 927518bcf38Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 928518bcf38Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 929518bcf38Smrg# --------------------------------------------------------------------- 930518bcf38SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 931518bcf38Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 932c35d236eSmrgif test "$cross_compiling" = yes; then : 933c35d236eSmrg [$4] 934c35d236eSmrgelse 935c35d236eSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 936c35d236eSmrg lt_status=$lt_dlunknown 937518bcf38Smrg cat > conftest.$ac_ext <<EOF 938c35d236eSmrg[#line __oline__ "configure" 939c35d236eSmrg#include "confdefs.h" 940c35d236eSmrg 941c35d236eSmrg#if HAVE_DLFCN_H 942c35d236eSmrg#include <dlfcn.h> 943c35d236eSmrg#endif 944c35d236eSmrg 945c35d236eSmrg#include <stdio.h> 946c35d236eSmrg 947c35d236eSmrg#ifdef RTLD_GLOBAL 948c35d236eSmrg# define LT_DLGLOBAL RTLD_GLOBAL 949c35d236eSmrg#else 950c35d236eSmrg# ifdef DL_GLOBAL 951c35d236eSmrg# define LT_DLGLOBAL DL_GLOBAL 952c35d236eSmrg# else 953c35d236eSmrg# define LT_DLGLOBAL 0 954c35d236eSmrg# endif 955c35d236eSmrg#endif 956c35d236eSmrg 957c35d236eSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 958c35d236eSmrg find out it does not work in some platform. */ 959c35d236eSmrg#ifndef LT_DLLAZY_OR_NOW 960c35d236eSmrg# ifdef RTLD_LAZY 961c35d236eSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 962c35d236eSmrg# else 963c35d236eSmrg# ifdef DL_LAZY 964c35d236eSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 965c35d236eSmrg# else 966c35d236eSmrg# ifdef RTLD_NOW 967c35d236eSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 968c35d236eSmrg# else 969c35d236eSmrg# ifdef DL_NOW 970c35d236eSmrg# define LT_DLLAZY_OR_NOW DL_NOW 971c35d236eSmrg# else 972c35d236eSmrg# define LT_DLLAZY_OR_NOW 0 973c35d236eSmrg# endif 974c35d236eSmrg# endif 975c35d236eSmrg# endif 976c35d236eSmrg# endif 977c35d236eSmrg#endif 978c35d236eSmrg 979518bcf38Smrg#ifdef __cplusplus 980518bcf38Smrgextern "C" void exit (int); 981518bcf38Smrg#endif 982518bcf38Smrg 983c35d236eSmrgvoid fnord() { int i=42;} 984c35d236eSmrgint main () 985c35d236eSmrg{ 986c35d236eSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 987c35d236eSmrg int status = $lt_dlunknown; 988c35d236eSmrg 989c35d236eSmrg if (self) 990c35d236eSmrg { 991c35d236eSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 992c35d236eSmrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 993c35d236eSmrg /* dlclose (self); */ 994c35d236eSmrg } 995c35d236eSmrg else 996c35d236eSmrg puts (dlerror ()); 997c35d236eSmrg 998518bcf38Smrg exit (status); 999c35d236eSmrg}] 1000518bcf38SmrgEOF 1001c35d236eSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1002c35d236eSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1003c35d236eSmrg lt_status=$? 1004c35d236eSmrg case x$lt_status in 1005c35d236eSmrg x$lt_dlno_uscore) $1 ;; 1006c35d236eSmrg x$lt_dlneed_uscore) $2 ;; 1007c35d236eSmrg x$lt_dlunknown|x*) $3 ;; 1008c35d236eSmrg esac 1009c35d236eSmrg else : 1010c35d236eSmrg # compilation failed 1011c35d236eSmrg $3 1012c35d236eSmrg fi 1013c35d236eSmrgfi 1014c35d236eSmrgrm -fr conftest* 1015518bcf38Smrg])# _LT_AC_TRY_DLOPEN_SELF 1016c35d236eSmrg 1017c35d236eSmrg 1018518bcf38Smrg# AC_LIBTOOL_DLOPEN_SELF 1019518bcf38Smrg# ---------------------- 1020518bcf38SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 1021518bcf38Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 1022c35d236eSmrgif test "x$enable_dlopen" != xyes; then 1023c35d236eSmrg enable_dlopen=unknown 1024c35d236eSmrg enable_dlopen_self=unknown 1025c35d236eSmrg enable_dlopen_self_static=unknown 1026c35d236eSmrgelse 1027c35d236eSmrg lt_cv_dlopen=no 1028c35d236eSmrg lt_cv_dlopen_libs= 1029c35d236eSmrg 1030c35d236eSmrg case $host_os in 1031c35d236eSmrg beos*) 1032c35d236eSmrg lt_cv_dlopen="load_add_on" 1033c35d236eSmrg lt_cv_dlopen_libs= 1034c35d236eSmrg lt_cv_dlopen_self=yes 1035c35d236eSmrg ;; 1036c35d236eSmrg 1037518bcf38Smrg mingw* | pw32*) 1038c35d236eSmrg lt_cv_dlopen="LoadLibrary" 1039c35d236eSmrg lt_cv_dlopen_libs= 1040518bcf38Smrg ;; 1041c35d236eSmrg 1042c35d236eSmrg cygwin*) 1043c35d236eSmrg lt_cv_dlopen="dlopen" 1044c35d236eSmrg lt_cv_dlopen_libs= 1045518bcf38Smrg ;; 1046c35d236eSmrg 1047c35d236eSmrg darwin*) 1048c35d236eSmrg # if libdl is installed we need to link against it 1049c35d236eSmrg AC_CHECK_LIB([dl], [dlopen], 1050c35d236eSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1051c35d236eSmrg lt_cv_dlopen="dyld" 1052c35d236eSmrg lt_cv_dlopen_libs= 1053c35d236eSmrg lt_cv_dlopen_self=yes 1054c35d236eSmrg ]) 1055518bcf38Smrg ;; 1056c35d236eSmrg 1057c35d236eSmrg *) 1058c35d236eSmrg AC_CHECK_FUNC([shl_load], 1059c35d236eSmrg [lt_cv_dlopen="shl_load"], 1060c35d236eSmrg [AC_CHECK_LIB([dld], [shl_load], 10614f6cd06fSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1062c35d236eSmrg [AC_CHECK_FUNC([dlopen], 1063c35d236eSmrg [lt_cv_dlopen="dlopen"], 1064c35d236eSmrg [AC_CHECK_LIB([dl], [dlopen], 1065c35d236eSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1066c35d236eSmrg [AC_CHECK_LIB([svld], [dlopen], 1067c35d236eSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1068c35d236eSmrg [AC_CHECK_LIB([dld], [dld_link], 10694f6cd06fSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1070c35d236eSmrg ]) 1071c35d236eSmrg ]) 1072c35d236eSmrg ]) 1073c35d236eSmrg ]) 1074c35d236eSmrg ]) 1075c35d236eSmrg ;; 1076c35d236eSmrg esac 1077c35d236eSmrg 1078c35d236eSmrg if test "x$lt_cv_dlopen" != xno; then 1079c35d236eSmrg enable_dlopen=yes 1080c35d236eSmrg else 1081c35d236eSmrg enable_dlopen=no 1082c35d236eSmrg fi 1083c35d236eSmrg 1084c35d236eSmrg case $lt_cv_dlopen in 1085c35d236eSmrg dlopen) 1086c35d236eSmrg save_CPPFLAGS="$CPPFLAGS" 1087c35d236eSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1088c35d236eSmrg 1089c35d236eSmrg save_LDFLAGS="$LDFLAGS" 1090c35d236eSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1091c35d236eSmrg 1092c35d236eSmrg save_LIBS="$LIBS" 1093c35d236eSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 1094c35d236eSmrg 1095c35d236eSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 1096c35d236eSmrg lt_cv_dlopen_self, [dnl 1097518bcf38Smrg _LT_AC_TRY_DLOPEN_SELF( 1098c35d236eSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1099c35d236eSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1100c35d236eSmrg ]) 1101c35d236eSmrg 1102c35d236eSmrg if test "x$lt_cv_dlopen_self" = xyes; then 1103c35d236eSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1104c35d236eSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1105518bcf38Smrg lt_cv_dlopen_self_static, [dnl 1106518bcf38Smrg _LT_AC_TRY_DLOPEN_SELF( 1107c35d236eSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1108c35d236eSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1109c35d236eSmrg ]) 1110c35d236eSmrg fi 1111c35d236eSmrg 1112c35d236eSmrg CPPFLAGS="$save_CPPFLAGS" 1113c35d236eSmrg LDFLAGS="$save_LDFLAGS" 1114c35d236eSmrg LIBS="$save_LIBS" 1115c35d236eSmrg ;; 1116c35d236eSmrg esac 1117c35d236eSmrg 1118c35d236eSmrg case $lt_cv_dlopen_self in 1119c35d236eSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1120c35d236eSmrg *) enable_dlopen_self=unknown ;; 1121c35d236eSmrg esac 1122c35d236eSmrg 1123c35d236eSmrg case $lt_cv_dlopen_self_static in 1124c35d236eSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1125c35d236eSmrg *) enable_dlopen_self_static=unknown ;; 1126c35d236eSmrg esac 1127c35d236eSmrgfi 1128518bcf38Smrg])# AC_LIBTOOL_DLOPEN_SELF 1129c35d236eSmrg 1130f55e6a01Smrg 1131518bcf38Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 1132518bcf38Smrg# --------------------------------- 1133518bcf38Smrg# Check to see if options -c and -o are simultaneously supported by compiler 1134518bcf38SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 1135518bcf38Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1136518bcf38SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1137c35d236eSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1138518bcf38Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1139518bcf38Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1140518bcf38Smrg $rm -r conftest 2>/dev/null 1141c35d236eSmrg mkdir conftest 1142c35d236eSmrg cd conftest 1143c35d236eSmrg mkdir out 11444f6cd06fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1145c35d236eSmrg 1146c35d236eSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1147c35d236eSmrg # Insert the option either (1) after the last *FLAGS variable, or 1148c35d236eSmrg # (2) before a word containing "conftest.", or (3) at the end. 1149c35d236eSmrg # Note that $ac_compile itself does not contain backslashes and begins 1150c35d236eSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1151c35d236eSmrg lt_compile=`echo "$ac_compile" | $SED \ 1152c35d236eSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1153c35d236eSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1154c35d236eSmrg -e 's:$: $lt_compiler_flag:'` 1155c35d236eSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1156c35d236eSmrg (eval "$lt_compile" 2>out/conftest.err) 1157c35d236eSmrg ac_status=$? 1158c35d236eSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 1159c35d236eSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1160c35d236eSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 1161c35d236eSmrg then 1162c35d236eSmrg # The compiler can only warn and ignore the option if not recognized 1163c35d236eSmrg # So say no if there are warnings 1164518bcf38Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1165c35d236eSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1166c35d236eSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1167518bcf38Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1168c35d236eSmrg fi 1169c35d236eSmrg fi 1170c35d236eSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1171518bcf38Smrg $rm conftest* 1172c35d236eSmrg # SGI C++ compiler will create directory out/ii_files/ for 1173c35d236eSmrg # template instantiation 1174518bcf38Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1175518bcf38Smrg $rm out/* && rmdir out 1176c35d236eSmrg cd .. 1177518bcf38Smrg rmdir conftest 1178518bcf38Smrg $rm conftest* 1179c35d236eSmrg]) 1180518bcf38Smrg])# AC_LIBTOOL_PROG_CC_C_O 1181c35d236eSmrg 1182c35d236eSmrg 1183518bcf38Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1184518bcf38Smrg# ----------------------------------------- 1185c35d236eSmrg# Check to see if we can do hard links to lock some files if needed 1186518bcf38SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1187518bcf38Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 1188c35d236eSmrg 1189c35d236eSmrghard_links="nottested" 1190518bcf38Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1191c35d236eSmrg # do not overwrite the value of need_locks provided by the user 1192c35d236eSmrg AC_MSG_CHECKING([if we can lock with hard links]) 1193c35d236eSmrg hard_links=yes 1194518bcf38Smrg $rm conftest* 1195c35d236eSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1196c35d236eSmrg touch conftest.a 1197c35d236eSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 1198c35d236eSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1199c35d236eSmrg AC_MSG_RESULT([$hard_links]) 1200c35d236eSmrg if test "$hard_links" = no; then 1201c35d236eSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1202c35d236eSmrg need_locks=warn 1203c35d236eSmrg fi 1204c35d236eSmrgelse 1205c35d236eSmrg need_locks=no 1206c35d236eSmrgfi 1207518bcf38Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1208c35d236eSmrg 1209c35d236eSmrg 1210518bcf38Smrg# AC_LIBTOOL_OBJDIR 1211518bcf38Smrg# ----------------- 1212518bcf38SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 1213c35d236eSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1214c35d236eSmrg[rm -f .libs 2>/dev/null 1215c35d236eSmrgmkdir .libs 2>/dev/null 1216c35d236eSmrgif test -d .libs; then 1217c35d236eSmrg lt_cv_objdir=.libs 1218c35d236eSmrgelse 1219c35d236eSmrg # MS-DOS does not allow filenames that begin with a dot. 1220c35d236eSmrg lt_cv_objdir=_libs 1221c35d236eSmrgfi 1222c35d236eSmrgrmdir .libs 2>/dev/null]) 1223c35d236eSmrgobjdir=$lt_cv_objdir 1224518bcf38Smrg])# AC_LIBTOOL_OBJDIR 1225c35d236eSmrg 1226c35d236eSmrg 1227518bcf38Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1228518bcf38Smrg# ---------------------------------------------- 1229c35d236eSmrg# Check hardcoding attributes. 1230518bcf38SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 1231c35d236eSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1232518bcf38Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 1233518bcf38Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1234518bcf38Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1235518bcf38Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1236c35d236eSmrg 1237518bcf38Smrg # We can hardcode non-existant directories. 1238518bcf38Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 1239c35d236eSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 1240c35d236eSmrg # have to relink, otherwise we might link with an installed library 1241c35d236eSmrg # when we should be linking with a yet-to-be-installed one 1242518bcf38Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1243518bcf38Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 1244c35d236eSmrg # Linking always hardcodes the temporary library directory. 1245518bcf38Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 1246c35d236eSmrg else 1247c35d236eSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1248518bcf38Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 1249c35d236eSmrg fi 1250c35d236eSmrgelse 1251c35d236eSmrg # We cannot hardcode anything, or else we can only hardcode existing 1252c35d236eSmrg # directories. 1253518bcf38Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1254c35d236eSmrgfi 1255518bcf38SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1256c35d236eSmrg 1257518bcf38Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 1258c35d236eSmrg # Fast installation is not supported 1259c35d236eSmrg enable_fast_install=no 1260c35d236eSmrgelif test "$shlibpath_overrides_runpath" = yes || 1261c35d236eSmrg test "$enable_shared" = no; then 1262c35d236eSmrg # Fast installation is not necessary 1263c35d236eSmrg enable_fast_install=needless 1264c35d236eSmrgfi 1265518bcf38Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 1266c35d236eSmrg 1267c35d236eSmrg 1268518bcf38Smrg# AC_LIBTOOL_SYS_LIB_STRIP 1269518bcf38Smrg# ------------------------ 1270518bcf38SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1271518bcf38Smrg[striplib= 1272c35d236eSmrgold_striplib= 1273c35d236eSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 1274518bcf38Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 1275c35d236eSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 1276c35d236eSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 1277c35d236eSmrg AC_MSG_RESULT([yes]) 1278c35d236eSmrgelse 1279c35d236eSmrg# FIXME - insert some real tests, host_os isn't really good enough 1280c35d236eSmrg case $host_os in 1281518bcf38Smrg darwin*) 1282518bcf38Smrg if test -n "$STRIP" ; then 1283518bcf38Smrg striplib="$STRIP -x" 1284518bcf38Smrg old_striplib="$STRIP -S" 1285518bcf38Smrg AC_MSG_RESULT([yes]) 1286518bcf38Smrg else 1287518bcf38Smrg AC_MSG_RESULT([no]) 1288518bcf38Smrgfi 1289518bcf38Smrg ;; 1290518bcf38Smrg *) 1291518bcf38Smrg AC_MSG_RESULT([no]) 1292c35d236eSmrg ;; 1293c35d236eSmrg esac 1294c35d236eSmrgfi 1295518bcf38Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 1296c35d236eSmrg 1297c35d236eSmrg 1298518bcf38Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1299c35d236eSmrg# ----------------------------- 1300c35d236eSmrg# PORTME Fill in your ld.so characteristics 1301518bcf38SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1302518bcf38Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 13034f6cd06fSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 1304518bcf38Smrglibrary_names_spec= 1305518bcf38Smrglibname_spec='lib$name' 1306518bcf38Smrgsoname_spec= 1307518bcf38Smrgshrext_cmds=".so" 1308518bcf38Smrgpostinstall_cmds= 1309518bcf38Smrgpostuninstall_cmds= 1310518bcf38Smrgfinish_cmds= 1311518bcf38Smrgfinish_eval= 1312518bcf38Smrgshlibpath_var= 1313518bcf38Smrgshlibpath_overrides_runpath=unknown 1314518bcf38Smrgversion_type=none 1315518bcf38Smrgdynamic_linker="$host_os ld.so" 1316518bcf38Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 1317518bcf38Smrgm4_if($1,[],[ 1318c35d236eSmrgif test "$GCC" = yes; then 13194f6cd06fSmrg case $host_os in 13204f6cd06fSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 13214f6cd06fSmrg *) lt_awk_arg="/^libraries:/" ;; 13224f6cd06fSmrg esac 13234f6cd06fSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1324518bcf38Smrg if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 1325c35d236eSmrg # if the path contains ";" then we assume it to be the separator 1326c35d236eSmrg # otherwise default to the standard path separator (i.e. ":") - it is 1327c35d236eSmrg # assumed that no part of a normal pathname contains ";" but that should 1328c35d236eSmrg # okay in the real world where ";" in dirpaths is itself problematic. 1329518bcf38Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 1330c35d236eSmrg else 1331518bcf38Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1332c35d236eSmrg fi 13334f6cd06fSmrg # Ok, now we have the path, separated by spaces, we can step through it 13344f6cd06fSmrg # and add multilib dir if necessary. 13354f6cd06fSmrg lt_tmp_lt_search_path_spec= 13364f6cd06fSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 13374f6cd06fSmrg for lt_sys_path in $lt_search_path_spec; do 13384f6cd06fSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 13394f6cd06fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 13404f6cd06fSmrg else 13414f6cd06fSmrg test -d "$lt_sys_path" && \ 13424f6cd06fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 13434f6cd06fSmrg fi 13444f6cd06fSmrg done 1345518bcf38Smrg lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 13464f6cd06fSmrgBEGIN {RS=" "; FS="/|\n";} { 13474f6cd06fSmrg lt_foo=""; 13484f6cd06fSmrg lt_count=0; 13494f6cd06fSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 13504f6cd06fSmrg if ($lt_i != "" && $lt_i != ".") { 13514f6cd06fSmrg if ($lt_i == "..") { 13524f6cd06fSmrg lt_count++; 13534f6cd06fSmrg } else { 13544f6cd06fSmrg if (lt_count == 0) { 13554f6cd06fSmrg lt_foo="/" $lt_i lt_foo; 13564f6cd06fSmrg } else { 13574f6cd06fSmrg lt_count--; 13584f6cd06fSmrg } 13594f6cd06fSmrg } 13604f6cd06fSmrg } 13614f6cd06fSmrg } 13624f6cd06fSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 13634f6cd06fSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 13644f6cd06fSmrg}'` 1365518bcf38Smrg sys_lib_search_path_spec=`echo $lt_search_path_spec` 1366c35d236eSmrgelse 1367c35d236eSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 13684f6cd06fSmrgfi]) 1369c35d236eSmrgneed_lib_prefix=unknown 1370c35d236eSmrghardcode_into_libs=no 1371c35d236eSmrg 1372c35d236eSmrg# when you set need_version to no, make sure it does not cause -set_version 1373c35d236eSmrg# flags to be left without arguments 1374c35d236eSmrgneed_version=unknown 1375c35d236eSmrg 1376c35d236eSmrgcase $host_os in 1377c35d236eSmrgaix3*) 1378c35d236eSmrg version_type=linux 1379c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 1380c35d236eSmrg shlibpath_var=LIBPATH 1381c35d236eSmrg 1382c35d236eSmrg # AIX 3 has no versioning support, so we append a major version to the name. 1383c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1384c35d236eSmrg ;; 1385c35d236eSmrg 13864f6cd06fSmrgaix[[4-9]]*) 1387c35d236eSmrg version_type=linux 1388c35d236eSmrg need_lib_prefix=no 1389c35d236eSmrg need_version=no 1390c35d236eSmrg hardcode_into_libs=yes 1391c35d236eSmrg if test "$host_cpu" = ia64; then 1392c35d236eSmrg # AIX 5 supports IA64 1393c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 1394c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1395c35d236eSmrg else 1396c35d236eSmrg # With GCC up to 2.95.x, collect2 would create an import file 1397c35d236eSmrg # for dependence libraries. The import file would start with 1398c35d236eSmrg # the line `#! .'. This would cause the generated library to 1399c35d236eSmrg # depend on `.', always an invalid library. This was fixed in 1400c35d236eSmrg # development snapshots of GCC prior to 3.0. 1401c35d236eSmrg case $host_os in 1402c35d236eSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 1403c35d236eSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 1404c35d236eSmrg echo ' yes ' 1405518bcf38Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 1406c35d236eSmrg : 1407c35d236eSmrg else 1408c35d236eSmrg can_build_shared=no 1409c35d236eSmrg fi 1410c35d236eSmrg ;; 1411c35d236eSmrg esac 1412c35d236eSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 1413c35d236eSmrg # soname into executable. Probably we can add versioning support to 1414c35d236eSmrg # collect2, so additional links can be useful in future. 1415c35d236eSmrg if test "$aix_use_runtimelinking" = yes; then 1416c35d236eSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 1417c35d236eSmrg # instead of lib<name>.a to let people know that these are not 1418c35d236eSmrg # typical AIX shared libraries. 1419c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1420c35d236eSmrg else 1421c35d236eSmrg # We preserve .a as extension for shared libraries through AIX4.2 1422c35d236eSmrg # and later when we are not doing run time linking. 1423c35d236eSmrg library_names_spec='${libname}${release}.a $libname.a' 1424c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1425c35d236eSmrg fi 1426c35d236eSmrg shlibpath_var=LIBPATH 1427c35d236eSmrg fi 1428c35d236eSmrg ;; 1429c35d236eSmrg 1430c35d236eSmrgamigaos*) 1431518bcf38Smrg library_names_spec='$libname.ixlibrary $libname.a' 1432518bcf38Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 1433518bcf38Smrg 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' 1434c35d236eSmrg ;; 1435c35d236eSmrg 1436c35d236eSmrgbeos*) 1437c35d236eSmrg library_names_spec='${libname}${shared_ext}' 1438c35d236eSmrg dynamic_linker="$host_os ld.so" 1439c35d236eSmrg shlibpath_var=LIBRARY_PATH 1440c35d236eSmrg ;; 1441c35d236eSmrg 1442c35d236eSmrgbsdi[[45]]*) 1443c35d236eSmrg version_type=linux 1444c35d236eSmrg need_version=no 1445c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1446c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1447c35d236eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 1448c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1449c35d236eSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 1450c35d236eSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 1451c35d236eSmrg # the default ld.so.conf also contains /usr/contrib/lib and 1452c35d236eSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 1453c35d236eSmrg # libtool to hard-code these into programs 1454c35d236eSmrg ;; 1455c35d236eSmrg 1456518bcf38Smrgcygwin* | mingw* | pw32*) 1457c35d236eSmrg version_type=windows 1458c35d236eSmrg shrext_cmds=".dll" 1459c35d236eSmrg need_version=no 1460c35d236eSmrg need_lib_prefix=no 1461c35d236eSmrg 1462c35d236eSmrg case $GCC,$host_os in 1463518bcf38Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 1464c35d236eSmrg library_names_spec='$libname.dll.a' 1465c35d236eSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 1466c35d236eSmrg postinstall_cmds='base_file=`basename \${file}`~ 1467518bcf38Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 1468c35d236eSmrg dldir=$destdir/`dirname \$dlpath`~ 1469c35d236eSmrg test -d \$dldir || mkdir -p \$dldir~ 1470c35d236eSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 1471518bcf38Smrg chmod a+x \$dldir/$dlname' 1472c35d236eSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 1473c35d236eSmrg dlpath=$dir/\$dldll~ 1474518bcf38Smrg $rm \$dlpath' 1475c35d236eSmrg shlibpath_overrides_runpath=yes 1476c35d236eSmrg 1477c35d236eSmrg case $host_os in 1478c35d236eSmrg cygwin*) 1479c35d236eSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 1480c35d236eSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1481c35d236eSmrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 1482c35d236eSmrg ;; 1483518bcf38Smrg mingw*) 1484c35d236eSmrg # MinGW DLLs use traditional 'lib' prefix 1485c35d236eSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1486518bcf38Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1487518bcf38Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 1488c35d236eSmrg # It is most probably a Windows format PATH printed by 1489c35d236eSmrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 1490c35d236eSmrg # path with ; separators, and with drive letters. We can handle the 1491c35d236eSmrg # drive letters (cygwin fileutils understands them), so leave them, 1492c35d236eSmrg # especially as we might pass files found there to a mingw objdump, 1493c35d236eSmrg # which wouldn't understand a cygwinified path. Ahh. 1494518bcf38Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1495c35d236eSmrg else 1496518bcf38Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1497c35d236eSmrg fi 1498c35d236eSmrg ;; 1499c35d236eSmrg pw32*) 1500c35d236eSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 1501c35d236eSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1502c35d236eSmrg ;; 1503c35d236eSmrg esac 1504c35d236eSmrg ;; 1505c35d236eSmrg 1506c35d236eSmrg *) 1507c35d236eSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 1508c35d236eSmrg ;; 1509c35d236eSmrg esac 1510c35d236eSmrg dynamic_linker='Win32 ld.exe' 1511c35d236eSmrg # FIXME: first we should search . and the directory the executable is in 1512c35d236eSmrg shlibpath_var=PATH 1513c35d236eSmrg ;; 1514c35d236eSmrg 1515c35d236eSmrgdarwin* | rhapsody*) 1516c35d236eSmrg dynamic_linker="$host_os dyld" 1517c35d236eSmrg version_type=darwin 1518c35d236eSmrg need_lib_prefix=no 1519c35d236eSmrg need_version=no 1520518bcf38Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 1521c35d236eSmrg soname_spec='${libname}${release}${major}$shared_ext' 1522c35d236eSmrg shlibpath_overrides_runpath=yes 1523c35d236eSmrg shlibpath_var=DYLD_LIBRARY_PATH 1524c35d236eSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 1525518bcf38Smrg m4_if([$1], [],[ 1526518bcf38Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 1527c35d236eSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 1528c35d236eSmrg ;; 1529c35d236eSmrg 1530c35d236eSmrgdgux*) 1531c35d236eSmrg version_type=linux 1532c35d236eSmrg need_lib_prefix=no 1533c35d236eSmrg need_version=no 1534c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 1535c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1536c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1537c35d236eSmrg ;; 1538c35d236eSmrg 1539c35d236eSmrgfreebsd1*) 1540c35d236eSmrg dynamic_linker=no 1541c35d236eSmrg ;; 1542c35d236eSmrg 1543c35d236eSmrgfreebsd* | dragonfly*) 1544c35d236eSmrg # DragonFly does not have aout. When/if they implement a new 1545c35d236eSmrg # versioning mechanism, adjust this. 1546c35d236eSmrg if test -x /usr/bin/objformat; then 1547c35d236eSmrg objformat=`/usr/bin/objformat` 1548c35d236eSmrg else 1549c35d236eSmrg case $host_os in 1550c35d236eSmrg freebsd[[123]]*) objformat=aout ;; 1551c35d236eSmrg *) objformat=elf ;; 1552c35d236eSmrg esac 1553c35d236eSmrg fi 1554c35d236eSmrg version_type=freebsd-$objformat 1555c35d236eSmrg case $version_type in 1556c35d236eSmrg freebsd-elf*) 1557c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1558c35d236eSmrg need_version=no 1559c35d236eSmrg need_lib_prefix=no 1560c35d236eSmrg ;; 1561c35d236eSmrg freebsd-*) 1562c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 1563c35d236eSmrg need_version=yes 1564c35d236eSmrg ;; 1565c35d236eSmrg esac 1566c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1567c35d236eSmrg case $host_os in 1568c35d236eSmrg freebsd2*) 1569c35d236eSmrg shlibpath_overrides_runpath=yes 1570c35d236eSmrg ;; 1571c35d236eSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 1572c35d236eSmrg shlibpath_overrides_runpath=yes 1573c35d236eSmrg hardcode_into_libs=yes 1574c35d236eSmrg ;; 1575c35d236eSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 1576c35d236eSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 1577c35d236eSmrg shlibpath_overrides_runpath=no 1578c35d236eSmrg hardcode_into_libs=yes 1579c35d236eSmrg ;; 15804f6cd06fSmrg *) # from 4.6 on, and DragonFly 1581c35d236eSmrg shlibpath_overrides_runpath=yes 1582c35d236eSmrg hardcode_into_libs=yes 1583c35d236eSmrg ;; 1584c35d236eSmrg esac 1585c35d236eSmrg ;; 1586c35d236eSmrg 1587c35d236eSmrggnu*) 1588c35d236eSmrg version_type=linux 1589c35d236eSmrg need_lib_prefix=no 1590c35d236eSmrg need_version=no 1591c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 1592c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1593c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1594c35d236eSmrg hardcode_into_libs=yes 1595c35d236eSmrg ;; 1596c35d236eSmrg 1597c35d236eSmrghpux9* | hpux10* | hpux11*) 1598c35d236eSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 1599c35d236eSmrg # link against other versions. 1600c35d236eSmrg version_type=sunos 1601c35d236eSmrg need_lib_prefix=no 1602c35d236eSmrg need_version=no 1603c35d236eSmrg case $host_cpu in 1604c35d236eSmrg ia64*) 1605c35d236eSmrg shrext_cmds='.so' 1606c35d236eSmrg hardcode_into_libs=yes 1607c35d236eSmrg dynamic_linker="$host_os dld.so" 1608c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1609c35d236eSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1610c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1611c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1612c35d236eSmrg if test "X$HPUX_IA64_MODE" = X32; then 1613c35d236eSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 1614c35d236eSmrg else 1615c35d236eSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 1616c35d236eSmrg fi 1617c35d236eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1618c35d236eSmrg ;; 1619518bcf38Smrg hppa*64*) 1620518bcf38Smrg shrext_cmds='.sl' 1621518bcf38Smrg hardcode_into_libs=yes 1622518bcf38Smrg dynamic_linker="$host_os dld.sl" 1623518bcf38Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1624518bcf38Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1625518bcf38Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1626518bcf38Smrg soname_spec='${libname}${release}${shared_ext}$major' 1627518bcf38Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1628518bcf38Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1629518bcf38Smrg ;; 1630518bcf38Smrg *) 1631c35d236eSmrg shrext_cmds='.sl' 1632c35d236eSmrg dynamic_linker="$host_os dld.sl" 1633c35d236eSmrg shlibpath_var=SHLIB_PATH 1634c35d236eSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 1635c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1636c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1637c35d236eSmrg ;; 1638c35d236eSmrg esac 1639c35d236eSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 1640c35d236eSmrg postinstall_cmds='chmod 555 $lib' 1641c35d236eSmrg ;; 1642c35d236eSmrg 16434f6cd06fSmrginterix[[3-9]]*) 1644c35d236eSmrg version_type=linux 1645c35d236eSmrg need_lib_prefix=no 1646c35d236eSmrg need_version=no 1647c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1648c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1649c35d236eSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 1650c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1651c35d236eSmrg shlibpath_overrides_runpath=no 1652c35d236eSmrg hardcode_into_libs=yes 1653c35d236eSmrg ;; 1654c35d236eSmrg 1655c35d236eSmrgirix5* | irix6* | nonstopux*) 1656c35d236eSmrg case $host_os in 1657c35d236eSmrg nonstopux*) version_type=nonstopux ;; 1658c35d236eSmrg *) 1659c35d236eSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 1660c35d236eSmrg version_type=linux 1661c35d236eSmrg else 1662c35d236eSmrg version_type=irix 1663c35d236eSmrg fi ;; 1664c35d236eSmrg esac 1665c35d236eSmrg need_lib_prefix=no 1666c35d236eSmrg need_version=no 1667c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1668c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 1669c35d236eSmrg case $host_os in 1670c35d236eSmrg irix5* | nonstopux*) 1671c35d236eSmrg libsuff= shlibsuff= 1672c35d236eSmrg ;; 1673c35d236eSmrg *) 1674c35d236eSmrg case $LD in # libtool.m4 will add one of these switches to LD 1675c35d236eSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 1676c35d236eSmrg libsuff= shlibsuff= libmagic=32-bit;; 1677c35d236eSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 1678c35d236eSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 1679c35d236eSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 1680c35d236eSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 1681c35d236eSmrg *) libsuff= shlibsuff= libmagic=never-match;; 1682c35d236eSmrg esac 1683c35d236eSmrg ;; 1684c35d236eSmrg esac 1685c35d236eSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 1686c35d236eSmrg shlibpath_overrides_runpath=no 1687c35d236eSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1688c35d236eSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1689c35d236eSmrg hardcode_into_libs=yes 1690c35d236eSmrg ;; 1691c35d236eSmrg 1692c35d236eSmrg# No shared lib support for Linux oldld, aout, or coff. 1693c35d236eSmrglinux*oldld* | linux*aout* | linux*coff*) 1694c35d236eSmrg dynamic_linker=no 1695c35d236eSmrg ;; 1696c35d236eSmrg 1697c35d236eSmrg# This must be Linux ELF. 16984f6cd06fSmrglinux* | k*bsd*-gnu) 1699c35d236eSmrg version_type=linux 1700c35d236eSmrg need_lib_prefix=no 1701c35d236eSmrg need_version=no 1702c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1703c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1704c35d236eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 1705c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1706c35d236eSmrg shlibpath_overrides_runpath=no 1707c35d236eSmrg # This implies no fast_install, which is unacceptable. 1708c35d236eSmrg # Some rework will be needed to allow for fast_install 1709c35d236eSmrg # before this can be enabled. 1710c35d236eSmrg hardcode_into_libs=yes 1711518bcf38Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1712518bcf38Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1713c35d236eSmrg 1714c35d236eSmrg # Append ld.so.conf contents to the search path 1715c35d236eSmrg if test -f /etc/ld.so.conf; then 1716518bcf38Smrg 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' ' '` 17174f6cd06fSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 1718c35d236eSmrg fi 1719c35d236eSmrg 1720c35d236eSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 1721c35d236eSmrg # powerpc, because MkLinux only supported shared libraries with the 1722c35d236eSmrg # GNU dynamic linker. Since this was broken with cross compilers, 1723c35d236eSmrg # most powerpc-linux boxes support dynamic linking these days and 1724c35d236eSmrg # people can always --disable-shared, the test was removed, and we 1725c35d236eSmrg # assume the GNU/Linux dynamic linker is in use. 1726c35d236eSmrg dynamic_linker='GNU/Linux ld.so' 1727c35d236eSmrg ;; 1728c35d236eSmrg 1729c35d236eSmrgnetbsd*) 1730c35d236eSmrg version_type=sunos 1731c35d236eSmrg need_lib_prefix=no 1732c35d236eSmrg need_version=no 1733518bcf38Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 1734c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1735c35d236eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1736c35d236eSmrg dynamic_linker='NetBSD (a.out) ld.so' 1737c35d236eSmrg else 1738c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1739c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1740c35d236eSmrg dynamic_linker='NetBSD ld.elf_so' 1741c35d236eSmrg fi 1742c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1743c35d236eSmrg shlibpath_overrides_runpath=yes 1744c35d236eSmrg hardcode_into_libs=yes 1745c35d236eSmrg ;; 1746c35d236eSmrg 1747c35d236eSmrgnewsos6) 1748c35d236eSmrg version_type=linux 1749c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1750c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1751c35d236eSmrg shlibpath_overrides_runpath=yes 1752c35d236eSmrg ;; 1753c35d236eSmrg 1754518bcf38Smrgnto-qnx*) 1755518bcf38Smrg version_type=linux 1756c35d236eSmrg need_lib_prefix=no 1757c35d236eSmrg need_version=no 1758c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1759c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1760c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1761518bcf38Smrg shlibpath_overrides_runpath=yes 1762c35d236eSmrg ;; 1763c35d236eSmrg 1764c35d236eSmrgopenbsd*) 1765c35d236eSmrg version_type=sunos 1766c35d236eSmrg sys_lib_dlsearch_path_spec="/usr/lib" 1767c35d236eSmrg need_lib_prefix=no 1768c35d236eSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 1769c35d236eSmrg case $host_os in 1770518bcf38Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 1771518bcf38Smrg *) need_version=no ;; 1772c35d236eSmrg esac 1773c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1774c35d236eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1775c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1776518bcf38Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 1777c35d236eSmrg case $host_os in 1778c35d236eSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 1779c35d236eSmrg shlibpath_overrides_runpath=no 1780c35d236eSmrg ;; 1781c35d236eSmrg *) 1782c35d236eSmrg shlibpath_overrides_runpath=yes 1783c35d236eSmrg ;; 1784c35d236eSmrg esac 1785c35d236eSmrg else 1786c35d236eSmrg shlibpath_overrides_runpath=yes 1787c35d236eSmrg fi 1788c35d236eSmrg ;; 1789c35d236eSmrg 1790c35d236eSmrgos2*) 1791c35d236eSmrg libname_spec='$name' 1792c35d236eSmrg shrext_cmds=".dll" 1793c35d236eSmrg need_lib_prefix=no 1794c35d236eSmrg library_names_spec='$libname${shared_ext} $libname.a' 1795c35d236eSmrg dynamic_linker='OS/2 ld.exe' 1796c35d236eSmrg shlibpath_var=LIBPATH 1797c35d236eSmrg ;; 1798c35d236eSmrg 1799c35d236eSmrgosf3* | osf4* | osf5*) 1800c35d236eSmrg version_type=osf 1801c35d236eSmrg need_lib_prefix=no 1802c35d236eSmrg need_version=no 1803c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1804c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1805c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1806c35d236eSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 1807c35d236eSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 1808c35d236eSmrg ;; 1809c35d236eSmrg 18104f6cd06fSmrgrdos*) 18114f6cd06fSmrg dynamic_linker=no 18124f6cd06fSmrg ;; 18134f6cd06fSmrg 1814c35d236eSmrgsolaris*) 1815c35d236eSmrg version_type=linux 1816c35d236eSmrg need_lib_prefix=no 1817c35d236eSmrg need_version=no 1818c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1819c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1820c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1821c35d236eSmrg shlibpath_overrides_runpath=yes 1822c35d236eSmrg hardcode_into_libs=yes 1823c35d236eSmrg # ldd complains unless libraries are executable 1824c35d236eSmrg postinstall_cmds='chmod +x $lib' 1825c35d236eSmrg ;; 1826c35d236eSmrg 1827c35d236eSmrgsunos4*) 1828c35d236eSmrg version_type=sunos 1829c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1830c35d236eSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 1831c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1832c35d236eSmrg shlibpath_overrides_runpath=yes 1833c35d236eSmrg if test "$with_gnu_ld" = yes; then 1834c35d236eSmrg need_lib_prefix=no 1835c35d236eSmrg fi 1836c35d236eSmrg need_version=yes 1837c35d236eSmrg ;; 1838c35d236eSmrg 1839c35d236eSmrgsysv4 | sysv4.3*) 1840c35d236eSmrg version_type=linux 1841c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1842c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1843c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1844c35d236eSmrg case $host_vendor in 1845c35d236eSmrg sni) 1846c35d236eSmrg shlibpath_overrides_runpath=no 1847c35d236eSmrg need_lib_prefix=no 1848518bcf38Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 1849c35d236eSmrg runpath_var=LD_RUN_PATH 1850c35d236eSmrg ;; 1851c35d236eSmrg siemens) 1852c35d236eSmrg need_lib_prefix=no 1853c35d236eSmrg ;; 1854c35d236eSmrg motorola) 1855c35d236eSmrg need_lib_prefix=no 1856c35d236eSmrg need_version=no 1857c35d236eSmrg shlibpath_overrides_runpath=no 1858c35d236eSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 1859c35d236eSmrg ;; 1860c35d236eSmrg esac 1861c35d236eSmrg ;; 1862c35d236eSmrg 1863c35d236eSmrgsysv4*MP*) 1864c35d236eSmrg if test -d /usr/nec ;then 1865c35d236eSmrg version_type=linux 1866c35d236eSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 1867c35d236eSmrg soname_spec='$libname${shared_ext}.$major' 1868c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1869c35d236eSmrg fi 1870c35d236eSmrg ;; 1871c35d236eSmrg 1872c35d236eSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 1873c35d236eSmrg version_type=freebsd-elf 1874c35d236eSmrg need_lib_prefix=no 1875c35d236eSmrg need_version=no 1876c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1877c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1878c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1879c35d236eSmrg hardcode_into_libs=yes 1880c35d236eSmrg if test "$with_gnu_ld" = yes; then 1881c35d236eSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 1882518bcf38Smrg shlibpath_overrides_runpath=no 1883c35d236eSmrg else 1884c35d236eSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 1885518bcf38Smrg shlibpath_overrides_runpath=yes 1886c35d236eSmrg case $host_os in 1887c35d236eSmrg sco3.2v5*) 1888c35d236eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 1889c35d236eSmrg ;; 1890c35d236eSmrg esac 1891c35d236eSmrg fi 1892c35d236eSmrg sys_lib_dlsearch_path_spec='/usr/lib' 1893c35d236eSmrg ;; 1894c35d236eSmrg 1895c35d236eSmrguts4*) 1896c35d236eSmrg version_type=linux 1897c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1898c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1899c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1900c35d236eSmrg ;; 1901c35d236eSmrg 1902c35d236eSmrg*) 1903c35d236eSmrg dynamic_linker=no 1904c35d236eSmrg ;; 1905c35d236eSmrgesac 1906c35d236eSmrgAC_MSG_RESULT([$dynamic_linker]) 1907c35d236eSmrgtest "$dynamic_linker" = no && can_build_shared=no 1908c35d236eSmrg 1909518bcf38SmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 1910518bcf38Smrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 1911518bcf38Smrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 1912518bcf38SmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 1913518bcf38Smrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 1914518bcf38Smrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 1915518bcf38Smrg 1916c35d236eSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 1917c35d236eSmrgif test "$GCC" = yes; then 1918c35d236eSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 1919c35d236eSmrgfi 1920518bcf38Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1921c35d236eSmrg 1922c35d236eSmrg 1923518bcf38Smrg# _LT_AC_TAGCONFIG 1924518bcf38Smrg# ---------------- 1925518bcf38SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 1926518bcf38Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1927518bcf38SmrgAC_ARG_WITH([tags], 1928518bcf38Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 1929518bcf38Smrg [include additional configurations @<:@automatic@:>@])], 1930518bcf38Smrg [tagnames="$withval"]) 1931518bcf38Smrg 1932518bcf38Smrgif test -f "$ltmain" && test -n "$tagnames"; then 1933518bcf38Smrg if test ! -f "${ofile}"; then 1934518bcf38Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 1935518bcf38Smrg fi 1936518bcf38Smrg 1937518bcf38Smrg if test -z "$LTCC"; then 1938518bcf38Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 1939518bcf38Smrg if test -z "$LTCC"; then 1940518bcf38Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 1941518bcf38Smrg else 1942518bcf38Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 1943518bcf38Smrg fi 1944518bcf38Smrg fi 1945518bcf38Smrg if test -z "$LTCFLAGS"; then 1946518bcf38Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 1947518bcf38Smrg fi 1948518bcf38Smrg 1949518bcf38Smrg # Extract list of available tagged configurations in $ofile. 1950518bcf38Smrg # Note that this assumes the entire list is on one line. 1951518bcf38Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 1952518bcf38Smrg 1953518bcf38Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1954518bcf38Smrg for tagname in $tagnames; do 1955518bcf38Smrg IFS="$lt_save_ifs" 1956518bcf38Smrg # Check whether tagname contains only valid characters 1957518bcf38Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 1958518bcf38Smrg "") ;; 1959518bcf38Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 1960518bcf38Smrg ;; 1961518bcf38Smrg esac 1962518bcf38Smrg 1963518bcf38Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 1964518bcf38Smrg then 1965518bcf38Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 1966518bcf38Smrg fi 1967518bcf38Smrg 1968518bcf38Smrg # Update the list of available tags. 1969518bcf38Smrg if test -n "$tagname"; then 1970518bcf38Smrg echo appending configuration tag \"$tagname\" to $ofile 1971518bcf38Smrg 1972518bcf38Smrg case $tagname in 1973518bcf38Smrg CXX) 1974518bcf38Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 1975518bcf38Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 1976518bcf38Smrg (test "X$CXX" != "Xg++"))) ; then 1977518bcf38Smrg AC_LIBTOOL_LANG_CXX_CONFIG 1978518bcf38Smrg else 1979518bcf38Smrg tagname="" 1980518bcf38Smrg fi 1981518bcf38Smrg ;; 1982518bcf38Smrg 1983518bcf38Smrg F77) 1984518bcf38Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 1985518bcf38Smrg AC_LIBTOOL_LANG_F77_CONFIG 1986518bcf38Smrg else 1987518bcf38Smrg tagname="" 1988518bcf38Smrg fi 1989518bcf38Smrg ;; 1990518bcf38Smrg 1991518bcf38Smrg GCJ) 1992518bcf38Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 1993518bcf38Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 1994518bcf38Smrg else 1995518bcf38Smrg tagname="" 1996518bcf38Smrg fi 1997518bcf38Smrg ;; 1998518bcf38Smrg 1999518bcf38Smrg RC) 2000518bcf38Smrg AC_LIBTOOL_LANG_RC_CONFIG 2001518bcf38Smrg ;; 2002518bcf38Smrg 2003518bcf38Smrg *) 2004518bcf38Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 2005518bcf38Smrg ;; 2006518bcf38Smrg esac 2007518bcf38Smrg 2008518bcf38Smrg # Append the new tag name to the list of available tags. 2009518bcf38Smrg if test -n "$tagname" ; then 2010518bcf38Smrg available_tags="$available_tags $tagname" 2011518bcf38Smrg fi 2012518bcf38Smrg fi 2013518bcf38Smrg done 2014518bcf38Smrg IFS="$lt_save_ifs" 2015518bcf38Smrg 2016518bcf38Smrg # Now substitute the updated list of available tags. 2017518bcf38Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 2018518bcf38Smrg mv "${ofile}T" "$ofile" 2019518bcf38Smrg chmod +x "$ofile" 2020518bcf38Smrg else 2021518bcf38Smrg rm -f "${ofile}T" 2022518bcf38Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 2023518bcf38Smrg fi 2024518bcf38Smrgfi 2025518bcf38Smrg])# _LT_AC_TAGCONFIG 2026518bcf38Smrg 2027518bcf38Smrg 2028518bcf38Smrg# AC_LIBTOOL_DLOPEN 2029518bcf38Smrg# ----------------- 2030518bcf38Smrg# enable checks for dlopen support 2031518bcf38SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 2032518bcf38Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 2033518bcf38Smrg])# AC_LIBTOOL_DLOPEN 2034518bcf38Smrg 2035518bcf38Smrg 2036518bcf38Smrg# AC_LIBTOOL_WIN32_DLL 2037518bcf38Smrg# -------------------- 2038518bcf38Smrg# declare package support for building win32 DLLs 2039518bcf38SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 2040518bcf38Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 2041518bcf38Smrg])# AC_LIBTOOL_WIN32_DLL 2042518bcf38Smrg 2043518bcf38Smrg 2044518bcf38Smrg# AC_ENABLE_SHARED([DEFAULT]) 2045518bcf38Smrg# --------------------------- 2046518bcf38Smrg# implement the --enable-shared flag 2047518bcf38Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2048518bcf38SmrgAC_DEFUN([AC_ENABLE_SHARED], 2049518bcf38Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 2050518bcf38SmrgAC_ARG_ENABLE([shared], 2051518bcf38Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 2052518bcf38Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 2053518bcf38Smrg [p=${PACKAGE-default} 2054518bcf38Smrg case $enableval in 2055518bcf38Smrg yes) enable_shared=yes ;; 2056518bcf38Smrg no) enable_shared=no ;; 2057518bcf38Smrg *) 2058518bcf38Smrg enable_shared=no 2059518bcf38Smrg # Look at the argument we got. We use all the common list separators. 2060518bcf38Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2061518bcf38Smrg for pkg in $enableval; do 2062518bcf38Smrg IFS="$lt_save_ifs" 2063518bcf38Smrg if test "X$pkg" = "X$p"; then 2064518bcf38Smrg enable_shared=yes 2065518bcf38Smrg fi 2066518bcf38Smrg done 2067518bcf38Smrg IFS="$lt_save_ifs" 2068518bcf38Smrg ;; 2069518bcf38Smrg esac], 2070518bcf38Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 2071518bcf38Smrg])# AC_ENABLE_SHARED 2072518bcf38Smrg 2073518bcf38Smrg 2074518bcf38Smrg# AC_DISABLE_SHARED 2075518bcf38Smrg# ----------------- 2076518bcf38Smrg# set the default shared flag to --disable-shared 2077518bcf38SmrgAC_DEFUN([AC_DISABLE_SHARED], 2078518bcf38Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2079518bcf38SmrgAC_ENABLE_SHARED(no) 2080518bcf38Smrg])# AC_DISABLE_SHARED 2081518bcf38Smrg 2082518bcf38Smrg 2083518bcf38Smrg# AC_ENABLE_STATIC([DEFAULT]) 2084518bcf38Smrg# --------------------------- 2085518bcf38Smrg# implement the --enable-static flag 2086518bcf38Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2087518bcf38SmrgAC_DEFUN([AC_ENABLE_STATIC], 2088518bcf38Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 2089518bcf38SmrgAC_ARG_ENABLE([static], 2090518bcf38Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 2091518bcf38Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 2092518bcf38Smrg [p=${PACKAGE-default} 2093518bcf38Smrg case $enableval in 2094518bcf38Smrg yes) enable_static=yes ;; 2095518bcf38Smrg no) enable_static=no ;; 2096518bcf38Smrg *) 2097518bcf38Smrg enable_static=no 2098518bcf38Smrg # Look at the argument we got. We use all the common list separators. 2099518bcf38Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2100518bcf38Smrg for pkg in $enableval; do 2101518bcf38Smrg IFS="$lt_save_ifs" 2102518bcf38Smrg if test "X$pkg" = "X$p"; then 2103518bcf38Smrg enable_static=yes 2104518bcf38Smrg fi 2105518bcf38Smrg done 2106518bcf38Smrg IFS="$lt_save_ifs" 2107518bcf38Smrg ;; 2108518bcf38Smrg esac], 2109518bcf38Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 2110518bcf38Smrg])# AC_ENABLE_STATIC 2111518bcf38Smrg 2112518bcf38Smrg 2113518bcf38Smrg# AC_DISABLE_STATIC 2114518bcf38Smrg# ----------------- 2115518bcf38Smrg# set the default static flag to --disable-static 2116518bcf38SmrgAC_DEFUN([AC_DISABLE_STATIC], 2117518bcf38Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2118518bcf38SmrgAC_ENABLE_STATIC(no) 2119518bcf38Smrg])# AC_DISABLE_STATIC 2120518bcf38Smrg 2121518bcf38Smrg 2122518bcf38Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 2123518bcf38Smrg# --------------------------------- 2124518bcf38Smrg# implement the --enable-fast-install flag 2125518bcf38Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2126518bcf38SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 2127518bcf38Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2128518bcf38SmrgAC_ARG_ENABLE([fast-install], 2129518bcf38Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2130518bcf38Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2131518bcf38Smrg [p=${PACKAGE-default} 2132518bcf38Smrg case $enableval in 2133518bcf38Smrg yes) enable_fast_install=yes ;; 2134518bcf38Smrg no) enable_fast_install=no ;; 2135518bcf38Smrg *) 2136518bcf38Smrg enable_fast_install=no 2137518bcf38Smrg # Look at the argument we got. We use all the common list separators. 2138518bcf38Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2139518bcf38Smrg for pkg in $enableval; do 2140518bcf38Smrg IFS="$lt_save_ifs" 2141518bcf38Smrg if test "X$pkg" = "X$p"; then 2142518bcf38Smrg enable_fast_install=yes 2143518bcf38Smrg fi 2144518bcf38Smrg done 2145518bcf38Smrg IFS="$lt_save_ifs" 2146518bcf38Smrg ;; 2147518bcf38Smrg esac], 2148518bcf38Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 2149518bcf38Smrg])# AC_ENABLE_FAST_INSTALL 2150518bcf38Smrg 2151518bcf38Smrg 2152518bcf38Smrg# AC_DISABLE_FAST_INSTALL 2153518bcf38Smrg# ----------------------- 2154518bcf38Smrg# set the default to --disable-fast-install 2155518bcf38SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 2156518bcf38Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2157518bcf38SmrgAC_ENABLE_FAST_INSTALL(no) 2158518bcf38Smrg])# AC_DISABLE_FAST_INSTALL 2159518bcf38Smrg 2160518bcf38Smrg 2161518bcf38Smrg# AC_LIBTOOL_PICMODE([MODE]) 2162518bcf38Smrg# -------------------------- 2163518bcf38Smrg# implement the --with-pic flag 2164518bcf38Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 2165518bcf38SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 2166518bcf38Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2167518bcf38Smrgpic_mode=ifelse($#,1,$1,default) 2168518bcf38Smrg])# AC_LIBTOOL_PICMODE 2169518bcf38Smrg 2170518bcf38Smrg 2171518bcf38Smrg# AC_PROG_EGREP 2172518bcf38Smrg# ------------- 2173518bcf38Smrg# This is predefined starting with Autoconf 2.54, so this conditional 2174518bcf38Smrg# definition can be removed once we require Autoconf 2.54 or later. 2175518bcf38Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 2176518bcf38Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 2177518bcf38Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 2178518bcf38Smrg then ac_cv_prog_egrep='grep -E' 2179518bcf38Smrg else ac_cv_prog_egrep='egrep' 2180518bcf38Smrg fi]) 2181518bcf38Smrg EGREP=$ac_cv_prog_egrep 2182518bcf38Smrg AC_SUBST([EGREP]) 2183518bcf38Smrg])]) 2184518bcf38Smrg 2185518bcf38Smrg 2186518bcf38Smrg# AC_PATH_TOOL_PREFIX 2187518bcf38Smrg# ------------------- 2188518bcf38Smrg# find a file program which can recognize shared library 2189518bcf38SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 2190518bcf38Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2191518bcf38SmrgAC_MSG_CHECKING([for $1]) 2192518bcf38SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2193518bcf38Smrg[case $MAGIC_CMD in 2194c35d236eSmrg[[\\/*] | ?:[\\/]*]) 2195c35d236eSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2196c35d236eSmrg ;; 2197c35d236eSmrg*) 2198c35d236eSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2199c35d236eSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2200c35d236eSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2201c35d236eSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2202c35d236eSmrgdnl not every word. This closes a longstanding sh security hole. 2203518bcf38Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 2204c35d236eSmrg for ac_dir in $ac_dummy; do 2205c35d236eSmrg IFS="$lt_save_ifs" 2206c35d236eSmrg test -z "$ac_dir" && ac_dir=. 2207c35d236eSmrg if test -f $ac_dir/$1; then 2208c35d236eSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2209c35d236eSmrg if test -n "$file_magic_test_file"; then 2210c35d236eSmrg case $deplibs_check_method in 2211c35d236eSmrg "file_magic "*) 2212c35d236eSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2213c35d236eSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2214c35d236eSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2215c35d236eSmrg $EGREP "$file_magic_regex" > /dev/null; then 2216c35d236eSmrg : 2217c35d236eSmrg else 2218518bcf38Smrg cat <<EOF 1>&2 2219c35d236eSmrg 2220c35d236eSmrg*** Warning: the command libtool uses to detect shared libraries, 2221c35d236eSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2222c35d236eSmrg*** The result is that libtool may fail to recognize shared libraries 2223c35d236eSmrg*** as such. This will affect the creation of libtool libraries that 2224c35d236eSmrg*** depend on shared libraries, but programs linked with such libtool 2225c35d236eSmrg*** libraries will work regardless of this problem. Nevertheless, you 2226c35d236eSmrg*** may want to report the problem to your system manager and/or to 2227c35d236eSmrg*** bug-libtool@gnu.org 2228c35d236eSmrg 2229518bcf38SmrgEOF 2230c35d236eSmrg fi ;; 2231c35d236eSmrg esac 2232c35d236eSmrg fi 2233c35d236eSmrg break 2234c35d236eSmrg fi 2235c35d236eSmrg done 2236c35d236eSmrg IFS="$lt_save_ifs" 2237c35d236eSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2238c35d236eSmrg ;; 2239c35d236eSmrgesac]) 2240c35d236eSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2241c35d236eSmrgif test -n "$MAGIC_CMD"; then 2242c35d236eSmrg AC_MSG_RESULT($MAGIC_CMD) 2243c35d236eSmrgelse 2244c35d236eSmrg AC_MSG_RESULT(no) 2245c35d236eSmrgfi 2246518bcf38Smrg])# AC_PATH_TOOL_PREFIX 2247c35d236eSmrg 2248f55e6a01Smrg 2249518bcf38Smrg# AC_PATH_MAGIC 2250518bcf38Smrg# ------------- 22514f6cd06fSmrg# find a file program which can recognize a shared library 2252518bcf38SmrgAC_DEFUN([AC_PATH_MAGIC], 2253518bcf38Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2254c35d236eSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 2255c35d236eSmrg if test -n "$ac_tool_prefix"; then 2256518bcf38Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2257c35d236eSmrg else 2258c35d236eSmrg MAGIC_CMD=: 2259c35d236eSmrg fi 2260c35d236eSmrgfi 2261518bcf38Smrg])# AC_PATH_MAGIC 2262c35d236eSmrg 2263c35d236eSmrg 2264518bcf38Smrg# AC_PROG_LD 2265c35d236eSmrg# ---------- 2266c35d236eSmrg# find the pathname to the GNU or non-GNU linker 2267518bcf38SmrgAC_DEFUN([AC_PROG_LD], 2268518bcf38Smrg[AC_ARG_WITH([gnu-ld], 2269518bcf38Smrg [AC_HELP_STRING([--with-gnu-ld], 2270f55e6a01Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2271f55e6a01Smrg [test "$withval" = no || with_gnu_ld=yes], 2272518bcf38Smrg [with_gnu_ld=no]) 2273518bcf38SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 2274518bcf38SmrgAC_REQUIRE([AC_PROG_CC])dnl 2275518bcf38SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2276518bcf38SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2277c35d236eSmrgac_prog=ld 2278c35d236eSmrgif test "$GCC" = yes; then 2279c35d236eSmrg # Check if gcc -print-prog-name=ld gives a path. 2280c35d236eSmrg AC_MSG_CHECKING([for ld used by $CC]) 2281c35d236eSmrg case $host in 2282c35d236eSmrg *-*-mingw*) 2283c35d236eSmrg # gcc leaves a trailing carriage return which upsets mingw 2284c35d236eSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2285c35d236eSmrg *) 2286c35d236eSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2287c35d236eSmrg esac 2288c35d236eSmrg case $ac_prog in 2289c35d236eSmrg # Accept absolute paths. 2290c35d236eSmrg [[\\/]]* | ?:[[\\/]]*) 2291c35d236eSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 2292c35d236eSmrg # Canonicalize the pathname of ld 2293518bcf38Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2294518bcf38Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2295518bcf38Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 2296c35d236eSmrg done 2297c35d236eSmrg test -z "$LD" && LD="$ac_prog" 2298c35d236eSmrg ;; 2299c35d236eSmrg "") 2300c35d236eSmrg # If it fails, then pretend we aren't using GCC. 2301c35d236eSmrg ac_prog=ld 2302c35d236eSmrg ;; 2303c35d236eSmrg *) 2304c35d236eSmrg # If it is relative, then search for the first ld in PATH. 2305c35d236eSmrg with_gnu_ld=unknown 2306c35d236eSmrg ;; 2307c35d236eSmrg esac 2308c35d236eSmrgelif test "$with_gnu_ld" = yes; then 2309c35d236eSmrg AC_MSG_CHECKING([for GNU ld]) 2310c35d236eSmrgelse 2311c35d236eSmrg AC_MSG_CHECKING([for non-GNU ld]) 2312c35d236eSmrgfi 2313c35d236eSmrgAC_CACHE_VAL(lt_cv_path_LD, 2314c35d236eSmrg[if test -z "$LD"; then 2315c35d236eSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2316c35d236eSmrg for ac_dir in $PATH; do 2317c35d236eSmrg IFS="$lt_save_ifs" 2318c35d236eSmrg test -z "$ac_dir" && ac_dir=. 2319c35d236eSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2320c35d236eSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 2321c35d236eSmrg # Check to see if the program is GNU ld. I'd rather use --version, 2322c35d236eSmrg # but apparently some variants of GNU ld only accept -v. 2323c35d236eSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 2324c35d236eSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2325c35d236eSmrg *GNU* | *'with BFD'*) 2326c35d236eSmrg test "$with_gnu_ld" != no && break 2327c35d236eSmrg ;; 2328c35d236eSmrg *) 2329c35d236eSmrg test "$with_gnu_ld" != yes && break 2330c35d236eSmrg ;; 2331c35d236eSmrg esac 2332c35d236eSmrg fi 2333c35d236eSmrg done 2334c35d236eSmrg IFS="$lt_save_ifs" 2335c35d236eSmrgelse 2336c35d236eSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 2337c35d236eSmrgfi]) 2338c35d236eSmrgLD="$lt_cv_path_LD" 2339c35d236eSmrgif test -n "$LD"; then 2340c35d236eSmrg AC_MSG_RESULT($LD) 2341c35d236eSmrgelse 2342c35d236eSmrg AC_MSG_RESULT(no) 2343c35d236eSmrgfi 2344c35d236eSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2345518bcf38SmrgAC_PROG_LD_GNU 2346518bcf38Smrg])# AC_PROG_LD 2347c35d236eSmrg 2348c35d236eSmrg 2349518bcf38Smrg# AC_PROG_LD_GNU 2350518bcf38Smrg# -------------- 2351518bcf38SmrgAC_DEFUN([AC_PROG_LD_GNU], 2352518bcf38Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2353518bcf38SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2354c35d236eSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2355c35d236eSmrgcase `$LD -v 2>&1 </dev/null` in 2356c35d236eSmrg*GNU* | *'with BFD'*) 2357c35d236eSmrg lt_cv_prog_gnu_ld=yes 2358c35d236eSmrg ;; 2359c35d236eSmrg*) 2360c35d236eSmrg lt_cv_prog_gnu_ld=no 2361c35d236eSmrg ;; 2362c35d236eSmrgesac]) 2363c35d236eSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2364518bcf38Smrg])# AC_PROG_LD_GNU 2365c35d236eSmrg 2366c35d236eSmrg 2367518bcf38Smrg# AC_PROG_LD_RELOAD_FLAG 2368518bcf38Smrg# ---------------------- 2369c35d236eSmrg# find reload flag for linker 2370c35d236eSmrg# -- PORTME Some linkers may need a different reload flag. 2371518bcf38SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 2372c35d236eSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 2373c35d236eSmrg lt_cv_ld_reload_flag, 2374c35d236eSmrg [lt_cv_ld_reload_flag='-r']) 2375c35d236eSmrgreload_flag=$lt_cv_ld_reload_flag 2376c35d236eSmrgcase $reload_flag in 2377c35d236eSmrg"" | " "*) ;; 2378c35d236eSmrg*) reload_flag=" $reload_flag" ;; 2379c35d236eSmrgesac 2380c35d236eSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 2381c35d236eSmrgcase $host_os in 2382c35d236eSmrg darwin*) 2383c35d236eSmrg if test "$GCC" = yes; then 2384c35d236eSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2385c35d236eSmrg else 2386c35d236eSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 2387c35d236eSmrg fi 2388c35d236eSmrg ;; 2389c35d236eSmrgesac 2390518bcf38Smrg])# AC_PROG_LD_RELOAD_FLAG 2391c35d236eSmrg 2392c35d236eSmrg 2393518bcf38Smrg# AC_DEPLIBS_CHECK_METHOD 2394518bcf38Smrg# ----------------------- 2395c35d236eSmrg# how to check for library dependencies 2396c35d236eSmrg# -- PORTME fill in with the dynamic library characteristics 2397518bcf38SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2398518bcf38Smrg[AC_CACHE_CHECK([how to recognize dependent libraries], 2399c35d236eSmrglt_cv_deplibs_check_method, 2400c35d236eSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 2401c35d236eSmrglt_cv_file_magic_test_file= 2402c35d236eSmrglt_cv_deplibs_check_method='unknown' 2403c35d236eSmrg# Need to set the preceding variable on all platforms that support 2404c35d236eSmrg# interlibrary dependencies. 2405c35d236eSmrg# 'none' -- dependencies not supported. 2406c35d236eSmrg# `unknown' -- same as none, but documents that we really don't know. 2407c35d236eSmrg# 'pass_all' -- all dependencies passed with no checks. 2408c35d236eSmrg# 'test_compile' -- check by making test program. 2409c35d236eSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 2410c35d236eSmrg# which responds to the $file_magic_cmd with a given extended regex. 2411c35d236eSmrg# If you have `file' or equivalent on your system and you're not sure 2412c35d236eSmrg# whether `pass_all' will *always* work, you probably want this one. 2413c35d236eSmrg 2414c35d236eSmrgcase $host_os in 24154f6cd06fSmrgaix[[4-9]]*) 2416c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2417c35d236eSmrg ;; 2418c35d236eSmrg 2419c35d236eSmrgbeos*) 2420c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2421c35d236eSmrg ;; 2422c35d236eSmrg 2423c35d236eSmrgbsdi[[45]]*) 2424c35d236eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 2425c35d236eSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 2426c35d236eSmrg lt_cv_file_magic_test_file=/shlib/libc.so 2427c35d236eSmrg ;; 2428c35d236eSmrg 2429c35d236eSmrgcygwin*) 2430c35d236eSmrg # func_win32_libid is a shell function defined in ltmain.sh 2431c35d236eSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2432c35d236eSmrg lt_cv_file_magic_cmd='func_win32_libid' 2433c35d236eSmrg ;; 2434c35d236eSmrg 2435c35d236eSmrgmingw* | pw32*) 2436c35d236eSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 24374f6cd06fSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 24384f6cd06fSmrg # unless we find 'file', for example because we are cross-compiling. 24394f6cd06fSmrg if ( file / ) >/dev/null 2>&1; then 24404f6cd06fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 24414f6cd06fSmrg lt_cv_file_magic_cmd='func_win32_libid' 24424f6cd06fSmrg else 24434f6cd06fSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 24444f6cd06fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 24454f6cd06fSmrg fi 2446c35d236eSmrg ;; 2447c35d236eSmrg 2448c35d236eSmrgdarwin* | rhapsody*) 2449c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2450c35d236eSmrg ;; 2451c35d236eSmrg 24524f6cd06fSmrgfreebsd* | dragonfly*) 2453518bcf38Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2454c35d236eSmrg case $host_cpu in 2455c35d236eSmrg i*86 ) 2456c35d236eSmrg # Not sure whether the presence of OpenBSD here was a mistake. 2457c35d236eSmrg # Let's accept both of them until this is cleared up. 2458c35d236eSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 2459c35d236eSmrg lt_cv_file_magic_cmd=/usr/bin/file 2460c35d236eSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2461c35d236eSmrg ;; 2462c35d236eSmrg esac 2463c35d236eSmrg else 2464c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2465c35d236eSmrg fi 2466c35d236eSmrg ;; 2467c35d236eSmrg 2468c35d236eSmrggnu*) 2469c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2470c35d236eSmrg ;; 2471c35d236eSmrg 2472c35d236eSmrghpux10.20* | hpux11*) 2473c35d236eSmrg lt_cv_file_magic_cmd=/usr/bin/file 2474c35d236eSmrg case $host_cpu in 2475c35d236eSmrg ia64*) 2476c35d236eSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 2477c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 2478c35d236eSmrg ;; 2479c35d236eSmrg hppa*64*) 2480c35d236eSmrg [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]'] 2481c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 2482c35d236eSmrg ;; 2483c35d236eSmrg *) 2484c35d236eSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 2485c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 2486c35d236eSmrg ;; 2487c35d236eSmrg esac 2488c35d236eSmrg ;; 2489c35d236eSmrg 24904f6cd06fSmrginterix[[3-9]]*) 2491c35d236eSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 2492c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 2493c35d236eSmrg ;; 2494c35d236eSmrg 2495c35d236eSmrgirix5* | irix6* | nonstopux*) 2496c35d236eSmrg case $LD in 2497c35d236eSmrg *-32|*"-32 ") libmagic=32-bit;; 2498c35d236eSmrg *-n32|*"-n32 ") libmagic=N32;; 2499c35d236eSmrg *-64|*"-64 ") libmagic=64-bit;; 2500c35d236eSmrg *) libmagic=never-match;; 2501c35d236eSmrg esac 2502c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2503c35d236eSmrg ;; 2504c35d236eSmrg 2505c35d236eSmrg# This must be Linux ELF. 25064f6cd06fSmrglinux* | k*bsd*-gnu) 2507c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2508c35d236eSmrg ;; 2509c35d236eSmrg 2510c35d236eSmrgnetbsd*) 2511518bcf38Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2512c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2513c35d236eSmrg else 2514c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 2515c35d236eSmrg fi 2516c35d236eSmrg ;; 2517c35d236eSmrg 2518c35d236eSmrgnewos6*) 2519c35d236eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 2520c35d236eSmrg lt_cv_file_magic_cmd=/usr/bin/file 2521c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 2522c35d236eSmrg ;; 2523c35d236eSmrg 2524518bcf38Smrgnto-qnx*) 2525518bcf38Smrg lt_cv_deplibs_check_method=unknown 2526c35d236eSmrg ;; 2527c35d236eSmrg 2528c35d236eSmrgopenbsd*) 2529518bcf38Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2530c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 2531c35d236eSmrg else 2532c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2533c35d236eSmrg fi 2534c35d236eSmrg ;; 2535c35d236eSmrg 2536c35d236eSmrgosf3* | osf4* | osf5*) 2537c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2538c35d236eSmrg ;; 2539c35d236eSmrg 25404f6cd06fSmrgrdos*) 25414f6cd06fSmrg lt_cv_deplibs_check_method=pass_all 25424f6cd06fSmrg ;; 25434f6cd06fSmrg 2544c35d236eSmrgsolaris*) 2545c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2546c35d236eSmrg ;; 2547c35d236eSmrg 2548c35d236eSmrgsysv4 | sysv4.3*) 2549c35d236eSmrg case $host_vendor in 2550c35d236eSmrg motorola) 2551c35d236eSmrg 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]]' 2552c35d236eSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 2553c35d236eSmrg ;; 2554c35d236eSmrg ncr) 2555c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2556c35d236eSmrg ;; 2557c35d236eSmrg sequent) 2558c35d236eSmrg lt_cv_file_magic_cmd='/bin/file' 2559c35d236eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 2560c35d236eSmrg ;; 2561c35d236eSmrg sni) 2562c35d236eSmrg lt_cv_file_magic_cmd='/bin/file' 2563c35d236eSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 2564c35d236eSmrg lt_cv_file_magic_test_file=/lib/libc.so 2565c35d236eSmrg ;; 2566c35d236eSmrg siemens) 2567c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2568c35d236eSmrg ;; 2569c35d236eSmrg pc) 2570c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2571c35d236eSmrg ;; 2572c35d236eSmrg esac 2573c35d236eSmrg ;; 2574c35d236eSmrg 2575518bcf38Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2576c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2577c35d236eSmrg ;; 2578c35d236eSmrgesac 2579c35d236eSmrg]) 2580c35d236eSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 2581c35d236eSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 2582c35d236eSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 2583518bcf38Smrg])# AC_DEPLIBS_CHECK_METHOD 2584c35d236eSmrg 2585c35d236eSmrg 2586518bcf38Smrg# AC_PROG_NM 2587c35d236eSmrg# ---------- 2588518bcf38Smrg# find the pathname to a BSD-compatible name lister 2589518bcf38SmrgAC_DEFUN([AC_PROG_NM], 2590518bcf38Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 2591c35d236eSmrg[if test -n "$NM"; then 2592c35d236eSmrg # Let the user override the test. 2593c35d236eSmrg lt_cv_path_NM="$NM" 2594c35d236eSmrgelse 2595c35d236eSmrg lt_nm_to_check="${ac_tool_prefix}nm" 25964f6cd06fSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 2597c35d236eSmrg lt_nm_to_check="$lt_nm_to_check nm" 2598c35d236eSmrg fi 2599c35d236eSmrg for lt_tmp_nm in $lt_nm_to_check; do 2600c35d236eSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2601c35d236eSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 2602c35d236eSmrg IFS="$lt_save_ifs" 2603c35d236eSmrg test -z "$ac_dir" && ac_dir=. 2604c35d236eSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 2605c35d236eSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 2606c35d236eSmrg # Check to see if the nm accepts a BSD-compat flag. 2607c35d236eSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 2608c35d236eSmrg # nm: unknown option "B" ignored 2609c35d236eSmrg # Tru64's nm complains that /dev/null is an invalid object file 2610c35d236eSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 2611c35d236eSmrg */dev/null* | *'Invalid file or object type'*) 2612c35d236eSmrg lt_cv_path_NM="$tmp_nm -B" 2613c35d236eSmrg break 2614c35d236eSmrg ;; 2615c35d236eSmrg *) 2616c35d236eSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 2617c35d236eSmrg */dev/null*) 2618c35d236eSmrg lt_cv_path_NM="$tmp_nm -p" 2619c35d236eSmrg break 2620c35d236eSmrg ;; 2621c35d236eSmrg *) 2622c35d236eSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 2623c35d236eSmrg continue # so that we can try to find one that supports BSD flags 2624c35d236eSmrg ;; 2625c35d236eSmrg esac 2626c35d236eSmrg ;; 2627c35d236eSmrg esac 2628c35d236eSmrg fi 2629c35d236eSmrg done 2630c35d236eSmrg IFS="$lt_save_ifs" 2631c35d236eSmrg done 2632518bcf38Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 2633c35d236eSmrgfi]) 2634518bcf38SmrgNM="$lt_cv_path_NM" 2635518bcf38Smrg])# AC_PROG_NM 2636c35d236eSmrg 2637f55e6a01Smrg 2638518bcf38Smrg# AC_CHECK_LIBM 2639518bcf38Smrg# ------------- 2640c35d236eSmrg# check for math library 2641518bcf38SmrgAC_DEFUN([AC_CHECK_LIBM], 2642c35d236eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2643c35d236eSmrgLIBM= 2644c35d236eSmrgcase $host in 2645c35d236eSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 2646c35d236eSmrg # These system don't have libm, or don't need it 2647c35d236eSmrg ;; 2648c35d236eSmrg*-ncr-sysv4.3*) 2649c35d236eSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 2650c35d236eSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 2651c35d236eSmrg ;; 2652c35d236eSmrg*) 2653c35d236eSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 2654c35d236eSmrg ;; 2655c35d236eSmrgesac 2656518bcf38Smrg])# AC_CHECK_LIBM 2657c35d236eSmrg 2658c35d236eSmrg 2659518bcf38Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 2660518bcf38Smrg# ----------------------------------- 2661518bcf38Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 2662518bcf38Smrg# LTDLINCL to the include flags for the libltdl header and adds 2663518bcf38Smrg# --enable-ltdl-convenience to the configure arguments. Note that 2664518bcf38Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2665518bcf38Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 2666518bcf38Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 2667518bcf38Smrg# (note the single quotes!). If your package is not flat and you're not 2668518bcf38Smrg# using automake, define top_builddir and top_srcdir appropriately in 2669518bcf38Smrg# the Makefiles. 2670518bcf38SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 2671518bcf38Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2672518bcf38Smrg case $enable_ltdl_convenience in 2673518bcf38Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2674518bcf38Smrg "") enable_ltdl_convenience=yes 2675518bcf38Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2676518bcf38Smrg esac 2677518bcf38Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2678518bcf38Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2679518bcf38Smrg # For backwards non-gettext consistent compatibility... 2680518bcf38Smrg INCLTDL="$LTDLINCL" 2681518bcf38Smrg])# AC_LIBLTDL_CONVENIENCE 2682c35d236eSmrg 2683c35d236eSmrg 2684518bcf38Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 2685518bcf38Smrg# ----------------------------------- 2686518bcf38Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 2687518bcf38Smrg# LTDLINCL to the include flags for the libltdl header and adds 2688518bcf38Smrg# --enable-ltdl-install to the configure arguments. Note that 2689518bcf38Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2690518bcf38Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 2691518bcf38Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 2692518bcf38Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 2693518bcf38Smrg# flat and you're not using automake, define top_builddir and top_srcdir 2694518bcf38Smrg# appropriately in the Makefiles. 2695518bcf38Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2696518bcf38SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 2697518bcf38Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2698518bcf38Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 2699518bcf38Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2700518bcf38Smrg [if test x"$enable_ltdl_install" = xno; then 2701518bcf38Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 2702518bcf38Smrg else 2703518bcf38Smrg enable_ltdl_install=yes 2704518bcf38Smrg fi 2705518bcf38Smrg ]) 2706518bcf38Smrg if test x"$enable_ltdl_install" = x"yes"; then 2707518bcf38Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 2708518bcf38Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2709518bcf38Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2710518bcf38Smrg else 2711518bcf38Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2712518bcf38Smrg LIBLTDL="-lltdl" 2713518bcf38Smrg LTDLINCL= 2714518bcf38Smrg fi 2715518bcf38Smrg # For backwards non-gettext consistent compatibility... 2716518bcf38Smrg INCLTDL="$LTDLINCL" 2717518bcf38Smrg])# AC_LIBLTDL_INSTALLABLE 2718c35d236eSmrg 2719c35d236eSmrg 2720518bcf38Smrg# AC_LIBTOOL_CXX 2721518bcf38Smrg# -------------- 2722518bcf38Smrg# enable support for C++ libraries 2723518bcf38SmrgAC_DEFUN([AC_LIBTOOL_CXX], 2724518bcf38Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 2725518bcf38Smrg])# AC_LIBTOOL_CXX 2726c35d236eSmrg 2727c35d236eSmrg 2728518bcf38Smrg# _LT_AC_LANG_CXX 2729518bcf38Smrg# --------------- 2730518bcf38SmrgAC_DEFUN([_LT_AC_LANG_CXX], 2731518bcf38Smrg[AC_REQUIRE([AC_PROG_CXX]) 2732518bcf38SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2733518bcf38Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 2734518bcf38Smrg])# _LT_AC_LANG_CXX 2735c35d236eSmrg 2736518bcf38Smrg# _LT_AC_PROG_CXXCPP 2737518bcf38Smrg# ------------------ 2738518bcf38SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 2739c35d236eSmrg[ 2740518bcf38SmrgAC_REQUIRE([AC_PROG_CXX]) 2741518bcf38Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 2742518bcf38Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 2743518bcf38Smrg (test "X$CXX" != "Xg++"))) ; then 2744518bcf38Smrg AC_PROG_CXXCPP 2745518bcf38Smrgfi 2746518bcf38Smrg])# _LT_AC_PROG_CXXCPP 2747c35d236eSmrg 2748518bcf38Smrg# AC_LIBTOOL_F77 2749518bcf38Smrg# -------------- 2750518bcf38Smrg# enable support for Fortran 77 libraries 2751518bcf38SmrgAC_DEFUN([AC_LIBTOOL_F77], 2752518bcf38Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 2753518bcf38Smrg])# AC_LIBTOOL_F77 2754c35d236eSmrg 2755c35d236eSmrg 2756518bcf38Smrg# _LT_AC_LANG_F77 2757518bcf38Smrg# --------------- 2758518bcf38SmrgAC_DEFUN([_LT_AC_LANG_F77], 2759518bcf38Smrg[AC_REQUIRE([AC_PROG_F77]) 2760518bcf38Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 2761518bcf38Smrg])# _LT_AC_LANG_F77 2762c35d236eSmrg 2763c35d236eSmrg 2764518bcf38Smrg# AC_LIBTOOL_GCJ 2765518bcf38Smrg# -------------- 2766518bcf38Smrg# enable support for GCJ libraries 2767518bcf38SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 2768518bcf38Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 2769518bcf38Smrg])# AC_LIBTOOL_GCJ 2770c35d236eSmrg 2771c35d236eSmrg 2772518bcf38Smrg# _LT_AC_LANG_GCJ 2773518bcf38Smrg# --------------- 2774518bcf38SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 2775518bcf38Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 2776518bcf38Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 2777518bcf38Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 2778518bcf38Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 2779518bcf38Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 2780518bcf38Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 2781518bcf38Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 2782518bcf38Smrg])# _LT_AC_LANG_GCJ 2783518bcf38Smrg 2784518bcf38Smrg 2785518bcf38Smrg# AC_LIBTOOL_RC 2786518bcf38Smrg# ------------- 2787518bcf38Smrg# enable support for Windows resource files 2788518bcf38SmrgAC_DEFUN([AC_LIBTOOL_RC], 2789518bcf38Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 2790518bcf38Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 2791518bcf38Smrg])# AC_LIBTOOL_RC 2792c35d236eSmrg 2793c35d236eSmrg 2794518bcf38Smrg# AC_LIBTOOL_LANG_C_CONFIG 2795518bcf38Smrg# ------------------------ 2796518bcf38Smrg# Ensure that the configuration vars for the C compiler are 2797518bcf38Smrg# suitably defined. Those variables are subsequently used by 2798518bcf38Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2799518bcf38SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 2800518bcf38SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 2801518bcf38Smrg[lt_save_CC="$CC" 2802518bcf38SmrgAC_LANG_PUSH(C) 2803c35d236eSmrg 2804518bcf38Smrg# Source file extension for C test sources. 2805518bcf38Smrgac_ext=c 2806518bcf38Smrg 2807518bcf38Smrg# Object file extension for compiled C test sources. 2808518bcf38Smrgobjext=o 2809518bcf38Smrg_LT_AC_TAGVAR(objext, $1)=$objext 2810518bcf38Smrg 2811518bcf38Smrg# Code to be used in simple compile tests 2812518bcf38Smrglt_simple_compile_test_code="int some_variable = 0;" 2813518bcf38Smrg 2814518bcf38Smrg# Code to be used in simple link tests 2815518bcf38Smrglt_simple_link_test_code='int main(){return(0);}' 2816518bcf38Smrg 2817518bcf38Smrg_LT_AC_SYS_COMPILER 2818518bcf38Smrg 2819518bcf38Smrg# save warnings/boilerplate of simple test code 2820518bcf38Smrg_LT_COMPILER_BOILERPLATE 2821518bcf38Smrg_LT_LINKER_BOILERPLATE 2822518bcf38Smrg 2823518bcf38SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 2824518bcf38SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 2825518bcf38SmrgAC_LIBTOOL_PROG_CC_C_O($1) 2826518bcf38SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 2827518bcf38SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 2828518bcf38SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 2829518bcf38SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 2830518bcf38SmrgAC_LIBTOOL_SYS_LIB_STRIP 2831518bcf38SmrgAC_LIBTOOL_DLOPEN_SELF 2832518bcf38Smrg 2833518bcf38Smrg# Report which library types will actually be built 2834518bcf38SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 2835518bcf38SmrgAC_MSG_RESULT([$can_build_shared]) 2836518bcf38Smrg 2837518bcf38SmrgAC_MSG_CHECKING([whether to build shared libraries]) 2838518bcf38Smrgtest "$can_build_shared" = "no" && enable_shared=no 2839518bcf38Smrg 2840518bcf38Smrg# On AIX, shared libraries and static libraries use the same namespace, and 2841518bcf38Smrg# are all built from PIC. 2842518bcf38Smrgcase $host_os in 2843518bcf38Smrgaix3*) 2844518bcf38Smrg test "$enable_shared" = yes && enable_static=no 2845518bcf38Smrg if test -n "$RANLIB"; then 2846518bcf38Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 2847518bcf38Smrg postinstall_cmds='$RANLIB $lib' 2848c35d236eSmrg fi 2849518bcf38Smrg ;; 2850c35d236eSmrg 2851518bcf38Smrgaix[[4-9]]*) 2852518bcf38Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 2853518bcf38Smrg test "$enable_shared" = yes && enable_static=no 2854518bcf38Smrg fi 2855518bcf38Smrg ;; 2856518bcf38Smrgesac 2857518bcf38SmrgAC_MSG_RESULT([$enable_shared]) 2858c35d236eSmrg 2859518bcf38SmrgAC_MSG_CHECKING([whether to build static libraries]) 2860518bcf38Smrg# Make sure either enable_shared or enable_static is yes. 2861518bcf38Smrgtest "$enable_shared" = yes || enable_static=yes 2862518bcf38SmrgAC_MSG_RESULT([$enable_static]) 2863c35d236eSmrg 2864518bcf38SmrgAC_LIBTOOL_CONFIG($1) 2865c35d236eSmrg 2866518bcf38SmrgAC_LANG_POP 2867518bcf38SmrgCC="$lt_save_CC" 2868518bcf38Smrg])# AC_LIBTOOL_LANG_C_CONFIG 2869c35d236eSmrg 2870c35d236eSmrg 2871518bcf38Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 2872518bcf38Smrg# -------------------------- 2873518bcf38Smrg# Ensure that the configuration vars for the C compiler are 2874518bcf38Smrg# suitably defined. Those variables are subsequently used by 2875518bcf38Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2876518bcf38SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 2877518bcf38SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 2878518bcf38Smrg[AC_LANG_PUSH(C++) 2879518bcf38SmrgAC_REQUIRE([AC_PROG_CXX]) 2880518bcf38SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2881518bcf38Smrg 2882518bcf38Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2883518bcf38Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 2884518bcf38Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 2885518bcf38Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 2886518bcf38Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 2887518bcf38Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 2888518bcf38Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 2889518bcf38Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 2890518bcf38Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2891518bcf38Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 2892518bcf38Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2893518bcf38Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 2894518bcf38Smrg_LT_AC_TAGVAR(module_cmds, $1)= 2895518bcf38Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 2896518bcf38Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 2897518bcf38Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 2898518bcf38Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 2899518bcf38Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2900518bcf38Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 2901c35d236eSmrg 2902518bcf38Smrg# Dependencies to place before and after the object being linked: 2903518bcf38Smrg_LT_AC_TAGVAR(predep_objects, $1)= 2904518bcf38Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 2905518bcf38Smrg_LT_AC_TAGVAR(predeps, $1)= 2906518bcf38Smrg_LT_AC_TAGVAR(postdeps, $1)= 2907518bcf38Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 2908518bcf38Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 2909c35d236eSmrg 2910518bcf38Smrg# Source file extension for C++ test sources. 2911518bcf38Smrgac_ext=cpp 2912c35d236eSmrg 2913518bcf38Smrg# Object file extension for compiled C++ test sources. 2914518bcf38Smrgobjext=o 2915518bcf38Smrg_LT_AC_TAGVAR(objext, $1)=$objext 2916518bcf38Smrg 2917518bcf38Smrg# Code to be used in simple compile tests 2918518bcf38Smrglt_simple_compile_test_code="int some_variable = 0;" 2919518bcf38Smrg 2920518bcf38Smrg# Code to be used in simple link tests 2921518bcf38Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 2922518bcf38Smrg 2923518bcf38Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 2924518bcf38Smrg_LT_AC_SYS_COMPILER 2925518bcf38Smrg 2926518bcf38Smrg# save warnings/boilerplate of simple test code 2927518bcf38Smrg_LT_COMPILER_BOILERPLATE 2928518bcf38Smrg_LT_LINKER_BOILERPLATE 2929518bcf38Smrg 2930518bcf38Smrg# Allow CC to be a program name with arguments. 2931518bcf38Smrglt_save_CC=$CC 2932518bcf38Smrglt_save_LD=$LD 2933518bcf38Smrglt_save_GCC=$GCC 2934518bcf38SmrgGCC=$GXX 2935518bcf38Smrglt_save_with_gnu_ld=$with_gnu_ld 2936518bcf38Smrglt_save_path_LD=$lt_cv_path_LD 2937518bcf38Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 2938518bcf38Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 2939518bcf38Smrgelse 2940518bcf38Smrg $as_unset lt_cv_prog_gnu_ld 2941518bcf38Smrgfi 2942518bcf38Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 2943518bcf38Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 2944518bcf38Smrgelse 2945518bcf38Smrg $as_unset lt_cv_path_LD 2946518bcf38Smrgfi 2947518bcf38Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 2948518bcf38SmrgCC=${CXX-"c++"} 2949518bcf38Smrgcompiler=$CC 2950518bcf38Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 2951518bcf38Smrg_LT_CC_BASENAME([$compiler]) 2952518bcf38Smrg 2953518bcf38Smrg# We don't want -fno-exception wen compiling C++ code, so set the 2954518bcf38Smrg# no_builtin_flag separately 2955518bcf38Smrgif test "$GXX" = yes; then 2956518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 2957518bcf38Smrgelse 2958518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 2959518bcf38Smrgfi 2960518bcf38Smrg 2961518bcf38Smrgif test "$GXX" = yes; then 2962518bcf38Smrg # Set up default GNU C++ configuration 2963518bcf38Smrg 2964518bcf38Smrg AC_PROG_LD 2965518bcf38Smrg 2966518bcf38Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 2967518bcf38Smrg # archiving commands below assume that GNU ld is being used. 2968518bcf38Smrg if test "$with_gnu_ld" = yes; then 2969518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 2970518bcf38Smrg _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' 2971518bcf38Smrg 2972518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 2973518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 2974518bcf38Smrg 2975518bcf38Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 2976518bcf38Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 2977518bcf38Smrg # investigate it a little bit more. (MM) 2978518bcf38Smrg wlarc='${wl}' 2979518bcf38Smrg 2980518bcf38Smrg # ancient GNU ld didn't support --whole-archive et. al. 2981518bcf38Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 2982518bcf38Smrg grep 'no-whole-archive' > /dev/null; then 2983518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 2984c35d236eSmrg else 2985518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2986c35d236eSmrg fi 2987c35d236eSmrg else 2988518bcf38Smrg with_gnu_ld=no 2989518bcf38Smrg wlarc= 2990518bcf38Smrg 2991518bcf38Smrg # A generic and very simple default shared library creation 2992518bcf38Smrg # command for GNU C++ for the case where it uses the native 2993518bcf38Smrg # linker, instead of GNU ld. If possible, this setting should 2994518bcf38Smrg # overridden to take advantage of the native linker features on 2995518bcf38Smrg # the platform it is being used on. 2996518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 2997c35d236eSmrg fi 2998c35d236eSmrg 2999518bcf38Smrg # Commands to make compiler produce verbose output that lists 3000518bcf38Smrg # what "hidden" libraries, object files and flags are used when 3001518bcf38Smrg # linking a shared library. 3002518bcf38Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3003518bcf38Smrg 3004c35d236eSmrgelse 3005518bcf38Smrg GXX=no 3006518bcf38Smrg with_gnu_ld=no 3007518bcf38Smrg wlarc= 3008c35d236eSmrgfi 3009c35d236eSmrg 3010518bcf38Smrg# PORTME: fill in a description of your system's C++ link characteristics 3011518bcf38SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 3012518bcf38Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 3013518bcf38Smrgcase $host_os in 3014518bcf38Smrg aix3*) 3015518bcf38Smrg # FIXME: insert proper C++ library support 3016518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3017518bcf38Smrg ;; 3018518bcf38Smrg aix[[4-9]]*) 3019518bcf38Smrg if test "$host_cpu" = ia64; then 3020518bcf38Smrg # On IA64, the linker does run time linking by default, so we don't 3021518bcf38Smrg # have to do anything special. 3022518bcf38Smrg aix_use_runtimelinking=no 3023518bcf38Smrg exp_sym_flag='-Bexport' 3024518bcf38Smrg no_entry_flag="" 3025518bcf38Smrg else 3026518bcf38Smrg aix_use_runtimelinking=no 3027518bcf38Smrg 3028518bcf38Smrg # Test if we are trying to use run time linking or normal 3029518bcf38Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 3030518bcf38Smrg # need to do runtime linking. 3031518bcf38Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 3032518bcf38Smrg for ld_flag in $LDFLAGS; do 3033518bcf38Smrg case $ld_flag in 3034518bcf38Smrg *-brtl*) 3035518bcf38Smrg aix_use_runtimelinking=yes 3036518bcf38Smrg break 3037518bcf38Smrg ;; 3038518bcf38Smrg esac 3039518bcf38Smrg done 3040518bcf38Smrg ;; 3041518bcf38Smrg esac 3042c35d236eSmrg 3043518bcf38Smrg exp_sym_flag='-bexport' 3044518bcf38Smrg no_entry_flag='-bnoentry' 3045518bcf38Smrg fi 3046c35d236eSmrg 3047518bcf38Smrg # When large executables or shared objects are built, AIX ld can 3048518bcf38Smrg # have problems creating the table of contents. If linking a library 3049518bcf38Smrg # or program results in "error TOC overflow" add -mminimal-toc to 3050518bcf38Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 3051518bcf38Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 3052c35d236eSmrg 3053518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 3054518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3055518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3056518bcf38Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3057c35d236eSmrg 3058518bcf38Smrg if test "$GXX" = yes; then 3059518bcf38Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 3060518bcf38Smrg # We only want to do this on AIX 4.2 and lower, the check 3061518bcf38Smrg # below for broken collect2 doesn't work under 4.3+ 3062518bcf38Smrg collect2name=`${CC} -print-prog-name=collect2` 3063518bcf38Smrg if test -f "$collect2name" && \ 3064518bcf38Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 3065518bcf38Smrg then 3066518bcf38Smrg # We have reworked collect2 3067518bcf38Smrg : 3068518bcf38Smrg else 3069518bcf38Smrg # We have old collect2 3070518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 3071518bcf38Smrg # It fails to find uninstalled libraries when the uninstalled 3072518bcf38Smrg # path is not listed in the libpath. Setting hardcode_minus_L 3073518bcf38Smrg # to unsupported forces relinking 3074518bcf38Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 3075518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3076518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3077518bcf38Smrg fi 3078518bcf38Smrg ;; 3079518bcf38Smrg esac 3080518bcf38Smrg shared_flag='-shared' 3081518bcf38Smrg if test "$aix_use_runtimelinking" = yes; then 3082518bcf38Smrg shared_flag="$shared_flag "'${wl}-G' 3083518bcf38Smrg fi 3084518bcf38Smrg else 3085518bcf38Smrg # not using gcc 3086c35d236eSmrg if test "$host_cpu" = ia64; then 3087518bcf38Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 3088518bcf38Smrg # chokes on -Wl,-G. The following line is correct: 3089518bcf38Smrg shared_flag='-G' 3090518bcf38Smrg else 3091518bcf38Smrg if test "$aix_use_runtimelinking" = yes; then 3092518bcf38Smrg shared_flag='${wl}-G' 3093518bcf38Smrg else 3094518bcf38Smrg shared_flag='${wl}-bM:SRE' 3095518bcf38Smrg fi 3096518bcf38Smrg fi 3097518bcf38Smrg fi 3098518bcf38Smrg 3099518bcf38Smrg # It seems that -bexpall does not export symbols beginning with 3100518bcf38Smrg # underscore (_), so it is better to generate a list of symbols to export. 3101518bcf38Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 3102518bcf38Smrg if test "$aix_use_runtimelinking" = yes; then 3103518bcf38Smrg # Warning - without using the other runtime loading flags (-brtl), 3104518bcf38Smrg # -berok will link without error, but may produce a broken library. 3105518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 3106518bcf38Smrg # Determine the default libpath from the value encoded in an empty executable. 3107518bcf38Smrg _LT_AC_SYS_LIBPATH_AIX 3108518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3109518bcf38Smrg 3110518bcf38Smrg _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" 3111518bcf38Smrg else 3112518bcf38Smrg if test "$host_cpu" = ia64; then 3113518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 3114518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 3115518bcf38Smrg _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" 3116518bcf38Smrg else 3117518bcf38Smrg # Determine the default libpath from the value encoded in an empty executable. 3118518bcf38Smrg _LT_AC_SYS_LIBPATH_AIX 3119518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3120518bcf38Smrg # Warning - without using the other run time loading flags, 3121518bcf38Smrg # -berok will link without error, but may produce a broken library. 3122518bcf38Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 3123518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 3124518bcf38Smrg # Exported symbols can be pulled into shared objects from archives 3125518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 3126518bcf38Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 3127518bcf38Smrg # This is similar to how AIX traditionally builds its shared libraries. 3128518bcf38Smrg _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' 3129518bcf38Smrg fi 3130518bcf38Smrg fi 3131518bcf38Smrg ;; 3132518bcf38Smrg 3133518bcf38Smrg beos*) 3134518bcf38Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 3135518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3136518bcf38Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 3137518bcf38Smrg # support --undefined. This deserves some investigation. FIXME 3138518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3139518bcf38Smrg else 3140518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3141518bcf38Smrg fi 3142518bcf38Smrg ;; 3143518bcf38Smrg 3144518bcf38Smrg chorus*) 3145518bcf38Smrg case $cc_basename in 3146518bcf38Smrg *) 3147518bcf38Smrg # FIXME: insert proper C++ library support 3148518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3149518bcf38Smrg ;; 3150518bcf38Smrg esac 3151518bcf38Smrg ;; 3152518bcf38Smrg 3153518bcf38Smrg cygwin* | mingw* | pw32*) 3154518bcf38Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 3155518bcf38Smrg # as there is no search path for DLLs. 3156518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3157518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3158518bcf38Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 3159518bcf38Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 3160518bcf38Smrg 3161518bcf38Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 3162518bcf38Smrg _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' 3163518bcf38Smrg # If the export-symbols file already is a .def file (1st line 3164518bcf38Smrg # is EXPORTS), use it as is; otherwise, prepend... 3165518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 3166518bcf38Smrg cp $export_symbols $output_objdir/$soname.def; 3167518bcf38Smrg else 3168518bcf38Smrg echo EXPORTS > $output_objdir/$soname.def; 3169518bcf38Smrg cat $export_symbols >> $output_objdir/$soname.def; 3170518bcf38Smrg fi~ 3171518bcf38Smrg $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' 3172518bcf38Smrg else 3173518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3174518bcf38Smrg fi 3175518bcf38Smrg ;; 3176518bcf38Smrg darwin* | rhapsody*) 3177518bcf38Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3178518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3179518bcf38Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 3180518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3181518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 3182518bcf38Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3183518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3184518bcf38Smrg if test "$GXX" = yes ; then 3185518bcf38Smrg output_verbose_link_cmd='echo' 3186518bcf38Smrg _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}" 3187518bcf38Smrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3188518bcf38Smrg _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}" 3189518bcf38Smrg _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}" 3190518bcf38Smrg if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3191518bcf38Smrg _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}" 3192518bcf38Smrg _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}" 3193518bcf38Smrg fi 3194518bcf38Smrg else 3195518bcf38Smrg case $cc_basename in 3196518bcf38Smrg xlc*) 3197518bcf38Smrg output_verbose_link_cmd='echo' 3198518bcf38Smrg _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' 3199518bcf38Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3200518bcf38Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3201518bcf38Smrg _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}' 3202518bcf38Smrg _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}' 3203518bcf38Smrg ;; 3204518bcf38Smrg *) 3205518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3206518bcf38Smrg ;; 3207518bcf38Smrg esac 3208518bcf38Smrg fi 3209518bcf38Smrg ;; 3210518bcf38Smrg 3211518bcf38Smrg dgux*) 3212518bcf38Smrg case $cc_basename in 3213518bcf38Smrg ec++*) 3214518bcf38Smrg # FIXME: insert proper C++ library support 3215518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3216518bcf38Smrg ;; 3217518bcf38Smrg ghcx*) 3218518bcf38Smrg # Green Hills C++ Compiler 3219518bcf38Smrg # FIXME: insert proper C++ library support 3220518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3221518bcf38Smrg ;; 3222518bcf38Smrg *) 3223518bcf38Smrg # FIXME: insert proper C++ library support 3224518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3225518bcf38Smrg ;; 3226518bcf38Smrg esac 3227518bcf38Smrg ;; 3228518bcf38Smrg freebsd[[12]]*) 3229518bcf38Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 3230518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3231518bcf38Smrg ;; 3232518bcf38Smrg freebsd-elf*) 3233518bcf38Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3234518bcf38Smrg ;; 3235518bcf38Smrg freebsd* | dragonfly*) 3236518bcf38Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 3237518bcf38Smrg # conventions 3238518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 3239518bcf38Smrg ;; 3240518bcf38Smrg gnu*) 3241518bcf38Smrg ;; 3242518bcf38Smrg hpux9*) 3243518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3244518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3245518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3246518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3247518bcf38Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3248518bcf38Smrg # but as the default 3249518bcf38Smrg # location of the library. 3250518bcf38Smrg 3251518bcf38Smrg case $cc_basename in 3252518bcf38Smrg CC*) 3253518bcf38Smrg # FIXME: insert proper C++ library support 3254518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3255518bcf38Smrg ;; 3256518bcf38Smrg aCC*) 3257518bcf38Smrg _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' 3258518bcf38Smrg # Commands to make compiler produce verbose output that lists 3259518bcf38Smrg # what "hidden" libraries, object files and flags are used when 3260518bcf38Smrg # linking a shared library. 3261518bcf38Smrg # 3262518bcf38Smrg # There doesn't appear to be a way to prevent this compiler from 3263518bcf38Smrg # explicitly linking system object files so we need to strip them 3264518bcf38Smrg # from the output so that they don't get included in the library 3265518bcf38Smrg # dependencies. 3266518bcf38Smrg 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' 3267518bcf38Smrg ;; 3268518bcf38Smrg *) 3269518bcf38Smrg if test "$GXX" = yes; then 3270518bcf38Smrg _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' 3271518bcf38Smrg else 3272518bcf38Smrg # FIXME: insert proper C++ library support 3273518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3274c35d236eSmrg fi 3275f55e6a01Smrg ;; 3276518bcf38Smrg esac 3277518bcf38Smrg ;; 3278518bcf38Smrg hpux10*|hpux11*) 3279518bcf38Smrg if test $with_gnu_ld = no; then 3280518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3281518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3282c35d236eSmrg 3283f55e6a01Smrg case $host_cpu in 3284518bcf38Smrg hppa*64*|ia64*) ;; 3285518bcf38Smrg *) 3286518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3287f55e6a01Smrg ;; 3288f55e6a01Smrg esac 3289518bcf38Smrg fi 3290518bcf38Smrg case $host_cpu in 3291518bcf38Smrg hppa*64*|ia64*) 3292518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3293518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3294518bcf38Smrg ;; 3295518bcf38Smrg *) 3296518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3297518bcf38Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3298518bcf38Smrg # but as the default 3299518bcf38Smrg # location of the library. 3300f55e6a01Smrg ;; 3301518bcf38Smrg esac 3302c35d236eSmrg 3303518bcf38Smrg case $cc_basename in 3304518bcf38Smrg CC*) 3305518bcf38Smrg # FIXME: insert proper C++ library support 3306518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3307c35d236eSmrg ;; 3308518bcf38Smrg aCC*) 3309518bcf38Smrg case $host_cpu in 3310518bcf38Smrg hppa*64*) 3311518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3312518bcf38Smrg ;; 3313518bcf38Smrg ia64*) 3314518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3315518bcf38Smrg ;; 3316518bcf38Smrg *) 3317518bcf38Smrg _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' 3318c35d236eSmrg ;; 3319c35d236eSmrg esac 3320518bcf38Smrg # Commands to make compiler produce verbose output that lists 3321518bcf38Smrg # what "hidden" libraries, object files and flags are used when 3322518bcf38Smrg # linking a shared library. 3323518bcf38Smrg # 3324518bcf38Smrg # There doesn't appear to be a way to prevent this compiler from 3325518bcf38Smrg # explicitly linking system object files so we need to strip them 3326518bcf38Smrg # from the output so that they don't get included in the library 3327518bcf38Smrg # dependencies. 3328518bcf38Smrg 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' 3329c35d236eSmrg ;; 3330518bcf38Smrg *) 3331518bcf38Smrg if test "$GXX" = yes; then 3332518bcf38Smrg if test $with_gnu_ld = no; then 3333c35d236eSmrg case $host_cpu in 3334518bcf38Smrg hppa*64*) 3335518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3336518bcf38Smrg ;; 3337518bcf38Smrg ia64*) 3338518bcf38Smrg _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' 3339c35d236eSmrg ;; 3340c35d236eSmrg *) 3341518bcf38Smrg _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' 3342c35d236eSmrg ;; 3343c35d236eSmrg esac 3344518bcf38Smrg fi 3345518bcf38Smrg else 3346518bcf38Smrg # FIXME: insert proper C++ library support 3347518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3348518bcf38Smrg fi 3349c35d236eSmrg ;; 3350518bcf38Smrg esac 3351518bcf38Smrg ;; 3352518bcf38Smrg interix[[3-9]]*) 3353518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3354518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3355518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3356518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3357518bcf38Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 3358518bcf38Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 3359518bcf38Smrg # default) and relocated if they conflict, which is a slow very memory 3360518bcf38Smrg # consuming and fragmenting process. To avoid this, we pick a random, 3361518bcf38Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 3362518bcf38Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 3363518bcf38Smrg _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' 3364518bcf38Smrg _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' 3365518bcf38Smrg ;; 3366518bcf38Smrg irix5* | irix6*) 3367518bcf38Smrg case $cc_basename in 3368518bcf38Smrg CC*) 3369518bcf38Smrg # SGI C++ 3370518bcf38Smrg _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' 3371518bcf38Smrg 3372518bcf38Smrg # Archives containing C++ object files must be created using 3373518bcf38Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 3374518bcf38Smrg # necessary to make sure instantiated templates are included 3375518bcf38Smrg # in the archive. 3376518bcf38Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 3377c35d236eSmrg ;; 3378518bcf38Smrg *) 3379518bcf38Smrg if test "$GXX" = yes; then 3380518bcf38Smrg if test "$with_gnu_ld" = no; then 3381518bcf38Smrg _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' 3382518bcf38Smrg else 3383518bcf38Smrg _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' 3384518bcf38Smrg fi 3385518bcf38Smrg fi 3386518bcf38Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3387518bcf38Smrg ;; 3388518bcf38Smrg esac 3389518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3390518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3391518bcf38Smrg ;; 3392518bcf38Smrg linux* | k*bsd*-gnu) 3393518bcf38Smrg case $cc_basename in 3394518bcf38Smrg KCC*) 3395518bcf38Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3396518bcf38Smrg 3397518bcf38Smrg # KCC will only create a shared library if the output file 3398518bcf38Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3399518bcf38Smrg # to its proper name (with version) after linking. 3400518bcf38Smrg _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' 3401518bcf38Smrg _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' 3402518bcf38Smrg # Commands to make compiler produce verbose output that lists 3403518bcf38Smrg # what "hidden" libraries, object files and flags are used when 3404518bcf38Smrg # linking a shared library. 3405518bcf38Smrg # 3406518bcf38Smrg # There doesn't appear to be a way to prevent this compiler from 3407518bcf38Smrg # explicitly linking system object files so we need to strip them 3408518bcf38Smrg # from the output so that they don't get included in the library 3409518bcf38Smrg # dependencies. 3410518bcf38Smrg 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' 3411518bcf38Smrg 3412518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 3413518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3414518bcf38Smrg 3415518bcf38Smrg # Archives containing C++ object files must be created using 3416518bcf38Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3417518bcf38Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3418518bcf38Smrg ;; 3419518bcf38Smrg icpc*) 3420518bcf38Smrg # Intel C++ 3421518bcf38Smrg with_gnu_ld=yes 3422518bcf38Smrg # version 8.0 and above of icpc choke on multiply defined symbols 3423518bcf38Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 3424518bcf38Smrg # earlier do not add the objects themselves. 3425518bcf38Smrg case `$CC -V 2>&1` in 3426518bcf38Smrg *"Version 7."*) 3427518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3428518bcf38Smrg _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' 3429518bcf38Smrg ;; 3430518bcf38Smrg *) # Version 8.0 or newer 3431518bcf38Smrg tmp_idyn= 3432518bcf38Smrg case $host_cpu in 3433518bcf38Smrg ia64*) tmp_idyn=' -i_dynamic';; 3434518bcf38Smrg esac 3435518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3436518bcf38Smrg _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' 3437518bcf38Smrg ;; 34384f6cd06fSmrg esac 3439518bcf38Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3440518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3441518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3442518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 34434f6cd06fSmrg ;; 3444518bcf38Smrg pgCC* | pgcpp*) 3445518bcf38Smrg # Portland Group C++ compiler 3446518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 3447518bcf38Smrg _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' 3448518bcf38Smrg 3449518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3450518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3451518bcf38Smrg _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' 3452518bcf38Smrg ;; 3453518bcf38Smrg cxx*) 3454518bcf38Smrg # Compaq C++ 3455518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3456518bcf38Smrg _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' 3457518bcf38Smrg 3458518bcf38Smrg runpath_var=LD_RUN_PATH 3459518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3460518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3461518bcf38Smrg 3462518bcf38Smrg # Commands to make compiler produce verbose output that lists 3463518bcf38Smrg # what "hidden" libraries, object files and flags are used when 3464518bcf38Smrg # linking a shared library. 3465518bcf38Smrg # 3466518bcf38Smrg # There doesn't appear to be a way to prevent this compiler from 3467518bcf38Smrg # explicitly linking system object files so we need to strip them 3468518bcf38Smrg # from the output so that they don't get included in the library 3469518bcf38Smrg # dependencies. 3470518bcf38Smrg 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' 3471518bcf38Smrg ;; 3472518bcf38Smrg *) 3473518bcf38Smrg case `$CC -V 2>&1 | sed 5q` in 3474518bcf38Smrg *Sun\ C*) 3475518bcf38Smrg # Sun C++ 5.9 3476518bcf38Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3477518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3478518bcf38Smrg _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' 3479518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3480518bcf38Smrg _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' 3481518bcf38Smrg 3482518bcf38Smrg # Not sure whether something based on 3483518bcf38Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 3484518bcf38Smrg # would be better. 3485518bcf38Smrg output_verbose_link_cmd='echo' 3486518bcf38Smrg 3487518bcf38Smrg # Archives containing C++ object files must be created using 3488518bcf38Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 3489518bcf38Smrg # necessary to make sure instantiated templates are included 3490518bcf38Smrg # in the archive. 3491518bcf38Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3492518bcf38Smrg ;; 3493f55e6a01Smrg esac 3494c35d236eSmrg ;; 3495518bcf38Smrg esac 3496518bcf38Smrg ;; 3497518bcf38Smrg lynxos*) 3498518bcf38Smrg # FIXME: insert proper C++ library support 3499518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3500518bcf38Smrg ;; 3501518bcf38Smrg m88k*) 3502518bcf38Smrg # FIXME: insert proper C++ library support 3503518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3504518bcf38Smrg ;; 3505518bcf38Smrg mvs*) 3506518bcf38Smrg case $cc_basename in 3507518bcf38Smrg cxx*) 3508518bcf38Smrg # FIXME: insert proper C++ library support 3509518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3510c35d236eSmrg ;; 3511518bcf38Smrg *) 3512518bcf38Smrg # FIXME: insert proper C++ library support 3513518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3514c35d236eSmrg ;; 3515518bcf38Smrg esac 3516518bcf38Smrg ;; 3517518bcf38Smrg netbsd*) 3518518bcf38Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3519518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 3520518bcf38Smrg wlarc= 3521518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3522518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3523518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3524518bcf38Smrg fi 3525518bcf38Smrg # Workaround some broken pre-1.5 toolchains 3526518bcf38Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 3527518bcf38Smrg ;; 3528518bcf38Smrg openbsd2*) 3529518bcf38Smrg # C++ shared libraries are fairly broken 3530518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3531518bcf38Smrg ;; 3532518bcf38Smrg openbsd*) 3533518bcf38Smrg if test -f /usr/libexec/ld.so; then 3534518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3535518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3536518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3537518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3538518bcf38Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3539518bcf38Smrg _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' 3540518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3541518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3542518bcf38Smrg fi 3543518bcf38Smrg output_verbose_link_cmd='echo' 3544518bcf38Smrg else 3545518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3546518bcf38Smrg fi 3547518bcf38Smrg ;; 3548518bcf38Smrg osf3*) 3549518bcf38Smrg case $cc_basename in 3550518bcf38Smrg KCC*) 3551518bcf38Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3552518bcf38Smrg 3553518bcf38Smrg # KCC will only create a shared library if the output file 3554518bcf38Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3555518bcf38Smrg # to its proper name (with version) after linking. 3556518bcf38Smrg _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' 3557518bcf38Smrg 3558518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3559518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3560518bcf38Smrg 3561518bcf38Smrg # Archives containing C++ object files must be created using 3562518bcf38Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3563518bcf38Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3564518bcf38Smrg 3565c35d236eSmrg ;; 3566518bcf38Smrg RCC*) 3567518bcf38Smrg # Rational C++ 2.4.1 3568518bcf38Smrg # FIXME: insert proper C++ library support 3569518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3570c35d236eSmrg ;; 3571518bcf38Smrg cxx*) 3572518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3573518bcf38Smrg _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' 3574518bcf38Smrg 3575518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3576518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3577518bcf38Smrg 3578518bcf38Smrg # Commands to make compiler produce verbose output that lists 3579518bcf38Smrg # what "hidden" libraries, object files and flags are used when 3580518bcf38Smrg # linking a shared library. 3581518bcf38Smrg # 3582518bcf38Smrg # There doesn't appear to be a way to prevent this compiler from 3583518bcf38Smrg # explicitly linking system object files so we need to strip them 3584518bcf38Smrg # from the output so that they don't get included in the library 3585518bcf38Smrg # dependencies. 3586518bcf38Smrg 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' 3587c35d236eSmrg ;; 3588518bcf38Smrg *) 3589518bcf38Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3590518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3591518bcf38Smrg _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' 3592518bcf38Smrg 3593518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3594518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3595518bcf38Smrg 3596518bcf38Smrg # Commands to make compiler produce verbose output that lists 3597518bcf38Smrg # what "hidden" libraries, object files and flags are used when 3598518bcf38Smrg # linking a shared library. 3599518bcf38Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3600518bcf38Smrg 3601518bcf38Smrg else 3602518bcf38Smrg # FIXME: insert proper C++ library support 3603518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3604518bcf38Smrg fi 3605c35d236eSmrg ;; 3606518bcf38Smrg esac 3607518bcf38Smrg ;; 3608518bcf38Smrg osf4* | osf5*) 3609518bcf38Smrg case $cc_basename in 3610518bcf38Smrg KCC*) 3611518bcf38Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3612518bcf38Smrg 3613518bcf38Smrg # KCC will only create a shared library if the output file 3614518bcf38Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3615518bcf38Smrg # to its proper name (with version) after linking. 3616518bcf38Smrg _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' 3617518bcf38Smrg 3618518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3619518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3620518bcf38Smrg 3621518bcf38Smrg # Archives containing C++ object files must be created using 3622518bcf38Smrg # the KAI C++ compiler. 3623518bcf38Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 3624c35d236eSmrg ;; 3625518bcf38Smrg RCC*) 3626518bcf38Smrg # Rational C++ 2.4.1 3627518bcf38Smrg # FIXME: insert proper C++ library support 3628518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3629c35d236eSmrg ;; 3630518bcf38Smrg cxx*) 3631518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 3632518bcf38Smrg _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' 3633518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 3634518bcf38Smrg echo "-hidden">> $lib.exp~ 3635518bcf38Smrg $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~ 3636518bcf38Smrg $rm $lib.exp' 3637518bcf38Smrg 3638518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3639518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3640518bcf38Smrg 3641518bcf38Smrg # Commands to make compiler produce verbose output that lists 3642518bcf38Smrg # what "hidden" libraries, object files and flags are used when 3643518bcf38Smrg # linking a shared library. 3644518bcf38Smrg # 3645518bcf38Smrg # There doesn't appear to be a way to prevent this compiler from 3646518bcf38Smrg # explicitly linking system object files so we need to strip them 3647518bcf38Smrg # from the output so that they don't get included in the library 3648518bcf38Smrg # dependencies. 3649518bcf38Smrg 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' 3650c35d236eSmrg ;; 3651518bcf38Smrg *) 3652518bcf38Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3653518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3654518bcf38Smrg _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' 3655518bcf38Smrg 3656518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3657518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3658518bcf38Smrg 3659518bcf38Smrg # Commands to make compiler produce verbose output that lists 3660518bcf38Smrg # what "hidden" libraries, object files and flags are used when 3661518bcf38Smrg # linking a shared library. 3662518bcf38Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3663518bcf38Smrg 3664518bcf38Smrg else 3665518bcf38Smrg # FIXME: insert proper C++ library support 3666518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3667518bcf38Smrg fi 3668518bcf38Smrg ;; 3669518bcf38Smrg esac 3670518bcf38Smrg ;; 3671518bcf38Smrg psos*) 3672518bcf38Smrg # FIXME: insert proper C++ library support 3673518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3674518bcf38Smrg ;; 3675518bcf38Smrg sunos4*) 3676518bcf38Smrg case $cc_basename in 3677518bcf38Smrg CC*) 3678518bcf38Smrg # Sun C++ 4.x 3679518bcf38Smrg # FIXME: insert proper C++ library support 3680518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3681518bcf38Smrg ;; 3682518bcf38Smrg lcc*) 3683518bcf38Smrg # Lucid 3684518bcf38Smrg # FIXME: insert proper C++ library support 3685518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3686518bcf38Smrg ;; 3687518bcf38Smrg *) 3688518bcf38Smrg # FIXME: insert proper C++ library support 3689518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3690518bcf38Smrg ;; 3691518bcf38Smrg esac 3692518bcf38Smrg ;; 3693518bcf38Smrg solaris*) 3694518bcf38Smrg case $cc_basename in 3695518bcf38Smrg CC*) 3696518bcf38Smrg # Sun C++ 4.2, 5.x and Centerline C++ 3697518bcf38Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 3698518bcf38Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3699518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3700518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3701518bcf38Smrg $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' 3702518bcf38Smrg 3703518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3704518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3705518bcf38Smrg case $host_os in 3706518bcf38Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3707f55e6a01Smrg *) 3708518bcf38Smrg # The compiler driver will combine and reorder linker options, 3709518bcf38Smrg # but understands `-z linker_flag'. 3710518bcf38Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 3711518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 3712f55e6a01Smrg ;; 3713f55e6a01Smrg esac 3714518bcf38Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3715518bcf38Smrg 3716518bcf38Smrg output_verbose_link_cmd='echo' 3717518bcf38Smrg 3718518bcf38Smrg # Archives containing C++ object files must be created using 3719518bcf38Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 3720518bcf38Smrg # necessary to make sure instantiated templates are included 3721518bcf38Smrg # in the archive. 3722518bcf38Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3723c35d236eSmrg ;; 3724518bcf38Smrg gcx*) 3725518bcf38Smrg # Green Hills C++ Compiler 3726518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3727518bcf38Smrg 3728518bcf38Smrg # The C++ compiler must be used to create the archive. 3729518bcf38Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 3730c35d236eSmrg ;; 3731c35d236eSmrg *) 3732518bcf38Smrg # GNU C++ compiler with Solaris linker 3733518bcf38Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3734518bcf38Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 3735518bcf38Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 3736518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3737518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3738518bcf38Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3739c35d236eSmrg 3740518bcf38Smrg # Commands to make compiler produce verbose output that lists 3741518bcf38Smrg # what "hidden" libraries, object files and flags are used when 3742518bcf38Smrg # linking a shared library. 3743518bcf38Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3744518bcf38Smrg else 3745518bcf38Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 3746518bcf38Smrg # platform. 3747518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3748518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3749518bcf38Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3750c35d236eSmrg 3751518bcf38Smrg # Commands to make compiler produce verbose output that lists 3752518bcf38Smrg # what "hidden" libraries, object files and flags are used when 3753518bcf38Smrg # linking a shared library. 3754518bcf38Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3755518bcf38Smrg fi 3756c35d236eSmrg 3757518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 3758518bcf38Smrg case $host_os in 3759518bcf38Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3760518bcf38Smrg *) 3761518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 3762518bcf38Smrg ;; 3763518bcf38Smrg esac 3764518bcf38Smrg fi 3765518bcf38Smrg ;; 3766518bcf38Smrg esac 3767518bcf38Smrg ;; 3768518bcf38Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 3769518bcf38Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3770518bcf38Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3771518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3772518bcf38Smrg runpath_var='LD_RUN_PATH' 3773518bcf38Smrg 3774518bcf38Smrg case $cc_basename in 3775518bcf38Smrg CC*) 3776518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3777518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3778f55e6a01Smrg ;; 3779f55e6a01Smrg *) 3780518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3781518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3782f55e6a01Smrg ;; 3783c35d236eSmrg esac 3784518bcf38Smrg ;; 3785518bcf38Smrg sysv5* | sco3.2v5* | sco5v6*) 3786518bcf38Smrg # Note: We can NOT use -z defs as we might desire, because we do not 3787518bcf38Smrg # link with -lc, and that would cause any symbols used from libc to 3788518bcf38Smrg # always be unresolved, which means just about no library would 3789518bcf38Smrg # ever link correctly. If we're not using GNU ld we use -z text 3790518bcf38Smrg # though, which does catch some bad symbols but isn't as heavy-handed 3791518bcf38Smrg # as -z defs. 3792518bcf38Smrg # For security reasons, it is highly recommended that you always 3793518bcf38Smrg # use absolute paths for naming shared libraries, and exclude the 3794518bcf38Smrg # DT_RUNPATH tag from executables and libraries. But doing so 3795518bcf38Smrg # requires that you compile everything twice, which is a pain. 3796518bcf38Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 3797518bcf38Smrg # non-empty value in the environment. Most likely only useful for 3798518bcf38Smrg # creating official distributions of packages. 3799518bcf38Smrg # This is a hack until libtool officially supports absolute path 3800518bcf38Smrg # names for shared libraries. 3801518bcf38Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3802518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 3803518bcf38Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3804518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3805518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 3806518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3807518bcf38Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3808518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 3809518bcf38Smrg runpath_var='LD_RUN_PATH' 3810518bcf38Smrg 3811518bcf38Smrg case $cc_basename in 3812518bcf38Smrg CC*) 3813518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3814518bcf38Smrg _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' 3815f55e6a01Smrg ;; 3816f55e6a01Smrg *) 3817518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3818518bcf38Smrg _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' 3819f55e6a01Smrg ;; 3820518bcf38Smrg esac 3821518bcf38Smrg ;; 3822518bcf38Smrg tandem*) 3823518bcf38Smrg case $cc_basename in 3824518bcf38Smrg NCC*) 3825518bcf38Smrg # NonStop-UX NCC 3.20 3826518bcf38Smrg # FIXME: insert proper C++ library support 3827518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3828f55e6a01Smrg ;; 3829f55e6a01Smrg *) 3830518bcf38Smrg # FIXME: insert proper C++ library support 3831518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3832f55e6a01Smrg ;; 3833518bcf38Smrg esac 3834518bcf38Smrg ;; 3835518bcf38Smrg vxworks*) 3836518bcf38Smrg # FIXME: insert proper C++ library support 3837518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3838518bcf38Smrg ;; 3839518bcf38Smrg *) 3840518bcf38Smrg # FIXME: insert proper C++ library support 3841518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3842518bcf38Smrg ;; 3843518bcf38Smrgesac 3844518bcf38SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 3845518bcf38Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 3846c35d236eSmrg 3847518bcf38Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 3848518bcf38Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 38494f6cd06fSmrg 3850518bcf38SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 3851518bcf38SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 3852518bcf38SmrgAC_LIBTOOL_PROG_CC_C_O($1) 3853518bcf38SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3854518bcf38SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 3855518bcf38SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3856518bcf38SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 38574f6cd06fSmrg 3858518bcf38SmrgAC_LIBTOOL_CONFIG($1) 3859c35d236eSmrg 3860518bcf38SmrgAC_LANG_POP 3861518bcf38SmrgCC=$lt_save_CC 3862518bcf38SmrgLDCXX=$LD 3863518bcf38SmrgLD=$lt_save_LD 3864518bcf38SmrgGCC=$lt_save_GCC 3865518bcf38Smrgwith_gnu_ldcxx=$with_gnu_ld 3866518bcf38Smrgwith_gnu_ld=$lt_save_with_gnu_ld 3867518bcf38Smrglt_cv_path_LDCXX=$lt_cv_path_LD 3868518bcf38Smrglt_cv_path_LD=$lt_save_path_LD 3869518bcf38Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 3870518bcf38Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 3871518bcf38Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 3872518bcf38Smrg 3873518bcf38Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 3874518bcf38Smrg# ------------------------------------ 3875518bcf38Smrg# Figure out "hidden" library dependencies from verbose 3876518bcf38Smrg# compiler output when linking a shared library. 3877518bcf38Smrg# Parse the compiler output and extract the necessary 3878518bcf38Smrg# objects, libraries and library flags. 3879518bcf38SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 3880518bcf38Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 3881518bcf38Smrgdnl we can't use the lt_simple_compile_test_code here, 3882518bcf38Smrgdnl because it contains code intended for an executable, 3883518bcf38Smrgdnl not a library. It's possible we should let each 3884518bcf38Smrgdnl tag define a new lt_????_link_test_code variable, 3885518bcf38Smrgdnl but it's only used here... 3886518bcf38Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 3887518bcf38Smrgint a; 3888518bcf38Smrgvoid foo (void) { a = 0; } 3889518bcf38SmrgEOF 3890518bcf38Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 3891518bcf38Smrgclass Foo 3892518bcf38Smrg{ 3893518bcf38Smrgpublic: 3894518bcf38Smrg Foo (void) { a = 0; } 3895518bcf38Smrgprivate: 3896518bcf38Smrg int a; 3897518bcf38Smrg}; 3898518bcf38SmrgEOF 3899518bcf38Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 3900518bcf38Smrg subroutine foo 3901518bcf38Smrg implicit none 3902518bcf38Smrg integer*4 a 3903518bcf38Smrg a=0 3904518bcf38Smrg return 3905518bcf38Smrg end 3906518bcf38SmrgEOF 3907518bcf38Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 3908518bcf38Smrgpublic class foo { 3909518bcf38Smrg private int a; 3910518bcf38Smrg public void bar (void) { 3911518bcf38Smrg a = 0; 3912518bcf38Smrg } 3913518bcf38Smrg}; 3914518bcf38SmrgEOF 3915518bcf38Smrg]) 3916518bcf38Smrgdnl Parse the compiler output and extract the necessary 3917518bcf38Smrgdnl objects, libraries and library flags. 3918518bcf38Smrgif AC_TRY_EVAL(ac_compile); then 3919518bcf38Smrg # Parse the compiler output and extract the necessary 3920518bcf38Smrg # objects, libraries and library flags. 3921c35d236eSmrg 3922518bcf38Smrg # Sentinel used to keep track of whether or not we are before 3923518bcf38Smrg # the conftest object file. 3924518bcf38Smrg pre_test_object_deps_done=no 3925c35d236eSmrg 3926518bcf38Smrg # The `*' in the case matches for architectures that use `case' in 3927518bcf38Smrg # $output_verbose_cmd can trigger glob expansion during the loop 3928518bcf38Smrg # eval without this substitution. 3929518bcf38Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 3930c35d236eSmrg 3931518bcf38Smrg for p in `eval $output_verbose_link_cmd`; do 3932518bcf38Smrg case $p in 3933c35d236eSmrg 3934518bcf38Smrg -L* | -R* | -l*) 3935518bcf38Smrg # Some compilers place space between "-{L,R}" and the path. 3936518bcf38Smrg # Remove the space. 3937518bcf38Smrg if test $p = "-L" \ 3938518bcf38Smrg || test $p = "-R"; then 3939518bcf38Smrg prev=$p 3940518bcf38Smrg continue 3941518bcf38Smrg else 3942518bcf38Smrg prev= 3943518bcf38Smrg fi 3944c35d236eSmrg 3945518bcf38Smrg if test "$pre_test_object_deps_done" = no; then 3946518bcf38Smrg case $p in 3947518bcf38Smrg -L* | -R*) 3948518bcf38Smrg # Internal compiler library paths should come after those 3949518bcf38Smrg # provided the user. The postdeps already come after the 3950518bcf38Smrg # user supplied libs so there is no need to process them. 3951518bcf38Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 3952518bcf38Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 3953518bcf38Smrg else 3954518bcf38Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 3955518bcf38Smrg fi 3956518bcf38Smrg ;; 3957518bcf38Smrg # The "-l" case would never come before the object being 3958518bcf38Smrg # linked, so don't bother handling this case. 3959518bcf38Smrg esac 3960518bcf38Smrg else 3961518bcf38Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 3962518bcf38Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 3963518bcf38Smrg else 3964518bcf38Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 3965518bcf38Smrg fi 3966518bcf38Smrg fi 3967518bcf38Smrg ;; 3968c35d236eSmrg 3969518bcf38Smrg *.$objext) 3970518bcf38Smrg # This assumes that the test object file only shows up 3971518bcf38Smrg # once in the compiler output. 3972518bcf38Smrg if test "$p" = "conftest.$objext"; then 3973518bcf38Smrg pre_test_object_deps_done=yes 3974518bcf38Smrg continue 3975518bcf38Smrg fi 3976c35d236eSmrg 3977518bcf38Smrg if test "$pre_test_object_deps_done" = no; then 3978518bcf38Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 3979518bcf38Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 3980518bcf38Smrg else 3981518bcf38Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 3982518bcf38Smrg fi 3983518bcf38Smrg else 3984518bcf38Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 3985518bcf38Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 3986518bcf38Smrg else 3987518bcf38Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 3988518bcf38Smrg fi 3989518bcf38Smrg fi 3990518bcf38Smrg ;; 3991518bcf38Smrg 3992518bcf38Smrg *) ;; # Ignore the rest. 3993c35d236eSmrg 3994f55e6a01Smrg esac 3995518bcf38Smrg done 3996c35d236eSmrg 3997518bcf38Smrg # Clean up. 3998518bcf38Smrg rm -f a.out a.exe 3999518bcf38Smrgelse 4000518bcf38Smrg echo "libtool.m4: error: problem compiling $1 test program" 4001f55e6a01Smrgfi 4002c35d236eSmrg 4003518bcf38Smrg$rm -f confest.$objext 4004c35d236eSmrg 4005518bcf38Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 4006518bcf38Smrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 4007518bcf38Smrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 4008518bcf38Smrgfi 4009c35d236eSmrg 4010518bcf38Smrg# PORTME: override above test on systems where it is broken 4011518bcf38Smrgifelse([$1],[CXX], 4012518bcf38Smrg[case $host_os in 4013518bcf38Smrginterix[[3-9]]*) 4014518bcf38Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 4015518bcf38Smrg # hack all around it, let's just trust "g++" to DTRT. 4016518bcf38Smrg _LT_AC_TAGVAR(predep_objects,$1)= 4017518bcf38Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 4018518bcf38Smrg _LT_AC_TAGVAR(postdeps,$1)= 4019518bcf38Smrg ;; 4020518bcf38Smrg 4021518bcf38Smrglinux*) 4022518bcf38Smrg case `$CC -V 2>&1 | sed 5q` in 4023518bcf38Smrg *Sun\ C*) 4024518bcf38Smrg # Sun C++ 5.9 4025518bcf38Smrg # 4026518bcf38Smrg # The more standards-conforming stlport4 library is 4027518bcf38Smrg # incompatible with the Cstd library. Avoid specifying 4028518bcf38Smrg # it if it's in CXXFLAGS. Ignore libCrun as 4029518bcf38Smrg # -library=stlport4 depends on it. 4030518bcf38Smrg case " $CXX $CXXFLAGS " in 4031518bcf38Smrg *" -library=stlport4 "*) 4032518bcf38Smrg solaris_use_stlport4=yes 4033518bcf38Smrg ;; 4034518bcf38Smrg esac 4035518bcf38Smrg if test "$solaris_use_stlport4" != yes; then 4036518bcf38Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 4037f55e6a01Smrg fi 4038f55e6a01Smrg ;; 4039f55e6a01Smrg esac 4040518bcf38Smrg ;; 4041c35d236eSmrg 4042518bcf38Smrgsolaris*) 4043518bcf38Smrg case $cc_basename in 4044518bcf38Smrg CC*) 4045518bcf38Smrg # The more standards-conforming stlport4 library is 4046518bcf38Smrg # incompatible with the Cstd library. Avoid specifying 4047518bcf38Smrg # it if it's in CXXFLAGS. Ignore libCrun as 4048518bcf38Smrg # -library=stlport4 depends on it. 4049518bcf38Smrg case " $CXX $CXXFLAGS " in 4050518bcf38Smrg *" -library=stlport4 "*) 4051518bcf38Smrg solaris_use_stlport4=yes 4052518bcf38Smrg ;; 4053518bcf38Smrg esac 4054518bcf38Smrg 4055518bcf38Smrg # Adding this requires a known-good setup of shared libraries for 4056518bcf38Smrg # Sun compiler versions before 5.6, else PIC objects from an old 4057518bcf38Smrg # archive will be linked into the output, leading to subtle bugs. 4058518bcf38Smrg if test "$solaris_use_stlport4" != yes; then 4059518bcf38Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 4060f55e6a01Smrg fi 4061f55e6a01Smrg ;; 4062f55e6a01Smrg esac 4063518bcf38Smrg ;; 4064518bcf38Smrgesac 4065518bcf38Smrg]) 4066518bcf38Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 4067518bcf38Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 4068518bcf38Smrgesac 4069518bcf38Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 4070c35d236eSmrg 4071518bcf38Smrg# AC_LIBTOOL_LANG_F77_CONFIG 4072518bcf38Smrg# -------------------------- 4073518bcf38Smrg# Ensure that the configuration vars for the C compiler are 4074518bcf38Smrg# suitably defined. Those variables are subsequently used by 4075518bcf38Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4076518bcf38SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 4077518bcf38SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 4078518bcf38Smrg[AC_REQUIRE([AC_PROG_F77]) 4079518bcf38SmrgAC_LANG_PUSH(Fortran 77) 4080c35d236eSmrg 4081518bcf38Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4082518bcf38Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4083518bcf38Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 4084518bcf38Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4085518bcf38Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4086518bcf38Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 4087518bcf38Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4088518bcf38Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4089518bcf38Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4090518bcf38Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4091518bcf38Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4092518bcf38Smrg_LT_AC_TAGVAR(module_cmds, $1)= 4093518bcf38Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4094518bcf38Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4095518bcf38Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4096518bcf38Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 4097518bcf38Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4098518bcf38Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4099c35d236eSmrg 4100518bcf38Smrg# Source file extension for f77 test sources. 4101518bcf38Smrgac_ext=f 4102c35d236eSmrg 4103518bcf38Smrg# Object file extension for compiled f77 test sources. 4104518bcf38Smrgobjext=o 4105518bcf38Smrg_LT_AC_TAGVAR(objext, $1)=$objext 4106c35d236eSmrg 4107518bcf38Smrg# Code to be used in simple compile tests 4108518bcf38Smrglt_simple_compile_test_code="\ 4109518bcf38Smrg subroutine t 4110518bcf38Smrg return 4111518bcf38Smrg end 4112518bcf38Smrg" 4113c35d236eSmrg 4114518bcf38Smrg# Code to be used in simple link tests 4115518bcf38Smrglt_simple_link_test_code="\ 4116518bcf38Smrg program t 4117518bcf38Smrg end 4118518bcf38Smrg" 4119c35d236eSmrg 4120518bcf38Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4121518bcf38Smrg_LT_AC_SYS_COMPILER 4122c35d236eSmrg 4123518bcf38Smrg# save warnings/boilerplate of simple test code 4124518bcf38Smrg_LT_COMPILER_BOILERPLATE 4125518bcf38Smrg_LT_LINKER_BOILERPLATE 4126c35d236eSmrg 4127518bcf38Smrg# Allow CC to be a program name with arguments. 4128518bcf38Smrglt_save_CC="$CC" 4129518bcf38SmrgCC=${F77-"f77"} 4130518bcf38Smrgcompiler=$CC 4131518bcf38Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 4132518bcf38Smrg_LT_CC_BASENAME([$compiler]) 4133c35d236eSmrg 4134518bcf38SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 4135518bcf38SmrgAC_MSG_RESULT([$can_build_shared]) 4136c35d236eSmrg 4137518bcf38SmrgAC_MSG_CHECKING([whether to build shared libraries]) 4138518bcf38Smrgtest "$can_build_shared" = "no" && enable_shared=no 4139c35d236eSmrg 4140518bcf38Smrg# On AIX, shared libraries and static libraries use the same namespace, and 4141518bcf38Smrg# are all built from PIC. 4142518bcf38Smrgcase $host_os in 4143518bcf38Smrgaix3*) 4144518bcf38Smrg test "$enable_shared" = yes && enable_static=no 4145518bcf38Smrg if test -n "$RANLIB"; then 4146518bcf38Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 4147518bcf38Smrg postinstall_cmds='$RANLIB $lib' 4148518bcf38Smrg fi 4149518bcf38Smrg ;; 4150518bcf38Smrgaix[[4-9]]*) 4151518bcf38Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 4152518bcf38Smrg test "$enable_shared" = yes && enable_static=no 4153518bcf38Smrg fi 4154518bcf38Smrg ;; 4155518bcf38Smrgesac 4156518bcf38SmrgAC_MSG_RESULT([$enable_shared]) 4157c35d236eSmrg 4158518bcf38SmrgAC_MSG_CHECKING([whether to build static libraries]) 4159518bcf38Smrg# Make sure either enable_shared or enable_static is yes. 4160518bcf38Smrgtest "$enable_shared" = yes || enable_static=yes 4161518bcf38SmrgAC_MSG_RESULT([$enable_static]) 4162c35d236eSmrg 4163518bcf38Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 4164518bcf38Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 4165c35d236eSmrg 4166518bcf38SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4167518bcf38SmrgAC_LIBTOOL_PROG_CC_C_O($1) 4168518bcf38SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4169518bcf38SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4170518bcf38SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4171518bcf38SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4172c35d236eSmrg 4173518bcf38SmrgAC_LIBTOOL_CONFIG($1) 4174c35d236eSmrg 4175518bcf38SmrgAC_LANG_POP 4176518bcf38SmrgCC="$lt_save_CC" 4177518bcf38Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 4178c35d236eSmrg 4179c35d236eSmrg 4180518bcf38Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 4181518bcf38Smrg# -------------------------- 4182518bcf38Smrg# Ensure that the configuration vars for the C compiler are 4183518bcf38Smrg# suitably defined. Those variables are subsequently used by 4184518bcf38Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4185518bcf38SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 4186518bcf38SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 4187518bcf38Smrg[AC_LANG_SAVE 4188c35d236eSmrg 4189518bcf38Smrg# Source file extension for Java test sources. 4190518bcf38Smrgac_ext=java 4191f55e6a01Smrg 4192518bcf38Smrg# Object file extension for compiled Java test sources. 4193518bcf38Smrgobjext=o 4194518bcf38Smrg_LT_AC_TAGVAR(objext, $1)=$objext 4195c35d236eSmrg 4196518bcf38Smrg# Code to be used in simple compile tests 4197518bcf38Smrglt_simple_compile_test_code="class foo {}" 4198c35d236eSmrg 4199518bcf38Smrg# Code to be used in simple link tests 4200518bcf38Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 4201c35d236eSmrg 4202518bcf38Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4203518bcf38Smrg_LT_AC_SYS_COMPILER 4204c35d236eSmrg 4205518bcf38Smrg# save warnings/boilerplate of simple test code 4206518bcf38Smrg_LT_COMPILER_BOILERPLATE 4207518bcf38Smrg_LT_LINKER_BOILERPLATE 4208c35d236eSmrg 4209518bcf38Smrg# Allow CC to be a program name with arguments. 4210518bcf38Smrglt_save_CC="$CC" 4211518bcf38SmrgCC=${GCJ-"gcj"} 4212518bcf38Smrgcompiler=$CC 4213518bcf38Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 4214518bcf38Smrg_LT_CC_BASENAME([$compiler]) 4215c35d236eSmrg 4216518bcf38Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 4217518bcf38Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4218c35d236eSmrg 4219518bcf38Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4220c35d236eSmrg 4221518bcf38SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4222518bcf38SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4223518bcf38SmrgAC_LIBTOOL_PROG_CC_C_O($1) 4224518bcf38SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4225518bcf38SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4226518bcf38SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4227518bcf38SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4228c35d236eSmrg 4229518bcf38SmrgAC_LIBTOOL_CONFIG($1) 4230c35d236eSmrg 4231518bcf38SmrgAC_LANG_RESTORE 4232518bcf38SmrgCC="$lt_save_CC" 4233518bcf38Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 4234c35d236eSmrg 4235c35d236eSmrg 4236518bcf38Smrg# AC_LIBTOOL_LANG_RC_CONFIG 4237518bcf38Smrg# ------------------------- 4238518bcf38Smrg# Ensure that the configuration vars for the Windows resource compiler are 4239518bcf38Smrg# suitably defined. Those variables are subsequently used by 4240518bcf38Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4241518bcf38SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 4242518bcf38SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 4243518bcf38Smrg[AC_LANG_SAVE 4244c35d236eSmrg 4245518bcf38Smrg# Source file extension for RC test sources. 4246518bcf38Smrgac_ext=rc 4247c35d236eSmrg 4248518bcf38Smrg# Object file extension for compiled RC test sources. 4249518bcf38Smrgobjext=o 4250518bcf38Smrg_LT_AC_TAGVAR(objext, $1)=$objext 4251c35d236eSmrg 4252518bcf38Smrg# Code to be used in simple compile tests 4253518bcf38Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 4254c35d236eSmrg 4255518bcf38Smrg# Code to be used in simple link tests 4256518bcf38Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 4257c35d236eSmrg 4258518bcf38Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4259518bcf38Smrg_LT_AC_SYS_COMPILER 4260c35d236eSmrg 4261518bcf38Smrg# save warnings/boilerplate of simple test code 4262518bcf38Smrg_LT_COMPILER_BOILERPLATE 4263518bcf38Smrg_LT_LINKER_BOILERPLATE 4264c35d236eSmrg 4265518bcf38Smrg# Allow CC to be a program name with arguments. 4266518bcf38Smrglt_save_CC="$CC" 4267518bcf38SmrgCC=${RC-"windres"} 4268518bcf38Smrgcompiler=$CC 4269518bcf38Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 4270518bcf38Smrg_LT_CC_BASENAME([$compiler]) 4271518bcf38Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4272c35d236eSmrg 4273518bcf38SmrgAC_LIBTOOL_CONFIG($1) 4274c35d236eSmrg 4275518bcf38SmrgAC_LANG_RESTORE 4276518bcf38SmrgCC="$lt_save_CC" 4277518bcf38Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 4278c35d236eSmrg 4279c35d236eSmrg 4280518bcf38Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 4281518bcf38Smrg# ---------------------------- 4282518bcf38Smrg# If TAGNAME is not passed, then create an initial libtool script 4283518bcf38Smrg# with a default configuration from the untagged config vars. Otherwise 4284518bcf38Smrg# add code to config.status for appending the configuration named by 4285518bcf38Smrg# TAGNAME from the matching tagged config vars. 4286518bcf38SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 4287518bcf38Smrg[# The else clause should only fire when bootstrapping the 4288518bcf38Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 4289518bcf38Smrg# with your package, and you will get complaints that there are 4290518bcf38Smrg# no rules to generate ltmain.sh. 4291518bcf38Smrgif test -f "$ltmain"; then 4292518bcf38Smrg # See if we are running on zsh, and set the options which allow our commands through 4293518bcf38Smrg # without removal of \ escapes. 4294518bcf38Smrg if test -n "${ZSH_VERSION+set}" ; then 4295518bcf38Smrg setopt NO_GLOB_SUBST 4296518bcf38Smrg fi 4297518bcf38Smrg # Now quote all the things that may contain metacharacters while being 4298518bcf38Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 4299518bcf38Smrg # variables and quote the copies for generation of the libtool script. 4300518bcf38Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 4301518bcf38Smrg SED SHELL STRIP \ 4302518bcf38Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 4303518bcf38Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 4304518bcf38Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 4305518bcf38Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 4306518bcf38Smrg lt_cv_sys_global_symbol_to_c_name_address \ 4307518bcf38Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4308518bcf38Smrg old_postinstall_cmds old_postuninstall_cmds \ 4309518bcf38Smrg _LT_AC_TAGVAR(compiler, $1) \ 4310518bcf38Smrg _LT_AC_TAGVAR(CC, $1) \ 4311518bcf38Smrg _LT_AC_TAGVAR(LD, $1) \ 4312518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4313518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4314518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4315518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4316518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4317518bcf38Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4318518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4319518bcf38Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4320518bcf38Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4321518bcf38Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4322518bcf38Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 4323518bcf38Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 4324518bcf38Smrg _LT_AC_TAGVAR(predeps, $1) \ 4325518bcf38Smrg _LT_AC_TAGVAR(postdeps, $1) \ 4326518bcf38Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4327518bcf38Smrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 4328518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 4329518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4330518bcf38Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4331518bcf38Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4332518bcf38Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 4333518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 4334518bcf38Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 4335518bcf38Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 4336518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 4337518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 4338518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 4339518bcf38Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 4340518bcf38Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 4341518bcf38Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 4342518bcf38Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 4343518bcf38Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 4344518bcf38Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 4345518bcf38Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 4346518bcf38Smrg 4347518bcf38Smrg case $var in 4348518bcf38Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 4349518bcf38Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 4350518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 4351518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 4352518bcf38Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 4353518bcf38Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 4354518bcf38Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 4355518bcf38Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 4356518bcf38Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 4357518bcf38Smrg postinstall_cmds | postuninstall_cmds | \ 4358518bcf38Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 4359518bcf38Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 4360518bcf38Smrg # Double-quote double-evaled strings. 4361518bcf38Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 4362f55e6a01Smrg ;; 4363518bcf38Smrg *) 4364518bcf38Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 4365f55e6a01Smrg ;; 4366518bcf38Smrg esac 4367518bcf38Smrg done 4368c35d236eSmrg 4369518bcf38Smrg case $lt_echo in 4370518bcf38Smrg *'\[$]0 --fallback-echo"') 4371518bcf38Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 4372518bcf38Smrg ;; 4373518bcf38Smrg esac 4374c35d236eSmrg 4375518bcf38Smrgifelse([$1], [], 4376518bcf38Smrg [cfgfile="${ofile}T" 4377518bcf38Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 4378518bcf38Smrg $rm -f "$cfgfile" 4379518bcf38Smrg AC_MSG_NOTICE([creating $ofile])], 4380518bcf38Smrg [cfgfile="$ofile"]) 4381c35d236eSmrg 4382518bcf38Smrg cat <<__EOF__ >> "$cfgfile" 4383518bcf38Smrgifelse([$1], [], 4384518bcf38Smrg[#! $SHELL 4385c35d236eSmrg 4386518bcf38Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 4387518bcf38Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 4388518bcf38Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4389518bcf38Smrg# 4390518bcf38Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 4391518bcf38Smrg# Free Software Foundation, Inc. 4392518bcf38Smrg# 4393518bcf38Smrg# This file is part of GNU Libtool: 4394518bcf38Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4395518bcf38Smrg# 4396518bcf38Smrg# This program is free software; you can redistribute it and/or modify 4397518bcf38Smrg# it under the terms of the GNU General Public License as published by 4398518bcf38Smrg# the Free Software Foundation; either version 2 of the License, or 4399518bcf38Smrg# (at your option) any later version. 4400518bcf38Smrg# 4401518bcf38Smrg# This program is distributed in the hope that it will be useful, but 4402518bcf38Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 4403518bcf38Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4404518bcf38Smrg# General Public License for more details. 4405518bcf38Smrg# 4406518bcf38Smrg# You should have received a copy of the GNU General Public License 4407518bcf38Smrg# along with this program; if not, write to the Free Software 4408518bcf38Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 4409518bcf38Smrg# 4410518bcf38Smrg# As a special exception to the GNU General Public License, if you 4411518bcf38Smrg# distribute this file as part of a program that contains a 4412518bcf38Smrg# configuration script generated by Autoconf, you may include it under 4413518bcf38Smrg# the same distribution terms that you use for the rest of that program. 4414c35d236eSmrg 4415518bcf38Smrg# A sed program that does not truncate output. 4416518bcf38SmrgSED=$lt_SED 4417c35d236eSmrg 4418518bcf38Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 4419518bcf38SmrgXsed="$SED -e 1s/^X//" 4420c35d236eSmrg 4421518bcf38Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 4422518bcf38Smrg# if CDPATH is set. 4423518bcf38Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4424c35d236eSmrg 4425518bcf38Smrg# The names of the tagged configurations supported by this script. 4426518bcf38Smrgavailable_tags= 4427c35d236eSmrg 4428518bcf38Smrg# ### BEGIN LIBTOOL CONFIG], 4429518bcf38Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 4430c35d236eSmrg 4431518bcf38Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4432c35d236eSmrg 4433518bcf38Smrg# Shell to use when invoking shell scripts. 4434518bcf38SmrgSHELL=$lt_SHELL 4435c35d236eSmrg 4436518bcf38Smrg# Whether or not to build shared libraries. 4437518bcf38Smrgbuild_libtool_libs=$enable_shared 4438c35d236eSmrg 4439518bcf38Smrg# Whether or not to build static libraries. 4440518bcf38Smrgbuild_old_libs=$enable_static 4441c35d236eSmrg 4442518bcf38Smrg# Whether or not to add -lc for building shared libraries. 4443518bcf38Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 4444c35d236eSmrg 4445518bcf38Smrg# Whether or not to disallow shared libs when runtime libs are static 4446518bcf38Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 4447c35d236eSmrg 4448518bcf38Smrg# Whether or not to optimize for fast installation. 4449518bcf38Smrgfast_install=$enable_fast_install 4450c35d236eSmrg 4451518bcf38Smrg# The host system. 4452518bcf38Smrghost_alias=$host_alias 4453518bcf38Smrghost=$host 4454518bcf38Smrghost_os=$host_os 4455c35d236eSmrg 4456518bcf38Smrg# The build system. 4457518bcf38Smrgbuild_alias=$build_alias 4458518bcf38Smrgbuild=$build 4459518bcf38Smrgbuild_os=$build_os 4460c35d236eSmrg 4461518bcf38Smrg# An echo program that does not interpret backslashes. 4462518bcf38Smrgecho=$lt_echo 4463c35d236eSmrg 4464518bcf38Smrg# The archiver. 4465518bcf38SmrgAR=$lt_AR 4466518bcf38SmrgAR_FLAGS=$lt_AR_FLAGS 4467c35d236eSmrg 4468518bcf38Smrg# A C compiler. 4469518bcf38SmrgLTCC=$lt_LTCC 4470c35d236eSmrg 4471518bcf38Smrg# LTCC compiler flags. 4472518bcf38SmrgLTCFLAGS=$lt_LTCFLAGS 4473c35d236eSmrg 4474518bcf38Smrg# A language-specific compiler. 4475518bcf38SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 4476c35d236eSmrg 4477518bcf38Smrg# Is the compiler the GNU C compiler? 4478518bcf38Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 4479c35d236eSmrg 4480518bcf38Smrg# An ERE matcher. 4481518bcf38SmrgEGREP=$lt_EGREP 4482c35d236eSmrg 4483518bcf38Smrg# The linker used to build libraries. 4484518bcf38SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 4485c35d236eSmrg 4486518bcf38Smrg# Whether we need hard or soft links. 4487518bcf38SmrgLN_S=$lt_LN_S 4488c35d236eSmrg 4489518bcf38Smrg# A BSD-compatible nm program. 4490518bcf38SmrgNM=$lt_NM 4491c35d236eSmrg 4492518bcf38Smrg# A symbol stripping program 4493518bcf38SmrgSTRIP=$lt_STRIP 4494c35d236eSmrg 4495518bcf38Smrg# Used to examine libraries when file_magic_cmd begins "file" 4496518bcf38SmrgMAGIC_CMD=$MAGIC_CMD 4497c35d236eSmrg 4498518bcf38Smrg# Used on cygwin: DLL creation program. 4499518bcf38SmrgDLLTOOL="$DLLTOOL" 4500c35d236eSmrg 4501518bcf38Smrg# Used on cygwin: object dumper. 4502518bcf38SmrgOBJDUMP="$OBJDUMP" 4503c35d236eSmrg 4504518bcf38Smrg# Used on cygwin: assembler. 4505518bcf38SmrgAS="$AS" 4506c35d236eSmrg 4507518bcf38Smrg# The name of the directory that contains temporary libtool files. 4508518bcf38Smrgobjdir=$objdir 4509c35d236eSmrg 4510518bcf38Smrg# How to create reloadable object files. 4511518bcf38Smrgreload_flag=$lt_reload_flag 4512518bcf38Smrgreload_cmds=$lt_reload_cmds 4513c35d236eSmrg 4514518bcf38Smrg# How to pass a linker flag through the compiler. 4515518bcf38Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 4516c35d236eSmrg 4517518bcf38Smrg# Object file suffix (normally "o"). 4518518bcf38Smrgobjext="$ac_objext" 4519c35d236eSmrg 4520518bcf38Smrg# Old archive suffix (normally "a"). 4521518bcf38Smrglibext="$libext" 4522c35d236eSmrg 4523518bcf38Smrg# Shared library suffix (normally ".so"). 4524518bcf38Smrgshrext_cmds='$shrext_cmds' 45254f6cd06fSmrg 4526518bcf38Smrg# Executable file suffix (normally ""). 4527518bcf38Smrgexeext="$exeext" 4528c35d236eSmrg 4529518bcf38Smrg# Additional compiler flags for building library objects. 4530518bcf38Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 4531518bcf38Smrgpic_mode=$pic_mode 4532c35d236eSmrg 4533518bcf38Smrg# What is the maximum length of a command? 4534518bcf38Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 4535c35d236eSmrg 4536518bcf38Smrg# Does compiler simultaneously support -c and -o options? 4537518bcf38Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 4538c35d236eSmrg 4539518bcf38Smrg# Must we lock files when doing compilation? 4540518bcf38Smrgneed_locks=$lt_need_locks 4541c35d236eSmrg 4542518bcf38Smrg# Do we need the lib prefix for modules? 4543518bcf38Smrgneed_lib_prefix=$need_lib_prefix 4544c35d236eSmrg 4545518bcf38Smrg# Do we need a version for libraries? 4546518bcf38Smrgneed_version=$need_version 4547c35d236eSmrg 4548518bcf38Smrg# Whether dlopen is supported. 4549518bcf38Smrgdlopen_support=$enable_dlopen 4550c35d236eSmrg 4551518bcf38Smrg# Whether dlopen of programs is supported. 4552518bcf38Smrgdlopen_self=$enable_dlopen_self 4553c35d236eSmrg 4554518bcf38Smrg# Whether dlopen of statically linked programs is supported. 4555518bcf38Smrgdlopen_self_static=$enable_dlopen_self_static 4556c35d236eSmrg 4557518bcf38Smrg# Compiler flag to prevent dynamic linking. 4558518bcf38Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 4559c35d236eSmrg 4560518bcf38Smrg# Compiler flag to turn off builtin functions. 4561518bcf38Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 4562c35d236eSmrg 4563518bcf38Smrg# Compiler flag to allow reflexive dlopens. 4564518bcf38Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 4565c35d236eSmrg 4566518bcf38Smrg# Compiler flag to generate shared objects directly from archives. 4567518bcf38Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 4568c35d236eSmrg 4569518bcf38Smrg# Compiler flag to generate thread-safe objects. 4570518bcf38Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 4571c35d236eSmrg 4572518bcf38Smrg# Library versioning type. 4573518bcf38Smrgversion_type=$version_type 4574c35d236eSmrg 4575518bcf38Smrg# Format of library name prefix. 4576518bcf38Smrglibname_spec=$lt_libname_spec 4577c35d236eSmrg 4578518bcf38Smrg# List of archive names. First name is the real one, the rest are links. 4579518bcf38Smrg# The last name is the one that the linker finds with -lNAME. 4580518bcf38Smrglibrary_names_spec=$lt_library_names_spec 4581c35d236eSmrg 4582518bcf38Smrg# The coded name of the library, if different from the real name. 4583518bcf38Smrgsoname_spec=$lt_soname_spec 4584c35d236eSmrg 4585518bcf38Smrg# Commands used to build and install an old-style archive. 4586518bcf38SmrgRANLIB=$lt_RANLIB 4587518bcf38Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 4588518bcf38Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 4589518bcf38Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 4590c35d236eSmrg 4591518bcf38Smrg# Create an old-style archive from a shared archive. 4592518bcf38Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 4593c35d236eSmrg 4594518bcf38Smrg# Create a temporary old-style archive to link instead of a shared archive. 4595518bcf38Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 4596c35d236eSmrg 4597518bcf38Smrg# Commands used to build and install a shared archive. 4598518bcf38Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 4599518bcf38Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 4600518bcf38Smrgpostinstall_cmds=$lt_postinstall_cmds 4601518bcf38Smrgpostuninstall_cmds=$lt_postuninstall_cmds 4602c35d236eSmrg 4603518bcf38Smrg# Commands used to build a loadable module (assumed same as above if empty) 4604518bcf38Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 4605518bcf38Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 4606c35d236eSmrg 4607518bcf38Smrg# Commands to strip libraries. 4608518bcf38Smrgold_striplib=$lt_old_striplib 4609518bcf38Smrgstriplib=$lt_striplib 4610c35d236eSmrg 4611518bcf38Smrg# Dependencies to place before the objects being linked to create a 4612518bcf38Smrg# shared library. 4613518bcf38Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 4614c35d236eSmrg 4615518bcf38Smrg# Dependencies to place after the objects being linked to create a 4616518bcf38Smrg# shared library. 4617518bcf38Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 4618c35d236eSmrg 4619518bcf38Smrg# Dependencies to place before the objects being linked to create a 4620518bcf38Smrg# shared library. 4621518bcf38Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 4622c35d236eSmrg 4623518bcf38Smrg# Dependencies to place after the objects being linked to create a 4624518bcf38Smrg# shared library. 4625518bcf38Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 4626c35d236eSmrg 4627518bcf38Smrg# The directories searched by this compiler when creating a shared 4628518bcf38Smrg# library 4629518bcf38Smrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 4630c35d236eSmrg 4631518bcf38Smrg# The library search path used internally by the compiler when linking 4632518bcf38Smrg# a shared library. 4633518bcf38Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 4634c35d236eSmrg 4635518bcf38Smrg# Method to check whether dependent libraries are shared objects. 4636518bcf38Smrgdeplibs_check_method=$lt_deplibs_check_method 4637c35d236eSmrg 4638518bcf38Smrg# Command to use when deplibs_check_method == file_magic. 4639518bcf38Smrgfile_magic_cmd=$lt_file_magic_cmd 4640c35d236eSmrg 4641518bcf38Smrg# Flag that allows shared libraries with undefined symbols to be built. 4642518bcf38Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 4643c35d236eSmrg 4644518bcf38Smrg# Flag that forces no undefined symbols. 4645518bcf38Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 4646c35d236eSmrg 4647518bcf38Smrg# Commands used to finish a libtool library installation in a directory. 4648518bcf38Smrgfinish_cmds=$lt_finish_cmds 4649c35d236eSmrg 4650518bcf38Smrg# Same as above, but a single script fragment to be evaled but not shown. 4651518bcf38Smrgfinish_eval=$lt_finish_eval 4652c35d236eSmrg 4653518bcf38Smrg# Take the output of nm and produce a listing of raw symbols and C names. 4654518bcf38Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 4655c35d236eSmrg 4656518bcf38Smrg# Transform the output of nm in a proper C declaration 4657518bcf38Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 4658c35d236eSmrg 4659518bcf38Smrg# Transform the output of nm in a C name address pair 4660518bcf38Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 4661c35d236eSmrg 4662518bcf38Smrg# This is the shared library runtime path variable. 4663518bcf38Smrgrunpath_var=$runpath_var 4664c35d236eSmrg 4665518bcf38Smrg# This is the shared library path variable. 4666518bcf38Smrgshlibpath_var=$shlibpath_var 4667c35d236eSmrg 4668518bcf38Smrg# Is shlibpath searched before the hard-coded library search path? 4669518bcf38Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 4670c35d236eSmrg 4671518bcf38Smrg# How to hardcode a shared library path into an executable. 4672518bcf38Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 4673c35d236eSmrg 4674518bcf38Smrg# Whether we should hardcode library paths into libraries. 4675518bcf38Smrghardcode_into_libs=$hardcode_into_libs 4676c35d236eSmrg 4677518bcf38Smrg# Flag to hardcode \$libdir into a binary during linking. 4678518bcf38Smrg# This must work even if \$libdir does not exist. 4679518bcf38Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 4680c35d236eSmrg 4681518bcf38Smrg# If ld is used when linking, flag to hardcode \$libdir into 4682518bcf38Smrg# a binary during linking. This must work even if \$libdir does 4683518bcf38Smrg# not exist. 4684518bcf38Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 4685c35d236eSmrg 4686518bcf38Smrg# Whether we need a single -rpath flag with a separated argument. 4687518bcf38Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 4688c35d236eSmrg 4689518bcf38Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 4690518bcf38Smrg# resulting binary. 4691518bcf38Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 4692c35d236eSmrg 4693518bcf38Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 4694518bcf38Smrg# resulting binary. 4695518bcf38Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 4696c35d236eSmrg 4697518bcf38Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 4698518bcf38Smrg# the resulting binary. 4699518bcf38Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 4700c35d236eSmrg 4701518bcf38Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 4702518bcf38Smrg# and all subsequent libraries and executables linked against it. 4703518bcf38Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 4704c35d236eSmrg 4705518bcf38Smrg# Variables whose values should be saved in libtool wrapper scripts and 4706518bcf38Smrg# restored at relink time. 4707518bcf38Smrgvariables_saved_for_relink="$variables_saved_for_relink" 4708c35d236eSmrg 4709518bcf38Smrg# Whether libtool must link a program against all its dependency libraries. 4710518bcf38Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 4711c35d236eSmrg 4712518bcf38Smrg# Compile-time system search path for libraries 4713518bcf38Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 4714c35d236eSmrg 4715518bcf38Smrg# Run-time system search path for libraries 4716518bcf38Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 4717c35d236eSmrg 4718518bcf38Smrg# Fix the shell variable \$srcfile for the compiler. 4719518bcf38Smrgfix_srcfile_path=$lt_fix_srcfile_path 4720c35d236eSmrg 4721518bcf38Smrg# Set to yes if exported symbols are required. 4722518bcf38Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 4723c35d236eSmrg 4724518bcf38Smrg# The commands to list exported symbols. 4725518bcf38Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 4726c35d236eSmrg 4727518bcf38Smrg# The commands to extract the exported symbol list from a shared archive. 4728518bcf38Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 4729c35d236eSmrg 4730518bcf38Smrg# Symbols that should not be listed in the preloaded symbols. 4731518bcf38Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 4732f55e6a01Smrg 4733518bcf38Smrg# Symbols that must always be exported. 4734518bcf38Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 4735f55e6a01Smrg 4736518bcf38Smrgifelse([$1],[], 4737518bcf38Smrg[# ### END LIBTOOL CONFIG], 4738518bcf38Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 4739f55e6a01Smrg 4740518bcf38Smrg__EOF__ 4741f55e6a01Smrg 4742518bcf38Smrgifelse([$1],[], [ 4743518bcf38Smrg case $host_os in 4744518bcf38Smrg aix3*) 4745518bcf38Smrg cat <<\EOF >> "$cfgfile" 4746f55e6a01Smrg 4747518bcf38Smrg# AIX sometimes has problems with the GCC collect2 program. For some 4748518bcf38Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4749518bcf38Smrg# vanish in a puff of smoke. 4750518bcf38Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 4751518bcf38Smrg COLLECT_NAMES= 4752518bcf38Smrg export COLLECT_NAMES 4753518bcf38Smrgfi 4754518bcf38SmrgEOF 4755518bcf38Smrg ;; 4756518bcf38Smrg esac 4757f55e6a01Smrg 4758518bcf38Smrg # We use sed instead of cat because bash on DJGPP gets confused if 4759518bcf38Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4760518bcf38Smrg # text mode, it properly converts lines to CR/LF. This bash problem 4761518bcf38Smrg # is reportedly fixed, but why not run on old versions too? 4762518bcf38Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 4763f55e6a01Smrg 4764518bcf38Smrg mv -f "$cfgfile" "$ofile" || \ 4765518bcf38Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4766518bcf38Smrg chmod +x "$ofile" 4767518bcf38Smrg]) 4768c35d236eSmrgelse 4769518bcf38Smrg # If there is no Makefile yet, we rely on a make rule to execute 4770518bcf38Smrg # `config.status --recheck' to rerun these tests and create the 4771518bcf38Smrg # libtool script then. 4772518bcf38Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 4773518bcf38Smrg if test -f "$ltmain_in"; then 4774518bcf38Smrg test -f Makefile && make "$ltmain" 4775518bcf38Smrg fi 4776c35d236eSmrgfi 4777518bcf38Smrg])# AC_LIBTOOL_CONFIG 4778c35d236eSmrg 4779c35d236eSmrg 4780518bcf38Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 4781518bcf38Smrg# ------------------------------------------- 4782518bcf38SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 4783518bcf38Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 4784f55e6a01Smrg 4785518bcf38Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4786f55e6a01Smrg 4787518bcf38Smrgif test "$GCC" = yes; then 4788518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4789f55e6a01Smrg 4790518bcf38Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4791518bcf38Smrg lt_cv_prog_compiler_rtti_exceptions, 4792518bcf38Smrg [-fno-rtti -fno-exceptions], [], 4793518bcf38Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4794f55e6a01Smrgfi 4795518bcf38Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 4796f55e6a01Smrg 4797f55e6a01Smrg 4798518bcf38Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4799518bcf38Smrg# --------------------------------- 4800518bcf38SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 4801518bcf38Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 4802518bcf38SmrgAC_REQUIRE([LT_AC_PROG_SED]) 4803518bcf38SmrgAC_REQUIRE([AC_PROG_NM]) 4804518bcf38SmrgAC_REQUIRE([AC_OBJEXT]) 4805518bcf38Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 4806518bcf38SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4807518bcf38SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4808518bcf38Smrg[ 4809518bcf38Smrg# These are sane defaults that work on at least a few old systems. 4810518bcf38Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4811f55e6a01Smrg 4812518bcf38Smrg# Character class describing NM global symbol codes. 4813518bcf38Smrgsymcode='[[BCDEGRST]]' 4814f55e6a01Smrg 4815518bcf38Smrg# Regexp to match symbols that can be accessed directly from C. 4816518bcf38Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4817f55e6a01Smrg 4818518bcf38Smrg# Transform an extracted symbol line into a proper C declaration 4819518bcf38Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 4820f55e6a01Smrg 4821518bcf38Smrg# Transform an extracted symbol line into symbol name and symbol address 4822518bcf38Smrglt_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'" 4823f55e6a01Smrg 4824518bcf38Smrg# Define system-specific variables. 4825518bcf38Smrgcase $host_os in 4826518bcf38Smrgaix*) 4827518bcf38Smrg symcode='[[BCDT]]' 4828518bcf38Smrg ;; 4829518bcf38Smrgcygwin* | mingw* | pw32*) 4830518bcf38Smrg symcode='[[ABCDGISTW]]' 4831518bcf38Smrg ;; 4832518bcf38Smrghpux*) # Its linker distinguishes data from code symbols 4833518bcf38Smrg if test "$host_cpu" = ia64; then 4834518bcf38Smrg symcode='[[ABCDEGRST]]' 4835518bcf38Smrg fi 4836518bcf38Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4837518bcf38Smrg 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'" 4838518bcf38Smrg ;; 4839518bcf38Smrglinux* | k*bsd*-gnu) 4840518bcf38Smrg if test "$host_cpu" = ia64; then 4841518bcf38Smrg symcode='[[ABCDGIRSTW]]' 4842518bcf38Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4843518bcf38Smrg 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'" 4844518bcf38Smrg fi 4845518bcf38Smrg ;; 4846518bcf38Smrgirix* | nonstopux*) 4847518bcf38Smrg symcode='[[BCDEGRST]]' 4848518bcf38Smrg ;; 4849518bcf38Smrgosf*) 4850518bcf38Smrg symcode='[[BCDEGQRST]]' 4851518bcf38Smrg ;; 4852518bcf38Smrgsolaris*) 4853518bcf38Smrg symcode='[[BDRT]]' 4854518bcf38Smrg ;; 4855518bcf38Smrgsco3.2v5*) 4856518bcf38Smrg symcode='[[DT]]' 4857518bcf38Smrg ;; 4858518bcf38Smrgsysv4.2uw2*) 4859518bcf38Smrg symcode='[[DT]]' 4860518bcf38Smrg ;; 4861518bcf38Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 4862518bcf38Smrg symcode='[[ABDT]]' 4863518bcf38Smrg ;; 4864518bcf38Smrgsysv4) 4865518bcf38Smrg symcode='[[DFNSTU]]' 4866518bcf38Smrg ;; 4867518bcf38Smrgesac 4868f55e6a01Smrg 4869518bcf38Smrg# Handle CRLF in mingw tool chain 4870518bcf38Smrgopt_cr= 4871518bcf38Smrgcase $build_os in 4872518bcf38Smrgmingw*) 4873518bcf38Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4874518bcf38Smrg ;; 4875518bcf38Smrgesac 4876f55e6a01Smrg 4877518bcf38Smrg# If we're using GNU nm, then use its standard symbol codes. 4878518bcf38Smrgcase `$NM -V 2>&1` in 4879518bcf38Smrg*GNU* | *'with BFD'*) 4880518bcf38Smrg symcode='[[ABCDGIRSTW]]' ;; 4881518bcf38Smrgesac 4882f55e6a01Smrg 4883518bcf38Smrg# Try without a prefix undercore, then with it. 4884518bcf38Smrgfor ac_symprfx in "" "_"; do 4885f55e6a01Smrg 4886518bcf38Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4887518bcf38Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4888f55e6a01Smrg 4889518bcf38Smrg # Write the raw and C identifiers. 4890518bcf38Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4891c35d236eSmrg 4892518bcf38Smrg # Check to see that the pipe works correctly. 4893518bcf38Smrg pipe_works=no 4894f55e6a01Smrg 4895518bcf38Smrg rm -f conftest* 4896518bcf38Smrg cat > conftest.$ac_ext <<EOF 4897518bcf38Smrg#ifdef __cplusplus 4898518bcf38Smrgextern "C" { 4899518bcf38Smrg#endif 4900518bcf38Smrgchar nm_test_var; 4901518bcf38Smrgvoid nm_test_func(){} 4902518bcf38Smrg#ifdef __cplusplus 4903518bcf38Smrg} 4904518bcf38Smrg#endif 4905518bcf38Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 4906518bcf38SmrgEOF 4907f55e6a01Smrg 4908518bcf38Smrg if AC_TRY_EVAL(ac_compile); then 4909518bcf38Smrg # Now try to grab the symbols. 4910518bcf38Smrg nlist=conftest.nm 4911518bcf38Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 4912518bcf38Smrg # Try sorting and uniquifying the output. 4913518bcf38Smrg if sort "$nlist" | uniq > "$nlist"T; then 4914518bcf38Smrg mv -f "$nlist"T "$nlist" 4915518bcf38Smrg else 4916518bcf38Smrg rm -f "$nlist"T 4917518bcf38Smrg fi 4918f55e6a01Smrg 4919518bcf38Smrg # Make sure that we snagged all the symbols we need. 4920518bcf38Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 4921518bcf38Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 4922518bcf38Smrg cat <<EOF > conftest.$ac_ext 4923518bcf38Smrg#ifdef __cplusplus 4924518bcf38Smrgextern "C" { 4925518bcf38Smrg#endif 4926f55e6a01Smrg 4927518bcf38SmrgEOF 4928518bcf38Smrg # Now generate the symbol file. 4929518bcf38Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 4930f55e6a01Smrg 4931518bcf38Smrg cat <<EOF >> conftest.$ac_ext 4932518bcf38Smrg#if defined (__STDC__) && __STDC__ 4933518bcf38Smrg# define lt_ptr_t void * 4934518bcf38Smrg#else 4935518bcf38Smrg# define lt_ptr_t char * 4936518bcf38Smrg# define const 4937518bcf38Smrg#endif 4938f55e6a01Smrg 4939518bcf38Smrg/* The mapping between symbol names and symbols. */ 4940518bcf38Smrgconst struct { 4941518bcf38Smrg const char *name; 4942518bcf38Smrg lt_ptr_t address; 4943518bcf38Smrg} 4944518bcf38Smrglt_preloaded_symbols[[]] = 4945518bcf38Smrg{ 4946518bcf38SmrgEOF 4947518bcf38Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 4948518bcf38Smrg cat <<\EOF >> conftest.$ac_ext 4949518bcf38Smrg {0, (lt_ptr_t) 0} 4950518bcf38Smrg}; 4951f55e6a01Smrg 4952518bcf38Smrg#ifdef __cplusplus 4953518bcf38Smrg} 4954518bcf38Smrg#endif 4955518bcf38SmrgEOF 4956518bcf38Smrg # Now try linking the two files. 4957518bcf38Smrg mv conftest.$ac_objext conftstm.$ac_objext 4958518bcf38Smrg lt_save_LIBS="$LIBS" 4959518bcf38Smrg lt_save_CFLAGS="$CFLAGS" 4960518bcf38Smrg LIBS="conftstm.$ac_objext" 4961518bcf38Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4962518bcf38Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4963518bcf38Smrg pipe_works=yes 4964518bcf38Smrg fi 4965518bcf38Smrg LIBS="$lt_save_LIBS" 4966518bcf38Smrg CFLAGS="$lt_save_CFLAGS" 4967518bcf38Smrg else 4968518bcf38Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4969f55e6a01Smrg fi 4970518bcf38Smrg else 4971518bcf38Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4972518bcf38Smrg fi 4973518bcf38Smrg else 4974518bcf38Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4975518bcf38Smrg fi 4976518bcf38Smrg else 4977518bcf38Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4978518bcf38Smrg cat conftest.$ac_ext >&5 4979518bcf38Smrg fi 4980518bcf38Smrg rm -rf conftest* conftst* 4981c35d236eSmrg 4982518bcf38Smrg # Do not use the global_symbol_pipe unless it works. 4983518bcf38Smrg if test "$pipe_works" = yes; then 4984518bcf38Smrg break 4985518bcf38Smrg else 4986518bcf38Smrg lt_cv_sys_global_symbol_pipe= 4987518bcf38Smrg fi 4988518bcf38Smrgdone 4989518bcf38Smrg]) 4990518bcf38Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4991518bcf38Smrg lt_cv_sys_global_symbol_to_cdecl= 4992518bcf38Smrgfi 4993518bcf38Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4994518bcf38Smrg AC_MSG_RESULT(failed) 4995518bcf38Smrgelse 4996518bcf38Smrg AC_MSG_RESULT(ok) 4997518bcf38Smrgfi 4998518bcf38Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4999c35d236eSmrg 5000c35d236eSmrg 5001518bcf38Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 5002518bcf38Smrg# --------------------------------------- 5003518bcf38SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 5004518bcf38Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 5005518bcf38Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5006518bcf38Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 5007c35d236eSmrg 5008518bcf38SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 5009518bcf38Smrg ifelse([$1],[CXX],[ 5010518bcf38Smrg # C++ specific cases for pic, static, wl, etc. 5011518bcf38Smrg if test "$GXX" = yes; then 5012518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5013518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5014c35d236eSmrg 5015518bcf38Smrg case $host_os in 5016518bcf38Smrg aix*) 5017518bcf38Smrg # All AIX code is PIC. 5018518bcf38Smrg if test "$host_cpu" = ia64; then 5019518bcf38Smrg # AIX 5 now supports IA64 processor 5020518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5021518bcf38Smrg fi 5022518bcf38Smrg ;; 5023518bcf38Smrg amigaos*) 5024518bcf38Smrg # FIXME: we need at least 68020 code to build shared libraries, but 5025518bcf38Smrg # adding the `-m68020' flag to GCC prevents building anything better, 5026518bcf38Smrg # like `-m68040'. 5027518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5028518bcf38Smrg ;; 5029518bcf38Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5030518bcf38Smrg # PIC is the default for these OSes. 5031518bcf38Smrg ;; 5032518bcf38Smrg mingw* | cygwin* | os2* | pw32*) 5033518bcf38Smrg # This hack is so that the source file can tell whether it is being 5034518bcf38Smrg # built for inclusion in a dll (and should export symbols for example). 5035518bcf38Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5036518bcf38Smrg # (--disable-auto-import) libraries 5037518bcf38Smrg m4_if([$1], [GCJ], [], 5038518bcf38Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5039518bcf38Smrg ;; 5040518bcf38Smrg darwin* | rhapsody*) 5041518bcf38Smrg # PIC is the default on this platform 5042518bcf38Smrg # Common symbols not allowed in MH_DYLIB files 5043518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5044518bcf38Smrg ;; 5045518bcf38Smrg *djgpp*) 5046518bcf38Smrg # DJGPP does not support shared libraries at all 5047518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5048518bcf38Smrg ;; 5049518bcf38Smrg interix[[3-9]]*) 5050518bcf38Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5051518bcf38Smrg # Instead, we relocate shared libraries at runtime. 5052518bcf38Smrg ;; 5053518bcf38Smrg sysv4*MP*) 5054518bcf38Smrg if test -d /usr/nec; then 5055518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5056518bcf38Smrg fi 5057518bcf38Smrg ;; 5058518bcf38Smrg hpux*) 5059518bcf38Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5060518bcf38Smrg # not for PA HP-UX. 5061518bcf38Smrg case $host_cpu in 5062518bcf38Smrg hppa*64*|ia64*) 5063518bcf38Smrg ;; 5064518bcf38Smrg *) 5065518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5066518bcf38Smrg ;; 5067518bcf38Smrg esac 5068518bcf38Smrg ;; 5069518bcf38Smrg *) 5070518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5071518bcf38Smrg ;; 5072518bcf38Smrg esac 5073518bcf38Smrg else 5074518bcf38Smrg case $host_os in 5075518bcf38Smrg aix[[4-9]]*) 5076518bcf38Smrg # All AIX code is PIC. 5077518bcf38Smrg if test "$host_cpu" = ia64; then 5078518bcf38Smrg # AIX 5 now supports IA64 processor 5079518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5080518bcf38Smrg else 5081518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5082518bcf38Smrg fi 5083518bcf38Smrg ;; 5084518bcf38Smrg chorus*) 5085518bcf38Smrg case $cc_basename in 5086518bcf38Smrg cxch68*) 5087518bcf38Smrg # Green Hills C++ Compiler 5088518bcf38Smrg # _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" 5089518bcf38Smrg ;; 5090518bcf38Smrg esac 5091518bcf38Smrg ;; 5092518bcf38Smrg darwin*) 5093518bcf38Smrg # PIC is the default on this platform 5094518bcf38Smrg # Common symbols not allowed in MH_DYLIB files 5095518bcf38Smrg case $cc_basename in 5096518bcf38Smrg xlc*) 5097518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5098518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5099518bcf38Smrg ;; 5100518bcf38Smrg esac 5101518bcf38Smrg ;; 5102518bcf38Smrg dgux*) 5103518bcf38Smrg case $cc_basename in 5104518bcf38Smrg ec++*) 5105518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5106518bcf38Smrg ;; 5107518bcf38Smrg ghcx*) 5108518bcf38Smrg # Green Hills C++ Compiler 5109518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5110518bcf38Smrg ;; 5111518bcf38Smrg *) 5112518bcf38Smrg ;; 5113518bcf38Smrg esac 5114518bcf38Smrg ;; 5115518bcf38Smrg freebsd* | dragonfly*) 5116518bcf38Smrg # FreeBSD uses GNU C++ 5117518bcf38Smrg ;; 5118518bcf38Smrg hpux9* | hpux10* | hpux11*) 5119518bcf38Smrg case $cc_basename in 5120518bcf38Smrg CC*) 5121518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5122518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5123518bcf38Smrg if test "$host_cpu" != ia64; then 5124518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5125518bcf38Smrg fi 5126518bcf38Smrg ;; 5127518bcf38Smrg aCC*) 5128518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5129518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5130518bcf38Smrg case $host_cpu in 5131518bcf38Smrg hppa*64*|ia64*) 5132518bcf38Smrg # +Z the default 5133518bcf38Smrg ;; 5134518bcf38Smrg *) 5135518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5136518bcf38Smrg ;; 5137518bcf38Smrg esac 5138518bcf38Smrg ;; 5139518bcf38Smrg *) 5140518bcf38Smrg ;; 5141518bcf38Smrg esac 5142518bcf38Smrg ;; 5143518bcf38Smrg interix*) 5144518bcf38Smrg # This is c89, which is MS Visual C++ (no shared libs) 5145518bcf38Smrg # Anyone wants to do a port? 5146518bcf38Smrg ;; 5147518bcf38Smrg irix5* | irix6* | nonstopux*) 5148518bcf38Smrg case $cc_basename in 5149518bcf38Smrg CC*) 5150518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5151518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5152518bcf38Smrg # CC pic flag -KPIC is the default. 5153518bcf38Smrg ;; 5154518bcf38Smrg *) 5155518bcf38Smrg ;; 5156518bcf38Smrg esac 5157518bcf38Smrg ;; 5158518bcf38Smrg linux* | k*bsd*-gnu) 5159518bcf38Smrg case $cc_basename in 5160518bcf38Smrg KCC*) 5161518bcf38Smrg # KAI C++ Compiler 5162518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5163518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5164518bcf38Smrg ;; 5165518bcf38Smrg icpc* | ecpc*) 5166518bcf38Smrg # Intel C++ 5167518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5168518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5169518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5170518bcf38Smrg ;; 5171518bcf38Smrg pgCC* | pgcpp*) 5172518bcf38Smrg # Portland Group C++ compiler. 5173518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5174518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5175518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5176518bcf38Smrg ;; 5177518bcf38Smrg cxx*) 5178518bcf38Smrg # Compaq C++ 5179518bcf38Smrg # Make sure the PIC flag is empty. It appears that all Alpha 5180518bcf38Smrg # Linux and Compaq Tru64 Unix objects are PIC. 5181518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5182518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5183518bcf38Smrg ;; 5184518bcf38Smrg *) 5185518bcf38Smrg case `$CC -V 2>&1 | sed 5q` in 5186518bcf38Smrg *Sun\ C*) 5187518bcf38Smrg # Sun C++ 5.9 5188518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5189518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5190518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5191518bcf38Smrg ;; 5192518bcf38Smrg esac 5193518bcf38Smrg ;; 5194518bcf38Smrg esac 5195518bcf38Smrg ;; 5196518bcf38Smrg lynxos*) 5197518bcf38Smrg ;; 5198518bcf38Smrg m88k*) 5199518bcf38Smrg ;; 5200518bcf38Smrg mvs*) 5201518bcf38Smrg case $cc_basename in 5202518bcf38Smrg cxx*) 5203518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5204518bcf38Smrg ;; 5205518bcf38Smrg *) 5206518bcf38Smrg ;; 5207518bcf38Smrg esac 5208518bcf38Smrg ;; 5209518bcf38Smrg netbsd*) 5210518bcf38Smrg ;; 5211518bcf38Smrg osf3* | osf4* | osf5*) 5212518bcf38Smrg case $cc_basename in 5213518bcf38Smrg KCC*) 5214518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5215518bcf38Smrg ;; 5216518bcf38Smrg RCC*) 5217518bcf38Smrg # Rational C++ 2.4.1 5218518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5219518bcf38Smrg ;; 5220518bcf38Smrg cxx*) 5221518bcf38Smrg # Digital/Compaq C++ 5222518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5223518bcf38Smrg # Make sure the PIC flag is empty. It appears that all Alpha 5224518bcf38Smrg # Linux and Compaq Tru64 Unix objects are PIC. 5225518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5226518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5227518bcf38Smrg ;; 5228518bcf38Smrg *) 5229518bcf38Smrg ;; 5230518bcf38Smrg esac 5231518bcf38Smrg ;; 5232518bcf38Smrg psos*) 5233518bcf38Smrg ;; 5234518bcf38Smrg solaris*) 5235518bcf38Smrg case $cc_basename in 5236518bcf38Smrg CC*) 5237518bcf38Smrg # Sun C++ 4.2, 5.x and Centerline C++ 5238518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5239518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5240518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5241518bcf38Smrg ;; 5242518bcf38Smrg gcx*) 5243518bcf38Smrg # Green Hills C++ Compiler 5244518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5245518bcf38Smrg ;; 5246518bcf38Smrg *) 5247518bcf38Smrg ;; 5248518bcf38Smrg esac 5249518bcf38Smrg ;; 5250518bcf38Smrg sunos4*) 5251518bcf38Smrg case $cc_basename in 5252518bcf38Smrg CC*) 5253518bcf38Smrg # Sun C++ 4.x 5254518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5255518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5256518bcf38Smrg ;; 5257518bcf38Smrg lcc*) 5258518bcf38Smrg # Lucid 5259518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5260518bcf38Smrg ;; 5261518bcf38Smrg *) 5262518bcf38Smrg ;; 5263518bcf38Smrg esac 5264518bcf38Smrg ;; 5265518bcf38Smrg tandem*) 5266518bcf38Smrg case $cc_basename in 5267518bcf38Smrg NCC*) 5268518bcf38Smrg # NonStop-UX NCC 3.20 5269518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5270518bcf38Smrg ;; 5271518bcf38Smrg *) 5272518bcf38Smrg ;; 5273518bcf38Smrg esac 5274518bcf38Smrg ;; 5275518bcf38Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5276518bcf38Smrg case $cc_basename in 5277518bcf38Smrg CC*) 5278518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5279518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5280518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5281518bcf38Smrg ;; 5282518bcf38Smrg esac 5283518bcf38Smrg ;; 5284518bcf38Smrg vxworks*) 5285518bcf38Smrg ;; 5286518bcf38Smrg *) 5287518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5288518bcf38Smrg ;; 5289518bcf38Smrg esac 5290518bcf38Smrg fi 5291518bcf38Smrg], 5292518bcf38Smrg[ 5293518bcf38Smrg if test "$GCC" = yes; then 5294518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5295518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5296f55e6a01Smrg 5297518bcf38Smrg case $host_os in 5298518bcf38Smrg aix*) 5299518bcf38Smrg # All AIX code is PIC. 5300518bcf38Smrg if test "$host_cpu" = ia64; then 5301518bcf38Smrg # AIX 5 now supports IA64 processor 5302518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5303518bcf38Smrg fi 5304518bcf38Smrg ;; 5305f55e6a01Smrg 5306518bcf38Smrg amigaos*) 5307518bcf38Smrg # FIXME: we need at least 68020 code to build shared libraries, but 5308518bcf38Smrg # adding the `-m68020' flag to GCC prevents building anything better, 5309518bcf38Smrg # like `-m68040'. 5310518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5311518bcf38Smrg ;; 5312f55e6a01Smrg 5313518bcf38Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5314518bcf38Smrg # PIC is the default for these OSes. 5315518bcf38Smrg ;; 5316f55e6a01Smrg 5317518bcf38Smrg mingw* | cygwin* | pw32* | os2*) 5318518bcf38Smrg # This hack is so that the source file can tell whether it is being 5319518bcf38Smrg # built for inclusion in a dll (and should export symbols for example). 5320518bcf38Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5321518bcf38Smrg # (--disable-auto-import) libraries 5322518bcf38Smrg m4_if([$1], [GCJ], [], 5323518bcf38Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5324518bcf38Smrg ;; 5325f55e6a01Smrg 5326518bcf38Smrg darwin* | rhapsody*) 5327518bcf38Smrg # PIC is the default on this platform 5328518bcf38Smrg # Common symbols not allowed in MH_DYLIB files 5329518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5330518bcf38Smrg ;; 5331f55e6a01Smrg 5332518bcf38Smrg interix[[3-9]]*) 5333518bcf38Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5334518bcf38Smrg # Instead, we relocate shared libraries at runtime. 5335518bcf38Smrg ;; 5336f55e6a01Smrg 5337518bcf38Smrg msdosdjgpp*) 5338518bcf38Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 5339518bcf38Smrg # on systems that don't support them. 5340518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5341518bcf38Smrg enable_shared=no 5342518bcf38Smrg ;; 5343f55e6a01Smrg 5344518bcf38Smrg sysv4*MP*) 5345518bcf38Smrg if test -d /usr/nec; then 5346518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5347518bcf38Smrg fi 5348518bcf38Smrg ;; 5349f55e6a01Smrg 5350518bcf38Smrg hpux*) 5351518bcf38Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5352518bcf38Smrg # not for PA HP-UX. 5353518bcf38Smrg case $host_cpu in 5354518bcf38Smrg hppa*64*|ia64*) 5355518bcf38Smrg # +Z the default 5356518bcf38Smrg ;; 5357518bcf38Smrg *) 5358518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5359518bcf38Smrg ;; 5360518bcf38Smrg esac 5361518bcf38Smrg ;; 5362c35d236eSmrg 5363518bcf38Smrg *) 5364518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5365518bcf38Smrg ;; 5366518bcf38Smrg esac 5367518bcf38Smrg else 5368518bcf38Smrg # PORTME Check for flag to pass linker flags through the system compiler. 5369518bcf38Smrg case $host_os in 5370518bcf38Smrg aix*) 5371518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5372518bcf38Smrg if test "$host_cpu" = ia64; then 5373518bcf38Smrg # AIX 5 now supports IA64 processor 5374518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5375518bcf38Smrg else 5376518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5377518bcf38Smrg fi 5378518bcf38Smrg ;; 5379518bcf38Smrg darwin*) 5380518bcf38Smrg # PIC is the default on this platform 5381518bcf38Smrg # Common symbols not allowed in MH_DYLIB files 5382518bcf38Smrg case $cc_basename in 5383518bcf38Smrg xlc*) 5384518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5385518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5386518bcf38Smrg ;; 5387518bcf38Smrg esac 5388518bcf38Smrg ;; 5389c35d236eSmrg 5390518bcf38Smrg mingw* | cygwin* | pw32* | os2*) 5391518bcf38Smrg # This hack is so that the source file can tell whether it is being 5392518bcf38Smrg # built for inclusion in a dll (and should export symbols for example). 5393518bcf38Smrg m4_if([$1], [GCJ], [], 5394518bcf38Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5395518bcf38Smrg ;; 5396c35d236eSmrg 5397518bcf38Smrg hpux9* | hpux10* | hpux11*) 5398518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5399518bcf38Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5400518bcf38Smrg # not for PA HP-UX. 5401518bcf38Smrg case $host_cpu in 5402518bcf38Smrg hppa*64*|ia64*) 5403518bcf38Smrg # +Z the default 5404518bcf38Smrg ;; 5405518bcf38Smrg *) 5406518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5407518bcf38Smrg ;; 5408518bcf38Smrg esac 5409518bcf38Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 5410518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5411518bcf38Smrg ;; 5412c35d236eSmrg 5413518bcf38Smrg irix5* | irix6* | nonstopux*) 5414518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5415518bcf38Smrg # PIC (with -KPIC) is the default. 5416518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5417518bcf38Smrg ;; 5418c35d236eSmrg 5419518bcf38Smrg newsos6) 5420518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5421518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5422518bcf38Smrg ;; 5423c35d236eSmrg 5424518bcf38Smrg linux* | k*bsd*-gnu) 5425518bcf38Smrg case $cc_basename in 5426518bcf38Smrg icc* | ecc*) 5427518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5428518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5429518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5430518bcf38Smrg ;; 5431518bcf38Smrg pgcc* | pgf77* | pgf90* | pgf95*) 5432518bcf38Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 5433518bcf38Smrg # which looks to be a dead project) 5434518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5435518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5436518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5437518bcf38Smrg ;; 5438518bcf38Smrg ccc*) 5439518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5440518bcf38Smrg # All Alpha code is PIC. 5441518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5442518bcf38Smrg ;; 5443518bcf38Smrg *) 5444518bcf38Smrg case `$CC -V 2>&1 | sed 5q` in 5445518bcf38Smrg *Sun\ C*) 5446518bcf38Smrg # Sun C 5.9 5447518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5448518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5449518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5450518bcf38Smrg ;; 5451518bcf38Smrg *Sun\ F*) 5452518bcf38Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 5453518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5454518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5455518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 5456518bcf38Smrg ;; 5457518bcf38Smrg esac 5458518bcf38Smrg ;; 5459518bcf38Smrg esac 5460518bcf38Smrg ;; 5461c35d236eSmrg 5462518bcf38Smrg osf3* | osf4* | osf5*) 5463518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5464518bcf38Smrg # All OSF/1 code is PIC. 5465518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5466518bcf38Smrg ;; 5467c35d236eSmrg 5468518bcf38Smrg rdos*) 5469518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5470518bcf38Smrg ;; 54714f6cd06fSmrg 5472518bcf38Smrg solaris*) 5473518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5474518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5475518bcf38Smrg case $cc_basename in 5476518bcf38Smrg f77* | f90* | f95*) 5477518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5478518bcf38Smrg *) 5479518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5480518bcf38Smrg esac 5481518bcf38Smrg ;; 5482c35d236eSmrg 5483518bcf38Smrg sunos4*) 5484518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5485518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5486518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5487518bcf38Smrg ;; 5488c35d236eSmrg 5489518bcf38Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 5490518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5491518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5492518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5493518bcf38Smrg ;; 5494c35d236eSmrg 5495518bcf38Smrg sysv4*MP*) 5496518bcf38Smrg if test -d /usr/nec ;then 5497518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5498518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5499518bcf38Smrg fi 5500518bcf38Smrg ;; 5501c35d236eSmrg 5502518bcf38Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5503518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5504518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5505518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5506518bcf38Smrg ;; 5507c35d236eSmrg 5508518bcf38Smrg unicos*) 5509518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5510518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5511518bcf38Smrg ;; 5512c35d236eSmrg 5513518bcf38Smrg uts4*) 5514518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5515518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5516518bcf38Smrg ;; 5517c35d236eSmrg 5518518bcf38Smrg *) 5519518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5520518bcf38Smrg ;; 5521518bcf38Smrg esac 5522c35d236eSmrg fi 5523c35d236eSmrg]) 5524518bcf38SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 5525c35d236eSmrg 5526518bcf38Smrg# 5527518bcf38Smrg# Check to make sure the PIC flag actually works. 5528518bcf38Smrg# 5529518bcf38Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 5530518bcf38Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 5531518bcf38Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 5532518bcf38Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 5533518bcf38Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 5534518bcf38Smrg "" | " "*) ;; 5535518bcf38Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5536518bcf38Smrg esac], 5537518bcf38Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5538518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5539c35d236eSmrgfi 5540518bcf38Smrgcase $host_os in 5541518bcf38Smrg # For platforms which do not support PIC, -DPIC is meaningless: 5542518bcf38Smrg *djgpp*) 5543518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5544518bcf38Smrg ;; 5545518bcf38Smrg *) 5546518bcf38Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 5547518bcf38Smrg ;; 5548c35d236eSmrgesac 5549c35d236eSmrg 5550518bcf38Smrg# 5551518bcf38Smrg# Check to make sure the static flag actually works. 5552518bcf38Smrg# 5553518bcf38Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 5554518bcf38SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5555518bcf38Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5556518bcf38Smrg $lt_tmp_static_flag, 5557518bcf38Smrg [], 5558518bcf38Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 5559518bcf38Smrg]) 5560f55e6a01Smrg 5561f55e6a01Smrg 5562518bcf38Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 5563518bcf38Smrg# ------------------------------------ 5564518bcf38Smrg# See if the linker supports building shared libraries. 5565518bcf38SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 5566518bcf38Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 5567518bcf38SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5568518bcf38Smrgifelse([$1],[CXX],[ 5569518bcf38Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5570518bcf38Smrg case $host_os in 5571518bcf38Smrg aix[[4-9]]*) 5572518bcf38Smrg # If we're using GNU nm, then we don't want the "-C" option. 5573518bcf38Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5574518bcf38Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5575518bcf38Smrg _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' 5576518bcf38Smrg else 5577518bcf38Smrg _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' 5578518bcf38Smrg fi 5579518bcf38Smrg ;; 5580518bcf38Smrg pw32*) 5581518bcf38Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5582518bcf38Smrg ;; 5583518bcf38Smrg cygwin* | mingw*) 5584518bcf38Smrg _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' 5585518bcf38Smrg ;; 5586518bcf38Smrg *) 5587518bcf38Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5588518bcf38Smrg ;; 5589c35d236eSmrg esac 5590518bcf38Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5591518bcf38Smrg],[ 5592518bcf38Smrg runpath_var= 5593518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 5594518bcf38Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5595518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 5596518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5597518bcf38Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 5598518bcf38Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5599518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5600518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5601518bcf38Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 5602518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5603518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5604518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5605518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5606518bcf38Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5607518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5608518bcf38Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5609518bcf38Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 5610518bcf38Smrg _LT_AC_TAGVAR(module_cmds, $1)= 5611518bcf38Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 5612518bcf38Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5613518bcf38Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5614518bcf38Smrg # include_expsyms should be a list of space-separated symbols to be *always* 5615518bcf38Smrg # included in the symbol list 5616518bcf38Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 5617518bcf38Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 5618518bcf38Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 5619518bcf38Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5620518bcf38Smrg # as well as any symbol that contains `d'. 5621518bcf38Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5622518bcf38Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5623518bcf38Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 5624518bcf38Smrg # the symbol is explicitly referenced. Since portable code cannot 5625518bcf38Smrg # rely on this symbol name, it's probably fine to never include it in 5626518bcf38Smrg # preloaded symbol tables. 5627518bcf38Smrg # Exclude shared library initialization/finalization symbols. 5628518bcf38Smrgdnl Note also adjust exclude_expsyms for C++ above. 5629518bcf38Smrg extract_expsyms_cmds= 5630518bcf38Smrg # Just being paranoid about ensuring that cc_basename is set. 5631518bcf38Smrg _LT_CC_BASENAME([$compiler]) 5632518bcf38Smrg case $host_os in 5633518bcf38Smrg cygwin* | mingw* | pw32*) 5634518bcf38Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5635518bcf38Smrg # When not using gcc, we currently assume that we are using 5636518bcf38Smrg # Microsoft Visual C++. 5637518bcf38Smrg if test "$GCC" != yes; then 5638518bcf38Smrg with_gnu_ld=no 5639518bcf38Smrg fi 5640518bcf38Smrg ;; 5641518bcf38Smrg interix*) 5642518bcf38Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5643518bcf38Smrg with_gnu_ld=yes 5644518bcf38Smrg ;; 5645518bcf38Smrg openbsd*) 5646518bcf38Smrg with_gnu_ld=no 5647c35d236eSmrg ;; 5648c35d236eSmrg esac 5649c35d236eSmrg 5650518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5651518bcf38Smrg if test "$with_gnu_ld" = yes; then 5652518bcf38Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5653518bcf38Smrg wlarc='${wl}' 5654c35d236eSmrg 5655518bcf38Smrg # Set some defaults for GNU ld with shared library support. These 5656518bcf38Smrg # are reset later if shared libraries are not supported. Putting them 5657518bcf38Smrg # here allows them to be overridden if necessary. 5658518bcf38Smrg runpath_var=LD_RUN_PATH 5659518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5660518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5661518bcf38Smrg # ancient GNU ld didn't support --whole-archive et. al. 5662518bcf38Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 5663518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5664518bcf38Smrg else 5665518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5666518bcf38Smrg fi 5667518bcf38Smrg supports_anon_versioning=no 5668518bcf38Smrg case `$LD -v 2>/dev/null` in 5669518bcf38Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5670518bcf38Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5671518bcf38Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5672518bcf38Smrg *\ 2.11.*) ;; # other 2.11 versions 5673518bcf38Smrg *) supports_anon_versioning=yes ;; 5674518bcf38Smrg esac 5675c35d236eSmrg 5676518bcf38Smrg # See if GNU ld supports shared libraries. 5677518bcf38Smrg case $host_os in 5678518bcf38Smrg aix[[3-9]]*) 5679518bcf38Smrg # On AIX/PPC, the GNU linker is very broken 5680518bcf38Smrg if test "$host_cpu" != ia64; then 5681518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5682518bcf38Smrg cat <<EOF 1>&2 5683c35d236eSmrg 5684518bcf38Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 5685518bcf38Smrg*** to be unable to reliably create shared libraries on AIX. 5686518bcf38Smrg*** Therefore, libtool is disabling shared libraries support. If you 5687518bcf38Smrg*** really care for shared libraries, you may want to modify your PATH 5688518bcf38Smrg*** so that a non-GNU linker is found, and then restart. 5689c35d236eSmrg 5690518bcf38SmrgEOF 5691518bcf38Smrg fi 5692518bcf38Smrg ;; 5693c35d236eSmrg 5694518bcf38Smrg amigaos*) 5695518bcf38Smrg _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)' 5696518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5697518bcf38Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5698518bcf38Smrg 5699518bcf38Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 5700518bcf38Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 5701518bcf38Smrg # to version 4, is to share data among multiple programs linked 5702518bcf38Smrg # with the same dynamic library. Since this doesn't match the 5703518bcf38Smrg # behavior of shared libraries on other platforms, we can't use 5704518bcf38Smrg # them. 5705518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5706518bcf38Smrg ;; 5707c35d236eSmrg 5708518bcf38Smrg beos*) 5709518bcf38Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5710518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5711518bcf38Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5712518bcf38Smrg # support --undefined. This deserves some investigation. FIXME 5713518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5714518bcf38Smrg else 5715518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5716518bcf38Smrg fi 5717518bcf38Smrg ;; 5718c35d236eSmrg 5719518bcf38Smrg cygwin* | mingw* | pw32*) 5720518bcf38Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5721518bcf38Smrg # as there is no search path for DLLs. 5722518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5723518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5724518bcf38Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5725518bcf38Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5726518bcf38Smrg _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' 5727518bcf38Smrg 5728518bcf38Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5729518bcf38Smrg _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' 5730518bcf38Smrg # If the export-symbols file already is a .def file (1st line 5731518bcf38Smrg # is EXPORTS), use it as is; otherwise, prepend... 5732518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5733518bcf38Smrg cp $export_symbols $output_objdir/$soname.def; 5734518bcf38Smrg else 5735518bcf38Smrg echo EXPORTS > $output_objdir/$soname.def; 5736518bcf38Smrg cat $export_symbols >> $output_objdir/$soname.def; 5737518bcf38Smrg fi~ 5738518bcf38Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5739518bcf38Smrg else 5740518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5741518bcf38Smrg fi 5742518bcf38Smrg ;; 5743c35d236eSmrg 5744518bcf38Smrg interix[[3-9]]*) 5745518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5746518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5747518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5748518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5749518bcf38Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5750518bcf38Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5751518bcf38Smrg # default) and relocated if they conflict, which is a slow very memory 5752518bcf38Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5753518bcf38Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5754518bcf38Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5755518bcf38Smrg _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' 5756518bcf38Smrg _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' 5757518bcf38Smrg ;; 5758c35d236eSmrg 5759518bcf38Smrg gnu* | linux* | k*bsd*-gnu) 5760518bcf38Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5761518bcf38Smrg tmp_addflag= 5762518bcf38Smrg case $cc_basename,$host_cpu in 5763518bcf38Smrg pgcc*) # Portland Group C compiler 5764518bcf38Smrg _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' 5765518bcf38Smrg tmp_addflag=' $pic_flag' 5766518bcf38Smrg ;; 5767518bcf38Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 5768518bcf38Smrg _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' 5769518bcf38Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 5770518bcf38Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5771518bcf38Smrg tmp_addflag=' -i_dynamic' ;; 5772518bcf38Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5773518bcf38Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5774518bcf38Smrg ifc* | ifort*) # Intel Fortran compiler 5775518bcf38Smrg tmp_addflag=' -nofor_main' ;; 5776518bcf38Smrg esac 5777518bcf38Smrg case `$CC -V 2>&1 | sed 5q` in 5778518bcf38Smrg *Sun\ C*) # Sun C 5.9 5779518bcf38Smrg _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' 5780518bcf38Smrg tmp_sharedflag='-G' ;; 5781518bcf38Smrg *Sun\ F*) # Sun Fortran 8.3 5782518bcf38Smrg tmp_sharedflag='-G' ;; 5783518bcf38Smrg *) 5784518bcf38Smrg tmp_sharedflag='-shared' ;; 5785518bcf38Smrg esac 5786518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5787c35d236eSmrg 5788518bcf38Smrg if test $supports_anon_versioning = yes; then 5789518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 5790518bcf38Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5791518bcf38Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 5792518bcf38Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5793518bcf38Smrg fi 5794518bcf38Smrg else 5795518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5796518bcf38Smrg fi 5797518bcf38Smrg ;; 5798c35d236eSmrg 5799518bcf38Smrg netbsd*) 5800518bcf38Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5801518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5802518bcf38Smrg wlarc= 5803518bcf38Smrg else 5804518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5805518bcf38Smrg _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' 5806518bcf38Smrg fi 5807518bcf38Smrg ;; 5808c35d236eSmrg 5809518bcf38Smrg solaris*) 5810518bcf38Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 5811518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5812518bcf38Smrg cat <<EOF 1>&2 5813c35d236eSmrg 5814518bcf38Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5815518bcf38Smrg*** create shared libraries on Solaris systems. Therefore, libtool 5816518bcf38Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5817518bcf38Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 5818518bcf38Smrg*** your PATH or compiler configuration so that the native linker is 5819518bcf38Smrg*** used, and then restart. 5820c35d236eSmrg 5821518bcf38SmrgEOF 5822518bcf38Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5823518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5824518bcf38Smrg _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' 5825518bcf38Smrg else 5826518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5827518bcf38Smrg fi 5828518bcf38Smrg ;; 5829c35d236eSmrg 5830518bcf38Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5831518bcf38Smrg case `$LD -v 2>&1` in 5832518bcf38Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5833518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5834518bcf38Smrg cat <<_LT_EOF 1>&2 5835c35d236eSmrg 5836518bcf38Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5837518bcf38Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5838518bcf38Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5839518bcf38Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5840518bcf38Smrg*** your PATH or compiler configuration so that the native linker is 5841518bcf38Smrg*** used, and then restart. 5842c35d236eSmrg 5843518bcf38Smrg_LT_EOF 5844518bcf38Smrg ;; 5845518bcf38Smrg *) 5846518bcf38Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5847518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 5848518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 5849518bcf38Smrg _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' 5850518bcf38Smrg else 5851518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5852518bcf38Smrg fi 5853518bcf38Smrg ;; 5854518bcf38Smrg esac 5855518bcf38Smrg ;; 5856c35d236eSmrg 5857518bcf38Smrg sunos4*) 5858518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5859518bcf38Smrg wlarc= 5860518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5861518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5862518bcf38Smrg ;; 5863c35d236eSmrg 5864518bcf38Smrg *) 5865518bcf38Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5866518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5867518bcf38Smrg _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' 5868518bcf38Smrg else 5869518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5870518bcf38Smrg fi 5871518bcf38Smrg ;; 5872518bcf38Smrg esac 5873c35d236eSmrg 5874518bcf38Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 5875518bcf38Smrg runpath_var= 5876518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5877518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5878518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5879518bcf38Smrg fi 5880518bcf38Smrg else 5881518bcf38Smrg # PORTME fill in a description of your system's linker (not GNU ld) 5882518bcf38Smrg case $host_os in 5883518bcf38Smrg aix3*) 5884518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5885518bcf38Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5886518bcf38Smrg _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' 5887518bcf38Smrg # Note: this linker hardcodes the directories in LIBPATH if there 5888518bcf38Smrg # are no directories specified by -L. 5889518bcf38Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5890518bcf38Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 5891518bcf38Smrg # Neither direct hardcoding nor static linking is supported with a 5892518bcf38Smrg # broken collect2. 5893518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5894518bcf38Smrg fi 5895518bcf38Smrg ;; 5896c35d236eSmrg 5897518bcf38Smrg aix[[4-9]]*) 5898518bcf38Smrg if test "$host_cpu" = ia64; then 5899518bcf38Smrg # On IA64, the linker does run time linking by default, so we don't 5900518bcf38Smrg # have to do anything special. 5901518bcf38Smrg aix_use_runtimelinking=no 5902518bcf38Smrg exp_sym_flag='-Bexport' 5903518bcf38Smrg no_entry_flag="" 5904518bcf38Smrg else 5905518bcf38Smrg # If we're using GNU nm, then we don't want the "-C" option. 5906518bcf38Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5907518bcf38Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5908518bcf38Smrg _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' 5909518bcf38Smrg else 5910518bcf38Smrg _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' 5911518bcf38Smrg fi 5912518bcf38Smrg aix_use_runtimelinking=no 5913c35d236eSmrg 5914518bcf38Smrg # Test if we are trying to use run time linking or normal 5915518bcf38Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5916518bcf38Smrg # need to do runtime linking. 5917518bcf38Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5918518bcf38Smrg for ld_flag in $LDFLAGS; do 5919518bcf38Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5920518bcf38Smrg aix_use_runtimelinking=yes 5921518bcf38Smrg break 5922518bcf38Smrg fi 5923518bcf38Smrg done 5924518bcf38Smrg ;; 5925518bcf38Smrg esac 5926c35d236eSmrg 5927518bcf38Smrg exp_sym_flag='-bexport' 5928518bcf38Smrg no_entry_flag='-bnoentry' 5929518bcf38Smrg fi 5930f55e6a01Smrg 5931518bcf38Smrg # When large executables or shared objects are built, AIX ld can 5932518bcf38Smrg # have problems creating the table of contents. If linking a library 5933518bcf38Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5934518bcf38Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5935518bcf38Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5936f55e6a01Smrg 5937518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 5938518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5939518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5940518bcf38Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5941f55e6a01Smrg 5942518bcf38Smrg if test "$GCC" = yes; then 5943518bcf38Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5944518bcf38Smrg # We only want to do this on AIX 4.2 and lower, the check 5945518bcf38Smrg # below for broken collect2 doesn't work under 4.3+ 5946518bcf38Smrg collect2name=`${CC} -print-prog-name=collect2` 5947518bcf38Smrg if test -f "$collect2name" && \ 5948518bcf38Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 5949518bcf38Smrg then 5950518bcf38Smrg # We have reworked collect2 5951518bcf38Smrg : 5952518bcf38Smrg else 5953518bcf38Smrg # We have old collect2 5954518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5955518bcf38Smrg # It fails to find uninstalled libraries when the uninstalled 5956518bcf38Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5957518bcf38Smrg # to unsupported forces relinking 5958518bcf38Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5959518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5960518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5961518bcf38Smrg fi 5962518bcf38Smrg ;; 5963518bcf38Smrg esac 5964518bcf38Smrg shared_flag='-shared' 5965518bcf38Smrg if test "$aix_use_runtimelinking" = yes; then 5966518bcf38Smrg shared_flag="$shared_flag "'${wl}-G' 5967518bcf38Smrg fi 5968518bcf38Smrg else 5969518bcf38Smrg # not using gcc 5970518bcf38Smrg if test "$host_cpu" = ia64; then 5971518bcf38Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5972518bcf38Smrg # chokes on -Wl,-G. The following line is correct: 5973518bcf38Smrg shared_flag='-G' 5974518bcf38Smrg else 5975518bcf38Smrg if test "$aix_use_runtimelinking" = yes; then 5976518bcf38Smrg shared_flag='${wl}-G' 5977518bcf38Smrg else 5978518bcf38Smrg shared_flag='${wl}-bM:SRE' 5979518bcf38Smrg fi 5980518bcf38Smrg fi 5981518bcf38Smrg fi 5982f55e6a01Smrg 5983518bcf38Smrg # It seems that -bexpall does not export symbols beginning with 5984518bcf38Smrg # underscore (_), so it is better to generate a list of symbols to export. 5985518bcf38Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5986518bcf38Smrg if test "$aix_use_runtimelinking" = yes; then 5987518bcf38Smrg # Warning - without using the other runtime loading flags (-brtl), 5988518bcf38Smrg # -berok will link without error, but may produce a broken library. 5989518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5990518bcf38Smrg # Determine the default libpath from the value encoded in an empty executable. 5991518bcf38Smrg _LT_AC_SYS_LIBPATH_AIX 5992518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5993518bcf38Smrg _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" 5994518bcf38Smrg else 5995518bcf38Smrg if test "$host_cpu" = ia64; then 5996518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5997518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5998518bcf38Smrg _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" 5999518bcf38Smrg else 6000518bcf38Smrg # Determine the default libpath from the value encoded in an empty executable. 6001518bcf38Smrg _LT_AC_SYS_LIBPATH_AIX 6002518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6003518bcf38Smrg # Warning - without using the other run time loading flags, 6004518bcf38Smrg # -berok will link without error, but may produce a broken library. 6005518bcf38Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6006518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6007518bcf38Smrg # Exported symbols can be pulled into shared objects from archives 6008518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6009518bcf38Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6010518bcf38Smrg # This is similar to how AIX traditionally builds its shared libraries. 6011518bcf38Smrg _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' 6012518bcf38Smrg fi 6013518bcf38Smrg fi 6014518bcf38Smrg ;; 6015c35d236eSmrg 6016518bcf38Smrg amigaos*) 6017518bcf38Smrg _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)' 6018518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6019518bcf38Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6020518bcf38Smrg # see comment about different semantics on the GNU ld section 6021518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6022518bcf38Smrg ;; 6023c35d236eSmrg 6024518bcf38Smrg bsdi[[45]]*) 6025518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6026518bcf38Smrg ;; 6027c35d236eSmrg 6028518bcf38Smrg cygwin* | mingw* | pw32*) 6029518bcf38Smrg # When not using gcc, we currently assume that we are using 6030518bcf38Smrg # Microsoft Visual C++. 6031518bcf38Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6032518bcf38Smrg # no search path for DLLs. 6033518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6034518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6035518bcf38Smrg # Tell ltmain to make .lib files, not .a files. 6036518bcf38Smrg libext=lib 6037518bcf38Smrg # Tell ltmain to make .dll files, not .so files. 6038518bcf38Smrg shrext_cmds=".dll" 6039518bcf38Smrg # FIXME: Setting linknames here is a bad hack. 6040518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 6041518bcf38Smrg # The linker will automatically build a .lib file if we build a DLL. 6042518bcf38Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 6043518bcf38Smrg # FIXME: Should let the user specify the lib program. 6044518bcf38Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6045518bcf38Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 6046518bcf38Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6047518bcf38Smrg ;; 6048c35d236eSmrg 6049518bcf38Smrg darwin* | rhapsody*) 6050518bcf38Smrg case $host_os in 6051518bcf38Smrg rhapsody* | darwin1.[[012]]) 6052518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 6053518bcf38Smrg ;; 6054518bcf38Smrg *) # Darwin 1.3 on 6055518bcf38Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 6056518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6057518bcf38Smrg else 6058518bcf38Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 6059518bcf38Smrg 10.[[012]]) 6060518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6061518bcf38Smrg ;; 6062518bcf38Smrg 10.*) 6063518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 6064518bcf38Smrg ;; 6065518bcf38Smrg esac 6066518bcf38Smrg fi 6067518bcf38Smrg ;; 6068518bcf38Smrg esac 6069518bcf38Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6070518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6071518bcf38Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 6072518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6073518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 6074518bcf38Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6075518bcf38Smrg if test "$GCC" = yes ; then 6076518bcf38Smrg output_verbose_link_cmd='echo' 6077518bcf38Smrg _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}" 6078518bcf38Smrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 6079518bcf38Smrg _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}" 6080518bcf38Smrg _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}" 6081518bcf38Smrg else 6082518bcf38Smrg case $cc_basename in 6083518bcf38Smrg xlc*) 6084518bcf38Smrg output_verbose_link_cmd='echo' 6085518bcf38Smrg _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' 6086518bcf38Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 6087518bcf38Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 6088518bcf38Smrg _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}' 6089518bcf38Smrg _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}' 6090518bcf38Smrg ;; 6091518bcf38Smrg *) 6092518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6093518bcf38Smrg ;; 6094518bcf38Smrg esac 6095518bcf38Smrg fi 6096518bcf38Smrg ;; 6097c35d236eSmrg 6098518bcf38Smrg dgux*) 6099518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6100518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6101518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6102518bcf38Smrg ;; 6103c35d236eSmrg 6104518bcf38Smrg freebsd1*) 6105518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6106518bcf38Smrg ;; 6107c35d236eSmrg 6108518bcf38Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6109518bcf38Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 6110518bcf38Smrg # does not break anything, and helps significantly (at the cost of a little 6111518bcf38Smrg # extra space). 6112518bcf38Smrg freebsd2.2*) 6113518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6114518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6115518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6116518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6117518bcf38Smrg ;; 6118c35d236eSmrg 6119518bcf38Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6120518bcf38Smrg freebsd2*) 6121518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6122518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6123518bcf38Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6124518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6125c35d236eSmrg ;; 6126c35d236eSmrg 6127518bcf38Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6128518bcf38Smrg freebsd* | dragonfly*) 6129518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 6130518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6131518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6132518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6133518bcf38Smrg ;; 6134c35d236eSmrg 6135518bcf38Smrg hpux9*) 6136518bcf38Smrg if test "$GCC" = yes; then 6137518bcf38Smrg _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' 6138518bcf38Smrg else 6139518bcf38Smrg _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' 6140518bcf38Smrg fi 6141518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6142518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6143518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6144c35d236eSmrg 6145518bcf38Smrg # hardcode_minus_L: Not really in the search PATH, 6146518bcf38Smrg # but as the default location of the library. 6147518bcf38Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6148518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6149518bcf38Smrg ;; 6150c35d236eSmrg 6151518bcf38Smrg hpux10*) 6152518bcf38Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6153518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6154518bcf38Smrg else 6155518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6156518bcf38Smrg fi 6157518bcf38Smrg if test "$with_gnu_ld" = no; then 6158518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6159518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6160c35d236eSmrg 6161518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6162518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6163c35d236eSmrg 6164518bcf38Smrg # hardcode_minus_L: Not really in the search PATH, 6165518bcf38Smrg # but as the default location of the library. 6166518bcf38Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6167518bcf38Smrg fi 6168518bcf38Smrg ;; 6169c35d236eSmrg 6170518bcf38Smrg hpux11*) 6171518bcf38Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6172518bcf38Smrg case $host_cpu in 6173518bcf38Smrg hppa*64*) 6174518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6175518bcf38Smrg ;; 6176518bcf38Smrg ia64*) 6177518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6178518bcf38Smrg ;; 6179518bcf38Smrg *) 6180518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6181518bcf38Smrg ;; 6182518bcf38Smrg esac 6183518bcf38Smrg else 6184518bcf38Smrg case $host_cpu in 6185518bcf38Smrg hppa*64*) 6186518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6187518bcf38Smrg ;; 6188518bcf38Smrg ia64*) 6189518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6190518bcf38Smrg ;; 6191518bcf38Smrg *) 6192518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6193518bcf38Smrg ;; 6194518bcf38Smrg esac 6195518bcf38Smrg fi 6196518bcf38Smrg if test "$with_gnu_ld" = no; then 6197518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6198518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6199c35d236eSmrg 6200518bcf38Smrg case $host_cpu in 6201518bcf38Smrg hppa*64*|ia64*) 6202518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 6203518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6204518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6205518bcf38Smrg ;; 6206518bcf38Smrg *) 6207518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6208518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6209c35d236eSmrg 6210518bcf38Smrg # hardcode_minus_L: Not really in the search PATH, 6211518bcf38Smrg # but as the default location of the library. 6212518bcf38Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6213518bcf38Smrg ;; 6214518bcf38Smrg esac 6215518bcf38Smrg fi 6216c35d236eSmrg ;; 6217c35d236eSmrg 6218518bcf38Smrg irix5* | irix6* | nonstopux*) 6219518bcf38Smrg if test "$GCC" = yes; then 6220518bcf38Smrg _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' 6221518bcf38Smrg else 6222518bcf38Smrg _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' 6223518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6224518bcf38Smrg fi 6225518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6226518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6227518bcf38Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6228518bcf38Smrg ;; 6229c35d236eSmrg 6230518bcf38Smrg netbsd*) 6231518bcf38Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6232518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6233518bcf38Smrg else 6234518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6235518bcf38Smrg fi 6236518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6237518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6238518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6239518bcf38Smrg ;; 6240c35d236eSmrg 6241518bcf38Smrg newsos6) 6242518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6243518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6244518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6245518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6246518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6247518bcf38Smrg ;; 6248c35d236eSmrg 6249518bcf38Smrg openbsd*) 6250518bcf38Smrg if test -f /usr/libexec/ld.so; then 6251518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6252518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6253518bcf38Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6254518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6255518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6256518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6257518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6258518bcf38Smrg else 6259518bcf38Smrg case $host_os in 6260518bcf38Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6261518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6262518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6263518bcf38Smrg ;; 6264518bcf38Smrg *) 6265518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6266518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6267518bcf38Smrg ;; 6268518bcf38Smrg esac 6269518bcf38Smrg fi 6270518bcf38Smrg else 6271518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6272518bcf38Smrg fi 6273518bcf38Smrg ;; 6274c35d236eSmrg 6275518bcf38Smrg os2*) 6276518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6277518bcf38Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6278518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6279518bcf38Smrg _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' 6280518bcf38Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6281518bcf38Smrg ;; 6282c35d236eSmrg 6283518bcf38Smrg osf3*) 6284518bcf38Smrg if test "$GCC" = yes; then 6285518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6286518bcf38Smrg _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' 6287518bcf38Smrg else 6288518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6289518bcf38Smrg _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' 6290518bcf38Smrg fi 6291518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6292518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6293518bcf38Smrg ;; 6294c35d236eSmrg 6295518bcf38Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 6296518bcf38Smrg if test "$GCC" = yes; then 6297518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6298518bcf38Smrg _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' 6299518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6300518bcf38Smrg else 6301518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6302518bcf38Smrg _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' 6303518bcf38Smrg _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~ 6304518bcf38Smrg $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' 6305c35d236eSmrg 6306518bcf38Smrg # Both c and cxx compiler support -rpath directly 6307518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6308518bcf38Smrg fi 6309518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6310518bcf38Smrg ;; 6311f55e6a01Smrg 6312518bcf38Smrg solaris*) 6313518bcf38Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6314518bcf38Smrg if test "$GCC" = yes; then 6315518bcf38Smrg wlarc='${wl}' 6316518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6317518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6318518bcf38Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 6319518bcf38Smrg else 6320518bcf38Smrg wlarc='' 6321518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6322518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6323518bcf38Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6324518bcf38Smrg fi 6325518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6326518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6327518bcf38Smrg case $host_os in 6328518bcf38Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6329518bcf38Smrg *) 6330518bcf38Smrg # The compiler driver will combine and reorder linker options, 6331518bcf38Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 6332518bcf38Smrg # but is careful enough not to reorder. 6333518bcf38Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6334518bcf38Smrg if test "$GCC" = yes; then 6335518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6336518bcf38Smrg else 6337518bcf38Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 63384f6cd06fSmrg fi 6339518bcf38Smrg ;; 6340518bcf38Smrg esac 6341518bcf38Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6342c35d236eSmrg ;; 6343c35d236eSmrg 6344518bcf38Smrg sunos4*) 6345518bcf38Smrg if test "x$host_vendor" = xsequent; then 6346518bcf38Smrg # Use $CC to link under sequent, because it throws in some extra .o 6347518bcf38Smrg # files that make .init and .fini sections work. 6348518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6349518bcf38Smrg else 6350518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6351518bcf38Smrg fi 6352518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6353518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6354518bcf38Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6355518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6356518bcf38Smrg ;; 6357c35d236eSmrg 6358518bcf38Smrg sysv4) 6359518bcf38Smrg case $host_vendor in 6360518bcf38Smrg sni) 6361518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6362518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6363518bcf38Smrg ;; 6364518bcf38Smrg siemens) 6365518bcf38Smrg ## LD is ld it makes a PLAMLIB 6366518bcf38Smrg ## CC just makes a GrossModule. 6367518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6368518bcf38Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6369518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6370518bcf38Smrg ;; 6371518bcf38Smrg motorola) 6372518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6373518bcf38Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6374518bcf38Smrg ;; 6375518bcf38Smrg esac 6376518bcf38Smrg runpath_var='LD_RUN_PATH' 6377518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6378518bcf38Smrg ;; 6379c35d236eSmrg 6380518bcf38Smrg sysv4.3*) 6381518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6382518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6383518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6384518bcf38Smrg ;; 6385c35d236eSmrg 6386518bcf38Smrg sysv4*MP*) 6387518bcf38Smrg if test -d /usr/nec; then 6388518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6389518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6390518bcf38Smrg runpath_var=LD_RUN_PATH 6391518bcf38Smrg hardcode_runpath_var=yes 6392518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6393518bcf38Smrg fi 6394518bcf38Smrg ;; 6395c35d236eSmrg 6396518bcf38Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6397518bcf38Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6398518bcf38Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6399518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6400518bcf38Smrg runpath_var='LD_RUN_PATH' 6401c35d236eSmrg 6402518bcf38Smrg if test "$GCC" = yes; then 6403518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6404518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6405518bcf38Smrg else 6406518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6407518bcf38Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6408518bcf38Smrg fi 6409518bcf38Smrg ;; 6410c35d236eSmrg 6411518bcf38Smrg sysv5* | sco3.2v5* | sco5v6*) 6412518bcf38Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6413518bcf38Smrg # link with -lc, and that would cause any symbols used from libc to 6414518bcf38Smrg # always be unresolved, which means just about no library would 6415518bcf38Smrg # ever link correctly. If we're not using GNU ld we use -z text 6416518bcf38Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6417518bcf38Smrg # as -z defs. 6418518bcf38Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6419518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6420518bcf38Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6421518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6422518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 6423518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 6424518bcf38Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6425518bcf38Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6426518bcf38Smrg runpath_var='LD_RUN_PATH' 6427c35d236eSmrg 6428518bcf38Smrg if test "$GCC" = yes; then 6429518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6430518bcf38Smrg _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' 6431518bcf38Smrg else 6432518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6433518bcf38Smrg _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' 6434518bcf38Smrg fi 6435518bcf38Smrg ;; 6436c35d236eSmrg 6437518bcf38Smrg uts4*) 6438518bcf38Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6439518bcf38Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6440518bcf38Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6441518bcf38Smrg ;; 6442f55e6a01Smrg 6443518bcf38Smrg *) 6444518bcf38Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6445518bcf38Smrg ;; 6446518bcf38Smrg esac 6447518bcf38Smrg fi 6448c35d236eSmrg]) 6449518bcf38SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 6450518bcf38Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6451c35d236eSmrg 6452518bcf38Smrg# 6453518bcf38Smrg# Do we need to explicitly link libc? 6454518bcf38Smrg# 6455518bcf38Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6456518bcf38Smrgx|xyes) 6457518bcf38Smrg # Assume -lc should be added 6458518bcf38Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6459c35d236eSmrg 6460518bcf38Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 6461518bcf38Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 6462518bcf38Smrg *'~'*) 6463518bcf38Smrg # FIXME: we may have to deal with multi-command sequences. 6464518bcf38Smrg ;; 6465518bcf38Smrg '$CC '*) 6466518bcf38Smrg # Test whether the compiler implicitly links with -lc since on some 6467518bcf38Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6468518bcf38Smrg # to ld, don't add -lc before -lgcc. 6469518bcf38Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6470518bcf38Smrg $rm conftest* 6471518bcf38Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6472c35d236eSmrg 6473518bcf38Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6474518bcf38Smrg soname=conftest 6475518bcf38Smrg lib=conftest 6476518bcf38Smrg libobjs=conftest.$ac_objext 6477518bcf38Smrg deplibs= 6478518bcf38Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6479518bcf38Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 6480518bcf38Smrg compiler_flags=-v 6481518bcf38Smrg linker_flags=-v 6482518bcf38Smrg verstring= 6483518bcf38Smrg output_objdir=. 6484518bcf38Smrg libname=conftest 6485518bcf38Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 6486518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6487518bcf38Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 6488518bcf38Smrg then 6489518bcf38Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6490518bcf38Smrg else 6491518bcf38Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6492518bcf38Smrg fi 6493518bcf38Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6494518bcf38Smrg else 6495518bcf38Smrg cat conftest.err 1>&5 6496518bcf38Smrg fi 6497518bcf38Smrg $rm conftest* 6498518bcf38Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 6499518bcf38Smrg ;; 6500518bcf38Smrg esac 6501518bcf38Smrg fi 6502518bcf38Smrg ;; 6503518bcf38Smrgesac 6504518bcf38Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 6505c35d236eSmrg 6506c35d236eSmrg 6507518bcf38Smrg# _LT_AC_FILE_LTDLL_C 6508518bcf38Smrg# ------------------- 6509518bcf38Smrg# Be careful that the start marker always follows a newline. 6510518bcf38SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 6511518bcf38Smrg# /* ltdll.c starts here */ 6512518bcf38Smrg# #define WIN32_LEAN_AND_MEAN 6513518bcf38Smrg# #include <windows.h> 6514518bcf38Smrg# #undef WIN32_LEAN_AND_MEAN 6515518bcf38Smrg# #include <stdio.h> 6516c35d236eSmrg# 6517518bcf38Smrg# #ifndef __CYGWIN__ 6518518bcf38Smrg# # ifdef __CYGWIN32__ 6519518bcf38Smrg# # define __CYGWIN__ __CYGWIN32__ 6520518bcf38Smrg# # endif 6521518bcf38Smrg# #endif 6522c35d236eSmrg# 6523518bcf38Smrg# #ifdef __cplusplus 6524518bcf38Smrg# extern "C" { 6525518bcf38Smrg# #endif 6526518bcf38Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 6527518bcf38Smrg# #ifdef __cplusplus 6528518bcf38Smrg# } 6529518bcf38Smrg# #endif 6530c35d236eSmrg# 6531518bcf38Smrg# #ifdef __CYGWIN__ 6532518bcf38Smrg# #include <cygwin/cygwin_dll.h> 6533518bcf38Smrg# DECLARE_CYGWIN_DLL( DllMain ); 6534518bcf38Smrg# #endif 6535518bcf38Smrg# HINSTANCE __hDllInstance_base; 6536518bcf38Smrg# 6537518bcf38Smrg# BOOL APIENTRY 6538518bcf38Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 6539518bcf38Smrg# { 6540518bcf38Smrg# __hDllInstance_base = hInst; 6541518bcf38Smrg# return TRUE; 6542518bcf38Smrg# } 6543518bcf38Smrg# /* ltdll.c ends here */ 6544518bcf38Smrg])# _LT_AC_FILE_LTDLL_C 6545c35d236eSmrg 6546f55e6a01Smrg 6547518bcf38Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 6548518bcf38Smrg# --------------------------------- 6549518bcf38SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 6550c35d236eSmrg 6551c35d236eSmrg 6552518bcf38Smrg# old names 6553518bcf38SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 6554518bcf38SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 6555518bcf38SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 6556518bcf38SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 6557518bcf38SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 6558518bcf38SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 6559518bcf38SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 6560c35d236eSmrg 6561518bcf38Smrg# This is just to silence aclocal about the macro not being used 6562518bcf38Smrgifelse([AC_DISABLE_FAST_INSTALL]) 6563c35d236eSmrg 6564518bcf38SmrgAC_DEFUN([LT_AC_PROG_GCJ], 6565518bcf38Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 6566518bcf38Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6567518bcf38Smrg AC_SUBST(GCJFLAGS) 6568518bcf38Smrg]) 6569c35d236eSmrg 6570518bcf38SmrgAC_DEFUN([LT_AC_PROG_RC], 6571518bcf38Smrg[AC_CHECK_TOOL(RC, windres, no) 6572c35d236eSmrg]) 6573c35d236eSmrg 65744f6cd06fSmrg 6575518bcf38Smrg# Cheap backport of AS_EXECUTABLE_P and required macros 6576518bcf38Smrg# from Autoconf 2.59; we should not use $as_executable_p directly. 65774f6cd06fSmrg 6578518bcf38Smrg# _AS_TEST_PREPARE 6579518bcf38Smrg# ---------------- 6580518bcf38Smrgm4_ifndef([_AS_TEST_PREPARE], 6581518bcf38Smrg[m4_defun([_AS_TEST_PREPARE], 6582518bcf38Smrg[if test -x / >/dev/null 2>&1; then 6583518bcf38Smrg as_executable_p='test -x' 6584518bcf38Smrgelse 6585518bcf38Smrg as_executable_p='test -f' 6586518bcf38Smrgfi 6587518bcf38Smrg])])# _AS_TEST_PREPARE 65884f6cd06fSmrg 6589518bcf38Smrg# AS_EXECUTABLE_P 6590518bcf38Smrg# --------------- 6591518bcf38Smrg# Check whether a file is executable. 6592518bcf38Smrgm4_ifndef([AS_EXECUTABLE_P], 6593518bcf38Smrg[m4_defun([AS_EXECUTABLE_P], 6594518bcf38Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl 6595518bcf38Smrg$as_executable_p $1[]dnl 6596518bcf38Smrg])])# AS_EXECUTABLE_P 65974f6cd06fSmrg 6598518bcf38Smrg# NOTE: This macro has been submitted for inclusion into # 6599518bcf38Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 6600518bcf38Smrg# a released version of Autoconf we should remove this # 6601518bcf38Smrg# macro and use it instead. # 6602518bcf38Smrg# LT_AC_PROG_SED 6603518bcf38Smrg# -------------- 6604518bcf38Smrg# Check for a fully-functional sed program, that truncates 6605518bcf38Smrg# as few characters as possible. Prefer GNU sed if found. 6606518bcf38SmrgAC_DEFUN([LT_AC_PROG_SED], 6607518bcf38Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 6608518bcf38SmrgAC_CACHE_VAL(lt_cv_path_SED, 6609518bcf38Smrg[# Loop through the user's path and test for sed and gsed. 6610518bcf38Smrg# Then use that list of sed's as ones to test for truncation. 6611518bcf38Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6612518bcf38Smrgfor as_dir in $PATH 6613518bcf38Smrgdo 6614518bcf38Smrg IFS=$as_save_IFS 6615518bcf38Smrg test -z "$as_dir" && as_dir=. 6616518bcf38Smrg for lt_ac_prog in sed gsed; do 6617518bcf38Smrg for ac_exec_ext in '' $ac_executable_extensions; do 6618518bcf38Smrg if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 6619518bcf38Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 6620518bcf38Smrg fi 6621518bcf38Smrg done 6622518bcf38Smrg done 6623518bcf38Smrgdone 6624518bcf38SmrgIFS=$as_save_IFS 6625518bcf38Smrglt_ac_max=0 6626518bcf38Smrglt_ac_count=0 6627518bcf38Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 6628518bcf38Smrg# along with /bin/sed that truncates output. 6629518bcf38Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 6630518bcf38Smrg test ! -f $lt_ac_sed && continue 6631518bcf38Smrg cat /dev/null > conftest.in 6632518bcf38Smrg lt_ac_count=0 6633518bcf38Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 6634518bcf38Smrg # Check for GNU sed and select it if it is found. 6635518bcf38Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 6636518bcf38Smrg lt_cv_path_SED=$lt_ac_sed 6637518bcf38Smrg break 6638518bcf38Smrg fi 6639518bcf38Smrg while true; do 6640518bcf38Smrg cat conftest.in conftest.in >conftest.tmp 6641518bcf38Smrg mv conftest.tmp conftest.in 6642518bcf38Smrg cp conftest.in conftest.nl 6643518bcf38Smrg echo >>conftest.nl 6644518bcf38Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 6645518bcf38Smrg cmp -s conftest.out conftest.nl || break 6646518bcf38Smrg # 10000 chars as input seems more than enough 6647518bcf38Smrg test $lt_ac_count -gt 10 && break 6648518bcf38Smrg lt_ac_count=`expr $lt_ac_count + 1` 6649518bcf38Smrg if test $lt_ac_count -gt $lt_ac_max; then 6650518bcf38Smrg lt_ac_max=$lt_ac_count 6651518bcf38Smrg lt_cv_path_SED=$lt_ac_sed 6652518bcf38Smrg fi 6653518bcf38Smrg done 6654518bcf38Smrgdone 6655518bcf38Smrg]) 6656518bcf38SmrgSED=$lt_cv_path_SED 6657518bcf38SmrgAC_SUBST([SED]) 6658518bcf38SmrgAC_MSG_RESULT([$SED]) 6659c35d236eSmrg]) 6660f55e6a01Smrg 6661c35d236eSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 6662c35d236eSmrg# 6663c35d236eSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 6664c35d236eSmrg# 6665c35d236eSmrg# This program is free software; you can redistribute it and/or modify 6666c35d236eSmrg# it under the terms of the GNU General Public License as published by 6667c35d236eSmrg# the Free Software Foundation; either version 2 of the License, or 6668c35d236eSmrg# (at your option) any later version. 6669c35d236eSmrg# 6670c35d236eSmrg# This program is distributed in the hope that it will be useful, but 6671c35d236eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 6672c35d236eSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 6673c35d236eSmrg# General Public License for more details. 6674c35d236eSmrg# 6675c35d236eSmrg# You should have received a copy of the GNU General Public License 6676c35d236eSmrg# along with this program; if not, write to the Free Software 6677c35d236eSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 6678c35d236eSmrg# 6679c35d236eSmrg# As a special exception to the GNU General Public License, if you 6680c35d236eSmrg# distribute this file as part of a program that contains a 6681c35d236eSmrg# configuration script generated by Autoconf, you may include it under 6682c35d236eSmrg# the same distribution terms that you use for the rest of that program. 6683c35d236eSmrg 6684c35d236eSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 6685c35d236eSmrg# ---------------------------------- 6686c35d236eSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 6687c35d236eSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 6688c35d236eSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 6689c35d236eSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 6690c35d236eSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 6691c35d236eSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 6692c35d236eSmrgfi 6693c35d236eSmrgif test -n "$PKG_CONFIG"; then 6694c35d236eSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 6695c35d236eSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 6696c35d236eSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 6697c35d236eSmrg AC_MSG_RESULT([yes]) 6698c35d236eSmrg else 6699c35d236eSmrg AC_MSG_RESULT([no]) 6700c35d236eSmrg PKG_CONFIG="" 6701c35d236eSmrg fi 6702c35d236eSmrg 6703c35d236eSmrgfi[]dnl 6704c35d236eSmrg])# PKG_PROG_PKG_CONFIG 6705c35d236eSmrg 6706c35d236eSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 6707c35d236eSmrg# 6708c35d236eSmrg# Check to see whether a particular set of modules exists. Similar 6709c35d236eSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 6710c35d236eSmrg# 6711c35d236eSmrg# 6712c35d236eSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 6713c35d236eSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 6714c35d236eSmrg# PKG_CHECK_EXISTS manually 6715c35d236eSmrg# -------------------------------------------------------------- 6716c35d236eSmrgAC_DEFUN([PKG_CHECK_EXISTS], 6717c35d236eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 6718c35d236eSmrgif test -n "$PKG_CONFIG" && \ 6719c35d236eSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 6720c35d236eSmrg m4_ifval([$2], [$2], [:]) 6721c35d236eSmrgm4_ifvaln([$3], [else 6722c35d236eSmrg $3])dnl 6723c35d236eSmrgfi]) 6724c35d236eSmrg 6725c35d236eSmrg 6726c35d236eSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 6727c35d236eSmrg# --------------------------------------------- 6728c35d236eSmrgm4_define([_PKG_CONFIG], 67294f6cd06fSmrg[if test -n "$$1"; then 67304f6cd06fSmrg pkg_cv_[]$1="$$1" 67314f6cd06fSmrg elif test -n "$PKG_CONFIG"; then 67324f6cd06fSmrg PKG_CHECK_EXISTS([$3], 67334f6cd06fSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 67344f6cd06fSmrg [pkg_failed=yes]) 67354f6cd06fSmrg else 67364f6cd06fSmrg pkg_failed=untried 6737c35d236eSmrgfi[]dnl 6738c35d236eSmrg])# _PKG_CONFIG 6739c35d236eSmrg 6740c35d236eSmrg# _PKG_SHORT_ERRORS_SUPPORTED 6741c35d236eSmrg# ----------------------------- 6742c35d236eSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 6743c35d236eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 6744c35d236eSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 6745c35d236eSmrg _pkg_short_errors_supported=yes 6746c35d236eSmrgelse 6747c35d236eSmrg _pkg_short_errors_supported=no 6748c35d236eSmrgfi[]dnl 6749c35d236eSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 6750c35d236eSmrg 6751c35d236eSmrg 6752c35d236eSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 6753c35d236eSmrg# [ACTION-IF-NOT-FOUND]) 6754c35d236eSmrg# 6755c35d236eSmrg# 6756c35d236eSmrg# Note that if there is a possibility the first call to 6757c35d236eSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 6758c35d236eSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 6759c35d236eSmrg# 6760c35d236eSmrg# 6761c35d236eSmrg# -------------------------------------------------------------- 6762c35d236eSmrgAC_DEFUN([PKG_CHECK_MODULES], 6763c35d236eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 6764c35d236eSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 6765c35d236eSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 6766c35d236eSmrg 6767c35d236eSmrgpkg_failed=no 6768c35d236eSmrgAC_MSG_CHECKING([for $1]) 6769c35d236eSmrg 6770c35d236eSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 6771c35d236eSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 6772c35d236eSmrg 6773c35d236eSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 6774c35d236eSmrgand $1[]_LIBS to avoid the need to call pkg-config. 6775c35d236eSmrgSee the pkg-config man page for more details.]) 6776c35d236eSmrg 6777c35d236eSmrgif test $pkg_failed = yes; then 6778c35d236eSmrg _PKG_SHORT_ERRORS_SUPPORTED 6779c35d236eSmrg if test $_pkg_short_errors_supported = yes; then 67804f6cd06fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 6781c35d236eSmrg else 67824f6cd06fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 6783c35d236eSmrg fi 6784c35d236eSmrg # Put the nasty error message in config.log where it belongs 6785c35d236eSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 6786c35d236eSmrg 6787c35d236eSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 6788c35d236eSmrg[Package requirements ($2) were not met: 6789c35d236eSmrg 6790c35d236eSmrg$$1_PKG_ERRORS 6791c35d236eSmrg 6792c35d236eSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 6793c35d236eSmrginstalled software in a non-standard prefix. 6794c35d236eSmrg 6795c35d236eSmrg_PKG_TEXT 6796c35d236eSmrg])], 67974f6cd06fSmrg [AC_MSG_RESULT([no]) 67984f6cd06fSmrg $4]) 6799c35d236eSmrgelif test $pkg_failed = untried; then 6800c35d236eSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 6801c35d236eSmrg[The pkg-config script could not be found or is too old. Make sure it 6802c35d236eSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 6803c35d236eSmrgpath to pkg-config. 6804c35d236eSmrg 6805c35d236eSmrg_PKG_TEXT 6806c35d236eSmrg 68074f6cd06fSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 6808c35d236eSmrg [$4]) 6809c35d236eSmrgelse 6810c35d236eSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 6811c35d236eSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 6812c35d236eSmrg AC_MSG_RESULT([yes]) 6813c35d236eSmrg ifelse([$3], , :, [$3]) 6814c35d236eSmrgfi[]dnl 6815c35d236eSmrg])# PKG_CHECK_MODULES 6816c35d236eSmrg 6817f55e6a01Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 6818c35d236eSmrgdnl 68194f6cd06fSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 6820c35d236eSmrgdnl 68214f6cd06fSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 68224f6cd06fSmrgdnl copy of this software and associated documentation files (the 68234f6cd06fSmrgdnl "Software"), to deal in the Software without restriction, including 68244f6cd06fSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 68254f6cd06fSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 68264f6cd06fSmrgdnl to whom the Software is furnished to do so, provided that the above 68274f6cd06fSmrgdnl copyright notice(s) and this permission notice appear in all copies of 68284f6cd06fSmrgdnl the Software and that both the above copyright notice(s) and this 68294f6cd06fSmrgdnl permission notice appear in supporting documentation. 68304f6cd06fSmrgdnl 6831c35d236eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 6832c35d236eSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 68334f6cd06fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 68344f6cd06fSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 68354f6cd06fSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 68364f6cd06fSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 68374f6cd06fSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 68384f6cd06fSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 68394f6cd06fSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 68404f6cd06fSmrgdnl 68414f6cd06fSmrgdnl Except as contained in this notice, the name of a copyright holder 68424f6cd06fSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 68434f6cd06fSmrgdnl or other dealings in this Software without prior written authorization 68444f6cd06fSmrgdnl of the copyright holder. 68454f6cd06fSmrg 68464f6cd06fSmrg# XORG_MACROS_VERSION(required-version) 68474f6cd06fSmrg# ------------------------------------- 68484f6cd06fSmrg# Minimum version: 1.1.0 68494f6cd06fSmrg# 68504f6cd06fSmrg# If you're using a macro added in Version 1.1 or newer, include this in 68514f6cd06fSmrg# your configure.ac with the minimum required version, such as: 68524f6cd06fSmrg# XORG_MACROS_VERSION(1.1) 68534f6cd06fSmrg# 68544f6cd06fSmrg# To force at least a version with this macro defined, also add: 68554f6cd06fSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 68564f6cd06fSmrg# 68574f6cd06fSmrg# 68584f6cd06fSmrg# See the "minimum version" comment for each macro you use to see what 68594f6cd06fSmrg# version you require. 68604f6cd06fSmrgAC_DEFUN([XORG_MACROS_VERSION],[ 68614f6cd06fSmrg [XORG_MACROS_needed_version=$1 68624f6cd06fSmrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 68634f6cd06fSmrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 68644f6cd06fSmrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 6865f55e6a01Smrg [XORG_MACROS_version=1.2.1 68664f6cd06fSmrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 68674f6cd06fSmrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 68684f6cd06fSmrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 68694f6cd06fSmrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 68704f6cd06fSmrg fi 68714f6cd06fSmrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 68724f6cd06fSmrg 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]) 68734f6cd06fSmrg fi 68744f6cd06fSmrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 68754f6cd06fSmrg]) # XORG_MACROS_VERSION 6876c35d236eSmrg 6877c35d236eSmrg# XORG_PROG_RAWCPP() 6878c35d236eSmrg# ------------------ 68794f6cd06fSmrg# Minimum version: 1.0.0 68804f6cd06fSmrg# 6881c35d236eSmrg# Find cpp program and necessary flags for use in pre-processing text files 6882c35d236eSmrg# such as man pages and config files 6883c35d236eSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 6884c35d236eSmrgAC_REQUIRE([AC_PROG_CPP]) 6885c35d236eSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 6886c35d236eSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 6887c35d236eSmrg 6888c35d236eSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 6889c35d236eSmrg# which is not the best choice for supporting other OS'es, but covers most 6890c35d236eSmrg# of the ones we need for now. 6891c35d236eSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 6892c35d236eSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 6893c35d236eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 6894c35d236eSmrg AC_MSG_RESULT([no]) 6895c35d236eSmrgelse 6896c35d236eSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 6897c35d236eSmrg RAWCPPFLAGS=-undef 6898c35d236eSmrg AC_MSG_RESULT([yes]) 6899f55e6a01Smrg # under Cygwin unix is still defined even with -undef 6900f55e6a01Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 6901f55e6a01Smrg RAWCPPFLAGS="-undef -ansi" 6902f55e6a01Smrg AC_MSG_RESULT([yes, with -ansi]) 6903c35d236eSmrg else 6904c35d236eSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 6905c35d236eSmrg fi 6906c35d236eSmrgfi 6907c35d236eSmrgrm -f conftest.$ac_ext 6908c35d236eSmrg 6909c35d236eSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 6910c35d236eSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 6911c35d236eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 6912c35d236eSmrg AC_MSG_RESULT([no]) 6913c35d236eSmrgelse 6914c35d236eSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 6915c35d236eSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 6916c35d236eSmrg AC_MSG_RESULT([yes]) 6917c35d236eSmrg else 6918c35d236eSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 6919c35d236eSmrg fi 6920c35d236eSmrgfi 6921c35d236eSmrgrm -f conftest.$ac_ext 6922c35d236eSmrgAC_SUBST(RAWCPPFLAGS) 6923c35d236eSmrg]) # XORG_PROG_RAWCPP 6924c35d236eSmrg 6925c35d236eSmrg# XORG_MANPAGE_SECTIONS() 6926c35d236eSmrg# ----------------------- 69274f6cd06fSmrg# Minimum version: 1.0.0 69284f6cd06fSmrg# 6929c35d236eSmrg# Determine which sections man pages go in for the different man page types 6930c35d236eSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 6931c35d236eSmrg# Not sure if there's any better way than just hardcoding by OS name. 6932c35d236eSmrg# Override default settings by setting environment variables 6933c35d236eSmrg 6934c35d236eSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 6935c35d236eSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 6936c35d236eSmrg 6937c35d236eSmrgif test x$APP_MAN_SUFFIX = x ; then 69384f6cd06fSmrg APP_MAN_SUFFIX=1 6939c35d236eSmrgfi 6940c35d236eSmrgif test x$APP_MAN_DIR = x ; then 69414f6cd06fSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 6942c35d236eSmrgfi 6943c35d236eSmrg 6944c35d236eSmrgif test x$LIB_MAN_SUFFIX = x ; then 69454f6cd06fSmrg LIB_MAN_SUFFIX=3 6946c35d236eSmrgfi 6947c35d236eSmrgif test x$LIB_MAN_DIR = x ; then 69484f6cd06fSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 6949c35d236eSmrgfi 6950c35d236eSmrg 6951c35d236eSmrgif test x$FILE_MAN_SUFFIX = x ; then 6952c35d236eSmrg case $host_os in 6953c35d236eSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 6954c35d236eSmrg *) FILE_MAN_SUFFIX=5 ;; 6955c35d236eSmrg esac 6956c35d236eSmrgfi 6957c35d236eSmrgif test x$FILE_MAN_DIR = x ; then 69584f6cd06fSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 6959c35d236eSmrgfi 6960c35d236eSmrg 6961c35d236eSmrgif test x$MISC_MAN_SUFFIX = x ; then 6962c35d236eSmrg case $host_os in 6963c35d236eSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 6964c35d236eSmrg *) MISC_MAN_SUFFIX=7 ;; 6965c35d236eSmrg esac 6966c35d236eSmrgfi 6967c35d236eSmrgif test x$MISC_MAN_DIR = x ; then 69684f6cd06fSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 6969c35d236eSmrgfi 6970c35d236eSmrg 6971c35d236eSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 6972c35d236eSmrg case $host_os in 6973c35d236eSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 6974c35d236eSmrg *) DRIVER_MAN_SUFFIX=4 ;; 6975c35d236eSmrg esac 6976c35d236eSmrgfi 6977c35d236eSmrgif test x$DRIVER_MAN_DIR = x ; then 69784f6cd06fSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 6979c35d236eSmrgfi 6980c35d236eSmrg 6981c35d236eSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 6982c35d236eSmrg case $host_os in 6983c35d236eSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 6984c35d236eSmrg *) ADMIN_MAN_SUFFIX=8 ;; 6985c35d236eSmrg esac 6986c35d236eSmrgfi 6987c35d236eSmrgif test x$ADMIN_MAN_DIR = x ; then 6988c35d236eSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 6989c35d236eSmrgfi 6990c35d236eSmrg 6991c35d236eSmrg 6992c35d236eSmrgAC_SUBST([APP_MAN_SUFFIX]) 6993c35d236eSmrgAC_SUBST([LIB_MAN_SUFFIX]) 6994c35d236eSmrgAC_SUBST([FILE_MAN_SUFFIX]) 6995c35d236eSmrgAC_SUBST([MISC_MAN_SUFFIX]) 6996c35d236eSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 6997c35d236eSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 6998c35d236eSmrgAC_SUBST([APP_MAN_DIR]) 6999c35d236eSmrgAC_SUBST([LIB_MAN_DIR]) 7000c35d236eSmrgAC_SUBST([FILE_MAN_DIR]) 7001c35d236eSmrgAC_SUBST([MISC_MAN_DIR]) 7002c35d236eSmrgAC_SUBST([DRIVER_MAN_DIR]) 7003c35d236eSmrgAC_SUBST([ADMIN_MAN_DIR]) 7004c35d236eSmrg]) # XORG_MANPAGE_SECTIONS 7005c35d236eSmrg 7006c35d236eSmrg# XORG_CHECK_LINUXDOC 7007c35d236eSmrg# ------------------- 70084f6cd06fSmrg# Minimum version: 1.0.0 70094f6cd06fSmrg# 7010c35d236eSmrg# Defines the variable MAKE_TEXT if the necessary tools and 7011c35d236eSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 7012c35d236eSmrg# Whether or not the necessary tools and files are found can be checked 7013c35d236eSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 7014c35d236eSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 7015f55e6a01Smrgif test x$XORG_SGML_PATH = x ; then 7016f55e6a01Smrg XORG_SGML_PATH=$prefix/share/sgml 7017f55e6a01Smrgfi 70184f6cd06fSmrgHAVE_DEFS_ENT= 70194f6cd06fSmrg 70204f6cd06fSmrgif test x"$cross_compiling" = x"yes" ; then 70214f6cd06fSmrg HAVE_DEFS_ENT=no 70224f6cd06fSmrgelse 70234f6cd06fSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 70244f6cd06fSmrgfi 7025c35d236eSmrg 7026c35d236eSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 7027c35d236eSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 7028c35d236eSmrg 7029c35d236eSmrgAC_MSG_CHECKING([Whether to build documentation]) 7030c35d236eSmrg 70314f6cd06fSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 7032c35d236eSmrg BUILDDOC=yes 7033c35d236eSmrgelse 7034c35d236eSmrg BUILDDOC=no 7035c35d236eSmrgfi 7036c35d236eSmrg 7037c35d236eSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 7038c35d236eSmrg 7039c35d236eSmrgAC_MSG_RESULT([$BUILDDOC]) 7040c35d236eSmrg 7041c35d236eSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 7042c35d236eSmrg 70434f6cd06fSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 7044c35d236eSmrg BUILDPDFDOC=yes 7045c35d236eSmrgelse 7046c35d236eSmrg BUILDPDFDOC=no 7047c35d236eSmrgfi 7048c35d236eSmrg 7049c35d236eSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 7050c35d236eSmrg 7051c35d236eSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 7052c35d236eSmrg 70534f6cd06fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 70544f6cd06fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 7055c35d236eSmrgMAKE_PDF="$PS2PDF" 70564f6cd06fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 7057c35d236eSmrg 7058c35d236eSmrgAC_SUBST(MAKE_TEXT) 7059c35d236eSmrgAC_SUBST(MAKE_PS) 7060c35d236eSmrgAC_SUBST(MAKE_PDF) 7061c35d236eSmrgAC_SUBST(MAKE_HTML) 7062c35d236eSmrg]) # XORG_CHECK_LINUXDOC 7063c35d236eSmrg 70644f6cd06fSmrg# XORG_CHECK_DOCBOOK 70654f6cd06fSmrg# ------------------- 70664f6cd06fSmrg# Minimum version: 1.0.0 70674f6cd06fSmrg# 70684f6cd06fSmrg# Checks for the ability to build output formats from SGML DocBook source. 70694f6cd06fSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 70704f6cd06fSmrg# indicates whether the necessary tools and files are found and, if set, 70714f6cd06fSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 70724f6cd06fSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 7073f55e6a01Smrgif test x$XORG_SGML_PATH = x ; then 7074f55e6a01Smrg XORG_SGML_PATH=$prefix/share/sgml 7075f55e6a01Smrgfi 70764f6cd06fSmrgHAVE_DEFS_ENT= 70774f6cd06fSmrgBUILDTXTDOC=no 70784f6cd06fSmrgBUILDPDFDOC=no 70794f6cd06fSmrgBUILDPSDOC=no 70804f6cd06fSmrgBUILDHTMLDOC=no 70814f6cd06fSmrg 70824f6cd06fSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 70834f6cd06fSmrg 70844f6cd06fSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 70854f6cd06fSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 70864f6cd06fSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 70874f6cd06fSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 70884f6cd06fSmrg 70894f6cd06fSmrgAC_MSG_CHECKING([Whether to build text documentation]) 70904f6cd06fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 70914f6cd06fSmrg test x$BUILD_TXTDOC != xno; then 70924f6cd06fSmrg BUILDTXTDOC=yes 70934f6cd06fSmrgfi 70944f6cd06fSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 70954f6cd06fSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 70964f6cd06fSmrg 70974f6cd06fSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 70984f6cd06fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 70994f6cd06fSmrg test x$BUILD_PDFDOC != xno; then 71004f6cd06fSmrg BUILDPDFDOC=yes 71014f6cd06fSmrgfi 71024f6cd06fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 71034f6cd06fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 71044f6cd06fSmrg 71054f6cd06fSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 71064f6cd06fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 71074f6cd06fSmrg test x$BUILD_PSDOC != xno; then 71084f6cd06fSmrg BUILDPSDOC=yes 71094f6cd06fSmrgfi 71104f6cd06fSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 71114f6cd06fSmrgAC_MSG_RESULT([$BUILDPSDOC]) 71124f6cd06fSmrg 71134f6cd06fSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 71144f6cd06fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 71154f6cd06fSmrg test x$BUILD_HTMLDOC != xno; then 71164f6cd06fSmrg BUILDHTMLDOC=yes 71174f6cd06fSmrgfi 71184f6cd06fSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 71194f6cd06fSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 71204f6cd06fSmrg 71214f6cd06fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 71224f6cd06fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 71234f6cd06fSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 71244f6cd06fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 71254f6cd06fSmrg 71264f6cd06fSmrgAC_SUBST(MAKE_TEXT) 71274f6cd06fSmrgAC_SUBST(MAKE_PS) 71284f6cd06fSmrgAC_SUBST(MAKE_PDF) 71294f6cd06fSmrgAC_SUBST(MAKE_HTML) 71304f6cd06fSmrg]) # XORG_CHECK_DOCBOOK 71314f6cd06fSmrg 7132c35d236eSmrg# XORG_CHECK_MALLOC_ZERO 7133c35d236eSmrg# ---------------------- 71344f6cd06fSmrg# Minimum version: 1.0.0 71354f6cd06fSmrg# 7136c35d236eSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 7137c35d236eSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 7138c35d236eSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 7139c35d236eSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 7140c35d236eSmrgAC_ARG_ENABLE(malloc0returnsnull, 7141c35d236eSmrg AC_HELP_STRING([--enable-malloc0returnsnull], 7142c35d236eSmrg [malloc(0) returns NULL (default: auto)]), 7143c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 7144c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 7145c35d236eSmrg 7146c35d236eSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 7147c35d236eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 7148c35d236eSmrg AC_RUN_IFELSE([ 7149c35d236eSmrgchar *malloc(); 7150c35d236eSmrgchar *realloc(); 7151c35d236eSmrgchar *calloc(); 7152c35d236eSmrgmain() { 7153c35d236eSmrg char *m0, *r0, *c0, *p; 7154c35d236eSmrg m0 = malloc(0); 7155c35d236eSmrg p = malloc(10); 7156c35d236eSmrg r0 = realloc(p,0); 7157c35d236eSmrg c0 = calloc(0); 7158c35d236eSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 7159c35d236eSmrg}], 7160c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 7161c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 7162c35d236eSmrgfi 7163c35d236eSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 7164c35d236eSmrg 7165c35d236eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 7166c35d236eSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 7167c35d236eSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 7168c35d236eSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 7169c35d236eSmrgelse 7170c35d236eSmrg MALLOC_ZERO_CFLAGS="" 7171c35d236eSmrg XMALLOC_ZERO_CFLAGS="" 7172c35d236eSmrg XTMALLOC_ZERO_CFLAGS="" 7173c35d236eSmrgfi 7174c35d236eSmrg 7175c35d236eSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 7176c35d236eSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 7177c35d236eSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 7178c35d236eSmrg]) # XORG_CHECK_MALLOC_ZERO 7179c35d236eSmrg 71804f6cd06fSmrg# XORG_WITH_LINT() 71814f6cd06fSmrg# ---------------- 71824f6cd06fSmrg# Minimum version: 1.1.0 71834f6cd06fSmrg# 71844f6cd06fSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 71854f6cd06fSmrg# is specified. (Use --with-lint=sparse for sparse.) 71864f6cd06fSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 71874f6cd06fSmrg# Sets $LINT_FLAGS to flags to pass to source checker 71884f6cd06fSmrg# Sets LINT automake conditional if enabled (default: disabled) 71894f6cd06fSmrg# 71904f6cd06fSmrgAC_DEFUN([XORG_WITH_LINT],[ 71914f6cd06fSmrg 71924f6cd06fSmrg# Allow checking code with lint, sparse, etc. 71934f6cd06fSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 71944f6cd06fSmrg [Use a lint-style source code checker (default: disabled)])], 71954f6cd06fSmrg [use_lint=$withval], [use_lint=no]) 71964f6cd06fSmrgif test "x$use_lint" = "xyes" ; then 71974f6cd06fSmrg LINT="lint" 71984f6cd06fSmrgelse 71994f6cd06fSmrg LINT="$use_lint" 72004f6cd06fSmrgfi 72014f6cd06fSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 72024f6cd06fSmrg case $LINT in 72034f6cd06fSmrg lint|*/lint) 72044f6cd06fSmrg case $host_os in 72054f6cd06fSmrg solaris*) 72064f6cd06fSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 72074f6cd06fSmrg ;; 72084f6cd06fSmrg esac 72094f6cd06fSmrg ;; 72104f6cd06fSmrg esac 72114f6cd06fSmrgfi 72124f6cd06fSmrg 72134f6cd06fSmrgAC_SUBST(LINT) 72144f6cd06fSmrgAC_SUBST(LINT_FLAGS) 72154f6cd06fSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 72164f6cd06fSmrg 72174f6cd06fSmrg]) # XORG_WITH_LINT 72184f6cd06fSmrg 72194f6cd06fSmrg# XORG_LINT_LIBRARY(LIBNAME) 72204f6cd06fSmrg# -------------------------- 72214f6cd06fSmrg# Minimum version: 1.1.0 72224f6cd06fSmrg# 72234f6cd06fSmrg# Sets up flags for building lint libraries for checking programs that call 72244f6cd06fSmrg# functions in the library. 72254f6cd06fSmrg# Disabled by default, enable with --enable-lint-library 72264f6cd06fSmrg# Sets: 72274f6cd06fSmrg# @LINTLIB@ - name of lint library file to make 72284f6cd06fSmrg# MAKE_LINT_LIB - automake conditional 72294f6cd06fSmrg# 72304f6cd06fSmrg 72314f6cd06fSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 72324f6cd06fSmrgAC_REQUIRE([XORG_WITH_LINT]) 72334f6cd06fSmrg# Build lint "library" for more indepth checks of programs calling this library 72344f6cd06fSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 72354f6cd06fSmrg [Create lint library (default: disabled)])], 72364f6cd06fSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 72374f6cd06fSmrgif test "x$make_lint_lib" != "xno" ; then 72384f6cd06fSmrg if test "x$LINT" = "xno" ; then 72394f6cd06fSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 72404f6cd06fSmrg fi 72414f6cd06fSmrg if test "x$make_lint_lib" = "xyes" ; then 72424f6cd06fSmrg LINTLIB=llib-l$1.ln 72434f6cd06fSmrg else 72444f6cd06fSmrg LINTLIB=$make_lint_lib 72454f6cd06fSmrg fi 72464f6cd06fSmrgfi 72474f6cd06fSmrgAC_SUBST(LINTLIB) 72484f6cd06fSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 72494f6cd06fSmrg 72504f6cd06fSmrg]) # XORG_LINT_LIBRARY 72514f6cd06fSmrg 7252f55e6a01Smrg# XORG_CWARNFLAGS 7253f55e6a01Smrg# --------------- 7254f55e6a01Smrg# Minimum version: 1.2.0 7255f55e6a01Smrg# 7256f55e6a01Smrg# Defines CWARNFLAGS to enable C compiler warnings. 7257f55e6a01Smrg# 7258f55e6a01SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 7259f55e6a01SmrgAC_REQUIRE([AC_PROG_CC]) 7260f55e6a01Smrgif test "x$GCC" = xyes ; then 7261f55e6a01Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 7262f55e6a01Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 7263f55e6a01Smrg-Wbad-function-cast" 7264f55e6a01Smrg case `gcc -dumpversion` in 7265f55e6a01Smrg 3.4.* | 4.*) 7266f55e6a01Smrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 7267f55e6a01Smrg ;; 7268f55e6a01Smrg esac 7269f55e6a01Smrgelse 7270f55e6a01Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 7271f55e6a01Smrg if test "x$SUNCC" = "xyes"; then 7272f55e6a01Smrg CWARNFLAGS="-v" 7273f55e6a01Smrg fi 7274f55e6a01Smrgfi 7275f55e6a01SmrgAC_SUBST(CWARNFLAGS) 7276f55e6a01Smrg]) # XORG_CWARNFLAGS 7277c35d236eSmrgdnl Copyright 2005 Red Hat, Inc 7278c35d236eSmrgdnl 7279c35d236eSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 7280c35d236eSmrgdnl documentation for any purpose is hereby granted without fee, provided that 7281c35d236eSmrgdnl the above copyright notice appear in all copies and that both that 7282c35d236eSmrgdnl copyright notice and this permission notice appear in supporting 7283c35d236eSmrgdnl documentation. 7284c35d236eSmrgdnl 7285c35d236eSmrgdnl The above copyright notice and this permission notice shall be included 7286c35d236eSmrgdnl in all copies or substantial portions of the Software. 7287c35d236eSmrgdnl 7288c35d236eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 7289c35d236eSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 7290c35d236eSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7291c35d236eSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 7292c35d236eSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 7293c35d236eSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 7294c35d236eSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 7295c35d236eSmrgdnl 7296c35d236eSmrgdnl Except as contained in this notice, the name of the copyright holders shall 7297c35d236eSmrgdnl not be used in advertising or otherwise to promote the sale, use or 7298c35d236eSmrgdnl other dealings in this Software without prior written authorization 7299c35d236eSmrgdnl from the copyright holders. 7300c35d236eSmrgdnl 7301c35d236eSmrg 7302c35d236eSmrg# XORG_RELEASE_VERSION 7303c35d236eSmrg# -------------------- 7304c35d236eSmrg# Adds --with/without-release-string and changes the PACKAGE and 7305c35d236eSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 73064f6cd06fSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 73074f6cd06fSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 7308c35d236eSmrg 7309c35d236eSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 7310c35d236eSmrg AC_ARG_WITH(release-version, 7311c35d236eSmrg AC_HELP_STRING([--with-release-version=STRING], 7312c35d236eSmrg [Use release version string in package name]), 7313c35d236eSmrg [RELEASE_VERSION="$withval"], 7314c35d236eSmrg [RELEASE_VERSION=""]) 7315c35d236eSmrg if test "x$RELEASE_VERSION" != "x"; then 7316c35d236eSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 7317c35d236eSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 7318c35d236eSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 7319c35d236eSmrg fi 73204f6cd06fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 73214f6cd06fSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 73224f6cd06fSmrg [Major version of this package]) 73234f6cd06fSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 73244f6cd06fSmrg if test "x$PVM" = "x"; then 73254f6cd06fSmrg PVM="0" 73264f6cd06fSmrg fi 73274f6cd06fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 73284f6cd06fSmrg [$PVM], 73294f6cd06fSmrg [Minor version of this package]) 73304f6cd06fSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 73314f6cd06fSmrg if test "x$PVP" = "x"; then 73324f6cd06fSmrg PVP="0" 73334f6cd06fSmrg fi 73344f6cd06fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 73354f6cd06fSmrg [$PVP], 73364f6cd06fSmrg [Patch version of this package]) 7337c35d236eSmrg]) 7338c35d236eSmrg 7339f55e6a01Smrg# XORG_CHANGELOG() 7340f55e6a01Smrg# ---------------- 7341f55e6a01Smrg# Minimum version: 1.2.0 7342f55e6a01Smrg# 7343f55e6a01Smrg# Defines the variable CHANGELOG_CMD as the command to generate 7344f55e6a01Smrg# ChangeLog from git. 7345f55e6a01Smrg# 7346f55e6a01Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 7347f55e6a01Smrg# 7348f55e6a01SmrgAC_DEFUN([XORG_CHANGELOG], [ 7349f55e6a01SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 7350f55e6a01Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 7351f55e6a01Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 7352f55e6a01SmrgAC_SUBST([CHANGELOG_CMD]) 7353f55e6a01SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 7354f55e6a01Smrg]) # XORG_CHANGELOG 7355f55e6a01Smrg 7356f55e6a01Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 7357c35d236eSmrg# 7358c35d236eSmrg# This file is free software; the Free Software Foundation 7359c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7360c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7361c35d236eSmrg 7362c35d236eSmrg# AM_AUTOMAKE_VERSION(VERSION) 7363c35d236eSmrg# ---------------------------- 7364c35d236eSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 7365c35d236eSmrg# generated from the m4 files accompanying Automake X.Y. 73664f6cd06fSmrg# (This private macro should not be called outside this file.) 73674f6cd06fSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 7368518bcf38Smrg[am__api_version='1.11' 73694f6cd06fSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 73704f6cd06fSmrgdnl require some minimum version. Point them to the right macro. 7371518bcf38Smrgm4_if([$1], [1.11], [], 73724f6cd06fSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 73734f6cd06fSmrg]) 73744f6cd06fSmrg 73754f6cd06fSmrg# _AM_AUTOCONF_VERSION(VERSION) 73764f6cd06fSmrg# ----------------------------- 73774f6cd06fSmrg# aclocal traces this macro to find the Autoconf version. 73784f6cd06fSmrg# This is a private macro too. Using m4_define simplifies 73794f6cd06fSmrg# the logic in aclocal, which can simply ignore this definition. 73804f6cd06fSmrgm4_define([_AM_AUTOCONF_VERSION], []) 7381c35d236eSmrg 7382c35d236eSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 7383c35d236eSmrg# ------------------------------- 73844f6cd06fSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 7385f55e6a01Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 7386c35d236eSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 7387518bcf38Smrg[AM_AUTOMAKE_VERSION([1.11])dnl 73884f6cd06fSmrgm4_ifndef([AC_AUTOCONF_VERSION], 73894f6cd06fSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 7390f55e6a01Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 7391c35d236eSmrg 7392c35d236eSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 7393c35d236eSmrg 7394c35d236eSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7395c35d236eSmrg# 7396c35d236eSmrg# This file is free software; the Free Software Foundation 7397c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7398c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7399c35d236eSmrg 7400c35d236eSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 7401c35d236eSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 7402c35d236eSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 7403c35d236eSmrg# 7404c35d236eSmrg# Of course, Automake must honor this variable whenever it calls a 7405c35d236eSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 7406c35d236eSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7407c35d236eSmrg# depending on how configure is run. This is pretty annoying, since 7408c35d236eSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7409c35d236eSmrg# source directory, any form will work fine, but in subdirectories a 7410c35d236eSmrg# relative path needs to be adjusted first. 7411c35d236eSmrg# 7412c35d236eSmrg# $ac_aux_dir/missing 7413c35d236eSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 7414c35d236eSmrg# $top_srcdir/$ac_aux_dir/missing 7415c35d236eSmrg# fails if $ac_aux_dir is absolute, 7416c35d236eSmrg# fails when called from a subdirectory in a VPATH build with 7417c35d236eSmrg# a relative $ac_aux_dir 7418c35d236eSmrg# 7419c35d236eSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 7420c35d236eSmrg# are both prefixed by $srcdir. In an in-source build this is usually 7421c35d236eSmrg# harmless because $srcdir is `.', but things will broke when you 7422c35d236eSmrg# start a VPATH build or use an absolute $srcdir. 7423c35d236eSmrg# 7424c35d236eSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 7425c35d236eSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 7426c35d236eSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 7427c35d236eSmrg# and then we would define $MISSING as 7428c35d236eSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 7429c35d236eSmrg# This will work as long as MISSING is not called from configure, because 7430c35d236eSmrg# unfortunately $(top_srcdir) has no meaning in configure. 7431c35d236eSmrg# However there are other variables, like CC, which are often used in 7432c35d236eSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 7433c35d236eSmrg# 7434c35d236eSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 7435c35d236eSmrg# absolute PATH. The drawback is that using absolute paths prevent a 7436c35d236eSmrg# configured tree to be moved without reconfiguration. 7437c35d236eSmrg 7438c35d236eSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 7439c35d236eSmrg[dnl Rely on autoconf to set up CDPATH properly. 7440c35d236eSmrgAC_PREREQ([2.50])dnl 7441c35d236eSmrg# expand $ac_aux_dir to an absolute path 7442c35d236eSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 7443c35d236eSmrg]) 7444c35d236eSmrg 7445c35d236eSmrg# AM_CONDITIONAL -*- Autoconf -*- 7446c35d236eSmrg 7447518bcf38Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 7448c35d236eSmrg# Free Software Foundation, Inc. 7449c35d236eSmrg# 7450c35d236eSmrg# This file is free software; the Free Software Foundation 7451c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7452c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7453c35d236eSmrg 7454518bcf38Smrg# serial 9 7455c35d236eSmrg 7456c35d236eSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 7457c35d236eSmrg# ------------------------------------- 7458c35d236eSmrg# Define a conditional. 7459c35d236eSmrgAC_DEFUN([AM_CONDITIONAL], 7460c35d236eSmrg[AC_PREREQ(2.52)dnl 7461c35d236eSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 7462c35d236eSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 74634f6cd06fSmrgAC_SUBST([$1_TRUE])dnl 74644f6cd06fSmrgAC_SUBST([$1_FALSE])dnl 74654f6cd06fSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 74664f6cd06fSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 7467518bcf38Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 7468c35d236eSmrgif $2; then 7469c35d236eSmrg $1_TRUE= 7470c35d236eSmrg $1_FALSE='#' 7471c35d236eSmrgelse 7472c35d236eSmrg $1_TRUE='#' 7473c35d236eSmrg $1_FALSE= 7474c35d236eSmrgfi 7475c35d236eSmrgAC_CONFIG_COMMANDS_PRE( 7476c35d236eSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 7477c35d236eSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 7478c35d236eSmrgUsually this means the macro was only invoked conditionally.]]) 7479c35d236eSmrgfi])]) 7480c35d236eSmrg 7481518bcf38Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 7482c35d236eSmrg# Free Software Foundation, Inc. 7483c35d236eSmrg# 7484c35d236eSmrg# This file is free software; the Free Software Foundation 7485c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7486c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7487c35d236eSmrg 7488518bcf38Smrg# serial 10 7489c35d236eSmrg 7490c35d236eSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 7491c35d236eSmrg# written in clear, in which case automake, when reading aclocal.m4, 7492c35d236eSmrg# will think it sees a *use*, and therefore will trigger all it's 7493c35d236eSmrg# C support machinery. Also note that it means that autoscan, seeing 7494c35d236eSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 7495c35d236eSmrg 7496c35d236eSmrg 7497c35d236eSmrg# _AM_DEPENDENCIES(NAME) 7498c35d236eSmrg# ---------------------- 7499c35d236eSmrg# See how the compiler implements dependency checking. 7500c35d236eSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 7501c35d236eSmrg# We try a few techniques and use that to set a single cache variable. 7502c35d236eSmrg# 7503c35d236eSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 7504c35d236eSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 7505c35d236eSmrg# dependency, and given that the user is not expected to run this macro, 7506c35d236eSmrg# just rely on AC_PROG_CC. 7507c35d236eSmrgAC_DEFUN([_AM_DEPENDENCIES], 7508c35d236eSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 7509c35d236eSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 7510c35d236eSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 7511c35d236eSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 7512c35d236eSmrg 7513c35d236eSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 7514c35d236eSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 7515c35d236eSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 75164f6cd06fSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 7517c35d236eSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 7518c35d236eSmrg [depcc="$$1" am_compiler_list=]) 7519c35d236eSmrg 7520c35d236eSmrgAC_CACHE_CHECK([dependency style of $depcc], 7521c35d236eSmrg [am_cv_$1_dependencies_compiler_type], 7522c35d236eSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 7523c35d236eSmrg # We make a subdir and do the tests there. Otherwise we can end up 7524c35d236eSmrg # making bogus files that we don't know about and never remove. For 7525c35d236eSmrg # instance it was reported that on HP-UX the gcc test will end up 7526c35d236eSmrg # making a dummy file named `D' -- because `-MD' means `put the output 7527c35d236eSmrg # in D'. 7528c35d236eSmrg mkdir conftest.dir 7529c35d236eSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 7530c35d236eSmrg # using a relative directory. 7531c35d236eSmrg cp "$am_depcomp" conftest.dir 7532c35d236eSmrg cd conftest.dir 7533c35d236eSmrg # We will build objects and dependencies in a subdirectory because 7534c35d236eSmrg # it helps to detect inapplicable dependency modes. For instance 7535c35d236eSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 7536c35d236eSmrg # side effect of compilation, but ICC will put the dependencies in 7537c35d236eSmrg # the current directory while Tru64 will put them in the object 7538c35d236eSmrg # directory. 7539c35d236eSmrg mkdir sub 7540c35d236eSmrg 7541c35d236eSmrg am_cv_$1_dependencies_compiler_type=none 7542c35d236eSmrg if test "$am_compiler_list" = ""; then 7543c35d236eSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 7544c35d236eSmrg fi 7545518bcf38Smrg am__universal=false 7546518bcf38Smrg m4_case([$1], [CC], 7547518bcf38Smrg [case " $depcc " in #( 7548518bcf38Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 7549518bcf38Smrg esac], 7550518bcf38Smrg [CXX], 7551518bcf38Smrg [case " $depcc " in #( 7552518bcf38Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 7553518bcf38Smrg esac]) 7554518bcf38Smrg 7555c35d236eSmrg for depmode in $am_compiler_list; do 7556c35d236eSmrg # Setup a source with many dependencies, because some compilers 7557c35d236eSmrg # like to wrap large dependency lists on column 80 (with \), and 7558c35d236eSmrg # we should not choose a depcomp mode which is confused by this. 7559c35d236eSmrg # 7560c35d236eSmrg # We need to recreate these files for each test, as the compiler may 7561c35d236eSmrg # overwrite some of them when testing with obscure command lines. 7562c35d236eSmrg # This happens at least with the AIX C compiler. 7563c35d236eSmrg : > sub/conftest.c 7564c35d236eSmrg for i in 1 2 3 4 5 6; do 7565c35d236eSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 7566c35d236eSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 7567c35d236eSmrg # Solaris 8's {/usr,}/bin/sh. 7568c35d236eSmrg touch sub/conftst$i.h 7569c35d236eSmrg done 7570c35d236eSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 7571c35d236eSmrg 7572518bcf38Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 7573518bcf38Smrg # mode. It turns out that the SunPro C++ compiler does not properly 7574518bcf38Smrg # handle `-M -o', and we need to detect this. Also, some Intel 7575518bcf38Smrg # versions had trouble with output in subdirs 7576518bcf38Smrg am__obj=sub/conftest.${OBJEXT-o} 7577518bcf38Smrg am__minus_obj="-o $am__obj" 7578c35d236eSmrg case $depmode in 7579518bcf38Smrg gcc) 7580518bcf38Smrg # This depmode causes a compiler race in universal mode. 7581518bcf38Smrg test "$am__universal" = false || continue 7582518bcf38Smrg ;; 7583c35d236eSmrg nosideeffect) 7584c35d236eSmrg # after this tag, mechanisms are not by side-effect, so they'll 7585c35d236eSmrg # only be used when explicitly requested 7586c35d236eSmrg if test "x$enable_dependency_tracking" = xyes; then 7587c35d236eSmrg continue 7588c35d236eSmrg else 7589c35d236eSmrg break 7590c35d236eSmrg fi 7591c35d236eSmrg ;; 7592518bcf38Smrg msvisualcpp | msvcmsys) 7593518bcf38Smrg # This compiler won't grok `-c -o', but also, the minuso test has 7594518bcf38Smrg # not run yet. These depmodes are late enough in the game, and 7595518bcf38Smrg # so weak that their functioning should not be impacted. 7596518bcf38Smrg am__obj=conftest.${OBJEXT-o} 7597518bcf38Smrg am__minus_obj= 7598518bcf38Smrg ;; 7599c35d236eSmrg none) break ;; 7600c35d236eSmrg esac 7601c35d236eSmrg if depmode=$depmode \ 7602518bcf38Smrg source=sub/conftest.c object=$am__obj \ 7603c35d236eSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 7604518bcf38Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 7605c35d236eSmrg >/dev/null 2>conftest.err && 76064f6cd06fSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 7607c35d236eSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 7608518bcf38Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 7609c35d236eSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 7610c35d236eSmrg # icc doesn't choke on unknown options, it will just issue warnings 7611c35d236eSmrg # or remarks (even with -Werror). So we grep stderr for any message 7612c35d236eSmrg # that says an option was ignored or not supported. 7613c35d236eSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 7614c35d236eSmrg # icc: Command line warning: ignoring option '-M'; no argument required 7615c35d236eSmrg # The diagnosis changed in icc 8.0: 7616c35d236eSmrg # icc: Command line remark: option '-MP' not supported 7617c35d236eSmrg if (grep 'ignoring option' conftest.err || 7618c35d236eSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 7619c35d236eSmrg am_cv_$1_dependencies_compiler_type=$depmode 7620c35d236eSmrg break 7621c35d236eSmrg fi 7622c35d236eSmrg fi 7623c35d236eSmrg done 7624c35d236eSmrg 7625c35d236eSmrg cd .. 7626c35d236eSmrg rm -rf conftest.dir 7627c35d236eSmrgelse 7628c35d236eSmrg am_cv_$1_dependencies_compiler_type=none 7629c35d236eSmrgfi 7630c35d236eSmrg]) 7631c35d236eSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 7632c35d236eSmrgAM_CONDITIONAL([am__fastdep$1], [ 7633c35d236eSmrg test "x$enable_dependency_tracking" != xno \ 7634c35d236eSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 7635c35d236eSmrg]) 7636c35d236eSmrg 7637c35d236eSmrg 7638c35d236eSmrg# AM_SET_DEPDIR 7639c35d236eSmrg# ------------- 7640c35d236eSmrg# Choose a directory name for dependency files. 7641c35d236eSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 7642c35d236eSmrgAC_DEFUN([AM_SET_DEPDIR], 7643c35d236eSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 7644c35d236eSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 7645c35d236eSmrg]) 7646c35d236eSmrg 7647c35d236eSmrg 7648c35d236eSmrg# AM_DEP_TRACK 7649c35d236eSmrg# ------------ 7650c35d236eSmrgAC_DEFUN([AM_DEP_TRACK], 7651c35d236eSmrg[AC_ARG_ENABLE(dependency-tracking, 7652c35d236eSmrg[ --disable-dependency-tracking speeds up one-time build 7653c35d236eSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 7654c35d236eSmrgif test "x$enable_dependency_tracking" != xno; then 7655c35d236eSmrg am_depcomp="$ac_aux_dir/depcomp" 7656c35d236eSmrg AMDEPBACKSLASH='\' 7657c35d236eSmrgfi 7658c35d236eSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 76594f6cd06fSmrgAC_SUBST([AMDEPBACKSLASH])dnl 76604f6cd06fSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 7661c35d236eSmrg]) 7662c35d236eSmrg 7663c35d236eSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 7664c35d236eSmrg 7665f55e6a01Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 7666c35d236eSmrg# Free Software Foundation, Inc. 7667c35d236eSmrg# 7668c35d236eSmrg# This file is free software; the Free Software Foundation 7669c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7670c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7671c35d236eSmrg 7672518bcf38Smrg#serial 5 7673c35d236eSmrg 7674c35d236eSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 7675c35d236eSmrg# ------------------------------ 7676c35d236eSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 7677518bcf38Smrg[{ 7678518bcf38Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 7679518bcf38Smrg # are listed without --file. Let's play safe and only enable the eval 7680518bcf38Smrg # if we detect the quoting. 7681518bcf38Smrg case $CONFIG_FILES in 7682518bcf38Smrg *\'*) eval set x "$CONFIG_FILES" ;; 7683518bcf38Smrg *) set x $CONFIG_FILES ;; 7684518bcf38Smrg esac 7685518bcf38Smrg shift 7686518bcf38Smrg for mf 7687518bcf38Smrg do 7688518bcf38Smrg # Strip MF so we end up with the name of the file. 7689518bcf38Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 7690518bcf38Smrg # Check whether this is an Automake generated Makefile or not. 7691518bcf38Smrg # We used to match only the files named `Makefile.in', but 7692518bcf38Smrg # some people rename them; so instead we look at the file content. 7693518bcf38Smrg # Grep'ing the first line is not enough: some people post-process 7694518bcf38Smrg # each Makefile.in and add a new line on top of each file to say so. 7695518bcf38Smrg # Grep'ing the whole file is not good either: AIX grep has a line 7696518bcf38Smrg # limit of 2048, but all sed's we know have understand at least 4000. 7697518bcf38Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 7698518bcf38Smrg dirpart=`AS_DIRNAME("$mf")` 7699518bcf38Smrg else 7700518bcf38Smrg continue 7701518bcf38Smrg fi 7702518bcf38Smrg # Extract the definition of DEPDIR, am__include, and am__quote 7703518bcf38Smrg # from the Makefile without running `make'. 7704518bcf38Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 7705518bcf38Smrg test -z "$DEPDIR" && continue 7706518bcf38Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 7707518bcf38Smrg test -z "am__include" && continue 7708518bcf38Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 7709518bcf38Smrg # When using ansi2knr, U may be empty or an underscore; expand it 7710518bcf38Smrg U=`sed -n 's/^U = //p' < "$mf"` 7711518bcf38Smrg # Find all dependency output files, they are included files with 7712518bcf38Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 7713518bcf38Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 7714518bcf38Smrg # expansion. 7715518bcf38Smrg for file in `sed -n " 7716518bcf38Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 7717518bcf38Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 7718518bcf38Smrg # Make sure the directory exists. 7719518bcf38Smrg test -f "$dirpart/$file" && continue 7720518bcf38Smrg fdir=`AS_DIRNAME(["$file"])` 7721518bcf38Smrg AS_MKDIR_P([$dirpart/$fdir]) 7722518bcf38Smrg # echo "creating $dirpart/$file" 7723518bcf38Smrg echo '# dummy' > "$dirpart/$file" 7724518bcf38Smrg done 7725c35d236eSmrg done 7726518bcf38Smrg} 7727c35d236eSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 7728c35d236eSmrg 7729c35d236eSmrg 7730c35d236eSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 7731c35d236eSmrg# ----------------------------- 7732c35d236eSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 7733c35d236eSmrg# 7734c35d236eSmrg# This code is only required when automatic dependency tracking 7735c35d236eSmrg# is enabled. FIXME. This creates each `.P' file that we will 7736c35d236eSmrg# need in order to bootstrap the dependency handling code. 7737c35d236eSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 7738c35d236eSmrg[AC_CONFIG_COMMANDS([depfiles], 7739c35d236eSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 7740c35d236eSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 7741c35d236eSmrg]) 7742c35d236eSmrg 7743c35d236eSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 7744c35d236eSmrg# Free Software Foundation, Inc. 7745c35d236eSmrg# 7746c35d236eSmrg# This file is free software; the Free Software Foundation 7747c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7748c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7749c35d236eSmrg 7750c35d236eSmrg# serial 8 7751c35d236eSmrg 7752c35d236eSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 7753c35d236eSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 7754c35d236eSmrg 7755c35d236eSmrg# Do all the work for Automake. -*- Autoconf -*- 7756c35d236eSmrg 77574f6cd06fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 7758518bcf38Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 7759c35d236eSmrg# 7760c35d236eSmrg# This file is free software; the Free Software Foundation 7761c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7762c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7763c35d236eSmrg 7764518bcf38Smrg# serial 16 7765c35d236eSmrg 7766c35d236eSmrg# This macro actually does too much. Some checks are only needed if 7767c35d236eSmrg# your package does certain things. But this isn't really a big deal. 7768c35d236eSmrg 7769c35d236eSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 7770c35d236eSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 7771c35d236eSmrg# ----------------------------------------------- 7772c35d236eSmrg# The call with PACKAGE and VERSION arguments is the old style 7773c35d236eSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 7774c35d236eSmrg# and VERSION should now be passed to AC_INIT and removed from 7775c35d236eSmrg# the call to AM_INIT_AUTOMAKE. 7776c35d236eSmrg# We support both call styles for the transition. After 7777c35d236eSmrg# the next Automake release, Autoconf can make the AC_INIT 7778c35d236eSmrg# arguments mandatory, and then we can depend on a new Autoconf 7779c35d236eSmrg# release and drop the old call support. 7780c35d236eSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 7781518bcf38Smrg[AC_PREREQ([2.62])dnl 7782c35d236eSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 7783c35d236eSmrgdnl the ones we care about. 7784c35d236eSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 7785c35d236eSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 7786c35d236eSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 77874f6cd06fSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 77884f6cd06fSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 77894f6cd06fSmrg # is not polluted with repeated "-I." 77904f6cd06fSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 77914f6cd06fSmrg # test to see if srcdir already configured 77924f6cd06fSmrg if test -f $srcdir/config.status; then 77934f6cd06fSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 77944f6cd06fSmrg fi 7795c35d236eSmrgfi 7796c35d236eSmrg 7797c35d236eSmrg# test whether we have cygpath 7798c35d236eSmrgif test -z "$CYGPATH_W"; then 7799c35d236eSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 7800c35d236eSmrg CYGPATH_W='cygpath -w' 7801c35d236eSmrg else 7802c35d236eSmrg CYGPATH_W=echo 7803c35d236eSmrg fi 7804c35d236eSmrgfi 7805c35d236eSmrgAC_SUBST([CYGPATH_W]) 7806c35d236eSmrg 7807c35d236eSmrg# Define the identity of the package. 7808c35d236eSmrgdnl Distinguish between old-style and new-style calls. 7809c35d236eSmrgm4_ifval([$2], 7810c35d236eSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 7811c35d236eSmrg AC_SUBST([PACKAGE], [$1])dnl 7812c35d236eSmrg AC_SUBST([VERSION], [$2])], 7813c35d236eSmrg[_AM_SET_OPTIONS([$1])dnl 78144f6cd06fSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 78154f6cd06fSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 78164f6cd06fSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 7817c35d236eSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 7818c35d236eSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 7819c35d236eSmrg 7820c35d236eSmrg_AM_IF_OPTION([no-define],, 7821c35d236eSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 7822c35d236eSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 7823c35d236eSmrg 7824c35d236eSmrg# Some tools Automake needs. 7825c35d236eSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 7826c35d236eSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 7827c35d236eSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 7828c35d236eSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 7829c35d236eSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 7830c35d236eSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 7831c35d236eSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 7832518bcf38SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 7833518bcf38SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 7834c35d236eSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 7835c35d236eSmrg# We need awk for the "check" target. The system "awk" is bad on 7836c35d236eSmrg# some platforms. 7837c35d236eSmrgAC_REQUIRE([AC_PROG_AWK])dnl 7838c35d236eSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 7839c35d236eSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 7840c35d236eSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 7841518bcf38Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 7842518bcf38Smrg [_AM_PROG_TAR([v7])])]) 7843c35d236eSmrg_AM_IF_OPTION([no-dependencies],, 7844c35d236eSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 7845518bcf38Smrg [_AM_DEPENDENCIES(CC)], 7846518bcf38Smrg [define([AC_PROG_CC], 7847518bcf38Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 7848c35d236eSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 7849518bcf38Smrg [_AM_DEPENDENCIES(CXX)], 7850518bcf38Smrg [define([AC_PROG_CXX], 7851518bcf38Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 78524f6cd06fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 7853518bcf38Smrg [_AM_DEPENDENCIES(OBJC)], 7854518bcf38Smrg [define([AC_PROG_OBJC], 7855518bcf38Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 7856c35d236eSmrg]) 7857518bcf38Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 7858518bcf38Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 7859518bcf38Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 7860518bcf38Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 7861518bcf38SmrgAC_CONFIG_COMMANDS_PRE(dnl 7862518bcf38Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 7863518bcf38Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 7864c35d236eSmrg]) 7865c35d236eSmrg 7866518bcf38Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 7867518bcf38Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 7868518bcf38Smrgdnl mangled by Autoconf and run in a shell conditional statement. 7869518bcf38Smrgm4_define([_AC_COMPILER_EXEEXT], 7870518bcf38Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 7871518bcf38Smrg 7872c35d236eSmrg 7873c35d236eSmrg# When config.status generates a header, we must update the stamp-h file. 7874c35d236eSmrg# This file resides in the same directory as the config header 7875c35d236eSmrg# that is generated. The stamp files are numbered to have different names. 7876c35d236eSmrg 7877c35d236eSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 7878c35d236eSmrg# loop where config.status creates the headers, so we can generate 7879c35d236eSmrg# our stamp files there. 7880c35d236eSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 7881c35d236eSmrg[# Compute $1's index in $config_headers. 78824f6cd06fSmrg_am_arg=$1 7883c35d236eSmrg_am_stamp_count=1 7884c35d236eSmrgfor _am_header in $config_headers :; do 7885c35d236eSmrg case $_am_header in 78864f6cd06fSmrg $_am_arg | $_am_arg:* ) 7887c35d236eSmrg break ;; 7888c35d236eSmrg * ) 7889c35d236eSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 7890c35d236eSmrg esac 7891c35d236eSmrgdone 78924f6cd06fSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 7893c35d236eSmrg 7894518bcf38Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 7895c35d236eSmrg# 7896c35d236eSmrg# This file is free software; the Free Software Foundation 7897c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7898c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7899c35d236eSmrg 7900c35d236eSmrg# AM_PROG_INSTALL_SH 7901c35d236eSmrg# ------------------ 7902c35d236eSmrg# Define $install_sh. 7903c35d236eSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 7904c35d236eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7905518bcf38Smrgif test x"${install_sh}" != xset; then 7906518bcf38Smrg case $am_aux_dir in 7907518bcf38Smrg *\ * | *\ *) 7908518bcf38Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 7909518bcf38Smrg *) 7910518bcf38Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 7911518bcf38Smrg esac 7912518bcf38Smrgfi 7913c35d236eSmrgAC_SUBST(install_sh)]) 7914c35d236eSmrg 7915c35d236eSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 7916c35d236eSmrg# 7917c35d236eSmrg# This file is free software; the Free Software Foundation 7918c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7919c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7920c35d236eSmrg 7921c35d236eSmrg# serial 2 7922c35d236eSmrg 7923c35d236eSmrg# Check whether the underlying file-system supports filenames 7924c35d236eSmrg# with a leading dot. For instance MS-DOS doesn't. 7925c35d236eSmrgAC_DEFUN([AM_SET_LEADING_DOT], 7926c35d236eSmrg[rm -rf .tst 2>/dev/null 7927c35d236eSmrgmkdir .tst 2>/dev/null 7928c35d236eSmrgif test -d .tst; then 7929c35d236eSmrg am__leading_dot=. 7930c35d236eSmrgelse 7931c35d236eSmrg am__leading_dot=_ 7932c35d236eSmrgfi 7933c35d236eSmrgrmdir .tst 2>/dev/null 7934c35d236eSmrgAC_SUBST([am__leading_dot])]) 7935c35d236eSmrg 7936c35d236eSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 7937c35d236eSmrg# From Jim Meyering 7938c35d236eSmrg 7939518bcf38Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 7940c35d236eSmrg# Free Software Foundation, Inc. 7941c35d236eSmrg# 7942c35d236eSmrg# This file is free software; the Free Software Foundation 7943c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7944c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7945c35d236eSmrg 7946518bcf38Smrg# serial 5 7947c35d236eSmrg 7948518bcf38Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 7949518bcf38Smrg# ---------------------------------- 7950518bcf38Smrg# Control maintainer-specific portions of Makefiles. 7951518bcf38Smrg# Default is to disable them, unless `enable' is passed literally. 7952518bcf38Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 7953518bcf38Smrg# can override the default with the --enable/--disable switch. 7954c35d236eSmrgAC_DEFUN([AM_MAINTAINER_MODE], 7955518bcf38Smrg[m4_case(m4_default([$1], [disable]), 7956518bcf38Smrg [enable], [m4_define([am_maintainer_other], [disable])], 7957518bcf38Smrg [disable], [m4_define([am_maintainer_other], [enable])], 7958518bcf38Smrg [m4_define([am_maintainer_other], [enable]) 7959518bcf38Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 7960518bcf38SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 7961518bcf38Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 7962518bcf38Smrg AC_ARG_ENABLE([maintainer-mode], 7963518bcf38Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 7964c35d236eSmrg (and sometimes confusing) to the casual installer], 7965518bcf38Smrg [USE_MAINTAINER_MODE=$enableval], 7966518bcf38Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 7967c35d236eSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 7968518bcf38Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 7969c35d236eSmrg MAINT=$MAINTAINER_MODE_TRUE 7970518bcf38Smrg AC_SUBST([MAINT])dnl 7971c35d236eSmrg] 7972c35d236eSmrg) 7973c35d236eSmrg 7974c35d236eSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 7975c35d236eSmrg 7976c35d236eSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 7977c35d236eSmrg 7978518bcf38Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 7979c35d236eSmrg# 7980c35d236eSmrg# This file is free software; the Free Software Foundation 7981c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7982c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7983c35d236eSmrg 7984518bcf38Smrg# serial 4 7985c35d236eSmrg 7986c35d236eSmrg# AM_MAKE_INCLUDE() 7987c35d236eSmrg# ----------------- 7988c35d236eSmrg# Check to see how make treats includes. 7989c35d236eSmrgAC_DEFUN([AM_MAKE_INCLUDE], 7990c35d236eSmrg[am_make=${MAKE-make} 7991c35d236eSmrgcat > confinc << 'END' 7992c35d236eSmrgam__doit: 7993518bcf38Smrg @echo this is the am__doit target 7994c35d236eSmrg.PHONY: am__doit 7995c35d236eSmrgEND 7996c35d236eSmrg# If we don't find an include directive, just comment out the code. 7997c35d236eSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 7998c35d236eSmrgam__include="#" 7999c35d236eSmrgam__quote= 8000c35d236eSmrg_am_result=none 8001c35d236eSmrg# First try GNU make style include. 8002c35d236eSmrgecho "include confinc" > confmf 8003518bcf38Smrg# Ignore all kinds of additional output from `make'. 8004518bcf38Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 8005518bcf38Smrg*the\ am__doit\ target*) 8006518bcf38Smrg am__include=include 8007518bcf38Smrg am__quote= 8008518bcf38Smrg _am_result=GNU 8009518bcf38Smrg ;; 8010518bcf38Smrgesac 8011c35d236eSmrg# Now try BSD make style include. 8012c35d236eSmrgif test "$am__include" = "#"; then 8013c35d236eSmrg echo '.include "confinc"' > confmf 8014518bcf38Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 8015518bcf38Smrg *the\ am__doit\ target*) 8016518bcf38Smrg am__include=.include 8017518bcf38Smrg am__quote="\"" 8018518bcf38Smrg _am_result=BSD 8019518bcf38Smrg ;; 8020518bcf38Smrg esac 8021c35d236eSmrgfi 8022c35d236eSmrgAC_SUBST([am__include]) 8023c35d236eSmrgAC_SUBST([am__quote]) 8024c35d236eSmrgAC_MSG_RESULT([$_am_result]) 8025c35d236eSmrgrm -f confinc confmf 8026c35d236eSmrg]) 8027c35d236eSmrg 8028c35d236eSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 8029c35d236eSmrg 8030518bcf38Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 8031c35d236eSmrg# Free Software Foundation, Inc. 8032c35d236eSmrg# 8033c35d236eSmrg# This file is free software; the Free Software Foundation 8034c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 8035c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8036c35d236eSmrg 8037518bcf38Smrg# serial 6 8038c35d236eSmrg 8039c35d236eSmrg# AM_MISSING_PROG(NAME, PROGRAM) 8040c35d236eSmrg# ------------------------------ 8041c35d236eSmrgAC_DEFUN([AM_MISSING_PROG], 8042c35d236eSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 8043c35d236eSmrg$1=${$1-"${am_missing_run}$2"} 8044c35d236eSmrgAC_SUBST($1)]) 8045c35d236eSmrg 8046c35d236eSmrg 8047c35d236eSmrg# AM_MISSING_HAS_RUN 8048c35d236eSmrg# ------------------ 8049c35d236eSmrg# Define MISSING if not defined so far and test if it supports --run. 8050c35d236eSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 8051c35d236eSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 8052c35d236eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 80534f6cd06fSmrgAC_REQUIRE_AUX_FILE([missing])dnl 8054518bcf38Smrgif test x"${MISSING+set}" != xset; then 8055518bcf38Smrg case $am_aux_dir in 8056518bcf38Smrg *\ * | *\ *) 8057518bcf38Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 8058518bcf38Smrg *) 8059518bcf38Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 8060518bcf38Smrg esac 8061518bcf38Smrgfi 8062c35d236eSmrg# Use eval to expand $SHELL 8063c35d236eSmrgif eval "$MISSING --run true"; then 8064c35d236eSmrg am_missing_run="$MISSING --run " 8065c35d236eSmrgelse 8066c35d236eSmrg am_missing_run= 8067c35d236eSmrg AC_MSG_WARN([`missing' script is too old or missing]) 8068c35d236eSmrgfi 8069c35d236eSmrg]) 8070c35d236eSmrg 80714f6cd06fSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 8072c35d236eSmrg# 8073c35d236eSmrg# This file is free software; the Free Software Foundation 8074c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 8075c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8076c35d236eSmrg 8077c35d236eSmrg# AM_PROG_MKDIR_P 8078c35d236eSmrg# --------------- 80794f6cd06fSmrg# Check for `mkdir -p'. 8080c35d236eSmrgAC_DEFUN([AM_PROG_MKDIR_P], 80814f6cd06fSmrg[AC_PREREQ([2.60])dnl 80824f6cd06fSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 80834f6cd06fSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 80844f6cd06fSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 80854f6cd06fSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 80864f6cd06fSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 80874f6cd06fSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 80884f6cd06fSmrgdnl adjustment using top_builddir (which is defined more often than 80894f6cd06fSmrgdnl MKDIR_P). 80904f6cd06fSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 80914f6cd06fSmrgcase $mkdir_p in 80924f6cd06fSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 80934f6cd06fSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 80944f6cd06fSmrgesac 80954f6cd06fSmrg]) 8096c35d236eSmrg 8097c35d236eSmrg# Helper functions for option handling. -*- Autoconf -*- 8098c35d236eSmrg 8099f55e6a01Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 8100c35d236eSmrg# 8101c35d236eSmrg# This file is free software; the Free Software Foundation 8102c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 8103c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8104c35d236eSmrg 8105f55e6a01Smrg# serial 4 8106c35d236eSmrg 8107c35d236eSmrg# _AM_MANGLE_OPTION(NAME) 8108c35d236eSmrg# ----------------------- 8109c35d236eSmrgAC_DEFUN([_AM_MANGLE_OPTION], 8110c35d236eSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 8111c35d236eSmrg 8112c35d236eSmrg# _AM_SET_OPTION(NAME) 8113c35d236eSmrg# ------------------------------ 8114c35d236eSmrg# Set option NAME. Presently that only means defining a flag for this option. 8115c35d236eSmrgAC_DEFUN([_AM_SET_OPTION], 8116c35d236eSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 8117c35d236eSmrg 8118c35d236eSmrg# _AM_SET_OPTIONS(OPTIONS) 8119c35d236eSmrg# ---------------------------------- 8120c35d236eSmrg# OPTIONS is a space-separated list of Automake options. 8121c35d236eSmrgAC_DEFUN([_AM_SET_OPTIONS], 8122f55e6a01Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 8123c35d236eSmrg 8124c35d236eSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 8125c35d236eSmrg# ------------------------------------------- 8126c35d236eSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8127c35d236eSmrgAC_DEFUN([_AM_IF_OPTION], 8128c35d236eSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 8129c35d236eSmrg 8130c35d236eSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8131c35d236eSmrg 8132518bcf38Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 8133c35d236eSmrg# Free Software Foundation, Inc. 8134c35d236eSmrg# 8135c35d236eSmrg# This file is free software; the Free Software Foundation 8136c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 8137c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8138c35d236eSmrg 8139518bcf38Smrg# serial 5 8140c35d236eSmrg 8141c35d236eSmrg# AM_SANITY_CHECK 8142c35d236eSmrg# --------------- 8143c35d236eSmrgAC_DEFUN([AM_SANITY_CHECK], 8144c35d236eSmrg[AC_MSG_CHECKING([whether build environment is sane]) 8145c35d236eSmrg# Just in case 8146c35d236eSmrgsleep 1 8147c35d236eSmrgecho timestamp > conftest.file 8148518bcf38Smrg# Reject unsafe characters in $srcdir or the absolute working directory 8149518bcf38Smrg# name. Accept space and tab only in the latter. 8150518bcf38Smrgam_lf=' 8151518bcf38Smrg' 8152518bcf38Smrgcase `pwd` in 8153518bcf38Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8154518bcf38Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8155518bcf38Smrgesac 8156518bcf38Smrgcase $srcdir in 8157518bcf38Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8158518bcf38Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 8159518bcf38Smrgesac 8160518bcf38Smrg 8161c35d236eSmrg# Do `set' in a subshell so we don't clobber the current shell's 8162c35d236eSmrg# arguments. Must try -L first in case configure is actually a 8163c35d236eSmrg# symlink; some systems play weird games with the mod time of symlinks 8164c35d236eSmrg# (eg FreeBSD returns the mod time of the symlink's containing 8165c35d236eSmrg# directory). 8166c35d236eSmrgif ( 8167518bcf38Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8168c35d236eSmrg if test "$[*]" = "X"; then 8169c35d236eSmrg # -L didn't work. 8170518bcf38Smrg set X `ls -t "$srcdir/configure" conftest.file` 8171c35d236eSmrg fi 8172c35d236eSmrg rm -f conftest.file 8173c35d236eSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8174c35d236eSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8175c35d236eSmrg 8176c35d236eSmrg # If neither matched, then we have a broken ls. This can happen 8177c35d236eSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8178c35d236eSmrg # broken ls alias from the environment. This has actually 8179c35d236eSmrg # happened. Such a system could not be considered "sane". 8180c35d236eSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8181c35d236eSmrgalias in your environment]) 8182c35d236eSmrg fi 8183c35d236eSmrg 8184c35d236eSmrg test "$[2]" = conftest.file 8185c35d236eSmrg ) 8186c35d236eSmrgthen 8187c35d236eSmrg # Ok. 8188c35d236eSmrg : 8189c35d236eSmrgelse 8190c35d236eSmrg AC_MSG_ERROR([newly created file is older than distributed files! 8191c35d236eSmrgCheck your system clock]) 8192c35d236eSmrgfi 8193c35d236eSmrgAC_MSG_RESULT(yes)]) 8194c35d236eSmrg 8195c35d236eSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8196c35d236eSmrg# 8197c35d236eSmrg# This file is free software; the Free Software Foundation 8198c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 8199c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8200c35d236eSmrg 8201c35d236eSmrg# AM_PROG_INSTALL_STRIP 8202c35d236eSmrg# --------------------- 8203c35d236eSmrg# One issue with vendor `install' (even GNU) is that you can't 8204c35d236eSmrg# specify the program used to strip binaries. This is especially 8205c35d236eSmrg# annoying in cross-compiling environments, where the build's strip 8206c35d236eSmrg# is unlikely to handle the host's binaries. 8207c35d236eSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 8208c35d236eSmrg# always use install-sh in `make install-strip', and initialize 8209c35d236eSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 8210c35d236eSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 8211c35d236eSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 8212c35d236eSmrg# Installed binaries are usually stripped using `strip' when the user 8213c35d236eSmrg# run `make install-strip'. However `strip' might not be the right 8214c35d236eSmrg# tool to use in cross-compilation environments, therefore Automake 8215c35d236eSmrg# will honor the `STRIP' environment variable to overrule this program. 8216c35d236eSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 8217c35d236eSmrgif test "$cross_compiling" != no; then 8218c35d236eSmrg AC_CHECK_TOOL([STRIP], [strip], :) 8219c35d236eSmrgfi 82204f6cd06fSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 8221c35d236eSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 8222c35d236eSmrg 8223518bcf38Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 82244f6cd06fSmrg# 82254f6cd06fSmrg# This file is free software; the Free Software Foundation 82264f6cd06fSmrg# gives unlimited permission to copy and/or distribute it, 82274f6cd06fSmrg# with or without modifications, as long as this notice is preserved. 82284f6cd06fSmrg 8229518bcf38Smrg# serial 2 8230518bcf38Smrg 82314f6cd06fSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 82324f6cd06fSmrg# --------------------------- 82334f6cd06fSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 82344f6cd06fSmrg# This macro is traced by Automake. 82354f6cd06fSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 82364f6cd06fSmrg 8237518bcf38Smrg# AM_SUBST_NOTMAKE(VARIABLE) 8238518bcf38Smrg# --------------------------- 8239518bcf38Smrg# Public sister of _AM_SUBST_NOTMAKE. 8240518bcf38SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 8241518bcf38Smrg 8242c35d236eSmrg# Check how to create a tarball. -*- Autoconf -*- 8243c35d236eSmrg 8244c35d236eSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 8245c35d236eSmrg# 8246c35d236eSmrg# This file is free software; the Free Software Foundation 8247c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 8248c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8249c35d236eSmrg 8250c35d236eSmrg# serial 2 8251c35d236eSmrg 8252c35d236eSmrg# _AM_PROG_TAR(FORMAT) 8253c35d236eSmrg# -------------------- 8254c35d236eSmrg# Check how to create a tarball in format FORMAT. 8255c35d236eSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 8256c35d236eSmrg# 8257c35d236eSmrg# Substitute a variable $(am__tar) that is a command 8258c35d236eSmrg# writing to stdout a FORMAT-tarball containing the directory 8259c35d236eSmrg# $tardir. 8260c35d236eSmrg# tardir=directory && $(am__tar) > result.tar 8261c35d236eSmrg# 8262c35d236eSmrg# Substitute a variable $(am__untar) that extract such 8263c35d236eSmrg# a tarball read from stdin. 8264c35d236eSmrg# $(am__untar) < result.tar 8265c35d236eSmrgAC_DEFUN([_AM_PROG_TAR], 8266c35d236eSmrg[# Always define AMTAR for backward compatibility. 8267c35d236eSmrgAM_MISSING_PROG([AMTAR], [tar]) 8268c35d236eSmrgm4_if([$1], [v7], 8269c35d236eSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 8270c35d236eSmrg [m4_case([$1], [ustar],, [pax],, 8271c35d236eSmrg [m4_fatal([Unknown tar format])]) 8272c35d236eSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 8273c35d236eSmrg# Loop over all known methods to create a tar archive until one works. 8274c35d236eSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 8275c35d236eSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 8276c35d236eSmrg# Do not fold the above two line into one, because Tru64 sh and 8277c35d236eSmrg# Solaris sh will not grok spaces in the rhs of `-'. 8278c35d236eSmrgfor _am_tool in $_am_tools 8279c35d236eSmrgdo 8280c35d236eSmrg case $_am_tool in 8281c35d236eSmrg gnutar) 8282c35d236eSmrg for _am_tar in tar gnutar gtar; 8283c35d236eSmrg do 8284c35d236eSmrg AM_RUN_LOG([$_am_tar --version]) && break 8285c35d236eSmrg done 8286c35d236eSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 8287c35d236eSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 8288c35d236eSmrg am__untar="$_am_tar -xf -" 8289c35d236eSmrg ;; 8290c35d236eSmrg plaintar) 8291c35d236eSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 8292c35d236eSmrg # ustar tarball either. 8293c35d236eSmrg (tar --version) >/dev/null 2>&1 && continue 8294c35d236eSmrg am__tar='tar chf - "$$tardir"' 8295c35d236eSmrg am__tar_='tar chf - "$tardir"' 8296c35d236eSmrg am__untar='tar xf -' 8297c35d236eSmrg ;; 8298c35d236eSmrg pax) 8299c35d236eSmrg am__tar='pax -L -x $1 -w "$$tardir"' 8300c35d236eSmrg am__tar_='pax -L -x $1 -w "$tardir"' 8301c35d236eSmrg am__untar='pax -r' 8302c35d236eSmrg ;; 8303c35d236eSmrg cpio) 8304c35d236eSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 8305c35d236eSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 8306c35d236eSmrg am__untar='cpio -i -H $1 -d' 8307c35d236eSmrg ;; 8308c35d236eSmrg none) 8309c35d236eSmrg am__tar=false 8310c35d236eSmrg am__tar_=false 8311c35d236eSmrg am__untar=false 8312c35d236eSmrg ;; 8313c35d236eSmrg esac 8314c35d236eSmrg 8315c35d236eSmrg # If the value was cached, stop now. We just wanted to have am__tar 8316c35d236eSmrg # and am__untar set. 8317c35d236eSmrg test -n "${am_cv_prog_tar_$1}" && break 8318c35d236eSmrg 8319c35d236eSmrg # tar/untar a dummy directory, and stop if the command works 8320c35d236eSmrg rm -rf conftest.dir 8321c35d236eSmrg mkdir conftest.dir 8322c35d236eSmrg echo GrepMe > conftest.dir/file 8323c35d236eSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 8324c35d236eSmrg rm -rf conftest.dir 8325c35d236eSmrg if test -s conftest.tar; then 8326c35d236eSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 8327c35d236eSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 8328c35d236eSmrg fi 8329c35d236eSmrgdone 8330c35d236eSmrgrm -rf conftest.dir 8331c35d236eSmrg 8332c35d236eSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 8333c35d236eSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 8334c35d236eSmrgAC_SUBST([am__tar]) 8335c35d236eSmrgAC_SUBST([am__untar]) 8336c35d236eSmrg]) # _AM_PROG_TAR 8337c35d236eSmrg 8338518bcf38Smrgdnl Copyright 2005 Red Hat, Inc 8339518bcf38Smrgdnl 8340518bcf38Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 8341518bcf38Smrgdnl documentation for any purpose is hereby granted without fee, provided that 8342518bcf38Smrgdnl the above copyright notice appear in all copies and that both that 8343518bcf38Smrgdnl copyright notice and this permission notice appear in supporting 8344518bcf38Smrgdnl documentation. 8345518bcf38Smrgdnl 8346518bcf38Smrgdnl The above copyright notice and this permission notice shall be included 8347518bcf38Smrgdnl in all copies or substantial portions of the Software. 8348518bcf38Smrgdnl 8349518bcf38Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 8350518bcf38Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 8351518bcf38Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 8352518bcf38Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 8353518bcf38Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 8354518bcf38Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 8355518bcf38Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 8356518bcf38Smrgdnl 8357518bcf38Smrgdnl Except as contained in this notice, the name of the copyright holders shall 8358518bcf38Smrgdnl not be used in advertising or otherwise to promote the sale, use or 8359518bcf38Smrgdnl other dealings in this Software without prior written authorization 8360518bcf38Smrgdnl from the copyright holders. 8361518bcf38Smrgdnl 8362518bcf38Smrg 8363518bcf38Smrg# XORG_DRIVER_CHECK_EXT() 8364518bcf38Smrg# -------------------------- 8365518bcf38Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 8366518bcf38Smrg# is defined, then add $1 to $REQUIRED_MODULES. 8367518bcf38Smrg 8368518bcf38SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 8369518bcf38Smrg SAVE_CFLAGS="$CFLAGS" 8370518bcf38Smrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 8371518bcf38Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 8372518bcf38Smrg#include "xorg-server.h" 8373518bcf38Smrg#if !defined $1 8374518bcf38Smrg#error $1 not defined 8375518bcf38Smrg#endif 8376518bcf38Smrg ]])], 8377518bcf38Smrg [_EXT_CHECK=yes], 8378518bcf38Smrg [_EXT_CHECK=no]) 8379518bcf38Smrg CFLAGS="$SAVE_CFLAGS" 8380518bcf38Smrg AC_MSG_CHECKING([if $1 is defined]) 8381518bcf38Smrg AC_MSG_RESULT([$_EXT_CHECK]) 8382518bcf38Smrg if test "$_EXT_CHECK" != no; then 8383518bcf38Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 8384518bcf38Smrg fi 8385518bcf38Smrg]) 8386518bcf38Smrg 8387