aclocal.m4 revision 174832
1174832Sdes# generated automatically by aclocal 1.9.6 -*- Autoconf -*- 2117610Sdes 3174832Sdes# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4174832Sdes# 2005 Free Software Foundation, Inc. 5117610Sdes# This file is free software; the Free Software Foundation 6117610Sdes# gives unlimited permission to copy and/or distribute it, 7117610Sdes# with or without modifications, as long as this notice is preserved. 8117610Sdes 9117610Sdes# This program is distributed in the hope that it will be useful, 10117610Sdes# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11117610Sdes# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12117610Sdes# PARTICULAR PURPOSE. 13117610Sdes 14141098Sdes# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 15117610Sdes 16174832Sdes# serial 51 AC_PROG_LIBTOOL 17117610Sdes 18117610Sdes 19141098Sdes# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 20141098Sdes# ----------------------------------------------------------- 21141098Sdes# If this macro is not defined by Autoconf, define it here. 22141098Sdesm4_ifdef([AC_PROVIDE_IFELSE], 23141098Sdes [], 24141098Sdes [m4_define([AC_PROVIDE_IFELSE], 25141098Sdes [m4_ifdef([AC_PROVIDE_$1], 26141098Sdes [$2], [$3])])]) 27117610Sdes 28117610Sdes 29141098Sdes# AC_PROG_LIBTOOL 30141098Sdes# --------------- 31141098SdesAC_DEFUN([AC_PROG_LIBTOOL], 32141098Sdes[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 33141098Sdesdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 34141098Sdesdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 35141098Sdes AC_PROVIDE_IFELSE([AC_PROG_CXX], 36141098Sdes [AC_LIBTOOL_CXX], 37141098Sdes [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 38141098Sdes ])]) 39141098Sdesdnl And a similar setup for Fortran 77 support 40141098Sdes AC_PROVIDE_IFELSE([AC_PROG_F77], 41141098Sdes [AC_LIBTOOL_F77], 42141098Sdes [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 43141098Sdes])]) 44117610Sdes 45141098Sdesdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 46141098Sdesdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 47141098Sdesdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 48141098Sdes AC_PROVIDE_IFELSE([AC_PROG_GCJ], 49141098Sdes [AC_LIBTOOL_GCJ], 50141098Sdes [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 51141098Sdes [AC_LIBTOOL_GCJ], 52141098Sdes [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 53141098Sdes [AC_LIBTOOL_GCJ], 54141098Sdes [ifdef([AC_PROG_GCJ], 55141098Sdes [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 56141098Sdes ifdef([A][M_PROG_GCJ], 57141098Sdes [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 58141098Sdes ifdef([LT_AC_PROG_GCJ], 59141098Sdes [define([LT_AC_PROG_GCJ], 60141098Sdes defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 61141098Sdes])])# AC_PROG_LIBTOOL 62117610Sdes 63141098Sdes 64141098Sdes# _AC_PROG_LIBTOOL 65141098Sdes# ---------------- 66141098SdesAC_DEFUN([_AC_PROG_LIBTOOL], 67117610Sdes[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 68141098SdesAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 69141098SdesAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 70141098SdesAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 71117610Sdes 72117610Sdes# This can be used to rebuild libtool when needed 73141098SdesLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 74117610Sdes 75117610Sdes# Always use our own libtool. 76117610SdesLIBTOOL='$(SHELL) $(top_builddir)/libtool' 77117610SdesAC_SUBST(LIBTOOL)dnl 78117610Sdes 79141098Sdes# Prevent multiple expansion 80141098Sdesdefine([AC_PROG_LIBTOOL], []) 81141098Sdes])# _AC_PROG_LIBTOOL 82117610Sdes 83141098Sdes 84141098Sdes# AC_LIBTOOL_SETUP 85141098Sdes# ---------------- 86141098SdesAC_DEFUN([AC_LIBTOOL_SETUP], 87141098Sdes[AC_PREREQ(2.50)dnl 88117610SdesAC_REQUIRE([AC_ENABLE_SHARED])dnl 89117610SdesAC_REQUIRE([AC_ENABLE_STATIC])dnl 90117610SdesAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 91117610SdesAC_REQUIRE([AC_CANONICAL_HOST])dnl 92117610SdesAC_REQUIRE([AC_CANONICAL_BUILD])dnl 93117610SdesAC_REQUIRE([AC_PROG_CC])dnl 94117610SdesAC_REQUIRE([AC_PROG_LD])dnl 95141098SdesAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 96117610SdesAC_REQUIRE([AC_PROG_NM])dnl 97141098Sdes 98117610SdesAC_REQUIRE([AC_PROG_LN_S])dnl 99141098SdesAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 100141098Sdes# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 101141098SdesAC_REQUIRE([AC_OBJEXT])dnl 102141098SdesAC_REQUIRE([AC_EXEEXT])dnl 103117610Sdesdnl 104117610Sdes 105141098SdesAC_LIBTOOL_SYS_MAX_CMD_LEN 106141098SdesAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 107141098SdesAC_LIBTOOL_OBJDIR 108141098Sdes 109141098SdesAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 110141098Sdes_LT_AC_PROG_ECHO_BACKSLASH 111141098Sdes 112141098Sdescase $host_os in 113141098Sdesaix3*) 114141098Sdes # AIX sometimes has problems with the GCC collect2 program. For some 115141098Sdes # reason, if we set the COLLECT_NAMES environment variable, the problems 116141098Sdes # vanish in a puff of smoke. 117141098Sdes if test "X${COLLECT_NAMES+set}" != Xset; then 118141098Sdes COLLECT_NAMES= 119141098Sdes export COLLECT_NAMES 120141098Sdes fi 121141098Sdes ;; 122117610Sdesesac 123117610Sdes 124141098Sdes# Sed substitution that helps us do robust quoting. It backslashifies 125141098Sdes# metacharacters that are still active within double-quoted strings. 126174832SdesXsed='sed -e 1s/^X//' 127141098Sdes[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 128117610Sdes 129141098Sdes# Same as above, but do not quote variable references. 130141098Sdes[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 131141098Sdes 132141098Sdes# Sed substitution to delay expansion of an escaped shell variable in a 133141098Sdes# double_quote_subst'ed string. 134141098Sdesdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 135141098Sdes 136141098Sdes# Sed substitution to avoid accidental globbing in evaled expressions 137141098Sdesno_glob_subst='s/\*/\\\*/g' 138141098Sdes 139141098Sdes# Constants: 140141098Sdesrm="rm -f" 141141098Sdes 142141098Sdes# Global variables: 143141098Sdesdefault_ofile=libtool 144141098Sdescan_build_shared=yes 145141098Sdes 146174832Sdes# All known linkers require a `.a' archive for static linking (except MSVC, 147141098Sdes# which needs '.lib'). 148141098Sdeslibext=a 149141098Sdesltmain="$ac_aux_dir/ltmain.sh" 150141098Sdesofile="$default_ofile" 151141098Sdeswith_gnu_ld="$lt_cv_prog_gnu_ld" 152141098Sdes 153141098SdesAC_CHECK_TOOL(AR, ar, false) 154141098SdesAC_CHECK_TOOL(RANLIB, ranlib, :) 155141098SdesAC_CHECK_TOOL(STRIP, strip, :) 156141098Sdes 157141098Sdesold_CC="$CC" 158141098Sdesold_CFLAGS="$CFLAGS" 159141098Sdes 160141098Sdes# Set sane defaults for various variables 161141098Sdestest -z "$AR" && AR=ar 162141098Sdestest -z "$AR_FLAGS" && AR_FLAGS=cru 163141098Sdestest -z "$AS" && AS=as 164141098Sdestest -z "$CC" && CC=cc 165141098Sdestest -z "$LTCC" && LTCC=$CC 166174832Sdestest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 167141098Sdestest -z "$DLLTOOL" && DLLTOOL=dlltool 168141098Sdestest -z "$LD" && LD=ld 169141098Sdestest -z "$LN_S" && LN_S="ln -s" 170141098Sdestest -z "$MAGIC_CMD" && MAGIC_CMD=file 171141098Sdestest -z "$NM" && NM=nm 172141098Sdestest -z "$SED" && SED=sed 173141098Sdestest -z "$OBJDUMP" && OBJDUMP=objdump 174141098Sdestest -z "$RANLIB" && RANLIB=: 175141098Sdestest -z "$STRIP" && STRIP=: 176141098Sdestest -z "$ac_objext" && ac_objext=o 177141098Sdes 178141098Sdes# Determine commands to create old-style static archives. 179174832Sdesold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 180141098Sdesold_postinstall_cmds='chmod 644 $oldlib' 181141098Sdesold_postuninstall_cmds= 182141098Sdes 183141098Sdesif test -n "$RANLIB"; then 184141098Sdes case $host_os in 185141098Sdes openbsd*) 186174832Sdes old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 187141098Sdes ;; 188141098Sdes *) 189174832Sdes old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 190141098Sdes ;; 191141098Sdes esac 192141098Sdes old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 193141098Sdesfi 194141098Sdes 195174832Sdes_LT_CC_BASENAME([$compiler]) 196141098Sdes 197141098Sdes# Only perform the check for file, if the check method requires it 198141098Sdescase $deplibs_check_method in 199141098Sdesfile_magic*) 200141098Sdes if test "$file_magic_cmd" = '$MAGIC_CMD'; then 201141098Sdes AC_PATH_MAGIC 202141098Sdes fi 203141098Sdes ;; 204141098Sdesesac 205141098Sdes 206141098SdesAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 207141098SdesAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 208141098Sdesenable_win32_dll=yes, enable_win32_dll=no) 209141098Sdes 210141098SdesAC_ARG_ENABLE([libtool-lock], 211141098Sdes [AC_HELP_STRING([--disable-libtool-lock], 212141098Sdes [avoid locking (might break parallel builds)])]) 213141098Sdestest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 214141098Sdes 215141098SdesAC_ARG_WITH([pic], 216141098Sdes [AC_HELP_STRING([--with-pic], 217141098Sdes [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 218141098Sdes [pic_mode="$withval"], 219141098Sdes [pic_mode=default]) 220141098Sdestest -z "$pic_mode" && pic_mode=default 221141098Sdes 222141098Sdes# Use C for the default configuration in the libtool script 223141098Sdestagname= 224141098SdesAC_LIBTOOL_LANG_C_CONFIG 225141098Sdes_LT_AC_TAGCONFIG 226141098Sdes])# AC_LIBTOOL_SETUP 227141098Sdes 228141098Sdes 229141098Sdes# _LT_AC_SYS_COMPILER 230141098Sdes# ------------------- 231141098SdesAC_DEFUN([_LT_AC_SYS_COMPILER], 232141098Sdes[AC_REQUIRE([AC_PROG_CC])dnl 233141098Sdes 234141098Sdes# If no C compiler was specified, use CC. 235141098SdesLTCC=${LTCC-"$CC"} 236141098Sdes 237174832Sdes# If no C compiler flags were specified, use CFLAGS. 238174832SdesLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 239174832Sdes 240141098Sdes# Allow CC to be a program name with arguments. 241141098Sdescompiler=$CC 242141098Sdes])# _LT_AC_SYS_COMPILER 243141098Sdes 244141098Sdes 245174832Sdes# _LT_CC_BASENAME(CC) 246174832Sdes# ------------------- 247174832Sdes# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 248174832SdesAC_DEFUN([_LT_CC_BASENAME], 249174832Sdes[for cc_temp in $1""; do 250174832Sdes case $cc_temp in 251174832Sdes compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 252174832Sdes distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 253174832Sdes \-*) ;; 254174832Sdes *) break;; 255174832Sdes esac 256174832Sdesdone 257174832Sdescc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 258174832Sdes]) 259174832Sdes 260174832Sdes 261174832Sdes# _LT_COMPILER_BOILERPLATE 262174832Sdes# ------------------------ 263174832Sdes# Check for compiler boilerplate output or warnings with 264174832Sdes# the simple compiler test code. 265174832SdesAC_DEFUN([_LT_COMPILER_BOILERPLATE], 266174832Sdes[AC_REQUIRE([LT_AC_PROG_SED])dnl 267174832Sdesac_outfile=conftest.$ac_objext 268174832Sdesecho "$lt_simple_compile_test_code" >conftest.$ac_ext 269174832Sdeseval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 270174832Sdes_lt_compiler_boilerplate=`cat conftest.err` 271174832Sdes$rm conftest* 272174832Sdes])# _LT_COMPILER_BOILERPLATE 273174832Sdes 274174832Sdes 275174832Sdes# _LT_LINKER_BOILERPLATE 276174832Sdes# ---------------------- 277174832Sdes# Check for linker boilerplate output or warnings with 278174832Sdes# the simple link test code. 279174832SdesAC_DEFUN([_LT_LINKER_BOILERPLATE], 280174832Sdes[AC_REQUIRE([LT_AC_PROG_SED])dnl 281174832Sdesac_outfile=conftest.$ac_objext 282174832Sdesecho "$lt_simple_link_test_code" >conftest.$ac_ext 283174832Sdeseval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 284174832Sdes_lt_linker_boilerplate=`cat conftest.err` 285174832Sdes$rm conftest* 286174832Sdes])# _LT_LINKER_BOILERPLATE 287174832Sdes 288174832Sdes 289141098Sdes# _LT_AC_SYS_LIBPATH_AIX 290141098Sdes# ---------------------- 291141098Sdes# Links a minimal program and checks the executable 292141098Sdes# for the system default hardcoded library path. In most cases, 293141098Sdes# this is /usr/lib:/lib, but when the MPI compilers are used 294141098Sdes# the location of the communication and MPI libs are included too. 295141098Sdes# If we don't find anything, use the default library path according 296141098Sdes# to the aix ld manual. 297141098SdesAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 298174832Sdes[AC_REQUIRE([LT_AC_PROG_SED])dnl 299174832SdesAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 300174832Sdeslt_aix_libpath_sed=' 301174832Sdes /Import File Strings/,/^$/ { 302174832Sdes /^0/ { 303174832Sdes s/^0 *\(.*\)$/\1/ 304174832Sdes p 305174832Sdes } 306174832Sdes }' 307174832Sdesaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 308141098Sdes# Check for a 64-bit object if we didn't find anything. 309174832Sdesif test -z "$aix_libpath"; then 310174832Sdes aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 311174832Sdesfi],[]) 312141098Sdesif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 313141098Sdes])# _LT_AC_SYS_LIBPATH_AIX 314141098Sdes 315141098Sdes 316141098Sdes# _LT_AC_SHELL_INIT(ARG) 317141098Sdes# ---------------------- 318141098SdesAC_DEFUN([_LT_AC_SHELL_INIT], 319141098Sdes[ifdef([AC_DIVERSION_NOTICE], 320141098Sdes [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 321141098Sdes [AC_DIVERT_PUSH(NOTICE)]) 322141098Sdes$1 323141098SdesAC_DIVERT_POP 324141098Sdes])# _LT_AC_SHELL_INIT 325141098Sdes 326141098Sdes 327141098Sdes# _LT_AC_PROG_ECHO_BACKSLASH 328141098Sdes# -------------------------- 329141098Sdes# Add some code to the start of the generated configure script which 330141098Sdes# will find an echo command which doesn't interpret backslashes. 331141098SdesAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 332141098Sdes[_LT_AC_SHELL_INIT([ 333141098Sdes# Check that we are running under the correct shell. 334141098SdesSHELL=${CONFIG_SHELL-/bin/sh} 335141098Sdes 336141098Sdescase X$ECHO in 337141098SdesX*--fallback-echo) 338141098Sdes # Remove one level of quotation (which was required for Make). 339141098Sdes ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 340141098Sdes ;; 341141098Sdesesac 342141098Sdes 343141098Sdesecho=${ECHO-echo} 344141098Sdesif test "X[$]1" = X--no-reexec; then 345141098Sdes # Discard the --no-reexec flag, and continue. 346141098Sdes shift 347141098Sdeselif test "X[$]1" = X--fallback-echo; then 348141098Sdes # Avoid inline document here, it may be left over 349141098Sdes : 350141098Sdeselif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 351141098Sdes # Yippee, $echo works! 352141098Sdes : 353141098Sdeselse 354141098Sdes # Restart under the correct shell. 355141098Sdes exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 356141098Sdesfi 357141098Sdes 358141098Sdesif test "X[$]1" = X--fallback-echo; then 359141098Sdes # used as fallback echo 360141098Sdes shift 361141098Sdes cat <<EOF 362141098Sdes[$]* 363141098SdesEOF 364141098Sdes exit 0 365141098Sdesfi 366141098Sdes 367141098Sdes# The HP-UX ksh and POSIX shell print the target directory to stdout 368141098Sdes# if CDPATH is set. 369141098Sdes(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 370141098Sdes 371141098Sdesif test -z "$ECHO"; then 372141098Sdesif test "X${echo_test_string+set}" != Xset; then 373141098Sdes# find a string as large as possible, as long as the shell can cope with it 374141098Sdes for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 375141098Sdes # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 376174832Sdes if (echo_test_string=`eval $cmd`) 2>/dev/null && 377174832Sdes echo_test_string=`eval $cmd` && 378141098Sdes (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 379141098Sdes then 380141098Sdes break 381141098Sdes fi 382141098Sdes done 383141098Sdesfi 384141098Sdes 385141098Sdesif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 386141098Sdes echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 387141098Sdes test "X$echo_testing_string" = "X$echo_test_string"; then 388141098Sdes : 389141098Sdeselse 390141098Sdes # The Solaris, AIX, and Digital Unix default echo programs unquote 391141098Sdes # backslashes. This makes it impossible to quote backslashes using 392141098Sdes # echo "$something" | sed 's/\\/\\\\/g' 393141098Sdes # 394141098Sdes # So, first we look for a working echo in the user's PATH. 395141098Sdes 396141098Sdes lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 397141098Sdes for dir in $PATH /usr/ucb; do 398141098Sdes IFS="$lt_save_ifs" 399141098Sdes if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 400141098Sdes test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 401141098Sdes echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 402141098Sdes test "X$echo_testing_string" = "X$echo_test_string"; then 403141098Sdes echo="$dir/echo" 404141098Sdes break 405141098Sdes fi 406141098Sdes done 407141098Sdes IFS="$lt_save_ifs" 408141098Sdes 409141098Sdes if test "X$echo" = Xecho; then 410141098Sdes # We didn't find a better echo, so look for alternatives. 411141098Sdes if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 412141098Sdes echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 413141098Sdes test "X$echo_testing_string" = "X$echo_test_string"; then 414141098Sdes # This shell has a builtin print -r that does the trick. 415141098Sdes echo='print -r' 416141098Sdes elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 417141098Sdes test "X$CONFIG_SHELL" != X/bin/ksh; then 418141098Sdes # If we have ksh, try running configure again with it. 419141098Sdes ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 420141098Sdes export ORIGINAL_CONFIG_SHELL 421141098Sdes CONFIG_SHELL=/bin/ksh 422141098Sdes export CONFIG_SHELL 423141098Sdes exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 424141098Sdes else 425141098Sdes # Try using printf. 426141098Sdes echo='printf %s\n' 427141098Sdes if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 428141098Sdes echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 429141098Sdes test "X$echo_testing_string" = "X$echo_test_string"; then 430141098Sdes # Cool, printf works 431141098Sdes : 432141098Sdes elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 433141098Sdes test "X$echo_testing_string" = 'X\t' && 434141098Sdes echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 435141098Sdes test "X$echo_testing_string" = "X$echo_test_string"; then 436141098Sdes CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 437141098Sdes export CONFIG_SHELL 438141098Sdes SHELL="$CONFIG_SHELL" 439141098Sdes export SHELL 440141098Sdes echo="$CONFIG_SHELL [$]0 --fallback-echo" 441141098Sdes elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 442141098Sdes test "X$echo_testing_string" = 'X\t' && 443141098Sdes echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 444141098Sdes test "X$echo_testing_string" = "X$echo_test_string"; then 445141098Sdes echo="$CONFIG_SHELL [$]0 --fallback-echo" 446141098Sdes else 447141098Sdes # maybe with a smaller string... 448141098Sdes prev=: 449141098Sdes 450141098Sdes for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 451141098Sdes if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 452141098Sdes then 453141098Sdes break 454141098Sdes fi 455141098Sdes prev="$cmd" 456141098Sdes done 457141098Sdes 458141098Sdes if test "$prev" != 'sed 50q "[$]0"'; then 459141098Sdes echo_test_string=`eval $prev` 460141098Sdes export echo_test_string 461141098Sdes exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 462141098Sdes else 463141098Sdes # Oops. We lost completely, so just stick with echo. 464141098Sdes echo=echo 465141098Sdes fi 466141098Sdes fi 467141098Sdes fi 468141098Sdes fi 469141098Sdesfi 470141098Sdesfi 471141098Sdes 472141098Sdes# Copy echo and quote the copy suitably for passing to libtool from 473141098Sdes# the Makefile, instead of quoting the original, which is used later. 474141098SdesECHO=$echo 475141098Sdesif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 476141098Sdes ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 477141098Sdesfi 478141098Sdes 479141098SdesAC_SUBST(ECHO) 480141098Sdes])])# _LT_AC_PROG_ECHO_BACKSLASH 481141098Sdes 482141098Sdes 483141098Sdes# _LT_AC_LOCK 484141098Sdes# ----------- 485141098SdesAC_DEFUN([_LT_AC_LOCK], 486141098Sdes[AC_ARG_ENABLE([libtool-lock], 487141098Sdes [AC_HELP_STRING([--disable-libtool-lock], 488141098Sdes [avoid locking (might break parallel builds)])]) 489141098Sdestest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 490141098Sdes 491117610Sdes# Some flags need to be propagated to the compiler or linker for good 492117610Sdes# libtool support. 493141098Sdescase $host in 494141098Sdesia64-*-hpux*) 495141098Sdes # Find out which ABI we are using. 496141098Sdes echo 'int i;' > conftest.$ac_ext 497141098Sdes if AC_TRY_EVAL(ac_compile); then 498141098Sdes case `/usr/bin/file conftest.$ac_objext` in 499141098Sdes *ELF-32*) 500141098Sdes HPUX_IA64_MODE="32" 501141098Sdes ;; 502141098Sdes *ELF-64*) 503141098Sdes HPUX_IA64_MODE="64" 504141098Sdes ;; 505141098Sdes esac 506141098Sdes fi 507141098Sdes rm -rf conftest* 508141098Sdes ;; 509117610Sdes*-*-irix6*) 510117610Sdes # Find out which ABI we are using. 511117610Sdes echo '[#]line __oline__ "configure"' > conftest.$ac_ext 512117610Sdes if AC_TRY_EVAL(ac_compile); then 513141098Sdes if test "$lt_cv_prog_gnu_ld" = yes; then 514141098Sdes case `/usr/bin/file conftest.$ac_objext` in 515117610Sdes *32-bit*) 516141098Sdes LD="${LD-ld} -melf32bsmip" 517141098Sdes ;; 518141098Sdes *N32*) 519141098Sdes LD="${LD-ld} -melf32bmipn32" 520141098Sdes ;; 521141098Sdes *64-bit*) 522141098Sdes LD="${LD-ld} -melf64bmip" 523141098Sdes ;; 524141098Sdes esac 525141098Sdes else 526141098Sdes case `/usr/bin/file conftest.$ac_objext` in 527141098Sdes *32-bit*) 528117610Sdes LD="${LD-ld} -32" 529117610Sdes ;; 530117610Sdes *N32*) 531117610Sdes LD="${LD-ld} -n32" 532117610Sdes ;; 533117610Sdes *64-bit*) 534117610Sdes LD="${LD-ld} -64" 535117610Sdes ;; 536117610Sdes esac 537141098Sdes fi 538117610Sdes fi 539117610Sdes rm -rf conftest* 540117610Sdes ;; 541117610Sdes 542174832Sdesx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 543174832Sdess390*-*linux*|sparc*-*linux*) 544141098Sdes # Find out which ABI we are using. 545141098Sdes echo 'int i;' > conftest.$ac_ext 546141098Sdes if AC_TRY_EVAL(ac_compile); then 547174832Sdes case `/usr/bin/file conftest.o` in 548141098Sdes *32-bit*) 549141098Sdes case $host in 550174832Sdes x86_64-*kfreebsd*-gnu) 551174832Sdes LD="${LD-ld} -m elf_i386_fbsd" 552174832Sdes ;; 553141098Sdes x86_64-*linux*) 554141098Sdes LD="${LD-ld} -m elf_i386" 555141098Sdes ;; 556141098Sdes ppc64-*linux*|powerpc64-*linux*) 557141098Sdes LD="${LD-ld} -m elf32ppclinux" 558141098Sdes ;; 559141098Sdes s390x-*linux*) 560141098Sdes LD="${LD-ld} -m elf_s390" 561141098Sdes ;; 562141098Sdes sparc64-*linux*) 563141098Sdes LD="${LD-ld} -m elf32_sparc" 564141098Sdes ;; 565141098Sdes esac 566141098Sdes ;; 567141098Sdes *64-bit*) 568141098Sdes case $host in 569174832Sdes x86_64-*kfreebsd*-gnu) 570174832Sdes LD="${LD-ld} -m elf_x86_64_fbsd" 571174832Sdes ;; 572141098Sdes x86_64-*linux*) 573141098Sdes LD="${LD-ld} -m elf_x86_64" 574141098Sdes ;; 575141098Sdes ppc*-*linux*|powerpc*-*linux*) 576141098Sdes LD="${LD-ld} -m elf64ppc" 577141098Sdes ;; 578141098Sdes s390*-*linux*) 579141098Sdes LD="${LD-ld} -m elf64_s390" 580141098Sdes ;; 581141098Sdes sparc*-*linux*) 582141098Sdes LD="${LD-ld} -m elf64_sparc" 583141098Sdes ;; 584141098Sdes esac 585141098Sdes ;; 586141098Sdes esac 587141098Sdes fi 588141098Sdes rm -rf conftest* 589141098Sdes ;; 590141098Sdes 591117610Sdes*-*-sco3.2v5*) 592117610Sdes # On SCO OpenServer 5, we need -belf to get full-featured binaries. 593117610Sdes SAVE_CFLAGS="$CFLAGS" 594117610Sdes CFLAGS="$CFLAGS -belf" 595117610Sdes AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 596141098Sdes [AC_LANG_PUSH(C) 597141098Sdes AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 598141098Sdes AC_LANG_POP]) 599117610Sdes if test x"$lt_cv_cc_needs_belf" != x"yes"; then 600117610Sdes # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 601117610Sdes CFLAGS="$SAVE_CFLAGS" 602117610Sdes fi 603117610Sdes ;; 604174832Sdessparc*-*solaris*) 605174832Sdes # Find out which ABI we are using. 606174832Sdes echo 'int i;' > conftest.$ac_ext 607174832Sdes if AC_TRY_EVAL(ac_compile); then 608174832Sdes case `/usr/bin/file conftest.o` in 609174832Sdes *64-bit*) 610174832Sdes case $lt_cv_prog_gnu_ld in 611174832Sdes yes*) LD="${LD-ld} -m elf64_sparc" ;; 612174832Sdes *) LD="${LD-ld} -64" ;; 613174832Sdes esac 614174832Sdes ;; 615174832Sdes esac 616174832Sdes fi 617174832Sdes rm -rf conftest* 618174832Sdes ;; 619174832Sdes 620141098SdesAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 621141098Sdes[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 622117610Sdes AC_CHECK_TOOL(DLLTOOL, dlltool, false) 623117610Sdes AC_CHECK_TOOL(AS, as, false) 624117610Sdes AC_CHECK_TOOL(OBJDUMP, objdump, false) 625117610Sdes ;; 626141098Sdes ]) 627117610Sdesesac 628141098Sdes 629141098Sdesneed_locks="$enable_libtool_lock" 630141098Sdes 631141098Sdes])# _LT_AC_LOCK 632141098Sdes 633141098Sdes 634141098Sdes# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 635141098Sdes# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 636141098Sdes# ---------------------------------------------------------------- 637141098Sdes# Check whether the given compiler option works 638141098SdesAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 639141098Sdes[AC_REQUIRE([LT_AC_PROG_SED]) 640141098SdesAC_CACHE_CHECK([$1], [$2], 641141098Sdes [$2=no 642141098Sdes ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 643174832Sdes echo "$lt_simple_compile_test_code" > conftest.$ac_ext 644141098Sdes lt_compiler_flag="$3" 645141098Sdes # Insert the option either (1) after the last *FLAGS variable, or 646141098Sdes # (2) before a word containing "conftest.", or (3) at the end. 647141098Sdes # Note that $ac_compile itself does not contain backslashes and begins 648141098Sdes # with a dollar sign (not a hyphen), so the echo should work correctly. 649141098Sdes # The option is referenced via a variable to avoid confusing sed. 650141098Sdes lt_compile=`echo "$ac_compile" | $SED \ 651174832Sdes -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 652141098Sdes -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 653141098Sdes -e 's:$: $lt_compiler_flag:'` 654141098Sdes (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 655141098Sdes (eval "$lt_compile" 2>conftest.err) 656141098Sdes ac_status=$? 657141098Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 658141098Sdes echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 659141098Sdes if (exit $ac_status) && test -s "$ac_outfile"; then 660141098Sdes # The compiler can only warn and ignore the option if not recognized 661174832Sdes # So say no if there are warnings other than the usual output. 662174832Sdes $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 663174832Sdes $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 664174832Sdes if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 665141098Sdes $2=yes 666141098Sdes fi 667141098Sdes fi 668141098Sdes $rm conftest* 669117610Sdes]) 670117610Sdes 671141098Sdesif test x"[$]$2" = xyes; then 672141098Sdes ifelse([$5], , :, [$5]) 673141098Sdeselse 674141098Sdes ifelse([$6], , :, [$6]) 675141098Sdesfi 676141098Sdes])# AC_LIBTOOL_COMPILER_OPTION 677117610Sdes 678117610Sdes 679141098Sdes# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 680141098Sdes# [ACTION-SUCCESS], [ACTION-FAILURE]) 681141098Sdes# ------------------------------------------------------------ 682141098Sdes# Check whether the given compiler option works 683141098SdesAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 684174832Sdes[AC_REQUIRE([LT_AC_PROG_SED])dnl 685174832SdesAC_CACHE_CHECK([$1], [$2], 686141098Sdes [$2=no 687141098Sdes save_LDFLAGS="$LDFLAGS" 688141098Sdes LDFLAGS="$LDFLAGS $3" 689174832Sdes echo "$lt_simple_link_test_code" > conftest.$ac_ext 690141098Sdes if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 691174832Sdes # The linker can only warn and ignore the option if not recognized 692141098Sdes # So say no if there are warnings 693141098Sdes if test -s conftest.err; then 694141098Sdes # Append any errors to the config.log. 695141098Sdes cat conftest.err 1>&AS_MESSAGE_LOG_FD 696174832Sdes $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 697174832Sdes $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 698174832Sdes if diff conftest.exp conftest.er2 >/dev/null; then 699174832Sdes $2=yes 700174832Sdes fi 701141098Sdes else 702141098Sdes $2=yes 703141098Sdes fi 704141098Sdes fi 705141098Sdes $rm conftest* 706141098Sdes LDFLAGS="$save_LDFLAGS" 707141098Sdes]) 708141098Sdes 709141098Sdesif test x"[$]$2" = xyes; then 710141098Sdes ifelse([$4], , :, [$4]) 711141098Sdeselse 712141098Sdes ifelse([$5], , :, [$5]) 713141098Sdesfi 714141098Sdes])# AC_LIBTOOL_LINKER_OPTION 715141098Sdes 716141098Sdes 717141098Sdes# AC_LIBTOOL_SYS_MAX_CMD_LEN 718141098Sdes# -------------------------- 719141098SdesAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 720141098Sdes[# find the maximum length of command line arguments 721141098SdesAC_MSG_CHECKING([the maximum length of command line arguments]) 722141098SdesAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 723141098Sdes i=0 724141098Sdes teststring="ABCD" 725141098Sdes 726141098Sdes case $build_os in 727141098Sdes msdosdjgpp*) 728141098Sdes # On DJGPP, this test can blow up pretty badly due to problems in libc 729141098Sdes # (any single argument exceeding 2000 bytes causes a buffer overrun 730141098Sdes # during glob expansion). Even if it were fixed, the result of this 731141098Sdes # check would be larger than it should be. 732141098Sdes lt_cv_sys_max_cmd_len=12288; # 12K is about right 733141098Sdes ;; 734141098Sdes 735141098Sdes gnu*) 736141098Sdes # Under GNU Hurd, this test is not required because there is 737141098Sdes # no limit to the length of command line arguments. 738141098Sdes # Libtool will interpret -1 as no limit whatsoever 739141098Sdes lt_cv_sys_max_cmd_len=-1; 740141098Sdes ;; 741141098Sdes 742141098Sdes cygwin* | mingw*) 743141098Sdes # On Win9x/ME, this test blows up -- it succeeds, but takes 744141098Sdes # about 5 minutes as the teststring grows exponentially. 745141098Sdes # Worse, since 9x/ME are not pre-emptively multitasking, 746141098Sdes # you end up with a "frozen" computer, even though with patience 747141098Sdes # the test eventually succeeds (with a max line length of 256k). 748141098Sdes # Instead, let's just punt: use the minimum linelength reported by 749141098Sdes # all of the supported platforms: 8192 (on NT/2K/XP). 750141098Sdes lt_cv_sys_max_cmd_len=8192; 751141098Sdes ;; 752141098Sdes 753141098Sdes amigaos*) 754141098Sdes # On AmigaOS with pdksh, this test takes hours, literally. 755141098Sdes # So we just punt and use a minimum line length of 8192. 756141098Sdes lt_cv_sys_max_cmd_len=8192; 757141098Sdes ;; 758141098Sdes 759147455Sdes netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 760141098Sdes # This has been around since 386BSD, at least. Likely further. 761141098Sdes if test -x /sbin/sysctl; then 762141098Sdes lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 763141098Sdes elif test -x /usr/sbin/sysctl; then 764141098Sdes lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 765141098Sdes else 766174832Sdes lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 767117610Sdes fi 768141098Sdes # And add a safety zone 769141098Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 770174832Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 771141098Sdes ;; 772174832Sdes 773174832Sdes interix*) 774174832Sdes # We know the value 262144 and hardcode it with a safety zone (like BSD) 775174832Sdes lt_cv_sys_max_cmd_len=196608 776174832Sdes ;; 777174832Sdes 778147455Sdes osf*) 779147455Sdes # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 780147455Sdes # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 781147455Sdes # nice to cause kernel panics so lets avoid the loop below. 782147455Sdes # First set a reasonable default. 783147455Sdes lt_cv_sys_max_cmd_len=16384 784174832Sdes # 785147455Sdes if test -x /sbin/sysconfig; then 786147455Sdes case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 787147455Sdes *1*) lt_cv_sys_max_cmd_len=-1 ;; 788147455Sdes esac 789147455Sdes fi 790147455Sdes ;; 791174832Sdes sco3.2v5*) 792174832Sdes lt_cv_sys_max_cmd_len=102400 793174832Sdes ;; 794174832Sdes sysv5* | sco5v6* | sysv4.2uw2*) 795174832Sdes kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 796174832Sdes if test -n "$kargmax"; then 797174832Sdes lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 798174832Sdes else 799174832Sdes lt_cv_sys_max_cmd_len=32768 800174832Sdes fi 801174832Sdes ;; 802147455Sdes *) 803174832Sdes lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 804174832Sdes if test -n "$lt_cv_sys_max_cmd_len"; then 805174832Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 806174832Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 807174832Sdes else 808174832Sdes SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 809174832Sdes while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 810141098Sdes = "XX$teststring") >/dev/null 2>&1 && 811174832Sdes new_result=`expr "X$teststring" : ".*" 2>&1` && 812174832Sdes lt_cv_sys_max_cmd_len=$new_result && 813174832Sdes test $i != 17 # 1/2 MB should be enough 814174832Sdes do 815174832Sdes i=`expr $i + 1` 816174832Sdes teststring=$teststring$teststring 817174832Sdes done 818174832Sdes teststring= 819174832Sdes # Add a significant safety factor because C++ compilers can tack on massive 820174832Sdes # amounts of additional arguments before passing them to the linker. 821174832Sdes # It appears as though 1/2 is a usable value. 822174832Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 823174832Sdes fi 824141098Sdes ;; 825141098Sdes esac 826117610Sdes]) 827141098Sdesif test -n $lt_cv_sys_max_cmd_len ; then 828141098Sdes AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 829141098Sdeselse 830141098Sdes AC_MSG_RESULT(none) 831141098Sdesfi 832141098Sdes])# AC_LIBTOOL_SYS_MAX_CMD_LEN 833117610Sdes 834117610Sdes 835141098Sdes# _LT_AC_CHECK_DLFCN 836174832Sdes# ------------------ 837141098SdesAC_DEFUN([_LT_AC_CHECK_DLFCN], 838141098Sdes[AC_CHECK_HEADERS(dlfcn.h)dnl 839141098Sdes])# _LT_AC_CHECK_DLFCN 840141098Sdes 841141098Sdes 842141098Sdes# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 843141098Sdes# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 844174832Sdes# --------------------------------------------------------------------- 845141098SdesAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 846141098Sdes[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 847141098Sdesif test "$cross_compiling" = yes; then : 848141098Sdes [$4] 849141098Sdeselse 850141098Sdes lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 851141098Sdes lt_status=$lt_dlunknown 852141098Sdes cat > conftest.$ac_ext <<EOF 853141098Sdes[#line __oline__ "configure" 854141098Sdes#include "confdefs.h" 855141098Sdes 856141098Sdes#if HAVE_DLFCN_H 857141098Sdes#include <dlfcn.h> 858141098Sdes#endif 859141098Sdes 860141098Sdes#include <stdio.h> 861141098Sdes 862141098Sdes#ifdef RTLD_GLOBAL 863141098Sdes# define LT_DLGLOBAL RTLD_GLOBAL 864141098Sdes#else 865141098Sdes# ifdef DL_GLOBAL 866141098Sdes# define LT_DLGLOBAL DL_GLOBAL 867141098Sdes# else 868141098Sdes# define LT_DLGLOBAL 0 869141098Sdes# endif 870141098Sdes#endif 871141098Sdes 872141098Sdes/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 873141098Sdes find out it does not work in some platform. */ 874141098Sdes#ifndef LT_DLLAZY_OR_NOW 875141098Sdes# ifdef RTLD_LAZY 876141098Sdes# define LT_DLLAZY_OR_NOW RTLD_LAZY 877141098Sdes# else 878141098Sdes# ifdef DL_LAZY 879141098Sdes# define LT_DLLAZY_OR_NOW DL_LAZY 880141098Sdes# else 881141098Sdes# ifdef RTLD_NOW 882141098Sdes# define LT_DLLAZY_OR_NOW RTLD_NOW 883141098Sdes# else 884141098Sdes# ifdef DL_NOW 885141098Sdes# define LT_DLLAZY_OR_NOW DL_NOW 886141098Sdes# else 887141098Sdes# define LT_DLLAZY_OR_NOW 0 888141098Sdes# endif 889141098Sdes# endif 890141098Sdes# endif 891141098Sdes# endif 892141098Sdes#endif 893141098Sdes 894141098Sdes#ifdef __cplusplus 895141098Sdesextern "C" void exit (int); 896141098Sdes#endif 897141098Sdes 898141098Sdesvoid fnord() { int i=42;} 899141098Sdesint main () 900141098Sdes{ 901141098Sdes void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 902141098Sdes int status = $lt_dlunknown; 903141098Sdes 904141098Sdes if (self) 905141098Sdes { 906141098Sdes if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 907141098Sdes else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 908141098Sdes /* dlclose (self); */ 909141098Sdes } 910174832Sdes else 911174832Sdes puts (dlerror ()); 912141098Sdes 913141098Sdes exit (status); 914141098Sdes}] 915141098SdesEOF 916141098Sdes if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 917174832Sdes (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 918141098Sdes lt_status=$? 919141098Sdes case x$lt_status in 920141098Sdes x$lt_dlno_uscore) $1 ;; 921141098Sdes x$lt_dlneed_uscore) $2 ;; 922174832Sdes x$lt_dlunknown|x*) $3 ;; 923141098Sdes esac 924141098Sdes else : 925141098Sdes # compilation failed 926141098Sdes $3 927141098Sdes fi 928141098Sdesfi 929141098Sdesrm -fr conftest* 930141098Sdes])# _LT_AC_TRY_DLOPEN_SELF 931141098Sdes 932141098Sdes 933141098Sdes# AC_LIBTOOL_DLOPEN_SELF 934174832Sdes# ---------------------- 935141098SdesAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 936141098Sdes[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 937141098Sdesif test "x$enable_dlopen" != xyes; then 938141098Sdes enable_dlopen=unknown 939141098Sdes enable_dlopen_self=unknown 940141098Sdes enable_dlopen_self_static=unknown 941141098Sdeselse 942141098Sdes lt_cv_dlopen=no 943141098Sdes lt_cv_dlopen_libs= 944141098Sdes 945141098Sdes case $host_os in 946141098Sdes beos*) 947141098Sdes lt_cv_dlopen="load_add_on" 948141098Sdes lt_cv_dlopen_libs= 949141098Sdes lt_cv_dlopen_self=yes 950141098Sdes ;; 951141098Sdes 952141098Sdes mingw* | pw32*) 953141098Sdes lt_cv_dlopen="LoadLibrary" 954141098Sdes lt_cv_dlopen_libs= 955141098Sdes ;; 956141098Sdes 957141098Sdes cygwin*) 958141098Sdes lt_cv_dlopen="dlopen" 959141098Sdes lt_cv_dlopen_libs= 960141098Sdes ;; 961141098Sdes 962141098Sdes darwin*) 963141098Sdes # if libdl is installed we need to link against it 964141098Sdes AC_CHECK_LIB([dl], [dlopen], 965141098Sdes [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 966141098Sdes lt_cv_dlopen="dyld" 967141098Sdes lt_cv_dlopen_libs= 968141098Sdes lt_cv_dlopen_self=yes 969141098Sdes ]) 970141098Sdes ;; 971141098Sdes 972141098Sdes *) 973141098Sdes AC_CHECK_FUNC([shl_load], 974141098Sdes [lt_cv_dlopen="shl_load"], 975141098Sdes [AC_CHECK_LIB([dld], [shl_load], 976141098Sdes [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 977141098Sdes [AC_CHECK_FUNC([dlopen], 978141098Sdes [lt_cv_dlopen="dlopen"], 979141098Sdes [AC_CHECK_LIB([dl], [dlopen], 980141098Sdes [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 981141098Sdes [AC_CHECK_LIB([svld], [dlopen], 982141098Sdes [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 983141098Sdes [AC_CHECK_LIB([dld], [dld_link], 984141098Sdes [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 985141098Sdes ]) 986141098Sdes ]) 987141098Sdes ]) 988141098Sdes ]) 989141098Sdes ]) 990141098Sdes ;; 991141098Sdes esac 992141098Sdes 993141098Sdes if test "x$lt_cv_dlopen" != xno; then 994141098Sdes enable_dlopen=yes 995141098Sdes else 996141098Sdes enable_dlopen=no 997141098Sdes fi 998141098Sdes 999141098Sdes case $lt_cv_dlopen in 1000141098Sdes dlopen) 1001141098Sdes save_CPPFLAGS="$CPPFLAGS" 1002141098Sdes test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1003141098Sdes 1004141098Sdes save_LDFLAGS="$LDFLAGS" 1005174832Sdes wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1006141098Sdes 1007141098Sdes save_LIBS="$LIBS" 1008141098Sdes LIBS="$lt_cv_dlopen_libs $LIBS" 1009141098Sdes 1010141098Sdes AC_CACHE_CHECK([whether a program can dlopen itself], 1011141098Sdes lt_cv_dlopen_self, [dnl 1012141098Sdes _LT_AC_TRY_DLOPEN_SELF( 1013141098Sdes lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1014141098Sdes lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1015141098Sdes ]) 1016141098Sdes 1017141098Sdes if test "x$lt_cv_dlopen_self" = xyes; then 1018174832Sdes wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1019141098Sdes AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1020141098Sdes lt_cv_dlopen_self_static, [dnl 1021141098Sdes _LT_AC_TRY_DLOPEN_SELF( 1022141098Sdes lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1023141098Sdes lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1024141098Sdes ]) 1025141098Sdes fi 1026141098Sdes 1027141098Sdes CPPFLAGS="$save_CPPFLAGS" 1028141098Sdes LDFLAGS="$save_LDFLAGS" 1029141098Sdes LIBS="$save_LIBS" 1030141098Sdes ;; 1031141098Sdes esac 1032141098Sdes 1033141098Sdes case $lt_cv_dlopen_self in 1034141098Sdes yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1035141098Sdes *) enable_dlopen_self=unknown ;; 1036141098Sdes esac 1037141098Sdes 1038141098Sdes case $lt_cv_dlopen_self_static in 1039141098Sdes yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1040141098Sdes *) enable_dlopen_self_static=unknown ;; 1041141098Sdes esac 1042141098Sdesfi 1043141098Sdes])# AC_LIBTOOL_DLOPEN_SELF 1044141098Sdes 1045141098Sdes 1046141098Sdes# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 1047141098Sdes# --------------------------------- 1048141098Sdes# Check to see if options -c and -o are simultaneously supported by compiler 1049141098SdesAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 1050174832Sdes[AC_REQUIRE([LT_AC_PROG_SED])dnl 1051174832SdesAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1052141098SdesAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1053141098Sdes [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1054141098Sdes [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1055141098Sdes $rm -r conftest 2>/dev/null 1056141098Sdes mkdir conftest 1057141098Sdes cd conftest 1058141098Sdes mkdir out 1059174832Sdes echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1060141098Sdes 1061141098Sdes lt_compiler_flag="-o out/conftest2.$ac_objext" 1062141098Sdes # Insert the option either (1) after the last *FLAGS variable, or 1063141098Sdes # (2) before a word containing "conftest.", or (3) at the end. 1064141098Sdes # Note that $ac_compile itself does not contain backslashes and begins 1065141098Sdes # with a dollar sign (not a hyphen), so the echo should work correctly. 1066141098Sdes lt_compile=`echo "$ac_compile" | $SED \ 1067174832Sdes -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1068141098Sdes -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1069141098Sdes -e 's:$: $lt_compiler_flag:'` 1070141098Sdes (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1071141098Sdes (eval "$lt_compile" 2>out/conftest.err) 1072141098Sdes ac_status=$? 1073141098Sdes cat out/conftest.err >&AS_MESSAGE_LOG_FD 1074141098Sdes echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1075141098Sdes if (exit $ac_status) && test -s out/conftest2.$ac_objext 1076141098Sdes then 1077141098Sdes # The compiler can only warn and ignore the option if not recognized 1078141098Sdes # So say no if there are warnings 1079174832Sdes $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1080174832Sdes $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1081174832Sdes if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1082141098Sdes _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1083141098Sdes fi 1084141098Sdes fi 1085174832Sdes chmod u+w . 2>&AS_MESSAGE_LOG_FD 1086141098Sdes $rm conftest* 1087141098Sdes # SGI C++ compiler will create directory out/ii_files/ for 1088141098Sdes # template instantiation 1089141098Sdes test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1090141098Sdes $rm out/* && rmdir out 1091141098Sdes cd .. 1092141098Sdes rmdir conftest 1093141098Sdes $rm conftest* 1094141098Sdes]) 1095141098Sdes])# AC_LIBTOOL_PROG_CC_C_O 1096141098Sdes 1097141098Sdes 1098141098Sdes# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1099141098Sdes# ----------------------------------------- 1100141098Sdes# Check to see if we can do hard links to lock some files if needed 1101141098SdesAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1102141098Sdes[AC_REQUIRE([_LT_AC_LOCK])dnl 1103141098Sdes 1104141098Sdeshard_links="nottested" 1105141098Sdesif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1106141098Sdes # do not overwrite the value of need_locks provided by the user 1107141098Sdes AC_MSG_CHECKING([if we can lock with hard links]) 1108141098Sdes hard_links=yes 1109141098Sdes $rm conftest* 1110141098Sdes ln conftest.a conftest.b 2>/dev/null && hard_links=no 1111141098Sdes touch conftest.a 1112141098Sdes ln conftest.a conftest.b 2>&5 || hard_links=no 1113141098Sdes ln conftest.a conftest.b 2>/dev/null && hard_links=no 1114141098Sdes AC_MSG_RESULT([$hard_links]) 1115141098Sdes if test "$hard_links" = no; then 1116141098Sdes AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1117141098Sdes need_locks=warn 1118141098Sdes fi 1119141098Sdeselse 1120141098Sdes need_locks=no 1121141098Sdesfi 1122141098Sdes])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1123141098Sdes 1124141098Sdes 1125141098Sdes# AC_LIBTOOL_OBJDIR 1126141098Sdes# ----------------- 1127141098SdesAC_DEFUN([AC_LIBTOOL_OBJDIR], 1128141098Sdes[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1129141098Sdes[rm -f .libs 2>/dev/null 1130141098Sdesmkdir .libs 2>/dev/null 1131141098Sdesif test -d .libs; then 1132141098Sdes lt_cv_objdir=.libs 1133141098Sdeselse 1134141098Sdes # MS-DOS does not allow filenames that begin with a dot. 1135141098Sdes lt_cv_objdir=_libs 1136141098Sdesfi 1137141098Sdesrmdir .libs 2>/dev/null]) 1138141098Sdesobjdir=$lt_cv_objdir 1139141098Sdes])# AC_LIBTOOL_OBJDIR 1140141098Sdes 1141141098Sdes 1142141098Sdes# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1143141098Sdes# ---------------------------------------------- 1144141098Sdes# Check hardcoding attributes. 1145141098SdesAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 1146141098Sdes[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1147141098Sdes_LT_AC_TAGVAR(hardcode_action, $1)= 1148141098Sdesif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1149141098Sdes test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1150141098Sdes test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1151141098Sdes 1152141098Sdes # We can hardcode non-existant directories. 1153141098Sdes if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 1154141098Sdes # If the only mechanism to avoid hardcoding is shlibpath_var, we 1155141098Sdes # have to relink, otherwise we might link with an installed library 1156141098Sdes # when we should be linking with a yet-to-be-installed one 1157141098Sdes ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1158141098Sdes test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 1159141098Sdes # Linking always hardcodes the temporary library directory. 1160141098Sdes _LT_AC_TAGVAR(hardcode_action, $1)=relink 1161141098Sdes else 1162141098Sdes # We can link without hardcoding, and we can hardcode nonexisting dirs. 1163141098Sdes _LT_AC_TAGVAR(hardcode_action, $1)=immediate 1164141098Sdes fi 1165141098Sdeselse 1166141098Sdes # We cannot hardcode anything, or else we can only hardcode existing 1167141098Sdes # directories. 1168141098Sdes _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1169141098Sdesfi 1170141098SdesAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1171141098Sdes 1172141098Sdesif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 1173141098Sdes # Fast installation is not supported 1174141098Sdes enable_fast_install=no 1175141098Sdeselif test "$shlibpath_overrides_runpath" = yes || 1176141098Sdes test "$enable_shared" = no; then 1177141098Sdes # Fast installation is not necessary 1178141098Sdes enable_fast_install=needless 1179141098Sdesfi 1180141098Sdes])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 1181141098Sdes 1182141098Sdes 1183141098Sdes# AC_LIBTOOL_SYS_LIB_STRIP 1184141098Sdes# ------------------------ 1185141098SdesAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1186141098Sdes[striplib= 1187141098Sdesold_striplib= 1188141098SdesAC_MSG_CHECKING([whether stripping libraries is possible]) 1189141098Sdesif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 1190141098Sdes test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 1191141098Sdes test -z "$striplib" && striplib="$STRIP --strip-unneeded" 1192141098Sdes AC_MSG_RESULT([yes]) 1193141098Sdeselse 1194141098Sdes# FIXME - insert some real tests, host_os isn't really good enough 1195141098Sdes case $host_os in 1196141098Sdes darwin*) 1197141098Sdes if test -n "$STRIP" ; then 1198141098Sdes striplib="$STRIP -x" 1199174832Sdes old_striplib="$STRIP -S" 1200141098Sdes AC_MSG_RESULT([yes]) 1201141098Sdes else 1202141098Sdes AC_MSG_RESULT([no]) 1203141098Sdesfi 1204141098Sdes ;; 1205141098Sdes *) 1206141098Sdes AC_MSG_RESULT([no]) 1207141098Sdes ;; 1208141098Sdes esac 1209141098Sdesfi 1210141098Sdes])# AC_LIBTOOL_SYS_LIB_STRIP 1211141098Sdes 1212141098Sdes 1213141098Sdes# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1214141098Sdes# ----------------------------- 1215141098Sdes# PORTME Fill in your ld.so characteristics 1216141098SdesAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1217174832Sdes[AC_REQUIRE([LT_AC_PROG_SED])dnl 1218174832SdesAC_MSG_CHECKING([dynamic linker characteristics]) 1219141098Sdeslibrary_names_spec= 1220141098Sdeslibname_spec='lib$name' 1221141098Sdessoname_spec= 1222141098Sdesshrext_cmds=".so" 1223141098Sdespostinstall_cmds= 1224141098Sdespostuninstall_cmds= 1225141098Sdesfinish_cmds= 1226141098Sdesfinish_eval= 1227141098Sdesshlibpath_var= 1228141098Sdesshlibpath_overrides_runpath=unknown 1229141098Sdesversion_type=none 1230141098Sdesdynamic_linker="$host_os ld.so" 1231141098Sdessys_lib_dlsearch_path_spec="/lib /usr/lib" 1232174832Sdesm4_if($1,[],[ 1233141098Sdesif test "$GCC" = yes; then 1234174832Sdes case $host_os in 1235174832Sdes darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 1236174832Sdes *) lt_awk_arg="/^libraries:/" ;; 1237174832Sdes esac 1238174832Sdes lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1239174832Sdes if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 1240141098Sdes # if the path contains ";" then we assume it to be the separator 1241141098Sdes # otherwise default to the standard path separator (i.e. ":") - it is 1242141098Sdes # assumed that no part of a normal pathname contains ";" but that should 1243141098Sdes # okay in the real world where ";" in dirpaths is itself problematic. 1244174832Sdes lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 1245141098Sdes else 1246174832Sdes lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1247141098Sdes fi 1248174832Sdes # Ok, now we have the path, separated by spaces, we can step through it 1249174832Sdes # and add multilib dir if necessary. 1250174832Sdes lt_tmp_lt_search_path_spec= 1251174832Sdes lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 1252174832Sdes for lt_sys_path in $lt_search_path_spec; do 1253174832Sdes if test -d "$lt_sys_path/$lt_multi_os_dir"; then 1254174832Sdes lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 1255174832Sdes else 1256174832Sdes test -d "$lt_sys_path" && \ 1257174832Sdes lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 1258174832Sdes fi 1259174832Sdes done 1260174832Sdes lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 1261174832SdesBEGIN {RS=" "; FS="/|\n";} { 1262174832Sdes lt_foo=""; 1263174832Sdes lt_count=0; 1264174832Sdes for (lt_i = NF; lt_i > 0; lt_i--) { 1265174832Sdes if ($lt_i != "" && $lt_i != ".") { 1266174832Sdes if ($lt_i == "..") { 1267174832Sdes lt_count++; 1268174832Sdes } else { 1269174832Sdes if (lt_count == 0) { 1270174832Sdes lt_foo="/" $lt_i lt_foo; 1271174832Sdes } else { 1272174832Sdes lt_count--; 1273174832Sdes } 1274174832Sdes } 1275174832Sdes } 1276174832Sdes } 1277174832Sdes if (lt_foo != "") { lt_freq[[lt_foo]]++; } 1278174832Sdes if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 1279174832Sdes}'` 1280174832Sdes sys_lib_search_path_spec=`echo $lt_search_path_spec` 1281141098Sdeselse 1282141098Sdes sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 1283174832Sdesfi]) 1284141098Sdesneed_lib_prefix=unknown 1285141098Sdeshardcode_into_libs=no 1286141098Sdes 1287141098Sdes# when you set need_version to no, make sure it does not cause -set_version 1288141098Sdes# flags to be left without arguments 1289141098Sdesneed_version=unknown 1290141098Sdes 1291141098Sdescase $host_os in 1292141098Sdesaix3*) 1293141098Sdes version_type=linux 1294141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 1295141098Sdes shlibpath_var=LIBPATH 1296141098Sdes 1297141098Sdes # AIX 3 has no versioning support, so we append a major version to the name. 1298141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1299141098Sdes ;; 1300141098Sdes 1301141098Sdesaix4* | aix5*) 1302141098Sdes version_type=linux 1303141098Sdes need_lib_prefix=no 1304141098Sdes need_version=no 1305141098Sdes hardcode_into_libs=yes 1306141098Sdes if test "$host_cpu" = ia64; then 1307141098Sdes # AIX 5 supports IA64 1308141098Sdes library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 1309141098Sdes shlibpath_var=LD_LIBRARY_PATH 1310141098Sdes else 1311141098Sdes # With GCC up to 2.95.x, collect2 would create an import file 1312141098Sdes # for dependence libraries. The import file would start with 1313141098Sdes # the line `#! .'. This would cause the generated library to 1314141098Sdes # depend on `.', always an invalid library. This was fixed in 1315141098Sdes # development snapshots of GCC prior to 3.0. 1316141098Sdes case $host_os in 1317141098Sdes aix4 | aix4.[[01]] | aix4.[[01]].*) 1318141098Sdes if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 1319141098Sdes echo ' yes ' 1320141098Sdes echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 1321141098Sdes : 1322141098Sdes else 1323141098Sdes can_build_shared=no 1324141098Sdes fi 1325141098Sdes ;; 1326141098Sdes esac 1327141098Sdes # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 1328141098Sdes # soname into executable. Probably we can add versioning support to 1329141098Sdes # collect2, so additional links can be useful in future. 1330141098Sdes if test "$aix_use_runtimelinking" = yes; then 1331141098Sdes # If using run time linking (on AIX 4.2 or later) use lib<name>.so 1332141098Sdes # instead of lib<name>.a to let people know that these are not 1333141098Sdes # typical AIX shared libraries. 1334141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1335141098Sdes else 1336141098Sdes # We preserve .a as extension for shared libraries through AIX4.2 1337141098Sdes # and later when we are not doing run time linking. 1338141098Sdes library_names_spec='${libname}${release}.a $libname.a' 1339141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1340141098Sdes fi 1341141098Sdes shlibpath_var=LIBPATH 1342141098Sdes fi 1343141098Sdes ;; 1344141098Sdes 1345141098Sdesamigaos*) 1346141098Sdes library_names_spec='$libname.ixlibrary $libname.a' 1347141098Sdes # Create ${libname}_ixlibrary.a entries in /sys/libs. 1348141098Sdes 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' 1349141098Sdes ;; 1350141098Sdes 1351141098Sdesbeos*) 1352141098Sdes library_names_spec='${libname}${shared_ext}' 1353141098Sdes dynamic_linker="$host_os ld.so" 1354141098Sdes shlibpath_var=LIBRARY_PATH 1355141098Sdes ;; 1356141098Sdes 1357141098Sdesbsdi[[45]]*) 1358141098Sdes version_type=linux 1359141098Sdes need_version=no 1360141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1361141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1362141098Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 1363141098Sdes shlibpath_var=LD_LIBRARY_PATH 1364141098Sdes sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 1365141098Sdes sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 1366141098Sdes # the default ld.so.conf also contains /usr/contrib/lib and 1367141098Sdes # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 1368141098Sdes # libtool to hard-code these into programs 1369141098Sdes ;; 1370141098Sdes 1371141098Sdescygwin* | mingw* | pw32*) 1372141098Sdes version_type=windows 1373141098Sdes shrext_cmds=".dll" 1374141098Sdes need_version=no 1375141098Sdes need_lib_prefix=no 1376141098Sdes 1377141098Sdes case $GCC,$host_os in 1378141098Sdes yes,cygwin* | yes,mingw* | yes,pw32*) 1379141098Sdes library_names_spec='$libname.dll.a' 1380141098Sdes # DLL is installed to $(libdir)/../bin by postinstall_cmds 1381141098Sdes postinstall_cmds='base_file=`basename \${file}`~ 1382141098Sdes dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 1383141098Sdes dldir=$destdir/`dirname \$dlpath`~ 1384141098Sdes test -d \$dldir || mkdir -p \$dldir~ 1385174832Sdes $install_prog $dir/$dlname \$dldir/$dlname~ 1386174832Sdes chmod a+x \$dldir/$dlname' 1387141098Sdes postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 1388141098Sdes dlpath=$dir/\$dldll~ 1389141098Sdes $rm \$dlpath' 1390141098Sdes shlibpath_overrides_runpath=yes 1391141098Sdes 1392141098Sdes case $host_os in 1393141098Sdes cygwin*) 1394141098Sdes # Cygwin DLLs use 'cyg' prefix rather than 'lib' 1395141098Sdes soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1396141098Sdes sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 1397141098Sdes ;; 1398141098Sdes mingw*) 1399141098Sdes # MinGW DLLs use traditional 'lib' prefix 1400141098Sdes soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1401141098Sdes sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1402141098Sdes if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 1403141098Sdes # It is most probably a Windows format PATH printed by 1404141098Sdes # mingw gcc, but we are running on Cygwin. Gcc prints its search 1405141098Sdes # path with ; separators, and with drive letters. We can handle the 1406141098Sdes # drive letters (cygwin fileutils understands them), so leave them, 1407141098Sdes # especially as we might pass files found there to a mingw objdump, 1408141098Sdes # which wouldn't understand a cygwinified path. Ahh. 1409141098Sdes sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1410141098Sdes else 1411141098Sdes sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1412141098Sdes fi 1413141098Sdes ;; 1414141098Sdes pw32*) 1415141098Sdes # pw32 DLLs use 'pw' prefix rather than 'lib' 1416147455Sdes library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1417141098Sdes ;; 1418141098Sdes esac 1419141098Sdes ;; 1420141098Sdes 1421141098Sdes *) 1422141098Sdes library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 1423141098Sdes ;; 1424141098Sdes esac 1425141098Sdes dynamic_linker='Win32 ld.exe' 1426141098Sdes # FIXME: first we should search . and the directory the executable is in 1427141098Sdes shlibpath_var=PATH 1428141098Sdes ;; 1429141098Sdes 1430141098Sdesdarwin* | rhapsody*) 1431141098Sdes dynamic_linker="$host_os dyld" 1432141098Sdes version_type=darwin 1433141098Sdes need_lib_prefix=no 1434141098Sdes need_version=no 1435141098Sdes library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 1436141098Sdes soname_spec='${libname}${release}${major}$shared_ext' 1437141098Sdes shlibpath_overrides_runpath=yes 1438141098Sdes shlibpath_var=DYLD_LIBRARY_PATH 1439174832Sdes shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 1440174832Sdes m4_if([$1], [],[ 1441174832Sdes sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 1442141098Sdes sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 1443141098Sdes ;; 1444141098Sdes 1445141098Sdesdgux*) 1446141098Sdes version_type=linux 1447141098Sdes need_lib_prefix=no 1448141098Sdes need_version=no 1449141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 1450141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1451141098Sdes shlibpath_var=LD_LIBRARY_PATH 1452141098Sdes ;; 1453141098Sdes 1454141098Sdesfreebsd1*) 1455141098Sdes dynamic_linker=no 1456141098Sdes ;; 1457141098Sdes 1458147455Sdesfreebsd* | dragonfly*) 1459147455Sdes # DragonFly does not have aout. When/if they implement a new 1460147455Sdes # versioning mechanism, adjust this. 1461174832Sdes if test -x /usr/bin/objformat; then 1462174832Sdes objformat=`/usr/bin/objformat` 1463174832Sdes else 1464174832Sdes case $host_os in 1465174832Sdes freebsd[[123]]*) objformat=aout ;; 1466174832Sdes *) objformat=elf ;; 1467174832Sdes esac 1468174832Sdes fi 1469141098Sdes version_type=freebsd-$objformat 1470141098Sdes case $version_type in 1471141098Sdes freebsd-elf*) 1472141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1473141098Sdes need_version=no 1474141098Sdes need_lib_prefix=no 1475141098Sdes ;; 1476141098Sdes freebsd-*) 1477141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 1478141098Sdes need_version=yes 1479141098Sdes ;; 1480141098Sdes esac 1481141098Sdes shlibpath_var=LD_LIBRARY_PATH 1482141098Sdes case $host_os in 1483141098Sdes freebsd2*) 1484141098Sdes shlibpath_overrides_runpath=yes 1485141098Sdes ;; 1486147455Sdes freebsd3.[[01]]* | freebsdelf3.[[01]]*) 1487141098Sdes shlibpath_overrides_runpath=yes 1488141098Sdes hardcode_into_libs=yes 1489141098Sdes ;; 1490174832Sdes freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 1491174832Sdes freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 1492141098Sdes shlibpath_overrides_runpath=no 1493141098Sdes hardcode_into_libs=yes 1494141098Sdes ;; 1495174832Sdes *) # from 4.6 on, and DragonFly 1496174832Sdes shlibpath_overrides_runpath=yes 1497174832Sdes hardcode_into_libs=yes 1498174832Sdes ;; 1499141098Sdes esac 1500141098Sdes ;; 1501141098Sdes 1502141098Sdesgnu*) 1503141098Sdes version_type=linux 1504141098Sdes need_lib_prefix=no 1505141098Sdes need_version=no 1506141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 1507141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1508141098Sdes shlibpath_var=LD_LIBRARY_PATH 1509141098Sdes hardcode_into_libs=yes 1510141098Sdes ;; 1511141098Sdes 1512141098Sdeshpux9* | hpux10* | hpux11*) 1513141098Sdes # Give a soname corresponding to the major version so that dld.sl refuses to 1514141098Sdes # link against other versions. 1515141098Sdes version_type=sunos 1516141098Sdes need_lib_prefix=no 1517141098Sdes need_version=no 1518174832Sdes case $host_cpu in 1519141098Sdes ia64*) 1520141098Sdes shrext_cmds='.so' 1521141098Sdes hardcode_into_libs=yes 1522141098Sdes dynamic_linker="$host_os dld.so" 1523141098Sdes shlibpath_var=LD_LIBRARY_PATH 1524141098Sdes shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1525141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1526141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1527141098Sdes if test "X$HPUX_IA64_MODE" = X32; then 1528141098Sdes sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 1529141098Sdes else 1530141098Sdes sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 1531141098Sdes fi 1532141098Sdes sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1533141098Sdes ;; 1534141098Sdes hppa*64*) 1535141098Sdes shrext_cmds='.sl' 1536141098Sdes hardcode_into_libs=yes 1537141098Sdes dynamic_linker="$host_os dld.sl" 1538141098Sdes shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1539141098Sdes shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1540141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1541141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1542141098Sdes sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1543141098Sdes sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1544141098Sdes ;; 1545141098Sdes *) 1546141098Sdes shrext_cmds='.sl' 1547141098Sdes dynamic_linker="$host_os dld.sl" 1548141098Sdes shlibpath_var=SHLIB_PATH 1549141098Sdes shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 1550141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1551141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1552141098Sdes ;; 1553141098Sdes esac 1554141098Sdes # HP-UX runs *really* slowly unless shared libraries are mode 555. 1555141098Sdes postinstall_cmds='chmod 555 $lib' 1556141098Sdes ;; 1557141098Sdes 1558174832Sdesinterix[[3-9]]*) 1559174832Sdes version_type=linux 1560174832Sdes need_lib_prefix=no 1561174832Sdes need_version=no 1562174832Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1563174832Sdes soname_spec='${libname}${release}${shared_ext}$major' 1564174832Sdes dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 1565174832Sdes shlibpath_var=LD_LIBRARY_PATH 1566174832Sdes shlibpath_overrides_runpath=no 1567174832Sdes hardcode_into_libs=yes 1568174832Sdes ;; 1569174832Sdes 1570141098Sdesirix5* | irix6* | nonstopux*) 1571141098Sdes case $host_os in 1572141098Sdes nonstopux*) version_type=nonstopux ;; 1573141098Sdes *) 1574141098Sdes if test "$lt_cv_prog_gnu_ld" = yes; then 1575141098Sdes version_type=linux 1576141098Sdes else 1577141098Sdes version_type=irix 1578141098Sdes fi ;; 1579141098Sdes esac 1580141098Sdes need_lib_prefix=no 1581141098Sdes need_version=no 1582141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1583141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 1584141098Sdes case $host_os in 1585141098Sdes irix5* | nonstopux*) 1586141098Sdes libsuff= shlibsuff= 1587141098Sdes ;; 1588141098Sdes *) 1589141098Sdes case $LD in # libtool.m4 will add one of these switches to LD 1590141098Sdes *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 1591141098Sdes libsuff= shlibsuff= libmagic=32-bit;; 1592141098Sdes *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 1593141098Sdes libsuff=32 shlibsuff=N32 libmagic=N32;; 1594141098Sdes *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 1595141098Sdes libsuff=64 shlibsuff=64 libmagic=64-bit;; 1596141098Sdes *) libsuff= shlibsuff= libmagic=never-match;; 1597141098Sdes esac 1598141098Sdes ;; 1599141098Sdes esac 1600141098Sdes shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 1601141098Sdes shlibpath_overrides_runpath=no 1602141098Sdes sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1603141098Sdes sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1604141098Sdes hardcode_into_libs=yes 1605141098Sdes ;; 1606141098Sdes 1607141098Sdes# No shared lib support for Linux oldld, aout, or coff. 1608141098Sdeslinux*oldld* | linux*aout* | linux*coff*) 1609141098Sdes dynamic_linker=no 1610141098Sdes ;; 1611141098Sdes 1612141098Sdes# This must be Linux ELF. 1613174832Sdeslinux* | k*bsd*-gnu) 1614141098Sdes version_type=linux 1615141098Sdes need_lib_prefix=no 1616141098Sdes need_version=no 1617141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1618141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1619141098Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 1620141098Sdes shlibpath_var=LD_LIBRARY_PATH 1621141098Sdes shlibpath_overrides_runpath=no 1622141098Sdes # This implies no fast_install, which is unacceptable. 1623141098Sdes # Some rework will be needed to allow for fast_install 1624141098Sdes # before this can be enabled. 1625141098Sdes hardcode_into_libs=yes 1626141098Sdes 1627141098Sdes # Append ld.so.conf contents to the search path 1628141098Sdes if test -f /etc/ld.so.conf; then 1629174832Sdes 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' ' '` 1630141098Sdes sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 1631141098Sdes fi 1632141098Sdes 1633141098Sdes # We used to test for /lib/ld.so.1 and disable shared libraries on 1634141098Sdes # powerpc, because MkLinux only supported shared libraries with the 1635141098Sdes # GNU dynamic linker. Since this was broken with cross compilers, 1636141098Sdes # most powerpc-linux boxes support dynamic linking these days and 1637141098Sdes # people can always --disable-shared, the test was removed, and we 1638141098Sdes # assume the GNU/Linux dynamic linker is in use. 1639141098Sdes dynamic_linker='GNU/Linux ld.so' 1640141098Sdes ;; 1641141098Sdes 1642141098Sdesnetbsd*) 1643141098Sdes version_type=sunos 1644141098Sdes need_lib_prefix=no 1645141098Sdes need_version=no 1646141098Sdes if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 1647141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1648141098Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1649141098Sdes dynamic_linker='NetBSD (a.out) ld.so' 1650141098Sdes else 1651141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1652141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1653141098Sdes dynamic_linker='NetBSD ld.elf_so' 1654141098Sdes fi 1655141098Sdes shlibpath_var=LD_LIBRARY_PATH 1656141098Sdes shlibpath_overrides_runpath=yes 1657141098Sdes hardcode_into_libs=yes 1658141098Sdes ;; 1659141098Sdes 1660141098Sdesnewsos6) 1661141098Sdes version_type=linux 1662141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1663141098Sdes shlibpath_var=LD_LIBRARY_PATH 1664141098Sdes shlibpath_overrides_runpath=yes 1665141098Sdes ;; 1666141098Sdes 1667141098Sdesnto-qnx*) 1668141098Sdes version_type=linux 1669141098Sdes need_lib_prefix=no 1670141098Sdes need_version=no 1671141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1672141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1673141098Sdes shlibpath_var=LD_LIBRARY_PATH 1674141098Sdes shlibpath_overrides_runpath=yes 1675141098Sdes ;; 1676141098Sdes 1677141098Sdesopenbsd*) 1678141098Sdes version_type=sunos 1679174832Sdes sys_lib_dlsearch_path_spec="/usr/lib" 1680141098Sdes need_lib_prefix=no 1681174832Sdes # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 1682174832Sdes case $host_os in 1683174832Sdes openbsd3.3 | openbsd3.3.*) need_version=yes ;; 1684174832Sdes *) need_version=no ;; 1685174832Sdes esac 1686141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1687141098Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1688141098Sdes shlibpath_var=LD_LIBRARY_PATH 1689141098Sdes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 1690141098Sdes case $host_os in 1691141098Sdes openbsd2.[[89]] | openbsd2.[[89]].*) 1692141098Sdes shlibpath_overrides_runpath=no 1693141098Sdes ;; 1694141098Sdes *) 1695141098Sdes shlibpath_overrides_runpath=yes 1696141098Sdes ;; 1697141098Sdes esac 1698141098Sdes else 1699141098Sdes shlibpath_overrides_runpath=yes 1700141098Sdes fi 1701141098Sdes ;; 1702141098Sdes 1703141098Sdesos2*) 1704141098Sdes libname_spec='$name' 1705141098Sdes shrext_cmds=".dll" 1706141098Sdes need_lib_prefix=no 1707141098Sdes library_names_spec='$libname${shared_ext} $libname.a' 1708141098Sdes dynamic_linker='OS/2 ld.exe' 1709141098Sdes shlibpath_var=LIBPATH 1710141098Sdes ;; 1711141098Sdes 1712141098Sdesosf3* | osf4* | osf5*) 1713141098Sdes version_type=osf 1714141098Sdes need_lib_prefix=no 1715141098Sdes need_version=no 1716141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1717141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1718141098Sdes shlibpath_var=LD_LIBRARY_PATH 1719141098Sdes sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 1720141098Sdes sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 1721141098Sdes ;; 1722141098Sdes 1723174832Sdesrdos*) 1724174832Sdes dynamic_linker=no 1725141098Sdes ;; 1726141098Sdes 1727141098Sdessolaris*) 1728141098Sdes version_type=linux 1729141098Sdes need_lib_prefix=no 1730141098Sdes need_version=no 1731141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1732141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1733141098Sdes shlibpath_var=LD_LIBRARY_PATH 1734141098Sdes shlibpath_overrides_runpath=yes 1735141098Sdes hardcode_into_libs=yes 1736141098Sdes # ldd complains unless libraries are executable 1737141098Sdes postinstall_cmds='chmod +x $lib' 1738141098Sdes ;; 1739141098Sdes 1740141098Sdessunos4*) 1741141098Sdes version_type=sunos 1742141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1743141098Sdes finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 1744141098Sdes shlibpath_var=LD_LIBRARY_PATH 1745141098Sdes shlibpath_overrides_runpath=yes 1746141098Sdes if test "$with_gnu_ld" = yes; then 1747141098Sdes need_lib_prefix=no 1748141098Sdes fi 1749141098Sdes need_version=yes 1750141098Sdes ;; 1751141098Sdes 1752174832Sdessysv4 | sysv4.3*) 1753141098Sdes version_type=linux 1754141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1755141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1756141098Sdes shlibpath_var=LD_LIBRARY_PATH 1757141098Sdes case $host_vendor in 1758141098Sdes sni) 1759141098Sdes shlibpath_overrides_runpath=no 1760141098Sdes need_lib_prefix=no 1761141098Sdes export_dynamic_flag_spec='${wl}-Blargedynsym' 1762141098Sdes runpath_var=LD_RUN_PATH 1763141098Sdes ;; 1764141098Sdes siemens) 1765141098Sdes need_lib_prefix=no 1766141098Sdes ;; 1767141098Sdes motorola) 1768141098Sdes need_lib_prefix=no 1769141098Sdes need_version=no 1770141098Sdes shlibpath_overrides_runpath=no 1771141098Sdes sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 1772141098Sdes ;; 1773141098Sdes esac 1774141098Sdes ;; 1775141098Sdes 1776141098Sdessysv4*MP*) 1777141098Sdes if test -d /usr/nec ;then 1778141098Sdes version_type=linux 1779141098Sdes library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 1780141098Sdes soname_spec='$libname${shared_ext}.$major' 1781141098Sdes shlibpath_var=LD_LIBRARY_PATH 1782141098Sdes fi 1783141098Sdes ;; 1784141098Sdes 1785174832Sdessysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 1786174832Sdes version_type=freebsd-elf 1787174832Sdes need_lib_prefix=no 1788174832Sdes need_version=no 1789174832Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1790174832Sdes soname_spec='${libname}${release}${shared_ext}$major' 1791174832Sdes shlibpath_var=LD_LIBRARY_PATH 1792174832Sdes hardcode_into_libs=yes 1793174832Sdes if test "$with_gnu_ld" = yes; then 1794174832Sdes sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 1795174832Sdes shlibpath_overrides_runpath=no 1796174832Sdes else 1797174832Sdes sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 1798174832Sdes shlibpath_overrides_runpath=yes 1799174832Sdes case $host_os in 1800174832Sdes sco3.2v5*) 1801174832Sdes sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 1802174832Sdes ;; 1803174832Sdes esac 1804174832Sdes fi 1805174832Sdes sys_lib_dlsearch_path_spec='/usr/lib' 1806174832Sdes ;; 1807174832Sdes 1808141098Sdesuts4*) 1809141098Sdes version_type=linux 1810141098Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1811141098Sdes soname_spec='${libname}${release}${shared_ext}$major' 1812141098Sdes shlibpath_var=LD_LIBRARY_PATH 1813141098Sdes ;; 1814141098Sdes 1815117610Sdes*) 1816141098Sdes dynamic_linker=no 1817141098Sdes ;; 1818141098Sdesesac 1819141098SdesAC_MSG_RESULT([$dynamic_linker]) 1820141098Sdestest "$dynamic_linker" = no && can_build_shared=no 1821174832Sdes 1822174832Sdesvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 1823174832Sdesif test "$GCC" = yes; then 1824174832Sdes variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 1825174832Sdesfi 1826141098Sdes])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1827141098Sdes 1828141098Sdes 1829141098Sdes# _LT_AC_TAGCONFIG 1830141098Sdes# ---------------- 1831141098SdesAC_DEFUN([_LT_AC_TAGCONFIG], 1832174832Sdes[AC_REQUIRE([LT_AC_PROG_SED])dnl 1833174832SdesAC_ARG_WITH([tags], 1834141098Sdes [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 1835141098Sdes [include additional configurations @<:@automatic@:>@])], 1836141098Sdes [tagnames="$withval"]) 1837141098Sdes 1838141098Sdesif test -f "$ltmain" && test -n "$tagnames"; then 1839141098Sdes if test ! -f "${ofile}"; then 1840141098Sdes AC_MSG_WARN([output file `$ofile' does not exist]) 1841141098Sdes fi 1842141098Sdes 1843141098Sdes if test -z "$LTCC"; then 1844141098Sdes eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 1845141098Sdes if test -z "$LTCC"; then 1846141098Sdes AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 1847141098Sdes else 1848141098Sdes AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 1849117610Sdes fi 1850141098Sdes fi 1851174832Sdes if test -z "$LTCFLAGS"; then 1852174832Sdes eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 1853174832Sdes fi 1854141098Sdes 1855141098Sdes # Extract list of available tagged configurations in $ofile. 1856141098Sdes # Note that this assumes the entire list is on one line. 1857141098Sdes available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 1858141098Sdes 1859141098Sdes lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1860141098Sdes for tagname in $tagnames; do 1861141098Sdes IFS="$lt_save_ifs" 1862141098Sdes # Check whether tagname contains only valid characters 1863141098Sdes case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 1864141098Sdes "") ;; 1865141098Sdes *) AC_MSG_ERROR([invalid tag name: $tagname]) 1866141098Sdes ;; 1867141098Sdes esac 1868141098Sdes 1869141098Sdes if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 1870141098Sdes then 1871141098Sdes AC_MSG_ERROR([tag name \"$tagname\" already exists]) 1872141098Sdes fi 1873141098Sdes 1874141098Sdes # Update the list of available tags. 1875141098Sdes if test -n "$tagname"; then 1876141098Sdes echo appending configuration tag \"$tagname\" to $ofile 1877141098Sdes 1878141098Sdes case $tagname in 1879141098Sdes CXX) 1880141098Sdes if test -n "$CXX" && ( test "X$CXX" != "Xno" && 1881147455Sdes ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 1882141098Sdes (test "X$CXX" != "Xg++"))) ; then 1883141098Sdes AC_LIBTOOL_LANG_CXX_CONFIG 1884141098Sdes else 1885141098Sdes tagname="" 1886141098Sdes fi 1887141098Sdes ;; 1888141098Sdes 1889141098Sdes F77) 1890141098Sdes if test -n "$F77" && test "X$F77" != "Xno"; then 1891141098Sdes AC_LIBTOOL_LANG_F77_CONFIG 1892141098Sdes else 1893141098Sdes tagname="" 1894141098Sdes fi 1895141098Sdes ;; 1896141098Sdes 1897141098Sdes GCJ) 1898141098Sdes if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 1899141098Sdes AC_LIBTOOL_LANG_GCJ_CONFIG 1900141098Sdes else 1901141098Sdes tagname="" 1902141098Sdes fi 1903141098Sdes ;; 1904141098Sdes 1905141098Sdes RC) 1906141098Sdes AC_LIBTOOL_LANG_RC_CONFIG 1907141098Sdes ;; 1908141098Sdes 1909141098Sdes *) 1910141098Sdes AC_MSG_ERROR([Unsupported tag name: $tagname]) 1911141098Sdes ;; 1912141098Sdes esac 1913141098Sdes 1914141098Sdes # Append the new tag name to the list of available tags. 1915141098Sdes if test -n "$tagname" ; then 1916141098Sdes available_tags="$available_tags $tagname" 1917141098Sdes fi 1918141098Sdes fi 1919117610Sdes done 1920141098Sdes IFS="$lt_save_ifs" 1921117610Sdes 1922141098Sdes # Now substitute the updated list of available tags. 1923141098Sdes if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 1924141098Sdes mv "${ofile}T" "$ofile" 1925141098Sdes chmod +x "$ofile" 1926141098Sdes else 1927141098Sdes rm -f "${ofile}T" 1928141098Sdes AC_MSG_ERROR([unable to update list of available tagged configurations.]) 1929141098Sdes fi 1930141098Sdesfi 1931141098Sdes])# _LT_AC_TAGCONFIG 1932117610Sdes 1933117610Sdes 1934141098Sdes# AC_LIBTOOL_DLOPEN 1935141098Sdes# ----------------- 1936141098Sdes# enable checks for dlopen support 1937141098SdesAC_DEFUN([AC_LIBTOOL_DLOPEN], 1938141098Sdes [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 1939141098Sdes])# AC_LIBTOOL_DLOPEN 1940141098Sdes 1941141098Sdes 1942141098Sdes# AC_LIBTOOL_WIN32_DLL 1943141098Sdes# -------------------- 1944174832Sdes# declare package support for building win32 DLLs 1945141098SdesAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 1946141098Sdes[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 1947141098Sdes])# AC_LIBTOOL_WIN32_DLL 1948141098Sdes 1949141098Sdes 1950141098Sdes# AC_ENABLE_SHARED([DEFAULT]) 1951141098Sdes# --------------------------- 1952141098Sdes# implement the --enable-shared flag 1953141098Sdes# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1954141098SdesAC_DEFUN([AC_ENABLE_SHARED], 1955141098Sdes[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 1956141098SdesAC_ARG_ENABLE([shared], 1957141098Sdes [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 1958141098Sdes [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 1959141098Sdes [p=${PACKAGE-default} 1960141098Sdes case $enableval in 1961141098Sdes yes) enable_shared=yes ;; 1962141098Sdes no) enable_shared=no ;; 1963141098Sdes *) 1964141098Sdes enable_shared=no 1965141098Sdes # Look at the argument we got. We use all the common list separators. 1966141098Sdes lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1967141098Sdes for pkg in $enableval; do 1968141098Sdes IFS="$lt_save_ifs" 1969141098Sdes if test "X$pkg" = "X$p"; then 1970141098Sdes enable_shared=yes 1971141098Sdes fi 1972141098Sdes done 1973141098Sdes IFS="$lt_save_ifs" 1974141098Sdes ;; 1975141098Sdes esac], 1976141098Sdes [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 1977141098Sdes])# AC_ENABLE_SHARED 1978141098Sdes 1979141098Sdes 1980141098Sdes# AC_DISABLE_SHARED 1981141098Sdes# ----------------- 1982174832Sdes# set the default shared flag to --disable-shared 1983141098SdesAC_DEFUN([AC_DISABLE_SHARED], 1984141098Sdes[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1985141098SdesAC_ENABLE_SHARED(no) 1986141098Sdes])# AC_DISABLE_SHARED 1987141098Sdes 1988141098Sdes 1989141098Sdes# AC_ENABLE_STATIC([DEFAULT]) 1990141098Sdes# --------------------------- 1991141098Sdes# implement the --enable-static flag 1992141098Sdes# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1993141098SdesAC_DEFUN([AC_ENABLE_STATIC], 1994141098Sdes[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 1995141098SdesAC_ARG_ENABLE([static], 1996141098Sdes [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 1997141098Sdes [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 1998141098Sdes [p=${PACKAGE-default} 1999141098Sdes case $enableval in 2000141098Sdes yes) enable_static=yes ;; 2001141098Sdes no) enable_static=no ;; 2002141098Sdes *) 2003141098Sdes enable_static=no 2004141098Sdes # Look at the argument we got. We use all the common list separators. 2005141098Sdes lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2006141098Sdes for pkg in $enableval; do 2007141098Sdes IFS="$lt_save_ifs" 2008141098Sdes if test "X$pkg" = "X$p"; then 2009141098Sdes enable_static=yes 2010141098Sdes fi 2011141098Sdes done 2012141098Sdes IFS="$lt_save_ifs" 2013141098Sdes ;; 2014141098Sdes esac], 2015141098Sdes [enable_static=]AC_ENABLE_STATIC_DEFAULT) 2016141098Sdes])# AC_ENABLE_STATIC 2017141098Sdes 2018141098Sdes 2019141098Sdes# AC_DISABLE_STATIC 2020141098Sdes# ----------------- 2021141098Sdes# set the default static flag to --disable-static 2022141098SdesAC_DEFUN([AC_DISABLE_STATIC], 2023141098Sdes[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2024141098SdesAC_ENABLE_STATIC(no) 2025141098Sdes])# AC_DISABLE_STATIC 2026141098Sdes 2027141098Sdes 2028141098Sdes# AC_ENABLE_FAST_INSTALL([DEFAULT]) 2029141098Sdes# --------------------------------- 2030141098Sdes# implement the --enable-fast-install flag 2031141098Sdes# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2032141098SdesAC_DEFUN([AC_ENABLE_FAST_INSTALL], 2033141098Sdes[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2034141098SdesAC_ARG_ENABLE([fast-install], 2035141098Sdes [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2036141098Sdes [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2037141098Sdes [p=${PACKAGE-default} 2038141098Sdes case $enableval in 2039141098Sdes yes) enable_fast_install=yes ;; 2040141098Sdes no) enable_fast_install=no ;; 2041141098Sdes *) 2042141098Sdes enable_fast_install=no 2043141098Sdes # Look at the argument we got. We use all the common list separators. 2044141098Sdes lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2045141098Sdes for pkg in $enableval; do 2046141098Sdes IFS="$lt_save_ifs" 2047141098Sdes if test "X$pkg" = "X$p"; then 2048141098Sdes enable_fast_install=yes 2049141098Sdes fi 2050141098Sdes done 2051141098Sdes IFS="$lt_save_ifs" 2052141098Sdes ;; 2053141098Sdes esac], 2054141098Sdes [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 2055141098Sdes])# AC_ENABLE_FAST_INSTALL 2056141098Sdes 2057141098Sdes 2058141098Sdes# AC_DISABLE_FAST_INSTALL 2059141098Sdes# ----------------------- 2060141098Sdes# set the default to --disable-fast-install 2061141098SdesAC_DEFUN([AC_DISABLE_FAST_INSTALL], 2062141098Sdes[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2063141098SdesAC_ENABLE_FAST_INSTALL(no) 2064141098Sdes])# AC_DISABLE_FAST_INSTALL 2065141098Sdes 2066141098Sdes 2067141098Sdes# AC_LIBTOOL_PICMODE([MODE]) 2068141098Sdes# -------------------------- 2069141098Sdes# implement the --with-pic flag 2070141098Sdes# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 2071141098SdesAC_DEFUN([AC_LIBTOOL_PICMODE], 2072141098Sdes[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2073141098Sdespic_mode=ifelse($#,1,$1,default) 2074141098Sdes])# AC_LIBTOOL_PICMODE 2075141098Sdes 2076141098Sdes 2077141098Sdes# AC_PROG_EGREP 2078141098Sdes# ------------- 2079141098Sdes# This is predefined starting with Autoconf 2.54, so this conditional 2080141098Sdes# definition can be removed once we require Autoconf 2.54 or later. 2081141098Sdesm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 2082141098Sdes[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 2083141098Sdes [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 2084141098Sdes then ac_cv_prog_egrep='grep -E' 2085141098Sdes else ac_cv_prog_egrep='egrep' 2086141098Sdes fi]) 2087141098Sdes EGREP=$ac_cv_prog_egrep 2088141098Sdes AC_SUBST([EGREP]) 2089141098Sdes])]) 2090141098Sdes 2091141098Sdes 2092141098Sdes# AC_PATH_TOOL_PREFIX 2093141098Sdes# ------------------- 2094174832Sdes# find a file program which can recognize shared library 2095141098SdesAC_DEFUN([AC_PATH_TOOL_PREFIX], 2096141098Sdes[AC_REQUIRE([AC_PROG_EGREP])dnl 2097141098SdesAC_MSG_CHECKING([for $1]) 2098141098SdesAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2099141098Sdes[case $MAGIC_CMD in 2100141098Sdes[[\\/*] | ?:[\\/]*]) 2101141098Sdes lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2102141098Sdes ;; 2103117610Sdes*) 2104141098Sdes lt_save_MAGIC_CMD="$MAGIC_CMD" 2105141098Sdes lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2106141098Sdesdnl $ac_dummy forces splitting on constant user-supplied paths. 2107141098Sdesdnl POSIX.2 word splitting is done only on the output of word expansions, 2108141098Sdesdnl not every word. This closes a longstanding sh security hole. 2109141098Sdes ac_dummy="ifelse([$2], , $PATH, [$2])" 2110141098Sdes for ac_dir in $ac_dummy; do 2111141098Sdes IFS="$lt_save_ifs" 2112141098Sdes test -z "$ac_dir" && ac_dir=. 2113141098Sdes if test -f $ac_dir/$1; then 2114141098Sdes lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2115141098Sdes if test -n "$file_magic_test_file"; then 2116141098Sdes case $deplibs_check_method in 2117141098Sdes "file_magic "*) 2118174832Sdes file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2119141098Sdes MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2120141098Sdes if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2121141098Sdes $EGREP "$file_magic_regex" > /dev/null; then 2122141098Sdes : 2123141098Sdes else 2124141098Sdes cat <<EOF 1>&2 2125141098Sdes 2126141098Sdes*** Warning: the command libtool uses to detect shared libraries, 2127141098Sdes*** $file_magic_cmd, produces output that libtool cannot recognize. 2128141098Sdes*** The result is that libtool may fail to recognize shared libraries 2129141098Sdes*** as such. This will affect the creation of libtool libraries that 2130141098Sdes*** depend on shared libraries, but programs linked with such libtool 2131141098Sdes*** libraries will work regardless of this problem. Nevertheless, you 2132141098Sdes*** may want to report the problem to your system manager and/or to 2133141098Sdes*** bug-libtool@gnu.org 2134141098Sdes 2135141098SdesEOF 2136141098Sdes fi ;; 2137141098Sdes esac 2138141098Sdes fi 2139141098Sdes break 2140117610Sdes fi 2141117610Sdes done 2142141098Sdes IFS="$lt_save_ifs" 2143141098Sdes MAGIC_CMD="$lt_save_MAGIC_CMD" 2144117610Sdes ;; 2145141098Sdesesac]) 2146141098SdesMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2147141098Sdesif test -n "$MAGIC_CMD"; then 2148141098Sdes AC_MSG_RESULT($MAGIC_CMD) 2149141098Sdeselse 2150141098Sdes AC_MSG_RESULT(no) 2151141098Sdesfi 2152141098Sdes])# AC_PATH_TOOL_PREFIX 2153117610Sdes 2154117610Sdes 2155141098Sdes# AC_PATH_MAGIC 2156141098Sdes# ------------- 2157174832Sdes# find a file program which can recognize a shared library 2158141098SdesAC_DEFUN([AC_PATH_MAGIC], 2159141098Sdes[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2160141098Sdesif test -z "$lt_cv_path_MAGIC_CMD"; then 2161141098Sdes if test -n "$ac_tool_prefix"; then 2162141098Sdes AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2163141098Sdes else 2164141098Sdes MAGIC_CMD=: 2165141098Sdes fi 2166141098Sdesfi 2167141098Sdes])# AC_PATH_MAGIC 2168141098Sdes 2169141098Sdes 2170141098Sdes# AC_PROG_LD 2171141098Sdes# ---------- 2172141098Sdes# find the pathname to the GNU or non-GNU linker 2173141098SdesAC_DEFUN([AC_PROG_LD], 2174141098Sdes[AC_ARG_WITH([gnu-ld], 2175141098Sdes [AC_HELP_STRING([--with-gnu-ld], 2176141098Sdes [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2177141098Sdes [test "$withval" = no || with_gnu_ld=yes], 2178141098Sdes [with_gnu_ld=no]) 2179141098SdesAC_REQUIRE([LT_AC_PROG_SED])dnl 2180117610SdesAC_REQUIRE([AC_PROG_CC])dnl 2181117610SdesAC_REQUIRE([AC_CANONICAL_HOST])dnl 2182117610SdesAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2183117610Sdesac_prog=ld 2184141098Sdesif test "$GCC" = yes; then 2185117610Sdes # Check if gcc -print-prog-name=ld gives a path. 2186141098Sdes AC_MSG_CHECKING([for ld used by $CC]) 2187141098Sdes case $host in 2188141098Sdes *-*-mingw*) 2189141098Sdes # gcc leaves a trailing carriage return which upsets mingw 2190141098Sdes ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2191141098Sdes *) 2192141098Sdes ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2193141098Sdes esac 2194141098Sdes case $ac_prog in 2195117610Sdes # Accept absolute paths. 2196141098Sdes [[\\/]]* | ?:[[\\/]]*) 2197141098Sdes re_direlt='/[[^/]][[^/]]*/\.\./' 2198141098Sdes # Canonicalize the pathname of ld 2199141098Sdes ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2200117610Sdes while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2201141098Sdes ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 2202117610Sdes done 2203117610Sdes test -z "$LD" && LD="$ac_prog" 2204117610Sdes ;; 2205117610Sdes "") 2206117610Sdes # If it fails, then pretend we aren't using GCC. 2207117610Sdes ac_prog=ld 2208117610Sdes ;; 2209117610Sdes *) 2210117610Sdes # If it is relative, then search for the first ld in PATH. 2211117610Sdes with_gnu_ld=unknown 2212117610Sdes ;; 2213117610Sdes esac 2214117610Sdeselif test "$with_gnu_ld" = yes; then 2215117610Sdes AC_MSG_CHECKING([for GNU ld]) 2216117610Sdeselse 2217117610Sdes AC_MSG_CHECKING([for non-GNU ld]) 2218117610Sdesfi 2219141098SdesAC_CACHE_VAL(lt_cv_path_LD, 2220117610Sdes[if test -z "$LD"; then 2221141098Sdes lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2222117610Sdes for ac_dir in $PATH; do 2223141098Sdes IFS="$lt_save_ifs" 2224117610Sdes test -z "$ac_dir" && ac_dir=. 2225117610Sdes if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2226141098Sdes lt_cv_path_LD="$ac_dir/$ac_prog" 2227117610Sdes # Check to see if the program is GNU ld. I'd rather use --version, 2228174832Sdes # but apparently some variants of GNU ld only accept -v. 2229117610Sdes # Break only if it was the GNU/non-GNU ld that we prefer. 2230141098Sdes case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2231141098Sdes *GNU* | *'with BFD'*) 2232117610Sdes test "$with_gnu_ld" != no && break 2233141098Sdes ;; 2234141098Sdes *) 2235117610Sdes test "$with_gnu_ld" != yes && break 2236141098Sdes ;; 2237141098Sdes esac 2238117610Sdes fi 2239117610Sdes done 2240141098Sdes IFS="$lt_save_ifs" 2241117610Sdeselse 2242141098Sdes lt_cv_path_LD="$LD" # Let the user override the test with a path. 2243117610Sdesfi]) 2244141098SdesLD="$lt_cv_path_LD" 2245117610Sdesif test -n "$LD"; then 2246117610Sdes AC_MSG_RESULT($LD) 2247117610Sdeselse 2248117610Sdes AC_MSG_RESULT(no) 2249117610Sdesfi 2250117610Sdestest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2251117610SdesAC_PROG_LD_GNU 2252141098Sdes])# AC_PROG_LD 2253117610Sdes 2254141098Sdes 2255141098Sdes# AC_PROG_LD_GNU 2256141098Sdes# -------------- 2257141098SdesAC_DEFUN([AC_PROG_LD_GNU], 2258141098Sdes[AC_REQUIRE([AC_PROG_EGREP])dnl 2259141098SdesAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2260174832Sdes[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2261141098Sdescase `$LD -v 2>&1 </dev/null` in 2262141098Sdes*GNU* | *'with BFD'*) 2263141098Sdes lt_cv_prog_gnu_ld=yes 2264141098Sdes ;; 2265141098Sdes*) 2266141098Sdes lt_cv_prog_gnu_ld=no 2267141098Sdes ;; 2268141098Sdesesac]) 2269141098Sdeswith_gnu_ld=$lt_cv_prog_gnu_ld 2270141098Sdes])# AC_PROG_LD_GNU 2271141098Sdes 2272141098Sdes 2273141098Sdes# AC_PROG_LD_RELOAD_FLAG 2274141098Sdes# ---------------------- 2275141098Sdes# find reload flag for linker 2276141098Sdes# -- PORTME Some linkers may need a different reload flag. 2277141098SdesAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 2278141098Sdes[AC_CACHE_CHECK([for $LD option to reload object files], 2279141098Sdes lt_cv_ld_reload_flag, 2280141098Sdes [lt_cv_ld_reload_flag='-r']) 2281141098Sdesreload_flag=$lt_cv_ld_reload_flag 2282141098Sdescase $reload_flag in 2283141098Sdes"" | " "*) ;; 2284141098Sdes*) reload_flag=" $reload_flag" ;; 2285141098Sdesesac 2286141098Sdesreload_cmds='$LD$reload_flag -o $output$reload_objs' 2287141098Sdescase $host_os in 2288141098Sdes darwin*) 2289141098Sdes if test "$GCC" = yes; then 2290174832Sdes reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2291141098Sdes else 2292141098Sdes reload_cmds='$LD$reload_flag -o $output$reload_objs' 2293141098Sdes fi 2294141098Sdes ;; 2295141098Sdesesac 2296141098Sdes])# AC_PROG_LD_RELOAD_FLAG 2297141098Sdes 2298141098Sdes 2299141098Sdes# AC_DEPLIBS_CHECK_METHOD 2300141098Sdes# ----------------------- 2301141098Sdes# how to check for library dependencies 2302141098Sdes# -- PORTME fill in with the dynamic library characteristics 2303141098SdesAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2304174832Sdes[AC_CACHE_CHECK([how to recognize dependent libraries], 2305141098Sdeslt_cv_deplibs_check_method, 2306141098Sdes[lt_cv_file_magic_cmd='$MAGIC_CMD' 2307141098Sdeslt_cv_file_magic_test_file= 2308141098Sdeslt_cv_deplibs_check_method='unknown' 2309141098Sdes# Need to set the preceding variable on all platforms that support 2310141098Sdes# interlibrary dependencies. 2311141098Sdes# 'none' -- dependencies not supported. 2312141098Sdes# `unknown' -- same as none, but documents that we really don't know. 2313141098Sdes# 'pass_all' -- all dependencies passed with no checks. 2314141098Sdes# 'test_compile' -- check by making test program. 2315141098Sdes# 'file_magic [[regex]]' -- check by looking for files in library path 2316141098Sdes# which responds to the $file_magic_cmd with a given extended regex. 2317141098Sdes# If you have `file' or equivalent on your system and you're not sure 2318141098Sdes# whether `pass_all' will *always* work, you probably want this one. 2319141098Sdes 2320141098Sdescase $host_os in 2321141098Sdesaix4* | aix5*) 2322141098Sdes lt_cv_deplibs_check_method=pass_all 2323141098Sdes ;; 2324141098Sdes 2325141098Sdesbeos*) 2326141098Sdes lt_cv_deplibs_check_method=pass_all 2327141098Sdes ;; 2328141098Sdes 2329141098Sdesbsdi[[45]]*) 2330141098Sdes lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 2331141098Sdes lt_cv_file_magic_cmd='/usr/bin/file -L' 2332141098Sdes lt_cv_file_magic_test_file=/shlib/libc.so 2333141098Sdes ;; 2334141098Sdes 2335141098Sdescygwin*) 2336141098Sdes # func_win32_libid is a shell function defined in ltmain.sh 2337141098Sdes lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2338141098Sdes lt_cv_file_magic_cmd='func_win32_libid' 2339141098Sdes ;; 2340141098Sdes 2341141098Sdesmingw* | pw32*) 2342141098Sdes # Base MSYS/MinGW do not provide the 'file' command needed by 2343174832Sdes # func_win32_libid shell function, so use a weaker test based on 'objdump', 2344174832Sdes # unless we find 'file', for example because we are cross-compiling. 2345174832Sdes if ( file / ) >/dev/null 2>&1; then 2346174832Sdes lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2347174832Sdes lt_cv_file_magic_cmd='func_win32_libid' 2348174832Sdes else 2349174832Sdes lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 2350174832Sdes lt_cv_file_magic_cmd='$OBJDUMP -f' 2351174832Sdes fi 2352141098Sdes ;; 2353141098Sdes 2354141098Sdesdarwin* | rhapsody*) 2355141098Sdes lt_cv_deplibs_check_method=pass_all 2356141098Sdes ;; 2357141098Sdes 2358174832Sdesfreebsd* | dragonfly*) 2359141098Sdes if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2360141098Sdes case $host_cpu in 2361141098Sdes i*86 ) 2362141098Sdes # Not sure whether the presence of OpenBSD here was a mistake. 2363141098Sdes # Let's accept both of them until this is cleared up. 2364147455Sdes lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 2365141098Sdes lt_cv_file_magic_cmd=/usr/bin/file 2366141098Sdes lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2367141098Sdes ;; 2368141098Sdes esac 2369141098Sdes else 2370141098Sdes lt_cv_deplibs_check_method=pass_all 2371141098Sdes fi 2372141098Sdes ;; 2373141098Sdes 2374141098Sdesgnu*) 2375141098Sdes lt_cv_deplibs_check_method=pass_all 2376141098Sdes ;; 2377141098Sdes 2378141098Sdeshpux10.20* | hpux11*) 2379141098Sdes lt_cv_file_magic_cmd=/usr/bin/file 2380174832Sdes case $host_cpu in 2381141098Sdes ia64*) 2382141098Sdes lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 2383141098Sdes lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 2384141098Sdes ;; 2385141098Sdes hppa*64*) 2386141098Sdes [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]'] 2387141098Sdes lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 2388141098Sdes ;; 2389141098Sdes *) 2390141098Sdes lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 2391141098Sdes lt_cv_file_magic_test_file=/usr/lib/libc.sl 2392141098Sdes ;; 2393141098Sdes esac 2394141098Sdes ;; 2395141098Sdes 2396174832Sdesinterix[[3-9]]*) 2397174832Sdes # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 2398174832Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 2399174832Sdes ;; 2400174832Sdes 2401141098Sdesirix5* | irix6* | nonstopux*) 2402141098Sdes case $LD in 2403141098Sdes *-32|*"-32 ") libmagic=32-bit;; 2404141098Sdes *-n32|*"-n32 ") libmagic=N32;; 2405141098Sdes *-64|*"-64 ") libmagic=64-bit;; 2406141098Sdes *) libmagic=never-match;; 2407141098Sdes esac 2408141098Sdes lt_cv_deplibs_check_method=pass_all 2409141098Sdes ;; 2410141098Sdes 2411141098Sdes# This must be Linux ELF. 2412174832Sdeslinux* | k*bsd*-gnu) 2413141098Sdes lt_cv_deplibs_check_method=pass_all 2414141098Sdes ;; 2415141098Sdes 2416141098Sdesnetbsd*) 2417141098Sdes if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2418141098Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2419141098Sdes else 2420141098Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 2421141098Sdes fi 2422141098Sdes ;; 2423141098Sdes 2424141098Sdesnewos6*) 2425141098Sdes lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 2426141098Sdes lt_cv_file_magic_cmd=/usr/bin/file 2427141098Sdes lt_cv_file_magic_test_file=/usr/lib/libnls.so 2428141098Sdes ;; 2429141098Sdes 2430141098Sdesnto-qnx*) 2431141098Sdes lt_cv_deplibs_check_method=unknown 2432141098Sdes ;; 2433141098Sdes 2434141098Sdesopenbsd*) 2435141098Sdes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2436141098Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 2437141098Sdes else 2438141098Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2439141098Sdes fi 2440141098Sdes ;; 2441141098Sdes 2442141098Sdesosf3* | osf4* | osf5*) 2443141098Sdes lt_cv_deplibs_check_method=pass_all 2444141098Sdes ;; 2445141098Sdes 2446174832Sdesrdos*) 2447141098Sdes lt_cv_deplibs_check_method=pass_all 2448141098Sdes ;; 2449141098Sdes 2450141098Sdessolaris*) 2451141098Sdes lt_cv_deplibs_check_method=pass_all 2452141098Sdes ;; 2453141098Sdes 2454174832Sdessysv4 | sysv4.3*) 2455141098Sdes case $host_vendor in 2456141098Sdes motorola) 2457141098Sdes 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]]' 2458141098Sdes lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 2459141098Sdes ;; 2460141098Sdes ncr) 2461141098Sdes lt_cv_deplibs_check_method=pass_all 2462141098Sdes ;; 2463141098Sdes sequent) 2464141098Sdes lt_cv_file_magic_cmd='/bin/file' 2465141098Sdes lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 2466141098Sdes ;; 2467141098Sdes sni) 2468141098Sdes lt_cv_file_magic_cmd='/bin/file' 2469141098Sdes lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 2470141098Sdes lt_cv_file_magic_test_file=/lib/libc.so 2471141098Sdes ;; 2472141098Sdes siemens) 2473141098Sdes lt_cv_deplibs_check_method=pass_all 2474141098Sdes ;; 2475174832Sdes pc) 2476174832Sdes lt_cv_deplibs_check_method=pass_all 2477174832Sdes ;; 2478141098Sdes esac 2479141098Sdes ;; 2480141098Sdes 2481174832Sdessysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2482141098Sdes lt_cv_deplibs_check_method=pass_all 2483141098Sdes ;; 2484141098Sdesesac 2485117610Sdes]) 2486141098Sdesfile_magic_cmd=$lt_cv_file_magic_cmd 2487141098Sdesdeplibs_check_method=$lt_cv_deplibs_check_method 2488141098Sdestest -z "$deplibs_check_method" && deplibs_check_method=unknown 2489141098Sdes])# AC_DEPLIBS_CHECK_METHOD 2490117610Sdes 2491141098Sdes 2492141098Sdes# AC_PROG_NM 2493141098Sdes# ---------- 2494141098Sdes# find the pathname to a BSD-compatible name lister 2495141098SdesAC_DEFUN([AC_PROG_NM], 2496141098Sdes[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 2497117610Sdes[if test -n "$NM"; then 2498117610Sdes # Let the user override the test. 2499141098Sdes lt_cv_path_NM="$NM" 2500117610Sdeselse 2501174832Sdes lt_nm_to_check="${ac_tool_prefix}nm" 2502174832Sdes if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 2503174832Sdes lt_nm_to_check="$lt_nm_to_check nm" 2504174832Sdes fi 2505174832Sdes for lt_tmp_nm in $lt_nm_to_check; do 2506174832Sdes lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2507174832Sdes for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 2508174832Sdes IFS="$lt_save_ifs" 2509174832Sdes test -z "$ac_dir" && ac_dir=. 2510174832Sdes tmp_nm="$ac_dir/$lt_tmp_nm" 2511174832Sdes if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 2512174832Sdes # Check to see if the nm accepts a BSD-compat flag. 2513174832Sdes # Adding the `sed 1q' prevents false positives on HP-UX, which says: 2514174832Sdes # nm: unknown option "B" ignored 2515174832Sdes # Tru64's nm complains that /dev/null is an invalid object file 2516174832Sdes case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 2517174832Sdes */dev/null* | *'Invalid file or object type'*) 2518174832Sdes lt_cv_path_NM="$tmp_nm -B" 2519141098Sdes break 2520141098Sdes ;; 2521141098Sdes *) 2522174832Sdes case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 2523174832Sdes */dev/null*) 2524174832Sdes lt_cv_path_NM="$tmp_nm -p" 2525174832Sdes break 2526174832Sdes ;; 2527174832Sdes *) 2528174832Sdes lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 2529174832Sdes continue # so that we can try to find one that supports BSD flags 2530174832Sdes ;; 2531174832Sdes esac 2532141098Sdes ;; 2533141098Sdes esac 2534174832Sdes fi 2535174832Sdes done 2536174832Sdes IFS="$lt_save_ifs" 2537117610Sdes done 2538141098Sdes test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 2539117610Sdesfi]) 2540141098SdesNM="$lt_cv_path_NM" 2541141098Sdes])# AC_PROG_NM 2542117610Sdes 2543141098Sdes 2544141098Sdes# AC_CHECK_LIBM 2545141098Sdes# ------------- 2546141098Sdes# check for math library 2547141098SdesAC_DEFUN([AC_CHECK_LIBM], 2548117610Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2549117610SdesLIBM= 2550141098Sdescase $host in 2551141098Sdes*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 2552141098Sdes # These system don't have libm, or don't need it 2553117610Sdes ;; 2554117610Sdes*-ncr-sysv4.3*) 2555117610Sdes AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 2556141098Sdes AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 2557117610Sdes ;; 2558117610Sdes*) 2559141098Sdes AC_CHECK_LIB(m, cos, LIBM="-lm") 2560117610Sdes ;; 2561117610Sdesesac 2562141098Sdes])# AC_CHECK_LIBM 2563117610Sdes 2564141098Sdes 2565141098Sdes# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 2566141098Sdes# ----------------------------------- 2567141098Sdes# sets LIBLTDL to the link flags for the libltdl convenience library and 2568141098Sdes# LTDLINCL to the include flags for the libltdl header and adds 2569174832Sdes# --enable-ltdl-convenience to the configure arguments. Note that 2570174832Sdes# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2571174832Sdes# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 2572174832Sdes# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 2573174832Sdes# (note the single quotes!). If your package is not flat and you're not 2574174832Sdes# using automake, define top_builddir and top_srcdir appropriately in 2575174832Sdes# the Makefiles. 2576141098SdesAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 2577141098Sdes[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2578141098Sdes case $enable_ltdl_convenience in 2579117610Sdes no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2580117610Sdes "") enable_ltdl_convenience=yes 2581117610Sdes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2582117610Sdes esac 2583117610Sdes LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2584141098Sdes LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2585141098Sdes # For backwards non-gettext consistent compatibility... 2586141098Sdes INCLTDL="$LTDLINCL" 2587141098Sdes])# AC_LIBLTDL_CONVENIENCE 2588117610Sdes 2589141098Sdes 2590141098Sdes# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 2591141098Sdes# ----------------------------------- 2592141098Sdes# sets LIBLTDL to the link flags for the libltdl installable library and 2593141098Sdes# LTDLINCL to the include flags for the libltdl header and adds 2594174832Sdes# --enable-ltdl-install to the configure arguments. Note that 2595174832Sdes# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2596174832Sdes# and an installed libltdl is not found, it is assumed to be `libltdl'. 2597174832Sdes# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 2598174832Sdes# '${top_srcdir}/' (note the single quotes!). If your package is not 2599174832Sdes# flat and you're not using automake, define top_builddir and top_srcdir 2600174832Sdes# appropriately in the Makefiles. 2601117610Sdes# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2602141098SdesAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 2603141098Sdes[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2604141098Sdes AC_CHECK_LIB(ltdl, lt_dlinit, 2605117610Sdes [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2606117610Sdes [if test x"$enable_ltdl_install" = xno; then 2607117610Sdes AC_MSG_WARN([libltdl not installed, but installation disabled]) 2608117610Sdes else 2609117610Sdes enable_ltdl_install=yes 2610117610Sdes fi 2611117610Sdes ]) 2612117610Sdes if test x"$enable_ltdl_install" = x"yes"; then 2613117610Sdes ac_configure_args="$ac_configure_args --enable-ltdl-install" 2614117610Sdes LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2615141098Sdes LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2616117610Sdes else 2617117610Sdes ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2618117610Sdes LIBLTDL="-lltdl" 2619141098Sdes LTDLINCL= 2620117610Sdes fi 2621141098Sdes # For backwards non-gettext consistent compatibility... 2622141098Sdes INCLTDL="$LTDLINCL" 2623141098Sdes])# AC_LIBLTDL_INSTALLABLE 2624117610Sdes 2625117610Sdes 2626141098Sdes# AC_LIBTOOL_CXX 2627141098Sdes# -------------- 2628141098Sdes# enable support for C++ libraries 2629141098SdesAC_DEFUN([AC_LIBTOOL_CXX], 2630141098Sdes[AC_REQUIRE([_LT_AC_LANG_CXX]) 2631141098Sdes])# AC_LIBTOOL_CXX 2632117610Sdes 2633117610Sdes 2634141098Sdes# _LT_AC_LANG_CXX 2635141098Sdes# --------------- 2636141098SdesAC_DEFUN([_LT_AC_LANG_CXX], 2637141098Sdes[AC_REQUIRE([AC_PROG_CXX]) 2638141098SdesAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2639141098Sdes_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 2640141098Sdes])# _LT_AC_LANG_CXX 2641117610Sdes 2642141098Sdes# _LT_AC_PROG_CXXCPP 2643174832Sdes# ------------------ 2644141098SdesAC_DEFUN([_LT_AC_PROG_CXXCPP], 2645141098Sdes[ 2646141098SdesAC_REQUIRE([AC_PROG_CXX]) 2647141098Sdesif test -n "$CXX" && ( test "X$CXX" != "Xno" && 2648147455Sdes ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 2649141098Sdes (test "X$CXX" != "Xg++"))) ; then 2650141098Sdes AC_PROG_CXXCPP 2651141098Sdesfi 2652141098Sdes])# _LT_AC_PROG_CXXCPP 2653117610Sdes 2654141098Sdes# AC_LIBTOOL_F77 2655141098Sdes# -------------- 2656141098Sdes# enable support for Fortran 77 libraries 2657141098SdesAC_DEFUN([AC_LIBTOOL_F77], 2658141098Sdes[AC_REQUIRE([_LT_AC_LANG_F77]) 2659141098Sdes])# AC_LIBTOOL_F77 2660117610Sdes 2661117610Sdes 2662141098Sdes# _LT_AC_LANG_F77 2663141098Sdes# --------------- 2664141098SdesAC_DEFUN([_LT_AC_LANG_F77], 2665141098Sdes[AC_REQUIRE([AC_PROG_F77]) 2666141098Sdes_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 2667141098Sdes])# _LT_AC_LANG_F77 2668117610Sdes 2669117610Sdes 2670141098Sdes# AC_LIBTOOL_GCJ 2671141098Sdes# -------------- 2672141098Sdes# enable support for GCJ libraries 2673141098SdesAC_DEFUN([AC_LIBTOOL_GCJ], 2674141098Sdes[AC_REQUIRE([_LT_AC_LANG_GCJ]) 2675141098Sdes])# AC_LIBTOOL_GCJ 2676141098Sdes 2677141098Sdes 2678141098Sdes# _LT_AC_LANG_GCJ 2679141098Sdes# --------------- 2680141098SdesAC_DEFUN([_LT_AC_LANG_GCJ], 2681141098Sdes[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 2682141098Sdes [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 2683141098Sdes [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 2684141098Sdes [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 2685141098Sdes [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 2686141098Sdes [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 2687141098Sdes_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 2688141098Sdes])# _LT_AC_LANG_GCJ 2689141098Sdes 2690141098Sdes 2691141098Sdes# AC_LIBTOOL_RC 2692174832Sdes# ------------- 2693141098Sdes# enable support for Windows resource files 2694141098SdesAC_DEFUN([AC_LIBTOOL_RC], 2695141098Sdes[AC_REQUIRE([LT_AC_PROG_RC]) 2696141098Sdes_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 2697141098Sdes])# AC_LIBTOOL_RC 2698141098Sdes 2699141098Sdes 2700141098Sdes# AC_LIBTOOL_LANG_C_CONFIG 2701141098Sdes# ------------------------ 2702141098Sdes# Ensure that the configuration vars for the C compiler are 2703141098Sdes# suitably defined. Those variables are subsequently used by 2704141098Sdes# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2705141098SdesAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 2706141098SdesAC_DEFUN([_LT_AC_LANG_C_CONFIG], 2707141098Sdes[lt_save_CC="$CC" 2708141098SdesAC_LANG_PUSH(C) 2709141098Sdes 2710141098Sdes# Source file extension for C test sources. 2711141098Sdesac_ext=c 2712141098Sdes 2713141098Sdes# Object file extension for compiled C test sources. 2714141098Sdesobjext=o 2715141098Sdes_LT_AC_TAGVAR(objext, $1)=$objext 2716141098Sdes 2717141098Sdes# Code to be used in simple compile tests 2718174832Sdeslt_simple_compile_test_code="int some_variable = 0;" 2719141098Sdes 2720141098Sdes# Code to be used in simple link tests 2721174832Sdeslt_simple_link_test_code='int main(){return(0);}' 2722141098Sdes 2723141098Sdes_LT_AC_SYS_COMPILER 2724141098Sdes 2725174832Sdes# save warnings/boilerplate of simple test code 2726174832Sdes_LT_COMPILER_BOILERPLATE 2727174832Sdes_LT_LINKER_BOILERPLATE 2728117610Sdes 2729141098SdesAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 2730141098SdesAC_LIBTOOL_PROG_COMPILER_PIC($1) 2731141098SdesAC_LIBTOOL_PROG_CC_C_O($1) 2732141098SdesAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 2733141098SdesAC_LIBTOOL_PROG_LD_SHLIBS($1) 2734141098SdesAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 2735141098SdesAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 2736141098SdesAC_LIBTOOL_SYS_LIB_STRIP 2737174832SdesAC_LIBTOOL_DLOPEN_SELF 2738141098Sdes 2739174832Sdes# Report which library types will actually be built 2740141098SdesAC_MSG_CHECKING([if libtool supports shared libraries]) 2741141098SdesAC_MSG_RESULT([$can_build_shared]) 2742141098Sdes 2743141098SdesAC_MSG_CHECKING([whether to build shared libraries]) 2744141098Sdestest "$can_build_shared" = "no" && enable_shared=no 2745141098Sdes 2746141098Sdes# On AIX, shared libraries and static libraries use the same namespace, and 2747141098Sdes# are all built from PIC. 2748174832Sdescase $host_os in 2749141098Sdesaix3*) 2750141098Sdes test "$enable_shared" = yes && enable_static=no 2751141098Sdes if test -n "$RANLIB"; then 2752141098Sdes archive_cmds="$archive_cmds~\$RANLIB \$lib" 2753141098Sdes postinstall_cmds='$RANLIB $lib' 2754141098Sdes fi 2755141098Sdes ;; 2756141098Sdes 2757141098Sdesaix4* | aix5*) 2758141098Sdes if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 2759141098Sdes test "$enable_shared" = yes && enable_static=no 2760141098Sdes fi 2761141098Sdes ;; 2762141098Sdesesac 2763141098SdesAC_MSG_RESULT([$enable_shared]) 2764141098Sdes 2765141098SdesAC_MSG_CHECKING([whether to build static libraries]) 2766141098Sdes# Make sure either enable_shared or enable_static is yes. 2767141098Sdestest "$enable_shared" = yes || enable_static=yes 2768141098SdesAC_MSG_RESULT([$enable_static]) 2769141098Sdes 2770141098SdesAC_LIBTOOL_CONFIG($1) 2771141098Sdes 2772141098SdesAC_LANG_POP 2773141098SdesCC="$lt_save_CC" 2774141098Sdes])# AC_LIBTOOL_LANG_C_CONFIG 2775141098Sdes 2776141098Sdes 2777141098Sdes# AC_LIBTOOL_LANG_CXX_CONFIG 2778141098Sdes# -------------------------- 2779141098Sdes# Ensure that the configuration vars for the C compiler are 2780141098Sdes# suitably defined. Those variables are subsequently used by 2781141098Sdes# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2782141098SdesAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 2783141098SdesAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 2784141098Sdes[AC_LANG_PUSH(C++) 2785141098SdesAC_REQUIRE([AC_PROG_CXX]) 2786141098SdesAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2787141098Sdes 2788141098Sdes_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2789141098Sdes_LT_AC_TAGVAR(allow_undefined_flag, $1)= 2790141098Sdes_LT_AC_TAGVAR(always_export_symbols, $1)=no 2791141098Sdes_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 2792141098Sdes_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 2793141098Sdes_LT_AC_TAGVAR(hardcode_direct, $1)=no 2794141098Sdes_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 2795141098Sdes_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 2796141098Sdes_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2797141098Sdes_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 2798174832Sdes_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2799141098Sdes_LT_AC_TAGVAR(hardcode_automatic, $1)=no 2800141098Sdes_LT_AC_TAGVAR(module_cmds, $1)= 2801141098Sdes_LT_AC_TAGVAR(module_expsym_cmds, $1)= 2802141098Sdes_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 2803141098Sdes_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 2804141098Sdes_LT_AC_TAGVAR(no_undefined_flag, $1)= 2805141098Sdes_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2806141098Sdes_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 2807141098Sdes 2808141098Sdes# Dependencies to place before and after the object being linked: 2809141098Sdes_LT_AC_TAGVAR(predep_objects, $1)= 2810141098Sdes_LT_AC_TAGVAR(postdep_objects, $1)= 2811141098Sdes_LT_AC_TAGVAR(predeps, $1)= 2812141098Sdes_LT_AC_TAGVAR(postdeps, $1)= 2813141098Sdes_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 2814141098Sdes 2815141098Sdes# Source file extension for C++ test sources. 2816174832Sdesac_ext=cpp 2817141098Sdes 2818141098Sdes# Object file extension for compiled C++ test sources. 2819141098Sdesobjext=o 2820141098Sdes_LT_AC_TAGVAR(objext, $1)=$objext 2821141098Sdes 2822141098Sdes# Code to be used in simple compile tests 2823174832Sdeslt_simple_compile_test_code="int some_variable = 0;" 2824141098Sdes 2825141098Sdes# Code to be used in simple link tests 2826174832Sdeslt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 2827141098Sdes 2828141098Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set. 2829141098Sdes_LT_AC_SYS_COMPILER 2830141098Sdes 2831174832Sdes# save warnings/boilerplate of simple test code 2832174832Sdes_LT_COMPILER_BOILERPLATE 2833174832Sdes_LT_LINKER_BOILERPLATE 2834174832Sdes 2835141098Sdes# Allow CC to be a program name with arguments. 2836141098Sdeslt_save_CC=$CC 2837141098Sdeslt_save_LD=$LD 2838141098Sdeslt_save_GCC=$GCC 2839141098SdesGCC=$GXX 2840141098Sdeslt_save_with_gnu_ld=$with_gnu_ld 2841141098Sdeslt_save_path_LD=$lt_cv_path_LD 2842141098Sdesif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 2843141098Sdes lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 2844141098Sdeselse 2845174832Sdes $as_unset lt_cv_prog_gnu_ld 2846141098Sdesfi 2847141098Sdesif test -n "${lt_cv_path_LDCXX+set}"; then 2848141098Sdes lt_cv_path_LD=$lt_cv_path_LDCXX 2849141098Sdeselse 2850174832Sdes $as_unset lt_cv_path_LD 2851141098Sdesfi 2852141098Sdestest -z "${LDCXX+set}" || LD=$LDCXX 2853141098SdesCC=${CXX-"c++"} 2854141098Sdescompiler=$CC 2855141098Sdes_LT_AC_TAGVAR(compiler, $1)=$CC 2856174832Sdes_LT_CC_BASENAME([$compiler]) 2857141098Sdes 2858141098Sdes# We don't want -fno-exception wen compiling C++ code, so set the 2859141098Sdes# no_builtin_flag separately 2860141098Sdesif test "$GXX" = yes; then 2861141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 2862141098Sdeselse 2863141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 2864141098Sdesfi 2865141098Sdes 2866141098Sdesif test "$GXX" = yes; then 2867141098Sdes # Set up default GNU C++ configuration 2868141098Sdes 2869141098Sdes AC_PROG_LD 2870141098Sdes 2871141098Sdes # Check if GNU C++ uses GNU ld as the underlying linker, since the 2872141098Sdes # archiving commands below assume that GNU ld is being used. 2873141098Sdes if test "$with_gnu_ld" = yes; then 2874141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 2875141098Sdes _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' 2876141098Sdes 2877141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 2878141098Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 2879141098Sdes 2880141098Sdes # If archive_cmds runs LD, not CC, wlarc should be empty 2881141098Sdes # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 2882141098Sdes # investigate it a little bit more. (MM) 2883141098Sdes wlarc='${wl}' 2884141098Sdes 2885141098Sdes # ancient GNU ld didn't support --whole-archive et. al. 2886141098Sdes if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 2887141098Sdes grep 'no-whole-archive' > /dev/null; then 2888141098Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 2889141098Sdes else 2890141098Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2891141098Sdes fi 2892141098Sdes else 2893141098Sdes with_gnu_ld=no 2894141098Sdes wlarc= 2895141098Sdes 2896141098Sdes # A generic and very simple default shared library creation 2897141098Sdes # command for GNU C++ for the case where it uses the native 2898141098Sdes # linker, instead of GNU ld. If possible, this setting should 2899141098Sdes # overridden to take advantage of the native linker features on 2900141098Sdes # the platform it is being used on. 2901141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 2902141098Sdes fi 2903141098Sdes 2904141098Sdes # Commands to make compiler produce verbose output that lists 2905141098Sdes # what "hidden" libraries, object files and flags are used when 2906141098Sdes # linking a shared library. 2907141098Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 2908141098Sdes 2909141098Sdeselse 2910141098Sdes GXX=no 2911141098Sdes with_gnu_ld=no 2912141098Sdes wlarc= 2913141098Sdesfi 2914141098Sdes 2915141098Sdes# PORTME: fill in a description of your system's C++ link characteristics 2916141098SdesAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 2917141098Sdes_LT_AC_TAGVAR(ld_shlibs, $1)=yes 2918141098Sdescase $host_os in 2919141098Sdes aix3*) 2920141098Sdes # FIXME: insert proper C++ library support 2921141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 2922141098Sdes ;; 2923141098Sdes aix4* | aix5*) 2924141098Sdes if test "$host_cpu" = ia64; then 2925141098Sdes # On IA64, the linker does run time linking by default, so we don't 2926141098Sdes # have to do anything special. 2927141098Sdes aix_use_runtimelinking=no 2928141098Sdes exp_sym_flag='-Bexport' 2929141098Sdes no_entry_flag="" 2930141098Sdes else 2931141098Sdes aix_use_runtimelinking=no 2932141098Sdes 2933141098Sdes # Test if we are trying to use run time linking or normal 2934141098Sdes # AIX style linking. If -brtl is somewhere in LDFLAGS, we 2935141098Sdes # need to do runtime linking. 2936141098Sdes case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 2937141098Sdes for ld_flag in $LDFLAGS; do 2938141098Sdes case $ld_flag in 2939141098Sdes *-brtl*) 2940141098Sdes aix_use_runtimelinking=yes 2941141098Sdes break 2942141098Sdes ;; 2943141098Sdes esac 2944141098Sdes done 2945174832Sdes ;; 2946141098Sdes esac 2947141098Sdes 2948141098Sdes exp_sym_flag='-bexport' 2949141098Sdes no_entry_flag='-bnoentry' 2950141098Sdes fi 2951141098Sdes 2952141098Sdes # When large executables or shared objects are built, AIX ld can 2953141098Sdes # have problems creating the table of contents. If linking a library 2954141098Sdes # or program results in "error TOC overflow" add -mminimal-toc to 2955141098Sdes # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 2956141098Sdes # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 2957141098Sdes 2958141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='' 2959141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 2960141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 2961141098Sdes _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 2962141098Sdes 2963141098Sdes if test "$GXX" = yes; then 2964147455Sdes case $host_os in aix4.[[012]]|aix4.[[012]].*) 2965141098Sdes # We only want to do this on AIX 4.2 and lower, the check 2966141098Sdes # below for broken collect2 doesn't work under 4.3+ 2967141098Sdes collect2name=`${CC} -print-prog-name=collect2` 2968141098Sdes if test -f "$collect2name" && \ 2969141098Sdes strings "$collect2name" | grep resolve_lib_name >/dev/null 2970141098Sdes then 2971141098Sdes # We have reworked collect2 2972174832Sdes : 2973141098Sdes else 2974141098Sdes # We have old collect2 2975141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 2976141098Sdes # It fails to find uninstalled libraries when the uninstalled 2977141098Sdes # path is not listed in the libpath. Setting hardcode_minus_L 2978141098Sdes # to unsupported forces relinking 2979141098Sdes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 2980141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2981141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2982141098Sdes fi 2983174832Sdes ;; 2984141098Sdes esac 2985141098Sdes shared_flag='-shared' 2986147455Sdes if test "$aix_use_runtimelinking" = yes; then 2987147455Sdes shared_flag="$shared_flag "'${wl}-G' 2988147455Sdes fi 2989141098Sdes else 2990141098Sdes # not using gcc 2991141098Sdes if test "$host_cpu" = ia64; then 2992141098Sdes # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 2993141098Sdes # chokes on -Wl,-G. The following line is correct: 2994141098Sdes shared_flag='-G' 2995141098Sdes else 2996141098Sdes if test "$aix_use_runtimelinking" = yes; then 2997141098Sdes shared_flag='${wl}-G' 2998141098Sdes else 2999141098Sdes shared_flag='${wl}-bM:SRE' 3000141098Sdes fi 3001141098Sdes fi 3002141098Sdes fi 3003141098Sdes 3004141098Sdes # It seems that -bexpall does not export symbols beginning with 3005141098Sdes # underscore (_), so it is better to generate a list of symbols to export. 3006141098Sdes _LT_AC_TAGVAR(always_export_symbols, $1)=yes 3007141098Sdes if test "$aix_use_runtimelinking" = yes; then 3008141098Sdes # Warning - without using the other runtime loading flags (-brtl), 3009141098Sdes # -berok will link without error, but may produce a broken library. 3010141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 3011141098Sdes # Determine the default libpath from the value encoded in an empty executable. 3012141098Sdes _LT_AC_SYS_LIBPATH_AIX 3013141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3014141098Sdes 3015174832Sdes _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" 3016141098Sdes else 3017141098Sdes if test "$host_cpu" = ia64; then 3018141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 3019141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 3020174832Sdes _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" 3021141098Sdes else 3022141098Sdes # Determine the default libpath from the value encoded in an empty executable. 3023141098Sdes _LT_AC_SYS_LIBPATH_AIX 3024141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3025141098Sdes # Warning - without using the other run time loading flags, 3026141098Sdes # -berok will link without error, but may produce a broken library. 3027141098Sdes _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 3028141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 3029141098Sdes # Exported symbols can be pulled into shared objects from archives 3030174832Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 3031141098Sdes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 3032174832Sdes # This is similar to how AIX traditionally builds its shared libraries. 3033174832Sdes _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' 3034141098Sdes fi 3035141098Sdes fi 3036141098Sdes ;; 3037174832Sdes 3038174832Sdes beos*) 3039174832Sdes if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 3040174832Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3041174832Sdes # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 3042174832Sdes # support --undefined. This deserves some investigation. FIXME 3043174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3044174832Sdes else 3045174832Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3046174832Sdes fi 3047174832Sdes ;; 3048174832Sdes 3049141098Sdes chorus*) 3050141098Sdes case $cc_basename in 3051141098Sdes *) 3052141098Sdes # FIXME: insert proper C++ library support 3053141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3054141098Sdes ;; 3055141098Sdes esac 3056141098Sdes ;; 3057141098Sdes 3058141098Sdes cygwin* | mingw* | pw32*) 3059141098Sdes # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 3060141098Sdes # as there is no search path for DLLs. 3061141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3062141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3063141098Sdes _LT_AC_TAGVAR(always_export_symbols, $1)=no 3064141098Sdes _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 3065141098Sdes 3066141098Sdes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 3067174832Sdes _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' 3068141098Sdes # If the export-symbols file already is a .def file (1st line 3069141098Sdes # is EXPORTS), use it as is; otherwise, prepend... 3070141098Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 3071141098Sdes cp $export_symbols $output_objdir/$soname.def; 3072141098Sdes else 3073141098Sdes echo EXPORTS > $output_objdir/$soname.def; 3074141098Sdes cat $export_symbols >> $output_objdir/$soname.def; 3075141098Sdes fi~ 3076174832Sdes $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' 3077141098Sdes else 3078141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3079141098Sdes fi 3080141098Sdes ;; 3081141098Sdes darwin* | rhapsody*) 3082174832Sdes case $host_os in 3083141098Sdes rhapsody* | darwin1.[[012]]) 3084141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 3085141098Sdes ;; 3086141098Sdes *) # Darwin 1.3 on 3087141098Sdes if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 3088141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 3089141098Sdes else 3090141098Sdes case ${MACOSX_DEPLOYMENT_TARGET} in 3091141098Sdes 10.[[012]]) 3092141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 3093141098Sdes ;; 3094141098Sdes 10.*) 3095141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 3096141098Sdes ;; 3097141098Sdes esac 3098141098Sdes fi 3099141098Sdes ;; 3100141098Sdes esac 3101141098Sdes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3102141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=no 3103141098Sdes _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 3104141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3105141098Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 3106141098Sdes _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3107141098Sdes 3108141098Sdes if test "$GXX" = yes ; then 3109141098Sdes lt_int_apple_cc_single_mod=no 3110141098Sdes output_verbose_link_cmd='echo' 3111141098Sdes if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 3112141098Sdes lt_int_apple_cc_single_mod=yes 3113141098Sdes fi 3114141098Sdes if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 3115141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 3116141098Sdes else 3117141098Sdes _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' 3118141098Sdes fi 3119141098Sdes _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3120174832Sdes # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3121141098Sdes if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 3122141098Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3123141098Sdes else 3124141098Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3125141098Sdes fi 3126141098Sdes _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}' 3127141098Sdes else 3128174832Sdes case $cc_basename in 3129141098Sdes xlc*) 3130141098Sdes output_verbose_link_cmd='echo' 3131174832Sdes _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' 3132141098Sdes _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3133174832Sdes # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3134174832Sdes _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}' 3135141098Sdes _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}' 3136141098Sdes ;; 3137141098Sdes *) 3138141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3139141098Sdes ;; 3140141098Sdes esac 3141141098Sdes fi 3142141098Sdes ;; 3143141098Sdes 3144141098Sdes dgux*) 3145141098Sdes case $cc_basename in 3146174832Sdes ec++*) 3147141098Sdes # FIXME: insert proper C++ library support 3148141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3149141098Sdes ;; 3150174832Sdes ghcx*) 3151141098Sdes # Green Hills C++ Compiler 3152141098Sdes # FIXME: insert proper C++ library support 3153141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3154141098Sdes ;; 3155141098Sdes *) 3156141098Sdes # FIXME: insert proper C++ library support 3157141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3158141098Sdes ;; 3159141098Sdes esac 3160141098Sdes ;; 3161147455Sdes freebsd[[12]]*) 3162141098Sdes # C++ shared libraries reported to be fairly broken before switch to ELF 3163141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3164141098Sdes ;; 3165141098Sdes freebsd-elf*) 3166141098Sdes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3167141098Sdes ;; 3168174832Sdes freebsd* | dragonfly*) 3169141098Sdes # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 3170141098Sdes # conventions 3171141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=yes 3172141098Sdes ;; 3173141098Sdes gnu*) 3174141098Sdes ;; 3175141098Sdes hpux9*) 3176141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3177141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3178141098Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3179141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3180141098Sdes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3181141098Sdes # but as the default 3182141098Sdes # location of the library. 3183141098Sdes 3184141098Sdes case $cc_basename in 3185174832Sdes CC*) 3186141098Sdes # FIXME: insert proper C++ library support 3187141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3188141098Sdes ;; 3189174832Sdes aCC*) 3190141098Sdes _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' 3191141098Sdes # Commands to make compiler produce verbose output that lists 3192141098Sdes # what "hidden" libraries, object files and flags are used when 3193141098Sdes # linking a shared library. 3194141098Sdes # 3195141098Sdes # There doesn't appear to be a way to prevent this compiler from 3196141098Sdes # explicitly linking system object files so we need to strip them 3197141098Sdes # from the output so that they don't get included in the library 3198141098Sdes # dependencies. 3199147455Sdes 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' 3200141098Sdes ;; 3201141098Sdes *) 3202141098Sdes if test "$GXX" = yes; then 3203141098Sdes _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' 3204141098Sdes else 3205141098Sdes # FIXME: insert proper C++ library support 3206141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3207141098Sdes fi 3208141098Sdes ;; 3209141098Sdes esac 3210141098Sdes ;; 3211141098Sdes hpux10*|hpux11*) 3212141098Sdes if test $with_gnu_ld = no; then 3213174832Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3214174832Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3215174832Sdes 3216174832Sdes case $host_cpu in 3217174832Sdes hppa*64*|ia64*) ;; 3218141098Sdes *) 3219141098Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3220141098Sdes ;; 3221141098Sdes esac 3222141098Sdes fi 3223174832Sdes case $host_cpu in 3224174832Sdes hppa*64*|ia64*) 3225141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=no 3226141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3227141098Sdes ;; 3228141098Sdes *) 3229141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3230141098Sdes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3231141098Sdes # but as the default 3232141098Sdes # location of the library. 3233141098Sdes ;; 3234141098Sdes esac 3235141098Sdes 3236141098Sdes case $cc_basename in 3237174832Sdes CC*) 3238141098Sdes # FIXME: insert proper C++ library support 3239141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3240141098Sdes ;; 3241174832Sdes aCC*) 3242174832Sdes case $host_cpu in 3243174832Sdes hppa*64*) 3244174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3245141098Sdes ;; 3246174832Sdes ia64*) 3247174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3248174832Sdes ;; 3249141098Sdes *) 3250141098Sdes _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' 3251141098Sdes ;; 3252141098Sdes esac 3253141098Sdes # Commands to make compiler produce verbose output that lists 3254141098Sdes # what "hidden" libraries, object files and flags are used when 3255141098Sdes # linking a shared library. 3256141098Sdes # 3257141098Sdes # There doesn't appear to be a way to prevent this compiler from 3258141098Sdes # explicitly linking system object files so we need to strip them 3259141098Sdes # from the output so that they don't get included in the library 3260141098Sdes # dependencies. 3261141098Sdes 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' 3262141098Sdes ;; 3263141098Sdes *) 3264141098Sdes if test "$GXX" = yes; then 3265141098Sdes if test $with_gnu_ld = no; then 3266174832Sdes case $host_cpu in 3267174832Sdes hppa*64*) 3268174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3269141098Sdes ;; 3270174832Sdes ia64*) 3271174832Sdes _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' 3272174832Sdes ;; 3273141098Sdes *) 3274141098Sdes _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' 3275141098Sdes ;; 3276141098Sdes esac 3277141098Sdes fi 3278141098Sdes else 3279141098Sdes # FIXME: insert proper C++ library support 3280141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3281141098Sdes fi 3282141098Sdes ;; 3283141098Sdes esac 3284141098Sdes ;; 3285174832Sdes interix[[3-9]]*) 3286174832Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=no 3287174832Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3288174832Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3289174832Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3290174832Sdes # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 3291174832Sdes # Instead, shared libraries are loaded at an image base (0x10000000 by 3292174832Sdes # default) and relocated if they conflict, which is a slow very memory 3293174832Sdes # consuming and fragmenting process. To avoid this, we pick a random, 3294174832Sdes # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 3295174832Sdes # time. Moving up from 0x10000000 also allows more sbrk(2) space. 3296174832Sdes _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' 3297174832Sdes _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' 3298174832Sdes ;; 3299141098Sdes irix5* | irix6*) 3300141098Sdes case $cc_basename in 3301174832Sdes CC*) 3302141098Sdes # SGI C++ 3303174832Sdes _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' 3304141098Sdes 3305141098Sdes # Archives containing C++ object files must be created using 3306141098Sdes # "CC -ar", where "CC" is the IRIX C++ compiler. This is 3307141098Sdes # necessary to make sure instantiated templates are included 3308141098Sdes # in the archive. 3309141098Sdes _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 3310141098Sdes ;; 3311141098Sdes *) 3312141098Sdes if test "$GXX" = yes; then 3313141098Sdes if test "$with_gnu_ld" = no; then 3314174832Sdes _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' 3315141098Sdes else 3316141098Sdes _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' 3317141098Sdes fi 3318141098Sdes fi 3319141098Sdes _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3320141098Sdes ;; 3321141098Sdes esac 3322141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3323141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3324141098Sdes ;; 3325174832Sdes linux* | k*bsd*-gnu) 3326141098Sdes case $cc_basename in 3327174832Sdes KCC*) 3328141098Sdes # Kuck and Associates, Inc. (KAI) C++ Compiler 3329141098Sdes 3330141098Sdes # KCC will only create a shared library if the output file 3331141098Sdes # ends with ".so" (or ".sl" for HP-UX), so rename the library 3332141098Sdes # to its proper name (with version) after linking. 3333141098Sdes _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' 3334141098Sdes _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' 3335141098Sdes # Commands to make compiler produce verbose output that lists 3336141098Sdes # what "hidden" libraries, object files and flags are used when 3337141098Sdes # linking a shared library. 3338141098Sdes # 3339141098Sdes # There doesn't appear to be a way to prevent this compiler from 3340141098Sdes # explicitly linking system object files so we need to strip them 3341141098Sdes # from the output so that they don't get included in the library 3342141098Sdes # dependencies. 3343141098Sdes 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' 3344141098Sdes 3345141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 3346141098Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3347141098Sdes 3348141098Sdes # Archives containing C++ object files must be created using 3349141098Sdes # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3350141098Sdes _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3351141098Sdes ;; 3352174832Sdes icpc*) 3353141098Sdes # Intel C++ 3354141098Sdes with_gnu_ld=yes 3355141098Sdes # version 8.0 and above of icpc choke on multiply defined symbols 3356141098Sdes # if we add $predep_objects and $postdep_objects, however 7.1 and 3357141098Sdes # earlier do not add the objects themselves. 3358141098Sdes case `$CC -V 2>&1` in 3359141098Sdes *"Version 7."*) 3360141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3361141098Sdes _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' 3362141098Sdes ;; 3363141098Sdes *) # Version 8.0 or newer 3364147455Sdes tmp_idyn= 3365147455Sdes case $host_cpu in 3366147455Sdes ia64*) tmp_idyn=' -i_dynamic';; 3367147455Sdes esac 3368147455Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3369147455Sdes _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' 3370141098Sdes ;; 3371141098Sdes esac 3372141098Sdes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3373141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3374141098Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3375141098Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 3376141098Sdes ;; 3377174832Sdes pgCC*) 3378147455Sdes # Portland Group C++ compiler 3379174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 3380174832Sdes _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' 3381147455Sdes 3382147455Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3383147455Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3384174832Sdes _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' 3385147455Sdes ;; 3386174832Sdes cxx*) 3387141098Sdes # Compaq C++ 3388141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3389141098Sdes _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' 3390141098Sdes 3391141098Sdes runpath_var=LD_RUN_PATH 3392141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3393141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3394141098Sdes 3395141098Sdes # Commands to make compiler produce verbose output that lists 3396141098Sdes # what "hidden" libraries, object files and flags are used when 3397141098Sdes # linking a shared library. 3398141098Sdes # 3399141098Sdes # There doesn't appear to be a way to prevent this compiler from 3400141098Sdes # explicitly linking system object files so we need to strip them 3401141098Sdes # from the output so that they don't get included in the library 3402141098Sdes # dependencies. 3403141098Sdes 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' 3404141098Sdes ;; 3405174832Sdes *) 3406174832Sdes case `$CC -V 2>&1 | sed 5q` in 3407174832Sdes *Sun\ C*) 3408174832Sdes # Sun C++ 5.9 3409174832Sdes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3410174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3411174832Sdes _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' 3412174832Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3413174832Sdes _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' 3414174832Sdes 3415174832Sdes # Not sure whether something based on 3416174832Sdes # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 3417174832Sdes # would be better. 3418174832Sdes output_verbose_link_cmd='echo' 3419174832Sdes 3420174832Sdes # Archives containing C++ object files must be created using 3421174832Sdes # "CC -xar", where "CC" is the Sun C++ compiler. This is 3422174832Sdes # necessary to make sure instantiated templates are included 3423174832Sdes # in the archive. 3424174832Sdes _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3425174832Sdes ;; 3426174832Sdes esac 3427174832Sdes ;; 3428141098Sdes esac 3429141098Sdes ;; 3430141098Sdes lynxos*) 3431141098Sdes # FIXME: insert proper C++ library support 3432141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3433141098Sdes ;; 3434141098Sdes m88k*) 3435141098Sdes # FIXME: insert proper C++ library support 3436141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3437141098Sdes ;; 3438141098Sdes mvs*) 3439141098Sdes case $cc_basename in 3440174832Sdes cxx*) 3441141098Sdes # FIXME: insert proper C++ library support 3442141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3443141098Sdes ;; 3444141098Sdes *) 3445141098Sdes # FIXME: insert proper C++ library support 3446141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3447141098Sdes ;; 3448141098Sdes esac 3449141098Sdes ;; 3450141098Sdes netbsd*) 3451141098Sdes if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3452141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 3453141098Sdes wlarc= 3454141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3455141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3456141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3457141098Sdes fi 3458141098Sdes # Workaround some broken pre-1.5 toolchains 3459141098Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 3460141098Sdes ;; 3461141098Sdes openbsd2*) 3462141098Sdes # C++ shared libraries are fairly broken 3463141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3464141098Sdes ;; 3465141098Sdes openbsd*) 3466174832Sdes if test -f /usr/libexec/ld.so; then 3467174832Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3468174832Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3469174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3470174832Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3471174832Sdes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3472174832Sdes _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' 3473174832Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3474174832Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3475174832Sdes fi 3476174832Sdes output_verbose_link_cmd='echo' 3477174832Sdes else 3478174832Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3479141098Sdes fi 3480141098Sdes ;; 3481141098Sdes osf3*) 3482141098Sdes case $cc_basename in 3483174832Sdes KCC*) 3484141098Sdes # Kuck and Associates, Inc. (KAI) C++ Compiler 3485141098Sdes 3486141098Sdes # KCC will only create a shared library if the output file 3487141098Sdes # ends with ".so" (or ".sl" for HP-UX), so rename the library 3488141098Sdes # to its proper name (with version) after linking. 3489141098Sdes _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' 3490141098Sdes 3491141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3492141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3493141098Sdes 3494141098Sdes # Archives containing C++ object files must be created using 3495141098Sdes # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3496141098Sdes _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3497141098Sdes 3498141098Sdes ;; 3499174832Sdes RCC*) 3500141098Sdes # Rational C++ 2.4.1 3501141098Sdes # FIXME: insert proper C++ library support 3502141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3503141098Sdes ;; 3504174832Sdes cxx*) 3505141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3506174832Sdes _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' 3507141098Sdes 3508141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3509141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3510141098Sdes 3511141098Sdes # Commands to make compiler produce verbose output that lists 3512141098Sdes # what "hidden" libraries, object files and flags are used when 3513141098Sdes # linking a shared library. 3514141098Sdes # 3515141098Sdes # There doesn't appear to be a way to prevent this compiler from 3516141098Sdes # explicitly linking system object files so we need to strip them 3517141098Sdes # from the output so that they don't get included in the library 3518141098Sdes # dependencies. 3519141098Sdes 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' 3520141098Sdes ;; 3521141098Sdes *) 3522141098Sdes if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3523141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3524174832Sdes _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' 3525141098Sdes 3526141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3527141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3528141098Sdes 3529141098Sdes # Commands to make compiler produce verbose output that lists 3530141098Sdes # what "hidden" libraries, object files and flags are used when 3531141098Sdes # linking a shared library. 3532141098Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3533141098Sdes 3534141098Sdes else 3535141098Sdes # FIXME: insert proper C++ library support 3536141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3537141098Sdes fi 3538141098Sdes ;; 3539141098Sdes esac 3540141098Sdes ;; 3541141098Sdes osf4* | osf5*) 3542141098Sdes case $cc_basename in 3543174832Sdes KCC*) 3544141098Sdes # Kuck and Associates, Inc. (KAI) C++ Compiler 3545141098Sdes 3546141098Sdes # KCC will only create a shared library if the output file 3547141098Sdes # ends with ".so" (or ".sl" for HP-UX), so rename the library 3548141098Sdes # to its proper name (with version) after linking. 3549141098Sdes _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' 3550141098Sdes 3551141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3552141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3553141098Sdes 3554141098Sdes # Archives containing C++ object files must be created using 3555141098Sdes # the KAI C++ compiler. 3556141098Sdes _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 3557141098Sdes ;; 3558174832Sdes RCC*) 3559141098Sdes # Rational C++ 2.4.1 3560141098Sdes # FIXME: insert proper C++ library support 3561141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3562141098Sdes ;; 3563174832Sdes cxx*) 3564141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 3565174832Sdes _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' 3566141098Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 3567141098Sdes echo "-hidden">> $lib.exp~ 3568174832Sdes $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~ 3569141098Sdes $rm $lib.exp' 3570141098Sdes 3571141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3572141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3573141098Sdes 3574141098Sdes # Commands to make compiler produce verbose output that lists 3575141098Sdes # what "hidden" libraries, object files and flags are used when 3576141098Sdes # linking a shared library. 3577141098Sdes # 3578141098Sdes # There doesn't appear to be a way to prevent this compiler from 3579141098Sdes # explicitly linking system object files so we need to strip them 3580141098Sdes # from the output so that they don't get included in the library 3581141098Sdes # dependencies. 3582141098Sdes 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' 3583141098Sdes ;; 3584141098Sdes *) 3585141098Sdes if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3586141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3587174832Sdes _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' 3588141098Sdes 3589141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3590141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3591141098Sdes 3592141098Sdes # Commands to make compiler produce verbose output that lists 3593141098Sdes # what "hidden" libraries, object files and flags are used when 3594141098Sdes # linking a shared library. 3595141098Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3596141098Sdes 3597141098Sdes else 3598141098Sdes # FIXME: insert proper C++ library support 3599141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3600141098Sdes fi 3601141098Sdes ;; 3602141098Sdes esac 3603141098Sdes ;; 3604141098Sdes psos*) 3605141098Sdes # FIXME: insert proper C++ library support 3606141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3607141098Sdes ;; 3608141098Sdes sunos4*) 3609141098Sdes case $cc_basename in 3610174832Sdes CC*) 3611141098Sdes # Sun C++ 4.x 3612141098Sdes # FIXME: insert proper C++ library support 3613141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3614141098Sdes ;; 3615174832Sdes lcc*) 3616141098Sdes # Lucid 3617141098Sdes # FIXME: insert proper C++ library support 3618141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3619141098Sdes ;; 3620141098Sdes *) 3621141098Sdes # FIXME: insert proper C++ library support 3622141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3623141098Sdes ;; 3624141098Sdes esac 3625141098Sdes ;; 3626141098Sdes solaris*) 3627141098Sdes case $cc_basename in 3628174832Sdes CC*) 3629141098Sdes # Sun C++ 4.2, 5.x and Centerline C++ 3630174832Sdes _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 3631141098Sdes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3632174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3633141098Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3634174832Sdes $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' 3635141098Sdes 3636141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3637141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3638141098Sdes case $host_os in 3639147455Sdes solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3640141098Sdes *) 3641174832Sdes # The compiler driver will combine and reorder linker options, 3642174832Sdes # but understands `-z linker_flag'. 3643141098Sdes # Supported since Solaris 2.6 (maybe 2.5.1?) 3644174832Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 3645141098Sdes ;; 3646141098Sdes esac 3647141098Sdes _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3648141098Sdes 3649174832Sdes output_verbose_link_cmd='echo' 3650141098Sdes 3651141098Sdes # Archives containing C++ object files must be created using 3652141098Sdes # "CC -xar", where "CC" is the Sun C++ compiler. This is 3653141098Sdes # necessary to make sure instantiated templates are included 3654141098Sdes # in the archive. 3655141098Sdes _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3656141098Sdes ;; 3657174832Sdes gcx*) 3658141098Sdes # Green Hills C++ Compiler 3659141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3660141098Sdes 3661141098Sdes # The C++ compiler must be used to create the archive. 3662141098Sdes _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 3663141098Sdes ;; 3664141098Sdes *) 3665141098Sdes # GNU C++ compiler with Solaris linker 3666141098Sdes if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3667141098Sdes _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 3668141098Sdes if $CC --version | grep -v '^2\.7' > /dev/null; then 3669141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3670141098Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3671141098Sdes $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3672141098Sdes 3673141098Sdes # Commands to make compiler produce verbose output that lists 3674141098Sdes # what "hidden" libraries, object files and flags are used when 3675141098Sdes # linking a shared library. 3676141098Sdes output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3677141098Sdes else 3678141098Sdes # g++ 2.7 appears to require `-G' NOT `-shared' on this 3679141098Sdes # platform. 3680141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3681141098Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3682141098Sdes $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3683141098Sdes 3684141098Sdes # Commands to make compiler produce verbose output that lists 3685141098Sdes # what "hidden" libraries, object files and flags are used when 3686141098Sdes # linking a shared library. 3687141098Sdes output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3688141098Sdes fi 3689141098Sdes 3690141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 3691174832Sdes case $host_os in 3692174832Sdes solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3693174832Sdes *) 3694174832Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 3695174832Sdes ;; 3696174832Sdes esac 3697141098Sdes fi 3698141098Sdes ;; 3699141098Sdes esac 3700141098Sdes ;; 3701174832Sdes sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 3702174832Sdes _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3703141098Sdes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3704174832Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3705174832Sdes runpath_var='LD_RUN_PATH' 3706174832Sdes 3707174832Sdes case $cc_basename in 3708174832Sdes CC*) 3709174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3710174832Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3711174832Sdes ;; 3712174832Sdes *) 3713174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3714174832Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3715174832Sdes ;; 3716174832Sdes esac 3717141098Sdes ;; 3718174832Sdes sysv5* | sco3.2v5* | sco5v6*) 3719174832Sdes # Note: We can NOT use -z defs as we might desire, because we do not 3720174832Sdes # link with -lc, and that would cause any symbols used from libc to 3721174832Sdes # always be unresolved, which means just about no library would 3722174832Sdes # ever link correctly. If we're not using GNU ld we use -z text 3723174832Sdes # though, which does catch some bad symbols but isn't as heavy-handed 3724174832Sdes # as -z defs. 3725174832Sdes # For security reasons, it is highly recommended that you always 3726174832Sdes # use absolute paths for naming shared libraries, and exclude the 3727174832Sdes # DT_RUNPATH tag from executables and libraries. But doing so 3728174832Sdes # requires that you compile everything twice, which is a pain. 3729174832Sdes # So that behaviour is only enabled if SCOABSPATH is set to a 3730174832Sdes # non-empty value in the environment. Most likely only useful for 3731174832Sdes # creating official distributions of packages. 3732174832Sdes # This is a hack until libtool officially supports absolute path 3733174832Sdes # names for shared libraries. 3734174832Sdes _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3735174832Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 3736174832Sdes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3737174832Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3738174832Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 3739174832Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3740174832Sdes _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3741174832Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 3742174832Sdes runpath_var='LD_RUN_PATH' 3743174832Sdes 3744174832Sdes case $cc_basename in 3745174832Sdes CC*) 3746174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3747174832Sdes _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' 3748174832Sdes ;; 3749174832Sdes *) 3750174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3751174832Sdes _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' 3752174832Sdes ;; 3753174832Sdes esac 3754174832Sdes ;; 3755141098Sdes tandem*) 3756141098Sdes case $cc_basename in 3757174832Sdes NCC*) 3758141098Sdes # NonStop-UX NCC 3.20 3759141098Sdes # FIXME: insert proper C++ library support 3760141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3761141098Sdes ;; 3762141098Sdes *) 3763141098Sdes # FIXME: insert proper C++ library support 3764141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3765141098Sdes ;; 3766141098Sdes esac 3767141098Sdes ;; 3768141098Sdes vxworks*) 3769141098Sdes # FIXME: insert proper C++ library support 3770141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3771141098Sdes ;; 3772141098Sdes *) 3773141098Sdes # FIXME: insert proper C++ library support 3774141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 3775141098Sdes ;; 3776141098Sdesesac 3777141098SdesAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 3778141098Sdestest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 3779141098Sdes 3780141098Sdes_LT_AC_TAGVAR(GCC, $1)="$GXX" 3781141098Sdes_LT_AC_TAGVAR(LD, $1)="$LD" 3782141098Sdes 3783141098SdesAC_LIBTOOL_POSTDEP_PREDEP($1) 3784141098SdesAC_LIBTOOL_PROG_COMPILER_PIC($1) 3785141098SdesAC_LIBTOOL_PROG_CC_C_O($1) 3786141098SdesAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3787141098SdesAC_LIBTOOL_PROG_LD_SHLIBS($1) 3788141098SdesAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3789141098SdesAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3790141098Sdes 3791141098SdesAC_LIBTOOL_CONFIG($1) 3792141098Sdes 3793141098SdesAC_LANG_POP 3794141098SdesCC=$lt_save_CC 3795141098SdesLDCXX=$LD 3796141098SdesLD=$lt_save_LD 3797141098SdesGCC=$lt_save_GCC 3798141098Sdeswith_gnu_ldcxx=$with_gnu_ld 3799141098Sdeswith_gnu_ld=$lt_save_with_gnu_ld 3800141098Sdeslt_cv_path_LDCXX=$lt_cv_path_LD 3801141098Sdeslt_cv_path_LD=$lt_save_path_LD 3802141098Sdeslt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 3803141098Sdeslt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 3804141098Sdes])# AC_LIBTOOL_LANG_CXX_CONFIG 3805141098Sdes 3806141098Sdes# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 3807174832Sdes# ------------------------------------ 3808141098Sdes# Figure out "hidden" library dependencies from verbose 3809141098Sdes# compiler output when linking a shared library. 3810141098Sdes# Parse the compiler output and extract the necessary 3811141098Sdes# objects, libraries and library flags. 3812141098SdesAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 3813141098Sdesdnl we can't use the lt_simple_compile_test_code here, 3814141098Sdesdnl because it contains code intended for an executable, 3815141098Sdesdnl not a library. It's possible we should let each 3816141098Sdesdnl tag define a new lt_????_link_test_code variable, 3817141098Sdesdnl but it's only used here... 3818141098Sdesifelse([$1],[],[cat > conftest.$ac_ext <<EOF 3819141098Sdesint a; 3820141098Sdesvoid foo (void) { a = 0; } 3821141098SdesEOF 3822141098Sdes],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 3823141098Sdesclass Foo 3824141098Sdes{ 3825141098Sdespublic: 3826141098Sdes Foo (void) { a = 0; } 3827141098Sdesprivate: 3828141098Sdes int a; 3829141098Sdes}; 3830141098SdesEOF 3831141098Sdes],[$1],[F77],[cat > conftest.$ac_ext <<EOF 3832141098Sdes subroutine foo 3833141098Sdes implicit none 3834141098Sdes integer*4 a 3835141098Sdes a=0 3836141098Sdes return 3837141098Sdes end 3838141098SdesEOF 3839141098Sdes],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 3840141098Sdespublic class foo { 3841141098Sdes private int a; 3842141098Sdes public void bar (void) { 3843141098Sdes a = 0; 3844141098Sdes } 3845141098Sdes}; 3846141098SdesEOF 3847117610Sdes]) 3848141098Sdesdnl Parse the compiler output and extract the necessary 3849141098Sdesdnl objects, libraries and library flags. 3850141098Sdesif AC_TRY_EVAL(ac_compile); then 3851141098Sdes # Parse the compiler output and extract the necessary 3852141098Sdes # objects, libraries and library flags. 3853117610Sdes 3854141098Sdes # Sentinel used to keep track of whether or not we are before 3855141098Sdes # the conftest object file. 3856141098Sdes pre_test_object_deps_done=no 3857141098Sdes 3858141098Sdes # The `*' in the case matches for architectures that use `case' in 3859141098Sdes # $output_verbose_cmd can trigger glob expansion during the loop 3860141098Sdes # eval without this substitution. 3861174832Sdes output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 3862141098Sdes 3863141098Sdes for p in `eval $output_verbose_link_cmd`; do 3864141098Sdes case $p in 3865141098Sdes 3866141098Sdes -L* | -R* | -l*) 3867141098Sdes # Some compilers place space between "-{L,R}" and the path. 3868141098Sdes # Remove the space. 3869141098Sdes if test $p = "-L" \ 3870141098Sdes || test $p = "-R"; then 3871141098Sdes prev=$p 3872141098Sdes continue 3873141098Sdes else 3874141098Sdes prev= 3875141098Sdes fi 3876141098Sdes 3877141098Sdes if test "$pre_test_object_deps_done" = no; then 3878141098Sdes case $p in 3879141098Sdes -L* | -R*) 3880141098Sdes # Internal compiler library paths should come after those 3881141098Sdes # provided the user. The postdeps already come after the 3882141098Sdes # user supplied libs so there is no need to process them. 3883141098Sdes if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 3884141098Sdes _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 3885141098Sdes else 3886141098Sdes _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 3887141098Sdes fi 3888141098Sdes ;; 3889141098Sdes # The "-l" case would never come before the object being 3890141098Sdes # linked, so don't bother handling this case. 3891141098Sdes esac 3892141098Sdes else 3893141098Sdes if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 3894141098Sdes _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 3895141098Sdes else 3896141098Sdes _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 3897141098Sdes fi 3898141098Sdes fi 3899141098Sdes ;; 3900141098Sdes 3901141098Sdes *.$objext) 3902141098Sdes # This assumes that the test object file only shows up 3903141098Sdes # once in the compiler output. 3904141098Sdes if test "$p" = "conftest.$objext"; then 3905141098Sdes pre_test_object_deps_done=yes 3906141098Sdes continue 3907141098Sdes fi 3908141098Sdes 3909141098Sdes if test "$pre_test_object_deps_done" = no; then 3910141098Sdes if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 3911141098Sdes _LT_AC_TAGVAR(predep_objects, $1)="$p" 3912141098Sdes else 3913141098Sdes _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 3914141098Sdes fi 3915141098Sdes else 3916141098Sdes if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 3917141098Sdes _LT_AC_TAGVAR(postdep_objects, $1)="$p" 3918141098Sdes else 3919141098Sdes _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 3920141098Sdes fi 3921141098Sdes fi 3922141098Sdes ;; 3923141098Sdes 3924141098Sdes *) ;; # Ignore the rest. 3925141098Sdes 3926141098Sdes esac 3927141098Sdes done 3928141098Sdes 3929141098Sdes # Clean up. 3930141098Sdes rm -f a.out a.exe 3931141098Sdeselse 3932141098Sdes echo "libtool.m4: error: problem compiling $1 test program" 3933141098Sdesfi 3934141098Sdes 3935141098Sdes$rm -f confest.$objext 3936141098Sdes 3937174832Sdes# PORTME: override above test on systems where it is broken 3938174832Sdesifelse([$1],[CXX], 3939174832Sdes[case $host_os in 3940174832Sdesinterix[[3-9]]*) 3941174832Sdes # Interix 3.5 installs completely hosed .la files for C++, so rather than 3942174832Sdes # hack all around it, let's just trust "g++" to DTRT. 3943174832Sdes _LT_AC_TAGVAR(predep_objects,$1)= 3944174832Sdes _LT_AC_TAGVAR(postdep_objects,$1)= 3945174832Sdes _LT_AC_TAGVAR(postdeps,$1)= 3946174832Sdes ;; 3947174832Sdes 3948174832Sdeslinux*) 3949174832Sdes case `$CC -V 2>&1 | sed 5q` in 3950174832Sdes *Sun\ C*) 3951174832Sdes # Sun C++ 5.9 3952174832Sdes # 3953174832Sdes # The more standards-conforming stlport4 library is 3954174832Sdes # incompatible with the Cstd library. Avoid specifying 3955174832Sdes # it if it's in CXXFLAGS. Ignore libCrun as 3956174832Sdes # -library=stlport4 depends on it. 3957174832Sdes case " $CXX $CXXFLAGS " in 3958174832Sdes *" -library=stlport4 "*) 3959174832Sdes solaris_use_stlport4=yes 3960174832Sdes ;; 3961174832Sdes esac 3962174832Sdes if test "$solaris_use_stlport4" != yes; then 3963174832Sdes _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 3964174832Sdes fi 3965174832Sdes ;; 3966174832Sdes esac 3967174832Sdes ;; 3968174832Sdes 3969174832Sdessolaris*) 3970174832Sdes case $cc_basename in 3971174832Sdes CC*) 3972174832Sdes # The more standards-conforming stlport4 library is 3973174832Sdes # incompatible with the Cstd library. Avoid specifying 3974174832Sdes # it if it's in CXXFLAGS. Ignore libCrun as 3975174832Sdes # -library=stlport4 depends on it. 3976174832Sdes case " $CXX $CXXFLAGS " in 3977174832Sdes *" -library=stlport4 "*) 3978174832Sdes solaris_use_stlport4=yes 3979174832Sdes ;; 3980174832Sdes esac 3981174832Sdes 3982174832Sdes # Adding this requires a known-good setup of shared libraries for 3983174832Sdes # Sun compiler versions before 5.6, else PIC objects from an old 3984174832Sdes # archive will be linked into the output, leading to subtle bugs. 3985174832Sdes if test "$solaris_use_stlport4" != yes; then 3986174832Sdes _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 3987174832Sdes fi 3988174832Sdes ;; 3989174832Sdes esac 3990174832Sdes ;; 3991174832Sdesesac 3992174832Sdes]) 3993174832Sdes 3994141098Sdescase " $_LT_AC_TAGVAR(postdeps, $1) " in 3995141098Sdes*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 3996141098Sdesesac 3997141098Sdes])# AC_LIBTOOL_POSTDEP_PREDEP 3998141098Sdes 3999141098Sdes# AC_LIBTOOL_LANG_F77_CONFIG 4000174832Sdes# -------------------------- 4001141098Sdes# Ensure that the configuration vars for the C compiler are 4002141098Sdes# suitably defined. Those variables are subsequently used by 4003141098Sdes# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4004141098SdesAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 4005141098SdesAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 4006141098Sdes[AC_REQUIRE([AC_PROG_F77]) 4007141098SdesAC_LANG_PUSH(Fortran 77) 4008141098Sdes 4009141098Sdes_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4010141098Sdes_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4011141098Sdes_LT_AC_TAGVAR(always_export_symbols, $1)=no 4012141098Sdes_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4013141098Sdes_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4014141098Sdes_LT_AC_TAGVAR(hardcode_direct, $1)=no 4015141098Sdes_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4016141098Sdes_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4017141098Sdes_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4018141098Sdes_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4019141098Sdes_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4020141098Sdes_LT_AC_TAGVAR(module_cmds, $1)= 4021141098Sdes_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4022141098Sdes_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4023141098Sdes_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4024141098Sdes_LT_AC_TAGVAR(no_undefined_flag, $1)= 4025141098Sdes_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4026141098Sdes_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4027141098Sdes 4028141098Sdes# Source file extension for f77 test sources. 4029141098Sdesac_ext=f 4030141098Sdes 4031141098Sdes# Object file extension for compiled f77 test sources. 4032141098Sdesobjext=o 4033141098Sdes_LT_AC_TAGVAR(objext, $1)=$objext 4034141098Sdes 4035141098Sdes# Code to be used in simple compile tests 4036174832Sdeslt_simple_compile_test_code="\ 4037174832Sdes subroutine t 4038174832Sdes return 4039174832Sdes end 4040174832Sdes" 4041141098Sdes 4042141098Sdes# Code to be used in simple link tests 4043174832Sdeslt_simple_link_test_code="\ 4044174832Sdes program t 4045174832Sdes end 4046174832Sdes" 4047141098Sdes 4048141098Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4049141098Sdes_LT_AC_SYS_COMPILER 4050141098Sdes 4051174832Sdes# save warnings/boilerplate of simple test code 4052174832Sdes_LT_COMPILER_BOILERPLATE 4053174832Sdes_LT_LINKER_BOILERPLATE 4054174832Sdes 4055141098Sdes# Allow CC to be a program name with arguments. 4056141098Sdeslt_save_CC="$CC" 4057141098SdesCC=${F77-"f77"} 4058141098Sdescompiler=$CC 4059141098Sdes_LT_AC_TAGVAR(compiler, $1)=$CC 4060174832Sdes_LT_CC_BASENAME([$compiler]) 4061141098Sdes 4062141098SdesAC_MSG_CHECKING([if libtool supports shared libraries]) 4063141098SdesAC_MSG_RESULT([$can_build_shared]) 4064141098Sdes 4065141098SdesAC_MSG_CHECKING([whether to build shared libraries]) 4066141098Sdestest "$can_build_shared" = "no" && enable_shared=no 4067141098Sdes 4068141098Sdes# On AIX, shared libraries and static libraries use the same namespace, and 4069141098Sdes# are all built from PIC. 4070174832Sdescase $host_os in 4071141098Sdesaix3*) 4072141098Sdes test "$enable_shared" = yes && enable_static=no 4073141098Sdes if test -n "$RANLIB"; then 4074141098Sdes archive_cmds="$archive_cmds~\$RANLIB \$lib" 4075141098Sdes postinstall_cmds='$RANLIB $lib' 4076141098Sdes fi 4077141098Sdes ;; 4078141098Sdesaix4* | aix5*) 4079174832Sdes if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 4080174832Sdes test "$enable_shared" = yes && enable_static=no 4081174832Sdes fi 4082141098Sdes ;; 4083141098Sdesesac 4084141098SdesAC_MSG_RESULT([$enable_shared]) 4085141098Sdes 4086141098SdesAC_MSG_CHECKING([whether to build static libraries]) 4087141098Sdes# Make sure either enable_shared or enable_static is yes. 4088141098Sdestest "$enable_shared" = yes || enable_static=yes 4089141098SdesAC_MSG_RESULT([$enable_static]) 4090141098Sdes 4091141098Sdes_LT_AC_TAGVAR(GCC, $1)="$G77" 4092141098Sdes_LT_AC_TAGVAR(LD, $1)="$LD" 4093141098Sdes 4094141098SdesAC_LIBTOOL_PROG_COMPILER_PIC($1) 4095141098SdesAC_LIBTOOL_PROG_CC_C_O($1) 4096141098SdesAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4097141098SdesAC_LIBTOOL_PROG_LD_SHLIBS($1) 4098141098SdesAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4099141098SdesAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4100141098Sdes 4101141098SdesAC_LIBTOOL_CONFIG($1) 4102141098Sdes 4103141098SdesAC_LANG_POP 4104141098SdesCC="$lt_save_CC" 4105141098Sdes])# AC_LIBTOOL_LANG_F77_CONFIG 4106141098Sdes 4107141098Sdes 4108141098Sdes# AC_LIBTOOL_LANG_GCJ_CONFIG 4109141098Sdes# -------------------------- 4110141098Sdes# Ensure that the configuration vars for the C compiler are 4111141098Sdes# suitably defined. Those variables are subsequently used by 4112141098Sdes# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4113141098SdesAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 4114141098SdesAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 4115141098Sdes[AC_LANG_SAVE 4116141098Sdes 4117141098Sdes# Source file extension for Java test sources. 4118141098Sdesac_ext=java 4119141098Sdes 4120141098Sdes# Object file extension for compiled Java test sources. 4121141098Sdesobjext=o 4122141098Sdes_LT_AC_TAGVAR(objext, $1)=$objext 4123141098Sdes 4124141098Sdes# Code to be used in simple compile tests 4125174832Sdeslt_simple_compile_test_code="class foo {}" 4126141098Sdes 4127141098Sdes# Code to be used in simple link tests 4128174832Sdeslt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 4129141098Sdes 4130141098Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4131141098Sdes_LT_AC_SYS_COMPILER 4132141098Sdes 4133174832Sdes# save warnings/boilerplate of simple test code 4134174832Sdes_LT_COMPILER_BOILERPLATE 4135174832Sdes_LT_LINKER_BOILERPLATE 4136174832Sdes 4137141098Sdes# Allow CC to be a program name with arguments. 4138141098Sdeslt_save_CC="$CC" 4139141098SdesCC=${GCJ-"gcj"} 4140141098Sdescompiler=$CC 4141141098Sdes_LT_AC_TAGVAR(compiler, $1)=$CC 4142174832Sdes_LT_CC_BASENAME([$compiler]) 4143141098Sdes 4144141098Sdes# GCJ did not exist at the time GCC didn't implicitly link libc in. 4145141098Sdes_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4146141098Sdes 4147174832Sdes_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4148174832Sdes 4149141098SdesAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4150141098SdesAC_LIBTOOL_PROG_COMPILER_PIC($1) 4151141098SdesAC_LIBTOOL_PROG_CC_C_O($1) 4152141098SdesAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4153141098SdesAC_LIBTOOL_PROG_LD_SHLIBS($1) 4154141098SdesAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4155141098SdesAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4156141098Sdes 4157141098SdesAC_LIBTOOL_CONFIG($1) 4158141098Sdes 4159141098SdesAC_LANG_RESTORE 4160141098SdesCC="$lt_save_CC" 4161141098Sdes])# AC_LIBTOOL_LANG_GCJ_CONFIG 4162141098Sdes 4163141098Sdes 4164141098Sdes# AC_LIBTOOL_LANG_RC_CONFIG 4165174832Sdes# ------------------------- 4166141098Sdes# Ensure that the configuration vars for the Windows resource compiler are 4167141098Sdes# suitably defined. Those variables are subsequently used by 4168141098Sdes# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4169141098SdesAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 4170141098SdesAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 4171141098Sdes[AC_LANG_SAVE 4172141098Sdes 4173141098Sdes# Source file extension for RC test sources. 4174141098Sdesac_ext=rc 4175141098Sdes 4176141098Sdes# Object file extension for compiled RC test sources. 4177141098Sdesobjext=o 4178141098Sdes_LT_AC_TAGVAR(objext, $1)=$objext 4179141098Sdes 4180141098Sdes# Code to be used in simple compile tests 4181174832Sdeslt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 4182141098Sdes 4183141098Sdes# Code to be used in simple link tests 4184141098Sdeslt_simple_link_test_code="$lt_simple_compile_test_code" 4185141098Sdes 4186141098Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4187141098Sdes_LT_AC_SYS_COMPILER 4188141098Sdes 4189174832Sdes# save warnings/boilerplate of simple test code 4190174832Sdes_LT_COMPILER_BOILERPLATE 4191174832Sdes_LT_LINKER_BOILERPLATE 4192174832Sdes 4193141098Sdes# Allow CC to be a program name with arguments. 4194141098Sdeslt_save_CC="$CC" 4195141098SdesCC=${RC-"windres"} 4196141098Sdescompiler=$CC 4197141098Sdes_LT_AC_TAGVAR(compiler, $1)=$CC 4198174832Sdes_LT_CC_BASENAME([$compiler]) 4199141098Sdes_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4200141098Sdes 4201141098SdesAC_LIBTOOL_CONFIG($1) 4202141098Sdes 4203141098SdesAC_LANG_RESTORE 4204141098SdesCC="$lt_save_CC" 4205141098Sdes])# AC_LIBTOOL_LANG_RC_CONFIG 4206141098Sdes 4207141098Sdes 4208141098Sdes# AC_LIBTOOL_CONFIG([TAGNAME]) 4209141098Sdes# ---------------------------- 4210141098Sdes# If TAGNAME is not passed, then create an initial libtool script 4211141098Sdes# with a default configuration from the untagged config vars. Otherwise 4212141098Sdes# add code to config.status for appending the configuration named by 4213141098Sdes# TAGNAME from the matching tagged config vars. 4214141098SdesAC_DEFUN([AC_LIBTOOL_CONFIG], 4215141098Sdes[# The else clause should only fire when bootstrapping the 4216141098Sdes# libtool distribution, otherwise you forgot to ship ltmain.sh 4217141098Sdes# with your package, and you will get complaints that there are 4218141098Sdes# no rules to generate ltmain.sh. 4219141098Sdesif test -f "$ltmain"; then 4220141098Sdes # See if we are running on zsh, and set the options which allow our commands through 4221141098Sdes # without removal of \ escapes. 4222141098Sdes if test -n "${ZSH_VERSION+set}" ; then 4223141098Sdes setopt NO_GLOB_SUBST 4224141098Sdes fi 4225141098Sdes # Now quote all the things that may contain metacharacters while being 4226141098Sdes # careful not to overquote the AC_SUBSTed values. We take copies of the 4227141098Sdes # variables and quote the copies for generation of the libtool script. 4228174832Sdes for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 4229141098Sdes SED SHELL STRIP \ 4230141098Sdes libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 4231141098Sdes old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 4232141098Sdes deplibs_check_method reload_flag reload_cmds need_locks \ 4233141098Sdes lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 4234141098Sdes lt_cv_sys_global_symbol_to_c_name_address \ 4235141098Sdes sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4236141098Sdes old_postinstall_cmds old_postuninstall_cmds \ 4237141098Sdes _LT_AC_TAGVAR(compiler, $1) \ 4238141098Sdes _LT_AC_TAGVAR(CC, $1) \ 4239141098Sdes _LT_AC_TAGVAR(LD, $1) \ 4240141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4241141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4242141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4243141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4244141098Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4245141098Sdes _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4246141098Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4247141098Sdes _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4248141098Sdes _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4249141098Sdes _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4250141098Sdes _LT_AC_TAGVAR(predep_objects, $1) \ 4251141098Sdes _LT_AC_TAGVAR(postdep_objects, $1) \ 4252141098Sdes _LT_AC_TAGVAR(predeps, $1) \ 4253141098Sdes _LT_AC_TAGVAR(postdeps, $1) \ 4254141098Sdes _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4255141098Sdes _LT_AC_TAGVAR(archive_cmds, $1) \ 4256141098Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4257141098Sdes _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4258141098Sdes _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4259141098Sdes _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 4260141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 4261141098Sdes _LT_AC_TAGVAR(no_undefined_flag, $1) \ 4262141098Sdes _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 4263141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 4264141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 4265141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 4266141098Sdes _LT_AC_TAGVAR(hardcode_automatic, $1) \ 4267141098Sdes _LT_AC_TAGVAR(module_cmds, $1) \ 4268141098Sdes _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 4269141098Sdes _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 4270174832Sdes _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 4271141098Sdes _LT_AC_TAGVAR(exclude_expsyms, $1) \ 4272141098Sdes _LT_AC_TAGVAR(include_expsyms, $1); do 4273141098Sdes 4274141098Sdes case $var in 4275141098Sdes _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 4276141098Sdes _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 4277141098Sdes _LT_AC_TAGVAR(archive_cmds, $1) | \ 4278141098Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 4279141098Sdes _LT_AC_TAGVAR(module_cmds, $1) | \ 4280141098Sdes _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 4281141098Sdes _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 4282141098Sdes _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 4283141098Sdes extract_expsyms_cmds | reload_cmds | finish_cmds | \ 4284141098Sdes postinstall_cmds | postuninstall_cmds | \ 4285141098Sdes old_postinstall_cmds | old_postuninstall_cmds | \ 4286141098Sdes sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 4287141098Sdes # Double-quote double-evaled strings. 4288141098Sdes eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 4289141098Sdes ;; 4290141098Sdes *) 4291141098Sdes eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 4292141098Sdes ;; 4293141098Sdes esac 4294141098Sdes done 4295141098Sdes 4296141098Sdes case $lt_echo in 4297141098Sdes *'\[$]0 --fallback-echo"') 4298141098Sdes lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 4299141098Sdes ;; 4300141098Sdes esac 4301141098Sdes 4302141098Sdesifelse([$1], [], 4303141098Sdes [cfgfile="${ofile}T" 4304141098Sdes trap "$rm \"$cfgfile\"; exit 1" 1 2 15 4305141098Sdes $rm -f "$cfgfile" 4306141098Sdes AC_MSG_NOTICE([creating $ofile])], 4307141098Sdes [cfgfile="$ofile"]) 4308141098Sdes 4309141098Sdes cat <<__EOF__ >> "$cfgfile" 4310141098Sdesifelse([$1], [], 4311141098Sdes[#! $SHELL 4312141098Sdes 4313141098Sdes# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 4314141098Sdes# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 4315141098Sdes# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4316117610Sdes# 4317174832Sdes# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 4318141098Sdes# Free Software Foundation, Inc. 4319117610Sdes# 4320141098Sdes# This file is part of GNU Libtool: 4321141098Sdes# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4322141098Sdes# 4323141098Sdes# This program is free software; you can redistribute it and/or modify 4324141098Sdes# it under the terms of the GNU General Public License as published by 4325141098Sdes# the Free Software Foundation; either version 2 of the License, or 4326141098Sdes# (at your option) any later version. 4327141098Sdes# 4328141098Sdes# This program is distributed in the hope that it will be useful, but 4329141098Sdes# WITHOUT ANY WARRANTY; without even the implied warranty of 4330141098Sdes# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4331141098Sdes# General Public License for more details. 4332141098Sdes# 4333141098Sdes# You should have received a copy of the GNU General Public License 4334141098Sdes# along with this program; if not, write to the Free Software 4335174832Sdes# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 4336141098Sdes# 4337141098Sdes# As a special exception to the GNU General Public License, if you 4338141098Sdes# distribute this file as part of a program that contains a 4339141098Sdes# configuration script generated by Autoconf, you may include it under 4340141098Sdes# the same distribution terms that you use for the rest of that program. 4341117610Sdes 4342141098Sdes# A sed program that does not truncate output. 4343141098SdesSED=$lt_SED 4344117610Sdes 4345141098Sdes# Sed that helps us avoid accidentally triggering echo(1) options like -n. 4346174832SdesXsed="$SED -e 1s/^X//" 4347117610Sdes 4348141098Sdes# The HP-UX ksh and POSIX shell print the target directory to stdout 4349141098Sdes# if CDPATH is set. 4350141098Sdes(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4351117610Sdes 4352141098Sdes# The names of the tagged configurations supported by this script. 4353141098Sdesavailable_tags= 4354141098Sdes 4355141098Sdes# ### BEGIN LIBTOOL CONFIG], 4356141098Sdes[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 4357141098Sdes 4358141098Sdes# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4359141098Sdes 4360141098Sdes# Shell to use when invoking shell scripts. 4361141098SdesSHELL=$lt_SHELL 4362141098Sdes 4363141098Sdes# Whether or not to build shared libraries. 4364141098Sdesbuild_libtool_libs=$enable_shared 4365141098Sdes 4366141098Sdes# Whether or not to build static libraries. 4367141098Sdesbuild_old_libs=$enable_static 4368141098Sdes 4369141098Sdes# Whether or not to add -lc for building shared libraries. 4370141098Sdesbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 4371141098Sdes 4372141098Sdes# Whether or not to disallow shared libs when runtime libs are static 4373141098Sdesallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 4374141098Sdes 4375141098Sdes# Whether or not to optimize for fast installation. 4376141098Sdesfast_install=$enable_fast_install 4377141098Sdes 4378141098Sdes# The host system. 4379141098Sdeshost_alias=$host_alias 4380141098Sdeshost=$host 4381147455Sdeshost_os=$host_os 4382141098Sdes 4383147455Sdes# The build system. 4384147455Sdesbuild_alias=$build_alias 4385147455Sdesbuild=$build 4386147455Sdesbuild_os=$build_os 4387147455Sdes 4388141098Sdes# An echo program that does not interpret backslashes. 4389141098Sdesecho=$lt_echo 4390141098Sdes 4391141098Sdes# The archiver. 4392141098SdesAR=$lt_AR 4393141098SdesAR_FLAGS=$lt_AR_FLAGS 4394141098Sdes 4395141098Sdes# A C compiler. 4396141098SdesLTCC=$lt_LTCC 4397141098Sdes 4398174832Sdes# LTCC compiler flags. 4399174832SdesLTCFLAGS=$lt_LTCFLAGS 4400174832Sdes 4401141098Sdes# A language-specific compiler. 4402141098SdesCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 4403141098Sdes 4404141098Sdes# Is the compiler the GNU C compiler? 4405141098Sdeswith_gcc=$_LT_AC_TAGVAR(GCC, $1) 4406141098Sdes 4407141098Sdes# An ERE matcher. 4408141098SdesEGREP=$lt_EGREP 4409141098Sdes 4410141098Sdes# The linker used to build libraries. 4411141098SdesLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 4412141098Sdes 4413141098Sdes# Whether we need hard or soft links. 4414141098SdesLN_S=$lt_LN_S 4415141098Sdes 4416141098Sdes# A BSD-compatible nm program. 4417141098SdesNM=$lt_NM 4418141098Sdes 4419141098Sdes# A symbol stripping program 4420141098SdesSTRIP=$lt_STRIP 4421141098Sdes 4422141098Sdes# Used to examine libraries when file_magic_cmd begins "file" 4423141098SdesMAGIC_CMD=$MAGIC_CMD 4424141098Sdes 4425141098Sdes# Used on cygwin: DLL creation program. 4426141098SdesDLLTOOL="$DLLTOOL" 4427141098Sdes 4428141098Sdes# Used on cygwin: object dumper. 4429141098SdesOBJDUMP="$OBJDUMP" 4430141098Sdes 4431141098Sdes# Used on cygwin: assembler. 4432141098SdesAS="$AS" 4433141098Sdes 4434141098Sdes# The name of the directory that contains temporary libtool files. 4435141098Sdesobjdir=$objdir 4436141098Sdes 4437141098Sdes# How to create reloadable object files. 4438141098Sdesreload_flag=$lt_reload_flag 4439141098Sdesreload_cmds=$lt_reload_cmds 4440141098Sdes 4441141098Sdes# How to pass a linker flag through the compiler. 4442141098Sdeswl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 4443141098Sdes 4444141098Sdes# Object file suffix (normally "o"). 4445141098Sdesobjext="$ac_objext" 4446141098Sdes 4447141098Sdes# Old archive suffix (normally "a"). 4448141098Sdeslibext="$libext" 4449141098Sdes 4450141098Sdes# Shared library suffix (normally ".so"). 4451141098Sdesshrext_cmds='$shrext_cmds' 4452141098Sdes 4453141098Sdes# Executable file suffix (normally ""). 4454141098Sdesexeext="$exeext" 4455141098Sdes 4456141098Sdes# Additional compiler flags for building library objects. 4457141098Sdespic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 4458141098Sdespic_mode=$pic_mode 4459141098Sdes 4460141098Sdes# What is the maximum length of a command? 4461141098Sdesmax_cmd_len=$lt_cv_sys_max_cmd_len 4462141098Sdes 4463141098Sdes# Does compiler simultaneously support -c and -o options? 4464141098Sdescompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 4465141098Sdes 4466174832Sdes# Must we lock files when doing compilation? 4467141098Sdesneed_locks=$lt_need_locks 4468141098Sdes 4469141098Sdes# Do we need the lib prefix for modules? 4470141098Sdesneed_lib_prefix=$need_lib_prefix 4471141098Sdes 4472141098Sdes# Do we need a version for libraries? 4473141098Sdesneed_version=$need_version 4474141098Sdes 4475141098Sdes# Whether dlopen is supported. 4476141098Sdesdlopen_support=$enable_dlopen 4477141098Sdes 4478141098Sdes# Whether dlopen of programs is supported. 4479141098Sdesdlopen_self=$enable_dlopen_self 4480141098Sdes 4481141098Sdes# Whether dlopen of statically linked programs is supported. 4482141098Sdesdlopen_self_static=$enable_dlopen_self_static 4483141098Sdes 4484141098Sdes# Compiler flag to prevent dynamic linking. 4485141098Sdeslink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 4486141098Sdes 4487141098Sdes# Compiler flag to turn off builtin functions. 4488141098Sdesno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 4489141098Sdes 4490141098Sdes# Compiler flag to allow reflexive dlopens. 4491141098Sdesexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 4492141098Sdes 4493141098Sdes# Compiler flag to generate shared objects directly from archives. 4494141098Sdeswhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 4495141098Sdes 4496141098Sdes# Compiler flag to generate thread-safe objects. 4497141098Sdesthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 4498141098Sdes 4499141098Sdes# Library versioning type. 4500141098Sdesversion_type=$version_type 4501141098Sdes 4502141098Sdes# Format of library name prefix. 4503141098Sdeslibname_spec=$lt_libname_spec 4504141098Sdes 4505141098Sdes# List of archive names. First name is the real one, the rest are links. 4506141098Sdes# The last name is the one that the linker finds with -lNAME. 4507141098Sdeslibrary_names_spec=$lt_library_names_spec 4508141098Sdes 4509141098Sdes# The coded name of the library, if different from the real name. 4510141098Sdessoname_spec=$lt_soname_spec 4511141098Sdes 4512141098Sdes# Commands used to build and install an old-style archive. 4513141098SdesRANLIB=$lt_RANLIB 4514141098Sdesold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 4515141098Sdesold_postinstall_cmds=$lt_old_postinstall_cmds 4516141098Sdesold_postuninstall_cmds=$lt_old_postuninstall_cmds 4517141098Sdes 4518141098Sdes# Create an old-style archive from a shared archive. 4519141098Sdesold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 4520141098Sdes 4521141098Sdes# Create a temporary old-style archive to link instead of a shared archive. 4522141098Sdesold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 4523141098Sdes 4524141098Sdes# Commands used to build and install a shared archive. 4525141098Sdesarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 4526141098Sdesarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 4527141098Sdespostinstall_cmds=$lt_postinstall_cmds 4528141098Sdespostuninstall_cmds=$lt_postuninstall_cmds 4529141098Sdes 4530141098Sdes# Commands used to build a loadable module (assumed same as above if empty) 4531141098Sdesmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 4532141098Sdesmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 4533141098Sdes 4534141098Sdes# Commands to strip libraries. 4535141098Sdesold_striplib=$lt_old_striplib 4536141098Sdesstriplib=$lt_striplib 4537141098Sdes 4538141098Sdes# Dependencies to place before the objects being linked to create a 4539141098Sdes# shared library. 4540141098Sdespredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 4541141098Sdes 4542141098Sdes# Dependencies to place after the objects being linked to create a 4543141098Sdes# shared library. 4544141098Sdespostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 4545141098Sdes 4546141098Sdes# Dependencies to place before the objects being linked to create a 4547141098Sdes# shared library. 4548141098Sdespredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 4549141098Sdes 4550141098Sdes# Dependencies to place after the objects being linked to create a 4551141098Sdes# shared library. 4552141098Sdespostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 4553141098Sdes 4554141098Sdes# The library search path used internally by the compiler when linking 4555141098Sdes# a shared library. 4556141098Sdescompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 4557141098Sdes 4558141098Sdes# Method to check whether dependent libraries are shared objects. 4559141098Sdesdeplibs_check_method=$lt_deplibs_check_method 4560141098Sdes 4561141098Sdes# Command to use when deplibs_check_method == file_magic. 4562141098Sdesfile_magic_cmd=$lt_file_magic_cmd 4563141098Sdes 4564141098Sdes# Flag that allows shared libraries with undefined symbols to be built. 4565141098Sdesallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 4566141098Sdes 4567141098Sdes# Flag that forces no undefined symbols. 4568141098Sdesno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 4569141098Sdes 4570141098Sdes# Commands used to finish a libtool library installation in a directory. 4571141098Sdesfinish_cmds=$lt_finish_cmds 4572141098Sdes 4573141098Sdes# Same as above, but a single script fragment to be evaled but not shown. 4574141098Sdesfinish_eval=$lt_finish_eval 4575141098Sdes 4576141098Sdes# Take the output of nm and produce a listing of raw symbols and C names. 4577141098Sdesglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 4578141098Sdes 4579141098Sdes# Transform the output of nm in a proper C declaration 4580141098Sdesglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 4581141098Sdes 4582141098Sdes# Transform the output of nm in a C name address pair 4583141098Sdesglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 4584141098Sdes 4585141098Sdes# This is the shared library runtime path variable. 4586141098Sdesrunpath_var=$runpath_var 4587141098Sdes 4588141098Sdes# This is the shared library path variable. 4589141098Sdesshlibpath_var=$shlibpath_var 4590141098Sdes 4591141098Sdes# Is shlibpath searched before the hard-coded library search path? 4592141098Sdesshlibpath_overrides_runpath=$shlibpath_overrides_runpath 4593141098Sdes 4594141098Sdes# How to hardcode a shared library path into an executable. 4595141098Sdeshardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 4596141098Sdes 4597141098Sdes# Whether we should hardcode library paths into libraries. 4598141098Sdeshardcode_into_libs=$hardcode_into_libs 4599141098Sdes 4600141098Sdes# Flag to hardcode \$libdir into a binary during linking. 4601141098Sdes# This must work even if \$libdir does not exist. 4602141098Sdeshardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 4603141098Sdes 4604141098Sdes# If ld is used when linking, flag to hardcode \$libdir into 4605141098Sdes# a binary during linking. This must work even if \$libdir does 4606141098Sdes# not exist. 4607141098Sdeshardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 4608141098Sdes 4609141098Sdes# Whether we need a single -rpath flag with a separated argument. 4610141098Sdeshardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 4611141098Sdes 4612141098Sdes# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 4613141098Sdes# resulting binary. 4614141098Sdeshardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 4615141098Sdes 4616141098Sdes# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 4617141098Sdes# resulting binary. 4618141098Sdeshardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 4619141098Sdes 4620141098Sdes# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 4621141098Sdes# the resulting binary. 4622141098Sdeshardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 4623141098Sdes 4624141098Sdes# Set to yes if building a shared library automatically hardcodes DIR into the library 4625141098Sdes# and all subsequent libraries and executables linked against it. 4626141098Sdeshardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 4627141098Sdes 4628141098Sdes# Variables whose values should be saved in libtool wrapper scripts and 4629141098Sdes# restored at relink time. 4630141098Sdesvariables_saved_for_relink="$variables_saved_for_relink" 4631141098Sdes 4632141098Sdes# Whether libtool must link a program against all its dependency libraries. 4633141098Sdeslink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 4634141098Sdes 4635141098Sdes# Compile-time system search path for libraries 4636141098Sdessys_lib_search_path_spec=$lt_sys_lib_search_path_spec 4637141098Sdes 4638141098Sdes# Run-time system search path for libraries 4639141098Sdessys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 4640141098Sdes 4641141098Sdes# Fix the shell variable \$srcfile for the compiler. 4642174832Sdesfix_srcfile_path=$lt_fix_srcfile_path 4643141098Sdes 4644141098Sdes# Set to yes if exported symbols are required. 4645141098Sdesalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 4646141098Sdes 4647141098Sdes# The commands to list exported symbols. 4648141098Sdesexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 4649141098Sdes 4650141098Sdes# The commands to extract the exported symbol list from a shared archive. 4651141098Sdesextract_expsyms_cmds=$lt_extract_expsyms_cmds 4652141098Sdes 4653141098Sdes# Symbols that should not be listed in the preloaded symbols. 4654141098Sdesexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 4655141098Sdes 4656141098Sdes# Symbols that must always be exported. 4657141098Sdesinclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 4658141098Sdes 4659141098Sdesifelse([$1],[], 4660141098Sdes[# ### END LIBTOOL CONFIG], 4661141098Sdes[# ### END LIBTOOL TAG CONFIG: $tagname]) 4662141098Sdes 4663141098Sdes__EOF__ 4664141098Sdes 4665141098Sdesifelse([$1],[], [ 4666141098Sdes case $host_os in 4667141098Sdes aix3*) 4668141098Sdes cat <<\EOF >> "$cfgfile" 4669141098Sdes 4670141098Sdes# AIX sometimes has problems with the GCC collect2 program. For some 4671141098Sdes# reason, if we set the COLLECT_NAMES environment variable, the problems 4672141098Sdes# vanish in a puff of smoke. 4673141098Sdesif test "X${COLLECT_NAMES+set}" != Xset; then 4674141098Sdes COLLECT_NAMES= 4675141098Sdes export COLLECT_NAMES 4676141098Sdesfi 4677141098SdesEOF 4678141098Sdes ;; 4679141098Sdes esac 4680141098Sdes 4681141098Sdes # We use sed instead of cat because bash on DJGPP gets confused if 4682141098Sdes # if finds mixed CR/LF and LF-only lines. Since sed operates in 4683141098Sdes # text mode, it properly converts lines to CR/LF. This bash problem 4684141098Sdes # is reportedly fixed, but why not run on old versions too? 4685141098Sdes sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 4686141098Sdes 4687141098Sdes mv -f "$cfgfile" "$ofile" || \ 4688141098Sdes (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4689141098Sdes chmod +x "$ofile" 4690141098Sdes]) 4691117610Sdeselse 4692141098Sdes # If there is no Makefile yet, we rely on a make rule to execute 4693141098Sdes # `config.status --recheck' to rerun these tests and create the 4694141098Sdes # libtool script then. 4695141098Sdes ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 4696141098Sdes if test -f "$ltmain_in"; then 4697141098Sdes test -f Makefile && make "$ltmain" 4698141098Sdes fi 4699117610Sdesfi 4700141098Sdes])# AC_LIBTOOL_CONFIG 4701117610Sdes 4702117610Sdes 4703141098Sdes# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 4704141098Sdes# ------------------------------------------- 4705141098SdesAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 4706141098Sdes[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 4707117610Sdes 4708141098Sdes_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4709117610Sdes 4710141098Sdesif test "$GCC" = yes; then 4711141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4712117610Sdes 4713141098Sdes AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4714141098Sdes lt_cv_prog_compiler_rtti_exceptions, 4715141098Sdes [-fno-rtti -fno-exceptions], [], 4716141098Sdes [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4717141098Sdesfi 4718141098Sdes])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 4719141098Sdes 4720141098Sdes 4721141098Sdes# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4722141098Sdes# --------------------------------- 4723141098SdesAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 4724141098Sdes[AC_REQUIRE([AC_CANONICAL_HOST]) 4725174832SdesAC_REQUIRE([LT_AC_PROG_SED]) 4726141098SdesAC_REQUIRE([AC_PROG_NM]) 4727141098SdesAC_REQUIRE([AC_OBJEXT]) 4728141098Sdes# Check for command to grab the raw symbol name followed by C symbol from nm. 4729141098SdesAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4730141098SdesAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4731141098Sdes[ 4732141098Sdes# These are sane defaults that work on at least a few old systems. 4733141098Sdes# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4734141098Sdes 4735141098Sdes# Character class describing NM global symbol codes. 4736141098Sdessymcode='[[BCDEGRST]]' 4737141098Sdes 4738141098Sdes# Regexp to match symbols that can be accessed directly from C. 4739141098Sdessympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4740141098Sdes 4741141098Sdes# Transform an extracted symbol line into a proper C declaration 4742141098Sdeslt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 4743141098Sdes 4744141098Sdes# Transform an extracted symbol line into symbol name and symbol address 4745141098Sdeslt_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'" 4746141098Sdes 4747141098Sdes# Define system-specific variables. 4748141098Sdescase $host_os in 4749141098Sdesaix*) 4750141098Sdes symcode='[[BCDT]]' 4751141098Sdes ;; 4752141098Sdescygwin* | mingw* | pw32*) 4753141098Sdes symcode='[[ABCDGISTW]]' 4754141098Sdes ;; 4755141098Sdeshpux*) # Its linker distinguishes data from code symbols 4756141098Sdes if test "$host_cpu" = ia64; then 4757141098Sdes symcode='[[ABCDEGRST]]' 4758141098Sdes fi 4759141098Sdes lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4760141098Sdes 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'" 4761141098Sdes ;; 4762174832Sdeslinux* | k*bsd*-gnu) 4763141098Sdes if test "$host_cpu" = ia64; then 4764141098Sdes symcode='[[ABCDGIRSTW]]' 4765141098Sdes lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4766141098Sdes 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'" 4767141098Sdes fi 4768141098Sdes ;; 4769141098Sdesirix* | nonstopux*) 4770141098Sdes symcode='[[BCDEGRST]]' 4771141098Sdes ;; 4772141098Sdesosf*) 4773141098Sdes symcode='[[BCDEGQRST]]' 4774141098Sdes ;; 4775174832Sdessolaris*) 4776141098Sdes symcode='[[BDRT]]' 4777141098Sdes ;; 4778174832Sdessco3.2v5*) 4779174832Sdes symcode='[[DT]]' 4780174832Sdes ;; 4781174832Sdessysv4.2uw2*) 4782174832Sdes symcode='[[DT]]' 4783174832Sdes ;; 4784174832Sdessysv5* | sco5v6* | unixware* | OpenUNIX*) 4785174832Sdes symcode='[[ABDT]]' 4786174832Sdes ;; 4787141098Sdessysv4) 4788141098Sdes symcode='[[DFNSTU]]' 4789141098Sdes ;; 4790141098Sdesesac 4791141098Sdes 4792141098Sdes# Handle CRLF in mingw tool chain 4793141098Sdesopt_cr= 4794141098Sdescase $build_os in 4795141098Sdesmingw*) 4796141098Sdes opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4797141098Sdes ;; 4798141098Sdesesac 4799141098Sdes 4800141098Sdes# If we're using GNU nm, then use its standard symbol codes. 4801141098Sdescase `$NM -V 2>&1` in 4802141098Sdes*GNU* | *'with BFD'*) 4803141098Sdes symcode='[[ABCDGIRSTW]]' ;; 4804141098Sdesesac 4805141098Sdes 4806141098Sdes# Try without a prefix undercore, then with it. 4807141098Sdesfor ac_symprfx in "" "_"; do 4808141098Sdes 4809147455Sdes # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4810147455Sdes symxfrm="\\1 $ac_symprfx\\2 \\2" 4811147455Sdes 4812141098Sdes # Write the raw and C identifiers. 4813147455Sdes lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4814141098Sdes 4815141098Sdes # Check to see that the pipe works correctly. 4816141098Sdes pipe_works=no 4817141098Sdes 4818141098Sdes rm -f conftest* 4819141098Sdes cat > conftest.$ac_ext <<EOF 4820141098Sdes#ifdef __cplusplus 4821141098Sdesextern "C" { 4822141098Sdes#endif 4823141098Sdeschar nm_test_var; 4824141098Sdesvoid nm_test_func(){} 4825141098Sdes#ifdef __cplusplus 4826141098Sdes} 4827141098Sdes#endif 4828141098Sdesint main(){nm_test_var='a';nm_test_func();return(0);} 4829141098SdesEOF 4830141098Sdes 4831141098Sdes if AC_TRY_EVAL(ac_compile); then 4832141098Sdes # Now try to grab the symbols. 4833141098Sdes nlist=conftest.nm 4834141098Sdes if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 4835141098Sdes # Try sorting and uniquifying the output. 4836141098Sdes if sort "$nlist" | uniq > "$nlist"T; then 4837141098Sdes mv -f "$nlist"T "$nlist" 4838141098Sdes else 4839141098Sdes rm -f "$nlist"T 4840141098Sdes fi 4841141098Sdes 4842141098Sdes # Make sure that we snagged all the symbols we need. 4843141098Sdes if grep ' nm_test_var$' "$nlist" >/dev/null; then 4844141098Sdes if grep ' nm_test_func$' "$nlist" >/dev/null; then 4845141098Sdes cat <<EOF > conftest.$ac_ext 4846141098Sdes#ifdef __cplusplus 4847141098Sdesextern "C" { 4848141098Sdes#endif 4849141098Sdes 4850141098SdesEOF 4851141098Sdes # Now generate the symbol file. 4852141098Sdes eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 4853141098Sdes 4854141098Sdes cat <<EOF >> conftest.$ac_ext 4855141098Sdes#if defined (__STDC__) && __STDC__ 4856141098Sdes# define lt_ptr_t void * 4857141098Sdes#else 4858141098Sdes# define lt_ptr_t char * 4859141098Sdes# define const 4860141098Sdes#endif 4861141098Sdes 4862141098Sdes/* The mapping between symbol names and symbols. */ 4863141098Sdesconst struct { 4864141098Sdes const char *name; 4865141098Sdes lt_ptr_t address; 4866141098Sdes} 4867141098Sdeslt_preloaded_symbols[[]] = 4868141098Sdes{ 4869141098SdesEOF 4870141098Sdes $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 4871141098Sdes cat <<\EOF >> conftest.$ac_ext 4872141098Sdes {0, (lt_ptr_t) 0} 4873141098Sdes}; 4874141098Sdes 4875141098Sdes#ifdef __cplusplus 4876141098Sdes} 4877141098Sdes#endif 4878141098SdesEOF 4879141098Sdes # Now try linking the two files. 4880141098Sdes mv conftest.$ac_objext conftstm.$ac_objext 4881141098Sdes lt_save_LIBS="$LIBS" 4882141098Sdes lt_save_CFLAGS="$CFLAGS" 4883141098Sdes LIBS="conftstm.$ac_objext" 4884141098Sdes CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4885141098Sdes if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4886141098Sdes pipe_works=yes 4887141098Sdes fi 4888141098Sdes LIBS="$lt_save_LIBS" 4889141098Sdes CFLAGS="$lt_save_CFLAGS" 4890141098Sdes else 4891141098Sdes echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4892141098Sdes fi 4893141098Sdes else 4894141098Sdes echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4895141098Sdes fi 4896141098Sdes else 4897141098Sdes echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4898141098Sdes fi 4899141098Sdes else 4900141098Sdes echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4901141098Sdes cat conftest.$ac_ext >&5 4902141098Sdes fi 4903141098Sdes rm -f conftest* conftst* 4904141098Sdes 4905141098Sdes # Do not use the global_symbol_pipe unless it works. 4906141098Sdes if test "$pipe_works" = yes; then 4907141098Sdes break 4908141098Sdes else 4909141098Sdes lt_cv_sys_global_symbol_pipe= 4910141098Sdes fi 4911141098Sdesdone 4912141098Sdes]) 4913141098Sdesif test -z "$lt_cv_sys_global_symbol_pipe"; then 4914141098Sdes lt_cv_sys_global_symbol_to_cdecl= 4915141098Sdesfi 4916141098Sdesif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4917141098Sdes AC_MSG_RESULT(failed) 4918117610Sdeselse 4919141098Sdes AC_MSG_RESULT(ok) 4920117610Sdesfi 4921141098Sdes]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4922141098Sdes 4923141098Sdes 4924141098Sdes# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 4925141098Sdes# --------------------------------------- 4926141098SdesAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 4927141098Sdes[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 4928141098Sdes_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4929141098Sdes_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 4930141098Sdes 4931141098SdesAC_MSG_CHECKING([for $compiler option to produce PIC]) 4932141098Sdes ifelse([$1],[CXX],[ 4933141098Sdes # C++ specific cases for pic, static, wl, etc. 4934141098Sdes if test "$GXX" = yes; then 4935141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4936141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 4937141098Sdes 4938141098Sdes case $host_os in 4939141098Sdes aix*) 4940141098Sdes # All AIX code is PIC. 4941141098Sdes if test "$host_cpu" = ia64; then 4942141098Sdes # AIX 5 now supports IA64 processor 4943141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4944141098Sdes fi 4945141098Sdes ;; 4946141098Sdes amigaos*) 4947141098Sdes # FIXME: we need at least 68020 code to build shared libraries, but 4948141098Sdes # adding the `-m68020' flag to GCC prevents building anything better, 4949141098Sdes # like `-m68040'. 4950141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4951141098Sdes ;; 4952174832Sdes beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4953141098Sdes # PIC is the default for these OSes. 4954141098Sdes ;; 4955174832Sdes mingw* | cygwin* | os2* | pw32*) 4956141098Sdes # This hack is so that the source file can tell whether it is being 4957141098Sdes # built for inclusion in a dll (and should export symbols for example). 4958174832Sdes # Although the cygwin gcc ignores -fPIC, still need this for old-style 4959174832Sdes # (--disable-auto-import) libraries 4960141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 4961141098Sdes ;; 4962141098Sdes darwin* | rhapsody*) 4963141098Sdes # PIC is the default on this platform 4964141098Sdes # Common symbols not allowed in MH_DYLIB files 4965141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4966141098Sdes ;; 4967141098Sdes *djgpp*) 4968141098Sdes # DJGPP does not support shared libraries at all 4969141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4970141098Sdes ;; 4971174832Sdes interix[[3-9]]*) 4972174832Sdes # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4973174832Sdes # Instead, we relocate shared libraries at runtime. 4974174832Sdes ;; 4975141098Sdes sysv4*MP*) 4976141098Sdes if test -d /usr/nec; then 4977141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4978141098Sdes fi 4979141098Sdes ;; 4980141098Sdes hpux*) 4981141098Sdes # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4982141098Sdes # not for PA HP-UX. 4983174832Sdes case $host_cpu in 4984141098Sdes hppa*64*|ia64*) 4985141098Sdes ;; 4986141098Sdes *) 4987141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4988141098Sdes ;; 4989141098Sdes esac 4990141098Sdes ;; 4991141098Sdes *) 4992141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4993141098Sdes ;; 4994141098Sdes esac 4995141098Sdes else 4996141098Sdes case $host_os in 4997141098Sdes aix4* | aix5*) 4998141098Sdes # All AIX code is PIC. 4999141098Sdes if test "$host_cpu" = ia64; then 5000141098Sdes # AIX 5 now supports IA64 processor 5001141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5002141098Sdes else 5003141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5004141098Sdes fi 5005141098Sdes ;; 5006141098Sdes chorus*) 5007141098Sdes case $cc_basename in 5008174832Sdes cxch68*) 5009141098Sdes # Green Hills C++ Compiler 5010141098Sdes # _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" 5011141098Sdes ;; 5012141098Sdes esac 5013141098Sdes ;; 5014141098Sdes darwin*) 5015141098Sdes # PIC is the default on this platform 5016141098Sdes # Common symbols not allowed in MH_DYLIB files 5017174832Sdes case $cc_basename in 5018141098Sdes xlc*) 5019141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5020141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5021141098Sdes ;; 5022141098Sdes esac 5023141098Sdes ;; 5024141098Sdes dgux*) 5025141098Sdes case $cc_basename in 5026174832Sdes ec++*) 5027141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5028141098Sdes ;; 5029174832Sdes ghcx*) 5030141098Sdes # Green Hills C++ Compiler 5031141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5032141098Sdes ;; 5033141098Sdes *) 5034141098Sdes ;; 5035141098Sdes esac 5036141098Sdes ;; 5037174832Sdes freebsd* | dragonfly*) 5038141098Sdes # FreeBSD uses GNU C++ 5039141098Sdes ;; 5040141098Sdes hpux9* | hpux10* | hpux11*) 5041141098Sdes case $cc_basename in 5042174832Sdes CC*) 5043141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5044174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5045141098Sdes if test "$host_cpu" != ia64; then 5046141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5047141098Sdes fi 5048141098Sdes ;; 5049174832Sdes aCC*) 5050141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5051174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5052174832Sdes case $host_cpu in 5053141098Sdes hppa*64*|ia64*) 5054141098Sdes # +Z the default 5055141098Sdes ;; 5056141098Sdes *) 5057141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5058141098Sdes ;; 5059141098Sdes esac 5060141098Sdes ;; 5061141098Sdes *) 5062141098Sdes ;; 5063141098Sdes esac 5064141098Sdes ;; 5065174832Sdes interix*) 5066174832Sdes # This is c89, which is MS Visual C++ (no shared libs) 5067174832Sdes # Anyone wants to do a port? 5068174832Sdes ;; 5069141098Sdes irix5* | irix6* | nonstopux*) 5070141098Sdes case $cc_basename in 5071174832Sdes CC*) 5072141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5073141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5074141098Sdes # CC pic flag -KPIC is the default. 5075141098Sdes ;; 5076141098Sdes *) 5077141098Sdes ;; 5078141098Sdes esac 5079141098Sdes ;; 5080174832Sdes linux* | k*bsd*-gnu) 5081141098Sdes case $cc_basename in 5082174832Sdes KCC*) 5083141098Sdes # KAI C++ Compiler 5084141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5085141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5086141098Sdes ;; 5087147455Sdes icpc* | ecpc*) 5088141098Sdes # Intel C++ 5089141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5090141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5091141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5092141098Sdes ;; 5093174832Sdes pgCC*) 5094147455Sdes # Portland Group C++ compiler. 5095147455Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5096147455Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5097174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5098147455Sdes ;; 5099174832Sdes cxx*) 5100141098Sdes # Compaq C++ 5101141098Sdes # Make sure the PIC flag is empty. It appears that all Alpha 5102141098Sdes # Linux and Compaq Tru64 Unix objects are PIC. 5103141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5104141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5105141098Sdes ;; 5106141098Sdes *) 5107174832Sdes case `$CC -V 2>&1 | sed 5q` in 5108174832Sdes *Sun\ C*) 5109174832Sdes # Sun C++ 5.9 5110174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5111174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5112174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5113174832Sdes ;; 5114174832Sdes esac 5115141098Sdes ;; 5116141098Sdes esac 5117141098Sdes ;; 5118141098Sdes lynxos*) 5119141098Sdes ;; 5120141098Sdes m88k*) 5121141098Sdes ;; 5122141098Sdes mvs*) 5123141098Sdes case $cc_basename in 5124174832Sdes cxx*) 5125141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5126141098Sdes ;; 5127141098Sdes *) 5128141098Sdes ;; 5129141098Sdes esac 5130141098Sdes ;; 5131141098Sdes netbsd*) 5132141098Sdes ;; 5133141098Sdes osf3* | osf4* | osf5*) 5134141098Sdes case $cc_basename in 5135174832Sdes KCC*) 5136141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5137141098Sdes ;; 5138174832Sdes RCC*) 5139141098Sdes # Rational C++ 2.4.1 5140141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5141141098Sdes ;; 5142174832Sdes cxx*) 5143141098Sdes # Digital/Compaq C++ 5144141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5145141098Sdes # Make sure the PIC flag is empty. It appears that all Alpha 5146141098Sdes # Linux and Compaq Tru64 Unix objects are PIC. 5147141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5148141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5149141098Sdes ;; 5150141098Sdes *) 5151141098Sdes ;; 5152141098Sdes esac 5153141098Sdes ;; 5154141098Sdes psos*) 5155141098Sdes ;; 5156141098Sdes solaris*) 5157141098Sdes case $cc_basename in 5158174832Sdes CC*) 5159141098Sdes # Sun C++ 4.2, 5.x and Centerline C++ 5160141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5161141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5162141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5163141098Sdes ;; 5164174832Sdes gcx*) 5165141098Sdes # Green Hills C++ Compiler 5166141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5167141098Sdes ;; 5168141098Sdes *) 5169141098Sdes ;; 5170141098Sdes esac 5171141098Sdes ;; 5172141098Sdes sunos4*) 5173141098Sdes case $cc_basename in 5174174832Sdes CC*) 5175141098Sdes # Sun C++ 4.x 5176141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5177141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5178141098Sdes ;; 5179174832Sdes lcc*) 5180141098Sdes # Lucid 5181141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5182141098Sdes ;; 5183141098Sdes *) 5184141098Sdes ;; 5185141098Sdes esac 5186141098Sdes ;; 5187141098Sdes tandem*) 5188141098Sdes case $cc_basename in 5189174832Sdes NCC*) 5190141098Sdes # NonStop-UX NCC 3.20 5191141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5192141098Sdes ;; 5193141098Sdes *) 5194141098Sdes ;; 5195141098Sdes esac 5196141098Sdes ;; 5197174832Sdes sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5198174832Sdes case $cc_basename in 5199174832Sdes CC*) 5200174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5201174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5202174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5203174832Sdes ;; 5204174832Sdes esac 5205141098Sdes ;; 5206141098Sdes vxworks*) 5207141098Sdes ;; 5208141098Sdes *) 5209141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5210141098Sdes ;; 5211141098Sdes esac 5212141098Sdes fi 5213141098Sdes], 5214141098Sdes[ 5215141098Sdes if test "$GCC" = yes; then 5216141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5217141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5218141098Sdes 5219141098Sdes case $host_os in 5220141098Sdes aix*) 5221141098Sdes # All AIX code is PIC. 5222141098Sdes if test "$host_cpu" = ia64; then 5223141098Sdes # AIX 5 now supports IA64 processor 5224141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5225141098Sdes fi 5226141098Sdes ;; 5227141098Sdes 5228141098Sdes amigaos*) 5229141098Sdes # FIXME: we need at least 68020 code to build shared libraries, but 5230141098Sdes # adding the `-m68020' flag to GCC prevents building anything better, 5231141098Sdes # like `-m68040'. 5232141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5233141098Sdes ;; 5234141098Sdes 5235174832Sdes beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5236141098Sdes # PIC is the default for these OSes. 5237141098Sdes ;; 5238141098Sdes 5239174832Sdes mingw* | cygwin* | pw32* | os2*) 5240141098Sdes # This hack is so that the source file can tell whether it is being 5241141098Sdes # built for inclusion in a dll (and should export symbols for example). 5242174832Sdes # Although the cygwin gcc ignores -fPIC, still need this for old-style 5243174832Sdes # (--disable-auto-import) libraries 5244141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5245141098Sdes ;; 5246141098Sdes 5247141098Sdes darwin* | rhapsody*) 5248141098Sdes # PIC is the default on this platform 5249141098Sdes # Common symbols not allowed in MH_DYLIB files 5250141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5251141098Sdes ;; 5252141098Sdes 5253174832Sdes interix[[3-9]]*) 5254174832Sdes # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5255174832Sdes # Instead, we relocate shared libraries at runtime. 5256174832Sdes ;; 5257174832Sdes 5258141098Sdes msdosdjgpp*) 5259141098Sdes # Just because we use GCC doesn't mean we suddenly get shared libraries 5260141098Sdes # on systems that don't support them. 5261141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5262141098Sdes enable_shared=no 5263141098Sdes ;; 5264141098Sdes 5265141098Sdes sysv4*MP*) 5266141098Sdes if test -d /usr/nec; then 5267141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5268141098Sdes fi 5269141098Sdes ;; 5270141098Sdes 5271141098Sdes hpux*) 5272141098Sdes # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5273141098Sdes # not for PA HP-UX. 5274174832Sdes case $host_cpu in 5275141098Sdes hppa*64*|ia64*) 5276141098Sdes # +Z the default 5277141098Sdes ;; 5278141098Sdes *) 5279141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5280141098Sdes ;; 5281141098Sdes esac 5282141098Sdes ;; 5283141098Sdes 5284141098Sdes *) 5285141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5286141098Sdes ;; 5287141098Sdes esac 5288141098Sdes else 5289141098Sdes # PORTME Check for flag to pass linker flags through the system compiler. 5290141098Sdes case $host_os in 5291141098Sdes aix*) 5292141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5293141098Sdes if test "$host_cpu" = ia64; then 5294141098Sdes # AIX 5 now supports IA64 processor 5295141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5296141098Sdes else 5297141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5298141098Sdes fi 5299141098Sdes ;; 5300141098Sdes darwin*) 5301141098Sdes # PIC is the default on this platform 5302141098Sdes # Common symbols not allowed in MH_DYLIB files 5303174832Sdes case $cc_basename in 5304141098Sdes xlc*) 5305141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5306141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5307141098Sdes ;; 5308141098Sdes esac 5309141098Sdes ;; 5310141098Sdes 5311174832Sdes mingw* | cygwin* | pw32* | os2*) 5312141098Sdes # This hack is so that the source file can tell whether it is being 5313141098Sdes # built for inclusion in a dll (and should export symbols for example). 5314141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5315141098Sdes ;; 5316141098Sdes 5317141098Sdes hpux9* | hpux10* | hpux11*) 5318141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5319141098Sdes # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5320141098Sdes # not for PA HP-UX. 5321174832Sdes case $host_cpu in 5322141098Sdes hppa*64*|ia64*) 5323141098Sdes # +Z the default 5324141098Sdes ;; 5325141098Sdes *) 5326141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5327141098Sdes ;; 5328141098Sdes esac 5329141098Sdes # Is there a better lt_prog_compiler_static that works with the bundled CC? 5330141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5331141098Sdes ;; 5332141098Sdes 5333141098Sdes irix5* | irix6* | nonstopux*) 5334141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5335141098Sdes # PIC (with -KPIC) is the default. 5336141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5337141098Sdes ;; 5338141098Sdes 5339141098Sdes newsos6) 5340141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5341141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5342141098Sdes ;; 5343141098Sdes 5344174832Sdes linux* | k*bsd*-gnu) 5345147455Sdes case $cc_basename in 5346141098Sdes icc* | ecc*) 5347141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5348141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5349141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5350141098Sdes ;; 5351174832Sdes pgcc* | pgf77* | pgf90* | pgf95*) 5352147455Sdes # Portland Group compilers (*not* the Pentium gcc compiler, 5353147455Sdes # which looks to be a dead project) 5354147455Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5355147455Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5356174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5357147455Sdes ;; 5358141098Sdes ccc*) 5359141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5360141098Sdes # All Alpha code is PIC. 5361141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5362141098Sdes ;; 5363174832Sdes *) 5364174832Sdes case `$CC -V 2>&1 | sed 5q` in 5365174832Sdes *Sun\ C*) 5366174832Sdes # Sun C 5.9 5367174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5368174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5369174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5370174832Sdes ;; 5371174832Sdes *Sun\ F*) 5372174832Sdes # Sun Fortran 8.3 passes all unrecognized flags to the linker 5373174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5374174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5375174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 5376174832Sdes ;; 5377174832Sdes esac 5378174832Sdes ;; 5379141098Sdes esac 5380141098Sdes ;; 5381141098Sdes 5382141098Sdes osf3* | osf4* | osf5*) 5383141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5384141098Sdes # All OSF/1 code is PIC. 5385141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5386141098Sdes ;; 5387141098Sdes 5388174832Sdes rdos*) 5389174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5390141098Sdes ;; 5391141098Sdes 5392141098Sdes solaris*) 5393141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5394141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5395174832Sdes case $cc_basename in 5396174832Sdes f77* | f90* | f95*) 5397174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5398174832Sdes *) 5399174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5400174832Sdes esac 5401141098Sdes ;; 5402141098Sdes 5403141098Sdes sunos4*) 5404141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5405141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5406141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5407141098Sdes ;; 5408141098Sdes 5409174832Sdes sysv4 | sysv4.2uw2* | sysv4.3*) 5410141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5411141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5412141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5413141098Sdes ;; 5414141098Sdes 5415141098Sdes sysv4*MP*) 5416141098Sdes if test -d /usr/nec ;then 5417141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5418141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5419141098Sdes fi 5420141098Sdes ;; 5421141098Sdes 5422174832Sdes sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5423174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5424174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5425174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5426174832Sdes ;; 5427174832Sdes 5428147455Sdes unicos*) 5429147455Sdes _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5430147455Sdes _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5431147455Sdes ;; 5432147455Sdes 5433141098Sdes uts4*) 5434141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5435141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5436141098Sdes ;; 5437141098Sdes 5438141098Sdes *) 5439141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5440141098Sdes ;; 5441141098Sdes esac 5442141098Sdes fi 5443117610Sdes]) 5444141098SdesAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 5445117610Sdes 5446141098Sdes# 5447141098Sdes# Check to make sure the PIC flag actually works. 5448141098Sdes# 5449141098Sdesif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 5450141098Sdes AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 5451141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 5452141098Sdes [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 5453141098Sdes [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 5454141098Sdes "" | " "*) ;; 5455141098Sdes *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5456141098Sdes esac], 5457141098Sdes [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5458141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5459141098Sdesfi 5460174832Sdescase $host_os in 5461141098Sdes # For platforms which do not support PIC, -DPIC is meaningless: 5462141098Sdes *djgpp*) 5463141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5464141098Sdes ;; 5465141098Sdes *) 5466141098Sdes _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 5467141098Sdes ;; 5468141098Sdesesac 5469174832Sdes 5470174832Sdes# 5471174832Sdes# Check to make sure the static flag actually works. 5472174832Sdes# 5473174832Sdeswl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 5474174832SdesAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5475174832Sdes _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 5476174832Sdes $lt_tmp_static_flag, 5477174832Sdes [], 5478174832Sdes [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 5479141098Sdes]) 5480141098Sdes 5481141098Sdes 5482141098Sdes# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 5483141098Sdes# ------------------------------------ 5484141098Sdes# See if the linker supports building shared libraries. 5485141098SdesAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 5486174832Sdes[AC_REQUIRE([LT_AC_PROG_SED])dnl 5487174832SdesAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5488141098Sdesifelse([$1],[CXX],[ 5489141098Sdes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5490141098Sdes case $host_os in 5491141098Sdes aix4* | aix5*) 5492141098Sdes # If we're using GNU nm, then we don't want the "-C" option. 5493141098Sdes # -C means demangle to AIX nm, but means don't demangle with GNU nm 5494141098Sdes if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5495141098Sdes _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' 5496141098Sdes else 5497141098Sdes _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' 5498141098Sdes fi 5499141098Sdes ;; 5500141098Sdes pw32*) 5501141098Sdes _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5502141098Sdes ;; 5503141098Sdes cygwin* | mingw*) 5504174832Sdes _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' 5505141098Sdes ;; 5506141098Sdes *) 5507141098Sdes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5508141098Sdes ;; 5509141098Sdes esac 5510141098Sdes],[ 5511141098Sdes runpath_var= 5512141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)= 5513141098Sdes _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5514141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)= 5515141098Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5516141098Sdes _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 5517141098Sdes _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5518141098Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5519141098Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5520141098Sdes _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 5521141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5522141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5523141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5524141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=no 5525141098Sdes _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5526141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5527141098Sdes _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5528141098Sdes _LT_AC_TAGVAR(hardcode_automatic, $1)=no 5529141098Sdes _LT_AC_TAGVAR(module_cmds, $1)= 5530141098Sdes _LT_AC_TAGVAR(module_expsym_cmds, $1)= 5531141098Sdes _LT_AC_TAGVAR(always_export_symbols, $1)=no 5532141098Sdes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5533141098Sdes # include_expsyms should be a list of space-separated symbols to be *always* 5534141098Sdes # included in the symbol list 5535141098Sdes _LT_AC_TAGVAR(include_expsyms, $1)= 5536141098Sdes # exclude_expsyms can be an extended regexp of symbols to exclude 5537141098Sdes # it will be wrapped by ` (' and `)$', so one must not match beginning or 5538141098Sdes # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5539141098Sdes # as well as any symbol that contains `d'. 5540141098Sdes _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 5541141098Sdes # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5542141098Sdes # platforms (ab)use it in PIC code, but their linkers get confused if 5543141098Sdes # the symbol is explicitly referenced. Since portable code cannot 5544141098Sdes # rely on this symbol name, it's probably fine to never include it in 5545141098Sdes # preloaded symbol tables. 5546141098Sdes extract_expsyms_cmds= 5547174832Sdes # Just being paranoid about ensuring that cc_basename is set. 5548174832Sdes _LT_CC_BASENAME([$compiler]) 5549141098Sdes case $host_os in 5550141098Sdes cygwin* | mingw* | pw32*) 5551141098Sdes # FIXME: the MSVC++ port hasn't been tested in a loooong time 5552141098Sdes # When not using gcc, we currently assume that we are using 5553141098Sdes # Microsoft Visual C++. 5554141098Sdes if test "$GCC" != yes; then 5555141098Sdes with_gnu_ld=no 5556141098Sdes fi 5557141098Sdes ;; 5558174832Sdes interix*) 5559174832Sdes # we just hope/assume this is gcc and not c89 (= MSVC++) 5560174832Sdes with_gnu_ld=yes 5561174832Sdes ;; 5562141098Sdes openbsd*) 5563141098Sdes with_gnu_ld=no 5564141098Sdes ;; 5565141098Sdes esac 5566141098Sdes 5567141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5568141098Sdes if test "$with_gnu_ld" = yes; then 5569141098Sdes # If archive_cmds runs LD, not CC, wlarc should be empty 5570141098Sdes wlarc='${wl}' 5571141098Sdes 5572174832Sdes # Set some defaults for GNU ld with shared library support. These 5573174832Sdes # are reset later if shared libraries are not supported. Putting them 5574174832Sdes # here allows them to be overridden if necessary. 5575174832Sdes runpath_var=LD_RUN_PATH 5576174832Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5577174832Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5578174832Sdes # ancient GNU ld didn't support --whole-archive et. al. 5579174832Sdes if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 5580174832Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5581174832Sdes else 5582174832Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5583174832Sdes fi 5584174832Sdes supports_anon_versioning=no 5585174832Sdes case `$LD -v 2>/dev/null` in 5586174832Sdes *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5587174832Sdes *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5588174832Sdes *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5589174832Sdes *\ 2.11.*) ;; # other 2.11 versions 5590174832Sdes *) supports_anon_versioning=yes ;; 5591174832Sdes esac 5592174832Sdes 5593141098Sdes # See if GNU ld supports shared libraries. 5594141098Sdes case $host_os in 5595141098Sdes aix3* | aix4* | aix5*) 5596141098Sdes # On AIX/PPC, the GNU linker is very broken 5597141098Sdes if test "$host_cpu" != ia64; then 5598141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 5599141098Sdes cat <<EOF 1>&2 5600141098Sdes 5601141098Sdes*** Warning: the GNU linker, at least up to release 2.9.1, is reported 5602141098Sdes*** to be unable to reliably create shared libraries on AIX. 5603141098Sdes*** Therefore, libtool is disabling shared libraries support. If you 5604141098Sdes*** really care for shared libraries, you may want to modify your PATH 5605141098Sdes*** so that a non-GNU linker is found, and then restart. 5606141098Sdes 5607141098SdesEOF 5608141098Sdes fi 5609141098Sdes ;; 5610141098Sdes 5611141098Sdes amigaos*) 5612141098Sdes _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)' 5613141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5614141098Sdes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5615141098Sdes 5616141098Sdes # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 5617141098Sdes # that the semantics of dynamic libraries on AmigaOS, at least up 5618141098Sdes # to version 4, is to share data among multiple programs linked 5619141098Sdes # with the same dynamic library. Since this doesn't match the 5620141098Sdes # behavior of shared libraries on other platforms, we can't use 5621141098Sdes # them. 5622141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 5623141098Sdes ;; 5624141098Sdes 5625141098Sdes beos*) 5626141098Sdes if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5627141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5628141098Sdes # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5629141098Sdes # support --undefined. This deserves some investigation. FIXME 5630141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5631141098Sdes else 5632141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 5633141098Sdes fi 5634141098Sdes ;; 5635141098Sdes 5636141098Sdes cygwin* | mingw* | pw32*) 5637141098Sdes # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5638141098Sdes # as there is no search path for DLLs. 5639141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5640141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5641141098Sdes _LT_AC_TAGVAR(always_export_symbols, $1)=no 5642141098Sdes _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5643174832Sdes _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' 5644141098Sdes 5645141098Sdes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5646174832Sdes _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' 5647141098Sdes # If the export-symbols file already is a .def file (1st line 5648141098Sdes # is EXPORTS), use it as is; otherwise, prepend... 5649141098Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5650141098Sdes cp $export_symbols $output_objdir/$soname.def; 5651141098Sdes else 5652141098Sdes echo EXPORTS > $output_objdir/$soname.def; 5653141098Sdes cat $export_symbols >> $output_objdir/$soname.def; 5654141098Sdes fi~ 5655174832Sdes $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5656141098Sdes else 5657147455Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 5658141098Sdes fi 5659141098Sdes ;; 5660141098Sdes 5661174832Sdes interix[[3-9]]*) 5662174832Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=no 5663174832Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5664174832Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5665174832Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5666174832Sdes # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5667174832Sdes # Instead, shared libraries are loaded at an image base (0x10000000 by 5668174832Sdes # default) and relocated if they conflict, which is a slow very memory 5669174832Sdes # consuming and fragmenting process. To avoid this, we pick a random, 5670174832Sdes # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5671174832Sdes # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5672174832Sdes _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' 5673174832Sdes _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' 5674174832Sdes ;; 5675174832Sdes 5676174832Sdes gnu* | linux* | k*bsd*-gnu) 5677174832Sdes if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5678174832Sdes tmp_addflag= 5679174832Sdes case $cc_basename,$host_cpu in 5680174832Sdes pgcc*) # Portland Group C compiler 5681174832Sdes _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' 5682174832Sdes tmp_addflag=' $pic_flag' 5683174832Sdes ;; 5684174832Sdes pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 5685174832Sdes _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' 5686174832Sdes tmp_addflag=' $pic_flag -Mnomain' ;; 5687174832Sdes ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5688174832Sdes tmp_addflag=' -i_dynamic' ;; 5689174832Sdes efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5690174832Sdes tmp_addflag=' -i_dynamic -nofor_main' ;; 5691174832Sdes ifc* | ifort*) # Intel Fortran compiler 5692174832Sdes tmp_addflag=' -nofor_main' ;; 5693174832Sdes esac 5694174832Sdes case `$CC -V 2>&1 | sed 5q` in 5695174832Sdes *Sun\ C*) # Sun C 5.9 5696174832Sdes _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' 5697174832Sdes tmp_sharedflag='-G' ;; 5698174832Sdes *Sun\ F*) # Sun Fortran 8.3 5699174832Sdes tmp_sharedflag='-G' ;; 5700174832Sdes *) 5701174832Sdes tmp_sharedflag='-shared' ;; 5702174832Sdes esac 5703174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5704174832Sdes 5705174832Sdes if test $supports_anon_versioning = yes; then 5706174832Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 5707174832Sdes cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5708174832Sdes $echo "local: *; };" >> $output_objdir/$libname.ver~ 5709174832Sdes $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5710174832Sdes fi 5711174832Sdes else 5712174832Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 5713174832Sdes fi 5714174832Sdes ;; 5715174832Sdes 5716141098Sdes netbsd*) 5717141098Sdes if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5718141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5719141098Sdes wlarc= 5720141098Sdes else 5721141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5722141098Sdes _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' 5723141098Sdes fi 5724141098Sdes ;; 5725141098Sdes 5726174832Sdes solaris*) 5727141098Sdes if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 5728141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 5729141098Sdes cat <<EOF 1>&2 5730141098Sdes 5731141098Sdes*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5732141098Sdes*** create shared libraries on Solaris systems. Therefore, libtool 5733141098Sdes*** is disabling shared libraries support. We urge you to upgrade GNU 5734141098Sdes*** binutils to release 2.9.1 or newer. Another option is to modify 5735141098Sdes*** your PATH or compiler configuration so that the native linker is 5736141098Sdes*** used, and then restart. 5737141098Sdes 5738141098SdesEOF 5739141098Sdes elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5740141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5741141098Sdes _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' 5742141098Sdes else 5743141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 5744141098Sdes fi 5745141098Sdes ;; 5746141098Sdes 5747174832Sdes sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5748174832Sdes case `$LD -v 2>&1` in 5749174832Sdes *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5750174832Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 5751174832Sdes cat <<_LT_EOF 1>&2 5752174832Sdes 5753174832Sdes*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5754174832Sdes*** reliably create shared libraries on SCO systems. Therefore, libtool 5755174832Sdes*** is disabling shared libraries support. We urge you to upgrade GNU 5756174832Sdes*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5757174832Sdes*** your PATH or compiler configuration so that the native linker is 5758174832Sdes*** used, and then restart. 5759174832Sdes 5760174832Sdes_LT_EOF 5761174832Sdes ;; 5762174832Sdes *) 5763174832Sdes if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5764174832Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 5765174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 5766174832Sdes _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' 5767174832Sdes else 5768174832Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 5769174832Sdes fi 5770174832Sdes ;; 5771174832Sdes esac 5772174832Sdes ;; 5773174832Sdes 5774141098Sdes sunos4*) 5775141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5776141098Sdes wlarc= 5777141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5778141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5779141098Sdes ;; 5780141098Sdes 5781141098Sdes *) 5782141098Sdes if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5783141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5784141098Sdes _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' 5785141098Sdes else 5786141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 5787141098Sdes fi 5788141098Sdes ;; 5789141098Sdes esac 5790141098Sdes 5791174832Sdes if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 5792174832Sdes runpath_var= 5793174832Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5794174832Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5795174832Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5796141098Sdes fi 5797141098Sdes else 5798141098Sdes # PORTME fill in a description of your system's linker (not GNU ld) 5799141098Sdes case $host_os in 5800141098Sdes aix3*) 5801141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5802141098Sdes _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5803141098Sdes _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' 5804141098Sdes # Note: this linker hardcodes the directories in LIBPATH if there 5805141098Sdes # are no directories specified by -L. 5806141098Sdes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5807174832Sdes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 5808141098Sdes # Neither direct hardcoding nor static linking is supported with a 5809141098Sdes # broken collect2. 5810141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5811141098Sdes fi 5812141098Sdes ;; 5813141098Sdes 5814141098Sdes aix4* | aix5*) 5815141098Sdes if test "$host_cpu" = ia64; then 5816141098Sdes # On IA64, the linker does run time linking by default, so we don't 5817141098Sdes # have to do anything special. 5818141098Sdes aix_use_runtimelinking=no 5819141098Sdes exp_sym_flag='-Bexport' 5820141098Sdes no_entry_flag="" 5821141098Sdes else 5822141098Sdes # If we're using GNU nm, then we don't want the "-C" option. 5823141098Sdes # -C means demangle to AIX nm, but means don't demangle with GNU nm 5824141098Sdes if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5825141098Sdes _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' 5826141098Sdes else 5827141098Sdes _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' 5828141098Sdes fi 5829141098Sdes aix_use_runtimelinking=no 5830141098Sdes 5831141098Sdes # Test if we are trying to use run time linking or normal 5832141098Sdes # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5833141098Sdes # need to do runtime linking. 5834141098Sdes case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 5835141098Sdes for ld_flag in $LDFLAGS; do 5836141098Sdes if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5837141098Sdes aix_use_runtimelinking=yes 5838141098Sdes break 5839141098Sdes fi 5840141098Sdes done 5841174832Sdes ;; 5842141098Sdes esac 5843141098Sdes 5844141098Sdes exp_sym_flag='-bexport' 5845141098Sdes no_entry_flag='-bnoentry' 5846141098Sdes fi 5847141098Sdes 5848141098Sdes # When large executables or shared objects are built, AIX ld can 5849141098Sdes # have problems creating the table of contents. If linking a library 5850141098Sdes # or program results in "error TOC overflow" add -mminimal-toc to 5851141098Sdes # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5852141098Sdes # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5853141098Sdes 5854141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='' 5855141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5856141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5857141098Sdes _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5858141098Sdes 5859141098Sdes if test "$GCC" = yes; then 5860147455Sdes case $host_os in aix4.[[012]]|aix4.[[012]].*) 5861141098Sdes # We only want to do this on AIX 4.2 and lower, the check 5862141098Sdes # below for broken collect2 doesn't work under 4.3+ 5863141098Sdes collect2name=`${CC} -print-prog-name=collect2` 5864141098Sdes if test -f "$collect2name" && \ 5865141098Sdes strings "$collect2name" | grep resolve_lib_name >/dev/null 5866141098Sdes then 5867141098Sdes # We have reworked collect2 5868174832Sdes : 5869141098Sdes else 5870141098Sdes # We have old collect2 5871141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5872141098Sdes # It fails to find uninstalled libraries when the uninstalled 5873141098Sdes # path is not listed in the libpath. Setting hardcode_minus_L 5874141098Sdes # to unsupported forces relinking 5875141098Sdes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5876141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5877141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5878141098Sdes fi 5879174832Sdes ;; 5880141098Sdes esac 5881141098Sdes shared_flag='-shared' 5882147455Sdes if test "$aix_use_runtimelinking" = yes; then 5883147455Sdes shared_flag="$shared_flag "'${wl}-G' 5884147455Sdes fi 5885141098Sdes else 5886141098Sdes # not using gcc 5887141098Sdes if test "$host_cpu" = ia64; then 5888141098Sdes # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5889141098Sdes # chokes on -Wl,-G. The following line is correct: 5890141098Sdes shared_flag='-G' 5891141098Sdes else 5892174832Sdes if test "$aix_use_runtimelinking" = yes; then 5893141098Sdes shared_flag='${wl}-G' 5894141098Sdes else 5895141098Sdes shared_flag='${wl}-bM:SRE' 5896174832Sdes fi 5897141098Sdes fi 5898141098Sdes fi 5899141098Sdes 5900141098Sdes # It seems that -bexpall does not export symbols beginning with 5901141098Sdes # underscore (_), so it is better to generate a list of symbols to export. 5902141098Sdes _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5903141098Sdes if test "$aix_use_runtimelinking" = yes; then 5904141098Sdes # Warning - without using the other runtime loading flags (-brtl), 5905141098Sdes # -berok will link without error, but may produce a broken library. 5906141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5907141098Sdes # Determine the default libpath from the value encoded in an empty executable. 5908141098Sdes _LT_AC_SYS_LIBPATH_AIX 5909141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5910174832Sdes _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" 5911141098Sdes else 5912141098Sdes if test "$host_cpu" = ia64; then 5913141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5914141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5915174832Sdes _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" 5916141098Sdes else 5917141098Sdes # Determine the default libpath from the value encoded in an empty executable. 5918141098Sdes _LT_AC_SYS_LIBPATH_AIX 5919141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5920141098Sdes # Warning - without using the other run time loading flags, 5921141098Sdes # -berok will link without error, but may produce a broken library. 5922141098Sdes _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5923141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5924141098Sdes # Exported symbols can be pulled into shared objects from archives 5925174832Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5926141098Sdes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 5927174832Sdes # This is similar to how AIX traditionally builds its shared libraries. 5928174832Sdes _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' 5929141098Sdes fi 5930141098Sdes fi 5931141098Sdes ;; 5932141098Sdes 5933141098Sdes amigaos*) 5934141098Sdes _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)' 5935141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5936141098Sdes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5937141098Sdes # see comment about different semantics on the GNU ld section 5938141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 5939141098Sdes ;; 5940141098Sdes 5941141098Sdes bsdi[[45]]*) 5942141098Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5943141098Sdes ;; 5944141098Sdes 5945141098Sdes cygwin* | mingw* | pw32*) 5946141098Sdes # When not using gcc, we currently assume that we are using 5947141098Sdes # Microsoft Visual C++. 5948141098Sdes # hardcode_libdir_flag_spec is actually meaningless, as there is 5949141098Sdes # no search path for DLLs. 5950141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5951141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5952141098Sdes # Tell ltmain to make .lib files, not .a files. 5953141098Sdes libext=lib 5954141098Sdes # Tell ltmain to make .dll files, not .so files. 5955141098Sdes shrext_cmds=".dll" 5956141098Sdes # FIXME: Setting linknames here is a bad hack. 5957141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 5958141098Sdes # The linker will automatically build a .lib file if we build a DLL. 5959141098Sdes _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 5960141098Sdes # FIXME: Should let the user specify the lib program. 5961174832Sdes _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5962147455Sdes _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 5963141098Sdes _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5964141098Sdes ;; 5965141098Sdes 5966141098Sdes darwin* | rhapsody*) 5967174832Sdes case $host_os in 5968141098Sdes rhapsody* | darwin1.[[012]]) 5969141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 5970141098Sdes ;; 5971141098Sdes *) # Darwin 1.3 on 5972141098Sdes if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 5973141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5974141098Sdes else 5975141098Sdes case ${MACOSX_DEPLOYMENT_TARGET} in 5976141098Sdes 10.[[012]]) 5977141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5978141098Sdes ;; 5979141098Sdes 10.*) 5980141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 5981141098Sdes ;; 5982141098Sdes esac 5983141098Sdes fi 5984141098Sdes ;; 5985141098Sdes esac 5986141098Sdes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5987141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=no 5988141098Sdes _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 5989141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5990141098Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 5991141098Sdes _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5992141098Sdes if test "$GCC" = yes ; then 5993141098Sdes output_verbose_link_cmd='echo' 5994141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 5995141098Sdes _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 5996174832Sdes # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 5997141098Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 5998141098Sdes _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}' 5999141098Sdes else 6000174832Sdes case $cc_basename in 6001141098Sdes xlc*) 6002141098Sdes output_verbose_link_cmd='echo' 6003174832Sdes _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' 6004141098Sdes _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 6005174832Sdes # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 6006174832Sdes _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}' 6007141098Sdes _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}' 6008141098Sdes ;; 6009141098Sdes *) 6010141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 6011141098Sdes ;; 6012141098Sdes esac 6013141098Sdes fi 6014141098Sdes ;; 6015141098Sdes 6016141098Sdes dgux*) 6017141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6018141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6019141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6020141098Sdes ;; 6021141098Sdes 6022141098Sdes freebsd1*) 6023141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 6024141098Sdes ;; 6025141098Sdes 6026141098Sdes # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6027141098Sdes # support. Future versions do this automatically, but an explicit c++rt0.o 6028141098Sdes # does not break anything, and helps significantly (at the cost of a little 6029141098Sdes # extra space). 6030141098Sdes freebsd2.2*) 6031141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6032141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6033141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6034141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6035141098Sdes ;; 6036141098Sdes 6037141098Sdes # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6038141098Sdes freebsd2*) 6039141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6040141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6041141098Sdes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6042141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6043141098Sdes ;; 6044141098Sdes 6045141098Sdes # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6046174832Sdes freebsd* | dragonfly*) 6047141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 6048141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6049141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6050141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6051141098Sdes ;; 6052141098Sdes 6053141098Sdes hpux9*) 6054141098Sdes if test "$GCC" = yes; then 6055141098Sdes _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' 6056141098Sdes else 6057141098Sdes _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' 6058141098Sdes fi 6059141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6060141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6061141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6062141098Sdes 6063141098Sdes # hardcode_minus_L: Not really in the search PATH, 6064141098Sdes # but as the default location of the library. 6065141098Sdes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6066141098Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6067141098Sdes ;; 6068141098Sdes 6069174832Sdes hpux10*) 6070141098Sdes if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6071174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6072174832Sdes else 6073174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6074174832Sdes fi 6075174832Sdes if test "$with_gnu_ld" = no; then 6076174832Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6077174832Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6078174832Sdes 6079174832Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6080174832Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6081174832Sdes 6082174832Sdes # hardcode_minus_L: Not really in the search PATH, 6083174832Sdes # but as the default location of the library. 6084174832Sdes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6085174832Sdes fi 6086174832Sdes ;; 6087174832Sdes 6088174832Sdes hpux11*) 6089174832Sdes if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6090174832Sdes case $host_cpu in 6091174832Sdes hppa*64*) 6092141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6093141098Sdes ;; 6094174832Sdes ia64*) 6095174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6096174832Sdes ;; 6097141098Sdes *) 6098141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6099141098Sdes ;; 6100141098Sdes esac 6101141098Sdes else 6102174832Sdes case $host_cpu in 6103174832Sdes hppa*64*) 6104174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6105141098Sdes ;; 6106174832Sdes ia64*) 6107174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6108174832Sdes ;; 6109141098Sdes *) 6110174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6111141098Sdes ;; 6112141098Sdes esac 6113141098Sdes fi 6114141098Sdes if test "$with_gnu_ld" = no; then 6115174832Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6116174832Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6117174832Sdes 6118174832Sdes case $host_cpu in 6119174832Sdes hppa*64*|ia64*) 6120141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 6121141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=no 6122141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6123141098Sdes ;; 6124141098Sdes *) 6125141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6126141098Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6127141098Sdes 6128141098Sdes # hardcode_minus_L: Not really in the search PATH, 6129141098Sdes # but as the default location of the library. 6130141098Sdes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6131141098Sdes ;; 6132141098Sdes esac 6133141098Sdes fi 6134141098Sdes ;; 6135141098Sdes 6136141098Sdes irix5* | irix6* | nonstopux*) 6137141098Sdes if test "$GCC" = yes; then 6138141098Sdes _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' 6139141098Sdes else 6140141098Sdes _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' 6141141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6142141098Sdes fi 6143141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6144141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6145141098Sdes _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6146141098Sdes ;; 6147141098Sdes 6148141098Sdes netbsd*) 6149141098Sdes if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6150141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6151141098Sdes else 6152141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6153141098Sdes fi 6154141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6155141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6156141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6157141098Sdes ;; 6158141098Sdes 6159141098Sdes newsos6) 6160141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6161141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6162141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6163141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6164141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6165141098Sdes ;; 6166141098Sdes 6167141098Sdes openbsd*) 6168174832Sdes if test -f /usr/libexec/ld.so; then 6169174832Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6170174832Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6171174832Sdes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6172174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6173174832Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6174174832Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6175174832Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6176174832Sdes else 6177174832Sdes case $host_os in 6178174832Sdes openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6179174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6180174832Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6181174832Sdes ;; 6182174832Sdes *) 6183174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6184174832Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6185174832Sdes ;; 6186174832Sdes esac 6187174832Sdes fi 6188141098Sdes else 6189174832Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 6190141098Sdes fi 6191141098Sdes ;; 6192141098Sdes 6193141098Sdes os2*) 6194141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6195141098Sdes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6196141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6197141098Sdes _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' 6198141098Sdes _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6199141098Sdes ;; 6200141098Sdes 6201141098Sdes osf3*) 6202141098Sdes if test "$GCC" = yes; then 6203141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6204141098Sdes _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' 6205141098Sdes else 6206141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6207141098Sdes _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' 6208141098Sdes fi 6209141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6210141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6211141098Sdes ;; 6212141098Sdes 6213141098Sdes osf4* | osf5*) # as osf3* with the addition of -msym flag 6214141098Sdes if test "$GCC" = yes; then 6215141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6216141098Sdes _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' 6217141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6218141098Sdes else 6219141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6220141098Sdes _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' 6221141098Sdes _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~ 6222174832Sdes $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' 6223141098Sdes 6224141098Sdes # Both c and cxx compiler support -rpath directly 6225141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6226141098Sdes fi 6227141098Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6228141098Sdes ;; 6229141098Sdes 6230141098Sdes solaris*) 6231141098Sdes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6232141098Sdes if test "$GCC" = yes; then 6233174832Sdes wlarc='${wl}' 6234141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6235141098Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6236141098Sdes $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 6237141098Sdes else 6238174832Sdes wlarc='' 6239141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6240141098Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6241141098Sdes $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6242141098Sdes fi 6243141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6244141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6245141098Sdes case $host_os in 6246141098Sdes solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6247174832Sdes *) 6248174832Sdes # The compiler driver will combine and reorder linker options, 6249174832Sdes # but understands `-z linker_flag'. GCC discards it without `$wl', 6250174832Sdes # but is careful enough not to reorder. 6251174832Sdes # Supported since Solaris 2.6 (maybe 2.5.1?) 6252174832Sdes if test "$GCC" = yes; then 6253174832Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6254174832Sdes else 6255174832Sdes _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6256174832Sdes fi 6257174832Sdes ;; 6258141098Sdes esac 6259141098Sdes _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6260141098Sdes ;; 6261141098Sdes 6262141098Sdes sunos4*) 6263141098Sdes if test "x$host_vendor" = xsequent; then 6264141098Sdes # Use $CC to link under sequent, because it throws in some extra .o 6265141098Sdes # files that make .init and .fini sections work. 6266141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6267141098Sdes else 6268141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6269141098Sdes fi 6270141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6271141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6272141098Sdes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6273141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6274141098Sdes ;; 6275141098Sdes 6276141098Sdes sysv4) 6277141098Sdes case $host_vendor in 6278141098Sdes sni) 6279141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6280141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6281141098Sdes ;; 6282141098Sdes siemens) 6283141098Sdes ## LD is ld it makes a PLAMLIB 6284141098Sdes ## CC just makes a GrossModule. 6285141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6286141098Sdes _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6287141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=no 6288141098Sdes ;; 6289141098Sdes motorola) 6290141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6291141098Sdes _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6292141098Sdes ;; 6293141098Sdes esac 6294141098Sdes runpath_var='LD_RUN_PATH' 6295141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6296141098Sdes ;; 6297141098Sdes 6298141098Sdes sysv4.3*) 6299141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6300141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6301141098Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6302141098Sdes ;; 6303141098Sdes 6304141098Sdes sysv4*MP*) 6305141098Sdes if test -d /usr/nec; then 6306141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6307141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6308141098Sdes runpath_var=LD_RUN_PATH 6309141098Sdes hardcode_runpath_var=yes 6310141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6311141098Sdes fi 6312141098Sdes ;; 6313141098Sdes 6314174832Sdes sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6315174832Sdes _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6316174832Sdes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6317141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6318174832Sdes runpath_var='LD_RUN_PATH' 6319141098Sdes 6320141098Sdes if test "$GCC" = yes; then 6321174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6322174832Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6323141098Sdes else 6324174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6325174832Sdes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6326141098Sdes fi 6327141098Sdes ;; 6328141098Sdes 6329174832Sdes sysv5* | sco3.2v5* | sco5v6*) 6330174832Sdes # Note: We can NOT use -z defs as we might desire, because we do not 6331174832Sdes # link with -lc, and that would cause any symbols used from libc to 6332174832Sdes # always be unresolved, which means just about no library would 6333174832Sdes # ever link correctly. If we're not using GNU ld we use -z text 6334174832Sdes # though, which does catch some bad symbols but isn't as heavy-handed 6335174832Sdes # as -z defs. 6336174832Sdes _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6337174832Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6338174832Sdes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6339141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6340174832Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 6341174832Sdes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 6342174832Sdes _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6343174832Sdes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6344141098Sdes runpath_var='LD_RUN_PATH' 6345174832Sdes 6346174832Sdes if test "$GCC" = yes; then 6347174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6348174832Sdes _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' 6349174832Sdes else 6350174832Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6351174832Sdes _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' 6352174832Sdes fi 6353141098Sdes ;; 6354141098Sdes 6355141098Sdes uts4*) 6356141098Sdes _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6357141098Sdes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6358141098Sdes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6359141098Sdes ;; 6360141098Sdes 6361141098Sdes *) 6362141098Sdes _LT_AC_TAGVAR(ld_shlibs, $1)=no 6363141098Sdes ;; 6364141098Sdes esac 6365141098Sdes fi 6366141098Sdes]) 6367141098SdesAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 6368141098Sdestest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6369141098Sdes 6370141098Sdes# 6371141098Sdes# Do we need to explicitly link libc? 6372141098Sdes# 6373141098Sdescase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6374141098Sdesx|xyes) 6375141098Sdes # Assume -lc should be added 6376141098Sdes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6377141098Sdes 6378141098Sdes if test "$enable_shared" = yes && test "$GCC" = yes; then 6379141098Sdes case $_LT_AC_TAGVAR(archive_cmds, $1) in 6380141098Sdes *'~'*) 6381141098Sdes # FIXME: we may have to deal with multi-command sequences. 6382141098Sdes ;; 6383141098Sdes '$CC '*) 6384141098Sdes # Test whether the compiler implicitly links with -lc since on some 6385141098Sdes # systems, -lgcc has to come before -lc. If gcc already passes -lc 6386141098Sdes # to ld, don't add -lc before -lgcc. 6387141098Sdes AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6388141098Sdes $rm conftest* 6389174832Sdes echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6390141098Sdes 6391141098Sdes if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6392141098Sdes soname=conftest 6393141098Sdes lib=conftest 6394141098Sdes libobjs=conftest.$ac_objext 6395141098Sdes deplibs= 6396141098Sdes wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6397174832Sdes pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 6398141098Sdes compiler_flags=-v 6399141098Sdes linker_flags=-v 6400141098Sdes verstring= 6401141098Sdes output_objdir=. 6402141098Sdes libname=conftest 6403141098Sdes lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 6404141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6405141098Sdes if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 6406141098Sdes then 6407141098Sdes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6408141098Sdes else 6409141098Sdes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6410141098Sdes fi 6411141098Sdes _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6412141098Sdes else 6413141098Sdes cat conftest.err 1>&5 6414141098Sdes fi 6415141098Sdes $rm conftest* 6416141098Sdes AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 6417141098Sdes ;; 6418141098Sdes esac 6419141098Sdes fi 6420141098Sdes ;; 6421141098Sdesesac 6422141098Sdes])# AC_LIBTOOL_PROG_LD_SHLIBS 6423141098Sdes 6424141098Sdes 6425141098Sdes# _LT_AC_FILE_LTDLL_C 6426141098Sdes# ------------------- 6427141098Sdes# Be careful that the start marker always follows a newline. 6428141098SdesAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 6429141098Sdes# /* ltdll.c starts here */ 6430141098Sdes# #define WIN32_LEAN_AND_MEAN 6431141098Sdes# #include <windows.h> 6432141098Sdes# #undef WIN32_LEAN_AND_MEAN 6433141098Sdes# #include <stdio.h> 6434141098Sdes# 6435141098Sdes# #ifndef __CYGWIN__ 6436141098Sdes# # ifdef __CYGWIN32__ 6437141098Sdes# # define __CYGWIN__ __CYGWIN32__ 6438141098Sdes# # endif 6439141098Sdes# #endif 6440141098Sdes# 6441141098Sdes# #ifdef __cplusplus 6442141098Sdes# extern "C" { 6443141098Sdes# #endif 6444141098Sdes# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 6445141098Sdes# #ifdef __cplusplus 6446141098Sdes# } 6447141098Sdes# #endif 6448141098Sdes# 6449141098Sdes# #ifdef __CYGWIN__ 6450141098Sdes# #include <cygwin/cygwin_dll.h> 6451141098Sdes# DECLARE_CYGWIN_DLL( DllMain ); 6452141098Sdes# #endif 6453141098Sdes# HINSTANCE __hDllInstance_base; 6454141098Sdes# 6455141098Sdes# BOOL APIENTRY 6456141098Sdes# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 6457141098Sdes# { 6458141098Sdes# __hDllInstance_base = hInst; 6459141098Sdes# return TRUE; 6460141098Sdes# } 6461141098Sdes# /* ltdll.c ends here */ 6462141098Sdes])# _LT_AC_FILE_LTDLL_C 6463141098Sdes 6464141098Sdes 6465141098Sdes# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 6466141098Sdes# --------------------------------- 6467141098SdesAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 6468141098Sdes 6469141098Sdes 6470141098Sdes# old names 6471141098SdesAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 6472141098SdesAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 6473141098SdesAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 6474141098SdesAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 6475141098SdesAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 6476141098SdesAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 6477141098SdesAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 6478141098Sdes 6479141098Sdes# This is just to silence aclocal about the macro not being used 6480141098Sdesifelse([AC_DISABLE_FAST_INSTALL]) 6481141098Sdes 6482141098SdesAC_DEFUN([LT_AC_PROG_GCJ], 6483141098Sdes[AC_CHECK_TOOL(GCJ, gcj, no) 6484141098Sdes test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6485141098Sdes AC_SUBST(GCJFLAGS) 6486141098Sdes]) 6487141098Sdes 6488141098SdesAC_DEFUN([LT_AC_PROG_RC], 6489141098Sdes[AC_CHECK_TOOL(RC, windres, no) 6490141098Sdes]) 6491141098Sdes 6492174832Sdes 6493174832Sdes# Cheap backport of AS_EXECUTABLE_P and required macros 6494174832Sdes# from Autoconf 2.59; we should not use $as_executable_p directly. 6495174832Sdes 6496174832Sdes# _AS_TEST_PREPARE 6497174832Sdes# ---------------- 6498174832Sdesm4_ifndef([_AS_TEST_PREPARE], 6499174832Sdes[m4_defun([_AS_TEST_PREPARE], 6500174832Sdes[if test -x / >/dev/null 2>&1; then 6501174832Sdes as_executable_p='test -x' 6502174832Sdeselse 6503174832Sdes as_executable_p='test -f' 6504174832Sdesfi 6505174832Sdes])])# _AS_TEST_PREPARE 6506174832Sdes 6507174832Sdes# AS_EXECUTABLE_P 6508174832Sdes# --------------- 6509174832Sdes# Check whether a file is executable. 6510174832Sdesm4_ifndef([AS_EXECUTABLE_P], 6511174832Sdes[m4_defun([AS_EXECUTABLE_P], 6512174832Sdes[AS_REQUIRE([_AS_TEST_PREPARE])dnl 6513174832Sdes$as_executable_p $1[]dnl 6514174832Sdes])])# AS_EXECUTABLE_P 6515174832Sdes 6516141098Sdes# NOTE: This macro has been submitted for inclusion into # 6517141098Sdes# GNU Autoconf as AC_PROG_SED. When it is available in # 6518141098Sdes# a released version of Autoconf we should remove this # 6519141098Sdes# macro and use it instead. # 6520141098Sdes# LT_AC_PROG_SED 6521141098Sdes# -------------- 6522141098Sdes# Check for a fully-functional sed program, that truncates 6523141098Sdes# as few characters as possible. Prefer GNU sed if found. 6524141098SdesAC_DEFUN([LT_AC_PROG_SED], 6525141098Sdes[AC_MSG_CHECKING([for a sed that does not truncate output]) 6526141098SdesAC_CACHE_VAL(lt_cv_path_SED, 6527141098Sdes[# Loop through the user's path and test for sed and gsed. 6528141098Sdes# Then use that list of sed's as ones to test for truncation. 6529141098Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6530141098Sdesfor as_dir in $PATH 6531141098Sdesdo 6532141098Sdes IFS=$as_save_IFS 6533141098Sdes test -z "$as_dir" && as_dir=. 6534141098Sdes for lt_ac_prog in sed gsed; do 6535141098Sdes for ac_exec_ext in '' $ac_executable_extensions; do 6536174832Sdes if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 6537141098Sdes lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 6538141098Sdes fi 6539141098Sdes done 6540141098Sdes done 6541141098Sdesdone 6542174832SdesIFS=$as_save_IFS 6543141098Sdeslt_ac_max=0 6544141098Sdeslt_ac_count=0 6545141098Sdes# Add /usr/xpg4/bin/sed as it is typically found on Solaris 6546141098Sdes# along with /bin/sed that truncates output. 6547141098Sdesfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 6548147455Sdes test ! -f $lt_ac_sed && continue 6549141098Sdes cat /dev/null > conftest.in 6550141098Sdes lt_ac_count=0 6551141098Sdes echo $ECHO_N "0123456789$ECHO_C" >conftest.in 6552141098Sdes # Check for GNU sed and select it if it is found. 6553141098Sdes if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 6554141098Sdes lt_cv_path_SED=$lt_ac_sed 6555141098Sdes break 6556141098Sdes fi 6557141098Sdes while true; do 6558141098Sdes cat conftest.in conftest.in >conftest.tmp 6559141098Sdes mv conftest.tmp conftest.in 6560141098Sdes cp conftest.in conftest.nl 6561141098Sdes echo >>conftest.nl 6562141098Sdes $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 6563141098Sdes cmp -s conftest.out conftest.nl || break 6564141098Sdes # 10000 chars as input seems more than enough 6565141098Sdes test $lt_ac_count -gt 10 && break 6566141098Sdes lt_ac_count=`expr $lt_ac_count + 1` 6567141098Sdes if test $lt_ac_count -gt $lt_ac_max; then 6568141098Sdes lt_ac_max=$lt_ac_count 6569141098Sdes lt_cv_path_SED=$lt_ac_sed 6570141098Sdes fi 6571141098Sdes done 6572141098Sdesdone 6573141098Sdes]) 6574141098SdesSED=$lt_cv_path_SED 6575174832SdesAC_SUBST([SED]) 6576141098SdesAC_MSG_RESULT([$SED]) 6577141098Sdes]) 6578141098Sdes 6579174832Sdes# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. 6580174832Sdes# 6581174832Sdes# This file is free software; the Free Software Foundation 6582174832Sdes# gives unlimited permission to copy and/or distribute it, 6583174832Sdes# with or without modifications, as long as this notice is preserved. 6584141098Sdes 6585141098Sdes# AM_AUTOMAKE_VERSION(VERSION) 6586141098Sdes# ---------------------------- 6587141098Sdes# Automake X.Y traces this macro to ensure aclocal.m4 has been 6588141098Sdes# generated from the m4 files accompanying Automake X.Y. 6589174832SdesAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 6590141098Sdes 6591141098Sdes# AM_SET_CURRENT_AUTOMAKE_VERSION 6592141098Sdes# ------------------------------- 6593141098Sdes# Call AM_AUTOMAKE_VERSION so it can be traced. 6594141098Sdes# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 6595141098SdesAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 6596174832Sdes [AM_AUTOMAKE_VERSION([1.9.6])]) 6597141098Sdes 6598174832Sdes# AM_AUX_DIR_EXPAND -*- Autoconf -*- 6599117610Sdes 6600174832Sdes# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 6601174832Sdes# 6602174832Sdes# This file is free software; the Free Software Foundation 6603174832Sdes# gives unlimited permission to copy and/or distribute it, 6604174832Sdes# with or without modifications, as long as this notice is preserved. 6605141098Sdes 6606117610Sdes# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6607117610Sdes# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6608117610Sdes# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 6609117610Sdes# 6610117610Sdes# Of course, Automake must honor this variable whenever it calls a 6611117610Sdes# tool from the auxiliary directory. The problem is that $srcdir (and 6612117610Sdes# therefore $ac_aux_dir as well) can be either absolute or relative, 6613117610Sdes# depending on how configure is run. This is pretty annoying, since 6614117610Sdes# it makes $ac_aux_dir quite unusable in subdirectories: in the top 6615117610Sdes# source directory, any form will work fine, but in subdirectories a 6616117610Sdes# relative path needs to be adjusted first. 6617117610Sdes# 6618117610Sdes# $ac_aux_dir/missing 6619117610Sdes# fails when called from a subdirectory if $ac_aux_dir is relative 6620117610Sdes# $top_srcdir/$ac_aux_dir/missing 6621117610Sdes# fails if $ac_aux_dir is absolute, 6622117610Sdes# fails when called from a subdirectory in a VPATH build with 6623117610Sdes# a relative $ac_aux_dir 6624117610Sdes# 6625117610Sdes# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 6626117610Sdes# are both prefixed by $srcdir. In an in-source build this is usually 6627117610Sdes# harmless because $srcdir is `.', but things will broke when you 6628117610Sdes# start a VPATH build or use an absolute $srcdir. 6629117610Sdes# 6630117610Sdes# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 6631117610Sdes# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 6632117610Sdes# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 6633117610Sdes# and then we would define $MISSING as 6634117610Sdes# MISSING="\${SHELL} $am_aux_dir/missing" 6635117610Sdes# This will work as long as MISSING is not called from configure, because 6636117610Sdes# unfortunately $(top_srcdir) has no meaning in configure. 6637117610Sdes# However there are other variables, like CC, which are often used in 6638117610Sdes# configure, and could therefore not use this "fixed" $ac_aux_dir. 6639117610Sdes# 6640117610Sdes# Another solution, used here, is to always expand $ac_aux_dir to an 6641117610Sdes# absolute PATH. The drawback is that using absolute paths prevent a 6642117610Sdes# configured tree to be moved without reconfiguration. 6643117610Sdes 6644141098SdesAC_DEFUN([AM_AUX_DIR_EXPAND], 6645141098Sdes[dnl Rely on autoconf to set up CDPATH properly. 6646141098SdesAC_PREREQ([2.50])dnl 6647117610Sdes# expand $ac_aux_dir to an absolute path 6648141098Sdesam_aux_dir=`cd $ac_aux_dir && pwd` 6649117610Sdes]) 6650117610Sdes 6651174832Sdes# AM_CONDITIONAL -*- Autoconf -*- 6652117610Sdes 6653174832Sdes# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 6654174832Sdes# Free Software Foundation, Inc. 6655174832Sdes# 6656174832Sdes# This file is free software; the Free Software Foundation 6657174832Sdes# gives unlimited permission to copy and/or distribute it, 6658174832Sdes# with or without modifications, as long as this notice is preserved. 6659117610Sdes 6660174832Sdes# serial 7 6661117610Sdes 6662141098Sdes# AM_CONDITIONAL(NAME, SHELL-CONDITION) 6663141098Sdes# ------------------------------------- 6664141098Sdes# Define a conditional. 6665141098SdesAC_DEFUN([AM_CONDITIONAL], 6666141098Sdes[AC_PREREQ(2.52)dnl 6667141098Sdes ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 6668141098Sdes [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 6669141098SdesAC_SUBST([$1_TRUE]) 6670141098SdesAC_SUBST([$1_FALSE]) 6671141098Sdesif $2; then 6672141098Sdes $1_TRUE= 6673141098Sdes $1_FALSE='#' 6674141098Sdeselse 6675141098Sdes $1_TRUE='#' 6676141098Sdes $1_FALSE= 6677141098Sdesfi 6678141098SdesAC_CONFIG_COMMANDS_PRE( 6679141098Sdes[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 6680174832Sdes AC_MSG_ERROR([[conditional "$1" was never defined. 6681174832SdesUsually this means the macro was only invoked conditionally.]]) 6682141098Sdesfi])]) 6683141098Sdes 6684141098Sdes 6685174832Sdes# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 6686141098Sdes# Free Software Foundation, Inc. 6687174832Sdes# 6688174832Sdes# This file is free software; the Free Software Foundation 6689174832Sdes# gives unlimited permission to copy and/or distribute it, 6690174832Sdes# with or without modifications, as long as this notice is preserved. 6691141098Sdes 6692174832Sdes# serial 8 6693141098Sdes 6694117610Sdes# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 6695117610Sdes# written in clear, in which case automake, when reading aclocal.m4, 6696117610Sdes# will think it sees a *use*, and therefore will trigger all it's 6697117610Sdes# C support machinery. Also note that it means that autoscan, seeing 6698117610Sdes# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 6699117610Sdes 6700117610Sdes 6701117610Sdes# _AM_DEPENDENCIES(NAME) 6702141098Sdes# ---------------------- 6703117610Sdes# See how the compiler implements dependency checking. 6704141098Sdes# NAME is "CC", "CXX", "GCJ", or "OBJC". 6705117610Sdes# We try a few techniques and use that to set a single cache variable. 6706117610Sdes# 6707117610Sdes# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 6708117610Sdes# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 6709117610Sdes# dependency, and given that the user is not expected to run this macro, 6710117610Sdes# just rely on AC_PROG_CC. 6711117610SdesAC_DEFUN([_AM_DEPENDENCIES], 6712117610Sdes[AC_REQUIRE([AM_SET_DEPDIR])dnl 6713117610SdesAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 6714117610SdesAC_REQUIRE([AM_MAKE_INCLUDE])dnl 6715117610SdesAC_REQUIRE([AM_DEP_TRACK])dnl 6716117610Sdes 6717117610Sdesifelse([$1], CC, [depcc="$CC" am_compiler_list=], 6718117610Sdes [$1], CXX, [depcc="$CXX" am_compiler_list=], 6719141098Sdes [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 6720117610Sdes [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 6721117610Sdes [depcc="$$1" am_compiler_list=]) 6722117610Sdes 6723117610SdesAC_CACHE_CHECK([dependency style of $depcc], 6724117610Sdes [am_cv_$1_dependencies_compiler_type], 6725117610Sdes[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 6726117610Sdes # We make a subdir and do the tests there. Otherwise we can end up 6727117610Sdes # making bogus files that we don't know about and never remove. For 6728117610Sdes # instance it was reported that on HP-UX the gcc test will end up 6729117610Sdes # making a dummy file named `D' -- because `-MD' means `put the output 6730117610Sdes # in D'. 6731117610Sdes mkdir conftest.dir 6732117610Sdes # Copy depcomp to subdir because otherwise we won't find it if we're 6733117610Sdes # using a relative directory. 6734117610Sdes cp "$am_depcomp" conftest.dir 6735117610Sdes cd conftest.dir 6736141098Sdes # We will build objects and dependencies in a subdirectory because 6737141098Sdes # it helps to detect inapplicable dependency modes. For instance 6738141098Sdes # both Tru64's cc and ICC support -MD to output dependencies as a 6739141098Sdes # side effect of compilation, but ICC will put the dependencies in 6740141098Sdes # the current directory while Tru64 will put them in the object 6741141098Sdes # directory. 6742141098Sdes mkdir sub 6743117610Sdes 6744117610Sdes am_cv_$1_dependencies_compiler_type=none 6745117610Sdes if test "$am_compiler_list" = ""; then 6746117610Sdes am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 6747117610Sdes fi 6748117610Sdes for depmode in $am_compiler_list; do 6749141098Sdes # Setup a source with many dependencies, because some compilers 6750141098Sdes # like to wrap large dependency lists on column 80 (with \), and 6751141098Sdes # we should not choose a depcomp mode which is confused by this. 6752141098Sdes # 6753117610Sdes # We need to recreate these files for each test, as the compiler may 6754117610Sdes # overwrite some of them when testing with obscure command lines. 6755117610Sdes # This happens at least with the AIX C compiler. 6756141098Sdes : > sub/conftest.c 6757141098Sdes for i in 1 2 3 4 5 6; do 6758141098Sdes echo '#include "conftst'$i'.h"' >> sub/conftest.c 6759141098Sdes # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 6760141098Sdes # Solaris 8's {/usr,}/bin/sh. 6761141098Sdes touch sub/conftst$i.h 6762141098Sdes done 6763141098Sdes echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 6764117610Sdes 6765117610Sdes case $depmode in 6766117610Sdes nosideeffect) 6767117610Sdes # after this tag, mechanisms are not by side-effect, so they'll 6768117610Sdes # only be used when explicitly requested 6769117610Sdes if test "x$enable_dependency_tracking" = xyes; then 6770117610Sdes continue 6771117610Sdes else 6772117610Sdes break 6773117610Sdes fi 6774117610Sdes ;; 6775117610Sdes none) break ;; 6776117610Sdes esac 6777117610Sdes # We check with `-c' and `-o' for the sake of the "dashmstdout" 6778117610Sdes # mode. It turns out that the SunPro C++ compiler does not properly 6779117610Sdes # handle `-M -o', and we need to detect this. 6780117610Sdes if depmode=$depmode \ 6781141098Sdes source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 6782141098Sdes depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 6783141098Sdes $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 6784141098Sdes >/dev/null 2>conftest.err && 6785141098Sdes grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 6786141098Sdes grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 6787117610Sdes ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 6788141098Sdes # icc doesn't choke on unknown options, it will just issue warnings 6789141098Sdes # or remarks (even with -Werror). So we grep stderr for any message 6790141098Sdes # that says an option was ignored or not supported. 6791141098Sdes # When given -MP, icc 7.0 and 7.1 complain thusly: 6792141098Sdes # icc: Command line warning: ignoring option '-M'; no argument required 6793141098Sdes # The diagnosis changed in icc 8.0: 6794141098Sdes # icc: Command line remark: option '-MP' not supported 6795141098Sdes if (grep 'ignoring option' conftest.err || 6796141098Sdes grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 6797141098Sdes am_cv_$1_dependencies_compiler_type=$depmode 6798141098Sdes break 6799141098Sdes fi 6800117610Sdes fi 6801117610Sdes done 6802117610Sdes 6803117610Sdes cd .. 6804117610Sdes rm -rf conftest.dir 6805117610Sdeselse 6806117610Sdes am_cv_$1_dependencies_compiler_type=none 6807117610Sdesfi 6808117610Sdes]) 6809141098SdesAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 6810141098SdesAM_CONDITIONAL([am__fastdep$1], [ 6811141098Sdes test "x$enable_dependency_tracking" != xno \ 6812141098Sdes && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 6813117610Sdes]) 6814117610Sdes 6815117610Sdes 6816117610Sdes# AM_SET_DEPDIR 6817117610Sdes# ------------- 6818117610Sdes# Choose a directory name for dependency files. 6819117610Sdes# This macro is AC_REQUIREd in _AM_DEPENDENCIES 6820117610SdesAC_DEFUN([AM_SET_DEPDIR], 6821141098Sdes[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 6822141098SdesAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 6823117610Sdes]) 6824117610Sdes 6825117610Sdes 6826117610Sdes# AM_DEP_TRACK 6827117610Sdes# ------------ 6828117610SdesAC_DEFUN([AM_DEP_TRACK], 6829117610Sdes[AC_ARG_ENABLE(dependency-tracking, 6830141098Sdes[ --disable-dependency-tracking speeds up one-time build 6831141098Sdes --enable-dependency-tracking do not reject slow dependency extractors]) 6832117610Sdesif test "x$enable_dependency_tracking" != xno; then 6833117610Sdes am_depcomp="$ac_aux_dir/depcomp" 6834117610Sdes AMDEPBACKSLASH='\' 6835117610Sdesfi 6836117610SdesAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 6837141098SdesAC_SUBST([AMDEPBACKSLASH]) 6838117610Sdes]) 6839117610Sdes 6840174832Sdes# Generate code to set up dependency tracking. -*- Autoconf -*- 6841117610Sdes 6842174832Sdes# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 6843174832Sdes# Free Software Foundation, Inc. 6844174832Sdes# 6845174832Sdes# This file is free software; the Free Software Foundation 6846174832Sdes# gives unlimited permission to copy and/or distribute it, 6847174832Sdes# with or without modifications, as long as this notice is preserved. 6848141098Sdes 6849174832Sdes#serial 3 6850141098Sdes 6851141098Sdes# _AM_OUTPUT_DEPENDENCY_COMMANDS 6852141098Sdes# ------------------------------ 6853141098SdesAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 6854141098Sdes[for mf in $CONFIG_FILES; do 6855141098Sdes # Strip MF so we end up with the name of the file. 6856141098Sdes mf=`echo "$mf" | sed -e 's/:.*$//'` 6857141098Sdes # Check whether this is an Automake generated Makefile or not. 6858141098Sdes # We used to match only the files named `Makefile.in', but 6859141098Sdes # some people rename them; so instead we look at the file content. 6860141098Sdes # Grep'ing the first line is not enough: some people post-process 6861141098Sdes # each Makefile.in and add a new line on top of each file to say so. 6862141098Sdes # So let's grep whole file. 6863141098Sdes if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 6864141098Sdes dirpart=`AS_DIRNAME("$mf")` 6865141098Sdes else 6866141098Sdes continue 6867141098Sdes fi 6868174832Sdes # Extract the definition of DEPDIR, am__include, and am__quote 6869174832Sdes # from the Makefile without running `make'. 6870141098Sdes DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 6871117610Sdes test -z "$DEPDIR" && continue 6872174832Sdes am__include=`sed -n 's/^am__include = //p' < "$mf"` 6873174832Sdes test -z "am__include" && continue 6874174832Sdes am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 6875117610Sdes # When using ansi2knr, U may be empty or an underscore; expand it 6876141098Sdes U=`sed -n 's/^U = //p' < "$mf"` 6877174832Sdes # Find all dependency output files, they are included files with 6878174832Sdes # $(DEPDIR) in their names. We invoke sed twice because it is the 6879174832Sdes # simplest approach to changing $(DEPDIR) to its actual value in the 6880174832Sdes # expansion. 6881174832Sdes for file in `sed -n " 6882174832Sdes s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 6883117610Sdes sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 6884117610Sdes # Make sure the directory exists. 6885117610Sdes test -f "$dirpart/$file" && continue 6886141098Sdes fdir=`AS_DIRNAME(["$file"])` 6887141098Sdes AS_MKDIR_P([$dirpart/$fdir]) 6888117610Sdes # echo "creating $dirpart/$file" 6889117610Sdes echo '# dummy' > "$dirpart/$file" 6890117610Sdes done 6891117610Sdesdone 6892141098Sdes])# _AM_OUTPUT_DEPENDENCY_COMMANDS 6893117610Sdes 6894141098Sdes 6895141098Sdes# AM_OUTPUT_DEPENDENCY_COMMANDS 6896141098Sdes# ----------------------------- 6897141098Sdes# This macro should only be invoked once -- use via AC_REQUIRE. 6898141098Sdes# 6899141098Sdes# This code is only required when automatic dependency tracking 6900141098Sdes# is enabled. FIXME. This creates each `.P' file that we will 6901141098Sdes# need in order to bootstrap the dependency handling code. 6902141098SdesAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 6903141098Sdes[AC_CONFIG_COMMANDS([depfiles], 6904141098Sdes [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 6905141098Sdes [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 6906141098Sdes]) 6907141098Sdes 6908174832Sdes# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 6909174832Sdes# Free Software Foundation, Inc. 6910174832Sdes# 6911174832Sdes# This file is free software; the Free Software Foundation 6912174832Sdes# gives unlimited permission to copy and/or distribute it, 6913174832Sdes# with or without modifications, as long as this notice is preserved. 6914141098Sdes 6915174832Sdes# serial 8 6916141098Sdes 6917141098Sdes# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 6918141098SdesAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 6919141098Sdes 6920174832Sdes# Do all the work for Automake. -*- Autoconf -*- 6921141098Sdes 6922174832Sdes# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 6923141098Sdes# Free Software Foundation, Inc. 6924174832Sdes# 6925174832Sdes# This file is free software; the Free Software Foundation 6926174832Sdes# gives unlimited permission to copy and/or distribute it, 6927174832Sdes# with or without modifications, as long as this notice is preserved. 6928141098Sdes 6929174832Sdes# serial 12 6930141098Sdes 6931174832Sdes# This macro actually does too much. Some checks are only needed if 6932174832Sdes# your package does certain things. But this isn't really a big deal. 6933141098Sdes 6934141098Sdes# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 6935141098Sdes# AM_INIT_AUTOMAKE([OPTIONS]) 6936141098Sdes# ----------------------------------------------- 6937141098Sdes# The call with PACKAGE and VERSION arguments is the old style 6938141098Sdes# call (pre autoconf-2.50), which is being phased out. PACKAGE 6939141098Sdes# and VERSION should now be passed to AC_INIT and removed from 6940141098Sdes# the call to AM_INIT_AUTOMAKE. 6941141098Sdes# We support both call styles for the transition. After 6942141098Sdes# the next Automake release, Autoconf can make the AC_INIT 6943141098Sdes# arguments mandatory, and then we can depend on a new Autoconf 6944141098Sdes# release and drop the old call support. 6945141098SdesAC_DEFUN([AM_INIT_AUTOMAKE], 6946141098Sdes[AC_PREREQ([2.58])dnl 6947141098Sdesdnl Autoconf wants to disallow AM_ names. We explicitly allow 6948141098Sdesdnl the ones we care about. 6949141098Sdesm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 6950141098SdesAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 6951141098SdesAC_REQUIRE([AC_PROG_INSTALL])dnl 6952141098Sdes# test to see if srcdir already configured 6953141098Sdesif test "`cd $srcdir && pwd`" != "`pwd`" && 6954141098Sdes test -f $srcdir/config.status; then 6955141098Sdes AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 6956141098Sdesfi 6957141098Sdes 6958141098Sdes# test whether we have cygpath 6959141098Sdesif test -z "$CYGPATH_W"; then 6960141098Sdes if (cygpath --version) >/dev/null 2>/dev/null; then 6961141098Sdes CYGPATH_W='cygpath -w' 6962141098Sdes else 6963141098Sdes CYGPATH_W=echo 6964141098Sdes fi 6965141098Sdesfi 6966141098SdesAC_SUBST([CYGPATH_W]) 6967141098Sdes 6968141098Sdes# Define the identity of the package. 6969141098Sdesdnl Distinguish between old-style and new-style calls. 6970141098Sdesm4_ifval([$2], 6971141098Sdes[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 6972141098Sdes AC_SUBST([PACKAGE], [$1])dnl 6973141098Sdes AC_SUBST([VERSION], [$2])], 6974141098Sdes[_AM_SET_OPTIONS([$1])dnl 6975141098Sdes AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 6976141098Sdes AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 6977141098Sdes 6978141098Sdes_AM_IF_OPTION([no-define],, 6979141098Sdes[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 6980141098Sdes AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 6981141098Sdes 6982141098Sdes# Some tools Automake needs. 6983141098SdesAC_REQUIRE([AM_SANITY_CHECK])dnl 6984141098SdesAC_REQUIRE([AC_ARG_PROGRAM])dnl 6985141098SdesAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 6986141098SdesAM_MISSING_PROG(AUTOCONF, autoconf) 6987141098SdesAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 6988141098SdesAM_MISSING_PROG(AUTOHEADER, autoheader) 6989141098SdesAM_MISSING_PROG(MAKEINFO, makeinfo) 6990141098SdesAM_PROG_INSTALL_SH 6991141098SdesAM_PROG_INSTALL_STRIP 6992141098SdesAC_REQUIRE([AM_PROG_MKDIR_P])dnl 6993141098Sdes# We need awk for the "check" target. The system "awk" is bad on 6994141098Sdes# some platforms. 6995141098SdesAC_REQUIRE([AC_PROG_AWK])dnl 6996141098SdesAC_REQUIRE([AC_PROG_MAKE_SET])dnl 6997141098SdesAC_REQUIRE([AM_SET_LEADING_DOT])dnl 6998174832Sdes_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 6999174832Sdes [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 7000174832Sdes [_AM_PROG_TAR([v7])])]) 7001141098Sdes_AM_IF_OPTION([no-dependencies],, 7002141098Sdes[AC_PROVIDE_IFELSE([AC_PROG_CC], 7003141098Sdes [_AM_DEPENDENCIES(CC)], 7004141098Sdes [define([AC_PROG_CC], 7005141098Sdes defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 7006141098SdesAC_PROVIDE_IFELSE([AC_PROG_CXX], 7007141098Sdes [_AM_DEPENDENCIES(CXX)], 7008141098Sdes [define([AC_PROG_CXX], 7009141098Sdes defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 7010141098Sdes]) 7011141098Sdes]) 7012141098Sdes 7013141098Sdes 7014141098Sdes# When config.status generates a header, we must update the stamp-h file. 7015141098Sdes# This file resides in the same directory as the config header 7016141098Sdes# that is generated. The stamp files are numbered to have different names. 7017141098Sdes 7018141098Sdes# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 7019141098Sdes# loop where config.status creates the headers, so we can generate 7020141098Sdes# our stamp files there. 7021141098SdesAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 7022141098Sdes[# Compute $1's index in $config_headers. 7023141098Sdes_am_stamp_count=1 7024141098Sdesfor _am_header in $config_headers :; do 7025141098Sdes case $_am_header in 7026141098Sdes $1 | $1:* ) 7027141098Sdes break ;; 7028141098Sdes * ) 7029141098Sdes _am_stamp_count=`expr $_am_stamp_count + 1` ;; 7030141098Sdes esac 7031141098Sdesdone 7032141098Sdesecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 7033141098Sdes 7034174832Sdes# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7035174832Sdes# 7036174832Sdes# This file is free software; the Free Software Foundation 7037174832Sdes# gives unlimited permission to copy and/or distribute it, 7038174832Sdes# with or without modifications, as long as this notice is preserved. 7039174832Sdes 7040141098Sdes# AM_PROG_INSTALL_SH 7041141098Sdes# ------------------ 7042141098Sdes# Define $install_sh. 7043141098SdesAC_DEFUN([AM_PROG_INSTALL_SH], 7044141098Sdes[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7045141098Sdesinstall_sh=${install_sh-"$am_aux_dir/install-sh"} 7046141098SdesAC_SUBST(install_sh)]) 7047141098Sdes 7048174832Sdes# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 7049174832Sdes# 7050174832Sdes# This file is free software; the Free Software Foundation 7051174832Sdes# gives unlimited permission to copy and/or distribute it, 7052174832Sdes# with or without modifications, as long as this notice is preserved. 7053141098Sdes 7054174832Sdes# serial 2 7055141098Sdes 7056141098Sdes# Check whether the underlying file-system supports filenames 7057141098Sdes# with a leading dot. For instance MS-DOS doesn't. 7058141098SdesAC_DEFUN([AM_SET_LEADING_DOT], 7059141098Sdes[rm -rf .tst 2>/dev/null 7060141098Sdesmkdir .tst 2>/dev/null 7061141098Sdesif test -d .tst; then 7062141098Sdes am__leading_dot=. 7063141098Sdeselse 7064141098Sdes am__leading_dot=_ 7065141098Sdesfi 7066141098Sdesrmdir .tst 2>/dev/null 7067141098SdesAC_SUBST([am__leading_dot])]) 7068141098Sdes 7069174832Sdes# Check to see how 'make' treats includes. -*- Autoconf -*- 7070141098Sdes 7071174832Sdes# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 7072174832Sdes# 7073174832Sdes# This file is free software; the Free Software Foundation 7074174832Sdes# gives unlimited permission to copy and/or distribute it, 7075174832Sdes# with or without modifications, as long as this notice is preserved. 7076141098Sdes 7077174832Sdes# serial 3 7078141098Sdes 7079117610Sdes# AM_MAKE_INCLUDE() 7080117610Sdes# ----------------- 7081117610Sdes# Check to see how make treats includes. 7082117610SdesAC_DEFUN([AM_MAKE_INCLUDE], 7083117610Sdes[am_make=${MAKE-make} 7084117610Sdescat > confinc << 'END' 7085141098Sdesam__doit: 7086117610Sdes @echo done 7087141098Sdes.PHONY: am__doit 7088117610SdesEND 7089117610Sdes# If we don't find an include directive, just comment out the code. 7090117610SdesAC_MSG_CHECKING([for style of include used by $am_make]) 7091141098Sdesam__include="#" 7092117610Sdesam__quote= 7093117610Sdes_am_result=none 7094117610Sdes# First try GNU make style include. 7095117610Sdesecho "include confinc" > confmf 7096117610Sdes# We grep out `Entering directory' and `Leaving directory' 7097117610Sdes# messages which can occur if `w' ends up in MAKEFLAGS. 7098117610Sdes# In particular we don't look at `^make:' because GNU make might 7099117610Sdes# be invoked under some other name (usually "gmake"), in which 7100117610Sdes# case it prints its new name instead of `make'. 7101141098Sdesif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 7102117610Sdes am__include=include 7103117610Sdes am__quote= 7104117610Sdes _am_result=GNU 7105117610Sdesfi 7106117610Sdes# Now try BSD make style include. 7107117610Sdesif test "$am__include" = "#"; then 7108117610Sdes echo '.include "confinc"' > confmf 7109117610Sdes if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 7110117610Sdes am__include=.include 7111141098Sdes am__quote="\"" 7112117610Sdes _am_result=BSD 7113117610Sdes fi 7114117610Sdesfi 7115141098SdesAC_SUBST([am__include]) 7116141098SdesAC_SUBST([am__quote]) 7117141098SdesAC_MSG_RESULT([$_am_result]) 7118117610Sdesrm -f confinc confmf 7119117610Sdes]) 7120117610Sdes 7121174832Sdes# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 7122141098Sdes 7123174832Sdes# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 7124174832Sdes# Free Software Foundation, Inc. 7125174832Sdes# 7126174832Sdes# This file is free software; the Free Software Foundation 7127174832Sdes# gives unlimited permission to copy and/or distribute it, 7128174832Sdes# with or without modifications, as long as this notice is preserved. 7129141098Sdes 7130174832Sdes# serial 4 7131141098Sdes 7132141098Sdes# AM_MISSING_PROG(NAME, PROGRAM) 7133141098Sdes# ------------------------------ 7134141098SdesAC_DEFUN([AM_MISSING_PROG], 7135141098Sdes[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7136141098Sdes$1=${$1-"${am_missing_run}$2"} 7137141098SdesAC_SUBST($1)]) 7138141098Sdes 7139141098Sdes 7140141098Sdes# AM_MISSING_HAS_RUN 7141141098Sdes# ------------------ 7142141098Sdes# Define MISSING if not defined so far and test if it supports --run. 7143141098Sdes# If it does, set am_missing_run to use it, otherwise, to nothing. 7144141098SdesAC_DEFUN([AM_MISSING_HAS_RUN], 7145141098Sdes[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7146141098Sdestest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 7147141098Sdes# Use eval to expand $SHELL 7148141098Sdesif eval "$MISSING --run true"; then 7149141098Sdes am_missing_run="$MISSING --run " 7150141098Sdeselse 7151141098Sdes am_missing_run= 7152141098Sdes AC_MSG_WARN([`missing' script is too old or missing]) 7153141098Sdesfi 7154141098Sdes]) 7155141098Sdes 7156174832Sdes# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 7157174832Sdes# 7158174832Sdes# This file is free software; the Free Software Foundation 7159174832Sdes# gives unlimited permission to copy and/or distribute it, 7160174832Sdes# with or without modifications, as long as this notice is preserved. 7161174832Sdes 7162141098Sdes# AM_PROG_MKDIR_P 7163141098Sdes# --------------- 7164141098Sdes# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 7165174832Sdes# 7166141098Sdes# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 7167141098Sdes# created by `make install' are always world readable, even if the 7168141098Sdes# installer happens to have an overly restrictive umask (e.g. 077). 7169141098Sdes# This was a mistake. There are at least two reasons why we must not 7170141098Sdes# use `-m 0755': 7171141098Sdes# - it causes special bits like SGID to be ignored, 7172141098Sdes# - it may be too restrictive (some setups expect 775 directories). 7173117610Sdes# 7174141098Sdes# Do not use -m 0755 and let people choose whatever they expect by 7175141098Sdes# setting umask. 7176141098Sdes# 7177141098Sdes# We cannot accept any implementation of `mkdir' that recognizes `-p'. 7178141098Sdes# Some implementations (such as Solaris 8's) are not thread-safe: if a 7179141098Sdes# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 7180141098Sdes# concurrently, both version can detect that a/ is missing, but only 7181141098Sdes# one can create it and the other will error out. Consequently we 7182141098Sdes# restrict ourselves to GNU make (using the --version option ensures 7183141098Sdes# this.) 7184141098SdesAC_DEFUN([AM_PROG_MKDIR_P], 7185141098Sdes[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 7186174832Sdes # We used to keeping the `.' as first argument, in order to 7187174832Sdes # allow $(mkdir_p) to be used without argument. As in 7188141098Sdes # $(mkdir_p) $(somedir) 7189174832Sdes # where $(somedir) is conditionally defined. However this is wrong 7190174832Sdes # for two reasons: 7191174832Sdes # 1. if the package is installed by a user who cannot write `.' 7192174832Sdes # make install will fail, 7193174832Sdes # 2. the above comment should most certainly read 7194174832Sdes # $(mkdir_p) $(DESTDIR)$(somedir) 7195174832Sdes # so it does not work when $(somedir) is undefined and 7196174832Sdes # $(DESTDIR) is not. 7197174832Sdes # To support the latter case, we have to write 7198174832Sdes # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 7199174832Sdes # so the `.' trick is pointless. 7200174832Sdes mkdir_p='mkdir -p --' 7201117610Sdeselse 7202141098Sdes # On NextStep and OpenStep, the `mkdir' command does not 7203141098Sdes # recognize any option. It will interpret all options as 7204141098Sdes # directories to create, and then abort because `.' already 7205141098Sdes # exists. 7206141098Sdes for d in ./-p ./--version; 7207141098Sdes do 7208141098Sdes test -d $d && rmdir $d 7209141098Sdes done 7210141098Sdes # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 7211141098Sdes if test -f "$ac_aux_dir/mkinstalldirs"; then 7212141098Sdes mkdir_p='$(mkinstalldirs)' 7213141098Sdes else 7214141098Sdes mkdir_p='$(install_sh) -d' 7215141098Sdes fi 7216141098Sdesfi 7217141098SdesAC_SUBST([mkdir_p])]) 7218117610Sdes 7219174832Sdes# Helper functions for option handling. -*- Autoconf -*- 7220141098Sdes 7221174832Sdes# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 7222174832Sdes# 7223174832Sdes# This file is free software; the Free Software Foundation 7224174832Sdes# gives unlimited permission to copy and/or distribute it, 7225174832Sdes# with or without modifications, as long as this notice is preserved. 7226141098Sdes 7227174832Sdes# serial 3 7228141098Sdes 7229141098Sdes# _AM_MANGLE_OPTION(NAME) 7230141098Sdes# ----------------------- 7231141098SdesAC_DEFUN([_AM_MANGLE_OPTION], 7232141098Sdes[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7233141098Sdes 7234141098Sdes# _AM_SET_OPTION(NAME) 7235141098Sdes# ------------------------------ 7236141098Sdes# Set option NAME. Presently that only means defining a flag for this option. 7237141098SdesAC_DEFUN([_AM_SET_OPTION], 7238141098Sdes[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7239141098Sdes 7240141098Sdes# _AM_SET_OPTIONS(OPTIONS) 7241141098Sdes# ---------------------------------- 7242141098Sdes# OPTIONS is a space-separated list of Automake options. 7243141098SdesAC_DEFUN([_AM_SET_OPTIONS], 7244141098Sdes[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7245141098Sdes 7246141098Sdes# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7247141098Sdes# ------------------------------------------- 7248141098Sdes# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7249141098SdesAC_DEFUN([_AM_IF_OPTION], 7250141098Sdes[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7251141098Sdes 7252174832Sdes# Check to make sure that the build environment is sane. -*- Autoconf -*- 7253174832Sdes 7254174832Sdes# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 7255174832Sdes# Free Software Foundation, Inc. 7256141098Sdes# 7257174832Sdes# This file is free software; the Free Software Foundation 7258174832Sdes# gives unlimited permission to copy and/or distribute it, 7259174832Sdes# with or without modifications, as long as this notice is preserved. 7260141098Sdes 7261174832Sdes# serial 4 7262141098Sdes 7263141098Sdes# AM_SANITY_CHECK 7264141098Sdes# --------------- 7265141098SdesAC_DEFUN([AM_SANITY_CHECK], 7266141098Sdes[AC_MSG_CHECKING([whether build environment is sane]) 7267141098Sdes# Just in case 7268141098Sdessleep 1 7269141098Sdesecho timestamp > conftest.file 7270141098Sdes# Do `set' in a subshell so we don't clobber the current shell's 7271141098Sdes# arguments. Must try -L first in case configure is actually a 7272141098Sdes# symlink; some systems play weird games with the mod time of symlinks 7273141098Sdes# (eg FreeBSD returns the mod time of the symlink's containing 7274141098Sdes# directory). 7275141098Sdesif ( 7276141098Sdes set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 7277141098Sdes if test "$[*]" = "X"; then 7278141098Sdes # -L didn't work. 7279141098Sdes set X `ls -t $srcdir/configure conftest.file` 7280141098Sdes fi 7281141098Sdes rm -f conftest.file 7282141098Sdes if test "$[*]" != "X $srcdir/configure conftest.file" \ 7283141098Sdes && test "$[*]" != "X conftest.file $srcdir/configure"; then 7284141098Sdes 7285141098Sdes # If neither matched, then we have a broken ls. This can happen 7286141098Sdes # if, for instance, CONFIG_SHELL is bash and it inherits a 7287141098Sdes # broken ls alias from the environment. This has actually 7288141098Sdes # happened. Such a system could not be considered "sane". 7289141098Sdes AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 7290141098Sdesalias in your environment]) 7291141098Sdes fi 7292141098Sdes 7293141098Sdes test "$[2]" = conftest.file 7294141098Sdes ) 7295141098Sdesthen 7296141098Sdes # Ok. 7297141098Sdes : 7298141098Sdeselse 7299141098Sdes AC_MSG_ERROR([newly created file is older than distributed files! 7300141098SdesCheck your system clock]) 7301141098Sdesfi 7302141098SdesAC_MSG_RESULT(yes)]) 7303141098Sdes 7304174832Sdes# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7305174832Sdes# 7306174832Sdes# This file is free software; the Free Software Foundation 7307174832Sdes# gives unlimited permission to copy and/or distribute it, 7308174832Sdes# with or without modifications, as long as this notice is preserved. 7309174832Sdes 7310141098Sdes# AM_PROG_INSTALL_STRIP 7311174832Sdes# --------------------- 7312141098Sdes# One issue with vendor `install' (even GNU) is that you can't 7313141098Sdes# specify the program used to strip binaries. This is especially 7314141098Sdes# annoying in cross-compiling environments, where the build's strip 7315141098Sdes# is unlikely to handle the host's binaries. 7316141098Sdes# Fortunately install-sh will honor a STRIPPROG variable, so we 7317141098Sdes# always use install-sh in `make install-strip', and initialize 7318141098Sdes# STRIPPROG with the value of the STRIP variable (set by the user). 7319141098SdesAC_DEFUN([AM_PROG_INSTALL_STRIP], 7320141098Sdes[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 7321141098Sdes# Installed binaries are usually stripped using `strip' when the user 7322141098Sdes# run `make install-strip'. However `strip' might not be the right 7323141098Sdes# tool to use in cross-compilation environments, therefore Automake 7324141098Sdes# will honor the `STRIP' environment variable to overrule this program. 7325141098Sdesdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 7326141098Sdesif test "$cross_compiling" != no; then 7327141098Sdes AC_CHECK_TOOL([STRIP], [strip], :) 7328141098Sdesfi 7329141098SdesINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 7330141098SdesAC_SUBST([INSTALL_STRIP_PROGRAM])]) 7331141098Sdes 7332174832Sdes# Check how to create a tarball. -*- Autoconf -*- 7333174832Sdes 7334174832Sdes# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 7335174832Sdes# 7336174832Sdes# This file is free software; the Free Software Foundation 7337174832Sdes# gives unlimited permission to copy and/or distribute it, 7338174832Sdes# with or without modifications, as long as this notice is preserved. 7339174832Sdes 7340174832Sdes# serial 2 7341174832Sdes 7342174832Sdes# _AM_PROG_TAR(FORMAT) 7343174832Sdes# -------------------- 7344174832Sdes# Check how to create a tarball in format FORMAT. 7345174832Sdes# FORMAT should be one of `v7', `ustar', or `pax'. 7346174832Sdes# 7347174832Sdes# Substitute a variable $(am__tar) that is a command 7348174832Sdes# writing to stdout a FORMAT-tarball containing the directory 7349174832Sdes# $tardir. 7350174832Sdes# tardir=directory && $(am__tar) > result.tar 7351174832Sdes# 7352174832Sdes# Substitute a variable $(am__untar) that extract such 7353174832Sdes# a tarball read from stdin. 7354174832Sdes# $(am__untar) < result.tar 7355174832SdesAC_DEFUN([_AM_PROG_TAR], 7356174832Sdes[# Always define AMTAR for backward compatibility. 7357174832SdesAM_MISSING_PROG([AMTAR], [tar]) 7358174832Sdesm4_if([$1], [v7], 7359174832Sdes [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 7360174832Sdes [m4_case([$1], [ustar],, [pax],, 7361174832Sdes [m4_fatal([Unknown tar format])]) 7362174832SdesAC_MSG_CHECKING([how to create a $1 tar archive]) 7363174832Sdes# Loop over all known methods to create a tar archive until one works. 7364174832Sdes_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 7365174832Sdes_am_tools=${am_cv_prog_tar_$1-$_am_tools} 7366174832Sdes# Do not fold the above two line into one, because Tru64 sh and 7367174832Sdes# Solaris sh will not grok spaces in the rhs of `-'. 7368174832Sdesfor _am_tool in $_am_tools 7369174832Sdesdo 7370174832Sdes case $_am_tool in 7371174832Sdes gnutar) 7372174832Sdes for _am_tar in tar gnutar gtar; 7373174832Sdes do 7374174832Sdes AM_RUN_LOG([$_am_tar --version]) && break 7375174832Sdes done 7376174832Sdes am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 7377174832Sdes am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 7378174832Sdes am__untar="$_am_tar -xf -" 7379174832Sdes ;; 7380174832Sdes plaintar) 7381174832Sdes # Must skip GNU tar: if it does not support --format= it doesn't create 7382174832Sdes # ustar tarball either. 7383174832Sdes (tar --version) >/dev/null 2>&1 && continue 7384174832Sdes am__tar='tar chf - "$$tardir"' 7385174832Sdes am__tar_='tar chf - "$tardir"' 7386174832Sdes am__untar='tar xf -' 7387174832Sdes ;; 7388174832Sdes pax) 7389174832Sdes am__tar='pax -L -x $1 -w "$$tardir"' 7390174832Sdes am__tar_='pax -L -x $1 -w "$tardir"' 7391174832Sdes am__untar='pax -r' 7392174832Sdes ;; 7393174832Sdes cpio) 7394174832Sdes am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 7395174832Sdes am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 7396174832Sdes am__untar='cpio -i -H $1 -d' 7397174832Sdes ;; 7398174832Sdes none) 7399174832Sdes am__tar=false 7400174832Sdes am__tar_=false 7401174832Sdes am__untar=false 7402174832Sdes ;; 7403174832Sdes esac 7404174832Sdes 7405174832Sdes # If the value was cached, stop now. We just wanted to have am__tar 7406174832Sdes # and am__untar set. 7407174832Sdes test -n "${am_cv_prog_tar_$1}" && break 7408174832Sdes 7409174832Sdes # tar/untar a dummy directory, and stop if the command works 7410174832Sdes rm -rf conftest.dir 7411174832Sdes mkdir conftest.dir 7412174832Sdes echo GrepMe > conftest.dir/file 7413174832Sdes AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 7414174832Sdes rm -rf conftest.dir 7415174832Sdes if test -s conftest.tar; then 7416174832Sdes AM_RUN_LOG([$am__untar <conftest.tar]) 7417174832Sdes grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 7418174832Sdes fi 7419174832Sdesdone 7420174832Sdesrm -rf conftest.dir 7421174832Sdes 7422174832SdesAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 7423174832SdesAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 7424174832SdesAC_SUBST([am__tar]) 7425174832SdesAC_SUBST([am__untar]) 7426174832Sdes]) # _AM_PROG_TAR 7427174832Sdes 7428