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