aclocal.m4 revision c35d236e
1c35d236eSmrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*- 2c35d236eSmrg 3c35d236eSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4c35d236eSmrg# 2005 Free Software Foundation, Inc. 5c35d236eSmrg# This file is free software; the Free Software Foundation 6c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8c35d236eSmrg 9c35d236eSmrg# This program is distributed in the hope that it will be useful, 10c35d236eSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11c35d236eSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12c35d236eSmrg# PARTICULAR PURPOSE. 13c35d236eSmrg 14c35d236eSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 15c35d236eSmrg 16c35d236eSmrg# serial 48 AC_PROG_LIBTOOL 17c35d236eSmrg 18c35d236eSmrg 19c35d236eSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 20c35d236eSmrg# ----------------------------------------------------------- 21c35d236eSmrg# If this macro is not defined by Autoconf, define it here. 22c35d236eSmrgm4_ifdef([AC_PROVIDE_IFELSE], 23c35d236eSmrg [], 24c35d236eSmrg [m4_define([AC_PROVIDE_IFELSE], 25c35d236eSmrg [m4_ifdef([AC_PROVIDE_$1], 26c35d236eSmrg [$2], [$3])])]) 27c35d236eSmrg 28c35d236eSmrg 29c35d236eSmrg# AC_PROG_LIBTOOL 30c35d236eSmrg# --------------- 31c35d236eSmrgAC_DEFUN([AC_PROG_LIBTOOL], 32c35d236eSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 33c35d236eSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 34c35d236eSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 35c35d236eSmrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 36c35d236eSmrg [AC_LIBTOOL_CXX], 37c35d236eSmrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 38c35d236eSmrg ])]) 39c35d236eSmrgdnl And a similar setup for Fortran 77 support 40c35d236eSmrg AC_PROVIDE_IFELSE([AC_PROG_F77], 41c35d236eSmrg [AC_LIBTOOL_F77], 42c35d236eSmrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 43c35d236eSmrg])]) 44c35d236eSmrg 45c35d236eSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 46c35d236eSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 47c35d236eSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 48c35d236eSmrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 49c35d236eSmrg [AC_LIBTOOL_GCJ], 50c35d236eSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 51c35d236eSmrg [AC_LIBTOOL_GCJ], 52c35d236eSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 53c35d236eSmrg [AC_LIBTOOL_GCJ], 54c35d236eSmrg [ifdef([AC_PROG_GCJ], 55c35d236eSmrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 56c35d236eSmrg ifdef([A][M_PROG_GCJ], 57c35d236eSmrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 58c35d236eSmrg ifdef([LT_AC_PROG_GCJ], 59c35d236eSmrg [define([LT_AC_PROG_GCJ], 60c35d236eSmrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 61c35d236eSmrg])])# AC_PROG_LIBTOOL 62c35d236eSmrg 63c35d236eSmrg 64c35d236eSmrg# _AC_PROG_LIBTOOL 65c35d236eSmrg# ---------------- 66c35d236eSmrgAC_DEFUN([_AC_PROG_LIBTOOL], 67c35d236eSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 68c35d236eSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 69c35d236eSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 70c35d236eSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 71c35d236eSmrg 72c35d236eSmrg# This can be used to rebuild libtool when needed 73c35d236eSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 74c35d236eSmrg 75c35d236eSmrg# Always use our own libtool. 76c35d236eSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 77c35d236eSmrgAC_SUBST(LIBTOOL)dnl 78c35d236eSmrg 79c35d236eSmrg# Prevent multiple expansion 80c35d236eSmrgdefine([AC_PROG_LIBTOOL], []) 81c35d236eSmrg])# _AC_PROG_LIBTOOL 82c35d236eSmrg 83c35d236eSmrg 84c35d236eSmrg# AC_LIBTOOL_SETUP 85c35d236eSmrg# ---------------- 86c35d236eSmrgAC_DEFUN([AC_LIBTOOL_SETUP], 87c35d236eSmrg[AC_PREREQ(2.50)dnl 88c35d236eSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 89c35d236eSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 90c35d236eSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 91c35d236eSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 92c35d236eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 93c35d236eSmrgAC_REQUIRE([AC_PROG_CC])dnl 94c35d236eSmrgAC_REQUIRE([AC_PROG_LD])dnl 95c35d236eSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 96c35d236eSmrgAC_REQUIRE([AC_PROG_NM])dnl 97c35d236eSmrg 98c35d236eSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 99c35d236eSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 100c35d236eSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 101c35d236eSmrgAC_REQUIRE([AC_OBJEXT])dnl 102c35d236eSmrgAC_REQUIRE([AC_EXEEXT])dnl 103c35d236eSmrgdnl 104c35d236eSmrg 105c35d236eSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 106c35d236eSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 107c35d236eSmrgAC_LIBTOOL_OBJDIR 108c35d236eSmrg 109c35d236eSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 110c35d236eSmrg_LT_AC_PROG_ECHO_BACKSLASH 111c35d236eSmrg 112c35d236eSmrgcase $host_os in 113c35d236eSmrgaix3*) 114c35d236eSmrg # AIX sometimes has problems with the GCC collect2 program. For some 115c35d236eSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 116c35d236eSmrg # vanish in a puff of smoke. 117c35d236eSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 118c35d236eSmrg COLLECT_NAMES= 119c35d236eSmrg export COLLECT_NAMES 120c35d236eSmrg fi 121c35d236eSmrg ;; 122c35d236eSmrgesac 123c35d236eSmrg 124c35d236eSmrg# Sed substitution that helps us do robust quoting. It backslashifies 125c35d236eSmrg# metacharacters that are still active within double-quoted strings. 126c35d236eSmrgXsed='sed -e 1s/^X//' 127c35d236eSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 128c35d236eSmrg 129c35d236eSmrg# Same as above, but do not quote variable references. 130c35d236eSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 131c35d236eSmrg 132c35d236eSmrg# Sed substitution to delay expansion of an escaped shell variable in a 133c35d236eSmrg# double_quote_subst'ed string. 134c35d236eSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 135c35d236eSmrg 136c35d236eSmrg# Sed substitution to avoid accidental globbing in evaled expressions 137c35d236eSmrgno_glob_subst='s/\*/\\\*/g' 138c35d236eSmrg 139c35d236eSmrg# Constants: 140c35d236eSmrgrm="rm -f" 141c35d236eSmrg 142c35d236eSmrg# Global variables: 143c35d236eSmrgdefault_ofile=libtool 144c35d236eSmrgcan_build_shared=yes 145c35d236eSmrg 146c35d236eSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 147c35d236eSmrg# which needs '.lib'). 148c35d236eSmrglibext=a 149c35d236eSmrgltmain="$ac_aux_dir/ltmain.sh" 150c35d236eSmrgofile="$default_ofile" 151c35d236eSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 152c35d236eSmrg 153c35d236eSmrgAC_CHECK_TOOL(AR, ar, false) 154c35d236eSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 155c35d236eSmrgAC_CHECK_TOOL(STRIP, strip, :) 156c35d236eSmrg 157c35d236eSmrgold_CC="$CC" 158c35d236eSmrgold_CFLAGS="$CFLAGS" 159c35d236eSmrg 160c35d236eSmrg# Set sane defaults for various variables 161c35d236eSmrgtest -z "$AR" && AR=ar 162c35d236eSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 163c35d236eSmrgtest -z "$AS" && AS=as 164c35d236eSmrgtest -z "$CC" && CC=cc 165c35d236eSmrgtest -z "$LTCC" && LTCC=$CC 166c35d236eSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 167c35d236eSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 168c35d236eSmrgtest -z "$LD" && LD=ld 169c35d236eSmrgtest -z "$LN_S" && LN_S="ln -s" 170c35d236eSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 171c35d236eSmrgtest -z "$NM" && NM=nm 172c35d236eSmrgtest -z "$SED" && SED=sed 173c35d236eSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 174c35d236eSmrgtest -z "$RANLIB" && RANLIB=: 175c35d236eSmrgtest -z "$STRIP" && STRIP=: 176c35d236eSmrgtest -z "$ac_objext" && ac_objext=o 177c35d236eSmrg 178c35d236eSmrg# Determine commands to create old-style static archives. 179c35d236eSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 180c35d236eSmrgold_postinstall_cmds='chmod 644 $oldlib' 181c35d236eSmrgold_postuninstall_cmds= 182c35d236eSmrg 183c35d236eSmrgif test -n "$RANLIB"; then 184c35d236eSmrg case $host_os in 185c35d236eSmrg openbsd*) 186c35d236eSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 187c35d236eSmrg ;; 188c35d236eSmrg *) 189c35d236eSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 190c35d236eSmrg ;; 191c35d236eSmrg esac 192c35d236eSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 193c35d236eSmrgfi 194c35d236eSmrg 195c35d236eSmrg_LT_CC_BASENAME([$compiler]) 196c35d236eSmrg 197c35d236eSmrg# Only perform the check for file, if the check method requires it 198c35d236eSmrgcase $deplibs_check_method in 199c35d236eSmrgfile_magic*) 200c35d236eSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 201c35d236eSmrg AC_PATH_MAGIC 202c35d236eSmrg fi 203c35d236eSmrg ;; 204c35d236eSmrgesac 205c35d236eSmrg 206c35d236eSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 207c35d236eSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 208c35d236eSmrgenable_win32_dll=yes, enable_win32_dll=no) 209c35d236eSmrg 210c35d236eSmrgAC_ARG_ENABLE([libtool-lock], 211c35d236eSmrg [AC_HELP_STRING([--disable-libtool-lock], 212c35d236eSmrg [avoid locking (might break parallel builds)])]) 213c35d236eSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 214c35d236eSmrg 215c35d236eSmrgAC_ARG_WITH([pic], 216c35d236eSmrg [AC_HELP_STRING([--with-pic], 217c35d236eSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 218c35d236eSmrg [pic_mode="$withval"], 219c35d236eSmrg [pic_mode=default]) 220c35d236eSmrgtest -z "$pic_mode" && pic_mode=default 221c35d236eSmrg 222c35d236eSmrg# Use C for the default configuration in the libtool script 223c35d236eSmrgtagname= 224c35d236eSmrgAC_LIBTOOL_LANG_C_CONFIG 225c35d236eSmrg_LT_AC_TAGCONFIG 226c35d236eSmrg])# AC_LIBTOOL_SETUP 227c35d236eSmrg 228c35d236eSmrg 229c35d236eSmrg# _LT_AC_SYS_COMPILER 230c35d236eSmrg# ------------------- 231c35d236eSmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 232c35d236eSmrg[AC_REQUIRE([AC_PROG_CC])dnl 233c35d236eSmrg 234c35d236eSmrg# If no C compiler was specified, use CC. 235c35d236eSmrgLTCC=${LTCC-"$CC"} 236c35d236eSmrg 237c35d236eSmrg# If no C compiler flags were specified, use CFLAGS. 238c35d236eSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 239c35d236eSmrg 240c35d236eSmrg# Allow CC to be a program name with arguments. 241c35d236eSmrgcompiler=$CC 242c35d236eSmrg])# _LT_AC_SYS_COMPILER 243c35d236eSmrg 244c35d236eSmrg 245c35d236eSmrg# _LT_CC_BASENAME(CC) 246c35d236eSmrg# ------------------- 247c35d236eSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 248c35d236eSmrgAC_DEFUN([_LT_CC_BASENAME], 249c35d236eSmrg[for cc_temp in $1""; do 250c35d236eSmrg case $cc_temp in 251c35d236eSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 252c35d236eSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 253c35d236eSmrg \-*) ;; 254c35d236eSmrg *) break;; 255c35d236eSmrg esac 256c35d236eSmrgdone 257c35d236eSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 258c35d236eSmrg]) 259c35d236eSmrg 260c35d236eSmrg 261c35d236eSmrg# _LT_COMPILER_BOILERPLATE 262c35d236eSmrg# ------------------------ 263c35d236eSmrg# Check for compiler boilerplate output or warnings with 264c35d236eSmrg# the simple compiler test code. 265c35d236eSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 266c35d236eSmrg[ac_outfile=conftest.$ac_objext 267c35d236eSmrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext 268c35d236eSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 269c35d236eSmrg_lt_compiler_boilerplate=`cat conftest.err` 270c35d236eSmrg$rm conftest* 271c35d236eSmrg])# _LT_COMPILER_BOILERPLATE 272c35d236eSmrg 273c35d236eSmrg 274c35d236eSmrg# _LT_LINKER_BOILERPLATE 275c35d236eSmrg# ---------------------- 276c35d236eSmrg# Check for linker boilerplate output or warnings with 277c35d236eSmrg# the simple link test code. 278c35d236eSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 279c35d236eSmrg[ac_outfile=conftest.$ac_objext 280c35d236eSmrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext 281c35d236eSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 282c35d236eSmrg_lt_linker_boilerplate=`cat conftest.err` 283c35d236eSmrg$rm conftest* 284c35d236eSmrg])# _LT_LINKER_BOILERPLATE 285c35d236eSmrg 286c35d236eSmrg 287c35d236eSmrg# _LT_AC_SYS_LIBPATH_AIX 288c35d236eSmrg# ---------------------- 289c35d236eSmrg# Links a minimal program and checks the executable 290c35d236eSmrg# for the system default hardcoded library path. In most cases, 291c35d236eSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 292c35d236eSmrg# the location of the communication and MPI libs are included too. 293c35d236eSmrg# If we don't find anything, use the default library path according 294c35d236eSmrg# to the aix ld manual. 295c35d236eSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 296c35d236eSmrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 297c35d236eSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 298c35d236eSmrg}'` 299c35d236eSmrg# Check for a 64-bit object if we didn't find anything. 300c35d236eSmrgif test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 301c35d236eSmrg}'`; fi],[]) 302c35d236eSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 303c35d236eSmrg])# _LT_AC_SYS_LIBPATH_AIX 304c35d236eSmrg 305c35d236eSmrg 306c35d236eSmrg# _LT_AC_SHELL_INIT(ARG) 307c35d236eSmrg# ---------------------- 308c35d236eSmrgAC_DEFUN([_LT_AC_SHELL_INIT], 309c35d236eSmrg[ifdef([AC_DIVERSION_NOTICE], 310c35d236eSmrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 311c35d236eSmrg [AC_DIVERT_PUSH(NOTICE)]) 312c35d236eSmrg$1 313c35d236eSmrgAC_DIVERT_POP 314c35d236eSmrg])# _LT_AC_SHELL_INIT 315c35d236eSmrg 316c35d236eSmrg 317c35d236eSmrg# _LT_AC_PROG_ECHO_BACKSLASH 318c35d236eSmrg# -------------------------- 319c35d236eSmrg# Add some code to the start of the generated configure script which 320c35d236eSmrg# will find an echo command which doesn't interpret backslashes. 321c35d236eSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 322c35d236eSmrg[_LT_AC_SHELL_INIT([ 323c35d236eSmrg# Check that we are running under the correct shell. 324c35d236eSmrgSHELL=${CONFIG_SHELL-/bin/sh} 325c35d236eSmrg 326c35d236eSmrgcase X$ECHO in 327c35d236eSmrgX*--fallback-echo) 328c35d236eSmrg # Remove one level of quotation (which was required for Make). 329c35d236eSmrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 330c35d236eSmrg ;; 331c35d236eSmrgesac 332c35d236eSmrg 333c35d236eSmrgecho=${ECHO-echo} 334c35d236eSmrgif test "X[$]1" = X--no-reexec; then 335c35d236eSmrg # Discard the --no-reexec flag, and continue. 336c35d236eSmrg shift 337c35d236eSmrgelif test "X[$]1" = X--fallback-echo; then 338c35d236eSmrg # Avoid inline document here, it may be left over 339c35d236eSmrg : 340c35d236eSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 341c35d236eSmrg # Yippee, $echo works! 342c35d236eSmrg : 343c35d236eSmrgelse 344c35d236eSmrg # Restart under the correct shell. 345c35d236eSmrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 346c35d236eSmrgfi 347c35d236eSmrg 348c35d236eSmrgif test "X[$]1" = X--fallback-echo; then 349c35d236eSmrg # used as fallback echo 350c35d236eSmrg shift 351c35d236eSmrg cat <<EOF 352c35d236eSmrg[$]* 353c35d236eSmrgEOF 354c35d236eSmrg exit 0 355c35d236eSmrgfi 356c35d236eSmrg 357c35d236eSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 358c35d236eSmrg# if CDPATH is set. 359c35d236eSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 360c35d236eSmrg 361c35d236eSmrgif test -z "$ECHO"; then 362c35d236eSmrgif test "X${echo_test_string+set}" != Xset; then 363c35d236eSmrg# find a string as large as possible, as long as the shell can cope with it 364c35d236eSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 365c35d236eSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 366c35d236eSmrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 367c35d236eSmrg echo_test_string=`eval $cmd` && 368c35d236eSmrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 369c35d236eSmrg then 370c35d236eSmrg break 371c35d236eSmrg fi 372c35d236eSmrg done 373c35d236eSmrgfi 374c35d236eSmrg 375c35d236eSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 376c35d236eSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 377c35d236eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 378c35d236eSmrg : 379c35d236eSmrgelse 380c35d236eSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 381c35d236eSmrg # backslashes. This makes it impossible to quote backslashes using 382c35d236eSmrg # echo "$something" | sed 's/\\/\\\\/g' 383c35d236eSmrg # 384c35d236eSmrg # So, first we look for a working echo in the user's PATH. 385c35d236eSmrg 386c35d236eSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 387c35d236eSmrg for dir in $PATH /usr/ucb; do 388c35d236eSmrg IFS="$lt_save_ifs" 389c35d236eSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 390c35d236eSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 391c35d236eSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 392c35d236eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 393c35d236eSmrg echo="$dir/echo" 394c35d236eSmrg break 395c35d236eSmrg fi 396c35d236eSmrg done 397c35d236eSmrg IFS="$lt_save_ifs" 398c35d236eSmrg 399c35d236eSmrg if test "X$echo" = Xecho; then 400c35d236eSmrg # We didn't find a better echo, so look for alternatives. 401c35d236eSmrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 402c35d236eSmrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 403c35d236eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 404c35d236eSmrg # This shell has a builtin print -r that does the trick. 405c35d236eSmrg echo='print -r' 406c35d236eSmrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 407c35d236eSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 408c35d236eSmrg # If we have ksh, try running configure again with it. 409c35d236eSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 410c35d236eSmrg export ORIGINAL_CONFIG_SHELL 411c35d236eSmrg CONFIG_SHELL=/bin/ksh 412c35d236eSmrg export CONFIG_SHELL 413c35d236eSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 414c35d236eSmrg else 415c35d236eSmrg # Try using printf. 416c35d236eSmrg echo='printf %s\n' 417c35d236eSmrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 418c35d236eSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 419c35d236eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 420c35d236eSmrg # Cool, printf works 421c35d236eSmrg : 422c35d236eSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 423c35d236eSmrg test "X$echo_testing_string" = 'X\t' && 424c35d236eSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 425c35d236eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 426c35d236eSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 427c35d236eSmrg export CONFIG_SHELL 428c35d236eSmrg SHELL="$CONFIG_SHELL" 429c35d236eSmrg export SHELL 430c35d236eSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 431c35d236eSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 432c35d236eSmrg test "X$echo_testing_string" = 'X\t' && 433c35d236eSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 434c35d236eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 435c35d236eSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 436c35d236eSmrg else 437c35d236eSmrg # maybe with a smaller string... 438c35d236eSmrg prev=: 439c35d236eSmrg 440c35d236eSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 441c35d236eSmrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 442c35d236eSmrg then 443c35d236eSmrg break 444c35d236eSmrg fi 445c35d236eSmrg prev="$cmd" 446c35d236eSmrg done 447c35d236eSmrg 448c35d236eSmrg if test "$prev" != 'sed 50q "[$]0"'; then 449c35d236eSmrg echo_test_string=`eval $prev` 450c35d236eSmrg export echo_test_string 451c35d236eSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 452c35d236eSmrg else 453c35d236eSmrg # Oops. We lost completely, so just stick with echo. 454c35d236eSmrg echo=echo 455c35d236eSmrg fi 456c35d236eSmrg fi 457c35d236eSmrg fi 458c35d236eSmrg fi 459c35d236eSmrgfi 460c35d236eSmrgfi 461c35d236eSmrg 462c35d236eSmrg# Copy echo and quote the copy suitably for passing to libtool from 463c35d236eSmrg# the Makefile, instead of quoting the original, which is used later. 464c35d236eSmrgECHO=$echo 465c35d236eSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 466c35d236eSmrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 467c35d236eSmrgfi 468c35d236eSmrg 469c35d236eSmrgAC_SUBST(ECHO) 470c35d236eSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH 471c35d236eSmrg 472c35d236eSmrg 473c35d236eSmrg# _LT_AC_LOCK 474c35d236eSmrg# ----------- 475c35d236eSmrgAC_DEFUN([_LT_AC_LOCK], 476c35d236eSmrg[AC_ARG_ENABLE([libtool-lock], 477c35d236eSmrg [AC_HELP_STRING([--disable-libtool-lock], 478c35d236eSmrg [avoid locking (might break parallel builds)])]) 479c35d236eSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 480c35d236eSmrg 481c35d236eSmrg# Some flags need to be propagated to the compiler or linker for good 482c35d236eSmrg# libtool support. 483c35d236eSmrgcase $host in 484c35d236eSmrgia64-*-hpux*) 485c35d236eSmrg # Find out which ABI we are using. 486c35d236eSmrg echo 'int i;' > conftest.$ac_ext 487c35d236eSmrg if AC_TRY_EVAL(ac_compile); then 488c35d236eSmrg case `/usr/bin/file conftest.$ac_objext` in 489c35d236eSmrg *ELF-32*) 490c35d236eSmrg HPUX_IA64_MODE="32" 491c35d236eSmrg ;; 492c35d236eSmrg *ELF-64*) 493c35d236eSmrg HPUX_IA64_MODE="64" 494c35d236eSmrg ;; 495c35d236eSmrg esac 496c35d236eSmrg fi 497c35d236eSmrg rm -rf conftest* 498c35d236eSmrg ;; 499c35d236eSmrg*-*-irix6*) 500c35d236eSmrg # Find out which ABI we are using. 501c35d236eSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 502c35d236eSmrg if AC_TRY_EVAL(ac_compile); then 503c35d236eSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 504c35d236eSmrg case `/usr/bin/file conftest.$ac_objext` in 505c35d236eSmrg *32-bit*) 506c35d236eSmrg LD="${LD-ld} -melf32bsmip" 507c35d236eSmrg ;; 508c35d236eSmrg *N32*) 509c35d236eSmrg LD="${LD-ld} -melf32bmipn32" 510c35d236eSmrg ;; 511c35d236eSmrg *64-bit*) 512c35d236eSmrg LD="${LD-ld} -melf64bmip" 513c35d236eSmrg ;; 514c35d236eSmrg esac 515c35d236eSmrg else 516c35d236eSmrg case `/usr/bin/file conftest.$ac_objext` in 517c35d236eSmrg *32-bit*) 518c35d236eSmrg LD="${LD-ld} -32" 519c35d236eSmrg ;; 520c35d236eSmrg *N32*) 521c35d236eSmrg LD="${LD-ld} -n32" 522c35d236eSmrg ;; 523c35d236eSmrg *64-bit*) 524c35d236eSmrg LD="${LD-ld} -64" 525c35d236eSmrg ;; 526c35d236eSmrg esac 527c35d236eSmrg fi 528c35d236eSmrg fi 529c35d236eSmrg rm -rf conftest* 530c35d236eSmrg ;; 531c35d236eSmrg 532c35d236eSmrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 533c35d236eSmrg # Find out which ABI we are using. 534c35d236eSmrg echo 'int i;' > conftest.$ac_ext 535c35d236eSmrg if AC_TRY_EVAL(ac_compile); then 536c35d236eSmrg case `/usr/bin/file conftest.o` in 537c35d236eSmrg *32-bit*) 538c35d236eSmrg case $host in 539c35d236eSmrg x86_64-*linux*) 540c35d236eSmrg LD="${LD-ld} -m elf_i386" 541c35d236eSmrg ;; 542c35d236eSmrg ppc64-*linux*|powerpc64-*linux*) 543c35d236eSmrg LD="${LD-ld} -m elf32ppclinux" 544c35d236eSmrg ;; 545c35d236eSmrg s390x-*linux*) 546c35d236eSmrg LD="${LD-ld} -m elf_s390" 547c35d236eSmrg ;; 548c35d236eSmrg sparc64-*linux*) 549c35d236eSmrg LD="${LD-ld} -m elf32_sparc" 550c35d236eSmrg ;; 551c35d236eSmrg esac 552c35d236eSmrg ;; 553c35d236eSmrg *64-bit*) 554c35d236eSmrg case $host in 555c35d236eSmrg x86_64-*linux*) 556c35d236eSmrg LD="${LD-ld} -m elf_x86_64" 557c35d236eSmrg ;; 558c35d236eSmrg ppc*-*linux*|powerpc*-*linux*) 559c35d236eSmrg LD="${LD-ld} -m elf64ppc" 560c35d236eSmrg ;; 561c35d236eSmrg s390*-*linux*) 562c35d236eSmrg LD="${LD-ld} -m elf64_s390" 563c35d236eSmrg ;; 564c35d236eSmrg sparc*-*linux*) 565c35d236eSmrg LD="${LD-ld} -m elf64_sparc" 566c35d236eSmrg ;; 567c35d236eSmrg esac 568c35d236eSmrg ;; 569c35d236eSmrg esac 570c35d236eSmrg fi 571c35d236eSmrg rm -rf conftest* 572c35d236eSmrg ;; 573c35d236eSmrg 574c35d236eSmrg*-*-sco3.2v5*) 575c35d236eSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 576c35d236eSmrg SAVE_CFLAGS="$CFLAGS" 577c35d236eSmrg CFLAGS="$CFLAGS -belf" 578c35d236eSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 579c35d236eSmrg [AC_LANG_PUSH(C) 580c35d236eSmrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 581c35d236eSmrg AC_LANG_POP]) 582c35d236eSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 583c35d236eSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 584c35d236eSmrg CFLAGS="$SAVE_CFLAGS" 585c35d236eSmrg fi 586c35d236eSmrg ;; 587c35d236eSmrgsparc*-*solaris*) 588c35d236eSmrg # Find out which ABI we are using. 589c35d236eSmrg echo 'int i;' > conftest.$ac_ext 590c35d236eSmrg if AC_TRY_EVAL(ac_compile); then 591c35d236eSmrg case `/usr/bin/file conftest.o` in 592c35d236eSmrg *64-bit*) 593c35d236eSmrg case $lt_cv_prog_gnu_ld in 594c35d236eSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 595c35d236eSmrg *) LD="${LD-ld} -64" ;; 596c35d236eSmrg esac 597c35d236eSmrg ;; 598c35d236eSmrg esac 599c35d236eSmrg fi 600c35d236eSmrg rm -rf conftest* 601c35d236eSmrg ;; 602c35d236eSmrg 603c35d236eSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 604c35d236eSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 605c35d236eSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 606c35d236eSmrg AC_CHECK_TOOL(AS, as, false) 607c35d236eSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 608c35d236eSmrg ;; 609c35d236eSmrg ]) 610c35d236eSmrgesac 611c35d236eSmrg 612c35d236eSmrgneed_locks="$enable_libtool_lock" 613c35d236eSmrg 614c35d236eSmrg])# _LT_AC_LOCK 615c35d236eSmrg 616c35d236eSmrg 617c35d236eSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 618c35d236eSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 619c35d236eSmrg# ---------------------------------------------------------------- 620c35d236eSmrg# Check whether the given compiler option works 621c35d236eSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 622c35d236eSmrg[AC_REQUIRE([LT_AC_PROG_SED]) 623c35d236eSmrgAC_CACHE_CHECK([$1], [$2], 624c35d236eSmrg [$2=no 625c35d236eSmrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 626c35d236eSmrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 627c35d236eSmrg lt_compiler_flag="$3" 628c35d236eSmrg # Insert the option either (1) after the last *FLAGS variable, or 629c35d236eSmrg # (2) before a word containing "conftest.", or (3) at the end. 630c35d236eSmrg # Note that $ac_compile itself does not contain backslashes and begins 631c35d236eSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 632c35d236eSmrg # The option is referenced via a variable to avoid confusing sed. 633c35d236eSmrg lt_compile=`echo "$ac_compile" | $SED \ 634c35d236eSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 635c35d236eSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 636c35d236eSmrg -e 's:$: $lt_compiler_flag:'` 637c35d236eSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 638c35d236eSmrg (eval "$lt_compile" 2>conftest.err) 639c35d236eSmrg ac_status=$? 640c35d236eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 641c35d236eSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 642c35d236eSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 643c35d236eSmrg # The compiler can only warn and ignore the option if not recognized 644c35d236eSmrg # So say no if there are warnings other than the usual output. 645c35d236eSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 646c35d236eSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 647c35d236eSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 648c35d236eSmrg $2=yes 649c35d236eSmrg fi 650c35d236eSmrg fi 651c35d236eSmrg $rm conftest* 652c35d236eSmrg]) 653c35d236eSmrg 654c35d236eSmrgif test x"[$]$2" = xyes; then 655c35d236eSmrg ifelse([$5], , :, [$5]) 656c35d236eSmrgelse 657c35d236eSmrg ifelse([$6], , :, [$6]) 658c35d236eSmrgfi 659c35d236eSmrg])# AC_LIBTOOL_COMPILER_OPTION 660c35d236eSmrg 661c35d236eSmrg 662c35d236eSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 663c35d236eSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 664c35d236eSmrg# ------------------------------------------------------------ 665c35d236eSmrg# Check whether the given compiler option works 666c35d236eSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 667c35d236eSmrg[AC_CACHE_CHECK([$1], [$2], 668c35d236eSmrg [$2=no 669c35d236eSmrg save_LDFLAGS="$LDFLAGS" 670c35d236eSmrg LDFLAGS="$LDFLAGS $3" 671c35d236eSmrg printf "$lt_simple_link_test_code" > conftest.$ac_ext 672c35d236eSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 673c35d236eSmrg # The linker can only warn and ignore the option if not recognized 674c35d236eSmrg # So say no if there are warnings 675c35d236eSmrg if test -s conftest.err; then 676c35d236eSmrg # Append any errors to the config.log. 677c35d236eSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 678c35d236eSmrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 679c35d236eSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 680c35d236eSmrg if diff conftest.exp conftest.er2 >/dev/null; then 681c35d236eSmrg $2=yes 682c35d236eSmrg fi 683c35d236eSmrg else 684c35d236eSmrg $2=yes 685c35d236eSmrg fi 686c35d236eSmrg fi 687c35d236eSmrg $rm conftest* 688c35d236eSmrg LDFLAGS="$save_LDFLAGS" 689c35d236eSmrg]) 690c35d236eSmrg 691c35d236eSmrgif test x"[$]$2" = xyes; then 692c35d236eSmrg ifelse([$4], , :, [$4]) 693c35d236eSmrgelse 694c35d236eSmrg ifelse([$5], , :, [$5]) 695c35d236eSmrgfi 696c35d236eSmrg])# AC_LIBTOOL_LINKER_OPTION 697c35d236eSmrg 698c35d236eSmrg 699c35d236eSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 700c35d236eSmrg# -------------------------- 701c35d236eSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 702c35d236eSmrg[# find the maximum length of command line arguments 703c35d236eSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 704c35d236eSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 705c35d236eSmrg i=0 706c35d236eSmrg teststring="ABCD" 707c35d236eSmrg 708c35d236eSmrg case $build_os in 709c35d236eSmrg msdosdjgpp*) 710c35d236eSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 711c35d236eSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 712c35d236eSmrg # during glob expansion). Even if it were fixed, the result of this 713c35d236eSmrg # check would be larger than it should be. 714c35d236eSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 715c35d236eSmrg ;; 716c35d236eSmrg 717c35d236eSmrg gnu*) 718c35d236eSmrg # Under GNU Hurd, this test is not required because there is 719c35d236eSmrg # no limit to the length of command line arguments. 720c35d236eSmrg # Libtool will interpret -1 as no limit whatsoever 721c35d236eSmrg lt_cv_sys_max_cmd_len=-1; 722c35d236eSmrg ;; 723c35d236eSmrg 724c35d236eSmrg cygwin* | mingw*) 725c35d236eSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 726c35d236eSmrg # about 5 minutes as the teststring grows exponentially. 727c35d236eSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 728c35d236eSmrg # you end up with a "frozen" computer, even though with patience 729c35d236eSmrg # the test eventually succeeds (with a max line length of 256k). 730c35d236eSmrg # Instead, let's just punt: use the minimum linelength reported by 731c35d236eSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 732c35d236eSmrg lt_cv_sys_max_cmd_len=8192; 733c35d236eSmrg ;; 734c35d236eSmrg 735c35d236eSmrg amigaos*) 736c35d236eSmrg # On AmigaOS with pdksh, this test takes hours, literally. 737c35d236eSmrg # So we just punt and use a minimum line length of 8192. 738c35d236eSmrg lt_cv_sys_max_cmd_len=8192; 739c35d236eSmrg ;; 740c35d236eSmrg 741c35d236eSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 742c35d236eSmrg # This has been around since 386BSD, at least. Likely further. 743c35d236eSmrg if test -x /sbin/sysctl; then 744c35d236eSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 745c35d236eSmrg elif test -x /usr/sbin/sysctl; then 746c35d236eSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 747c35d236eSmrg else 748c35d236eSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 749c35d236eSmrg fi 750c35d236eSmrg # And add a safety zone 751c35d236eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 752c35d236eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 753c35d236eSmrg ;; 754c35d236eSmrg 755c35d236eSmrg interix*) 756c35d236eSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 757c35d236eSmrg lt_cv_sys_max_cmd_len=196608 758c35d236eSmrg ;; 759c35d236eSmrg 760c35d236eSmrg osf*) 761c35d236eSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 762c35d236eSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 763c35d236eSmrg # nice to cause kernel panics so lets avoid the loop below. 764c35d236eSmrg # First set a reasonable default. 765c35d236eSmrg lt_cv_sys_max_cmd_len=16384 766c35d236eSmrg # 767c35d236eSmrg if test -x /sbin/sysconfig; then 768c35d236eSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 769c35d236eSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 770c35d236eSmrg esac 771c35d236eSmrg fi 772c35d236eSmrg ;; 773c35d236eSmrg sco3.2v5*) 774c35d236eSmrg lt_cv_sys_max_cmd_len=102400 775c35d236eSmrg ;; 776c35d236eSmrg sysv5* | sco5v6* | sysv4.2uw2*) 777c35d236eSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 778c35d236eSmrg if test -n "$kargmax"; then 779c35d236eSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 780c35d236eSmrg else 781c35d236eSmrg lt_cv_sys_max_cmd_len=32768 782c35d236eSmrg fi 783c35d236eSmrg ;; 784c35d236eSmrg *) 785c35d236eSmrg # If test is not a shell built-in, we'll probably end up computing a 786c35d236eSmrg # maximum length that is only half of the actual maximum length, but 787c35d236eSmrg # we can't tell. 788c35d236eSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 789c35d236eSmrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 790c35d236eSmrg = "XX$teststring") >/dev/null 2>&1 && 791c35d236eSmrg new_result=`expr "X$teststring" : ".*" 2>&1` && 792c35d236eSmrg lt_cv_sys_max_cmd_len=$new_result && 793c35d236eSmrg test $i != 17 # 1/2 MB should be enough 794c35d236eSmrg do 795c35d236eSmrg i=`expr $i + 1` 796c35d236eSmrg teststring=$teststring$teststring 797c35d236eSmrg done 798c35d236eSmrg teststring= 799c35d236eSmrg # Add a significant safety factor because C++ compilers can tack on massive 800c35d236eSmrg # amounts of additional arguments before passing them to the linker. 801c35d236eSmrg # It appears as though 1/2 is a usable value. 802c35d236eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 803c35d236eSmrg ;; 804c35d236eSmrg esac 805c35d236eSmrg]) 806c35d236eSmrgif test -n $lt_cv_sys_max_cmd_len ; then 807c35d236eSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 808c35d236eSmrgelse 809c35d236eSmrg AC_MSG_RESULT(none) 810c35d236eSmrgfi 811c35d236eSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 812c35d236eSmrg 813c35d236eSmrg 814c35d236eSmrg# _LT_AC_CHECK_DLFCN 815c35d236eSmrg# ------------------ 816c35d236eSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 817c35d236eSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl 818c35d236eSmrg])# _LT_AC_CHECK_DLFCN 819c35d236eSmrg 820c35d236eSmrg 821c35d236eSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 822c35d236eSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 823c35d236eSmrg# --------------------------------------------------------------------- 824c35d236eSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 825c35d236eSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 826c35d236eSmrgif test "$cross_compiling" = yes; then : 827c35d236eSmrg [$4] 828c35d236eSmrgelse 829c35d236eSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 830c35d236eSmrg lt_status=$lt_dlunknown 831c35d236eSmrg cat > conftest.$ac_ext <<EOF 832c35d236eSmrg[#line __oline__ "configure" 833c35d236eSmrg#include "confdefs.h" 834c35d236eSmrg 835c35d236eSmrg#if HAVE_DLFCN_H 836c35d236eSmrg#include <dlfcn.h> 837c35d236eSmrg#endif 838c35d236eSmrg 839c35d236eSmrg#include <stdio.h> 840c35d236eSmrg 841c35d236eSmrg#ifdef RTLD_GLOBAL 842c35d236eSmrg# define LT_DLGLOBAL RTLD_GLOBAL 843c35d236eSmrg#else 844c35d236eSmrg# ifdef DL_GLOBAL 845c35d236eSmrg# define LT_DLGLOBAL DL_GLOBAL 846c35d236eSmrg# else 847c35d236eSmrg# define LT_DLGLOBAL 0 848c35d236eSmrg# endif 849c35d236eSmrg#endif 850c35d236eSmrg 851c35d236eSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 852c35d236eSmrg find out it does not work in some platform. */ 853c35d236eSmrg#ifndef LT_DLLAZY_OR_NOW 854c35d236eSmrg# ifdef RTLD_LAZY 855c35d236eSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 856c35d236eSmrg# else 857c35d236eSmrg# ifdef DL_LAZY 858c35d236eSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 859c35d236eSmrg# else 860c35d236eSmrg# ifdef RTLD_NOW 861c35d236eSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 862c35d236eSmrg# else 863c35d236eSmrg# ifdef DL_NOW 864c35d236eSmrg# define LT_DLLAZY_OR_NOW DL_NOW 865c35d236eSmrg# else 866c35d236eSmrg# define LT_DLLAZY_OR_NOW 0 867c35d236eSmrg# endif 868c35d236eSmrg# endif 869c35d236eSmrg# endif 870c35d236eSmrg# endif 871c35d236eSmrg#endif 872c35d236eSmrg 873c35d236eSmrg#ifdef __cplusplus 874c35d236eSmrgextern "C" void exit (int); 875c35d236eSmrg#endif 876c35d236eSmrg 877c35d236eSmrgvoid fnord() { int i=42;} 878c35d236eSmrgint main () 879c35d236eSmrg{ 880c35d236eSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 881c35d236eSmrg int status = $lt_dlunknown; 882c35d236eSmrg 883c35d236eSmrg if (self) 884c35d236eSmrg { 885c35d236eSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 886c35d236eSmrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 887c35d236eSmrg /* dlclose (self); */ 888c35d236eSmrg } 889c35d236eSmrg else 890c35d236eSmrg puts (dlerror ()); 891c35d236eSmrg 892c35d236eSmrg exit (status); 893c35d236eSmrg}] 894c35d236eSmrgEOF 895c35d236eSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 896c35d236eSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 897c35d236eSmrg lt_status=$? 898c35d236eSmrg case x$lt_status in 899c35d236eSmrg x$lt_dlno_uscore) $1 ;; 900c35d236eSmrg x$lt_dlneed_uscore) $2 ;; 901c35d236eSmrg x$lt_dlunknown|x*) $3 ;; 902c35d236eSmrg esac 903c35d236eSmrg else : 904c35d236eSmrg # compilation failed 905c35d236eSmrg $3 906c35d236eSmrg fi 907c35d236eSmrgfi 908c35d236eSmrgrm -fr conftest* 909c35d236eSmrg])# _LT_AC_TRY_DLOPEN_SELF 910c35d236eSmrg 911c35d236eSmrg 912c35d236eSmrg# AC_LIBTOOL_DLOPEN_SELF 913c35d236eSmrg# ---------------------- 914c35d236eSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 915c35d236eSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 916c35d236eSmrgif test "x$enable_dlopen" != xyes; then 917c35d236eSmrg enable_dlopen=unknown 918c35d236eSmrg enable_dlopen_self=unknown 919c35d236eSmrg enable_dlopen_self_static=unknown 920c35d236eSmrgelse 921c35d236eSmrg lt_cv_dlopen=no 922c35d236eSmrg lt_cv_dlopen_libs= 923c35d236eSmrg 924c35d236eSmrg case $host_os in 925c35d236eSmrg beos*) 926c35d236eSmrg lt_cv_dlopen="load_add_on" 927c35d236eSmrg lt_cv_dlopen_libs= 928c35d236eSmrg lt_cv_dlopen_self=yes 929c35d236eSmrg ;; 930c35d236eSmrg 931c35d236eSmrg mingw* | pw32*) 932c35d236eSmrg lt_cv_dlopen="LoadLibrary" 933c35d236eSmrg lt_cv_dlopen_libs= 934c35d236eSmrg ;; 935c35d236eSmrg 936c35d236eSmrg cygwin*) 937c35d236eSmrg lt_cv_dlopen="dlopen" 938c35d236eSmrg lt_cv_dlopen_libs= 939c35d236eSmrg ;; 940c35d236eSmrg 941c35d236eSmrg darwin*) 942c35d236eSmrg # if libdl is installed we need to link against it 943c35d236eSmrg AC_CHECK_LIB([dl], [dlopen], 944c35d236eSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 945c35d236eSmrg lt_cv_dlopen="dyld" 946c35d236eSmrg lt_cv_dlopen_libs= 947c35d236eSmrg lt_cv_dlopen_self=yes 948c35d236eSmrg ]) 949c35d236eSmrg ;; 950c35d236eSmrg 951c35d236eSmrg *) 952c35d236eSmrg AC_CHECK_FUNC([shl_load], 953c35d236eSmrg [lt_cv_dlopen="shl_load"], 954c35d236eSmrg [AC_CHECK_LIB([dld], [shl_load], 955c35d236eSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 956c35d236eSmrg [AC_CHECK_FUNC([dlopen], 957c35d236eSmrg [lt_cv_dlopen="dlopen"], 958c35d236eSmrg [AC_CHECK_LIB([dl], [dlopen], 959c35d236eSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 960c35d236eSmrg [AC_CHECK_LIB([svld], [dlopen], 961c35d236eSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 962c35d236eSmrg [AC_CHECK_LIB([dld], [dld_link], 963c35d236eSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 964c35d236eSmrg ]) 965c35d236eSmrg ]) 966c35d236eSmrg ]) 967c35d236eSmrg ]) 968c35d236eSmrg ]) 969c35d236eSmrg ;; 970c35d236eSmrg esac 971c35d236eSmrg 972c35d236eSmrg if test "x$lt_cv_dlopen" != xno; then 973c35d236eSmrg enable_dlopen=yes 974c35d236eSmrg else 975c35d236eSmrg enable_dlopen=no 976c35d236eSmrg fi 977c35d236eSmrg 978c35d236eSmrg case $lt_cv_dlopen in 979c35d236eSmrg dlopen) 980c35d236eSmrg save_CPPFLAGS="$CPPFLAGS" 981c35d236eSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 982c35d236eSmrg 983c35d236eSmrg save_LDFLAGS="$LDFLAGS" 984c35d236eSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 985c35d236eSmrg 986c35d236eSmrg save_LIBS="$LIBS" 987c35d236eSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 988c35d236eSmrg 989c35d236eSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 990c35d236eSmrg lt_cv_dlopen_self, [dnl 991c35d236eSmrg _LT_AC_TRY_DLOPEN_SELF( 992c35d236eSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 993c35d236eSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 994c35d236eSmrg ]) 995c35d236eSmrg 996c35d236eSmrg if test "x$lt_cv_dlopen_self" = xyes; then 997c35d236eSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 998c35d236eSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 999c35d236eSmrg lt_cv_dlopen_self_static, [dnl 1000c35d236eSmrg _LT_AC_TRY_DLOPEN_SELF( 1001c35d236eSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1002c35d236eSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1003c35d236eSmrg ]) 1004c35d236eSmrg fi 1005c35d236eSmrg 1006c35d236eSmrg CPPFLAGS="$save_CPPFLAGS" 1007c35d236eSmrg LDFLAGS="$save_LDFLAGS" 1008c35d236eSmrg LIBS="$save_LIBS" 1009c35d236eSmrg ;; 1010c35d236eSmrg esac 1011c35d236eSmrg 1012c35d236eSmrg case $lt_cv_dlopen_self in 1013c35d236eSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1014c35d236eSmrg *) enable_dlopen_self=unknown ;; 1015c35d236eSmrg esac 1016c35d236eSmrg 1017c35d236eSmrg case $lt_cv_dlopen_self_static in 1018c35d236eSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1019c35d236eSmrg *) enable_dlopen_self_static=unknown ;; 1020c35d236eSmrg esac 1021c35d236eSmrgfi 1022c35d236eSmrg])# AC_LIBTOOL_DLOPEN_SELF 1023c35d236eSmrg 1024c35d236eSmrg 1025c35d236eSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 1026c35d236eSmrg# --------------------------------- 1027c35d236eSmrg# Check to see if options -c and -o are simultaneously supported by compiler 1028c35d236eSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 1029c35d236eSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1030c35d236eSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1031c35d236eSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1032c35d236eSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1033c35d236eSmrg $rm -r conftest 2>/dev/null 1034c35d236eSmrg mkdir conftest 1035c35d236eSmrg cd conftest 1036c35d236eSmrg mkdir out 1037c35d236eSmrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 1038c35d236eSmrg 1039c35d236eSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1040c35d236eSmrg # Insert the option either (1) after the last *FLAGS variable, or 1041c35d236eSmrg # (2) before a word containing "conftest.", or (3) at the end. 1042c35d236eSmrg # Note that $ac_compile itself does not contain backslashes and begins 1043c35d236eSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1044c35d236eSmrg lt_compile=`echo "$ac_compile" | $SED \ 1045c35d236eSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1046c35d236eSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1047c35d236eSmrg -e 's:$: $lt_compiler_flag:'` 1048c35d236eSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1049c35d236eSmrg (eval "$lt_compile" 2>out/conftest.err) 1050c35d236eSmrg ac_status=$? 1051c35d236eSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 1052c35d236eSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1053c35d236eSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 1054c35d236eSmrg then 1055c35d236eSmrg # The compiler can only warn and ignore the option if not recognized 1056c35d236eSmrg # So say no if there are warnings 1057c35d236eSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1058c35d236eSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1059c35d236eSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1060c35d236eSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1061c35d236eSmrg fi 1062c35d236eSmrg fi 1063c35d236eSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1064c35d236eSmrg $rm conftest* 1065c35d236eSmrg # SGI C++ compiler will create directory out/ii_files/ for 1066c35d236eSmrg # template instantiation 1067c35d236eSmrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1068c35d236eSmrg $rm out/* && rmdir out 1069c35d236eSmrg cd .. 1070c35d236eSmrg rmdir conftest 1071c35d236eSmrg $rm conftest* 1072c35d236eSmrg]) 1073c35d236eSmrg])# AC_LIBTOOL_PROG_CC_C_O 1074c35d236eSmrg 1075c35d236eSmrg 1076c35d236eSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1077c35d236eSmrg# ----------------------------------------- 1078c35d236eSmrg# Check to see if we can do hard links to lock some files if needed 1079c35d236eSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1080c35d236eSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl 1081c35d236eSmrg 1082c35d236eSmrghard_links="nottested" 1083c35d236eSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1084c35d236eSmrg # do not overwrite the value of need_locks provided by the user 1085c35d236eSmrg AC_MSG_CHECKING([if we can lock with hard links]) 1086c35d236eSmrg hard_links=yes 1087c35d236eSmrg $rm conftest* 1088c35d236eSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1089c35d236eSmrg touch conftest.a 1090c35d236eSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 1091c35d236eSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1092c35d236eSmrg AC_MSG_RESULT([$hard_links]) 1093c35d236eSmrg if test "$hard_links" = no; then 1094c35d236eSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1095c35d236eSmrg need_locks=warn 1096c35d236eSmrg fi 1097c35d236eSmrgelse 1098c35d236eSmrg need_locks=no 1099c35d236eSmrgfi 1100c35d236eSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1101c35d236eSmrg 1102c35d236eSmrg 1103c35d236eSmrg# AC_LIBTOOL_OBJDIR 1104c35d236eSmrg# ----------------- 1105c35d236eSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 1106c35d236eSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1107c35d236eSmrg[rm -f .libs 2>/dev/null 1108c35d236eSmrgmkdir .libs 2>/dev/null 1109c35d236eSmrgif test -d .libs; then 1110c35d236eSmrg lt_cv_objdir=.libs 1111c35d236eSmrgelse 1112c35d236eSmrg # MS-DOS does not allow filenames that begin with a dot. 1113c35d236eSmrg lt_cv_objdir=_libs 1114c35d236eSmrgfi 1115c35d236eSmrgrmdir .libs 2>/dev/null]) 1116c35d236eSmrgobjdir=$lt_cv_objdir 1117c35d236eSmrg])# AC_LIBTOOL_OBJDIR 1118c35d236eSmrg 1119c35d236eSmrg 1120c35d236eSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1121c35d236eSmrg# ---------------------------------------------- 1122c35d236eSmrg# Check hardcoding attributes. 1123c35d236eSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 1124c35d236eSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1125c35d236eSmrg_LT_AC_TAGVAR(hardcode_action, $1)= 1126c35d236eSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1127c35d236eSmrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1128c35d236eSmrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1129c35d236eSmrg 1130c35d236eSmrg # We can hardcode non-existant directories. 1131c35d236eSmrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 1132c35d236eSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 1133c35d236eSmrg # have to relink, otherwise we might link with an installed library 1134c35d236eSmrg # when we should be linking with a yet-to-be-installed one 1135c35d236eSmrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1136c35d236eSmrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 1137c35d236eSmrg # Linking always hardcodes the temporary library directory. 1138c35d236eSmrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 1139c35d236eSmrg else 1140c35d236eSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1141c35d236eSmrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 1142c35d236eSmrg fi 1143c35d236eSmrgelse 1144c35d236eSmrg # We cannot hardcode anything, or else we can only hardcode existing 1145c35d236eSmrg # directories. 1146c35d236eSmrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1147c35d236eSmrgfi 1148c35d236eSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1149c35d236eSmrg 1150c35d236eSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 1151c35d236eSmrg # Fast installation is not supported 1152c35d236eSmrg enable_fast_install=no 1153c35d236eSmrgelif test "$shlibpath_overrides_runpath" = yes || 1154c35d236eSmrg test "$enable_shared" = no; then 1155c35d236eSmrg # Fast installation is not necessary 1156c35d236eSmrg enable_fast_install=needless 1157c35d236eSmrgfi 1158c35d236eSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 1159c35d236eSmrg 1160c35d236eSmrg 1161c35d236eSmrg# AC_LIBTOOL_SYS_LIB_STRIP 1162c35d236eSmrg# ------------------------ 1163c35d236eSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1164c35d236eSmrg[striplib= 1165c35d236eSmrgold_striplib= 1166c35d236eSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 1167c35d236eSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 1168c35d236eSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 1169c35d236eSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 1170c35d236eSmrg AC_MSG_RESULT([yes]) 1171c35d236eSmrgelse 1172c35d236eSmrg# FIXME - insert some real tests, host_os isn't really good enough 1173c35d236eSmrg case $host_os in 1174c35d236eSmrg darwin*) 1175c35d236eSmrg if test -n "$STRIP" ; then 1176c35d236eSmrg striplib="$STRIP -x" 1177c35d236eSmrg AC_MSG_RESULT([yes]) 1178c35d236eSmrg else 1179c35d236eSmrg AC_MSG_RESULT([no]) 1180c35d236eSmrgfi 1181c35d236eSmrg ;; 1182c35d236eSmrg *) 1183c35d236eSmrg AC_MSG_RESULT([no]) 1184c35d236eSmrg ;; 1185c35d236eSmrg esac 1186c35d236eSmrgfi 1187c35d236eSmrg])# AC_LIBTOOL_SYS_LIB_STRIP 1188c35d236eSmrg 1189c35d236eSmrg 1190c35d236eSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1191c35d236eSmrg# ----------------------------- 1192c35d236eSmrg# PORTME Fill in your ld.so characteristics 1193c35d236eSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1194c35d236eSmrg[AC_MSG_CHECKING([dynamic linker characteristics]) 1195c35d236eSmrglibrary_names_spec= 1196c35d236eSmrglibname_spec='lib$name' 1197c35d236eSmrgsoname_spec= 1198c35d236eSmrgshrext_cmds=".so" 1199c35d236eSmrgpostinstall_cmds= 1200c35d236eSmrgpostuninstall_cmds= 1201c35d236eSmrgfinish_cmds= 1202c35d236eSmrgfinish_eval= 1203c35d236eSmrgshlibpath_var= 1204c35d236eSmrgshlibpath_overrides_runpath=unknown 1205c35d236eSmrgversion_type=none 1206c35d236eSmrgdynamic_linker="$host_os ld.so" 1207c35d236eSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 1208c35d236eSmrgif test "$GCC" = yes; then 1209c35d236eSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1210c35d236eSmrg if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 1211c35d236eSmrg # if the path contains ";" then we assume it to be the separator 1212c35d236eSmrg # otherwise default to the standard path separator (i.e. ":") - it is 1213c35d236eSmrg # assumed that no part of a normal pathname contains ";" but that should 1214c35d236eSmrg # okay in the real world where ";" in dirpaths is itself problematic. 1215c35d236eSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1216c35d236eSmrg else 1217c35d236eSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1218c35d236eSmrg fi 1219c35d236eSmrgelse 1220c35d236eSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 1221c35d236eSmrgfi 1222c35d236eSmrgneed_lib_prefix=unknown 1223c35d236eSmrghardcode_into_libs=no 1224c35d236eSmrg 1225c35d236eSmrg# when you set need_version to no, make sure it does not cause -set_version 1226c35d236eSmrg# flags to be left without arguments 1227c35d236eSmrgneed_version=unknown 1228c35d236eSmrg 1229c35d236eSmrgcase $host_os in 1230c35d236eSmrgaix3*) 1231c35d236eSmrg version_type=linux 1232c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 1233c35d236eSmrg shlibpath_var=LIBPATH 1234c35d236eSmrg 1235c35d236eSmrg # AIX 3 has no versioning support, so we append a major version to the name. 1236c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1237c35d236eSmrg ;; 1238c35d236eSmrg 1239c35d236eSmrgaix4* | aix5*) 1240c35d236eSmrg version_type=linux 1241c35d236eSmrg need_lib_prefix=no 1242c35d236eSmrg need_version=no 1243c35d236eSmrg hardcode_into_libs=yes 1244c35d236eSmrg if test "$host_cpu" = ia64; then 1245c35d236eSmrg # AIX 5 supports IA64 1246c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 1247c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1248c35d236eSmrg else 1249c35d236eSmrg # With GCC up to 2.95.x, collect2 would create an import file 1250c35d236eSmrg # for dependence libraries. The import file would start with 1251c35d236eSmrg # the line `#! .'. This would cause the generated library to 1252c35d236eSmrg # depend on `.', always an invalid library. This was fixed in 1253c35d236eSmrg # development snapshots of GCC prior to 3.0. 1254c35d236eSmrg case $host_os in 1255c35d236eSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 1256c35d236eSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 1257c35d236eSmrg echo ' yes ' 1258c35d236eSmrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 1259c35d236eSmrg : 1260c35d236eSmrg else 1261c35d236eSmrg can_build_shared=no 1262c35d236eSmrg fi 1263c35d236eSmrg ;; 1264c35d236eSmrg esac 1265c35d236eSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 1266c35d236eSmrg # soname into executable. Probably we can add versioning support to 1267c35d236eSmrg # collect2, so additional links can be useful in future. 1268c35d236eSmrg if test "$aix_use_runtimelinking" = yes; then 1269c35d236eSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 1270c35d236eSmrg # instead of lib<name>.a to let people know that these are not 1271c35d236eSmrg # typical AIX shared libraries. 1272c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1273c35d236eSmrg else 1274c35d236eSmrg # We preserve .a as extension for shared libraries through AIX4.2 1275c35d236eSmrg # and later when we are not doing run time linking. 1276c35d236eSmrg library_names_spec='${libname}${release}.a $libname.a' 1277c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1278c35d236eSmrg fi 1279c35d236eSmrg shlibpath_var=LIBPATH 1280c35d236eSmrg fi 1281c35d236eSmrg ;; 1282c35d236eSmrg 1283c35d236eSmrgamigaos*) 1284c35d236eSmrg library_names_spec='$libname.ixlibrary $libname.a' 1285c35d236eSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 1286c35d236eSmrg 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' 1287c35d236eSmrg ;; 1288c35d236eSmrg 1289c35d236eSmrgbeos*) 1290c35d236eSmrg library_names_spec='${libname}${shared_ext}' 1291c35d236eSmrg dynamic_linker="$host_os ld.so" 1292c35d236eSmrg shlibpath_var=LIBRARY_PATH 1293c35d236eSmrg ;; 1294c35d236eSmrg 1295c35d236eSmrgbsdi[[45]]*) 1296c35d236eSmrg version_type=linux 1297c35d236eSmrg need_version=no 1298c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1299c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1300c35d236eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 1301c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1302c35d236eSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 1303c35d236eSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 1304c35d236eSmrg # the default ld.so.conf also contains /usr/contrib/lib and 1305c35d236eSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 1306c35d236eSmrg # libtool to hard-code these into programs 1307c35d236eSmrg ;; 1308c35d236eSmrg 1309c35d236eSmrgcygwin* | mingw* | pw32*) 1310c35d236eSmrg version_type=windows 1311c35d236eSmrg shrext_cmds=".dll" 1312c35d236eSmrg need_version=no 1313c35d236eSmrg need_lib_prefix=no 1314c35d236eSmrg 1315c35d236eSmrg case $GCC,$host_os in 1316c35d236eSmrg yes,cygwin* | yes,mingw* | yes,pw32*) 1317c35d236eSmrg library_names_spec='$libname.dll.a' 1318c35d236eSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 1319c35d236eSmrg postinstall_cmds='base_file=`basename \${file}`~ 1320c35d236eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 1321c35d236eSmrg dldir=$destdir/`dirname \$dlpath`~ 1322c35d236eSmrg test -d \$dldir || mkdir -p \$dldir~ 1323c35d236eSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 1324c35d236eSmrg chmod a+x \$dldir/$dlname' 1325c35d236eSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 1326c35d236eSmrg dlpath=$dir/\$dldll~ 1327c35d236eSmrg $rm \$dlpath' 1328c35d236eSmrg shlibpath_overrides_runpath=yes 1329c35d236eSmrg 1330c35d236eSmrg case $host_os in 1331c35d236eSmrg cygwin*) 1332c35d236eSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 1333c35d236eSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1334c35d236eSmrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 1335c35d236eSmrg ;; 1336c35d236eSmrg mingw*) 1337c35d236eSmrg # MinGW DLLs use traditional 'lib' prefix 1338c35d236eSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1339c35d236eSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1340c35d236eSmrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 1341c35d236eSmrg # It is most probably a Windows format PATH printed by 1342c35d236eSmrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 1343c35d236eSmrg # path with ; separators, and with drive letters. We can handle the 1344c35d236eSmrg # drive letters (cygwin fileutils understands them), so leave them, 1345c35d236eSmrg # especially as we might pass files found there to a mingw objdump, 1346c35d236eSmrg # which wouldn't understand a cygwinified path. Ahh. 1347c35d236eSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1348c35d236eSmrg else 1349c35d236eSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1350c35d236eSmrg fi 1351c35d236eSmrg ;; 1352c35d236eSmrg pw32*) 1353c35d236eSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 1354c35d236eSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1355c35d236eSmrg ;; 1356c35d236eSmrg esac 1357c35d236eSmrg ;; 1358c35d236eSmrg 1359c35d236eSmrg *) 1360c35d236eSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 1361c35d236eSmrg ;; 1362c35d236eSmrg esac 1363c35d236eSmrg dynamic_linker='Win32 ld.exe' 1364c35d236eSmrg # FIXME: first we should search . and the directory the executable is in 1365c35d236eSmrg shlibpath_var=PATH 1366c35d236eSmrg ;; 1367c35d236eSmrg 1368c35d236eSmrgdarwin* | rhapsody*) 1369c35d236eSmrg dynamic_linker="$host_os dyld" 1370c35d236eSmrg version_type=darwin 1371c35d236eSmrg need_lib_prefix=no 1372c35d236eSmrg need_version=no 1373c35d236eSmrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 1374c35d236eSmrg soname_spec='${libname}${release}${major}$shared_ext' 1375c35d236eSmrg shlibpath_overrides_runpath=yes 1376c35d236eSmrg shlibpath_var=DYLD_LIBRARY_PATH 1377c35d236eSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 1378c35d236eSmrg # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 1379c35d236eSmrg if test "$GCC" = yes; then 1380c35d236eSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` 1381c35d236eSmrg else 1382c35d236eSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 1383c35d236eSmrg fi 1384c35d236eSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 1385c35d236eSmrg ;; 1386c35d236eSmrg 1387c35d236eSmrgdgux*) 1388c35d236eSmrg version_type=linux 1389c35d236eSmrg need_lib_prefix=no 1390c35d236eSmrg need_version=no 1391c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 1392c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1393c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1394c35d236eSmrg ;; 1395c35d236eSmrg 1396c35d236eSmrgfreebsd1*) 1397c35d236eSmrg dynamic_linker=no 1398c35d236eSmrg ;; 1399c35d236eSmrg 1400c35d236eSmrgkfreebsd*-gnu) 1401c35d236eSmrg version_type=linux 1402c35d236eSmrg need_lib_prefix=no 1403c35d236eSmrg need_version=no 1404c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1405c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1406c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1407c35d236eSmrg shlibpath_overrides_runpath=no 1408c35d236eSmrg hardcode_into_libs=yes 1409c35d236eSmrg dynamic_linker='GNU ld.so' 1410c35d236eSmrg ;; 1411c35d236eSmrg 1412c35d236eSmrgfreebsd* | dragonfly*) 1413c35d236eSmrg # DragonFly does not have aout. When/if they implement a new 1414c35d236eSmrg # versioning mechanism, adjust this. 1415c35d236eSmrg if test -x /usr/bin/objformat; then 1416c35d236eSmrg objformat=`/usr/bin/objformat` 1417c35d236eSmrg else 1418c35d236eSmrg case $host_os in 1419c35d236eSmrg freebsd[[123]]*) objformat=aout ;; 1420c35d236eSmrg *) objformat=elf ;; 1421c35d236eSmrg esac 1422c35d236eSmrg fi 1423c35d236eSmrg version_type=freebsd-$objformat 1424c35d236eSmrg case $version_type in 1425c35d236eSmrg freebsd-elf*) 1426c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1427c35d236eSmrg need_version=no 1428c35d236eSmrg need_lib_prefix=no 1429c35d236eSmrg ;; 1430c35d236eSmrg freebsd-*) 1431c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 1432c35d236eSmrg need_version=yes 1433c35d236eSmrg ;; 1434c35d236eSmrg esac 1435c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1436c35d236eSmrg case $host_os in 1437c35d236eSmrg freebsd2*) 1438c35d236eSmrg shlibpath_overrides_runpath=yes 1439c35d236eSmrg ;; 1440c35d236eSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 1441c35d236eSmrg shlibpath_overrides_runpath=yes 1442c35d236eSmrg hardcode_into_libs=yes 1443c35d236eSmrg ;; 1444c35d236eSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 1445c35d236eSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 1446c35d236eSmrg shlibpath_overrides_runpath=no 1447c35d236eSmrg hardcode_into_libs=yes 1448c35d236eSmrg ;; 1449c35d236eSmrg freebsd*) # from 4.6 on 1450c35d236eSmrg shlibpath_overrides_runpath=yes 1451c35d236eSmrg hardcode_into_libs=yes 1452c35d236eSmrg ;; 1453c35d236eSmrg esac 1454c35d236eSmrg ;; 1455c35d236eSmrg 1456c35d236eSmrggnu*) 1457c35d236eSmrg version_type=linux 1458c35d236eSmrg need_lib_prefix=no 1459c35d236eSmrg need_version=no 1460c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 1461c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1462c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1463c35d236eSmrg hardcode_into_libs=yes 1464c35d236eSmrg ;; 1465c35d236eSmrg 1466c35d236eSmrghpux9* | hpux10* | hpux11*) 1467c35d236eSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 1468c35d236eSmrg # link against other versions. 1469c35d236eSmrg version_type=sunos 1470c35d236eSmrg need_lib_prefix=no 1471c35d236eSmrg need_version=no 1472c35d236eSmrg case $host_cpu in 1473c35d236eSmrg ia64*) 1474c35d236eSmrg shrext_cmds='.so' 1475c35d236eSmrg hardcode_into_libs=yes 1476c35d236eSmrg dynamic_linker="$host_os dld.so" 1477c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1478c35d236eSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1479c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1480c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1481c35d236eSmrg if test "X$HPUX_IA64_MODE" = X32; then 1482c35d236eSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 1483c35d236eSmrg else 1484c35d236eSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 1485c35d236eSmrg fi 1486c35d236eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1487c35d236eSmrg ;; 1488c35d236eSmrg hppa*64*) 1489c35d236eSmrg shrext_cmds='.sl' 1490c35d236eSmrg hardcode_into_libs=yes 1491c35d236eSmrg dynamic_linker="$host_os dld.sl" 1492c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1493c35d236eSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1494c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1495c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1496c35d236eSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1497c35d236eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1498c35d236eSmrg ;; 1499c35d236eSmrg *) 1500c35d236eSmrg shrext_cmds='.sl' 1501c35d236eSmrg dynamic_linker="$host_os dld.sl" 1502c35d236eSmrg shlibpath_var=SHLIB_PATH 1503c35d236eSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 1504c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1505c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1506c35d236eSmrg ;; 1507c35d236eSmrg esac 1508c35d236eSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 1509c35d236eSmrg postinstall_cmds='chmod 555 $lib' 1510c35d236eSmrg ;; 1511c35d236eSmrg 1512c35d236eSmrginterix3*) 1513c35d236eSmrg version_type=linux 1514c35d236eSmrg need_lib_prefix=no 1515c35d236eSmrg need_version=no 1516c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1517c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1518c35d236eSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 1519c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1520c35d236eSmrg shlibpath_overrides_runpath=no 1521c35d236eSmrg hardcode_into_libs=yes 1522c35d236eSmrg ;; 1523c35d236eSmrg 1524c35d236eSmrgirix5* | irix6* | nonstopux*) 1525c35d236eSmrg case $host_os in 1526c35d236eSmrg nonstopux*) version_type=nonstopux ;; 1527c35d236eSmrg *) 1528c35d236eSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 1529c35d236eSmrg version_type=linux 1530c35d236eSmrg else 1531c35d236eSmrg version_type=irix 1532c35d236eSmrg fi ;; 1533c35d236eSmrg esac 1534c35d236eSmrg need_lib_prefix=no 1535c35d236eSmrg need_version=no 1536c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1537c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 1538c35d236eSmrg case $host_os in 1539c35d236eSmrg irix5* | nonstopux*) 1540c35d236eSmrg libsuff= shlibsuff= 1541c35d236eSmrg ;; 1542c35d236eSmrg *) 1543c35d236eSmrg case $LD in # libtool.m4 will add one of these switches to LD 1544c35d236eSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 1545c35d236eSmrg libsuff= shlibsuff= libmagic=32-bit;; 1546c35d236eSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 1547c35d236eSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 1548c35d236eSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 1549c35d236eSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 1550c35d236eSmrg *) libsuff= shlibsuff= libmagic=never-match;; 1551c35d236eSmrg esac 1552c35d236eSmrg ;; 1553c35d236eSmrg esac 1554c35d236eSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 1555c35d236eSmrg shlibpath_overrides_runpath=no 1556c35d236eSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1557c35d236eSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1558c35d236eSmrg hardcode_into_libs=yes 1559c35d236eSmrg ;; 1560c35d236eSmrg 1561c35d236eSmrg# No shared lib support for Linux oldld, aout, or coff. 1562c35d236eSmrglinux*oldld* | linux*aout* | linux*coff*) 1563c35d236eSmrg dynamic_linker=no 1564c35d236eSmrg ;; 1565c35d236eSmrg 1566c35d236eSmrg# This must be Linux ELF. 1567c35d236eSmrglinux*) 1568c35d236eSmrg version_type=linux 1569c35d236eSmrg need_lib_prefix=no 1570c35d236eSmrg need_version=no 1571c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1572c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1573c35d236eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 1574c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1575c35d236eSmrg shlibpath_overrides_runpath=no 1576c35d236eSmrg # This implies no fast_install, which is unacceptable. 1577c35d236eSmrg # Some rework will be needed to allow for fast_install 1578c35d236eSmrg # before this can be enabled. 1579c35d236eSmrg hardcode_into_libs=yes 1580c35d236eSmrg 1581c35d236eSmrg # find out which ABI we are using 1582c35d236eSmrg libsuff= 1583c35d236eSmrg case "$host_cpu" in 1584c35d236eSmrg x86_64*|s390x*|powerpc64*) 1585c35d236eSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 1586c35d236eSmrg if AC_TRY_EVAL(ac_compile); then 1587c35d236eSmrg case `/usr/bin/file conftest.$ac_objext` in 1588c35d236eSmrg *64-bit*) 1589c35d236eSmrg libsuff=64 1590c35d236eSmrg sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" 1591c35d236eSmrg ;; 1592c35d236eSmrg esac 1593c35d236eSmrg fi 1594c35d236eSmrg rm -rf conftest* 1595c35d236eSmrg ;; 1596c35d236eSmrg esac 1597c35d236eSmrg 1598c35d236eSmrg # Append ld.so.conf contents to the search path 1599c35d236eSmrg if test -f /etc/ld.so.conf; then 1600c35d236eSmrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 1601c35d236eSmrg sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" 1602c35d236eSmrg fi 1603c35d236eSmrg 1604c35d236eSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 1605c35d236eSmrg # powerpc, because MkLinux only supported shared libraries with the 1606c35d236eSmrg # GNU dynamic linker. Since this was broken with cross compilers, 1607c35d236eSmrg # most powerpc-linux boxes support dynamic linking these days and 1608c35d236eSmrg # people can always --disable-shared, the test was removed, and we 1609c35d236eSmrg # assume the GNU/Linux dynamic linker is in use. 1610c35d236eSmrg dynamic_linker='GNU/Linux ld.so' 1611c35d236eSmrg ;; 1612c35d236eSmrg 1613c35d236eSmrgknetbsd*-gnu) 1614c35d236eSmrg version_type=linux 1615c35d236eSmrg need_lib_prefix=no 1616c35d236eSmrg need_version=no 1617c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1618c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1619c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1620c35d236eSmrg shlibpath_overrides_runpath=no 1621c35d236eSmrg hardcode_into_libs=yes 1622c35d236eSmrg dynamic_linker='GNU ld.so' 1623c35d236eSmrg ;; 1624c35d236eSmrg 1625c35d236eSmrgnetbsd*) 1626c35d236eSmrg version_type=sunos 1627c35d236eSmrg need_lib_prefix=no 1628c35d236eSmrg need_version=no 1629c35d236eSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 1630c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1631c35d236eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1632c35d236eSmrg dynamic_linker='NetBSD (a.out) ld.so' 1633c35d236eSmrg else 1634c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1635c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1636c35d236eSmrg dynamic_linker='NetBSD ld.elf_so' 1637c35d236eSmrg fi 1638c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1639c35d236eSmrg shlibpath_overrides_runpath=yes 1640c35d236eSmrg hardcode_into_libs=yes 1641c35d236eSmrg ;; 1642c35d236eSmrg 1643c35d236eSmrgnewsos6) 1644c35d236eSmrg version_type=linux 1645c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1646c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1647c35d236eSmrg shlibpath_overrides_runpath=yes 1648c35d236eSmrg ;; 1649c35d236eSmrg 1650c35d236eSmrgnto-qnx*) 1651c35d236eSmrg version_type=linux 1652c35d236eSmrg need_lib_prefix=no 1653c35d236eSmrg need_version=no 1654c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1655c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1656c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1657c35d236eSmrg shlibpath_overrides_runpath=yes 1658c35d236eSmrg ;; 1659c35d236eSmrg 1660c35d236eSmrgopenbsd*) 1661c35d236eSmrg version_type=sunos 1662c35d236eSmrg sys_lib_dlsearch_path_spec="/usr/lib" 1663c35d236eSmrg need_lib_prefix=no 1664c35d236eSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 1665c35d236eSmrg case $host_os in 1666c35d236eSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 1667c35d236eSmrg *) need_version=no ;; 1668c35d236eSmrg esac 1669c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1670c35d236eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1671c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1672c35d236eSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 1673c35d236eSmrg case $host_os in 1674c35d236eSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 1675c35d236eSmrg shlibpath_overrides_runpath=no 1676c35d236eSmrg ;; 1677c35d236eSmrg *) 1678c35d236eSmrg shlibpath_overrides_runpath=yes 1679c35d236eSmrg ;; 1680c35d236eSmrg esac 1681c35d236eSmrg else 1682c35d236eSmrg shlibpath_overrides_runpath=yes 1683c35d236eSmrg fi 1684c35d236eSmrg ;; 1685c35d236eSmrg 1686c35d236eSmrgos2*) 1687c35d236eSmrg libname_spec='$name' 1688c35d236eSmrg shrext_cmds=".dll" 1689c35d236eSmrg need_lib_prefix=no 1690c35d236eSmrg library_names_spec='$libname${shared_ext} $libname.a' 1691c35d236eSmrg dynamic_linker='OS/2 ld.exe' 1692c35d236eSmrg shlibpath_var=LIBPATH 1693c35d236eSmrg ;; 1694c35d236eSmrg 1695c35d236eSmrgosf3* | osf4* | osf5*) 1696c35d236eSmrg version_type=osf 1697c35d236eSmrg need_lib_prefix=no 1698c35d236eSmrg need_version=no 1699c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1700c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1701c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1702c35d236eSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 1703c35d236eSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 1704c35d236eSmrg ;; 1705c35d236eSmrg 1706c35d236eSmrgsolaris*) 1707c35d236eSmrg version_type=linux 1708c35d236eSmrg need_lib_prefix=no 1709c35d236eSmrg need_version=no 1710c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1711c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1712c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1713c35d236eSmrg shlibpath_overrides_runpath=yes 1714c35d236eSmrg hardcode_into_libs=yes 1715c35d236eSmrg # ldd complains unless libraries are executable 1716c35d236eSmrg postinstall_cmds='chmod +x $lib' 1717c35d236eSmrg ;; 1718c35d236eSmrg 1719c35d236eSmrgsunos4*) 1720c35d236eSmrg version_type=sunos 1721c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1722c35d236eSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 1723c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1724c35d236eSmrg shlibpath_overrides_runpath=yes 1725c35d236eSmrg if test "$with_gnu_ld" = yes; then 1726c35d236eSmrg need_lib_prefix=no 1727c35d236eSmrg fi 1728c35d236eSmrg need_version=yes 1729c35d236eSmrg ;; 1730c35d236eSmrg 1731c35d236eSmrgsysv4 | sysv4.3*) 1732c35d236eSmrg version_type=linux 1733c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1734c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1735c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1736c35d236eSmrg case $host_vendor in 1737c35d236eSmrg sni) 1738c35d236eSmrg shlibpath_overrides_runpath=no 1739c35d236eSmrg need_lib_prefix=no 1740c35d236eSmrg export_dynamic_flag_spec='${wl}-Blargedynsym' 1741c35d236eSmrg runpath_var=LD_RUN_PATH 1742c35d236eSmrg ;; 1743c35d236eSmrg siemens) 1744c35d236eSmrg need_lib_prefix=no 1745c35d236eSmrg ;; 1746c35d236eSmrg motorola) 1747c35d236eSmrg need_lib_prefix=no 1748c35d236eSmrg need_version=no 1749c35d236eSmrg shlibpath_overrides_runpath=no 1750c35d236eSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 1751c35d236eSmrg ;; 1752c35d236eSmrg esac 1753c35d236eSmrg ;; 1754c35d236eSmrg 1755c35d236eSmrgsysv4*MP*) 1756c35d236eSmrg if test -d /usr/nec ;then 1757c35d236eSmrg version_type=linux 1758c35d236eSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 1759c35d236eSmrg soname_spec='$libname${shared_ext}.$major' 1760c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1761c35d236eSmrg fi 1762c35d236eSmrg ;; 1763c35d236eSmrg 1764c35d236eSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 1765c35d236eSmrg version_type=freebsd-elf 1766c35d236eSmrg need_lib_prefix=no 1767c35d236eSmrg need_version=no 1768c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1769c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1770c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1771c35d236eSmrg hardcode_into_libs=yes 1772c35d236eSmrg if test "$with_gnu_ld" = yes; then 1773c35d236eSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 1774c35d236eSmrg shlibpath_overrides_runpath=no 1775c35d236eSmrg else 1776c35d236eSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 1777c35d236eSmrg shlibpath_overrides_runpath=yes 1778c35d236eSmrg case $host_os in 1779c35d236eSmrg sco3.2v5*) 1780c35d236eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 1781c35d236eSmrg ;; 1782c35d236eSmrg esac 1783c35d236eSmrg fi 1784c35d236eSmrg sys_lib_dlsearch_path_spec='/usr/lib' 1785c35d236eSmrg ;; 1786c35d236eSmrg 1787c35d236eSmrguts4*) 1788c35d236eSmrg version_type=linux 1789c35d236eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1790c35d236eSmrg soname_spec='${libname}${release}${shared_ext}$major' 1791c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 1792c35d236eSmrg ;; 1793c35d236eSmrg 1794c35d236eSmrg*) 1795c35d236eSmrg dynamic_linker=no 1796c35d236eSmrg ;; 1797c35d236eSmrgesac 1798c35d236eSmrgAC_MSG_RESULT([$dynamic_linker]) 1799c35d236eSmrgtest "$dynamic_linker" = no && can_build_shared=no 1800c35d236eSmrg 1801c35d236eSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 1802c35d236eSmrgif test "$GCC" = yes; then 1803c35d236eSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 1804c35d236eSmrgfi 1805c35d236eSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1806c35d236eSmrg 1807c35d236eSmrg 1808c35d236eSmrg# _LT_AC_TAGCONFIG 1809c35d236eSmrg# ---------------- 1810c35d236eSmrgAC_DEFUN([_LT_AC_TAGCONFIG], 1811c35d236eSmrg[AC_ARG_WITH([tags], 1812c35d236eSmrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 1813c35d236eSmrg [include additional configurations @<:@automatic@:>@])], 1814c35d236eSmrg [tagnames="$withval"]) 1815c35d236eSmrg 1816c35d236eSmrgif test -f "$ltmain" && test -n "$tagnames"; then 1817c35d236eSmrg if test ! -f "${ofile}"; then 1818c35d236eSmrg AC_MSG_WARN([output file `$ofile' does not exist]) 1819c35d236eSmrg fi 1820c35d236eSmrg 1821c35d236eSmrg if test -z "$LTCC"; then 1822c35d236eSmrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 1823c35d236eSmrg if test -z "$LTCC"; then 1824c35d236eSmrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 1825c35d236eSmrg else 1826c35d236eSmrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 1827c35d236eSmrg fi 1828c35d236eSmrg fi 1829c35d236eSmrg if test -z "$LTCFLAGS"; then 1830c35d236eSmrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 1831c35d236eSmrg fi 1832c35d236eSmrg 1833c35d236eSmrg # Extract list of available tagged configurations in $ofile. 1834c35d236eSmrg # Note that this assumes the entire list is on one line. 1835c35d236eSmrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 1836c35d236eSmrg 1837c35d236eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1838c35d236eSmrg for tagname in $tagnames; do 1839c35d236eSmrg IFS="$lt_save_ifs" 1840c35d236eSmrg # Check whether tagname contains only valid characters 1841c35d236eSmrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 1842c35d236eSmrg "") ;; 1843c35d236eSmrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 1844c35d236eSmrg ;; 1845c35d236eSmrg esac 1846c35d236eSmrg 1847c35d236eSmrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 1848c35d236eSmrg then 1849c35d236eSmrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 1850c35d236eSmrg fi 1851c35d236eSmrg 1852c35d236eSmrg # Update the list of available tags. 1853c35d236eSmrg if test -n "$tagname"; then 1854c35d236eSmrg echo appending configuration tag \"$tagname\" to $ofile 1855c35d236eSmrg 1856c35d236eSmrg case $tagname in 1857c35d236eSmrg CXX) 1858c35d236eSmrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 1859c35d236eSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 1860c35d236eSmrg (test "X$CXX" != "Xg++"))) ; then 1861c35d236eSmrg AC_LIBTOOL_LANG_CXX_CONFIG 1862c35d236eSmrg else 1863c35d236eSmrg tagname="" 1864c35d236eSmrg fi 1865c35d236eSmrg ;; 1866c35d236eSmrg 1867c35d236eSmrg F77) 1868c35d236eSmrg if test -n "$F77" && test "X$F77" != "Xno"; then 1869c35d236eSmrg AC_LIBTOOL_LANG_F77_CONFIG 1870c35d236eSmrg else 1871c35d236eSmrg tagname="" 1872c35d236eSmrg fi 1873c35d236eSmrg ;; 1874c35d236eSmrg 1875c35d236eSmrg GCJ) 1876c35d236eSmrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 1877c35d236eSmrg AC_LIBTOOL_LANG_GCJ_CONFIG 1878c35d236eSmrg else 1879c35d236eSmrg tagname="" 1880c35d236eSmrg fi 1881c35d236eSmrg ;; 1882c35d236eSmrg 1883c35d236eSmrg RC) 1884c35d236eSmrg AC_LIBTOOL_LANG_RC_CONFIG 1885c35d236eSmrg ;; 1886c35d236eSmrg 1887c35d236eSmrg *) 1888c35d236eSmrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 1889c35d236eSmrg ;; 1890c35d236eSmrg esac 1891c35d236eSmrg 1892c35d236eSmrg # Append the new tag name to the list of available tags. 1893c35d236eSmrg if test -n "$tagname" ; then 1894c35d236eSmrg available_tags="$available_tags $tagname" 1895c35d236eSmrg fi 1896c35d236eSmrg fi 1897c35d236eSmrg done 1898c35d236eSmrg IFS="$lt_save_ifs" 1899c35d236eSmrg 1900c35d236eSmrg # Now substitute the updated list of available tags. 1901c35d236eSmrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 1902c35d236eSmrg mv "${ofile}T" "$ofile" 1903c35d236eSmrg chmod +x "$ofile" 1904c35d236eSmrg else 1905c35d236eSmrg rm -f "${ofile}T" 1906c35d236eSmrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 1907c35d236eSmrg fi 1908c35d236eSmrgfi 1909c35d236eSmrg])# _LT_AC_TAGCONFIG 1910c35d236eSmrg 1911c35d236eSmrg 1912c35d236eSmrg# AC_LIBTOOL_DLOPEN 1913c35d236eSmrg# ----------------- 1914c35d236eSmrg# enable checks for dlopen support 1915c35d236eSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 1916c35d236eSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 1917c35d236eSmrg])# AC_LIBTOOL_DLOPEN 1918c35d236eSmrg 1919c35d236eSmrg 1920c35d236eSmrg# AC_LIBTOOL_WIN32_DLL 1921c35d236eSmrg# -------------------- 1922c35d236eSmrg# declare package support for building win32 DLLs 1923c35d236eSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 1924c35d236eSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 1925c35d236eSmrg])# AC_LIBTOOL_WIN32_DLL 1926c35d236eSmrg 1927c35d236eSmrg 1928c35d236eSmrg# AC_ENABLE_SHARED([DEFAULT]) 1929c35d236eSmrg# --------------------------- 1930c35d236eSmrg# implement the --enable-shared flag 1931c35d236eSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1932c35d236eSmrgAC_DEFUN([AC_ENABLE_SHARED], 1933c35d236eSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 1934c35d236eSmrgAC_ARG_ENABLE([shared], 1935c35d236eSmrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 1936c35d236eSmrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 1937c35d236eSmrg [p=${PACKAGE-default} 1938c35d236eSmrg case $enableval in 1939c35d236eSmrg yes) enable_shared=yes ;; 1940c35d236eSmrg no) enable_shared=no ;; 1941c35d236eSmrg *) 1942c35d236eSmrg enable_shared=no 1943c35d236eSmrg # Look at the argument we got. We use all the common list separators. 1944c35d236eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1945c35d236eSmrg for pkg in $enableval; do 1946c35d236eSmrg IFS="$lt_save_ifs" 1947c35d236eSmrg if test "X$pkg" = "X$p"; then 1948c35d236eSmrg enable_shared=yes 1949c35d236eSmrg fi 1950c35d236eSmrg done 1951c35d236eSmrg IFS="$lt_save_ifs" 1952c35d236eSmrg ;; 1953c35d236eSmrg esac], 1954c35d236eSmrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 1955c35d236eSmrg])# AC_ENABLE_SHARED 1956c35d236eSmrg 1957c35d236eSmrg 1958c35d236eSmrg# AC_DISABLE_SHARED 1959c35d236eSmrg# ----------------- 1960c35d236eSmrg# set the default shared flag to --disable-shared 1961c35d236eSmrgAC_DEFUN([AC_DISABLE_SHARED], 1962c35d236eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1963c35d236eSmrgAC_ENABLE_SHARED(no) 1964c35d236eSmrg])# AC_DISABLE_SHARED 1965c35d236eSmrg 1966c35d236eSmrg 1967c35d236eSmrg# AC_ENABLE_STATIC([DEFAULT]) 1968c35d236eSmrg# --------------------------- 1969c35d236eSmrg# implement the --enable-static flag 1970c35d236eSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1971c35d236eSmrgAC_DEFUN([AC_ENABLE_STATIC], 1972c35d236eSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 1973c35d236eSmrgAC_ARG_ENABLE([static], 1974c35d236eSmrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 1975c35d236eSmrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 1976c35d236eSmrg [p=${PACKAGE-default} 1977c35d236eSmrg case $enableval in 1978c35d236eSmrg yes) enable_static=yes ;; 1979c35d236eSmrg no) enable_static=no ;; 1980c35d236eSmrg *) 1981c35d236eSmrg enable_static=no 1982c35d236eSmrg # Look at the argument we got. We use all the common list separators. 1983c35d236eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1984c35d236eSmrg for pkg in $enableval; do 1985c35d236eSmrg IFS="$lt_save_ifs" 1986c35d236eSmrg if test "X$pkg" = "X$p"; then 1987c35d236eSmrg enable_static=yes 1988c35d236eSmrg fi 1989c35d236eSmrg done 1990c35d236eSmrg IFS="$lt_save_ifs" 1991c35d236eSmrg ;; 1992c35d236eSmrg esac], 1993c35d236eSmrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 1994c35d236eSmrg])# AC_ENABLE_STATIC 1995c35d236eSmrg 1996c35d236eSmrg 1997c35d236eSmrg# AC_DISABLE_STATIC 1998c35d236eSmrg# ----------------- 1999c35d236eSmrg# set the default static flag to --disable-static 2000c35d236eSmrgAC_DEFUN([AC_DISABLE_STATIC], 2001c35d236eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2002c35d236eSmrgAC_ENABLE_STATIC(no) 2003c35d236eSmrg])# AC_DISABLE_STATIC 2004c35d236eSmrg 2005c35d236eSmrg 2006c35d236eSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 2007c35d236eSmrg# --------------------------------- 2008c35d236eSmrg# implement the --enable-fast-install flag 2009c35d236eSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2010c35d236eSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 2011c35d236eSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2012c35d236eSmrgAC_ARG_ENABLE([fast-install], 2013c35d236eSmrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2014c35d236eSmrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2015c35d236eSmrg [p=${PACKAGE-default} 2016c35d236eSmrg case $enableval in 2017c35d236eSmrg yes) enable_fast_install=yes ;; 2018c35d236eSmrg no) enable_fast_install=no ;; 2019c35d236eSmrg *) 2020c35d236eSmrg enable_fast_install=no 2021c35d236eSmrg # Look at the argument we got. We use all the common list separators. 2022c35d236eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2023c35d236eSmrg for pkg in $enableval; do 2024c35d236eSmrg IFS="$lt_save_ifs" 2025c35d236eSmrg if test "X$pkg" = "X$p"; then 2026c35d236eSmrg enable_fast_install=yes 2027c35d236eSmrg fi 2028c35d236eSmrg done 2029c35d236eSmrg IFS="$lt_save_ifs" 2030c35d236eSmrg ;; 2031c35d236eSmrg esac], 2032c35d236eSmrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 2033c35d236eSmrg])# AC_ENABLE_FAST_INSTALL 2034c35d236eSmrg 2035c35d236eSmrg 2036c35d236eSmrg# AC_DISABLE_FAST_INSTALL 2037c35d236eSmrg# ----------------------- 2038c35d236eSmrg# set the default to --disable-fast-install 2039c35d236eSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 2040c35d236eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2041c35d236eSmrgAC_ENABLE_FAST_INSTALL(no) 2042c35d236eSmrg])# AC_DISABLE_FAST_INSTALL 2043c35d236eSmrg 2044c35d236eSmrg 2045c35d236eSmrg# AC_LIBTOOL_PICMODE([MODE]) 2046c35d236eSmrg# -------------------------- 2047c35d236eSmrg# implement the --with-pic flag 2048c35d236eSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 2049c35d236eSmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 2050c35d236eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2051c35d236eSmrgpic_mode=ifelse($#,1,$1,default) 2052c35d236eSmrg])# AC_LIBTOOL_PICMODE 2053c35d236eSmrg 2054c35d236eSmrg 2055c35d236eSmrg# AC_PROG_EGREP 2056c35d236eSmrg# ------------- 2057c35d236eSmrg# This is predefined starting with Autoconf 2.54, so this conditional 2058c35d236eSmrg# definition can be removed once we require Autoconf 2.54 or later. 2059c35d236eSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 2060c35d236eSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 2061c35d236eSmrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 2062c35d236eSmrg then ac_cv_prog_egrep='grep -E' 2063c35d236eSmrg else ac_cv_prog_egrep='egrep' 2064c35d236eSmrg fi]) 2065c35d236eSmrg EGREP=$ac_cv_prog_egrep 2066c35d236eSmrg AC_SUBST([EGREP]) 2067c35d236eSmrg])]) 2068c35d236eSmrg 2069c35d236eSmrg 2070c35d236eSmrg# AC_PATH_TOOL_PREFIX 2071c35d236eSmrg# ------------------- 2072c35d236eSmrg# find a file program which can recognise shared library 2073c35d236eSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 2074c35d236eSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2075c35d236eSmrgAC_MSG_CHECKING([for $1]) 2076c35d236eSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2077c35d236eSmrg[case $MAGIC_CMD in 2078c35d236eSmrg[[\\/*] | ?:[\\/]*]) 2079c35d236eSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2080c35d236eSmrg ;; 2081c35d236eSmrg*) 2082c35d236eSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2083c35d236eSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2084c35d236eSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2085c35d236eSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2086c35d236eSmrgdnl not every word. This closes a longstanding sh security hole. 2087c35d236eSmrg ac_dummy="ifelse([$2], , $PATH, [$2])" 2088c35d236eSmrg for ac_dir in $ac_dummy; do 2089c35d236eSmrg IFS="$lt_save_ifs" 2090c35d236eSmrg test -z "$ac_dir" && ac_dir=. 2091c35d236eSmrg if test -f $ac_dir/$1; then 2092c35d236eSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2093c35d236eSmrg if test -n "$file_magic_test_file"; then 2094c35d236eSmrg case $deplibs_check_method in 2095c35d236eSmrg "file_magic "*) 2096c35d236eSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2097c35d236eSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2098c35d236eSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2099c35d236eSmrg $EGREP "$file_magic_regex" > /dev/null; then 2100c35d236eSmrg : 2101c35d236eSmrg else 2102c35d236eSmrg cat <<EOF 1>&2 2103c35d236eSmrg 2104c35d236eSmrg*** Warning: the command libtool uses to detect shared libraries, 2105c35d236eSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2106c35d236eSmrg*** The result is that libtool may fail to recognize shared libraries 2107c35d236eSmrg*** as such. This will affect the creation of libtool libraries that 2108c35d236eSmrg*** depend on shared libraries, but programs linked with such libtool 2109c35d236eSmrg*** libraries will work regardless of this problem. Nevertheless, you 2110c35d236eSmrg*** may want to report the problem to your system manager and/or to 2111c35d236eSmrg*** bug-libtool@gnu.org 2112c35d236eSmrg 2113c35d236eSmrgEOF 2114c35d236eSmrg fi ;; 2115c35d236eSmrg esac 2116c35d236eSmrg fi 2117c35d236eSmrg break 2118c35d236eSmrg fi 2119c35d236eSmrg done 2120c35d236eSmrg IFS="$lt_save_ifs" 2121c35d236eSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2122c35d236eSmrg ;; 2123c35d236eSmrgesac]) 2124c35d236eSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2125c35d236eSmrgif test -n "$MAGIC_CMD"; then 2126c35d236eSmrg AC_MSG_RESULT($MAGIC_CMD) 2127c35d236eSmrgelse 2128c35d236eSmrg AC_MSG_RESULT(no) 2129c35d236eSmrgfi 2130c35d236eSmrg])# AC_PATH_TOOL_PREFIX 2131c35d236eSmrg 2132c35d236eSmrg 2133c35d236eSmrg# AC_PATH_MAGIC 2134c35d236eSmrg# ------------- 2135c35d236eSmrg# find a file program which can recognise a shared library 2136c35d236eSmrgAC_DEFUN([AC_PATH_MAGIC], 2137c35d236eSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2138c35d236eSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 2139c35d236eSmrg if test -n "$ac_tool_prefix"; then 2140c35d236eSmrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2141c35d236eSmrg else 2142c35d236eSmrg MAGIC_CMD=: 2143c35d236eSmrg fi 2144c35d236eSmrgfi 2145c35d236eSmrg])# AC_PATH_MAGIC 2146c35d236eSmrg 2147c35d236eSmrg 2148c35d236eSmrg# AC_PROG_LD 2149c35d236eSmrg# ---------- 2150c35d236eSmrg# find the pathname to the GNU or non-GNU linker 2151c35d236eSmrgAC_DEFUN([AC_PROG_LD], 2152c35d236eSmrg[AC_ARG_WITH([gnu-ld], 2153c35d236eSmrg [AC_HELP_STRING([--with-gnu-ld], 2154c35d236eSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2155c35d236eSmrg [test "$withval" = no || with_gnu_ld=yes], 2156c35d236eSmrg [with_gnu_ld=no]) 2157c35d236eSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 2158c35d236eSmrgAC_REQUIRE([AC_PROG_CC])dnl 2159c35d236eSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2160c35d236eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2161c35d236eSmrgac_prog=ld 2162c35d236eSmrgif test "$GCC" = yes; then 2163c35d236eSmrg # Check if gcc -print-prog-name=ld gives a path. 2164c35d236eSmrg AC_MSG_CHECKING([for ld used by $CC]) 2165c35d236eSmrg case $host in 2166c35d236eSmrg *-*-mingw*) 2167c35d236eSmrg # gcc leaves a trailing carriage return which upsets mingw 2168c35d236eSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2169c35d236eSmrg *) 2170c35d236eSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2171c35d236eSmrg esac 2172c35d236eSmrg case $ac_prog in 2173c35d236eSmrg # Accept absolute paths. 2174c35d236eSmrg [[\\/]]* | ?:[[\\/]]*) 2175c35d236eSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 2176c35d236eSmrg # Canonicalize the pathname of ld 2177c35d236eSmrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2178c35d236eSmrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2179c35d236eSmrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 2180c35d236eSmrg done 2181c35d236eSmrg test -z "$LD" && LD="$ac_prog" 2182c35d236eSmrg ;; 2183c35d236eSmrg "") 2184c35d236eSmrg # If it fails, then pretend we aren't using GCC. 2185c35d236eSmrg ac_prog=ld 2186c35d236eSmrg ;; 2187c35d236eSmrg *) 2188c35d236eSmrg # If it is relative, then search for the first ld in PATH. 2189c35d236eSmrg with_gnu_ld=unknown 2190c35d236eSmrg ;; 2191c35d236eSmrg esac 2192c35d236eSmrgelif test "$with_gnu_ld" = yes; then 2193c35d236eSmrg AC_MSG_CHECKING([for GNU ld]) 2194c35d236eSmrgelse 2195c35d236eSmrg AC_MSG_CHECKING([for non-GNU ld]) 2196c35d236eSmrgfi 2197c35d236eSmrgAC_CACHE_VAL(lt_cv_path_LD, 2198c35d236eSmrg[if test -z "$LD"; then 2199c35d236eSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2200c35d236eSmrg for ac_dir in $PATH; do 2201c35d236eSmrg IFS="$lt_save_ifs" 2202c35d236eSmrg test -z "$ac_dir" && ac_dir=. 2203c35d236eSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2204c35d236eSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 2205c35d236eSmrg # Check to see if the program is GNU ld. I'd rather use --version, 2206c35d236eSmrg # but apparently some variants of GNU ld only accept -v. 2207c35d236eSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 2208c35d236eSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2209c35d236eSmrg *GNU* | *'with BFD'*) 2210c35d236eSmrg test "$with_gnu_ld" != no && break 2211c35d236eSmrg ;; 2212c35d236eSmrg *) 2213c35d236eSmrg test "$with_gnu_ld" != yes && break 2214c35d236eSmrg ;; 2215c35d236eSmrg esac 2216c35d236eSmrg fi 2217c35d236eSmrg done 2218c35d236eSmrg IFS="$lt_save_ifs" 2219c35d236eSmrgelse 2220c35d236eSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 2221c35d236eSmrgfi]) 2222c35d236eSmrgLD="$lt_cv_path_LD" 2223c35d236eSmrgif test -n "$LD"; then 2224c35d236eSmrg AC_MSG_RESULT($LD) 2225c35d236eSmrgelse 2226c35d236eSmrg AC_MSG_RESULT(no) 2227c35d236eSmrgfi 2228c35d236eSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2229c35d236eSmrgAC_PROG_LD_GNU 2230c35d236eSmrg])# AC_PROG_LD 2231c35d236eSmrg 2232c35d236eSmrg 2233c35d236eSmrg# AC_PROG_LD_GNU 2234c35d236eSmrg# -------------- 2235c35d236eSmrgAC_DEFUN([AC_PROG_LD_GNU], 2236c35d236eSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2237c35d236eSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2238c35d236eSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2239c35d236eSmrgcase `$LD -v 2>&1 </dev/null` in 2240c35d236eSmrg*GNU* | *'with BFD'*) 2241c35d236eSmrg lt_cv_prog_gnu_ld=yes 2242c35d236eSmrg ;; 2243c35d236eSmrg*) 2244c35d236eSmrg lt_cv_prog_gnu_ld=no 2245c35d236eSmrg ;; 2246c35d236eSmrgesac]) 2247c35d236eSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2248c35d236eSmrg])# AC_PROG_LD_GNU 2249c35d236eSmrg 2250c35d236eSmrg 2251c35d236eSmrg# AC_PROG_LD_RELOAD_FLAG 2252c35d236eSmrg# ---------------------- 2253c35d236eSmrg# find reload flag for linker 2254c35d236eSmrg# -- PORTME Some linkers may need a different reload flag. 2255c35d236eSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 2256c35d236eSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 2257c35d236eSmrg lt_cv_ld_reload_flag, 2258c35d236eSmrg [lt_cv_ld_reload_flag='-r']) 2259c35d236eSmrgreload_flag=$lt_cv_ld_reload_flag 2260c35d236eSmrgcase $reload_flag in 2261c35d236eSmrg"" | " "*) ;; 2262c35d236eSmrg*) reload_flag=" $reload_flag" ;; 2263c35d236eSmrgesac 2264c35d236eSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 2265c35d236eSmrgcase $host_os in 2266c35d236eSmrg darwin*) 2267c35d236eSmrg if test "$GCC" = yes; then 2268c35d236eSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2269c35d236eSmrg else 2270c35d236eSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 2271c35d236eSmrg fi 2272c35d236eSmrg ;; 2273c35d236eSmrgesac 2274c35d236eSmrg])# AC_PROG_LD_RELOAD_FLAG 2275c35d236eSmrg 2276c35d236eSmrg 2277c35d236eSmrg# AC_DEPLIBS_CHECK_METHOD 2278c35d236eSmrg# ----------------------- 2279c35d236eSmrg# how to check for library dependencies 2280c35d236eSmrg# -- PORTME fill in with the dynamic library characteristics 2281c35d236eSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2282c35d236eSmrg[AC_CACHE_CHECK([how to recognise dependent libraries], 2283c35d236eSmrglt_cv_deplibs_check_method, 2284c35d236eSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 2285c35d236eSmrglt_cv_file_magic_test_file= 2286c35d236eSmrglt_cv_deplibs_check_method='unknown' 2287c35d236eSmrg# Need to set the preceding variable on all platforms that support 2288c35d236eSmrg# interlibrary dependencies. 2289c35d236eSmrg# 'none' -- dependencies not supported. 2290c35d236eSmrg# `unknown' -- same as none, but documents that we really don't know. 2291c35d236eSmrg# 'pass_all' -- all dependencies passed with no checks. 2292c35d236eSmrg# 'test_compile' -- check by making test program. 2293c35d236eSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 2294c35d236eSmrg# which responds to the $file_magic_cmd with a given extended regex. 2295c35d236eSmrg# If you have `file' or equivalent on your system and you're not sure 2296c35d236eSmrg# whether `pass_all' will *always* work, you probably want this one. 2297c35d236eSmrg 2298c35d236eSmrgcase $host_os in 2299c35d236eSmrgaix4* | aix5*) 2300c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2301c35d236eSmrg ;; 2302c35d236eSmrg 2303c35d236eSmrgbeos*) 2304c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2305c35d236eSmrg ;; 2306c35d236eSmrg 2307c35d236eSmrgbsdi[[45]]*) 2308c35d236eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 2309c35d236eSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 2310c35d236eSmrg lt_cv_file_magic_test_file=/shlib/libc.so 2311c35d236eSmrg ;; 2312c35d236eSmrg 2313c35d236eSmrgcygwin*) 2314c35d236eSmrg # func_win32_libid is a shell function defined in ltmain.sh 2315c35d236eSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2316c35d236eSmrg lt_cv_file_magic_cmd='func_win32_libid' 2317c35d236eSmrg ;; 2318c35d236eSmrg 2319c35d236eSmrgmingw* | pw32*) 2320c35d236eSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 2321c35d236eSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump'. 2322c35d236eSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 2323c35d236eSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 2324c35d236eSmrg ;; 2325c35d236eSmrg 2326c35d236eSmrgdarwin* | rhapsody*) 2327c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2328c35d236eSmrg ;; 2329c35d236eSmrg 2330c35d236eSmrgfreebsd* | kfreebsd*-gnu | dragonfly*) 2331c35d236eSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2332c35d236eSmrg case $host_cpu in 2333c35d236eSmrg i*86 ) 2334c35d236eSmrg # Not sure whether the presence of OpenBSD here was a mistake. 2335c35d236eSmrg # Let's accept both of them until this is cleared up. 2336c35d236eSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 2337c35d236eSmrg lt_cv_file_magic_cmd=/usr/bin/file 2338c35d236eSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2339c35d236eSmrg ;; 2340c35d236eSmrg esac 2341c35d236eSmrg else 2342c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2343c35d236eSmrg fi 2344c35d236eSmrg ;; 2345c35d236eSmrg 2346c35d236eSmrggnu*) 2347c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2348c35d236eSmrg ;; 2349c35d236eSmrg 2350c35d236eSmrghpux10.20* | hpux11*) 2351c35d236eSmrg lt_cv_file_magic_cmd=/usr/bin/file 2352c35d236eSmrg case $host_cpu in 2353c35d236eSmrg ia64*) 2354c35d236eSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 2355c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 2356c35d236eSmrg ;; 2357c35d236eSmrg hppa*64*) 2358c35d236eSmrg [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]'] 2359c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 2360c35d236eSmrg ;; 2361c35d236eSmrg *) 2362c35d236eSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 2363c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 2364c35d236eSmrg ;; 2365c35d236eSmrg esac 2366c35d236eSmrg ;; 2367c35d236eSmrg 2368c35d236eSmrginterix3*) 2369c35d236eSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 2370c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 2371c35d236eSmrg ;; 2372c35d236eSmrg 2373c35d236eSmrgirix5* | irix6* | nonstopux*) 2374c35d236eSmrg case $LD in 2375c35d236eSmrg *-32|*"-32 ") libmagic=32-bit;; 2376c35d236eSmrg *-n32|*"-n32 ") libmagic=N32;; 2377c35d236eSmrg *-64|*"-64 ") libmagic=64-bit;; 2378c35d236eSmrg *) libmagic=never-match;; 2379c35d236eSmrg esac 2380c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2381c35d236eSmrg ;; 2382c35d236eSmrg 2383c35d236eSmrg# This must be Linux ELF. 2384c35d236eSmrglinux*) 2385c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2386c35d236eSmrg ;; 2387c35d236eSmrg 2388c35d236eSmrgnetbsd*) 2389c35d236eSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2390c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2391c35d236eSmrg else 2392c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 2393c35d236eSmrg fi 2394c35d236eSmrg ;; 2395c35d236eSmrg 2396c35d236eSmrgnewos6*) 2397c35d236eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 2398c35d236eSmrg lt_cv_file_magic_cmd=/usr/bin/file 2399c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 2400c35d236eSmrg ;; 2401c35d236eSmrg 2402c35d236eSmrgnto-qnx*) 2403c35d236eSmrg lt_cv_deplibs_check_method=unknown 2404c35d236eSmrg ;; 2405c35d236eSmrg 2406c35d236eSmrgopenbsd*) 2407c35d236eSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2408c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 2409c35d236eSmrg else 2410c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2411c35d236eSmrg fi 2412c35d236eSmrg ;; 2413c35d236eSmrg 2414c35d236eSmrgosf3* | osf4* | osf5*) 2415c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2416c35d236eSmrg ;; 2417c35d236eSmrg 2418c35d236eSmrgsolaris*) 2419c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2420c35d236eSmrg ;; 2421c35d236eSmrg 2422c35d236eSmrgsysv4 | sysv4.3*) 2423c35d236eSmrg case $host_vendor in 2424c35d236eSmrg motorola) 2425c35d236eSmrg 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]]' 2426c35d236eSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 2427c35d236eSmrg ;; 2428c35d236eSmrg ncr) 2429c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2430c35d236eSmrg ;; 2431c35d236eSmrg sequent) 2432c35d236eSmrg lt_cv_file_magic_cmd='/bin/file' 2433c35d236eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 2434c35d236eSmrg ;; 2435c35d236eSmrg sni) 2436c35d236eSmrg lt_cv_file_magic_cmd='/bin/file' 2437c35d236eSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 2438c35d236eSmrg lt_cv_file_magic_test_file=/lib/libc.so 2439c35d236eSmrg ;; 2440c35d236eSmrg siemens) 2441c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2442c35d236eSmrg ;; 2443c35d236eSmrg pc) 2444c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2445c35d236eSmrg ;; 2446c35d236eSmrg esac 2447c35d236eSmrg ;; 2448c35d236eSmrg 2449c35d236eSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2450c35d236eSmrg lt_cv_deplibs_check_method=pass_all 2451c35d236eSmrg ;; 2452c35d236eSmrgesac 2453c35d236eSmrg]) 2454c35d236eSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 2455c35d236eSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 2456c35d236eSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 2457c35d236eSmrg])# AC_DEPLIBS_CHECK_METHOD 2458c35d236eSmrg 2459c35d236eSmrg 2460c35d236eSmrg# AC_PROG_NM 2461c35d236eSmrg# ---------- 2462c35d236eSmrg# find the pathname to a BSD-compatible name lister 2463c35d236eSmrgAC_DEFUN([AC_PROG_NM], 2464c35d236eSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 2465c35d236eSmrg[if test -n "$NM"; then 2466c35d236eSmrg # Let the user override the test. 2467c35d236eSmrg lt_cv_path_NM="$NM" 2468c35d236eSmrgelse 2469c35d236eSmrg lt_nm_to_check="${ac_tool_prefix}nm" 2470c35d236eSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 2471c35d236eSmrg lt_nm_to_check="$lt_nm_to_check nm" 2472c35d236eSmrg fi 2473c35d236eSmrg for lt_tmp_nm in $lt_nm_to_check; do 2474c35d236eSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2475c35d236eSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 2476c35d236eSmrg IFS="$lt_save_ifs" 2477c35d236eSmrg test -z "$ac_dir" && ac_dir=. 2478c35d236eSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 2479c35d236eSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 2480c35d236eSmrg # Check to see if the nm accepts a BSD-compat flag. 2481c35d236eSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 2482c35d236eSmrg # nm: unknown option "B" ignored 2483c35d236eSmrg # Tru64's nm complains that /dev/null is an invalid object file 2484c35d236eSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 2485c35d236eSmrg */dev/null* | *'Invalid file or object type'*) 2486c35d236eSmrg lt_cv_path_NM="$tmp_nm -B" 2487c35d236eSmrg break 2488c35d236eSmrg ;; 2489c35d236eSmrg *) 2490c35d236eSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 2491c35d236eSmrg */dev/null*) 2492c35d236eSmrg lt_cv_path_NM="$tmp_nm -p" 2493c35d236eSmrg break 2494c35d236eSmrg ;; 2495c35d236eSmrg *) 2496c35d236eSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 2497c35d236eSmrg continue # so that we can try to find one that supports BSD flags 2498c35d236eSmrg ;; 2499c35d236eSmrg esac 2500c35d236eSmrg ;; 2501c35d236eSmrg esac 2502c35d236eSmrg fi 2503c35d236eSmrg done 2504c35d236eSmrg IFS="$lt_save_ifs" 2505c35d236eSmrg done 2506c35d236eSmrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 2507c35d236eSmrgfi]) 2508c35d236eSmrgNM="$lt_cv_path_NM" 2509c35d236eSmrg])# AC_PROG_NM 2510c35d236eSmrg 2511c35d236eSmrg 2512c35d236eSmrg# AC_CHECK_LIBM 2513c35d236eSmrg# ------------- 2514c35d236eSmrg# check for math library 2515c35d236eSmrgAC_DEFUN([AC_CHECK_LIBM], 2516c35d236eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2517c35d236eSmrgLIBM= 2518c35d236eSmrgcase $host in 2519c35d236eSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 2520c35d236eSmrg # These system don't have libm, or don't need it 2521c35d236eSmrg ;; 2522c35d236eSmrg*-ncr-sysv4.3*) 2523c35d236eSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 2524c35d236eSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 2525c35d236eSmrg ;; 2526c35d236eSmrg*) 2527c35d236eSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 2528c35d236eSmrg ;; 2529c35d236eSmrgesac 2530c35d236eSmrg])# AC_CHECK_LIBM 2531c35d236eSmrg 2532c35d236eSmrg 2533c35d236eSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 2534c35d236eSmrg# ----------------------------------- 2535c35d236eSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and 2536c35d236eSmrg# LTDLINCL to the include flags for the libltdl header and adds 2537c35d236eSmrg# --enable-ltdl-convenience to the configure arguments. Note that 2538c35d236eSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2539c35d236eSmrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 2540c35d236eSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 2541c35d236eSmrg# (note the single quotes!). If your package is not flat and you're not 2542c35d236eSmrg# using automake, define top_builddir and top_srcdir appropriately in 2543c35d236eSmrg# the Makefiles. 2544c35d236eSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 2545c35d236eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2546c35d236eSmrg case $enable_ltdl_convenience in 2547c35d236eSmrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2548c35d236eSmrg "") enable_ltdl_convenience=yes 2549c35d236eSmrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2550c35d236eSmrg esac 2551c35d236eSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2552c35d236eSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2553c35d236eSmrg # For backwards non-gettext consistent compatibility... 2554c35d236eSmrg INCLTDL="$LTDLINCL" 2555c35d236eSmrg])# AC_LIBLTDL_CONVENIENCE 2556c35d236eSmrg 2557c35d236eSmrg 2558c35d236eSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 2559c35d236eSmrg# ----------------------------------- 2560c35d236eSmrg# sets LIBLTDL to the link flags for the libltdl installable library and 2561c35d236eSmrg# LTDLINCL to the include flags for the libltdl header and adds 2562c35d236eSmrg# --enable-ltdl-install to the configure arguments. Note that 2563c35d236eSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2564c35d236eSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 2565c35d236eSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 2566c35d236eSmrg# '${top_srcdir}/' (note the single quotes!). If your package is not 2567c35d236eSmrg# flat and you're not using automake, define top_builddir and top_srcdir 2568c35d236eSmrg# appropriately in the Makefiles. 2569c35d236eSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2570c35d236eSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 2571c35d236eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2572c35d236eSmrg AC_CHECK_LIB(ltdl, lt_dlinit, 2573c35d236eSmrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2574c35d236eSmrg [if test x"$enable_ltdl_install" = xno; then 2575c35d236eSmrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 2576c35d236eSmrg else 2577c35d236eSmrg enable_ltdl_install=yes 2578c35d236eSmrg fi 2579c35d236eSmrg ]) 2580c35d236eSmrg if test x"$enable_ltdl_install" = x"yes"; then 2581c35d236eSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 2582c35d236eSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2583c35d236eSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2584c35d236eSmrg else 2585c35d236eSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2586c35d236eSmrg LIBLTDL="-lltdl" 2587c35d236eSmrg LTDLINCL= 2588c35d236eSmrg fi 2589c35d236eSmrg # For backwards non-gettext consistent compatibility... 2590c35d236eSmrg INCLTDL="$LTDLINCL" 2591c35d236eSmrg])# AC_LIBLTDL_INSTALLABLE 2592c35d236eSmrg 2593c35d236eSmrg 2594c35d236eSmrg# AC_LIBTOOL_CXX 2595c35d236eSmrg# -------------- 2596c35d236eSmrg# enable support for C++ libraries 2597c35d236eSmrgAC_DEFUN([AC_LIBTOOL_CXX], 2598c35d236eSmrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 2599c35d236eSmrg])# AC_LIBTOOL_CXX 2600c35d236eSmrg 2601c35d236eSmrg 2602c35d236eSmrg# _LT_AC_LANG_CXX 2603c35d236eSmrg# --------------- 2604c35d236eSmrgAC_DEFUN([_LT_AC_LANG_CXX], 2605c35d236eSmrg[AC_REQUIRE([AC_PROG_CXX]) 2606c35d236eSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2607c35d236eSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 2608c35d236eSmrg])# _LT_AC_LANG_CXX 2609c35d236eSmrg 2610c35d236eSmrg# _LT_AC_PROG_CXXCPP 2611c35d236eSmrg# ------------------ 2612c35d236eSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 2613c35d236eSmrg[ 2614c35d236eSmrgAC_REQUIRE([AC_PROG_CXX]) 2615c35d236eSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 2616c35d236eSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 2617c35d236eSmrg (test "X$CXX" != "Xg++"))) ; then 2618c35d236eSmrg AC_PROG_CXXCPP 2619c35d236eSmrgfi 2620c35d236eSmrg])# _LT_AC_PROG_CXXCPP 2621c35d236eSmrg 2622c35d236eSmrg# AC_LIBTOOL_F77 2623c35d236eSmrg# -------------- 2624c35d236eSmrg# enable support for Fortran 77 libraries 2625c35d236eSmrgAC_DEFUN([AC_LIBTOOL_F77], 2626c35d236eSmrg[AC_REQUIRE([_LT_AC_LANG_F77]) 2627c35d236eSmrg])# AC_LIBTOOL_F77 2628c35d236eSmrg 2629c35d236eSmrg 2630c35d236eSmrg# _LT_AC_LANG_F77 2631c35d236eSmrg# --------------- 2632c35d236eSmrgAC_DEFUN([_LT_AC_LANG_F77], 2633c35d236eSmrg[AC_REQUIRE([AC_PROG_F77]) 2634c35d236eSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 2635c35d236eSmrg])# _LT_AC_LANG_F77 2636c35d236eSmrg 2637c35d236eSmrg 2638c35d236eSmrg# AC_LIBTOOL_GCJ 2639c35d236eSmrg# -------------- 2640c35d236eSmrg# enable support for GCJ libraries 2641c35d236eSmrgAC_DEFUN([AC_LIBTOOL_GCJ], 2642c35d236eSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 2643c35d236eSmrg])# AC_LIBTOOL_GCJ 2644c35d236eSmrg 2645c35d236eSmrg 2646c35d236eSmrg# _LT_AC_LANG_GCJ 2647c35d236eSmrg# --------------- 2648c35d236eSmrgAC_DEFUN([_LT_AC_LANG_GCJ], 2649c35d236eSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 2650c35d236eSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 2651c35d236eSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 2652c35d236eSmrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 2653c35d236eSmrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 2654c35d236eSmrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 2655c35d236eSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 2656c35d236eSmrg])# _LT_AC_LANG_GCJ 2657c35d236eSmrg 2658c35d236eSmrg 2659c35d236eSmrg# AC_LIBTOOL_RC 2660c35d236eSmrg# ------------- 2661c35d236eSmrg# enable support for Windows resource files 2662c35d236eSmrgAC_DEFUN([AC_LIBTOOL_RC], 2663c35d236eSmrg[AC_REQUIRE([LT_AC_PROG_RC]) 2664c35d236eSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 2665c35d236eSmrg])# AC_LIBTOOL_RC 2666c35d236eSmrg 2667c35d236eSmrg 2668c35d236eSmrg# AC_LIBTOOL_LANG_C_CONFIG 2669c35d236eSmrg# ------------------------ 2670c35d236eSmrg# Ensure that the configuration vars for the C compiler are 2671c35d236eSmrg# suitably defined. Those variables are subsequently used by 2672c35d236eSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2673c35d236eSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 2674c35d236eSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 2675c35d236eSmrg[lt_save_CC="$CC" 2676c35d236eSmrgAC_LANG_PUSH(C) 2677c35d236eSmrg 2678c35d236eSmrg# Source file extension for C test sources. 2679c35d236eSmrgac_ext=c 2680c35d236eSmrg 2681c35d236eSmrg# Object file extension for compiled C test sources. 2682c35d236eSmrgobjext=o 2683c35d236eSmrg_LT_AC_TAGVAR(objext, $1)=$objext 2684c35d236eSmrg 2685c35d236eSmrg# Code to be used in simple compile tests 2686c35d236eSmrglt_simple_compile_test_code="int some_variable = 0;\n" 2687c35d236eSmrg 2688c35d236eSmrg# Code to be used in simple link tests 2689c35d236eSmrglt_simple_link_test_code='int main(){return(0);}\n' 2690c35d236eSmrg 2691c35d236eSmrg_LT_AC_SYS_COMPILER 2692c35d236eSmrg 2693c35d236eSmrg# save warnings/boilerplate of simple test code 2694c35d236eSmrg_LT_COMPILER_BOILERPLATE 2695c35d236eSmrg_LT_LINKER_BOILERPLATE 2696c35d236eSmrg 2697c35d236eSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 2698c35d236eSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 2699c35d236eSmrgAC_LIBTOOL_PROG_CC_C_O($1) 2700c35d236eSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 2701c35d236eSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 2702c35d236eSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 2703c35d236eSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 2704c35d236eSmrgAC_LIBTOOL_SYS_LIB_STRIP 2705c35d236eSmrgAC_LIBTOOL_DLOPEN_SELF 2706c35d236eSmrg 2707c35d236eSmrg# Report which library types will actually be built 2708c35d236eSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 2709c35d236eSmrgAC_MSG_RESULT([$can_build_shared]) 2710c35d236eSmrg 2711c35d236eSmrgAC_MSG_CHECKING([whether to build shared libraries]) 2712c35d236eSmrgtest "$can_build_shared" = "no" && enable_shared=no 2713c35d236eSmrg 2714c35d236eSmrg# On AIX, shared libraries and static libraries use the same namespace, and 2715c35d236eSmrg# are all built from PIC. 2716c35d236eSmrgcase $host_os in 2717c35d236eSmrgaix3*) 2718c35d236eSmrg test "$enable_shared" = yes && enable_static=no 2719c35d236eSmrg if test -n "$RANLIB"; then 2720c35d236eSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 2721c35d236eSmrg postinstall_cmds='$RANLIB $lib' 2722c35d236eSmrg fi 2723c35d236eSmrg ;; 2724c35d236eSmrg 2725c35d236eSmrgaix4* | aix5*) 2726c35d236eSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 2727c35d236eSmrg test "$enable_shared" = yes && enable_static=no 2728c35d236eSmrg fi 2729c35d236eSmrg ;; 2730c35d236eSmrgesac 2731c35d236eSmrgAC_MSG_RESULT([$enable_shared]) 2732c35d236eSmrg 2733c35d236eSmrgAC_MSG_CHECKING([whether to build static libraries]) 2734c35d236eSmrg# Make sure either enable_shared or enable_static is yes. 2735c35d236eSmrgtest "$enable_shared" = yes || enable_static=yes 2736c35d236eSmrgAC_MSG_RESULT([$enable_static]) 2737c35d236eSmrg 2738c35d236eSmrgAC_LIBTOOL_CONFIG($1) 2739c35d236eSmrg 2740c35d236eSmrgAC_LANG_POP 2741c35d236eSmrgCC="$lt_save_CC" 2742c35d236eSmrg])# AC_LIBTOOL_LANG_C_CONFIG 2743c35d236eSmrg 2744c35d236eSmrg 2745c35d236eSmrg# AC_LIBTOOL_LANG_CXX_CONFIG 2746c35d236eSmrg# -------------------------- 2747c35d236eSmrg# Ensure that the configuration vars for the C compiler are 2748c35d236eSmrg# suitably defined. Those variables are subsequently used by 2749c35d236eSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2750c35d236eSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 2751c35d236eSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 2752c35d236eSmrg[AC_LANG_PUSH(C++) 2753c35d236eSmrgAC_REQUIRE([AC_PROG_CXX]) 2754c35d236eSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2755c35d236eSmrg 2756c35d236eSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2757c35d236eSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 2758c35d236eSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 2759c35d236eSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 2760c35d236eSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 2761c35d236eSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 2762c35d236eSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 2763c35d236eSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 2764c35d236eSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2765c35d236eSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 2766c35d236eSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2767c35d236eSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 2768c35d236eSmrg_LT_AC_TAGVAR(module_cmds, $1)= 2769c35d236eSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 2770c35d236eSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 2771c35d236eSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 2772c35d236eSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 2773c35d236eSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2774c35d236eSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 2775c35d236eSmrg 2776c35d236eSmrg# Dependencies to place before and after the object being linked: 2777c35d236eSmrg_LT_AC_TAGVAR(predep_objects, $1)= 2778c35d236eSmrg_LT_AC_TAGVAR(postdep_objects, $1)= 2779c35d236eSmrg_LT_AC_TAGVAR(predeps, $1)= 2780c35d236eSmrg_LT_AC_TAGVAR(postdeps, $1)= 2781c35d236eSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 2782c35d236eSmrg 2783c35d236eSmrg# Source file extension for C++ test sources. 2784c35d236eSmrgac_ext=cpp 2785c35d236eSmrg 2786c35d236eSmrg# Object file extension for compiled C++ test sources. 2787c35d236eSmrgobjext=o 2788c35d236eSmrg_LT_AC_TAGVAR(objext, $1)=$objext 2789c35d236eSmrg 2790c35d236eSmrg# Code to be used in simple compile tests 2791c35d236eSmrglt_simple_compile_test_code="int some_variable = 0;\n" 2792c35d236eSmrg 2793c35d236eSmrg# Code to be used in simple link tests 2794c35d236eSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' 2795c35d236eSmrg 2796c35d236eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 2797c35d236eSmrg_LT_AC_SYS_COMPILER 2798c35d236eSmrg 2799c35d236eSmrg# save warnings/boilerplate of simple test code 2800c35d236eSmrg_LT_COMPILER_BOILERPLATE 2801c35d236eSmrg_LT_LINKER_BOILERPLATE 2802c35d236eSmrg 2803c35d236eSmrg# Allow CC to be a program name with arguments. 2804c35d236eSmrglt_save_CC=$CC 2805c35d236eSmrglt_save_LD=$LD 2806c35d236eSmrglt_save_GCC=$GCC 2807c35d236eSmrgGCC=$GXX 2808c35d236eSmrglt_save_with_gnu_ld=$with_gnu_ld 2809c35d236eSmrglt_save_path_LD=$lt_cv_path_LD 2810c35d236eSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 2811c35d236eSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 2812c35d236eSmrgelse 2813c35d236eSmrg $as_unset lt_cv_prog_gnu_ld 2814c35d236eSmrgfi 2815c35d236eSmrgif test -n "${lt_cv_path_LDCXX+set}"; then 2816c35d236eSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 2817c35d236eSmrgelse 2818c35d236eSmrg $as_unset lt_cv_path_LD 2819c35d236eSmrgfi 2820c35d236eSmrgtest -z "${LDCXX+set}" || LD=$LDCXX 2821c35d236eSmrgCC=${CXX-"c++"} 2822c35d236eSmrgcompiler=$CC 2823c35d236eSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 2824c35d236eSmrg_LT_CC_BASENAME([$compiler]) 2825c35d236eSmrg 2826c35d236eSmrg# We don't want -fno-exception wen compiling C++ code, so set the 2827c35d236eSmrg# no_builtin_flag separately 2828c35d236eSmrgif test "$GXX" = yes; then 2829c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 2830c35d236eSmrgelse 2831c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 2832c35d236eSmrgfi 2833c35d236eSmrg 2834c35d236eSmrgif test "$GXX" = yes; then 2835c35d236eSmrg # Set up default GNU C++ configuration 2836c35d236eSmrg 2837c35d236eSmrg AC_PROG_LD 2838c35d236eSmrg 2839c35d236eSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 2840c35d236eSmrg # archiving commands below assume that GNU ld is being used. 2841c35d236eSmrg if test "$with_gnu_ld" = yes; then 2842c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 2843c35d236eSmrg _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' 2844c35d236eSmrg 2845c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 2846c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 2847c35d236eSmrg 2848c35d236eSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 2849c35d236eSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 2850c35d236eSmrg # investigate it a little bit more. (MM) 2851c35d236eSmrg wlarc='${wl}' 2852c35d236eSmrg 2853c35d236eSmrg # ancient GNU ld didn't support --whole-archive et. al. 2854c35d236eSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 2855c35d236eSmrg grep 'no-whole-archive' > /dev/null; then 2856c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 2857c35d236eSmrg else 2858c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2859c35d236eSmrg fi 2860c35d236eSmrg else 2861c35d236eSmrg with_gnu_ld=no 2862c35d236eSmrg wlarc= 2863c35d236eSmrg 2864c35d236eSmrg # A generic and very simple default shared library creation 2865c35d236eSmrg # command for GNU C++ for the case where it uses the native 2866c35d236eSmrg # linker, instead of GNU ld. If possible, this setting should 2867c35d236eSmrg # overridden to take advantage of the native linker features on 2868c35d236eSmrg # the platform it is being used on. 2869c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 2870c35d236eSmrg fi 2871c35d236eSmrg 2872c35d236eSmrg # Commands to make compiler produce verbose output that lists 2873c35d236eSmrg # what "hidden" libraries, object files and flags are used when 2874c35d236eSmrg # linking a shared library. 2875c35d236eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 2876c35d236eSmrg 2877c35d236eSmrgelse 2878c35d236eSmrg GXX=no 2879c35d236eSmrg with_gnu_ld=no 2880c35d236eSmrg wlarc= 2881c35d236eSmrgfi 2882c35d236eSmrg 2883c35d236eSmrg# PORTME: fill in a description of your system's C++ link characteristics 2884c35d236eSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 2885c35d236eSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 2886c35d236eSmrgcase $host_os in 2887c35d236eSmrg aix3*) 2888c35d236eSmrg # FIXME: insert proper C++ library support 2889c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 2890c35d236eSmrg ;; 2891c35d236eSmrg aix4* | aix5*) 2892c35d236eSmrg if test "$host_cpu" = ia64; then 2893c35d236eSmrg # On IA64, the linker does run time linking by default, so we don't 2894c35d236eSmrg # have to do anything special. 2895c35d236eSmrg aix_use_runtimelinking=no 2896c35d236eSmrg exp_sym_flag='-Bexport' 2897c35d236eSmrg no_entry_flag="" 2898c35d236eSmrg else 2899c35d236eSmrg aix_use_runtimelinking=no 2900c35d236eSmrg 2901c35d236eSmrg # Test if we are trying to use run time linking or normal 2902c35d236eSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 2903c35d236eSmrg # need to do runtime linking. 2904c35d236eSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 2905c35d236eSmrg for ld_flag in $LDFLAGS; do 2906c35d236eSmrg case $ld_flag in 2907c35d236eSmrg *-brtl*) 2908c35d236eSmrg aix_use_runtimelinking=yes 2909c35d236eSmrg break 2910c35d236eSmrg ;; 2911c35d236eSmrg esac 2912c35d236eSmrg done 2913c35d236eSmrg ;; 2914c35d236eSmrg esac 2915c35d236eSmrg 2916c35d236eSmrg exp_sym_flag='-bexport' 2917c35d236eSmrg no_entry_flag='-bnoentry' 2918c35d236eSmrg fi 2919c35d236eSmrg 2920c35d236eSmrg # When large executables or shared objects are built, AIX ld can 2921c35d236eSmrg # have problems creating the table of contents. If linking a library 2922c35d236eSmrg # or program results in "error TOC overflow" add -mminimal-toc to 2923c35d236eSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 2924c35d236eSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 2925c35d236eSmrg 2926c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 2927c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 2928c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 2929c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 2930c35d236eSmrg 2931c35d236eSmrg if test "$GXX" = yes; then 2932c35d236eSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 2933c35d236eSmrg # We only want to do this on AIX 4.2 and lower, the check 2934c35d236eSmrg # below for broken collect2 doesn't work under 4.3+ 2935c35d236eSmrg collect2name=`${CC} -print-prog-name=collect2` 2936c35d236eSmrg if test -f "$collect2name" && \ 2937c35d236eSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 2938c35d236eSmrg then 2939c35d236eSmrg # We have reworked collect2 2940c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 2941c35d236eSmrg else 2942c35d236eSmrg # We have old collect2 2943c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 2944c35d236eSmrg # It fails to find uninstalled libraries when the uninstalled 2945c35d236eSmrg # path is not listed in the libpath. Setting hardcode_minus_L 2946c35d236eSmrg # to unsupported forces relinking 2947c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 2948c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2949c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2950c35d236eSmrg fi 2951c35d236eSmrg ;; 2952c35d236eSmrg esac 2953c35d236eSmrg shared_flag='-shared' 2954c35d236eSmrg if test "$aix_use_runtimelinking" = yes; then 2955c35d236eSmrg shared_flag="$shared_flag "'${wl}-G' 2956c35d236eSmrg fi 2957c35d236eSmrg else 2958c35d236eSmrg # not using gcc 2959c35d236eSmrg if test "$host_cpu" = ia64; then 2960c35d236eSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 2961c35d236eSmrg # chokes on -Wl,-G. The following line is correct: 2962c35d236eSmrg shared_flag='-G' 2963c35d236eSmrg else 2964c35d236eSmrg if test "$aix_use_runtimelinking" = yes; then 2965c35d236eSmrg shared_flag='${wl}-G' 2966c35d236eSmrg else 2967c35d236eSmrg shared_flag='${wl}-bM:SRE' 2968c35d236eSmrg fi 2969c35d236eSmrg fi 2970c35d236eSmrg fi 2971c35d236eSmrg 2972c35d236eSmrg # It seems that -bexpall does not export symbols beginning with 2973c35d236eSmrg # underscore (_), so it is better to generate a list of symbols to export. 2974c35d236eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 2975c35d236eSmrg if test "$aix_use_runtimelinking" = yes; then 2976c35d236eSmrg # Warning - without using the other runtime loading flags (-brtl), 2977c35d236eSmrg # -berok will link without error, but may produce a broken library. 2978c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 2979c35d236eSmrg # Determine the default libpath from the value encoded in an empty executable. 2980c35d236eSmrg _LT_AC_SYS_LIBPATH_AIX 2981c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 2982c35d236eSmrg 2983c35d236eSmrg _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" 2984c35d236eSmrg else 2985c35d236eSmrg if test "$host_cpu" = ia64; then 2986c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 2987c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 2988c35d236eSmrg _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" 2989c35d236eSmrg else 2990c35d236eSmrg # Determine the default libpath from the value encoded in an empty executable. 2991c35d236eSmrg _LT_AC_SYS_LIBPATH_AIX 2992c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 2993c35d236eSmrg # Warning - without using the other run time loading flags, 2994c35d236eSmrg # -berok will link without error, but may produce a broken library. 2995c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 2996c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 2997c35d236eSmrg # Exported symbols can be pulled into shared objects from archives 2998c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 2999c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 3000c35d236eSmrg # This is similar to how AIX traditionally builds its shared libraries. 3001c35d236eSmrg _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' 3002c35d236eSmrg fi 3003c35d236eSmrg fi 3004c35d236eSmrg ;; 3005c35d236eSmrg 3006c35d236eSmrg beos*) 3007c35d236eSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 3008c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3009c35d236eSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 3010c35d236eSmrg # support --undefined. This deserves some investigation. FIXME 3011c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3012c35d236eSmrg else 3013c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3014c35d236eSmrg fi 3015c35d236eSmrg ;; 3016c35d236eSmrg 3017c35d236eSmrg chorus*) 3018c35d236eSmrg case $cc_basename in 3019c35d236eSmrg *) 3020c35d236eSmrg # FIXME: insert proper C++ library support 3021c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3022c35d236eSmrg ;; 3023c35d236eSmrg esac 3024c35d236eSmrg ;; 3025c35d236eSmrg 3026c35d236eSmrg cygwin* | mingw* | pw32*) 3027c35d236eSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 3028c35d236eSmrg # as there is no search path for DLLs. 3029c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3030c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3031c35d236eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 3032c35d236eSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 3033c35d236eSmrg 3034c35d236eSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 3035c35d236eSmrg _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' 3036c35d236eSmrg # If the export-symbols file already is a .def file (1st line 3037c35d236eSmrg # is EXPORTS), use it as is; otherwise, prepend... 3038c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 3039c35d236eSmrg cp $export_symbols $output_objdir/$soname.def; 3040c35d236eSmrg else 3041c35d236eSmrg echo EXPORTS > $output_objdir/$soname.def; 3042c35d236eSmrg cat $export_symbols >> $output_objdir/$soname.def; 3043c35d236eSmrg fi~ 3044c35d236eSmrg $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' 3045c35d236eSmrg else 3046c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3047c35d236eSmrg fi 3048c35d236eSmrg ;; 3049c35d236eSmrg darwin* | rhapsody*) 3050c35d236eSmrg case $host_os in 3051c35d236eSmrg rhapsody* | darwin1.[[012]]) 3052c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 3053c35d236eSmrg ;; 3054c35d236eSmrg *) # Darwin 1.3 on 3055c35d236eSmrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 3056c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 3057c35d236eSmrg else 3058c35d236eSmrg case ${MACOSX_DEPLOYMENT_TARGET} in 3059c35d236eSmrg 10.[[012]]) 3060c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 3061c35d236eSmrg ;; 3062c35d236eSmrg 10.*) 3063c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 3064c35d236eSmrg ;; 3065c35d236eSmrg esac 3066c35d236eSmrg fi 3067c35d236eSmrg ;; 3068c35d236eSmrg esac 3069c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3070c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3071c35d236eSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 3072c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3073c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 3074c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3075c35d236eSmrg 3076c35d236eSmrg if test "$GXX" = yes ; then 3077c35d236eSmrg lt_int_apple_cc_single_mod=no 3078c35d236eSmrg output_verbose_link_cmd='echo' 3079c35d236eSmrg if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 3080c35d236eSmrg lt_int_apple_cc_single_mod=yes 3081c35d236eSmrg fi 3082c35d236eSmrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 3083c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 3084c35d236eSmrg else 3085c35d236eSmrg _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' 3086c35d236eSmrg fi 3087c35d236eSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3088c35d236eSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3089c35d236eSmrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 3090c35d236eSmrg _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}' 3091c35d236eSmrg else 3092c35d236eSmrg _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}' 3093c35d236eSmrg fi 3094c35d236eSmrg _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}' 3095c35d236eSmrg else 3096c35d236eSmrg case $cc_basename in 3097c35d236eSmrg xlc*) 3098c35d236eSmrg output_verbose_link_cmd='echo' 3099c35d236eSmrg _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` $verstring' 3100c35d236eSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3101c35d236eSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3102c35d236eSmrg _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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3103c35d236eSmrg _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}' 3104c35d236eSmrg ;; 3105c35d236eSmrg *) 3106c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3107c35d236eSmrg ;; 3108c35d236eSmrg esac 3109c35d236eSmrg fi 3110c35d236eSmrg ;; 3111c35d236eSmrg 3112c35d236eSmrg dgux*) 3113c35d236eSmrg case $cc_basename in 3114c35d236eSmrg ec++*) 3115c35d236eSmrg # FIXME: insert proper C++ library support 3116c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3117c35d236eSmrg ;; 3118c35d236eSmrg ghcx*) 3119c35d236eSmrg # Green Hills C++ Compiler 3120c35d236eSmrg # FIXME: insert proper C++ library support 3121c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3122c35d236eSmrg ;; 3123c35d236eSmrg *) 3124c35d236eSmrg # FIXME: insert proper C++ library support 3125c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3126c35d236eSmrg ;; 3127c35d236eSmrg esac 3128c35d236eSmrg ;; 3129c35d236eSmrg freebsd[[12]]*) 3130c35d236eSmrg # C++ shared libraries reported to be fairly broken before switch to ELF 3131c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3132c35d236eSmrg ;; 3133c35d236eSmrg freebsd-elf*) 3134c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3135c35d236eSmrg ;; 3136c35d236eSmrg freebsd* | kfreebsd*-gnu | dragonfly*) 3137c35d236eSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 3138c35d236eSmrg # conventions 3139c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 3140c35d236eSmrg ;; 3141c35d236eSmrg gnu*) 3142c35d236eSmrg ;; 3143c35d236eSmrg hpux9*) 3144c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3145c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3146c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3147c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3148c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3149c35d236eSmrg # but as the default 3150c35d236eSmrg # location of the library. 3151c35d236eSmrg 3152c35d236eSmrg case $cc_basename in 3153c35d236eSmrg CC*) 3154c35d236eSmrg # FIXME: insert proper C++ library support 3155c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3156c35d236eSmrg ;; 3157c35d236eSmrg aCC*) 3158c35d236eSmrg _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' 3159c35d236eSmrg # Commands to make compiler produce verbose output that lists 3160c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3161c35d236eSmrg # linking a shared library. 3162c35d236eSmrg # 3163c35d236eSmrg # There doesn't appear to be a way to prevent this compiler from 3164c35d236eSmrg # explicitly linking system object files so we need to strip them 3165c35d236eSmrg # from the output so that they don't get included in the library 3166c35d236eSmrg # dependencies. 3167c35d236eSmrg 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' 3168c35d236eSmrg ;; 3169c35d236eSmrg *) 3170c35d236eSmrg if test "$GXX" = yes; then 3171c35d236eSmrg _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' 3172c35d236eSmrg else 3173c35d236eSmrg # FIXME: insert proper C++ library support 3174c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3175c35d236eSmrg fi 3176c35d236eSmrg ;; 3177c35d236eSmrg esac 3178c35d236eSmrg ;; 3179c35d236eSmrg hpux10*|hpux11*) 3180c35d236eSmrg if test $with_gnu_ld = no; then 3181c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3182c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3183c35d236eSmrg 3184c35d236eSmrg case $host_cpu in 3185c35d236eSmrg hppa*64*|ia64*) 3186c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 3187c35d236eSmrg ;; 3188c35d236eSmrg *) 3189c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3190c35d236eSmrg ;; 3191c35d236eSmrg esac 3192c35d236eSmrg fi 3193c35d236eSmrg case $host_cpu in 3194c35d236eSmrg hppa*64*|ia64*) 3195c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3196c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3197c35d236eSmrg ;; 3198c35d236eSmrg *) 3199c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3200c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3201c35d236eSmrg # but as the default 3202c35d236eSmrg # location of the library. 3203c35d236eSmrg ;; 3204c35d236eSmrg esac 3205c35d236eSmrg 3206c35d236eSmrg case $cc_basename in 3207c35d236eSmrg CC*) 3208c35d236eSmrg # FIXME: insert proper C++ library support 3209c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3210c35d236eSmrg ;; 3211c35d236eSmrg aCC*) 3212c35d236eSmrg case $host_cpu in 3213c35d236eSmrg hppa*64*) 3214c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3215c35d236eSmrg ;; 3216c35d236eSmrg ia64*) 3217c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3218c35d236eSmrg ;; 3219c35d236eSmrg *) 3220c35d236eSmrg _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' 3221c35d236eSmrg ;; 3222c35d236eSmrg esac 3223c35d236eSmrg # Commands to make compiler produce verbose output that lists 3224c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3225c35d236eSmrg # linking a shared library. 3226c35d236eSmrg # 3227c35d236eSmrg # There doesn't appear to be a way to prevent this compiler from 3228c35d236eSmrg # explicitly linking system object files so we need to strip them 3229c35d236eSmrg # from the output so that they don't get included in the library 3230c35d236eSmrg # dependencies. 3231c35d236eSmrg 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' 3232c35d236eSmrg ;; 3233c35d236eSmrg *) 3234c35d236eSmrg if test "$GXX" = yes; then 3235c35d236eSmrg if test $with_gnu_ld = no; then 3236c35d236eSmrg case $host_cpu in 3237c35d236eSmrg hppa*64*) 3238c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3239c35d236eSmrg ;; 3240c35d236eSmrg ia64*) 3241c35d236eSmrg _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' 3242c35d236eSmrg ;; 3243c35d236eSmrg *) 3244c35d236eSmrg _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' 3245c35d236eSmrg ;; 3246c35d236eSmrg esac 3247c35d236eSmrg fi 3248c35d236eSmrg else 3249c35d236eSmrg # FIXME: insert proper C++ library support 3250c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3251c35d236eSmrg fi 3252c35d236eSmrg ;; 3253c35d236eSmrg esac 3254c35d236eSmrg ;; 3255c35d236eSmrg interix3*) 3256c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3257c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3258c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3259c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3260c35d236eSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 3261c35d236eSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 3262c35d236eSmrg # default) and relocated if they conflict, which is a slow very memory 3263c35d236eSmrg # consuming and fragmenting process. To avoid this, we pick a random, 3264c35d236eSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 3265c35d236eSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 3266c35d236eSmrg _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' 3267c35d236eSmrg _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' 3268c35d236eSmrg ;; 3269c35d236eSmrg irix5* | irix6*) 3270c35d236eSmrg case $cc_basename in 3271c35d236eSmrg CC*) 3272c35d236eSmrg # SGI C++ 3273c35d236eSmrg _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' 3274c35d236eSmrg 3275c35d236eSmrg # Archives containing C++ object files must be created using 3276c35d236eSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 3277c35d236eSmrg # necessary to make sure instantiated templates are included 3278c35d236eSmrg # in the archive. 3279c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 3280c35d236eSmrg ;; 3281c35d236eSmrg *) 3282c35d236eSmrg if test "$GXX" = yes; then 3283c35d236eSmrg if test "$with_gnu_ld" = no; then 3284c35d236eSmrg _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' 3285c35d236eSmrg else 3286c35d236eSmrg _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' 3287c35d236eSmrg fi 3288c35d236eSmrg fi 3289c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3290c35d236eSmrg ;; 3291c35d236eSmrg esac 3292c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3293c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3294c35d236eSmrg ;; 3295c35d236eSmrg linux*) 3296c35d236eSmrg case $cc_basename in 3297c35d236eSmrg KCC*) 3298c35d236eSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3299c35d236eSmrg 3300c35d236eSmrg # KCC will only create a shared library if the output file 3301c35d236eSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3302c35d236eSmrg # to its proper name (with version) after linking. 3303c35d236eSmrg _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' 3304c35d236eSmrg _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' 3305c35d236eSmrg # Commands to make compiler produce verbose output that lists 3306c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3307c35d236eSmrg # linking a shared library. 3308c35d236eSmrg # 3309c35d236eSmrg # There doesn't appear to be a way to prevent this compiler from 3310c35d236eSmrg # explicitly linking system object files so we need to strip them 3311c35d236eSmrg # from the output so that they don't get included in the library 3312c35d236eSmrg # dependencies. 3313c35d236eSmrg 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' 3314c35d236eSmrg 3315c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 3316c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3317c35d236eSmrg 3318c35d236eSmrg # Archives containing C++ object files must be created using 3319c35d236eSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3320c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3321c35d236eSmrg ;; 3322c35d236eSmrg icpc*) 3323c35d236eSmrg # Intel C++ 3324c35d236eSmrg with_gnu_ld=yes 3325c35d236eSmrg # version 8.0 and above of icpc choke on multiply defined symbols 3326c35d236eSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 3327c35d236eSmrg # earlier do not add the objects themselves. 3328c35d236eSmrg case `$CC -V 2>&1` in 3329c35d236eSmrg *"Version 7."*) 3330c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3331c35d236eSmrg _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' 3332c35d236eSmrg ;; 3333c35d236eSmrg *) # Version 8.0 or newer 3334c35d236eSmrg tmp_idyn= 3335c35d236eSmrg case $host_cpu in 3336c35d236eSmrg ia64*) tmp_idyn=' -i_dynamic';; 3337c35d236eSmrg esac 3338c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3339c35d236eSmrg _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' 3340c35d236eSmrg ;; 3341c35d236eSmrg esac 3342c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3343c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3344c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3345c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 3346c35d236eSmrg ;; 3347c35d236eSmrg pgCC*) 3348c35d236eSmrg # Portland Group C++ compiler 3349c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 3350c35d236eSmrg _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' 3351c35d236eSmrg 3352c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3353c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3354c35d236eSmrg _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' 3355c35d236eSmrg ;; 3356c35d236eSmrg cxx*) 3357c35d236eSmrg # Compaq C++ 3358c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3359c35d236eSmrg _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' 3360c35d236eSmrg 3361c35d236eSmrg runpath_var=LD_RUN_PATH 3362c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3363c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3364c35d236eSmrg 3365c35d236eSmrg # Commands to make compiler produce verbose output that lists 3366c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3367c35d236eSmrg # linking a shared library. 3368c35d236eSmrg # 3369c35d236eSmrg # There doesn't appear to be a way to prevent this compiler from 3370c35d236eSmrg # explicitly linking system object files so we need to strip them 3371c35d236eSmrg # from the output so that they don't get included in the library 3372c35d236eSmrg # dependencies. 3373c35d236eSmrg 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' 3374c35d236eSmrg ;; 3375c35d236eSmrg esac 3376c35d236eSmrg ;; 3377c35d236eSmrg lynxos*) 3378c35d236eSmrg # FIXME: insert proper C++ library support 3379c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3380c35d236eSmrg ;; 3381c35d236eSmrg m88k*) 3382c35d236eSmrg # FIXME: insert proper C++ library support 3383c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3384c35d236eSmrg ;; 3385c35d236eSmrg mvs*) 3386c35d236eSmrg case $cc_basename in 3387c35d236eSmrg cxx*) 3388c35d236eSmrg # FIXME: insert proper C++ library support 3389c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3390c35d236eSmrg ;; 3391c35d236eSmrg *) 3392c35d236eSmrg # FIXME: insert proper C++ library support 3393c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3394c35d236eSmrg ;; 3395c35d236eSmrg esac 3396c35d236eSmrg ;; 3397c35d236eSmrg netbsd*) 3398c35d236eSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3399c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 3400c35d236eSmrg wlarc= 3401c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3402c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3403c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3404c35d236eSmrg fi 3405c35d236eSmrg # Workaround some broken pre-1.5 toolchains 3406c35d236eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 3407c35d236eSmrg ;; 3408c35d236eSmrg openbsd2*) 3409c35d236eSmrg # C++ shared libraries are fairly broken 3410c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3411c35d236eSmrg ;; 3412c35d236eSmrg openbsd*) 3413c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3414c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3415c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3416c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3417c35d236eSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3418c35d236eSmrg _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' 3419c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3420c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3421c35d236eSmrg fi 3422c35d236eSmrg output_verbose_link_cmd='echo' 3423c35d236eSmrg ;; 3424c35d236eSmrg osf3*) 3425c35d236eSmrg case $cc_basename in 3426c35d236eSmrg KCC*) 3427c35d236eSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3428c35d236eSmrg 3429c35d236eSmrg # KCC will only create a shared library if the output file 3430c35d236eSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3431c35d236eSmrg # to its proper name (with version) after linking. 3432c35d236eSmrg _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' 3433c35d236eSmrg 3434c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3435c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3436c35d236eSmrg 3437c35d236eSmrg # Archives containing C++ object files must be created using 3438c35d236eSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3439c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3440c35d236eSmrg 3441c35d236eSmrg ;; 3442c35d236eSmrg RCC*) 3443c35d236eSmrg # Rational C++ 2.4.1 3444c35d236eSmrg # FIXME: insert proper C++ library support 3445c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3446c35d236eSmrg ;; 3447c35d236eSmrg cxx*) 3448c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3449c35d236eSmrg _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' 3450c35d236eSmrg 3451c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3452c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3453c35d236eSmrg 3454c35d236eSmrg # Commands to make compiler produce verbose output that lists 3455c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3456c35d236eSmrg # linking a shared library. 3457c35d236eSmrg # 3458c35d236eSmrg # There doesn't appear to be a way to prevent this compiler from 3459c35d236eSmrg # explicitly linking system object files so we need to strip them 3460c35d236eSmrg # from the output so that they don't get included in the library 3461c35d236eSmrg # dependencies. 3462c35d236eSmrg 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' 3463c35d236eSmrg ;; 3464c35d236eSmrg *) 3465c35d236eSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3466c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3467c35d236eSmrg _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' 3468c35d236eSmrg 3469c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3470c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3471c35d236eSmrg 3472c35d236eSmrg # Commands to make compiler produce verbose output that lists 3473c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3474c35d236eSmrg # linking a shared library. 3475c35d236eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3476c35d236eSmrg 3477c35d236eSmrg else 3478c35d236eSmrg # FIXME: insert proper C++ library support 3479c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3480c35d236eSmrg fi 3481c35d236eSmrg ;; 3482c35d236eSmrg esac 3483c35d236eSmrg ;; 3484c35d236eSmrg osf4* | osf5*) 3485c35d236eSmrg case $cc_basename in 3486c35d236eSmrg KCC*) 3487c35d236eSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3488c35d236eSmrg 3489c35d236eSmrg # KCC will only create a shared library if the output file 3490c35d236eSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3491c35d236eSmrg # to its proper name (with version) after linking. 3492c35d236eSmrg _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' 3493c35d236eSmrg 3494c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3495c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3496c35d236eSmrg 3497c35d236eSmrg # Archives containing C++ object files must be created using 3498c35d236eSmrg # the KAI C++ compiler. 3499c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 3500c35d236eSmrg ;; 3501c35d236eSmrg RCC*) 3502c35d236eSmrg # Rational C++ 2.4.1 3503c35d236eSmrg # FIXME: insert proper C++ library support 3504c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3505c35d236eSmrg ;; 3506c35d236eSmrg cxx*) 3507c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 3508c35d236eSmrg _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' 3509c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 3510c35d236eSmrg echo "-hidden">> $lib.exp~ 3511c35d236eSmrg $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~ 3512c35d236eSmrg $rm $lib.exp' 3513c35d236eSmrg 3514c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3515c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3516c35d236eSmrg 3517c35d236eSmrg # Commands to make compiler produce verbose output that lists 3518c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3519c35d236eSmrg # linking a shared library. 3520c35d236eSmrg # 3521c35d236eSmrg # There doesn't appear to be a way to prevent this compiler from 3522c35d236eSmrg # explicitly linking system object files so we need to strip them 3523c35d236eSmrg # from the output so that they don't get included in the library 3524c35d236eSmrg # dependencies. 3525c35d236eSmrg 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' 3526c35d236eSmrg ;; 3527c35d236eSmrg *) 3528c35d236eSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3529c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3530c35d236eSmrg _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' 3531c35d236eSmrg 3532c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3533c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3534c35d236eSmrg 3535c35d236eSmrg # Commands to make compiler produce verbose output that lists 3536c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3537c35d236eSmrg # linking a shared library. 3538c35d236eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3539c35d236eSmrg 3540c35d236eSmrg else 3541c35d236eSmrg # FIXME: insert proper C++ library support 3542c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3543c35d236eSmrg fi 3544c35d236eSmrg ;; 3545c35d236eSmrg esac 3546c35d236eSmrg ;; 3547c35d236eSmrg psos*) 3548c35d236eSmrg # FIXME: insert proper C++ library support 3549c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3550c35d236eSmrg ;; 3551c35d236eSmrg sunos4*) 3552c35d236eSmrg case $cc_basename in 3553c35d236eSmrg CC*) 3554c35d236eSmrg # Sun C++ 4.x 3555c35d236eSmrg # FIXME: insert proper C++ library support 3556c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3557c35d236eSmrg ;; 3558c35d236eSmrg lcc*) 3559c35d236eSmrg # Lucid 3560c35d236eSmrg # FIXME: insert proper C++ library support 3561c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3562c35d236eSmrg ;; 3563c35d236eSmrg *) 3564c35d236eSmrg # FIXME: insert proper C++ library support 3565c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3566c35d236eSmrg ;; 3567c35d236eSmrg esac 3568c35d236eSmrg ;; 3569c35d236eSmrg solaris*) 3570c35d236eSmrg case $cc_basename in 3571c35d236eSmrg CC*) 3572c35d236eSmrg # Sun C++ 4.2, 5.x and Centerline C++ 3573c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 3574c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3575c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3576c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3577c35d236eSmrg $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' 3578c35d236eSmrg 3579c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3580c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3581c35d236eSmrg case $host_os in 3582c35d236eSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3583c35d236eSmrg *) 3584c35d236eSmrg # The C++ compiler is used as linker so we must use $wl 3585c35d236eSmrg # flag to pass the commands to the underlying system 3586c35d236eSmrg # linker. We must also pass each convience library through 3587c35d236eSmrg # to the system linker between allextract/defaultextract. 3588c35d236eSmrg # The C++ compiler will combine linker options so we 3589c35d236eSmrg # cannot just pass the convience library names through 3590c35d236eSmrg # without $wl. 3591c35d236eSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 3592c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' 3593c35d236eSmrg ;; 3594c35d236eSmrg esac 3595c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3596c35d236eSmrg 3597c35d236eSmrg output_verbose_link_cmd='echo' 3598c35d236eSmrg 3599c35d236eSmrg # Archives containing C++ object files must be created using 3600c35d236eSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 3601c35d236eSmrg # necessary to make sure instantiated templates are included 3602c35d236eSmrg # in the archive. 3603c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3604c35d236eSmrg ;; 3605c35d236eSmrg gcx*) 3606c35d236eSmrg # Green Hills C++ Compiler 3607c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3608c35d236eSmrg 3609c35d236eSmrg # The C++ compiler must be used to create the archive. 3610c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 3611c35d236eSmrg ;; 3612c35d236eSmrg *) 3613c35d236eSmrg # GNU C++ compiler with Solaris linker 3614c35d236eSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3615c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 3616c35d236eSmrg if $CC --version | grep -v '^2\.7' > /dev/null; then 3617c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3618c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3619c35d236eSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3620c35d236eSmrg 3621c35d236eSmrg # Commands to make compiler produce verbose output that lists 3622c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3623c35d236eSmrg # linking a shared library. 3624c35d236eSmrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3625c35d236eSmrg else 3626c35d236eSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 3627c35d236eSmrg # platform. 3628c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3629c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3630c35d236eSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3631c35d236eSmrg 3632c35d236eSmrg # Commands to make compiler produce verbose output that lists 3633c35d236eSmrg # what "hidden" libraries, object files and flags are used when 3634c35d236eSmrg # linking a shared library. 3635c35d236eSmrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3636c35d236eSmrg fi 3637c35d236eSmrg 3638c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 3639c35d236eSmrg fi 3640c35d236eSmrg ;; 3641c35d236eSmrg esac 3642c35d236eSmrg ;; 3643c35d236eSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 3644c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3645c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3646c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3647c35d236eSmrg runpath_var='LD_RUN_PATH' 3648c35d236eSmrg 3649c35d236eSmrg case $cc_basename in 3650c35d236eSmrg CC*) 3651c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3652c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3653c35d236eSmrg ;; 3654c35d236eSmrg *) 3655c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3656c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3657c35d236eSmrg ;; 3658c35d236eSmrg esac 3659c35d236eSmrg ;; 3660c35d236eSmrg sysv5* | sco3.2v5* | sco5v6*) 3661c35d236eSmrg # Note: We can NOT use -z defs as we might desire, because we do not 3662c35d236eSmrg # link with -lc, and that would cause any symbols used from libc to 3663c35d236eSmrg # always be unresolved, which means just about no library would 3664c35d236eSmrg # ever link correctly. If we're not using GNU ld we use -z text 3665c35d236eSmrg # though, which does catch some bad symbols but isn't as heavy-handed 3666c35d236eSmrg # as -z defs. 3667c35d236eSmrg # For security reasons, it is highly recommended that you always 3668c35d236eSmrg # use absolute paths for naming shared libraries, and exclude the 3669c35d236eSmrg # DT_RUNPATH tag from executables and libraries. But doing so 3670c35d236eSmrg # requires that you compile everything twice, which is a pain. 3671c35d236eSmrg # So that behaviour is only enabled if SCOABSPATH is set to a 3672c35d236eSmrg # non-empty value in the environment. Most likely only useful for 3673c35d236eSmrg # creating official distributions of packages. 3674c35d236eSmrg # This is a hack until libtool officially supports absolute path 3675c35d236eSmrg # names for shared libraries. 3676c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3677c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 3678c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3679c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3680c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 3681c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3682c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3683c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 3684c35d236eSmrg runpath_var='LD_RUN_PATH' 3685c35d236eSmrg 3686c35d236eSmrg case $cc_basename in 3687c35d236eSmrg CC*) 3688c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3689c35d236eSmrg _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' 3690c35d236eSmrg ;; 3691c35d236eSmrg *) 3692c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3693c35d236eSmrg _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' 3694c35d236eSmrg ;; 3695c35d236eSmrg esac 3696c35d236eSmrg ;; 3697c35d236eSmrg tandem*) 3698c35d236eSmrg case $cc_basename in 3699c35d236eSmrg NCC*) 3700c35d236eSmrg # NonStop-UX NCC 3.20 3701c35d236eSmrg # FIXME: insert proper C++ library support 3702c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3703c35d236eSmrg ;; 3704c35d236eSmrg *) 3705c35d236eSmrg # FIXME: insert proper C++ library support 3706c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3707c35d236eSmrg ;; 3708c35d236eSmrg esac 3709c35d236eSmrg ;; 3710c35d236eSmrg vxworks*) 3711c35d236eSmrg # FIXME: insert proper C++ library support 3712c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3713c35d236eSmrg ;; 3714c35d236eSmrg *) 3715c35d236eSmrg # FIXME: insert proper C++ library support 3716c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3717c35d236eSmrg ;; 3718c35d236eSmrgesac 3719c35d236eSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 3720c35d236eSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 3721c35d236eSmrg 3722c35d236eSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 3723c35d236eSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 3724c35d236eSmrg 3725c35d236eSmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 3726c35d236eSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 3727c35d236eSmrgAC_LIBTOOL_PROG_CC_C_O($1) 3728c35d236eSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3729c35d236eSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 3730c35d236eSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3731c35d236eSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3732c35d236eSmrg 3733c35d236eSmrgAC_LIBTOOL_CONFIG($1) 3734c35d236eSmrg 3735c35d236eSmrgAC_LANG_POP 3736c35d236eSmrgCC=$lt_save_CC 3737c35d236eSmrgLDCXX=$LD 3738c35d236eSmrgLD=$lt_save_LD 3739c35d236eSmrgGCC=$lt_save_GCC 3740c35d236eSmrgwith_gnu_ldcxx=$with_gnu_ld 3741c35d236eSmrgwith_gnu_ld=$lt_save_with_gnu_ld 3742c35d236eSmrglt_cv_path_LDCXX=$lt_cv_path_LD 3743c35d236eSmrglt_cv_path_LD=$lt_save_path_LD 3744c35d236eSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 3745c35d236eSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 3746c35d236eSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG 3747c35d236eSmrg 3748c35d236eSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 3749c35d236eSmrg# ------------------------------------ 3750c35d236eSmrg# Figure out "hidden" library dependencies from verbose 3751c35d236eSmrg# compiler output when linking a shared library. 3752c35d236eSmrg# Parse the compiler output and extract the necessary 3753c35d236eSmrg# objects, libraries and library flags. 3754c35d236eSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 3755c35d236eSmrgdnl we can't use the lt_simple_compile_test_code here, 3756c35d236eSmrgdnl because it contains code intended for an executable, 3757c35d236eSmrgdnl not a library. It's possible we should let each 3758c35d236eSmrgdnl tag define a new lt_????_link_test_code variable, 3759c35d236eSmrgdnl but it's only used here... 3760c35d236eSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 3761c35d236eSmrgint a; 3762c35d236eSmrgvoid foo (void) { a = 0; } 3763c35d236eSmrgEOF 3764c35d236eSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 3765c35d236eSmrgclass Foo 3766c35d236eSmrg{ 3767c35d236eSmrgpublic: 3768c35d236eSmrg Foo (void) { a = 0; } 3769c35d236eSmrgprivate: 3770c35d236eSmrg int a; 3771c35d236eSmrg}; 3772c35d236eSmrgEOF 3773c35d236eSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 3774c35d236eSmrg subroutine foo 3775c35d236eSmrg implicit none 3776c35d236eSmrg integer*4 a 3777c35d236eSmrg a=0 3778c35d236eSmrg return 3779c35d236eSmrg end 3780c35d236eSmrgEOF 3781c35d236eSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 3782c35d236eSmrgpublic class foo { 3783c35d236eSmrg private int a; 3784c35d236eSmrg public void bar (void) { 3785c35d236eSmrg a = 0; 3786c35d236eSmrg } 3787c35d236eSmrg}; 3788c35d236eSmrgEOF 3789c35d236eSmrg]) 3790c35d236eSmrgdnl Parse the compiler output and extract the necessary 3791c35d236eSmrgdnl objects, libraries and library flags. 3792c35d236eSmrgif AC_TRY_EVAL(ac_compile); then 3793c35d236eSmrg # Parse the compiler output and extract the necessary 3794c35d236eSmrg # objects, libraries and library flags. 3795c35d236eSmrg 3796c35d236eSmrg # Sentinel used to keep track of whether or not we are before 3797c35d236eSmrg # the conftest object file. 3798c35d236eSmrg pre_test_object_deps_done=no 3799c35d236eSmrg 3800c35d236eSmrg # The `*' in the case matches for architectures that use `case' in 3801c35d236eSmrg # $output_verbose_cmd can trigger glob expansion during the loop 3802c35d236eSmrg # eval without this substitution. 3803c35d236eSmrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 3804c35d236eSmrg 3805c35d236eSmrg for p in `eval $output_verbose_link_cmd`; do 3806c35d236eSmrg case $p in 3807c35d236eSmrg 3808c35d236eSmrg -L* | -R* | -l*) 3809c35d236eSmrg # Some compilers place space between "-{L,R}" and the path. 3810c35d236eSmrg # Remove the space. 3811c35d236eSmrg if test $p = "-L" \ 3812c35d236eSmrg || test $p = "-R"; then 3813c35d236eSmrg prev=$p 3814c35d236eSmrg continue 3815c35d236eSmrg else 3816c35d236eSmrg prev= 3817c35d236eSmrg fi 3818c35d236eSmrg 3819c35d236eSmrg if test "$pre_test_object_deps_done" = no; then 3820c35d236eSmrg case $p in 3821c35d236eSmrg -L* | -R*) 3822c35d236eSmrg # Internal compiler library paths should come after those 3823c35d236eSmrg # provided the user. The postdeps already come after the 3824c35d236eSmrg # user supplied libs so there is no need to process them. 3825c35d236eSmrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 3826c35d236eSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 3827c35d236eSmrg else 3828c35d236eSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 3829c35d236eSmrg fi 3830c35d236eSmrg ;; 3831c35d236eSmrg # The "-l" case would never come before the object being 3832c35d236eSmrg # linked, so don't bother handling this case. 3833c35d236eSmrg esac 3834c35d236eSmrg else 3835c35d236eSmrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 3836c35d236eSmrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 3837c35d236eSmrg else 3838c35d236eSmrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 3839c35d236eSmrg fi 3840c35d236eSmrg fi 3841c35d236eSmrg ;; 3842c35d236eSmrg 3843c35d236eSmrg *.$objext) 3844c35d236eSmrg # This assumes that the test object file only shows up 3845c35d236eSmrg # once in the compiler output. 3846c35d236eSmrg if test "$p" = "conftest.$objext"; then 3847c35d236eSmrg pre_test_object_deps_done=yes 3848c35d236eSmrg continue 3849c35d236eSmrg fi 3850c35d236eSmrg 3851c35d236eSmrg if test "$pre_test_object_deps_done" = no; then 3852c35d236eSmrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 3853c35d236eSmrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 3854c35d236eSmrg else 3855c35d236eSmrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 3856c35d236eSmrg fi 3857c35d236eSmrg else 3858c35d236eSmrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 3859c35d236eSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 3860c35d236eSmrg else 3861c35d236eSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 3862c35d236eSmrg fi 3863c35d236eSmrg fi 3864c35d236eSmrg ;; 3865c35d236eSmrg 3866c35d236eSmrg *) ;; # Ignore the rest. 3867c35d236eSmrg 3868c35d236eSmrg esac 3869c35d236eSmrg done 3870c35d236eSmrg 3871c35d236eSmrg # Clean up. 3872c35d236eSmrg rm -f a.out a.exe 3873c35d236eSmrgelse 3874c35d236eSmrg echo "libtool.m4: error: problem compiling $1 test program" 3875c35d236eSmrgfi 3876c35d236eSmrg 3877c35d236eSmrg$rm -f confest.$objext 3878c35d236eSmrg 3879c35d236eSmrg# PORTME: override above test on systems where it is broken 3880c35d236eSmrgifelse([$1],[CXX], 3881c35d236eSmrg[case $host_os in 3882c35d236eSmrginterix3*) 3883c35d236eSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 3884c35d236eSmrg # hack all around it, let's just trust "g++" to DTRT. 3885c35d236eSmrg _LT_AC_TAGVAR(predep_objects,$1)= 3886c35d236eSmrg _LT_AC_TAGVAR(postdep_objects,$1)= 3887c35d236eSmrg _LT_AC_TAGVAR(postdeps,$1)= 3888c35d236eSmrg ;; 3889c35d236eSmrg 3890c35d236eSmrgsolaris*) 3891c35d236eSmrg case $cc_basename in 3892c35d236eSmrg CC*) 3893c35d236eSmrg # Adding this requires a known-good setup of shared libraries for 3894c35d236eSmrg # Sun compiler versions before 5.6, else PIC objects from an old 3895c35d236eSmrg # archive will be linked into the output, leading to subtle bugs. 3896c35d236eSmrg _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 3897c35d236eSmrg ;; 3898c35d236eSmrg esac 3899c35d236eSmrg ;; 3900c35d236eSmrgesac 3901c35d236eSmrg]) 3902c35d236eSmrg 3903c35d236eSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 3904c35d236eSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 3905c35d236eSmrgesac 3906c35d236eSmrg])# AC_LIBTOOL_POSTDEP_PREDEP 3907c35d236eSmrg 3908c35d236eSmrg# AC_LIBTOOL_LANG_F77_CONFIG 3909c35d236eSmrg# -------------------------- 3910c35d236eSmrg# Ensure that the configuration vars for the C compiler are 3911c35d236eSmrg# suitably defined. Those variables are subsequently used by 3912c35d236eSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 3913c35d236eSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 3914c35d236eSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 3915c35d236eSmrg[AC_REQUIRE([AC_PROG_F77]) 3916c35d236eSmrgAC_LANG_PUSH(Fortran 77) 3917c35d236eSmrg 3918c35d236eSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3919c35d236eSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 3920c35d236eSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 3921c35d236eSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 3922c35d236eSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 3923c35d236eSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 3924c35d236eSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 3925c35d236eSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 3926c35d236eSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3927c35d236eSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 3928c35d236eSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 3929c35d236eSmrg_LT_AC_TAGVAR(module_cmds, $1)= 3930c35d236eSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 3931c35d236eSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 3932c35d236eSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 3933c35d236eSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 3934c35d236eSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 3935c35d236eSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 3936c35d236eSmrg 3937c35d236eSmrg# Source file extension for f77 test sources. 3938c35d236eSmrgac_ext=f 3939c35d236eSmrg 3940c35d236eSmrg# Object file extension for compiled f77 test sources. 3941c35d236eSmrgobjext=o 3942c35d236eSmrg_LT_AC_TAGVAR(objext, $1)=$objext 3943c35d236eSmrg 3944c35d236eSmrg# Code to be used in simple compile tests 3945c35d236eSmrglt_simple_compile_test_code=" subroutine t\n return\n end\n" 3946c35d236eSmrg 3947c35d236eSmrg# Code to be used in simple link tests 3948c35d236eSmrglt_simple_link_test_code=" program t\n end\n" 3949c35d236eSmrg 3950c35d236eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 3951c35d236eSmrg_LT_AC_SYS_COMPILER 3952c35d236eSmrg 3953c35d236eSmrg# save warnings/boilerplate of simple test code 3954c35d236eSmrg_LT_COMPILER_BOILERPLATE 3955c35d236eSmrg_LT_LINKER_BOILERPLATE 3956c35d236eSmrg 3957c35d236eSmrg# Allow CC to be a program name with arguments. 3958c35d236eSmrglt_save_CC="$CC" 3959c35d236eSmrgCC=${F77-"f77"} 3960c35d236eSmrgcompiler=$CC 3961c35d236eSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 3962c35d236eSmrg_LT_CC_BASENAME([$compiler]) 3963c35d236eSmrg 3964c35d236eSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 3965c35d236eSmrgAC_MSG_RESULT([$can_build_shared]) 3966c35d236eSmrg 3967c35d236eSmrgAC_MSG_CHECKING([whether to build shared libraries]) 3968c35d236eSmrgtest "$can_build_shared" = "no" && enable_shared=no 3969c35d236eSmrg 3970c35d236eSmrg# On AIX, shared libraries and static libraries use the same namespace, and 3971c35d236eSmrg# are all built from PIC. 3972c35d236eSmrgcase $host_os in 3973c35d236eSmrgaix3*) 3974c35d236eSmrg test "$enable_shared" = yes && enable_static=no 3975c35d236eSmrg if test -n "$RANLIB"; then 3976c35d236eSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 3977c35d236eSmrg postinstall_cmds='$RANLIB $lib' 3978c35d236eSmrg fi 3979c35d236eSmrg ;; 3980c35d236eSmrgaix4* | aix5*) 3981c35d236eSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 3982c35d236eSmrg test "$enable_shared" = yes && enable_static=no 3983c35d236eSmrg fi 3984c35d236eSmrg ;; 3985c35d236eSmrgesac 3986c35d236eSmrgAC_MSG_RESULT([$enable_shared]) 3987c35d236eSmrg 3988c35d236eSmrgAC_MSG_CHECKING([whether to build static libraries]) 3989c35d236eSmrg# Make sure either enable_shared or enable_static is yes. 3990c35d236eSmrgtest "$enable_shared" = yes || enable_static=yes 3991c35d236eSmrgAC_MSG_RESULT([$enable_static]) 3992c35d236eSmrg 3993c35d236eSmrg_LT_AC_TAGVAR(GCC, $1)="$G77" 3994c35d236eSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 3995c35d236eSmrg 3996c35d236eSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 3997c35d236eSmrgAC_LIBTOOL_PROG_CC_C_O($1) 3998c35d236eSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3999c35d236eSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4000c35d236eSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4001c35d236eSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4002c35d236eSmrg 4003c35d236eSmrgAC_LIBTOOL_CONFIG($1) 4004c35d236eSmrg 4005c35d236eSmrgAC_LANG_POP 4006c35d236eSmrgCC="$lt_save_CC" 4007c35d236eSmrg])# AC_LIBTOOL_LANG_F77_CONFIG 4008c35d236eSmrg 4009c35d236eSmrg 4010c35d236eSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG 4011c35d236eSmrg# -------------------------- 4012c35d236eSmrg# Ensure that the configuration vars for the C compiler are 4013c35d236eSmrg# suitably defined. Those variables are subsequently used by 4014c35d236eSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4015c35d236eSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 4016c35d236eSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 4017c35d236eSmrg[AC_LANG_SAVE 4018c35d236eSmrg 4019c35d236eSmrg# Source file extension for Java test sources. 4020c35d236eSmrgac_ext=java 4021c35d236eSmrg 4022c35d236eSmrg# Object file extension for compiled Java test sources. 4023c35d236eSmrgobjext=o 4024c35d236eSmrg_LT_AC_TAGVAR(objext, $1)=$objext 4025c35d236eSmrg 4026c35d236eSmrg# Code to be used in simple compile tests 4027c35d236eSmrglt_simple_compile_test_code="class foo {}\n" 4028c35d236eSmrg 4029c35d236eSmrg# Code to be used in simple link tests 4030c35d236eSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 4031c35d236eSmrg 4032c35d236eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4033c35d236eSmrg_LT_AC_SYS_COMPILER 4034c35d236eSmrg 4035c35d236eSmrg# save warnings/boilerplate of simple test code 4036c35d236eSmrg_LT_COMPILER_BOILERPLATE 4037c35d236eSmrg_LT_LINKER_BOILERPLATE 4038c35d236eSmrg 4039c35d236eSmrg# Allow CC to be a program name with arguments. 4040c35d236eSmrglt_save_CC="$CC" 4041c35d236eSmrgCC=${GCJ-"gcj"} 4042c35d236eSmrgcompiler=$CC 4043c35d236eSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 4044c35d236eSmrg_LT_CC_BASENAME([$compiler]) 4045c35d236eSmrg 4046c35d236eSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 4047c35d236eSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4048c35d236eSmrg 4049c35d236eSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4050c35d236eSmrg 4051c35d236eSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4052c35d236eSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4053c35d236eSmrgAC_LIBTOOL_PROG_CC_C_O($1) 4054c35d236eSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4055c35d236eSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4056c35d236eSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4057c35d236eSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4058c35d236eSmrg 4059c35d236eSmrgAC_LIBTOOL_CONFIG($1) 4060c35d236eSmrg 4061c35d236eSmrgAC_LANG_RESTORE 4062c35d236eSmrgCC="$lt_save_CC" 4063c35d236eSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 4064c35d236eSmrg 4065c35d236eSmrg 4066c35d236eSmrg# AC_LIBTOOL_LANG_RC_CONFIG 4067c35d236eSmrg# ------------------------- 4068c35d236eSmrg# Ensure that the configuration vars for the Windows resource compiler are 4069c35d236eSmrg# suitably defined. Those variables are subsequently used by 4070c35d236eSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4071c35d236eSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 4072c35d236eSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 4073c35d236eSmrg[AC_LANG_SAVE 4074c35d236eSmrg 4075c35d236eSmrg# Source file extension for RC test sources. 4076c35d236eSmrgac_ext=rc 4077c35d236eSmrg 4078c35d236eSmrg# Object file extension for compiled RC test sources. 4079c35d236eSmrgobjext=o 4080c35d236eSmrg_LT_AC_TAGVAR(objext, $1)=$objext 4081c35d236eSmrg 4082c35d236eSmrg# Code to be used in simple compile tests 4083c35d236eSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 4084c35d236eSmrg 4085c35d236eSmrg# Code to be used in simple link tests 4086c35d236eSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 4087c35d236eSmrg 4088c35d236eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4089c35d236eSmrg_LT_AC_SYS_COMPILER 4090c35d236eSmrg 4091c35d236eSmrg# save warnings/boilerplate of simple test code 4092c35d236eSmrg_LT_COMPILER_BOILERPLATE 4093c35d236eSmrg_LT_LINKER_BOILERPLATE 4094c35d236eSmrg 4095c35d236eSmrg# Allow CC to be a program name with arguments. 4096c35d236eSmrglt_save_CC="$CC" 4097c35d236eSmrgCC=${RC-"windres"} 4098c35d236eSmrgcompiler=$CC 4099c35d236eSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 4100c35d236eSmrg_LT_CC_BASENAME([$compiler]) 4101c35d236eSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4102c35d236eSmrg 4103c35d236eSmrgAC_LIBTOOL_CONFIG($1) 4104c35d236eSmrg 4105c35d236eSmrgAC_LANG_RESTORE 4106c35d236eSmrgCC="$lt_save_CC" 4107c35d236eSmrg])# AC_LIBTOOL_LANG_RC_CONFIG 4108c35d236eSmrg 4109c35d236eSmrg 4110c35d236eSmrg# AC_LIBTOOL_CONFIG([TAGNAME]) 4111c35d236eSmrg# ---------------------------- 4112c35d236eSmrg# If TAGNAME is not passed, then create an initial libtool script 4113c35d236eSmrg# with a default configuration from the untagged config vars. Otherwise 4114c35d236eSmrg# add code to config.status for appending the configuration named by 4115c35d236eSmrg# TAGNAME from the matching tagged config vars. 4116c35d236eSmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 4117c35d236eSmrg[# The else clause should only fire when bootstrapping the 4118c35d236eSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh 4119c35d236eSmrg# with your package, and you will get complaints that there are 4120c35d236eSmrg# no rules to generate ltmain.sh. 4121c35d236eSmrgif test -f "$ltmain"; then 4122c35d236eSmrg # See if we are running on zsh, and set the options which allow our commands through 4123c35d236eSmrg # without removal of \ escapes. 4124c35d236eSmrg if test -n "${ZSH_VERSION+set}" ; then 4125c35d236eSmrg setopt NO_GLOB_SUBST 4126c35d236eSmrg fi 4127c35d236eSmrg # Now quote all the things that may contain metacharacters while being 4128c35d236eSmrg # careful not to overquote the AC_SUBSTed values. We take copies of the 4129c35d236eSmrg # variables and quote the copies for generation of the libtool script. 4130c35d236eSmrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 4131c35d236eSmrg SED SHELL STRIP \ 4132c35d236eSmrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 4133c35d236eSmrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 4134c35d236eSmrg deplibs_check_method reload_flag reload_cmds need_locks \ 4135c35d236eSmrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 4136c35d236eSmrg lt_cv_sys_global_symbol_to_c_name_address \ 4137c35d236eSmrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4138c35d236eSmrg old_postinstall_cmds old_postuninstall_cmds \ 4139c35d236eSmrg _LT_AC_TAGVAR(compiler, $1) \ 4140c35d236eSmrg _LT_AC_TAGVAR(CC, $1) \ 4141c35d236eSmrg _LT_AC_TAGVAR(LD, $1) \ 4142c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4143c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4144c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4145c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4146c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4147c35d236eSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4148c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4149c35d236eSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4150c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4151c35d236eSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4152c35d236eSmrg _LT_AC_TAGVAR(predep_objects, $1) \ 4153c35d236eSmrg _LT_AC_TAGVAR(postdep_objects, $1) \ 4154c35d236eSmrg _LT_AC_TAGVAR(predeps, $1) \ 4155c35d236eSmrg _LT_AC_TAGVAR(postdeps, $1) \ 4156c35d236eSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4157c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1) \ 4158c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4159c35d236eSmrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4160c35d236eSmrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4161c35d236eSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 4162c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 4163c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 4164c35d236eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 4165c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 4166c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 4167c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 4168c35d236eSmrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 4169c35d236eSmrg _LT_AC_TAGVAR(module_cmds, $1) \ 4170c35d236eSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 4171c35d236eSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 4172c35d236eSmrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 4173c35d236eSmrg _LT_AC_TAGVAR(include_expsyms, $1); do 4174c35d236eSmrg 4175c35d236eSmrg case $var in 4176c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 4177c35d236eSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 4178c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 4179c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 4180c35d236eSmrg _LT_AC_TAGVAR(module_cmds, $1) | \ 4181c35d236eSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 4182c35d236eSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 4183c35d236eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 4184c35d236eSmrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 4185c35d236eSmrg postinstall_cmds | postuninstall_cmds | \ 4186c35d236eSmrg old_postinstall_cmds | old_postuninstall_cmds | \ 4187c35d236eSmrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 4188c35d236eSmrg # Double-quote double-evaled strings. 4189c35d236eSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 4190c35d236eSmrg ;; 4191c35d236eSmrg *) 4192c35d236eSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 4193c35d236eSmrg ;; 4194c35d236eSmrg esac 4195c35d236eSmrg done 4196c35d236eSmrg 4197c35d236eSmrg case $lt_echo in 4198c35d236eSmrg *'\[$]0 --fallback-echo"') 4199c35d236eSmrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 4200c35d236eSmrg ;; 4201c35d236eSmrg esac 4202c35d236eSmrg 4203c35d236eSmrgifelse([$1], [], 4204c35d236eSmrg [cfgfile="${ofile}T" 4205c35d236eSmrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 4206c35d236eSmrg $rm -f "$cfgfile" 4207c35d236eSmrg AC_MSG_NOTICE([creating $ofile])], 4208c35d236eSmrg [cfgfile="$ofile"]) 4209c35d236eSmrg 4210c35d236eSmrg cat <<__EOF__ >> "$cfgfile" 4211c35d236eSmrgifelse([$1], [], 4212c35d236eSmrg[#! $SHELL 4213c35d236eSmrg 4214c35d236eSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 4215c35d236eSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 4216c35d236eSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4217c35d236eSmrg# 4218c35d236eSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 4219c35d236eSmrg# Free Software Foundation, Inc. 4220c35d236eSmrg# 4221c35d236eSmrg# This file is part of GNU Libtool: 4222c35d236eSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4223c35d236eSmrg# 4224c35d236eSmrg# This program is free software; you can redistribute it and/or modify 4225c35d236eSmrg# it under the terms of the GNU General Public License as published by 4226c35d236eSmrg# the Free Software Foundation; either version 2 of the License, or 4227c35d236eSmrg# (at your option) any later version. 4228c35d236eSmrg# 4229c35d236eSmrg# This program is distributed in the hope that it will be useful, but 4230c35d236eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 4231c35d236eSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4232c35d236eSmrg# General Public License for more details. 4233c35d236eSmrg# 4234c35d236eSmrg# You should have received a copy of the GNU General Public License 4235c35d236eSmrg# along with this program; if not, write to the Free Software 4236c35d236eSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 4237c35d236eSmrg# 4238c35d236eSmrg# As a special exception to the GNU General Public License, if you 4239c35d236eSmrg# distribute this file as part of a program that contains a 4240c35d236eSmrg# configuration script generated by Autoconf, you may include it under 4241c35d236eSmrg# the same distribution terms that you use for the rest of that program. 4242c35d236eSmrg 4243c35d236eSmrg# A sed program that does not truncate output. 4244c35d236eSmrgSED=$lt_SED 4245c35d236eSmrg 4246c35d236eSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 4247c35d236eSmrgXsed="$SED -e 1s/^X//" 4248c35d236eSmrg 4249c35d236eSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 4250c35d236eSmrg# if CDPATH is set. 4251c35d236eSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4252c35d236eSmrg 4253c35d236eSmrg# The names of the tagged configurations supported by this script. 4254c35d236eSmrgavailable_tags= 4255c35d236eSmrg 4256c35d236eSmrg# ### BEGIN LIBTOOL CONFIG], 4257c35d236eSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 4258c35d236eSmrg 4259c35d236eSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4260c35d236eSmrg 4261c35d236eSmrg# Shell to use when invoking shell scripts. 4262c35d236eSmrgSHELL=$lt_SHELL 4263c35d236eSmrg 4264c35d236eSmrg# Whether or not to build shared libraries. 4265c35d236eSmrgbuild_libtool_libs=$enable_shared 4266c35d236eSmrg 4267c35d236eSmrg# Whether or not to build static libraries. 4268c35d236eSmrgbuild_old_libs=$enable_static 4269c35d236eSmrg 4270c35d236eSmrg# Whether or not to add -lc for building shared libraries. 4271c35d236eSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 4272c35d236eSmrg 4273c35d236eSmrg# Whether or not to disallow shared libs when runtime libs are static 4274c35d236eSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 4275c35d236eSmrg 4276c35d236eSmrg# Whether or not to optimize for fast installation. 4277c35d236eSmrgfast_install=$enable_fast_install 4278c35d236eSmrg 4279c35d236eSmrg# The host system. 4280c35d236eSmrghost_alias=$host_alias 4281c35d236eSmrghost=$host 4282c35d236eSmrghost_os=$host_os 4283c35d236eSmrg 4284c35d236eSmrg# The build system. 4285c35d236eSmrgbuild_alias=$build_alias 4286c35d236eSmrgbuild=$build 4287c35d236eSmrgbuild_os=$build_os 4288c35d236eSmrg 4289c35d236eSmrg# An echo program that does not interpret backslashes. 4290c35d236eSmrgecho=$lt_echo 4291c35d236eSmrg 4292c35d236eSmrg# The archiver. 4293c35d236eSmrgAR=$lt_AR 4294c35d236eSmrgAR_FLAGS=$lt_AR_FLAGS 4295c35d236eSmrg 4296c35d236eSmrg# A C compiler. 4297c35d236eSmrgLTCC=$lt_LTCC 4298c35d236eSmrg 4299c35d236eSmrg# LTCC compiler flags. 4300c35d236eSmrgLTCFLAGS=$lt_LTCFLAGS 4301c35d236eSmrg 4302c35d236eSmrg# A language-specific compiler. 4303c35d236eSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 4304c35d236eSmrg 4305c35d236eSmrg# Is the compiler the GNU C compiler? 4306c35d236eSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 4307c35d236eSmrg 4308c35d236eSmrg# An ERE matcher. 4309c35d236eSmrgEGREP=$lt_EGREP 4310c35d236eSmrg 4311c35d236eSmrg# The linker used to build libraries. 4312c35d236eSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 4313c35d236eSmrg 4314c35d236eSmrg# Whether we need hard or soft links. 4315c35d236eSmrgLN_S=$lt_LN_S 4316c35d236eSmrg 4317c35d236eSmrg# A BSD-compatible nm program. 4318c35d236eSmrgNM=$lt_NM 4319c35d236eSmrg 4320c35d236eSmrg# A symbol stripping program 4321c35d236eSmrgSTRIP=$lt_STRIP 4322c35d236eSmrg 4323c35d236eSmrg# Used to examine libraries when file_magic_cmd begins "file" 4324c35d236eSmrgMAGIC_CMD=$MAGIC_CMD 4325c35d236eSmrg 4326c35d236eSmrg# Used on cygwin: DLL creation program. 4327c35d236eSmrgDLLTOOL="$DLLTOOL" 4328c35d236eSmrg 4329c35d236eSmrg# Used on cygwin: object dumper. 4330c35d236eSmrgOBJDUMP="$OBJDUMP" 4331c35d236eSmrg 4332c35d236eSmrg# Used on cygwin: assembler. 4333c35d236eSmrgAS="$AS" 4334c35d236eSmrg 4335c35d236eSmrg# The name of the directory that contains temporary libtool files. 4336c35d236eSmrgobjdir=$objdir 4337c35d236eSmrg 4338c35d236eSmrg# How to create reloadable object files. 4339c35d236eSmrgreload_flag=$lt_reload_flag 4340c35d236eSmrgreload_cmds=$lt_reload_cmds 4341c35d236eSmrg 4342c35d236eSmrg# How to pass a linker flag through the compiler. 4343c35d236eSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 4344c35d236eSmrg 4345c35d236eSmrg# Object file suffix (normally "o"). 4346c35d236eSmrgobjext="$ac_objext" 4347c35d236eSmrg 4348c35d236eSmrg# Old archive suffix (normally "a"). 4349c35d236eSmrglibext="$libext" 4350c35d236eSmrg 4351c35d236eSmrg# Shared library suffix (normally ".so"). 4352c35d236eSmrgshrext_cmds='$shrext_cmds' 4353c35d236eSmrg 4354c35d236eSmrg# Executable file suffix (normally ""). 4355c35d236eSmrgexeext="$exeext" 4356c35d236eSmrg 4357c35d236eSmrg# Additional compiler flags for building library objects. 4358c35d236eSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 4359c35d236eSmrgpic_mode=$pic_mode 4360c35d236eSmrg 4361c35d236eSmrg# What is the maximum length of a command? 4362c35d236eSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 4363c35d236eSmrg 4364c35d236eSmrg# Does compiler simultaneously support -c and -o options? 4365c35d236eSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 4366c35d236eSmrg 4367c35d236eSmrg# Must we lock files when doing compilation? 4368c35d236eSmrgneed_locks=$lt_need_locks 4369c35d236eSmrg 4370c35d236eSmrg# Do we need the lib prefix for modules? 4371c35d236eSmrgneed_lib_prefix=$need_lib_prefix 4372c35d236eSmrg 4373c35d236eSmrg# Do we need a version for libraries? 4374c35d236eSmrgneed_version=$need_version 4375c35d236eSmrg 4376c35d236eSmrg# Whether dlopen is supported. 4377c35d236eSmrgdlopen_support=$enable_dlopen 4378c35d236eSmrg 4379c35d236eSmrg# Whether dlopen of programs is supported. 4380c35d236eSmrgdlopen_self=$enable_dlopen_self 4381c35d236eSmrg 4382c35d236eSmrg# Whether dlopen of statically linked programs is supported. 4383c35d236eSmrgdlopen_self_static=$enable_dlopen_self_static 4384c35d236eSmrg 4385c35d236eSmrg# Compiler flag to prevent dynamic linking. 4386c35d236eSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 4387c35d236eSmrg 4388c35d236eSmrg# Compiler flag to turn off builtin functions. 4389c35d236eSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 4390c35d236eSmrg 4391c35d236eSmrg# Compiler flag to allow reflexive dlopens. 4392c35d236eSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 4393c35d236eSmrg 4394c35d236eSmrg# Compiler flag to generate shared objects directly from archives. 4395c35d236eSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 4396c35d236eSmrg 4397c35d236eSmrg# Compiler flag to generate thread-safe objects. 4398c35d236eSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 4399c35d236eSmrg 4400c35d236eSmrg# Library versioning type. 4401c35d236eSmrgversion_type=$version_type 4402c35d236eSmrg 4403c35d236eSmrg# Format of library name prefix. 4404c35d236eSmrglibname_spec=$lt_libname_spec 4405c35d236eSmrg 4406c35d236eSmrg# List of archive names. First name is the real one, the rest are links. 4407c35d236eSmrg# The last name is the one that the linker finds with -lNAME. 4408c35d236eSmrglibrary_names_spec=$lt_library_names_spec 4409c35d236eSmrg 4410c35d236eSmrg# The coded name of the library, if different from the real name. 4411c35d236eSmrgsoname_spec=$lt_soname_spec 4412c35d236eSmrg 4413c35d236eSmrg# Commands used to build and install an old-style archive. 4414c35d236eSmrgRANLIB=$lt_RANLIB 4415c35d236eSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 4416c35d236eSmrgold_postinstall_cmds=$lt_old_postinstall_cmds 4417c35d236eSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 4418c35d236eSmrg 4419c35d236eSmrg# Create an old-style archive from a shared archive. 4420c35d236eSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 4421c35d236eSmrg 4422c35d236eSmrg# Create a temporary old-style archive to link instead of a shared archive. 4423c35d236eSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 4424c35d236eSmrg 4425c35d236eSmrg# Commands used to build and install a shared archive. 4426c35d236eSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 4427c35d236eSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 4428c35d236eSmrgpostinstall_cmds=$lt_postinstall_cmds 4429c35d236eSmrgpostuninstall_cmds=$lt_postuninstall_cmds 4430c35d236eSmrg 4431c35d236eSmrg# Commands used to build a loadable module (assumed same as above if empty) 4432c35d236eSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 4433c35d236eSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 4434c35d236eSmrg 4435c35d236eSmrg# Commands to strip libraries. 4436c35d236eSmrgold_striplib=$lt_old_striplib 4437c35d236eSmrgstriplib=$lt_striplib 4438c35d236eSmrg 4439c35d236eSmrg# Dependencies to place before the objects being linked to create a 4440c35d236eSmrg# shared library. 4441c35d236eSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 4442c35d236eSmrg 4443c35d236eSmrg# Dependencies to place after the objects being linked to create a 4444c35d236eSmrg# shared library. 4445c35d236eSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 4446c35d236eSmrg 4447c35d236eSmrg# Dependencies to place before the objects being linked to create a 4448c35d236eSmrg# shared library. 4449c35d236eSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 4450c35d236eSmrg 4451c35d236eSmrg# Dependencies to place after the objects being linked to create a 4452c35d236eSmrg# shared library. 4453c35d236eSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 4454c35d236eSmrg 4455c35d236eSmrg# The library search path used internally by the compiler when linking 4456c35d236eSmrg# a shared library. 4457c35d236eSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 4458c35d236eSmrg 4459c35d236eSmrg# Method to check whether dependent libraries are shared objects. 4460c35d236eSmrgdeplibs_check_method=$lt_deplibs_check_method 4461c35d236eSmrg 4462c35d236eSmrg# Command to use when deplibs_check_method == file_magic. 4463c35d236eSmrgfile_magic_cmd=$lt_file_magic_cmd 4464c35d236eSmrg 4465c35d236eSmrg# Flag that allows shared libraries with undefined symbols to be built. 4466c35d236eSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 4467c35d236eSmrg 4468c35d236eSmrg# Flag that forces no undefined symbols. 4469c35d236eSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 4470c35d236eSmrg 4471c35d236eSmrg# Commands used to finish a libtool library installation in a directory. 4472c35d236eSmrgfinish_cmds=$lt_finish_cmds 4473c35d236eSmrg 4474c35d236eSmrg# Same as above, but a single script fragment to be evaled but not shown. 4475c35d236eSmrgfinish_eval=$lt_finish_eval 4476c35d236eSmrg 4477c35d236eSmrg# Take the output of nm and produce a listing of raw symbols and C names. 4478c35d236eSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 4479c35d236eSmrg 4480c35d236eSmrg# Transform the output of nm in a proper C declaration 4481c35d236eSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 4482c35d236eSmrg 4483c35d236eSmrg# Transform the output of nm in a C name address pair 4484c35d236eSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 4485c35d236eSmrg 4486c35d236eSmrg# This is the shared library runtime path variable. 4487c35d236eSmrgrunpath_var=$runpath_var 4488c35d236eSmrg 4489c35d236eSmrg# This is the shared library path variable. 4490c35d236eSmrgshlibpath_var=$shlibpath_var 4491c35d236eSmrg 4492c35d236eSmrg# Is shlibpath searched before the hard-coded library search path? 4493c35d236eSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 4494c35d236eSmrg 4495c35d236eSmrg# How to hardcode a shared library path into an executable. 4496c35d236eSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 4497c35d236eSmrg 4498c35d236eSmrg# Whether we should hardcode library paths into libraries. 4499c35d236eSmrghardcode_into_libs=$hardcode_into_libs 4500c35d236eSmrg 4501c35d236eSmrg# Flag to hardcode \$libdir into a binary during linking. 4502c35d236eSmrg# This must work even if \$libdir does not exist. 4503c35d236eSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 4504c35d236eSmrg 4505c35d236eSmrg# If ld is used when linking, flag to hardcode \$libdir into 4506c35d236eSmrg# a binary during linking. This must work even if \$libdir does 4507c35d236eSmrg# not exist. 4508c35d236eSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 4509c35d236eSmrg 4510c35d236eSmrg# Whether we need a single -rpath flag with a separated argument. 4511c35d236eSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 4512c35d236eSmrg 4513c35d236eSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 4514c35d236eSmrg# resulting binary. 4515c35d236eSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 4516c35d236eSmrg 4517c35d236eSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 4518c35d236eSmrg# resulting binary. 4519c35d236eSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 4520c35d236eSmrg 4521c35d236eSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 4522c35d236eSmrg# the resulting binary. 4523c35d236eSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 4524c35d236eSmrg 4525c35d236eSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library 4526c35d236eSmrg# and all subsequent libraries and executables linked against it. 4527c35d236eSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 4528c35d236eSmrg 4529c35d236eSmrg# Variables whose values should be saved in libtool wrapper scripts and 4530c35d236eSmrg# restored at relink time. 4531c35d236eSmrgvariables_saved_for_relink="$variables_saved_for_relink" 4532c35d236eSmrg 4533c35d236eSmrg# Whether libtool must link a program against all its dependency libraries. 4534c35d236eSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 4535c35d236eSmrg 4536c35d236eSmrg# Compile-time system search path for libraries 4537c35d236eSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 4538c35d236eSmrg 4539c35d236eSmrg# Run-time system search path for libraries 4540c35d236eSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 4541c35d236eSmrg 4542c35d236eSmrg# Fix the shell variable \$srcfile for the compiler. 4543c35d236eSmrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 4544c35d236eSmrg 4545c35d236eSmrg# Set to yes if exported symbols are required. 4546c35d236eSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 4547c35d236eSmrg 4548c35d236eSmrg# The commands to list exported symbols. 4549c35d236eSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 4550c35d236eSmrg 4551c35d236eSmrg# The commands to extract the exported symbol list from a shared archive. 4552c35d236eSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 4553c35d236eSmrg 4554c35d236eSmrg# Symbols that should not be listed in the preloaded symbols. 4555c35d236eSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 4556c35d236eSmrg 4557c35d236eSmrg# Symbols that must always be exported. 4558c35d236eSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 4559c35d236eSmrg 4560c35d236eSmrgifelse([$1],[], 4561c35d236eSmrg[# ### END LIBTOOL CONFIG], 4562c35d236eSmrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 4563c35d236eSmrg 4564c35d236eSmrg__EOF__ 4565c35d236eSmrg 4566c35d236eSmrgifelse([$1],[], [ 4567c35d236eSmrg case $host_os in 4568c35d236eSmrg aix3*) 4569c35d236eSmrg cat <<\EOF >> "$cfgfile" 4570c35d236eSmrg 4571c35d236eSmrg# AIX sometimes has problems with the GCC collect2 program. For some 4572c35d236eSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4573c35d236eSmrg# vanish in a puff of smoke. 4574c35d236eSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 4575c35d236eSmrg COLLECT_NAMES= 4576c35d236eSmrg export COLLECT_NAMES 4577c35d236eSmrgfi 4578c35d236eSmrgEOF 4579c35d236eSmrg ;; 4580c35d236eSmrg esac 4581c35d236eSmrg 4582c35d236eSmrg # We use sed instead of cat because bash on DJGPP gets confused if 4583c35d236eSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4584c35d236eSmrg # text mode, it properly converts lines to CR/LF. This bash problem 4585c35d236eSmrg # is reportedly fixed, but why not run on old versions too? 4586c35d236eSmrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 4587c35d236eSmrg 4588c35d236eSmrg mv -f "$cfgfile" "$ofile" || \ 4589c35d236eSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4590c35d236eSmrg chmod +x "$ofile" 4591c35d236eSmrg]) 4592c35d236eSmrgelse 4593c35d236eSmrg # If there is no Makefile yet, we rely on a make rule to execute 4594c35d236eSmrg # `config.status --recheck' to rerun these tests and create the 4595c35d236eSmrg # libtool script then. 4596c35d236eSmrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 4597c35d236eSmrg if test -f "$ltmain_in"; then 4598c35d236eSmrg test -f Makefile && make "$ltmain" 4599c35d236eSmrg fi 4600c35d236eSmrgfi 4601c35d236eSmrg])# AC_LIBTOOL_CONFIG 4602c35d236eSmrg 4603c35d236eSmrg 4604c35d236eSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 4605c35d236eSmrg# ------------------------------------------- 4606c35d236eSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 4607c35d236eSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 4608c35d236eSmrg 4609c35d236eSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4610c35d236eSmrg 4611c35d236eSmrgif test "$GCC" = yes; then 4612c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4613c35d236eSmrg 4614c35d236eSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4615c35d236eSmrg lt_cv_prog_compiler_rtti_exceptions, 4616c35d236eSmrg [-fno-rtti -fno-exceptions], [], 4617c35d236eSmrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4618c35d236eSmrgfi 4619c35d236eSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 4620c35d236eSmrg 4621c35d236eSmrg 4622c35d236eSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4623c35d236eSmrg# --------------------------------- 4624c35d236eSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 4625c35d236eSmrg[AC_REQUIRE([AC_CANONICAL_HOST]) 4626c35d236eSmrgAC_REQUIRE([AC_PROG_NM]) 4627c35d236eSmrgAC_REQUIRE([AC_OBJEXT]) 4628c35d236eSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 4629c35d236eSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4630c35d236eSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4631c35d236eSmrg[ 4632c35d236eSmrg# These are sane defaults that work on at least a few old systems. 4633c35d236eSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4634c35d236eSmrg 4635c35d236eSmrg# Character class describing NM global symbol codes. 4636c35d236eSmrgsymcode='[[BCDEGRST]]' 4637c35d236eSmrg 4638c35d236eSmrg# Regexp to match symbols that can be accessed directly from C. 4639c35d236eSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4640c35d236eSmrg 4641c35d236eSmrg# Transform an extracted symbol line into a proper C declaration 4642c35d236eSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 4643c35d236eSmrg 4644c35d236eSmrg# Transform an extracted symbol line into symbol name and symbol address 4645c35d236eSmrglt_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'" 4646c35d236eSmrg 4647c35d236eSmrg# Define system-specific variables. 4648c35d236eSmrgcase $host_os in 4649c35d236eSmrgaix*) 4650c35d236eSmrg symcode='[[BCDT]]' 4651c35d236eSmrg ;; 4652c35d236eSmrgcygwin* | mingw* | pw32*) 4653c35d236eSmrg symcode='[[ABCDGISTW]]' 4654c35d236eSmrg ;; 4655c35d236eSmrghpux*) # Its linker distinguishes data from code symbols 4656c35d236eSmrg if test "$host_cpu" = ia64; then 4657c35d236eSmrg symcode='[[ABCDEGRST]]' 4658c35d236eSmrg fi 4659c35d236eSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4660c35d236eSmrg 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'" 4661c35d236eSmrg ;; 4662c35d236eSmrglinux*) 4663c35d236eSmrg if test "$host_cpu" = ia64; then 4664c35d236eSmrg symcode='[[ABCDGIRSTW]]' 4665c35d236eSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4666c35d236eSmrg 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'" 4667c35d236eSmrg fi 4668c35d236eSmrg ;; 4669c35d236eSmrgirix* | nonstopux*) 4670c35d236eSmrg symcode='[[BCDEGRST]]' 4671c35d236eSmrg ;; 4672c35d236eSmrgosf*) 4673c35d236eSmrg symcode='[[BCDEGQRST]]' 4674c35d236eSmrg ;; 4675c35d236eSmrgsolaris*) 4676c35d236eSmrg symcode='[[BDRT]]' 4677c35d236eSmrg ;; 4678c35d236eSmrgsco3.2v5*) 4679c35d236eSmrg symcode='[[DT]]' 4680c35d236eSmrg ;; 4681c35d236eSmrgsysv4.2uw2*) 4682c35d236eSmrg symcode='[[DT]]' 4683c35d236eSmrg ;; 4684c35d236eSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 4685c35d236eSmrg symcode='[[ABDT]]' 4686c35d236eSmrg ;; 4687c35d236eSmrgsysv4) 4688c35d236eSmrg symcode='[[DFNSTU]]' 4689c35d236eSmrg ;; 4690c35d236eSmrgesac 4691c35d236eSmrg 4692c35d236eSmrg# Handle CRLF in mingw tool chain 4693c35d236eSmrgopt_cr= 4694c35d236eSmrgcase $build_os in 4695c35d236eSmrgmingw*) 4696c35d236eSmrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4697c35d236eSmrg ;; 4698c35d236eSmrgesac 4699c35d236eSmrg 4700c35d236eSmrg# If we're using GNU nm, then use its standard symbol codes. 4701c35d236eSmrgcase `$NM -V 2>&1` in 4702c35d236eSmrg*GNU* | *'with BFD'*) 4703c35d236eSmrg symcode='[[ABCDGIRSTW]]' ;; 4704c35d236eSmrgesac 4705c35d236eSmrg 4706c35d236eSmrg# Try without a prefix undercore, then with it. 4707c35d236eSmrgfor ac_symprfx in "" "_"; do 4708c35d236eSmrg 4709c35d236eSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4710c35d236eSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4711c35d236eSmrg 4712c35d236eSmrg # Write the raw and C identifiers. 4713c35d236eSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4714c35d236eSmrg 4715c35d236eSmrg # Check to see that the pipe works correctly. 4716c35d236eSmrg pipe_works=no 4717c35d236eSmrg 4718c35d236eSmrg rm -f conftest* 4719c35d236eSmrg cat > conftest.$ac_ext <<EOF 4720c35d236eSmrg#ifdef __cplusplus 4721c35d236eSmrgextern "C" { 4722c35d236eSmrg#endif 4723c35d236eSmrgchar nm_test_var; 4724c35d236eSmrgvoid nm_test_func(){} 4725c35d236eSmrg#ifdef __cplusplus 4726c35d236eSmrg} 4727c35d236eSmrg#endif 4728c35d236eSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 4729c35d236eSmrgEOF 4730c35d236eSmrg 4731c35d236eSmrg if AC_TRY_EVAL(ac_compile); then 4732c35d236eSmrg # Now try to grab the symbols. 4733c35d236eSmrg nlist=conftest.nm 4734c35d236eSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 4735c35d236eSmrg # Try sorting and uniquifying the output. 4736c35d236eSmrg if sort "$nlist" | uniq > "$nlist"T; then 4737c35d236eSmrg mv -f "$nlist"T "$nlist" 4738c35d236eSmrg else 4739c35d236eSmrg rm -f "$nlist"T 4740c35d236eSmrg fi 4741c35d236eSmrg 4742c35d236eSmrg # Make sure that we snagged all the symbols we need. 4743c35d236eSmrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 4744c35d236eSmrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 4745c35d236eSmrg cat <<EOF > conftest.$ac_ext 4746c35d236eSmrg#ifdef __cplusplus 4747c35d236eSmrgextern "C" { 4748c35d236eSmrg#endif 4749c35d236eSmrg 4750c35d236eSmrgEOF 4751c35d236eSmrg # Now generate the symbol file. 4752c35d236eSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 4753c35d236eSmrg 4754c35d236eSmrg cat <<EOF >> conftest.$ac_ext 4755c35d236eSmrg#if defined (__STDC__) && __STDC__ 4756c35d236eSmrg# define lt_ptr_t void * 4757c35d236eSmrg#else 4758c35d236eSmrg# define lt_ptr_t char * 4759c35d236eSmrg# define const 4760c35d236eSmrg#endif 4761c35d236eSmrg 4762c35d236eSmrg/* The mapping between symbol names and symbols. */ 4763c35d236eSmrgconst struct { 4764c35d236eSmrg const char *name; 4765c35d236eSmrg lt_ptr_t address; 4766c35d236eSmrg} 4767c35d236eSmrglt_preloaded_symbols[[]] = 4768c35d236eSmrg{ 4769c35d236eSmrgEOF 4770c35d236eSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 4771c35d236eSmrg cat <<\EOF >> conftest.$ac_ext 4772c35d236eSmrg {0, (lt_ptr_t) 0} 4773c35d236eSmrg}; 4774c35d236eSmrg 4775c35d236eSmrg#ifdef __cplusplus 4776c35d236eSmrg} 4777c35d236eSmrg#endif 4778c35d236eSmrgEOF 4779c35d236eSmrg # Now try linking the two files. 4780c35d236eSmrg mv conftest.$ac_objext conftstm.$ac_objext 4781c35d236eSmrg lt_save_LIBS="$LIBS" 4782c35d236eSmrg lt_save_CFLAGS="$CFLAGS" 4783c35d236eSmrg LIBS="conftstm.$ac_objext" 4784c35d236eSmrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4785c35d236eSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4786c35d236eSmrg pipe_works=yes 4787c35d236eSmrg fi 4788c35d236eSmrg LIBS="$lt_save_LIBS" 4789c35d236eSmrg CFLAGS="$lt_save_CFLAGS" 4790c35d236eSmrg else 4791c35d236eSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4792c35d236eSmrg fi 4793c35d236eSmrg else 4794c35d236eSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4795c35d236eSmrg fi 4796c35d236eSmrg else 4797c35d236eSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4798c35d236eSmrg fi 4799c35d236eSmrg else 4800c35d236eSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4801c35d236eSmrg cat conftest.$ac_ext >&5 4802c35d236eSmrg fi 4803c35d236eSmrg rm -f conftest* conftst* 4804c35d236eSmrg 4805c35d236eSmrg # Do not use the global_symbol_pipe unless it works. 4806c35d236eSmrg if test "$pipe_works" = yes; then 4807c35d236eSmrg break 4808c35d236eSmrg else 4809c35d236eSmrg lt_cv_sys_global_symbol_pipe= 4810c35d236eSmrg fi 4811c35d236eSmrgdone 4812c35d236eSmrg]) 4813c35d236eSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4814c35d236eSmrg lt_cv_sys_global_symbol_to_cdecl= 4815c35d236eSmrgfi 4816c35d236eSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4817c35d236eSmrg AC_MSG_RESULT(failed) 4818c35d236eSmrgelse 4819c35d236eSmrg AC_MSG_RESULT(ok) 4820c35d236eSmrgfi 4821c35d236eSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4822c35d236eSmrg 4823c35d236eSmrg 4824c35d236eSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 4825c35d236eSmrg# --------------------------------------- 4826c35d236eSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 4827c35d236eSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 4828c35d236eSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4829c35d236eSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 4830c35d236eSmrg 4831c35d236eSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 4832c35d236eSmrg ifelse([$1],[CXX],[ 4833c35d236eSmrg # C++ specific cases for pic, static, wl, etc. 4834c35d236eSmrg if test "$GXX" = yes; then 4835c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4836c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 4837c35d236eSmrg 4838c35d236eSmrg case $host_os in 4839c35d236eSmrg aix*) 4840c35d236eSmrg # All AIX code is PIC. 4841c35d236eSmrg if test "$host_cpu" = ia64; then 4842c35d236eSmrg # AIX 5 now supports IA64 processor 4843c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4844c35d236eSmrg fi 4845c35d236eSmrg ;; 4846c35d236eSmrg amigaos*) 4847c35d236eSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4848c35d236eSmrg # adding the `-m68020' flag to GCC prevents building anything better, 4849c35d236eSmrg # like `-m68040'. 4850c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4851c35d236eSmrg ;; 4852c35d236eSmrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4853c35d236eSmrg # PIC is the default for these OSes. 4854c35d236eSmrg ;; 4855c35d236eSmrg mingw* | os2* | pw32*) 4856c35d236eSmrg # This hack is so that the source file can tell whether it is being 4857c35d236eSmrg # built for inclusion in a dll (and should export symbols for example). 4858c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 4859c35d236eSmrg ;; 4860c35d236eSmrg darwin* | rhapsody*) 4861c35d236eSmrg # PIC is the default on this platform 4862c35d236eSmrg # Common symbols not allowed in MH_DYLIB files 4863c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4864c35d236eSmrg ;; 4865c35d236eSmrg *djgpp*) 4866c35d236eSmrg # DJGPP does not support shared libraries at all 4867c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 4868c35d236eSmrg ;; 4869c35d236eSmrg interix3*) 4870c35d236eSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4871c35d236eSmrg # Instead, we relocate shared libraries at runtime. 4872c35d236eSmrg ;; 4873c35d236eSmrg sysv4*MP*) 4874c35d236eSmrg if test -d /usr/nec; then 4875c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4876c35d236eSmrg fi 4877c35d236eSmrg ;; 4878c35d236eSmrg hpux*) 4879c35d236eSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4880c35d236eSmrg # not for PA HP-UX. 4881c35d236eSmrg case $host_cpu in 4882c35d236eSmrg hppa*64*|ia64*) 4883c35d236eSmrg ;; 4884c35d236eSmrg *) 4885c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4886c35d236eSmrg ;; 4887c35d236eSmrg esac 4888c35d236eSmrg ;; 4889c35d236eSmrg *) 4890c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4891c35d236eSmrg ;; 4892c35d236eSmrg esac 4893c35d236eSmrg else 4894c35d236eSmrg case $host_os in 4895c35d236eSmrg aix4* | aix5*) 4896c35d236eSmrg # All AIX code is PIC. 4897c35d236eSmrg if test "$host_cpu" = ia64; then 4898c35d236eSmrg # AIX 5 now supports IA64 processor 4899c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4900c35d236eSmrg else 4901c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4902c35d236eSmrg fi 4903c35d236eSmrg ;; 4904c35d236eSmrg chorus*) 4905c35d236eSmrg case $cc_basename in 4906c35d236eSmrg cxch68*) 4907c35d236eSmrg # Green Hills C++ Compiler 4908c35d236eSmrg # _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" 4909c35d236eSmrg ;; 4910c35d236eSmrg esac 4911c35d236eSmrg ;; 4912c35d236eSmrg darwin*) 4913c35d236eSmrg # PIC is the default on this platform 4914c35d236eSmrg # Common symbols not allowed in MH_DYLIB files 4915c35d236eSmrg case $cc_basename in 4916c35d236eSmrg xlc*) 4917c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 4918c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4919c35d236eSmrg ;; 4920c35d236eSmrg esac 4921c35d236eSmrg ;; 4922c35d236eSmrg dgux*) 4923c35d236eSmrg case $cc_basename in 4924c35d236eSmrg ec++*) 4925c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4926c35d236eSmrg ;; 4927c35d236eSmrg ghcx*) 4928c35d236eSmrg # Green Hills C++ Compiler 4929c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4930c35d236eSmrg ;; 4931c35d236eSmrg *) 4932c35d236eSmrg ;; 4933c35d236eSmrg esac 4934c35d236eSmrg ;; 4935c35d236eSmrg freebsd* | kfreebsd*-gnu | dragonfly*) 4936c35d236eSmrg # FreeBSD uses GNU C++ 4937c35d236eSmrg ;; 4938c35d236eSmrg hpux9* | hpux10* | hpux11*) 4939c35d236eSmrg case $cc_basename in 4940c35d236eSmrg CC*) 4941c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4942c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4943c35d236eSmrg if test "$host_cpu" != ia64; then 4944c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4945c35d236eSmrg fi 4946c35d236eSmrg ;; 4947c35d236eSmrg aCC*) 4948c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4949c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4950c35d236eSmrg case $host_cpu in 4951c35d236eSmrg hppa*64*|ia64*) 4952c35d236eSmrg # +Z the default 4953c35d236eSmrg ;; 4954c35d236eSmrg *) 4955c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4956c35d236eSmrg ;; 4957c35d236eSmrg esac 4958c35d236eSmrg ;; 4959c35d236eSmrg *) 4960c35d236eSmrg ;; 4961c35d236eSmrg esac 4962c35d236eSmrg ;; 4963c35d236eSmrg interix*) 4964c35d236eSmrg # This is c89, which is MS Visual C++ (no shared libs) 4965c35d236eSmrg # Anyone wants to do a port? 4966c35d236eSmrg ;; 4967c35d236eSmrg irix5* | irix6* | nonstopux*) 4968c35d236eSmrg case $cc_basename in 4969c35d236eSmrg CC*) 4970c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4971c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4972c35d236eSmrg # CC pic flag -KPIC is the default. 4973c35d236eSmrg ;; 4974c35d236eSmrg *) 4975c35d236eSmrg ;; 4976c35d236eSmrg esac 4977c35d236eSmrg ;; 4978c35d236eSmrg linux*) 4979c35d236eSmrg case $cc_basename in 4980c35d236eSmrg KCC*) 4981c35d236eSmrg # KAI C++ Compiler 4982c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4983c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4984c35d236eSmrg ;; 4985c35d236eSmrg icpc* | ecpc*) 4986c35d236eSmrg # Intel C++ 4987c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4988c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4989c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 4990c35d236eSmrg ;; 4991c35d236eSmrg pgCC*) 4992c35d236eSmrg # Portland Group C++ compiler. 4993c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4994c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4995c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4996c35d236eSmrg ;; 4997c35d236eSmrg cxx*) 4998c35d236eSmrg # Compaq C++ 4999c35d236eSmrg # Make sure the PIC flag is empty. It appears that all Alpha 5000c35d236eSmrg # Linux and Compaq Tru64 Unix objects are PIC. 5001c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5002c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5003c35d236eSmrg ;; 5004c35d236eSmrg *) 5005c35d236eSmrg ;; 5006c35d236eSmrg esac 5007c35d236eSmrg ;; 5008c35d236eSmrg lynxos*) 5009c35d236eSmrg ;; 5010c35d236eSmrg m88k*) 5011c35d236eSmrg ;; 5012c35d236eSmrg mvs*) 5013c35d236eSmrg case $cc_basename in 5014c35d236eSmrg cxx*) 5015c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5016c35d236eSmrg ;; 5017c35d236eSmrg *) 5018c35d236eSmrg ;; 5019c35d236eSmrg esac 5020c35d236eSmrg ;; 5021c35d236eSmrg netbsd*) 5022c35d236eSmrg ;; 5023c35d236eSmrg osf3* | osf4* | osf5*) 5024c35d236eSmrg case $cc_basename in 5025c35d236eSmrg KCC*) 5026c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5027c35d236eSmrg ;; 5028c35d236eSmrg RCC*) 5029c35d236eSmrg # Rational C++ 2.4.1 5030c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5031c35d236eSmrg ;; 5032c35d236eSmrg cxx*) 5033c35d236eSmrg # Digital/Compaq C++ 5034c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5035c35d236eSmrg # Make sure the PIC flag is empty. It appears that all Alpha 5036c35d236eSmrg # Linux and Compaq Tru64 Unix objects are PIC. 5037c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5038c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5039c35d236eSmrg ;; 5040c35d236eSmrg *) 5041c35d236eSmrg ;; 5042c35d236eSmrg esac 5043c35d236eSmrg ;; 5044c35d236eSmrg psos*) 5045c35d236eSmrg ;; 5046c35d236eSmrg solaris*) 5047c35d236eSmrg case $cc_basename in 5048c35d236eSmrg CC*) 5049c35d236eSmrg # Sun C++ 4.2, 5.x and Centerline C++ 5050c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5051c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5052c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5053c35d236eSmrg ;; 5054c35d236eSmrg gcx*) 5055c35d236eSmrg # Green Hills C++ Compiler 5056c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5057c35d236eSmrg ;; 5058c35d236eSmrg *) 5059c35d236eSmrg ;; 5060c35d236eSmrg esac 5061c35d236eSmrg ;; 5062c35d236eSmrg sunos4*) 5063c35d236eSmrg case $cc_basename in 5064c35d236eSmrg CC*) 5065c35d236eSmrg # Sun C++ 4.x 5066c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5067c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5068c35d236eSmrg ;; 5069c35d236eSmrg lcc*) 5070c35d236eSmrg # Lucid 5071c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5072c35d236eSmrg ;; 5073c35d236eSmrg *) 5074c35d236eSmrg ;; 5075c35d236eSmrg esac 5076c35d236eSmrg ;; 5077c35d236eSmrg tandem*) 5078c35d236eSmrg case $cc_basename in 5079c35d236eSmrg NCC*) 5080c35d236eSmrg # NonStop-UX NCC 3.20 5081c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5082c35d236eSmrg ;; 5083c35d236eSmrg *) 5084c35d236eSmrg ;; 5085c35d236eSmrg esac 5086c35d236eSmrg ;; 5087c35d236eSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5088c35d236eSmrg case $cc_basename in 5089c35d236eSmrg CC*) 5090c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5091c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5092c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5093c35d236eSmrg ;; 5094c35d236eSmrg esac 5095c35d236eSmrg ;; 5096c35d236eSmrg vxworks*) 5097c35d236eSmrg ;; 5098c35d236eSmrg *) 5099c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5100c35d236eSmrg ;; 5101c35d236eSmrg esac 5102c35d236eSmrg fi 5103c35d236eSmrg], 5104c35d236eSmrg[ 5105c35d236eSmrg if test "$GCC" = yes; then 5106c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5107c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5108c35d236eSmrg 5109c35d236eSmrg case $host_os in 5110c35d236eSmrg aix*) 5111c35d236eSmrg # All AIX code is PIC. 5112c35d236eSmrg if test "$host_cpu" = ia64; then 5113c35d236eSmrg # AIX 5 now supports IA64 processor 5114c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5115c35d236eSmrg fi 5116c35d236eSmrg ;; 5117c35d236eSmrg 5118c35d236eSmrg amigaos*) 5119c35d236eSmrg # FIXME: we need at least 68020 code to build shared libraries, but 5120c35d236eSmrg # adding the `-m68020' flag to GCC prevents building anything better, 5121c35d236eSmrg # like `-m68040'. 5122c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5123c35d236eSmrg ;; 5124c35d236eSmrg 5125c35d236eSmrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5126c35d236eSmrg # PIC is the default for these OSes. 5127c35d236eSmrg ;; 5128c35d236eSmrg 5129c35d236eSmrg mingw* | pw32* | os2*) 5130c35d236eSmrg # This hack is so that the source file can tell whether it is being 5131c35d236eSmrg # built for inclusion in a dll (and should export symbols for example). 5132c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5133c35d236eSmrg ;; 5134c35d236eSmrg 5135c35d236eSmrg darwin* | rhapsody*) 5136c35d236eSmrg # PIC is the default on this platform 5137c35d236eSmrg # Common symbols not allowed in MH_DYLIB files 5138c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5139c35d236eSmrg ;; 5140c35d236eSmrg 5141c35d236eSmrg interix3*) 5142c35d236eSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5143c35d236eSmrg # Instead, we relocate shared libraries at runtime. 5144c35d236eSmrg ;; 5145c35d236eSmrg 5146c35d236eSmrg msdosdjgpp*) 5147c35d236eSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 5148c35d236eSmrg # on systems that don't support them. 5149c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5150c35d236eSmrg enable_shared=no 5151c35d236eSmrg ;; 5152c35d236eSmrg 5153c35d236eSmrg sysv4*MP*) 5154c35d236eSmrg if test -d /usr/nec; then 5155c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5156c35d236eSmrg fi 5157c35d236eSmrg ;; 5158c35d236eSmrg 5159c35d236eSmrg hpux*) 5160c35d236eSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5161c35d236eSmrg # not for PA HP-UX. 5162c35d236eSmrg case $host_cpu in 5163c35d236eSmrg hppa*64*|ia64*) 5164c35d236eSmrg # +Z the default 5165c35d236eSmrg ;; 5166c35d236eSmrg *) 5167c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5168c35d236eSmrg ;; 5169c35d236eSmrg esac 5170c35d236eSmrg ;; 5171c35d236eSmrg 5172c35d236eSmrg *) 5173c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5174c35d236eSmrg ;; 5175c35d236eSmrg esac 5176c35d236eSmrg else 5177c35d236eSmrg # PORTME Check for flag to pass linker flags through the system compiler. 5178c35d236eSmrg case $host_os in 5179c35d236eSmrg aix*) 5180c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5181c35d236eSmrg if test "$host_cpu" = ia64; then 5182c35d236eSmrg # AIX 5 now supports IA64 processor 5183c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5184c35d236eSmrg else 5185c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5186c35d236eSmrg fi 5187c35d236eSmrg ;; 5188c35d236eSmrg darwin*) 5189c35d236eSmrg # PIC is the default on this platform 5190c35d236eSmrg # Common symbols not allowed in MH_DYLIB files 5191c35d236eSmrg case $cc_basename in 5192c35d236eSmrg xlc*) 5193c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5194c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5195c35d236eSmrg ;; 5196c35d236eSmrg esac 5197c35d236eSmrg ;; 5198c35d236eSmrg 5199c35d236eSmrg mingw* | pw32* | os2*) 5200c35d236eSmrg # This hack is so that the source file can tell whether it is being 5201c35d236eSmrg # built for inclusion in a dll (and should export symbols for example). 5202c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5203c35d236eSmrg ;; 5204c35d236eSmrg 5205c35d236eSmrg hpux9* | hpux10* | hpux11*) 5206c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5207c35d236eSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5208c35d236eSmrg # not for PA HP-UX. 5209c35d236eSmrg case $host_cpu in 5210c35d236eSmrg hppa*64*|ia64*) 5211c35d236eSmrg # +Z the default 5212c35d236eSmrg ;; 5213c35d236eSmrg *) 5214c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5215c35d236eSmrg ;; 5216c35d236eSmrg esac 5217c35d236eSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 5218c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5219c35d236eSmrg ;; 5220c35d236eSmrg 5221c35d236eSmrg irix5* | irix6* | nonstopux*) 5222c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5223c35d236eSmrg # PIC (with -KPIC) is the default. 5224c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5225c35d236eSmrg ;; 5226c35d236eSmrg 5227c35d236eSmrg newsos6) 5228c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5229c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5230c35d236eSmrg ;; 5231c35d236eSmrg 5232c35d236eSmrg linux*) 5233c35d236eSmrg case $cc_basename in 5234c35d236eSmrg icc* | ecc*) 5235c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5236c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5237c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5238c35d236eSmrg ;; 5239c35d236eSmrg pgcc* | pgf77* | pgf90* | pgf95*) 5240c35d236eSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 5241c35d236eSmrg # which looks to be a dead project) 5242c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5243c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5244c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5245c35d236eSmrg ;; 5246c35d236eSmrg ccc*) 5247c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5248c35d236eSmrg # All Alpha code is PIC. 5249c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5250c35d236eSmrg ;; 5251c35d236eSmrg esac 5252c35d236eSmrg ;; 5253c35d236eSmrg 5254c35d236eSmrg osf3* | osf4* | osf5*) 5255c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5256c35d236eSmrg # All OSF/1 code is PIC. 5257c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5258c35d236eSmrg ;; 5259c35d236eSmrg 5260c35d236eSmrg solaris*) 5261c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5262c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5263c35d236eSmrg case $cc_basename in 5264c35d236eSmrg f77* | f90* | f95*) 5265c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5266c35d236eSmrg *) 5267c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5268c35d236eSmrg esac 5269c35d236eSmrg ;; 5270c35d236eSmrg 5271c35d236eSmrg sunos4*) 5272c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5273c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5274c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5275c35d236eSmrg ;; 5276c35d236eSmrg 5277c35d236eSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 5278c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5279c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5280c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5281c35d236eSmrg ;; 5282c35d236eSmrg 5283c35d236eSmrg sysv4*MP*) 5284c35d236eSmrg if test -d /usr/nec ;then 5285c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5286c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5287c35d236eSmrg fi 5288c35d236eSmrg ;; 5289c35d236eSmrg 5290c35d236eSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5291c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5292c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5293c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5294c35d236eSmrg ;; 5295c35d236eSmrg 5296c35d236eSmrg unicos*) 5297c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5298c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5299c35d236eSmrg ;; 5300c35d236eSmrg 5301c35d236eSmrg uts4*) 5302c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5303c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5304c35d236eSmrg ;; 5305c35d236eSmrg 5306c35d236eSmrg *) 5307c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5308c35d236eSmrg ;; 5309c35d236eSmrg esac 5310c35d236eSmrg fi 5311c35d236eSmrg]) 5312c35d236eSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 5313c35d236eSmrg 5314c35d236eSmrg# 5315c35d236eSmrg# Check to make sure the PIC flag actually works. 5316c35d236eSmrg# 5317c35d236eSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 5318c35d236eSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 5319c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 5320c35d236eSmrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 5321c35d236eSmrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 5322c35d236eSmrg "" | " "*) ;; 5323c35d236eSmrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5324c35d236eSmrg esac], 5325c35d236eSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5326c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5327c35d236eSmrgfi 5328c35d236eSmrgcase $host_os in 5329c35d236eSmrg # For platforms which do not support PIC, -DPIC is meaningless: 5330c35d236eSmrg *djgpp*) 5331c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5332c35d236eSmrg ;; 5333c35d236eSmrg *) 5334c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 5335c35d236eSmrg ;; 5336c35d236eSmrgesac 5337c35d236eSmrg 5338c35d236eSmrg# 5339c35d236eSmrg# Check to make sure the static flag actually works. 5340c35d236eSmrg# 5341c35d236eSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 5342c35d236eSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5343c35d236eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 5344c35d236eSmrg $lt_tmp_static_flag, 5345c35d236eSmrg [], 5346c35d236eSmrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 5347c35d236eSmrg]) 5348c35d236eSmrg 5349c35d236eSmrg 5350c35d236eSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 5351c35d236eSmrg# ------------------------------------ 5352c35d236eSmrg# See if the linker supports building shared libraries. 5353c35d236eSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 5354c35d236eSmrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5355c35d236eSmrgifelse([$1],[CXX],[ 5356c35d236eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5357c35d236eSmrg case $host_os in 5358c35d236eSmrg aix4* | aix5*) 5359c35d236eSmrg # If we're using GNU nm, then we don't want the "-C" option. 5360c35d236eSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5361c35d236eSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5362c35d236eSmrg _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' 5363c35d236eSmrg else 5364c35d236eSmrg _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' 5365c35d236eSmrg fi 5366c35d236eSmrg ;; 5367c35d236eSmrg pw32*) 5368c35d236eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5369c35d236eSmrg ;; 5370c35d236eSmrg cygwin* | mingw*) 5371c35d236eSmrg _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' 5372c35d236eSmrg ;; 5373c35d236eSmrg *) 5374c35d236eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5375c35d236eSmrg ;; 5376c35d236eSmrg esac 5377c35d236eSmrg],[ 5378c35d236eSmrg runpath_var= 5379c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 5380c35d236eSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5381c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)= 5382c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5383c35d236eSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 5384c35d236eSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5385c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5386c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5387c35d236eSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 5388c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5389c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5390c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5391c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5392c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5393c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5394c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5395c35d236eSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 5396c35d236eSmrg _LT_AC_TAGVAR(module_cmds, $1)= 5397c35d236eSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 5398c35d236eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5399c35d236eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5400c35d236eSmrg # include_expsyms should be a list of space-separated symbols to be *always* 5401c35d236eSmrg # included in the symbol list 5402c35d236eSmrg _LT_AC_TAGVAR(include_expsyms, $1)= 5403c35d236eSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 5404c35d236eSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 5405c35d236eSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5406c35d236eSmrg # as well as any symbol that contains `d'. 5407c35d236eSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 5408c35d236eSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5409c35d236eSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 5410c35d236eSmrg # the symbol is explicitly referenced. Since portable code cannot 5411c35d236eSmrg # rely on this symbol name, it's probably fine to never include it in 5412c35d236eSmrg # preloaded symbol tables. 5413c35d236eSmrg extract_expsyms_cmds= 5414c35d236eSmrg # Just being paranoid about ensuring that cc_basename is set. 5415c35d236eSmrg _LT_CC_BASENAME([$compiler]) 5416c35d236eSmrg case $host_os in 5417c35d236eSmrg cygwin* | mingw* | pw32*) 5418c35d236eSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5419c35d236eSmrg # When not using gcc, we currently assume that we are using 5420c35d236eSmrg # Microsoft Visual C++. 5421c35d236eSmrg if test "$GCC" != yes; then 5422c35d236eSmrg with_gnu_ld=no 5423c35d236eSmrg fi 5424c35d236eSmrg ;; 5425c35d236eSmrg interix*) 5426c35d236eSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5427c35d236eSmrg with_gnu_ld=yes 5428c35d236eSmrg ;; 5429c35d236eSmrg openbsd*) 5430c35d236eSmrg with_gnu_ld=no 5431c35d236eSmrg ;; 5432c35d236eSmrg esac 5433c35d236eSmrg 5434c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5435c35d236eSmrg if test "$with_gnu_ld" = yes; then 5436c35d236eSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5437c35d236eSmrg wlarc='${wl}' 5438c35d236eSmrg 5439c35d236eSmrg # Set some defaults for GNU ld with shared library support. These 5440c35d236eSmrg # are reset later if shared libraries are not supported. Putting them 5441c35d236eSmrg # here allows them to be overridden if necessary. 5442c35d236eSmrg runpath_var=LD_RUN_PATH 5443c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5444c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5445c35d236eSmrg # ancient GNU ld didn't support --whole-archive et. al. 5446c35d236eSmrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 5447c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5448c35d236eSmrg else 5449c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5450c35d236eSmrg fi 5451c35d236eSmrg supports_anon_versioning=no 5452c35d236eSmrg case `$LD -v 2>/dev/null` in 5453c35d236eSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5454c35d236eSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5455c35d236eSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5456c35d236eSmrg *\ 2.11.*) ;; # other 2.11 versions 5457c35d236eSmrg *) supports_anon_versioning=yes ;; 5458c35d236eSmrg esac 5459c35d236eSmrg 5460c35d236eSmrg # See if GNU ld supports shared libraries. 5461c35d236eSmrg case $host_os in 5462c35d236eSmrg aix3* | aix4* | aix5*) 5463c35d236eSmrg # On AIX/PPC, the GNU linker is very broken 5464c35d236eSmrg if test "$host_cpu" != ia64; then 5465c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5466c35d236eSmrg cat <<EOF 1>&2 5467c35d236eSmrg 5468c35d236eSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 5469c35d236eSmrg*** to be unable to reliably create shared libraries on AIX. 5470c35d236eSmrg*** Therefore, libtool is disabling shared libraries support. If you 5471c35d236eSmrg*** really care for shared libraries, you may want to modify your PATH 5472c35d236eSmrg*** so that a non-GNU linker is found, and then restart. 5473c35d236eSmrg 5474c35d236eSmrgEOF 5475c35d236eSmrg fi 5476c35d236eSmrg ;; 5477c35d236eSmrg 5478c35d236eSmrg amigaos*) 5479c35d236eSmrg _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)' 5480c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5481c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5482c35d236eSmrg 5483c35d236eSmrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 5484c35d236eSmrg # that the semantics of dynamic libraries on AmigaOS, at least up 5485c35d236eSmrg # to version 4, is to share data among multiple programs linked 5486c35d236eSmrg # with the same dynamic library. Since this doesn't match the 5487c35d236eSmrg # behavior of shared libraries on other platforms, we can't use 5488c35d236eSmrg # them. 5489c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5490c35d236eSmrg ;; 5491c35d236eSmrg 5492c35d236eSmrg beos*) 5493c35d236eSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5494c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5495c35d236eSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5496c35d236eSmrg # support --undefined. This deserves some investigation. FIXME 5497c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5498c35d236eSmrg else 5499c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5500c35d236eSmrg fi 5501c35d236eSmrg ;; 5502c35d236eSmrg 5503c35d236eSmrg cygwin* | mingw* | pw32*) 5504c35d236eSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5505c35d236eSmrg # as there is no search path for DLLs. 5506c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5507c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5508c35d236eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5509c35d236eSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5510c35d236eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' 5511c35d236eSmrg 5512c35d236eSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5513c35d236eSmrg _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' 5514c35d236eSmrg # If the export-symbols file already is a .def file (1st line 5515c35d236eSmrg # is EXPORTS), use it as is; otherwise, prepend... 5516c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5517c35d236eSmrg cp $export_symbols $output_objdir/$soname.def; 5518c35d236eSmrg else 5519c35d236eSmrg echo EXPORTS > $output_objdir/$soname.def; 5520c35d236eSmrg cat $export_symbols >> $output_objdir/$soname.def; 5521c35d236eSmrg fi~ 5522c35d236eSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5523c35d236eSmrg else 5524c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5525c35d236eSmrg fi 5526c35d236eSmrg ;; 5527c35d236eSmrg 5528c35d236eSmrg interix3*) 5529c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5530c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5531c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5532c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5533c35d236eSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5534c35d236eSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5535c35d236eSmrg # default) and relocated if they conflict, which is a slow very memory 5536c35d236eSmrg # consuming and fragmenting process. To avoid this, we pick a random, 5537c35d236eSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5538c35d236eSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5539c35d236eSmrg _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' 5540c35d236eSmrg _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' 5541c35d236eSmrg ;; 5542c35d236eSmrg 5543c35d236eSmrg linux*) 5544c35d236eSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5545c35d236eSmrg tmp_addflag= 5546c35d236eSmrg case $cc_basename,$host_cpu in 5547c35d236eSmrg pgcc*) # Portland Group C compiler 5548c35d236eSmrg _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' 5549c35d236eSmrg tmp_addflag=' $pic_flag' 5550c35d236eSmrg ;; 5551c35d236eSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 5552c35d236eSmrg _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' 5553c35d236eSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 5554c35d236eSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5555c35d236eSmrg tmp_addflag=' -i_dynamic' ;; 5556c35d236eSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5557c35d236eSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5558c35d236eSmrg ifc* | ifort*) # Intel Fortran compiler 5559c35d236eSmrg tmp_addflag=' -nofor_main' ;; 5560c35d236eSmrg esac 5561c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5562c35d236eSmrg 5563c35d236eSmrg if test $supports_anon_versioning = yes; then 5564c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 5565c35d236eSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5566c35d236eSmrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 5567c35d236eSmrg $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5568c35d236eSmrg fi 5569c35d236eSmrg else 5570c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5571c35d236eSmrg fi 5572c35d236eSmrg ;; 5573c35d236eSmrg 5574c35d236eSmrg netbsd*) 5575c35d236eSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5576c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5577c35d236eSmrg wlarc= 5578c35d236eSmrg else 5579c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5580c35d236eSmrg _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' 5581c35d236eSmrg fi 5582c35d236eSmrg ;; 5583c35d236eSmrg 5584c35d236eSmrg solaris*) 5585c35d236eSmrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 5586c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5587c35d236eSmrg cat <<EOF 1>&2 5588c35d236eSmrg 5589c35d236eSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5590c35d236eSmrg*** create shared libraries on Solaris systems. Therefore, libtool 5591c35d236eSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5592c35d236eSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 5593c35d236eSmrg*** your PATH or compiler configuration so that the native linker is 5594c35d236eSmrg*** used, and then restart. 5595c35d236eSmrg 5596c35d236eSmrgEOF 5597c35d236eSmrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5598c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5599c35d236eSmrg _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' 5600c35d236eSmrg else 5601c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5602c35d236eSmrg fi 5603c35d236eSmrg ;; 5604c35d236eSmrg 5605c35d236eSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5606c35d236eSmrg case `$LD -v 2>&1` in 5607c35d236eSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5608c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5609c35d236eSmrg cat <<_LT_EOF 1>&2 5610c35d236eSmrg 5611c35d236eSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5612c35d236eSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5613c35d236eSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5614c35d236eSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5615c35d236eSmrg*** your PATH or compiler configuration so that the native linker is 5616c35d236eSmrg*** used, and then restart. 5617c35d236eSmrg 5618c35d236eSmrg_LT_EOF 5619c35d236eSmrg ;; 5620c35d236eSmrg *) 5621c35d236eSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5622c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 5623c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 5624c35d236eSmrg _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' 5625c35d236eSmrg else 5626c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5627c35d236eSmrg fi 5628c35d236eSmrg ;; 5629c35d236eSmrg esac 5630c35d236eSmrg ;; 5631c35d236eSmrg 5632c35d236eSmrg sunos4*) 5633c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5634c35d236eSmrg wlarc= 5635c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5636c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5637c35d236eSmrg ;; 5638c35d236eSmrg 5639c35d236eSmrg *) 5640c35d236eSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5641c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5642c35d236eSmrg _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' 5643c35d236eSmrg else 5644c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5645c35d236eSmrg fi 5646c35d236eSmrg ;; 5647c35d236eSmrg esac 5648c35d236eSmrg 5649c35d236eSmrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 5650c35d236eSmrg runpath_var= 5651c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5652c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5653c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5654c35d236eSmrg fi 5655c35d236eSmrg else 5656c35d236eSmrg # PORTME fill in a description of your system's linker (not GNU ld) 5657c35d236eSmrg case $host_os in 5658c35d236eSmrg aix3*) 5659c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5660c35d236eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5661c35d236eSmrg _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' 5662c35d236eSmrg # Note: this linker hardcodes the directories in LIBPATH if there 5663c35d236eSmrg # are no directories specified by -L. 5664c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5665c35d236eSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 5666c35d236eSmrg # Neither direct hardcoding nor static linking is supported with a 5667c35d236eSmrg # broken collect2. 5668c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5669c35d236eSmrg fi 5670c35d236eSmrg ;; 5671c35d236eSmrg 5672c35d236eSmrg aix4* | aix5*) 5673c35d236eSmrg if test "$host_cpu" = ia64; then 5674c35d236eSmrg # On IA64, the linker does run time linking by default, so we don't 5675c35d236eSmrg # have to do anything special. 5676c35d236eSmrg aix_use_runtimelinking=no 5677c35d236eSmrg exp_sym_flag='-Bexport' 5678c35d236eSmrg no_entry_flag="" 5679c35d236eSmrg else 5680c35d236eSmrg # If we're using GNU nm, then we don't want the "-C" option. 5681c35d236eSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5682c35d236eSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5683c35d236eSmrg _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' 5684c35d236eSmrg else 5685c35d236eSmrg _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' 5686c35d236eSmrg fi 5687c35d236eSmrg aix_use_runtimelinking=no 5688c35d236eSmrg 5689c35d236eSmrg # Test if we are trying to use run time linking or normal 5690c35d236eSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5691c35d236eSmrg # need to do runtime linking. 5692c35d236eSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 5693c35d236eSmrg for ld_flag in $LDFLAGS; do 5694c35d236eSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5695c35d236eSmrg aix_use_runtimelinking=yes 5696c35d236eSmrg break 5697c35d236eSmrg fi 5698c35d236eSmrg done 5699c35d236eSmrg ;; 5700c35d236eSmrg esac 5701c35d236eSmrg 5702c35d236eSmrg exp_sym_flag='-bexport' 5703c35d236eSmrg no_entry_flag='-bnoentry' 5704c35d236eSmrg fi 5705c35d236eSmrg 5706c35d236eSmrg # When large executables or shared objects are built, AIX ld can 5707c35d236eSmrg # have problems creating the table of contents. If linking a library 5708c35d236eSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5709c35d236eSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5710c35d236eSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5711c35d236eSmrg 5712c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 5713c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5714c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5715c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5716c35d236eSmrg 5717c35d236eSmrg if test "$GCC" = yes; then 5718c35d236eSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5719c35d236eSmrg # We only want to do this on AIX 4.2 and lower, the check 5720c35d236eSmrg # below for broken collect2 doesn't work under 4.3+ 5721c35d236eSmrg collect2name=`${CC} -print-prog-name=collect2` 5722c35d236eSmrg if test -f "$collect2name" && \ 5723c35d236eSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 5724c35d236eSmrg then 5725c35d236eSmrg # We have reworked collect2 5726c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5727c35d236eSmrg else 5728c35d236eSmrg # We have old collect2 5729c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5730c35d236eSmrg # It fails to find uninstalled libraries when the uninstalled 5731c35d236eSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5732c35d236eSmrg # to unsupported forces relinking 5733c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5734c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5735c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5736c35d236eSmrg fi 5737c35d236eSmrg ;; 5738c35d236eSmrg esac 5739c35d236eSmrg shared_flag='-shared' 5740c35d236eSmrg if test "$aix_use_runtimelinking" = yes; then 5741c35d236eSmrg shared_flag="$shared_flag "'${wl}-G' 5742c35d236eSmrg fi 5743c35d236eSmrg else 5744c35d236eSmrg # not using gcc 5745c35d236eSmrg if test "$host_cpu" = ia64; then 5746c35d236eSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5747c35d236eSmrg # chokes on -Wl,-G. The following line is correct: 5748c35d236eSmrg shared_flag='-G' 5749c35d236eSmrg else 5750c35d236eSmrg if test "$aix_use_runtimelinking" = yes; then 5751c35d236eSmrg shared_flag='${wl}-G' 5752c35d236eSmrg else 5753c35d236eSmrg shared_flag='${wl}-bM:SRE' 5754c35d236eSmrg fi 5755c35d236eSmrg fi 5756c35d236eSmrg fi 5757c35d236eSmrg 5758c35d236eSmrg # It seems that -bexpall does not export symbols beginning with 5759c35d236eSmrg # underscore (_), so it is better to generate a list of symbols to export. 5760c35d236eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5761c35d236eSmrg if test "$aix_use_runtimelinking" = yes; then 5762c35d236eSmrg # Warning - without using the other runtime loading flags (-brtl), 5763c35d236eSmrg # -berok will link without error, but may produce a broken library. 5764c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5765c35d236eSmrg # Determine the default libpath from the value encoded in an empty executable. 5766c35d236eSmrg _LT_AC_SYS_LIBPATH_AIX 5767c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5768c35d236eSmrg _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" 5769c35d236eSmrg else 5770c35d236eSmrg if test "$host_cpu" = ia64; then 5771c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5772c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5773c35d236eSmrg _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" 5774c35d236eSmrg else 5775c35d236eSmrg # Determine the default libpath from the value encoded in an empty executable. 5776c35d236eSmrg _LT_AC_SYS_LIBPATH_AIX 5777c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5778c35d236eSmrg # Warning - without using the other run time loading flags, 5779c35d236eSmrg # -berok will link without error, but may produce a broken library. 5780c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5781c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5782c35d236eSmrg # Exported symbols can be pulled into shared objects from archives 5783c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5784c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 5785c35d236eSmrg # This is similar to how AIX traditionally builds its shared libraries. 5786c35d236eSmrg _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' 5787c35d236eSmrg fi 5788c35d236eSmrg fi 5789c35d236eSmrg ;; 5790c35d236eSmrg 5791c35d236eSmrg amigaos*) 5792c35d236eSmrg _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)' 5793c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5794c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5795c35d236eSmrg # see comment about different semantics on the GNU ld section 5796c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5797c35d236eSmrg ;; 5798c35d236eSmrg 5799c35d236eSmrg bsdi[[45]]*) 5800c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5801c35d236eSmrg ;; 5802c35d236eSmrg 5803c35d236eSmrg cygwin* | mingw* | pw32*) 5804c35d236eSmrg # When not using gcc, we currently assume that we are using 5805c35d236eSmrg # Microsoft Visual C++. 5806c35d236eSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5807c35d236eSmrg # no search path for DLLs. 5808c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5809c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5810c35d236eSmrg # Tell ltmain to make .lib files, not .a files. 5811c35d236eSmrg libext=lib 5812c35d236eSmrg # Tell ltmain to make .dll files, not .so files. 5813c35d236eSmrg shrext_cmds=".dll" 5814c35d236eSmrg # FIXME: Setting linknames here is a bad hack. 5815c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 5816c35d236eSmrg # The linker will automatically build a .lib file if we build a DLL. 5817c35d236eSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 5818c35d236eSmrg # FIXME: Should let the user specify the lib program. 5819c35d236eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 5820c35d236eSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 5821c35d236eSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5822c35d236eSmrg ;; 5823c35d236eSmrg 5824c35d236eSmrg darwin* | rhapsody*) 5825c35d236eSmrg case $host_os in 5826c35d236eSmrg rhapsody* | darwin1.[[012]]) 5827c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 5828c35d236eSmrg ;; 5829c35d236eSmrg *) # Darwin 1.3 on 5830c35d236eSmrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 5831c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5832c35d236eSmrg else 5833c35d236eSmrg case ${MACOSX_DEPLOYMENT_TARGET} in 5834c35d236eSmrg 10.[[012]]) 5835c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5836c35d236eSmrg ;; 5837c35d236eSmrg 10.*) 5838c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 5839c35d236eSmrg ;; 5840c35d236eSmrg esac 5841c35d236eSmrg fi 5842c35d236eSmrg ;; 5843c35d236eSmrg esac 5844c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5845c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5846c35d236eSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 5847c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5848c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 5849c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5850c35d236eSmrg if test "$GCC" = yes ; then 5851c35d236eSmrg output_verbose_link_cmd='echo' 5852c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 5853c35d236eSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 5854c35d236eSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 5855c35d236eSmrg _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}' 5856c35d236eSmrg _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}' 5857c35d236eSmrg else 5858c35d236eSmrg case $cc_basename in 5859c35d236eSmrg xlc*) 5860c35d236eSmrg output_verbose_link_cmd='echo' 5861c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' 5862c35d236eSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 5863c35d236eSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 5864c35d236eSmrg _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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 5865c35d236eSmrg _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}' 5866c35d236eSmrg ;; 5867c35d236eSmrg *) 5868c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5869c35d236eSmrg ;; 5870c35d236eSmrg esac 5871c35d236eSmrg fi 5872c35d236eSmrg ;; 5873c35d236eSmrg 5874c35d236eSmrg dgux*) 5875c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5876c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5877c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5878c35d236eSmrg ;; 5879c35d236eSmrg 5880c35d236eSmrg freebsd1*) 5881c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5882c35d236eSmrg ;; 5883c35d236eSmrg 5884c35d236eSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5885c35d236eSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 5886c35d236eSmrg # does not break anything, and helps significantly (at the cost of a little 5887c35d236eSmrg # extra space). 5888c35d236eSmrg freebsd2.2*) 5889c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5890c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5891c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5892c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5893c35d236eSmrg ;; 5894c35d236eSmrg 5895c35d236eSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5896c35d236eSmrg freebsd2*) 5897c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5898c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5899c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5900c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5901c35d236eSmrg ;; 5902c35d236eSmrg 5903c35d236eSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5904c35d236eSmrg freebsd* | kfreebsd*-gnu | dragonfly*) 5905c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 5906c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5907c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5908c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5909c35d236eSmrg ;; 5910c35d236eSmrg 5911c35d236eSmrg hpux9*) 5912c35d236eSmrg if test "$GCC" = yes; then 5913c35d236eSmrg _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' 5914c35d236eSmrg else 5915c35d236eSmrg _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' 5916c35d236eSmrg fi 5917c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5918c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5919c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5920c35d236eSmrg 5921c35d236eSmrg # hardcode_minus_L: Not really in the search PATH, 5922c35d236eSmrg # but as the default location of the library. 5923c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5924c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5925c35d236eSmrg ;; 5926c35d236eSmrg 5927c35d236eSmrg hpux10*) 5928c35d236eSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 5929c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5930c35d236eSmrg else 5931c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5932c35d236eSmrg fi 5933c35d236eSmrg if test "$with_gnu_ld" = no; then 5934c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5935c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5936c35d236eSmrg 5937c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5938c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5939c35d236eSmrg 5940c35d236eSmrg # hardcode_minus_L: Not really in the search PATH, 5941c35d236eSmrg # but as the default location of the library. 5942c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5943c35d236eSmrg fi 5944c35d236eSmrg ;; 5945c35d236eSmrg 5946c35d236eSmrg hpux11*) 5947c35d236eSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 5948c35d236eSmrg case $host_cpu in 5949c35d236eSmrg hppa*64*) 5950c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5951c35d236eSmrg ;; 5952c35d236eSmrg ia64*) 5953c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5954c35d236eSmrg ;; 5955c35d236eSmrg *) 5956c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5957c35d236eSmrg ;; 5958c35d236eSmrg esac 5959c35d236eSmrg else 5960c35d236eSmrg case $host_cpu in 5961c35d236eSmrg hppa*64*) 5962c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5963c35d236eSmrg ;; 5964c35d236eSmrg ia64*) 5965c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5966c35d236eSmrg ;; 5967c35d236eSmrg *) 5968c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5969c35d236eSmrg ;; 5970c35d236eSmrg esac 5971c35d236eSmrg fi 5972c35d236eSmrg if test "$with_gnu_ld" = no; then 5973c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5974c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5975c35d236eSmrg 5976c35d236eSmrg case $host_cpu in 5977c35d236eSmrg hppa*64*|ia64*) 5978c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 5979c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5980c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5981c35d236eSmrg ;; 5982c35d236eSmrg *) 5983c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5984c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5985c35d236eSmrg 5986c35d236eSmrg # hardcode_minus_L: Not really in the search PATH, 5987c35d236eSmrg # but as the default location of the library. 5988c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5989c35d236eSmrg ;; 5990c35d236eSmrg esac 5991c35d236eSmrg fi 5992c35d236eSmrg ;; 5993c35d236eSmrg 5994c35d236eSmrg irix5* | irix6* | nonstopux*) 5995c35d236eSmrg if test "$GCC" = yes; then 5996c35d236eSmrg _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' 5997c35d236eSmrg else 5998c35d236eSmrg _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' 5999c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6000c35d236eSmrg fi 6001c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6002c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6003c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6004c35d236eSmrg ;; 6005c35d236eSmrg 6006c35d236eSmrg netbsd*) 6007c35d236eSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6008c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6009c35d236eSmrg else 6010c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6011c35d236eSmrg fi 6012c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6013c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6014c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6015c35d236eSmrg ;; 6016c35d236eSmrg 6017c35d236eSmrg newsos6) 6018c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6019c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6020c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6021c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6022c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6023c35d236eSmrg ;; 6024c35d236eSmrg 6025c35d236eSmrg openbsd*) 6026c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6027c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6028c35d236eSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6029c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6030c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6031c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6032c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6033c35d236eSmrg else 6034c35d236eSmrg case $host_os in 6035c35d236eSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6036c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6037c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6038c35d236eSmrg ;; 6039c35d236eSmrg *) 6040c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6041c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6042c35d236eSmrg ;; 6043c35d236eSmrg esac 6044c35d236eSmrg fi 6045c35d236eSmrg ;; 6046c35d236eSmrg 6047c35d236eSmrg os2*) 6048c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6049c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6050c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6051c35d236eSmrg _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' 6052c35d236eSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6053c35d236eSmrg ;; 6054c35d236eSmrg 6055c35d236eSmrg osf3*) 6056c35d236eSmrg if test "$GCC" = yes; then 6057c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6058c35d236eSmrg _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' 6059c35d236eSmrg else 6060c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6061c35d236eSmrg _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' 6062c35d236eSmrg fi 6063c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6064c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6065c35d236eSmrg ;; 6066c35d236eSmrg 6067c35d236eSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 6068c35d236eSmrg if test "$GCC" = yes; then 6069c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6070c35d236eSmrg _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' 6071c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6072c35d236eSmrg else 6073c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6074c35d236eSmrg _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' 6075c35d236eSmrg _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~ 6076c35d236eSmrg $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' 6077c35d236eSmrg 6078c35d236eSmrg # Both c and cxx compiler support -rpath directly 6079c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6080c35d236eSmrg fi 6081c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6082c35d236eSmrg ;; 6083c35d236eSmrg 6084c35d236eSmrg solaris*) 6085c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6086c35d236eSmrg if test "$GCC" = yes; then 6087c35d236eSmrg wlarc='${wl}' 6088c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6089c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6090c35d236eSmrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 6091c35d236eSmrg else 6092c35d236eSmrg wlarc='' 6093c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6094c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6095c35d236eSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6096c35d236eSmrg fi 6097c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6098c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6099c35d236eSmrg case $host_os in 6100c35d236eSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6101c35d236eSmrg *) 6102c35d236eSmrg # The compiler driver will combine linker options so we 6103c35d236eSmrg # cannot just pass the convience library names through 6104c35d236eSmrg # without $wl, iff we do not link with $LD. 6105c35d236eSmrg # Luckily, gcc supports the same syntax we need for Sun Studio. 6106c35d236eSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6107c35d236eSmrg case $wlarc in 6108c35d236eSmrg '') 6109c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 6110c35d236eSmrg *) 6111c35d236eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; 6112c35d236eSmrg esac ;; 6113c35d236eSmrg esac 6114c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6115c35d236eSmrg ;; 6116c35d236eSmrg 6117c35d236eSmrg sunos4*) 6118c35d236eSmrg if test "x$host_vendor" = xsequent; then 6119c35d236eSmrg # Use $CC to link under sequent, because it throws in some extra .o 6120c35d236eSmrg # files that make .init and .fini sections work. 6121c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6122c35d236eSmrg else 6123c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6124c35d236eSmrg fi 6125c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6126c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6127c35d236eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6128c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6129c35d236eSmrg ;; 6130c35d236eSmrg 6131c35d236eSmrg sysv4) 6132c35d236eSmrg case $host_vendor in 6133c35d236eSmrg sni) 6134c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6135c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6136c35d236eSmrg ;; 6137c35d236eSmrg siemens) 6138c35d236eSmrg ## LD is ld it makes a PLAMLIB 6139c35d236eSmrg ## CC just makes a GrossModule. 6140c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6141c35d236eSmrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6142c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6143c35d236eSmrg ;; 6144c35d236eSmrg motorola) 6145c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6146c35d236eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6147c35d236eSmrg ;; 6148c35d236eSmrg esac 6149c35d236eSmrg runpath_var='LD_RUN_PATH' 6150c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6151c35d236eSmrg ;; 6152c35d236eSmrg 6153c35d236eSmrg sysv4.3*) 6154c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6155c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6156c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6157c35d236eSmrg ;; 6158c35d236eSmrg 6159c35d236eSmrg sysv4*MP*) 6160c35d236eSmrg if test -d /usr/nec; then 6161c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6162c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6163c35d236eSmrg runpath_var=LD_RUN_PATH 6164c35d236eSmrg hardcode_runpath_var=yes 6165c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6166c35d236eSmrg fi 6167c35d236eSmrg ;; 6168c35d236eSmrg 6169c35d236eSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) 6170c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6171c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6172c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6173c35d236eSmrg runpath_var='LD_RUN_PATH' 6174c35d236eSmrg 6175c35d236eSmrg if test "$GCC" = yes; then 6176c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6177c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6178c35d236eSmrg else 6179c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6180c35d236eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6181c35d236eSmrg fi 6182c35d236eSmrg ;; 6183c35d236eSmrg 6184c35d236eSmrg sysv5* | sco3.2v5* | sco5v6*) 6185c35d236eSmrg # Note: We can NOT use -z defs as we might desire, because we do not 6186c35d236eSmrg # link with -lc, and that would cause any symbols used from libc to 6187c35d236eSmrg # always be unresolved, which means just about no library would 6188c35d236eSmrg # ever link correctly. If we're not using GNU ld we use -z text 6189c35d236eSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6190c35d236eSmrg # as -z defs. 6191c35d236eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6192c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6193c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6194c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6195c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 6196c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 6197c35d236eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6198c35d236eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6199c35d236eSmrg runpath_var='LD_RUN_PATH' 6200c35d236eSmrg 6201c35d236eSmrg if test "$GCC" = yes; then 6202c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6203c35d236eSmrg _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' 6204c35d236eSmrg else 6205c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6206c35d236eSmrg _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' 6207c35d236eSmrg fi 6208c35d236eSmrg ;; 6209c35d236eSmrg 6210c35d236eSmrg uts4*) 6211c35d236eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6212c35d236eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6213c35d236eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6214c35d236eSmrg ;; 6215c35d236eSmrg 6216c35d236eSmrg *) 6217c35d236eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6218c35d236eSmrg ;; 6219c35d236eSmrg esac 6220c35d236eSmrg fi 6221c35d236eSmrg]) 6222c35d236eSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 6223c35d236eSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6224c35d236eSmrg 6225c35d236eSmrg# 6226c35d236eSmrg# Do we need to explicitly link libc? 6227c35d236eSmrg# 6228c35d236eSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6229c35d236eSmrgx|xyes) 6230c35d236eSmrg # Assume -lc should be added 6231c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6232c35d236eSmrg 6233c35d236eSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 6234c35d236eSmrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 6235c35d236eSmrg *'~'*) 6236c35d236eSmrg # FIXME: we may have to deal with multi-command sequences. 6237c35d236eSmrg ;; 6238c35d236eSmrg '$CC '*) 6239c35d236eSmrg # Test whether the compiler implicitly links with -lc since on some 6240c35d236eSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6241c35d236eSmrg # to ld, don't add -lc before -lgcc. 6242c35d236eSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6243c35d236eSmrg $rm conftest* 6244c35d236eSmrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 6245c35d236eSmrg 6246c35d236eSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6247c35d236eSmrg soname=conftest 6248c35d236eSmrg lib=conftest 6249c35d236eSmrg libobjs=conftest.$ac_objext 6250c35d236eSmrg deplibs= 6251c35d236eSmrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6252c35d236eSmrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 6253c35d236eSmrg compiler_flags=-v 6254c35d236eSmrg linker_flags=-v 6255c35d236eSmrg verstring= 6256c35d236eSmrg output_objdir=. 6257c35d236eSmrg libname=conftest 6258c35d236eSmrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 6259c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6260c35d236eSmrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 6261c35d236eSmrg then 6262c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6263c35d236eSmrg else 6264c35d236eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6265c35d236eSmrg fi 6266c35d236eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6267c35d236eSmrg else 6268c35d236eSmrg cat conftest.err 1>&5 6269c35d236eSmrg fi 6270c35d236eSmrg $rm conftest* 6271c35d236eSmrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 6272c35d236eSmrg ;; 6273c35d236eSmrg esac 6274c35d236eSmrg fi 6275c35d236eSmrg ;; 6276c35d236eSmrgesac 6277c35d236eSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS 6278c35d236eSmrg 6279c35d236eSmrg 6280c35d236eSmrg# _LT_AC_FILE_LTDLL_C 6281c35d236eSmrg# ------------------- 6282c35d236eSmrg# Be careful that the start marker always follows a newline. 6283c35d236eSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 6284c35d236eSmrg# /* ltdll.c starts here */ 6285c35d236eSmrg# #define WIN32_LEAN_AND_MEAN 6286c35d236eSmrg# #include <windows.h> 6287c35d236eSmrg# #undef WIN32_LEAN_AND_MEAN 6288c35d236eSmrg# #include <stdio.h> 6289c35d236eSmrg# 6290c35d236eSmrg# #ifndef __CYGWIN__ 6291c35d236eSmrg# # ifdef __CYGWIN32__ 6292c35d236eSmrg# # define __CYGWIN__ __CYGWIN32__ 6293c35d236eSmrg# # endif 6294c35d236eSmrg# #endif 6295c35d236eSmrg# 6296c35d236eSmrg# #ifdef __cplusplus 6297c35d236eSmrg# extern "C" { 6298c35d236eSmrg# #endif 6299c35d236eSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 6300c35d236eSmrg# #ifdef __cplusplus 6301c35d236eSmrg# } 6302c35d236eSmrg# #endif 6303c35d236eSmrg# 6304c35d236eSmrg# #ifdef __CYGWIN__ 6305c35d236eSmrg# #include <cygwin/cygwin_dll.h> 6306c35d236eSmrg# DECLARE_CYGWIN_DLL( DllMain ); 6307c35d236eSmrg# #endif 6308c35d236eSmrg# HINSTANCE __hDllInstance_base; 6309c35d236eSmrg# 6310c35d236eSmrg# BOOL APIENTRY 6311c35d236eSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 6312c35d236eSmrg# { 6313c35d236eSmrg# __hDllInstance_base = hInst; 6314c35d236eSmrg# return TRUE; 6315c35d236eSmrg# } 6316c35d236eSmrg# /* ltdll.c ends here */ 6317c35d236eSmrg])# _LT_AC_FILE_LTDLL_C 6318c35d236eSmrg 6319c35d236eSmrg 6320c35d236eSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 6321c35d236eSmrg# --------------------------------- 6322c35d236eSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 6323c35d236eSmrg 6324c35d236eSmrg 6325c35d236eSmrg# old names 6326c35d236eSmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 6327c35d236eSmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 6328c35d236eSmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 6329c35d236eSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 6330c35d236eSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 6331c35d236eSmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 6332c35d236eSmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 6333c35d236eSmrg 6334c35d236eSmrg# This is just to silence aclocal about the macro not being used 6335c35d236eSmrgifelse([AC_DISABLE_FAST_INSTALL]) 6336c35d236eSmrg 6337c35d236eSmrgAC_DEFUN([LT_AC_PROG_GCJ], 6338c35d236eSmrg[AC_CHECK_TOOL(GCJ, gcj, no) 6339c35d236eSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6340c35d236eSmrg AC_SUBST(GCJFLAGS) 6341c35d236eSmrg]) 6342c35d236eSmrg 6343c35d236eSmrgAC_DEFUN([LT_AC_PROG_RC], 6344c35d236eSmrg[AC_CHECK_TOOL(RC, windres, no) 6345c35d236eSmrg]) 6346c35d236eSmrg 6347c35d236eSmrg# NOTE: This macro has been submitted for inclusion into # 6348c35d236eSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 6349c35d236eSmrg# a released version of Autoconf we should remove this # 6350c35d236eSmrg# macro and use it instead. # 6351c35d236eSmrg# LT_AC_PROG_SED 6352c35d236eSmrg# -------------- 6353c35d236eSmrg# Check for a fully-functional sed program, that truncates 6354c35d236eSmrg# as few characters as possible. Prefer GNU sed if found. 6355c35d236eSmrgAC_DEFUN([LT_AC_PROG_SED], 6356c35d236eSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 6357c35d236eSmrgAC_CACHE_VAL(lt_cv_path_SED, 6358c35d236eSmrg[# Loop through the user's path and test for sed and gsed. 6359c35d236eSmrg# Then use that list of sed's as ones to test for truncation. 6360c35d236eSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6361c35d236eSmrgfor as_dir in $PATH 6362c35d236eSmrgdo 6363c35d236eSmrg IFS=$as_save_IFS 6364c35d236eSmrg test -z "$as_dir" && as_dir=. 6365c35d236eSmrg for lt_ac_prog in sed gsed; do 6366c35d236eSmrg for ac_exec_ext in '' $ac_executable_extensions; do 6367c35d236eSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 6368c35d236eSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 6369c35d236eSmrg fi 6370c35d236eSmrg done 6371c35d236eSmrg done 6372c35d236eSmrgdone 6373c35d236eSmrglt_ac_max=0 6374c35d236eSmrglt_ac_count=0 6375c35d236eSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 6376c35d236eSmrg# along with /bin/sed that truncates output. 6377c35d236eSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 6378c35d236eSmrg test ! -f $lt_ac_sed && continue 6379c35d236eSmrg cat /dev/null > conftest.in 6380c35d236eSmrg lt_ac_count=0 6381c35d236eSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 6382c35d236eSmrg # Check for GNU sed and select it if it is found. 6383c35d236eSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 6384c35d236eSmrg lt_cv_path_SED=$lt_ac_sed 6385c35d236eSmrg break 6386c35d236eSmrg fi 6387c35d236eSmrg while true; do 6388c35d236eSmrg cat conftest.in conftest.in >conftest.tmp 6389c35d236eSmrg mv conftest.tmp conftest.in 6390c35d236eSmrg cp conftest.in conftest.nl 6391c35d236eSmrg echo >>conftest.nl 6392c35d236eSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 6393c35d236eSmrg cmp -s conftest.out conftest.nl || break 6394c35d236eSmrg # 10000 chars as input seems more than enough 6395c35d236eSmrg test $lt_ac_count -gt 10 && break 6396c35d236eSmrg lt_ac_count=`expr $lt_ac_count + 1` 6397c35d236eSmrg if test $lt_ac_count -gt $lt_ac_max; then 6398c35d236eSmrg lt_ac_max=$lt_ac_count 6399c35d236eSmrg lt_cv_path_SED=$lt_ac_sed 6400c35d236eSmrg fi 6401c35d236eSmrg done 6402c35d236eSmrgdone 6403c35d236eSmrg]) 6404c35d236eSmrgSED=$lt_cv_path_SED 6405c35d236eSmrgAC_MSG_RESULT([$SED]) 6406c35d236eSmrg]) 6407c35d236eSmrg 6408c35d236eSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 6409c35d236eSmrg# 6410c35d236eSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 6411c35d236eSmrg# 6412c35d236eSmrg# This program is free software; you can redistribute it and/or modify 6413c35d236eSmrg# it under the terms of the GNU General Public License as published by 6414c35d236eSmrg# the Free Software Foundation; either version 2 of the License, or 6415c35d236eSmrg# (at your option) any later version. 6416c35d236eSmrg# 6417c35d236eSmrg# This program is distributed in the hope that it will be useful, but 6418c35d236eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 6419c35d236eSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 6420c35d236eSmrg# General Public License for more details. 6421c35d236eSmrg# 6422c35d236eSmrg# You should have received a copy of the GNU General Public License 6423c35d236eSmrg# along with this program; if not, write to the Free Software 6424c35d236eSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 6425c35d236eSmrg# 6426c35d236eSmrg# As a special exception to the GNU General Public License, if you 6427c35d236eSmrg# distribute this file as part of a program that contains a 6428c35d236eSmrg# configuration script generated by Autoconf, you may include it under 6429c35d236eSmrg# the same distribution terms that you use for the rest of that program. 6430c35d236eSmrg 6431c35d236eSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 6432c35d236eSmrg# ---------------------------------- 6433c35d236eSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 6434c35d236eSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 6435c35d236eSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 6436c35d236eSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 6437c35d236eSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 6438c35d236eSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 6439c35d236eSmrgfi 6440c35d236eSmrgif test -n "$PKG_CONFIG"; then 6441c35d236eSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 6442c35d236eSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 6443c35d236eSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 6444c35d236eSmrg AC_MSG_RESULT([yes]) 6445c35d236eSmrg else 6446c35d236eSmrg AC_MSG_RESULT([no]) 6447c35d236eSmrg PKG_CONFIG="" 6448c35d236eSmrg fi 6449c35d236eSmrg 6450c35d236eSmrgfi[]dnl 6451c35d236eSmrg])# PKG_PROG_PKG_CONFIG 6452c35d236eSmrg 6453c35d236eSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 6454c35d236eSmrg# 6455c35d236eSmrg# Check to see whether a particular set of modules exists. Similar 6456c35d236eSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 6457c35d236eSmrg# 6458c35d236eSmrg# 6459c35d236eSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 6460c35d236eSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 6461c35d236eSmrg# PKG_CHECK_EXISTS manually 6462c35d236eSmrg# -------------------------------------------------------------- 6463c35d236eSmrgAC_DEFUN([PKG_CHECK_EXISTS], 6464c35d236eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 6465c35d236eSmrgif test -n "$PKG_CONFIG" && \ 6466c35d236eSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 6467c35d236eSmrg m4_ifval([$2], [$2], [:]) 6468c35d236eSmrgm4_ifvaln([$3], [else 6469c35d236eSmrg $3])dnl 6470c35d236eSmrgfi]) 6471c35d236eSmrg 6472c35d236eSmrg 6473c35d236eSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 6474c35d236eSmrg# --------------------------------------------- 6475c35d236eSmrgm4_define([_PKG_CONFIG], 6476c35d236eSmrg[if test -n "$PKG_CONFIG"; then 6477c35d236eSmrg if test -n "$$1"; then 6478c35d236eSmrg pkg_cv_[]$1="$$1" 6479c35d236eSmrg else 6480c35d236eSmrg PKG_CHECK_EXISTS([$3], 6481c35d236eSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 6482c35d236eSmrg [pkg_failed=yes]) 6483c35d236eSmrg fi 6484c35d236eSmrgelse 6485c35d236eSmrg pkg_failed=untried 6486c35d236eSmrgfi[]dnl 6487c35d236eSmrg])# _PKG_CONFIG 6488c35d236eSmrg 6489c35d236eSmrg# _PKG_SHORT_ERRORS_SUPPORTED 6490c35d236eSmrg# ----------------------------- 6491c35d236eSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 6492c35d236eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 6493c35d236eSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 6494c35d236eSmrg _pkg_short_errors_supported=yes 6495c35d236eSmrgelse 6496c35d236eSmrg _pkg_short_errors_supported=no 6497c35d236eSmrgfi[]dnl 6498c35d236eSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 6499c35d236eSmrg 6500c35d236eSmrg 6501c35d236eSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 6502c35d236eSmrg# [ACTION-IF-NOT-FOUND]) 6503c35d236eSmrg# 6504c35d236eSmrg# 6505c35d236eSmrg# Note that if there is a possibility the first call to 6506c35d236eSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 6507c35d236eSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 6508c35d236eSmrg# 6509c35d236eSmrg# 6510c35d236eSmrg# -------------------------------------------------------------- 6511c35d236eSmrgAC_DEFUN([PKG_CHECK_MODULES], 6512c35d236eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 6513c35d236eSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 6514c35d236eSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 6515c35d236eSmrg 6516c35d236eSmrgpkg_failed=no 6517c35d236eSmrgAC_MSG_CHECKING([for $1]) 6518c35d236eSmrg 6519c35d236eSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 6520c35d236eSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 6521c35d236eSmrg 6522c35d236eSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 6523c35d236eSmrgand $1[]_LIBS to avoid the need to call pkg-config. 6524c35d236eSmrgSee the pkg-config man page for more details.]) 6525c35d236eSmrg 6526c35d236eSmrgif test $pkg_failed = yes; then 6527c35d236eSmrg _PKG_SHORT_ERRORS_SUPPORTED 6528c35d236eSmrg if test $_pkg_short_errors_supported = yes; then 6529c35d236eSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 6530c35d236eSmrg else 6531c35d236eSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 6532c35d236eSmrg fi 6533c35d236eSmrg # Put the nasty error message in config.log where it belongs 6534c35d236eSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 6535c35d236eSmrg 6536c35d236eSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 6537c35d236eSmrg[Package requirements ($2) were not met: 6538c35d236eSmrg 6539c35d236eSmrg$$1_PKG_ERRORS 6540c35d236eSmrg 6541c35d236eSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 6542c35d236eSmrginstalled software in a non-standard prefix. 6543c35d236eSmrg 6544c35d236eSmrg_PKG_TEXT 6545c35d236eSmrg])], 6546c35d236eSmrg [$4]) 6547c35d236eSmrgelif test $pkg_failed = untried; then 6548c35d236eSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 6549c35d236eSmrg[The pkg-config script could not be found or is too old. Make sure it 6550c35d236eSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 6551c35d236eSmrgpath to pkg-config. 6552c35d236eSmrg 6553c35d236eSmrg_PKG_TEXT 6554c35d236eSmrg 6555c35d236eSmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 6556c35d236eSmrg [$4]) 6557c35d236eSmrgelse 6558c35d236eSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 6559c35d236eSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 6560c35d236eSmrg AC_MSG_RESULT([yes]) 6561c35d236eSmrg ifelse([$3], , :, [$3]) 6562c35d236eSmrgfi[]dnl 6563c35d236eSmrg])# PKG_CHECK_MODULES 6564c35d236eSmrg 6565c35d236eSmrgdnl $Id: aclocal.m4,v 1.1.1.1 2008/08/02 05:11:41 mrg Exp $ 6566c35d236eSmrgdnl 6567c35d236eSmrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 6568c35d236eSmrgdnl 6569c35d236eSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 6570c35d236eSmrgdnl documentation for any purpose is hereby granted without fee, provided that 6571c35d236eSmrgdnl the above copyright notice appear in all copies and that both that 6572c35d236eSmrgdnl copyright notice and this permission notice appear in supporting 6573c35d236eSmrgdnl documentation. 6574c35d236eSmrgdnl 6575c35d236eSmrgdnl The above copyright notice and this permission notice shall be included 6576c35d236eSmrgdnl in all copies or substantial portions of the Software. 6577c35d236eSmrgdnl 6578c35d236eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 6579c35d236eSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 6580c35d236eSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 6581c35d236eSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 6582c35d236eSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 6583c35d236eSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 6584c35d236eSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 6585c35d236eSmrgdnl 6586c35d236eSmrgdnl Except as contained in this notice, the name of the copyright holders shall 6587c35d236eSmrgdnl not be used in advertising or otherwise to promote the sale, use or 6588c35d236eSmrgdnl other dealings in this Software without prior written authorization 6589c35d236eSmrgdnl from the copyright holders. 6590c35d236eSmrgdnl 6591c35d236eSmrg 6592c35d236eSmrg# XORG_PROG_RAWCPP() 6593c35d236eSmrg# ------------------ 6594c35d236eSmrg# Find cpp program and necessary flags for use in pre-processing text files 6595c35d236eSmrg# such as man pages and config files 6596c35d236eSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 6597c35d236eSmrgAC_REQUIRE([AC_PROG_CPP]) 6598c35d236eSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 6599c35d236eSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 6600c35d236eSmrg 6601c35d236eSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 6602c35d236eSmrg# which is not the best choice for supporting other OS'es, but covers most 6603c35d236eSmrg# of the ones we need for now. 6604c35d236eSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 6605c35d236eSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 6606c35d236eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 6607c35d236eSmrg AC_MSG_RESULT([no]) 6608c35d236eSmrgelse 6609c35d236eSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 6610c35d236eSmrg RAWCPPFLAGS=-undef 6611c35d236eSmrg AC_MSG_RESULT([yes]) 6612c35d236eSmrg else 6613c35d236eSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 6614c35d236eSmrg fi 6615c35d236eSmrgfi 6616c35d236eSmrgrm -f conftest.$ac_ext 6617c35d236eSmrg 6618c35d236eSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 6619c35d236eSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 6620c35d236eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 6621c35d236eSmrg AC_MSG_RESULT([no]) 6622c35d236eSmrgelse 6623c35d236eSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 6624c35d236eSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 6625c35d236eSmrg AC_MSG_RESULT([yes]) 6626c35d236eSmrg else 6627c35d236eSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 6628c35d236eSmrg fi 6629c35d236eSmrgfi 6630c35d236eSmrgrm -f conftest.$ac_ext 6631c35d236eSmrgAC_SUBST(RAWCPPFLAGS) 6632c35d236eSmrg]) # XORG_PROG_RAWCPP 6633c35d236eSmrg 6634c35d236eSmrg# XORG_MANPAGE_SECTIONS() 6635c35d236eSmrg# ----------------------- 6636c35d236eSmrg# Determine which sections man pages go in for the different man page types 6637c35d236eSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 6638c35d236eSmrg# Not sure if there's any better way than just hardcoding by OS name. 6639c35d236eSmrg# Override default settings by setting environment variables 6640c35d236eSmrg 6641c35d236eSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 6642c35d236eSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 6643c35d236eSmrg 6644c35d236eSmrgif test x$APP_MAN_SUFFIX = x ; then 6645c35d236eSmrg case $host_os in 6646c35d236eSmrg linux*) APP_MAN_SUFFIX=1x ;; 6647c35d236eSmrg *) APP_MAN_SUFFIX=1 ;; 6648c35d236eSmrg esac 6649c35d236eSmrgfi 6650c35d236eSmrgif test x$APP_MAN_DIR = x ; then 6651c35d236eSmrg case $host_os in 6652c35d236eSmrg linux*) APP_MAN_DIR='$(mandir)/man1' ;; 6653c35d236eSmrg *) APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;; 6654c35d236eSmrg esac 6655c35d236eSmrgfi 6656c35d236eSmrg 6657c35d236eSmrgif test x$LIB_MAN_SUFFIX = x ; then 6658c35d236eSmrg case $host_os in 6659c35d236eSmrg linux*) LIB_MAN_SUFFIX=3x ;; 6660c35d236eSmrg *) LIB_MAN_SUFFIX=3 ;; 6661c35d236eSmrg esac 6662c35d236eSmrgfi 6663c35d236eSmrgif test x$LIB_MAN_DIR = x ; then 6664c35d236eSmrg case $host_os in 6665c35d236eSmrg linux*) LIB_MAN_DIR='$(mandir)/man3' ;; 6666c35d236eSmrg *) LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;; 6667c35d236eSmrg esac 6668c35d236eSmrgfi 6669c35d236eSmrg 6670c35d236eSmrgif test x$FILE_MAN_SUFFIX = x ; then 6671c35d236eSmrg case $host_os in 6672c35d236eSmrg linux*) FILE_MAN_SUFFIX=5x ;; 6673c35d236eSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 6674c35d236eSmrg *) FILE_MAN_SUFFIX=5 ;; 6675c35d236eSmrg esac 6676c35d236eSmrgfi 6677c35d236eSmrgif test x$FILE_MAN_DIR = x ; then 6678c35d236eSmrg case $host_os in 6679c35d236eSmrg linux*) FILE_MAN_DIR='$(mandir)/man5' ;; 6680c35d236eSmrg *) FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;; 6681c35d236eSmrg esac 6682c35d236eSmrgfi 6683c35d236eSmrg 6684c35d236eSmrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 6685c35d236eSmrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 6686c35d236eSmrgif test x$MISC_MAN_SUFFIX = x ; then 6687c35d236eSmrg case $host_os in 6688c35d236eSmrg# linux*) MISC_MAN_SUFFIX=7x ;; 6689c35d236eSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 6690c35d236eSmrg *) MISC_MAN_SUFFIX=7 ;; 6691c35d236eSmrg esac 6692c35d236eSmrgfi 6693c35d236eSmrgif test x$MISC_MAN_DIR = x ; then 6694c35d236eSmrg case $host_os in 6695c35d236eSmrg# linux*) MISC_MAN_DIR='$(mandir)/man7' ;; 6696c35d236eSmrg *) MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;; 6697c35d236eSmrg esac 6698c35d236eSmrgfi 6699c35d236eSmrg 6700c35d236eSmrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 6701c35d236eSmrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 6702c35d236eSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 6703c35d236eSmrg case $host_os in 6704c35d236eSmrg# linux*) DRIVER_MAN_SUFFIX=4x ;; 6705c35d236eSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 6706c35d236eSmrg *) DRIVER_MAN_SUFFIX=4 ;; 6707c35d236eSmrg esac 6708c35d236eSmrgfi 6709c35d236eSmrgif test x$DRIVER_MAN_DIR = x ; then 6710c35d236eSmrg case $host_os in 6711c35d236eSmrg# linux*) DRIVER_MAN_DIR='$(mandir)/man4' ;; 6712c35d236eSmrg *) DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;; 6713c35d236eSmrg esac 6714c35d236eSmrgfi 6715c35d236eSmrg 6716c35d236eSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 6717c35d236eSmrg case $host_os in 6718c35d236eSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 6719c35d236eSmrg *) ADMIN_MAN_SUFFIX=8 ;; 6720c35d236eSmrg esac 6721c35d236eSmrgfi 6722c35d236eSmrgif test x$ADMIN_MAN_DIR = x ; then 6723c35d236eSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 6724c35d236eSmrgfi 6725c35d236eSmrg 6726c35d236eSmrg 6727c35d236eSmrgAC_SUBST([APP_MAN_SUFFIX]) 6728c35d236eSmrgAC_SUBST([LIB_MAN_SUFFIX]) 6729c35d236eSmrgAC_SUBST([FILE_MAN_SUFFIX]) 6730c35d236eSmrgAC_SUBST([MISC_MAN_SUFFIX]) 6731c35d236eSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 6732c35d236eSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 6733c35d236eSmrgAC_SUBST([APP_MAN_DIR]) 6734c35d236eSmrgAC_SUBST([LIB_MAN_DIR]) 6735c35d236eSmrgAC_SUBST([FILE_MAN_DIR]) 6736c35d236eSmrgAC_SUBST([MISC_MAN_DIR]) 6737c35d236eSmrgAC_SUBST([DRIVER_MAN_DIR]) 6738c35d236eSmrgAC_SUBST([ADMIN_MAN_DIR]) 6739c35d236eSmrg]) # XORG_MANPAGE_SECTIONS 6740c35d236eSmrg 6741c35d236eSmrg# XORG_CHECK_LINUXDOC 6742c35d236eSmrg# ------------------- 6743c35d236eSmrg# Defines the variable MAKE_TEXT if the necessary tools and 6744c35d236eSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 6745c35d236eSmrg# Whether or not the necessary tools and files are found can be checked 6746c35d236eSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 6747c35d236eSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 6748c35d236eSmrgAC_CHECK_FILE( 6749c35d236eSmrg [$prefix/share/X11/sgml/defs.ent], 6750c35d236eSmrg [DEFS_ENT_PATH=$prefix/share/X11/sgml], 6751c35d236eSmrg [DEFS_ENT_PATH=] 6752c35d236eSmrg) 6753c35d236eSmrg 6754c35d236eSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 6755c35d236eSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 6756c35d236eSmrg 6757c35d236eSmrgAC_MSG_CHECKING([Whether to build documentation]) 6758c35d236eSmrg 6759c35d236eSmrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then 6760c35d236eSmrg BUILDDOC=yes 6761c35d236eSmrgelse 6762c35d236eSmrg BUILDDOC=no 6763c35d236eSmrgfi 6764c35d236eSmrg 6765c35d236eSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 6766c35d236eSmrg 6767c35d236eSmrgAC_MSG_RESULT([$BUILDDOC]) 6768c35d236eSmrg 6769c35d236eSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 6770c35d236eSmrg 6771c35d236eSmrgif test x$PS2PDF != x ; then 6772c35d236eSmrg BUILDPDFDOC=yes 6773c35d236eSmrgelse 6774c35d236eSmrg BUILDPDFDOC=no 6775c35d236eSmrgfi 6776c35d236eSmrg 6777c35d236eSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 6778c35d236eSmrg 6779c35d236eSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 6780c35d236eSmrg 6781c35d236eSmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 6782c35d236eSmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 6783c35d236eSmrgMAKE_PDF="$PS2PDF" 6784c35d236eSmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B html --split=0" 6785c35d236eSmrg 6786c35d236eSmrgAC_SUBST(MAKE_TEXT) 6787c35d236eSmrgAC_SUBST(MAKE_PS) 6788c35d236eSmrgAC_SUBST(MAKE_PDF) 6789c35d236eSmrgAC_SUBST(MAKE_HTML) 6790c35d236eSmrg]) # XORG_CHECK_LINUXDOC 6791c35d236eSmrg 6792c35d236eSmrg# XORG_CHECK_MALLOC_ZERO 6793c35d236eSmrg# ---------------------- 6794c35d236eSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 6795c35d236eSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 6796c35d236eSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 6797c35d236eSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 6798c35d236eSmrgAC_ARG_ENABLE(malloc0returnsnull, 6799c35d236eSmrg AC_HELP_STRING([--enable-malloc0returnsnull], 6800c35d236eSmrg [malloc(0) returns NULL (default: auto)]), 6801c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 6802c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 6803c35d236eSmrg 6804c35d236eSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 6805c35d236eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 6806c35d236eSmrg AC_RUN_IFELSE([ 6807c35d236eSmrgchar *malloc(); 6808c35d236eSmrgchar *realloc(); 6809c35d236eSmrgchar *calloc(); 6810c35d236eSmrgmain() { 6811c35d236eSmrg char *m0, *r0, *c0, *p; 6812c35d236eSmrg m0 = malloc(0); 6813c35d236eSmrg p = malloc(10); 6814c35d236eSmrg r0 = realloc(p,0); 6815c35d236eSmrg c0 = calloc(0); 6816c35d236eSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 6817c35d236eSmrg}], 6818c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 6819c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 6820c35d236eSmrgfi 6821c35d236eSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 6822c35d236eSmrg 6823c35d236eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 6824c35d236eSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 6825c35d236eSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 6826c35d236eSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 6827c35d236eSmrgelse 6828c35d236eSmrg MALLOC_ZERO_CFLAGS="" 6829c35d236eSmrg XMALLOC_ZERO_CFLAGS="" 6830c35d236eSmrg XTMALLOC_ZERO_CFLAGS="" 6831c35d236eSmrgfi 6832c35d236eSmrg 6833c35d236eSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 6834c35d236eSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 6835c35d236eSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 6836c35d236eSmrg]) # XORG_CHECK_MALLOC_ZERO 6837c35d236eSmrg 6838c35d236eSmrgdnl Copyright 2005 Red Hat, Inc 6839c35d236eSmrgdnl 6840c35d236eSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 6841c35d236eSmrgdnl documentation for any purpose is hereby granted without fee, provided that 6842c35d236eSmrgdnl the above copyright notice appear in all copies and that both that 6843c35d236eSmrgdnl copyright notice and this permission notice appear in supporting 6844c35d236eSmrgdnl documentation. 6845c35d236eSmrgdnl 6846c35d236eSmrgdnl The above copyright notice and this permission notice shall be included 6847c35d236eSmrgdnl in all copies or substantial portions of the Software. 6848c35d236eSmrgdnl 6849c35d236eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 6850c35d236eSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 6851c35d236eSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 6852c35d236eSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 6853c35d236eSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 6854c35d236eSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 6855c35d236eSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 6856c35d236eSmrgdnl 6857c35d236eSmrgdnl Except as contained in this notice, the name of the copyright holders shall 6858c35d236eSmrgdnl not be used in advertising or otherwise to promote the sale, use or 6859c35d236eSmrgdnl other dealings in this Software without prior written authorization 6860c35d236eSmrgdnl from the copyright holders. 6861c35d236eSmrgdnl 6862c35d236eSmrg 6863c35d236eSmrg# XORG_DRIVER_CHECK_EXT() 6864c35d236eSmrg# -------------------------- 6865c35d236eSmrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 6866c35d236eSmrg# is defined, then add $1 to $REQUIRED_MODULES. 6867c35d236eSmrg 6868c35d236eSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 6869c35d236eSmrg SAVE_CFLAGS="$CFLAGS" 6870c35d236eSmrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 6871c35d236eSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 6872c35d236eSmrg#include "xorg-server.h" 6873c35d236eSmrg#if !defined $1 6874c35d236eSmrg#error $1 not defined 6875c35d236eSmrg#endif 6876c35d236eSmrg ]])], 6877c35d236eSmrg [_EXT_CHECK=yes], 6878c35d236eSmrg [_EXT_CHECK=no]) 6879c35d236eSmrg CFLAGS="$SAVE_CFLAGS" 6880c35d236eSmrg AC_MSG_CHECKING([if $1 is defined]) 6881c35d236eSmrg AC_MSG_RESULT([$_EXT_CHECK]) 6882c35d236eSmrg if test "$_EXT_CHECK" != no; then 6883c35d236eSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 6884c35d236eSmrg fi 6885c35d236eSmrg]) 6886c35d236eSmrg 6887c35d236eSmrgdnl Copyright 2005 Red Hat, Inc 6888c35d236eSmrgdnl 6889c35d236eSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 6890c35d236eSmrgdnl documentation for any purpose is hereby granted without fee, provided that 6891c35d236eSmrgdnl the above copyright notice appear in all copies and that both that 6892c35d236eSmrgdnl copyright notice and this permission notice appear in supporting 6893c35d236eSmrgdnl documentation. 6894c35d236eSmrgdnl 6895c35d236eSmrgdnl The above copyright notice and this permission notice shall be included 6896c35d236eSmrgdnl in all copies or substantial portions of the Software. 6897c35d236eSmrgdnl 6898c35d236eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 6899c35d236eSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 6900c35d236eSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 6901c35d236eSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 6902c35d236eSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 6903c35d236eSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 6904c35d236eSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 6905c35d236eSmrgdnl 6906c35d236eSmrgdnl Except as contained in this notice, the name of the copyright holders shall 6907c35d236eSmrgdnl not be used in advertising or otherwise to promote the sale, use or 6908c35d236eSmrgdnl other dealings in this Software without prior written authorization 6909c35d236eSmrgdnl from the copyright holders. 6910c35d236eSmrgdnl 6911c35d236eSmrg 6912c35d236eSmrg# XORG_RELEASE_VERSION 6913c35d236eSmrg# -------------------- 6914c35d236eSmrg# Adds --with/without-release-string and changes the PACKAGE and 6915c35d236eSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 6916c35d236eSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 6917c35d236eSmrg 6918c35d236eSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 6919c35d236eSmrg AC_ARG_WITH(release-version, 6920c35d236eSmrg AC_HELP_STRING([--with-release-version=STRING], 6921c35d236eSmrg [Use release version string in package name]), 6922c35d236eSmrg [RELEASE_VERSION="$withval"], 6923c35d236eSmrg [RELEASE_VERSION=""]) 6924c35d236eSmrg if test "x$RELEASE_VERSION" != "x"; then 6925c35d236eSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 6926c35d236eSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 6927c35d236eSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 6928c35d236eSmrg fi 6929c35d236eSmrg]) 6930c35d236eSmrg 6931c35d236eSmrg# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. 6932c35d236eSmrg# 6933c35d236eSmrg# This file is free software; the Free Software Foundation 6934c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 6935c35d236eSmrg# with or without modifications, as long as this notice is preserved. 6936c35d236eSmrg 6937c35d236eSmrg# AM_AUTOMAKE_VERSION(VERSION) 6938c35d236eSmrg# ---------------------------- 6939c35d236eSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 6940c35d236eSmrg# generated from the m4 files accompanying Automake X.Y. 6941c35d236eSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 6942c35d236eSmrg 6943c35d236eSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 6944c35d236eSmrg# ------------------------------- 6945c35d236eSmrg# Call AM_AUTOMAKE_VERSION so it can be traced. 6946c35d236eSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 6947c35d236eSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 6948c35d236eSmrg [AM_AUTOMAKE_VERSION([1.9.6])]) 6949c35d236eSmrg 6950c35d236eSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 6951c35d236eSmrg 6952c35d236eSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 6953c35d236eSmrg# 6954c35d236eSmrg# This file is free software; the Free Software Foundation 6955c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 6956c35d236eSmrg# with or without modifications, as long as this notice is preserved. 6957c35d236eSmrg 6958c35d236eSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6959c35d236eSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6960c35d236eSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 6961c35d236eSmrg# 6962c35d236eSmrg# Of course, Automake must honor this variable whenever it calls a 6963c35d236eSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 6964c35d236eSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 6965c35d236eSmrg# depending on how configure is run. This is pretty annoying, since 6966c35d236eSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 6967c35d236eSmrg# source directory, any form will work fine, but in subdirectories a 6968c35d236eSmrg# relative path needs to be adjusted first. 6969c35d236eSmrg# 6970c35d236eSmrg# $ac_aux_dir/missing 6971c35d236eSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 6972c35d236eSmrg# $top_srcdir/$ac_aux_dir/missing 6973c35d236eSmrg# fails if $ac_aux_dir is absolute, 6974c35d236eSmrg# fails when called from a subdirectory in a VPATH build with 6975c35d236eSmrg# a relative $ac_aux_dir 6976c35d236eSmrg# 6977c35d236eSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 6978c35d236eSmrg# are both prefixed by $srcdir. In an in-source build this is usually 6979c35d236eSmrg# harmless because $srcdir is `.', but things will broke when you 6980c35d236eSmrg# start a VPATH build or use an absolute $srcdir. 6981c35d236eSmrg# 6982c35d236eSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 6983c35d236eSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 6984c35d236eSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 6985c35d236eSmrg# and then we would define $MISSING as 6986c35d236eSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 6987c35d236eSmrg# This will work as long as MISSING is not called from configure, because 6988c35d236eSmrg# unfortunately $(top_srcdir) has no meaning in configure. 6989c35d236eSmrg# However there are other variables, like CC, which are often used in 6990c35d236eSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 6991c35d236eSmrg# 6992c35d236eSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 6993c35d236eSmrg# absolute PATH. The drawback is that using absolute paths prevent a 6994c35d236eSmrg# configured tree to be moved without reconfiguration. 6995c35d236eSmrg 6996c35d236eSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 6997c35d236eSmrg[dnl Rely on autoconf to set up CDPATH properly. 6998c35d236eSmrgAC_PREREQ([2.50])dnl 6999c35d236eSmrg# expand $ac_aux_dir to an absolute path 7000c35d236eSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 7001c35d236eSmrg]) 7002c35d236eSmrg 7003c35d236eSmrg# AM_CONDITIONAL -*- Autoconf -*- 7004c35d236eSmrg 7005c35d236eSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 7006c35d236eSmrg# Free Software Foundation, Inc. 7007c35d236eSmrg# 7008c35d236eSmrg# This file is free software; the Free Software Foundation 7009c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7010c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7011c35d236eSmrg 7012c35d236eSmrg# serial 7 7013c35d236eSmrg 7014c35d236eSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 7015c35d236eSmrg# ------------------------------------- 7016c35d236eSmrg# Define a conditional. 7017c35d236eSmrgAC_DEFUN([AM_CONDITIONAL], 7018c35d236eSmrg[AC_PREREQ(2.52)dnl 7019c35d236eSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 7020c35d236eSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 7021c35d236eSmrgAC_SUBST([$1_TRUE]) 7022c35d236eSmrgAC_SUBST([$1_FALSE]) 7023c35d236eSmrgif $2; then 7024c35d236eSmrg $1_TRUE= 7025c35d236eSmrg $1_FALSE='#' 7026c35d236eSmrgelse 7027c35d236eSmrg $1_TRUE='#' 7028c35d236eSmrg $1_FALSE= 7029c35d236eSmrgfi 7030c35d236eSmrgAC_CONFIG_COMMANDS_PRE( 7031c35d236eSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 7032c35d236eSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 7033c35d236eSmrgUsually this means the macro was only invoked conditionally.]]) 7034c35d236eSmrgfi])]) 7035c35d236eSmrg 7036c35d236eSmrg 7037c35d236eSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 7038c35d236eSmrg# Free Software Foundation, Inc. 7039c35d236eSmrg# 7040c35d236eSmrg# This file is free software; the Free Software Foundation 7041c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7042c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7043c35d236eSmrg 7044c35d236eSmrg# serial 8 7045c35d236eSmrg 7046c35d236eSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 7047c35d236eSmrg# written in clear, in which case automake, when reading aclocal.m4, 7048c35d236eSmrg# will think it sees a *use*, and therefore will trigger all it's 7049c35d236eSmrg# C support machinery. Also note that it means that autoscan, seeing 7050c35d236eSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 7051c35d236eSmrg 7052c35d236eSmrg 7053c35d236eSmrg# _AM_DEPENDENCIES(NAME) 7054c35d236eSmrg# ---------------------- 7055c35d236eSmrg# See how the compiler implements dependency checking. 7056c35d236eSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 7057c35d236eSmrg# We try a few techniques and use that to set a single cache variable. 7058c35d236eSmrg# 7059c35d236eSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 7060c35d236eSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 7061c35d236eSmrg# dependency, and given that the user is not expected to run this macro, 7062c35d236eSmrg# just rely on AC_PROG_CC. 7063c35d236eSmrgAC_DEFUN([_AM_DEPENDENCIES], 7064c35d236eSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 7065c35d236eSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 7066c35d236eSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 7067c35d236eSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 7068c35d236eSmrg 7069c35d236eSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 7070c35d236eSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 7071c35d236eSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 7072c35d236eSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 7073c35d236eSmrg [depcc="$$1" am_compiler_list=]) 7074c35d236eSmrg 7075c35d236eSmrgAC_CACHE_CHECK([dependency style of $depcc], 7076c35d236eSmrg [am_cv_$1_dependencies_compiler_type], 7077c35d236eSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 7078c35d236eSmrg # We make a subdir and do the tests there. Otherwise we can end up 7079c35d236eSmrg # making bogus files that we don't know about and never remove. For 7080c35d236eSmrg # instance it was reported that on HP-UX the gcc test will end up 7081c35d236eSmrg # making a dummy file named `D' -- because `-MD' means `put the output 7082c35d236eSmrg # in D'. 7083c35d236eSmrg mkdir conftest.dir 7084c35d236eSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 7085c35d236eSmrg # using a relative directory. 7086c35d236eSmrg cp "$am_depcomp" conftest.dir 7087c35d236eSmrg cd conftest.dir 7088c35d236eSmrg # We will build objects and dependencies in a subdirectory because 7089c35d236eSmrg # it helps to detect inapplicable dependency modes. For instance 7090c35d236eSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 7091c35d236eSmrg # side effect of compilation, but ICC will put the dependencies in 7092c35d236eSmrg # the current directory while Tru64 will put them in the object 7093c35d236eSmrg # directory. 7094c35d236eSmrg mkdir sub 7095c35d236eSmrg 7096c35d236eSmrg am_cv_$1_dependencies_compiler_type=none 7097c35d236eSmrg if test "$am_compiler_list" = ""; then 7098c35d236eSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 7099c35d236eSmrg fi 7100c35d236eSmrg for depmode in $am_compiler_list; do 7101c35d236eSmrg # Setup a source with many dependencies, because some compilers 7102c35d236eSmrg # like to wrap large dependency lists on column 80 (with \), and 7103c35d236eSmrg # we should not choose a depcomp mode which is confused by this. 7104c35d236eSmrg # 7105c35d236eSmrg # We need to recreate these files for each test, as the compiler may 7106c35d236eSmrg # overwrite some of them when testing with obscure command lines. 7107c35d236eSmrg # This happens at least with the AIX C compiler. 7108c35d236eSmrg : > sub/conftest.c 7109c35d236eSmrg for i in 1 2 3 4 5 6; do 7110c35d236eSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 7111c35d236eSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 7112c35d236eSmrg # Solaris 8's {/usr,}/bin/sh. 7113c35d236eSmrg touch sub/conftst$i.h 7114c35d236eSmrg done 7115c35d236eSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 7116c35d236eSmrg 7117c35d236eSmrg case $depmode in 7118c35d236eSmrg nosideeffect) 7119c35d236eSmrg # after this tag, mechanisms are not by side-effect, so they'll 7120c35d236eSmrg # only be used when explicitly requested 7121c35d236eSmrg if test "x$enable_dependency_tracking" = xyes; then 7122c35d236eSmrg continue 7123c35d236eSmrg else 7124c35d236eSmrg break 7125c35d236eSmrg fi 7126c35d236eSmrg ;; 7127c35d236eSmrg none) break ;; 7128c35d236eSmrg esac 7129c35d236eSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 7130c35d236eSmrg # mode. It turns out that the SunPro C++ compiler does not properly 7131c35d236eSmrg # handle `-M -o', and we need to detect this. 7132c35d236eSmrg if depmode=$depmode \ 7133c35d236eSmrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 7134c35d236eSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 7135c35d236eSmrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 7136c35d236eSmrg >/dev/null 2>conftest.err && 7137c35d236eSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 7138c35d236eSmrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 7139c35d236eSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 7140c35d236eSmrg # icc doesn't choke on unknown options, it will just issue warnings 7141c35d236eSmrg # or remarks (even with -Werror). So we grep stderr for any message 7142c35d236eSmrg # that says an option was ignored or not supported. 7143c35d236eSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 7144c35d236eSmrg # icc: Command line warning: ignoring option '-M'; no argument required 7145c35d236eSmrg # The diagnosis changed in icc 8.0: 7146c35d236eSmrg # icc: Command line remark: option '-MP' not supported 7147c35d236eSmrg if (grep 'ignoring option' conftest.err || 7148c35d236eSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 7149c35d236eSmrg am_cv_$1_dependencies_compiler_type=$depmode 7150c35d236eSmrg break 7151c35d236eSmrg fi 7152c35d236eSmrg fi 7153c35d236eSmrg done 7154c35d236eSmrg 7155c35d236eSmrg cd .. 7156c35d236eSmrg rm -rf conftest.dir 7157c35d236eSmrgelse 7158c35d236eSmrg am_cv_$1_dependencies_compiler_type=none 7159c35d236eSmrgfi 7160c35d236eSmrg]) 7161c35d236eSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 7162c35d236eSmrgAM_CONDITIONAL([am__fastdep$1], [ 7163c35d236eSmrg test "x$enable_dependency_tracking" != xno \ 7164c35d236eSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 7165c35d236eSmrg]) 7166c35d236eSmrg 7167c35d236eSmrg 7168c35d236eSmrg# AM_SET_DEPDIR 7169c35d236eSmrg# ------------- 7170c35d236eSmrg# Choose a directory name for dependency files. 7171c35d236eSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 7172c35d236eSmrgAC_DEFUN([AM_SET_DEPDIR], 7173c35d236eSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 7174c35d236eSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 7175c35d236eSmrg]) 7176c35d236eSmrg 7177c35d236eSmrg 7178c35d236eSmrg# AM_DEP_TRACK 7179c35d236eSmrg# ------------ 7180c35d236eSmrgAC_DEFUN([AM_DEP_TRACK], 7181c35d236eSmrg[AC_ARG_ENABLE(dependency-tracking, 7182c35d236eSmrg[ --disable-dependency-tracking speeds up one-time build 7183c35d236eSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 7184c35d236eSmrgif test "x$enable_dependency_tracking" != xno; then 7185c35d236eSmrg am_depcomp="$ac_aux_dir/depcomp" 7186c35d236eSmrg AMDEPBACKSLASH='\' 7187c35d236eSmrgfi 7188c35d236eSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 7189c35d236eSmrgAC_SUBST([AMDEPBACKSLASH]) 7190c35d236eSmrg]) 7191c35d236eSmrg 7192c35d236eSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 7193c35d236eSmrg 7194c35d236eSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 7195c35d236eSmrg# Free Software Foundation, Inc. 7196c35d236eSmrg# 7197c35d236eSmrg# This file is free software; the Free Software Foundation 7198c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7199c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7200c35d236eSmrg 7201c35d236eSmrg#serial 3 7202c35d236eSmrg 7203c35d236eSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 7204c35d236eSmrg# ------------------------------ 7205c35d236eSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 7206c35d236eSmrg[for mf in $CONFIG_FILES; do 7207c35d236eSmrg # Strip MF so we end up with the name of the file. 7208c35d236eSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 7209c35d236eSmrg # Check whether this is an Automake generated Makefile or not. 7210c35d236eSmrg # We used to match only the files named `Makefile.in', but 7211c35d236eSmrg # some people rename them; so instead we look at the file content. 7212c35d236eSmrg # Grep'ing the first line is not enough: some people post-process 7213c35d236eSmrg # each Makefile.in and add a new line on top of each file to say so. 7214c35d236eSmrg # So let's grep whole file. 7215c35d236eSmrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 7216c35d236eSmrg dirpart=`AS_DIRNAME("$mf")` 7217c35d236eSmrg else 7218c35d236eSmrg continue 7219c35d236eSmrg fi 7220c35d236eSmrg # Extract the definition of DEPDIR, am__include, and am__quote 7221c35d236eSmrg # from the Makefile without running `make'. 7222c35d236eSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 7223c35d236eSmrg test -z "$DEPDIR" && continue 7224c35d236eSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 7225c35d236eSmrg test -z "am__include" && continue 7226c35d236eSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 7227c35d236eSmrg # When using ansi2knr, U may be empty or an underscore; expand it 7228c35d236eSmrg U=`sed -n 's/^U = //p' < "$mf"` 7229c35d236eSmrg # Find all dependency output files, they are included files with 7230c35d236eSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 7231c35d236eSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 7232c35d236eSmrg # expansion. 7233c35d236eSmrg for file in `sed -n " 7234c35d236eSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 7235c35d236eSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 7236c35d236eSmrg # Make sure the directory exists. 7237c35d236eSmrg test -f "$dirpart/$file" && continue 7238c35d236eSmrg fdir=`AS_DIRNAME(["$file"])` 7239c35d236eSmrg AS_MKDIR_P([$dirpart/$fdir]) 7240c35d236eSmrg # echo "creating $dirpart/$file" 7241c35d236eSmrg echo '# dummy' > "$dirpart/$file" 7242c35d236eSmrg done 7243c35d236eSmrgdone 7244c35d236eSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 7245c35d236eSmrg 7246c35d236eSmrg 7247c35d236eSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 7248c35d236eSmrg# ----------------------------- 7249c35d236eSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 7250c35d236eSmrg# 7251c35d236eSmrg# This code is only required when automatic dependency tracking 7252c35d236eSmrg# is enabled. FIXME. This creates each `.P' file that we will 7253c35d236eSmrg# need in order to bootstrap the dependency handling code. 7254c35d236eSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 7255c35d236eSmrg[AC_CONFIG_COMMANDS([depfiles], 7256c35d236eSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 7257c35d236eSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 7258c35d236eSmrg]) 7259c35d236eSmrg 7260c35d236eSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 7261c35d236eSmrg# Free Software Foundation, Inc. 7262c35d236eSmrg# 7263c35d236eSmrg# This file is free software; the Free Software Foundation 7264c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7265c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7266c35d236eSmrg 7267c35d236eSmrg# serial 8 7268c35d236eSmrg 7269c35d236eSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 7270c35d236eSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 7271c35d236eSmrg 7272c35d236eSmrg# Do all the work for Automake. -*- Autoconf -*- 7273c35d236eSmrg 7274c35d236eSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 7275c35d236eSmrg# Free Software Foundation, Inc. 7276c35d236eSmrg# 7277c35d236eSmrg# This file is free software; the Free Software Foundation 7278c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7279c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7280c35d236eSmrg 7281c35d236eSmrg# serial 12 7282c35d236eSmrg 7283c35d236eSmrg# This macro actually does too much. Some checks are only needed if 7284c35d236eSmrg# your package does certain things. But this isn't really a big deal. 7285c35d236eSmrg 7286c35d236eSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 7287c35d236eSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 7288c35d236eSmrg# ----------------------------------------------- 7289c35d236eSmrg# The call with PACKAGE and VERSION arguments is the old style 7290c35d236eSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 7291c35d236eSmrg# and VERSION should now be passed to AC_INIT and removed from 7292c35d236eSmrg# the call to AM_INIT_AUTOMAKE. 7293c35d236eSmrg# We support both call styles for the transition. After 7294c35d236eSmrg# the next Automake release, Autoconf can make the AC_INIT 7295c35d236eSmrg# arguments mandatory, and then we can depend on a new Autoconf 7296c35d236eSmrg# release and drop the old call support. 7297c35d236eSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 7298c35d236eSmrg[AC_PREREQ([2.58])dnl 7299c35d236eSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 7300c35d236eSmrgdnl the ones we care about. 7301c35d236eSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 7302c35d236eSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 7303c35d236eSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 7304c35d236eSmrg# test to see if srcdir already configured 7305c35d236eSmrgif test "`cd $srcdir && pwd`" != "`pwd`" && 7306c35d236eSmrg test -f $srcdir/config.status; then 7307c35d236eSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 7308c35d236eSmrgfi 7309c35d236eSmrg 7310c35d236eSmrg# test whether we have cygpath 7311c35d236eSmrgif test -z "$CYGPATH_W"; then 7312c35d236eSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 7313c35d236eSmrg CYGPATH_W='cygpath -w' 7314c35d236eSmrg else 7315c35d236eSmrg CYGPATH_W=echo 7316c35d236eSmrg fi 7317c35d236eSmrgfi 7318c35d236eSmrgAC_SUBST([CYGPATH_W]) 7319c35d236eSmrg 7320c35d236eSmrg# Define the identity of the package. 7321c35d236eSmrgdnl Distinguish between old-style and new-style calls. 7322c35d236eSmrgm4_ifval([$2], 7323c35d236eSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 7324c35d236eSmrg AC_SUBST([PACKAGE], [$1])dnl 7325c35d236eSmrg AC_SUBST([VERSION], [$2])], 7326c35d236eSmrg[_AM_SET_OPTIONS([$1])dnl 7327c35d236eSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 7328c35d236eSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 7329c35d236eSmrg 7330c35d236eSmrg_AM_IF_OPTION([no-define],, 7331c35d236eSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 7332c35d236eSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 7333c35d236eSmrg 7334c35d236eSmrg# Some tools Automake needs. 7335c35d236eSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 7336c35d236eSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 7337c35d236eSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 7338c35d236eSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 7339c35d236eSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 7340c35d236eSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 7341c35d236eSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 7342c35d236eSmrgAM_PROG_INSTALL_SH 7343c35d236eSmrgAM_PROG_INSTALL_STRIP 7344c35d236eSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 7345c35d236eSmrg# We need awk for the "check" target. The system "awk" is bad on 7346c35d236eSmrg# some platforms. 7347c35d236eSmrgAC_REQUIRE([AC_PROG_AWK])dnl 7348c35d236eSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 7349c35d236eSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 7350c35d236eSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 7351c35d236eSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 7352c35d236eSmrg [_AM_PROG_TAR([v7])])]) 7353c35d236eSmrg_AM_IF_OPTION([no-dependencies],, 7354c35d236eSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 7355c35d236eSmrg [_AM_DEPENDENCIES(CC)], 7356c35d236eSmrg [define([AC_PROG_CC], 7357c35d236eSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 7358c35d236eSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 7359c35d236eSmrg [_AM_DEPENDENCIES(CXX)], 7360c35d236eSmrg [define([AC_PROG_CXX], 7361c35d236eSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 7362c35d236eSmrg]) 7363c35d236eSmrg]) 7364c35d236eSmrg 7365c35d236eSmrg 7366c35d236eSmrg# When config.status generates a header, we must update the stamp-h file. 7367c35d236eSmrg# This file resides in the same directory as the config header 7368c35d236eSmrg# that is generated. The stamp files are numbered to have different names. 7369c35d236eSmrg 7370c35d236eSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 7371c35d236eSmrg# loop where config.status creates the headers, so we can generate 7372c35d236eSmrg# our stamp files there. 7373c35d236eSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 7374c35d236eSmrg[# Compute $1's index in $config_headers. 7375c35d236eSmrg_am_stamp_count=1 7376c35d236eSmrgfor _am_header in $config_headers :; do 7377c35d236eSmrg case $_am_header in 7378c35d236eSmrg $1 | $1:* ) 7379c35d236eSmrg break ;; 7380c35d236eSmrg * ) 7381c35d236eSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 7382c35d236eSmrg esac 7383c35d236eSmrgdone 7384c35d236eSmrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 7385c35d236eSmrg 7386c35d236eSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7387c35d236eSmrg# 7388c35d236eSmrg# This file is free software; the Free Software Foundation 7389c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7390c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7391c35d236eSmrg 7392c35d236eSmrg# AM_PROG_INSTALL_SH 7393c35d236eSmrg# ------------------ 7394c35d236eSmrg# Define $install_sh. 7395c35d236eSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 7396c35d236eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7397c35d236eSmrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 7398c35d236eSmrgAC_SUBST(install_sh)]) 7399c35d236eSmrg 7400c35d236eSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 7401c35d236eSmrg# 7402c35d236eSmrg# This file is free software; the Free Software Foundation 7403c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7404c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7405c35d236eSmrg 7406c35d236eSmrg# serial 2 7407c35d236eSmrg 7408c35d236eSmrg# Check whether the underlying file-system supports filenames 7409c35d236eSmrg# with a leading dot. For instance MS-DOS doesn't. 7410c35d236eSmrgAC_DEFUN([AM_SET_LEADING_DOT], 7411c35d236eSmrg[rm -rf .tst 2>/dev/null 7412c35d236eSmrgmkdir .tst 2>/dev/null 7413c35d236eSmrgif test -d .tst; then 7414c35d236eSmrg am__leading_dot=. 7415c35d236eSmrgelse 7416c35d236eSmrg am__leading_dot=_ 7417c35d236eSmrgfi 7418c35d236eSmrgrmdir .tst 2>/dev/null 7419c35d236eSmrgAC_SUBST([am__leading_dot])]) 7420c35d236eSmrg 7421c35d236eSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 7422c35d236eSmrg# From Jim Meyering 7423c35d236eSmrg 7424c35d236eSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 7425c35d236eSmrg# Free Software Foundation, Inc. 7426c35d236eSmrg# 7427c35d236eSmrg# This file is free software; the Free Software Foundation 7428c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7429c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7430c35d236eSmrg 7431c35d236eSmrg# serial 4 7432c35d236eSmrg 7433c35d236eSmrgAC_DEFUN([AM_MAINTAINER_MODE], 7434c35d236eSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 7435c35d236eSmrg dnl maintainer-mode is disabled by default 7436c35d236eSmrg AC_ARG_ENABLE(maintainer-mode, 7437c35d236eSmrg[ --enable-maintainer-mode enable make rules and dependencies not useful 7438c35d236eSmrg (and sometimes confusing) to the casual installer], 7439c35d236eSmrg USE_MAINTAINER_MODE=$enableval, 7440c35d236eSmrg USE_MAINTAINER_MODE=no) 7441c35d236eSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 7442c35d236eSmrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 7443c35d236eSmrg MAINT=$MAINTAINER_MODE_TRUE 7444c35d236eSmrg AC_SUBST(MAINT)dnl 7445c35d236eSmrg] 7446c35d236eSmrg) 7447c35d236eSmrg 7448c35d236eSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 7449c35d236eSmrg 7450c35d236eSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 7451c35d236eSmrg 7452c35d236eSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 7453c35d236eSmrg# 7454c35d236eSmrg# This file is free software; the Free Software Foundation 7455c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7456c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7457c35d236eSmrg 7458c35d236eSmrg# serial 3 7459c35d236eSmrg 7460c35d236eSmrg# AM_MAKE_INCLUDE() 7461c35d236eSmrg# ----------------- 7462c35d236eSmrg# Check to see how make treats includes. 7463c35d236eSmrgAC_DEFUN([AM_MAKE_INCLUDE], 7464c35d236eSmrg[am_make=${MAKE-make} 7465c35d236eSmrgcat > confinc << 'END' 7466c35d236eSmrgam__doit: 7467c35d236eSmrg @echo done 7468c35d236eSmrg.PHONY: am__doit 7469c35d236eSmrgEND 7470c35d236eSmrg# If we don't find an include directive, just comment out the code. 7471c35d236eSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 7472c35d236eSmrgam__include="#" 7473c35d236eSmrgam__quote= 7474c35d236eSmrg_am_result=none 7475c35d236eSmrg# First try GNU make style include. 7476c35d236eSmrgecho "include confinc" > confmf 7477c35d236eSmrg# We grep out `Entering directory' and `Leaving directory' 7478c35d236eSmrg# messages which can occur if `w' ends up in MAKEFLAGS. 7479c35d236eSmrg# In particular we don't look at `^make:' because GNU make might 7480c35d236eSmrg# be invoked under some other name (usually "gmake"), in which 7481c35d236eSmrg# case it prints its new name instead of `make'. 7482c35d236eSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 7483c35d236eSmrg am__include=include 7484c35d236eSmrg am__quote= 7485c35d236eSmrg _am_result=GNU 7486c35d236eSmrgfi 7487c35d236eSmrg# Now try BSD make style include. 7488c35d236eSmrgif test "$am__include" = "#"; then 7489c35d236eSmrg echo '.include "confinc"' > confmf 7490c35d236eSmrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 7491c35d236eSmrg am__include=.include 7492c35d236eSmrg am__quote="\"" 7493c35d236eSmrg _am_result=BSD 7494c35d236eSmrg fi 7495c35d236eSmrgfi 7496c35d236eSmrgAC_SUBST([am__include]) 7497c35d236eSmrgAC_SUBST([am__quote]) 7498c35d236eSmrgAC_MSG_RESULT([$_am_result]) 7499c35d236eSmrgrm -f confinc confmf 7500c35d236eSmrg]) 7501c35d236eSmrg 7502c35d236eSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 7503c35d236eSmrg 7504c35d236eSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 7505c35d236eSmrg# Free Software Foundation, Inc. 7506c35d236eSmrg# 7507c35d236eSmrg# This file is free software; the Free Software Foundation 7508c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7509c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7510c35d236eSmrg 7511c35d236eSmrg# serial 4 7512c35d236eSmrg 7513c35d236eSmrg# AM_MISSING_PROG(NAME, PROGRAM) 7514c35d236eSmrg# ------------------------------ 7515c35d236eSmrgAC_DEFUN([AM_MISSING_PROG], 7516c35d236eSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7517c35d236eSmrg$1=${$1-"${am_missing_run}$2"} 7518c35d236eSmrgAC_SUBST($1)]) 7519c35d236eSmrg 7520c35d236eSmrg 7521c35d236eSmrg# AM_MISSING_HAS_RUN 7522c35d236eSmrg# ------------------ 7523c35d236eSmrg# Define MISSING if not defined so far and test if it supports --run. 7524c35d236eSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 7525c35d236eSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7526c35d236eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7527c35d236eSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 7528c35d236eSmrg# Use eval to expand $SHELL 7529c35d236eSmrgif eval "$MISSING --run true"; then 7530c35d236eSmrg am_missing_run="$MISSING --run " 7531c35d236eSmrgelse 7532c35d236eSmrg am_missing_run= 7533c35d236eSmrg AC_MSG_WARN([`missing' script is too old or missing]) 7534c35d236eSmrgfi 7535c35d236eSmrg]) 7536c35d236eSmrg 7537c35d236eSmrg# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 7538c35d236eSmrg# 7539c35d236eSmrg# This file is free software; the Free Software Foundation 7540c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7541c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7542c35d236eSmrg 7543c35d236eSmrg# AM_PROG_MKDIR_P 7544c35d236eSmrg# --------------- 7545c35d236eSmrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 7546c35d236eSmrg# 7547c35d236eSmrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 7548c35d236eSmrg# created by `make install' are always world readable, even if the 7549c35d236eSmrg# installer happens to have an overly restrictive umask (e.g. 077). 7550c35d236eSmrg# This was a mistake. There are at least two reasons why we must not 7551c35d236eSmrg# use `-m 0755': 7552c35d236eSmrg# - it causes special bits like SGID to be ignored, 7553c35d236eSmrg# - it may be too restrictive (some setups expect 775 directories). 7554c35d236eSmrg# 7555c35d236eSmrg# Do not use -m 0755 and let people choose whatever they expect by 7556c35d236eSmrg# setting umask. 7557c35d236eSmrg# 7558c35d236eSmrg# We cannot accept any implementation of `mkdir' that recognizes `-p'. 7559c35d236eSmrg# Some implementations (such as Solaris 8's) are not thread-safe: if a 7560c35d236eSmrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 7561c35d236eSmrg# concurrently, both version can detect that a/ is missing, but only 7562c35d236eSmrg# one can create it and the other will error out. Consequently we 7563c35d236eSmrg# restrict ourselves to GNU make (using the --version option ensures 7564c35d236eSmrg# this.) 7565c35d236eSmrgAC_DEFUN([AM_PROG_MKDIR_P], 7566c35d236eSmrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 7567c35d236eSmrg # We used to keeping the `.' as first argument, in order to 7568c35d236eSmrg # allow $(mkdir_p) to be used without argument. As in 7569c35d236eSmrg # $(mkdir_p) $(somedir) 7570c35d236eSmrg # where $(somedir) is conditionally defined. However this is wrong 7571c35d236eSmrg # for two reasons: 7572c35d236eSmrg # 1. if the package is installed by a user who cannot write `.' 7573c35d236eSmrg # make install will fail, 7574c35d236eSmrg # 2. the above comment should most certainly read 7575c35d236eSmrg # $(mkdir_p) $(DESTDIR)$(somedir) 7576c35d236eSmrg # so it does not work when $(somedir) is undefined and 7577c35d236eSmrg # $(DESTDIR) is not. 7578c35d236eSmrg # To support the latter case, we have to write 7579c35d236eSmrg # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 7580c35d236eSmrg # so the `.' trick is pointless. 7581c35d236eSmrg mkdir_p='mkdir -p --' 7582c35d236eSmrgelse 7583c35d236eSmrg # On NextStep and OpenStep, the `mkdir' command does not 7584c35d236eSmrg # recognize any option. It will interpret all options as 7585c35d236eSmrg # directories to create, and then abort because `.' already 7586c35d236eSmrg # exists. 7587c35d236eSmrg for d in ./-p ./--version; 7588c35d236eSmrg do 7589c35d236eSmrg test -d $d && rmdir $d 7590c35d236eSmrg done 7591c35d236eSmrg # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 7592c35d236eSmrg if test -f "$ac_aux_dir/mkinstalldirs"; then 7593c35d236eSmrg mkdir_p='$(mkinstalldirs)' 7594c35d236eSmrg else 7595c35d236eSmrg mkdir_p='$(install_sh) -d' 7596c35d236eSmrg fi 7597c35d236eSmrgfi 7598c35d236eSmrgAC_SUBST([mkdir_p])]) 7599c35d236eSmrg 7600c35d236eSmrg# Helper functions for option handling. -*- Autoconf -*- 7601c35d236eSmrg 7602c35d236eSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 7603c35d236eSmrg# 7604c35d236eSmrg# This file is free software; the Free Software Foundation 7605c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7606c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7607c35d236eSmrg 7608c35d236eSmrg# serial 3 7609c35d236eSmrg 7610c35d236eSmrg# _AM_MANGLE_OPTION(NAME) 7611c35d236eSmrg# ----------------------- 7612c35d236eSmrgAC_DEFUN([_AM_MANGLE_OPTION], 7613c35d236eSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7614c35d236eSmrg 7615c35d236eSmrg# _AM_SET_OPTION(NAME) 7616c35d236eSmrg# ------------------------------ 7617c35d236eSmrg# Set option NAME. Presently that only means defining a flag for this option. 7618c35d236eSmrgAC_DEFUN([_AM_SET_OPTION], 7619c35d236eSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7620c35d236eSmrg 7621c35d236eSmrg# _AM_SET_OPTIONS(OPTIONS) 7622c35d236eSmrg# ---------------------------------- 7623c35d236eSmrg# OPTIONS is a space-separated list of Automake options. 7624c35d236eSmrgAC_DEFUN([_AM_SET_OPTIONS], 7625c35d236eSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7626c35d236eSmrg 7627c35d236eSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7628c35d236eSmrg# ------------------------------------------- 7629c35d236eSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7630c35d236eSmrgAC_DEFUN([_AM_IF_OPTION], 7631c35d236eSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7632c35d236eSmrg 7633c35d236eSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 7634c35d236eSmrg 7635c35d236eSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 7636c35d236eSmrg# Free Software Foundation, Inc. 7637c35d236eSmrg# 7638c35d236eSmrg# This file is free software; the Free Software Foundation 7639c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7640c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7641c35d236eSmrg 7642c35d236eSmrg# serial 4 7643c35d236eSmrg 7644c35d236eSmrg# AM_SANITY_CHECK 7645c35d236eSmrg# --------------- 7646c35d236eSmrgAC_DEFUN([AM_SANITY_CHECK], 7647c35d236eSmrg[AC_MSG_CHECKING([whether build environment is sane]) 7648c35d236eSmrg# Just in case 7649c35d236eSmrgsleep 1 7650c35d236eSmrgecho timestamp > conftest.file 7651c35d236eSmrg# Do `set' in a subshell so we don't clobber the current shell's 7652c35d236eSmrg# arguments. Must try -L first in case configure is actually a 7653c35d236eSmrg# symlink; some systems play weird games with the mod time of symlinks 7654c35d236eSmrg# (eg FreeBSD returns the mod time of the symlink's containing 7655c35d236eSmrg# directory). 7656c35d236eSmrgif ( 7657c35d236eSmrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 7658c35d236eSmrg if test "$[*]" = "X"; then 7659c35d236eSmrg # -L didn't work. 7660c35d236eSmrg set X `ls -t $srcdir/configure conftest.file` 7661c35d236eSmrg fi 7662c35d236eSmrg rm -f conftest.file 7663c35d236eSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 7664c35d236eSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 7665c35d236eSmrg 7666c35d236eSmrg # If neither matched, then we have a broken ls. This can happen 7667c35d236eSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 7668c35d236eSmrg # broken ls alias from the environment. This has actually 7669c35d236eSmrg # happened. Such a system could not be considered "sane". 7670c35d236eSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 7671c35d236eSmrgalias in your environment]) 7672c35d236eSmrg fi 7673c35d236eSmrg 7674c35d236eSmrg test "$[2]" = conftest.file 7675c35d236eSmrg ) 7676c35d236eSmrgthen 7677c35d236eSmrg # Ok. 7678c35d236eSmrg : 7679c35d236eSmrgelse 7680c35d236eSmrg AC_MSG_ERROR([newly created file is older than distributed files! 7681c35d236eSmrgCheck your system clock]) 7682c35d236eSmrgfi 7683c35d236eSmrgAC_MSG_RESULT(yes)]) 7684c35d236eSmrg 7685c35d236eSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7686c35d236eSmrg# 7687c35d236eSmrg# This file is free software; the Free Software Foundation 7688c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7689c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7690c35d236eSmrg 7691c35d236eSmrg# AM_PROG_INSTALL_STRIP 7692c35d236eSmrg# --------------------- 7693c35d236eSmrg# One issue with vendor `install' (even GNU) is that you can't 7694c35d236eSmrg# specify the program used to strip binaries. This is especially 7695c35d236eSmrg# annoying in cross-compiling environments, where the build's strip 7696c35d236eSmrg# is unlikely to handle the host's binaries. 7697c35d236eSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 7698c35d236eSmrg# always use install-sh in `make install-strip', and initialize 7699c35d236eSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 7700c35d236eSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 7701c35d236eSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 7702c35d236eSmrg# Installed binaries are usually stripped using `strip' when the user 7703c35d236eSmrg# run `make install-strip'. However `strip' might not be the right 7704c35d236eSmrg# tool to use in cross-compilation environments, therefore Automake 7705c35d236eSmrg# will honor the `STRIP' environment variable to overrule this program. 7706c35d236eSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 7707c35d236eSmrgif test "$cross_compiling" != no; then 7708c35d236eSmrg AC_CHECK_TOOL([STRIP], [strip], :) 7709c35d236eSmrgfi 7710c35d236eSmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 7711c35d236eSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 7712c35d236eSmrg 7713c35d236eSmrg# Check how to create a tarball. -*- Autoconf -*- 7714c35d236eSmrg 7715c35d236eSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 7716c35d236eSmrg# 7717c35d236eSmrg# This file is free software; the Free Software Foundation 7718c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7719c35d236eSmrg# with or without modifications, as long as this notice is preserved. 7720c35d236eSmrg 7721c35d236eSmrg# serial 2 7722c35d236eSmrg 7723c35d236eSmrg# _AM_PROG_TAR(FORMAT) 7724c35d236eSmrg# -------------------- 7725c35d236eSmrg# Check how to create a tarball in format FORMAT. 7726c35d236eSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 7727c35d236eSmrg# 7728c35d236eSmrg# Substitute a variable $(am__tar) that is a command 7729c35d236eSmrg# writing to stdout a FORMAT-tarball containing the directory 7730c35d236eSmrg# $tardir. 7731c35d236eSmrg# tardir=directory && $(am__tar) > result.tar 7732c35d236eSmrg# 7733c35d236eSmrg# Substitute a variable $(am__untar) that extract such 7734c35d236eSmrg# a tarball read from stdin. 7735c35d236eSmrg# $(am__untar) < result.tar 7736c35d236eSmrgAC_DEFUN([_AM_PROG_TAR], 7737c35d236eSmrg[# Always define AMTAR for backward compatibility. 7738c35d236eSmrgAM_MISSING_PROG([AMTAR], [tar]) 7739c35d236eSmrgm4_if([$1], [v7], 7740c35d236eSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 7741c35d236eSmrg [m4_case([$1], [ustar],, [pax],, 7742c35d236eSmrg [m4_fatal([Unknown tar format])]) 7743c35d236eSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 7744c35d236eSmrg# Loop over all known methods to create a tar archive until one works. 7745c35d236eSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 7746c35d236eSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 7747c35d236eSmrg# Do not fold the above two line into one, because Tru64 sh and 7748c35d236eSmrg# Solaris sh will not grok spaces in the rhs of `-'. 7749c35d236eSmrgfor _am_tool in $_am_tools 7750c35d236eSmrgdo 7751c35d236eSmrg case $_am_tool in 7752c35d236eSmrg gnutar) 7753c35d236eSmrg for _am_tar in tar gnutar gtar; 7754c35d236eSmrg do 7755c35d236eSmrg AM_RUN_LOG([$_am_tar --version]) && break 7756c35d236eSmrg done 7757c35d236eSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 7758c35d236eSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 7759c35d236eSmrg am__untar="$_am_tar -xf -" 7760c35d236eSmrg ;; 7761c35d236eSmrg plaintar) 7762c35d236eSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 7763c35d236eSmrg # ustar tarball either. 7764c35d236eSmrg (tar --version) >/dev/null 2>&1 && continue 7765c35d236eSmrg am__tar='tar chf - "$$tardir"' 7766c35d236eSmrg am__tar_='tar chf - "$tardir"' 7767c35d236eSmrg am__untar='tar xf -' 7768c35d236eSmrg ;; 7769c35d236eSmrg pax) 7770c35d236eSmrg am__tar='pax -L -x $1 -w "$$tardir"' 7771c35d236eSmrg am__tar_='pax -L -x $1 -w "$tardir"' 7772c35d236eSmrg am__untar='pax -r' 7773c35d236eSmrg ;; 7774c35d236eSmrg cpio) 7775c35d236eSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 7776c35d236eSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 7777c35d236eSmrg am__untar='cpio -i -H $1 -d' 7778c35d236eSmrg ;; 7779c35d236eSmrg none) 7780c35d236eSmrg am__tar=false 7781c35d236eSmrg am__tar_=false 7782c35d236eSmrg am__untar=false 7783c35d236eSmrg ;; 7784c35d236eSmrg esac 7785c35d236eSmrg 7786c35d236eSmrg # If the value was cached, stop now. We just wanted to have am__tar 7787c35d236eSmrg # and am__untar set. 7788c35d236eSmrg test -n "${am_cv_prog_tar_$1}" && break 7789c35d236eSmrg 7790c35d236eSmrg # tar/untar a dummy directory, and stop if the command works 7791c35d236eSmrg rm -rf conftest.dir 7792c35d236eSmrg mkdir conftest.dir 7793c35d236eSmrg echo GrepMe > conftest.dir/file 7794c35d236eSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 7795c35d236eSmrg rm -rf conftest.dir 7796c35d236eSmrg if test -s conftest.tar; then 7797c35d236eSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 7798c35d236eSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 7799c35d236eSmrg fi 7800c35d236eSmrgdone 7801c35d236eSmrgrm -rf conftest.dir 7802c35d236eSmrg 7803c35d236eSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 7804c35d236eSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 7805c35d236eSmrgAC_SUBST([am__tar]) 7806c35d236eSmrgAC_SUBST([am__untar]) 7807c35d236eSmrg]) # _AM_PROG_TAR 7808c35d236eSmrg 7809