aclocal.m4 revision 72b676d7
172b676d7Smrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*- 272b676d7Smrg 372b676d7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 472b676d7Smrg# 2005 Free Software Foundation, Inc. 572b676d7Smrg# This file is free software; the Free Software Foundation 672b676d7Smrg# gives unlimited permission to copy and/or distribute it, 772b676d7Smrg# with or without modifications, as long as this notice is preserved. 872b676d7Smrg 972b676d7Smrg# This program is distributed in the hope that it will be useful, 1072b676d7Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1172b676d7Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1272b676d7Smrg# PARTICULAR PURPOSE. 1372b676d7Smrg 1472b676d7Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1572b676d7Smrg 1672b676d7Smrg# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL 1772b676d7Smrg 1872b676d7Smrg 1972b676d7Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 2072b676d7Smrg# ----------------------------------------------------------- 2172b676d7Smrg# If this macro is not defined by Autoconf, define it here. 2272b676d7Smrgm4_ifdef([AC_PROVIDE_IFELSE], 2372b676d7Smrg [], 2472b676d7Smrg [m4_define([AC_PROVIDE_IFELSE], 2572b676d7Smrg [m4_ifdef([AC_PROVIDE_$1], 2672b676d7Smrg [$2], [$3])])]) 2772b676d7Smrg 2872b676d7Smrg 2972b676d7Smrg# AC_PROG_LIBTOOL 3072b676d7Smrg# --------------- 3172b676d7SmrgAC_DEFUN([AC_PROG_LIBTOOL], 3272b676d7Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 3372b676d7Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 3472b676d7Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 3572b676d7Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 3672b676d7Smrg [AC_LIBTOOL_CXX], 3772b676d7Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 3872b676d7Smrg ])]) 3972b676d7Smrgdnl And a similar setup for Fortran 77 support 4072b676d7Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 4172b676d7Smrg [AC_LIBTOOL_F77], 4272b676d7Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 4372b676d7Smrg])]) 4472b676d7Smrg 4572b676d7Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 4672b676d7Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 4772b676d7Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 4872b676d7Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 4972b676d7Smrg [AC_LIBTOOL_GCJ], 5072b676d7Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 5172b676d7Smrg [AC_LIBTOOL_GCJ], 5272b676d7Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 5372b676d7Smrg [AC_LIBTOOL_GCJ], 5472b676d7Smrg [ifdef([AC_PROG_GCJ], 5572b676d7Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 5672b676d7Smrg ifdef([A][M_PROG_GCJ], 5772b676d7Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 5872b676d7Smrg ifdef([LT_AC_PROG_GCJ], 5972b676d7Smrg [define([LT_AC_PROG_GCJ], 6072b676d7Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 6172b676d7Smrg])])# AC_PROG_LIBTOOL 6272b676d7Smrg 6372b676d7Smrg 6472b676d7Smrg# _AC_PROG_LIBTOOL 6572b676d7Smrg# ---------------- 6672b676d7SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 6772b676d7Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 6872b676d7SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 6972b676d7SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 7072b676d7SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 7172b676d7Smrg 7272b676d7Smrg# This can be used to rebuild libtool when needed 7372b676d7SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 7472b676d7Smrg 7572b676d7Smrg# Always use our own libtool. 7672b676d7SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 7772b676d7SmrgAC_SUBST(LIBTOOL)dnl 7872b676d7Smrg 7972b676d7Smrg# Prevent multiple expansion 8072b676d7Smrgdefine([AC_PROG_LIBTOOL], []) 8172b676d7Smrg])# _AC_PROG_LIBTOOL 8272b676d7Smrg 8372b676d7Smrg 8472b676d7Smrg# AC_LIBTOOL_SETUP 8572b676d7Smrg# ---------------- 8672b676d7SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 8772b676d7Smrg[AC_PREREQ(2.50)dnl 8872b676d7SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 8972b676d7SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 9072b676d7SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 9172b676d7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 9272b676d7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 9372b676d7SmrgAC_REQUIRE([AC_PROG_CC])dnl 9472b676d7SmrgAC_REQUIRE([AC_PROG_LD])dnl 9572b676d7SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 9672b676d7SmrgAC_REQUIRE([AC_PROG_NM])dnl 9772b676d7Smrg 9872b676d7SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 9972b676d7SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 10072b676d7Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 10172b676d7SmrgAC_REQUIRE([AC_OBJEXT])dnl 10272b676d7SmrgAC_REQUIRE([AC_EXEEXT])dnl 10372b676d7Smrgdnl 10472b676d7Smrg 10572b676d7SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 10672b676d7SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 10772b676d7SmrgAC_LIBTOOL_OBJDIR 10872b676d7Smrg 10972b676d7SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 11072b676d7Smrg_LT_AC_PROG_ECHO_BACKSLASH 11172b676d7Smrg 11272b676d7Smrgcase $host_os in 11372b676d7Smrgaix3*) 11472b676d7Smrg # AIX sometimes has problems with the GCC collect2 program. For some 11572b676d7Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 11672b676d7Smrg # vanish in a puff of smoke. 11772b676d7Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 11872b676d7Smrg COLLECT_NAMES= 11972b676d7Smrg export COLLECT_NAMES 12072b676d7Smrg fi 12172b676d7Smrg ;; 12272b676d7Smrgesac 12372b676d7Smrg 12472b676d7Smrg# Sed substitution that helps us do robust quoting. It backslashifies 12572b676d7Smrg# metacharacters that are still active within double-quoted strings. 12672b676d7SmrgXsed='sed -e 1s/^X//' 12772b676d7Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 12872b676d7Smrg 12972b676d7Smrg# Same as above, but do not quote variable references. 13072b676d7Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 13172b676d7Smrg 13272b676d7Smrg# Sed substitution to delay expansion of an escaped shell variable in a 13372b676d7Smrg# double_quote_subst'ed string. 13472b676d7Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 13572b676d7Smrg 13672b676d7Smrg# Sed substitution to avoid accidental globbing in evaled expressions 13772b676d7Smrgno_glob_subst='s/\*/\\\*/g' 13872b676d7Smrg 13972b676d7Smrg# Constants: 14072b676d7Smrgrm="rm -f" 14172b676d7Smrg 14272b676d7Smrg# Global variables: 14372b676d7Smrgdefault_ofile=libtool 14472b676d7Smrgcan_build_shared=yes 14572b676d7Smrg 14672b676d7Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 14772b676d7Smrg# which needs '.lib'). 14872b676d7Smrglibext=a 14972b676d7Smrgltmain="$ac_aux_dir/ltmain.sh" 15072b676d7Smrgofile="$default_ofile" 15172b676d7Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 15272b676d7Smrg 15372b676d7SmrgAC_CHECK_TOOL(AR, ar, false) 15472b676d7SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15572b676d7SmrgAC_CHECK_TOOL(STRIP, strip, :) 15672b676d7Smrg 15772b676d7Smrgold_CC="$CC" 15872b676d7Smrgold_CFLAGS="$CFLAGS" 15972b676d7Smrg 16072b676d7Smrg# Set sane defaults for various variables 16172b676d7Smrgtest -z "$AR" && AR=ar 16272b676d7Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 16372b676d7Smrgtest -z "$AS" && AS=as 16472b676d7Smrgtest -z "$CC" && CC=cc 16572b676d7Smrgtest -z "$LTCC" && LTCC=$CC 16672b676d7Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 16772b676d7Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 16872b676d7Smrgtest -z "$LD" && LD=ld 16972b676d7Smrgtest -z "$LN_S" && LN_S="ln -s" 17072b676d7Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 17172b676d7Smrgtest -z "$NM" && NM=nm 17272b676d7Smrgtest -z "$SED" && SED=sed 17372b676d7Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 17472b676d7Smrgtest -z "$RANLIB" && RANLIB=: 17572b676d7Smrgtest -z "$STRIP" && STRIP=: 17672b676d7Smrgtest -z "$ac_objext" && ac_objext=o 17772b676d7Smrg 17872b676d7Smrg# Determine commands to create old-style static archives. 17972b676d7Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 18072b676d7Smrgold_postinstall_cmds='chmod 644 $oldlib' 18172b676d7Smrgold_postuninstall_cmds= 18272b676d7Smrg 18372b676d7Smrgif test -n "$RANLIB"; then 18472b676d7Smrg case $host_os in 18572b676d7Smrg openbsd*) 18672b676d7Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 18772b676d7Smrg ;; 18872b676d7Smrg *) 18972b676d7Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 19072b676d7Smrg ;; 19172b676d7Smrg esac 19272b676d7Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 19372b676d7Smrgfi 19472b676d7Smrg 19572b676d7Smrg_LT_CC_BASENAME([$compiler]) 19672b676d7Smrg 19772b676d7Smrg# Only perform the check for file, if the check method requires it 19872b676d7Smrgcase $deplibs_check_method in 19972b676d7Smrgfile_magic*) 20072b676d7Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 20172b676d7Smrg AC_PATH_MAGIC 20272b676d7Smrg fi 20372b676d7Smrg ;; 20472b676d7Smrgesac 20572b676d7Smrg 20672b676d7SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 20772b676d7SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 20872b676d7Smrgenable_win32_dll=yes, enable_win32_dll=no) 20972b676d7Smrg 21072b676d7SmrgAC_ARG_ENABLE([libtool-lock], 21172b676d7Smrg [AC_HELP_STRING([--disable-libtool-lock], 21272b676d7Smrg [avoid locking (might break parallel builds)])]) 21372b676d7Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 21472b676d7Smrg 21572b676d7SmrgAC_ARG_WITH([pic], 21672b676d7Smrg [AC_HELP_STRING([--with-pic], 21772b676d7Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 21872b676d7Smrg [pic_mode="$withval"], 21972b676d7Smrg [pic_mode=default]) 22072b676d7Smrgtest -z "$pic_mode" && pic_mode=default 22172b676d7Smrg 22272b676d7Smrg# Use C for the default configuration in the libtool script 22372b676d7Smrgtagname= 22472b676d7SmrgAC_LIBTOOL_LANG_C_CONFIG 22572b676d7Smrg_LT_AC_TAGCONFIG 22672b676d7Smrg])# AC_LIBTOOL_SETUP 22772b676d7Smrg 22872b676d7Smrg 22972b676d7Smrg# _LT_AC_SYS_COMPILER 23072b676d7Smrg# ------------------- 23172b676d7SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 23272b676d7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 23372b676d7Smrg 23472b676d7Smrg# If no C compiler was specified, use CC. 23572b676d7SmrgLTCC=${LTCC-"$CC"} 23672b676d7Smrg 23772b676d7Smrg# If no C compiler flags were specified, use CFLAGS. 23872b676d7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 23972b676d7Smrg 24072b676d7Smrg# Allow CC to be a program name with arguments. 24172b676d7Smrgcompiler=$CC 24272b676d7Smrg])# _LT_AC_SYS_COMPILER 24372b676d7Smrg 24472b676d7Smrg 24572b676d7Smrg# _LT_CC_BASENAME(CC) 24672b676d7Smrg# ------------------- 24772b676d7Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 24872b676d7SmrgAC_DEFUN([_LT_CC_BASENAME], 24972b676d7Smrg[for cc_temp in $1""; do 25072b676d7Smrg case $cc_temp in 25172b676d7Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 25272b676d7Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 25372b676d7Smrg \-*) ;; 25472b676d7Smrg *) break;; 25572b676d7Smrg esac 25672b676d7Smrgdone 25772b676d7Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 25872b676d7Smrg]) 25972b676d7Smrg 26072b676d7Smrg 26172b676d7Smrg# _LT_COMPILER_BOILERPLATE 26272b676d7Smrg# ------------------------ 26372b676d7Smrg# Check for compiler boilerplate output or warnings with 26472b676d7Smrg# the simple compiler test code. 26572b676d7SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 26672b676d7Smrg[ac_outfile=conftest.$ac_objext 26772b676d7Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext 26872b676d7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 26972b676d7Smrg_lt_compiler_boilerplate=`cat conftest.err` 27072b676d7Smrg$rm conftest* 27172b676d7Smrg])# _LT_COMPILER_BOILERPLATE 27272b676d7Smrg 27372b676d7Smrg 27472b676d7Smrg# _LT_LINKER_BOILERPLATE 27572b676d7Smrg# ---------------------- 27672b676d7Smrg# Check for linker boilerplate output or warnings with 27772b676d7Smrg# the simple link test code. 27872b676d7SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 27972b676d7Smrg[ac_outfile=conftest.$ac_objext 28072b676d7Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext 28172b676d7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 28272b676d7Smrg_lt_linker_boilerplate=`cat conftest.err` 28372b676d7Smrg$rm conftest* 28472b676d7Smrg])# _LT_LINKER_BOILERPLATE 28572b676d7Smrg 28672b676d7Smrg 28772b676d7Smrg# _LT_AC_SYS_LIBPATH_AIX 28872b676d7Smrg# ---------------------- 28972b676d7Smrg# Links a minimal program and checks the executable 29072b676d7Smrg# for the system default hardcoded library path. In most cases, 29172b676d7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 29272b676d7Smrg# the location of the communication and MPI libs are included too. 29372b676d7Smrg# If we don't find anything, use the default library path according 29472b676d7Smrg# to the aix ld manual. 29572b676d7SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 29672b676d7Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 29772b676d7Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 29872b676d7Smrg}'` 29972b676d7Smrg# Check for a 64-bit object if we didn't find anything. 30072b676d7Smrgif 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; } 30172b676d7Smrg}'`; fi],[]) 30272b676d7Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 30372b676d7Smrg])# _LT_AC_SYS_LIBPATH_AIX 30472b676d7Smrg 30572b676d7Smrg 30672b676d7Smrg# _LT_AC_SHELL_INIT(ARG) 30772b676d7Smrg# ---------------------- 30872b676d7SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 30972b676d7Smrg[ifdef([AC_DIVERSION_NOTICE], 31072b676d7Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 31172b676d7Smrg [AC_DIVERT_PUSH(NOTICE)]) 31272b676d7Smrg$1 31372b676d7SmrgAC_DIVERT_POP 31472b676d7Smrg])# _LT_AC_SHELL_INIT 31572b676d7Smrg 31672b676d7Smrg 31772b676d7Smrg# _LT_AC_PROG_ECHO_BACKSLASH 31872b676d7Smrg# -------------------------- 31972b676d7Smrg# Add some code to the start of the generated configure script which 32072b676d7Smrg# will find an echo command which doesn't interpret backslashes. 32172b676d7SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 32272b676d7Smrg[_LT_AC_SHELL_INIT([ 32372b676d7Smrg# Check that we are running under the correct shell. 32472b676d7SmrgSHELL=${CONFIG_SHELL-/bin/sh} 32572b676d7Smrg 32672b676d7Smrgcase X$ECHO in 32772b676d7SmrgX*--fallback-echo) 32872b676d7Smrg # Remove one level of quotation (which was required for Make). 32972b676d7Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 33072b676d7Smrg ;; 33172b676d7Smrgesac 33272b676d7Smrg 33372b676d7Smrgecho=${ECHO-echo} 33472b676d7Smrgif test "X[$]1" = X--no-reexec; then 33572b676d7Smrg # Discard the --no-reexec flag, and continue. 33672b676d7Smrg shift 33772b676d7Smrgelif test "X[$]1" = X--fallback-echo; then 33872b676d7Smrg # Avoid inline document here, it may be left over 33972b676d7Smrg : 34072b676d7Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 34172b676d7Smrg # Yippee, $echo works! 34272b676d7Smrg : 34372b676d7Smrgelse 34472b676d7Smrg # Restart under the correct shell. 34572b676d7Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 34672b676d7Smrgfi 34772b676d7Smrg 34872b676d7Smrgif test "X[$]1" = X--fallback-echo; then 34972b676d7Smrg # used as fallback echo 35072b676d7Smrg shift 35172b676d7Smrg cat <<EOF 35272b676d7Smrg[$]* 35372b676d7SmrgEOF 35472b676d7Smrg exit 0 35572b676d7Smrgfi 35672b676d7Smrg 35772b676d7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 35872b676d7Smrg# if CDPATH is set. 35972b676d7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 36072b676d7Smrg 36172b676d7Smrgif test -z "$ECHO"; then 36272b676d7Smrgif test "X${echo_test_string+set}" != Xset; then 36372b676d7Smrg# find a string as large as possible, as long as the shell can cope with it 36472b676d7Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 36572b676d7Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 36672b676d7Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 36772b676d7Smrg echo_test_string=`eval $cmd` && 36872b676d7Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 36972b676d7Smrg then 37072b676d7Smrg break 37172b676d7Smrg fi 37272b676d7Smrg done 37372b676d7Smrgfi 37472b676d7Smrg 37572b676d7Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 37672b676d7Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 37772b676d7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 37872b676d7Smrg : 37972b676d7Smrgelse 38072b676d7Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 38172b676d7Smrg # backslashes. This makes it impossible to quote backslashes using 38272b676d7Smrg # echo "$something" | sed 's/\\/\\\\/g' 38372b676d7Smrg # 38472b676d7Smrg # So, first we look for a working echo in the user's PATH. 38572b676d7Smrg 38672b676d7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 38772b676d7Smrg for dir in $PATH /usr/ucb; do 38872b676d7Smrg IFS="$lt_save_ifs" 38972b676d7Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 39072b676d7Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 39172b676d7Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 39272b676d7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 39372b676d7Smrg echo="$dir/echo" 39472b676d7Smrg break 39572b676d7Smrg fi 39672b676d7Smrg done 39772b676d7Smrg IFS="$lt_save_ifs" 39872b676d7Smrg 39972b676d7Smrg if test "X$echo" = Xecho; then 40072b676d7Smrg # We didn't find a better echo, so look for alternatives. 40172b676d7Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 40272b676d7Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 40372b676d7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 40472b676d7Smrg # This shell has a builtin print -r that does the trick. 40572b676d7Smrg echo='print -r' 40672b676d7Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 40772b676d7Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 40872b676d7Smrg # If we have ksh, try running configure again with it. 40972b676d7Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 41072b676d7Smrg export ORIGINAL_CONFIG_SHELL 41172b676d7Smrg CONFIG_SHELL=/bin/ksh 41272b676d7Smrg export CONFIG_SHELL 41372b676d7Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 41472b676d7Smrg else 41572b676d7Smrg # Try using printf. 41672b676d7Smrg echo='printf %s\n' 41772b676d7Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 41872b676d7Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 41972b676d7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 42072b676d7Smrg # Cool, printf works 42172b676d7Smrg : 42272b676d7Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 42372b676d7Smrg test "X$echo_testing_string" = 'X\t' && 42472b676d7Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 42572b676d7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 42672b676d7Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 42772b676d7Smrg export CONFIG_SHELL 42872b676d7Smrg SHELL="$CONFIG_SHELL" 42972b676d7Smrg export SHELL 43072b676d7Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 43172b676d7Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 43272b676d7Smrg test "X$echo_testing_string" = 'X\t' && 43372b676d7Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 43472b676d7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 43572b676d7Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 43672b676d7Smrg else 43772b676d7Smrg # maybe with a smaller string... 43872b676d7Smrg prev=: 43972b676d7Smrg 44072b676d7Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 44172b676d7Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 44272b676d7Smrg then 44372b676d7Smrg break 44472b676d7Smrg fi 44572b676d7Smrg prev="$cmd" 44672b676d7Smrg done 44772b676d7Smrg 44872b676d7Smrg if test "$prev" != 'sed 50q "[$]0"'; then 44972b676d7Smrg echo_test_string=`eval $prev` 45072b676d7Smrg export echo_test_string 45172b676d7Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 45272b676d7Smrg else 45372b676d7Smrg # Oops. We lost completely, so just stick with echo. 45472b676d7Smrg echo=echo 45572b676d7Smrg fi 45672b676d7Smrg fi 45772b676d7Smrg fi 45872b676d7Smrg fi 45972b676d7Smrgfi 46072b676d7Smrgfi 46172b676d7Smrg 46272b676d7Smrg# Copy echo and quote the copy suitably for passing to libtool from 46372b676d7Smrg# the Makefile, instead of quoting the original, which is used later. 46472b676d7SmrgECHO=$echo 46572b676d7Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 46672b676d7Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 46772b676d7Smrgfi 46872b676d7Smrg 46972b676d7SmrgAC_SUBST(ECHO) 47072b676d7Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 47172b676d7Smrg 47272b676d7Smrg 47372b676d7Smrg# _LT_AC_LOCK 47472b676d7Smrg# ----------- 47572b676d7SmrgAC_DEFUN([_LT_AC_LOCK], 47672b676d7Smrg[AC_ARG_ENABLE([libtool-lock], 47772b676d7Smrg [AC_HELP_STRING([--disable-libtool-lock], 47872b676d7Smrg [avoid locking (might break parallel builds)])]) 47972b676d7Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 48072b676d7Smrg 48172b676d7Smrg# Some flags need to be propagated to the compiler or linker for good 48272b676d7Smrg# libtool support. 48372b676d7Smrgcase $host in 48472b676d7Smrgia64-*-hpux*) 48572b676d7Smrg # Find out which ABI we are using. 48672b676d7Smrg echo 'int i;' > conftest.$ac_ext 48772b676d7Smrg if AC_TRY_EVAL(ac_compile); then 48872b676d7Smrg case `/usr/bin/file conftest.$ac_objext` in 48972b676d7Smrg *ELF-32*) 49072b676d7Smrg HPUX_IA64_MODE="32" 49172b676d7Smrg ;; 49272b676d7Smrg *ELF-64*) 49372b676d7Smrg HPUX_IA64_MODE="64" 49472b676d7Smrg ;; 49572b676d7Smrg esac 49672b676d7Smrg fi 49772b676d7Smrg rm -rf conftest* 49872b676d7Smrg ;; 49972b676d7Smrg*-*-irix6*) 50072b676d7Smrg # Find out which ABI we are using. 50172b676d7Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 50272b676d7Smrg if AC_TRY_EVAL(ac_compile); then 50372b676d7Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 50472b676d7Smrg case `/usr/bin/file conftest.$ac_objext` in 50572b676d7Smrg *32-bit*) 50672b676d7Smrg LD="${LD-ld} -melf32bsmip" 50772b676d7Smrg ;; 50872b676d7Smrg *N32*) 50972b676d7Smrg LD="${LD-ld} -melf32bmipn32" 51072b676d7Smrg ;; 51172b676d7Smrg *64-bit*) 51272b676d7Smrg LD="${LD-ld} -melf64bmip" 51372b676d7Smrg ;; 51472b676d7Smrg esac 51572b676d7Smrg else 51672b676d7Smrg case `/usr/bin/file conftest.$ac_objext` in 51772b676d7Smrg *32-bit*) 51872b676d7Smrg LD="${LD-ld} -32" 51972b676d7Smrg ;; 52072b676d7Smrg *N32*) 52172b676d7Smrg LD="${LD-ld} -n32" 52272b676d7Smrg ;; 52372b676d7Smrg *64-bit*) 52472b676d7Smrg LD="${LD-ld} -64" 52572b676d7Smrg ;; 52672b676d7Smrg esac 52772b676d7Smrg fi 52872b676d7Smrg fi 52972b676d7Smrg rm -rf conftest* 53072b676d7Smrg ;; 53172b676d7Smrg 53272b676d7Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 53372b676d7Smrg # Find out which ABI we are using. 53472b676d7Smrg echo 'int i;' > conftest.$ac_ext 53572b676d7Smrg if AC_TRY_EVAL(ac_compile); then 53672b676d7Smrg case `/usr/bin/file conftest.o` in 53772b676d7Smrg *32-bit*) 53872b676d7Smrg case $host in 53972b676d7Smrg x86_64-*linux*) 54072b676d7Smrg LD="${LD-ld} -m elf_i386" 54172b676d7Smrg ;; 54272b676d7Smrg ppc64-*linux*|powerpc64-*linux*) 54372b676d7Smrg LD="${LD-ld} -m elf32ppclinux" 54472b676d7Smrg ;; 54572b676d7Smrg s390x-*linux*) 54672b676d7Smrg LD="${LD-ld} -m elf_s390" 54772b676d7Smrg ;; 54872b676d7Smrg sparc64-*linux*) 54972b676d7Smrg LD="${LD-ld} -m elf32_sparc" 55072b676d7Smrg ;; 55172b676d7Smrg esac 55272b676d7Smrg ;; 55372b676d7Smrg *64-bit*) 55472b676d7Smrg case $host in 55572b676d7Smrg x86_64-*linux*) 55672b676d7Smrg LD="${LD-ld} -m elf_x86_64" 55772b676d7Smrg ;; 55872b676d7Smrg ppc*-*linux*|powerpc*-*linux*) 55972b676d7Smrg LD="${LD-ld} -m elf64ppc" 56072b676d7Smrg ;; 56172b676d7Smrg s390*-*linux*) 56272b676d7Smrg LD="${LD-ld} -m elf64_s390" 56372b676d7Smrg ;; 56472b676d7Smrg sparc*-*linux*) 56572b676d7Smrg LD="${LD-ld} -m elf64_sparc" 56672b676d7Smrg ;; 56772b676d7Smrg esac 56872b676d7Smrg ;; 56972b676d7Smrg esac 57072b676d7Smrg fi 57172b676d7Smrg rm -rf conftest* 57272b676d7Smrg ;; 57372b676d7Smrg 57472b676d7Smrg*-*-sco3.2v5*) 57572b676d7Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 57672b676d7Smrg SAVE_CFLAGS="$CFLAGS" 57772b676d7Smrg CFLAGS="$CFLAGS -belf" 57872b676d7Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 57972b676d7Smrg [AC_LANG_PUSH(C) 58072b676d7Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 58172b676d7Smrg AC_LANG_POP]) 58272b676d7Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 58372b676d7Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 58472b676d7Smrg CFLAGS="$SAVE_CFLAGS" 58572b676d7Smrg fi 58672b676d7Smrg ;; 58772b676d7Smrgsparc*-*solaris*) 58872b676d7Smrg # Find out which ABI we are using. 58972b676d7Smrg echo 'int i;' > conftest.$ac_ext 59072b676d7Smrg if AC_TRY_EVAL(ac_compile); then 59172b676d7Smrg case `/usr/bin/file conftest.o` in 59272b676d7Smrg *64-bit*) 59372b676d7Smrg case $lt_cv_prog_gnu_ld in 59472b676d7Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 59572b676d7Smrg *) LD="${LD-ld} -64" ;; 59672b676d7Smrg esac 59772b676d7Smrg ;; 59872b676d7Smrg esac 59972b676d7Smrg fi 60072b676d7Smrg rm -rf conftest* 60172b676d7Smrg ;; 60272b676d7Smrg 60372b676d7SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 60472b676d7Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 60572b676d7Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 60672b676d7Smrg AC_CHECK_TOOL(AS, as, false) 60772b676d7Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 60872b676d7Smrg ;; 60972b676d7Smrg ]) 61072b676d7Smrgesac 61172b676d7Smrg 61272b676d7Smrgneed_locks="$enable_libtool_lock" 61372b676d7Smrg 61472b676d7Smrg])# _LT_AC_LOCK 61572b676d7Smrg 61672b676d7Smrg 61772b676d7Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 61872b676d7Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 61972b676d7Smrg# ---------------------------------------------------------------- 62072b676d7Smrg# Check whether the given compiler option works 62172b676d7SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 62272b676d7Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 62372b676d7SmrgAC_CACHE_CHECK([$1], [$2], 62472b676d7Smrg [$2=no 62572b676d7Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 62672b676d7Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 62772b676d7Smrg lt_compiler_flag="$3" 62872b676d7Smrg # Insert the option either (1) after the last *FLAGS variable, or 62972b676d7Smrg # (2) before a word containing "conftest.", or (3) at the end. 63072b676d7Smrg # Note that $ac_compile itself does not contain backslashes and begins 63172b676d7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 63272b676d7Smrg # The option is referenced via a variable to avoid confusing sed. 63372b676d7Smrg lt_compile=`echo "$ac_compile" | $SED \ 63472b676d7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 63572b676d7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 63672b676d7Smrg -e 's:$: $lt_compiler_flag:'` 63772b676d7Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 63872b676d7Smrg (eval "$lt_compile" 2>conftest.err) 63972b676d7Smrg ac_status=$? 64072b676d7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 64172b676d7Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 64272b676d7Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 64372b676d7Smrg # The compiler can only warn and ignore the option if not recognized 64472b676d7Smrg # So say no if there are warnings other than the usual output. 64572b676d7Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 64672b676d7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 64772b676d7Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 64872b676d7Smrg $2=yes 64972b676d7Smrg fi 65072b676d7Smrg fi 65172b676d7Smrg $rm conftest* 65272b676d7Smrg]) 65372b676d7Smrg 65472b676d7Smrgif test x"[$]$2" = xyes; then 65572b676d7Smrg ifelse([$5], , :, [$5]) 65672b676d7Smrgelse 65772b676d7Smrg ifelse([$6], , :, [$6]) 65872b676d7Smrgfi 65972b676d7Smrg])# AC_LIBTOOL_COMPILER_OPTION 66072b676d7Smrg 66172b676d7Smrg 66272b676d7Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 66372b676d7Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 66472b676d7Smrg# ------------------------------------------------------------ 66572b676d7Smrg# Check whether the given compiler option works 66672b676d7SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 66772b676d7Smrg[AC_CACHE_CHECK([$1], [$2], 66872b676d7Smrg [$2=no 66972b676d7Smrg save_LDFLAGS="$LDFLAGS" 67072b676d7Smrg LDFLAGS="$LDFLAGS $3" 67172b676d7Smrg printf "$lt_simple_link_test_code" > conftest.$ac_ext 67272b676d7Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 67372b676d7Smrg # The linker can only warn and ignore the option if not recognized 67472b676d7Smrg # So say no if there are warnings 67572b676d7Smrg if test -s conftest.err; then 67672b676d7Smrg # Append any errors to the config.log. 67772b676d7Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 67872b676d7Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 67972b676d7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 68072b676d7Smrg if diff conftest.exp conftest.er2 >/dev/null; then 68172b676d7Smrg $2=yes 68272b676d7Smrg fi 68372b676d7Smrg else 68472b676d7Smrg $2=yes 68572b676d7Smrg fi 68672b676d7Smrg fi 68772b676d7Smrg $rm conftest* 68872b676d7Smrg LDFLAGS="$save_LDFLAGS" 68972b676d7Smrg]) 69072b676d7Smrg 69172b676d7Smrgif test x"[$]$2" = xyes; then 69272b676d7Smrg ifelse([$4], , :, [$4]) 69372b676d7Smrgelse 69472b676d7Smrg ifelse([$5], , :, [$5]) 69572b676d7Smrgfi 69672b676d7Smrg])# AC_LIBTOOL_LINKER_OPTION 69772b676d7Smrg 69872b676d7Smrg 69972b676d7Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 70072b676d7Smrg# -------------------------- 70172b676d7SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 70272b676d7Smrg[# find the maximum length of command line arguments 70372b676d7SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 70472b676d7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 70572b676d7Smrg i=0 70672b676d7Smrg teststring="ABCD" 70772b676d7Smrg 70872b676d7Smrg case $build_os in 70972b676d7Smrg msdosdjgpp*) 71072b676d7Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 71172b676d7Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 71272b676d7Smrg # during glob expansion). Even if it were fixed, the result of this 71372b676d7Smrg # check would be larger than it should be. 71472b676d7Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 71572b676d7Smrg ;; 71672b676d7Smrg 71772b676d7Smrg gnu*) 71872b676d7Smrg # Under GNU Hurd, this test is not required because there is 71972b676d7Smrg # no limit to the length of command line arguments. 72072b676d7Smrg # Libtool will interpret -1 as no limit whatsoever 72172b676d7Smrg lt_cv_sys_max_cmd_len=-1; 72272b676d7Smrg ;; 72372b676d7Smrg 72472b676d7Smrg cygwin* | mingw*) 72572b676d7Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 72672b676d7Smrg # about 5 minutes as the teststring grows exponentially. 72772b676d7Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 72872b676d7Smrg # you end up with a "frozen" computer, even though with patience 72972b676d7Smrg # the test eventually succeeds (with a max line length of 256k). 73072b676d7Smrg # Instead, let's just punt: use the minimum linelength reported by 73172b676d7Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 73272b676d7Smrg lt_cv_sys_max_cmd_len=8192; 73372b676d7Smrg ;; 73472b676d7Smrg 73572b676d7Smrg amigaos*) 73672b676d7Smrg # On AmigaOS with pdksh, this test takes hours, literally. 73772b676d7Smrg # So we just punt and use a minimum line length of 8192. 73872b676d7Smrg lt_cv_sys_max_cmd_len=8192; 73972b676d7Smrg ;; 74072b676d7Smrg 74172b676d7Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 74272b676d7Smrg # This has been around since 386BSD, at least. Likely further. 74372b676d7Smrg if test -x /sbin/sysctl; then 74472b676d7Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 74572b676d7Smrg elif test -x /usr/sbin/sysctl; then 74672b676d7Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 74772b676d7Smrg else 74872b676d7Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 74972b676d7Smrg fi 75072b676d7Smrg # And add a safety zone 75172b676d7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 75272b676d7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 75372b676d7Smrg ;; 75472b676d7Smrg 75572b676d7Smrg interix*) 75672b676d7Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 75772b676d7Smrg lt_cv_sys_max_cmd_len=196608 75872b676d7Smrg ;; 75972b676d7Smrg 76072b676d7Smrg osf*) 76172b676d7Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 76272b676d7Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 76372b676d7Smrg # nice to cause kernel panics so lets avoid the loop below. 76472b676d7Smrg # First set a reasonable default. 76572b676d7Smrg lt_cv_sys_max_cmd_len=16384 76672b676d7Smrg # 76772b676d7Smrg if test -x /sbin/sysconfig; then 76872b676d7Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 76972b676d7Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 77072b676d7Smrg esac 77172b676d7Smrg fi 77272b676d7Smrg ;; 77372b676d7Smrg sco3.2v5*) 77472b676d7Smrg lt_cv_sys_max_cmd_len=102400 77572b676d7Smrg ;; 77672b676d7Smrg sysv5* | sco5v6* | sysv4.2uw2*) 77772b676d7Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 77872b676d7Smrg if test -n "$kargmax"; then 77972b676d7Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 78072b676d7Smrg else 78172b676d7Smrg lt_cv_sys_max_cmd_len=32768 78272b676d7Smrg fi 78372b676d7Smrg ;; 78472b676d7Smrg *) 78572b676d7Smrg # If test is not a shell built-in, we'll probably end up computing a 78672b676d7Smrg # maximum length that is only half of the actual maximum length, but 78772b676d7Smrg # we can't tell. 78872b676d7Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 78972b676d7Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 79072b676d7Smrg = "XX$teststring") >/dev/null 2>&1 && 79172b676d7Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 79272b676d7Smrg lt_cv_sys_max_cmd_len=$new_result && 79372b676d7Smrg test $i != 17 # 1/2 MB should be enough 79472b676d7Smrg do 79572b676d7Smrg i=`expr $i + 1` 79672b676d7Smrg teststring=$teststring$teststring 79772b676d7Smrg done 79872b676d7Smrg teststring= 79972b676d7Smrg # Add a significant safety factor because C++ compilers can tack on massive 80072b676d7Smrg # amounts of additional arguments before passing them to the linker. 80172b676d7Smrg # It appears as though 1/2 is a usable value. 80272b676d7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 80372b676d7Smrg ;; 80472b676d7Smrg esac 80572b676d7Smrg]) 80672b676d7Smrgif test -n $lt_cv_sys_max_cmd_len ; then 80772b676d7Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 80872b676d7Smrgelse 80972b676d7Smrg AC_MSG_RESULT(none) 81072b676d7Smrgfi 81172b676d7Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 81272b676d7Smrg 81372b676d7Smrg 81472b676d7Smrg# _LT_AC_CHECK_DLFCN 81572b676d7Smrg# ------------------ 81672b676d7SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 81772b676d7Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 81872b676d7Smrg])# _LT_AC_CHECK_DLFCN 81972b676d7Smrg 82072b676d7Smrg 82172b676d7Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 82272b676d7Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 82372b676d7Smrg# --------------------------------------------------------------------- 82472b676d7SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 82572b676d7Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 82672b676d7Smrgif test "$cross_compiling" = yes; then : 82772b676d7Smrg [$4] 82872b676d7Smrgelse 82972b676d7Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 83072b676d7Smrg lt_status=$lt_dlunknown 83172b676d7Smrg cat > conftest.$ac_ext <<EOF 83272b676d7Smrg[#line __oline__ "configure" 83372b676d7Smrg#include "confdefs.h" 83472b676d7Smrg 83572b676d7Smrg#if HAVE_DLFCN_H 83672b676d7Smrg#include <dlfcn.h> 83772b676d7Smrg#endif 83872b676d7Smrg 83972b676d7Smrg#include <stdio.h> 84072b676d7Smrg 84172b676d7Smrg#ifdef RTLD_GLOBAL 84272b676d7Smrg# define LT_DLGLOBAL RTLD_GLOBAL 84372b676d7Smrg#else 84472b676d7Smrg# ifdef DL_GLOBAL 84572b676d7Smrg# define LT_DLGLOBAL DL_GLOBAL 84672b676d7Smrg# else 84772b676d7Smrg# define LT_DLGLOBAL 0 84872b676d7Smrg# endif 84972b676d7Smrg#endif 85072b676d7Smrg 85172b676d7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 85272b676d7Smrg find out it does not work in some platform. */ 85372b676d7Smrg#ifndef LT_DLLAZY_OR_NOW 85472b676d7Smrg# ifdef RTLD_LAZY 85572b676d7Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 85672b676d7Smrg# else 85772b676d7Smrg# ifdef DL_LAZY 85872b676d7Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 85972b676d7Smrg# else 86072b676d7Smrg# ifdef RTLD_NOW 86172b676d7Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 86272b676d7Smrg# else 86372b676d7Smrg# ifdef DL_NOW 86472b676d7Smrg# define LT_DLLAZY_OR_NOW DL_NOW 86572b676d7Smrg# else 86672b676d7Smrg# define LT_DLLAZY_OR_NOW 0 86772b676d7Smrg# endif 86872b676d7Smrg# endif 86972b676d7Smrg# endif 87072b676d7Smrg# endif 87172b676d7Smrg#endif 87272b676d7Smrg 87372b676d7Smrg#ifdef __cplusplus 87472b676d7Smrgextern "C" void exit (int); 87572b676d7Smrg#endif 87672b676d7Smrg 87772b676d7Smrgvoid fnord() { int i=42;} 87872b676d7Smrgint main () 87972b676d7Smrg{ 88072b676d7Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 88172b676d7Smrg int status = $lt_dlunknown; 88272b676d7Smrg 88372b676d7Smrg if (self) 88472b676d7Smrg { 88572b676d7Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 88672b676d7Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 88772b676d7Smrg /* dlclose (self); */ 88872b676d7Smrg } 88972b676d7Smrg else 89072b676d7Smrg puts (dlerror ()); 89172b676d7Smrg 89272b676d7Smrg exit (status); 89372b676d7Smrg}] 89472b676d7SmrgEOF 89572b676d7Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 89672b676d7Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 89772b676d7Smrg lt_status=$? 89872b676d7Smrg case x$lt_status in 89972b676d7Smrg x$lt_dlno_uscore) $1 ;; 90072b676d7Smrg x$lt_dlneed_uscore) $2 ;; 90172b676d7Smrg x$lt_dlunknown|x*) $3 ;; 90272b676d7Smrg esac 90372b676d7Smrg else : 90472b676d7Smrg # compilation failed 90572b676d7Smrg $3 90672b676d7Smrg fi 90772b676d7Smrgfi 90872b676d7Smrgrm -fr conftest* 90972b676d7Smrg])# _LT_AC_TRY_DLOPEN_SELF 91072b676d7Smrg 91172b676d7Smrg 91272b676d7Smrg# AC_LIBTOOL_DLOPEN_SELF 91372b676d7Smrg# ---------------------- 91472b676d7SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 91572b676d7Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 91672b676d7Smrgif test "x$enable_dlopen" != xyes; then 91772b676d7Smrg enable_dlopen=unknown 91872b676d7Smrg enable_dlopen_self=unknown 91972b676d7Smrg enable_dlopen_self_static=unknown 92072b676d7Smrgelse 92172b676d7Smrg lt_cv_dlopen=no 92272b676d7Smrg lt_cv_dlopen_libs= 92372b676d7Smrg 92472b676d7Smrg case $host_os in 92572b676d7Smrg beos*) 92672b676d7Smrg lt_cv_dlopen="load_add_on" 92772b676d7Smrg lt_cv_dlopen_libs= 92872b676d7Smrg lt_cv_dlopen_self=yes 92972b676d7Smrg ;; 93072b676d7Smrg 93172b676d7Smrg mingw* | pw32*) 93272b676d7Smrg lt_cv_dlopen="LoadLibrary" 93372b676d7Smrg lt_cv_dlopen_libs= 93472b676d7Smrg ;; 93572b676d7Smrg 93672b676d7Smrg cygwin*) 93772b676d7Smrg lt_cv_dlopen="dlopen" 93872b676d7Smrg lt_cv_dlopen_libs= 93972b676d7Smrg ;; 94072b676d7Smrg 94172b676d7Smrg darwin*) 94272b676d7Smrg # if libdl is installed we need to link against it 94372b676d7Smrg AC_CHECK_LIB([dl], [dlopen], 94472b676d7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 94572b676d7Smrg lt_cv_dlopen="dyld" 94672b676d7Smrg lt_cv_dlopen_libs= 94772b676d7Smrg lt_cv_dlopen_self=yes 94872b676d7Smrg ]) 94972b676d7Smrg ;; 95072b676d7Smrg 95172b676d7Smrg *) 95272b676d7Smrg AC_CHECK_FUNC([shl_load], 95372b676d7Smrg [lt_cv_dlopen="shl_load"], 95472b676d7Smrg [AC_CHECK_LIB([dld], [shl_load], 95572b676d7Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 95672b676d7Smrg [AC_CHECK_FUNC([dlopen], 95772b676d7Smrg [lt_cv_dlopen="dlopen"], 95872b676d7Smrg [AC_CHECK_LIB([dl], [dlopen], 95972b676d7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 96072b676d7Smrg [AC_CHECK_LIB([svld], [dlopen], 96172b676d7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 96272b676d7Smrg [AC_CHECK_LIB([dld], [dld_link], 96372b676d7Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 96472b676d7Smrg ]) 96572b676d7Smrg ]) 96672b676d7Smrg ]) 96772b676d7Smrg ]) 96872b676d7Smrg ]) 96972b676d7Smrg ;; 97072b676d7Smrg esac 97172b676d7Smrg 97272b676d7Smrg if test "x$lt_cv_dlopen" != xno; then 97372b676d7Smrg enable_dlopen=yes 97472b676d7Smrg else 97572b676d7Smrg enable_dlopen=no 97672b676d7Smrg fi 97772b676d7Smrg 97872b676d7Smrg case $lt_cv_dlopen in 97972b676d7Smrg dlopen) 98072b676d7Smrg save_CPPFLAGS="$CPPFLAGS" 98172b676d7Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 98272b676d7Smrg 98372b676d7Smrg save_LDFLAGS="$LDFLAGS" 98472b676d7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 98572b676d7Smrg 98672b676d7Smrg save_LIBS="$LIBS" 98772b676d7Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 98872b676d7Smrg 98972b676d7Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 99072b676d7Smrg lt_cv_dlopen_self, [dnl 99172b676d7Smrg _LT_AC_TRY_DLOPEN_SELF( 99272b676d7Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 99372b676d7Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 99472b676d7Smrg ]) 99572b676d7Smrg 99672b676d7Smrg if test "x$lt_cv_dlopen_self" = xyes; then 99772b676d7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 99872b676d7Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 99972b676d7Smrg lt_cv_dlopen_self_static, [dnl 100072b676d7Smrg _LT_AC_TRY_DLOPEN_SELF( 100172b676d7Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 100272b676d7Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 100372b676d7Smrg ]) 100472b676d7Smrg fi 100572b676d7Smrg 100672b676d7Smrg CPPFLAGS="$save_CPPFLAGS" 100772b676d7Smrg LDFLAGS="$save_LDFLAGS" 100872b676d7Smrg LIBS="$save_LIBS" 100972b676d7Smrg ;; 101072b676d7Smrg esac 101172b676d7Smrg 101272b676d7Smrg case $lt_cv_dlopen_self in 101372b676d7Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 101472b676d7Smrg *) enable_dlopen_self=unknown ;; 101572b676d7Smrg esac 101672b676d7Smrg 101772b676d7Smrg case $lt_cv_dlopen_self_static in 101872b676d7Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 101972b676d7Smrg *) enable_dlopen_self_static=unknown ;; 102072b676d7Smrg esac 102172b676d7Smrgfi 102272b676d7Smrg])# AC_LIBTOOL_DLOPEN_SELF 102372b676d7Smrg 102472b676d7Smrg 102572b676d7Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 102672b676d7Smrg# --------------------------------- 102772b676d7Smrg# Check to see if options -c and -o are simultaneously supported by compiler 102872b676d7SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 102972b676d7Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 103072b676d7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 103172b676d7Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 103272b676d7Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 103372b676d7Smrg $rm -r conftest 2>/dev/null 103472b676d7Smrg mkdir conftest 103572b676d7Smrg cd conftest 103672b676d7Smrg mkdir out 103772b676d7Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 103872b676d7Smrg 103972b676d7Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 104072b676d7Smrg # Insert the option either (1) after the last *FLAGS variable, or 104172b676d7Smrg # (2) before a word containing "conftest.", or (3) at the end. 104272b676d7Smrg # Note that $ac_compile itself does not contain backslashes and begins 104372b676d7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 104472b676d7Smrg lt_compile=`echo "$ac_compile" | $SED \ 104572b676d7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 104672b676d7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 104772b676d7Smrg -e 's:$: $lt_compiler_flag:'` 104872b676d7Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 104972b676d7Smrg (eval "$lt_compile" 2>out/conftest.err) 105072b676d7Smrg ac_status=$? 105172b676d7Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 105272b676d7Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 105372b676d7Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 105472b676d7Smrg then 105572b676d7Smrg # The compiler can only warn and ignore the option if not recognized 105672b676d7Smrg # So say no if there are warnings 105772b676d7Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 105872b676d7Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 105972b676d7Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 106072b676d7Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 106172b676d7Smrg fi 106272b676d7Smrg fi 106372b676d7Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 106472b676d7Smrg $rm conftest* 106572b676d7Smrg # SGI C++ compiler will create directory out/ii_files/ for 106672b676d7Smrg # template instantiation 106772b676d7Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 106872b676d7Smrg $rm out/* && rmdir out 106972b676d7Smrg cd .. 107072b676d7Smrg rmdir conftest 107172b676d7Smrg $rm conftest* 107272b676d7Smrg]) 107372b676d7Smrg])# AC_LIBTOOL_PROG_CC_C_O 107472b676d7Smrg 107572b676d7Smrg 107672b676d7Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 107772b676d7Smrg# ----------------------------------------- 107872b676d7Smrg# Check to see if we can do hard links to lock some files if needed 107972b676d7SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 108072b676d7Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 108172b676d7Smrg 108272b676d7Smrghard_links="nottested" 108372b676d7Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 108472b676d7Smrg # do not overwrite the value of need_locks provided by the user 108572b676d7Smrg AC_MSG_CHECKING([if we can lock with hard links]) 108672b676d7Smrg hard_links=yes 108772b676d7Smrg $rm conftest* 108872b676d7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 108972b676d7Smrg touch conftest.a 109072b676d7Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 109172b676d7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 109272b676d7Smrg AC_MSG_RESULT([$hard_links]) 109372b676d7Smrg if test "$hard_links" = no; then 109472b676d7Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 109572b676d7Smrg need_locks=warn 109672b676d7Smrg fi 109772b676d7Smrgelse 109872b676d7Smrg need_locks=no 109972b676d7Smrgfi 110072b676d7Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 110172b676d7Smrg 110272b676d7Smrg 110372b676d7Smrg# AC_LIBTOOL_OBJDIR 110472b676d7Smrg# ----------------- 110572b676d7SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 110672b676d7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 110772b676d7Smrg[rm -f .libs 2>/dev/null 110872b676d7Smrgmkdir .libs 2>/dev/null 110972b676d7Smrgif test -d .libs; then 111072b676d7Smrg lt_cv_objdir=.libs 111172b676d7Smrgelse 111272b676d7Smrg # MS-DOS does not allow filenames that begin with a dot. 111372b676d7Smrg lt_cv_objdir=_libs 111472b676d7Smrgfi 111572b676d7Smrgrmdir .libs 2>/dev/null]) 111672b676d7Smrgobjdir=$lt_cv_objdir 111772b676d7Smrg])# AC_LIBTOOL_OBJDIR 111872b676d7Smrg 111972b676d7Smrg 112072b676d7Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 112172b676d7Smrg# ---------------------------------------------- 112272b676d7Smrg# Check hardcoding attributes. 112372b676d7SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 112472b676d7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 112572b676d7Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 112672b676d7Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 112772b676d7Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 112872b676d7Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 112972b676d7Smrg 113072b676d7Smrg # We can hardcode non-existant directories. 113172b676d7Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 113272b676d7Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 113372b676d7Smrg # have to relink, otherwise we might link with an installed library 113472b676d7Smrg # when we should be linking with a yet-to-be-installed one 113572b676d7Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 113672b676d7Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 113772b676d7Smrg # Linking always hardcodes the temporary library directory. 113872b676d7Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 113972b676d7Smrg else 114072b676d7Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 114172b676d7Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 114272b676d7Smrg fi 114372b676d7Smrgelse 114472b676d7Smrg # We cannot hardcode anything, or else we can only hardcode existing 114572b676d7Smrg # directories. 114672b676d7Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 114772b676d7Smrgfi 114872b676d7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 114972b676d7Smrg 115072b676d7Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 115172b676d7Smrg # Fast installation is not supported 115272b676d7Smrg enable_fast_install=no 115372b676d7Smrgelif test "$shlibpath_overrides_runpath" = yes || 115472b676d7Smrg test "$enable_shared" = no; then 115572b676d7Smrg # Fast installation is not necessary 115672b676d7Smrg enable_fast_install=needless 115772b676d7Smrgfi 115872b676d7Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 115972b676d7Smrg 116072b676d7Smrg 116172b676d7Smrg# AC_LIBTOOL_SYS_LIB_STRIP 116272b676d7Smrg# ------------------------ 116372b676d7SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 116472b676d7Smrg[striplib= 116572b676d7Smrgold_striplib= 116672b676d7SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 116772b676d7Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 116872b676d7Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 116972b676d7Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 117072b676d7Smrg AC_MSG_RESULT([yes]) 117172b676d7Smrgelse 117272b676d7Smrg# FIXME - insert some real tests, host_os isn't really good enough 117372b676d7Smrg case $host_os in 117472b676d7Smrg darwin*) 117572b676d7Smrg if test -n "$STRIP" ; then 117672b676d7Smrg striplib="$STRIP -x" 117772b676d7Smrg AC_MSG_RESULT([yes]) 117872b676d7Smrg else 117972b676d7Smrg AC_MSG_RESULT([no]) 118072b676d7Smrgfi 118172b676d7Smrg ;; 118272b676d7Smrg *) 118372b676d7Smrg AC_MSG_RESULT([no]) 118472b676d7Smrg ;; 118572b676d7Smrg esac 118672b676d7Smrgfi 118772b676d7Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 118872b676d7Smrg 118972b676d7Smrg 119072b676d7Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 119172b676d7Smrg# ----------------------------- 119272b676d7Smrg# PORTME Fill in your ld.so characteristics 119372b676d7SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 119472b676d7Smrg[AC_MSG_CHECKING([dynamic linker characteristics]) 119572b676d7Smrglibrary_names_spec= 119672b676d7Smrglibname_spec='lib$name' 119772b676d7Smrgsoname_spec= 119872b676d7Smrgshrext_cmds=".so" 119972b676d7Smrgpostinstall_cmds= 120072b676d7Smrgpostuninstall_cmds= 120172b676d7Smrgfinish_cmds= 120272b676d7Smrgfinish_eval= 120372b676d7Smrgshlibpath_var= 120472b676d7Smrgshlibpath_overrides_runpath=unknown 120572b676d7Smrgversion_type=none 120672b676d7Smrgdynamic_linker="$host_os ld.so" 120772b676d7Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 120872b676d7Smrgif test "$GCC" = yes; then 120972b676d7Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 121072b676d7Smrg if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 121172b676d7Smrg # if the path contains ";" then we assume it to be the separator 121272b676d7Smrg # otherwise default to the standard path separator (i.e. ":") - it is 121372b676d7Smrg # assumed that no part of a normal pathname contains ";" but that should 121472b676d7Smrg # okay in the real world where ";" in dirpaths is itself problematic. 121572b676d7Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 121672b676d7Smrg else 121772b676d7Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 121872b676d7Smrg fi 121972b676d7Smrgelse 122072b676d7Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 122172b676d7Smrgfi 122272b676d7Smrgneed_lib_prefix=unknown 122372b676d7Smrghardcode_into_libs=no 122472b676d7Smrg 122572b676d7Smrg# when you set need_version to no, make sure it does not cause -set_version 122672b676d7Smrg# flags to be left without arguments 122772b676d7Smrgneed_version=unknown 122872b676d7Smrg 122972b676d7Smrgcase $host_os in 123072b676d7Smrgaix3*) 123172b676d7Smrg version_type=linux 123272b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 123372b676d7Smrg shlibpath_var=LIBPATH 123472b676d7Smrg 123572b676d7Smrg # AIX 3 has no versioning support, so we append a major version to the name. 123672b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 123772b676d7Smrg ;; 123872b676d7Smrg 123972b676d7Smrgaix4* | aix5*) 124072b676d7Smrg version_type=linux 124172b676d7Smrg need_lib_prefix=no 124272b676d7Smrg need_version=no 124372b676d7Smrg hardcode_into_libs=yes 124472b676d7Smrg if test "$host_cpu" = ia64; then 124572b676d7Smrg # AIX 5 supports IA64 124672b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 124772b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 124872b676d7Smrg else 124972b676d7Smrg # With GCC up to 2.95.x, collect2 would create an import file 125072b676d7Smrg # for dependence libraries. The import file would start with 125172b676d7Smrg # the line `#! .'. This would cause the generated library to 125272b676d7Smrg # depend on `.', always an invalid library. This was fixed in 125372b676d7Smrg # development snapshots of GCC prior to 3.0. 125472b676d7Smrg case $host_os in 125572b676d7Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 125672b676d7Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 125772b676d7Smrg echo ' yes ' 125872b676d7Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 125972b676d7Smrg : 126072b676d7Smrg else 126172b676d7Smrg can_build_shared=no 126272b676d7Smrg fi 126372b676d7Smrg ;; 126472b676d7Smrg esac 126572b676d7Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 126672b676d7Smrg # soname into executable. Probably we can add versioning support to 126772b676d7Smrg # collect2, so additional links can be useful in future. 126872b676d7Smrg if test "$aix_use_runtimelinking" = yes; then 126972b676d7Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 127072b676d7Smrg # instead of lib<name>.a to let people know that these are not 127172b676d7Smrg # typical AIX shared libraries. 127272b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 127372b676d7Smrg else 127472b676d7Smrg # We preserve .a as extension for shared libraries through AIX4.2 127572b676d7Smrg # and later when we are not doing run time linking. 127672b676d7Smrg library_names_spec='${libname}${release}.a $libname.a' 127772b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 127872b676d7Smrg fi 127972b676d7Smrg shlibpath_var=LIBPATH 128072b676d7Smrg fi 128172b676d7Smrg ;; 128272b676d7Smrg 128372b676d7Smrgamigaos*) 128472b676d7Smrg library_names_spec='$libname.ixlibrary $libname.a' 128572b676d7Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 128672b676d7Smrg 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' 128772b676d7Smrg ;; 128872b676d7Smrg 128972b676d7Smrgbeos*) 129072b676d7Smrg library_names_spec='${libname}${shared_ext}' 129172b676d7Smrg dynamic_linker="$host_os ld.so" 129272b676d7Smrg shlibpath_var=LIBRARY_PATH 129372b676d7Smrg ;; 129472b676d7Smrg 129572b676d7Smrgbsdi[[45]]*) 129672b676d7Smrg version_type=linux 129772b676d7Smrg need_version=no 129872b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 129972b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 130072b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 130172b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 130272b676d7Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 130372b676d7Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 130472b676d7Smrg # the default ld.so.conf also contains /usr/contrib/lib and 130572b676d7Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 130672b676d7Smrg # libtool to hard-code these into programs 130772b676d7Smrg ;; 130872b676d7Smrg 130972b676d7Smrgcygwin* | mingw* | pw32*) 131072b676d7Smrg version_type=windows 131172b676d7Smrg shrext_cmds=".dll" 131272b676d7Smrg need_version=no 131372b676d7Smrg need_lib_prefix=no 131472b676d7Smrg 131572b676d7Smrg case $GCC,$host_os in 131672b676d7Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 131772b676d7Smrg library_names_spec='$libname.dll.a' 131872b676d7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 131972b676d7Smrg postinstall_cmds='base_file=`basename \${file}`~ 132072b676d7Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 132172b676d7Smrg dldir=$destdir/`dirname \$dlpath`~ 132272b676d7Smrg test -d \$dldir || mkdir -p \$dldir~ 132372b676d7Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 132472b676d7Smrg chmod a+x \$dldir/$dlname' 132572b676d7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 132672b676d7Smrg dlpath=$dir/\$dldll~ 132772b676d7Smrg $rm \$dlpath' 132872b676d7Smrg shlibpath_overrides_runpath=yes 132972b676d7Smrg 133072b676d7Smrg case $host_os in 133172b676d7Smrg cygwin*) 133272b676d7Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 133372b676d7Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 133472b676d7Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 133572b676d7Smrg ;; 133672b676d7Smrg mingw*) 133772b676d7Smrg # MinGW DLLs use traditional 'lib' prefix 133872b676d7Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 133972b676d7Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 134072b676d7Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 134172b676d7Smrg # It is most probably a Windows format PATH printed by 134272b676d7Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 134372b676d7Smrg # path with ; separators, and with drive letters. We can handle the 134472b676d7Smrg # drive letters (cygwin fileutils understands them), so leave them, 134572b676d7Smrg # especially as we might pass files found there to a mingw objdump, 134672b676d7Smrg # which wouldn't understand a cygwinified path. Ahh. 134772b676d7Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 134872b676d7Smrg else 134972b676d7Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 135072b676d7Smrg fi 135172b676d7Smrg ;; 135272b676d7Smrg pw32*) 135372b676d7Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 135472b676d7Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 135572b676d7Smrg ;; 135672b676d7Smrg esac 135772b676d7Smrg ;; 135872b676d7Smrg 135972b676d7Smrg *) 136072b676d7Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 136172b676d7Smrg ;; 136272b676d7Smrg esac 136372b676d7Smrg dynamic_linker='Win32 ld.exe' 136472b676d7Smrg # FIXME: first we should search . and the directory the executable is in 136572b676d7Smrg shlibpath_var=PATH 136672b676d7Smrg ;; 136772b676d7Smrg 136872b676d7Smrgdarwin* | rhapsody*) 136972b676d7Smrg dynamic_linker="$host_os dyld" 137072b676d7Smrg version_type=darwin 137172b676d7Smrg need_lib_prefix=no 137272b676d7Smrg need_version=no 137372b676d7Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 137472b676d7Smrg soname_spec='${libname}${release}${major}$shared_ext' 137572b676d7Smrg shlibpath_overrides_runpath=yes 137672b676d7Smrg shlibpath_var=DYLD_LIBRARY_PATH 137772b676d7Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 137872b676d7Smrg # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 137972b676d7Smrg if test "$GCC" = yes; then 138072b676d7Smrg 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"` 138172b676d7Smrg else 138272b676d7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 138372b676d7Smrg fi 138472b676d7Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 138572b676d7Smrg ;; 138672b676d7Smrg 138772b676d7Smrgdgux*) 138872b676d7Smrg version_type=linux 138972b676d7Smrg need_lib_prefix=no 139072b676d7Smrg need_version=no 139172b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 139272b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 139372b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 139472b676d7Smrg ;; 139572b676d7Smrg 139672b676d7Smrgfreebsd1*) 139772b676d7Smrg dynamic_linker=no 139872b676d7Smrg ;; 139972b676d7Smrg 140072b676d7Smrgfreebsd* | dragonfly*) 140172b676d7Smrg # DragonFly does not have aout. When/if they implement a new 140272b676d7Smrg # versioning mechanism, adjust this. 140372b676d7Smrg if test -x /usr/bin/objformat; then 140472b676d7Smrg objformat=`/usr/bin/objformat` 140572b676d7Smrg else 140672b676d7Smrg case $host_os in 140772b676d7Smrg freebsd[[123]]*) objformat=aout ;; 140872b676d7Smrg *) objformat=elf ;; 140972b676d7Smrg esac 141072b676d7Smrg fi 141172b676d7Smrg version_type=freebsd-$objformat 141272b676d7Smrg case $version_type in 141372b676d7Smrg freebsd-elf*) 141472b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 141572b676d7Smrg need_version=no 141672b676d7Smrg need_lib_prefix=no 141772b676d7Smrg ;; 141872b676d7Smrg freebsd-*) 141972b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 142072b676d7Smrg need_version=yes 142172b676d7Smrg ;; 142272b676d7Smrg esac 142372b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 142472b676d7Smrg case $host_os in 142572b676d7Smrg freebsd2*) 142672b676d7Smrg shlibpath_overrides_runpath=yes 142772b676d7Smrg ;; 142872b676d7Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 142972b676d7Smrg shlibpath_overrides_runpath=yes 143072b676d7Smrg hardcode_into_libs=yes 143172b676d7Smrg ;; 143272b676d7Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 143372b676d7Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 143472b676d7Smrg shlibpath_overrides_runpath=no 143572b676d7Smrg hardcode_into_libs=yes 143672b676d7Smrg ;; 143772b676d7Smrg freebsd*) # from 4.6 on 143872b676d7Smrg shlibpath_overrides_runpath=yes 143972b676d7Smrg hardcode_into_libs=yes 144072b676d7Smrg ;; 144172b676d7Smrg esac 144272b676d7Smrg ;; 144372b676d7Smrg 144472b676d7Smrggnu*) 144572b676d7Smrg version_type=linux 144672b676d7Smrg need_lib_prefix=no 144772b676d7Smrg need_version=no 144872b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 144972b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 145072b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 145172b676d7Smrg hardcode_into_libs=yes 145272b676d7Smrg ;; 145372b676d7Smrg 145472b676d7Smrghpux9* | hpux10* | hpux11*) 145572b676d7Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 145672b676d7Smrg # link against other versions. 145772b676d7Smrg version_type=sunos 145872b676d7Smrg need_lib_prefix=no 145972b676d7Smrg need_version=no 146072b676d7Smrg case $host_cpu in 146172b676d7Smrg ia64*) 146272b676d7Smrg shrext_cmds='.so' 146372b676d7Smrg hardcode_into_libs=yes 146472b676d7Smrg dynamic_linker="$host_os dld.so" 146572b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 146672b676d7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 146772b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 146872b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 146972b676d7Smrg if test "X$HPUX_IA64_MODE" = X32; then 147072b676d7Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 147172b676d7Smrg else 147272b676d7Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 147372b676d7Smrg fi 147472b676d7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 147572b676d7Smrg ;; 147672b676d7Smrg hppa*64*) 147772b676d7Smrg shrext_cmds='.sl' 147872b676d7Smrg hardcode_into_libs=yes 147972b676d7Smrg dynamic_linker="$host_os dld.sl" 148072b676d7Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 148172b676d7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 148272b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 148372b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 148472b676d7Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 148572b676d7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 148672b676d7Smrg ;; 148772b676d7Smrg *) 148872b676d7Smrg shrext_cmds='.sl' 148972b676d7Smrg dynamic_linker="$host_os dld.sl" 149072b676d7Smrg shlibpath_var=SHLIB_PATH 149172b676d7Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 149272b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 149372b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 149472b676d7Smrg ;; 149572b676d7Smrg esac 149672b676d7Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 149772b676d7Smrg postinstall_cmds='chmod 555 $lib' 149872b676d7Smrg ;; 149972b676d7Smrg 150072b676d7Smrginterix3*) 150172b676d7Smrg version_type=linux 150272b676d7Smrg need_lib_prefix=no 150372b676d7Smrg need_version=no 150472b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 150572b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 150672b676d7Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 150772b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 150872b676d7Smrg shlibpath_overrides_runpath=no 150972b676d7Smrg hardcode_into_libs=yes 151072b676d7Smrg ;; 151172b676d7Smrg 151272b676d7Smrgirix5* | irix6* | nonstopux*) 151372b676d7Smrg case $host_os in 151472b676d7Smrg nonstopux*) version_type=nonstopux ;; 151572b676d7Smrg *) 151672b676d7Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 151772b676d7Smrg version_type=linux 151872b676d7Smrg else 151972b676d7Smrg version_type=irix 152072b676d7Smrg fi ;; 152172b676d7Smrg esac 152272b676d7Smrg need_lib_prefix=no 152372b676d7Smrg need_version=no 152472b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 152572b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 152672b676d7Smrg case $host_os in 152772b676d7Smrg irix5* | nonstopux*) 152872b676d7Smrg libsuff= shlibsuff= 152972b676d7Smrg ;; 153072b676d7Smrg *) 153172b676d7Smrg case $LD in # libtool.m4 will add one of these switches to LD 153272b676d7Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 153372b676d7Smrg libsuff= shlibsuff= libmagic=32-bit;; 153472b676d7Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 153572b676d7Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 153672b676d7Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 153772b676d7Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 153872b676d7Smrg *) libsuff= shlibsuff= libmagic=never-match;; 153972b676d7Smrg esac 154072b676d7Smrg ;; 154172b676d7Smrg esac 154272b676d7Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 154372b676d7Smrg shlibpath_overrides_runpath=no 154472b676d7Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 154572b676d7Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 154672b676d7Smrg hardcode_into_libs=yes 154772b676d7Smrg ;; 154872b676d7Smrg 154972b676d7Smrg# No shared lib support for Linux oldld, aout, or coff. 155072b676d7Smrglinux*oldld* | linux*aout* | linux*coff*) 155172b676d7Smrg dynamic_linker=no 155272b676d7Smrg ;; 155372b676d7Smrg 155472b676d7Smrg# This must be Linux ELF. 155572b676d7Smrglinux* | k*bsd*-gnu) 155672b676d7Smrg version_type=linux 155772b676d7Smrg need_lib_prefix=no 155872b676d7Smrg need_version=no 155972b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 156072b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 156172b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 156272b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 156372b676d7Smrg shlibpath_overrides_runpath=no 156472b676d7Smrg # This implies no fast_install, which is unacceptable. 156572b676d7Smrg # Some rework will be needed to allow for fast_install 156672b676d7Smrg # before this can be enabled. 156772b676d7Smrg hardcode_into_libs=yes 156872b676d7Smrg 156972b676d7Smrg # Append ld.so.conf contents to the search path 157072b676d7Smrg if test -f /etc/ld.so.conf; then 157172b676d7Smrg 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' ' '` 157272b676d7Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 157372b676d7Smrg fi 157472b676d7Smrg 157572b676d7Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 157672b676d7Smrg # powerpc, because MkLinux only supported shared libraries with the 157772b676d7Smrg # GNU dynamic linker. Since this was broken with cross compilers, 157872b676d7Smrg # most powerpc-linux boxes support dynamic linking these days and 157972b676d7Smrg # people can always --disable-shared, the test was removed, and we 158072b676d7Smrg # assume the GNU/Linux dynamic linker is in use. 158172b676d7Smrg dynamic_linker='GNU/Linux ld.so' 158272b676d7Smrg ;; 158372b676d7Smrg 158472b676d7Smrgnetbsdelf*-gnu) 158572b676d7Smrg version_type=linux 158672b676d7Smrg need_lib_prefix=no 158772b676d7Smrg need_version=no 158872b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 158972b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 159072b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 159172b676d7Smrg shlibpath_overrides_runpath=no 159272b676d7Smrg hardcode_into_libs=yes 159372b676d7Smrg dynamic_linker='NetBSD ld.elf_so' 159472b676d7Smrg ;; 159572b676d7Smrg 159672b676d7Smrgnetbsd*) 159772b676d7Smrg version_type=sunos 159872b676d7Smrg need_lib_prefix=no 159972b676d7Smrg need_version=no 160072b676d7Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 160172b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 160272b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 160372b676d7Smrg dynamic_linker='NetBSD (a.out) ld.so' 160472b676d7Smrg else 160572b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 160672b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 160772b676d7Smrg dynamic_linker='NetBSD ld.elf_so' 160872b676d7Smrg fi 160972b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 161072b676d7Smrg shlibpath_overrides_runpath=yes 161172b676d7Smrg hardcode_into_libs=yes 161272b676d7Smrg ;; 161372b676d7Smrg 161472b676d7Smrgnewsos6) 161572b676d7Smrg version_type=linux 161672b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 161772b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 161872b676d7Smrg shlibpath_overrides_runpath=yes 161972b676d7Smrg ;; 162072b676d7Smrg 162172b676d7Smrgnto-qnx*) 162272b676d7Smrg version_type=linux 162372b676d7Smrg need_lib_prefix=no 162472b676d7Smrg need_version=no 162572b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 162672b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 162772b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 162872b676d7Smrg shlibpath_overrides_runpath=yes 162972b676d7Smrg ;; 163072b676d7Smrg 163172b676d7Smrgopenbsd*) 163272b676d7Smrg version_type=sunos 163372b676d7Smrg sys_lib_dlsearch_path_spec="/usr/lib" 163472b676d7Smrg need_lib_prefix=no 163572b676d7Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 163672b676d7Smrg case $host_os in 163772b676d7Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 163872b676d7Smrg *) need_version=no ;; 163972b676d7Smrg esac 164072b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 164172b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 164272b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 164372b676d7Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 164472b676d7Smrg case $host_os in 164572b676d7Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 164672b676d7Smrg shlibpath_overrides_runpath=no 164772b676d7Smrg ;; 164872b676d7Smrg *) 164972b676d7Smrg shlibpath_overrides_runpath=yes 165072b676d7Smrg ;; 165172b676d7Smrg esac 165272b676d7Smrg else 165372b676d7Smrg shlibpath_overrides_runpath=yes 165472b676d7Smrg fi 165572b676d7Smrg ;; 165672b676d7Smrg 165772b676d7Smrgos2*) 165872b676d7Smrg libname_spec='$name' 165972b676d7Smrg shrext_cmds=".dll" 166072b676d7Smrg need_lib_prefix=no 166172b676d7Smrg library_names_spec='$libname${shared_ext} $libname.a' 166272b676d7Smrg dynamic_linker='OS/2 ld.exe' 166372b676d7Smrg shlibpath_var=LIBPATH 166472b676d7Smrg ;; 166572b676d7Smrg 166672b676d7Smrgosf3* | osf4* | osf5*) 166772b676d7Smrg version_type=osf 166872b676d7Smrg need_lib_prefix=no 166972b676d7Smrg need_version=no 167072b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 167172b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 167272b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 167372b676d7Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 167472b676d7Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 167572b676d7Smrg ;; 167672b676d7Smrg 167772b676d7Smrgsolaris*) 167872b676d7Smrg version_type=linux 167972b676d7Smrg need_lib_prefix=no 168072b676d7Smrg need_version=no 168172b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 168272b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 168372b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 168472b676d7Smrg shlibpath_overrides_runpath=yes 168572b676d7Smrg hardcode_into_libs=yes 168672b676d7Smrg # ldd complains unless libraries are executable 168772b676d7Smrg postinstall_cmds='chmod +x $lib' 168872b676d7Smrg ;; 168972b676d7Smrg 169072b676d7Smrgsunos4*) 169172b676d7Smrg version_type=sunos 169272b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 169372b676d7Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 169472b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 169572b676d7Smrg shlibpath_overrides_runpath=yes 169672b676d7Smrg if test "$with_gnu_ld" = yes; then 169772b676d7Smrg need_lib_prefix=no 169872b676d7Smrg fi 169972b676d7Smrg need_version=yes 170072b676d7Smrg ;; 170172b676d7Smrg 170272b676d7Smrgsysv4 | sysv4.3*) 170372b676d7Smrg version_type=linux 170472b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 170572b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 170672b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 170772b676d7Smrg case $host_vendor in 170872b676d7Smrg sni) 170972b676d7Smrg shlibpath_overrides_runpath=no 171072b676d7Smrg need_lib_prefix=no 171172b676d7Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 171272b676d7Smrg runpath_var=LD_RUN_PATH 171372b676d7Smrg ;; 171472b676d7Smrg siemens) 171572b676d7Smrg need_lib_prefix=no 171672b676d7Smrg ;; 171772b676d7Smrg motorola) 171872b676d7Smrg need_lib_prefix=no 171972b676d7Smrg need_version=no 172072b676d7Smrg shlibpath_overrides_runpath=no 172172b676d7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 172272b676d7Smrg ;; 172372b676d7Smrg esac 172472b676d7Smrg ;; 172572b676d7Smrg 172672b676d7Smrgsysv4*MP*) 172772b676d7Smrg if test -d /usr/nec ;then 172872b676d7Smrg version_type=linux 172972b676d7Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 173072b676d7Smrg soname_spec='$libname${shared_ext}.$major' 173172b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 173272b676d7Smrg fi 173372b676d7Smrg ;; 173472b676d7Smrg 173572b676d7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 173672b676d7Smrg version_type=freebsd-elf 173772b676d7Smrg need_lib_prefix=no 173872b676d7Smrg need_version=no 173972b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 174072b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 174172b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 174272b676d7Smrg hardcode_into_libs=yes 174372b676d7Smrg if test "$with_gnu_ld" = yes; then 174472b676d7Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 174572b676d7Smrg shlibpath_overrides_runpath=no 174672b676d7Smrg else 174772b676d7Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 174872b676d7Smrg shlibpath_overrides_runpath=yes 174972b676d7Smrg case $host_os in 175072b676d7Smrg sco3.2v5*) 175172b676d7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 175272b676d7Smrg ;; 175372b676d7Smrg esac 175472b676d7Smrg fi 175572b676d7Smrg sys_lib_dlsearch_path_spec='/usr/lib' 175672b676d7Smrg ;; 175772b676d7Smrg 175872b676d7Smrguts4*) 175972b676d7Smrg version_type=linux 176072b676d7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 176172b676d7Smrg soname_spec='${libname}${release}${shared_ext}$major' 176272b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 176372b676d7Smrg ;; 176472b676d7Smrg 176572b676d7Smrg*) 176672b676d7Smrg dynamic_linker=no 176772b676d7Smrg ;; 176872b676d7Smrgesac 176972b676d7SmrgAC_MSG_RESULT([$dynamic_linker]) 177072b676d7Smrgtest "$dynamic_linker" = no && can_build_shared=no 177172b676d7Smrg 177272b676d7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 177372b676d7Smrgif test "$GCC" = yes; then 177472b676d7Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 177572b676d7Smrgfi 177672b676d7Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 177772b676d7Smrg 177872b676d7Smrg 177972b676d7Smrg# _LT_AC_TAGCONFIG 178072b676d7Smrg# ---------------- 178172b676d7SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 178272b676d7Smrg[AC_ARG_WITH([tags], 178372b676d7Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 178472b676d7Smrg [include additional configurations @<:@automatic@:>@])], 178572b676d7Smrg [tagnames="$withval"]) 178672b676d7Smrg 178772b676d7Smrgif test -f "$ltmain" && test -n "$tagnames"; then 178872b676d7Smrg if test ! -f "${ofile}"; then 178972b676d7Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 179072b676d7Smrg fi 179172b676d7Smrg 179272b676d7Smrg if test -z "$LTCC"; then 179372b676d7Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 179472b676d7Smrg if test -z "$LTCC"; then 179572b676d7Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 179672b676d7Smrg else 179772b676d7Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 179872b676d7Smrg fi 179972b676d7Smrg fi 180072b676d7Smrg if test -z "$LTCFLAGS"; then 180172b676d7Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 180272b676d7Smrg fi 180372b676d7Smrg 180472b676d7Smrg # Extract list of available tagged configurations in $ofile. 180572b676d7Smrg # Note that this assumes the entire list is on one line. 180672b676d7Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 180772b676d7Smrg 180872b676d7Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 180972b676d7Smrg for tagname in $tagnames; do 181072b676d7Smrg IFS="$lt_save_ifs" 181172b676d7Smrg # Check whether tagname contains only valid characters 181272b676d7Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 181372b676d7Smrg "") ;; 181472b676d7Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 181572b676d7Smrg ;; 181672b676d7Smrg esac 181772b676d7Smrg 181872b676d7Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 181972b676d7Smrg then 182072b676d7Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 182172b676d7Smrg fi 182272b676d7Smrg 182372b676d7Smrg # Update the list of available tags. 182472b676d7Smrg if test -n "$tagname"; then 182572b676d7Smrg echo appending configuration tag \"$tagname\" to $ofile 182672b676d7Smrg 182772b676d7Smrg case $tagname in 182872b676d7Smrg CXX) 182972b676d7Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 183072b676d7Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 183172b676d7Smrg (test "X$CXX" != "Xg++"))) ; then 183272b676d7Smrg AC_LIBTOOL_LANG_CXX_CONFIG 183372b676d7Smrg else 183472b676d7Smrg tagname="" 183572b676d7Smrg fi 183672b676d7Smrg ;; 183772b676d7Smrg 183872b676d7Smrg F77) 183972b676d7Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 184072b676d7Smrg AC_LIBTOOL_LANG_F77_CONFIG 184172b676d7Smrg else 184272b676d7Smrg tagname="" 184372b676d7Smrg fi 184472b676d7Smrg ;; 184572b676d7Smrg 184672b676d7Smrg GCJ) 184772b676d7Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 184872b676d7Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 184972b676d7Smrg else 185072b676d7Smrg tagname="" 185172b676d7Smrg fi 185272b676d7Smrg ;; 185372b676d7Smrg 185472b676d7Smrg RC) 185572b676d7Smrg AC_LIBTOOL_LANG_RC_CONFIG 185672b676d7Smrg ;; 185772b676d7Smrg 185872b676d7Smrg *) 185972b676d7Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 186072b676d7Smrg ;; 186172b676d7Smrg esac 186272b676d7Smrg 186372b676d7Smrg # Append the new tag name to the list of available tags. 186472b676d7Smrg if test -n "$tagname" ; then 186572b676d7Smrg available_tags="$available_tags $tagname" 186672b676d7Smrg fi 186772b676d7Smrg fi 186872b676d7Smrg done 186972b676d7Smrg IFS="$lt_save_ifs" 187072b676d7Smrg 187172b676d7Smrg # Now substitute the updated list of available tags. 187272b676d7Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 187372b676d7Smrg mv "${ofile}T" "$ofile" 187472b676d7Smrg chmod +x "$ofile" 187572b676d7Smrg else 187672b676d7Smrg rm -f "${ofile}T" 187772b676d7Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 187872b676d7Smrg fi 187972b676d7Smrgfi 188072b676d7Smrg])# _LT_AC_TAGCONFIG 188172b676d7Smrg 188272b676d7Smrg 188372b676d7Smrg# AC_LIBTOOL_DLOPEN 188472b676d7Smrg# ----------------- 188572b676d7Smrg# enable checks for dlopen support 188672b676d7SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 188772b676d7Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 188872b676d7Smrg])# AC_LIBTOOL_DLOPEN 188972b676d7Smrg 189072b676d7Smrg 189172b676d7Smrg# AC_LIBTOOL_WIN32_DLL 189272b676d7Smrg# -------------------- 189372b676d7Smrg# declare package support for building win32 DLLs 189472b676d7SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 189572b676d7Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 189672b676d7Smrg])# AC_LIBTOOL_WIN32_DLL 189772b676d7Smrg 189872b676d7Smrg 189972b676d7Smrg# AC_ENABLE_SHARED([DEFAULT]) 190072b676d7Smrg# --------------------------- 190172b676d7Smrg# implement the --enable-shared flag 190272b676d7Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 190372b676d7SmrgAC_DEFUN([AC_ENABLE_SHARED], 190472b676d7Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 190572b676d7SmrgAC_ARG_ENABLE([shared], 190672b676d7Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 190772b676d7Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 190872b676d7Smrg [p=${PACKAGE-default} 190972b676d7Smrg case $enableval in 191072b676d7Smrg yes) enable_shared=yes ;; 191172b676d7Smrg no) enable_shared=no ;; 191272b676d7Smrg *) 191372b676d7Smrg enable_shared=no 191472b676d7Smrg # Look at the argument we got. We use all the common list separators. 191572b676d7Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 191672b676d7Smrg for pkg in $enableval; do 191772b676d7Smrg IFS="$lt_save_ifs" 191872b676d7Smrg if test "X$pkg" = "X$p"; then 191972b676d7Smrg enable_shared=yes 192072b676d7Smrg fi 192172b676d7Smrg done 192272b676d7Smrg IFS="$lt_save_ifs" 192372b676d7Smrg ;; 192472b676d7Smrg esac], 192572b676d7Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 192672b676d7Smrg])# AC_ENABLE_SHARED 192772b676d7Smrg 192872b676d7Smrg 192972b676d7Smrg# AC_DISABLE_SHARED 193072b676d7Smrg# ----------------- 193172b676d7Smrg# set the default shared flag to --disable-shared 193272b676d7SmrgAC_DEFUN([AC_DISABLE_SHARED], 193372b676d7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 193472b676d7SmrgAC_ENABLE_SHARED(no) 193572b676d7Smrg])# AC_DISABLE_SHARED 193672b676d7Smrg 193772b676d7Smrg 193872b676d7Smrg# AC_ENABLE_STATIC([DEFAULT]) 193972b676d7Smrg# --------------------------- 194072b676d7Smrg# implement the --enable-static flag 194172b676d7Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 194272b676d7SmrgAC_DEFUN([AC_ENABLE_STATIC], 194372b676d7Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 194472b676d7SmrgAC_ARG_ENABLE([static], 194572b676d7Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 194672b676d7Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 194772b676d7Smrg [p=${PACKAGE-default} 194872b676d7Smrg case $enableval in 194972b676d7Smrg yes) enable_static=yes ;; 195072b676d7Smrg no) enable_static=no ;; 195172b676d7Smrg *) 195272b676d7Smrg enable_static=no 195372b676d7Smrg # Look at the argument we got. We use all the common list separators. 195472b676d7Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 195572b676d7Smrg for pkg in $enableval; do 195672b676d7Smrg IFS="$lt_save_ifs" 195772b676d7Smrg if test "X$pkg" = "X$p"; then 195872b676d7Smrg enable_static=yes 195972b676d7Smrg fi 196072b676d7Smrg done 196172b676d7Smrg IFS="$lt_save_ifs" 196272b676d7Smrg ;; 196372b676d7Smrg esac], 196472b676d7Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 196572b676d7Smrg])# AC_ENABLE_STATIC 196672b676d7Smrg 196772b676d7Smrg 196872b676d7Smrg# AC_DISABLE_STATIC 196972b676d7Smrg# ----------------- 197072b676d7Smrg# set the default static flag to --disable-static 197172b676d7SmrgAC_DEFUN([AC_DISABLE_STATIC], 197272b676d7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 197372b676d7SmrgAC_ENABLE_STATIC(no) 197472b676d7Smrg])# AC_DISABLE_STATIC 197572b676d7Smrg 197672b676d7Smrg 197772b676d7Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 197872b676d7Smrg# --------------------------------- 197972b676d7Smrg# implement the --enable-fast-install flag 198072b676d7Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 198172b676d7SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 198272b676d7Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 198372b676d7SmrgAC_ARG_ENABLE([fast-install], 198472b676d7Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 198572b676d7Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 198672b676d7Smrg [p=${PACKAGE-default} 198772b676d7Smrg case $enableval in 198872b676d7Smrg yes) enable_fast_install=yes ;; 198972b676d7Smrg no) enable_fast_install=no ;; 199072b676d7Smrg *) 199172b676d7Smrg enable_fast_install=no 199272b676d7Smrg # Look at the argument we got. We use all the common list separators. 199372b676d7Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 199472b676d7Smrg for pkg in $enableval; do 199572b676d7Smrg IFS="$lt_save_ifs" 199672b676d7Smrg if test "X$pkg" = "X$p"; then 199772b676d7Smrg enable_fast_install=yes 199872b676d7Smrg fi 199972b676d7Smrg done 200072b676d7Smrg IFS="$lt_save_ifs" 200172b676d7Smrg ;; 200272b676d7Smrg esac], 200372b676d7Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 200472b676d7Smrg])# AC_ENABLE_FAST_INSTALL 200572b676d7Smrg 200672b676d7Smrg 200772b676d7Smrg# AC_DISABLE_FAST_INSTALL 200872b676d7Smrg# ----------------------- 200972b676d7Smrg# set the default to --disable-fast-install 201072b676d7SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 201172b676d7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 201272b676d7SmrgAC_ENABLE_FAST_INSTALL(no) 201372b676d7Smrg])# AC_DISABLE_FAST_INSTALL 201472b676d7Smrg 201572b676d7Smrg 201672b676d7Smrg# AC_LIBTOOL_PICMODE([MODE]) 201772b676d7Smrg# -------------------------- 201872b676d7Smrg# implement the --with-pic flag 201972b676d7Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 202072b676d7SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 202172b676d7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 202272b676d7Smrgpic_mode=ifelse($#,1,$1,default) 202372b676d7Smrg])# AC_LIBTOOL_PICMODE 202472b676d7Smrg 202572b676d7Smrg 202672b676d7Smrg# AC_PROG_EGREP 202772b676d7Smrg# ------------- 202872b676d7Smrg# This is predefined starting with Autoconf 2.54, so this conditional 202972b676d7Smrg# definition can be removed once we require Autoconf 2.54 or later. 203072b676d7Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 203172b676d7Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 203272b676d7Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 203372b676d7Smrg then ac_cv_prog_egrep='grep -E' 203472b676d7Smrg else ac_cv_prog_egrep='egrep' 203572b676d7Smrg fi]) 203672b676d7Smrg EGREP=$ac_cv_prog_egrep 203772b676d7Smrg AC_SUBST([EGREP]) 203872b676d7Smrg])]) 203972b676d7Smrg 204072b676d7Smrg 204172b676d7Smrg# AC_PATH_TOOL_PREFIX 204272b676d7Smrg# ------------------- 204372b676d7Smrg# find a file program which can recognise shared library 204472b676d7SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 204572b676d7Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 204672b676d7SmrgAC_MSG_CHECKING([for $1]) 204772b676d7SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 204872b676d7Smrg[case $MAGIC_CMD in 204972b676d7Smrg[[\\/*] | ?:[\\/]*]) 205072b676d7Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 205172b676d7Smrg ;; 205272b676d7Smrg*) 205372b676d7Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 205472b676d7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 205572b676d7Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 205672b676d7Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 205772b676d7Smrgdnl not every word. This closes a longstanding sh security hole. 205872b676d7Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 205972b676d7Smrg for ac_dir in $ac_dummy; do 206072b676d7Smrg IFS="$lt_save_ifs" 206172b676d7Smrg test -z "$ac_dir" && ac_dir=. 206272b676d7Smrg if test -f $ac_dir/$1; then 206372b676d7Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 206472b676d7Smrg if test -n "$file_magic_test_file"; then 206572b676d7Smrg case $deplibs_check_method in 206672b676d7Smrg "file_magic "*) 206772b676d7Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 206872b676d7Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 206972b676d7Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 207072b676d7Smrg $EGREP "$file_magic_regex" > /dev/null; then 207172b676d7Smrg : 207272b676d7Smrg else 207372b676d7Smrg cat <<EOF 1>&2 207472b676d7Smrg 207572b676d7Smrg*** Warning: the command libtool uses to detect shared libraries, 207672b676d7Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 207772b676d7Smrg*** The result is that libtool may fail to recognize shared libraries 207872b676d7Smrg*** as such. This will affect the creation of libtool libraries that 207972b676d7Smrg*** depend on shared libraries, but programs linked with such libtool 208072b676d7Smrg*** libraries will work regardless of this problem. Nevertheless, you 208172b676d7Smrg*** may want to report the problem to your system manager and/or to 208272b676d7Smrg*** bug-libtool@gnu.org 208372b676d7Smrg 208472b676d7SmrgEOF 208572b676d7Smrg fi ;; 208672b676d7Smrg esac 208772b676d7Smrg fi 208872b676d7Smrg break 208972b676d7Smrg fi 209072b676d7Smrg done 209172b676d7Smrg IFS="$lt_save_ifs" 209272b676d7Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 209372b676d7Smrg ;; 209472b676d7Smrgesac]) 209572b676d7SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 209672b676d7Smrgif test -n "$MAGIC_CMD"; then 209772b676d7Smrg AC_MSG_RESULT($MAGIC_CMD) 209872b676d7Smrgelse 209972b676d7Smrg AC_MSG_RESULT(no) 210072b676d7Smrgfi 210172b676d7Smrg])# AC_PATH_TOOL_PREFIX 210272b676d7Smrg 210372b676d7Smrg 210472b676d7Smrg# AC_PATH_MAGIC 210572b676d7Smrg# ------------- 210672b676d7Smrg# find a file program which can recognise a shared library 210772b676d7SmrgAC_DEFUN([AC_PATH_MAGIC], 210872b676d7Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 210972b676d7Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 211072b676d7Smrg if test -n "$ac_tool_prefix"; then 211172b676d7Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 211272b676d7Smrg else 211372b676d7Smrg MAGIC_CMD=: 211472b676d7Smrg fi 211572b676d7Smrgfi 211672b676d7Smrg])# AC_PATH_MAGIC 211772b676d7Smrg 211872b676d7Smrg 211972b676d7Smrg# AC_PROG_LD 212072b676d7Smrg# ---------- 212172b676d7Smrg# find the pathname to the GNU or non-GNU linker 212272b676d7SmrgAC_DEFUN([AC_PROG_LD], 212372b676d7Smrg[AC_ARG_WITH([gnu-ld], 212472b676d7Smrg [AC_HELP_STRING([--with-gnu-ld], 212572b676d7Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 212672b676d7Smrg [test "$withval" = no || with_gnu_ld=yes], 212772b676d7Smrg [with_gnu_ld=no]) 212872b676d7SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 212972b676d7SmrgAC_REQUIRE([AC_PROG_CC])dnl 213072b676d7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 213172b676d7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 213272b676d7Smrgac_prog=ld 213372b676d7Smrgif test "$GCC" = yes; then 213472b676d7Smrg # Check if gcc -print-prog-name=ld gives a path. 213572b676d7Smrg AC_MSG_CHECKING([for ld used by $CC]) 213672b676d7Smrg case $host in 213772b676d7Smrg *-*-mingw*) 213872b676d7Smrg # gcc leaves a trailing carriage return which upsets mingw 213972b676d7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 214072b676d7Smrg *) 214172b676d7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 214272b676d7Smrg esac 214372b676d7Smrg case $ac_prog in 214472b676d7Smrg # Accept absolute paths. 214572b676d7Smrg [[\\/]]* | ?:[[\\/]]*) 214672b676d7Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 214772b676d7Smrg # Canonicalize the pathname of ld 214872b676d7Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 214972b676d7Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 215072b676d7Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 215172b676d7Smrg done 215272b676d7Smrg test -z "$LD" && LD="$ac_prog" 215372b676d7Smrg ;; 215472b676d7Smrg "") 215572b676d7Smrg # If it fails, then pretend we aren't using GCC. 215672b676d7Smrg ac_prog=ld 215772b676d7Smrg ;; 215872b676d7Smrg *) 215972b676d7Smrg # If it is relative, then search for the first ld in PATH. 216072b676d7Smrg with_gnu_ld=unknown 216172b676d7Smrg ;; 216272b676d7Smrg esac 216372b676d7Smrgelif test "$with_gnu_ld" = yes; then 216472b676d7Smrg AC_MSG_CHECKING([for GNU ld]) 216572b676d7Smrgelse 216672b676d7Smrg AC_MSG_CHECKING([for non-GNU ld]) 216772b676d7Smrgfi 216872b676d7SmrgAC_CACHE_VAL(lt_cv_path_LD, 216972b676d7Smrg[if test -z "$LD"; then 217072b676d7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 217172b676d7Smrg for ac_dir in $PATH; do 217272b676d7Smrg IFS="$lt_save_ifs" 217372b676d7Smrg test -z "$ac_dir" && ac_dir=. 217472b676d7Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 217572b676d7Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 217672b676d7Smrg # Check to see if the program is GNU ld. I'd rather use --version, 217772b676d7Smrg # but apparently some variants of GNU ld only accept -v. 217872b676d7Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 217972b676d7Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 218072b676d7Smrg *GNU* | *'with BFD'*) 218172b676d7Smrg test "$with_gnu_ld" != no && break 218272b676d7Smrg ;; 218372b676d7Smrg *) 218472b676d7Smrg test "$with_gnu_ld" != yes && break 218572b676d7Smrg ;; 218672b676d7Smrg esac 218772b676d7Smrg fi 218872b676d7Smrg done 218972b676d7Smrg IFS="$lt_save_ifs" 219072b676d7Smrgelse 219172b676d7Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 219272b676d7Smrgfi]) 219372b676d7SmrgLD="$lt_cv_path_LD" 219472b676d7Smrgif test -n "$LD"; then 219572b676d7Smrg AC_MSG_RESULT($LD) 219672b676d7Smrgelse 219772b676d7Smrg AC_MSG_RESULT(no) 219872b676d7Smrgfi 219972b676d7Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 220072b676d7SmrgAC_PROG_LD_GNU 220172b676d7Smrg])# AC_PROG_LD 220272b676d7Smrg 220372b676d7Smrg 220472b676d7Smrg# AC_PROG_LD_GNU 220572b676d7Smrg# -------------- 220672b676d7SmrgAC_DEFUN([AC_PROG_LD_GNU], 220772b676d7Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 220872b676d7SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 220972b676d7Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 221072b676d7Smrgcase `$LD -v 2>&1 </dev/null` in 221172b676d7Smrg*GNU* | *'with BFD'*) 221272b676d7Smrg lt_cv_prog_gnu_ld=yes 221372b676d7Smrg ;; 221472b676d7Smrg*) 221572b676d7Smrg lt_cv_prog_gnu_ld=no 221672b676d7Smrg ;; 221772b676d7Smrgesac]) 221872b676d7Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 221972b676d7Smrg])# AC_PROG_LD_GNU 222072b676d7Smrg 222172b676d7Smrg 222272b676d7Smrg# AC_PROG_LD_RELOAD_FLAG 222372b676d7Smrg# ---------------------- 222472b676d7Smrg# find reload flag for linker 222572b676d7Smrg# -- PORTME Some linkers may need a different reload flag. 222672b676d7SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 222772b676d7Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 222872b676d7Smrg lt_cv_ld_reload_flag, 222972b676d7Smrg [lt_cv_ld_reload_flag='-r']) 223072b676d7Smrgreload_flag=$lt_cv_ld_reload_flag 223172b676d7Smrgcase $reload_flag in 223272b676d7Smrg"" | " "*) ;; 223372b676d7Smrg*) reload_flag=" $reload_flag" ;; 223472b676d7Smrgesac 223572b676d7Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 223672b676d7Smrgcase $host_os in 223772b676d7Smrg darwin*) 223872b676d7Smrg if test "$GCC" = yes; then 223972b676d7Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 224072b676d7Smrg else 224172b676d7Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 224272b676d7Smrg fi 224372b676d7Smrg ;; 224472b676d7Smrgesac 224572b676d7Smrg])# AC_PROG_LD_RELOAD_FLAG 224672b676d7Smrg 224772b676d7Smrg 224872b676d7Smrg# AC_DEPLIBS_CHECK_METHOD 224972b676d7Smrg# ----------------------- 225072b676d7Smrg# how to check for library dependencies 225172b676d7Smrg# -- PORTME fill in with the dynamic library characteristics 225272b676d7SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 225372b676d7Smrg[AC_CACHE_CHECK([how to recognise dependent libraries], 225472b676d7Smrglt_cv_deplibs_check_method, 225572b676d7Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 225672b676d7Smrglt_cv_file_magic_test_file= 225772b676d7Smrglt_cv_deplibs_check_method='unknown' 225872b676d7Smrg# Need to set the preceding variable on all platforms that support 225972b676d7Smrg# interlibrary dependencies. 226072b676d7Smrg# 'none' -- dependencies not supported. 226172b676d7Smrg# `unknown' -- same as none, but documents that we really don't know. 226272b676d7Smrg# 'pass_all' -- all dependencies passed with no checks. 226372b676d7Smrg# 'test_compile' -- check by making test program. 226472b676d7Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 226572b676d7Smrg# which responds to the $file_magic_cmd with a given extended regex. 226672b676d7Smrg# If you have `file' or equivalent on your system and you're not sure 226772b676d7Smrg# whether `pass_all' will *always* work, you probably want this one. 226872b676d7Smrg 226972b676d7Smrgcase $host_os in 227072b676d7Smrgaix4* | aix5*) 227172b676d7Smrg lt_cv_deplibs_check_method=pass_all 227272b676d7Smrg ;; 227372b676d7Smrg 227472b676d7Smrgbeos*) 227572b676d7Smrg lt_cv_deplibs_check_method=pass_all 227672b676d7Smrg ;; 227772b676d7Smrg 227872b676d7Smrgbsdi[[45]]*) 227972b676d7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 228072b676d7Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 228172b676d7Smrg lt_cv_file_magic_test_file=/shlib/libc.so 228272b676d7Smrg ;; 228372b676d7Smrg 228472b676d7Smrgcygwin*) 228572b676d7Smrg # func_win32_libid is a shell function defined in ltmain.sh 228672b676d7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 228772b676d7Smrg lt_cv_file_magic_cmd='func_win32_libid' 228872b676d7Smrg ;; 228972b676d7Smrg 229072b676d7Smrgmingw* | pw32*) 229172b676d7Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 229272b676d7Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump'. 229372b676d7Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 229472b676d7Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 229572b676d7Smrg ;; 229672b676d7Smrg 229772b676d7Smrgdarwin* | rhapsody*) 229872b676d7Smrg lt_cv_deplibs_check_method=pass_all 229972b676d7Smrg ;; 230072b676d7Smrg 230172b676d7Smrgfreebsd* | dragonfly*) 230272b676d7Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 230372b676d7Smrg case $host_cpu in 230472b676d7Smrg i*86 ) 230572b676d7Smrg # Not sure whether the presence of OpenBSD here was a mistake. 230672b676d7Smrg # Let's accept both of them until this is cleared up. 230772b676d7Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 230872b676d7Smrg lt_cv_file_magic_cmd=/usr/bin/file 230972b676d7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 231072b676d7Smrg ;; 231172b676d7Smrg esac 231272b676d7Smrg else 231372b676d7Smrg lt_cv_deplibs_check_method=pass_all 231472b676d7Smrg fi 231572b676d7Smrg ;; 231672b676d7Smrg 231772b676d7Smrggnu*) 231872b676d7Smrg lt_cv_deplibs_check_method=pass_all 231972b676d7Smrg ;; 232072b676d7Smrg 232172b676d7Smrghpux10.20* | hpux11*) 232272b676d7Smrg lt_cv_file_magic_cmd=/usr/bin/file 232372b676d7Smrg case $host_cpu in 232472b676d7Smrg ia64*) 232572b676d7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 232672b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 232772b676d7Smrg ;; 232872b676d7Smrg hppa*64*) 232972b676d7Smrg [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]'] 233072b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 233172b676d7Smrg ;; 233272b676d7Smrg *) 233372b676d7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 233472b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 233572b676d7Smrg ;; 233672b676d7Smrg esac 233772b676d7Smrg ;; 233872b676d7Smrg 233972b676d7Smrginterix3*) 234072b676d7Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 234172b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 234272b676d7Smrg ;; 234372b676d7Smrg 234472b676d7Smrgirix5* | irix6* | nonstopux*) 234572b676d7Smrg case $LD in 234672b676d7Smrg *-32|*"-32 ") libmagic=32-bit;; 234772b676d7Smrg *-n32|*"-n32 ") libmagic=N32;; 234872b676d7Smrg *-64|*"-64 ") libmagic=64-bit;; 234972b676d7Smrg *) libmagic=never-match;; 235072b676d7Smrg esac 235172b676d7Smrg lt_cv_deplibs_check_method=pass_all 235272b676d7Smrg ;; 235372b676d7Smrg 235472b676d7Smrg# This must be Linux ELF. 235572b676d7Smrglinux* | k*bsd*-gnu) 235672b676d7Smrg lt_cv_deplibs_check_method=pass_all 235772b676d7Smrg ;; 235872b676d7Smrg 235972b676d7Smrgnetbsd* | netbsdelf*-gnu) 236072b676d7Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 236172b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 236272b676d7Smrg else 236372b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 236472b676d7Smrg fi 236572b676d7Smrg ;; 236672b676d7Smrg 236772b676d7Smrgnewos6*) 236872b676d7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 236972b676d7Smrg lt_cv_file_magic_cmd=/usr/bin/file 237072b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 237172b676d7Smrg ;; 237272b676d7Smrg 237372b676d7Smrgnto-qnx*) 237472b676d7Smrg lt_cv_deplibs_check_method=unknown 237572b676d7Smrg ;; 237672b676d7Smrg 237772b676d7Smrgopenbsd*) 237872b676d7Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 237972b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 238072b676d7Smrg else 238172b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 238272b676d7Smrg fi 238372b676d7Smrg ;; 238472b676d7Smrg 238572b676d7Smrgosf3* | osf4* | osf5*) 238672b676d7Smrg lt_cv_deplibs_check_method=pass_all 238772b676d7Smrg ;; 238872b676d7Smrg 238972b676d7Smrgsolaris*) 239072b676d7Smrg lt_cv_deplibs_check_method=pass_all 239172b676d7Smrg ;; 239272b676d7Smrg 239372b676d7Smrgsysv4 | sysv4.3*) 239472b676d7Smrg case $host_vendor in 239572b676d7Smrg motorola) 239672b676d7Smrg 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]]' 239772b676d7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 239872b676d7Smrg ;; 239972b676d7Smrg ncr) 240072b676d7Smrg lt_cv_deplibs_check_method=pass_all 240172b676d7Smrg ;; 240272b676d7Smrg sequent) 240372b676d7Smrg lt_cv_file_magic_cmd='/bin/file' 240472b676d7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 240572b676d7Smrg ;; 240672b676d7Smrg sni) 240772b676d7Smrg lt_cv_file_magic_cmd='/bin/file' 240872b676d7Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 240972b676d7Smrg lt_cv_file_magic_test_file=/lib/libc.so 241072b676d7Smrg ;; 241172b676d7Smrg siemens) 241272b676d7Smrg lt_cv_deplibs_check_method=pass_all 241372b676d7Smrg ;; 241472b676d7Smrg pc) 241572b676d7Smrg lt_cv_deplibs_check_method=pass_all 241672b676d7Smrg ;; 241772b676d7Smrg esac 241872b676d7Smrg ;; 241972b676d7Smrg 242072b676d7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 242172b676d7Smrg lt_cv_deplibs_check_method=pass_all 242272b676d7Smrg ;; 242372b676d7Smrgesac 242472b676d7Smrg]) 242572b676d7Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 242672b676d7Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 242772b676d7Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 242872b676d7Smrg])# AC_DEPLIBS_CHECK_METHOD 242972b676d7Smrg 243072b676d7Smrg 243172b676d7Smrg# AC_PROG_NM 243272b676d7Smrg# ---------- 243372b676d7Smrg# find the pathname to a BSD-compatible name lister 243472b676d7SmrgAC_DEFUN([AC_PROG_NM], 243572b676d7Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 243672b676d7Smrg[if test -n "$NM"; then 243772b676d7Smrg # Let the user override the test. 243872b676d7Smrg lt_cv_path_NM="$NM" 243972b676d7Smrgelse 244072b676d7Smrg lt_nm_to_check="${ac_tool_prefix}nm" 244172b676d7Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 244272b676d7Smrg lt_nm_to_check="$lt_nm_to_check nm" 244372b676d7Smrg fi 244472b676d7Smrg for lt_tmp_nm in $lt_nm_to_check; do 244572b676d7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 244672b676d7Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 244772b676d7Smrg IFS="$lt_save_ifs" 244872b676d7Smrg test -z "$ac_dir" && ac_dir=. 244972b676d7Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 245072b676d7Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 245172b676d7Smrg # Check to see if the nm accepts a BSD-compat flag. 245272b676d7Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 245372b676d7Smrg # nm: unknown option "B" ignored 245472b676d7Smrg # Tru64's nm complains that /dev/null is an invalid object file 245572b676d7Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 245672b676d7Smrg */dev/null* | *'Invalid file or object type'*) 245772b676d7Smrg lt_cv_path_NM="$tmp_nm -B" 245872b676d7Smrg break 245972b676d7Smrg ;; 246072b676d7Smrg *) 246172b676d7Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 246272b676d7Smrg */dev/null*) 246372b676d7Smrg lt_cv_path_NM="$tmp_nm -p" 246472b676d7Smrg break 246572b676d7Smrg ;; 246672b676d7Smrg *) 246772b676d7Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 246872b676d7Smrg continue # so that we can try to find one that supports BSD flags 246972b676d7Smrg ;; 247072b676d7Smrg esac 247172b676d7Smrg ;; 247272b676d7Smrg esac 247372b676d7Smrg fi 247472b676d7Smrg done 247572b676d7Smrg IFS="$lt_save_ifs" 247672b676d7Smrg done 247772b676d7Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 247872b676d7Smrgfi]) 247972b676d7SmrgNM="$lt_cv_path_NM" 248072b676d7Smrg])# AC_PROG_NM 248172b676d7Smrg 248272b676d7Smrg 248372b676d7Smrg# AC_CHECK_LIBM 248472b676d7Smrg# ------------- 248572b676d7Smrg# check for math library 248672b676d7SmrgAC_DEFUN([AC_CHECK_LIBM], 248772b676d7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 248872b676d7SmrgLIBM= 248972b676d7Smrgcase $host in 249072b676d7Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 249172b676d7Smrg # These system don't have libm, or don't need it 249272b676d7Smrg ;; 249372b676d7Smrg*-ncr-sysv4.3*) 249472b676d7Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 249572b676d7Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 249672b676d7Smrg ;; 249772b676d7Smrg*) 249872b676d7Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 249972b676d7Smrg ;; 250072b676d7Smrgesac 250172b676d7Smrg])# AC_CHECK_LIBM 250272b676d7Smrg 250372b676d7Smrg 250472b676d7Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 250572b676d7Smrg# ----------------------------------- 250672b676d7Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 250772b676d7Smrg# LTDLINCL to the include flags for the libltdl header and adds 250872b676d7Smrg# --enable-ltdl-convenience to the configure arguments. Note that 250972b676d7Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 251072b676d7Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 251172b676d7Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 251272b676d7Smrg# (note the single quotes!). If your package is not flat and you're not 251372b676d7Smrg# using automake, define top_builddir and top_srcdir appropriately in 251472b676d7Smrg# the Makefiles. 251572b676d7SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 251672b676d7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 251772b676d7Smrg case $enable_ltdl_convenience in 251872b676d7Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 251972b676d7Smrg "") enable_ltdl_convenience=yes 252072b676d7Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 252172b676d7Smrg esac 252272b676d7Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 252372b676d7Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 252472b676d7Smrg # For backwards non-gettext consistent compatibility... 252572b676d7Smrg INCLTDL="$LTDLINCL" 252672b676d7Smrg])# AC_LIBLTDL_CONVENIENCE 252772b676d7Smrg 252872b676d7Smrg 252972b676d7Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 253072b676d7Smrg# ----------------------------------- 253172b676d7Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 253272b676d7Smrg# LTDLINCL to the include flags for the libltdl header and adds 253372b676d7Smrg# --enable-ltdl-install to the configure arguments. Note that 253472b676d7Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 253572b676d7Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 253672b676d7Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 253772b676d7Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 253872b676d7Smrg# flat and you're not using automake, define top_builddir and top_srcdir 253972b676d7Smrg# appropriately in the Makefiles. 254072b676d7Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 254172b676d7SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 254272b676d7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 254372b676d7Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 254472b676d7Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 254572b676d7Smrg [if test x"$enable_ltdl_install" = xno; then 254672b676d7Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 254772b676d7Smrg else 254872b676d7Smrg enable_ltdl_install=yes 254972b676d7Smrg fi 255072b676d7Smrg ]) 255172b676d7Smrg if test x"$enable_ltdl_install" = x"yes"; then 255272b676d7Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 255372b676d7Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 255472b676d7Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 255572b676d7Smrg else 255672b676d7Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 255772b676d7Smrg LIBLTDL="-lltdl" 255872b676d7Smrg LTDLINCL= 255972b676d7Smrg fi 256072b676d7Smrg # For backwards non-gettext consistent compatibility... 256172b676d7Smrg INCLTDL="$LTDLINCL" 256272b676d7Smrg])# AC_LIBLTDL_INSTALLABLE 256372b676d7Smrg 256472b676d7Smrg 256572b676d7Smrg# AC_LIBTOOL_CXX 256672b676d7Smrg# -------------- 256772b676d7Smrg# enable support for C++ libraries 256872b676d7SmrgAC_DEFUN([AC_LIBTOOL_CXX], 256972b676d7Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 257072b676d7Smrg])# AC_LIBTOOL_CXX 257172b676d7Smrg 257272b676d7Smrg 257372b676d7Smrg# _LT_AC_LANG_CXX 257472b676d7Smrg# --------------- 257572b676d7SmrgAC_DEFUN([_LT_AC_LANG_CXX], 257672b676d7Smrg[AC_REQUIRE([AC_PROG_CXX]) 257772b676d7SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 257872b676d7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 257972b676d7Smrg])# _LT_AC_LANG_CXX 258072b676d7Smrg 258172b676d7Smrg# _LT_AC_PROG_CXXCPP 258272b676d7Smrg# ------------------ 258372b676d7SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 258472b676d7Smrg[ 258572b676d7SmrgAC_REQUIRE([AC_PROG_CXX]) 258672b676d7Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 258772b676d7Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 258872b676d7Smrg (test "X$CXX" != "Xg++"))) ; then 258972b676d7Smrg AC_PROG_CXXCPP 259072b676d7Smrgfi 259172b676d7Smrg])# _LT_AC_PROG_CXXCPP 259272b676d7Smrg 259372b676d7Smrg# AC_LIBTOOL_F77 259472b676d7Smrg# -------------- 259572b676d7Smrg# enable support for Fortran 77 libraries 259672b676d7SmrgAC_DEFUN([AC_LIBTOOL_F77], 259772b676d7Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 259872b676d7Smrg])# AC_LIBTOOL_F77 259972b676d7Smrg 260072b676d7Smrg 260172b676d7Smrg# _LT_AC_LANG_F77 260272b676d7Smrg# --------------- 260372b676d7SmrgAC_DEFUN([_LT_AC_LANG_F77], 260472b676d7Smrg[AC_REQUIRE([AC_PROG_F77]) 260572b676d7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 260672b676d7Smrg])# _LT_AC_LANG_F77 260772b676d7Smrg 260872b676d7Smrg 260972b676d7Smrg# AC_LIBTOOL_GCJ 261072b676d7Smrg# -------------- 261172b676d7Smrg# enable support for GCJ libraries 261272b676d7SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 261372b676d7Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 261472b676d7Smrg])# AC_LIBTOOL_GCJ 261572b676d7Smrg 261672b676d7Smrg 261772b676d7Smrg# _LT_AC_LANG_GCJ 261872b676d7Smrg# --------------- 261972b676d7SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 262072b676d7Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 262172b676d7Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 262272b676d7Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 262372b676d7Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 262472b676d7Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 262572b676d7Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 262672b676d7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 262772b676d7Smrg])# _LT_AC_LANG_GCJ 262872b676d7Smrg 262972b676d7Smrg 263072b676d7Smrg# AC_LIBTOOL_RC 263172b676d7Smrg# ------------- 263272b676d7Smrg# enable support for Windows resource files 263372b676d7SmrgAC_DEFUN([AC_LIBTOOL_RC], 263472b676d7Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 263572b676d7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 263672b676d7Smrg])# AC_LIBTOOL_RC 263772b676d7Smrg 263872b676d7Smrg 263972b676d7Smrg# AC_LIBTOOL_LANG_C_CONFIG 264072b676d7Smrg# ------------------------ 264172b676d7Smrg# Ensure that the configuration vars for the C compiler are 264272b676d7Smrg# suitably defined. Those variables are subsequently used by 264372b676d7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 264472b676d7SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 264572b676d7SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 264672b676d7Smrg[lt_save_CC="$CC" 264772b676d7SmrgAC_LANG_PUSH(C) 264872b676d7Smrg 264972b676d7Smrg# Source file extension for C test sources. 265072b676d7Smrgac_ext=c 265172b676d7Smrg 265272b676d7Smrg# Object file extension for compiled C test sources. 265372b676d7Smrgobjext=o 265472b676d7Smrg_LT_AC_TAGVAR(objext, $1)=$objext 265572b676d7Smrg 265672b676d7Smrg# Code to be used in simple compile tests 265772b676d7Smrglt_simple_compile_test_code="int some_variable = 0;\n" 265872b676d7Smrg 265972b676d7Smrg# Code to be used in simple link tests 266072b676d7Smrglt_simple_link_test_code='int main(){return(0);}\n' 266172b676d7Smrg 266272b676d7Smrg_LT_AC_SYS_COMPILER 266372b676d7Smrg 266472b676d7Smrg# save warnings/boilerplate of simple test code 266572b676d7Smrg_LT_COMPILER_BOILERPLATE 266672b676d7Smrg_LT_LINKER_BOILERPLATE 266772b676d7Smrg 266872b676d7SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 266972b676d7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 267072b676d7SmrgAC_LIBTOOL_PROG_CC_C_O($1) 267172b676d7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 267272b676d7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 267372b676d7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 267472b676d7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 267572b676d7SmrgAC_LIBTOOL_SYS_LIB_STRIP 267672b676d7SmrgAC_LIBTOOL_DLOPEN_SELF 267772b676d7Smrg 267872b676d7Smrg# Report which library types will actually be built 267972b676d7SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 268072b676d7SmrgAC_MSG_RESULT([$can_build_shared]) 268172b676d7Smrg 268272b676d7SmrgAC_MSG_CHECKING([whether to build shared libraries]) 268372b676d7Smrgtest "$can_build_shared" = "no" && enable_shared=no 268472b676d7Smrg 268572b676d7Smrg# On AIX, shared libraries and static libraries use the same namespace, and 268672b676d7Smrg# are all built from PIC. 268772b676d7Smrgcase $host_os in 268872b676d7Smrgaix3*) 268972b676d7Smrg test "$enable_shared" = yes && enable_static=no 269072b676d7Smrg if test -n "$RANLIB"; then 269172b676d7Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 269272b676d7Smrg postinstall_cmds='$RANLIB $lib' 269372b676d7Smrg fi 269472b676d7Smrg ;; 269572b676d7Smrg 269672b676d7Smrgaix4* | aix5*) 269772b676d7Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 269872b676d7Smrg test "$enable_shared" = yes && enable_static=no 269972b676d7Smrg fi 270072b676d7Smrg ;; 270172b676d7Smrgesac 270272b676d7SmrgAC_MSG_RESULT([$enable_shared]) 270372b676d7Smrg 270472b676d7SmrgAC_MSG_CHECKING([whether to build static libraries]) 270572b676d7Smrg# Make sure either enable_shared or enable_static is yes. 270672b676d7Smrgtest "$enable_shared" = yes || enable_static=yes 270772b676d7SmrgAC_MSG_RESULT([$enable_static]) 270872b676d7Smrg 270972b676d7SmrgAC_LIBTOOL_CONFIG($1) 271072b676d7Smrg 271172b676d7SmrgAC_LANG_POP 271272b676d7SmrgCC="$lt_save_CC" 271372b676d7Smrg])# AC_LIBTOOL_LANG_C_CONFIG 271472b676d7Smrg 271572b676d7Smrg 271672b676d7Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 271772b676d7Smrg# -------------------------- 271872b676d7Smrg# Ensure that the configuration vars for the C compiler are 271972b676d7Smrg# suitably defined. Those variables are subsequently used by 272072b676d7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 272172b676d7SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 272272b676d7SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 272372b676d7Smrg[AC_LANG_PUSH(C++) 272472b676d7SmrgAC_REQUIRE([AC_PROG_CXX]) 272572b676d7SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 272672b676d7Smrg 272772b676d7Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 272872b676d7Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 272972b676d7Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 273072b676d7Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 273172b676d7Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 273272b676d7Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 273372b676d7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 273472b676d7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 273572b676d7Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 273672b676d7Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 273772b676d7Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 273872b676d7Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 273972b676d7Smrg_LT_AC_TAGVAR(module_cmds, $1)= 274072b676d7Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 274172b676d7Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 274272b676d7Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 274372b676d7Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 274472b676d7Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 274572b676d7Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 274672b676d7Smrg 274772b676d7Smrg# Dependencies to place before and after the object being linked: 274872b676d7Smrg_LT_AC_TAGVAR(predep_objects, $1)= 274972b676d7Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 275072b676d7Smrg_LT_AC_TAGVAR(predeps, $1)= 275172b676d7Smrg_LT_AC_TAGVAR(postdeps, $1)= 275272b676d7Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 275372b676d7Smrg 275472b676d7Smrg# Source file extension for C++ test sources. 275572b676d7Smrgac_ext=cpp 275672b676d7Smrg 275772b676d7Smrg# Object file extension for compiled C++ test sources. 275872b676d7Smrgobjext=o 275972b676d7Smrg_LT_AC_TAGVAR(objext, $1)=$objext 276072b676d7Smrg 276172b676d7Smrg# Code to be used in simple compile tests 276272b676d7Smrglt_simple_compile_test_code="int some_variable = 0;\n" 276372b676d7Smrg 276472b676d7Smrg# Code to be used in simple link tests 276572b676d7Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' 276672b676d7Smrg 276772b676d7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 276872b676d7Smrg_LT_AC_SYS_COMPILER 276972b676d7Smrg 277072b676d7Smrg# save warnings/boilerplate of simple test code 277172b676d7Smrg_LT_COMPILER_BOILERPLATE 277272b676d7Smrg_LT_LINKER_BOILERPLATE 277372b676d7Smrg 277472b676d7Smrg# Allow CC to be a program name with arguments. 277572b676d7Smrglt_save_CC=$CC 277672b676d7Smrglt_save_LD=$LD 277772b676d7Smrglt_save_GCC=$GCC 277872b676d7SmrgGCC=$GXX 277972b676d7Smrglt_save_with_gnu_ld=$with_gnu_ld 278072b676d7Smrglt_save_path_LD=$lt_cv_path_LD 278172b676d7Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 278272b676d7Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 278372b676d7Smrgelse 278472b676d7Smrg $as_unset lt_cv_prog_gnu_ld 278572b676d7Smrgfi 278672b676d7Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 278772b676d7Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 278872b676d7Smrgelse 278972b676d7Smrg $as_unset lt_cv_path_LD 279072b676d7Smrgfi 279172b676d7Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 279272b676d7SmrgCC=${CXX-"c++"} 279372b676d7Smrgcompiler=$CC 279472b676d7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 279572b676d7Smrg_LT_CC_BASENAME([$compiler]) 279672b676d7Smrg 279772b676d7Smrg# We don't want -fno-exception wen compiling C++ code, so set the 279872b676d7Smrg# no_builtin_flag separately 279972b676d7Smrgif test "$GXX" = yes; then 280072b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 280172b676d7Smrgelse 280272b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 280372b676d7Smrgfi 280472b676d7Smrg 280572b676d7Smrgif test "$GXX" = yes; then 280672b676d7Smrg # Set up default GNU C++ configuration 280772b676d7Smrg 280872b676d7Smrg AC_PROG_LD 280972b676d7Smrg 281072b676d7Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 281172b676d7Smrg # archiving commands below assume that GNU ld is being used. 281272b676d7Smrg if test "$with_gnu_ld" = yes; then 281372b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 281472b676d7Smrg _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' 281572b676d7Smrg 281672b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 281772b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 281872b676d7Smrg 281972b676d7Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 282072b676d7Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 282172b676d7Smrg # investigate it a little bit more. (MM) 282272b676d7Smrg wlarc='${wl}' 282372b676d7Smrg 282472b676d7Smrg # ancient GNU ld didn't support --whole-archive et. al. 282572b676d7Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 282672b676d7Smrg grep 'no-whole-archive' > /dev/null; then 282772b676d7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 282872b676d7Smrg else 282972b676d7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 283072b676d7Smrg fi 283172b676d7Smrg else 283272b676d7Smrg with_gnu_ld=no 283372b676d7Smrg wlarc= 283472b676d7Smrg 283572b676d7Smrg # A generic and very simple default shared library creation 283672b676d7Smrg # command for GNU C++ for the case where it uses the native 283772b676d7Smrg # linker, instead of GNU ld. If possible, this setting should 283872b676d7Smrg # overridden to take advantage of the native linker features on 283972b676d7Smrg # the platform it is being used on. 284072b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 284172b676d7Smrg fi 284272b676d7Smrg 284372b676d7Smrg # Commands to make compiler produce verbose output that lists 284472b676d7Smrg # what "hidden" libraries, object files and flags are used when 284572b676d7Smrg # linking a shared library. 284672b676d7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 284772b676d7Smrg 284872b676d7Smrgelse 284972b676d7Smrg GXX=no 285072b676d7Smrg with_gnu_ld=no 285172b676d7Smrg wlarc= 285272b676d7Smrgfi 285372b676d7Smrg 285472b676d7Smrg# PORTME: fill in a description of your system's C++ link characteristics 285572b676d7SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 285672b676d7Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 285772b676d7Smrgcase $host_os in 285872b676d7Smrg aix3*) 285972b676d7Smrg # FIXME: insert proper C++ library support 286072b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 286172b676d7Smrg ;; 286272b676d7Smrg aix4* | aix5*) 286372b676d7Smrg if test "$host_cpu" = ia64; then 286472b676d7Smrg # On IA64, the linker does run time linking by default, so we don't 286572b676d7Smrg # have to do anything special. 286672b676d7Smrg aix_use_runtimelinking=no 286772b676d7Smrg exp_sym_flag='-Bexport' 286872b676d7Smrg no_entry_flag="" 286972b676d7Smrg else 287072b676d7Smrg aix_use_runtimelinking=no 287172b676d7Smrg 287272b676d7Smrg # Test if we are trying to use run time linking or normal 287372b676d7Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 287472b676d7Smrg # need to do runtime linking. 287572b676d7Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 287672b676d7Smrg for ld_flag in $LDFLAGS; do 287772b676d7Smrg case $ld_flag in 287872b676d7Smrg *-brtl*) 287972b676d7Smrg aix_use_runtimelinking=yes 288072b676d7Smrg break 288172b676d7Smrg ;; 288272b676d7Smrg esac 288372b676d7Smrg done 288472b676d7Smrg ;; 288572b676d7Smrg esac 288672b676d7Smrg 288772b676d7Smrg exp_sym_flag='-bexport' 288872b676d7Smrg no_entry_flag='-bnoentry' 288972b676d7Smrg fi 289072b676d7Smrg 289172b676d7Smrg # When large executables or shared objects are built, AIX ld can 289272b676d7Smrg # have problems creating the table of contents. If linking a library 289372b676d7Smrg # or program results in "error TOC overflow" add -mminimal-toc to 289472b676d7Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 289572b676d7Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 289672b676d7Smrg 289772b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 289872b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 289972b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 290072b676d7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 290172b676d7Smrg 290272b676d7Smrg if test "$GXX" = yes; then 290372b676d7Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 290472b676d7Smrg # We only want to do this on AIX 4.2 and lower, the check 290572b676d7Smrg # below for broken collect2 doesn't work under 4.3+ 290672b676d7Smrg collect2name=`${CC} -print-prog-name=collect2` 290772b676d7Smrg if test -f "$collect2name" && \ 290872b676d7Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 290972b676d7Smrg then 291072b676d7Smrg # We have reworked collect2 291172b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 291272b676d7Smrg else 291372b676d7Smrg # We have old collect2 291472b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 291572b676d7Smrg # It fails to find uninstalled libraries when the uninstalled 291672b676d7Smrg # path is not listed in the libpath. Setting hardcode_minus_L 291772b676d7Smrg # to unsupported forces relinking 291872b676d7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 291972b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 292072b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 292172b676d7Smrg fi 292272b676d7Smrg ;; 292372b676d7Smrg esac 292472b676d7Smrg shared_flag='-shared' 292572b676d7Smrg if test "$aix_use_runtimelinking" = yes; then 292672b676d7Smrg shared_flag="$shared_flag "'${wl}-G' 292772b676d7Smrg fi 292872b676d7Smrg else 292972b676d7Smrg # not using gcc 293072b676d7Smrg if test "$host_cpu" = ia64; then 293172b676d7Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 293272b676d7Smrg # chokes on -Wl,-G. The following line is correct: 293372b676d7Smrg shared_flag='-G' 293472b676d7Smrg else 293572b676d7Smrg if test "$aix_use_runtimelinking" = yes; then 293672b676d7Smrg shared_flag='${wl}-G' 293772b676d7Smrg else 293872b676d7Smrg shared_flag='${wl}-bM:SRE' 293972b676d7Smrg fi 294072b676d7Smrg fi 294172b676d7Smrg fi 294272b676d7Smrg 294372b676d7Smrg # It seems that -bexpall does not export symbols beginning with 294472b676d7Smrg # underscore (_), so it is better to generate a list of symbols to export. 294572b676d7Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 294672b676d7Smrg if test "$aix_use_runtimelinking" = yes; then 294772b676d7Smrg # Warning - without using the other runtime loading flags (-brtl), 294872b676d7Smrg # -berok will link without error, but may produce a broken library. 294972b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 295072b676d7Smrg # Determine the default libpath from the value encoded in an empty executable. 295172b676d7Smrg _LT_AC_SYS_LIBPATH_AIX 295272b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 295372b676d7Smrg 295472b676d7Smrg _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" 295572b676d7Smrg else 295672b676d7Smrg if test "$host_cpu" = ia64; then 295772b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 295872b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 295972b676d7Smrg _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" 296072b676d7Smrg else 296172b676d7Smrg # Determine the default libpath from the value encoded in an empty executable. 296272b676d7Smrg _LT_AC_SYS_LIBPATH_AIX 296372b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 296472b676d7Smrg # Warning - without using the other run time loading flags, 296572b676d7Smrg # -berok will link without error, but may produce a broken library. 296672b676d7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 296772b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 296872b676d7Smrg # Exported symbols can be pulled into shared objects from archives 296972b676d7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 297072b676d7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 297172b676d7Smrg # This is similar to how AIX traditionally builds its shared libraries. 297272b676d7Smrg _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' 297372b676d7Smrg fi 297472b676d7Smrg fi 297572b676d7Smrg ;; 297672b676d7Smrg 297772b676d7Smrg beos*) 297872b676d7Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 297972b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 298072b676d7Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 298172b676d7Smrg # support --undefined. This deserves some investigation. FIXME 298272b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 298372b676d7Smrg else 298472b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 298572b676d7Smrg fi 298672b676d7Smrg ;; 298772b676d7Smrg 298872b676d7Smrg chorus*) 298972b676d7Smrg case $cc_basename in 299072b676d7Smrg *) 299172b676d7Smrg # FIXME: insert proper C++ library support 299272b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 299372b676d7Smrg ;; 299472b676d7Smrg esac 299572b676d7Smrg ;; 299672b676d7Smrg 299772b676d7Smrg cygwin* | mingw* | pw32*) 299872b676d7Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 299972b676d7Smrg # as there is no search path for DLLs. 300072b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 300172b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 300272b676d7Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 300372b676d7Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 300472b676d7Smrg 300572b676d7Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 300672b676d7Smrg _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' 300772b676d7Smrg # If the export-symbols file already is a .def file (1st line 300872b676d7Smrg # is EXPORTS), use it as is; otherwise, prepend... 300972b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 301072b676d7Smrg cp $export_symbols $output_objdir/$soname.def; 301172b676d7Smrg else 301272b676d7Smrg echo EXPORTS > $output_objdir/$soname.def; 301372b676d7Smrg cat $export_symbols >> $output_objdir/$soname.def; 301472b676d7Smrg fi~ 301572b676d7Smrg $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' 301672b676d7Smrg else 301772b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 301872b676d7Smrg fi 301972b676d7Smrg ;; 302072b676d7Smrg darwin* | rhapsody*) 302172b676d7Smrg case $host_os in 302272b676d7Smrg rhapsody* | darwin1.[[012]]) 302372b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 302472b676d7Smrg ;; 302572b676d7Smrg *) # Darwin 1.3 on 302672b676d7Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 302772b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 302872b676d7Smrg else 302972b676d7Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 303072b676d7Smrg 10.[[012]]) 303172b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 303272b676d7Smrg ;; 303372b676d7Smrg 10.*) 303472b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 303572b676d7Smrg ;; 303672b676d7Smrg esac 303772b676d7Smrg fi 303872b676d7Smrg ;; 303972b676d7Smrg esac 304072b676d7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 304172b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 304272b676d7Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 304372b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 304472b676d7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 304572b676d7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 304672b676d7Smrg 304772b676d7Smrg if test "$GXX" = yes ; then 304872b676d7Smrg lt_int_apple_cc_single_mod=no 304972b676d7Smrg output_verbose_link_cmd='echo' 305072b676d7Smrg if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 305172b676d7Smrg lt_int_apple_cc_single_mod=yes 305272b676d7Smrg fi 305372b676d7Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 305472b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 305572b676d7Smrg else 305672b676d7Smrg _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' 305772b676d7Smrg fi 305872b676d7Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 305972b676d7Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 306072b676d7Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 306172b676d7Smrg _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}' 306272b676d7Smrg else 306372b676d7Smrg _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}' 306472b676d7Smrg fi 306572b676d7Smrg _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}' 306672b676d7Smrg else 306772b676d7Smrg case $cc_basename in 306872b676d7Smrg xlc*) 306972b676d7Smrg output_verbose_link_cmd='echo' 307072b676d7Smrg _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' 307172b676d7Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 307272b676d7Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 307372b676d7Smrg _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}' 307472b676d7Smrg _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}' 307572b676d7Smrg ;; 307672b676d7Smrg *) 307772b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 307872b676d7Smrg ;; 307972b676d7Smrg esac 308072b676d7Smrg fi 308172b676d7Smrg ;; 308272b676d7Smrg 308372b676d7Smrg dgux*) 308472b676d7Smrg case $cc_basename in 308572b676d7Smrg ec++*) 308672b676d7Smrg # FIXME: insert proper C++ library support 308772b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 308872b676d7Smrg ;; 308972b676d7Smrg ghcx*) 309072b676d7Smrg # Green Hills C++ Compiler 309172b676d7Smrg # FIXME: insert proper C++ library support 309272b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 309372b676d7Smrg ;; 309472b676d7Smrg *) 309572b676d7Smrg # FIXME: insert proper C++ library support 309672b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 309772b676d7Smrg ;; 309872b676d7Smrg esac 309972b676d7Smrg ;; 310072b676d7Smrg freebsd[[12]]*) 310172b676d7Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 310272b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 310372b676d7Smrg ;; 310472b676d7Smrg freebsd-elf*) 310572b676d7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 310672b676d7Smrg ;; 310772b676d7Smrg freebsd* | dragonfly*) 310872b676d7Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 310972b676d7Smrg # conventions 311072b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 311172b676d7Smrg ;; 311272b676d7Smrg gnu*) 311372b676d7Smrg ;; 311472b676d7Smrg hpux9*) 311572b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 311672b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 311772b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 311872b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 311972b676d7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 312072b676d7Smrg # but as the default 312172b676d7Smrg # location of the library. 312272b676d7Smrg 312372b676d7Smrg case $cc_basename in 312472b676d7Smrg CC*) 312572b676d7Smrg # FIXME: insert proper C++ library support 312672b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 312772b676d7Smrg ;; 312872b676d7Smrg aCC*) 312972b676d7Smrg _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' 313072b676d7Smrg # Commands to make compiler produce verbose output that lists 313172b676d7Smrg # what "hidden" libraries, object files and flags are used when 313272b676d7Smrg # linking a shared library. 313372b676d7Smrg # 313472b676d7Smrg # There doesn't appear to be a way to prevent this compiler from 313572b676d7Smrg # explicitly linking system object files so we need to strip them 313672b676d7Smrg # from the output so that they don't get included in the library 313772b676d7Smrg # dependencies. 313872b676d7Smrg 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' 313972b676d7Smrg ;; 314072b676d7Smrg *) 314172b676d7Smrg if test "$GXX" = yes; then 314272b676d7Smrg _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' 314372b676d7Smrg else 314472b676d7Smrg # FIXME: insert proper C++ library support 314572b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 314672b676d7Smrg fi 314772b676d7Smrg ;; 314872b676d7Smrg esac 314972b676d7Smrg ;; 315072b676d7Smrg hpux10*|hpux11*) 315172b676d7Smrg if test $with_gnu_ld = no; then 315272b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 315372b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 315472b676d7Smrg 315572b676d7Smrg case $host_cpu in 315672b676d7Smrg hppa*64*|ia64*) 315772b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 315872b676d7Smrg ;; 315972b676d7Smrg *) 316072b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 316172b676d7Smrg ;; 316272b676d7Smrg esac 316372b676d7Smrg fi 316472b676d7Smrg case $host_cpu in 316572b676d7Smrg hppa*64*|ia64*) 316672b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 316772b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 316872b676d7Smrg ;; 316972b676d7Smrg *) 317072b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 317172b676d7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 317272b676d7Smrg # but as the default 317372b676d7Smrg # location of the library. 317472b676d7Smrg ;; 317572b676d7Smrg esac 317672b676d7Smrg 317772b676d7Smrg case $cc_basename in 317872b676d7Smrg CC*) 317972b676d7Smrg # FIXME: insert proper C++ library support 318072b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 318172b676d7Smrg ;; 318272b676d7Smrg aCC*) 318372b676d7Smrg case $host_cpu in 318472b676d7Smrg hppa*64*) 318572b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 318672b676d7Smrg ;; 318772b676d7Smrg ia64*) 318872b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 318972b676d7Smrg ;; 319072b676d7Smrg *) 319172b676d7Smrg _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' 319272b676d7Smrg ;; 319372b676d7Smrg esac 319472b676d7Smrg # Commands to make compiler produce verbose output that lists 319572b676d7Smrg # what "hidden" libraries, object files and flags are used when 319672b676d7Smrg # linking a shared library. 319772b676d7Smrg # 319872b676d7Smrg # There doesn't appear to be a way to prevent this compiler from 319972b676d7Smrg # explicitly linking system object files so we need to strip them 320072b676d7Smrg # from the output so that they don't get included in the library 320172b676d7Smrg # dependencies. 320272b676d7Smrg 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' 320372b676d7Smrg ;; 320472b676d7Smrg *) 320572b676d7Smrg if test "$GXX" = yes; then 320672b676d7Smrg if test $with_gnu_ld = no; then 320772b676d7Smrg case $host_cpu in 320872b676d7Smrg hppa*64*) 320972b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 321072b676d7Smrg ;; 321172b676d7Smrg ia64*) 321272b676d7Smrg _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' 321372b676d7Smrg ;; 321472b676d7Smrg *) 321572b676d7Smrg _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' 321672b676d7Smrg ;; 321772b676d7Smrg esac 321872b676d7Smrg fi 321972b676d7Smrg else 322072b676d7Smrg # FIXME: insert proper C++ library support 322172b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 322272b676d7Smrg fi 322372b676d7Smrg ;; 322472b676d7Smrg esac 322572b676d7Smrg ;; 322672b676d7Smrg interix3*) 322772b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 322872b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 322972b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 323072b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 323172b676d7Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 323272b676d7Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 323372b676d7Smrg # default) and relocated if they conflict, which is a slow very memory 323472b676d7Smrg # consuming and fragmenting process. To avoid this, we pick a random, 323572b676d7Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 323672b676d7Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 323772b676d7Smrg _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' 323872b676d7Smrg _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' 323972b676d7Smrg ;; 324072b676d7Smrg irix5* | irix6*) 324172b676d7Smrg case $cc_basename in 324272b676d7Smrg CC*) 324372b676d7Smrg # SGI C++ 324472b676d7Smrg _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' 324572b676d7Smrg 324672b676d7Smrg # Archives containing C++ object files must be created using 324772b676d7Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 324872b676d7Smrg # necessary to make sure instantiated templates are included 324972b676d7Smrg # in the archive. 325072b676d7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 325172b676d7Smrg ;; 325272b676d7Smrg *) 325372b676d7Smrg if test "$GXX" = yes; then 325472b676d7Smrg if test "$with_gnu_ld" = no; then 325572b676d7Smrg _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' 325672b676d7Smrg else 325772b676d7Smrg _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' 325872b676d7Smrg fi 325972b676d7Smrg fi 326072b676d7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 326172b676d7Smrg ;; 326272b676d7Smrg esac 326372b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 326472b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 326572b676d7Smrg ;; 326672b676d7Smrg linux* | k*bsd*-gnu) 326772b676d7Smrg case $cc_basename in 326872b676d7Smrg KCC*) 326972b676d7Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 327072b676d7Smrg 327172b676d7Smrg # KCC will only create a shared library if the output file 327272b676d7Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 327372b676d7Smrg # to its proper name (with version) after linking. 327472b676d7Smrg _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' 327572b676d7Smrg _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' 327672b676d7Smrg # Commands to make compiler produce verbose output that lists 327772b676d7Smrg # what "hidden" libraries, object files and flags are used when 327872b676d7Smrg # linking a shared library. 327972b676d7Smrg # 328072b676d7Smrg # There doesn't appear to be a way to prevent this compiler from 328172b676d7Smrg # explicitly linking system object files so we need to strip them 328272b676d7Smrg # from the output so that they don't get included in the library 328372b676d7Smrg # dependencies. 328472b676d7Smrg 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' 328572b676d7Smrg 328672b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 328772b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 328872b676d7Smrg 328972b676d7Smrg # Archives containing C++ object files must be created using 329072b676d7Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 329172b676d7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 329272b676d7Smrg ;; 329372b676d7Smrg icpc*) 329472b676d7Smrg # Intel C++ 329572b676d7Smrg with_gnu_ld=yes 329672b676d7Smrg # version 8.0 and above of icpc choke on multiply defined symbols 329772b676d7Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 329872b676d7Smrg # earlier do not add the objects themselves. 329972b676d7Smrg case `$CC -V 2>&1` in 330072b676d7Smrg *"Version 7."*) 330172b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 330272b676d7Smrg _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' 330372b676d7Smrg ;; 330472b676d7Smrg *) # Version 8.0 or newer 330572b676d7Smrg tmp_idyn= 330672b676d7Smrg case $host_cpu in 330772b676d7Smrg ia64*) tmp_idyn=' -i_dynamic';; 330872b676d7Smrg esac 330972b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 331072b676d7Smrg _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' 331172b676d7Smrg ;; 331272b676d7Smrg esac 331372b676d7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 331472b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 331572b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 331672b676d7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 331772b676d7Smrg ;; 331872b676d7Smrg pgCC*) 331972b676d7Smrg # Portland Group C++ compiler 332072b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 332172b676d7Smrg _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' 332272b676d7Smrg 332372b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 332472b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 332572b676d7Smrg _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' 332672b676d7Smrg ;; 332772b676d7Smrg cxx*) 332872b676d7Smrg # Compaq C++ 332972b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 333072b676d7Smrg _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' 333172b676d7Smrg 333272b676d7Smrg runpath_var=LD_RUN_PATH 333372b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 333472b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 333572b676d7Smrg 333672b676d7Smrg # Commands to make compiler produce verbose output that lists 333772b676d7Smrg # what "hidden" libraries, object files and flags are used when 333872b676d7Smrg # linking a shared library. 333972b676d7Smrg # 334072b676d7Smrg # There doesn't appear to be a way to prevent this compiler from 334172b676d7Smrg # explicitly linking system object files so we need to strip them 334272b676d7Smrg # from the output so that they don't get included in the library 334372b676d7Smrg # dependencies. 334472b676d7Smrg 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' 334572b676d7Smrg ;; 334672b676d7Smrg esac 334772b676d7Smrg ;; 334872b676d7Smrg lynxos*) 334972b676d7Smrg # FIXME: insert proper C++ library support 335072b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 335172b676d7Smrg ;; 335272b676d7Smrg m88k*) 335372b676d7Smrg # FIXME: insert proper C++ library support 335472b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 335572b676d7Smrg ;; 335672b676d7Smrg mvs*) 335772b676d7Smrg case $cc_basename in 335872b676d7Smrg cxx*) 335972b676d7Smrg # FIXME: insert proper C++ library support 336072b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 336172b676d7Smrg ;; 336272b676d7Smrg *) 336372b676d7Smrg # FIXME: insert proper C++ library support 336472b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 336572b676d7Smrg ;; 336672b676d7Smrg esac 336772b676d7Smrg ;; 336872b676d7Smrg netbsd* | netbsdelf*-gnu) 336972b676d7Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 337072b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 337172b676d7Smrg wlarc= 337272b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 337372b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 337472b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 337572b676d7Smrg fi 337672b676d7Smrg # Workaround some broken pre-1.5 toolchains 337772b676d7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 337872b676d7Smrg ;; 337972b676d7Smrg openbsd2*) 338072b676d7Smrg # C++ shared libraries are fairly broken 338172b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 338272b676d7Smrg ;; 338372b676d7Smrg openbsd*) 338472b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 338572b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 338672b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 338772b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 338872b676d7Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 338972b676d7Smrg _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' 339072b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 339172b676d7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 339272b676d7Smrg fi 339372b676d7Smrg output_verbose_link_cmd='echo' 339472b676d7Smrg ;; 339572b676d7Smrg osf3*) 339672b676d7Smrg case $cc_basename in 339772b676d7Smrg KCC*) 339872b676d7Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 339972b676d7Smrg 340072b676d7Smrg # KCC will only create a shared library if the output file 340172b676d7Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 340272b676d7Smrg # to its proper name (with version) after linking. 340372b676d7Smrg _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' 340472b676d7Smrg 340572b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 340672b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 340772b676d7Smrg 340872b676d7Smrg # Archives containing C++ object files must be created using 340972b676d7Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 341072b676d7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 341172b676d7Smrg 341272b676d7Smrg ;; 341372b676d7Smrg RCC*) 341472b676d7Smrg # Rational C++ 2.4.1 341572b676d7Smrg # FIXME: insert proper C++ library support 341672b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 341772b676d7Smrg ;; 341872b676d7Smrg cxx*) 341972b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 342072b676d7Smrg _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' 342172b676d7Smrg 342272b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 342372b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 342472b676d7Smrg 342572b676d7Smrg # Commands to make compiler produce verbose output that lists 342672b676d7Smrg # what "hidden" libraries, object files and flags are used when 342772b676d7Smrg # linking a shared library. 342872b676d7Smrg # 342972b676d7Smrg # There doesn't appear to be a way to prevent this compiler from 343072b676d7Smrg # explicitly linking system object files so we need to strip them 343172b676d7Smrg # from the output so that they don't get included in the library 343272b676d7Smrg # dependencies. 343372b676d7Smrg 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' 343472b676d7Smrg ;; 343572b676d7Smrg *) 343672b676d7Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 343772b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 343872b676d7Smrg _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' 343972b676d7Smrg 344072b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 344172b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 344272b676d7Smrg 344372b676d7Smrg # Commands to make compiler produce verbose output that lists 344472b676d7Smrg # what "hidden" libraries, object files and flags are used when 344572b676d7Smrg # linking a shared library. 344672b676d7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 344772b676d7Smrg 344872b676d7Smrg else 344972b676d7Smrg # FIXME: insert proper C++ library support 345072b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 345172b676d7Smrg fi 345272b676d7Smrg ;; 345372b676d7Smrg esac 345472b676d7Smrg ;; 345572b676d7Smrg osf4* | osf5*) 345672b676d7Smrg case $cc_basename in 345772b676d7Smrg KCC*) 345872b676d7Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 345972b676d7Smrg 346072b676d7Smrg # KCC will only create a shared library if the output file 346172b676d7Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 346272b676d7Smrg # to its proper name (with version) after linking. 346372b676d7Smrg _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' 346472b676d7Smrg 346572b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 346672b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 346772b676d7Smrg 346872b676d7Smrg # Archives containing C++ object files must be created using 346972b676d7Smrg # the KAI C++ compiler. 347072b676d7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 347172b676d7Smrg ;; 347272b676d7Smrg RCC*) 347372b676d7Smrg # Rational C++ 2.4.1 347472b676d7Smrg # FIXME: insert proper C++ library support 347572b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 347672b676d7Smrg ;; 347772b676d7Smrg cxx*) 347872b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 347972b676d7Smrg _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' 348072b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 348172b676d7Smrg echo "-hidden">> $lib.exp~ 348272b676d7Smrg $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~ 348372b676d7Smrg $rm $lib.exp' 348472b676d7Smrg 348572b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 348672b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 348772b676d7Smrg 348872b676d7Smrg # Commands to make compiler produce verbose output that lists 348972b676d7Smrg # what "hidden" libraries, object files and flags are used when 349072b676d7Smrg # linking a shared library. 349172b676d7Smrg # 349272b676d7Smrg # There doesn't appear to be a way to prevent this compiler from 349372b676d7Smrg # explicitly linking system object files so we need to strip them 349472b676d7Smrg # from the output so that they don't get included in the library 349572b676d7Smrg # dependencies. 349672b676d7Smrg 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' 349772b676d7Smrg ;; 349872b676d7Smrg *) 349972b676d7Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 350072b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 350172b676d7Smrg _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' 350272b676d7Smrg 350372b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 350472b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 350572b676d7Smrg 350672b676d7Smrg # Commands to make compiler produce verbose output that lists 350772b676d7Smrg # what "hidden" libraries, object files and flags are used when 350872b676d7Smrg # linking a shared library. 350972b676d7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 351072b676d7Smrg 351172b676d7Smrg else 351272b676d7Smrg # FIXME: insert proper C++ library support 351372b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 351472b676d7Smrg fi 351572b676d7Smrg ;; 351672b676d7Smrg esac 351772b676d7Smrg ;; 351872b676d7Smrg psos*) 351972b676d7Smrg # FIXME: insert proper C++ library support 352072b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 352172b676d7Smrg ;; 352272b676d7Smrg sunos4*) 352372b676d7Smrg case $cc_basename in 352472b676d7Smrg CC*) 352572b676d7Smrg # Sun C++ 4.x 352672b676d7Smrg # FIXME: insert proper C++ library support 352772b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 352872b676d7Smrg ;; 352972b676d7Smrg lcc*) 353072b676d7Smrg # Lucid 353172b676d7Smrg # FIXME: insert proper C++ library support 353272b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 353372b676d7Smrg ;; 353472b676d7Smrg *) 353572b676d7Smrg # FIXME: insert proper C++ library support 353672b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 353772b676d7Smrg ;; 353872b676d7Smrg esac 353972b676d7Smrg ;; 354072b676d7Smrg solaris*) 354172b676d7Smrg case $cc_basename in 354272b676d7Smrg CC*) 354372b676d7Smrg # Sun C++ 4.2, 5.x and Centerline C++ 354472b676d7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 354572b676d7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 354672b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 354772b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 354872b676d7Smrg $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' 354972b676d7Smrg 355072b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 355172b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 355272b676d7Smrg case $host_os in 355372b676d7Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 355472b676d7Smrg *) 355572b676d7Smrg # The C++ compiler is used as linker so we must use $wl 355672b676d7Smrg # flag to pass the commands to the underlying system 355772b676d7Smrg # linker. We must also pass each convience library through 355872b676d7Smrg # to the system linker between allextract/defaultextract. 355972b676d7Smrg # The C++ compiler will combine linker options so we 356072b676d7Smrg # cannot just pass the convience library names through 356172b676d7Smrg # without $wl. 356272b676d7Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 356372b676d7Smrg _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' 356472b676d7Smrg ;; 356572b676d7Smrg esac 356672b676d7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 356772b676d7Smrg 356872b676d7Smrg output_verbose_link_cmd='echo' 356972b676d7Smrg 357072b676d7Smrg # Archives containing C++ object files must be created using 357172b676d7Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 357272b676d7Smrg # necessary to make sure instantiated templates are included 357372b676d7Smrg # in the archive. 357472b676d7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 357572b676d7Smrg ;; 357672b676d7Smrg gcx*) 357772b676d7Smrg # Green Hills C++ Compiler 357872b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 357972b676d7Smrg 358072b676d7Smrg # The C++ compiler must be used to create the archive. 358172b676d7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 358272b676d7Smrg ;; 358372b676d7Smrg *) 358472b676d7Smrg # GNU C++ compiler with Solaris linker 358572b676d7Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 358672b676d7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 358772b676d7Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 358872b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 358972b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 359072b676d7Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 359172b676d7Smrg 359272b676d7Smrg # Commands to make compiler produce verbose output that lists 359372b676d7Smrg # what "hidden" libraries, object files and flags are used when 359472b676d7Smrg # linking a shared library. 359572b676d7Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 359672b676d7Smrg else 359772b676d7Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 359872b676d7Smrg # platform. 359972b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 360072b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 360172b676d7Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 360272b676d7Smrg 360372b676d7Smrg # Commands to make compiler produce verbose output that lists 360472b676d7Smrg # what "hidden" libraries, object files and flags are used when 360572b676d7Smrg # linking a shared library. 360672b676d7Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 360772b676d7Smrg fi 360872b676d7Smrg 360972b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 361072b676d7Smrg fi 361172b676d7Smrg ;; 361272b676d7Smrg esac 361372b676d7Smrg ;; 361472b676d7Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 361572b676d7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 361672b676d7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 361772b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 361872b676d7Smrg runpath_var='LD_RUN_PATH' 361972b676d7Smrg 362072b676d7Smrg case $cc_basename in 362172b676d7Smrg CC*) 362272b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 362372b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 362472b676d7Smrg ;; 362572b676d7Smrg *) 362672b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 362772b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 362872b676d7Smrg ;; 362972b676d7Smrg esac 363072b676d7Smrg ;; 363172b676d7Smrg sysv5* | sco3.2v5* | sco5v6*) 363272b676d7Smrg # Note: We can NOT use -z defs as we might desire, because we do not 363372b676d7Smrg # link with -lc, and that would cause any symbols used from libc to 363472b676d7Smrg # always be unresolved, which means just about no library would 363572b676d7Smrg # ever link correctly. If we're not using GNU ld we use -z text 363672b676d7Smrg # though, which does catch some bad symbols but isn't as heavy-handed 363772b676d7Smrg # as -z defs. 363872b676d7Smrg # For security reasons, it is highly recommended that you always 363972b676d7Smrg # use absolute paths for naming shared libraries, and exclude the 364072b676d7Smrg # DT_RUNPATH tag from executables and libraries. But doing so 364172b676d7Smrg # requires that you compile everything twice, which is a pain. 364272b676d7Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 364372b676d7Smrg # non-empty value in the environment. Most likely only useful for 364472b676d7Smrg # creating official distributions of packages. 364572b676d7Smrg # This is a hack until libtool officially supports absolute path 364672b676d7Smrg # names for shared libraries. 364772b676d7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 364872b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 364972b676d7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 365072b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 365172b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 365272b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 365372b676d7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 365472b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 365572b676d7Smrg runpath_var='LD_RUN_PATH' 365672b676d7Smrg 365772b676d7Smrg case $cc_basename in 365872b676d7Smrg CC*) 365972b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 366072b676d7Smrg _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' 366172b676d7Smrg ;; 366272b676d7Smrg *) 366372b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 366472b676d7Smrg _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' 366572b676d7Smrg ;; 366672b676d7Smrg esac 366772b676d7Smrg ;; 366872b676d7Smrg tandem*) 366972b676d7Smrg case $cc_basename in 367072b676d7Smrg NCC*) 367172b676d7Smrg # NonStop-UX NCC 3.20 367272b676d7Smrg # FIXME: insert proper C++ library support 367372b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 367472b676d7Smrg ;; 367572b676d7Smrg *) 367672b676d7Smrg # FIXME: insert proper C++ library support 367772b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 367872b676d7Smrg ;; 367972b676d7Smrg esac 368072b676d7Smrg ;; 368172b676d7Smrg vxworks*) 368272b676d7Smrg # FIXME: insert proper C++ library support 368372b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 368472b676d7Smrg ;; 368572b676d7Smrg *) 368672b676d7Smrg # FIXME: insert proper C++ library support 368772b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 368872b676d7Smrg ;; 368972b676d7Smrgesac 369072b676d7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 369172b676d7Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 369272b676d7Smrg 369372b676d7Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 369472b676d7Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 369572b676d7Smrg 369672b676d7SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 369772b676d7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 369872b676d7SmrgAC_LIBTOOL_PROG_CC_C_O($1) 369972b676d7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 370072b676d7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 370172b676d7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 370272b676d7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 370372b676d7Smrg 370472b676d7SmrgAC_LIBTOOL_CONFIG($1) 370572b676d7Smrg 370672b676d7SmrgAC_LANG_POP 370772b676d7SmrgCC=$lt_save_CC 370872b676d7SmrgLDCXX=$LD 370972b676d7SmrgLD=$lt_save_LD 371072b676d7SmrgGCC=$lt_save_GCC 371172b676d7Smrgwith_gnu_ldcxx=$with_gnu_ld 371272b676d7Smrgwith_gnu_ld=$lt_save_with_gnu_ld 371372b676d7Smrglt_cv_path_LDCXX=$lt_cv_path_LD 371472b676d7Smrglt_cv_path_LD=$lt_save_path_LD 371572b676d7Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 371672b676d7Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 371772b676d7Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 371872b676d7Smrg 371972b676d7Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 372072b676d7Smrg# ------------------------------------ 372172b676d7Smrg# Figure out "hidden" library dependencies from verbose 372272b676d7Smrg# compiler output when linking a shared library. 372372b676d7Smrg# Parse the compiler output and extract the necessary 372472b676d7Smrg# objects, libraries and library flags. 372572b676d7SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 372672b676d7Smrgdnl we can't use the lt_simple_compile_test_code here, 372772b676d7Smrgdnl because it contains code intended for an executable, 372872b676d7Smrgdnl not a library. It's possible we should let each 372972b676d7Smrgdnl tag define a new lt_????_link_test_code variable, 373072b676d7Smrgdnl but it's only used here... 373172b676d7Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 373272b676d7Smrgint a; 373372b676d7Smrgvoid foo (void) { a = 0; } 373472b676d7SmrgEOF 373572b676d7Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 373672b676d7Smrgclass Foo 373772b676d7Smrg{ 373872b676d7Smrgpublic: 373972b676d7Smrg Foo (void) { a = 0; } 374072b676d7Smrgprivate: 374172b676d7Smrg int a; 374272b676d7Smrg}; 374372b676d7SmrgEOF 374472b676d7Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 374572b676d7Smrg subroutine foo 374672b676d7Smrg implicit none 374772b676d7Smrg integer*4 a 374872b676d7Smrg a=0 374972b676d7Smrg return 375072b676d7Smrg end 375172b676d7SmrgEOF 375272b676d7Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 375372b676d7Smrgpublic class foo { 375472b676d7Smrg private int a; 375572b676d7Smrg public void bar (void) { 375672b676d7Smrg a = 0; 375772b676d7Smrg } 375872b676d7Smrg}; 375972b676d7SmrgEOF 376072b676d7Smrg]) 376172b676d7Smrgdnl Parse the compiler output and extract the necessary 376272b676d7Smrgdnl objects, libraries and library flags. 376372b676d7Smrgif AC_TRY_EVAL(ac_compile); then 376472b676d7Smrg # Parse the compiler output and extract the necessary 376572b676d7Smrg # objects, libraries and library flags. 376672b676d7Smrg 376772b676d7Smrg # Sentinel used to keep track of whether or not we are before 376872b676d7Smrg # the conftest object file. 376972b676d7Smrg pre_test_object_deps_done=no 377072b676d7Smrg 377172b676d7Smrg # The `*' in the case matches for architectures that use `case' in 377272b676d7Smrg # $output_verbose_cmd can trigger glob expansion during the loop 377372b676d7Smrg # eval without this substitution. 377472b676d7Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 377572b676d7Smrg 377672b676d7Smrg for p in `eval $output_verbose_link_cmd`; do 377772b676d7Smrg case $p in 377872b676d7Smrg 377972b676d7Smrg -L* | -R* | -l*) 378072b676d7Smrg # Some compilers place space between "-{L,R}" and the path. 378172b676d7Smrg # Remove the space. 378272b676d7Smrg if test $p = "-L" \ 378372b676d7Smrg || test $p = "-R"; then 378472b676d7Smrg prev=$p 378572b676d7Smrg continue 378672b676d7Smrg else 378772b676d7Smrg prev= 378872b676d7Smrg fi 378972b676d7Smrg 379072b676d7Smrg if test "$pre_test_object_deps_done" = no; then 379172b676d7Smrg case $p in 379272b676d7Smrg -L* | -R*) 379372b676d7Smrg # Internal compiler library paths should come after those 379472b676d7Smrg # provided the user. The postdeps already come after the 379572b676d7Smrg # user supplied libs so there is no need to process them. 379672b676d7Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 379772b676d7Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 379872b676d7Smrg else 379972b676d7Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 380072b676d7Smrg fi 380172b676d7Smrg ;; 380272b676d7Smrg # The "-l" case would never come before the object being 380372b676d7Smrg # linked, so don't bother handling this case. 380472b676d7Smrg esac 380572b676d7Smrg else 380672b676d7Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 380772b676d7Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 380872b676d7Smrg else 380972b676d7Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 381072b676d7Smrg fi 381172b676d7Smrg fi 381272b676d7Smrg ;; 381372b676d7Smrg 381472b676d7Smrg *.$objext) 381572b676d7Smrg # This assumes that the test object file only shows up 381672b676d7Smrg # once in the compiler output. 381772b676d7Smrg if test "$p" = "conftest.$objext"; then 381872b676d7Smrg pre_test_object_deps_done=yes 381972b676d7Smrg continue 382072b676d7Smrg fi 382172b676d7Smrg 382272b676d7Smrg if test "$pre_test_object_deps_done" = no; then 382372b676d7Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 382472b676d7Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 382572b676d7Smrg else 382672b676d7Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 382772b676d7Smrg fi 382872b676d7Smrg else 382972b676d7Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 383072b676d7Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 383172b676d7Smrg else 383272b676d7Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 383372b676d7Smrg fi 383472b676d7Smrg fi 383572b676d7Smrg ;; 383672b676d7Smrg 383772b676d7Smrg *) ;; # Ignore the rest. 383872b676d7Smrg 383972b676d7Smrg esac 384072b676d7Smrg done 384172b676d7Smrg 384272b676d7Smrg # Clean up. 384372b676d7Smrg rm -f a.out a.exe 384472b676d7Smrgelse 384572b676d7Smrg echo "libtool.m4: error: problem compiling $1 test program" 384672b676d7Smrgfi 384772b676d7Smrg 384872b676d7Smrg$rm -f confest.$objext 384972b676d7Smrg 385072b676d7Smrg# PORTME: override above test on systems where it is broken 385172b676d7Smrgifelse([$1],[CXX], 385272b676d7Smrg[case $host_os in 385372b676d7Smrginterix3*) 385472b676d7Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 385572b676d7Smrg # hack all around it, let's just trust "g++" to DTRT. 385672b676d7Smrg _LT_AC_TAGVAR(predep_objects,$1)= 385772b676d7Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 385872b676d7Smrg _LT_AC_TAGVAR(postdeps,$1)= 385972b676d7Smrg ;; 386072b676d7Smrg 386172b676d7Smrgsolaris*) 386272b676d7Smrg case $cc_basename in 386372b676d7Smrg CC*) 386472b676d7Smrg # Adding this requires a known-good setup of shared libraries for 386572b676d7Smrg # Sun compiler versions before 5.6, else PIC objects from an old 386672b676d7Smrg # archive will be linked into the output, leading to subtle bugs. 386772b676d7Smrg _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 386872b676d7Smrg ;; 386972b676d7Smrg esac 387072b676d7Smrg ;; 387172b676d7Smrgesac 387272b676d7Smrg]) 387372b676d7Smrg 387472b676d7Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 387572b676d7Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 387672b676d7Smrgesac 387772b676d7Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 387872b676d7Smrg 387972b676d7Smrg# AC_LIBTOOL_LANG_F77_CONFIG 388072b676d7Smrg# -------------------------- 388172b676d7Smrg# Ensure that the configuration vars for the C compiler are 388272b676d7Smrg# suitably defined. Those variables are subsequently used by 388372b676d7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 388472b676d7SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 388572b676d7SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 388672b676d7Smrg[AC_REQUIRE([AC_PROG_F77]) 388772b676d7SmrgAC_LANG_PUSH(Fortran 77) 388872b676d7Smrg 388972b676d7Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 389072b676d7Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 389172b676d7Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 389272b676d7Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 389372b676d7Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 389472b676d7Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 389572b676d7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 389672b676d7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 389772b676d7Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 389872b676d7Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 389972b676d7Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 390072b676d7Smrg_LT_AC_TAGVAR(module_cmds, $1)= 390172b676d7Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 390272b676d7Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 390372b676d7Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 390472b676d7Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 390572b676d7Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 390672b676d7Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 390772b676d7Smrg 390872b676d7Smrg# Source file extension for f77 test sources. 390972b676d7Smrgac_ext=f 391072b676d7Smrg 391172b676d7Smrg# Object file extension for compiled f77 test sources. 391272b676d7Smrgobjext=o 391372b676d7Smrg_LT_AC_TAGVAR(objext, $1)=$objext 391472b676d7Smrg 391572b676d7Smrg# Code to be used in simple compile tests 391672b676d7Smrglt_simple_compile_test_code=" subroutine t\n return\n end\n" 391772b676d7Smrg 391872b676d7Smrg# Code to be used in simple link tests 391972b676d7Smrglt_simple_link_test_code=" program t\n end\n" 392072b676d7Smrg 392172b676d7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 392272b676d7Smrg_LT_AC_SYS_COMPILER 392372b676d7Smrg 392472b676d7Smrg# save warnings/boilerplate of simple test code 392572b676d7Smrg_LT_COMPILER_BOILERPLATE 392672b676d7Smrg_LT_LINKER_BOILERPLATE 392772b676d7Smrg 392872b676d7Smrg# Allow CC to be a program name with arguments. 392972b676d7Smrglt_save_CC="$CC" 393072b676d7SmrgCC=${F77-"f77"} 393172b676d7Smrgcompiler=$CC 393272b676d7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 393372b676d7Smrg_LT_CC_BASENAME([$compiler]) 393472b676d7Smrg 393572b676d7SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 393672b676d7SmrgAC_MSG_RESULT([$can_build_shared]) 393772b676d7Smrg 393872b676d7SmrgAC_MSG_CHECKING([whether to build shared libraries]) 393972b676d7Smrgtest "$can_build_shared" = "no" && enable_shared=no 394072b676d7Smrg 394172b676d7Smrg# On AIX, shared libraries and static libraries use the same namespace, and 394272b676d7Smrg# are all built from PIC. 394372b676d7Smrgcase $host_os in 394472b676d7Smrgaix3*) 394572b676d7Smrg test "$enable_shared" = yes && enable_static=no 394672b676d7Smrg if test -n "$RANLIB"; then 394772b676d7Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 394872b676d7Smrg postinstall_cmds='$RANLIB $lib' 394972b676d7Smrg fi 395072b676d7Smrg ;; 395172b676d7Smrgaix4* | aix5*) 395272b676d7Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 395372b676d7Smrg test "$enable_shared" = yes && enable_static=no 395472b676d7Smrg fi 395572b676d7Smrg ;; 395672b676d7Smrgesac 395772b676d7SmrgAC_MSG_RESULT([$enable_shared]) 395872b676d7Smrg 395972b676d7SmrgAC_MSG_CHECKING([whether to build static libraries]) 396072b676d7Smrg# Make sure either enable_shared or enable_static is yes. 396172b676d7Smrgtest "$enable_shared" = yes || enable_static=yes 396272b676d7SmrgAC_MSG_RESULT([$enable_static]) 396372b676d7Smrg 396472b676d7Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 396572b676d7Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 396672b676d7Smrg 396772b676d7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 396872b676d7SmrgAC_LIBTOOL_PROG_CC_C_O($1) 396972b676d7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 397072b676d7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 397172b676d7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 397272b676d7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 397372b676d7Smrg 397472b676d7SmrgAC_LIBTOOL_CONFIG($1) 397572b676d7Smrg 397672b676d7SmrgAC_LANG_POP 397772b676d7SmrgCC="$lt_save_CC" 397872b676d7Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 397972b676d7Smrg 398072b676d7Smrg 398172b676d7Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 398272b676d7Smrg# -------------------------- 398372b676d7Smrg# Ensure that the configuration vars for the C compiler are 398472b676d7Smrg# suitably defined. Those variables are subsequently used by 398572b676d7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 398672b676d7SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 398772b676d7SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 398872b676d7Smrg[AC_LANG_SAVE 398972b676d7Smrg 399072b676d7Smrg# Source file extension for Java test sources. 399172b676d7Smrgac_ext=java 399272b676d7Smrg 399372b676d7Smrg# Object file extension for compiled Java test sources. 399472b676d7Smrgobjext=o 399572b676d7Smrg_LT_AC_TAGVAR(objext, $1)=$objext 399672b676d7Smrg 399772b676d7Smrg# Code to be used in simple compile tests 399872b676d7Smrglt_simple_compile_test_code="class foo {}\n" 399972b676d7Smrg 400072b676d7Smrg# Code to be used in simple link tests 400172b676d7Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 400272b676d7Smrg 400372b676d7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 400472b676d7Smrg_LT_AC_SYS_COMPILER 400572b676d7Smrg 400672b676d7Smrg# save warnings/boilerplate of simple test code 400772b676d7Smrg_LT_COMPILER_BOILERPLATE 400872b676d7Smrg_LT_LINKER_BOILERPLATE 400972b676d7Smrg 401072b676d7Smrg# Allow CC to be a program name with arguments. 401172b676d7Smrglt_save_CC="$CC" 401272b676d7SmrgCC=${GCJ-"gcj"} 401372b676d7Smrgcompiler=$CC 401472b676d7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 401572b676d7Smrg_LT_CC_BASENAME([$compiler]) 401672b676d7Smrg 401772b676d7Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 401872b676d7Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 401972b676d7Smrg 402072b676d7Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 402172b676d7Smrg 402272b676d7SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 402372b676d7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 402472b676d7SmrgAC_LIBTOOL_PROG_CC_C_O($1) 402572b676d7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 402672b676d7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 402772b676d7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 402872b676d7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 402972b676d7Smrg 403072b676d7SmrgAC_LIBTOOL_CONFIG($1) 403172b676d7Smrg 403272b676d7SmrgAC_LANG_RESTORE 403372b676d7SmrgCC="$lt_save_CC" 403472b676d7Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 403572b676d7Smrg 403672b676d7Smrg 403772b676d7Smrg# AC_LIBTOOL_LANG_RC_CONFIG 403872b676d7Smrg# ------------------------- 403972b676d7Smrg# Ensure that the configuration vars for the Windows resource compiler are 404072b676d7Smrg# suitably defined. Those variables are subsequently used by 404172b676d7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 404272b676d7SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 404372b676d7SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 404472b676d7Smrg[AC_LANG_SAVE 404572b676d7Smrg 404672b676d7Smrg# Source file extension for RC test sources. 404772b676d7Smrgac_ext=rc 404872b676d7Smrg 404972b676d7Smrg# Object file extension for compiled RC test sources. 405072b676d7Smrgobjext=o 405172b676d7Smrg_LT_AC_TAGVAR(objext, $1)=$objext 405272b676d7Smrg 405372b676d7Smrg# Code to be used in simple compile tests 405472b676d7Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 405572b676d7Smrg 405672b676d7Smrg# Code to be used in simple link tests 405772b676d7Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 405872b676d7Smrg 405972b676d7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 406072b676d7Smrg_LT_AC_SYS_COMPILER 406172b676d7Smrg 406272b676d7Smrg# save warnings/boilerplate of simple test code 406372b676d7Smrg_LT_COMPILER_BOILERPLATE 406472b676d7Smrg_LT_LINKER_BOILERPLATE 406572b676d7Smrg 406672b676d7Smrg# Allow CC to be a program name with arguments. 406772b676d7Smrglt_save_CC="$CC" 406872b676d7SmrgCC=${RC-"windres"} 406972b676d7Smrgcompiler=$CC 407072b676d7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 407172b676d7Smrg_LT_CC_BASENAME([$compiler]) 407272b676d7Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 407372b676d7Smrg 407472b676d7SmrgAC_LIBTOOL_CONFIG($1) 407572b676d7Smrg 407672b676d7SmrgAC_LANG_RESTORE 407772b676d7SmrgCC="$lt_save_CC" 407872b676d7Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 407972b676d7Smrg 408072b676d7Smrg 408172b676d7Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 408272b676d7Smrg# ---------------------------- 408372b676d7Smrg# If TAGNAME is not passed, then create an initial libtool script 408472b676d7Smrg# with a default configuration from the untagged config vars. Otherwise 408572b676d7Smrg# add code to config.status for appending the configuration named by 408672b676d7Smrg# TAGNAME from the matching tagged config vars. 408772b676d7SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 408872b676d7Smrg[# The else clause should only fire when bootstrapping the 408972b676d7Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 409072b676d7Smrg# with your package, and you will get complaints that there are 409172b676d7Smrg# no rules to generate ltmain.sh. 409272b676d7Smrgif test -f "$ltmain"; then 409372b676d7Smrg # See if we are running on zsh, and set the options which allow our commands through 409472b676d7Smrg # without removal of \ escapes. 409572b676d7Smrg if test -n "${ZSH_VERSION+set}" ; then 409672b676d7Smrg setopt NO_GLOB_SUBST 409772b676d7Smrg fi 409872b676d7Smrg # Now quote all the things that may contain metacharacters while being 409972b676d7Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 410072b676d7Smrg # variables and quote the copies for generation of the libtool script. 410172b676d7Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 410272b676d7Smrg SED SHELL STRIP \ 410372b676d7Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 410472b676d7Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 410572b676d7Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 410672b676d7Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 410772b676d7Smrg lt_cv_sys_global_symbol_to_c_name_address \ 410872b676d7Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 410972b676d7Smrg old_postinstall_cmds old_postuninstall_cmds \ 411072b676d7Smrg _LT_AC_TAGVAR(compiler, $1) \ 411172b676d7Smrg _LT_AC_TAGVAR(CC, $1) \ 411272b676d7Smrg _LT_AC_TAGVAR(LD, $1) \ 411372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 411472b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 411572b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 411672b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 411772b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 411872b676d7Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 411972b676d7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 412072b676d7Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 412172b676d7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 412272b676d7Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 412372b676d7Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 412472b676d7Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 412572b676d7Smrg _LT_AC_TAGVAR(predeps, $1) \ 412672b676d7Smrg _LT_AC_TAGVAR(postdeps, $1) \ 412772b676d7Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 412872b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 412972b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 413072b676d7Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 413172b676d7Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 413272b676d7Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 413372b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 413472b676d7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 413572b676d7Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 413672b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 413772b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 413872b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 413972b676d7Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 414072b676d7Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 414172b676d7Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 414272b676d7Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 414372b676d7Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 414472b676d7Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 414572b676d7Smrg 414672b676d7Smrg case $var in 414772b676d7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 414872b676d7Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 414972b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 415072b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 415172b676d7Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 415272b676d7Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 415372b676d7Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 415472b676d7Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 415572b676d7Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 415672b676d7Smrg postinstall_cmds | postuninstall_cmds | \ 415772b676d7Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 415872b676d7Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 415972b676d7Smrg # Double-quote double-evaled strings. 416072b676d7Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 416172b676d7Smrg ;; 416272b676d7Smrg *) 416372b676d7Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 416472b676d7Smrg ;; 416572b676d7Smrg esac 416672b676d7Smrg done 416772b676d7Smrg 416872b676d7Smrg case $lt_echo in 416972b676d7Smrg *'\[$]0 --fallback-echo"') 417072b676d7Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 417172b676d7Smrg ;; 417272b676d7Smrg esac 417372b676d7Smrg 417472b676d7Smrgifelse([$1], [], 417572b676d7Smrg [cfgfile="${ofile}T" 417672b676d7Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 417772b676d7Smrg $rm -f "$cfgfile" 417872b676d7Smrg AC_MSG_NOTICE([creating $ofile])], 417972b676d7Smrg [cfgfile="$ofile"]) 418072b676d7Smrg 418172b676d7Smrg cat <<__EOF__ >> "$cfgfile" 418272b676d7Smrgifelse([$1], [], 418372b676d7Smrg[#! $SHELL 418472b676d7Smrg 418572b676d7Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 418672b676d7Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 418772b676d7Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 418872b676d7Smrg# 418972b676d7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 419072b676d7Smrg# Free Software Foundation, Inc. 419172b676d7Smrg# 419272b676d7Smrg# This file is part of GNU Libtool: 419372b676d7Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 419472b676d7Smrg# 419572b676d7Smrg# This program is free software; you can redistribute it and/or modify 419672b676d7Smrg# it under the terms of the GNU General Public License as published by 419772b676d7Smrg# the Free Software Foundation; either version 2 of the License, or 419872b676d7Smrg# (at your option) any later version. 419972b676d7Smrg# 420072b676d7Smrg# This program is distributed in the hope that it will be useful, but 420172b676d7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 420272b676d7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 420372b676d7Smrg# General Public License for more details. 420472b676d7Smrg# 420572b676d7Smrg# You should have received a copy of the GNU General Public License 420672b676d7Smrg# along with this program; if not, write to the Free Software 420772b676d7Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 420872b676d7Smrg# 420972b676d7Smrg# As a special exception to the GNU General Public License, if you 421072b676d7Smrg# distribute this file as part of a program that contains a 421172b676d7Smrg# configuration script generated by Autoconf, you may include it under 421272b676d7Smrg# the same distribution terms that you use for the rest of that program. 421372b676d7Smrg 421472b676d7Smrg# A sed program that does not truncate output. 421572b676d7SmrgSED=$lt_SED 421672b676d7Smrg 421772b676d7Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 421872b676d7SmrgXsed="$SED -e 1s/^X//" 421972b676d7Smrg 422072b676d7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 422172b676d7Smrg# if CDPATH is set. 422272b676d7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 422372b676d7Smrg 422472b676d7Smrg# The names of the tagged configurations supported by this script. 422572b676d7Smrgavailable_tags= 422672b676d7Smrg 422772b676d7Smrg# ### BEGIN LIBTOOL CONFIG], 422872b676d7Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 422972b676d7Smrg 423072b676d7Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 423172b676d7Smrg 423272b676d7Smrg# Shell to use when invoking shell scripts. 423372b676d7SmrgSHELL=$lt_SHELL 423472b676d7Smrg 423572b676d7Smrg# Whether or not to build shared libraries. 423672b676d7Smrgbuild_libtool_libs=$enable_shared 423772b676d7Smrg 423872b676d7Smrg# Whether or not to build static libraries. 423972b676d7Smrgbuild_old_libs=$enable_static 424072b676d7Smrg 424172b676d7Smrg# Whether or not to add -lc for building shared libraries. 424272b676d7Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 424372b676d7Smrg 424472b676d7Smrg# Whether or not to disallow shared libs when runtime libs are static 424572b676d7Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 424672b676d7Smrg 424772b676d7Smrg# Whether or not to optimize for fast installation. 424872b676d7Smrgfast_install=$enable_fast_install 424972b676d7Smrg 425072b676d7Smrg# The host system. 425172b676d7Smrghost_alias=$host_alias 425272b676d7Smrghost=$host 425372b676d7Smrghost_os=$host_os 425472b676d7Smrg 425572b676d7Smrg# The build system. 425672b676d7Smrgbuild_alias=$build_alias 425772b676d7Smrgbuild=$build 425872b676d7Smrgbuild_os=$build_os 425972b676d7Smrg 426072b676d7Smrg# An echo program that does not interpret backslashes. 426172b676d7Smrgecho=$lt_echo 426272b676d7Smrg 426372b676d7Smrg# The archiver. 426472b676d7SmrgAR=$lt_AR 426572b676d7SmrgAR_FLAGS=$lt_AR_FLAGS 426672b676d7Smrg 426772b676d7Smrg# A C compiler. 426872b676d7SmrgLTCC=$lt_LTCC 426972b676d7Smrg 427072b676d7Smrg# LTCC compiler flags. 427172b676d7SmrgLTCFLAGS=$lt_LTCFLAGS 427272b676d7Smrg 427372b676d7Smrg# A language-specific compiler. 427472b676d7SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 427572b676d7Smrg 427672b676d7Smrg# Is the compiler the GNU C compiler? 427772b676d7Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 427872b676d7Smrg 427972b676d7Smrg# An ERE matcher. 428072b676d7SmrgEGREP=$lt_EGREP 428172b676d7Smrg 428272b676d7Smrg# The linker used to build libraries. 428372b676d7SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 428472b676d7Smrg 428572b676d7Smrg# Whether we need hard or soft links. 428672b676d7SmrgLN_S=$lt_LN_S 428772b676d7Smrg 428872b676d7Smrg# A BSD-compatible nm program. 428972b676d7SmrgNM=$lt_NM 429072b676d7Smrg 429172b676d7Smrg# A symbol stripping program 429272b676d7SmrgSTRIP=$lt_STRIP 429372b676d7Smrg 429472b676d7Smrg# Used to examine libraries when file_magic_cmd begins "file" 429572b676d7SmrgMAGIC_CMD=$MAGIC_CMD 429672b676d7Smrg 429772b676d7Smrg# Used on cygwin: DLL creation program. 429872b676d7SmrgDLLTOOL="$DLLTOOL" 429972b676d7Smrg 430072b676d7Smrg# Used on cygwin: object dumper. 430172b676d7SmrgOBJDUMP="$OBJDUMP" 430272b676d7Smrg 430372b676d7Smrg# Used on cygwin: assembler. 430472b676d7SmrgAS="$AS" 430572b676d7Smrg 430672b676d7Smrg# The name of the directory that contains temporary libtool files. 430772b676d7Smrgobjdir=$objdir 430872b676d7Smrg 430972b676d7Smrg# How to create reloadable object files. 431072b676d7Smrgreload_flag=$lt_reload_flag 431172b676d7Smrgreload_cmds=$lt_reload_cmds 431272b676d7Smrg 431372b676d7Smrg# How to pass a linker flag through the compiler. 431472b676d7Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 431572b676d7Smrg 431672b676d7Smrg# Object file suffix (normally "o"). 431772b676d7Smrgobjext="$ac_objext" 431872b676d7Smrg 431972b676d7Smrg# Old archive suffix (normally "a"). 432072b676d7Smrglibext="$libext" 432172b676d7Smrg 432272b676d7Smrg# Shared library suffix (normally ".so"). 432372b676d7Smrgshrext_cmds='$shrext_cmds' 432472b676d7Smrg 432572b676d7Smrg# Executable file suffix (normally ""). 432672b676d7Smrgexeext="$exeext" 432772b676d7Smrg 432872b676d7Smrg# Additional compiler flags for building library objects. 432972b676d7Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 433072b676d7Smrgpic_mode=$pic_mode 433172b676d7Smrg 433272b676d7Smrg# What is the maximum length of a command? 433372b676d7Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 433472b676d7Smrg 433572b676d7Smrg# Does compiler simultaneously support -c and -o options? 433672b676d7Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 433772b676d7Smrg 433872b676d7Smrg# Must we lock files when doing compilation? 433972b676d7Smrgneed_locks=$lt_need_locks 434072b676d7Smrg 434172b676d7Smrg# Do we need the lib prefix for modules? 434272b676d7Smrgneed_lib_prefix=$need_lib_prefix 434372b676d7Smrg 434472b676d7Smrg# Do we need a version for libraries? 434572b676d7Smrgneed_version=$need_version 434672b676d7Smrg 434772b676d7Smrg# Whether dlopen is supported. 434872b676d7Smrgdlopen_support=$enable_dlopen 434972b676d7Smrg 435072b676d7Smrg# Whether dlopen of programs is supported. 435172b676d7Smrgdlopen_self=$enable_dlopen_self 435272b676d7Smrg 435372b676d7Smrg# Whether dlopen of statically linked programs is supported. 435472b676d7Smrgdlopen_self_static=$enable_dlopen_self_static 435572b676d7Smrg 435672b676d7Smrg# Compiler flag to prevent dynamic linking. 435772b676d7Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 435872b676d7Smrg 435972b676d7Smrg# Compiler flag to turn off builtin functions. 436072b676d7Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 436172b676d7Smrg 436272b676d7Smrg# Compiler flag to allow reflexive dlopens. 436372b676d7Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 436472b676d7Smrg 436572b676d7Smrg# Compiler flag to generate shared objects directly from archives. 436672b676d7Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 436772b676d7Smrg 436872b676d7Smrg# Compiler flag to generate thread-safe objects. 436972b676d7Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 437072b676d7Smrg 437172b676d7Smrg# Library versioning type. 437272b676d7Smrgversion_type=$version_type 437372b676d7Smrg 437472b676d7Smrg# Format of library name prefix. 437572b676d7Smrglibname_spec=$lt_libname_spec 437672b676d7Smrg 437772b676d7Smrg# List of archive names. First name is the real one, the rest are links. 437872b676d7Smrg# The last name is the one that the linker finds with -lNAME. 437972b676d7Smrglibrary_names_spec=$lt_library_names_spec 438072b676d7Smrg 438172b676d7Smrg# The coded name of the library, if different from the real name. 438272b676d7Smrgsoname_spec=$lt_soname_spec 438372b676d7Smrg 438472b676d7Smrg# Commands used to build and install an old-style archive. 438572b676d7SmrgRANLIB=$lt_RANLIB 438672b676d7Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 438772b676d7Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 438872b676d7Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 438972b676d7Smrg 439072b676d7Smrg# Create an old-style archive from a shared archive. 439172b676d7Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 439272b676d7Smrg 439372b676d7Smrg# Create a temporary old-style archive to link instead of a shared archive. 439472b676d7Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 439572b676d7Smrg 439672b676d7Smrg# Commands used to build and install a shared archive. 439772b676d7Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 439872b676d7Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 439972b676d7Smrgpostinstall_cmds=$lt_postinstall_cmds 440072b676d7Smrgpostuninstall_cmds=$lt_postuninstall_cmds 440172b676d7Smrg 440272b676d7Smrg# Commands used to build a loadable module (assumed same as above if empty) 440372b676d7Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 440472b676d7Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 440572b676d7Smrg 440672b676d7Smrg# Commands to strip libraries. 440772b676d7Smrgold_striplib=$lt_old_striplib 440872b676d7Smrgstriplib=$lt_striplib 440972b676d7Smrg 441072b676d7Smrg# Dependencies to place before the objects being linked to create a 441172b676d7Smrg# shared library. 441272b676d7Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 441372b676d7Smrg 441472b676d7Smrg# Dependencies to place after the objects being linked to create a 441572b676d7Smrg# shared library. 441672b676d7Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 441772b676d7Smrg 441872b676d7Smrg# Dependencies to place before the objects being linked to create a 441972b676d7Smrg# shared library. 442072b676d7Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 442172b676d7Smrg 442272b676d7Smrg# Dependencies to place after the objects being linked to create a 442372b676d7Smrg# shared library. 442472b676d7Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 442572b676d7Smrg 442672b676d7Smrg# The library search path used internally by the compiler when linking 442772b676d7Smrg# a shared library. 442872b676d7Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 442972b676d7Smrg 443072b676d7Smrg# Method to check whether dependent libraries are shared objects. 443172b676d7Smrgdeplibs_check_method=$lt_deplibs_check_method 443272b676d7Smrg 443372b676d7Smrg# Command to use when deplibs_check_method == file_magic. 443472b676d7Smrgfile_magic_cmd=$lt_file_magic_cmd 443572b676d7Smrg 443672b676d7Smrg# Flag that allows shared libraries with undefined symbols to be built. 443772b676d7Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 443872b676d7Smrg 443972b676d7Smrg# Flag that forces no undefined symbols. 444072b676d7Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 444172b676d7Smrg 444272b676d7Smrg# Commands used to finish a libtool library installation in a directory. 444372b676d7Smrgfinish_cmds=$lt_finish_cmds 444472b676d7Smrg 444572b676d7Smrg# Same as above, but a single script fragment to be evaled but not shown. 444672b676d7Smrgfinish_eval=$lt_finish_eval 444772b676d7Smrg 444872b676d7Smrg# Take the output of nm and produce a listing of raw symbols and C names. 444972b676d7Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 445072b676d7Smrg 445172b676d7Smrg# Transform the output of nm in a proper C declaration 445272b676d7Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 445372b676d7Smrg 445472b676d7Smrg# Transform the output of nm in a C name address pair 445572b676d7Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 445672b676d7Smrg 445772b676d7Smrg# This is the shared library runtime path variable. 445872b676d7Smrgrunpath_var=$runpath_var 445972b676d7Smrg 446072b676d7Smrg# This is the shared library path variable. 446172b676d7Smrgshlibpath_var=$shlibpath_var 446272b676d7Smrg 446372b676d7Smrg# Is shlibpath searched before the hard-coded library search path? 446472b676d7Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 446572b676d7Smrg 446672b676d7Smrg# How to hardcode a shared library path into an executable. 446772b676d7Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 446872b676d7Smrg 446972b676d7Smrg# Whether we should hardcode library paths into libraries. 447072b676d7Smrghardcode_into_libs=$hardcode_into_libs 447172b676d7Smrg 447272b676d7Smrg# Flag to hardcode \$libdir into a binary during linking. 447372b676d7Smrg# This must work even if \$libdir does not exist. 447472b676d7Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 447572b676d7Smrg 447672b676d7Smrg# If ld is used when linking, flag to hardcode \$libdir into 447772b676d7Smrg# a binary during linking. This must work even if \$libdir does 447872b676d7Smrg# not exist. 447972b676d7Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 448072b676d7Smrg 448172b676d7Smrg# Whether we need a single -rpath flag with a separated argument. 448272b676d7Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 448372b676d7Smrg 448472b676d7Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 448572b676d7Smrg# resulting binary. 448672b676d7Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 448772b676d7Smrg 448872b676d7Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 448972b676d7Smrg# resulting binary. 449072b676d7Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 449172b676d7Smrg 449272b676d7Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 449372b676d7Smrg# the resulting binary. 449472b676d7Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 449572b676d7Smrg 449672b676d7Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 449772b676d7Smrg# and all subsequent libraries and executables linked against it. 449872b676d7Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 449972b676d7Smrg 450072b676d7Smrg# Variables whose values should be saved in libtool wrapper scripts and 450172b676d7Smrg# restored at relink time. 450272b676d7Smrgvariables_saved_for_relink="$variables_saved_for_relink" 450372b676d7Smrg 450472b676d7Smrg# Whether libtool must link a program against all its dependency libraries. 450572b676d7Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 450672b676d7Smrg 450772b676d7Smrg# Compile-time system search path for libraries 450872b676d7Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 450972b676d7Smrg 451072b676d7Smrg# Run-time system search path for libraries 451172b676d7Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 451272b676d7Smrg 451372b676d7Smrg# Fix the shell variable \$srcfile for the compiler. 451472b676d7Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 451572b676d7Smrg 451672b676d7Smrg# Set to yes if exported symbols are required. 451772b676d7Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 451872b676d7Smrg 451972b676d7Smrg# The commands to list exported symbols. 452072b676d7Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 452172b676d7Smrg 452272b676d7Smrg# The commands to extract the exported symbol list from a shared archive. 452372b676d7Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 452472b676d7Smrg 452572b676d7Smrg# Symbols that should not be listed in the preloaded symbols. 452672b676d7Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 452772b676d7Smrg 452872b676d7Smrg# Symbols that must always be exported. 452972b676d7Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 453072b676d7Smrg 453172b676d7Smrgifelse([$1],[], 453272b676d7Smrg[# ### END LIBTOOL CONFIG], 453372b676d7Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 453472b676d7Smrg 453572b676d7Smrg__EOF__ 453672b676d7Smrg 453772b676d7Smrgifelse([$1],[], [ 453872b676d7Smrg case $host_os in 453972b676d7Smrg aix3*) 454072b676d7Smrg cat <<\EOF >> "$cfgfile" 454172b676d7Smrg 454272b676d7Smrg# AIX sometimes has problems with the GCC collect2 program. For some 454372b676d7Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 454472b676d7Smrg# vanish in a puff of smoke. 454572b676d7Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 454672b676d7Smrg COLLECT_NAMES= 454772b676d7Smrg export COLLECT_NAMES 454872b676d7Smrgfi 454972b676d7SmrgEOF 455072b676d7Smrg ;; 455172b676d7Smrg esac 455272b676d7Smrg 455372b676d7Smrg # We use sed instead of cat because bash on DJGPP gets confused if 455472b676d7Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 455572b676d7Smrg # text mode, it properly converts lines to CR/LF. This bash problem 455672b676d7Smrg # is reportedly fixed, but why not run on old versions too? 455772b676d7Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 455872b676d7Smrg 455972b676d7Smrg mv -f "$cfgfile" "$ofile" || \ 456072b676d7Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 456172b676d7Smrg chmod +x "$ofile" 456272b676d7Smrg]) 456372b676d7Smrgelse 456472b676d7Smrg # If there is no Makefile yet, we rely on a make rule to execute 456572b676d7Smrg # `config.status --recheck' to rerun these tests and create the 456672b676d7Smrg # libtool script then. 456772b676d7Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 456872b676d7Smrg if test -f "$ltmain_in"; then 456972b676d7Smrg test -f Makefile && make "$ltmain" 457072b676d7Smrg fi 457172b676d7Smrgfi 457272b676d7Smrg])# AC_LIBTOOL_CONFIG 457372b676d7Smrg 457472b676d7Smrg 457572b676d7Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 457672b676d7Smrg# ------------------------------------------- 457772b676d7SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 457872b676d7Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 457972b676d7Smrg 458072b676d7Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 458172b676d7Smrg 458272b676d7Smrgif test "$GCC" = yes; then 458372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 458472b676d7Smrg 458572b676d7Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 458672b676d7Smrg lt_cv_prog_compiler_rtti_exceptions, 458772b676d7Smrg [-fno-rtti -fno-exceptions], [], 458872b676d7Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 458972b676d7Smrgfi 459072b676d7Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 459172b676d7Smrg 459272b676d7Smrg 459372b676d7Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 459472b676d7Smrg# --------------------------------- 459572b676d7SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 459672b676d7Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 459772b676d7SmrgAC_REQUIRE([AC_PROG_NM]) 459872b676d7SmrgAC_REQUIRE([AC_OBJEXT]) 459972b676d7Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 460072b676d7SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 460172b676d7SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 460272b676d7Smrg[ 460372b676d7Smrg# These are sane defaults that work on at least a few old systems. 460472b676d7Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 460572b676d7Smrg 460672b676d7Smrg# Character class describing NM global symbol codes. 460772b676d7Smrgsymcode='[[BCDEGRST]]' 460872b676d7Smrg 460972b676d7Smrg# Regexp to match symbols that can be accessed directly from C. 461072b676d7Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 461172b676d7Smrg 461272b676d7Smrg# Transform an extracted symbol line into a proper C declaration 461372b676d7Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 461472b676d7Smrg 461572b676d7Smrg# Transform an extracted symbol line into symbol name and symbol address 461672b676d7Smrglt_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'" 461772b676d7Smrg 461872b676d7Smrg# Define system-specific variables. 461972b676d7Smrgcase $host_os in 462072b676d7Smrgaix*) 462172b676d7Smrg symcode='[[BCDT]]' 462272b676d7Smrg ;; 462372b676d7Smrgcygwin* | mingw* | pw32*) 462472b676d7Smrg symcode='[[ABCDGISTW]]' 462572b676d7Smrg ;; 462672b676d7Smrghpux*) # Its linker distinguishes data from code symbols 462772b676d7Smrg if test "$host_cpu" = ia64; then 462872b676d7Smrg symcode='[[ABCDEGRST]]' 462972b676d7Smrg fi 463072b676d7Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 463172b676d7Smrg 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'" 463272b676d7Smrg ;; 463372b676d7Smrglinux* | k*bsd*-gnu) 463472b676d7Smrg if test "$host_cpu" = ia64; then 463572b676d7Smrg symcode='[[ABCDGIRSTW]]' 463672b676d7Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 463772b676d7Smrg 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'" 463872b676d7Smrg fi 463972b676d7Smrg ;; 464072b676d7Smrgirix* | nonstopux*) 464172b676d7Smrg symcode='[[BCDEGRST]]' 464272b676d7Smrg ;; 464372b676d7Smrgosf*) 464472b676d7Smrg symcode='[[BCDEGQRST]]' 464572b676d7Smrg ;; 464672b676d7Smrgsolaris*) 464772b676d7Smrg symcode='[[BDRT]]' 464872b676d7Smrg ;; 464972b676d7Smrgsco3.2v5*) 465072b676d7Smrg symcode='[[DT]]' 465172b676d7Smrg ;; 465272b676d7Smrgsysv4.2uw2*) 465372b676d7Smrg symcode='[[DT]]' 465472b676d7Smrg ;; 465572b676d7Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 465672b676d7Smrg symcode='[[ABDT]]' 465772b676d7Smrg ;; 465872b676d7Smrgsysv4) 465972b676d7Smrg symcode='[[DFNSTU]]' 466072b676d7Smrg ;; 466172b676d7Smrgesac 466272b676d7Smrg 466372b676d7Smrg# Handle CRLF in mingw tool chain 466472b676d7Smrgopt_cr= 466572b676d7Smrgcase $build_os in 466672b676d7Smrgmingw*) 466772b676d7Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 466872b676d7Smrg ;; 466972b676d7Smrgesac 467072b676d7Smrg 467172b676d7Smrg# If we're using GNU nm, then use its standard symbol codes. 467272b676d7Smrgcase `$NM -V 2>&1` in 467372b676d7Smrg*GNU* | *'with BFD'*) 467472b676d7Smrg symcode='[[ABCDGIRSTW]]' ;; 467572b676d7Smrgesac 467672b676d7Smrg 467772b676d7Smrg# Try without a prefix undercore, then with it. 467872b676d7Smrgfor ac_symprfx in "" "_"; do 467972b676d7Smrg 468072b676d7Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 468172b676d7Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 468272b676d7Smrg 468372b676d7Smrg # Write the raw and C identifiers. 468472b676d7Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 468572b676d7Smrg 468672b676d7Smrg # Check to see that the pipe works correctly. 468772b676d7Smrg pipe_works=no 468872b676d7Smrg 468972b676d7Smrg rm -f conftest* 469072b676d7Smrg cat > conftest.$ac_ext <<EOF 469172b676d7Smrg#ifdef __cplusplus 469272b676d7Smrgextern "C" { 469372b676d7Smrg#endif 469472b676d7Smrgchar nm_test_var; 469572b676d7Smrgvoid nm_test_func(){} 469672b676d7Smrg#ifdef __cplusplus 469772b676d7Smrg} 469872b676d7Smrg#endif 469972b676d7Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 470072b676d7SmrgEOF 470172b676d7Smrg 470272b676d7Smrg if AC_TRY_EVAL(ac_compile); then 470372b676d7Smrg # Now try to grab the symbols. 470472b676d7Smrg nlist=conftest.nm 470572b676d7Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 470672b676d7Smrg # Try sorting and uniquifying the output. 470772b676d7Smrg if sort "$nlist" | uniq > "$nlist"T; then 470872b676d7Smrg mv -f "$nlist"T "$nlist" 470972b676d7Smrg else 471072b676d7Smrg rm -f "$nlist"T 471172b676d7Smrg fi 471272b676d7Smrg 471372b676d7Smrg # Make sure that we snagged all the symbols we need. 471472b676d7Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 471572b676d7Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 471672b676d7Smrg cat <<EOF > conftest.$ac_ext 471772b676d7Smrg#ifdef __cplusplus 471872b676d7Smrgextern "C" { 471972b676d7Smrg#endif 472072b676d7Smrg 472172b676d7SmrgEOF 472272b676d7Smrg # Now generate the symbol file. 472372b676d7Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 472472b676d7Smrg 472572b676d7Smrg cat <<EOF >> conftest.$ac_ext 472672b676d7Smrg#if defined (__STDC__) && __STDC__ 472772b676d7Smrg# define lt_ptr_t void * 472872b676d7Smrg#else 472972b676d7Smrg# define lt_ptr_t char * 473072b676d7Smrg# define const 473172b676d7Smrg#endif 473272b676d7Smrg 473372b676d7Smrg/* The mapping between symbol names and symbols. */ 473472b676d7Smrgconst struct { 473572b676d7Smrg const char *name; 473672b676d7Smrg lt_ptr_t address; 473772b676d7Smrg} 473872b676d7Smrglt_preloaded_symbols[[]] = 473972b676d7Smrg{ 474072b676d7SmrgEOF 474172b676d7Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 474272b676d7Smrg cat <<\EOF >> conftest.$ac_ext 474372b676d7Smrg {0, (lt_ptr_t) 0} 474472b676d7Smrg}; 474572b676d7Smrg 474672b676d7Smrg#ifdef __cplusplus 474772b676d7Smrg} 474872b676d7Smrg#endif 474972b676d7SmrgEOF 475072b676d7Smrg # Now try linking the two files. 475172b676d7Smrg mv conftest.$ac_objext conftstm.$ac_objext 475272b676d7Smrg lt_save_LIBS="$LIBS" 475372b676d7Smrg lt_save_CFLAGS="$CFLAGS" 475472b676d7Smrg LIBS="conftstm.$ac_objext" 475572b676d7Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 475672b676d7Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 475772b676d7Smrg pipe_works=yes 475872b676d7Smrg fi 475972b676d7Smrg LIBS="$lt_save_LIBS" 476072b676d7Smrg CFLAGS="$lt_save_CFLAGS" 476172b676d7Smrg else 476272b676d7Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 476372b676d7Smrg fi 476472b676d7Smrg else 476572b676d7Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 476672b676d7Smrg fi 476772b676d7Smrg else 476872b676d7Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 476972b676d7Smrg fi 477072b676d7Smrg else 477172b676d7Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 477272b676d7Smrg cat conftest.$ac_ext >&5 477372b676d7Smrg fi 477472b676d7Smrg rm -f conftest* conftst* 477572b676d7Smrg 477672b676d7Smrg # Do not use the global_symbol_pipe unless it works. 477772b676d7Smrg if test "$pipe_works" = yes; then 477872b676d7Smrg break 477972b676d7Smrg else 478072b676d7Smrg lt_cv_sys_global_symbol_pipe= 478172b676d7Smrg fi 478272b676d7Smrgdone 478372b676d7Smrg]) 478472b676d7Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 478572b676d7Smrg lt_cv_sys_global_symbol_to_cdecl= 478672b676d7Smrgfi 478772b676d7Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 478872b676d7Smrg AC_MSG_RESULT(failed) 478972b676d7Smrgelse 479072b676d7Smrg AC_MSG_RESULT(ok) 479172b676d7Smrgfi 479272b676d7Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 479372b676d7Smrg 479472b676d7Smrg 479572b676d7Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 479672b676d7Smrg# --------------------------------------- 479772b676d7SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 479872b676d7Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 479972b676d7Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 480072b676d7Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 480172b676d7Smrg 480272b676d7SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 480372b676d7Smrg ifelse([$1],[CXX],[ 480472b676d7Smrg # C++ specific cases for pic, static, wl, etc. 480572b676d7Smrg if test "$GXX" = yes; then 480672b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 480772b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 480872b676d7Smrg 480972b676d7Smrg case $host_os in 481072b676d7Smrg aix*) 481172b676d7Smrg # All AIX code is PIC. 481272b676d7Smrg if test "$host_cpu" = ia64; then 481372b676d7Smrg # AIX 5 now supports IA64 processor 481472b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 481572b676d7Smrg fi 481672b676d7Smrg ;; 481772b676d7Smrg amigaos*) 481872b676d7Smrg # FIXME: we need at least 68020 code to build shared libraries, but 481972b676d7Smrg # adding the `-m68020' flag to GCC prevents building anything better, 482072b676d7Smrg # like `-m68040'. 482172b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 482272b676d7Smrg ;; 482372b676d7Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 482472b676d7Smrg # PIC is the default for these OSes. 482572b676d7Smrg ;; 482672b676d7Smrg mingw* | os2* | pw32*) 482772b676d7Smrg # This hack is so that the source file can tell whether it is being 482872b676d7Smrg # built for inclusion in a dll (and should export symbols for example). 482972b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 483072b676d7Smrg ;; 483172b676d7Smrg darwin* | rhapsody*) 483272b676d7Smrg # PIC is the default on this platform 483372b676d7Smrg # Common symbols not allowed in MH_DYLIB files 483472b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 483572b676d7Smrg ;; 483672b676d7Smrg *djgpp*) 483772b676d7Smrg # DJGPP does not support shared libraries at all 483872b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 483972b676d7Smrg ;; 484072b676d7Smrg interix3*) 484172b676d7Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 484272b676d7Smrg # Instead, we relocate shared libraries at runtime. 484372b676d7Smrg ;; 484472b676d7Smrg sysv4*MP*) 484572b676d7Smrg if test -d /usr/nec; then 484672b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 484772b676d7Smrg fi 484872b676d7Smrg ;; 484972b676d7Smrg hpux*) 485072b676d7Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 485172b676d7Smrg # not for PA HP-UX. 485272b676d7Smrg case $host_cpu in 485372b676d7Smrg hppa*64*|ia64*) 485472b676d7Smrg ;; 485572b676d7Smrg *) 485672b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 485772b676d7Smrg ;; 485872b676d7Smrg esac 485972b676d7Smrg ;; 486072b676d7Smrg *) 486172b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 486272b676d7Smrg ;; 486372b676d7Smrg esac 486472b676d7Smrg else 486572b676d7Smrg case $host_os in 486672b676d7Smrg aix4* | aix5*) 486772b676d7Smrg # All AIX code is PIC. 486872b676d7Smrg if test "$host_cpu" = ia64; then 486972b676d7Smrg # AIX 5 now supports IA64 processor 487072b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 487172b676d7Smrg else 487272b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 487372b676d7Smrg fi 487472b676d7Smrg ;; 487572b676d7Smrg chorus*) 487672b676d7Smrg case $cc_basename in 487772b676d7Smrg cxch68*) 487872b676d7Smrg # Green Hills C++ Compiler 487972b676d7Smrg # _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" 488072b676d7Smrg ;; 488172b676d7Smrg esac 488272b676d7Smrg ;; 488372b676d7Smrg darwin*) 488472b676d7Smrg # PIC is the default on this platform 488572b676d7Smrg # Common symbols not allowed in MH_DYLIB files 488672b676d7Smrg case $cc_basename in 488772b676d7Smrg xlc*) 488872b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 488972b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 489072b676d7Smrg ;; 489172b676d7Smrg esac 489272b676d7Smrg ;; 489372b676d7Smrg dgux*) 489472b676d7Smrg case $cc_basename in 489572b676d7Smrg ec++*) 489672b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 489772b676d7Smrg ;; 489872b676d7Smrg ghcx*) 489972b676d7Smrg # Green Hills C++ Compiler 490072b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 490172b676d7Smrg ;; 490272b676d7Smrg *) 490372b676d7Smrg ;; 490472b676d7Smrg esac 490572b676d7Smrg ;; 490672b676d7Smrg freebsd* | dragonfly*) 490772b676d7Smrg # FreeBSD uses GNU C++ 490872b676d7Smrg ;; 490972b676d7Smrg hpux9* | hpux10* | hpux11*) 491072b676d7Smrg case $cc_basename in 491172b676d7Smrg CC*) 491272b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 491372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 491472b676d7Smrg if test "$host_cpu" != ia64; then 491572b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 491672b676d7Smrg fi 491772b676d7Smrg ;; 491872b676d7Smrg aCC*) 491972b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 492072b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 492172b676d7Smrg case $host_cpu in 492272b676d7Smrg hppa*64*|ia64*) 492372b676d7Smrg # +Z the default 492472b676d7Smrg ;; 492572b676d7Smrg *) 492672b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 492772b676d7Smrg ;; 492872b676d7Smrg esac 492972b676d7Smrg ;; 493072b676d7Smrg *) 493172b676d7Smrg ;; 493272b676d7Smrg esac 493372b676d7Smrg ;; 493472b676d7Smrg interix*) 493572b676d7Smrg # This is c89, which is MS Visual C++ (no shared libs) 493672b676d7Smrg # Anyone wants to do a port? 493772b676d7Smrg ;; 493872b676d7Smrg irix5* | irix6* | nonstopux*) 493972b676d7Smrg case $cc_basename in 494072b676d7Smrg CC*) 494172b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 494272b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 494372b676d7Smrg # CC pic flag -KPIC is the default. 494472b676d7Smrg ;; 494572b676d7Smrg *) 494672b676d7Smrg ;; 494772b676d7Smrg esac 494872b676d7Smrg ;; 494972b676d7Smrg linux* | k*bsd*-gnu) 495072b676d7Smrg case $cc_basename in 495172b676d7Smrg KCC*) 495272b676d7Smrg # KAI C++ Compiler 495372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 495472b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 495572b676d7Smrg ;; 495672b676d7Smrg icpc* | ecpc*) 495772b676d7Smrg # Intel C++ 495872b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 495972b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 496072b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 496172b676d7Smrg ;; 496272b676d7Smrg pgCC*) 496372b676d7Smrg # Portland Group C++ compiler. 496472b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 496572b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 496672b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 496772b676d7Smrg ;; 496872b676d7Smrg cxx*) 496972b676d7Smrg # Compaq C++ 497072b676d7Smrg # Make sure the PIC flag is empty. It appears that all Alpha 497172b676d7Smrg # Linux and Compaq Tru64 Unix objects are PIC. 497272b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 497372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 497472b676d7Smrg ;; 497572b676d7Smrg *) 497672b676d7Smrg ;; 497772b676d7Smrg esac 497872b676d7Smrg ;; 497972b676d7Smrg lynxos*) 498072b676d7Smrg ;; 498172b676d7Smrg m88k*) 498272b676d7Smrg ;; 498372b676d7Smrg mvs*) 498472b676d7Smrg case $cc_basename in 498572b676d7Smrg cxx*) 498672b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 498772b676d7Smrg ;; 498872b676d7Smrg *) 498972b676d7Smrg ;; 499072b676d7Smrg esac 499172b676d7Smrg ;; 499272b676d7Smrg netbsd* | netbsdelf*-gnu) 499372b676d7Smrg ;; 499472b676d7Smrg osf3* | osf4* | osf5*) 499572b676d7Smrg case $cc_basename in 499672b676d7Smrg KCC*) 499772b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 499872b676d7Smrg ;; 499972b676d7Smrg RCC*) 500072b676d7Smrg # Rational C++ 2.4.1 500172b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 500272b676d7Smrg ;; 500372b676d7Smrg cxx*) 500472b676d7Smrg # Digital/Compaq C++ 500572b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 500672b676d7Smrg # Make sure the PIC flag is empty. It appears that all Alpha 500772b676d7Smrg # Linux and Compaq Tru64 Unix objects are PIC. 500872b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 500972b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 501072b676d7Smrg ;; 501172b676d7Smrg *) 501272b676d7Smrg ;; 501372b676d7Smrg esac 501472b676d7Smrg ;; 501572b676d7Smrg psos*) 501672b676d7Smrg ;; 501772b676d7Smrg solaris*) 501872b676d7Smrg case $cc_basename in 501972b676d7Smrg CC*) 502072b676d7Smrg # Sun C++ 4.2, 5.x and Centerline C++ 502172b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 502272b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 502372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 502472b676d7Smrg ;; 502572b676d7Smrg gcx*) 502672b676d7Smrg # Green Hills C++ Compiler 502772b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 502872b676d7Smrg ;; 502972b676d7Smrg *) 503072b676d7Smrg ;; 503172b676d7Smrg esac 503272b676d7Smrg ;; 503372b676d7Smrg sunos4*) 503472b676d7Smrg case $cc_basename in 503572b676d7Smrg CC*) 503672b676d7Smrg # Sun C++ 4.x 503772b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 503872b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 503972b676d7Smrg ;; 504072b676d7Smrg lcc*) 504172b676d7Smrg # Lucid 504272b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 504372b676d7Smrg ;; 504472b676d7Smrg *) 504572b676d7Smrg ;; 504672b676d7Smrg esac 504772b676d7Smrg ;; 504872b676d7Smrg tandem*) 504972b676d7Smrg case $cc_basename in 505072b676d7Smrg NCC*) 505172b676d7Smrg # NonStop-UX NCC 3.20 505272b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 505372b676d7Smrg ;; 505472b676d7Smrg *) 505572b676d7Smrg ;; 505672b676d7Smrg esac 505772b676d7Smrg ;; 505872b676d7Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 505972b676d7Smrg case $cc_basename in 506072b676d7Smrg CC*) 506172b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 506272b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 506372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 506472b676d7Smrg ;; 506572b676d7Smrg esac 506672b676d7Smrg ;; 506772b676d7Smrg vxworks*) 506872b676d7Smrg ;; 506972b676d7Smrg *) 507072b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 507172b676d7Smrg ;; 507272b676d7Smrg esac 507372b676d7Smrg fi 507472b676d7Smrg], 507572b676d7Smrg[ 507672b676d7Smrg if test "$GCC" = yes; then 507772b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 507872b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 507972b676d7Smrg 508072b676d7Smrg case $host_os in 508172b676d7Smrg aix*) 508272b676d7Smrg # All AIX code is PIC. 508372b676d7Smrg if test "$host_cpu" = ia64; then 508472b676d7Smrg # AIX 5 now supports IA64 processor 508572b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 508672b676d7Smrg fi 508772b676d7Smrg ;; 508872b676d7Smrg 508972b676d7Smrg amigaos*) 509072b676d7Smrg # FIXME: we need at least 68020 code to build shared libraries, but 509172b676d7Smrg # adding the `-m68020' flag to GCC prevents building anything better, 509272b676d7Smrg # like `-m68040'. 509372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 509472b676d7Smrg ;; 509572b676d7Smrg 509672b676d7Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 509772b676d7Smrg # PIC is the default for these OSes. 509872b676d7Smrg ;; 509972b676d7Smrg 510072b676d7Smrg mingw* | pw32* | os2*) 510172b676d7Smrg # This hack is so that the source file can tell whether it is being 510272b676d7Smrg # built for inclusion in a dll (and should export symbols for example). 510372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 510472b676d7Smrg ;; 510572b676d7Smrg 510672b676d7Smrg darwin* | rhapsody*) 510772b676d7Smrg # PIC is the default on this platform 510872b676d7Smrg # Common symbols not allowed in MH_DYLIB files 510972b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 511072b676d7Smrg ;; 511172b676d7Smrg 511272b676d7Smrg interix3*) 511372b676d7Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 511472b676d7Smrg # Instead, we relocate shared libraries at runtime. 511572b676d7Smrg ;; 511672b676d7Smrg 511772b676d7Smrg msdosdjgpp*) 511872b676d7Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 511972b676d7Smrg # on systems that don't support them. 512072b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 512172b676d7Smrg enable_shared=no 512272b676d7Smrg ;; 512372b676d7Smrg 512472b676d7Smrg sysv4*MP*) 512572b676d7Smrg if test -d /usr/nec; then 512672b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 512772b676d7Smrg fi 512872b676d7Smrg ;; 512972b676d7Smrg 513072b676d7Smrg hpux*) 513172b676d7Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 513272b676d7Smrg # not for PA HP-UX. 513372b676d7Smrg case $host_cpu in 513472b676d7Smrg hppa*64*|ia64*) 513572b676d7Smrg # +Z the default 513672b676d7Smrg ;; 513772b676d7Smrg *) 513872b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 513972b676d7Smrg ;; 514072b676d7Smrg esac 514172b676d7Smrg ;; 514272b676d7Smrg 514372b676d7Smrg *) 514472b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 514572b676d7Smrg ;; 514672b676d7Smrg esac 514772b676d7Smrg else 514872b676d7Smrg # PORTME Check for flag to pass linker flags through the system compiler. 514972b676d7Smrg case $host_os in 515072b676d7Smrg aix*) 515172b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 515272b676d7Smrg if test "$host_cpu" = ia64; then 515372b676d7Smrg # AIX 5 now supports IA64 processor 515472b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 515572b676d7Smrg else 515672b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 515772b676d7Smrg fi 515872b676d7Smrg ;; 515972b676d7Smrg darwin*) 516072b676d7Smrg # PIC is the default on this platform 516172b676d7Smrg # Common symbols not allowed in MH_DYLIB files 516272b676d7Smrg case $cc_basename in 516372b676d7Smrg xlc*) 516472b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 516572b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 516672b676d7Smrg ;; 516772b676d7Smrg esac 516872b676d7Smrg ;; 516972b676d7Smrg 517072b676d7Smrg mingw* | pw32* | os2*) 517172b676d7Smrg # This hack is so that the source file can tell whether it is being 517272b676d7Smrg # built for inclusion in a dll (and should export symbols for example). 517372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 517472b676d7Smrg ;; 517572b676d7Smrg 517672b676d7Smrg hpux9* | hpux10* | hpux11*) 517772b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 517872b676d7Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 517972b676d7Smrg # not for PA HP-UX. 518072b676d7Smrg case $host_cpu in 518172b676d7Smrg hppa*64*|ia64*) 518272b676d7Smrg # +Z the default 518372b676d7Smrg ;; 518472b676d7Smrg *) 518572b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 518672b676d7Smrg ;; 518772b676d7Smrg esac 518872b676d7Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 518972b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 519072b676d7Smrg ;; 519172b676d7Smrg 519272b676d7Smrg irix5* | irix6* | nonstopux*) 519372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 519472b676d7Smrg # PIC (with -KPIC) is the default. 519572b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 519672b676d7Smrg ;; 519772b676d7Smrg 519872b676d7Smrg newsos6) 519972b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 520072b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 520172b676d7Smrg ;; 520272b676d7Smrg 520372b676d7Smrg linux* | k*bsd*-gnu) 520472b676d7Smrg case $cc_basename in 520572b676d7Smrg icc* | ecc*) 520672b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 520772b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 520872b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 520972b676d7Smrg ;; 521072b676d7Smrg pgcc* | pgf77* | pgf90* | pgf95*) 521172b676d7Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 521272b676d7Smrg # which looks to be a dead project) 521372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 521472b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 521572b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 521672b676d7Smrg ;; 521772b676d7Smrg ccc*) 521872b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 521972b676d7Smrg # All Alpha code is PIC. 522072b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 522172b676d7Smrg ;; 522272b676d7Smrg esac 522372b676d7Smrg ;; 522472b676d7Smrg 522572b676d7Smrg osf3* | osf4* | osf5*) 522672b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 522772b676d7Smrg # All OSF/1 code is PIC. 522872b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 522972b676d7Smrg ;; 523072b676d7Smrg 523172b676d7Smrg solaris*) 523272b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 523372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 523472b676d7Smrg case $cc_basename in 523572b676d7Smrg f77* | f90* | f95*) 523672b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 523772b676d7Smrg *) 523872b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 523972b676d7Smrg esac 524072b676d7Smrg ;; 524172b676d7Smrg 524272b676d7Smrg sunos4*) 524372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 524472b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 524572b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 524672b676d7Smrg ;; 524772b676d7Smrg 524872b676d7Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 524972b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 525072b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 525172b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 525272b676d7Smrg ;; 525372b676d7Smrg 525472b676d7Smrg sysv4*MP*) 525572b676d7Smrg if test -d /usr/nec ;then 525672b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 525772b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 525872b676d7Smrg fi 525972b676d7Smrg ;; 526072b676d7Smrg 526172b676d7Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 526272b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 526372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 526472b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 526572b676d7Smrg ;; 526672b676d7Smrg 526772b676d7Smrg unicos*) 526872b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 526972b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 527072b676d7Smrg ;; 527172b676d7Smrg 527272b676d7Smrg uts4*) 527372b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 527472b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 527572b676d7Smrg ;; 527672b676d7Smrg 527772b676d7Smrg *) 527872b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 527972b676d7Smrg ;; 528072b676d7Smrg esac 528172b676d7Smrg fi 528272b676d7Smrg]) 528372b676d7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 528472b676d7Smrg 528572b676d7Smrg# 528672b676d7Smrg# Check to make sure the PIC flag actually works. 528772b676d7Smrg# 528872b676d7Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 528972b676d7Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 529072b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 529172b676d7Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 529272b676d7Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 529372b676d7Smrg "" | " "*) ;; 529472b676d7Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 529572b676d7Smrg esac], 529672b676d7Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 529772b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 529872b676d7Smrgfi 529972b676d7Smrgcase $host_os in 530072b676d7Smrg # For platforms which do not support PIC, -DPIC is meaningless: 530172b676d7Smrg *djgpp*) 530272b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 530372b676d7Smrg ;; 530472b676d7Smrg *) 530572b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 530672b676d7Smrg ;; 530772b676d7Smrgesac 530872b676d7Smrg 530972b676d7Smrg# 531072b676d7Smrg# Check to make sure the static flag actually works. 531172b676d7Smrg# 531272b676d7Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 531372b676d7SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 531472b676d7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 531572b676d7Smrg $lt_tmp_static_flag, 531672b676d7Smrg [], 531772b676d7Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 531872b676d7Smrg]) 531972b676d7Smrg 532072b676d7Smrg 532172b676d7Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 532272b676d7Smrg# ------------------------------------ 532372b676d7Smrg# See if the linker supports building shared libraries. 532472b676d7SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 532572b676d7Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 532672b676d7Smrgifelse([$1],[CXX],[ 532772b676d7Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 532872b676d7Smrg case $host_os in 532972b676d7Smrg aix4* | aix5*) 533072b676d7Smrg # If we're using GNU nm, then we don't want the "-C" option. 533172b676d7Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 533272b676d7Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 533372b676d7Smrg _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' 533472b676d7Smrg else 533572b676d7Smrg _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' 533672b676d7Smrg fi 533772b676d7Smrg ;; 533872b676d7Smrg pw32*) 533972b676d7Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 534072b676d7Smrg ;; 534172b676d7Smrg cygwin* | mingw*) 534272b676d7Smrg _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' 534372b676d7Smrg ;; 534472b676d7Smrg linux* | k*bsd*-gnu) 534572b676d7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=no 534672b676d7Smrg ;; 534772b676d7Smrg *) 534872b676d7Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 534972b676d7Smrg ;; 535072b676d7Smrg esac 535172b676d7Smrg],[ 535272b676d7Smrg runpath_var= 535372b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 535472b676d7Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 535572b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 535672b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 535772b676d7Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 535872b676d7Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 535972b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 536072b676d7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 536172b676d7Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 536272b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 536372b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 536472b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 536572b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 536672b676d7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 536772b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 536872b676d7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 536972b676d7Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 537072b676d7Smrg _LT_AC_TAGVAR(module_cmds, $1)= 537172b676d7Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 537272b676d7Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 537372b676d7Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 537472b676d7Smrg # include_expsyms should be a list of space-separated symbols to be *always* 537572b676d7Smrg # included in the symbol list 537672b676d7Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 537772b676d7Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 537872b676d7Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 537972b676d7Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 538072b676d7Smrg # as well as any symbol that contains `d'. 538172b676d7Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 538272b676d7Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 538372b676d7Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 538472b676d7Smrg # the symbol is explicitly referenced. Since portable code cannot 538572b676d7Smrg # rely on this symbol name, it's probably fine to never include it in 538672b676d7Smrg # preloaded symbol tables. 538772b676d7Smrg extract_expsyms_cmds= 538872b676d7Smrg # Just being paranoid about ensuring that cc_basename is set. 538972b676d7Smrg _LT_CC_BASENAME([$compiler]) 539072b676d7Smrg case $host_os in 539172b676d7Smrg cygwin* | mingw* | pw32*) 539272b676d7Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 539372b676d7Smrg # When not using gcc, we currently assume that we are using 539472b676d7Smrg # Microsoft Visual C++. 539572b676d7Smrg if test "$GCC" != yes; then 539672b676d7Smrg with_gnu_ld=no 539772b676d7Smrg fi 539872b676d7Smrg ;; 539972b676d7Smrg interix*) 540072b676d7Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 540172b676d7Smrg with_gnu_ld=yes 540272b676d7Smrg ;; 540372b676d7Smrg openbsd*) 540472b676d7Smrg with_gnu_ld=no 540572b676d7Smrg ;; 540672b676d7Smrg esac 540772b676d7Smrg 540872b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 540972b676d7Smrg if test "$with_gnu_ld" = yes; then 541072b676d7Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 541172b676d7Smrg wlarc='${wl}' 541272b676d7Smrg 541372b676d7Smrg # Set some defaults for GNU ld with shared library support. These 541472b676d7Smrg # are reset later if shared libraries are not supported. Putting them 541572b676d7Smrg # here allows them to be overridden if necessary. 541672b676d7Smrg runpath_var=LD_RUN_PATH 541772b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 541872b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 541972b676d7Smrg # ancient GNU ld didn't support --whole-archive et. al. 542072b676d7Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 542172b676d7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 542272b676d7Smrg else 542372b676d7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 542472b676d7Smrg fi 542572b676d7Smrg supports_anon_versioning=no 542672b676d7Smrg case `$LD -v 2>/dev/null` in 542772b676d7Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 542872b676d7Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 542972b676d7Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 543072b676d7Smrg *\ 2.11.*) ;; # other 2.11 versions 543172b676d7Smrg *) supports_anon_versioning=yes ;; 543272b676d7Smrg esac 543372b676d7Smrg 543472b676d7Smrg # See if GNU ld supports shared libraries. 543572b676d7Smrg case $host_os in 543672b676d7Smrg aix3* | aix4* | aix5*) 543772b676d7Smrg # On AIX/PPC, the GNU linker is very broken 543872b676d7Smrg if test "$host_cpu" != ia64; then 543972b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 544072b676d7Smrg cat <<EOF 1>&2 544172b676d7Smrg 544272b676d7Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 544372b676d7Smrg*** to be unable to reliably create shared libraries on AIX. 544472b676d7Smrg*** Therefore, libtool is disabling shared libraries support. If you 544572b676d7Smrg*** really care for shared libraries, you may want to modify your PATH 544672b676d7Smrg*** so that a non-GNU linker is found, and then restart. 544772b676d7Smrg 544872b676d7SmrgEOF 544972b676d7Smrg fi 545072b676d7Smrg ;; 545172b676d7Smrg 545272b676d7Smrg amigaos*) 545372b676d7Smrg _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)' 545472b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 545572b676d7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 545672b676d7Smrg 545772b676d7Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 545872b676d7Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 545972b676d7Smrg # to version 4, is to share data among multiple programs linked 546072b676d7Smrg # with the same dynamic library. Since this doesn't match the 546172b676d7Smrg # behavior of shared libraries on other platforms, we can't use 546272b676d7Smrg # them. 546372b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 546472b676d7Smrg ;; 546572b676d7Smrg 546672b676d7Smrg beos*) 546772b676d7Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 546872b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 546972b676d7Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 547072b676d7Smrg # support --undefined. This deserves some investigation. FIXME 547172b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 547272b676d7Smrg else 547372b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 547472b676d7Smrg fi 547572b676d7Smrg ;; 547672b676d7Smrg 547772b676d7Smrg cygwin* | mingw* | pw32*) 547872b676d7Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 547972b676d7Smrg # as there is no search path for DLLs. 548072b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 548172b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 548272b676d7Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 548372b676d7Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 548472b676d7Smrg _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' 548572b676d7Smrg 548672b676d7Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 548772b676d7Smrg _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' 548872b676d7Smrg # If the export-symbols file already is a .def file (1st line 548972b676d7Smrg # is EXPORTS), use it as is; otherwise, prepend... 549072b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 549172b676d7Smrg cp $export_symbols $output_objdir/$soname.def; 549272b676d7Smrg else 549372b676d7Smrg echo EXPORTS > $output_objdir/$soname.def; 549472b676d7Smrg cat $export_symbols >> $output_objdir/$soname.def; 549572b676d7Smrg fi~ 549672b676d7Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 549772b676d7Smrg else 549872b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 549972b676d7Smrg fi 550072b676d7Smrg ;; 550172b676d7Smrg 550272b676d7Smrg interix3*) 550372b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 550472b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 550572b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 550672b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 550772b676d7Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 550872b676d7Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 550972b676d7Smrg # default) and relocated if they conflict, which is a slow very memory 551072b676d7Smrg # consuming and fragmenting process. To avoid this, we pick a random, 551172b676d7Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 551272b676d7Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 551372b676d7Smrg _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' 551472b676d7Smrg _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' 551572b676d7Smrg ;; 551672b676d7Smrg 551772b676d7Smrg linux* | k*bsd*-gnu) 551872b676d7Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 551972b676d7Smrg tmp_addflag= 552072b676d7Smrg case $cc_basename,$host_cpu in 552172b676d7Smrg pgcc*) # Portland Group C compiler 552272b676d7Smrg _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' 552372b676d7Smrg tmp_addflag=' $pic_flag' 552472b676d7Smrg ;; 552572b676d7Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 552672b676d7Smrg _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' 552772b676d7Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 552872b676d7Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 552972b676d7Smrg tmp_addflag=' -i_dynamic' ;; 553072b676d7Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 553172b676d7Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 553272b676d7Smrg ifc* | ifort*) # Intel Fortran compiler 553372b676d7Smrg tmp_addflag=' -nofor_main' ;; 553472b676d7Smrg esac 553572b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 553672b676d7Smrg 553772b676d7Smrg if test $supports_anon_versioning = yes; then 553872b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 553972b676d7Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 554072b676d7Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 554172b676d7Smrg $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 554272b676d7Smrg fi 554372b676d7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=no 554472b676d7Smrg else 554572b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 554672b676d7Smrg fi 554772b676d7Smrg ;; 554872b676d7Smrg 554972b676d7Smrg netbsd* | netbsdelf*-gnu) 555072b676d7Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 555172b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 555272b676d7Smrg wlarc= 555372b676d7Smrg else 555472b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 555572b676d7Smrg _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' 555672b676d7Smrg fi 555772b676d7Smrg ;; 555872b676d7Smrg 555972b676d7Smrg solaris*) 556072b676d7Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 556172b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 556272b676d7Smrg cat <<EOF 1>&2 556372b676d7Smrg 556472b676d7Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 556572b676d7Smrg*** create shared libraries on Solaris systems. Therefore, libtool 556672b676d7Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 556772b676d7Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 556872b676d7Smrg*** your PATH or compiler configuration so that the native linker is 556972b676d7Smrg*** used, and then restart. 557072b676d7Smrg 557172b676d7SmrgEOF 557272b676d7Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 557372b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 557472b676d7Smrg _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' 557572b676d7Smrg else 557672b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 557772b676d7Smrg fi 557872b676d7Smrg ;; 557972b676d7Smrg 558072b676d7Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 558172b676d7Smrg case `$LD -v 2>&1` in 558272b676d7Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 558372b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 558472b676d7Smrg cat <<_LT_EOF 1>&2 558572b676d7Smrg 558672b676d7Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 558772b676d7Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 558872b676d7Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 558972b676d7Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 559072b676d7Smrg*** your PATH or compiler configuration so that the native linker is 559172b676d7Smrg*** used, and then restart. 559272b676d7Smrg 559372b676d7Smrg_LT_EOF 559472b676d7Smrg ;; 559572b676d7Smrg *) 559672b676d7Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 559772b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 559872b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 559972b676d7Smrg _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' 560072b676d7Smrg else 560172b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 560272b676d7Smrg fi 560372b676d7Smrg ;; 560472b676d7Smrg esac 560572b676d7Smrg ;; 560672b676d7Smrg 560772b676d7Smrg sunos4*) 560872b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 560972b676d7Smrg wlarc= 561072b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 561172b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 561272b676d7Smrg ;; 561372b676d7Smrg 561472b676d7Smrg *) 561572b676d7Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 561672b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 561772b676d7Smrg _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' 561872b676d7Smrg else 561972b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 562072b676d7Smrg fi 562172b676d7Smrg ;; 562272b676d7Smrg esac 562372b676d7Smrg 562472b676d7Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 562572b676d7Smrg runpath_var= 562672b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 562772b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 562872b676d7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 562972b676d7Smrg fi 563072b676d7Smrg else 563172b676d7Smrg # PORTME fill in a description of your system's linker (not GNU ld) 563272b676d7Smrg case $host_os in 563372b676d7Smrg aix3*) 563472b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 563572b676d7Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 563672b676d7Smrg _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' 563772b676d7Smrg # Note: this linker hardcodes the directories in LIBPATH if there 563872b676d7Smrg # are no directories specified by -L. 563972b676d7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 564072b676d7Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 564172b676d7Smrg # Neither direct hardcoding nor static linking is supported with a 564272b676d7Smrg # broken collect2. 564372b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 564472b676d7Smrg fi 564572b676d7Smrg ;; 564672b676d7Smrg 564772b676d7Smrg aix4* | aix5*) 564872b676d7Smrg if test "$host_cpu" = ia64; then 564972b676d7Smrg # On IA64, the linker does run time linking by default, so we don't 565072b676d7Smrg # have to do anything special. 565172b676d7Smrg aix_use_runtimelinking=no 565272b676d7Smrg exp_sym_flag='-Bexport' 565372b676d7Smrg no_entry_flag="" 565472b676d7Smrg else 565572b676d7Smrg # If we're using GNU nm, then we don't want the "-C" option. 565672b676d7Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 565772b676d7Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 565872b676d7Smrg _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' 565972b676d7Smrg else 566072b676d7Smrg _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' 566172b676d7Smrg fi 566272b676d7Smrg aix_use_runtimelinking=no 566372b676d7Smrg 566472b676d7Smrg # Test if we are trying to use run time linking or normal 566572b676d7Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 566672b676d7Smrg # need to do runtime linking. 566772b676d7Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 566872b676d7Smrg for ld_flag in $LDFLAGS; do 566972b676d7Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 567072b676d7Smrg aix_use_runtimelinking=yes 567172b676d7Smrg break 567272b676d7Smrg fi 567372b676d7Smrg done 567472b676d7Smrg ;; 567572b676d7Smrg esac 567672b676d7Smrg 567772b676d7Smrg exp_sym_flag='-bexport' 567872b676d7Smrg no_entry_flag='-bnoentry' 567972b676d7Smrg fi 568072b676d7Smrg 568172b676d7Smrg # When large executables or shared objects are built, AIX ld can 568272b676d7Smrg # have problems creating the table of contents. If linking a library 568372b676d7Smrg # or program results in "error TOC overflow" add -mminimal-toc to 568472b676d7Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 568572b676d7Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 568672b676d7Smrg 568772b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 568872b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 568972b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 569072b676d7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 569172b676d7Smrg 569272b676d7Smrg if test "$GCC" = yes; then 569372b676d7Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 569472b676d7Smrg # We only want to do this on AIX 4.2 and lower, the check 569572b676d7Smrg # below for broken collect2 doesn't work under 4.3+ 569672b676d7Smrg collect2name=`${CC} -print-prog-name=collect2` 569772b676d7Smrg if test -f "$collect2name" && \ 569872b676d7Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 569972b676d7Smrg then 570072b676d7Smrg # We have reworked collect2 570172b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 570272b676d7Smrg else 570372b676d7Smrg # We have old collect2 570472b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 570572b676d7Smrg # It fails to find uninstalled libraries when the uninstalled 570672b676d7Smrg # path is not listed in the libpath. Setting hardcode_minus_L 570772b676d7Smrg # to unsupported forces relinking 570872b676d7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 570972b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 571072b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 571172b676d7Smrg fi 571272b676d7Smrg ;; 571372b676d7Smrg esac 571472b676d7Smrg shared_flag='-shared' 571572b676d7Smrg if test "$aix_use_runtimelinking" = yes; then 571672b676d7Smrg shared_flag="$shared_flag "'${wl}-G' 571772b676d7Smrg fi 571872b676d7Smrg else 571972b676d7Smrg # not using gcc 572072b676d7Smrg if test "$host_cpu" = ia64; then 572172b676d7Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 572272b676d7Smrg # chokes on -Wl,-G. The following line is correct: 572372b676d7Smrg shared_flag='-G' 572472b676d7Smrg else 572572b676d7Smrg if test "$aix_use_runtimelinking" = yes; then 572672b676d7Smrg shared_flag='${wl}-G' 572772b676d7Smrg else 572872b676d7Smrg shared_flag='${wl}-bM:SRE' 572972b676d7Smrg fi 573072b676d7Smrg fi 573172b676d7Smrg fi 573272b676d7Smrg 573372b676d7Smrg # It seems that -bexpall does not export symbols beginning with 573472b676d7Smrg # underscore (_), so it is better to generate a list of symbols to export. 573572b676d7Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 573672b676d7Smrg if test "$aix_use_runtimelinking" = yes; then 573772b676d7Smrg # Warning - without using the other runtime loading flags (-brtl), 573872b676d7Smrg # -berok will link without error, but may produce a broken library. 573972b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 574072b676d7Smrg # Determine the default libpath from the value encoded in an empty executable. 574172b676d7Smrg _LT_AC_SYS_LIBPATH_AIX 574272b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 574372b676d7Smrg _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" 574472b676d7Smrg else 574572b676d7Smrg if test "$host_cpu" = ia64; then 574672b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 574772b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 574872b676d7Smrg _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" 574972b676d7Smrg else 575072b676d7Smrg # Determine the default libpath from the value encoded in an empty executable. 575172b676d7Smrg _LT_AC_SYS_LIBPATH_AIX 575272b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 575372b676d7Smrg # Warning - without using the other run time loading flags, 575472b676d7Smrg # -berok will link without error, but may produce a broken library. 575572b676d7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 575672b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 575772b676d7Smrg # Exported symbols can be pulled into shared objects from archives 575872b676d7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 575972b676d7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 576072b676d7Smrg # This is similar to how AIX traditionally builds its shared libraries. 576172b676d7Smrg _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' 576272b676d7Smrg fi 576372b676d7Smrg fi 576472b676d7Smrg ;; 576572b676d7Smrg 576672b676d7Smrg amigaos*) 576772b676d7Smrg _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)' 576872b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 576972b676d7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 577072b676d7Smrg # see comment about different semantics on the GNU ld section 577172b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 577272b676d7Smrg ;; 577372b676d7Smrg 577472b676d7Smrg bsdi[[45]]*) 577572b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 577672b676d7Smrg ;; 577772b676d7Smrg 577872b676d7Smrg cygwin* | mingw* | pw32*) 577972b676d7Smrg # When not using gcc, we currently assume that we are using 578072b676d7Smrg # Microsoft Visual C++. 578172b676d7Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 578272b676d7Smrg # no search path for DLLs. 578372b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 578472b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 578572b676d7Smrg # Tell ltmain to make .lib files, not .a files. 578672b676d7Smrg libext=lib 578772b676d7Smrg # Tell ltmain to make .dll files, not .so files. 578872b676d7Smrg shrext_cmds=".dll" 578972b676d7Smrg # FIXME: Setting linknames here is a bad hack. 579072b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 579172b676d7Smrg # The linker will automatically build a .lib file if we build a DLL. 579272b676d7Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 579372b676d7Smrg # FIXME: Should let the user specify the lib program. 579472b676d7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 579572b676d7Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 579672b676d7Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 579772b676d7Smrg ;; 579872b676d7Smrg 579972b676d7Smrg darwin* | rhapsody*) 580072b676d7Smrg case $host_os in 580172b676d7Smrg rhapsody* | darwin1.[[012]]) 580272b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 580372b676d7Smrg ;; 580472b676d7Smrg *) # Darwin 1.3 on 580572b676d7Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 580672b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 580772b676d7Smrg else 580872b676d7Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 580972b676d7Smrg 10.[[012]]) 581072b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 581172b676d7Smrg ;; 581272b676d7Smrg 10.*) 581372b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 581472b676d7Smrg ;; 581572b676d7Smrg esac 581672b676d7Smrg fi 581772b676d7Smrg ;; 581872b676d7Smrg esac 581972b676d7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 582072b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 582172b676d7Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 582272b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 582372b676d7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 582472b676d7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 582572b676d7Smrg if test "$GCC" = yes ; then 582672b676d7Smrg output_verbose_link_cmd='echo' 582772b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 582872b676d7Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 582972b676d7Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 583072b676d7Smrg _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}' 583172b676d7Smrg _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}' 583272b676d7Smrg else 583372b676d7Smrg case $cc_basename in 583472b676d7Smrg xlc*) 583572b676d7Smrg output_verbose_link_cmd='echo' 583672b676d7Smrg _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' 583772b676d7Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 583872b676d7Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 583972b676d7Smrg _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}' 584072b676d7Smrg _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}' 584172b676d7Smrg ;; 584272b676d7Smrg *) 584372b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 584472b676d7Smrg ;; 584572b676d7Smrg esac 584672b676d7Smrg fi 584772b676d7Smrg ;; 584872b676d7Smrg 584972b676d7Smrg dgux*) 585072b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 585172b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 585272b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 585372b676d7Smrg ;; 585472b676d7Smrg 585572b676d7Smrg freebsd1*) 585672b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 585772b676d7Smrg ;; 585872b676d7Smrg 585972b676d7Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 586072b676d7Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 586172b676d7Smrg # does not break anything, and helps significantly (at the cost of a little 586272b676d7Smrg # extra space). 586372b676d7Smrg freebsd2.2*) 586472b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 586572b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 586672b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 586772b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 586872b676d7Smrg ;; 586972b676d7Smrg 587072b676d7Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 587172b676d7Smrg freebsd2*) 587272b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 587372b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 587472b676d7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 587572b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 587672b676d7Smrg ;; 587772b676d7Smrg 587872b676d7Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 587972b676d7Smrg freebsd* | dragonfly*) 588072b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 588172b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 588272b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 588372b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 588472b676d7Smrg ;; 588572b676d7Smrg 588672b676d7Smrg hpux9*) 588772b676d7Smrg if test "$GCC" = yes; then 588872b676d7Smrg _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' 588972b676d7Smrg else 589072b676d7Smrg _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' 589172b676d7Smrg fi 589272b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 589372b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 589472b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 589572b676d7Smrg 589672b676d7Smrg # hardcode_minus_L: Not really in the search PATH, 589772b676d7Smrg # but as the default location of the library. 589872b676d7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 589972b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 590072b676d7Smrg ;; 590172b676d7Smrg 590272b676d7Smrg hpux10*) 590372b676d7Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 590472b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 590572b676d7Smrg else 590672b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 590772b676d7Smrg fi 590872b676d7Smrg if test "$with_gnu_ld" = no; then 590972b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 591072b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 591172b676d7Smrg 591272b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 591372b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 591472b676d7Smrg 591572b676d7Smrg # hardcode_minus_L: Not really in the search PATH, 591672b676d7Smrg # but as the default location of the library. 591772b676d7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 591872b676d7Smrg fi 591972b676d7Smrg ;; 592072b676d7Smrg 592172b676d7Smrg hpux11*) 592272b676d7Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 592372b676d7Smrg case $host_cpu in 592472b676d7Smrg hppa*64*) 592572b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 592672b676d7Smrg ;; 592772b676d7Smrg ia64*) 592872b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 592972b676d7Smrg ;; 593072b676d7Smrg *) 593172b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 593272b676d7Smrg ;; 593372b676d7Smrg esac 593472b676d7Smrg else 593572b676d7Smrg case $host_cpu in 593672b676d7Smrg hppa*64*) 593772b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 593872b676d7Smrg ;; 593972b676d7Smrg ia64*) 594072b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 594172b676d7Smrg ;; 594272b676d7Smrg *) 594372b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 594472b676d7Smrg ;; 594572b676d7Smrg esac 594672b676d7Smrg fi 594772b676d7Smrg if test "$with_gnu_ld" = no; then 594872b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 594972b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 595072b676d7Smrg 595172b676d7Smrg case $host_cpu in 595272b676d7Smrg hppa*64*|ia64*) 595372b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 595472b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 595572b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 595672b676d7Smrg ;; 595772b676d7Smrg *) 595872b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 595972b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 596072b676d7Smrg 596172b676d7Smrg # hardcode_minus_L: Not really in the search PATH, 596272b676d7Smrg # but as the default location of the library. 596372b676d7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 596472b676d7Smrg ;; 596572b676d7Smrg esac 596672b676d7Smrg fi 596772b676d7Smrg ;; 596872b676d7Smrg 596972b676d7Smrg irix5* | irix6* | nonstopux*) 597072b676d7Smrg if test "$GCC" = yes; then 597172b676d7Smrg _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' 597272b676d7Smrg else 597372b676d7Smrg _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' 597472b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 597572b676d7Smrg fi 597672b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 597772b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 597872b676d7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 597972b676d7Smrg ;; 598072b676d7Smrg 598172b676d7Smrg netbsd* | netbsdelf*-gnu) 598272b676d7Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 598372b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 598472b676d7Smrg else 598572b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 598672b676d7Smrg fi 598772b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 598872b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 598972b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 599072b676d7Smrg ;; 599172b676d7Smrg 599272b676d7Smrg newsos6) 599372b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 599472b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 599572b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 599672b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 599772b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 599872b676d7Smrg ;; 599972b676d7Smrg 600072b676d7Smrg openbsd*) 600172b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 600272b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 600372b676d7Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 600472b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 600572b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 600672b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 600772b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 600872b676d7Smrg else 600972b676d7Smrg case $host_os in 601072b676d7Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 601172b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 601272b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 601372b676d7Smrg ;; 601472b676d7Smrg *) 601572b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 601672b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 601772b676d7Smrg ;; 601872b676d7Smrg esac 601972b676d7Smrg fi 602072b676d7Smrg ;; 602172b676d7Smrg 602272b676d7Smrg os2*) 602372b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 602472b676d7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 602572b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 602672b676d7Smrg _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' 602772b676d7Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 602872b676d7Smrg ;; 602972b676d7Smrg 603072b676d7Smrg osf3*) 603172b676d7Smrg if test "$GCC" = yes; then 603272b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 603372b676d7Smrg _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' 603472b676d7Smrg else 603572b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 603672b676d7Smrg _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' 603772b676d7Smrg fi 603872b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 603972b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 604072b676d7Smrg ;; 604172b676d7Smrg 604272b676d7Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 604372b676d7Smrg if test "$GCC" = yes; then 604472b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 604572b676d7Smrg _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' 604672b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 604772b676d7Smrg else 604872b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 604972b676d7Smrg _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' 605072b676d7Smrg _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~ 605172b676d7Smrg $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' 605272b676d7Smrg 605372b676d7Smrg # Both c and cxx compiler support -rpath directly 605472b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 605572b676d7Smrg fi 605672b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 605772b676d7Smrg ;; 605872b676d7Smrg 605972b676d7Smrg solaris*) 606072b676d7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 606172b676d7Smrg if test "$GCC" = yes; then 606272b676d7Smrg wlarc='${wl}' 606372b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 606472b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 606572b676d7Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 606672b676d7Smrg else 606772b676d7Smrg wlarc='' 606872b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 606972b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 607072b676d7Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 607172b676d7Smrg fi 607272b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 607372b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 607472b676d7Smrg case $host_os in 607572b676d7Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 607672b676d7Smrg *) 607772b676d7Smrg # The compiler driver will combine linker options so we 607872b676d7Smrg # cannot just pass the convience library names through 607972b676d7Smrg # without $wl, iff we do not link with $LD. 608072b676d7Smrg # Luckily, gcc supports the same syntax we need for Sun Studio. 608172b676d7Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 608272b676d7Smrg case $wlarc in 608372b676d7Smrg '') 608472b676d7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 608572b676d7Smrg *) 608672b676d7Smrg _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' ;; 608772b676d7Smrg esac ;; 608872b676d7Smrg esac 608972b676d7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 609072b676d7Smrg ;; 609172b676d7Smrg 609272b676d7Smrg sunos4*) 609372b676d7Smrg if test "x$host_vendor" = xsequent; then 609472b676d7Smrg # Use $CC to link under sequent, because it throws in some extra .o 609572b676d7Smrg # files that make .init and .fini sections work. 609672b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 609772b676d7Smrg else 609872b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 609972b676d7Smrg fi 610072b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 610172b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 610272b676d7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 610372b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 610472b676d7Smrg ;; 610572b676d7Smrg 610672b676d7Smrg sysv4) 610772b676d7Smrg case $host_vendor in 610872b676d7Smrg sni) 610972b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 611072b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 611172b676d7Smrg ;; 611272b676d7Smrg siemens) 611372b676d7Smrg ## LD is ld it makes a PLAMLIB 611472b676d7Smrg ## CC just makes a GrossModule. 611572b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 611672b676d7Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 611772b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 611872b676d7Smrg ;; 611972b676d7Smrg motorola) 612072b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 612172b676d7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 612272b676d7Smrg ;; 612372b676d7Smrg esac 612472b676d7Smrg runpath_var='LD_RUN_PATH' 612572b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 612672b676d7Smrg ;; 612772b676d7Smrg 612872b676d7Smrg sysv4.3*) 612972b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 613072b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 613172b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 613272b676d7Smrg ;; 613372b676d7Smrg 613472b676d7Smrg sysv4*MP*) 613572b676d7Smrg if test -d /usr/nec; then 613672b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 613772b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 613872b676d7Smrg runpath_var=LD_RUN_PATH 613972b676d7Smrg hardcode_runpath_var=yes 614072b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 614172b676d7Smrg fi 614272b676d7Smrg ;; 614372b676d7Smrg 614472b676d7Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) 614572b676d7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 614672b676d7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 614772b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 614872b676d7Smrg runpath_var='LD_RUN_PATH' 614972b676d7Smrg 615072b676d7Smrg if test "$GCC" = yes; then 615172b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 615272b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 615372b676d7Smrg else 615472b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 615572b676d7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 615672b676d7Smrg fi 615772b676d7Smrg ;; 615872b676d7Smrg 615972b676d7Smrg sysv5* | sco3.2v5* | sco5v6*) 616072b676d7Smrg # Note: We can NOT use -z defs as we might desire, because we do not 616172b676d7Smrg # link with -lc, and that would cause any symbols used from libc to 616272b676d7Smrg # always be unresolved, which means just about no library would 616372b676d7Smrg # ever link correctly. If we're not using GNU ld we use -z text 616472b676d7Smrg # though, which does catch some bad symbols but isn't as heavy-handed 616572b676d7Smrg # as -z defs. 616672b676d7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 616772b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 616872b676d7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 616972b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 617072b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 617172b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 617272b676d7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 617372b676d7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 617472b676d7Smrg runpath_var='LD_RUN_PATH' 617572b676d7Smrg 617672b676d7Smrg if test "$GCC" = yes; then 617772b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 617872b676d7Smrg _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' 617972b676d7Smrg else 618072b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 618172b676d7Smrg _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' 618272b676d7Smrg fi 618372b676d7Smrg ;; 618472b676d7Smrg 618572b676d7Smrg uts4*) 618672b676d7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 618772b676d7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 618872b676d7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 618972b676d7Smrg ;; 619072b676d7Smrg 619172b676d7Smrg *) 619272b676d7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 619372b676d7Smrg ;; 619472b676d7Smrg esac 619572b676d7Smrg fi 619672b676d7Smrg]) 619772b676d7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 619872b676d7Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 619972b676d7Smrg 620072b676d7Smrg# 620172b676d7Smrg# Do we need to explicitly link libc? 620272b676d7Smrg# 620372b676d7Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 620472b676d7Smrgx|xyes) 620572b676d7Smrg # Assume -lc should be added 620672b676d7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 620772b676d7Smrg 620872b676d7Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 620972b676d7Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 621072b676d7Smrg *'~'*) 621172b676d7Smrg # FIXME: we may have to deal with multi-command sequences. 621272b676d7Smrg ;; 621372b676d7Smrg '$CC '*) 621472b676d7Smrg # Test whether the compiler implicitly links with -lc since on some 621572b676d7Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 621672b676d7Smrg # to ld, don't add -lc before -lgcc. 621772b676d7Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 621872b676d7Smrg $rm conftest* 621972b676d7Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 622072b676d7Smrg 622172b676d7Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 622272b676d7Smrg soname=conftest 622372b676d7Smrg lib=conftest 622472b676d7Smrg libobjs=conftest.$ac_objext 622572b676d7Smrg deplibs= 622672b676d7Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 622772b676d7Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 622872b676d7Smrg compiler_flags=-v 622972b676d7Smrg linker_flags=-v 623072b676d7Smrg verstring= 623172b676d7Smrg output_objdir=. 623272b676d7Smrg libname=conftest 623372b676d7Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 623472b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 623572b676d7Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 623672b676d7Smrg then 623772b676d7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 623872b676d7Smrg else 623972b676d7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 624072b676d7Smrg fi 624172b676d7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 624272b676d7Smrg else 624372b676d7Smrg cat conftest.err 1>&5 624472b676d7Smrg fi 624572b676d7Smrg $rm conftest* 624672b676d7Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 624772b676d7Smrg ;; 624872b676d7Smrg esac 624972b676d7Smrg fi 625072b676d7Smrg ;; 625172b676d7Smrgesac 625272b676d7Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 625372b676d7Smrg 625472b676d7Smrg 625572b676d7Smrg# _LT_AC_FILE_LTDLL_C 625672b676d7Smrg# ------------------- 625772b676d7Smrg# Be careful that the start marker always follows a newline. 625872b676d7SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 625972b676d7Smrg# /* ltdll.c starts here */ 626072b676d7Smrg# #define WIN32_LEAN_AND_MEAN 626172b676d7Smrg# #include <windows.h> 626272b676d7Smrg# #undef WIN32_LEAN_AND_MEAN 626372b676d7Smrg# #include <stdio.h> 626472b676d7Smrg# 626572b676d7Smrg# #ifndef __CYGWIN__ 626672b676d7Smrg# # ifdef __CYGWIN32__ 626772b676d7Smrg# # define __CYGWIN__ __CYGWIN32__ 626872b676d7Smrg# # endif 626972b676d7Smrg# #endif 627072b676d7Smrg# 627172b676d7Smrg# #ifdef __cplusplus 627272b676d7Smrg# extern "C" { 627372b676d7Smrg# #endif 627472b676d7Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 627572b676d7Smrg# #ifdef __cplusplus 627672b676d7Smrg# } 627772b676d7Smrg# #endif 627872b676d7Smrg# 627972b676d7Smrg# #ifdef __CYGWIN__ 628072b676d7Smrg# #include <cygwin/cygwin_dll.h> 628172b676d7Smrg# DECLARE_CYGWIN_DLL( DllMain ); 628272b676d7Smrg# #endif 628372b676d7Smrg# HINSTANCE __hDllInstance_base; 628472b676d7Smrg# 628572b676d7Smrg# BOOL APIENTRY 628672b676d7Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 628772b676d7Smrg# { 628872b676d7Smrg# __hDllInstance_base = hInst; 628972b676d7Smrg# return TRUE; 629072b676d7Smrg# } 629172b676d7Smrg# /* ltdll.c ends here */ 629272b676d7Smrg])# _LT_AC_FILE_LTDLL_C 629372b676d7Smrg 629472b676d7Smrg 629572b676d7Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 629672b676d7Smrg# --------------------------------- 629772b676d7SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 629872b676d7Smrg 629972b676d7Smrg 630072b676d7Smrg# old names 630172b676d7SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 630272b676d7SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 630372b676d7SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 630472b676d7SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 630572b676d7SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 630672b676d7SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 630772b676d7SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 630872b676d7Smrg 630972b676d7Smrg# This is just to silence aclocal about the macro not being used 631072b676d7Smrgifelse([AC_DISABLE_FAST_INSTALL]) 631172b676d7Smrg 631272b676d7SmrgAC_DEFUN([LT_AC_PROG_GCJ], 631372b676d7Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 631472b676d7Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 631572b676d7Smrg AC_SUBST(GCJFLAGS) 631672b676d7Smrg]) 631772b676d7Smrg 631872b676d7SmrgAC_DEFUN([LT_AC_PROG_RC], 631972b676d7Smrg[AC_CHECK_TOOL(RC, windres, no) 632072b676d7Smrg]) 632172b676d7Smrg 632272b676d7Smrg# NOTE: This macro has been submitted for inclusion into # 632372b676d7Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 632472b676d7Smrg# a released version of Autoconf we should remove this # 632572b676d7Smrg# macro and use it instead. # 632672b676d7Smrg# LT_AC_PROG_SED 632772b676d7Smrg# -------------- 632872b676d7Smrg# Check for a fully-functional sed program, that truncates 632972b676d7Smrg# as few characters as possible. Prefer GNU sed if found. 633072b676d7SmrgAC_DEFUN([LT_AC_PROG_SED], 633172b676d7Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 633272b676d7SmrgAC_CACHE_VAL(lt_cv_path_SED, 633372b676d7Smrg[# Loop through the user's path and test for sed and gsed. 633472b676d7Smrg# Then use that list of sed's as ones to test for truncation. 633572b676d7Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 633672b676d7Smrgfor as_dir in $PATH 633772b676d7Smrgdo 633872b676d7Smrg IFS=$as_save_IFS 633972b676d7Smrg test -z "$as_dir" && as_dir=. 634072b676d7Smrg for lt_ac_prog in sed gsed; do 634172b676d7Smrg for ac_exec_ext in '' $ac_executable_extensions; do 634272b676d7Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 634372b676d7Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 634472b676d7Smrg fi 634572b676d7Smrg done 634672b676d7Smrg done 634772b676d7Smrgdone 634872b676d7Smrglt_ac_max=0 634972b676d7Smrglt_ac_count=0 635072b676d7Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 635172b676d7Smrg# along with /bin/sed that truncates output. 635272b676d7Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 635372b676d7Smrg test ! -f $lt_ac_sed && continue 635472b676d7Smrg cat /dev/null > conftest.in 635572b676d7Smrg lt_ac_count=0 635672b676d7Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 635772b676d7Smrg # Check for GNU sed and select it if it is found. 635872b676d7Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 635972b676d7Smrg lt_cv_path_SED=$lt_ac_sed 636072b676d7Smrg break 636172b676d7Smrg fi 636272b676d7Smrg while true; do 636372b676d7Smrg cat conftest.in conftest.in >conftest.tmp 636472b676d7Smrg mv conftest.tmp conftest.in 636572b676d7Smrg cp conftest.in conftest.nl 636672b676d7Smrg echo >>conftest.nl 636772b676d7Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 636872b676d7Smrg cmp -s conftest.out conftest.nl || break 636972b676d7Smrg # 10000 chars as input seems more than enough 637072b676d7Smrg test $lt_ac_count -gt 10 && break 637172b676d7Smrg lt_ac_count=`expr $lt_ac_count + 1` 637272b676d7Smrg if test $lt_ac_count -gt $lt_ac_max; then 637372b676d7Smrg lt_ac_max=$lt_ac_count 637472b676d7Smrg lt_cv_path_SED=$lt_ac_sed 637572b676d7Smrg fi 637672b676d7Smrg done 637772b676d7Smrgdone 637872b676d7Smrg]) 637972b676d7SmrgSED=$lt_cv_path_SED 638072b676d7SmrgAC_MSG_RESULT([$SED]) 638172b676d7Smrg]) 638272b676d7Smrg 638372b676d7Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 638472b676d7Smrg# 638572b676d7Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 638672b676d7Smrg# 638772b676d7Smrg# This program is free software; you can redistribute it and/or modify 638872b676d7Smrg# it under the terms of the GNU General Public License as published by 638972b676d7Smrg# the Free Software Foundation; either version 2 of the License, or 639072b676d7Smrg# (at your option) any later version. 639172b676d7Smrg# 639272b676d7Smrg# This program is distributed in the hope that it will be useful, but 639372b676d7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 639472b676d7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 639572b676d7Smrg# General Public License for more details. 639672b676d7Smrg# 639772b676d7Smrg# You should have received a copy of the GNU General Public License 639872b676d7Smrg# along with this program; if not, write to the Free Software 639972b676d7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 640072b676d7Smrg# 640172b676d7Smrg# As a special exception to the GNU General Public License, if you 640272b676d7Smrg# distribute this file as part of a program that contains a 640372b676d7Smrg# configuration script generated by Autoconf, you may include it under 640472b676d7Smrg# the same distribution terms that you use for the rest of that program. 640572b676d7Smrg 640672b676d7Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 640772b676d7Smrg# ---------------------------------- 640872b676d7SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 640972b676d7Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 641072b676d7Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 641172b676d7SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 641272b676d7Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 641372b676d7Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 641472b676d7Smrgfi 641572b676d7Smrgif test -n "$PKG_CONFIG"; then 641672b676d7Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 641772b676d7Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 641872b676d7Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 641972b676d7Smrg AC_MSG_RESULT([yes]) 642072b676d7Smrg else 642172b676d7Smrg AC_MSG_RESULT([no]) 642272b676d7Smrg PKG_CONFIG="" 642372b676d7Smrg fi 642472b676d7Smrg 642572b676d7Smrgfi[]dnl 642672b676d7Smrg])# PKG_PROG_PKG_CONFIG 642772b676d7Smrg 642872b676d7Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 642972b676d7Smrg# 643072b676d7Smrg# Check to see whether a particular set of modules exists. Similar 643172b676d7Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 643272b676d7Smrg# 643372b676d7Smrg# 643472b676d7Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 643572b676d7Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 643672b676d7Smrg# PKG_CHECK_EXISTS manually 643772b676d7Smrg# -------------------------------------------------------------- 643872b676d7SmrgAC_DEFUN([PKG_CHECK_EXISTS], 643972b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 644072b676d7Smrgif test -n "$PKG_CONFIG" && \ 644172b676d7Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 644272b676d7Smrg m4_ifval([$2], [$2], [:]) 644372b676d7Smrgm4_ifvaln([$3], [else 644472b676d7Smrg $3])dnl 644572b676d7Smrgfi]) 644672b676d7Smrg 644772b676d7Smrg 644872b676d7Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 644972b676d7Smrg# --------------------------------------------- 645072b676d7Smrgm4_define([_PKG_CONFIG], 645172b676d7Smrg[if test -n "$PKG_CONFIG"; then 645272b676d7Smrg if test -n "$$1"; then 645372b676d7Smrg pkg_cv_[]$1="$$1" 645472b676d7Smrg else 645572b676d7Smrg PKG_CHECK_EXISTS([$3], 645672b676d7Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 645772b676d7Smrg [pkg_failed=yes]) 645872b676d7Smrg fi 645972b676d7Smrgelse 646072b676d7Smrg pkg_failed=untried 646172b676d7Smrgfi[]dnl 646272b676d7Smrg])# _PKG_CONFIG 646372b676d7Smrg 646472b676d7Smrg# _PKG_SHORT_ERRORS_SUPPORTED 646572b676d7Smrg# ----------------------------- 646672b676d7SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 646772b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 646872b676d7Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 646972b676d7Smrg _pkg_short_errors_supported=yes 647072b676d7Smrgelse 647172b676d7Smrg _pkg_short_errors_supported=no 647272b676d7Smrgfi[]dnl 647372b676d7Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 647472b676d7Smrg 647572b676d7Smrg 647672b676d7Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 647772b676d7Smrg# [ACTION-IF-NOT-FOUND]) 647872b676d7Smrg# 647972b676d7Smrg# 648072b676d7Smrg# Note that if there is a possibility the first call to 648172b676d7Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 648272b676d7Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 648372b676d7Smrg# 648472b676d7Smrg# 648572b676d7Smrg# -------------------------------------------------------------- 648672b676d7SmrgAC_DEFUN([PKG_CHECK_MODULES], 648772b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 648872b676d7SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 648972b676d7SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 649072b676d7Smrg 649172b676d7Smrgpkg_failed=no 649272b676d7SmrgAC_MSG_CHECKING([for $1]) 649372b676d7Smrg 649472b676d7Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 649572b676d7Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 649672b676d7Smrg 649772b676d7Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 649872b676d7Smrgand $1[]_LIBS to avoid the need to call pkg-config. 649972b676d7SmrgSee the pkg-config man page for more details.]) 650072b676d7Smrg 650172b676d7Smrgif test $pkg_failed = yes; then 650272b676d7Smrg _PKG_SHORT_ERRORS_SUPPORTED 650372b676d7Smrg if test $_pkg_short_errors_supported = yes; then 650472b676d7Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 650572b676d7Smrg else 650672b676d7Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 650772b676d7Smrg fi 650872b676d7Smrg # Put the nasty error message in config.log where it belongs 650972b676d7Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 651072b676d7Smrg 651172b676d7Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 651272b676d7Smrg[Package requirements ($2) were not met: 651372b676d7Smrg 651472b676d7Smrg$$1_PKG_ERRORS 651572b676d7Smrg 651672b676d7SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 651772b676d7Smrginstalled software in a non-standard prefix. 651872b676d7Smrg 651972b676d7Smrg_PKG_TEXT 652072b676d7Smrg])], 652172b676d7Smrg [$4]) 652272b676d7Smrgelif test $pkg_failed = untried; then 652372b676d7Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 652472b676d7Smrg[The pkg-config script could not be found or is too old. Make sure it 652572b676d7Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 652672b676d7Smrgpath to pkg-config. 652772b676d7Smrg 652872b676d7Smrg_PKG_TEXT 652972b676d7Smrg 653072b676d7SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 653172b676d7Smrg [$4]) 653272b676d7Smrgelse 653372b676d7Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 653472b676d7Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 653572b676d7Smrg AC_MSG_RESULT([yes]) 653672b676d7Smrg ifelse([$3], , :, [$3]) 653772b676d7Smrgfi[]dnl 653872b676d7Smrg])# PKG_CHECK_MODULES 653972b676d7Smrg 654072b676d7Smrgdnl 654172b676d7Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 654272b676d7Smrgdnl 654372b676d7Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 654472b676d7Smrgdnl copy of this software and associated documentation files (the 654572b676d7Smrgdnl "Software"), to deal in the Software without restriction, including 654672b676d7Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 654772b676d7Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 654872b676d7Smrgdnl to whom the Software is furnished to do so, provided that the above 654972b676d7Smrgdnl copyright notice(s) and this permission notice appear in all copies of 655072b676d7Smrgdnl the Software and that both the above copyright notice(s) and this 655172b676d7Smrgdnl permission notice appear in supporting documentation. 655272b676d7Smrgdnl 655372b676d7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 655472b676d7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 655572b676d7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 655672b676d7Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 655772b676d7Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 655872b676d7Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 655972b676d7Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 656072b676d7Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 656172b676d7Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 656272b676d7Smrgdnl 656372b676d7Smrgdnl Except as contained in this notice, the name of a copyright holder 656472b676d7Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 656572b676d7Smrgdnl or other dealings in this Software without prior written authorization 656672b676d7Smrgdnl of the copyright holder. 656772b676d7Smrg 656872b676d7Smrg# XORG_MACROS_VERSION(required-version) 656972b676d7Smrg# ------------------------------------- 657072b676d7Smrg# Minimum version: 1.1.0 657172b676d7Smrg# 657272b676d7Smrg# If you're using a macro added in Version 1.1 or newer, include this in 657372b676d7Smrg# your configure.ac with the minimum required version, such as: 657472b676d7Smrg# XORG_MACROS_VERSION(1.1) 657572b676d7Smrg# 657672b676d7Smrg# To force at least a version with this macro defined, also add: 657772b676d7Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 657872b676d7Smrg# 657972b676d7Smrg# 658072b676d7Smrg# See the "minimum version" comment for each macro you use to see what 658172b676d7Smrg# version you require. 658272b676d7SmrgAC_DEFUN([XORG_MACROS_VERSION],[ 658372b676d7Smrg [XORG_MACROS_needed_version=$1 658472b676d7Smrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 658572b676d7Smrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 658672b676d7Smrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 658772b676d7Smrg [XORG_MACROS_version=1.1.1 658872b676d7Smrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 658972b676d7Smrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 659072b676d7Smrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 659172b676d7Smrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 659272b676d7Smrg fi 659372b676d7Smrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 659472b676d7Smrg 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]) 659572b676d7Smrg fi 659672b676d7Smrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 659772b676d7Smrg]) # XORG_MACROS_VERSION 659872b676d7Smrg 659972b676d7Smrg# XORG_PROG_RAWCPP() 660072b676d7Smrg# ------------------ 660172b676d7Smrg# Minimum version: 1.0.0 660272b676d7Smrg# 660372b676d7Smrg# Find cpp program and necessary flags for use in pre-processing text files 660472b676d7Smrg# such as man pages and config files 660572b676d7SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 660672b676d7SmrgAC_REQUIRE([AC_PROG_CPP]) 660772b676d7SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 660872b676d7Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 660972b676d7Smrg 661072b676d7Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 661172b676d7Smrg# which is not the best choice for supporting other OS'es, but covers most 661272b676d7Smrg# of the ones we need for now. 661372b676d7SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 661472b676d7SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 661572b676d7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 661672b676d7Smrg AC_MSG_RESULT([no]) 661772b676d7Smrgelse 661872b676d7Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 661972b676d7Smrg RAWCPPFLAGS=-undef 662072b676d7Smrg AC_MSG_RESULT([yes]) 662172b676d7Smrg else 662272b676d7Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 662372b676d7Smrg fi 662472b676d7Smrgfi 662572b676d7Smrgrm -f conftest.$ac_ext 662672b676d7Smrg 662772b676d7SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 662872b676d7SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 662972b676d7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 663072b676d7Smrg AC_MSG_RESULT([no]) 663172b676d7Smrgelse 663272b676d7Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 663372b676d7Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 663472b676d7Smrg AC_MSG_RESULT([yes]) 663572b676d7Smrg else 663672b676d7Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 663772b676d7Smrg fi 663872b676d7Smrgfi 663972b676d7Smrgrm -f conftest.$ac_ext 664072b676d7SmrgAC_SUBST(RAWCPPFLAGS) 664172b676d7Smrg]) # XORG_PROG_RAWCPP 664272b676d7Smrg 664372b676d7Smrg# XORG_MANPAGE_SECTIONS() 664472b676d7Smrg# ----------------------- 664572b676d7Smrg# Minimum version: 1.0.0 664672b676d7Smrg# 664772b676d7Smrg# Determine which sections man pages go in for the different man page types 664872b676d7Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 664972b676d7Smrg# Not sure if there's any better way than just hardcoding by OS name. 665072b676d7Smrg# Override default settings by setting environment variables 665172b676d7Smrg 665272b676d7SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 665372b676d7SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 665472b676d7Smrg 665572b676d7Smrgif test x$APP_MAN_SUFFIX = x ; then 665672b676d7Smrg APP_MAN_SUFFIX=1 665772b676d7Smrgfi 665872b676d7Smrgif test x$APP_MAN_DIR = x ; then 665972b676d7Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 666072b676d7Smrgfi 666172b676d7Smrg 666272b676d7Smrgif test x$LIB_MAN_SUFFIX = x ; then 666372b676d7Smrg LIB_MAN_SUFFIX=3 666472b676d7Smrgfi 666572b676d7Smrgif test x$LIB_MAN_DIR = x ; then 666672b676d7Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 666772b676d7Smrgfi 666872b676d7Smrg 666972b676d7Smrgif test x$FILE_MAN_SUFFIX = x ; then 667072b676d7Smrg case $host_os in 667172b676d7Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 667272b676d7Smrg *) FILE_MAN_SUFFIX=5 ;; 667372b676d7Smrg esac 667472b676d7Smrgfi 667572b676d7Smrgif test x$FILE_MAN_DIR = x ; then 667672b676d7Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 667772b676d7Smrgfi 667872b676d7Smrg 667972b676d7Smrgif test x$MISC_MAN_SUFFIX = x ; then 668072b676d7Smrg case $host_os in 668172b676d7Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 668272b676d7Smrg *) MISC_MAN_SUFFIX=7 ;; 668372b676d7Smrg esac 668472b676d7Smrgfi 668572b676d7Smrgif test x$MISC_MAN_DIR = x ; then 668672b676d7Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 668772b676d7Smrgfi 668872b676d7Smrg 668972b676d7Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 669072b676d7Smrg case $host_os in 669172b676d7Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 669272b676d7Smrg *) DRIVER_MAN_SUFFIX=4 ;; 669372b676d7Smrg esac 669472b676d7Smrgfi 669572b676d7Smrgif test x$DRIVER_MAN_DIR = x ; then 669672b676d7Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 669772b676d7Smrgfi 669872b676d7Smrg 669972b676d7Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 670072b676d7Smrg case $host_os in 670172b676d7Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 670272b676d7Smrg *) ADMIN_MAN_SUFFIX=8 ;; 670372b676d7Smrg esac 670472b676d7Smrgfi 670572b676d7Smrgif test x$ADMIN_MAN_DIR = x ; then 670672b676d7Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 670772b676d7Smrgfi 670872b676d7Smrg 670972b676d7Smrg 671072b676d7SmrgAC_SUBST([APP_MAN_SUFFIX]) 671172b676d7SmrgAC_SUBST([LIB_MAN_SUFFIX]) 671272b676d7SmrgAC_SUBST([FILE_MAN_SUFFIX]) 671372b676d7SmrgAC_SUBST([MISC_MAN_SUFFIX]) 671472b676d7SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 671572b676d7SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 671672b676d7SmrgAC_SUBST([APP_MAN_DIR]) 671772b676d7SmrgAC_SUBST([LIB_MAN_DIR]) 671872b676d7SmrgAC_SUBST([FILE_MAN_DIR]) 671972b676d7SmrgAC_SUBST([MISC_MAN_DIR]) 672072b676d7SmrgAC_SUBST([DRIVER_MAN_DIR]) 672172b676d7SmrgAC_SUBST([ADMIN_MAN_DIR]) 672272b676d7Smrg]) # XORG_MANPAGE_SECTIONS 672372b676d7Smrg 672472b676d7Smrg# XORG_CHECK_LINUXDOC 672572b676d7Smrg# ------------------- 672672b676d7Smrg# Minimum version: 1.0.0 672772b676d7Smrg# 672872b676d7Smrg# Defines the variable MAKE_TEXT if the necessary tools and 672972b676d7Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 673072b676d7Smrg# Whether or not the necessary tools and files are found can be checked 673172b676d7Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 673272b676d7SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 673372b676d7SmrgXORG_SGML_PATH=$prefix/share/sgml 673472b676d7SmrgHAVE_DEFS_ENT= 673572b676d7Smrg 673672b676d7SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 673772b676d7Smrg 673872b676d7SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 673972b676d7SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 674072b676d7Smrg 674172b676d7SmrgAC_MSG_CHECKING([Whether to build documentation]) 674272b676d7Smrg 674372b676d7Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 674472b676d7Smrg BUILDDOC=yes 674572b676d7Smrgelse 674672b676d7Smrg BUILDDOC=no 674772b676d7Smrgfi 674872b676d7Smrg 674972b676d7SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 675072b676d7Smrg 675172b676d7SmrgAC_MSG_RESULT([$BUILDDOC]) 675272b676d7Smrg 675372b676d7SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 675472b676d7Smrg 675572b676d7Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 675672b676d7Smrg BUILDPDFDOC=yes 675772b676d7Smrgelse 675872b676d7Smrg BUILDPDFDOC=no 675972b676d7Smrgfi 676072b676d7Smrg 676172b676d7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 676272b676d7Smrg 676372b676d7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 676472b676d7Smrg 676572b676d7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 676672b676d7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 676772b676d7SmrgMAKE_PDF="$PS2PDF" 676872b676d7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 676972b676d7Smrg 677072b676d7SmrgAC_SUBST(MAKE_TEXT) 677172b676d7SmrgAC_SUBST(MAKE_PS) 677272b676d7SmrgAC_SUBST(MAKE_PDF) 677372b676d7SmrgAC_SUBST(MAKE_HTML) 677472b676d7Smrg]) # XORG_CHECK_LINUXDOC 677572b676d7Smrg 677672b676d7Smrg# XORG_CHECK_DOCBOOK 677772b676d7Smrg# ------------------- 677872b676d7Smrg# Minimum version: 1.0.0 677972b676d7Smrg# 678072b676d7Smrg# Checks for the ability to build output formats from SGML DocBook source. 678172b676d7Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 678272b676d7Smrg# indicates whether the necessary tools and files are found and, if set, 678372b676d7Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 678472b676d7SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 678572b676d7SmrgXORG_SGML_PATH=$prefix/share/sgml 678672b676d7SmrgHAVE_DEFS_ENT= 678772b676d7SmrgBUILDTXTDOC=no 678872b676d7SmrgBUILDPDFDOC=no 678972b676d7SmrgBUILDPSDOC=no 679072b676d7SmrgBUILDHTMLDOC=no 679172b676d7Smrg 679272b676d7SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 679372b676d7Smrg 679472b676d7SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 679572b676d7SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 679672b676d7SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 679772b676d7SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 679872b676d7Smrg 679972b676d7SmrgAC_MSG_CHECKING([Whether to build text documentation]) 680072b676d7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 680172b676d7Smrg test x$BUILD_TXTDOC != xno; then 680272b676d7Smrg BUILDTXTDOC=yes 680372b676d7Smrgfi 680472b676d7SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 680572b676d7SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 680672b676d7Smrg 680772b676d7SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 680872b676d7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 680972b676d7Smrg test x$BUILD_PDFDOC != xno; then 681072b676d7Smrg BUILDPDFDOC=yes 681172b676d7Smrgfi 681272b676d7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 681372b676d7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 681472b676d7Smrg 681572b676d7SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 681672b676d7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 681772b676d7Smrg test x$BUILD_PSDOC != xno; then 681872b676d7Smrg BUILDPSDOC=yes 681972b676d7Smrgfi 682072b676d7SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 682172b676d7SmrgAC_MSG_RESULT([$BUILDPSDOC]) 682272b676d7Smrg 682372b676d7SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 682472b676d7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 682572b676d7Smrg test x$BUILD_HTMLDOC != xno; then 682672b676d7Smrg BUILDHTMLDOC=yes 682772b676d7Smrgfi 682872b676d7SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 682972b676d7SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 683072b676d7Smrg 683172b676d7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 683272b676d7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 683372b676d7SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 683472b676d7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 683572b676d7Smrg 683672b676d7SmrgAC_SUBST(MAKE_TEXT) 683772b676d7SmrgAC_SUBST(MAKE_PS) 683872b676d7SmrgAC_SUBST(MAKE_PDF) 683972b676d7SmrgAC_SUBST(MAKE_HTML) 684072b676d7Smrg]) # XORG_CHECK_DOCBOOK 684172b676d7Smrg 684272b676d7Smrg# XORG_CHECK_MALLOC_ZERO 684372b676d7Smrg# ---------------------- 684472b676d7Smrg# Minimum version: 1.0.0 684572b676d7Smrg# 684672b676d7Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 684772b676d7Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 684872b676d7Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 684972b676d7SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 685072b676d7SmrgAC_ARG_ENABLE(malloc0returnsnull, 685172b676d7Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 685272b676d7Smrg [malloc(0) returns NULL (default: auto)]), 685372b676d7Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 685472b676d7Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 685572b676d7Smrg 685672b676d7SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 685772b676d7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 685872b676d7Smrg AC_RUN_IFELSE([ 685972b676d7Smrgchar *malloc(); 686072b676d7Smrgchar *realloc(); 686172b676d7Smrgchar *calloc(); 686272b676d7Smrgmain() { 686372b676d7Smrg char *m0, *r0, *c0, *p; 686472b676d7Smrg m0 = malloc(0); 686572b676d7Smrg p = malloc(10); 686672b676d7Smrg r0 = realloc(p,0); 686772b676d7Smrg c0 = calloc(0); 686872b676d7Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 686972b676d7Smrg}], 687072b676d7Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 687172b676d7Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 687272b676d7Smrgfi 687372b676d7SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 687472b676d7Smrg 687572b676d7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 687672b676d7Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 687772b676d7Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 687872b676d7Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 687972b676d7Smrgelse 688072b676d7Smrg MALLOC_ZERO_CFLAGS="" 688172b676d7Smrg XMALLOC_ZERO_CFLAGS="" 688272b676d7Smrg XTMALLOC_ZERO_CFLAGS="" 688372b676d7Smrgfi 688472b676d7Smrg 688572b676d7SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 688672b676d7SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 688772b676d7SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 688872b676d7Smrg]) # XORG_CHECK_MALLOC_ZERO 688972b676d7Smrg 689072b676d7Smrg# XORG_WITH_LINT() 689172b676d7Smrg# ---------------- 689272b676d7Smrg# Minimum version: 1.1.0 689372b676d7Smrg# 689472b676d7Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 689572b676d7Smrg# is specified. (Use --with-lint=sparse for sparse.) 689672b676d7Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 689772b676d7Smrg# Sets $LINT_FLAGS to flags to pass to source checker 689872b676d7Smrg# Sets LINT automake conditional if enabled (default: disabled) 689972b676d7Smrg# 690072b676d7SmrgAC_DEFUN([XORG_WITH_LINT],[ 690172b676d7Smrg 690272b676d7Smrg# Allow checking code with lint, sparse, etc. 690372b676d7SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 690472b676d7Smrg [Use a lint-style source code checker (default: disabled)])], 690572b676d7Smrg [use_lint=$withval], [use_lint=no]) 690672b676d7Smrgif test "x$use_lint" = "xyes" ; then 690772b676d7Smrg LINT="lint" 690872b676d7Smrgelse 690972b676d7Smrg LINT="$use_lint" 691072b676d7Smrgfi 691172b676d7Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 691272b676d7Smrg case $LINT in 691372b676d7Smrg lint|*/lint) 691472b676d7Smrg case $host_os in 691572b676d7Smrg solaris*) 691672b676d7Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 691772b676d7Smrg ;; 691872b676d7Smrg esac 691972b676d7Smrg ;; 692072b676d7Smrg esac 692172b676d7Smrgfi 692272b676d7Smrg 692372b676d7SmrgAC_SUBST(LINT) 692472b676d7SmrgAC_SUBST(LINT_FLAGS) 692572b676d7SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 692672b676d7Smrg 692772b676d7Smrg]) # XORG_WITH_LINT 692872b676d7Smrg 692972b676d7Smrg# XORG_LINT_LIBRARY(LIBNAME) 693072b676d7Smrg# -------------------------- 693172b676d7Smrg# Minimum version: 1.1.0 693272b676d7Smrg# 693372b676d7Smrg# Sets up flags for building lint libraries for checking programs that call 693472b676d7Smrg# functions in the library. 693572b676d7Smrg# Disabled by default, enable with --enable-lint-library 693672b676d7Smrg# Sets: 693772b676d7Smrg# @LINTLIB@ - name of lint library file to make 693872b676d7Smrg# MAKE_LINT_LIB - automake conditional 693972b676d7Smrg# 694072b676d7Smrg 694172b676d7SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 694272b676d7SmrgAC_REQUIRE([XORG_WITH_LINT]) 694372b676d7Smrg# Build lint "library" for more indepth checks of programs calling this library 694472b676d7SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 694572b676d7Smrg [Create lint library (default: disabled)])], 694672b676d7Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 694772b676d7Smrgif test "x$make_lint_lib" != "xno" ; then 694872b676d7Smrg if test "x$LINT" = "xno" ; then 694972b676d7Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 695072b676d7Smrg fi 695172b676d7Smrg if test "x$make_lint_lib" = "xyes" ; then 695272b676d7Smrg LINTLIB=llib-l$1.ln 695372b676d7Smrg else 695472b676d7Smrg LINTLIB=$make_lint_lib 695572b676d7Smrg fi 695672b676d7Smrgfi 695772b676d7SmrgAC_SUBST(LINTLIB) 695872b676d7SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 695972b676d7Smrg 696072b676d7Smrg]) # XORG_LINT_LIBRARY 696172b676d7Smrg 696272b676d7Smrgdnl Copyright 2005 Red Hat, Inc 696372b676d7Smrgdnl 696472b676d7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 696572b676d7Smrgdnl documentation for any purpose is hereby granted without fee, provided that 696672b676d7Smrgdnl the above copyright notice appear in all copies and that both that 696772b676d7Smrgdnl copyright notice and this permission notice appear in supporting 696872b676d7Smrgdnl documentation. 696972b676d7Smrgdnl 697072b676d7Smrgdnl The above copyright notice and this permission notice shall be included 697172b676d7Smrgdnl in all copies or substantial portions of the Software. 697272b676d7Smrgdnl 697372b676d7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 697472b676d7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 697572b676d7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 697672b676d7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 697772b676d7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 697872b676d7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 697972b676d7Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 698072b676d7Smrgdnl 698172b676d7Smrgdnl Except as contained in this notice, the name of the copyright holders shall 698272b676d7Smrgdnl not be used in advertising or otherwise to promote the sale, use or 698372b676d7Smrgdnl other dealings in this Software without prior written authorization 698472b676d7Smrgdnl from the copyright holders. 698572b676d7Smrgdnl 698672b676d7Smrg 698772b676d7Smrg# XORG_DRIVER_CHECK_EXT() 698872b676d7Smrg# -------------------------- 698972b676d7Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 699072b676d7Smrg# is defined, then add $1 to $REQUIRED_MODULES. 699172b676d7Smrg 699272b676d7SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 699372b676d7Smrg SAVE_CFLAGS="$CFLAGS" 699472b676d7Smrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 699572b676d7Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 699672b676d7Smrg#include "xorg-server.h" 699772b676d7Smrg#if !defined $1 699872b676d7Smrg#error $1 not defined 699972b676d7Smrg#endif 700072b676d7Smrg ]])], 700172b676d7Smrg [_EXT_CHECK=yes], 700272b676d7Smrg [_EXT_CHECK=no]) 700372b676d7Smrg CFLAGS="$SAVE_CFLAGS" 700472b676d7Smrg AC_MSG_CHECKING([if $1 is defined]) 700572b676d7Smrg AC_MSG_RESULT([$_EXT_CHECK]) 700672b676d7Smrg if test "$_EXT_CHECK" != no; then 700772b676d7Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 700872b676d7Smrg fi 700972b676d7Smrg]) 701072b676d7Smrg 701172b676d7Smrgdnl Copyright 2005 Red Hat, Inc 701272b676d7Smrgdnl 701372b676d7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 701472b676d7Smrgdnl documentation for any purpose is hereby granted without fee, provided that 701572b676d7Smrgdnl the above copyright notice appear in all copies and that both that 701672b676d7Smrgdnl copyright notice and this permission notice appear in supporting 701772b676d7Smrgdnl documentation. 701872b676d7Smrgdnl 701972b676d7Smrgdnl The above copyright notice and this permission notice shall be included 702072b676d7Smrgdnl in all copies or substantial portions of the Software. 702172b676d7Smrgdnl 702272b676d7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 702372b676d7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 702472b676d7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 702572b676d7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 702672b676d7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 702772b676d7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 702872b676d7Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 702972b676d7Smrgdnl 703072b676d7Smrgdnl Except as contained in this notice, the name of the copyright holders shall 703172b676d7Smrgdnl not be used in advertising or otherwise to promote the sale, use or 703272b676d7Smrgdnl other dealings in this Software without prior written authorization 703372b676d7Smrgdnl from the copyright holders. 703472b676d7Smrgdnl 703572b676d7Smrg 703672b676d7Smrg# XORG_RELEASE_VERSION 703772b676d7Smrg# -------------------- 703872b676d7Smrg# Adds --with/without-release-string and changes the PACKAGE and 703972b676d7Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 704072b676d7Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 704172b676d7Smrg 704272b676d7SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 704372b676d7Smrg AC_ARG_WITH(release-version, 704472b676d7Smrg AC_HELP_STRING([--with-release-version=STRING], 704572b676d7Smrg [Use release version string in package name]), 704672b676d7Smrg [RELEASE_VERSION="$withval"], 704772b676d7Smrg [RELEASE_VERSION=""]) 704872b676d7Smrg if test "x$RELEASE_VERSION" != "x"; then 704972b676d7Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 705072b676d7Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 705172b676d7Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 705272b676d7Smrg fi 705372b676d7Smrg]) 705472b676d7Smrg 705572b676d7Smrg# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. 705672b676d7Smrg# 705772b676d7Smrg# This file is free software; the Free Software Foundation 705872b676d7Smrg# gives unlimited permission to copy and/or distribute it, 705972b676d7Smrg# with or without modifications, as long as this notice is preserved. 706072b676d7Smrg 706172b676d7Smrg# AM_AUTOMAKE_VERSION(VERSION) 706272b676d7Smrg# ---------------------------- 706372b676d7Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 706472b676d7Smrg# generated from the m4 files accompanying Automake X.Y. 706572b676d7SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 706672b676d7Smrg 706772b676d7Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 706872b676d7Smrg# ------------------------------- 706972b676d7Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 707072b676d7Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 707172b676d7SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 707272b676d7Smrg [AM_AUTOMAKE_VERSION([1.9.6])]) 707372b676d7Smrg 707472b676d7Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 707572b676d7Smrg 707672b676d7Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 707772b676d7Smrg# 707872b676d7Smrg# This file is free software; the Free Software Foundation 707972b676d7Smrg# gives unlimited permission to copy and/or distribute it, 708072b676d7Smrg# with or without modifications, as long as this notice is preserved. 708172b676d7Smrg 708272b676d7Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 708372b676d7Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 708472b676d7Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 708572b676d7Smrg# 708672b676d7Smrg# Of course, Automake must honor this variable whenever it calls a 708772b676d7Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 708872b676d7Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 708972b676d7Smrg# depending on how configure is run. This is pretty annoying, since 709072b676d7Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 709172b676d7Smrg# source directory, any form will work fine, but in subdirectories a 709272b676d7Smrg# relative path needs to be adjusted first. 709372b676d7Smrg# 709472b676d7Smrg# $ac_aux_dir/missing 709572b676d7Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 709672b676d7Smrg# $top_srcdir/$ac_aux_dir/missing 709772b676d7Smrg# fails if $ac_aux_dir is absolute, 709872b676d7Smrg# fails when called from a subdirectory in a VPATH build with 709972b676d7Smrg# a relative $ac_aux_dir 710072b676d7Smrg# 710172b676d7Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 710272b676d7Smrg# are both prefixed by $srcdir. In an in-source build this is usually 710372b676d7Smrg# harmless because $srcdir is `.', but things will broke when you 710472b676d7Smrg# start a VPATH build or use an absolute $srcdir. 710572b676d7Smrg# 710672b676d7Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 710772b676d7Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 710872b676d7Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 710972b676d7Smrg# and then we would define $MISSING as 711072b676d7Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 711172b676d7Smrg# This will work as long as MISSING is not called from configure, because 711272b676d7Smrg# unfortunately $(top_srcdir) has no meaning in configure. 711372b676d7Smrg# However there are other variables, like CC, which are often used in 711472b676d7Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 711572b676d7Smrg# 711672b676d7Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 711772b676d7Smrg# absolute PATH. The drawback is that using absolute paths prevent a 711872b676d7Smrg# configured tree to be moved without reconfiguration. 711972b676d7Smrg 712072b676d7SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 712172b676d7Smrg[dnl Rely on autoconf to set up CDPATH properly. 712272b676d7SmrgAC_PREREQ([2.50])dnl 712372b676d7Smrg# expand $ac_aux_dir to an absolute path 712472b676d7Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 712572b676d7Smrg]) 712672b676d7Smrg 712772b676d7Smrg# AM_CONDITIONAL -*- Autoconf -*- 712872b676d7Smrg 712972b676d7Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 713072b676d7Smrg# Free Software Foundation, Inc. 713172b676d7Smrg# 713272b676d7Smrg# This file is free software; the Free Software Foundation 713372b676d7Smrg# gives unlimited permission to copy and/or distribute it, 713472b676d7Smrg# with or without modifications, as long as this notice is preserved. 713572b676d7Smrg 713672b676d7Smrg# serial 7 713772b676d7Smrg 713872b676d7Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 713972b676d7Smrg# ------------------------------------- 714072b676d7Smrg# Define a conditional. 714172b676d7SmrgAC_DEFUN([AM_CONDITIONAL], 714272b676d7Smrg[AC_PREREQ(2.52)dnl 714372b676d7Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 714472b676d7Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 714572b676d7SmrgAC_SUBST([$1_TRUE]) 714672b676d7SmrgAC_SUBST([$1_FALSE]) 714772b676d7Smrgif $2; then 714872b676d7Smrg $1_TRUE= 714972b676d7Smrg $1_FALSE='#' 715072b676d7Smrgelse 715172b676d7Smrg $1_TRUE='#' 715272b676d7Smrg $1_FALSE= 715372b676d7Smrgfi 715472b676d7SmrgAC_CONFIG_COMMANDS_PRE( 715572b676d7Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 715672b676d7Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 715772b676d7SmrgUsually this means the macro was only invoked conditionally.]]) 715872b676d7Smrgfi])]) 715972b676d7Smrg 716072b676d7Smrg 716172b676d7Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 716272b676d7Smrg# Free Software Foundation, Inc. 716372b676d7Smrg# 716472b676d7Smrg# This file is free software; the Free Software Foundation 716572b676d7Smrg# gives unlimited permission to copy and/or distribute it, 716672b676d7Smrg# with or without modifications, as long as this notice is preserved. 716772b676d7Smrg 716872b676d7Smrg# serial 8 716972b676d7Smrg 717072b676d7Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 717172b676d7Smrg# written in clear, in which case automake, when reading aclocal.m4, 717272b676d7Smrg# will think it sees a *use*, and therefore will trigger all it's 717372b676d7Smrg# C support machinery. Also note that it means that autoscan, seeing 717472b676d7Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 717572b676d7Smrg 717672b676d7Smrg 717772b676d7Smrg# _AM_DEPENDENCIES(NAME) 717872b676d7Smrg# ---------------------- 717972b676d7Smrg# See how the compiler implements dependency checking. 718072b676d7Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 718172b676d7Smrg# We try a few techniques and use that to set a single cache variable. 718272b676d7Smrg# 718372b676d7Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 718472b676d7Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 718572b676d7Smrg# dependency, and given that the user is not expected to run this macro, 718672b676d7Smrg# just rely on AC_PROG_CC. 718772b676d7SmrgAC_DEFUN([_AM_DEPENDENCIES], 718872b676d7Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 718972b676d7SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 719072b676d7SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 719172b676d7SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 719272b676d7Smrg 719372b676d7Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 719472b676d7Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 719572b676d7Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 719672b676d7Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 719772b676d7Smrg [depcc="$$1" am_compiler_list=]) 719872b676d7Smrg 719972b676d7SmrgAC_CACHE_CHECK([dependency style of $depcc], 720072b676d7Smrg [am_cv_$1_dependencies_compiler_type], 720172b676d7Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 720272b676d7Smrg # We make a subdir and do the tests there. Otherwise we can end up 720372b676d7Smrg # making bogus files that we don't know about and never remove. For 720472b676d7Smrg # instance it was reported that on HP-UX the gcc test will end up 720572b676d7Smrg # making a dummy file named `D' -- because `-MD' means `put the output 720672b676d7Smrg # in D'. 720772b676d7Smrg mkdir conftest.dir 720872b676d7Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 720972b676d7Smrg # using a relative directory. 721072b676d7Smrg cp "$am_depcomp" conftest.dir 721172b676d7Smrg cd conftest.dir 721272b676d7Smrg # We will build objects and dependencies in a subdirectory because 721372b676d7Smrg # it helps to detect inapplicable dependency modes. For instance 721472b676d7Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 721572b676d7Smrg # side effect of compilation, but ICC will put the dependencies in 721672b676d7Smrg # the current directory while Tru64 will put them in the object 721772b676d7Smrg # directory. 721872b676d7Smrg mkdir sub 721972b676d7Smrg 722072b676d7Smrg am_cv_$1_dependencies_compiler_type=none 722172b676d7Smrg if test "$am_compiler_list" = ""; then 722272b676d7Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 722372b676d7Smrg fi 722472b676d7Smrg for depmode in $am_compiler_list; do 722572b676d7Smrg # Setup a source with many dependencies, because some compilers 722672b676d7Smrg # like to wrap large dependency lists on column 80 (with \), and 722772b676d7Smrg # we should not choose a depcomp mode which is confused by this. 722872b676d7Smrg # 722972b676d7Smrg # We need to recreate these files for each test, as the compiler may 723072b676d7Smrg # overwrite some of them when testing with obscure command lines. 723172b676d7Smrg # This happens at least with the AIX C compiler. 723272b676d7Smrg : > sub/conftest.c 723372b676d7Smrg for i in 1 2 3 4 5 6; do 723472b676d7Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 723572b676d7Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 723672b676d7Smrg # Solaris 8's {/usr,}/bin/sh. 723772b676d7Smrg touch sub/conftst$i.h 723872b676d7Smrg done 723972b676d7Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 724072b676d7Smrg 724172b676d7Smrg case $depmode in 724272b676d7Smrg nosideeffect) 724372b676d7Smrg # after this tag, mechanisms are not by side-effect, so they'll 724472b676d7Smrg # only be used when explicitly requested 724572b676d7Smrg if test "x$enable_dependency_tracking" = xyes; then 724672b676d7Smrg continue 724772b676d7Smrg else 724872b676d7Smrg break 724972b676d7Smrg fi 725072b676d7Smrg ;; 725172b676d7Smrg none) break ;; 725272b676d7Smrg esac 725372b676d7Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 725472b676d7Smrg # mode. It turns out that the SunPro C++ compiler does not properly 725572b676d7Smrg # handle `-M -o', and we need to detect this. 725672b676d7Smrg if depmode=$depmode \ 725772b676d7Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 725872b676d7Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 725972b676d7Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 726072b676d7Smrg >/dev/null 2>conftest.err && 726172b676d7Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 726272b676d7Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 726372b676d7Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 726472b676d7Smrg # icc doesn't choke on unknown options, it will just issue warnings 726572b676d7Smrg # or remarks (even with -Werror). So we grep stderr for any message 726672b676d7Smrg # that says an option was ignored or not supported. 726772b676d7Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 726872b676d7Smrg # icc: Command line warning: ignoring option '-M'; no argument required 726972b676d7Smrg # The diagnosis changed in icc 8.0: 727072b676d7Smrg # icc: Command line remark: option '-MP' not supported 727172b676d7Smrg if (grep 'ignoring option' conftest.err || 727272b676d7Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 727372b676d7Smrg am_cv_$1_dependencies_compiler_type=$depmode 727472b676d7Smrg break 727572b676d7Smrg fi 727672b676d7Smrg fi 727772b676d7Smrg done 727872b676d7Smrg 727972b676d7Smrg cd .. 728072b676d7Smrg rm -rf conftest.dir 728172b676d7Smrgelse 728272b676d7Smrg am_cv_$1_dependencies_compiler_type=none 728372b676d7Smrgfi 728472b676d7Smrg]) 728572b676d7SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 728672b676d7SmrgAM_CONDITIONAL([am__fastdep$1], [ 728772b676d7Smrg test "x$enable_dependency_tracking" != xno \ 728872b676d7Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 728972b676d7Smrg]) 729072b676d7Smrg 729172b676d7Smrg 729272b676d7Smrg# AM_SET_DEPDIR 729372b676d7Smrg# ------------- 729472b676d7Smrg# Choose a directory name for dependency files. 729572b676d7Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 729672b676d7SmrgAC_DEFUN([AM_SET_DEPDIR], 729772b676d7Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 729872b676d7SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 729972b676d7Smrg]) 730072b676d7Smrg 730172b676d7Smrg 730272b676d7Smrg# AM_DEP_TRACK 730372b676d7Smrg# ------------ 730472b676d7SmrgAC_DEFUN([AM_DEP_TRACK], 730572b676d7Smrg[AC_ARG_ENABLE(dependency-tracking, 730672b676d7Smrg[ --disable-dependency-tracking speeds up one-time build 730772b676d7Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 730872b676d7Smrgif test "x$enable_dependency_tracking" != xno; then 730972b676d7Smrg am_depcomp="$ac_aux_dir/depcomp" 731072b676d7Smrg AMDEPBACKSLASH='\' 731172b676d7Smrgfi 731272b676d7SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 731372b676d7SmrgAC_SUBST([AMDEPBACKSLASH]) 731472b676d7Smrg]) 731572b676d7Smrg 731672b676d7Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 731772b676d7Smrg 731872b676d7Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 731972b676d7Smrg# Free Software Foundation, Inc. 732072b676d7Smrg# 732172b676d7Smrg# This file is free software; the Free Software Foundation 732272b676d7Smrg# gives unlimited permission to copy and/or distribute it, 732372b676d7Smrg# with or without modifications, as long as this notice is preserved. 732472b676d7Smrg 732572b676d7Smrg#serial 3 732672b676d7Smrg 732772b676d7Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 732872b676d7Smrg# ------------------------------ 732972b676d7SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 733072b676d7Smrg[for mf in $CONFIG_FILES; do 733172b676d7Smrg # Strip MF so we end up with the name of the file. 733272b676d7Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 733372b676d7Smrg # Check whether this is an Automake generated Makefile or not. 733472b676d7Smrg # We used to match only the files named `Makefile.in', but 733572b676d7Smrg # some people rename them; so instead we look at the file content. 733672b676d7Smrg # Grep'ing the first line is not enough: some people post-process 733772b676d7Smrg # each Makefile.in and add a new line on top of each file to say so. 733872b676d7Smrg # So let's grep whole file. 733972b676d7Smrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 734072b676d7Smrg dirpart=`AS_DIRNAME("$mf")` 734172b676d7Smrg else 734272b676d7Smrg continue 734372b676d7Smrg fi 734472b676d7Smrg # Extract the definition of DEPDIR, am__include, and am__quote 734572b676d7Smrg # from the Makefile without running `make'. 734672b676d7Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 734772b676d7Smrg test -z "$DEPDIR" && continue 734872b676d7Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 734972b676d7Smrg test -z "am__include" && continue 735072b676d7Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 735172b676d7Smrg # When using ansi2knr, U may be empty or an underscore; expand it 735272b676d7Smrg U=`sed -n 's/^U = //p' < "$mf"` 735372b676d7Smrg # Find all dependency output files, they are included files with 735472b676d7Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 735572b676d7Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 735672b676d7Smrg # expansion. 735772b676d7Smrg for file in `sed -n " 735872b676d7Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 735972b676d7Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 736072b676d7Smrg # Make sure the directory exists. 736172b676d7Smrg test -f "$dirpart/$file" && continue 736272b676d7Smrg fdir=`AS_DIRNAME(["$file"])` 736372b676d7Smrg AS_MKDIR_P([$dirpart/$fdir]) 736472b676d7Smrg # echo "creating $dirpart/$file" 736572b676d7Smrg echo '# dummy' > "$dirpart/$file" 736672b676d7Smrg done 736772b676d7Smrgdone 736872b676d7Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 736972b676d7Smrg 737072b676d7Smrg 737172b676d7Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 737272b676d7Smrg# ----------------------------- 737372b676d7Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 737472b676d7Smrg# 737572b676d7Smrg# This code is only required when automatic dependency tracking 737672b676d7Smrg# is enabled. FIXME. This creates each `.P' file that we will 737772b676d7Smrg# need in order to bootstrap the dependency handling code. 737872b676d7SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 737972b676d7Smrg[AC_CONFIG_COMMANDS([depfiles], 738072b676d7Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 738172b676d7Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 738272b676d7Smrg]) 738372b676d7Smrg 738472b676d7Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 738572b676d7Smrg# Free Software Foundation, Inc. 738672b676d7Smrg# 738772b676d7Smrg# This file is free software; the Free Software Foundation 738872b676d7Smrg# gives unlimited permission to copy and/or distribute it, 738972b676d7Smrg# with or without modifications, as long as this notice is preserved. 739072b676d7Smrg 739172b676d7Smrg# serial 8 739272b676d7Smrg 739372b676d7Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 739472b676d7SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 739572b676d7Smrg 739672b676d7Smrg# Do all the work for Automake. -*- Autoconf -*- 739772b676d7Smrg 739872b676d7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 739972b676d7Smrg# Free Software Foundation, Inc. 740072b676d7Smrg# 740172b676d7Smrg# This file is free software; the Free Software Foundation 740272b676d7Smrg# gives unlimited permission to copy and/or distribute it, 740372b676d7Smrg# with or without modifications, as long as this notice is preserved. 740472b676d7Smrg 740572b676d7Smrg# serial 12 740672b676d7Smrg 740772b676d7Smrg# This macro actually does too much. Some checks are only needed if 740872b676d7Smrg# your package does certain things. But this isn't really a big deal. 740972b676d7Smrg 741072b676d7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 741172b676d7Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 741272b676d7Smrg# ----------------------------------------------- 741372b676d7Smrg# The call with PACKAGE and VERSION arguments is the old style 741472b676d7Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 741572b676d7Smrg# and VERSION should now be passed to AC_INIT and removed from 741672b676d7Smrg# the call to AM_INIT_AUTOMAKE. 741772b676d7Smrg# We support both call styles for the transition. After 741872b676d7Smrg# the next Automake release, Autoconf can make the AC_INIT 741972b676d7Smrg# arguments mandatory, and then we can depend on a new Autoconf 742072b676d7Smrg# release and drop the old call support. 742172b676d7SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 742272b676d7Smrg[AC_PREREQ([2.58])dnl 742372b676d7Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 742472b676d7Smrgdnl the ones we care about. 742572b676d7Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 742672b676d7SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 742772b676d7SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 742872b676d7Smrg# test to see if srcdir already configured 742972b676d7Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 743072b676d7Smrg test -f $srcdir/config.status; then 743172b676d7Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 743272b676d7Smrgfi 743372b676d7Smrg 743472b676d7Smrg# test whether we have cygpath 743572b676d7Smrgif test -z "$CYGPATH_W"; then 743672b676d7Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 743772b676d7Smrg CYGPATH_W='cygpath -w' 743872b676d7Smrg else 743972b676d7Smrg CYGPATH_W=echo 744072b676d7Smrg fi 744172b676d7Smrgfi 744272b676d7SmrgAC_SUBST([CYGPATH_W]) 744372b676d7Smrg 744472b676d7Smrg# Define the identity of the package. 744572b676d7Smrgdnl Distinguish between old-style and new-style calls. 744672b676d7Smrgm4_ifval([$2], 744772b676d7Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 744872b676d7Smrg AC_SUBST([PACKAGE], [$1])dnl 744972b676d7Smrg AC_SUBST([VERSION], [$2])], 745072b676d7Smrg[_AM_SET_OPTIONS([$1])dnl 745172b676d7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 745272b676d7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 745372b676d7Smrg 745472b676d7Smrg_AM_IF_OPTION([no-define],, 745572b676d7Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 745672b676d7Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 745772b676d7Smrg 745872b676d7Smrg# Some tools Automake needs. 745972b676d7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 746072b676d7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 746172b676d7SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 746272b676d7SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 746372b676d7SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 746472b676d7SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 746572b676d7SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 746672b676d7SmrgAM_PROG_INSTALL_SH 746772b676d7SmrgAM_PROG_INSTALL_STRIP 746872b676d7SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 746972b676d7Smrg# We need awk for the "check" target. The system "awk" is bad on 747072b676d7Smrg# some platforms. 747172b676d7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 747272b676d7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 747372b676d7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 747472b676d7Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 747572b676d7Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 747672b676d7Smrg [_AM_PROG_TAR([v7])])]) 747772b676d7Smrg_AM_IF_OPTION([no-dependencies],, 747872b676d7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 747972b676d7Smrg [_AM_DEPENDENCIES(CC)], 748072b676d7Smrg [define([AC_PROG_CC], 748172b676d7Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 748272b676d7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 748372b676d7Smrg [_AM_DEPENDENCIES(CXX)], 748472b676d7Smrg [define([AC_PROG_CXX], 748572b676d7Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 748672b676d7Smrg]) 748772b676d7SmrgAC_REQUIRE([AM_PRETTY_CMDS]) 748872b676d7Smrg]) 748972b676d7Smrg 749072b676d7Smrg 749172b676d7Smrg# When config.status generates a header, we must update the stamp-h file. 749272b676d7Smrg# This file resides in the same directory as the config header 749372b676d7Smrg# that is generated. The stamp files are numbered to have different names. 749472b676d7Smrg 749572b676d7Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 749672b676d7Smrg# loop where config.status creates the headers, so we can generate 749772b676d7Smrg# our stamp files there. 749872b676d7SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 749972b676d7Smrg[# Compute $1's index in $config_headers. 750072b676d7Smrg_am_stamp_count=1 750172b676d7Smrgfor _am_header in $config_headers :; do 750272b676d7Smrg case $_am_header in 750372b676d7Smrg $1 | $1:* ) 750472b676d7Smrg break ;; 750572b676d7Smrg * ) 750672b676d7Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 750772b676d7Smrg esac 750872b676d7Smrgdone 750972b676d7Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 751072b676d7Smrg 751172b676d7Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 751272b676d7Smrg# 751372b676d7Smrg# This file is free software; the Free Software Foundation 751472b676d7Smrg# gives unlimited permission to copy and/or distribute it, 751572b676d7Smrg# with or without modifications, as long as this notice is preserved. 751672b676d7Smrg 751772b676d7Smrg# AM_PROG_INSTALL_SH 751872b676d7Smrg# ------------------ 751972b676d7Smrg# Define $install_sh. 752072b676d7SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 752172b676d7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 752272b676d7Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 752372b676d7SmrgAC_SUBST(install_sh)]) 752472b676d7Smrg 752572b676d7Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 752672b676d7Smrg# 752772b676d7Smrg# This file is free software; the Free Software Foundation 752872b676d7Smrg# gives unlimited permission to copy and/or distribute it, 752972b676d7Smrg# with or without modifications, as long as this notice is preserved. 753072b676d7Smrg 753172b676d7Smrg# serial 2 753272b676d7Smrg 753372b676d7Smrg# Check whether the underlying file-system supports filenames 753472b676d7Smrg# with a leading dot. For instance MS-DOS doesn't. 753572b676d7SmrgAC_DEFUN([AM_SET_LEADING_DOT], 753672b676d7Smrg[rm -rf .tst 2>/dev/null 753772b676d7Smrgmkdir .tst 2>/dev/null 753872b676d7Smrgif test -d .tst; then 753972b676d7Smrg am__leading_dot=. 754072b676d7Smrgelse 754172b676d7Smrg am__leading_dot=_ 754272b676d7Smrgfi 754372b676d7Smrgrmdir .tst 2>/dev/null 754472b676d7SmrgAC_SUBST([am__leading_dot])]) 754572b676d7Smrg 754672b676d7Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 754772b676d7Smrg# From Jim Meyering 754872b676d7Smrg 754972b676d7Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 755072b676d7Smrg# Free Software Foundation, Inc. 755172b676d7Smrg# 755272b676d7Smrg# This file is free software; the Free Software Foundation 755372b676d7Smrg# gives unlimited permission to copy and/or distribute it, 755472b676d7Smrg# with or without modifications, as long as this notice is preserved. 755572b676d7Smrg 755672b676d7Smrg# serial 4 755772b676d7Smrg 755872b676d7SmrgAC_DEFUN([AM_MAINTAINER_MODE], 755972b676d7Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 756072b676d7Smrg dnl maintainer-mode is disabled by default 756172b676d7Smrg AC_ARG_ENABLE(maintainer-mode, 756272b676d7Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 756372b676d7Smrg (and sometimes confusing) to the casual installer], 756472b676d7Smrg USE_MAINTAINER_MODE=$enableval, 756572b676d7Smrg USE_MAINTAINER_MODE=no) 756672b676d7Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 756772b676d7Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 756872b676d7Smrg MAINT=$MAINTAINER_MODE_TRUE 756972b676d7Smrg AC_SUBST(MAINT)dnl 757072b676d7Smrg] 757172b676d7Smrg) 757272b676d7Smrg 757372b676d7SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 757472b676d7Smrg 757572b676d7Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 757672b676d7Smrg 757772b676d7Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 757872b676d7Smrg# 757972b676d7Smrg# This file is free software; the Free Software Foundation 758072b676d7Smrg# gives unlimited permission to copy and/or distribute it, 758172b676d7Smrg# with or without modifications, as long as this notice is preserved. 758272b676d7Smrg 758372b676d7Smrg# serial 3 758472b676d7Smrg 758572b676d7Smrg# AM_MAKE_INCLUDE() 758672b676d7Smrg# ----------------- 758772b676d7Smrg# Check to see how make treats includes. 758872b676d7SmrgAC_DEFUN([AM_MAKE_INCLUDE], 758972b676d7Smrg[am_make=${MAKE-make} 759072b676d7Smrgcat > confinc << 'END' 759172b676d7Smrgam__doit: 759272b676d7Smrg @echo done 759372b676d7Smrg.PHONY: am__doit 759472b676d7SmrgEND 759572b676d7Smrg# If we don't find an include directive, just comment out the code. 759672b676d7SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 759772b676d7Smrgam__include="#" 759872b676d7Smrgam__quote= 759972b676d7Smrg_am_result=none 760072b676d7Smrg# First try GNU make style include. 760172b676d7Smrgecho "include confinc" > confmf 760272b676d7Smrg# We grep out `Entering directory' and `Leaving directory' 760372b676d7Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 760472b676d7Smrg# In particular we don't look at `^make:' because GNU make might 760572b676d7Smrg# be invoked under some other name (usually "gmake"), in which 760672b676d7Smrg# case it prints its new name instead of `make'. 760772b676d7Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 760872b676d7Smrg am__include=include 760972b676d7Smrg am__quote= 761072b676d7Smrg _am_result=GNU 761172b676d7Smrgfi 761272b676d7Smrg# Now try BSD make style include. 761372b676d7Smrgif test "$am__include" = "#"; then 761472b676d7Smrg echo '.include "confinc"' > confmf 761572b676d7Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 761672b676d7Smrg am__include=.include 761772b676d7Smrg am__quote="\"" 761872b676d7Smrg _am_result=BSD 761972b676d7Smrg fi 762072b676d7Smrgfi 762172b676d7SmrgAC_SUBST([am__include]) 762272b676d7SmrgAC_SUBST([am__quote]) 762372b676d7SmrgAC_MSG_RESULT([$_am_result]) 762472b676d7Smrgrm -f confinc confmf 762572b676d7Smrg]) 762672b676d7Smrg 762772b676d7Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 762872b676d7Smrg 762972b676d7Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 763072b676d7Smrg# Free Software Foundation, Inc. 763172b676d7Smrg# 763272b676d7Smrg# This file is free software; the Free Software Foundation 763372b676d7Smrg# gives unlimited permission to copy and/or distribute it, 763472b676d7Smrg# with or without modifications, as long as this notice is preserved. 763572b676d7Smrg 763672b676d7Smrg# serial 4 763772b676d7Smrg 763872b676d7Smrg# AM_MISSING_PROG(NAME, PROGRAM) 763972b676d7Smrg# ------------------------------ 764072b676d7SmrgAC_DEFUN([AM_MISSING_PROG], 764172b676d7Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 764272b676d7Smrg$1=${$1-"${am_missing_run}$2"} 764372b676d7SmrgAC_SUBST($1)]) 764472b676d7Smrg 764572b676d7Smrg 764672b676d7Smrg# AM_MISSING_HAS_RUN 764772b676d7Smrg# ------------------ 764872b676d7Smrg# Define MISSING if not defined so far and test if it supports --run. 764972b676d7Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 765072b676d7SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 765172b676d7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 765272b676d7Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 765372b676d7Smrg# Use eval to expand $SHELL 765472b676d7Smrgif eval "$MISSING --run true"; then 765572b676d7Smrg am_missing_run="$MISSING --run " 765672b676d7Smrgelse 765772b676d7Smrg am_missing_run= 765872b676d7Smrg AC_MSG_WARN([`missing' script is too old or missing]) 765972b676d7Smrgfi 766072b676d7Smrg]) 766172b676d7Smrg 766272b676d7Smrg# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 766372b676d7Smrg# 766472b676d7Smrg# This file is free software; the Free Software Foundation 766572b676d7Smrg# gives unlimited permission to copy and/or distribute it, 766672b676d7Smrg# with or without modifications, as long as this notice is preserved. 766772b676d7Smrg 766872b676d7Smrg# AM_PROG_MKDIR_P 766972b676d7Smrg# --------------- 767072b676d7Smrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 767172b676d7Smrg# 767272b676d7Smrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 767372b676d7Smrg# created by `make install' are always world readable, even if the 767472b676d7Smrg# installer happens to have an overly restrictive umask (e.g. 077). 767572b676d7Smrg# This was a mistake. There are at least two reasons why we must not 767672b676d7Smrg# use `-m 0755': 767772b676d7Smrg# - it causes special bits like SGID to be ignored, 767872b676d7Smrg# - it may be too restrictive (some setups expect 775 directories). 767972b676d7Smrg# 768072b676d7Smrg# Do not use -m 0755 and let people choose whatever they expect by 768172b676d7Smrg# setting umask. 768272b676d7Smrg# 768372b676d7Smrg# We cannot accept any implementation of `mkdir' that recognizes `-p'. 768472b676d7Smrg# Some implementations (such as Solaris 8's) are not thread-safe: if a 768572b676d7Smrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 768672b676d7Smrg# concurrently, both version can detect that a/ is missing, but only 768772b676d7Smrg# one can create it and the other will error out. Consequently we 768872b676d7Smrg# restrict ourselves to GNU make (using the --version option ensures 768972b676d7Smrg# this.) 769072b676d7SmrgAC_DEFUN([AM_PROG_MKDIR_P], 769172b676d7Smrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 769272b676d7Smrg # We used to keeping the `.' as first argument, in order to 769372b676d7Smrg # allow $(mkdir_p) to be used without argument. As in 769472b676d7Smrg # $(mkdir_p) $(somedir) 769572b676d7Smrg # where $(somedir) is conditionally defined. However this is wrong 769672b676d7Smrg # for two reasons: 769772b676d7Smrg # 1. if the package is installed by a user who cannot write `.' 769872b676d7Smrg # make install will fail, 769972b676d7Smrg # 2. the above comment should most certainly read 770072b676d7Smrg # $(mkdir_p) $(DESTDIR)$(somedir) 770172b676d7Smrg # so it does not work when $(somedir) is undefined and 770272b676d7Smrg # $(DESTDIR) is not. 770372b676d7Smrg # To support the latter case, we have to write 770472b676d7Smrg # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 770572b676d7Smrg # so the `.' trick is pointless. 770672b676d7Smrg mkdir_p='mkdir -p --' 770772b676d7Smrgelse 770872b676d7Smrg # On NextStep and OpenStep, the `mkdir' command does not 770972b676d7Smrg # recognize any option. It will interpret all options as 771072b676d7Smrg # directories to create, and then abort because `.' already 771172b676d7Smrg # exists. 771272b676d7Smrg for d in ./-p ./--version; 771372b676d7Smrg do 771472b676d7Smrg test -d $d && rmdir $d 771572b676d7Smrg done 771672b676d7Smrg # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 771772b676d7Smrg if test -f "$ac_aux_dir/mkinstalldirs"; then 771872b676d7Smrg mkdir_p='$(mkinstalldirs)' 771972b676d7Smrg else 772072b676d7Smrg mkdir_p='$(install_sh) -d' 772172b676d7Smrg fi 772272b676d7Smrgfi 772372b676d7SmrgAC_SUBST([mkdir_p])]) 772472b676d7Smrg 772572b676d7Smrg# Helper functions for option handling. -*- Autoconf -*- 772672b676d7Smrg 772772b676d7Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 772872b676d7Smrg# 772972b676d7Smrg# This file is free software; the Free Software Foundation 773072b676d7Smrg# gives unlimited permission to copy and/or distribute it, 773172b676d7Smrg# with or without modifications, as long as this notice is preserved. 773272b676d7Smrg 773372b676d7Smrg# serial 3 773472b676d7Smrg 773572b676d7Smrg# _AM_MANGLE_OPTION(NAME) 773672b676d7Smrg# ----------------------- 773772b676d7SmrgAC_DEFUN([_AM_MANGLE_OPTION], 773872b676d7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 773972b676d7Smrg 774072b676d7Smrg# _AM_SET_OPTION(NAME) 774172b676d7Smrg# ------------------------------ 774272b676d7Smrg# Set option NAME. Presently that only means defining a flag for this option. 774372b676d7SmrgAC_DEFUN([_AM_SET_OPTION], 774472b676d7Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 774572b676d7Smrg 774672b676d7Smrg# _AM_SET_OPTIONS(OPTIONS) 774772b676d7Smrg# ---------------------------------- 774872b676d7Smrg# OPTIONS is a space-separated list of Automake options. 774972b676d7SmrgAC_DEFUN([_AM_SET_OPTIONS], 775072b676d7Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 775172b676d7Smrg 775272b676d7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 775372b676d7Smrg# ------------------------------------------- 775472b676d7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 775572b676d7SmrgAC_DEFUN([_AM_IF_OPTION], 775672b676d7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 775772b676d7Smrg 775872b676d7Smrg 775972b676d7Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 776072b676d7Smrg# Free Software Foundation, Inc. 776172b676d7Smrg# 776272b676d7Smrg# This file is free software; the Free Software Foundation 776372b676d7Smrg# gives unlimited permission to copy and/or distribute it, 776472b676d7Smrg# with or without modifications, as long as this notice is preserved. 776572b676d7Smrg 776672b676d7Smrg# serial 8 776772b676d7Smrg 776872b676d7Smrg 776972b676d7Smrg# AM_PRETTY_CMDS 777072b676d7Smrg# ------------ 777172b676d7SmrgAC_DEFUN([AM_PRETTY_CMDS], 777272b676d7Smrg[AC_ARG_ENABLE(pretty-cmds, 777372b676d7Smrg[ --disable-pretty-cmds show all commands executed 777472b676d7Smrg --enable-pretty-cmds do not output the entire command lines]) 777572b676d7SmrgAMSHOWCMDSAT='' 777672b676d7SmrgAMDEPSHOWCMDSAT='' 777772b676d7SmrgAMPRETTYECHO=true 777872b676d7SmrgAMCMDECHO=echo 777972b676d7Smrgif test "x$enable_pretty_cmds" == xyes; 778072b676d7Smrgthen 778172b676d7Smrg AMSHOWCMDSAT='@' 778272b676d7Smrg _AM_IF_OPTION([no-dependencies],,test x$enable_dependency_tracking == xno &&) AMDEPSHOWCMDSAT='@' 778372b676d7Smrg AMPRETTYECHO=echo 778472b676d7Smrg AMCMDECHO=true 778572b676d7Smrg LT_QUIET='--quiet' 778672b676d7Smrgfi 778772b676d7SmrgAC_SUBST([AMSHOWCMDSAT]) 778872b676d7SmrgAC_SUBST([AMDEPSHOWCMDSAT]) 778972b676d7SmrgAC_SUBST([AMPRETTYECHO]) 779072b676d7SmrgAC_SUBST([AMCMDECHO]) 779172b676d7SmrgAC_SUBST([LT_QUIET]) 779272b676d7Smrg]) 779372b676d7Smrg 779472b676d7Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 779572b676d7Smrg 779672b676d7Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 779772b676d7Smrg# Free Software Foundation, Inc. 779872b676d7Smrg# 779972b676d7Smrg# This file is free software; the Free Software Foundation 780072b676d7Smrg# gives unlimited permission to copy and/or distribute it, 780172b676d7Smrg# with or without modifications, as long as this notice is preserved. 780272b676d7Smrg 780372b676d7Smrg# serial 4 780472b676d7Smrg 780572b676d7Smrg# AM_SANITY_CHECK 780672b676d7Smrg# --------------- 780772b676d7SmrgAC_DEFUN([AM_SANITY_CHECK], 780872b676d7Smrg[AC_MSG_CHECKING([whether build environment is sane]) 780972b676d7Smrg# Just in case 781072b676d7Smrgsleep 1 781172b676d7Smrgecho timestamp > conftest.file 781272b676d7Smrg# Do `set' in a subshell so we don't clobber the current shell's 781372b676d7Smrg# arguments. Must try -L first in case configure is actually a 781472b676d7Smrg# symlink; some systems play weird games with the mod time of symlinks 781572b676d7Smrg# (eg FreeBSD returns the mod time of the symlink's containing 781672b676d7Smrg# directory). 781772b676d7Smrgif ( 781872b676d7Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 781972b676d7Smrg if test "$[*]" = "X"; then 782072b676d7Smrg # -L didn't work. 782172b676d7Smrg set X `ls -t $srcdir/configure conftest.file` 782272b676d7Smrg fi 782372b676d7Smrg rm -f conftest.file 782472b676d7Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 782572b676d7Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 782672b676d7Smrg 782772b676d7Smrg # If neither matched, then we have a broken ls. This can happen 782872b676d7Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 782972b676d7Smrg # broken ls alias from the environment. This has actually 783072b676d7Smrg # happened. Such a system could not be considered "sane". 783172b676d7Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 783272b676d7Smrgalias in your environment]) 783372b676d7Smrg fi 783472b676d7Smrg 783572b676d7Smrg test "$[2]" = conftest.file 783672b676d7Smrg ) 783772b676d7Smrgthen 783872b676d7Smrg # Ok. 783972b676d7Smrg : 784072b676d7Smrgelse 784172b676d7Smrg AC_MSG_ERROR([newly created file is older than distributed files! 784272b676d7SmrgCheck your system clock]) 784372b676d7Smrgfi 784472b676d7SmrgAC_MSG_RESULT(yes)]) 784572b676d7Smrg 784672b676d7Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 784772b676d7Smrg# 784872b676d7Smrg# This file is free software; the Free Software Foundation 784972b676d7Smrg# gives unlimited permission to copy and/or distribute it, 785072b676d7Smrg# with or without modifications, as long as this notice is preserved. 785172b676d7Smrg 785272b676d7Smrg# AM_PROG_INSTALL_STRIP 785372b676d7Smrg# --------------------- 785472b676d7Smrg# One issue with vendor `install' (even GNU) is that you can't 785572b676d7Smrg# specify the program used to strip binaries. This is especially 785672b676d7Smrg# annoying in cross-compiling environments, where the build's strip 785772b676d7Smrg# is unlikely to handle the host's binaries. 785872b676d7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 785972b676d7Smrg# always use install-sh in `make install-strip', and initialize 786072b676d7Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 786172b676d7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 786272b676d7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 786372b676d7Smrg# Installed binaries are usually stripped using `strip' when the user 786472b676d7Smrg# run `make install-strip'. However `strip' might not be the right 786572b676d7Smrg# tool to use in cross-compilation environments, therefore Automake 786672b676d7Smrg# will honor the `STRIP' environment variable to overrule this program. 786772b676d7Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 786872b676d7Smrgif test "$cross_compiling" != no; then 786972b676d7Smrg AC_CHECK_TOOL([STRIP], [strip], :) 787072b676d7Smrgfi 787172b676d7SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 787272b676d7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 787372b676d7Smrg 787472b676d7Smrg# Check how to create a tarball. -*- Autoconf -*- 787572b676d7Smrg 787672b676d7Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 787772b676d7Smrg# 787872b676d7Smrg# This file is free software; the Free Software Foundation 787972b676d7Smrg# gives unlimited permission to copy and/or distribute it, 788072b676d7Smrg# with or without modifications, as long as this notice is preserved. 788172b676d7Smrg 788272b676d7Smrg# serial 2 788372b676d7Smrg 788472b676d7Smrg# _AM_PROG_TAR(FORMAT) 788572b676d7Smrg# -------------------- 788672b676d7Smrg# Check how to create a tarball in format FORMAT. 788772b676d7Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 788872b676d7Smrg# 788972b676d7Smrg# Substitute a variable $(am__tar) that is a command 789072b676d7Smrg# writing to stdout a FORMAT-tarball containing the directory 789172b676d7Smrg# $tardir. 789272b676d7Smrg# tardir=directory && $(am__tar) > result.tar 789372b676d7Smrg# 789472b676d7Smrg# Substitute a variable $(am__untar) that extract such 789572b676d7Smrg# a tarball read from stdin. 789672b676d7Smrg# $(am__untar) < result.tar 789772b676d7SmrgAC_DEFUN([_AM_PROG_TAR], 789872b676d7Smrg[# Always define AMTAR for backward compatibility. 789972b676d7SmrgAM_MISSING_PROG([AMTAR], [tar]) 790072b676d7Smrgm4_if([$1], [v7], 790172b676d7Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 790272b676d7Smrg [m4_case([$1], [ustar],, [pax],, 790372b676d7Smrg [m4_fatal([Unknown tar format])]) 790472b676d7SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 790572b676d7Smrg# Loop over all known methods to create a tar archive until one works. 790672b676d7Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 790772b676d7Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 790872b676d7Smrg# Do not fold the above two line into one, because Tru64 sh and 790972b676d7Smrg# Solaris sh will not grok spaces in the rhs of `-'. 791072b676d7Smrgfor _am_tool in $_am_tools 791172b676d7Smrgdo 791272b676d7Smrg case $_am_tool in 791372b676d7Smrg gnutar) 791472b676d7Smrg for _am_tar in tar gnutar gtar; 791572b676d7Smrg do 791672b676d7Smrg AM_RUN_LOG([$_am_tar --version]) && break 791772b676d7Smrg done 791872b676d7Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 791972b676d7Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 792072b676d7Smrg am__untar="$_am_tar -xf -" 792172b676d7Smrg ;; 792272b676d7Smrg plaintar) 792372b676d7Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 792472b676d7Smrg # ustar tarball either. 792572b676d7Smrg (tar --version) >/dev/null 2>&1 && continue 792672b676d7Smrg am__tar='tar chf - "$$tardir"' 792772b676d7Smrg am__tar_='tar chf - "$tardir"' 792872b676d7Smrg am__untar='tar xf -' 792972b676d7Smrg ;; 793072b676d7Smrg pax) 793172b676d7Smrg am__tar='pax -L -x $1 -w "$$tardir"' 793272b676d7Smrg am__tar_='pax -L -x $1 -w "$tardir"' 793372b676d7Smrg am__untar='pax -r' 793472b676d7Smrg ;; 793572b676d7Smrg cpio) 793672b676d7Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 793772b676d7Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 793872b676d7Smrg am__untar='cpio -i -H $1 -d' 793972b676d7Smrg ;; 794072b676d7Smrg none) 794172b676d7Smrg am__tar=false 794272b676d7Smrg am__tar_=false 794372b676d7Smrg am__untar=false 794472b676d7Smrg ;; 794572b676d7Smrg esac 794672b676d7Smrg 794772b676d7Smrg # If the value was cached, stop now. We just wanted to have am__tar 794872b676d7Smrg # and am__untar set. 794972b676d7Smrg test -n "${am_cv_prog_tar_$1}" && break 795072b676d7Smrg 795172b676d7Smrg # tar/untar a dummy directory, and stop if the command works 795272b676d7Smrg rm -rf conftest.dir 795372b676d7Smrg mkdir conftest.dir 795472b676d7Smrg echo GrepMe > conftest.dir/file 795572b676d7Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 795672b676d7Smrg rm -rf conftest.dir 795772b676d7Smrg if test -s conftest.tar; then 795872b676d7Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 795972b676d7Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 796072b676d7Smrg fi 796172b676d7Smrgdone 796272b676d7Smrgrm -rf conftest.dir 796372b676d7Smrg 796472b676d7SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 796572b676d7SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 796672b676d7SmrgAC_SUBST([am__tar]) 796772b676d7SmrgAC_SUBST([am__untar]) 796872b676d7Smrg]) # _AM_PROG_TAR 796972b676d7Smrg 7970