aclocal.m4 revision 4f6cd06f
14f6cd06fSmrg# generated automatically by aclocal 1.10.1 -*- Autoconf -*- 2c35d236eSmrg 3c35d236eSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 44f6cd06fSmrg# 2005, 2006, 2007, 2008 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 164f6cd06fSmrgm4_if(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 244f6cd06fSmrg# serial 52 AC_PROG_LIBTOOL 25c35d236eSmrg 26c35d236eSmrg 27c35d236eSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 28c35d236eSmrg# ----------------------------------------------------------- 29c35d236eSmrg# If this macro is not defined by Autoconf, define it here. 30c35d236eSmrgm4_ifdef([AC_PROVIDE_IFELSE], 31c35d236eSmrg [], 32c35d236eSmrg [m4_define([AC_PROVIDE_IFELSE], 33c35d236eSmrg [m4_ifdef([AC_PROVIDE_$1], 34c35d236eSmrg [$2], [$3])])]) 35c35d236eSmrg 36c35d236eSmrg 37c35d236eSmrg# AC_PROG_LIBTOOL 38c35d236eSmrg# --------------- 39c35d236eSmrgAC_DEFUN([AC_PROG_LIBTOOL], 40c35d236eSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 41c35d236eSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 42c35d236eSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 43c35d236eSmrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 44c35d236eSmrg [AC_LIBTOOL_CXX], 45c35d236eSmrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 46c35d236eSmrg ])]) 47c35d236eSmrgdnl And a similar setup for Fortran 77 support 48c35d236eSmrg AC_PROVIDE_IFELSE([AC_PROG_F77], 49c35d236eSmrg [AC_LIBTOOL_F77], 50c35d236eSmrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 51c35d236eSmrg])]) 52c35d236eSmrg 53c35d236eSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 54c35d236eSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 55c35d236eSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 56c35d236eSmrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 57c35d236eSmrg [AC_LIBTOOL_GCJ], 58c35d236eSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 59c35d236eSmrg [AC_LIBTOOL_GCJ], 60c35d236eSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 61c35d236eSmrg [AC_LIBTOOL_GCJ], 62c35d236eSmrg [ifdef([AC_PROG_GCJ], 63c35d236eSmrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 64c35d236eSmrg ifdef([A][M_PROG_GCJ], 65c35d236eSmrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 66c35d236eSmrg ifdef([LT_AC_PROG_GCJ], 67c35d236eSmrg [define([LT_AC_PROG_GCJ], 68c35d236eSmrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 69c35d236eSmrg])])# AC_PROG_LIBTOOL 70c35d236eSmrg 71c35d236eSmrg 72c35d236eSmrg# _AC_PROG_LIBTOOL 73c35d236eSmrg# ---------------- 74c35d236eSmrgAC_DEFUN([_AC_PROG_LIBTOOL], 75c35d236eSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 76c35d236eSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 77c35d236eSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 78c35d236eSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 79c35d236eSmrg 80c35d236eSmrg# This can be used to rebuild libtool when needed 81c35d236eSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 82c35d236eSmrg 83c35d236eSmrg# Always use our own libtool. 84c35d236eSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 85c35d236eSmrgAC_SUBST(LIBTOOL)dnl 86c35d236eSmrg 87c35d236eSmrg# Prevent multiple expansion 88c35d236eSmrgdefine([AC_PROG_LIBTOOL], []) 89c35d236eSmrg])# _AC_PROG_LIBTOOL 90c35d236eSmrg 91c35d236eSmrg 92c35d236eSmrg# AC_LIBTOOL_SETUP 93c35d236eSmrg# ---------------- 94c35d236eSmrgAC_DEFUN([AC_LIBTOOL_SETUP], 95c35d236eSmrg[AC_PREREQ(2.50)dnl 96c35d236eSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 97c35d236eSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 98c35d236eSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 99c35d236eSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 100c35d236eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 101c35d236eSmrgAC_REQUIRE([AC_PROG_CC])dnl 102c35d236eSmrgAC_REQUIRE([AC_PROG_LD])dnl 103c35d236eSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 104c35d236eSmrgAC_REQUIRE([AC_PROG_NM])dnl 105c35d236eSmrg 106c35d236eSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 107c35d236eSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 108c35d236eSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 109c35d236eSmrgAC_REQUIRE([AC_OBJEXT])dnl 110c35d236eSmrgAC_REQUIRE([AC_EXEEXT])dnl 111c35d236eSmrgdnl 112c35d236eSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 113c35d236eSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 114c35d236eSmrgAC_LIBTOOL_OBJDIR 115c35d236eSmrg 116c35d236eSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 117c35d236eSmrg_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. 133c35d236eSmrgXsed='sed -e 1s/^X//' 134c35d236eSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 135c35d236eSmrg 136c35d236eSmrg# Same as above, but do not quote variable references. 137c35d236eSmrg[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 146c35d236eSmrg# Constants: 147c35d236eSmrgrm="rm -f" 148c35d236eSmrg 149c35d236eSmrg# Global variables: 150c35d236eSmrgdefault_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 156c35d236eSmrgltmain="$ac_aux_dir/ltmain.sh" 157c35d236eSmrgofile="$default_ofile" 158c35d236eSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 159c35d236eSmrg 160c35d236eSmrgAC_CHECK_TOOL(AR, ar, false) 161c35d236eSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 162c35d236eSmrgAC_CHECK_TOOL(STRIP, strip, :) 163c35d236eSmrg 164c35d236eSmrgold_CC="$CC" 165c35d236eSmrgold_CFLAGS="$CFLAGS" 166c35d236eSmrg 167c35d236eSmrg# Set sane defaults for various variables 168c35d236eSmrgtest -z "$AR" && AR=ar 169c35d236eSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 170c35d236eSmrgtest -z "$AS" && AS=as 171c35d236eSmrgtest -z "$CC" && CC=cc 172c35d236eSmrgtest -z "$LTCC" && LTCC=$CC 173c35d236eSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 174c35d236eSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 175c35d236eSmrgtest -z "$LD" && LD=ld 176c35d236eSmrgtest -z "$LN_S" && LN_S="ln -s" 177c35d236eSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 178c35d236eSmrgtest -z "$NM" && NM=nm 179c35d236eSmrgtest -z "$SED" && SED=sed 180c35d236eSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 181c35d236eSmrgtest -z "$RANLIB" && RANLIB=: 182c35d236eSmrgtest -z "$STRIP" && STRIP=: 183c35d236eSmrgtest -z "$ac_objext" && ac_objext=o 184c35d236eSmrg 185c35d236eSmrg# Determine commands to create old-style static archives. 1864f6cd06fSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 187c35d236eSmrgold_postinstall_cmds='chmod 644 $oldlib' 188c35d236eSmrgold_postuninstall_cmds= 189c35d236eSmrg 190c35d236eSmrgif test -n "$RANLIB"; then 191c35d236eSmrg case $host_os in 192c35d236eSmrg openbsd*) 193c35d236eSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 194c35d236eSmrg ;; 195c35d236eSmrg *) 196c35d236eSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 197c35d236eSmrg ;; 198c35d236eSmrg esac 199c35d236eSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 200c35d236eSmrgfi 201c35d236eSmrg 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 208c35d236eSmrg AC_PATH_MAGIC 209c35d236eSmrg fi 210c35d236eSmrg ;; 211c35d236eSmrgesac 212c35d236eSmrg 2134f6cd06fSmrg_LT_REQUIRED_DARWIN_CHECKS 2144f6cd06fSmrg 215c35d236eSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 216c35d236eSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 217c35d236eSmrgenable_win32_dll=yes, enable_win32_dll=no) 218c35d236eSmrg 219c35d236eSmrgAC_ARG_ENABLE([libtool-lock], 220c35d236eSmrg [AC_HELP_STRING([--disable-libtool-lock], 221c35d236eSmrg [avoid locking (might break parallel builds)])]) 222c35d236eSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 223c35d236eSmrg 224c35d236eSmrgAC_ARG_WITH([pic], 225c35d236eSmrg [AC_HELP_STRING([--with-pic], 226c35d236eSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 227c35d236eSmrg [pic_mode="$withval"], 228c35d236eSmrg [pic_mode=default]) 229c35d236eSmrgtest -z "$pic_mode" && pic_mode=default 230c35d236eSmrg 231c35d236eSmrg# Use C for the default configuration in the libtool script 232c35d236eSmrgtagname= 233c35d236eSmrgAC_LIBTOOL_LANG_C_CONFIG 234c35d236eSmrg_LT_AC_TAGCONFIG 235c35d236eSmrg])# AC_LIBTOOL_SETUP 236c35d236eSmrg 237c35d236eSmrg 238c35d236eSmrg# _LT_AC_SYS_COMPILER 239c35d236eSmrg# ------------------- 240c35d236eSmrgAC_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 251c35d236eSmrg])# _LT_AC_SYS_COMPILER 252c35d236eSmrg 253c35d236eSmrg 254c35d236eSmrg# _LT_CC_BASENAME(CC) 255c35d236eSmrg# ------------------- 256c35d236eSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 257c35d236eSmrgAC_DEFUN([_LT_CC_BASENAME], 258c35d236eSmrg[for cc_temp in $1""; do 259c35d236eSmrg case $cc_temp in 260c35d236eSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 261c35d236eSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 262c35d236eSmrg \-*) ;; 263c35d236eSmrg *) break;; 264c35d236eSmrg esac 265c35d236eSmrgdone 266c35d236eSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 267c35d236eSmrg]) 268c35d236eSmrg 269c35d236eSmrg 270c35d236eSmrg# _LT_COMPILER_BOILERPLATE 271c35d236eSmrg# ------------------------ 272c35d236eSmrg# Check for compiler boilerplate output or warnings with 273c35d236eSmrg# the simple compiler test code. 274c35d236eSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 2754f6cd06fSmrg[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` 280c35d236eSmrg$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. 288c35d236eSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 2894f6cd06fSmrg[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` 2944f6cd06fSmrg$rm -r conftest* 295c35d236eSmrg])# _LT_LINKER_BOILERPLATE 296c35d236eSmrg 2974f6cd06fSmrg# _LT_REQUIRED_DARWIN_CHECKS 2984f6cd06fSmrg# -------------------------- 2994f6cd06fSmrg# Check for some things on darwin 3004f6cd06fSmrgAC_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 3094f6cd06fSmrg # By default we will add the -single_module flag. You can override 3104f6cd06fSmrg # by either setting the environment variable LT_MULTI_MODULE 3114f6cd06fSmrg # non-empty at configure time, or by adding -multi_module to the 3124f6cd06fSmrg # link flags. 3134f6cd06fSmrg echo "int foo(void){return 1;}" > conftest.c 3144f6cd06fSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3154f6cd06fSmrg -dynamiclib ${wl}-single_module conftest.c 3164f6cd06fSmrg if test -f libconftest.dylib; then 3174f6cd06fSmrg lt_cv_apple_cc_single_mod=yes 3184f6cd06fSmrg rm -rf libconftest.dylib* 3194f6cd06fSmrg fi 3204f6cd06fSmrg 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([],[])], 3294f6cd06fSmrg [lt_cv_ld_exported_symbols_list=yes], 3304f6cd06fSmrg [lt_cv_ld_exported_symbols_list=no]) 3314f6cd06fSmrg LDFLAGS="$save_LDFLAGS" 3324f6cd06fSmrg ]) 3334f6cd06fSmrg case $host_os in 3344f6cd06fSmrg rhapsody* | darwin1.[[0123]]) 3354f6cd06fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 3364f6cd06fSmrg darwin1.*) 3374f6cd06fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3384f6cd06fSmrg 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 3434f6cd06fSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 3444f6cd06fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3454f6cd06fSmrg 10.[[012]]*) 3464f6cd06fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3474f6cd06fSmrg 10.*) 3484f6cd06fSmrg _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 3584f6cd06fSmrg _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 3594f6cd06fSmrg fi 3604f6cd06fSmrg if test "$DSYMUTIL" != ":"; then 3614f6cd06fSmrg _lt_dsymutil="~$DSYMUTIL \$lib || :" 3624f6cd06fSmrg else 3634f6cd06fSmrg _lt_dsymutil= 3644f6cd06fSmrg fi 3654f6cd06fSmrg ;; 3664f6cd06fSmrg esac 3674f6cd06fSmrg]) 368c35d236eSmrg 369c35d236eSmrg# _LT_AC_SYS_LIBPATH_AIX 370c35d236eSmrg# ---------------------- 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. 377c35d236eSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 3784f6cd06fSmrg[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 393c35d236eSmrg])# _LT_AC_SYS_LIBPATH_AIX 394c35d236eSmrg 395c35d236eSmrg 396c35d236eSmrg# _LT_AC_SHELL_INIT(ARG) 397c35d236eSmrg# ---------------------- 398c35d236eSmrgAC_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 404c35d236eSmrg])# _LT_AC_SHELL_INIT 405c35d236eSmrg 406c35d236eSmrg 407c35d236eSmrg# _LT_AC_PROG_ECHO_BACKSLASH 408c35d236eSmrg# -------------------------- 409c35d236eSmrg# Add some code to the start of the generated configure script which 410c35d236eSmrg# will find an echo command which doesn't interpret backslashes. 411c35d236eSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 412c35d236eSmrg[_LT_AC_SHELL_INIT([ 413c35d236eSmrg# Check that we are running under the correct shell. 414c35d236eSmrgSHELL=${CONFIG_SHELL-/bin/sh} 415c35d236eSmrg 416c35d236eSmrgcase X$ECHO in 417c35d236eSmrgX*--fallback-echo) 418c35d236eSmrg # Remove one level of quotation (which was required for Make). 419c35d236eSmrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 420c35d236eSmrg ;; 421c35d236eSmrgesac 422c35d236eSmrg 423c35d236eSmrgecho=${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 : 430c35d236eSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 431c35d236eSmrg # 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 441c35d236eSmrg cat <<EOF 442c35d236eSmrg[$]* 443c35d236eSmrgEOF 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 451c35d236eSmrgif test -z "$ECHO"; then 452c35d236eSmrgif test "X${echo_test_string+set}" != Xset; then 453c35d236eSmrg# find a string as large as possible, as long as the shell can cope with it 454c35d236eSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 455c35d236eSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 456c35d236eSmrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 457c35d236eSmrg echo_test_string=`eval $cmd` && 458c35d236eSmrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 459c35d236eSmrg then 460c35d236eSmrg break 461c35d236eSmrg fi 462c35d236eSmrg done 463c35d236eSmrgfi 464c35d236eSmrg 465c35d236eSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 466c35d236eSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 467c35d236eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 468c35d236eSmrg : 469c35d236eSmrgelse 470c35d236eSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 471c35d236eSmrg # backslashes. This makes it impossible to quote backslashes using 472c35d236eSmrg # echo "$something" | sed 's/\\/\\\\/g' 473c35d236eSmrg # 474c35d236eSmrg # So, first we look for a working echo in the user's PATH. 475c35d236eSmrg 476c35d236eSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 477c35d236eSmrg for dir in $PATH /usr/ucb; do 478c35d236eSmrg IFS="$lt_save_ifs" 479c35d236eSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 480c35d236eSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 481c35d236eSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 482c35d236eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 483c35d236eSmrg echo="$dir/echo" 484c35d236eSmrg break 485c35d236eSmrg fi 486c35d236eSmrg done 487c35d236eSmrg IFS="$lt_save_ifs" 488c35d236eSmrg 489c35d236eSmrg if test "X$echo" = Xecho; then 490c35d236eSmrg # We didn't find a better echo, so look for alternatives. 491c35d236eSmrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 492c35d236eSmrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 493c35d236eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 494c35d236eSmrg # This shell has a builtin print -r that does the trick. 495c35d236eSmrg echo='print -r' 496c35d236eSmrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 497c35d236eSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 498c35d236eSmrg # If we have ksh, try running configure again with it. 499c35d236eSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 500c35d236eSmrg export ORIGINAL_CONFIG_SHELL 501c35d236eSmrg CONFIG_SHELL=/bin/ksh 502c35d236eSmrg export CONFIG_SHELL 503c35d236eSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 504c35d236eSmrg else 505c35d236eSmrg # Try using printf. 506c35d236eSmrg echo='printf %s\n' 507c35d236eSmrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 508c35d236eSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 509c35d236eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 510c35d236eSmrg # Cool, printf works 511c35d236eSmrg : 512c35d236eSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 513c35d236eSmrg test "X$echo_testing_string" = 'X\t' && 514c35d236eSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 515c35d236eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 516c35d236eSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 517c35d236eSmrg export CONFIG_SHELL 518c35d236eSmrg SHELL="$CONFIG_SHELL" 519c35d236eSmrg export SHELL 520c35d236eSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 521c35d236eSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 522c35d236eSmrg test "X$echo_testing_string" = 'X\t' && 523c35d236eSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 524c35d236eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 525c35d236eSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 526c35d236eSmrg else 527c35d236eSmrg # maybe with a smaller string... 528c35d236eSmrg prev=: 529c35d236eSmrg 530c35d236eSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 531c35d236eSmrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 532c35d236eSmrg then 533c35d236eSmrg break 534c35d236eSmrg fi 535c35d236eSmrg prev="$cmd" 536c35d236eSmrg done 537c35d236eSmrg 538c35d236eSmrg if test "$prev" != 'sed 50q "[$]0"'; then 539c35d236eSmrg echo_test_string=`eval $prev` 540c35d236eSmrg export echo_test_string 541c35d236eSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 542c35d236eSmrg else 543c35d236eSmrg # Oops. We lost completely, so just stick with echo. 544c35d236eSmrg echo=echo 545c35d236eSmrg fi 546c35d236eSmrg fi 547c35d236eSmrg fi 548c35d236eSmrg fi 549c35d236eSmrgfi 550c35d236eSmrgfi 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. 554c35d236eSmrgECHO=$echo 555c35d236eSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 556c35d236eSmrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 557c35d236eSmrgfi 558c35d236eSmrg 559c35d236eSmrgAC_SUBST(ECHO) 560c35d236eSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH 561c35d236eSmrg 562c35d236eSmrg 563c35d236eSmrg# _LT_AC_LOCK 564c35d236eSmrg# ----------- 565c35d236eSmrgAC_DEFUN([_LT_AC_LOCK], 566c35d236eSmrg[AC_ARG_ENABLE([libtool-lock], 567c35d236eSmrg [AC_HELP_STRING([--disable-libtool-lock], 568c35d236eSmrg [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 579c35d236eSmrg *ELF-32*) 580c35d236eSmrg HPUX_IA64_MODE="32" 581c35d236eSmrg ;; 582c35d236eSmrg *ELF-64*) 583c35d236eSmrg HPUX_IA64_MODE="64" 584c35d236eSmrg ;; 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 593c35d236eSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 594c35d236eSmrg case `/usr/bin/file conftest.$ac_objext` in 595c35d236eSmrg *32-bit*) 596c35d236eSmrg LD="${LD-ld} -melf32bsmip" 597c35d236eSmrg ;; 598c35d236eSmrg *N32*) 599c35d236eSmrg LD="${LD-ld} -melf32bmipn32" 600c35d236eSmrg ;; 601c35d236eSmrg *64-bit*) 602c35d236eSmrg LD="${LD-ld} -melf64bmip" 603c35d236eSmrg ;; 604c35d236eSmrg esac 605c35d236eSmrg else 606c35d236eSmrg case `/usr/bin/file conftest.$ac_objext` in 607c35d236eSmrg *32-bit*) 608c35d236eSmrg LD="${LD-ld} -32" 609c35d236eSmrg ;; 610c35d236eSmrg *N32*) 611c35d236eSmrg LD="${LD-ld} -n32" 612c35d236eSmrg ;; 613c35d236eSmrg *64-bit*) 614c35d236eSmrg LD="${LD-ld} -64" 615c35d236eSmrg ;; 616c35d236eSmrg esac 617c35d236eSmrg fi 618c35d236eSmrg fi 619c35d236eSmrg rm -rf conftest* 620c35d236eSmrg ;; 621c35d236eSmrg 6224f6cd06fSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 6234f6cd06fSmrgs390*-*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 628c35d236eSmrg *32-bit*) 629c35d236eSmrg case $host in 6304f6cd06fSmrg x86_64-*kfreebsd*-gnu) 6314f6cd06fSmrg LD="${LD-ld} -m elf_i386_fbsd" 6324f6cd06fSmrg ;; 633c35d236eSmrg x86_64-*linux*) 634c35d236eSmrg LD="${LD-ld} -m elf_i386" 635c35d236eSmrg ;; 636c35d236eSmrg ppc64-*linux*|powerpc64-*linux*) 637c35d236eSmrg LD="${LD-ld} -m elf32ppclinux" 638c35d236eSmrg ;; 639c35d236eSmrg s390x-*linux*) 640c35d236eSmrg LD="${LD-ld} -m elf_s390" 641c35d236eSmrg ;; 642c35d236eSmrg sparc64-*linux*) 643c35d236eSmrg LD="${LD-ld} -m elf32_sparc" 644c35d236eSmrg ;; 645c35d236eSmrg esac 646c35d236eSmrg ;; 647c35d236eSmrg *64-bit*) 6484f6cd06fSmrg libsuff=64 649c35d236eSmrg case $host in 6504f6cd06fSmrg x86_64-*kfreebsd*-gnu) 6514f6cd06fSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 6524f6cd06fSmrg ;; 653c35d236eSmrg x86_64-*linux*) 654c35d236eSmrg LD="${LD-ld} -m elf_x86_64" 655c35d236eSmrg ;; 656c35d236eSmrg ppc*-*linux*|powerpc*-*linux*) 657c35d236eSmrg LD="${LD-ld} -m elf64ppc" 658c35d236eSmrg ;; 659c35d236eSmrg s390*-*linux*) 660c35d236eSmrg LD="${LD-ld} -m elf64_s390" 661c35d236eSmrg ;; 662c35d236eSmrg sparc*-*linux*) 663c35d236eSmrg LD="${LD-ld} -m elf64_sparc" 664c35d236eSmrg ;; 665c35d236eSmrg esac 666c35d236eSmrg ;; 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) 678c35d236eSmrg 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 *) 6944f6cd06fSmrg 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 ;; 704c35d236eSmrg 705c35d236eSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 706c35d236eSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 707c35d236eSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 708c35d236eSmrg AC_CHECK_TOOL(AS, as, false) 709c35d236eSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 710c35d236eSmrg ;; 711c35d236eSmrg ]) 712c35d236eSmrgesac 713c35d236eSmrg 714c35d236eSmrgneed_locks="$enable_libtool_lock" 715c35d236eSmrg 716c35d236eSmrg])# _LT_AC_LOCK 717c35d236eSmrg 718c35d236eSmrg 719c35d236eSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 720c35d236eSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 721c35d236eSmrg# ---------------------------------------------------------------- 722c35d236eSmrg# Check whether the given compiler option works 723c35d236eSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 724c35d236eSmrg[AC_REQUIRE([LT_AC_PROG_SED]) 725c35d236eSmrgAC_CACHE_CHECK([$1], [$2], 726c35d236eSmrg [$2=no 727c35d236eSmrg 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. 747c35d236eSmrg $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 753c35d236eSmrg $rm conftest* 754c35d236eSmrg]) 755c35d236eSmrg 756c35d236eSmrgif test x"[$]$2" = xyes; then 757c35d236eSmrg ifelse([$5], , :, [$5]) 758c35d236eSmrgelse 759c35d236eSmrg ifelse([$6], , :, [$6]) 760c35d236eSmrgfi 761c35d236eSmrg])# AC_LIBTOOL_COMPILER_OPTION 762c35d236eSmrg 763c35d236eSmrg 764c35d236eSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 765c35d236eSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 766c35d236eSmrg# ------------------------------------------------------------ 767c35d236eSmrg# Check whether the given compiler option works 768c35d236eSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 7694f6cd06fSmrg[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 781c35d236eSmrg $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 7904f6cd06fSmrg $rm -r conftest* 791c35d236eSmrg LDFLAGS="$save_LDFLAGS" 792c35d236eSmrg]) 793c35d236eSmrg 794c35d236eSmrgif test x"[$]$2" = xyes; then 795c35d236eSmrg ifelse([$4], , :, [$4]) 796c35d236eSmrgelse 797c35d236eSmrg ifelse([$5], , :, [$5]) 798c35d236eSmrgfi 799c35d236eSmrg])# AC_LIBTOOL_LINKER_OPTION 800c35d236eSmrg 801c35d236eSmrg 802c35d236eSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 803c35d236eSmrg# -------------------------- 804c35d236eSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 805c35d236eSmrg[# 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 827c35d236eSmrg 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 882c35d236eSmrg 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}} 8944f6cd06fSmrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 895c35d236eSmrg = "XX$teststring") >/dev/null 2>&1 && 8964f6cd06fSmrg new_result=`expr "X$teststring" : ".*" 2>&1` && 8974f6cd06fSmrg 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= 9044f6cd06fSmrg # Add a significant safety factor because C++ compilers can tack on massive 9054f6cd06fSmrg # amounts of additional arguments before passing them to the linker. 9064f6cd06fSmrg # 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 917c35d236eSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 918c35d236eSmrg 919c35d236eSmrg 920c35d236eSmrg# _LT_AC_CHECK_DLFCN 921c35d236eSmrg# ------------------ 922c35d236eSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 923c35d236eSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl 924c35d236eSmrg])# _LT_AC_CHECK_DLFCN 925c35d236eSmrg 926c35d236eSmrg 927c35d236eSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 928c35d236eSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 929c35d236eSmrg# --------------------------------------------------------------------- 930c35d236eSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 931c35d236eSmrg[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 937c35d236eSmrg 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 979c35d236eSmrg#ifdef __cplusplus 980c35d236eSmrgextern "C" void exit (int); 981c35d236eSmrg#endif 982c35d236eSmrg 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 998c35d236eSmrg exit (status); 999c35d236eSmrg}] 1000c35d236eSmrgEOF 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* 1015c35d236eSmrg])# _LT_AC_TRY_DLOPEN_SELF 1016c35d236eSmrg 1017c35d236eSmrg 1018c35d236eSmrg# AC_LIBTOOL_DLOPEN_SELF 1019c35d236eSmrg# ---------------------- 1020c35d236eSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 1021c35d236eSmrg[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 1037c35d236eSmrg mingw* | pw32*) 1038c35d236eSmrg lt_cv_dlopen="LoadLibrary" 1039c35d236eSmrg lt_cv_dlopen_libs= 1040c35d236eSmrg ;; 1041c35d236eSmrg 1042c35d236eSmrg cygwin*) 1043c35d236eSmrg lt_cv_dlopen="dlopen" 1044c35d236eSmrg lt_cv_dlopen_libs= 1045c35d236eSmrg ;; 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 ]) 1055c35d236eSmrg ;; 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 1097c35d236eSmrg _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], 1105c35d236eSmrg lt_cv_dlopen_self_static, [dnl 1106c35d236eSmrg _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 1128c35d236eSmrg])# AC_LIBTOOL_DLOPEN_SELF 1129c35d236eSmrg 1130c35d236eSmrg 1131c35d236eSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 1132c35d236eSmrg# --------------------------------- 1133c35d236eSmrg# Check to see if options -c and -o are simultaneously supported by compiler 1134c35d236eSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 11354f6cd06fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 11364f6cd06fSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1137c35d236eSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1138c35d236eSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1139c35d236eSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1140c35d236eSmrg $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 1164c35d236eSmrg $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 1167c35d236eSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1168c35d236eSmrg fi 1169c35d236eSmrg fi 1170c35d236eSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1171c35d236eSmrg $rm conftest* 1172c35d236eSmrg # SGI C++ compiler will create directory out/ii_files/ for 1173c35d236eSmrg # template instantiation 1174c35d236eSmrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1175c35d236eSmrg $rm out/* && rmdir out 1176c35d236eSmrg cd .. 1177c35d236eSmrg rmdir conftest 1178c35d236eSmrg $rm conftest* 1179c35d236eSmrg]) 1180c35d236eSmrg])# AC_LIBTOOL_PROG_CC_C_O 1181c35d236eSmrg 1182c35d236eSmrg 1183c35d236eSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1184c35d236eSmrg# ----------------------------------------- 1185c35d236eSmrg# Check to see if we can do hard links to lock some files if needed 1186c35d236eSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1187c35d236eSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl 1188c35d236eSmrg 1189c35d236eSmrghard_links="nottested" 1190c35d236eSmrgif 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 1194c35d236eSmrg $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 1207c35d236eSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1208c35d236eSmrg 1209c35d236eSmrg 1210c35d236eSmrg# AC_LIBTOOL_OBJDIR 1211c35d236eSmrg# ----------------- 1212c35d236eSmrgAC_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 1224c35d236eSmrg])# AC_LIBTOOL_OBJDIR 1225c35d236eSmrg 1226c35d236eSmrg 1227c35d236eSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1228c35d236eSmrg# ---------------------------------------------- 1229c35d236eSmrg# Check hardcoding attributes. 1230c35d236eSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 1231c35d236eSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1232c35d236eSmrg_LT_AC_TAGVAR(hardcode_action, $1)= 1233c35d236eSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1234c35d236eSmrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1235c35d236eSmrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1236c35d236eSmrg 1237c35d236eSmrg # We can hardcode non-existant directories. 1238c35d236eSmrg 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 1242c35d236eSmrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1243c35d236eSmrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 1244c35d236eSmrg # Linking always hardcodes the temporary library directory. 1245c35d236eSmrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 1246c35d236eSmrg else 1247c35d236eSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1248c35d236eSmrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 1249c35d236eSmrg fi 1250c35d236eSmrgelse 1251c35d236eSmrg # We cannot hardcode anything, or else we can only hardcode existing 1252c35d236eSmrg # directories. 1253c35d236eSmrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1254c35d236eSmrgfi 1255c35d236eSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1256c35d236eSmrg 1257c35d236eSmrgif 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 1265c35d236eSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 1266c35d236eSmrg 1267c35d236eSmrg 1268c35d236eSmrg# AC_LIBTOOL_SYS_LIB_STRIP 1269c35d236eSmrg# ------------------------ 1270c35d236eSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1271c35d236eSmrg[striplib= 1272c35d236eSmrgold_striplib= 1273c35d236eSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 1274c35d236eSmrgif 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 1281c35d236eSmrg darwin*) 1282c35d236eSmrg if test -n "$STRIP" ; then 1283c35d236eSmrg striplib="$STRIP -x" 12844f6cd06fSmrg old_striplib="$STRIP -S" 1285c35d236eSmrg AC_MSG_RESULT([yes]) 1286c35d236eSmrg else 1287c35d236eSmrg AC_MSG_RESULT([no]) 1288c35d236eSmrgfi 1289c35d236eSmrg ;; 1290c35d236eSmrg *) 1291c35d236eSmrg AC_MSG_RESULT([no]) 1292c35d236eSmrg ;; 1293c35d236eSmrg esac 1294c35d236eSmrgfi 1295c35d236eSmrg])# AC_LIBTOOL_SYS_LIB_STRIP 1296c35d236eSmrg 1297c35d236eSmrg 1298c35d236eSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1299c35d236eSmrg# ----------------------------- 1300c35d236eSmrg# PORTME Fill in your ld.so characteristics 1301c35d236eSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 13024f6cd06fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 13034f6cd06fSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 1304c35d236eSmrglibrary_names_spec= 1305c35d236eSmrglibname_spec='lib$name' 1306c35d236eSmrgsoname_spec= 1307c35d236eSmrgshrext_cmds=".so" 1308c35d236eSmrgpostinstall_cmds= 1309c35d236eSmrgpostuninstall_cmds= 1310c35d236eSmrgfinish_cmds= 1311c35d236eSmrgfinish_eval= 1312c35d236eSmrgshlibpath_var= 1313c35d236eSmrgshlibpath_overrides_runpath=unknown 1314c35d236eSmrgversion_type=none 1315c35d236eSmrgdynamic_linker="$host_os ld.so" 1316c35d236eSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 13174f6cd06fSmrgm4_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"` 13244f6cd06fSmrg 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. 13294f6cd06fSmrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 1330c35d236eSmrg else 13314f6cd06fSmrg 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 13454f6cd06fSmrg 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}'` 13654f6cd06fSmrg 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 ' 1405c35d236eSmrg 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*) 1431c35d236eSmrg library_names_spec='$libname.ixlibrary $libname.a' 1432c35d236eSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 1433c35d236eSmrg 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 1456c35d236eSmrgcygwin* | 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 1463c35d236eSmrg 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}`~ 1467c35d236eSmrg 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~ 1471c35d236eSmrg chmod a+x \$dldir/$dlname' 1472c35d236eSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 1473c35d236eSmrg dlpath=$dir/\$dldll~ 1474c35d236eSmrg $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 ;; 1483c35d236eSmrg mingw*) 1484c35d236eSmrg # MinGW DLLs use traditional 'lib' prefix 1485c35d236eSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1486c35d236eSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1487c35d236eSmrg 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. 1494c35d236eSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1495c35d236eSmrg else 1496c35d236eSmrg 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 1520c35d236eSmrg 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`' 15254f6cd06fSmrg m4_if([$1], [],[ 15264f6cd06fSmrg 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 ;; 1619c35d236eSmrg hppa*64*) 1620c35d236eSmrg shrext_cmds='.sl' 1621c35d236eSmrg hardcode_into_libs=yes 1622c35d236eSmrg dynamic_linker="$host_os dld.sl" 1623c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1624c35d236eSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1625c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1626c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1627c35d236eSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1628c35d236eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1629c35d236eSmrg ;; 1630c35d236eSmrg *) 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 17114f6cd06fSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 17124f6cd06fSmrg 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 17164f6cd06fSmrg 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 1733c35d236eSmrg 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 1754c35d236eSmrgnto-qnx*) 1755c35d236eSmrg 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 1761c35d236eSmrg 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 1770c35d236eSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 1771c35d236eSmrg *) 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 1776c35d236eSmrg 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 1848c35d236eSmrg 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' 1882c35d236eSmrg shlibpath_overrides_runpath=no 1883c35d236eSmrg else 1884c35d236eSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 1885c35d236eSmrg 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 19094f6cd06fSmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 19104f6cd06fSmrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 19114f6cd06fSmrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 19124f6cd06fSmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 19134f6cd06fSmrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 19144f6cd06fSmrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 19154f6cd06fSmrg 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 1920c35d236eSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1921c35d236eSmrg 1922c35d236eSmrg 1923c35d236eSmrg# _LT_AC_TAGCONFIG 1924c35d236eSmrg# ---------------- 1925c35d236eSmrgAC_DEFUN([_LT_AC_TAGCONFIG], 19264f6cd06fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 19274f6cd06fSmrgAC_ARG_WITH([tags], 1928c35d236eSmrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 1929c35d236eSmrg [include additional configurations @<:@automatic@:>@])], 1930c35d236eSmrg [tagnames="$withval"]) 1931c35d236eSmrg 1932c35d236eSmrgif test -f "$ltmain" && test -n "$tagnames"; then 1933c35d236eSmrg if test ! -f "${ofile}"; then 1934c35d236eSmrg AC_MSG_WARN([output file `$ofile' does not exist]) 1935c35d236eSmrg fi 1936c35d236eSmrg 1937c35d236eSmrg if test -z "$LTCC"; then 1938c35d236eSmrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 1939c35d236eSmrg if test -z "$LTCC"; then 1940c35d236eSmrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 1941c35d236eSmrg else 1942c35d236eSmrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 1943c35d236eSmrg fi 1944c35d236eSmrg fi 1945c35d236eSmrg if test -z "$LTCFLAGS"; then 1946c35d236eSmrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 1947c35d236eSmrg fi 1948c35d236eSmrg 1949c35d236eSmrg # Extract list of available tagged configurations in $ofile. 1950c35d236eSmrg # Note that this assumes the entire list is on one line. 1951c35d236eSmrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 1952c35d236eSmrg 1953c35d236eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1954c35d236eSmrg for tagname in $tagnames; do 1955c35d236eSmrg IFS="$lt_save_ifs" 1956c35d236eSmrg # Check whether tagname contains only valid characters 1957c35d236eSmrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 1958c35d236eSmrg "") ;; 1959c35d236eSmrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 1960c35d236eSmrg ;; 1961c35d236eSmrg esac 1962c35d236eSmrg 1963c35d236eSmrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 1964c35d236eSmrg then 1965c35d236eSmrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 1966c35d236eSmrg fi 1967c35d236eSmrg 1968c35d236eSmrg # Update the list of available tags. 1969c35d236eSmrg if test -n "$tagname"; then 1970c35d236eSmrg echo appending configuration tag \"$tagname\" to $ofile 1971c35d236eSmrg 1972c35d236eSmrg case $tagname in 1973c35d236eSmrg CXX) 1974c35d236eSmrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 1975c35d236eSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 1976c35d236eSmrg (test "X$CXX" != "Xg++"))) ; then 1977c35d236eSmrg AC_LIBTOOL_LANG_CXX_CONFIG 1978c35d236eSmrg else 1979c35d236eSmrg tagname="" 1980c35d236eSmrg fi 1981c35d236eSmrg ;; 1982c35d236eSmrg 1983c35d236eSmrg F77) 1984c35d236eSmrg if test -n "$F77" && test "X$F77" != "Xno"; then 1985c35d236eSmrg AC_LIBTOOL_LANG_F77_CONFIG 1986c35d236eSmrg else 1987c35d236eSmrg tagname="" 1988c35d236eSmrg fi 1989c35d236eSmrg ;; 1990c35d236eSmrg 1991c35d236eSmrg GCJ) 1992c35d236eSmrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 1993c35d236eSmrg AC_LIBTOOL_LANG_GCJ_CONFIG 1994c35d236eSmrg else 1995c35d236eSmrg tagname="" 1996c35d236eSmrg fi 1997c35d236eSmrg ;; 1998c35d236eSmrg 1999c35d236eSmrg RC) 2000c35d236eSmrg AC_LIBTOOL_LANG_RC_CONFIG 2001c35d236eSmrg ;; 2002c35d236eSmrg 2003c35d236eSmrg *) 2004c35d236eSmrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 2005c35d236eSmrg ;; 2006c35d236eSmrg esac 2007c35d236eSmrg 2008c35d236eSmrg # Append the new tag name to the list of available tags. 2009c35d236eSmrg if test -n "$tagname" ; then 2010c35d236eSmrg available_tags="$available_tags $tagname" 2011c35d236eSmrg fi 2012c35d236eSmrg fi 2013c35d236eSmrg done 2014c35d236eSmrg IFS="$lt_save_ifs" 2015c35d236eSmrg 2016c35d236eSmrg # Now substitute the updated list of available tags. 2017c35d236eSmrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 2018c35d236eSmrg mv "${ofile}T" "$ofile" 2019c35d236eSmrg chmod +x "$ofile" 2020c35d236eSmrg else 2021c35d236eSmrg rm -f "${ofile}T" 2022c35d236eSmrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 2023c35d236eSmrg fi 2024c35d236eSmrgfi 2025c35d236eSmrg])# _LT_AC_TAGCONFIG 2026c35d236eSmrg 2027c35d236eSmrg 2028c35d236eSmrg# AC_LIBTOOL_DLOPEN 2029c35d236eSmrg# ----------------- 2030c35d236eSmrg# enable checks for dlopen support 2031c35d236eSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 2032c35d236eSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 2033c35d236eSmrg])# AC_LIBTOOL_DLOPEN 2034c35d236eSmrg 2035c35d236eSmrg 2036c35d236eSmrg# AC_LIBTOOL_WIN32_DLL 2037c35d236eSmrg# -------------------- 2038c35d236eSmrg# declare package support for building win32 DLLs 2039c35d236eSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 2040c35d236eSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 2041c35d236eSmrg])# AC_LIBTOOL_WIN32_DLL 2042c35d236eSmrg 2043c35d236eSmrg 2044c35d236eSmrg# AC_ENABLE_SHARED([DEFAULT]) 2045c35d236eSmrg# --------------------------- 2046c35d236eSmrg# implement the --enable-shared flag 2047c35d236eSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2048c35d236eSmrgAC_DEFUN([AC_ENABLE_SHARED], 2049c35d236eSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 2050c35d236eSmrgAC_ARG_ENABLE([shared], 2051c35d236eSmrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 2052c35d236eSmrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 2053c35d236eSmrg [p=${PACKAGE-default} 2054c35d236eSmrg case $enableval in 2055c35d236eSmrg yes) enable_shared=yes ;; 2056c35d236eSmrg no) enable_shared=no ;; 2057c35d236eSmrg *) 2058c35d236eSmrg enable_shared=no 2059c35d236eSmrg # Look at the argument we got. We use all the common list separators. 2060c35d236eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2061c35d236eSmrg for pkg in $enableval; do 2062c35d236eSmrg IFS="$lt_save_ifs" 2063c35d236eSmrg if test "X$pkg" = "X$p"; then 2064c35d236eSmrg enable_shared=yes 2065c35d236eSmrg fi 2066c35d236eSmrg done 2067c35d236eSmrg IFS="$lt_save_ifs" 2068c35d236eSmrg ;; 2069c35d236eSmrg esac], 2070c35d236eSmrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 2071c35d236eSmrg])# AC_ENABLE_SHARED 2072c35d236eSmrg 2073c35d236eSmrg 2074c35d236eSmrg# AC_DISABLE_SHARED 2075c35d236eSmrg# ----------------- 2076c35d236eSmrg# set the default shared flag to --disable-shared 2077c35d236eSmrgAC_DEFUN([AC_DISABLE_SHARED], 2078c35d236eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2079c35d236eSmrgAC_ENABLE_SHARED(no) 2080c35d236eSmrg])# AC_DISABLE_SHARED 2081c35d236eSmrg 2082c35d236eSmrg 2083c35d236eSmrg# AC_ENABLE_STATIC([DEFAULT]) 2084c35d236eSmrg# --------------------------- 2085c35d236eSmrg# implement the --enable-static flag 2086c35d236eSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2087c35d236eSmrgAC_DEFUN([AC_ENABLE_STATIC], 2088c35d236eSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 2089c35d236eSmrgAC_ARG_ENABLE([static], 2090c35d236eSmrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 2091c35d236eSmrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 2092c35d236eSmrg [p=${PACKAGE-default} 2093c35d236eSmrg case $enableval in 2094c35d236eSmrg yes) enable_static=yes ;; 2095c35d236eSmrg no) enable_static=no ;; 2096c35d236eSmrg *) 2097c35d236eSmrg enable_static=no 2098c35d236eSmrg # Look at the argument we got. We use all the common list separators. 2099c35d236eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2100c35d236eSmrg for pkg in $enableval; do 2101c35d236eSmrg IFS="$lt_save_ifs" 2102c35d236eSmrg if test "X$pkg" = "X$p"; then 2103c35d236eSmrg enable_static=yes 2104c35d236eSmrg fi 2105c35d236eSmrg done 2106c35d236eSmrg IFS="$lt_save_ifs" 2107c35d236eSmrg ;; 2108c35d236eSmrg esac], 2109c35d236eSmrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 2110c35d236eSmrg])# AC_ENABLE_STATIC 2111c35d236eSmrg 2112c35d236eSmrg 2113c35d236eSmrg# AC_DISABLE_STATIC 2114c35d236eSmrg# ----------------- 2115c35d236eSmrg# set the default static flag to --disable-static 2116c35d236eSmrgAC_DEFUN([AC_DISABLE_STATIC], 2117c35d236eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2118c35d236eSmrgAC_ENABLE_STATIC(no) 2119c35d236eSmrg])# AC_DISABLE_STATIC 2120c35d236eSmrg 2121c35d236eSmrg 2122c35d236eSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 2123c35d236eSmrg# --------------------------------- 2124c35d236eSmrg# implement the --enable-fast-install flag 2125c35d236eSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2126c35d236eSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 2127c35d236eSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2128c35d236eSmrgAC_ARG_ENABLE([fast-install], 2129c35d236eSmrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2130c35d236eSmrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2131c35d236eSmrg [p=${PACKAGE-default} 2132c35d236eSmrg case $enableval in 2133c35d236eSmrg yes) enable_fast_install=yes ;; 2134c35d236eSmrg no) enable_fast_install=no ;; 2135c35d236eSmrg *) 2136c35d236eSmrg enable_fast_install=no 2137c35d236eSmrg # Look at the argument we got. We use all the common list separators. 2138c35d236eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2139c35d236eSmrg for pkg in $enableval; do 2140c35d236eSmrg IFS="$lt_save_ifs" 2141c35d236eSmrg if test "X$pkg" = "X$p"; then 2142c35d236eSmrg enable_fast_install=yes 2143c35d236eSmrg fi 2144c35d236eSmrg done 2145c35d236eSmrg IFS="$lt_save_ifs" 2146c35d236eSmrg ;; 2147c35d236eSmrg esac], 2148c35d236eSmrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 2149c35d236eSmrg])# AC_ENABLE_FAST_INSTALL 2150c35d236eSmrg 2151c35d236eSmrg 2152c35d236eSmrg# AC_DISABLE_FAST_INSTALL 2153c35d236eSmrg# ----------------------- 2154c35d236eSmrg# set the default to --disable-fast-install 2155c35d236eSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 2156c35d236eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2157c35d236eSmrgAC_ENABLE_FAST_INSTALL(no) 2158c35d236eSmrg])# AC_DISABLE_FAST_INSTALL 2159c35d236eSmrg 2160c35d236eSmrg 2161c35d236eSmrg# AC_LIBTOOL_PICMODE([MODE]) 2162c35d236eSmrg# -------------------------- 2163c35d236eSmrg# implement the --with-pic flag 2164c35d236eSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 2165c35d236eSmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 2166c35d236eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2167c35d236eSmrgpic_mode=ifelse($#,1,$1,default) 2168c35d236eSmrg])# AC_LIBTOOL_PICMODE 2169c35d236eSmrg 2170c35d236eSmrg 2171c35d236eSmrg# AC_PROG_EGREP 2172c35d236eSmrg# ------------- 2173c35d236eSmrg# This is predefined starting with Autoconf 2.54, so this conditional 2174c35d236eSmrg# definition can be removed once we require Autoconf 2.54 or later. 2175c35d236eSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 2176c35d236eSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 2177c35d236eSmrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 2178c35d236eSmrg then ac_cv_prog_egrep='grep -E' 2179c35d236eSmrg else ac_cv_prog_egrep='egrep' 2180c35d236eSmrg fi]) 2181c35d236eSmrg EGREP=$ac_cv_prog_egrep 2182c35d236eSmrg AC_SUBST([EGREP]) 2183c35d236eSmrg])]) 2184c35d236eSmrg 2185c35d236eSmrg 2186c35d236eSmrg# AC_PATH_TOOL_PREFIX 2187c35d236eSmrg# ------------------- 21884f6cd06fSmrg# find a file program which can recognize shared library 2189c35d236eSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 2190c35d236eSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2191c35d236eSmrgAC_MSG_CHECKING([for $1]) 2192c35d236eSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2193c35d236eSmrg[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. 2203c35d236eSmrg 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 2218c35d236eSmrg 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 2229c35d236eSmrgEOF 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 2246c35d236eSmrg])# AC_PATH_TOOL_PREFIX 2247c35d236eSmrg 2248c35d236eSmrg 2249c35d236eSmrg# AC_PATH_MAGIC 2250c35d236eSmrg# ------------- 22514f6cd06fSmrg# find a file program which can recognize a shared library 2252c35d236eSmrgAC_DEFUN([AC_PATH_MAGIC], 2253c35d236eSmrg[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 2256c35d236eSmrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2257c35d236eSmrg else 2258c35d236eSmrg MAGIC_CMD=: 2259c35d236eSmrg fi 2260c35d236eSmrgfi 2261c35d236eSmrg])# AC_PATH_MAGIC 2262c35d236eSmrg 2263c35d236eSmrg 2264c35d236eSmrg# AC_PROG_LD 2265c35d236eSmrg# ---------- 2266c35d236eSmrg# find the pathname to the GNU or non-GNU linker 2267c35d236eSmrgAC_DEFUN([AC_PROG_LD], 2268c35d236eSmrg[AC_ARG_WITH([gnu-ld], 2269c35d236eSmrg [AC_HELP_STRING([--with-gnu-ld], 2270c35d236eSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2271c35d236eSmrg [test "$withval" = no || with_gnu_ld=yes], 2272c35d236eSmrg [with_gnu_ld=no]) 2273c35d236eSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 2274c35d236eSmrgAC_REQUIRE([AC_PROG_CC])dnl 2275c35d236eSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2276c35d236eSmrgAC_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 2293c35d236eSmrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2294c35d236eSmrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2295c35d236eSmrg 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]) 2345c35d236eSmrgAC_PROG_LD_GNU 2346c35d236eSmrg])# AC_PROG_LD 2347c35d236eSmrg 2348c35d236eSmrg 2349c35d236eSmrg# AC_PROG_LD_GNU 2350c35d236eSmrg# -------------- 2351c35d236eSmrgAC_DEFUN([AC_PROG_LD_GNU], 2352c35d236eSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2353c35d236eSmrgAC_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 2364c35d236eSmrg])# AC_PROG_LD_GNU 2365c35d236eSmrg 2366c35d236eSmrg 2367c35d236eSmrg# AC_PROG_LD_RELOAD_FLAG 2368c35d236eSmrg# ---------------------- 2369c35d236eSmrg# find reload flag for linker 2370c35d236eSmrg# -- PORTME Some linkers may need a different reload flag. 2371c35d236eSmrgAC_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 2390c35d236eSmrg])# AC_PROG_LD_RELOAD_FLAG 2391c35d236eSmrg 2392c35d236eSmrg 2393c35d236eSmrg# AC_DEPLIBS_CHECK_METHOD 2394c35d236eSmrg# ----------------------- 2395c35d236eSmrg# how to check for library dependencies 2396c35d236eSmrg# -- PORTME fill in with the dynamic library characteristics 2397c35d236eSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 23984f6cd06fSmrg[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*) 2453c35d236eSmrg 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*) 2511c35d236eSmrg 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 2524c35d236eSmrgnto-qnx*) 2525c35d236eSmrg lt_cv_deplibs_check_method=unknown 2526c35d236eSmrg ;; 2527c35d236eSmrg 2528c35d236eSmrgopenbsd*) 2529c35d236eSmrg 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 2575c35d236eSmrgsysv5* | 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 2583c35d236eSmrg])# AC_DEPLIBS_CHECK_METHOD 2584c35d236eSmrg 2585c35d236eSmrg 2586c35d236eSmrg# AC_PROG_NM 2587c35d236eSmrg# ---------- 2588c35d236eSmrg# find the pathname to a BSD-compatible name lister 2589c35d236eSmrgAC_DEFUN([AC_PROG_NM], 2590c35d236eSmrg[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 2632c35d236eSmrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 2633c35d236eSmrgfi]) 2634c35d236eSmrgNM="$lt_cv_path_NM" 2635c35d236eSmrg])# AC_PROG_NM 2636c35d236eSmrg 2637c35d236eSmrg 2638c35d236eSmrg# AC_CHECK_LIBM 2639c35d236eSmrg# ------------- 2640c35d236eSmrg# check for math library 2641c35d236eSmrgAC_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 2656c35d236eSmrg])# AC_CHECK_LIBM 2657c35d236eSmrg 2658c35d236eSmrg 2659c35d236eSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 2660c35d236eSmrg# ----------------------------------- 2661c35d236eSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and 2662c35d236eSmrg# LTDLINCL to the include flags for the libltdl header and adds 2663c35d236eSmrg# --enable-ltdl-convenience to the configure arguments. Note that 2664c35d236eSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2665c35d236eSmrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 2666c35d236eSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 2667c35d236eSmrg# (note the single quotes!). If your package is not flat and you're not 2668c35d236eSmrg# using automake, define top_builddir and top_srcdir appropriately in 2669c35d236eSmrg# the Makefiles. 2670c35d236eSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 2671c35d236eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2672c35d236eSmrg case $enable_ltdl_convenience in 2673c35d236eSmrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2674c35d236eSmrg "") enable_ltdl_convenience=yes 2675c35d236eSmrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2676c35d236eSmrg esac 2677c35d236eSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2678c35d236eSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2679c35d236eSmrg # For backwards non-gettext consistent compatibility... 2680c35d236eSmrg INCLTDL="$LTDLINCL" 2681c35d236eSmrg])# AC_LIBLTDL_CONVENIENCE 2682c35d236eSmrg 2683c35d236eSmrg 2684c35d236eSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 2685c35d236eSmrg# ----------------------------------- 2686c35d236eSmrg# sets LIBLTDL to the link flags for the libltdl installable library and 2687c35d236eSmrg# LTDLINCL to the include flags for the libltdl header and adds 2688c35d236eSmrg# --enable-ltdl-install to the configure arguments. Note that 2689c35d236eSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2690c35d236eSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 2691c35d236eSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 2692c35d236eSmrg# '${top_srcdir}/' (note the single quotes!). If your package is not 2693c35d236eSmrg# flat and you're not using automake, define top_builddir and top_srcdir 2694c35d236eSmrg# appropriately in the Makefiles. 2695c35d236eSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2696c35d236eSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 2697c35d236eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2698c35d236eSmrg AC_CHECK_LIB(ltdl, lt_dlinit, 2699c35d236eSmrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2700c35d236eSmrg [if test x"$enable_ltdl_install" = xno; then 2701c35d236eSmrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 2702c35d236eSmrg else 2703c35d236eSmrg enable_ltdl_install=yes 2704c35d236eSmrg fi 2705c35d236eSmrg ]) 2706c35d236eSmrg if test x"$enable_ltdl_install" = x"yes"; then 2707c35d236eSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 2708c35d236eSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2709c35d236eSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2710c35d236eSmrg else 2711c35d236eSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2712c35d236eSmrg LIBLTDL="-lltdl" 2713c35d236eSmrg LTDLINCL= 2714c35d236eSmrg fi 2715c35d236eSmrg # For backwards non-gettext consistent compatibility... 2716c35d236eSmrg INCLTDL="$LTDLINCL" 2717c35d236eSmrg])# AC_LIBLTDL_INSTALLABLE 2718c35d236eSmrg 2719c35d236eSmrg 2720c35d236eSmrg# AC_LIBTOOL_CXX 2721c35d236eSmrg# -------------- 2722c35d236eSmrg# enable support for C++ libraries 2723c35d236eSmrgAC_DEFUN([AC_LIBTOOL_CXX], 2724c35d236eSmrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 2725c35d236eSmrg])# AC_LIBTOOL_CXX 2726c35d236eSmrg 2727c35d236eSmrg 2728c35d236eSmrg# _LT_AC_LANG_CXX 2729c35d236eSmrg# --------------- 2730c35d236eSmrgAC_DEFUN([_LT_AC_LANG_CXX], 2731c35d236eSmrg[AC_REQUIRE([AC_PROG_CXX]) 2732c35d236eSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2733c35d236eSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 2734c35d236eSmrg])# _LT_AC_LANG_CXX 2735c35d236eSmrg 2736c35d236eSmrg# _LT_AC_PROG_CXXCPP 2737c35d236eSmrg# ------------------ 2738c35d236eSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 2739c35d236eSmrg[ 2740c35d236eSmrgAC_REQUIRE([AC_PROG_CXX]) 2741c35d236eSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 2742c35d236eSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 2743c35d236eSmrg (test "X$CXX" != "Xg++"))) ; then 2744c35d236eSmrg AC_PROG_CXXCPP 2745c35d236eSmrgfi 2746c35d236eSmrg])# _LT_AC_PROG_CXXCPP 2747c35d236eSmrg 2748c35d236eSmrg# AC_LIBTOOL_F77 2749c35d236eSmrg# -------------- 2750c35d236eSmrg# enable support for Fortran 77 libraries 2751c35d236eSmrgAC_DEFUN([AC_LIBTOOL_F77], 2752c35d236eSmrg[AC_REQUIRE([_LT_AC_LANG_F77]) 2753c35d236eSmrg])# AC_LIBTOOL_F77 2754c35d236eSmrg 2755c35d236eSmrg 2756c35d236eSmrg# _LT_AC_LANG_F77 2757c35d236eSmrg# --------------- 2758c35d236eSmrgAC_DEFUN([_LT_AC_LANG_F77], 2759c35d236eSmrg[AC_REQUIRE([AC_PROG_F77]) 2760c35d236eSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 2761c35d236eSmrg])# _LT_AC_LANG_F77 2762c35d236eSmrg 2763c35d236eSmrg 2764c35d236eSmrg# AC_LIBTOOL_GCJ 2765c35d236eSmrg# -------------- 2766c35d236eSmrg# enable support for GCJ libraries 2767c35d236eSmrgAC_DEFUN([AC_LIBTOOL_GCJ], 2768c35d236eSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 2769c35d236eSmrg])# AC_LIBTOOL_GCJ 2770c35d236eSmrg 2771c35d236eSmrg 2772c35d236eSmrg# _LT_AC_LANG_GCJ 2773c35d236eSmrg# --------------- 2774c35d236eSmrgAC_DEFUN([_LT_AC_LANG_GCJ], 2775c35d236eSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 2776c35d236eSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 2777c35d236eSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 2778c35d236eSmrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 2779c35d236eSmrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 2780c35d236eSmrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 2781c35d236eSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 2782c35d236eSmrg])# _LT_AC_LANG_GCJ 2783c35d236eSmrg 2784c35d236eSmrg 2785c35d236eSmrg# AC_LIBTOOL_RC 2786c35d236eSmrg# ------------- 2787c35d236eSmrg# enable support for Windows resource files 2788c35d236eSmrgAC_DEFUN([AC_LIBTOOL_RC], 2789c35d236eSmrg[AC_REQUIRE([LT_AC_PROG_RC]) 2790c35d236eSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 2791c35d236eSmrg])# AC_LIBTOOL_RC 2792c35d236eSmrg 2793c35d236eSmrg 2794c35d236eSmrg# AC_LIBTOOL_LANG_C_CONFIG 2795c35d236eSmrg# ------------------------ 2796c35d236eSmrg# Ensure that the configuration vars for the C compiler are 2797c35d236eSmrg# suitably defined. Those variables are subsequently used by 2798c35d236eSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2799c35d236eSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 2800c35d236eSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 2801c35d236eSmrg[lt_save_CC="$CC" 2802c35d236eSmrgAC_LANG_PUSH(C) 2803c35d236eSmrg 2804c35d236eSmrg# Source file extension for C test sources. 2805c35d236eSmrgac_ext=c 2806c35d236eSmrg 2807c35d236eSmrg# Object file extension for compiled C test sources. 2808c35d236eSmrgobjext=o 2809c35d236eSmrg_LT_AC_TAGVAR(objext, $1)=$objext 2810c35d236eSmrg 2811c35d236eSmrg# Code to be used in simple compile tests 28124f6cd06fSmrglt_simple_compile_test_code="int some_variable = 0;" 2813c35d236eSmrg 2814c35d236eSmrg# Code to be used in simple link tests 28154f6cd06fSmrglt_simple_link_test_code='int main(){return(0);}' 2816c35d236eSmrg 2817c35d236eSmrg_LT_AC_SYS_COMPILER 2818c35d236eSmrg 2819c35d236eSmrg# save warnings/boilerplate of simple test code 2820c35d236eSmrg_LT_COMPILER_BOILERPLATE 2821c35d236eSmrg_LT_LINKER_BOILERPLATE 2822c35d236eSmrg 2823c35d236eSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 2824c35d236eSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 2825c35d236eSmrgAC_LIBTOOL_PROG_CC_C_O($1) 2826c35d236eSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 2827c35d236eSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 2828c35d236eSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 2829c35d236eSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 2830c35d236eSmrgAC_LIBTOOL_SYS_LIB_STRIP 2831c35d236eSmrgAC_LIBTOOL_DLOPEN_SELF 2832c35d236eSmrg 2833c35d236eSmrg# Report which library types will actually be built 2834c35d236eSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 2835c35d236eSmrgAC_MSG_RESULT([$can_build_shared]) 2836c35d236eSmrg 2837c35d236eSmrgAC_MSG_CHECKING([whether to build shared libraries]) 2838c35d236eSmrgtest "$can_build_shared" = "no" && enable_shared=no 2839c35d236eSmrg 2840c35d236eSmrg# On AIX, shared libraries and static libraries use the same namespace, and 2841c35d236eSmrg# are all built from PIC. 2842c35d236eSmrgcase $host_os in 2843c35d236eSmrgaix3*) 2844c35d236eSmrg test "$enable_shared" = yes && enable_static=no 2845c35d236eSmrg if test -n "$RANLIB"; then 2846c35d236eSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 2847c35d236eSmrg postinstall_cmds='$RANLIB $lib' 2848c35d236eSmrg fi 2849c35d236eSmrg ;; 2850c35d236eSmrg 28514f6cd06fSmrgaix[[4-9]]*) 2852c35d236eSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 2853c35d236eSmrg test "$enable_shared" = yes && enable_static=no 2854c35d236eSmrg fi 2855c35d236eSmrg ;; 2856c35d236eSmrgesac 2857c35d236eSmrgAC_MSG_RESULT([$enable_shared]) 2858c35d236eSmrg 2859c35d236eSmrgAC_MSG_CHECKING([whether to build static libraries]) 2860c35d236eSmrg# Make sure either enable_shared or enable_static is yes. 2861c35d236eSmrgtest "$enable_shared" = yes || enable_static=yes 2862c35d236eSmrgAC_MSG_RESULT([$enable_static]) 2863c35d236eSmrg 2864c35d236eSmrgAC_LIBTOOL_CONFIG($1) 2865c35d236eSmrg 2866c35d236eSmrgAC_LANG_POP 2867c35d236eSmrgCC="$lt_save_CC" 2868c35d236eSmrg])# AC_LIBTOOL_LANG_C_CONFIG 2869c35d236eSmrg 2870c35d236eSmrg 2871c35d236eSmrg# AC_LIBTOOL_LANG_CXX_CONFIG 2872c35d236eSmrg# -------------------------- 2873c35d236eSmrg# Ensure that the configuration vars for the C compiler are 2874c35d236eSmrg# suitably defined. Those variables are subsequently used by 2875c35d236eSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2876c35d236eSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 2877c35d236eSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 2878c35d236eSmrg[AC_LANG_PUSH(C++) 2879c35d236eSmrgAC_REQUIRE([AC_PROG_CXX]) 2880c35d236eSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2881c35d236eSmrg 2882c35d236eSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2883c35d236eSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 2884c35d236eSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 2885c35d236eSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 2886c35d236eSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 2887c35d236eSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 2888c35d236eSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 2889c35d236eSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 2890c35d236eSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2891c35d236eSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 2892c35d236eSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2893c35d236eSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 2894c35d236eSmrg_LT_AC_TAGVAR(module_cmds, $1)= 2895c35d236eSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 2896c35d236eSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 2897c35d236eSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 2898c35d236eSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 2899c35d236eSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2900c35d236eSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 2901c35d236eSmrg 2902c35d236eSmrg# Dependencies to place before and after the object being linked: 2903c35d236eSmrg_LT_AC_TAGVAR(predep_objects, $1)= 2904c35d236eSmrg_LT_AC_TAGVAR(postdep_objects, $1)= 2905c35d236eSmrg_LT_AC_TAGVAR(predeps, $1)= 2906c35d236eSmrg_LT_AC_TAGVAR(postdeps, $1)= 2907c35d236eSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 29084f6cd06fSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 2909c35d236eSmrg 2910c35d236eSmrg# Source file extension for C++ test sources. 2911c35d236eSmrgac_ext=cpp 2912c35d236eSmrg 2913c35d236eSmrg# Object file extension for compiled C++ test sources. 2914c35d236eSmrgobjext=o 2915c35d236eSmrg_LT_AC_TAGVAR(objext, $1)=$objext 2916c35d236eSmrg 2917c35d236eSmrg# Code to be used in simple compile tests 29184f6cd06fSmrglt_simple_compile_test_code="int some_variable = 0;" 2919c35d236eSmrg 2920c35d236eSmrg# Code to be used in simple link tests 29214f6cd06fSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 2922c35d236eSmrg 2923c35d236eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 2924c35d236eSmrg_LT_AC_SYS_COMPILER 2925c35d236eSmrg 2926c35d236eSmrg# save warnings/boilerplate of simple test code 2927c35d236eSmrg_LT_COMPILER_BOILERPLATE 2928c35d236eSmrg_LT_LINKER_BOILERPLATE 2929c35d236eSmrg 2930c35d236eSmrg# Allow CC to be a program name with arguments. 2931c35d236eSmrglt_save_CC=$CC 2932c35d236eSmrglt_save_LD=$LD 2933c35d236eSmrglt_save_GCC=$GCC 2934c35d236eSmrgGCC=$GXX 2935c35d236eSmrglt_save_with_gnu_ld=$with_gnu_ld 2936c35d236eSmrglt_save_path_LD=$lt_cv_path_LD 2937c35d236eSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 2938c35d236eSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 2939c35d236eSmrgelse 2940c35d236eSmrg $as_unset lt_cv_prog_gnu_ld 2941c35d236eSmrgfi 2942c35d236eSmrgif test -n "${lt_cv_path_LDCXX+set}"; then 2943c35d236eSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 2944c35d236eSmrgelse 2945c35d236eSmrg $as_unset lt_cv_path_LD 2946c35d236eSmrgfi 2947c35d236eSmrgtest -z "${LDCXX+set}" || LD=$LDCXX 2948c35d236eSmrgCC=${CXX-"c++"} 2949c35d236eSmrgcompiler=$CC 2950c35d236eSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 2951c35d236eSmrg_LT_CC_BASENAME([$compiler]) 2952c35d236eSmrg 2953c35d236eSmrg# We don't want -fno-exception wen compiling C++ code, so set the 2954c35d236eSmrg# no_builtin_flag separately 2955c35d236eSmrgif test "$GXX" = yes; then 2956c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 2957c35d236eSmrgelse 2958c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 2959c35d236eSmrgfi 2960c35d236eSmrg 2961c35d236eSmrgif test "$GXX" = yes; then 2962c35d236eSmrg # Set up default GNU C++ configuration 2963c35d236eSmrg 2964c35d236eSmrg AC_PROG_LD 2965c35d236eSmrg 2966c35d236eSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 2967c35d236eSmrg # archiving commands below assume that GNU ld is being used. 2968c35d236eSmrg if test "$with_gnu_ld" = yes; then 2969c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 2970c35d236eSmrg _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' 2971c35d236eSmrg 2972c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 2973c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 2974c35d236eSmrg 2975c35d236eSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 2976c35d236eSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 2977c35d236eSmrg # investigate it a little bit more. (MM) 2978c35d236eSmrg wlarc='${wl}' 2979c35d236eSmrg 2980c35d236eSmrg # ancient GNU ld didn't support --whole-archive et. al. 2981c35d236eSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 2982c35d236eSmrg grep 'no-whole-archive' > /dev/null; then 2983c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 2984c35d236eSmrg else 2985c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2986c35d236eSmrg fi 2987c35d236eSmrg else 2988c35d236eSmrg with_gnu_ld=no 2989c35d236eSmrg wlarc= 2990c35d236eSmrg 2991c35d236eSmrg # A generic and very simple default shared library creation 2992c35d236eSmrg # command for GNU C++ for the case where it uses the native 2993c35d236eSmrg # linker, instead of GNU ld. If possible, this setting should 2994c35d236eSmrg # overridden to take advantage of the native linker features on 2995c35d236eSmrg # the platform it is being used on. 2996c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 2997c35d236eSmrg fi 2998c35d236eSmrg 2999c35d236eSmrg # Commands to make compiler produce verbose output that lists 3000c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3001c35d236eSmrg # linking a shared library. 3002c35d236eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3003c35d236eSmrg 3004c35d236eSmrgelse 3005c35d236eSmrg GXX=no 3006c35d236eSmrg with_gnu_ld=no 3007c35d236eSmrg wlarc= 3008c35d236eSmrgfi 3009c35d236eSmrg 3010c35d236eSmrg# PORTME: fill in a description of your system's C++ link characteristics 3011c35d236eSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 3012c35d236eSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 3013c35d236eSmrgcase $host_os in 3014c35d236eSmrg aix3*) 3015c35d236eSmrg # FIXME: insert proper C++ library support 3016c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3017c35d236eSmrg ;; 30184f6cd06fSmrg aix[[4-9]]*) 3019c35d236eSmrg if test "$host_cpu" = ia64; then 3020c35d236eSmrg # On IA64, the linker does run time linking by default, so we don't 3021c35d236eSmrg # have to do anything special. 3022c35d236eSmrg aix_use_runtimelinking=no 3023c35d236eSmrg exp_sym_flag='-Bexport' 3024c35d236eSmrg no_entry_flag="" 3025c35d236eSmrg else 3026c35d236eSmrg aix_use_runtimelinking=no 3027c35d236eSmrg 3028c35d236eSmrg # Test if we are trying to use run time linking or normal 3029c35d236eSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 3030c35d236eSmrg # need to do runtime linking. 30314f6cd06fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 3032c35d236eSmrg for ld_flag in $LDFLAGS; do 3033c35d236eSmrg case $ld_flag in 3034c35d236eSmrg *-brtl*) 3035c35d236eSmrg aix_use_runtimelinking=yes 3036c35d236eSmrg break 3037c35d236eSmrg ;; 3038c35d236eSmrg esac 3039c35d236eSmrg done 3040c35d236eSmrg ;; 3041c35d236eSmrg esac 3042c35d236eSmrg 3043c35d236eSmrg exp_sym_flag='-bexport' 3044c35d236eSmrg no_entry_flag='-bnoentry' 3045c35d236eSmrg fi 3046c35d236eSmrg 3047c35d236eSmrg # When large executables or shared objects are built, AIX ld can 3048c35d236eSmrg # have problems creating the table of contents. If linking a library 3049c35d236eSmrg # or program results in "error TOC overflow" add -mminimal-toc to 3050c35d236eSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 3051c35d236eSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 3052c35d236eSmrg 3053c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 3054c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3055c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3056c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3057c35d236eSmrg 3058c35d236eSmrg if test "$GXX" = yes; then 3059c35d236eSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 3060c35d236eSmrg # We only want to do this on AIX 4.2 and lower, the check 3061c35d236eSmrg # below for broken collect2 doesn't work under 4.3+ 3062c35d236eSmrg collect2name=`${CC} -print-prog-name=collect2` 3063c35d236eSmrg if test -f "$collect2name" && \ 3064c35d236eSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 3065c35d236eSmrg then 3066c35d236eSmrg # We have reworked collect2 30674f6cd06fSmrg : 3068c35d236eSmrg else 3069c35d236eSmrg # We have old collect2 3070c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 3071c35d236eSmrg # It fails to find uninstalled libraries when the uninstalled 3072c35d236eSmrg # path is not listed in the libpath. Setting hardcode_minus_L 3073c35d236eSmrg # to unsupported forces relinking 3074c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 3075c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3076c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3077c35d236eSmrg fi 3078c35d236eSmrg ;; 3079c35d236eSmrg esac 3080c35d236eSmrg shared_flag='-shared' 3081c35d236eSmrg if test "$aix_use_runtimelinking" = yes; then 3082c35d236eSmrg shared_flag="$shared_flag "'${wl}-G' 3083c35d236eSmrg fi 3084c35d236eSmrg else 3085c35d236eSmrg # not using gcc 3086c35d236eSmrg if test "$host_cpu" = ia64; then 3087c35d236eSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 3088c35d236eSmrg # chokes on -Wl,-G. The following line is correct: 3089c35d236eSmrg shared_flag='-G' 3090c35d236eSmrg else 3091c35d236eSmrg if test "$aix_use_runtimelinking" = yes; then 3092c35d236eSmrg shared_flag='${wl}-G' 3093c35d236eSmrg else 3094c35d236eSmrg shared_flag='${wl}-bM:SRE' 3095c35d236eSmrg fi 3096c35d236eSmrg fi 3097c35d236eSmrg fi 3098c35d236eSmrg 3099c35d236eSmrg # It seems that -bexpall does not export symbols beginning with 3100c35d236eSmrg # underscore (_), so it is better to generate a list of symbols to export. 3101c35d236eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 3102c35d236eSmrg if test "$aix_use_runtimelinking" = yes; then 3103c35d236eSmrg # Warning - without using the other runtime loading flags (-brtl), 3104c35d236eSmrg # -berok will link without error, but may produce a broken library. 3105c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 3106c35d236eSmrg # Determine the default libpath from the value encoded in an empty executable. 3107c35d236eSmrg _LT_AC_SYS_LIBPATH_AIX 3108c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3109c35d236eSmrg 3110c35d236eSmrg _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" 3111c35d236eSmrg else 3112c35d236eSmrg if test "$host_cpu" = ia64; then 3113c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 3114c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 3115c35d236eSmrg _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" 3116c35d236eSmrg else 3117c35d236eSmrg # Determine the default libpath from the value encoded in an empty executable. 3118c35d236eSmrg _LT_AC_SYS_LIBPATH_AIX 3119c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3120c35d236eSmrg # Warning - without using the other run time loading flags, 3121c35d236eSmrg # -berok will link without error, but may produce a broken library. 3122c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 3123c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 3124c35d236eSmrg # Exported symbols can be pulled into shared objects from archives 3125c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 3126c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 3127c35d236eSmrg # This is similar to how AIX traditionally builds its shared libraries. 3128c35d236eSmrg _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' 3129c35d236eSmrg fi 3130c35d236eSmrg fi 3131c35d236eSmrg ;; 3132c35d236eSmrg 3133c35d236eSmrg beos*) 3134c35d236eSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 3135c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3136c35d236eSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 3137c35d236eSmrg # support --undefined. This deserves some investigation. FIXME 3138c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3139c35d236eSmrg else 3140c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3141c35d236eSmrg fi 3142c35d236eSmrg ;; 3143c35d236eSmrg 3144c35d236eSmrg chorus*) 3145c35d236eSmrg case $cc_basename in 3146c35d236eSmrg *) 3147c35d236eSmrg # FIXME: insert proper C++ library support 3148c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3149c35d236eSmrg ;; 3150c35d236eSmrg esac 3151c35d236eSmrg ;; 3152c35d236eSmrg 3153c35d236eSmrg cygwin* | mingw* | pw32*) 3154c35d236eSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 3155c35d236eSmrg # as there is no search path for DLLs. 3156c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3157c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3158c35d236eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 3159c35d236eSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 3160c35d236eSmrg 3161c35d236eSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 3162c35d236eSmrg _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' 3163c35d236eSmrg # If the export-symbols file already is a .def file (1st line 3164c35d236eSmrg # is EXPORTS), use it as is; otherwise, prepend... 3165c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 3166c35d236eSmrg cp $export_symbols $output_objdir/$soname.def; 3167c35d236eSmrg else 3168c35d236eSmrg echo EXPORTS > $output_objdir/$soname.def; 3169c35d236eSmrg cat $export_symbols >> $output_objdir/$soname.def; 3170c35d236eSmrg fi~ 3171c35d236eSmrg $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' 3172c35d236eSmrg else 3173c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3174c35d236eSmrg fi 3175c35d236eSmrg ;; 3176c35d236eSmrg darwin* | rhapsody*) 3177c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3178c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3179c35d236eSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 3180c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3181c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 3182c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 31834f6cd06fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 31844f6cd06fSmrg if test "$GXX" = yes ; then 3185c35d236eSmrg output_verbose_link_cmd='echo' 31864f6cd06fSmrg _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}" 31874f6cd06fSmrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 31884f6cd06fSmrg _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}" 31894f6cd06fSmrg _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}" 31904f6cd06fSmrg if test "$lt_cv_apple_cc_single_mod" != "yes"; then 31914f6cd06fSmrg _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}" 31924f6cd06fSmrg _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}" 3193c35d236eSmrg fi 3194c35d236eSmrg else 3195c35d236eSmrg case $cc_basename in 3196c35d236eSmrg xlc*) 3197c35d236eSmrg output_verbose_link_cmd='echo' 31984f6cd06fSmrg _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' 3199c35d236eSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3200c35d236eSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 32014f6cd06fSmrg _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}' 3202c35d236eSmrg _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}' 3203c35d236eSmrg ;; 3204c35d236eSmrg *) 3205c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3206c35d236eSmrg ;; 3207c35d236eSmrg esac 3208c35d236eSmrg fi 3209c35d236eSmrg ;; 3210c35d236eSmrg 3211c35d236eSmrg dgux*) 3212c35d236eSmrg case $cc_basename in 3213c35d236eSmrg ec++*) 3214c35d236eSmrg # FIXME: insert proper C++ library support 3215c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3216c35d236eSmrg ;; 3217c35d236eSmrg ghcx*) 3218c35d236eSmrg # Green Hills C++ Compiler 3219c35d236eSmrg # FIXME: insert proper C++ library support 3220c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3221c35d236eSmrg ;; 3222c35d236eSmrg *) 3223c35d236eSmrg # FIXME: insert proper C++ library support 3224c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3225c35d236eSmrg ;; 3226c35d236eSmrg esac 3227c35d236eSmrg ;; 3228c35d236eSmrg freebsd[[12]]*) 3229c35d236eSmrg # C++ shared libraries reported to be fairly broken before switch to ELF 3230c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3231c35d236eSmrg ;; 3232c35d236eSmrg freebsd-elf*) 3233c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3234c35d236eSmrg ;; 32354f6cd06fSmrg freebsd* | dragonfly*) 3236c35d236eSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 3237c35d236eSmrg # conventions 3238c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 3239c35d236eSmrg ;; 3240c35d236eSmrg gnu*) 3241c35d236eSmrg ;; 3242c35d236eSmrg hpux9*) 3243c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3244c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3245c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3246c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3247c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3248c35d236eSmrg # but as the default 3249c35d236eSmrg # location of the library. 3250c35d236eSmrg 3251c35d236eSmrg case $cc_basename in 3252c35d236eSmrg CC*) 3253c35d236eSmrg # FIXME: insert proper C++ library support 3254c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3255c35d236eSmrg ;; 3256c35d236eSmrg aCC*) 3257c35d236eSmrg _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' 3258c35d236eSmrg # Commands to make compiler produce verbose output that lists 3259c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3260c35d236eSmrg # linking a shared library. 3261c35d236eSmrg # 3262c35d236eSmrg # There doesn't appear to be a way to prevent this compiler from 3263c35d236eSmrg # explicitly linking system object files so we need to strip them 3264c35d236eSmrg # from the output so that they don't get included in the library 3265c35d236eSmrg # dependencies. 3266c35d236eSmrg 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' 3267c35d236eSmrg ;; 3268c35d236eSmrg *) 3269c35d236eSmrg if test "$GXX" = yes; then 3270c35d236eSmrg _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' 3271c35d236eSmrg else 3272c35d236eSmrg # FIXME: insert proper C++ library support 3273c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3274c35d236eSmrg fi 3275c35d236eSmrg ;; 3276c35d236eSmrg esac 3277c35d236eSmrg ;; 3278c35d236eSmrg hpux10*|hpux11*) 3279c35d236eSmrg if test $with_gnu_ld = no; then 3280c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3281c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3282c35d236eSmrg 3283c35d236eSmrg case $host_cpu in 32844f6cd06fSmrg hppa*64*|ia64*) ;; 3285c35d236eSmrg *) 3286c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3287c35d236eSmrg ;; 3288c35d236eSmrg esac 3289c35d236eSmrg fi 3290c35d236eSmrg case $host_cpu in 3291c35d236eSmrg hppa*64*|ia64*) 3292c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3293c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3294c35d236eSmrg ;; 3295c35d236eSmrg *) 3296c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3297c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3298c35d236eSmrg # but as the default 3299c35d236eSmrg # location of the library. 3300c35d236eSmrg ;; 3301c35d236eSmrg esac 3302c35d236eSmrg 3303c35d236eSmrg case $cc_basename in 3304c35d236eSmrg CC*) 3305c35d236eSmrg # FIXME: insert proper C++ library support 3306c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3307c35d236eSmrg ;; 3308c35d236eSmrg aCC*) 3309c35d236eSmrg case $host_cpu in 3310c35d236eSmrg hppa*64*) 3311c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3312c35d236eSmrg ;; 3313c35d236eSmrg ia64*) 3314c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3315c35d236eSmrg ;; 3316c35d236eSmrg *) 3317c35d236eSmrg _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 3320c35d236eSmrg # Commands to make compiler produce verbose output that lists 3321c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3322c35d236eSmrg # linking a shared library. 3323c35d236eSmrg # 3324c35d236eSmrg # There doesn't appear to be a way to prevent this compiler from 3325c35d236eSmrg # explicitly linking system object files so we need to strip them 3326c35d236eSmrg # from the output so that they don't get included in the library 3327c35d236eSmrg # dependencies. 3328c35d236eSmrg 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 ;; 3330c35d236eSmrg *) 3331c35d236eSmrg if test "$GXX" = yes; then 3332c35d236eSmrg if test $with_gnu_ld = no; then 3333c35d236eSmrg case $host_cpu in 3334c35d236eSmrg hppa*64*) 3335c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3336c35d236eSmrg ;; 3337c35d236eSmrg ia64*) 3338c35d236eSmrg _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 *) 3341c35d236eSmrg _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 3344c35d236eSmrg fi 3345c35d236eSmrg else 3346c35d236eSmrg # FIXME: insert proper C++ library support 3347c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3348c35d236eSmrg fi 3349c35d236eSmrg ;; 3350c35d236eSmrg esac 3351c35d236eSmrg ;; 33524f6cd06fSmrg interix[[3-9]]*) 3353c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3354c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3355c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3356c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3357c35d236eSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 3358c35d236eSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 3359c35d236eSmrg # default) and relocated if they conflict, which is a slow very memory 3360c35d236eSmrg # consuming and fragmenting process. To avoid this, we pick a random, 3361c35d236eSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 3362c35d236eSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 3363c35d236eSmrg _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' 3364c35d236eSmrg _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' 3365c35d236eSmrg ;; 3366c35d236eSmrg irix5* | irix6*) 3367c35d236eSmrg case $cc_basename in 3368c35d236eSmrg CC*) 3369c35d236eSmrg # SGI C++ 3370c35d236eSmrg _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' 3371c35d236eSmrg 3372c35d236eSmrg # Archives containing C++ object files must be created using 3373c35d236eSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 3374c35d236eSmrg # necessary to make sure instantiated templates are included 3375c35d236eSmrg # in the archive. 3376c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 3377c35d236eSmrg ;; 3378c35d236eSmrg *) 3379c35d236eSmrg if test "$GXX" = yes; then 3380c35d236eSmrg if test "$with_gnu_ld" = no; then 3381c35d236eSmrg _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' 3382c35d236eSmrg else 3383c35d236eSmrg _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' 3384c35d236eSmrg fi 3385c35d236eSmrg fi 3386c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3387c35d236eSmrg ;; 3388c35d236eSmrg esac 3389c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3390c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3391c35d236eSmrg ;; 33924f6cd06fSmrg linux* | k*bsd*-gnu) 3393c35d236eSmrg case $cc_basename in 3394c35d236eSmrg KCC*) 3395c35d236eSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3396c35d236eSmrg 3397c35d236eSmrg # KCC will only create a shared library if the output file 3398c35d236eSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3399c35d236eSmrg # to its proper name (with version) after linking. 3400c35d236eSmrg _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' 3401c35d236eSmrg _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' 3402c35d236eSmrg # Commands to make compiler produce verbose output that lists 3403c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3404c35d236eSmrg # linking a shared library. 3405c35d236eSmrg # 3406c35d236eSmrg # There doesn't appear to be a way to prevent this compiler from 3407c35d236eSmrg # explicitly linking system object files so we need to strip them 3408c35d236eSmrg # from the output so that they don't get included in the library 3409c35d236eSmrg # dependencies. 3410c35d236eSmrg 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' 3411c35d236eSmrg 3412c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 3413c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3414c35d236eSmrg 3415c35d236eSmrg # Archives containing C++ object files must be created using 3416c35d236eSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3417c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3418c35d236eSmrg ;; 3419c35d236eSmrg icpc*) 3420c35d236eSmrg # Intel C++ 3421c35d236eSmrg with_gnu_ld=yes 3422c35d236eSmrg # version 8.0 and above of icpc choke on multiply defined symbols 3423c35d236eSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 3424c35d236eSmrg # earlier do not add the objects themselves. 3425c35d236eSmrg case `$CC -V 2>&1` in 3426c35d236eSmrg *"Version 7."*) 3427c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3428c35d236eSmrg _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' 3429c35d236eSmrg ;; 3430c35d236eSmrg *) # Version 8.0 or newer 3431c35d236eSmrg tmp_idyn= 3432c35d236eSmrg case $host_cpu in 3433c35d236eSmrg ia64*) tmp_idyn=' -i_dynamic';; 3434c35d236eSmrg esac 3435c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3436c35d236eSmrg _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' 3437c35d236eSmrg ;; 3438c35d236eSmrg esac 3439c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3440c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3441c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3442c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 3443c35d236eSmrg ;; 34444f6cd06fSmrg pgCC* | pgcpp*) 3445c35d236eSmrg # Portland Group C++ compiler 3446c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 3447c35d236eSmrg _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' 3448c35d236eSmrg 3449c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3450c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3451c35d236eSmrg _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' 3452c35d236eSmrg ;; 3453c35d236eSmrg cxx*) 3454c35d236eSmrg # Compaq C++ 3455c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3456c35d236eSmrg _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' 3457c35d236eSmrg 3458c35d236eSmrg runpath_var=LD_RUN_PATH 3459c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3460c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3461c35d236eSmrg 3462c35d236eSmrg # Commands to make compiler produce verbose output that lists 3463c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3464c35d236eSmrg # linking a shared library. 3465c35d236eSmrg # 3466c35d236eSmrg # There doesn't appear to be a way to prevent this compiler from 3467c35d236eSmrg # explicitly linking system object files so we need to strip them 3468c35d236eSmrg # from the output so that they don't get included in the library 3469c35d236eSmrg # dependencies. 3470c35d236eSmrg 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' 3471c35d236eSmrg ;; 34724f6cd06fSmrg *) 34734f6cd06fSmrg case `$CC -V 2>&1 | sed 5q` in 34744f6cd06fSmrg *Sun\ C*) 34754f6cd06fSmrg # Sun C++ 5.9 34764f6cd06fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 34774f6cd06fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 34784f6cd06fSmrg _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' 34794f6cd06fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 34804f6cd06fSmrg _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' 34814f6cd06fSmrg 34824f6cd06fSmrg # Not sure whether something based on 34834f6cd06fSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 34844f6cd06fSmrg # would be better. 34854f6cd06fSmrg output_verbose_link_cmd='echo' 34864f6cd06fSmrg 34874f6cd06fSmrg # Archives containing C++ object files must be created using 34884f6cd06fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 34894f6cd06fSmrg # necessary to make sure instantiated templates are included 34904f6cd06fSmrg # in the archive. 34914f6cd06fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 34924f6cd06fSmrg ;; 34934f6cd06fSmrg esac 34944f6cd06fSmrg ;; 3495c35d236eSmrg esac 3496c35d236eSmrg ;; 3497c35d236eSmrg lynxos*) 3498c35d236eSmrg # FIXME: insert proper C++ library support 3499c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3500c35d236eSmrg ;; 3501c35d236eSmrg m88k*) 3502c35d236eSmrg # FIXME: insert proper C++ library support 3503c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3504c35d236eSmrg ;; 3505c35d236eSmrg mvs*) 3506c35d236eSmrg case $cc_basename in 3507c35d236eSmrg cxx*) 3508c35d236eSmrg # FIXME: insert proper C++ library support 3509c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3510c35d236eSmrg ;; 3511c35d236eSmrg *) 3512c35d236eSmrg # FIXME: insert proper C++ library support 3513c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3514c35d236eSmrg ;; 3515c35d236eSmrg esac 3516c35d236eSmrg ;; 3517c35d236eSmrg netbsd*) 3518c35d236eSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3519c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 3520c35d236eSmrg wlarc= 3521c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3522c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3523c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3524c35d236eSmrg fi 3525c35d236eSmrg # Workaround some broken pre-1.5 toolchains 3526c35d236eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 3527c35d236eSmrg ;; 3528c35d236eSmrg openbsd2*) 3529c35d236eSmrg # C++ shared libraries are fairly broken 3530c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3531c35d236eSmrg ;; 3532c35d236eSmrg openbsd*) 35334f6cd06fSmrg if test -f /usr/libexec/ld.so; then 35344f6cd06fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 35354f6cd06fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 35364f6cd06fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 35374f6cd06fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 35384f6cd06fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 35394f6cd06fSmrg _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' 35404f6cd06fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 35414f6cd06fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 35424f6cd06fSmrg fi 35434f6cd06fSmrg output_verbose_link_cmd='echo' 35444f6cd06fSmrg else 35454f6cd06fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3546c35d236eSmrg fi 3547c35d236eSmrg ;; 3548c35d236eSmrg osf3*) 3549c35d236eSmrg case $cc_basename in 3550c35d236eSmrg KCC*) 3551c35d236eSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3552c35d236eSmrg 3553c35d236eSmrg # KCC will only create a shared library if the output file 3554c35d236eSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3555c35d236eSmrg # to its proper name (with version) after linking. 3556c35d236eSmrg _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' 3557c35d236eSmrg 3558c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3559c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3560c35d236eSmrg 3561c35d236eSmrg # Archives containing C++ object files must be created using 3562c35d236eSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3563c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3564c35d236eSmrg 3565c35d236eSmrg ;; 3566c35d236eSmrg RCC*) 3567c35d236eSmrg # Rational C++ 2.4.1 3568c35d236eSmrg # FIXME: insert proper C++ library support 3569c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3570c35d236eSmrg ;; 3571c35d236eSmrg cxx*) 3572c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3573c35d236eSmrg _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' 3574c35d236eSmrg 3575c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3576c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3577c35d236eSmrg 3578c35d236eSmrg # Commands to make compiler produce verbose output that lists 3579c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3580c35d236eSmrg # linking a shared library. 3581c35d236eSmrg # 3582c35d236eSmrg # There doesn't appear to be a way to prevent this compiler from 3583c35d236eSmrg # explicitly linking system object files so we need to strip them 3584c35d236eSmrg # from the output so that they don't get included in the library 3585c35d236eSmrg # dependencies. 3586c35d236eSmrg 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 ;; 3588c35d236eSmrg *) 3589c35d236eSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3590c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3591c35d236eSmrg _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' 3592c35d236eSmrg 3593c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3594c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3595c35d236eSmrg 3596c35d236eSmrg # Commands to make compiler produce verbose output that lists 3597c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3598c35d236eSmrg # linking a shared library. 3599c35d236eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3600c35d236eSmrg 3601c35d236eSmrg else 3602c35d236eSmrg # FIXME: insert proper C++ library support 3603c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3604c35d236eSmrg fi 3605c35d236eSmrg ;; 3606c35d236eSmrg esac 3607c35d236eSmrg ;; 3608c35d236eSmrg osf4* | osf5*) 3609c35d236eSmrg case $cc_basename in 3610c35d236eSmrg KCC*) 3611c35d236eSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3612c35d236eSmrg 3613c35d236eSmrg # KCC will only create a shared library if the output file 3614c35d236eSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3615c35d236eSmrg # to its proper name (with version) after linking. 3616c35d236eSmrg _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' 3617c35d236eSmrg 3618c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3619c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3620c35d236eSmrg 3621c35d236eSmrg # Archives containing C++ object files must be created using 3622c35d236eSmrg # the KAI C++ compiler. 3623c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 3624c35d236eSmrg ;; 3625c35d236eSmrg RCC*) 3626c35d236eSmrg # Rational C++ 2.4.1 3627c35d236eSmrg # FIXME: insert proper C++ library support 3628c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3629c35d236eSmrg ;; 3630c35d236eSmrg cxx*) 3631c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 3632c35d236eSmrg _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' 3633c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 3634c35d236eSmrg echo "-hidden">> $lib.exp~ 3635c35d236eSmrg $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~ 3636c35d236eSmrg $rm $lib.exp' 3637c35d236eSmrg 3638c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3639c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3640c35d236eSmrg 3641c35d236eSmrg # Commands to make compiler produce verbose output that lists 3642c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3643c35d236eSmrg # linking a shared library. 3644c35d236eSmrg # 3645c35d236eSmrg # There doesn't appear to be a way to prevent this compiler from 3646c35d236eSmrg # explicitly linking system object files so we need to strip them 3647c35d236eSmrg # from the output so that they don't get included in the library 3648c35d236eSmrg # dependencies. 3649c35d236eSmrg 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 ;; 3651c35d236eSmrg *) 3652c35d236eSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3653c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3654c35d236eSmrg _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' 3655c35d236eSmrg 3656c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3657c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3658c35d236eSmrg 3659c35d236eSmrg # Commands to make compiler produce verbose output that lists 3660c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3661c35d236eSmrg # linking a shared library. 3662c35d236eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3663c35d236eSmrg 3664c35d236eSmrg else 3665c35d236eSmrg # FIXME: insert proper C++ library support 3666c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3667c35d236eSmrg fi 3668c35d236eSmrg ;; 3669c35d236eSmrg esac 3670c35d236eSmrg ;; 3671c35d236eSmrg psos*) 3672c35d236eSmrg # FIXME: insert proper C++ library support 3673c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3674c35d236eSmrg ;; 3675c35d236eSmrg sunos4*) 3676c35d236eSmrg case $cc_basename in 3677c35d236eSmrg CC*) 3678c35d236eSmrg # Sun C++ 4.x 3679c35d236eSmrg # FIXME: insert proper C++ library support 3680c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3681c35d236eSmrg ;; 3682c35d236eSmrg lcc*) 3683c35d236eSmrg # Lucid 3684c35d236eSmrg # FIXME: insert proper C++ library support 3685c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3686c35d236eSmrg ;; 3687c35d236eSmrg *) 3688c35d236eSmrg # FIXME: insert proper C++ library support 3689c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3690c35d236eSmrg ;; 3691c35d236eSmrg esac 3692c35d236eSmrg ;; 3693c35d236eSmrg solaris*) 3694c35d236eSmrg case $cc_basename in 3695c35d236eSmrg CC*) 3696c35d236eSmrg # Sun C++ 4.2, 5.x and Centerline C++ 3697c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 3698c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3699c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3700c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3701c35d236eSmrg $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' 3702c35d236eSmrg 3703c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3704c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3705c35d236eSmrg case $host_os in 3706c35d236eSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3707c35d236eSmrg *) 37084f6cd06fSmrg # The compiler driver will combine and reorder linker options, 37094f6cd06fSmrg # but understands `-z linker_flag'. 3710c35d236eSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 37114f6cd06fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 3712c35d236eSmrg ;; 3713c35d236eSmrg esac 3714c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3715c35d236eSmrg 3716c35d236eSmrg output_verbose_link_cmd='echo' 3717c35d236eSmrg 3718c35d236eSmrg # Archives containing C++ object files must be created using 3719c35d236eSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 3720c35d236eSmrg # necessary to make sure instantiated templates are included 3721c35d236eSmrg # in the archive. 3722c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3723c35d236eSmrg ;; 3724c35d236eSmrg gcx*) 3725c35d236eSmrg # Green Hills C++ Compiler 3726c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3727c35d236eSmrg 3728c35d236eSmrg # The C++ compiler must be used to create the archive. 3729c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 3730c35d236eSmrg ;; 3731c35d236eSmrg *) 3732c35d236eSmrg # GNU C++ compiler with Solaris linker 3733c35d236eSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3734c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 3735c35d236eSmrg if $CC --version | grep -v '^2\.7' > /dev/null; then 3736c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3737c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3738c35d236eSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3739c35d236eSmrg 3740c35d236eSmrg # Commands to make compiler produce verbose output that lists 3741c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3742c35d236eSmrg # linking a shared library. 3743c35d236eSmrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3744c35d236eSmrg else 3745c35d236eSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 3746c35d236eSmrg # platform. 3747c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3748c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3749c35d236eSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3750c35d236eSmrg 3751c35d236eSmrg # Commands to make compiler produce verbose output that lists 3752c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3753c35d236eSmrg # linking a shared library. 3754c35d236eSmrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3755c35d236eSmrg fi 3756c35d236eSmrg 3757c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 37584f6cd06fSmrg case $host_os in 37594f6cd06fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 37604f6cd06fSmrg *) 37614f6cd06fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 37624f6cd06fSmrg ;; 37634f6cd06fSmrg esac 3764c35d236eSmrg fi 3765c35d236eSmrg ;; 3766c35d236eSmrg esac 3767c35d236eSmrg ;; 3768c35d236eSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 3769c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3770c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3771c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3772c35d236eSmrg runpath_var='LD_RUN_PATH' 3773c35d236eSmrg 3774c35d236eSmrg case $cc_basename in 3775c35d236eSmrg CC*) 3776c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3777c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3778c35d236eSmrg ;; 3779c35d236eSmrg *) 3780c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3781c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3782c35d236eSmrg ;; 3783c35d236eSmrg esac 3784c35d236eSmrg ;; 3785c35d236eSmrg sysv5* | sco3.2v5* | sco5v6*) 3786c35d236eSmrg # Note: We can NOT use -z defs as we might desire, because we do not 3787c35d236eSmrg # link with -lc, and that would cause any symbols used from libc to 3788c35d236eSmrg # always be unresolved, which means just about no library would 3789c35d236eSmrg # ever link correctly. If we're not using GNU ld we use -z text 3790c35d236eSmrg # though, which does catch some bad symbols but isn't as heavy-handed 3791c35d236eSmrg # as -z defs. 3792c35d236eSmrg # For security reasons, it is highly recommended that you always 3793c35d236eSmrg # use absolute paths for naming shared libraries, and exclude the 3794c35d236eSmrg # DT_RUNPATH tag from executables and libraries. But doing so 3795c35d236eSmrg # requires that you compile everything twice, which is a pain. 3796c35d236eSmrg # So that behaviour is only enabled if SCOABSPATH is set to a 3797c35d236eSmrg # non-empty value in the environment. Most likely only useful for 3798c35d236eSmrg # creating official distributions of packages. 3799c35d236eSmrg # This is a hack until libtool officially supports absolute path 3800c35d236eSmrg # names for shared libraries. 3801c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3802c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 3803c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3804c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3805c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 3806c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3807c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3808c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 3809c35d236eSmrg runpath_var='LD_RUN_PATH' 3810c35d236eSmrg 3811c35d236eSmrg case $cc_basename in 3812c35d236eSmrg CC*) 3813c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3814c35d236eSmrg _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' 3815c35d236eSmrg ;; 3816c35d236eSmrg *) 3817c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3818c35d236eSmrg _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' 3819c35d236eSmrg ;; 3820c35d236eSmrg esac 3821c35d236eSmrg ;; 3822c35d236eSmrg tandem*) 3823c35d236eSmrg case $cc_basename in 3824c35d236eSmrg NCC*) 3825c35d236eSmrg # NonStop-UX NCC 3.20 3826c35d236eSmrg # FIXME: insert proper C++ library support 3827c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3828c35d236eSmrg ;; 3829c35d236eSmrg *) 3830c35d236eSmrg # FIXME: insert proper C++ library support 3831c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3832c35d236eSmrg ;; 3833c35d236eSmrg esac 3834c35d236eSmrg ;; 3835c35d236eSmrg vxworks*) 3836c35d236eSmrg # FIXME: insert proper C++ library support 3837c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3838c35d236eSmrg ;; 3839c35d236eSmrg *) 3840c35d236eSmrg # FIXME: insert proper C++ library support 3841c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3842c35d236eSmrg ;; 3843c35d236eSmrgesac 3844c35d236eSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 3845c35d236eSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 3846c35d236eSmrg 3847c35d236eSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 3848c35d236eSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 3849c35d236eSmrg 3850c35d236eSmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 3851c35d236eSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 3852c35d236eSmrgAC_LIBTOOL_PROG_CC_C_O($1) 3853c35d236eSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3854c35d236eSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 3855c35d236eSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3856c35d236eSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3857c35d236eSmrg 3858c35d236eSmrgAC_LIBTOOL_CONFIG($1) 3859c35d236eSmrg 3860c35d236eSmrgAC_LANG_POP 3861c35d236eSmrgCC=$lt_save_CC 3862c35d236eSmrgLDCXX=$LD 3863c35d236eSmrgLD=$lt_save_LD 3864c35d236eSmrgGCC=$lt_save_GCC 3865c35d236eSmrgwith_gnu_ldcxx=$with_gnu_ld 3866c35d236eSmrgwith_gnu_ld=$lt_save_with_gnu_ld 3867c35d236eSmrglt_cv_path_LDCXX=$lt_cv_path_LD 3868c35d236eSmrglt_cv_path_LD=$lt_save_path_LD 3869c35d236eSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 3870c35d236eSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 3871c35d236eSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG 3872c35d236eSmrg 3873c35d236eSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 3874c35d236eSmrg# ------------------------------------ 3875c35d236eSmrg# Figure out "hidden" library dependencies from verbose 3876c35d236eSmrg# compiler output when linking a shared library. 3877c35d236eSmrg# Parse the compiler output and extract the necessary 3878c35d236eSmrg# objects, libraries and library flags. 38794f6cd06fSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 38804f6cd06fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 3881c35d236eSmrgdnl we can't use the lt_simple_compile_test_code here, 3882c35d236eSmrgdnl because it contains code intended for an executable, 3883c35d236eSmrgdnl not a library. It's possible we should let each 3884c35d236eSmrgdnl tag define a new lt_????_link_test_code variable, 3885c35d236eSmrgdnl but it's only used here... 3886c35d236eSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 3887c35d236eSmrgint a; 3888c35d236eSmrgvoid foo (void) { a = 0; } 3889c35d236eSmrgEOF 3890c35d236eSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 3891c35d236eSmrgclass Foo 3892c35d236eSmrg{ 3893c35d236eSmrgpublic: 3894c35d236eSmrg Foo (void) { a = 0; } 3895c35d236eSmrgprivate: 3896c35d236eSmrg int a; 3897c35d236eSmrg}; 3898c35d236eSmrgEOF 3899c35d236eSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 3900c35d236eSmrg subroutine foo 3901c35d236eSmrg implicit none 3902c35d236eSmrg integer*4 a 3903c35d236eSmrg a=0 3904c35d236eSmrg return 3905c35d236eSmrg end 3906c35d236eSmrgEOF 3907c35d236eSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 3908c35d236eSmrgpublic class foo { 3909c35d236eSmrg private int a; 3910c35d236eSmrg public void bar (void) { 3911c35d236eSmrg a = 0; 3912c35d236eSmrg } 3913c35d236eSmrg}; 3914c35d236eSmrgEOF 3915c35d236eSmrg]) 3916c35d236eSmrgdnl Parse the compiler output and extract the necessary 3917c35d236eSmrgdnl objects, libraries and library flags. 3918c35d236eSmrgif AC_TRY_EVAL(ac_compile); then 3919c35d236eSmrg # Parse the compiler output and extract the necessary 3920c35d236eSmrg # objects, libraries and library flags. 3921c35d236eSmrg 3922c35d236eSmrg # Sentinel used to keep track of whether or not we are before 3923c35d236eSmrg # the conftest object file. 3924c35d236eSmrg pre_test_object_deps_done=no 3925c35d236eSmrg 3926c35d236eSmrg # The `*' in the case matches for architectures that use `case' in 3927c35d236eSmrg # $output_verbose_cmd can trigger glob expansion during the loop 3928c35d236eSmrg # eval without this substitution. 3929c35d236eSmrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 3930c35d236eSmrg 3931c35d236eSmrg for p in `eval $output_verbose_link_cmd`; do 3932c35d236eSmrg case $p in 3933c35d236eSmrg 3934c35d236eSmrg -L* | -R* | -l*) 3935c35d236eSmrg # Some compilers place space between "-{L,R}" and the path. 3936c35d236eSmrg # Remove the space. 3937c35d236eSmrg if test $p = "-L" \ 3938c35d236eSmrg || test $p = "-R"; then 3939c35d236eSmrg prev=$p 3940c35d236eSmrg continue 3941c35d236eSmrg else 3942c35d236eSmrg prev= 3943c35d236eSmrg fi 3944c35d236eSmrg 3945c35d236eSmrg if test "$pre_test_object_deps_done" = no; then 3946c35d236eSmrg case $p in 3947c35d236eSmrg -L* | -R*) 3948c35d236eSmrg # Internal compiler library paths should come after those 3949c35d236eSmrg # provided the user. The postdeps already come after the 3950c35d236eSmrg # user supplied libs so there is no need to process them. 3951c35d236eSmrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 3952c35d236eSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 3953c35d236eSmrg else 3954c35d236eSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 3955c35d236eSmrg fi 3956c35d236eSmrg ;; 3957c35d236eSmrg # The "-l" case would never come before the object being 3958c35d236eSmrg # linked, so don't bother handling this case. 3959c35d236eSmrg esac 3960c35d236eSmrg else 3961c35d236eSmrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 3962c35d236eSmrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 3963c35d236eSmrg else 3964c35d236eSmrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 3965c35d236eSmrg fi 3966c35d236eSmrg fi 3967c35d236eSmrg ;; 3968c35d236eSmrg 3969c35d236eSmrg *.$objext) 3970c35d236eSmrg # This assumes that the test object file only shows up 3971c35d236eSmrg # once in the compiler output. 3972c35d236eSmrg if test "$p" = "conftest.$objext"; then 3973c35d236eSmrg pre_test_object_deps_done=yes 3974c35d236eSmrg continue 3975c35d236eSmrg fi 3976c35d236eSmrg 3977c35d236eSmrg if test "$pre_test_object_deps_done" = no; then 3978c35d236eSmrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 3979c35d236eSmrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 3980c35d236eSmrg else 3981c35d236eSmrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 3982c35d236eSmrg fi 3983c35d236eSmrg else 3984c35d236eSmrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 3985c35d236eSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 3986c35d236eSmrg else 3987c35d236eSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 3988c35d236eSmrg fi 3989c35d236eSmrg fi 3990c35d236eSmrg ;; 3991c35d236eSmrg 3992c35d236eSmrg *) ;; # Ignore the rest. 3993c35d236eSmrg 3994c35d236eSmrg esac 3995c35d236eSmrg done 3996c35d236eSmrg 3997c35d236eSmrg # Clean up. 3998c35d236eSmrg rm -f a.out a.exe 3999c35d236eSmrgelse 4000c35d236eSmrg echo "libtool.m4: error: problem compiling $1 test program" 4001c35d236eSmrgfi 4002c35d236eSmrg 4003c35d236eSmrg$rm -f confest.$objext 4004c35d236eSmrg 40054f6cd06fSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 40064f6cd06fSmrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 40074f6cd06fSmrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 40084f6cd06fSmrgfi 40094f6cd06fSmrg 4010c35d236eSmrg# PORTME: override above test on systems where it is broken 4011c35d236eSmrgifelse([$1],[CXX], 4012c35d236eSmrg[case $host_os in 40134f6cd06fSmrginterix[[3-9]]*) 4014c35d236eSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 4015c35d236eSmrg # hack all around it, let's just trust "g++" to DTRT. 4016c35d236eSmrg _LT_AC_TAGVAR(predep_objects,$1)= 4017c35d236eSmrg _LT_AC_TAGVAR(postdep_objects,$1)= 4018c35d236eSmrg _LT_AC_TAGVAR(postdeps,$1)= 4019c35d236eSmrg ;; 4020c35d236eSmrg 40214f6cd06fSmrglinux*) 40224f6cd06fSmrg case `$CC -V 2>&1 | sed 5q` in 40234f6cd06fSmrg *Sun\ C*) 40244f6cd06fSmrg # Sun C++ 5.9 40254f6cd06fSmrg # 40264f6cd06fSmrg # The more standards-conforming stlport4 library is 40274f6cd06fSmrg # incompatible with the Cstd library. Avoid specifying 40284f6cd06fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 40294f6cd06fSmrg # -library=stlport4 depends on it. 40304f6cd06fSmrg case " $CXX $CXXFLAGS " in 40314f6cd06fSmrg *" -library=stlport4 "*) 40324f6cd06fSmrg solaris_use_stlport4=yes 40334f6cd06fSmrg ;; 40344f6cd06fSmrg esac 40354f6cd06fSmrg if test "$solaris_use_stlport4" != yes; then 40364f6cd06fSmrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 40374f6cd06fSmrg fi 40384f6cd06fSmrg ;; 40394f6cd06fSmrg esac 40404f6cd06fSmrg ;; 40414f6cd06fSmrg 4042c35d236eSmrgsolaris*) 4043c35d236eSmrg case $cc_basename in 4044c35d236eSmrg CC*) 40454f6cd06fSmrg # The more standards-conforming stlport4 library is 40464f6cd06fSmrg # incompatible with the Cstd library. Avoid specifying 40474f6cd06fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 40484f6cd06fSmrg # -library=stlport4 depends on it. 40494f6cd06fSmrg case " $CXX $CXXFLAGS " in 40504f6cd06fSmrg *" -library=stlport4 "*) 40514f6cd06fSmrg solaris_use_stlport4=yes 40524f6cd06fSmrg ;; 40534f6cd06fSmrg esac 40544f6cd06fSmrg 4055c35d236eSmrg # Adding this requires a known-good setup of shared libraries for 4056c35d236eSmrg # Sun compiler versions before 5.6, else PIC objects from an old 4057c35d236eSmrg # archive will be linked into the output, leading to subtle bugs. 40584f6cd06fSmrg if test "$solaris_use_stlport4" != yes; then 40594f6cd06fSmrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 40604f6cd06fSmrg fi 4061c35d236eSmrg ;; 4062c35d236eSmrg esac 4063c35d236eSmrg ;; 4064c35d236eSmrgesac 4065c35d236eSmrg]) 4066c35d236eSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 4067c35d236eSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 4068c35d236eSmrgesac 4069c35d236eSmrg])# AC_LIBTOOL_POSTDEP_PREDEP 4070c35d236eSmrg 4071c35d236eSmrg# AC_LIBTOOL_LANG_F77_CONFIG 4072c35d236eSmrg# -------------------------- 4073c35d236eSmrg# Ensure that the configuration vars for the C compiler are 4074c35d236eSmrg# suitably defined. Those variables are subsequently used by 4075c35d236eSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4076c35d236eSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 4077c35d236eSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 4078c35d236eSmrg[AC_REQUIRE([AC_PROG_F77]) 4079c35d236eSmrgAC_LANG_PUSH(Fortran 77) 4080c35d236eSmrg 4081c35d236eSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4082c35d236eSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4083c35d236eSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 4084c35d236eSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4085c35d236eSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4086c35d236eSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 4087c35d236eSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4088c35d236eSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4089c35d236eSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4090c35d236eSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4091c35d236eSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4092c35d236eSmrg_LT_AC_TAGVAR(module_cmds, $1)= 4093c35d236eSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4094c35d236eSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4095c35d236eSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4096c35d236eSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 4097c35d236eSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4098c35d236eSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4099c35d236eSmrg 4100c35d236eSmrg# Source file extension for f77 test sources. 4101c35d236eSmrgac_ext=f 4102c35d236eSmrg 4103c35d236eSmrg# Object file extension for compiled f77 test sources. 4104c35d236eSmrgobjext=o 4105c35d236eSmrg_LT_AC_TAGVAR(objext, $1)=$objext 4106c35d236eSmrg 4107c35d236eSmrg# Code to be used in simple compile tests 41084f6cd06fSmrglt_simple_compile_test_code="\ 41094f6cd06fSmrg subroutine t 41104f6cd06fSmrg return 41114f6cd06fSmrg end 41124f6cd06fSmrg" 4113c35d236eSmrg 4114c35d236eSmrg# Code to be used in simple link tests 41154f6cd06fSmrglt_simple_link_test_code="\ 41164f6cd06fSmrg program t 41174f6cd06fSmrg end 41184f6cd06fSmrg" 4119c35d236eSmrg 4120c35d236eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4121c35d236eSmrg_LT_AC_SYS_COMPILER 4122c35d236eSmrg 4123c35d236eSmrg# save warnings/boilerplate of simple test code 4124c35d236eSmrg_LT_COMPILER_BOILERPLATE 4125c35d236eSmrg_LT_LINKER_BOILERPLATE 4126c35d236eSmrg 4127c35d236eSmrg# Allow CC to be a program name with arguments. 4128c35d236eSmrglt_save_CC="$CC" 4129c35d236eSmrgCC=${F77-"f77"} 4130c35d236eSmrgcompiler=$CC 4131c35d236eSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 4132c35d236eSmrg_LT_CC_BASENAME([$compiler]) 4133c35d236eSmrg 4134c35d236eSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 4135c35d236eSmrgAC_MSG_RESULT([$can_build_shared]) 4136c35d236eSmrg 4137c35d236eSmrgAC_MSG_CHECKING([whether to build shared libraries]) 4138c35d236eSmrgtest "$can_build_shared" = "no" && enable_shared=no 4139c35d236eSmrg 4140c35d236eSmrg# On AIX, shared libraries and static libraries use the same namespace, and 4141c35d236eSmrg# are all built from PIC. 4142c35d236eSmrgcase $host_os in 4143c35d236eSmrgaix3*) 4144c35d236eSmrg test "$enable_shared" = yes && enable_static=no 4145c35d236eSmrg if test -n "$RANLIB"; then 4146c35d236eSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 4147c35d236eSmrg postinstall_cmds='$RANLIB $lib' 4148c35d236eSmrg fi 4149c35d236eSmrg ;; 41504f6cd06fSmrgaix[[4-9]]*) 4151c35d236eSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 4152c35d236eSmrg test "$enable_shared" = yes && enable_static=no 4153c35d236eSmrg fi 4154c35d236eSmrg ;; 4155c35d236eSmrgesac 4156c35d236eSmrgAC_MSG_RESULT([$enable_shared]) 4157c35d236eSmrg 4158c35d236eSmrgAC_MSG_CHECKING([whether to build static libraries]) 4159c35d236eSmrg# Make sure either enable_shared or enable_static is yes. 4160c35d236eSmrgtest "$enable_shared" = yes || enable_static=yes 4161c35d236eSmrgAC_MSG_RESULT([$enable_static]) 4162c35d236eSmrg 4163c35d236eSmrg_LT_AC_TAGVAR(GCC, $1)="$G77" 4164c35d236eSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 4165c35d236eSmrg 4166c35d236eSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4167c35d236eSmrgAC_LIBTOOL_PROG_CC_C_O($1) 4168c35d236eSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4169c35d236eSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4170c35d236eSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4171c35d236eSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4172c35d236eSmrg 4173c35d236eSmrgAC_LIBTOOL_CONFIG($1) 4174c35d236eSmrg 4175c35d236eSmrgAC_LANG_POP 4176c35d236eSmrgCC="$lt_save_CC" 4177c35d236eSmrg])# AC_LIBTOOL_LANG_F77_CONFIG 4178c35d236eSmrg 4179c35d236eSmrg 4180c35d236eSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG 4181c35d236eSmrg# -------------------------- 4182c35d236eSmrg# Ensure that the configuration vars for the C compiler are 4183c35d236eSmrg# suitably defined. Those variables are subsequently used by 4184c35d236eSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4185c35d236eSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 4186c35d236eSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 4187c35d236eSmrg[AC_LANG_SAVE 4188c35d236eSmrg 4189c35d236eSmrg# Source file extension for Java test sources. 4190c35d236eSmrgac_ext=java 4191c35d236eSmrg 4192c35d236eSmrg# Object file extension for compiled Java test sources. 4193c35d236eSmrgobjext=o 4194c35d236eSmrg_LT_AC_TAGVAR(objext, $1)=$objext 4195c35d236eSmrg 4196c35d236eSmrg# Code to be used in simple compile tests 41974f6cd06fSmrglt_simple_compile_test_code="class foo {}" 4198c35d236eSmrg 4199c35d236eSmrg# Code to be used in simple link tests 42004f6cd06fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 4201c35d236eSmrg 4202c35d236eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4203c35d236eSmrg_LT_AC_SYS_COMPILER 4204c35d236eSmrg 4205c35d236eSmrg# save warnings/boilerplate of simple test code 4206c35d236eSmrg_LT_COMPILER_BOILERPLATE 4207c35d236eSmrg_LT_LINKER_BOILERPLATE 4208c35d236eSmrg 4209c35d236eSmrg# Allow CC to be a program name with arguments. 4210c35d236eSmrglt_save_CC="$CC" 4211c35d236eSmrgCC=${GCJ-"gcj"} 4212c35d236eSmrgcompiler=$CC 4213c35d236eSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 4214c35d236eSmrg_LT_CC_BASENAME([$compiler]) 4215c35d236eSmrg 4216c35d236eSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 4217c35d236eSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4218c35d236eSmrg 4219c35d236eSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4220c35d236eSmrg 4221c35d236eSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4222c35d236eSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4223c35d236eSmrgAC_LIBTOOL_PROG_CC_C_O($1) 4224c35d236eSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4225c35d236eSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4226c35d236eSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4227c35d236eSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4228c35d236eSmrg 4229c35d236eSmrgAC_LIBTOOL_CONFIG($1) 4230c35d236eSmrg 4231c35d236eSmrgAC_LANG_RESTORE 4232c35d236eSmrgCC="$lt_save_CC" 4233c35d236eSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 4234c35d236eSmrg 4235c35d236eSmrg 4236c35d236eSmrg# AC_LIBTOOL_LANG_RC_CONFIG 4237c35d236eSmrg# ------------------------- 4238c35d236eSmrg# Ensure that the configuration vars for the Windows resource compiler are 4239c35d236eSmrg# suitably defined. Those variables are subsequently used by 4240c35d236eSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4241c35d236eSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 4242c35d236eSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 4243c35d236eSmrg[AC_LANG_SAVE 4244c35d236eSmrg 4245c35d236eSmrg# Source file extension for RC test sources. 4246c35d236eSmrgac_ext=rc 4247c35d236eSmrg 4248c35d236eSmrg# Object file extension for compiled RC test sources. 4249c35d236eSmrgobjext=o 4250c35d236eSmrg_LT_AC_TAGVAR(objext, $1)=$objext 4251c35d236eSmrg 4252c35d236eSmrg# Code to be used in simple compile tests 42534f6cd06fSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 4254c35d236eSmrg 4255c35d236eSmrg# Code to be used in simple link tests 4256c35d236eSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 4257c35d236eSmrg 4258c35d236eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4259c35d236eSmrg_LT_AC_SYS_COMPILER 4260c35d236eSmrg 4261c35d236eSmrg# save warnings/boilerplate of simple test code 4262c35d236eSmrg_LT_COMPILER_BOILERPLATE 4263c35d236eSmrg_LT_LINKER_BOILERPLATE 4264c35d236eSmrg 4265c35d236eSmrg# Allow CC to be a program name with arguments. 4266c35d236eSmrglt_save_CC="$CC" 4267c35d236eSmrgCC=${RC-"windres"} 4268c35d236eSmrgcompiler=$CC 4269c35d236eSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 4270c35d236eSmrg_LT_CC_BASENAME([$compiler]) 4271c35d236eSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4272c35d236eSmrg 4273c35d236eSmrgAC_LIBTOOL_CONFIG($1) 4274c35d236eSmrg 4275c35d236eSmrgAC_LANG_RESTORE 4276c35d236eSmrgCC="$lt_save_CC" 4277c35d236eSmrg])# AC_LIBTOOL_LANG_RC_CONFIG 4278c35d236eSmrg 4279c35d236eSmrg 4280c35d236eSmrg# AC_LIBTOOL_CONFIG([TAGNAME]) 4281c35d236eSmrg# ---------------------------- 4282c35d236eSmrg# If TAGNAME is not passed, then create an initial libtool script 4283c35d236eSmrg# with a default configuration from the untagged config vars. Otherwise 4284c35d236eSmrg# add code to config.status for appending the configuration named by 4285c35d236eSmrg# TAGNAME from the matching tagged config vars. 4286c35d236eSmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 4287c35d236eSmrg[# The else clause should only fire when bootstrapping the 4288c35d236eSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh 4289c35d236eSmrg# with your package, and you will get complaints that there are 4290c35d236eSmrg# no rules to generate ltmain.sh. 4291c35d236eSmrgif test -f "$ltmain"; then 4292c35d236eSmrg # See if we are running on zsh, and set the options which allow our commands through 4293c35d236eSmrg # without removal of \ escapes. 4294c35d236eSmrg if test -n "${ZSH_VERSION+set}" ; then 4295c35d236eSmrg setopt NO_GLOB_SUBST 4296c35d236eSmrg fi 4297c35d236eSmrg # Now quote all the things that may contain metacharacters while being 4298c35d236eSmrg # careful not to overquote the AC_SUBSTed values. We take copies of the 4299c35d236eSmrg # variables and quote the copies for generation of the libtool script. 4300c35d236eSmrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 4301c35d236eSmrg SED SHELL STRIP \ 4302c35d236eSmrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 4303c35d236eSmrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 4304c35d236eSmrg deplibs_check_method reload_flag reload_cmds need_locks \ 4305c35d236eSmrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 4306c35d236eSmrg lt_cv_sys_global_symbol_to_c_name_address \ 4307c35d236eSmrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4308c35d236eSmrg old_postinstall_cmds old_postuninstall_cmds \ 4309c35d236eSmrg _LT_AC_TAGVAR(compiler, $1) \ 4310c35d236eSmrg _LT_AC_TAGVAR(CC, $1) \ 4311c35d236eSmrg _LT_AC_TAGVAR(LD, $1) \ 4312c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4313c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4314c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4315c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4316c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4317c35d236eSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4318c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4319c35d236eSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4320c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4321c35d236eSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4322c35d236eSmrg _LT_AC_TAGVAR(predep_objects, $1) \ 4323c35d236eSmrg _LT_AC_TAGVAR(postdep_objects, $1) \ 4324c35d236eSmrg _LT_AC_TAGVAR(predeps, $1) \ 4325c35d236eSmrg _LT_AC_TAGVAR(postdeps, $1) \ 4326c35d236eSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 43274f6cd06fSmrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 4328c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1) \ 4329c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4330c35d236eSmrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4331c35d236eSmrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4332c35d236eSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 4333c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 4334c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 4335c35d236eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 4336c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 4337c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 4338c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 4339c35d236eSmrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 4340c35d236eSmrg _LT_AC_TAGVAR(module_cmds, $1) \ 4341c35d236eSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 4342c35d236eSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 43434f6cd06fSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 4344c35d236eSmrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 4345c35d236eSmrg _LT_AC_TAGVAR(include_expsyms, $1); do 4346c35d236eSmrg 4347c35d236eSmrg case $var in 4348c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 4349c35d236eSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 4350c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 4351c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 4352c35d236eSmrg _LT_AC_TAGVAR(module_cmds, $1) | \ 4353c35d236eSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 4354c35d236eSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 4355c35d236eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 4356c35d236eSmrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 4357c35d236eSmrg postinstall_cmds | postuninstall_cmds | \ 4358c35d236eSmrg old_postinstall_cmds | old_postuninstall_cmds | \ 4359c35d236eSmrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 4360c35d236eSmrg # Double-quote double-evaled strings. 4361c35d236eSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 4362c35d236eSmrg ;; 4363c35d236eSmrg *) 4364c35d236eSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 4365c35d236eSmrg ;; 4366c35d236eSmrg esac 4367c35d236eSmrg done 4368c35d236eSmrg 4369c35d236eSmrg case $lt_echo in 4370c35d236eSmrg *'\[$]0 --fallback-echo"') 4371c35d236eSmrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 4372c35d236eSmrg ;; 4373c35d236eSmrg esac 4374c35d236eSmrg 4375c35d236eSmrgifelse([$1], [], 4376c35d236eSmrg [cfgfile="${ofile}T" 4377c35d236eSmrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 4378c35d236eSmrg $rm -f "$cfgfile" 4379c35d236eSmrg AC_MSG_NOTICE([creating $ofile])], 4380c35d236eSmrg [cfgfile="$ofile"]) 4381c35d236eSmrg 4382c35d236eSmrg cat <<__EOF__ >> "$cfgfile" 4383c35d236eSmrgifelse([$1], [], 4384c35d236eSmrg[#! $SHELL 4385c35d236eSmrg 4386c35d236eSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 4387c35d236eSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 4388c35d236eSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4389c35d236eSmrg# 43904f6cd06fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 4391c35d236eSmrg# Free Software Foundation, Inc. 4392c35d236eSmrg# 4393c35d236eSmrg# This file is part of GNU Libtool: 4394c35d236eSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4395c35d236eSmrg# 4396c35d236eSmrg# This program is free software; you can redistribute it and/or modify 4397c35d236eSmrg# it under the terms of the GNU General Public License as published by 4398c35d236eSmrg# the Free Software Foundation; either version 2 of the License, or 4399c35d236eSmrg# (at your option) any later version. 4400c35d236eSmrg# 4401c35d236eSmrg# This program is distributed in the hope that it will be useful, but 4402c35d236eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 4403c35d236eSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4404c35d236eSmrg# General Public License for more details. 4405c35d236eSmrg# 4406c35d236eSmrg# You should have received a copy of the GNU General Public License 4407c35d236eSmrg# along with this program; if not, write to the Free Software 4408c35d236eSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 4409c35d236eSmrg# 4410c35d236eSmrg# As a special exception to the GNU General Public License, if you 4411c35d236eSmrg# distribute this file as part of a program that contains a 4412c35d236eSmrg# configuration script generated by Autoconf, you may include it under 4413c35d236eSmrg# the same distribution terms that you use for the rest of that program. 4414c35d236eSmrg 4415c35d236eSmrg# A sed program that does not truncate output. 4416c35d236eSmrgSED=$lt_SED 4417c35d236eSmrg 4418c35d236eSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 4419c35d236eSmrgXsed="$SED -e 1s/^X//" 4420c35d236eSmrg 4421c35d236eSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 4422c35d236eSmrg# if CDPATH is set. 4423c35d236eSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4424c35d236eSmrg 4425c35d236eSmrg# The names of the tagged configurations supported by this script. 4426c35d236eSmrgavailable_tags= 4427c35d236eSmrg 4428c35d236eSmrg# ### BEGIN LIBTOOL CONFIG], 4429c35d236eSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 4430c35d236eSmrg 4431c35d236eSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4432c35d236eSmrg 4433c35d236eSmrg# Shell to use when invoking shell scripts. 4434c35d236eSmrgSHELL=$lt_SHELL 4435c35d236eSmrg 4436c35d236eSmrg# Whether or not to build shared libraries. 4437c35d236eSmrgbuild_libtool_libs=$enable_shared 4438c35d236eSmrg 4439c35d236eSmrg# Whether or not to build static libraries. 4440c35d236eSmrgbuild_old_libs=$enable_static 4441c35d236eSmrg 4442c35d236eSmrg# Whether or not to add -lc for building shared libraries. 4443c35d236eSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 4444c35d236eSmrg 4445c35d236eSmrg# Whether or not to disallow shared libs when runtime libs are static 4446c35d236eSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 4447c35d236eSmrg 4448c35d236eSmrg# Whether or not to optimize for fast installation. 4449c35d236eSmrgfast_install=$enable_fast_install 4450c35d236eSmrg 4451c35d236eSmrg# The host system. 4452c35d236eSmrghost_alias=$host_alias 4453c35d236eSmrghost=$host 4454c35d236eSmrghost_os=$host_os 4455c35d236eSmrg 4456c35d236eSmrg# The build system. 4457c35d236eSmrgbuild_alias=$build_alias 4458c35d236eSmrgbuild=$build 4459c35d236eSmrgbuild_os=$build_os 4460c35d236eSmrg 4461c35d236eSmrg# An echo program that does not interpret backslashes. 4462c35d236eSmrgecho=$lt_echo 4463c35d236eSmrg 4464c35d236eSmrg# The archiver. 4465c35d236eSmrgAR=$lt_AR 4466c35d236eSmrgAR_FLAGS=$lt_AR_FLAGS 4467c35d236eSmrg 4468c35d236eSmrg# A C compiler. 4469c35d236eSmrgLTCC=$lt_LTCC 4470c35d236eSmrg 4471c35d236eSmrg# LTCC compiler flags. 4472c35d236eSmrgLTCFLAGS=$lt_LTCFLAGS 4473c35d236eSmrg 4474c35d236eSmrg# A language-specific compiler. 4475c35d236eSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 4476c35d236eSmrg 4477c35d236eSmrg# Is the compiler the GNU C compiler? 4478c35d236eSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 4479c35d236eSmrg 4480c35d236eSmrg# An ERE matcher. 4481c35d236eSmrgEGREP=$lt_EGREP 4482c35d236eSmrg 4483c35d236eSmrg# The linker used to build libraries. 4484c35d236eSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 4485c35d236eSmrg 4486c35d236eSmrg# Whether we need hard or soft links. 4487c35d236eSmrgLN_S=$lt_LN_S 4488c35d236eSmrg 4489c35d236eSmrg# A BSD-compatible nm program. 4490c35d236eSmrgNM=$lt_NM 4491c35d236eSmrg 4492c35d236eSmrg# A symbol stripping program 4493c35d236eSmrgSTRIP=$lt_STRIP 4494c35d236eSmrg 4495c35d236eSmrg# Used to examine libraries when file_magic_cmd begins "file" 4496c35d236eSmrgMAGIC_CMD=$MAGIC_CMD 4497c35d236eSmrg 4498c35d236eSmrg# Used on cygwin: DLL creation program. 4499c35d236eSmrgDLLTOOL="$DLLTOOL" 4500c35d236eSmrg 4501c35d236eSmrg# Used on cygwin: object dumper. 4502c35d236eSmrgOBJDUMP="$OBJDUMP" 4503c35d236eSmrg 4504c35d236eSmrg# Used on cygwin: assembler. 4505c35d236eSmrgAS="$AS" 4506c35d236eSmrg 4507c35d236eSmrg# The name of the directory that contains temporary libtool files. 4508c35d236eSmrgobjdir=$objdir 4509c35d236eSmrg 4510c35d236eSmrg# How to create reloadable object files. 4511c35d236eSmrgreload_flag=$lt_reload_flag 4512c35d236eSmrgreload_cmds=$lt_reload_cmds 4513c35d236eSmrg 4514c35d236eSmrg# How to pass a linker flag through the compiler. 4515c35d236eSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 4516c35d236eSmrg 4517c35d236eSmrg# Object file suffix (normally "o"). 4518c35d236eSmrgobjext="$ac_objext" 4519c35d236eSmrg 4520c35d236eSmrg# Old archive suffix (normally "a"). 4521c35d236eSmrglibext="$libext" 4522c35d236eSmrg 4523c35d236eSmrg# Shared library suffix (normally ".so"). 4524c35d236eSmrgshrext_cmds='$shrext_cmds' 4525c35d236eSmrg 4526c35d236eSmrg# Executable file suffix (normally ""). 4527c35d236eSmrgexeext="$exeext" 4528c35d236eSmrg 4529c35d236eSmrg# Additional compiler flags for building library objects. 4530c35d236eSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 4531c35d236eSmrgpic_mode=$pic_mode 4532c35d236eSmrg 4533c35d236eSmrg# What is the maximum length of a command? 4534c35d236eSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 4535c35d236eSmrg 4536c35d236eSmrg# Does compiler simultaneously support -c and -o options? 4537c35d236eSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 4538c35d236eSmrg 4539c35d236eSmrg# Must we lock files when doing compilation? 4540c35d236eSmrgneed_locks=$lt_need_locks 4541c35d236eSmrg 4542c35d236eSmrg# Do we need the lib prefix for modules? 4543c35d236eSmrgneed_lib_prefix=$need_lib_prefix 4544c35d236eSmrg 4545c35d236eSmrg# Do we need a version for libraries? 4546c35d236eSmrgneed_version=$need_version 4547c35d236eSmrg 4548c35d236eSmrg# Whether dlopen is supported. 4549c35d236eSmrgdlopen_support=$enable_dlopen 4550c35d236eSmrg 4551c35d236eSmrg# Whether dlopen of programs is supported. 4552c35d236eSmrgdlopen_self=$enable_dlopen_self 4553c35d236eSmrg 4554c35d236eSmrg# Whether dlopen of statically linked programs is supported. 4555c35d236eSmrgdlopen_self_static=$enable_dlopen_self_static 4556c35d236eSmrg 4557c35d236eSmrg# Compiler flag to prevent dynamic linking. 4558c35d236eSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 4559c35d236eSmrg 4560c35d236eSmrg# Compiler flag to turn off builtin functions. 4561c35d236eSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 4562c35d236eSmrg 4563c35d236eSmrg# Compiler flag to allow reflexive dlopens. 4564c35d236eSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 4565c35d236eSmrg 4566c35d236eSmrg# Compiler flag to generate shared objects directly from archives. 4567c35d236eSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 4568c35d236eSmrg 4569c35d236eSmrg# Compiler flag to generate thread-safe objects. 4570c35d236eSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 4571c35d236eSmrg 4572c35d236eSmrg# Library versioning type. 4573c35d236eSmrgversion_type=$version_type 4574c35d236eSmrg 4575c35d236eSmrg# Format of library name prefix. 4576c35d236eSmrglibname_spec=$lt_libname_spec 4577c35d236eSmrg 4578c35d236eSmrg# List of archive names. First name is the real one, the rest are links. 4579c35d236eSmrg# The last name is the one that the linker finds with -lNAME. 4580c35d236eSmrglibrary_names_spec=$lt_library_names_spec 4581c35d236eSmrg 4582c35d236eSmrg# The coded name of the library, if different from the real name. 4583c35d236eSmrgsoname_spec=$lt_soname_spec 4584c35d236eSmrg 4585c35d236eSmrg# Commands used to build and install an old-style archive. 4586c35d236eSmrgRANLIB=$lt_RANLIB 4587c35d236eSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 4588c35d236eSmrgold_postinstall_cmds=$lt_old_postinstall_cmds 4589c35d236eSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 4590c35d236eSmrg 4591c35d236eSmrg# Create an old-style archive from a shared archive. 4592c35d236eSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 4593c35d236eSmrg 4594c35d236eSmrg# Create a temporary old-style archive to link instead of a shared archive. 4595c35d236eSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 4596c35d236eSmrg 4597c35d236eSmrg# Commands used to build and install a shared archive. 4598c35d236eSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 4599c35d236eSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 4600c35d236eSmrgpostinstall_cmds=$lt_postinstall_cmds 4601c35d236eSmrgpostuninstall_cmds=$lt_postuninstall_cmds 4602c35d236eSmrg 4603c35d236eSmrg# Commands used to build a loadable module (assumed same as above if empty) 4604c35d236eSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 4605c35d236eSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 4606c35d236eSmrg 4607c35d236eSmrg# Commands to strip libraries. 4608c35d236eSmrgold_striplib=$lt_old_striplib 4609c35d236eSmrgstriplib=$lt_striplib 4610c35d236eSmrg 4611c35d236eSmrg# Dependencies to place before the objects being linked to create a 4612c35d236eSmrg# shared library. 4613c35d236eSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 4614c35d236eSmrg 4615c35d236eSmrg# Dependencies to place after the objects being linked to create a 4616c35d236eSmrg# shared library. 4617c35d236eSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 4618c35d236eSmrg 4619c35d236eSmrg# Dependencies to place before the objects being linked to create a 4620c35d236eSmrg# shared library. 4621c35d236eSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 4622c35d236eSmrg 4623c35d236eSmrg# Dependencies to place after the objects being linked to create a 4624c35d236eSmrg# shared library. 4625c35d236eSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 4626c35d236eSmrg 46274f6cd06fSmrg# The directories searched by this compiler when creating a shared 46284f6cd06fSmrg# library 46294f6cd06fSmrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 46304f6cd06fSmrg 4631c35d236eSmrg# The library search path used internally by the compiler when linking 4632c35d236eSmrg# a shared library. 4633c35d236eSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 4634c35d236eSmrg 4635c35d236eSmrg# Method to check whether dependent libraries are shared objects. 4636c35d236eSmrgdeplibs_check_method=$lt_deplibs_check_method 4637c35d236eSmrg 4638c35d236eSmrg# Command to use when deplibs_check_method == file_magic. 4639c35d236eSmrgfile_magic_cmd=$lt_file_magic_cmd 4640c35d236eSmrg 4641c35d236eSmrg# Flag that allows shared libraries with undefined symbols to be built. 4642c35d236eSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 4643c35d236eSmrg 4644c35d236eSmrg# Flag that forces no undefined symbols. 4645c35d236eSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 4646c35d236eSmrg 4647c35d236eSmrg# Commands used to finish a libtool library installation in a directory. 4648c35d236eSmrgfinish_cmds=$lt_finish_cmds 4649c35d236eSmrg 4650c35d236eSmrg# Same as above, but a single script fragment to be evaled but not shown. 4651c35d236eSmrgfinish_eval=$lt_finish_eval 4652c35d236eSmrg 4653c35d236eSmrg# Take the output of nm and produce a listing of raw symbols and C names. 4654c35d236eSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 4655c35d236eSmrg 4656c35d236eSmrg# Transform the output of nm in a proper C declaration 4657c35d236eSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 4658c35d236eSmrg 4659c35d236eSmrg# Transform the output of nm in a C name address pair 4660c35d236eSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 4661c35d236eSmrg 4662c35d236eSmrg# This is the shared library runtime path variable. 4663c35d236eSmrgrunpath_var=$runpath_var 4664c35d236eSmrg 4665c35d236eSmrg# This is the shared library path variable. 4666c35d236eSmrgshlibpath_var=$shlibpath_var 4667c35d236eSmrg 4668c35d236eSmrg# Is shlibpath searched before the hard-coded library search path? 4669c35d236eSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 4670c35d236eSmrg 4671c35d236eSmrg# How to hardcode a shared library path into an executable. 4672c35d236eSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 4673c35d236eSmrg 4674c35d236eSmrg# Whether we should hardcode library paths into libraries. 4675c35d236eSmrghardcode_into_libs=$hardcode_into_libs 4676c35d236eSmrg 4677c35d236eSmrg# Flag to hardcode \$libdir into a binary during linking. 4678c35d236eSmrg# This must work even if \$libdir does not exist. 4679c35d236eSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 4680c35d236eSmrg 4681c35d236eSmrg# If ld is used when linking, flag to hardcode \$libdir into 4682c35d236eSmrg# a binary during linking. This must work even if \$libdir does 4683c35d236eSmrg# not exist. 4684c35d236eSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 4685c35d236eSmrg 4686c35d236eSmrg# Whether we need a single -rpath flag with a separated argument. 4687c35d236eSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 4688c35d236eSmrg 4689c35d236eSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 4690c35d236eSmrg# resulting binary. 4691c35d236eSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 4692c35d236eSmrg 4693c35d236eSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 4694c35d236eSmrg# resulting binary. 4695c35d236eSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 4696c35d236eSmrg 4697c35d236eSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 4698c35d236eSmrg# the resulting binary. 4699c35d236eSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 4700c35d236eSmrg 4701c35d236eSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library 4702c35d236eSmrg# and all subsequent libraries and executables linked against it. 4703c35d236eSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 4704c35d236eSmrg 4705c35d236eSmrg# Variables whose values should be saved in libtool wrapper scripts and 4706c35d236eSmrg# restored at relink time. 4707c35d236eSmrgvariables_saved_for_relink="$variables_saved_for_relink" 4708c35d236eSmrg 4709c35d236eSmrg# Whether libtool must link a program against all its dependency libraries. 4710c35d236eSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 4711c35d236eSmrg 4712c35d236eSmrg# Compile-time system search path for libraries 4713c35d236eSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 4714c35d236eSmrg 4715c35d236eSmrg# Run-time system search path for libraries 4716c35d236eSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 4717c35d236eSmrg 4718c35d236eSmrg# Fix the shell variable \$srcfile for the compiler. 47194f6cd06fSmrgfix_srcfile_path=$lt_fix_srcfile_path 4720c35d236eSmrg 4721c35d236eSmrg# Set to yes if exported symbols are required. 4722c35d236eSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 4723c35d236eSmrg 4724c35d236eSmrg# The commands to list exported symbols. 4725c35d236eSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 4726c35d236eSmrg 4727c35d236eSmrg# The commands to extract the exported symbol list from a shared archive. 4728c35d236eSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 4729c35d236eSmrg 4730c35d236eSmrg# Symbols that should not be listed in the preloaded symbols. 4731c35d236eSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 4732c35d236eSmrg 4733c35d236eSmrg# Symbols that must always be exported. 4734c35d236eSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 4735c35d236eSmrg 4736c35d236eSmrgifelse([$1],[], 4737c35d236eSmrg[# ### END LIBTOOL CONFIG], 4738c35d236eSmrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 4739c35d236eSmrg 4740c35d236eSmrg__EOF__ 4741c35d236eSmrg 4742c35d236eSmrgifelse([$1],[], [ 4743c35d236eSmrg case $host_os in 4744c35d236eSmrg aix3*) 4745c35d236eSmrg cat <<\EOF >> "$cfgfile" 4746c35d236eSmrg 4747c35d236eSmrg# AIX sometimes has problems with the GCC collect2 program. For some 4748c35d236eSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4749c35d236eSmrg# vanish in a puff of smoke. 4750c35d236eSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 4751c35d236eSmrg COLLECT_NAMES= 4752c35d236eSmrg export COLLECT_NAMES 4753c35d236eSmrgfi 4754c35d236eSmrgEOF 4755c35d236eSmrg ;; 4756c35d236eSmrg esac 4757c35d236eSmrg 4758c35d236eSmrg # We use sed instead of cat because bash on DJGPP gets confused if 4759c35d236eSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4760c35d236eSmrg # text mode, it properly converts lines to CR/LF. This bash problem 4761c35d236eSmrg # is reportedly fixed, but why not run on old versions too? 4762c35d236eSmrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 4763c35d236eSmrg 4764c35d236eSmrg mv -f "$cfgfile" "$ofile" || \ 4765c35d236eSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4766c35d236eSmrg chmod +x "$ofile" 4767c35d236eSmrg]) 4768c35d236eSmrgelse 4769c35d236eSmrg # If there is no Makefile yet, we rely on a make rule to execute 4770c35d236eSmrg # `config.status --recheck' to rerun these tests and create the 4771c35d236eSmrg # libtool script then. 4772c35d236eSmrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 4773c35d236eSmrg if test -f "$ltmain_in"; then 4774c35d236eSmrg test -f Makefile && make "$ltmain" 4775c35d236eSmrg fi 4776c35d236eSmrgfi 4777c35d236eSmrg])# AC_LIBTOOL_CONFIG 4778c35d236eSmrg 4779c35d236eSmrg 4780c35d236eSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 4781c35d236eSmrg# ------------------------------------------- 4782c35d236eSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 4783c35d236eSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 4784c35d236eSmrg 4785c35d236eSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4786c35d236eSmrg 4787c35d236eSmrgif test "$GCC" = yes; then 4788c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4789c35d236eSmrg 4790c35d236eSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4791c35d236eSmrg lt_cv_prog_compiler_rtti_exceptions, 4792c35d236eSmrg [-fno-rtti -fno-exceptions], [], 4793c35d236eSmrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4794c35d236eSmrgfi 4795c35d236eSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 4796c35d236eSmrg 4797c35d236eSmrg 4798c35d236eSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4799c35d236eSmrg# --------------------------------- 4800c35d236eSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 4801c35d236eSmrg[AC_REQUIRE([AC_CANONICAL_HOST]) 48024f6cd06fSmrgAC_REQUIRE([LT_AC_PROG_SED]) 4803c35d236eSmrgAC_REQUIRE([AC_PROG_NM]) 4804c35d236eSmrgAC_REQUIRE([AC_OBJEXT]) 4805c35d236eSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 4806c35d236eSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4807c35d236eSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4808c35d236eSmrg[ 4809c35d236eSmrg# These are sane defaults that work on at least a few old systems. 4810c35d236eSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4811c35d236eSmrg 4812c35d236eSmrg# Character class describing NM global symbol codes. 4813c35d236eSmrgsymcode='[[BCDEGRST]]' 4814c35d236eSmrg 4815c35d236eSmrg# Regexp to match symbols that can be accessed directly from C. 4816c35d236eSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4817c35d236eSmrg 4818c35d236eSmrg# Transform an extracted symbol line into a proper C declaration 4819c35d236eSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 4820c35d236eSmrg 4821c35d236eSmrg# Transform an extracted symbol line into symbol name and symbol address 4822c35d236eSmrglt_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'" 4823c35d236eSmrg 4824c35d236eSmrg# Define system-specific variables. 4825c35d236eSmrgcase $host_os in 4826c35d236eSmrgaix*) 4827c35d236eSmrg symcode='[[BCDT]]' 4828c35d236eSmrg ;; 4829c35d236eSmrgcygwin* | mingw* | pw32*) 4830c35d236eSmrg symcode='[[ABCDGISTW]]' 4831c35d236eSmrg ;; 4832c35d236eSmrghpux*) # Its linker distinguishes data from code symbols 4833c35d236eSmrg if test "$host_cpu" = ia64; then 4834c35d236eSmrg symcode='[[ABCDEGRST]]' 4835c35d236eSmrg fi 4836c35d236eSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4837c35d236eSmrg 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'" 4838c35d236eSmrg ;; 48394f6cd06fSmrglinux* | k*bsd*-gnu) 4840c35d236eSmrg if test "$host_cpu" = ia64; then 4841c35d236eSmrg symcode='[[ABCDGIRSTW]]' 4842c35d236eSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4843c35d236eSmrg 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'" 4844c35d236eSmrg fi 4845c35d236eSmrg ;; 4846c35d236eSmrgirix* | nonstopux*) 4847c35d236eSmrg symcode='[[BCDEGRST]]' 4848c35d236eSmrg ;; 4849c35d236eSmrgosf*) 4850c35d236eSmrg symcode='[[BCDEGQRST]]' 4851c35d236eSmrg ;; 4852c35d236eSmrgsolaris*) 4853c35d236eSmrg symcode='[[BDRT]]' 4854c35d236eSmrg ;; 4855c35d236eSmrgsco3.2v5*) 4856c35d236eSmrg symcode='[[DT]]' 4857c35d236eSmrg ;; 4858c35d236eSmrgsysv4.2uw2*) 4859c35d236eSmrg symcode='[[DT]]' 4860c35d236eSmrg ;; 4861c35d236eSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 4862c35d236eSmrg symcode='[[ABDT]]' 4863c35d236eSmrg ;; 4864c35d236eSmrgsysv4) 4865c35d236eSmrg symcode='[[DFNSTU]]' 4866c35d236eSmrg ;; 4867c35d236eSmrgesac 4868c35d236eSmrg 4869c35d236eSmrg# Handle CRLF in mingw tool chain 4870c35d236eSmrgopt_cr= 4871c35d236eSmrgcase $build_os in 4872c35d236eSmrgmingw*) 4873c35d236eSmrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4874c35d236eSmrg ;; 4875c35d236eSmrgesac 4876c35d236eSmrg 4877c35d236eSmrg# If we're using GNU nm, then use its standard symbol codes. 4878c35d236eSmrgcase `$NM -V 2>&1` in 4879c35d236eSmrg*GNU* | *'with BFD'*) 4880c35d236eSmrg symcode='[[ABCDGIRSTW]]' ;; 4881c35d236eSmrgesac 4882c35d236eSmrg 4883c35d236eSmrg# Try without a prefix undercore, then with it. 4884c35d236eSmrgfor ac_symprfx in "" "_"; do 4885c35d236eSmrg 4886c35d236eSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4887c35d236eSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4888c35d236eSmrg 4889c35d236eSmrg # Write the raw and C identifiers. 4890c35d236eSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4891c35d236eSmrg 4892c35d236eSmrg # Check to see that the pipe works correctly. 4893c35d236eSmrg pipe_works=no 4894c35d236eSmrg 4895c35d236eSmrg rm -f conftest* 4896c35d236eSmrg cat > conftest.$ac_ext <<EOF 4897c35d236eSmrg#ifdef __cplusplus 4898c35d236eSmrgextern "C" { 4899c35d236eSmrg#endif 4900c35d236eSmrgchar nm_test_var; 4901c35d236eSmrgvoid nm_test_func(){} 4902c35d236eSmrg#ifdef __cplusplus 4903c35d236eSmrg} 4904c35d236eSmrg#endif 4905c35d236eSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 4906c35d236eSmrgEOF 4907c35d236eSmrg 4908c35d236eSmrg if AC_TRY_EVAL(ac_compile); then 4909c35d236eSmrg # Now try to grab the symbols. 4910c35d236eSmrg nlist=conftest.nm 4911c35d236eSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 4912c35d236eSmrg # Try sorting and uniquifying the output. 4913c35d236eSmrg if sort "$nlist" | uniq > "$nlist"T; then 4914c35d236eSmrg mv -f "$nlist"T "$nlist" 4915c35d236eSmrg else 4916c35d236eSmrg rm -f "$nlist"T 4917c35d236eSmrg fi 4918c35d236eSmrg 4919c35d236eSmrg # Make sure that we snagged all the symbols we need. 4920c35d236eSmrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 4921c35d236eSmrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 4922c35d236eSmrg cat <<EOF > conftest.$ac_ext 4923c35d236eSmrg#ifdef __cplusplus 4924c35d236eSmrgextern "C" { 4925c35d236eSmrg#endif 4926c35d236eSmrg 4927c35d236eSmrgEOF 4928c35d236eSmrg # Now generate the symbol file. 4929c35d236eSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 4930c35d236eSmrg 4931c35d236eSmrg cat <<EOF >> conftest.$ac_ext 4932c35d236eSmrg#if defined (__STDC__) && __STDC__ 4933c35d236eSmrg# define lt_ptr_t void * 4934c35d236eSmrg#else 4935c35d236eSmrg# define lt_ptr_t char * 4936c35d236eSmrg# define const 4937c35d236eSmrg#endif 4938c35d236eSmrg 4939c35d236eSmrg/* The mapping between symbol names and symbols. */ 4940c35d236eSmrgconst struct { 4941c35d236eSmrg const char *name; 4942c35d236eSmrg lt_ptr_t address; 4943c35d236eSmrg} 4944c35d236eSmrglt_preloaded_symbols[[]] = 4945c35d236eSmrg{ 4946c35d236eSmrgEOF 4947c35d236eSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 4948c35d236eSmrg cat <<\EOF >> conftest.$ac_ext 4949c35d236eSmrg {0, (lt_ptr_t) 0} 4950c35d236eSmrg}; 4951c35d236eSmrg 4952c35d236eSmrg#ifdef __cplusplus 4953c35d236eSmrg} 4954c35d236eSmrg#endif 4955c35d236eSmrgEOF 4956c35d236eSmrg # Now try linking the two files. 4957c35d236eSmrg mv conftest.$ac_objext conftstm.$ac_objext 4958c35d236eSmrg lt_save_LIBS="$LIBS" 4959c35d236eSmrg lt_save_CFLAGS="$CFLAGS" 4960c35d236eSmrg LIBS="conftstm.$ac_objext" 4961c35d236eSmrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4962c35d236eSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4963c35d236eSmrg pipe_works=yes 4964c35d236eSmrg fi 4965c35d236eSmrg LIBS="$lt_save_LIBS" 4966c35d236eSmrg CFLAGS="$lt_save_CFLAGS" 4967c35d236eSmrg else 4968c35d236eSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4969c35d236eSmrg fi 4970c35d236eSmrg else 4971c35d236eSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4972c35d236eSmrg fi 4973c35d236eSmrg else 4974c35d236eSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4975c35d236eSmrg fi 4976c35d236eSmrg else 4977c35d236eSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4978c35d236eSmrg cat conftest.$ac_ext >&5 4979c35d236eSmrg fi 49804f6cd06fSmrg rm -rf conftest* conftst* 4981c35d236eSmrg 4982c35d236eSmrg # Do not use the global_symbol_pipe unless it works. 4983c35d236eSmrg if test "$pipe_works" = yes; then 4984c35d236eSmrg break 4985c35d236eSmrg else 4986c35d236eSmrg lt_cv_sys_global_symbol_pipe= 4987c35d236eSmrg fi 4988c35d236eSmrgdone 4989c35d236eSmrg]) 4990c35d236eSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4991c35d236eSmrg lt_cv_sys_global_symbol_to_cdecl= 4992c35d236eSmrgfi 4993c35d236eSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4994c35d236eSmrg AC_MSG_RESULT(failed) 4995c35d236eSmrgelse 4996c35d236eSmrg AC_MSG_RESULT(ok) 4997c35d236eSmrgfi 4998c35d236eSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4999c35d236eSmrg 5000c35d236eSmrg 5001c35d236eSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 5002c35d236eSmrg# --------------------------------------- 5003c35d236eSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 5004c35d236eSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 5005c35d236eSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5006c35d236eSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 5007c35d236eSmrg 5008c35d236eSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 5009c35d236eSmrg ifelse([$1],[CXX],[ 5010c35d236eSmrg # C++ specific cases for pic, static, wl, etc. 5011c35d236eSmrg if test "$GXX" = yes; then 5012c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5013c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5014c35d236eSmrg 5015c35d236eSmrg case $host_os in 5016c35d236eSmrg aix*) 5017c35d236eSmrg # All AIX code is PIC. 5018c35d236eSmrg if test "$host_cpu" = ia64; then 5019c35d236eSmrg # AIX 5 now supports IA64 processor 5020c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5021c35d236eSmrg fi 5022c35d236eSmrg ;; 5023c35d236eSmrg amigaos*) 5024c35d236eSmrg # FIXME: we need at least 68020 code to build shared libraries, but 5025c35d236eSmrg # adding the `-m68020' flag to GCC prevents building anything better, 5026c35d236eSmrg # like `-m68040'. 5027c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5028c35d236eSmrg ;; 50294f6cd06fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5030c35d236eSmrg # PIC is the default for these OSes. 5031c35d236eSmrg ;; 50324f6cd06fSmrg mingw* | cygwin* | os2* | pw32*) 5033c35d236eSmrg # This hack is so that the source file can tell whether it is being 5034c35d236eSmrg # built for inclusion in a dll (and should export symbols for example). 50354f6cd06fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 50364f6cd06fSmrg # (--disable-auto-import) libraries 50374f6cd06fSmrg m4_if([$1], [GCJ], [], 50384f6cd06fSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5039c35d236eSmrg ;; 5040c35d236eSmrg darwin* | rhapsody*) 5041c35d236eSmrg # PIC is the default on this platform 5042c35d236eSmrg # Common symbols not allowed in MH_DYLIB files 5043c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5044c35d236eSmrg ;; 5045c35d236eSmrg *djgpp*) 5046c35d236eSmrg # DJGPP does not support shared libraries at all 5047c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5048c35d236eSmrg ;; 50494f6cd06fSmrg interix[[3-9]]*) 5050c35d236eSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5051c35d236eSmrg # Instead, we relocate shared libraries at runtime. 5052c35d236eSmrg ;; 5053c35d236eSmrg sysv4*MP*) 5054c35d236eSmrg if test -d /usr/nec; then 5055c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5056c35d236eSmrg fi 5057c35d236eSmrg ;; 5058c35d236eSmrg hpux*) 5059c35d236eSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5060c35d236eSmrg # not for PA HP-UX. 5061c35d236eSmrg case $host_cpu in 5062c35d236eSmrg hppa*64*|ia64*) 5063c35d236eSmrg ;; 5064c35d236eSmrg *) 5065c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5066c35d236eSmrg ;; 5067c35d236eSmrg esac 5068c35d236eSmrg ;; 5069c35d236eSmrg *) 5070c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5071c35d236eSmrg ;; 5072c35d236eSmrg esac 5073c35d236eSmrg else 5074c35d236eSmrg case $host_os in 50754f6cd06fSmrg aix[[4-9]]*) 5076c35d236eSmrg # All AIX code is PIC. 5077c35d236eSmrg if test "$host_cpu" = ia64; then 5078c35d236eSmrg # AIX 5 now supports IA64 processor 5079c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5080c35d236eSmrg else 5081c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5082c35d236eSmrg fi 5083c35d236eSmrg ;; 5084c35d236eSmrg chorus*) 5085c35d236eSmrg case $cc_basename in 5086c35d236eSmrg cxch68*) 5087c35d236eSmrg # Green Hills C++ Compiler 5088c35d236eSmrg # _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" 5089c35d236eSmrg ;; 5090c35d236eSmrg esac 5091c35d236eSmrg ;; 5092c35d236eSmrg darwin*) 5093c35d236eSmrg # PIC is the default on this platform 5094c35d236eSmrg # Common symbols not allowed in MH_DYLIB files 5095c35d236eSmrg case $cc_basename in 5096c35d236eSmrg xlc*) 5097c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5098c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5099c35d236eSmrg ;; 5100c35d236eSmrg esac 5101c35d236eSmrg ;; 5102c35d236eSmrg dgux*) 5103c35d236eSmrg case $cc_basename in 5104c35d236eSmrg ec++*) 5105c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5106c35d236eSmrg ;; 5107c35d236eSmrg ghcx*) 5108c35d236eSmrg # Green Hills C++ Compiler 5109c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5110c35d236eSmrg ;; 5111c35d236eSmrg *) 5112c35d236eSmrg ;; 5113c35d236eSmrg esac 5114c35d236eSmrg ;; 51154f6cd06fSmrg freebsd* | dragonfly*) 5116c35d236eSmrg # FreeBSD uses GNU C++ 5117c35d236eSmrg ;; 5118c35d236eSmrg hpux9* | hpux10* | hpux11*) 5119c35d236eSmrg case $cc_basename in 5120c35d236eSmrg CC*) 5121c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5122c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5123c35d236eSmrg if test "$host_cpu" != ia64; then 5124c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5125c35d236eSmrg fi 5126c35d236eSmrg ;; 5127c35d236eSmrg aCC*) 5128c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5129c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5130c35d236eSmrg case $host_cpu in 5131c35d236eSmrg hppa*64*|ia64*) 5132c35d236eSmrg # +Z the default 5133c35d236eSmrg ;; 5134c35d236eSmrg *) 5135c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5136c35d236eSmrg ;; 5137c35d236eSmrg esac 5138c35d236eSmrg ;; 5139c35d236eSmrg *) 5140c35d236eSmrg ;; 5141c35d236eSmrg esac 5142c35d236eSmrg ;; 5143c35d236eSmrg interix*) 5144c35d236eSmrg # This is c89, which is MS Visual C++ (no shared libs) 5145c35d236eSmrg # Anyone wants to do a port? 5146c35d236eSmrg ;; 5147c35d236eSmrg irix5* | irix6* | nonstopux*) 5148c35d236eSmrg case $cc_basename in 5149c35d236eSmrg CC*) 5150c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5151c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5152c35d236eSmrg # CC pic flag -KPIC is the default. 5153c35d236eSmrg ;; 5154c35d236eSmrg *) 5155c35d236eSmrg ;; 5156c35d236eSmrg esac 5157c35d236eSmrg ;; 51584f6cd06fSmrg linux* | k*bsd*-gnu) 5159c35d236eSmrg case $cc_basename in 5160c35d236eSmrg KCC*) 5161c35d236eSmrg # KAI C++ Compiler 5162c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5163c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5164c35d236eSmrg ;; 5165c35d236eSmrg icpc* | ecpc*) 5166c35d236eSmrg # Intel C++ 5167c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5168c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5169c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5170c35d236eSmrg ;; 51714f6cd06fSmrg pgCC* | pgcpp*) 5172c35d236eSmrg # Portland Group C++ compiler. 5173c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5174c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5175c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5176c35d236eSmrg ;; 5177c35d236eSmrg cxx*) 5178c35d236eSmrg # Compaq C++ 5179c35d236eSmrg # Make sure the PIC flag is empty. It appears that all Alpha 5180c35d236eSmrg # Linux and Compaq Tru64 Unix objects are PIC. 5181c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5182c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5183c35d236eSmrg ;; 5184c35d236eSmrg *) 51854f6cd06fSmrg case `$CC -V 2>&1 | sed 5q` in 51864f6cd06fSmrg *Sun\ C*) 51874f6cd06fSmrg # Sun C++ 5.9 51884f6cd06fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51894f6cd06fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51904f6cd06fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 51914f6cd06fSmrg ;; 51924f6cd06fSmrg esac 5193c35d236eSmrg ;; 5194c35d236eSmrg esac 5195c35d236eSmrg ;; 5196c35d236eSmrg lynxos*) 5197c35d236eSmrg ;; 5198c35d236eSmrg m88k*) 5199c35d236eSmrg ;; 5200c35d236eSmrg mvs*) 5201c35d236eSmrg case $cc_basename in 5202c35d236eSmrg cxx*) 5203c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5204c35d236eSmrg ;; 5205c35d236eSmrg *) 5206c35d236eSmrg ;; 5207c35d236eSmrg esac 5208c35d236eSmrg ;; 5209c35d236eSmrg netbsd*) 5210c35d236eSmrg ;; 5211c35d236eSmrg osf3* | osf4* | osf5*) 5212c35d236eSmrg case $cc_basename in 5213c35d236eSmrg KCC*) 5214c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5215c35d236eSmrg ;; 5216c35d236eSmrg RCC*) 5217c35d236eSmrg # Rational C++ 2.4.1 5218c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5219c35d236eSmrg ;; 5220c35d236eSmrg cxx*) 5221c35d236eSmrg # Digital/Compaq C++ 5222c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5223c35d236eSmrg # Make sure the PIC flag is empty. It appears that all Alpha 5224c35d236eSmrg # Linux and Compaq Tru64 Unix objects are PIC. 5225c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5226c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5227c35d236eSmrg ;; 5228c35d236eSmrg *) 5229c35d236eSmrg ;; 5230c35d236eSmrg esac 5231c35d236eSmrg ;; 5232c35d236eSmrg psos*) 5233c35d236eSmrg ;; 5234c35d236eSmrg solaris*) 5235c35d236eSmrg case $cc_basename in 5236c35d236eSmrg CC*) 5237c35d236eSmrg # Sun C++ 4.2, 5.x and Centerline C++ 5238c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5239c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5240c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5241c35d236eSmrg ;; 5242c35d236eSmrg gcx*) 5243c35d236eSmrg # Green Hills C++ Compiler 5244c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5245c35d236eSmrg ;; 5246c35d236eSmrg *) 5247c35d236eSmrg ;; 5248c35d236eSmrg esac 5249c35d236eSmrg ;; 5250c35d236eSmrg sunos4*) 5251c35d236eSmrg case $cc_basename in 5252c35d236eSmrg CC*) 5253c35d236eSmrg # Sun C++ 4.x 5254c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5255c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5256c35d236eSmrg ;; 5257c35d236eSmrg lcc*) 5258c35d236eSmrg # Lucid 5259c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5260c35d236eSmrg ;; 5261c35d236eSmrg *) 5262c35d236eSmrg ;; 5263c35d236eSmrg esac 5264c35d236eSmrg ;; 5265c35d236eSmrg tandem*) 5266c35d236eSmrg case $cc_basename in 5267c35d236eSmrg NCC*) 5268c35d236eSmrg # NonStop-UX NCC 3.20 5269c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5270c35d236eSmrg ;; 5271c35d236eSmrg *) 5272c35d236eSmrg ;; 5273c35d236eSmrg esac 5274c35d236eSmrg ;; 5275c35d236eSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5276c35d236eSmrg case $cc_basename in 5277c35d236eSmrg CC*) 5278c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5279c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5280c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5281c35d236eSmrg ;; 5282c35d236eSmrg esac 5283c35d236eSmrg ;; 5284c35d236eSmrg vxworks*) 5285c35d236eSmrg ;; 5286c35d236eSmrg *) 5287c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5288c35d236eSmrg ;; 5289c35d236eSmrg esac 5290c35d236eSmrg fi 5291c35d236eSmrg], 5292c35d236eSmrg[ 5293c35d236eSmrg if test "$GCC" = yes; then 5294c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5295c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5296c35d236eSmrg 5297c35d236eSmrg case $host_os in 5298c35d236eSmrg aix*) 5299c35d236eSmrg # All AIX code is PIC. 5300c35d236eSmrg if test "$host_cpu" = ia64; then 5301c35d236eSmrg # AIX 5 now supports IA64 processor 5302c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5303c35d236eSmrg fi 5304c35d236eSmrg ;; 5305c35d236eSmrg 5306c35d236eSmrg amigaos*) 5307c35d236eSmrg # FIXME: we need at least 68020 code to build shared libraries, but 5308c35d236eSmrg # adding the `-m68020' flag to GCC prevents building anything better, 5309c35d236eSmrg # like `-m68040'. 5310c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5311c35d236eSmrg ;; 5312c35d236eSmrg 53134f6cd06fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5314c35d236eSmrg # PIC is the default for these OSes. 5315c35d236eSmrg ;; 5316c35d236eSmrg 53174f6cd06fSmrg mingw* | cygwin* | pw32* | os2*) 5318c35d236eSmrg # This hack is so that the source file can tell whether it is being 5319c35d236eSmrg # built for inclusion in a dll (and should export symbols for example). 53204f6cd06fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 53214f6cd06fSmrg # (--disable-auto-import) libraries 53224f6cd06fSmrg m4_if([$1], [GCJ], [], 53234f6cd06fSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5324c35d236eSmrg ;; 5325c35d236eSmrg 5326c35d236eSmrg darwin* | rhapsody*) 5327c35d236eSmrg # PIC is the default on this platform 5328c35d236eSmrg # Common symbols not allowed in MH_DYLIB files 5329c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5330c35d236eSmrg ;; 5331c35d236eSmrg 53324f6cd06fSmrg interix[[3-9]]*) 5333c35d236eSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5334c35d236eSmrg # Instead, we relocate shared libraries at runtime. 5335c35d236eSmrg ;; 5336c35d236eSmrg 5337c35d236eSmrg msdosdjgpp*) 5338c35d236eSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 5339c35d236eSmrg # on systems that don't support them. 5340c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5341c35d236eSmrg enable_shared=no 5342c35d236eSmrg ;; 5343c35d236eSmrg 5344c35d236eSmrg sysv4*MP*) 5345c35d236eSmrg if test -d /usr/nec; then 5346c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5347c35d236eSmrg fi 5348c35d236eSmrg ;; 5349c35d236eSmrg 5350c35d236eSmrg hpux*) 5351c35d236eSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5352c35d236eSmrg # not for PA HP-UX. 5353c35d236eSmrg case $host_cpu in 5354c35d236eSmrg hppa*64*|ia64*) 5355c35d236eSmrg # +Z the default 5356c35d236eSmrg ;; 5357c35d236eSmrg *) 5358c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5359c35d236eSmrg ;; 5360c35d236eSmrg esac 5361c35d236eSmrg ;; 5362c35d236eSmrg 5363c35d236eSmrg *) 5364c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5365c35d236eSmrg ;; 5366c35d236eSmrg esac 5367c35d236eSmrg else 5368c35d236eSmrg # PORTME Check for flag to pass linker flags through the system compiler. 5369c35d236eSmrg case $host_os in 5370c35d236eSmrg aix*) 5371c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5372c35d236eSmrg if test "$host_cpu" = ia64; then 5373c35d236eSmrg # AIX 5 now supports IA64 processor 5374c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5375c35d236eSmrg else 5376c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5377c35d236eSmrg fi 5378c35d236eSmrg ;; 5379c35d236eSmrg darwin*) 5380c35d236eSmrg # PIC is the default on this platform 5381c35d236eSmrg # Common symbols not allowed in MH_DYLIB files 5382c35d236eSmrg case $cc_basename in 5383c35d236eSmrg xlc*) 5384c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5385c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5386c35d236eSmrg ;; 5387c35d236eSmrg esac 5388c35d236eSmrg ;; 5389c35d236eSmrg 53904f6cd06fSmrg mingw* | cygwin* | pw32* | os2*) 5391c35d236eSmrg # This hack is so that the source file can tell whether it is being 5392c35d236eSmrg # built for inclusion in a dll (and should export symbols for example). 53934f6cd06fSmrg m4_if([$1], [GCJ], [], 53944f6cd06fSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5395c35d236eSmrg ;; 5396c35d236eSmrg 5397c35d236eSmrg hpux9* | hpux10* | hpux11*) 5398c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5399c35d236eSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5400c35d236eSmrg # not for PA HP-UX. 5401c35d236eSmrg case $host_cpu in 5402c35d236eSmrg hppa*64*|ia64*) 5403c35d236eSmrg # +Z the default 5404c35d236eSmrg ;; 5405c35d236eSmrg *) 5406c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5407c35d236eSmrg ;; 5408c35d236eSmrg esac 5409c35d236eSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 5410c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5411c35d236eSmrg ;; 5412c35d236eSmrg 5413c35d236eSmrg irix5* | irix6* | nonstopux*) 5414c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5415c35d236eSmrg # PIC (with -KPIC) is the default. 5416c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5417c35d236eSmrg ;; 5418c35d236eSmrg 5419c35d236eSmrg newsos6) 5420c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5421c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5422c35d236eSmrg ;; 5423c35d236eSmrg 54244f6cd06fSmrg linux* | k*bsd*-gnu) 5425c35d236eSmrg case $cc_basename in 5426c35d236eSmrg icc* | ecc*) 5427c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5428c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5429c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5430c35d236eSmrg ;; 5431c35d236eSmrg pgcc* | pgf77* | pgf90* | pgf95*) 5432c35d236eSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 5433c35d236eSmrg # which looks to be a dead project) 5434c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5435c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5436c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5437c35d236eSmrg ;; 5438c35d236eSmrg ccc*) 5439c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5440c35d236eSmrg # All Alpha code is PIC. 5441c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5442c35d236eSmrg ;; 54434f6cd06fSmrg *) 54444f6cd06fSmrg case `$CC -V 2>&1 | sed 5q` in 54454f6cd06fSmrg *Sun\ C*) 54464f6cd06fSmrg # Sun C 5.9 54474f6cd06fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54484f6cd06fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54494f6cd06fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54504f6cd06fSmrg ;; 54514f6cd06fSmrg *Sun\ F*) 54524f6cd06fSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 54534f6cd06fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54544f6cd06fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54554f6cd06fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 54564f6cd06fSmrg ;; 54574f6cd06fSmrg esac 54584f6cd06fSmrg ;; 5459c35d236eSmrg esac 5460c35d236eSmrg ;; 5461c35d236eSmrg 5462c35d236eSmrg osf3* | osf4* | osf5*) 5463c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5464c35d236eSmrg # All OSF/1 code is PIC. 5465c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5466c35d236eSmrg ;; 5467c35d236eSmrg 54684f6cd06fSmrg rdos*) 54694f6cd06fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54704f6cd06fSmrg ;; 54714f6cd06fSmrg 5472c35d236eSmrg solaris*) 5473c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5474c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5475c35d236eSmrg case $cc_basename in 5476c35d236eSmrg f77* | f90* | f95*) 5477c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5478c35d236eSmrg *) 5479c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5480c35d236eSmrg esac 5481c35d236eSmrg ;; 5482c35d236eSmrg 5483c35d236eSmrg sunos4*) 5484c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5485c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5486c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5487c35d236eSmrg ;; 5488c35d236eSmrg 5489c35d236eSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 5490c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5491c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5492c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5493c35d236eSmrg ;; 5494c35d236eSmrg 5495c35d236eSmrg sysv4*MP*) 5496c35d236eSmrg if test -d /usr/nec ;then 5497c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5498c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5499c35d236eSmrg fi 5500c35d236eSmrg ;; 5501c35d236eSmrg 5502c35d236eSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5503c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5504c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5505c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5506c35d236eSmrg ;; 5507c35d236eSmrg 5508c35d236eSmrg unicos*) 5509c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5510c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5511c35d236eSmrg ;; 5512c35d236eSmrg 5513c35d236eSmrg uts4*) 5514c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5515c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5516c35d236eSmrg ;; 5517c35d236eSmrg 5518c35d236eSmrg *) 5519c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5520c35d236eSmrg ;; 5521c35d236eSmrg esac 5522c35d236eSmrg fi 5523c35d236eSmrg]) 5524c35d236eSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 5525c35d236eSmrg 5526c35d236eSmrg# 5527c35d236eSmrg# Check to make sure the PIC flag actually works. 5528c35d236eSmrg# 5529c35d236eSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 5530c35d236eSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 55314f6cd06fSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 5532c35d236eSmrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 5533c35d236eSmrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 5534c35d236eSmrg "" | " "*) ;; 5535c35d236eSmrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5536c35d236eSmrg esac], 5537c35d236eSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5538c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5539c35d236eSmrgfi 5540c35d236eSmrgcase $host_os in 5541c35d236eSmrg # For platforms which do not support PIC, -DPIC is meaningless: 5542c35d236eSmrg *djgpp*) 5543c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5544c35d236eSmrg ;; 5545c35d236eSmrg *) 5546c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 5547c35d236eSmrg ;; 5548c35d236eSmrgesac 5549c35d236eSmrg 5550c35d236eSmrg# 5551c35d236eSmrg# Check to make sure the static flag actually works. 5552c35d236eSmrg# 5553c35d236eSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 5554c35d236eSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 55554f6cd06fSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5556c35d236eSmrg $lt_tmp_static_flag, 5557c35d236eSmrg [], 5558c35d236eSmrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 5559c35d236eSmrg]) 5560c35d236eSmrg 5561c35d236eSmrg 5562c35d236eSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 5563c35d236eSmrg# ------------------------------------ 5564c35d236eSmrg# See if the linker supports building shared libraries. 5565c35d236eSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 55664f6cd06fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 55674f6cd06fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5568c35d236eSmrgifelse([$1],[CXX],[ 5569c35d236eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5570c35d236eSmrg case $host_os in 55714f6cd06fSmrg aix[[4-9]]*) 5572c35d236eSmrg # If we're using GNU nm, then we don't want the "-C" option. 5573c35d236eSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5574c35d236eSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5575c35d236eSmrg _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' 5576c35d236eSmrg else 5577c35d236eSmrg _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' 5578c35d236eSmrg fi 5579c35d236eSmrg ;; 5580c35d236eSmrg pw32*) 5581c35d236eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5582c35d236eSmrg ;; 5583c35d236eSmrg cygwin* | mingw*) 55844f6cd06fSmrg _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' 5585c35d236eSmrg ;; 5586c35d236eSmrg *) 5587c35d236eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5588c35d236eSmrg ;; 5589c35d236eSmrg esac 55904f6cd06fSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5591c35d236eSmrg],[ 5592c35d236eSmrg runpath_var= 5593c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 5594c35d236eSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5595c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)= 5596c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5597c35d236eSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 5598c35d236eSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5599c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5600c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5601c35d236eSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 5602c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5603c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5604c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5605c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5606c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5607c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5608c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5609c35d236eSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 5610c35d236eSmrg _LT_AC_TAGVAR(module_cmds, $1)= 5611c35d236eSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 5612c35d236eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5613c35d236eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5614c35d236eSmrg # include_expsyms should be a list of space-separated symbols to be *always* 5615c35d236eSmrg # included in the symbol list 5616c35d236eSmrg _LT_AC_TAGVAR(include_expsyms, $1)= 5617c35d236eSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 5618c35d236eSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 5619c35d236eSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5620c35d236eSmrg # as well as any symbol that contains `d'. 56214f6cd06fSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5622c35d236eSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5623c35d236eSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 5624c35d236eSmrg # the symbol is explicitly referenced. Since portable code cannot 5625c35d236eSmrg # rely on this symbol name, it's probably fine to never include it in 5626c35d236eSmrg # preloaded symbol tables. 56274f6cd06fSmrg # Exclude shared library initialization/finalization symbols. 56284f6cd06fSmrgdnl Note also adjust exclude_expsyms for C++ above. 5629c35d236eSmrg extract_expsyms_cmds= 5630c35d236eSmrg # Just being paranoid about ensuring that cc_basename is set. 5631c35d236eSmrg _LT_CC_BASENAME([$compiler]) 5632c35d236eSmrg case $host_os in 5633c35d236eSmrg cygwin* | mingw* | pw32*) 5634c35d236eSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5635c35d236eSmrg # When not using gcc, we currently assume that we are using 5636c35d236eSmrg # Microsoft Visual C++. 5637c35d236eSmrg if test "$GCC" != yes; then 5638c35d236eSmrg with_gnu_ld=no 5639c35d236eSmrg fi 5640c35d236eSmrg ;; 5641c35d236eSmrg interix*) 5642c35d236eSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5643c35d236eSmrg with_gnu_ld=yes 5644c35d236eSmrg ;; 5645c35d236eSmrg openbsd*) 5646c35d236eSmrg with_gnu_ld=no 5647c35d236eSmrg ;; 5648c35d236eSmrg esac 5649c35d236eSmrg 5650c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5651c35d236eSmrg if test "$with_gnu_ld" = yes; then 5652c35d236eSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5653c35d236eSmrg wlarc='${wl}' 5654c35d236eSmrg 5655c35d236eSmrg # Set some defaults for GNU ld with shared library support. These 5656c35d236eSmrg # are reset later if shared libraries are not supported. Putting them 5657c35d236eSmrg # here allows them to be overridden if necessary. 5658c35d236eSmrg runpath_var=LD_RUN_PATH 5659c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5660c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5661c35d236eSmrg # ancient GNU ld didn't support --whole-archive et. al. 5662c35d236eSmrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 5663c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5664c35d236eSmrg else 5665c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5666c35d236eSmrg fi 5667c35d236eSmrg supports_anon_versioning=no 5668c35d236eSmrg case `$LD -v 2>/dev/null` in 5669c35d236eSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5670c35d236eSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5671c35d236eSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5672c35d236eSmrg *\ 2.11.*) ;; # other 2.11 versions 5673c35d236eSmrg *) supports_anon_versioning=yes ;; 5674c35d236eSmrg esac 5675c35d236eSmrg 5676c35d236eSmrg # See if GNU ld supports shared libraries. 5677c35d236eSmrg case $host_os in 56784f6cd06fSmrg aix[[3-9]]*) 5679c35d236eSmrg # On AIX/PPC, the GNU linker is very broken 5680c35d236eSmrg if test "$host_cpu" != ia64; then 5681c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5682c35d236eSmrg cat <<EOF 1>&2 5683c35d236eSmrg 5684c35d236eSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 5685c35d236eSmrg*** to be unable to reliably create shared libraries on AIX. 5686c35d236eSmrg*** Therefore, libtool is disabling shared libraries support. If you 5687c35d236eSmrg*** really care for shared libraries, you may want to modify your PATH 5688c35d236eSmrg*** so that a non-GNU linker is found, and then restart. 5689c35d236eSmrg 5690c35d236eSmrgEOF 5691c35d236eSmrg fi 5692c35d236eSmrg ;; 5693c35d236eSmrg 5694c35d236eSmrg amigaos*) 5695c35d236eSmrg _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)' 5696c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5697c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5698c35d236eSmrg 5699c35d236eSmrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 5700c35d236eSmrg # that the semantics of dynamic libraries on AmigaOS, at least up 5701c35d236eSmrg # to version 4, is to share data among multiple programs linked 5702c35d236eSmrg # with the same dynamic library. Since this doesn't match the 5703c35d236eSmrg # behavior of shared libraries on other platforms, we can't use 5704c35d236eSmrg # them. 5705c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5706c35d236eSmrg ;; 5707c35d236eSmrg 5708c35d236eSmrg beos*) 5709c35d236eSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5710c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5711c35d236eSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5712c35d236eSmrg # support --undefined. This deserves some investigation. FIXME 5713c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5714c35d236eSmrg else 5715c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5716c35d236eSmrg fi 5717c35d236eSmrg ;; 5718c35d236eSmrg 5719c35d236eSmrg cygwin* | mingw* | pw32*) 5720c35d236eSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5721c35d236eSmrg # as there is no search path for DLLs. 5722c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5723c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5724c35d236eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5725c35d236eSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 57264f6cd06fSmrg _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' 5727c35d236eSmrg 5728c35d236eSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5729c35d236eSmrg _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' 5730c35d236eSmrg # If the export-symbols file already is a .def file (1st line 5731c35d236eSmrg # is EXPORTS), use it as is; otherwise, prepend... 5732c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5733c35d236eSmrg cp $export_symbols $output_objdir/$soname.def; 5734c35d236eSmrg else 5735c35d236eSmrg echo EXPORTS > $output_objdir/$soname.def; 5736c35d236eSmrg cat $export_symbols >> $output_objdir/$soname.def; 5737c35d236eSmrg fi~ 5738c35d236eSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5739c35d236eSmrg else 5740c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5741c35d236eSmrg fi 5742c35d236eSmrg ;; 5743c35d236eSmrg 57444f6cd06fSmrg interix[[3-9]]*) 5745c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5746c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5747c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5748c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5749c35d236eSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5750c35d236eSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5751c35d236eSmrg # default) and relocated if they conflict, which is a slow very memory 5752c35d236eSmrg # consuming and fragmenting process. To avoid this, we pick a random, 5753c35d236eSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5754c35d236eSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5755c35d236eSmrg _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' 5756c35d236eSmrg _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' 5757c35d236eSmrg ;; 5758c35d236eSmrg 57594f6cd06fSmrg gnu* | linux* | k*bsd*-gnu) 5760c35d236eSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5761c35d236eSmrg tmp_addflag= 5762c35d236eSmrg case $cc_basename,$host_cpu in 5763c35d236eSmrg pgcc*) # Portland Group C compiler 5764c35d236eSmrg _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' 5765c35d236eSmrg tmp_addflag=' $pic_flag' 5766c35d236eSmrg ;; 5767c35d236eSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 5768c35d236eSmrg _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' 5769c35d236eSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 5770c35d236eSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5771c35d236eSmrg tmp_addflag=' -i_dynamic' ;; 5772c35d236eSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5773c35d236eSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5774c35d236eSmrg ifc* | ifort*) # Intel Fortran compiler 5775c35d236eSmrg tmp_addflag=' -nofor_main' ;; 5776c35d236eSmrg esac 57774f6cd06fSmrg case `$CC -V 2>&1 | sed 5q` in 57784f6cd06fSmrg *Sun\ C*) # Sun C 5.9 57794f6cd06fSmrg _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' 57804f6cd06fSmrg tmp_sharedflag='-G' ;; 57814f6cd06fSmrg *Sun\ F*) # Sun Fortran 8.3 57824f6cd06fSmrg tmp_sharedflag='-G' ;; 57834f6cd06fSmrg *) 57844f6cd06fSmrg tmp_sharedflag='-shared' ;; 57854f6cd06fSmrg esac 57864f6cd06fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5787c35d236eSmrg 5788c35d236eSmrg if test $supports_anon_versioning = yes; then 5789c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 5790c35d236eSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5791c35d236eSmrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 57924f6cd06fSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5793c35d236eSmrg fi 5794c35d236eSmrg else 5795c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5796c35d236eSmrg fi 5797c35d236eSmrg ;; 5798c35d236eSmrg 5799c35d236eSmrg netbsd*) 5800c35d236eSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5801c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5802c35d236eSmrg wlarc= 5803c35d236eSmrg else 5804c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5805c35d236eSmrg _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' 5806c35d236eSmrg fi 5807c35d236eSmrg ;; 5808c35d236eSmrg 5809c35d236eSmrg solaris*) 5810c35d236eSmrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 5811c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5812c35d236eSmrg cat <<EOF 1>&2 5813c35d236eSmrg 5814c35d236eSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5815c35d236eSmrg*** create shared libraries on Solaris systems. Therefore, libtool 5816c35d236eSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5817c35d236eSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 5818c35d236eSmrg*** your PATH or compiler configuration so that the native linker is 5819c35d236eSmrg*** used, and then restart. 5820c35d236eSmrg 5821c35d236eSmrgEOF 5822c35d236eSmrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5823c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5824c35d236eSmrg _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' 5825c35d236eSmrg else 5826c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5827c35d236eSmrg fi 5828c35d236eSmrg ;; 5829c35d236eSmrg 5830c35d236eSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5831c35d236eSmrg case `$LD -v 2>&1` in 58324f6cd06fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5833c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5834c35d236eSmrg cat <<_LT_EOF 1>&2 5835c35d236eSmrg 5836c35d236eSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5837c35d236eSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5838c35d236eSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5839c35d236eSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5840c35d236eSmrg*** your PATH or compiler configuration so that the native linker is 5841c35d236eSmrg*** used, and then restart. 5842c35d236eSmrg 5843c35d236eSmrg_LT_EOF 5844c35d236eSmrg ;; 5845c35d236eSmrg *) 5846c35d236eSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5847c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 5848c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 5849c35d236eSmrg _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' 5850c35d236eSmrg else 5851c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5852c35d236eSmrg fi 5853c35d236eSmrg ;; 5854c35d236eSmrg esac 5855c35d236eSmrg ;; 5856c35d236eSmrg 5857c35d236eSmrg sunos4*) 5858c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5859c35d236eSmrg wlarc= 5860c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5861c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5862c35d236eSmrg ;; 5863c35d236eSmrg 5864c35d236eSmrg *) 5865c35d236eSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5866c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5867c35d236eSmrg _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' 5868c35d236eSmrg else 5869c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5870c35d236eSmrg fi 5871c35d236eSmrg ;; 5872c35d236eSmrg esac 5873c35d236eSmrg 5874c35d236eSmrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 5875c35d236eSmrg runpath_var= 5876c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5877c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5878c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5879c35d236eSmrg fi 5880c35d236eSmrg else 5881c35d236eSmrg # PORTME fill in a description of your system's linker (not GNU ld) 5882c35d236eSmrg case $host_os in 5883c35d236eSmrg aix3*) 5884c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5885c35d236eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5886c35d236eSmrg _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' 5887c35d236eSmrg # Note: this linker hardcodes the directories in LIBPATH if there 5888c35d236eSmrg # are no directories specified by -L. 5889c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5890c35d236eSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 5891c35d236eSmrg # Neither direct hardcoding nor static linking is supported with a 5892c35d236eSmrg # broken collect2. 5893c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5894c35d236eSmrg fi 5895c35d236eSmrg ;; 5896c35d236eSmrg 58974f6cd06fSmrg aix[[4-9]]*) 5898c35d236eSmrg if test "$host_cpu" = ia64; then 5899c35d236eSmrg # On IA64, the linker does run time linking by default, so we don't 5900c35d236eSmrg # have to do anything special. 5901c35d236eSmrg aix_use_runtimelinking=no 5902c35d236eSmrg exp_sym_flag='-Bexport' 5903c35d236eSmrg no_entry_flag="" 5904c35d236eSmrg else 5905c35d236eSmrg # If we're using GNU nm, then we don't want the "-C" option. 5906c35d236eSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5907c35d236eSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5908c35d236eSmrg _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' 5909c35d236eSmrg else 5910c35d236eSmrg _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' 5911c35d236eSmrg fi 5912c35d236eSmrg aix_use_runtimelinking=no 5913c35d236eSmrg 5914c35d236eSmrg # Test if we are trying to use run time linking or normal 5915c35d236eSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5916c35d236eSmrg # need to do runtime linking. 59174f6cd06fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5918c35d236eSmrg for ld_flag in $LDFLAGS; do 5919c35d236eSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5920c35d236eSmrg aix_use_runtimelinking=yes 5921c35d236eSmrg break 5922c35d236eSmrg fi 5923c35d236eSmrg done 5924c35d236eSmrg ;; 5925c35d236eSmrg esac 5926c35d236eSmrg 5927c35d236eSmrg exp_sym_flag='-bexport' 5928c35d236eSmrg no_entry_flag='-bnoentry' 5929c35d236eSmrg fi 5930c35d236eSmrg 5931c35d236eSmrg # When large executables or shared objects are built, AIX ld can 5932c35d236eSmrg # have problems creating the table of contents. If linking a library 5933c35d236eSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5934c35d236eSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5935c35d236eSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5936c35d236eSmrg 5937c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 5938c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5939c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5940c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5941c35d236eSmrg 5942c35d236eSmrg if test "$GCC" = yes; then 5943c35d236eSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5944c35d236eSmrg # We only want to do this on AIX 4.2 and lower, the check 5945c35d236eSmrg # below for broken collect2 doesn't work under 4.3+ 5946c35d236eSmrg collect2name=`${CC} -print-prog-name=collect2` 5947c35d236eSmrg if test -f "$collect2name" && \ 5948c35d236eSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 5949c35d236eSmrg then 5950c35d236eSmrg # We have reworked collect2 59514f6cd06fSmrg : 5952c35d236eSmrg else 5953c35d236eSmrg # We have old collect2 5954c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5955c35d236eSmrg # It fails to find uninstalled libraries when the uninstalled 5956c35d236eSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5957c35d236eSmrg # to unsupported forces relinking 5958c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5959c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5960c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5961c35d236eSmrg fi 5962c35d236eSmrg ;; 5963c35d236eSmrg esac 5964c35d236eSmrg shared_flag='-shared' 5965c35d236eSmrg if test "$aix_use_runtimelinking" = yes; then 5966c35d236eSmrg shared_flag="$shared_flag "'${wl}-G' 5967c35d236eSmrg fi 5968c35d236eSmrg else 5969c35d236eSmrg # not using gcc 5970c35d236eSmrg if test "$host_cpu" = ia64; then 5971c35d236eSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5972c35d236eSmrg # chokes on -Wl,-G. The following line is correct: 5973c35d236eSmrg shared_flag='-G' 5974c35d236eSmrg else 5975c35d236eSmrg if test "$aix_use_runtimelinking" = yes; then 5976c35d236eSmrg shared_flag='${wl}-G' 5977c35d236eSmrg else 5978c35d236eSmrg shared_flag='${wl}-bM:SRE' 5979c35d236eSmrg fi 5980c35d236eSmrg fi 5981c35d236eSmrg fi 5982c35d236eSmrg 5983c35d236eSmrg # It seems that -bexpall does not export symbols beginning with 5984c35d236eSmrg # underscore (_), so it is better to generate a list of symbols to export. 5985c35d236eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5986c35d236eSmrg if test "$aix_use_runtimelinking" = yes; then 5987c35d236eSmrg # Warning - without using the other runtime loading flags (-brtl), 5988c35d236eSmrg # -berok will link without error, but may produce a broken library. 5989c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5990c35d236eSmrg # Determine the default libpath from the value encoded in an empty executable. 5991c35d236eSmrg _LT_AC_SYS_LIBPATH_AIX 5992c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5993c35d236eSmrg _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" 5994c35d236eSmrg else 5995c35d236eSmrg if test "$host_cpu" = ia64; then 5996c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5997c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5998c35d236eSmrg _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" 5999c35d236eSmrg else 6000c35d236eSmrg # Determine the default libpath from the value encoded in an empty executable. 6001c35d236eSmrg _LT_AC_SYS_LIBPATH_AIX 6002c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6003c35d236eSmrg # Warning - without using the other run time loading flags, 6004c35d236eSmrg # -berok will link without error, but may produce a broken library. 6005c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6006c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6007c35d236eSmrg # Exported symbols can be pulled into shared objects from archives 6008c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6009c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6010c35d236eSmrg # This is similar to how AIX traditionally builds its shared libraries. 6011c35d236eSmrg _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' 6012c35d236eSmrg fi 6013c35d236eSmrg fi 6014c35d236eSmrg ;; 6015c35d236eSmrg 6016c35d236eSmrg amigaos*) 6017c35d236eSmrg _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)' 6018c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6019c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6020c35d236eSmrg # see comment about different semantics on the GNU ld section 6021c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6022c35d236eSmrg ;; 6023c35d236eSmrg 6024c35d236eSmrg bsdi[[45]]*) 6025c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6026c35d236eSmrg ;; 6027c35d236eSmrg 6028c35d236eSmrg cygwin* | mingw* | pw32*) 6029c35d236eSmrg # When not using gcc, we currently assume that we are using 6030c35d236eSmrg # Microsoft Visual C++. 6031c35d236eSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6032c35d236eSmrg # no search path for DLLs. 6033c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6034c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6035c35d236eSmrg # Tell ltmain to make .lib files, not .a files. 6036c35d236eSmrg libext=lib 6037c35d236eSmrg # Tell ltmain to make .dll files, not .so files. 6038c35d236eSmrg shrext_cmds=".dll" 6039c35d236eSmrg # FIXME: Setting linknames here is a bad hack. 6040c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 6041c35d236eSmrg # The linker will automatically build a .lib file if we build a DLL. 6042c35d236eSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 6043c35d236eSmrg # FIXME: Should let the user specify the lib program. 60444f6cd06fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6045c35d236eSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 6046c35d236eSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6047c35d236eSmrg ;; 6048c35d236eSmrg 6049c35d236eSmrg darwin* | rhapsody*) 6050c35d236eSmrg case $host_os in 6051c35d236eSmrg rhapsody* | darwin1.[[012]]) 6052c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 6053c35d236eSmrg ;; 6054c35d236eSmrg *) # Darwin 1.3 on 6055c35d236eSmrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 6056c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6057c35d236eSmrg else 6058c35d236eSmrg case ${MACOSX_DEPLOYMENT_TARGET} in 6059c35d236eSmrg 10.[[012]]) 6060c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6061c35d236eSmrg ;; 6062c35d236eSmrg 10.*) 6063c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 6064c35d236eSmrg ;; 6065c35d236eSmrg esac 6066c35d236eSmrg fi 6067c35d236eSmrg ;; 6068c35d236eSmrg esac 6069c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6070c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6071c35d236eSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 6072c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6073c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 6074c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6075c35d236eSmrg if test "$GCC" = yes ; then 6076c35d236eSmrg output_verbose_link_cmd='echo' 60774f6cd06fSmrg _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}" 60784f6cd06fSmrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 60794f6cd06fSmrg _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}" 60804f6cd06fSmrg _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}" 6081c35d236eSmrg else 6082c35d236eSmrg case $cc_basename in 6083c35d236eSmrg xlc*) 6084c35d236eSmrg output_verbose_link_cmd='echo' 60854f6cd06fSmrg _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' 6086c35d236eSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 6087c35d236eSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 60884f6cd06fSmrg _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}' 6089c35d236eSmrg _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}' 6090c35d236eSmrg ;; 6091c35d236eSmrg *) 6092c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6093c35d236eSmrg ;; 6094c35d236eSmrg esac 6095c35d236eSmrg fi 6096c35d236eSmrg ;; 6097c35d236eSmrg 6098c35d236eSmrg dgux*) 6099c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6100c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6101c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6102c35d236eSmrg ;; 6103c35d236eSmrg 6104c35d236eSmrg freebsd1*) 6105c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6106c35d236eSmrg ;; 6107c35d236eSmrg 6108c35d236eSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6109c35d236eSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 6110c35d236eSmrg # does not break anything, and helps significantly (at the cost of a little 6111c35d236eSmrg # extra space). 6112c35d236eSmrg freebsd2.2*) 6113c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6114c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6115c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6116c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6117c35d236eSmrg ;; 6118c35d236eSmrg 6119c35d236eSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6120c35d236eSmrg freebsd2*) 6121c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6122c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6123c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6124c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6125c35d236eSmrg ;; 6126c35d236eSmrg 6127c35d236eSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 61284f6cd06fSmrg freebsd* | dragonfly*) 6129c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 6130c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6131c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6132c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6133c35d236eSmrg ;; 6134c35d236eSmrg 6135c35d236eSmrg hpux9*) 6136c35d236eSmrg if test "$GCC" = yes; then 6137c35d236eSmrg _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' 6138c35d236eSmrg else 6139c35d236eSmrg _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' 6140c35d236eSmrg fi 6141c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6142c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6143c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6144c35d236eSmrg 6145c35d236eSmrg # hardcode_minus_L: Not really in the search PATH, 6146c35d236eSmrg # but as the default location of the library. 6147c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6148c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6149c35d236eSmrg ;; 6150c35d236eSmrg 6151c35d236eSmrg hpux10*) 6152c35d236eSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6153c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6154c35d236eSmrg else 6155c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6156c35d236eSmrg fi 6157c35d236eSmrg if test "$with_gnu_ld" = no; then 6158c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6159c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6160c35d236eSmrg 6161c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6162c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6163c35d236eSmrg 6164c35d236eSmrg # hardcode_minus_L: Not really in the search PATH, 6165c35d236eSmrg # but as the default location of the library. 6166c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6167c35d236eSmrg fi 6168c35d236eSmrg ;; 6169c35d236eSmrg 6170c35d236eSmrg hpux11*) 6171c35d236eSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6172c35d236eSmrg case $host_cpu in 6173c35d236eSmrg hppa*64*) 6174c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6175c35d236eSmrg ;; 6176c35d236eSmrg ia64*) 6177c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6178c35d236eSmrg ;; 6179c35d236eSmrg *) 6180c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6181c35d236eSmrg ;; 6182c35d236eSmrg esac 6183c35d236eSmrg else 6184c35d236eSmrg case $host_cpu in 6185c35d236eSmrg hppa*64*) 6186c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6187c35d236eSmrg ;; 6188c35d236eSmrg ia64*) 6189c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6190c35d236eSmrg ;; 6191c35d236eSmrg *) 6192c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6193c35d236eSmrg ;; 6194c35d236eSmrg esac 6195c35d236eSmrg fi 6196c35d236eSmrg if test "$with_gnu_ld" = no; then 6197c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6198c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6199c35d236eSmrg 6200c35d236eSmrg case $host_cpu in 6201c35d236eSmrg hppa*64*|ia64*) 6202c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 6203c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6204c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6205c35d236eSmrg ;; 6206c35d236eSmrg *) 6207c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6208c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6209c35d236eSmrg 6210c35d236eSmrg # hardcode_minus_L: Not really in the search PATH, 6211c35d236eSmrg # but as the default location of the library. 6212c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6213c35d236eSmrg ;; 6214c35d236eSmrg esac 6215c35d236eSmrg fi 6216c35d236eSmrg ;; 6217c35d236eSmrg 6218c35d236eSmrg irix5* | irix6* | nonstopux*) 6219c35d236eSmrg if test "$GCC" = yes; then 6220c35d236eSmrg _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' 6221c35d236eSmrg else 6222c35d236eSmrg _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' 6223c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6224c35d236eSmrg fi 6225c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6226c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6227c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6228c35d236eSmrg ;; 6229c35d236eSmrg 6230c35d236eSmrg netbsd*) 6231c35d236eSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6232c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6233c35d236eSmrg else 6234c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6235c35d236eSmrg fi 6236c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6237c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6238c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6239c35d236eSmrg ;; 6240c35d236eSmrg 6241c35d236eSmrg newsos6) 6242c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6243c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6244c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6245c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6246c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6247c35d236eSmrg ;; 6248c35d236eSmrg 6249c35d236eSmrg openbsd*) 62504f6cd06fSmrg if test -f /usr/libexec/ld.so; then 62514f6cd06fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62524f6cd06fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62534f6cd06fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 62544f6cd06fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 62554f6cd06fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 62564f6cd06fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 62574f6cd06fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62584f6cd06fSmrg else 62594f6cd06fSmrg case $host_os in 62604f6cd06fSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 62614f6cd06fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 62624f6cd06fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62634f6cd06fSmrg ;; 62644f6cd06fSmrg *) 62654f6cd06fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 62664f6cd06fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 62674f6cd06fSmrg ;; 62684f6cd06fSmrg esac 62694f6cd06fSmrg fi 6270c35d236eSmrg else 62714f6cd06fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6272c35d236eSmrg fi 6273c35d236eSmrg ;; 6274c35d236eSmrg 6275c35d236eSmrg os2*) 6276c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6277c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6278c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6279c35d236eSmrg _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' 6280c35d236eSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6281c35d236eSmrg ;; 6282c35d236eSmrg 6283c35d236eSmrg osf3*) 6284c35d236eSmrg if test "$GCC" = yes; then 6285c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6286c35d236eSmrg _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' 6287c35d236eSmrg else 6288c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6289c35d236eSmrg _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' 6290c35d236eSmrg fi 6291c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6292c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6293c35d236eSmrg ;; 6294c35d236eSmrg 6295c35d236eSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 6296c35d236eSmrg if test "$GCC" = yes; then 6297c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6298c35d236eSmrg _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' 6299c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6300c35d236eSmrg else 6301c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6302c35d236eSmrg _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' 6303c35d236eSmrg _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~ 6304c35d236eSmrg $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 6306c35d236eSmrg # Both c and cxx compiler support -rpath directly 6307c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6308c35d236eSmrg fi 6309c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6310c35d236eSmrg ;; 6311c35d236eSmrg 6312c35d236eSmrg solaris*) 6313c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6314c35d236eSmrg if test "$GCC" = yes; then 6315c35d236eSmrg wlarc='${wl}' 6316c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6317c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6318c35d236eSmrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 6319c35d236eSmrg else 6320c35d236eSmrg wlarc='' 6321c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6322c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6323c35d236eSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6324c35d236eSmrg fi 6325c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6326c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6327c35d236eSmrg case $host_os in 6328c35d236eSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6329c35d236eSmrg *) 63304f6cd06fSmrg # The compiler driver will combine and reorder linker options, 63314f6cd06fSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 63324f6cd06fSmrg # but is careful enough not to reorder. 6333c35d236eSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 63344f6cd06fSmrg if test "$GCC" = yes; then 63354f6cd06fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 63364f6cd06fSmrg else 63374f6cd06fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 63384f6cd06fSmrg fi 63394f6cd06fSmrg ;; 6340c35d236eSmrg esac 6341c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6342c35d236eSmrg ;; 6343c35d236eSmrg 6344c35d236eSmrg sunos4*) 6345c35d236eSmrg if test "x$host_vendor" = xsequent; then 6346c35d236eSmrg # Use $CC to link under sequent, because it throws in some extra .o 6347c35d236eSmrg # files that make .init and .fini sections work. 6348c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6349c35d236eSmrg else 6350c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6351c35d236eSmrg fi 6352c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6353c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6354c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6355c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6356c35d236eSmrg ;; 6357c35d236eSmrg 6358c35d236eSmrg sysv4) 6359c35d236eSmrg case $host_vendor in 6360c35d236eSmrg sni) 6361c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6362c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6363c35d236eSmrg ;; 6364c35d236eSmrg siemens) 6365c35d236eSmrg ## LD is ld it makes a PLAMLIB 6366c35d236eSmrg ## CC just makes a GrossModule. 6367c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6368c35d236eSmrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6369c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6370c35d236eSmrg ;; 6371c35d236eSmrg motorola) 6372c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6373c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6374c35d236eSmrg ;; 6375c35d236eSmrg esac 6376c35d236eSmrg runpath_var='LD_RUN_PATH' 6377c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6378c35d236eSmrg ;; 6379c35d236eSmrg 6380c35d236eSmrg sysv4.3*) 6381c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6382c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6383c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6384c35d236eSmrg ;; 6385c35d236eSmrg 6386c35d236eSmrg sysv4*MP*) 6387c35d236eSmrg if test -d /usr/nec; then 6388c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6389c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6390c35d236eSmrg runpath_var=LD_RUN_PATH 6391c35d236eSmrg hardcode_runpath_var=yes 6392c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6393c35d236eSmrg fi 6394c35d236eSmrg ;; 6395c35d236eSmrg 63964f6cd06fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6397c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6398c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6399c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6400c35d236eSmrg runpath_var='LD_RUN_PATH' 6401c35d236eSmrg 6402c35d236eSmrg if test "$GCC" = yes; then 6403c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6404c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6405c35d236eSmrg else 6406c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6407c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6408c35d236eSmrg fi 6409c35d236eSmrg ;; 6410c35d236eSmrg 6411c35d236eSmrg sysv5* | sco3.2v5* | sco5v6*) 6412c35d236eSmrg # Note: We can NOT use -z defs as we might desire, because we do not 6413c35d236eSmrg # link with -lc, and that would cause any symbols used from libc to 6414c35d236eSmrg # always be unresolved, which means just about no library would 6415c35d236eSmrg # ever link correctly. If we're not using GNU ld we use -z text 6416c35d236eSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6417c35d236eSmrg # as -z defs. 6418c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6419c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6420c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6421c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6422c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 6423c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 6424c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6425c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6426c35d236eSmrg runpath_var='LD_RUN_PATH' 6427c35d236eSmrg 6428c35d236eSmrg if test "$GCC" = yes; then 6429c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6430c35d236eSmrg _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' 6431c35d236eSmrg else 6432c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6433c35d236eSmrg _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' 6434c35d236eSmrg fi 6435c35d236eSmrg ;; 6436c35d236eSmrg 6437c35d236eSmrg uts4*) 6438c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6439c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6440c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6441c35d236eSmrg ;; 6442c35d236eSmrg 6443c35d236eSmrg *) 6444c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6445c35d236eSmrg ;; 6446c35d236eSmrg esac 6447c35d236eSmrg fi 6448c35d236eSmrg]) 6449c35d236eSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 6450c35d236eSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6451c35d236eSmrg 6452c35d236eSmrg# 6453c35d236eSmrg# Do we need to explicitly link libc? 6454c35d236eSmrg# 6455c35d236eSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6456c35d236eSmrgx|xyes) 6457c35d236eSmrg # Assume -lc should be added 6458c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6459c35d236eSmrg 6460c35d236eSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 6461c35d236eSmrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 6462c35d236eSmrg *'~'*) 6463c35d236eSmrg # FIXME: we may have to deal with multi-command sequences. 6464c35d236eSmrg ;; 6465c35d236eSmrg '$CC '*) 6466c35d236eSmrg # Test whether the compiler implicitly links with -lc since on some 6467c35d236eSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6468c35d236eSmrg # to ld, don't add -lc before -lgcc. 6469c35d236eSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6470c35d236eSmrg $rm conftest* 64714f6cd06fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6472c35d236eSmrg 6473c35d236eSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6474c35d236eSmrg soname=conftest 6475c35d236eSmrg lib=conftest 6476c35d236eSmrg libobjs=conftest.$ac_objext 6477c35d236eSmrg deplibs= 6478c35d236eSmrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6479c35d236eSmrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 6480c35d236eSmrg compiler_flags=-v 6481c35d236eSmrg linker_flags=-v 6482c35d236eSmrg verstring= 6483c35d236eSmrg output_objdir=. 6484c35d236eSmrg libname=conftest 6485c35d236eSmrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 6486c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6487c35d236eSmrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 6488c35d236eSmrg then 6489c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6490c35d236eSmrg else 6491c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6492c35d236eSmrg fi 6493c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6494c35d236eSmrg else 6495c35d236eSmrg cat conftest.err 1>&5 6496c35d236eSmrg fi 6497c35d236eSmrg $rm conftest* 6498c35d236eSmrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 6499c35d236eSmrg ;; 6500c35d236eSmrg esac 6501c35d236eSmrg fi 6502c35d236eSmrg ;; 6503c35d236eSmrgesac 6504c35d236eSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS 6505c35d236eSmrg 6506c35d236eSmrg 6507c35d236eSmrg# _LT_AC_FILE_LTDLL_C 6508c35d236eSmrg# ------------------- 6509c35d236eSmrg# Be careful that the start marker always follows a newline. 6510c35d236eSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 6511c35d236eSmrg# /* ltdll.c starts here */ 6512c35d236eSmrg# #define WIN32_LEAN_AND_MEAN 6513c35d236eSmrg# #include <windows.h> 6514c35d236eSmrg# #undef WIN32_LEAN_AND_MEAN 6515c35d236eSmrg# #include <stdio.h> 6516c35d236eSmrg# 6517c35d236eSmrg# #ifndef __CYGWIN__ 6518c35d236eSmrg# # ifdef __CYGWIN32__ 6519c35d236eSmrg# # define __CYGWIN__ __CYGWIN32__ 6520c35d236eSmrg# # endif 6521c35d236eSmrg# #endif 6522c35d236eSmrg# 6523c35d236eSmrg# #ifdef __cplusplus 6524c35d236eSmrg# extern "C" { 6525c35d236eSmrg# #endif 6526c35d236eSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 6527c35d236eSmrg# #ifdef __cplusplus 6528c35d236eSmrg# } 6529c35d236eSmrg# #endif 6530c35d236eSmrg# 6531c35d236eSmrg# #ifdef __CYGWIN__ 6532c35d236eSmrg# #include <cygwin/cygwin_dll.h> 6533c35d236eSmrg# DECLARE_CYGWIN_DLL( DllMain ); 6534c35d236eSmrg# #endif 6535c35d236eSmrg# HINSTANCE __hDllInstance_base; 6536c35d236eSmrg# 6537c35d236eSmrg# BOOL APIENTRY 6538c35d236eSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 6539c35d236eSmrg# { 6540c35d236eSmrg# __hDllInstance_base = hInst; 6541c35d236eSmrg# return TRUE; 6542c35d236eSmrg# } 6543c35d236eSmrg# /* ltdll.c ends here */ 6544c35d236eSmrg])# _LT_AC_FILE_LTDLL_C 6545c35d236eSmrg 6546c35d236eSmrg 6547c35d236eSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 6548c35d236eSmrg# --------------------------------- 6549c35d236eSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 6550c35d236eSmrg 6551c35d236eSmrg 6552c35d236eSmrg# old names 6553c35d236eSmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 6554c35d236eSmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 6555c35d236eSmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 6556c35d236eSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 6557c35d236eSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 6558c35d236eSmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 6559c35d236eSmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 6560c35d236eSmrg 6561c35d236eSmrg# This is just to silence aclocal about the macro not being used 6562c35d236eSmrgifelse([AC_DISABLE_FAST_INSTALL]) 6563c35d236eSmrg 6564c35d236eSmrgAC_DEFUN([LT_AC_PROG_GCJ], 6565c35d236eSmrg[AC_CHECK_TOOL(GCJ, gcj, no) 6566c35d236eSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6567c35d236eSmrg AC_SUBST(GCJFLAGS) 6568c35d236eSmrg]) 6569c35d236eSmrg 6570c35d236eSmrgAC_DEFUN([LT_AC_PROG_RC], 6571c35d236eSmrg[AC_CHECK_TOOL(RC, windres, no) 6572c35d236eSmrg]) 6573c35d236eSmrg 65744f6cd06fSmrg 65754f6cd06fSmrg# Cheap backport of AS_EXECUTABLE_P and required macros 65764f6cd06fSmrg# from Autoconf 2.59; we should not use $as_executable_p directly. 65774f6cd06fSmrg 65784f6cd06fSmrg# _AS_TEST_PREPARE 65794f6cd06fSmrg# ---------------- 65804f6cd06fSmrgm4_ifndef([_AS_TEST_PREPARE], 65814f6cd06fSmrg[m4_defun([_AS_TEST_PREPARE], 65824f6cd06fSmrg[if test -x / >/dev/null 2>&1; then 65834f6cd06fSmrg as_executable_p='test -x' 65844f6cd06fSmrgelse 65854f6cd06fSmrg as_executable_p='test -f' 65864f6cd06fSmrgfi 65874f6cd06fSmrg])])# _AS_TEST_PREPARE 65884f6cd06fSmrg 65894f6cd06fSmrg# AS_EXECUTABLE_P 65904f6cd06fSmrg# --------------- 65914f6cd06fSmrg# Check whether a file is executable. 65924f6cd06fSmrgm4_ifndef([AS_EXECUTABLE_P], 65934f6cd06fSmrg[m4_defun([AS_EXECUTABLE_P], 65944f6cd06fSmrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl 65954f6cd06fSmrg$as_executable_p $1[]dnl 65964f6cd06fSmrg])])# AS_EXECUTABLE_P 65974f6cd06fSmrg 6598c35d236eSmrg# NOTE: This macro has been submitted for inclusion into # 6599c35d236eSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 6600c35d236eSmrg# a released version of Autoconf we should remove this # 6601c35d236eSmrg# macro and use it instead. # 6602c35d236eSmrg# LT_AC_PROG_SED 6603c35d236eSmrg# -------------- 6604c35d236eSmrg# Check for a fully-functional sed program, that truncates 6605c35d236eSmrg# as few characters as possible. Prefer GNU sed if found. 6606c35d236eSmrgAC_DEFUN([LT_AC_PROG_SED], 6607c35d236eSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 6608c35d236eSmrgAC_CACHE_VAL(lt_cv_path_SED, 6609c35d236eSmrg[# Loop through the user's path and test for sed and gsed. 6610c35d236eSmrg# Then use that list of sed's as ones to test for truncation. 6611c35d236eSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6612c35d236eSmrgfor as_dir in $PATH 6613c35d236eSmrgdo 6614c35d236eSmrg IFS=$as_save_IFS 6615c35d236eSmrg test -z "$as_dir" && as_dir=. 6616c35d236eSmrg for lt_ac_prog in sed gsed; do 6617c35d236eSmrg for ac_exec_ext in '' $ac_executable_extensions; do 66184f6cd06fSmrg if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 6619c35d236eSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 6620c35d236eSmrg fi 6621c35d236eSmrg done 6622c35d236eSmrg done 6623c35d236eSmrgdone 66244f6cd06fSmrgIFS=$as_save_IFS 6625c35d236eSmrglt_ac_max=0 6626c35d236eSmrglt_ac_count=0 6627c35d236eSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 6628c35d236eSmrg# along with /bin/sed that truncates output. 6629c35d236eSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 6630c35d236eSmrg test ! -f $lt_ac_sed && continue 6631c35d236eSmrg cat /dev/null > conftest.in 6632c35d236eSmrg lt_ac_count=0 6633c35d236eSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 6634c35d236eSmrg # Check for GNU sed and select it if it is found. 6635c35d236eSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 6636c35d236eSmrg lt_cv_path_SED=$lt_ac_sed 6637c35d236eSmrg break 6638c35d236eSmrg fi 6639c35d236eSmrg while true; do 6640c35d236eSmrg cat conftest.in conftest.in >conftest.tmp 6641c35d236eSmrg mv conftest.tmp conftest.in 6642c35d236eSmrg cp conftest.in conftest.nl 6643c35d236eSmrg echo >>conftest.nl 6644c35d236eSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 6645c35d236eSmrg cmp -s conftest.out conftest.nl || break 6646c35d236eSmrg # 10000 chars as input seems more than enough 6647c35d236eSmrg test $lt_ac_count -gt 10 && break 6648c35d236eSmrg lt_ac_count=`expr $lt_ac_count + 1` 6649c35d236eSmrg if test $lt_ac_count -gt $lt_ac_max; then 6650c35d236eSmrg lt_ac_max=$lt_ac_count 6651c35d236eSmrg lt_cv_path_SED=$lt_ac_sed 6652c35d236eSmrg fi 6653c35d236eSmrg done 6654c35d236eSmrgdone 6655c35d236eSmrg]) 6656c35d236eSmrgSED=$lt_cv_path_SED 66574f6cd06fSmrgAC_SUBST([SED]) 6658c35d236eSmrgAC_MSG_RESULT([$SED]) 6659c35d236eSmrg]) 6660c35d236eSmrg 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 6817c35d236eSmrgdnl 68184f6cd06fSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 6819c35d236eSmrgdnl 68204f6cd06fSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 68214f6cd06fSmrgdnl copy of this software and associated documentation files (the 68224f6cd06fSmrgdnl "Software"), to deal in the Software without restriction, including 68234f6cd06fSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 68244f6cd06fSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 68254f6cd06fSmrgdnl to whom the Software is furnished to do so, provided that the above 68264f6cd06fSmrgdnl copyright notice(s) and this permission notice appear in all copies of 68274f6cd06fSmrgdnl the Software and that both the above copyright notice(s) and this 68284f6cd06fSmrgdnl permission notice appear in supporting documentation. 68294f6cd06fSmrgdnl 6830c35d236eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 6831c35d236eSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 68324f6cd06fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 68334f6cd06fSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 68344f6cd06fSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 68354f6cd06fSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 68364f6cd06fSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 68374f6cd06fSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 68384f6cd06fSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 68394f6cd06fSmrgdnl 68404f6cd06fSmrgdnl Except as contained in this notice, the name of a copyright holder 68414f6cd06fSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 68424f6cd06fSmrgdnl or other dealings in this Software without prior written authorization 68434f6cd06fSmrgdnl of the copyright holder. 68444f6cd06fSmrg 68454f6cd06fSmrg# XORG_MACROS_VERSION(required-version) 68464f6cd06fSmrg# ------------------------------------- 68474f6cd06fSmrg# Minimum version: 1.1.0 68484f6cd06fSmrg# 68494f6cd06fSmrg# If you're using a macro added in Version 1.1 or newer, include this in 68504f6cd06fSmrg# your configure.ac with the minimum required version, such as: 68514f6cd06fSmrg# XORG_MACROS_VERSION(1.1) 68524f6cd06fSmrg# 68534f6cd06fSmrg# To force at least a version with this macro defined, also add: 68544f6cd06fSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 68554f6cd06fSmrg# 68564f6cd06fSmrg# 68574f6cd06fSmrg# See the "minimum version" comment for each macro you use to see what 68584f6cd06fSmrg# version you require. 68594f6cd06fSmrgAC_DEFUN([XORG_MACROS_VERSION],[ 68604f6cd06fSmrg [XORG_MACROS_needed_version=$1 68614f6cd06fSmrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 68624f6cd06fSmrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 68634f6cd06fSmrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 68644f6cd06fSmrg [XORG_MACROS_version=1.1.6 68654f6cd06fSmrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 68664f6cd06fSmrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 68674f6cd06fSmrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 68684f6cd06fSmrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 68694f6cd06fSmrg fi 68704f6cd06fSmrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 68714f6cd06fSmrg 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]) 68724f6cd06fSmrg fi 68734f6cd06fSmrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 68744f6cd06fSmrg]) # XORG_MACROS_VERSION 6875c35d236eSmrg 6876c35d236eSmrg# XORG_PROG_RAWCPP() 6877c35d236eSmrg# ------------------ 68784f6cd06fSmrg# Minimum version: 1.0.0 68794f6cd06fSmrg# 6880c35d236eSmrg# Find cpp program and necessary flags for use in pre-processing text files 6881c35d236eSmrg# such as man pages and config files 6882c35d236eSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 6883c35d236eSmrgAC_REQUIRE([AC_PROG_CPP]) 6884c35d236eSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 6885c35d236eSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 6886c35d236eSmrg 6887c35d236eSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 6888c35d236eSmrg# which is not the best choice for supporting other OS'es, but covers most 6889c35d236eSmrg# of the ones we need for now. 6890c35d236eSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 6891c35d236eSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 6892c35d236eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 6893c35d236eSmrg AC_MSG_RESULT([no]) 6894c35d236eSmrgelse 6895c35d236eSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 6896c35d236eSmrg RAWCPPFLAGS=-undef 6897c35d236eSmrg AC_MSG_RESULT([yes]) 6898c35d236eSmrg else 6899c35d236eSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 6900c35d236eSmrg fi 6901c35d236eSmrgfi 6902c35d236eSmrgrm -f conftest.$ac_ext 6903c35d236eSmrg 6904c35d236eSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 6905c35d236eSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 6906c35d236eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 6907c35d236eSmrg AC_MSG_RESULT([no]) 6908c35d236eSmrgelse 6909c35d236eSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 6910c35d236eSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 6911c35d236eSmrg AC_MSG_RESULT([yes]) 6912c35d236eSmrg else 6913c35d236eSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 6914c35d236eSmrg fi 6915c35d236eSmrgfi 6916c35d236eSmrgrm -f conftest.$ac_ext 6917c35d236eSmrgAC_SUBST(RAWCPPFLAGS) 6918c35d236eSmrg]) # XORG_PROG_RAWCPP 6919c35d236eSmrg 6920c35d236eSmrg# XORG_MANPAGE_SECTIONS() 6921c35d236eSmrg# ----------------------- 69224f6cd06fSmrg# Minimum version: 1.0.0 69234f6cd06fSmrg# 6924c35d236eSmrg# Determine which sections man pages go in for the different man page types 6925c35d236eSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 6926c35d236eSmrg# Not sure if there's any better way than just hardcoding by OS name. 6927c35d236eSmrg# Override default settings by setting environment variables 6928c35d236eSmrg 6929c35d236eSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 6930c35d236eSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 6931c35d236eSmrg 6932c35d236eSmrgif test x$APP_MAN_SUFFIX = x ; then 69334f6cd06fSmrg APP_MAN_SUFFIX=1 6934c35d236eSmrgfi 6935c35d236eSmrgif test x$APP_MAN_DIR = x ; then 69364f6cd06fSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 6937c35d236eSmrgfi 6938c35d236eSmrg 6939c35d236eSmrgif test x$LIB_MAN_SUFFIX = x ; then 69404f6cd06fSmrg LIB_MAN_SUFFIX=3 6941c35d236eSmrgfi 6942c35d236eSmrgif test x$LIB_MAN_DIR = x ; then 69434f6cd06fSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 6944c35d236eSmrgfi 6945c35d236eSmrg 6946c35d236eSmrgif test x$FILE_MAN_SUFFIX = x ; then 6947c35d236eSmrg case $host_os in 6948c35d236eSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 6949c35d236eSmrg *) FILE_MAN_SUFFIX=5 ;; 6950c35d236eSmrg esac 6951c35d236eSmrgfi 6952c35d236eSmrgif test x$FILE_MAN_DIR = x ; then 69534f6cd06fSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 6954c35d236eSmrgfi 6955c35d236eSmrg 6956c35d236eSmrgif test x$MISC_MAN_SUFFIX = x ; then 6957c35d236eSmrg case $host_os in 6958c35d236eSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 6959c35d236eSmrg *) MISC_MAN_SUFFIX=7 ;; 6960c35d236eSmrg esac 6961c35d236eSmrgfi 6962c35d236eSmrgif test x$MISC_MAN_DIR = x ; then 69634f6cd06fSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 6964c35d236eSmrgfi 6965c35d236eSmrg 6966c35d236eSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 6967c35d236eSmrg case $host_os in 6968c35d236eSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 6969c35d236eSmrg *) DRIVER_MAN_SUFFIX=4 ;; 6970c35d236eSmrg esac 6971c35d236eSmrgfi 6972c35d236eSmrgif test x$DRIVER_MAN_DIR = x ; then 69734f6cd06fSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 6974c35d236eSmrgfi 6975c35d236eSmrg 6976c35d236eSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 6977c35d236eSmrg case $host_os in 6978c35d236eSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 6979c35d236eSmrg *) ADMIN_MAN_SUFFIX=8 ;; 6980c35d236eSmrg esac 6981c35d236eSmrgfi 6982c35d236eSmrgif test x$ADMIN_MAN_DIR = x ; then 6983c35d236eSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 6984c35d236eSmrgfi 6985c35d236eSmrg 6986c35d236eSmrg 6987c35d236eSmrgAC_SUBST([APP_MAN_SUFFIX]) 6988c35d236eSmrgAC_SUBST([LIB_MAN_SUFFIX]) 6989c35d236eSmrgAC_SUBST([FILE_MAN_SUFFIX]) 6990c35d236eSmrgAC_SUBST([MISC_MAN_SUFFIX]) 6991c35d236eSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 6992c35d236eSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 6993c35d236eSmrgAC_SUBST([APP_MAN_DIR]) 6994c35d236eSmrgAC_SUBST([LIB_MAN_DIR]) 6995c35d236eSmrgAC_SUBST([FILE_MAN_DIR]) 6996c35d236eSmrgAC_SUBST([MISC_MAN_DIR]) 6997c35d236eSmrgAC_SUBST([DRIVER_MAN_DIR]) 6998c35d236eSmrgAC_SUBST([ADMIN_MAN_DIR]) 6999c35d236eSmrg]) # XORG_MANPAGE_SECTIONS 7000c35d236eSmrg 7001c35d236eSmrg# XORG_CHECK_LINUXDOC 7002c35d236eSmrg# ------------------- 70034f6cd06fSmrg# Minimum version: 1.0.0 70044f6cd06fSmrg# 7005c35d236eSmrg# Defines the variable MAKE_TEXT if the necessary tools and 7006c35d236eSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 7007c35d236eSmrg# Whether or not the necessary tools and files are found can be checked 7008c35d236eSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 7009c35d236eSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 70104f6cd06fSmrgXORG_SGML_PATH=$prefix/share/sgml 70114f6cd06fSmrgHAVE_DEFS_ENT= 70124f6cd06fSmrg 70134f6cd06fSmrgif test x"$cross_compiling" = x"yes" ; then 70144f6cd06fSmrg HAVE_DEFS_ENT=no 70154f6cd06fSmrgelse 70164f6cd06fSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 70174f6cd06fSmrgfi 7018c35d236eSmrg 7019c35d236eSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 7020c35d236eSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 7021c35d236eSmrg 7022c35d236eSmrgAC_MSG_CHECKING([Whether to build documentation]) 7023c35d236eSmrg 70244f6cd06fSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 7025c35d236eSmrg BUILDDOC=yes 7026c35d236eSmrgelse 7027c35d236eSmrg BUILDDOC=no 7028c35d236eSmrgfi 7029c35d236eSmrg 7030c35d236eSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 7031c35d236eSmrg 7032c35d236eSmrgAC_MSG_RESULT([$BUILDDOC]) 7033c35d236eSmrg 7034c35d236eSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 7035c35d236eSmrg 70364f6cd06fSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 7037c35d236eSmrg BUILDPDFDOC=yes 7038c35d236eSmrgelse 7039c35d236eSmrg BUILDPDFDOC=no 7040c35d236eSmrgfi 7041c35d236eSmrg 7042c35d236eSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 7043c35d236eSmrg 7044c35d236eSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 7045c35d236eSmrg 70464f6cd06fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 70474f6cd06fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 7048c35d236eSmrgMAKE_PDF="$PS2PDF" 70494f6cd06fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 7050c35d236eSmrg 7051c35d236eSmrgAC_SUBST(MAKE_TEXT) 7052c35d236eSmrgAC_SUBST(MAKE_PS) 7053c35d236eSmrgAC_SUBST(MAKE_PDF) 7054c35d236eSmrgAC_SUBST(MAKE_HTML) 7055c35d236eSmrg]) # XORG_CHECK_LINUXDOC 7056c35d236eSmrg 70574f6cd06fSmrg# XORG_CHECK_DOCBOOK 70584f6cd06fSmrg# ------------------- 70594f6cd06fSmrg# Minimum version: 1.0.0 70604f6cd06fSmrg# 70614f6cd06fSmrg# Checks for the ability to build output formats from SGML DocBook source. 70624f6cd06fSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 70634f6cd06fSmrg# indicates whether the necessary tools and files are found and, if set, 70644f6cd06fSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 70654f6cd06fSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 70664f6cd06fSmrgXORG_SGML_PATH=$prefix/share/sgml 70674f6cd06fSmrgHAVE_DEFS_ENT= 70684f6cd06fSmrgBUILDTXTDOC=no 70694f6cd06fSmrgBUILDPDFDOC=no 70704f6cd06fSmrgBUILDPSDOC=no 70714f6cd06fSmrgBUILDHTMLDOC=no 70724f6cd06fSmrg 70734f6cd06fSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 70744f6cd06fSmrg 70754f6cd06fSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 70764f6cd06fSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 70774f6cd06fSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 70784f6cd06fSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 70794f6cd06fSmrg 70804f6cd06fSmrgAC_MSG_CHECKING([Whether to build text documentation]) 70814f6cd06fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 70824f6cd06fSmrg test x$BUILD_TXTDOC != xno; then 70834f6cd06fSmrg BUILDTXTDOC=yes 70844f6cd06fSmrgfi 70854f6cd06fSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 70864f6cd06fSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 70874f6cd06fSmrg 70884f6cd06fSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 70894f6cd06fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 70904f6cd06fSmrg test x$BUILD_PDFDOC != xno; then 70914f6cd06fSmrg BUILDPDFDOC=yes 70924f6cd06fSmrgfi 70934f6cd06fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 70944f6cd06fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 70954f6cd06fSmrg 70964f6cd06fSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 70974f6cd06fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 70984f6cd06fSmrg test x$BUILD_PSDOC != xno; then 70994f6cd06fSmrg BUILDPSDOC=yes 71004f6cd06fSmrgfi 71014f6cd06fSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 71024f6cd06fSmrgAC_MSG_RESULT([$BUILDPSDOC]) 71034f6cd06fSmrg 71044f6cd06fSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 71054f6cd06fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 71064f6cd06fSmrg test x$BUILD_HTMLDOC != xno; then 71074f6cd06fSmrg BUILDHTMLDOC=yes 71084f6cd06fSmrgfi 71094f6cd06fSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 71104f6cd06fSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 71114f6cd06fSmrg 71124f6cd06fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 71134f6cd06fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 71144f6cd06fSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 71154f6cd06fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 71164f6cd06fSmrg 71174f6cd06fSmrgAC_SUBST(MAKE_TEXT) 71184f6cd06fSmrgAC_SUBST(MAKE_PS) 71194f6cd06fSmrgAC_SUBST(MAKE_PDF) 71204f6cd06fSmrgAC_SUBST(MAKE_HTML) 71214f6cd06fSmrg]) # XORG_CHECK_DOCBOOK 71224f6cd06fSmrg 7123c35d236eSmrg# XORG_CHECK_MALLOC_ZERO 7124c35d236eSmrg# ---------------------- 71254f6cd06fSmrg# Minimum version: 1.0.0 71264f6cd06fSmrg# 7127c35d236eSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 7128c35d236eSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 7129c35d236eSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 7130c35d236eSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 7131c35d236eSmrgAC_ARG_ENABLE(malloc0returnsnull, 7132c35d236eSmrg AC_HELP_STRING([--enable-malloc0returnsnull], 7133c35d236eSmrg [malloc(0) returns NULL (default: auto)]), 7134c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 7135c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 7136c35d236eSmrg 7137c35d236eSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 7138c35d236eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 7139c35d236eSmrg AC_RUN_IFELSE([ 7140c35d236eSmrgchar *malloc(); 7141c35d236eSmrgchar *realloc(); 7142c35d236eSmrgchar *calloc(); 7143c35d236eSmrgmain() { 7144c35d236eSmrg char *m0, *r0, *c0, *p; 7145c35d236eSmrg m0 = malloc(0); 7146c35d236eSmrg p = malloc(10); 7147c35d236eSmrg r0 = realloc(p,0); 7148c35d236eSmrg c0 = calloc(0); 7149c35d236eSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 7150c35d236eSmrg}], 7151c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 7152c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 7153c35d236eSmrgfi 7154c35d236eSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 7155c35d236eSmrg 7156c35d236eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 7157c35d236eSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 7158c35d236eSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 7159c35d236eSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 7160c35d236eSmrgelse 7161c35d236eSmrg MALLOC_ZERO_CFLAGS="" 7162c35d236eSmrg XMALLOC_ZERO_CFLAGS="" 7163c35d236eSmrg XTMALLOC_ZERO_CFLAGS="" 7164c35d236eSmrgfi 7165c35d236eSmrg 7166c35d236eSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 7167c35d236eSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 7168c35d236eSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 7169c35d236eSmrg]) # XORG_CHECK_MALLOC_ZERO 7170c35d236eSmrg 71714f6cd06fSmrg# XORG_WITH_LINT() 71724f6cd06fSmrg# ---------------- 71734f6cd06fSmrg# Minimum version: 1.1.0 71744f6cd06fSmrg# 71754f6cd06fSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 71764f6cd06fSmrg# is specified. (Use --with-lint=sparse for sparse.) 71774f6cd06fSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 71784f6cd06fSmrg# Sets $LINT_FLAGS to flags to pass to source checker 71794f6cd06fSmrg# Sets LINT automake conditional if enabled (default: disabled) 71804f6cd06fSmrg# 71814f6cd06fSmrgAC_DEFUN([XORG_WITH_LINT],[ 71824f6cd06fSmrg 71834f6cd06fSmrg# Allow checking code with lint, sparse, etc. 71844f6cd06fSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 71854f6cd06fSmrg [Use a lint-style source code checker (default: disabled)])], 71864f6cd06fSmrg [use_lint=$withval], [use_lint=no]) 71874f6cd06fSmrgif test "x$use_lint" = "xyes" ; then 71884f6cd06fSmrg LINT="lint" 71894f6cd06fSmrgelse 71904f6cd06fSmrg LINT="$use_lint" 71914f6cd06fSmrgfi 71924f6cd06fSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 71934f6cd06fSmrg case $LINT in 71944f6cd06fSmrg lint|*/lint) 71954f6cd06fSmrg case $host_os in 71964f6cd06fSmrg solaris*) 71974f6cd06fSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 71984f6cd06fSmrg ;; 71994f6cd06fSmrg esac 72004f6cd06fSmrg ;; 72014f6cd06fSmrg esac 72024f6cd06fSmrgfi 72034f6cd06fSmrg 72044f6cd06fSmrgAC_SUBST(LINT) 72054f6cd06fSmrgAC_SUBST(LINT_FLAGS) 72064f6cd06fSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 72074f6cd06fSmrg 72084f6cd06fSmrg]) # XORG_WITH_LINT 72094f6cd06fSmrg 72104f6cd06fSmrg# XORG_LINT_LIBRARY(LIBNAME) 72114f6cd06fSmrg# -------------------------- 72124f6cd06fSmrg# Minimum version: 1.1.0 72134f6cd06fSmrg# 72144f6cd06fSmrg# Sets up flags for building lint libraries for checking programs that call 72154f6cd06fSmrg# functions in the library. 72164f6cd06fSmrg# Disabled by default, enable with --enable-lint-library 72174f6cd06fSmrg# Sets: 72184f6cd06fSmrg# @LINTLIB@ - name of lint library file to make 72194f6cd06fSmrg# MAKE_LINT_LIB - automake conditional 72204f6cd06fSmrg# 72214f6cd06fSmrg 72224f6cd06fSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 72234f6cd06fSmrgAC_REQUIRE([XORG_WITH_LINT]) 72244f6cd06fSmrg# Build lint "library" for more indepth checks of programs calling this library 72254f6cd06fSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 72264f6cd06fSmrg [Create lint library (default: disabled)])], 72274f6cd06fSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 72284f6cd06fSmrgif test "x$make_lint_lib" != "xno" ; then 72294f6cd06fSmrg if test "x$LINT" = "xno" ; then 72304f6cd06fSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 72314f6cd06fSmrg fi 72324f6cd06fSmrg if test "x$make_lint_lib" = "xyes" ; then 72334f6cd06fSmrg LINTLIB=llib-l$1.ln 72344f6cd06fSmrg else 72354f6cd06fSmrg LINTLIB=$make_lint_lib 72364f6cd06fSmrg fi 72374f6cd06fSmrgfi 72384f6cd06fSmrgAC_SUBST(LINTLIB) 72394f6cd06fSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 72404f6cd06fSmrg 72414f6cd06fSmrg]) # XORG_LINT_LIBRARY 72424f6cd06fSmrg 7243c35d236eSmrgdnl Copyright 2005 Red Hat, Inc 7244c35d236eSmrgdnl 7245c35d236eSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 7246c35d236eSmrgdnl documentation for any purpose is hereby granted without fee, provided that 7247c35d236eSmrgdnl the above copyright notice appear in all copies and that both that 7248c35d236eSmrgdnl copyright notice and this permission notice appear in supporting 7249c35d236eSmrgdnl documentation. 7250c35d236eSmrgdnl 7251c35d236eSmrgdnl The above copyright notice and this permission notice shall be included 7252c35d236eSmrgdnl in all copies or substantial portions of the Software. 7253c35d236eSmrgdnl 7254c35d236eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 7255c35d236eSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 7256c35d236eSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7257c35d236eSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 7258c35d236eSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 7259c35d236eSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 7260c35d236eSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 7261c35d236eSmrgdnl 7262c35d236eSmrgdnl Except as contained in this notice, the name of the copyright holders shall 7263c35d236eSmrgdnl not be used in advertising or otherwise to promote the sale, use or 7264c35d236eSmrgdnl other dealings in this Software without prior written authorization 7265c35d236eSmrgdnl from the copyright holders. 7266c35d236eSmrgdnl 7267c35d236eSmrg 7268c35d236eSmrg# XORG_DRIVER_CHECK_EXT() 7269c35d236eSmrg# -------------------------- 7270c35d236eSmrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 7271c35d236eSmrg# is defined, then add $1 to $REQUIRED_MODULES. 7272c35d236eSmrg 7273c35d236eSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 7274c35d236eSmrg SAVE_CFLAGS="$CFLAGS" 7275c35d236eSmrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 7276c35d236eSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 7277c35d236eSmrg#include "xorg-server.h" 7278c35d236eSmrg#if !defined $1 7279c35d236eSmrg#error $1 not defined 7280c35d236eSmrg#endif 7281c35d236eSmrg ]])], 7282c35d236eSmrg [_EXT_CHECK=yes], 7283c35d236eSmrg [_EXT_CHECK=no]) 7284c35d236eSmrg CFLAGS="$SAVE_CFLAGS" 7285c35d236eSmrg AC_MSG_CHECKING([if $1 is defined]) 7286c35d236eSmrg AC_MSG_RESULT([$_EXT_CHECK]) 7287c35d236eSmrg if test "$_EXT_CHECK" != no; then 7288c35d236eSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 7289c35d236eSmrg fi 7290c35d236eSmrg]) 7291c35d236eSmrg 7292c35d236eSmrgdnl Copyright 2005 Red Hat, Inc 7293c35d236eSmrgdnl 7294c35d236eSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 7295c35d236eSmrgdnl documentation for any purpose is hereby granted without fee, provided that 7296c35d236eSmrgdnl the above copyright notice appear in all copies and that both that 7297c35d236eSmrgdnl copyright notice and this permission notice appear in supporting 7298c35d236eSmrgdnl documentation. 7299c35d236eSmrgdnl 7300c35d236eSmrgdnl The above copyright notice and this permission notice shall be included 7301c35d236eSmrgdnl in all copies or substantial portions of the Software. 7302c35d236eSmrgdnl 7303c35d236eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 7304c35d236eSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 7305c35d236eSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7306c35d236eSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 7307c35d236eSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 7308c35d236eSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 7309c35d236eSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 7310c35d236eSmrgdnl 7311c35d236eSmrgdnl Except as contained in this notice, the name of the copyright holders shall 7312c35d236eSmrgdnl not be used in advertising or otherwise to promote the sale, use or 7313c35d236eSmrgdnl other dealings in this Software without prior written authorization 7314c35d236eSmrgdnl from the copyright holders. 7315c35d236eSmrgdnl 7316c35d236eSmrg 7317c35d236eSmrg# XORG_RELEASE_VERSION 7318c35d236eSmrg# -------------------- 7319c35d236eSmrg# Adds --with/without-release-string and changes the PACKAGE and 7320c35d236eSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 73214f6cd06fSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 73224f6cd06fSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 7323c35d236eSmrg 7324c35d236eSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 7325c35d236eSmrg AC_ARG_WITH(release-version, 7326c35d236eSmrg AC_HELP_STRING([--with-release-version=STRING], 7327c35d236eSmrg [Use release version string in package name]), 7328c35d236eSmrg [RELEASE_VERSION="$withval"], 7329c35d236eSmrg [RELEASE_VERSION=""]) 7330c35d236eSmrg if test "x$RELEASE_VERSION" != "x"; then 7331c35d236eSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 7332c35d236eSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 7333c35d236eSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 7334c35d236eSmrg fi 73354f6cd06fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 73364f6cd06fSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 73374f6cd06fSmrg [Major version of this package]) 73384f6cd06fSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 73394f6cd06fSmrg if test "x$PVM" = "x"; then 73404f6cd06fSmrg PVM="0" 73414f6cd06fSmrg fi 73424f6cd06fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 73434f6cd06fSmrg [$PVM], 73444f6cd06fSmrg [Minor version of this package]) 73454f6cd06fSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 73464f6cd06fSmrg if test "x$PVP" = "x"; then 73474f6cd06fSmrg PVP="0" 73484f6cd06fSmrg fi 73494f6cd06fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 73504f6cd06fSmrg [$PVP], 73514f6cd06fSmrg [Patch version of this package]) 7352c35d236eSmrg]) 7353c35d236eSmrg 73544f6cd06fSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. 7355c35d236eSmrg# 7356c35d236eSmrg# This file is free software; the Free Software Foundation 7357c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7358c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7359c35d236eSmrg 7360c35d236eSmrg# AM_AUTOMAKE_VERSION(VERSION) 7361c35d236eSmrg# ---------------------------- 7362c35d236eSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 7363c35d236eSmrg# generated from the m4 files accompanying Automake X.Y. 73644f6cd06fSmrg# (This private macro should not be called outside this file.) 73654f6cd06fSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 73664f6cd06fSmrg[am__api_version='1.10' 73674f6cd06fSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 73684f6cd06fSmrgdnl require some minimum version. Point them to the right macro. 73694f6cd06fSmrgm4_if([$1], [1.10.1], [], 73704f6cd06fSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 73714f6cd06fSmrg]) 73724f6cd06fSmrg 73734f6cd06fSmrg# _AM_AUTOCONF_VERSION(VERSION) 73744f6cd06fSmrg# ----------------------------- 73754f6cd06fSmrg# aclocal traces this macro to find the Autoconf version. 73764f6cd06fSmrg# This is a private macro too. Using m4_define simplifies 73774f6cd06fSmrg# the logic in aclocal, which can simply ignore this definition. 73784f6cd06fSmrgm4_define([_AM_AUTOCONF_VERSION], []) 7379c35d236eSmrg 7380c35d236eSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 7381c35d236eSmrg# ------------------------------- 73824f6cd06fSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 7383c35d236eSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 7384c35d236eSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 73854f6cd06fSmrg[AM_AUTOMAKE_VERSION([1.10.1])dnl 73864f6cd06fSmrgm4_ifndef([AC_AUTOCONF_VERSION], 73874f6cd06fSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 73884f6cd06fSmrg_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) 7389c35d236eSmrg 7390c35d236eSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 7391c35d236eSmrg 7392c35d236eSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7393c35d236eSmrg# 7394c35d236eSmrg# This file is free software; the Free Software Foundation 7395c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7396c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7397c35d236eSmrg 7398c35d236eSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 7399c35d236eSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 7400c35d236eSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 7401c35d236eSmrg# 7402c35d236eSmrg# Of course, Automake must honor this variable whenever it calls a 7403c35d236eSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 7404c35d236eSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7405c35d236eSmrg# depending on how configure is run. This is pretty annoying, since 7406c35d236eSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7407c35d236eSmrg# source directory, any form will work fine, but in subdirectories a 7408c35d236eSmrg# relative path needs to be adjusted first. 7409c35d236eSmrg# 7410c35d236eSmrg# $ac_aux_dir/missing 7411c35d236eSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 7412c35d236eSmrg# $top_srcdir/$ac_aux_dir/missing 7413c35d236eSmrg# fails if $ac_aux_dir is absolute, 7414c35d236eSmrg# fails when called from a subdirectory in a VPATH build with 7415c35d236eSmrg# a relative $ac_aux_dir 7416c35d236eSmrg# 7417c35d236eSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 7418c35d236eSmrg# are both prefixed by $srcdir. In an in-source build this is usually 7419c35d236eSmrg# harmless because $srcdir is `.', but things will broke when you 7420c35d236eSmrg# start a VPATH build or use an absolute $srcdir. 7421c35d236eSmrg# 7422c35d236eSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 7423c35d236eSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 7424c35d236eSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 7425c35d236eSmrg# and then we would define $MISSING as 7426c35d236eSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 7427c35d236eSmrg# This will work as long as MISSING is not called from configure, because 7428c35d236eSmrg# unfortunately $(top_srcdir) has no meaning in configure. 7429c35d236eSmrg# However there are other variables, like CC, which are often used in 7430c35d236eSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 7431c35d236eSmrg# 7432c35d236eSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 7433c35d236eSmrg# absolute PATH. The drawback is that using absolute paths prevent a 7434c35d236eSmrg# configured tree to be moved without reconfiguration. 7435c35d236eSmrg 7436c35d236eSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 7437c35d236eSmrg[dnl Rely on autoconf to set up CDPATH properly. 7438c35d236eSmrgAC_PREREQ([2.50])dnl 7439c35d236eSmrg# expand $ac_aux_dir to an absolute path 7440c35d236eSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 7441c35d236eSmrg]) 7442c35d236eSmrg 7443c35d236eSmrg# AM_CONDITIONAL -*- Autoconf -*- 7444c35d236eSmrg 74454f6cd06fSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 7446c35d236eSmrg# Free Software Foundation, Inc. 7447c35d236eSmrg# 7448c35d236eSmrg# This file is free software; the Free Software Foundation 7449c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7450c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7451c35d236eSmrg 74524f6cd06fSmrg# serial 8 7453c35d236eSmrg 7454c35d236eSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 7455c35d236eSmrg# ------------------------------------- 7456c35d236eSmrg# Define a conditional. 7457c35d236eSmrgAC_DEFUN([AM_CONDITIONAL], 7458c35d236eSmrg[AC_PREREQ(2.52)dnl 7459c35d236eSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 7460c35d236eSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 74614f6cd06fSmrgAC_SUBST([$1_TRUE])dnl 74624f6cd06fSmrgAC_SUBST([$1_FALSE])dnl 74634f6cd06fSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 74644f6cd06fSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 7465c35d236eSmrgif $2; then 7466c35d236eSmrg $1_TRUE= 7467c35d236eSmrg $1_FALSE='#' 7468c35d236eSmrgelse 7469c35d236eSmrg $1_TRUE='#' 7470c35d236eSmrg $1_FALSE= 7471c35d236eSmrgfi 7472c35d236eSmrgAC_CONFIG_COMMANDS_PRE( 7473c35d236eSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 7474c35d236eSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 7475c35d236eSmrgUsually this means the macro was only invoked conditionally.]]) 7476c35d236eSmrgfi])]) 7477c35d236eSmrg 74784f6cd06fSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 7479c35d236eSmrg# Free Software Foundation, Inc. 7480c35d236eSmrg# 7481c35d236eSmrg# This file is free software; the Free Software Foundation 7482c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7483c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7484c35d236eSmrg 74854f6cd06fSmrg# serial 9 7486c35d236eSmrg 7487c35d236eSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 7488c35d236eSmrg# written in clear, in which case automake, when reading aclocal.m4, 7489c35d236eSmrg# will think it sees a *use*, and therefore will trigger all it's 7490c35d236eSmrg# C support machinery. Also note that it means that autoscan, seeing 7491c35d236eSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 7492c35d236eSmrg 7493c35d236eSmrg 7494c35d236eSmrg# _AM_DEPENDENCIES(NAME) 7495c35d236eSmrg# ---------------------- 7496c35d236eSmrg# See how the compiler implements dependency checking. 7497c35d236eSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 7498c35d236eSmrg# We try a few techniques and use that to set a single cache variable. 7499c35d236eSmrg# 7500c35d236eSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 7501c35d236eSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 7502c35d236eSmrg# dependency, and given that the user is not expected to run this macro, 7503c35d236eSmrg# just rely on AC_PROG_CC. 7504c35d236eSmrgAC_DEFUN([_AM_DEPENDENCIES], 7505c35d236eSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 7506c35d236eSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 7507c35d236eSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 7508c35d236eSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 7509c35d236eSmrg 7510c35d236eSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 7511c35d236eSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 7512c35d236eSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 75134f6cd06fSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 7514c35d236eSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 7515c35d236eSmrg [depcc="$$1" am_compiler_list=]) 7516c35d236eSmrg 7517c35d236eSmrgAC_CACHE_CHECK([dependency style of $depcc], 7518c35d236eSmrg [am_cv_$1_dependencies_compiler_type], 7519c35d236eSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 7520c35d236eSmrg # We make a subdir and do the tests there. Otherwise we can end up 7521c35d236eSmrg # making bogus files that we don't know about and never remove. For 7522c35d236eSmrg # instance it was reported that on HP-UX the gcc test will end up 7523c35d236eSmrg # making a dummy file named `D' -- because `-MD' means `put the output 7524c35d236eSmrg # in D'. 7525c35d236eSmrg mkdir conftest.dir 7526c35d236eSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 7527c35d236eSmrg # using a relative directory. 7528c35d236eSmrg cp "$am_depcomp" conftest.dir 7529c35d236eSmrg cd conftest.dir 7530c35d236eSmrg # We will build objects and dependencies in a subdirectory because 7531c35d236eSmrg # it helps to detect inapplicable dependency modes. For instance 7532c35d236eSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 7533c35d236eSmrg # side effect of compilation, but ICC will put the dependencies in 7534c35d236eSmrg # the current directory while Tru64 will put them in the object 7535c35d236eSmrg # directory. 7536c35d236eSmrg mkdir sub 7537c35d236eSmrg 7538c35d236eSmrg am_cv_$1_dependencies_compiler_type=none 7539c35d236eSmrg if test "$am_compiler_list" = ""; then 7540c35d236eSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 7541c35d236eSmrg fi 7542c35d236eSmrg for depmode in $am_compiler_list; do 7543c35d236eSmrg # Setup a source with many dependencies, because some compilers 7544c35d236eSmrg # like to wrap large dependency lists on column 80 (with \), and 7545c35d236eSmrg # we should not choose a depcomp mode which is confused by this. 7546c35d236eSmrg # 7547c35d236eSmrg # We need to recreate these files for each test, as the compiler may 7548c35d236eSmrg # overwrite some of them when testing with obscure command lines. 7549c35d236eSmrg # This happens at least with the AIX C compiler. 7550c35d236eSmrg : > sub/conftest.c 7551c35d236eSmrg for i in 1 2 3 4 5 6; do 7552c35d236eSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 7553c35d236eSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 7554c35d236eSmrg # Solaris 8's {/usr,}/bin/sh. 7555c35d236eSmrg touch sub/conftst$i.h 7556c35d236eSmrg done 7557c35d236eSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 7558c35d236eSmrg 7559c35d236eSmrg case $depmode in 7560c35d236eSmrg nosideeffect) 7561c35d236eSmrg # after this tag, mechanisms are not by side-effect, so they'll 7562c35d236eSmrg # only be used when explicitly requested 7563c35d236eSmrg if test "x$enable_dependency_tracking" = xyes; then 7564c35d236eSmrg continue 7565c35d236eSmrg else 7566c35d236eSmrg break 7567c35d236eSmrg fi 7568c35d236eSmrg ;; 7569c35d236eSmrg none) break ;; 7570c35d236eSmrg esac 7571c35d236eSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 7572c35d236eSmrg # mode. It turns out that the SunPro C++ compiler does not properly 7573c35d236eSmrg # handle `-M -o', and we need to detect this. 7574c35d236eSmrg if depmode=$depmode \ 7575c35d236eSmrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 7576c35d236eSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 7577c35d236eSmrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 7578c35d236eSmrg >/dev/null 2>conftest.err && 75794f6cd06fSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 7580c35d236eSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 7581c35d236eSmrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 7582c35d236eSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 7583c35d236eSmrg # icc doesn't choke on unknown options, it will just issue warnings 7584c35d236eSmrg # or remarks (even with -Werror). So we grep stderr for any message 7585c35d236eSmrg # that says an option was ignored or not supported. 7586c35d236eSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 7587c35d236eSmrg # icc: Command line warning: ignoring option '-M'; no argument required 7588c35d236eSmrg # The diagnosis changed in icc 8.0: 7589c35d236eSmrg # icc: Command line remark: option '-MP' not supported 7590c35d236eSmrg if (grep 'ignoring option' conftest.err || 7591c35d236eSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 7592c35d236eSmrg am_cv_$1_dependencies_compiler_type=$depmode 7593c35d236eSmrg break 7594c35d236eSmrg fi 7595c35d236eSmrg fi 7596c35d236eSmrg done 7597c35d236eSmrg 7598c35d236eSmrg cd .. 7599c35d236eSmrg rm -rf conftest.dir 7600c35d236eSmrgelse 7601c35d236eSmrg am_cv_$1_dependencies_compiler_type=none 7602c35d236eSmrgfi 7603c35d236eSmrg]) 7604c35d236eSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 7605c35d236eSmrgAM_CONDITIONAL([am__fastdep$1], [ 7606c35d236eSmrg test "x$enable_dependency_tracking" != xno \ 7607c35d236eSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 7608c35d236eSmrg]) 7609c35d236eSmrg 7610c35d236eSmrg 7611c35d236eSmrg# AM_SET_DEPDIR 7612c35d236eSmrg# ------------- 7613c35d236eSmrg# Choose a directory name for dependency files. 7614c35d236eSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 7615c35d236eSmrgAC_DEFUN([AM_SET_DEPDIR], 7616c35d236eSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 7617c35d236eSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 7618c35d236eSmrg]) 7619c35d236eSmrg 7620c35d236eSmrg 7621c35d236eSmrg# AM_DEP_TRACK 7622c35d236eSmrg# ------------ 7623c35d236eSmrgAC_DEFUN([AM_DEP_TRACK], 7624c35d236eSmrg[AC_ARG_ENABLE(dependency-tracking, 7625c35d236eSmrg[ --disable-dependency-tracking speeds up one-time build 7626c35d236eSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 7627c35d236eSmrgif test "x$enable_dependency_tracking" != xno; then 7628c35d236eSmrg am_depcomp="$ac_aux_dir/depcomp" 7629c35d236eSmrg AMDEPBACKSLASH='\' 7630c35d236eSmrgfi 7631c35d236eSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 76324f6cd06fSmrgAC_SUBST([AMDEPBACKSLASH])dnl 76334f6cd06fSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 7634c35d236eSmrg]) 7635c35d236eSmrg 7636c35d236eSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 7637c35d236eSmrg 7638c35d236eSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 7639c35d236eSmrg# Free Software Foundation, Inc. 7640c35d236eSmrg# 7641c35d236eSmrg# This file is free software; the Free Software Foundation 7642c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7643c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7644c35d236eSmrg 7645c35d236eSmrg#serial 3 7646c35d236eSmrg 7647c35d236eSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 7648c35d236eSmrg# ------------------------------ 7649c35d236eSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 7650c35d236eSmrg[for mf in $CONFIG_FILES; do 7651c35d236eSmrg # Strip MF so we end up with the name of the file. 7652c35d236eSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 7653c35d236eSmrg # Check whether this is an Automake generated Makefile or not. 7654c35d236eSmrg # We used to match only the files named `Makefile.in', but 7655c35d236eSmrg # some people rename them; so instead we look at the file content. 7656c35d236eSmrg # Grep'ing the first line is not enough: some people post-process 7657c35d236eSmrg # each Makefile.in and add a new line on top of each file to say so. 76584f6cd06fSmrg # Grep'ing the whole file is not good either: AIX grep has a line 76594f6cd06fSmrg # limit of 2048, but all sed's we know have understand at least 4000. 76604f6cd06fSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 7661c35d236eSmrg dirpart=`AS_DIRNAME("$mf")` 7662c35d236eSmrg else 7663c35d236eSmrg continue 7664c35d236eSmrg fi 7665c35d236eSmrg # Extract the definition of DEPDIR, am__include, and am__quote 7666c35d236eSmrg # from the Makefile without running `make'. 7667c35d236eSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 7668c35d236eSmrg test -z "$DEPDIR" && continue 7669c35d236eSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 7670c35d236eSmrg test -z "am__include" && continue 7671c35d236eSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 7672c35d236eSmrg # When using ansi2knr, U may be empty or an underscore; expand it 7673c35d236eSmrg U=`sed -n 's/^U = //p' < "$mf"` 7674c35d236eSmrg # Find all dependency output files, they are included files with 7675c35d236eSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 7676c35d236eSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 7677c35d236eSmrg # expansion. 7678c35d236eSmrg for file in `sed -n " 7679c35d236eSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 7680c35d236eSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 7681c35d236eSmrg # Make sure the directory exists. 7682c35d236eSmrg test -f "$dirpart/$file" && continue 7683c35d236eSmrg fdir=`AS_DIRNAME(["$file"])` 7684c35d236eSmrg AS_MKDIR_P([$dirpart/$fdir]) 7685c35d236eSmrg # echo "creating $dirpart/$file" 7686c35d236eSmrg echo '# dummy' > "$dirpart/$file" 7687c35d236eSmrg done 7688c35d236eSmrgdone 7689c35d236eSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 7690c35d236eSmrg 7691c35d236eSmrg 7692c35d236eSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 7693c35d236eSmrg# ----------------------------- 7694c35d236eSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 7695c35d236eSmrg# 7696c35d236eSmrg# This code is only required when automatic dependency tracking 7697c35d236eSmrg# is enabled. FIXME. This creates each `.P' file that we will 7698c35d236eSmrg# need in order to bootstrap the dependency handling code. 7699c35d236eSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 7700c35d236eSmrg[AC_CONFIG_COMMANDS([depfiles], 7701c35d236eSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 7702c35d236eSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 7703c35d236eSmrg]) 7704c35d236eSmrg 7705c35d236eSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 7706c35d236eSmrg# Free Software Foundation, Inc. 7707c35d236eSmrg# 7708c35d236eSmrg# This file is free software; the Free Software Foundation 7709c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7710c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7711c35d236eSmrg 7712c35d236eSmrg# serial 8 7713c35d236eSmrg 7714c35d236eSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 7715c35d236eSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 7716c35d236eSmrg 7717c35d236eSmrg# Do all the work for Automake. -*- Autoconf -*- 7718c35d236eSmrg 77194f6cd06fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 77204f6cd06fSmrg# 2005, 2006, 2008 Free Software Foundation, Inc. 7721c35d236eSmrg# 7722c35d236eSmrg# This file is free software; the Free Software Foundation 7723c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7724c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7725c35d236eSmrg 77264f6cd06fSmrg# serial 13 7727c35d236eSmrg 7728c35d236eSmrg# This macro actually does too much. Some checks are only needed if 7729c35d236eSmrg# your package does certain things. But this isn't really a big deal. 7730c35d236eSmrg 7731c35d236eSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 7732c35d236eSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 7733c35d236eSmrg# ----------------------------------------------- 7734c35d236eSmrg# The call with PACKAGE and VERSION arguments is the old style 7735c35d236eSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 7736c35d236eSmrg# and VERSION should now be passed to AC_INIT and removed from 7737c35d236eSmrg# the call to AM_INIT_AUTOMAKE. 7738c35d236eSmrg# We support both call styles for the transition. After 7739c35d236eSmrg# the next Automake release, Autoconf can make the AC_INIT 7740c35d236eSmrg# arguments mandatory, and then we can depend on a new Autoconf 7741c35d236eSmrg# release and drop the old call support. 7742c35d236eSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 77434f6cd06fSmrg[AC_PREREQ([2.60])dnl 7744c35d236eSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 7745c35d236eSmrgdnl the ones we care about. 7746c35d236eSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 7747c35d236eSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 7748c35d236eSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 77494f6cd06fSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 77504f6cd06fSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 77514f6cd06fSmrg # is not polluted with repeated "-I." 77524f6cd06fSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 77534f6cd06fSmrg # test to see if srcdir already configured 77544f6cd06fSmrg if test -f $srcdir/config.status; then 77554f6cd06fSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 77564f6cd06fSmrg fi 7757c35d236eSmrgfi 7758c35d236eSmrg 7759c35d236eSmrg# test whether we have cygpath 7760c35d236eSmrgif test -z "$CYGPATH_W"; then 7761c35d236eSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 7762c35d236eSmrg CYGPATH_W='cygpath -w' 7763c35d236eSmrg else 7764c35d236eSmrg CYGPATH_W=echo 7765c35d236eSmrg fi 7766c35d236eSmrgfi 7767c35d236eSmrgAC_SUBST([CYGPATH_W]) 7768c35d236eSmrg 7769c35d236eSmrg# Define the identity of the package. 7770c35d236eSmrgdnl Distinguish between old-style and new-style calls. 7771c35d236eSmrgm4_ifval([$2], 7772c35d236eSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 7773c35d236eSmrg AC_SUBST([PACKAGE], [$1])dnl 7774c35d236eSmrg AC_SUBST([VERSION], [$2])], 7775c35d236eSmrg[_AM_SET_OPTIONS([$1])dnl 77764f6cd06fSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 77774f6cd06fSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 77784f6cd06fSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 7779c35d236eSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 7780c35d236eSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 7781c35d236eSmrg 7782c35d236eSmrg_AM_IF_OPTION([no-define],, 7783c35d236eSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 7784c35d236eSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 7785c35d236eSmrg 7786c35d236eSmrg# Some tools Automake needs. 7787c35d236eSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 7788c35d236eSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 7789c35d236eSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 7790c35d236eSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 7791c35d236eSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 7792c35d236eSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 7793c35d236eSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 7794c35d236eSmrgAM_PROG_INSTALL_SH 7795c35d236eSmrgAM_PROG_INSTALL_STRIP 7796c35d236eSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 7797c35d236eSmrg# We need awk for the "check" target. The system "awk" is bad on 7798c35d236eSmrg# some platforms. 7799c35d236eSmrgAC_REQUIRE([AC_PROG_AWK])dnl 7800c35d236eSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 7801c35d236eSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 7802c35d236eSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 7803c35d236eSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 7804c35d236eSmrg [_AM_PROG_TAR([v7])])]) 7805c35d236eSmrg_AM_IF_OPTION([no-dependencies],, 7806c35d236eSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 7807c35d236eSmrg [_AM_DEPENDENCIES(CC)], 7808c35d236eSmrg [define([AC_PROG_CC], 7809c35d236eSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 7810c35d236eSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 7811c35d236eSmrg [_AM_DEPENDENCIES(CXX)], 7812c35d236eSmrg [define([AC_PROG_CXX], 7813c35d236eSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 78144f6cd06fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 78154f6cd06fSmrg [_AM_DEPENDENCIES(OBJC)], 78164f6cd06fSmrg [define([AC_PROG_OBJC], 78174f6cd06fSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 7818c35d236eSmrg]) 7819c35d236eSmrg]) 7820c35d236eSmrg 7821c35d236eSmrg 7822c35d236eSmrg# When config.status generates a header, we must update the stamp-h file. 7823c35d236eSmrg# This file resides in the same directory as the config header 7824c35d236eSmrg# that is generated. The stamp files are numbered to have different names. 7825c35d236eSmrg 7826c35d236eSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 7827c35d236eSmrg# loop where config.status creates the headers, so we can generate 7828c35d236eSmrg# our stamp files there. 7829c35d236eSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 7830c35d236eSmrg[# Compute $1's index in $config_headers. 78314f6cd06fSmrg_am_arg=$1 7832c35d236eSmrg_am_stamp_count=1 7833c35d236eSmrgfor _am_header in $config_headers :; do 7834c35d236eSmrg case $_am_header in 78354f6cd06fSmrg $_am_arg | $_am_arg:* ) 7836c35d236eSmrg break ;; 7837c35d236eSmrg * ) 7838c35d236eSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 7839c35d236eSmrg esac 7840c35d236eSmrgdone 78414f6cd06fSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 7842c35d236eSmrg 7843c35d236eSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7844c35d236eSmrg# 7845c35d236eSmrg# This file is free software; the Free Software Foundation 7846c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7847c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7848c35d236eSmrg 7849c35d236eSmrg# AM_PROG_INSTALL_SH 7850c35d236eSmrg# ------------------ 7851c35d236eSmrg# Define $install_sh. 7852c35d236eSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 7853c35d236eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 78544f6cd06fSmrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 7855c35d236eSmrgAC_SUBST(install_sh)]) 7856c35d236eSmrg 7857c35d236eSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 7858c35d236eSmrg# 7859c35d236eSmrg# This file is free software; the Free Software Foundation 7860c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7861c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7862c35d236eSmrg 7863c35d236eSmrg# serial 2 7864c35d236eSmrg 7865c35d236eSmrg# Check whether the underlying file-system supports filenames 7866c35d236eSmrg# with a leading dot. For instance MS-DOS doesn't. 7867c35d236eSmrgAC_DEFUN([AM_SET_LEADING_DOT], 7868c35d236eSmrg[rm -rf .tst 2>/dev/null 7869c35d236eSmrgmkdir .tst 2>/dev/null 7870c35d236eSmrgif test -d .tst; then 7871c35d236eSmrg am__leading_dot=. 7872c35d236eSmrgelse 7873c35d236eSmrg am__leading_dot=_ 7874c35d236eSmrgfi 7875c35d236eSmrgrmdir .tst 2>/dev/null 7876c35d236eSmrgAC_SUBST([am__leading_dot])]) 7877c35d236eSmrg 7878c35d236eSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 7879c35d236eSmrg# From Jim Meyering 7880c35d236eSmrg 7881c35d236eSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 7882c35d236eSmrg# Free Software Foundation, Inc. 7883c35d236eSmrg# 7884c35d236eSmrg# This file is free software; the Free Software Foundation 7885c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7886c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7887c35d236eSmrg 7888c35d236eSmrg# serial 4 7889c35d236eSmrg 7890c35d236eSmrgAC_DEFUN([AM_MAINTAINER_MODE], 7891c35d236eSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 7892c35d236eSmrg dnl maintainer-mode is disabled by default 7893c35d236eSmrg AC_ARG_ENABLE(maintainer-mode, 7894c35d236eSmrg[ --enable-maintainer-mode enable make rules and dependencies not useful 7895c35d236eSmrg (and sometimes confusing) to the casual installer], 7896c35d236eSmrg USE_MAINTAINER_MODE=$enableval, 7897c35d236eSmrg USE_MAINTAINER_MODE=no) 7898c35d236eSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 7899c35d236eSmrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 7900c35d236eSmrg MAINT=$MAINTAINER_MODE_TRUE 7901c35d236eSmrg AC_SUBST(MAINT)dnl 7902c35d236eSmrg] 7903c35d236eSmrg) 7904c35d236eSmrg 7905c35d236eSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 7906c35d236eSmrg 7907c35d236eSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 7908c35d236eSmrg 7909c35d236eSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 7910c35d236eSmrg# 7911c35d236eSmrg# This file is free software; the Free Software Foundation 7912c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7913c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7914c35d236eSmrg 7915c35d236eSmrg# serial 3 7916c35d236eSmrg 7917c35d236eSmrg# AM_MAKE_INCLUDE() 7918c35d236eSmrg# ----------------- 7919c35d236eSmrg# Check to see how make treats includes. 7920c35d236eSmrgAC_DEFUN([AM_MAKE_INCLUDE], 7921c35d236eSmrg[am_make=${MAKE-make} 7922c35d236eSmrgcat > confinc << 'END' 7923c35d236eSmrgam__doit: 7924c35d236eSmrg @echo done 7925c35d236eSmrg.PHONY: am__doit 7926c35d236eSmrgEND 7927c35d236eSmrg# If we don't find an include directive, just comment out the code. 7928c35d236eSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 7929c35d236eSmrgam__include="#" 7930c35d236eSmrgam__quote= 7931c35d236eSmrg_am_result=none 7932c35d236eSmrg# First try GNU make style include. 7933c35d236eSmrgecho "include confinc" > confmf 7934c35d236eSmrg# We grep out `Entering directory' and `Leaving directory' 7935c35d236eSmrg# messages which can occur if `w' ends up in MAKEFLAGS. 7936c35d236eSmrg# In particular we don't look at `^make:' because GNU make might 7937c35d236eSmrg# be invoked under some other name (usually "gmake"), in which 7938c35d236eSmrg# case it prints its new name instead of `make'. 7939c35d236eSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 7940c35d236eSmrg am__include=include 7941c35d236eSmrg am__quote= 7942c35d236eSmrg _am_result=GNU 7943c35d236eSmrgfi 7944c35d236eSmrg# Now try BSD make style include. 7945c35d236eSmrgif test "$am__include" = "#"; then 7946c35d236eSmrg echo '.include "confinc"' > confmf 7947c35d236eSmrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 7948c35d236eSmrg am__include=.include 7949c35d236eSmrg am__quote="\"" 7950c35d236eSmrg _am_result=BSD 7951c35d236eSmrg fi 7952c35d236eSmrgfi 7953c35d236eSmrgAC_SUBST([am__include]) 7954c35d236eSmrgAC_SUBST([am__quote]) 7955c35d236eSmrgAC_MSG_RESULT([$_am_result]) 7956c35d236eSmrgrm -f confinc confmf 7957c35d236eSmrg]) 7958c35d236eSmrg 7959c35d236eSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 7960c35d236eSmrg 79614f6cd06fSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 7962c35d236eSmrg# Free Software Foundation, Inc. 7963c35d236eSmrg# 7964c35d236eSmrg# This file is free software; the Free Software Foundation 7965c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7966c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7967c35d236eSmrg 79684f6cd06fSmrg# serial 5 7969c35d236eSmrg 7970c35d236eSmrg# AM_MISSING_PROG(NAME, PROGRAM) 7971c35d236eSmrg# ------------------------------ 7972c35d236eSmrgAC_DEFUN([AM_MISSING_PROG], 7973c35d236eSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7974c35d236eSmrg$1=${$1-"${am_missing_run}$2"} 7975c35d236eSmrgAC_SUBST($1)]) 7976c35d236eSmrg 7977c35d236eSmrg 7978c35d236eSmrg# AM_MISSING_HAS_RUN 7979c35d236eSmrg# ------------------ 7980c35d236eSmrg# Define MISSING if not defined so far and test if it supports --run. 7981c35d236eSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 7982c35d236eSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7983c35d236eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 79844f6cd06fSmrgAC_REQUIRE_AUX_FILE([missing])dnl 7985c35d236eSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 7986c35d236eSmrg# Use eval to expand $SHELL 7987c35d236eSmrgif eval "$MISSING --run true"; then 7988c35d236eSmrg am_missing_run="$MISSING --run " 7989c35d236eSmrgelse 7990c35d236eSmrg am_missing_run= 7991c35d236eSmrg AC_MSG_WARN([`missing' script is too old or missing]) 7992c35d236eSmrgfi 7993c35d236eSmrg]) 7994c35d236eSmrg 79954f6cd06fSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 7996c35d236eSmrg# 7997c35d236eSmrg# This file is free software; the Free Software Foundation 7998c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7999c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8000c35d236eSmrg 8001c35d236eSmrg# AM_PROG_MKDIR_P 8002c35d236eSmrg# --------------- 80034f6cd06fSmrg# Check for `mkdir -p'. 8004c35d236eSmrgAC_DEFUN([AM_PROG_MKDIR_P], 80054f6cd06fSmrg[AC_PREREQ([2.60])dnl 80064f6cd06fSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 80074f6cd06fSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 80084f6cd06fSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 80094f6cd06fSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 80104f6cd06fSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 80114f6cd06fSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 80124f6cd06fSmrgdnl adjustment using top_builddir (which is defined more often than 80134f6cd06fSmrgdnl MKDIR_P). 80144f6cd06fSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 80154f6cd06fSmrgcase $mkdir_p in 80164f6cd06fSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 80174f6cd06fSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 80184f6cd06fSmrgesac 80194f6cd06fSmrg]) 8020c35d236eSmrg 8021c35d236eSmrg# Helper functions for option handling. -*- Autoconf -*- 8022c35d236eSmrg 8023c35d236eSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 8024c35d236eSmrg# 8025c35d236eSmrg# This file is free software; the Free Software Foundation 8026c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 8027c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8028c35d236eSmrg 8029c35d236eSmrg# serial 3 8030c35d236eSmrg 8031c35d236eSmrg# _AM_MANGLE_OPTION(NAME) 8032c35d236eSmrg# ----------------------- 8033c35d236eSmrgAC_DEFUN([_AM_MANGLE_OPTION], 8034c35d236eSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 8035c35d236eSmrg 8036c35d236eSmrg# _AM_SET_OPTION(NAME) 8037c35d236eSmrg# ------------------------------ 8038c35d236eSmrg# Set option NAME. Presently that only means defining a flag for this option. 8039c35d236eSmrgAC_DEFUN([_AM_SET_OPTION], 8040c35d236eSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 8041c35d236eSmrg 8042c35d236eSmrg# _AM_SET_OPTIONS(OPTIONS) 8043c35d236eSmrg# ---------------------------------- 8044c35d236eSmrg# OPTIONS is a space-separated list of Automake options. 8045c35d236eSmrgAC_DEFUN([_AM_SET_OPTIONS], 8046c35d236eSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 8047c35d236eSmrg 8048c35d236eSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 8049c35d236eSmrg# ------------------------------------------- 8050c35d236eSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8051c35d236eSmrgAC_DEFUN([_AM_IF_OPTION], 8052c35d236eSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 8053c35d236eSmrg 8054c35d236eSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8055c35d236eSmrg 8056c35d236eSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 8057c35d236eSmrg# Free Software Foundation, Inc. 8058c35d236eSmrg# 8059c35d236eSmrg# This file is free software; the Free Software Foundation 8060c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 8061c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8062c35d236eSmrg 8063c35d236eSmrg# serial 4 8064c35d236eSmrg 8065c35d236eSmrg# AM_SANITY_CHECK 8066c35d236eSmrg# --------------- 8067c35d236eSmrgAC_DEFUN([AM_SANITY_CHECK], 8068c35d236eSmrg[AC_MSG_CHECKING([whether build environment is sane]) 8069c35d236eSmrg# Just in case 8070c35d236eSmrgsleep 1 8071c35d236eSmrgecho timestamp > conftest.file 8072c35d236eSmrg# Do `set' in a subshell so we don't clobber the current shell's 8073c35d236eSmrg# arguments. Must try -L first in case configure is actually a 8074c35d236eSmrg# symlink; some systems play weird games with the mod time of symlinks 8075c35d236eSmrg# (eg FreeBSD returns the mod time of the symlink's containing 8076c35d236eSmrg# directory). 8077c35d236eSmrgif ( 8078c35d236eSmrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 8079c35d236eSmrg if test "$[*]" = "X"; then 8080c35d236eSmrg # -L didn't work. 8081c35d236eSmrg set X `ls -t $srcdir/configure conftest.file` 8082c35d236eSmrg fi 8083c35d236eSmrg rm -f conftest.file 8084c35d236eSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8085c35d236eSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8086c35d236eSmrg 8087c35d236eSmrg # If neither matched, then we have a broken ls. This can happen 8088c35d236eSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8089c35d236eSmrg # broken ls alias from the environment. This has actually 8090c35d236eSmrg # happened. Such a system could not be considered "sane". 8091c35d236eSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8092c35d236eSmrgalias in your environment]) 8093c35d236eSmrg fi 8094c35d236eSmrg 8095c35d236eSmrg test "$[2]" = conftest.file 8096c35d236eSmrg ) 8097c35d236eSmrgthen 8098c35d236eSmrg # Ok. 8099c35d236eSmrg : 8100c35d236eSmrgelse 8101c35d236eSmrg AC_MSG_ERROR([newly created file is older than distributed files! 8102c35d236eSmrgCheck your system clock]) 8103c35d236eSmrgfi 8104c35d236eSmrgAC_MSG_RESULT(yes)]) 8105c35d236eSmrg 8106c35d236eSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8107c35d236eSmrg# 8108c35d236eSmrg# This file is free software; the Free Software Foundation 8109c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 8110c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8111c35d236eSmrg 8112c35d236eSmrg# AM_PROG_INSTALL_STRIP 8113c35d236eSmrg# --------------------- 8114c35d236eSmrg# One issue with vendor `install' (even GNU) is that you can't 8115c35d236eSmrg# specify the program used to strip binaries. This is especially 8116c35d236eSmrg# annoying in cross-compiling environments, where the build's strip 8117c35d236eSmrg# is unlikely to handle the host's binaries. 8118c35d236eSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 8119c35d236eSmrg# always use install-sh in `make install-strip', and initialize 8120c35d236eSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 8121c35d236eSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 8122c35d236eSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 8123c35d236eSmrg# Installed binaries are usually stripped using `strip' when the user 8124c35d236eSmrg# run `make install-strip'. However `strip' might not be the right 8125c35d236eSmrg# tool to use in cross-compilation environments, therefore Automake 8126c35d236eSmrg# will honor the `STRIP' environment variable to overrule this program. 8127c35d236eSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 8128c35d236eSmrgif test "$cross_compiling" != no; then 8129c35d236eSmrg AC_CHECK_TOOL([STRIP], [strip], :) 8130c35d236eSmrgfi 81314f6cd06fSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 8132c35d236eSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 8133c35d236eSmrg 81344f6cd06fSmrg# Copyright (C) 2006 Free Software Foundation, Inc. 81354f6cd06fSmrg# 81364f6cd06fSmrg# This file is free software; the Free Software Foundation 81374f6cd06fSmrg# gives unlimited permission to copy and/or distribute it, 81384f6cd06fSmrg# with or without modifications, as long as this notice is preserved. 81394f6cd06fSmrg 81404f6cd06fSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 81414f6cd06fSmrg# --------------------------- 81424f6cd06fSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 81434f6cd06fSmrg# This macro is traced by Automake. 81444f6cd06fSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 81454f6cd06fSmrg 8146c35d236eSmrg# Check how to create a tarball. -*- Autoconf -*- 8147c35d236eSmrg 8148c35d236eSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 8149c35d236eSmrg# 8150c35d236eSmrg# This file is free software; the Free Software Foundation 8151c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 8152c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8153c35d236eSmrg 8154c35d236eSmrg# serial 2 8155c35d236eSmrg 8156c35d236eSmrg# _AM_PROG_TAR(FORMAT) 8157c35d236eSmrg# -------------------- 8158c35d236eSmrg# Check how to create a tarball in format FORMAT. 8159c35d236eSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 8160c35d236eSmrg# 8161c35d236eSmrg# Substitute a variable $(am__tar) that is a command 8162c35d236eSmrg# writing to stdout a FORMAT-tarball containing the directory 8163c35d236eSmrg# $tardir. 8164c35d236eSmrg# tardir=directory && $(am__tar) > result.tar 8165c35d236eSmrg# 8166c35d236eSmrg# Substitute a variable $(am__untar) that extract such 8167c35d236eSmrg# a tarball read from stdin. 8168c35d236eSmrg# $(am__untar) < result.tar 8169c35d236eSmrgAC_DEFUN([_AM_PROG_TAR], 8170c35d236eSmrg[# Always define AMTAR for backward compatibility. 8171c35d236eSmrgAM_MISSING_PROG([AMTAR], [tar]) 8172c35d236eSmrgm4_if([$1], [v7], 8173c35d236eSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 8174c35d236eSmrg [m4_case([$1], [ustar],, [pax],, 8175c35d236eSmrg [m4_fatal([Unknown tar format])]) 8176c35d236eSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 8177c35d236eSmrg# Loop over all known methods to create a tar archive until one works. 8178c35d236eSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 8179c35d236eSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 8180c35d236eSmrg# Do not fold the above two line into one, because Tru64 sh and 8181c35d236eSmrg# Solaris sh will not grok spaces in the rhs of `-'. 8182c35d236eSmrgfor _am_tool in $_am_tools 8183c35d236eSmrgdo 8184c35d236eSmrg case $_am_tool in 8185c35d236eSmrg gnutar) 8186c35d236eSmrg for _am_tar in tar gnutar gtar; 8187c35d236eSmrg do 8188c35d236eSmrg AM_RUN_LOG([$_am_tar --version]) && break 8189c35d236eSmrg done 8190c35d236eSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 8191c35d236eSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 8192c35d236eSmrg am__untar="$_am_tar -xf -" 8193c35d236eSmrg ;; 8194c35d236eSmrg plaintar) 8195c35d236eSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 8196c35d236eSmrg # ustar tarball either. 8197c35d236eSmrg (tar --version) >/dev/null 2>&1 && continue 8198c35d236eSmrg am__tar='tar chf - "$$tardir"' 8199c35d236eSmrg am__tar_='tar chf - "$tardir"' 8200c35d236eSmrg am__untar='tar xf -' 8201c35d236eSmrg ;; 8202c35d236eSmrg pax) 8203c35d236eSmrg am__tar='pax -L -x $1 -w "$$tardir"' 8204c35d236eSmrg am__tar_='pax -L -x $1 -w "$tardir"' 8205c35d236eSmrg am__untar='pax -r' 8206c35d236eSmrg ;; 8207c35d236eSmrg cpio) 8208c35d236eSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 8209c35d236eSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 8210c35d236eSmrg am__untar='cpio -i -H $1 -d' 8211c35d236eSmrg ;; 8212c35d236eSmrg none) 8213c35d236eSmrg am__tar=false 8214c35d236eSmrg am__tar_=false 8215c35d236eSmrg am__untar=false 8216c35d236eSmrg ;; 8217c35d236eSmrg esac 8218c35d236eSmrg 8219c35d236eSmrg # If the value was cached, stop now. We just wanted to have am__tar 8220c35d236eSmrg # and am__untar set. 8221c35d236eSmrg test -n "${am_cv_prog_tar_$1}" && break 8222c35d236eSmrg 8223c35d236eSmrg # tar/untar a dummy directory, and stop if the command works 8224c35d236eSmrg rm -rf conftest.dir 8225c35d236eSmrg mkdir conftest.dir 8226c35d236eSmrg echo GrepMe > conftest.dir/file 8227c35d236eSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 8228c35d236eSmrg rm -rf conftest.dir 8229c35d236eSmrg if test -s conftest.tar; then 8230c35d236eSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 8231c35d236eSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 8232c35d236eSmrg fi 8233c35d236eSmrgdone 8234c35d236eSmrgrm -rf conftest.dir 8235c35d236eSmrg 8236c35d236eSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 8237c35d236eSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 8238c35d236eSmrgAC_SUBST([am__tar]) 8239c35d236eSmrgAC_SUBST([am__untar]) 8240c35d236eSmrg]) # _AM_PROG_TAR 8241c35d236eSmrg 8242