aclocal.m4 revision 32b578d3
132b578d3Smrg# generated automatically by aclocal 1.10.1 -*- Autoconf -*- 232b578d3Smrg 332b578d3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 432b578d3Smrg# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 532b578d3Smrg# This file is free software; the Free Software Foundation 632b578d3Smrg# gives unlimited permission to copy and/or distribute it, 732b578d3Smrg# with or without modifications, as long as this notice is preserved. 832b578d3Smrg 932b578d3Smrg# This program is distributed in the hope that it will be useful, 1032b578d3Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1132b578d3Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1232b578d3Smrg# PARTICULAR PURPOSE. 1332b578d3Smrg 1432b578d3Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1532b578d3Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1632b578d3Smrgm4_if(AC_AUTOCONF_VERSION, [2.61],, 1732b578d3Smrg[m4_warning([this file was generated for autoconf 2.61. 1832b578d3SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 1932b578d3SmrgIf you have problems, you may need to regenerate the build system entirely. 2032b578d3SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 2132b578d3Smrg 2232b578d3Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2332b578d3Smrg 2432b578d3Smrg# serial 51 AC_PROG_LIBTOOL 2532b578d3Smrg 2632b578d3Smrg 2732b578d3Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 2832b578d3Smrg# ----------------------------------------------------------- 2932b578d3Smrg# If this macro is not defined by Autoconf, define it here. 3032b578d3Smrgm4_ifdef([AC_PROVIDE_IFELSE], 3132b578d3Smrg [], 3232b578d3Smrg [m4_define([AC_PROVIDE_IFELSE], 3332b578d3Smrg [m4_ifdef([AC_PROVIDE_$1], 3432b578d3Smrg [$2], [$3])])]) 3532b578d3Smrg 3632b578d3Smrg 3732b578d3Smrg# AC_PROG_LIBTOOL 3832b578d3Smrg# --------------- 3932b578d3SmrgAC_DEFUN([AC_PROG_LIBTOOL], 4032b578d3Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 4132b578d3Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 4232b578d3Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 4332b578d3Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 4432b578d3Smrg [AC_LIBTOOL_CXX], 4532b578d3Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 4632b578d3Smrg ])]) 4732b578d3Smrgdnl And a similar setup for Fortran 77 support 4832b578d3Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 4932b578d3Smrg [AC_LIBTOOL_F77], 5032b578d3Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 5132b578d3Smrg])]) 5232b578d3Smrg 5332b578d3Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 5432b578d3Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 5532b578d3Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 5632b578d3Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 5732b578d3Smrg [AC_LIBTOOL_GCJ], 5832b578d3Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 5932b578d3Smrg [AC_LIBTOOL_GCJ], 6032b578d3Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 6132b578d3Smrg [AC_LIBTOOL_GCJ], 6232b578d3Smrg [ifdef([AC_PROG_GCJ], 6332b578d3Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 6432b578d3Smrg ifdef([A][M_PROG_GCJ], 6532b578d3Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 6632b578d3Smrg ifdef([LT_AC_PROG_GCJ], 6732b578d3Smrg [define([LT_AC_PROG_GCJ], 6832b578d3Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 6932b578d3Smrg])])# AC_PROG_LIBTOOL 7032b578d3Smrg 7132b578d3Smrg 7232b578d3Smrg# _AC_PROG_LIBTOOL 7332b578d3Smrg# ---------------- 7432b578d3SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 7532b578d3Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 7632b578d3SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 7732b578d3SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 7832b578d3SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 7932b578d3Smrg 8032b578d3Smrg# This can be used to rebuild libtool when needed 8132b578d3SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 8232b578d3Smrg 8332b578d3Smrg# Always use our own libtool. 8432b578d3SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 8532b578d3SmrgAC_SUBST(LIBTOOL)dnl 8632b578d3Smrg 8732b578d3Smrg# Prevent multiple expansion 8832b578d3Smrgdefine([AC_PROG_LIBTOOL], []) 8932b578d3Smrg])# _AC_PROG_LIBTOOL 9032b578d3Smrg 9132b578d3Smrg 9232b578d3Smrg# AC_LIBTOOL_SETUP 9332b578d3Smrg# ---------------- 9432b578d3SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 9532b578d3Smrg[AC_PREREQ(2.50)dnl 9632b578d3SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 9732b578d3SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 9832b578d3SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 9932b578d3SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 10032b578d3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 10132b578d3SmrgAC_REQUIRE([AC_PROG_CC])dnl 10232b578d3SmrgAC_REQUIRE([AC_PROG_LD])dnl 10332b578d3SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 10432b578d3SmrgAC_REQUIRE([AC_PROG_NM])dnl 10532b578d3Smrg 10632b578d3SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 10732b578d3SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 10832b578d3Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 10932b578d3SmrgAC_REQUIRE([AC_OBJEXT])dnl 11032b578d3SmrgAC_REQUIRE([AC_EXEEXT])dnl 11132b578d3Smrgdnl 11232b578d3Smrg 11332b578d3SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 11432b578d3SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 11532b578d3SmrgAC_LIBTOOL_OBJDIR 11632b578d3Smrg 11732b578d3SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 11832b578d3Smrg_LT_AC_PROG_ECHO_BACKSLASH 11932b578d3Smrg 12032b578d3Smrgcase $host_os in 12132b578d3Smrgaix3*) 12232b578d3Smrg # AIX sometimes has problems with the GCC collect2 program. For some 12332b578d3Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 12432b578d3Smrg # vanish in a puff of smoke. 12532b578d3Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 12632b578d3Smrg COLLECT_NAMES= 12732b578d3Smrg export COLLECT_NAMES 12832b578d3Smrg fi 12932b578d3Smrg ;; 13032b578d3Smrgesac 13132b578d3Smrg 13232b578d3Smrg# Sed substitution that helps us do robust quoting. It backslashifies 13332b578d3Smrg# metacharacters that are still active within double-quoted strings. 13432b578d3SmrgXsed='sed -e 1s/^X//' 13532b578d3Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 13632b578d3Smrg 13732b578d3Smrg# Same as above, but do not quote variable references. 13832b578d3Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 13932b578d3Smrg 14032b578d3Smrg# Sed substitution to delay expansion of an escaped shell variable in a 14132b578d3Smrg# double_quote_subst'ed string. 14232b578d3Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 14332b578d3Smrg 14432b578d3Smrg# Sed substitution to avoid accidental globbing in evaled expressions 14532b578d3Smrgno_glob_subst='s/\*/\\\*/g' 14632b578d3Smrg 14732b578d3Smrg# Constants: 14832b578d3Smrgrm="rm -f" 14932b578d3Smrg 15032b578d3Smrg# Global variables: 15132b578d3Smrgdefault_ofile=libtool 15232b578d3Smrgcan_build_shared=yes 15332b578d3Smrg 15432b578d3Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 15532b578d3Smrg# which needs '.lib'). 15632b578d3Smrglibext=a 15732b578d3Smrgltmain="$ac_aux_dir/ltmain.sh" 15832b578d3Smrgofile="$default_ofile" 15932b578d3Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 16032b578d3Smrg 16132b578d3SmrgAC_CHECK_TOOL(AR, ar, false) 16232b578d3SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 16332b578d3SmrgAC_CHECK_TOOL(STRIP, strip, :) 16432b578d3Smrg 16532b578d3Smrgold_CC="$CC" 16632b578d3Smrgold_CFLAGS="$CFLAGS" 16732b578d3Smrg 16832b578d3Smrg# Set sane defaults for various variables 16932b578d3Smrgtest -z "$AR" && AR=ar 17032b578d3Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 17132b578d3Smrgtest -z "$AS" && AS=as 17232b578d3Smrgtest -z "$CC" && CC=cc 17332b578d3Smrgtest -z "$LTCC" && LTCC=$CC 17432b578d3Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 17532b578d3Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 17632b578d3Smrgtest -z "$LD" && LD=ld 17732b578d3Smrgtest -z "$LN_S" && LN_S="ln -s" 17832b578d3Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 17932b578d3Smrgtest -z "$NM" && NM=nm 18032b578d3Smrgtest -z "$SED" && SED=sed 18132b578d3Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 18232b578d3Smrgtest -z "$RANLIB" && RANLIB=: 18332b578d3Smrgtest -z "$STRIP" && STRIP=: 18432b578d3Smrgtest -z "$ac_objext" && ac_objext=o 18532b578d3Smrg 18632b578d3Smrg# Determine commands to create old-style static archives. 18732b578d3Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 18832b578d3Smrgold_postinstall_cmds='chmod 644 $oldlib' 18932b578d3Smrgold_postuninstall_cmds= 19032b578d3Smrg 19132b578d3Smrgif test -n "$RANLIB"; then 19232b578d3Smrg case $host_os in 19332b578d3Smrg openbsd*) 19432b578d3Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 19532b578d3Smrg ;; 19632b578d3Smrg *) 19732b578d3Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 19832b578d3Smrg ;; 19932b578d3Smrg esac 20032b578d3Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 20132b578d3Smrgfi 20232b578d3Smrg 20332b578d3Smrg_LT_CC_BASENAME([$compiler]) 20432b578d3Smrg 20532b578d3Smrg# Only perform the check for file, if the check method requires it 20632b578d3Smrgcase $deplibs_check_method in 20732b578d3Smrgfile_magic*) 20832b578d3Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 20932b578d3Smrg AC_PATH_MAGIC 21032b578d3Smrg fi 21132b578d3Smrg ;; 21232b578d3Smrgesac 21332b578d3Smrg 21432b578d3SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 21532b578d3SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 21632b578d3Smrgenable_win32_dll=yes, enable_win32_dll=no) 21732b578d3Smrg 21832b578d3SmrgAC_ARG_ENABLE([libtool-lock], 21932b578d3Smrg [AC_HELP_STRING([--disable-libtool-lock], 22032b578d3Smrg [avoid locking (might break parallel builds)])]) 22132b578d3Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 22232b578d3Smrg 22332b578d3SmrgAC_ARG_WITH([pic], 22432b578d3Smrg [AC_HELP_STRING([--with-pic], 22532b578d3Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 22632b578d3Smrg [pic_mode="$withval"], 22732b578d3Smrg [pic_mode=default]) 22832b578d3Smrgtest -z "$pic_mode" && pic_mode=default 22932b578d3Smrg 23032b578d3Smrg# Use C for the default configuration in the libtool script 23132b578d3Smrgtagname= 23232b578d3SmrgAC_LIBTOOL_LANG_C_CONFIG 23332b578d3Smrg_LT_AC_TAGCONFIG 23432b578d3Smrg])# AC_LIBTOOL_SETUP 23532b578d3Smrg 23632b578d3Smrg 23732b578d3Smrg# _LT_AC_SYS_COMPILER 23832b578d3Smrg# ------------------- 23932b578d3SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 24032b578d3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 24132b578d3Smrg 24232b578d3Smrg# If no C compiler was specified, use CC. 24332b578d3SmrgLTCC=${LTCC-"$CC"} 24432b578d3Smrg 24532b578d3Smrg# If no C compiler flags were specified, use CFLAGS. 24632b578d3SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 24732b578d3Smrg 24832b578d3Smrg# Allow CC to be a program name with arguments. 24932b578d3Smrgcompiler=$CC 25032b578d3Smrg])# _LT_AC_SYS_COMPILER 25132b578d3Smrg 25232b578d3Smrg 25332b578d3Smrg# _LT_CC_BASENAME(CC) 25432b578d3Smrg# ------------------- 25532b578d3Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 25632b578d3SmrgAC_DEFUN([_LT_CC_BASENAME], 25732b578d3Smrg[for cc_temp in $1""; do 25832b578d3Smrg case $cc_temp in 25932b578d3Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 26032b578d3Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 26132b578d3Smrg \-*) ;; 26232b578d3Smrg *) break;; 26332b578d3Smrg esac 26432b578d3Smrgdone 26532b578d3Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 26632b578d3Smrg]) 26732b578d3Smrg 26832b578d3Smrg 26932b578d3Smrg# _LT_COMPILER_BOILERPLATE 27032b578d3Smrg# ------------------------ 27132b578d3Smrg# Check for compiler boilerplate output or warnings with 27232b578d3Smrg# the simple compiler test code. 27332b578d3SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 27432b578d3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 27532b578d3Smrgac_outfile=conftest.$ac_objext 27632b578d3Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 27732b578d3Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 27832b578d3Smrg_lt_compiler_boilerplate=`cat conftest.err` 27932b578d3Smrg$rm conftest* 28032b578d3Smrg])# _LT_COMPILER_BOILERPLATE 28132b578d3Smrg 28232b578d3Smrg 28332b578d3Smrg# _LT_LINKER_BOILERPLATE 28432b578d3Smrg# ---------------------- 28532b578d3Smrg# Check for linker boilerplate output or warnings with 28632b578d3Smrg# the simple link test code. 28732b578d3SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 28832b578d3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 28932b578d3Smrgac_outfile=conftest.$ac_objext 29032b578d3Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 29132b578d3Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 29232b578d3Smrg_lt_linker_boilerplate=`cat conftest.err` 29332b578d3Smrg$rm conftest* 29432b578d3Smrg])# _LT_LINKER_BOILERPLATE 29532b578d3Smrg 29632b578d3Smrg 29732b578d3Smrg# _LT_AC_SYS_LIBPATH_AIX 29832b578d3Smrg# ---------------------- 29932b578d3Smrg# Links a minimal program and checks the executable 30032b578d3Smrg# for the system default hardcoded library path. In most cases, 30132b578d3Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 30232b578d3Smrg# the location of the communication and MPI libs are included too. 30332b578d3Smrg# If we don't find anything, use the default library path according 30432b578d3Smrg# to the aix ld manual. 30532b578d3SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 30632b578d3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 30732b578d3SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 30832b578d3Smrglt_aix_libpath_sed=' 30932b578d3Smrg /Import File Strings/,/^$/ { 31032b578d3Smrg /^0/ { 31132b578d3Smrg s/^0 *\(.*\)$/\1/ 31232b578d3Smrg p 31332b578d3Smrg } 31432b578d3Smrg }' 31532b578d3Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 31632b578d3Smrg# Check for a 64-bit object if we didn't find anything. 31732b578d3Smrgif test -z "$aix_libpath"; then 31832b578d3Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 31932b578d3Smrgfi],[]) 32032b578d3Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 32132b578d3Smrg])# _LT_AC_SYS_LIBPATH_AIX 32232b578d3Smrg 32332b578d3Smrg 32432b578d3Smrg# _LT_AC_SHELL_INIT(ARG) 32532b578d3Smrg# ---------------------- 32632b578d3SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 32732b578d3Smrg[ifdef([AC_DIVERSION_NOTICE], 32832b578d3Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 32932b578d3Smrg [AC_DIVERT_PUSH(NOTICE)]) 33032b578d3Smrg$1 33132b578d3SmrgAC_DIVERT_POP 33232b578d3Smrg])# _LT_AC_SHELL_INIT 33332b578d3Smrg 33432b578d3Smrg 33532b578d3Smrg# _LT_AC_PROG_ECHO_BACKSLASH 33632b578d3Smrg# -------------------------- 33732b578d3Smrg# Add some code to the start of the generated configure script which 33832b578d3Smrg# will find an echo command which doesn't interpret backslashes. 33932b578d3SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 34032b578d3Smrg[_LT_AC_SHELL_INIT([ 34132b578d3Smrg# Check that we are running under the correct shell. 34232b578d3SmrgSHELL=${CONFIG_SHELL-/bin/sh} 34332b578d3Smrg 34432b578d3Smrgcase X$ECHO in 34532b578d3SmrgX*--fallback-echo) 34632b578d3Smrg # Remove one level of quotation (which was required for Make). 34732b578d3Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 34832b578d3Smrg ;; 34932b578d3Smrgesac 35032b578d3Smrg 35132b578d3Smrgecho=${ECHO-echo} 35232b578d3Smrgif test "X[$]1" = X--no-reexec; then 35332b578d3Smrg # Discard the --no-reexec flag, and continue. 35432b578d3Smrg shift 35532b578d3Smrgelif test "X[$]1" = X--fallback-echo; then 35632b578d3Smrg # Avoid inline document here, it may be left over 35732b578d3Smrg : 35832b578d3Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 35932b578d3Smrg # Yippee, $echo works! 36032b578d3Smrg : 36132b578d3Smrgelse 36232b578d3Smrg # Restart under the correct shell. 36332b578d3Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 36432b578d3Smrgfi 36532b578d3Smrg 36632b578d3Smrgif test "X[$]1" = X--fallback-echo; then 36732b578d3Smrg # used as fallback echo 36832b578d3Smrg shift 36932b578d3Smrg cat <<EOF 37032b578d3Smrg[$]* 37132b578d3SmrgEOF 37232b578d3Smrg exit 0 37332b578d3Smrgfi 37432b578d3Smrg 37532b578d3Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 37632b578d3Smrg# if CDPATH is set. 37732b578d3Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 37832b578d3Smrg 37932b578d3Smrgif test -z "$ECHO"; then 38032b578d3Smrgif test "X${echo_test_string+set}" != Xset; then 38132b578d3Smrg# find a string as large as possible, as long as the shell can cope with it 38232b578d3Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 38332b578d3Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 38432b578d3Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 38532b578d3Smrg echo_test_string=`eval $cmd` && 38632b578d3Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 38732b578d3Smrg then 38832b578d3Smrg break 38932b578d3Smrg fi 39032b578d3Smrg done 39132b578d3Smrgfi 39232b578d3Smrg 39332b578d3Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 39432b578d3Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 39532b578d3Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 39632b578d3Smrg : 39732b578d3Smrgelse 39832b578d3Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 39932b578d3Smrg # backslashes. This makes it impossible to quote backslashes using 40032b578d3Smrg # echo "$something" | sed 's/\\/\\\\/g' 40132b578d3Smrg # 40232b578d3Smrg # So, first we look for a working echo in the user's PATH. 40332b578d3Smrg 40432b578d3Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 40532b578d3Smrg for dir in $PATH /usr/ucb; do 40632b578d3Smrg IFS="$lt_save_ifs" 40732b578d3Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 40832b578d3Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 40932b578d3Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 41032b578d3Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 41132b578d3Smrg echo="$dir/echo" 41232b578d3Smrg break 41332b578d3Smrg fi 41432b578d3Smrg done 41532b578d3Smrg IFS="$lt_save_ifs" 41632b578d3Smrg 41732b578d3Smrg if test "X$echo" = Xecho; then 41832b578d3Smrg # We didn't find a better echo, so look for alternatives. 41932b578d3Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 42032b578d3Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 42132b578d3Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 42232b578d3Smrg # This shell has a builtin print -r that does the trick. 42332b578d3Smrg echo='print -r' 42432b578d3Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 42532b578d3Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 42632b578d3Smrg # If we have ksh, try running configure again with it. 42732b578d3Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 42832b578d3Smrg export ORIGINAL_CONFIG_SHELL 42932b578d3Smrg CONFIG_SHELL=/bin/ksh 43032b578d3Smrg export CONFIG_SHELL 43132b578d3Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 43232b578d3Smrg else 43332b578d3Smrg # Try using printf. 43432b578d3Smrg echo='printf %s\n' 43532b578d3Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 43632b578d3Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 43732b578d3Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 43832b578d3Smrg # Cool, printf works 43932b578d3Smrg : 44032b578d3Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 44132b578d3Smrg test "X$echo_testing_string" = 'X\t' && 44232b578d3Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 44332b578d3Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 44432b578d3Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 44532b578d3Smrg export CONFIG_SHELL 44632b578d3Smrg SHELL="$CONFIG_SHELL" 44732b578d3Smrg export SHELL 44832b578d3Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 44932b578d3Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 45032b578d3Smrg test "X$echo_testing_string" = 'X\t' && 45132b578d3Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 45232b578d3Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 45332b578d3Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 45432b578d3Smrg else 45532b578d3Smrg # maybe with a smaller string... 45632b578d3Smrg prev=: 45732b578d3Smrg 45832b578d3Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 45932b578d3Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 46032b578d3Smrg then 46132b578d3Smrg break 46232b578d3Smrg fi 46332b578d3Smrg prev="$cmd" 46432b578d3Smrg done 46532b578d3Smrg 46632b578d3Smrg if test "$prev" != 'sed 50q "[$]0"'; then 46732b578d3Smrg echo_test_string=`eval $prev` 46832b578d3Smrg export echo_test_string 46932b578d3Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 47032b578d3Smrg else 47132b578d3Smrg # Oops. We lost completely, so just stick with echo. 47232b578d3Smrg echo=echo 47332b578d3Smrg fi 47432b578d3Smrg fi 47532b578d3Smrg fi 47632b578d3Smrg fi 47732b578d3Smrgfi 47832b578d3Smrgfi 47932b578d3Smrg 48032b578d3Smrg# Copy echo and quote the copy suitably for passing to libtool from 48132b578d3Smrg# the Makefile, instead of quoting the original, which is used later. 48232b578d3SmrgECHO=$echo 48332b578d3Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 48432b578d3Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 48532b578d3Smrgfi 48632b578d3Smrg 48732b578d3SmrgAC_SUBST(ECHO) 48832b578d3Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 48932b578d3Smrg 49032b578d3Smrg 49132b578d3Smrg# _LT_AC_LOCK 49232b578d3Smrg# ----------- 49332b578d3SmrgAC_DEFUN([_LT_AC_LOCK], 49432b578d3Smrg[AC_ARG_ENABLE([libtool-lock], 49532b578d3Smrg [AC_HELP_STRING([--disable-libtool-lock], 49632b578d3Smrg [avoid locking (might break parallel builds)])]) 49732b578d3Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 49832b578d3Smrg 49932b578d3Smrg# Some flags need to be propagated to the compiler or linker for good 50032b578d3Smrg# libtool support. 50132b578d3Smrgcase $host in 50232b578d3Smrgia64-*-hpux*) 50332b578d3Smrg # Find out which ABI we are using. 50432b578d3Smrg echo 'int i;' > conftest.$ac_ext 50532b578d3Smrg if AC_TRY_EVAL(ac_compile); then 50632b578d3Smrg case `/usr/bin/file conftest.$ac_objext` in 50732b578d3Smrg *ELF-32*) 50832b578d3Smrg HPUX_IA64_MODE="32" 50932b578d3Smrg ;; 51032b578d3Smrg *ELF-64*) 51132b578d3Smrg HPUX_IA64_MODE="64" 51232b578d3Smrg ;; 51332b578d3Smrg esac 51432b578d3Smrg fi 51532b578d3Smrg rm -rf conftest* 51632b578d3Smrg ;; 51732b578d3Smrg*-*-irix6*) 51832b578d3Smrg # Find out which ABI we are using. 51932b578d3Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 52032b578d3Smrg if AC_TRY_EVAL(ac_compile); then 52132b578d3Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 52232b578d3Smrg case `/usr/bin/file conftest.$ac_objext` in 52332b578d3Smrg *32-bit*) 52432b578d3Smrg LD="${LD-ld} -melf32bsmip" 52532b578d3Smrg ;; 52632b578d3Smrg *N32*) 52732b578d3Smrg LD="${LD-ld} -melf32bmipn32" 52832b578d3Smrg ;; 52932b578d3Smrg *64-bit*) 53032b578d3Smrg LD="${LD-ld} -melf64bmip" 53132b578d3Smrg ;; 53232b578d3Smrg esac 53332b578d3Smrg else 53432b578d3Smrg case `/usr/bin/file conftest.$ac_objext` in 53532b578d3Smrg *32-bit*) 53632b578d3Smrg LD="${LD-ld} -32" 53732b578d3Smrg ;; 53832b578d3Smrg *N32*) 53932b578d3Smrg LD="${LD-ld} -n32" 54032b578d3Smrg ;; 54132b578d3Smrg *64-bit*) 54232b578d3Smrg LD="${LD-ld} -64" 54332b578d3Smrg ;; 54432b578d3Smrg esac 54532b578d3Smrg fi 54632b578d3Smrg fi 54732b578d3Smrg rm -rf conftest* 54832b578d3Smrg ;; 54932b578d3Smrg 55032b578d3Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 55132b578d3Smrgs390*-*linux*|sparc*-*linux*) 55232b578d3Smrg # Find out which ABI we are using. 55332b578d3Smrg echo 'int i;' > conftest.$ac_ext 55432b578d3Smrg if AC_TRY_EVAL(ac_compile); then 55532b578d3Smrg case `/usr/bin/file conftest.o` in 55632b578d3Smrg *32-bit*) 55732b578d3Smrg case $host in 55832b578d3Smrg x86_64-*kfreebsd*-gnu) 55932b578d3Smrg LD="${LD-ld} -m elf_i386_fbsd" 56032b578d3Smrg ;; 56132b578d3Smrg x86_64-*linux*) 56232b578d3Smrg LD="${LD-ld} -m elf_i386" 56332b578d3Smrg ;; 56432b578d3Smrg ppc64-*linux*|powerpc64-*linux*) 56532b578d3Smrg LD="${LD-ld} -m elf32ppclinux" 56632b578d3Smrg ;; 56732b578d3Smrg s390x-*linux*) 56832b578d3Smrg LD="${LD-ld} -m elf_s390" 56932b578d3Smrg ;; 57032b578d3Smrg sparc64-*linux*) 57132b578d3Smrg LD="${LD-ld} -m elf32_sparc" 57232b578d3Smrg ;; 57332b578d3Smrg esac 57432b578d3Smrg ;; 57532b578d3Smrg *64-bit*) 57632b578d3Smrg libsuff=64 57732b578d3Smrg case $host in 57832b578d3Smrg x86_64-*kfreebsd*-gnu) 57932b578d3Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 58032b578d3Smrg ;; 58132b578d3Smrg x86_64-*linux*) 58232b578d3Smrg LD="${LD-ld} -m elf_x86_64" 58332b578d3Smrg ;; 58432b578d3Smrg ppc*-*linux*|powerpc*-*linux*) 58532b578d3Smrg LD="${LD-ld} -m elf64ppc" 58632b578d3Smrg ;; 58732b578d3Smrg s390*-*linux*) 58832b578d3Smrg LD="${LD-ld} -m elf64_s390" 58932b578d3Smrg ;; 59032b578d3Smrg sparc*-*linux*) 59132b578d3Smrg LD="${LD-ld} -m elf64_sparc" 59232b578d3Smrg ;; 59332b578d3Smrg esac 59432b578d3Smrg ;; 59532b578d3Smrg esac 59632b578d3Smrg fi 59732b578d3Smrg rm -rf conftest* 59832b578d3Smrg ;; 59932b578d3Smrg 60032b578d3Smrg*-*-sco3.2v5*) 60132b578d3Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 60232b578d3Smrg SAVE_CFLAGS="$CFLAGS" 60332b578d3Smrg CFLAGS="$CFLAGS -belf" 60432b578d3Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 60532b578d3Smrg [AC_LANG_PUSH(C) 60632b578d3Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 60732b578d3Smrg AC_LANG_POP]) 60832b578d3Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 60932b578d3Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 61032b578d3Smrg CFLAGS="$SAVE_CFLAGS" 61132b578d3Smrg fi 61232b578d3Smrg ;; 61332b578d3Smrgsparc*-*solaris*) 61432b578d3Smrg # Find out which ABI we are using. 61532b578d3Smrg echo 'int i;' > conftest.$ac_ext 61632b578d3Smrg if AC_TRY_EVAL(ac_compile); then 61732b578d3Smrg case `/usr/bin/file conftest.o` in 61832b578d3Smrg *64-bit*) 61932b578d3Smrg case $lt_cv_prog_gnu_ld in 62032b578d3Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 62132b578d3Smrg *) LD="${LD-ld} -64" ;; 62232b578d3Smrg esac 62332b578d3Smrg ;; 62432b578d3Smrg esac 62532b578d3Smrg fi 62632b578d3Smrg rm -rf conftest* 62732b578d3Smrg ;; 62832b578d3Smrg 62932b578d3SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 63032b578d3Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 63132b578d3Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 63232b578d3Smrg AC_CHECK_TOOL(AS, as, false) 63332b578d3Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 63432b578d3Smrg ;; 63532b578d3Smrg ]) 63632b578d3Smrgesac 63732b578d3Smrg 63832b578d3Smrgneed_locks="$enable_libtool_lock" 63932b578d3Smrg 64032b578d3Smrg])# _LT_AC_LOCK 64132b578d3Smrg 64232b578d3Smrg 64332b578d3Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 64432b578d3Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 64532b578d3Smrg# ---------------------------------------------------------------- 64632b578d3Smrg# Check whether the given compiler option works 64732b578d3SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 64832b578d3Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 64932b578d3SmrgAC_CACHE_CHECK([$1], [$2], 65032b578d3Smrg [$2=no 65132b578d3Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 65232b578d3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 65332b578d3Smrg lt_compiler_flag="$3" 65432b578d3Smrg # Insert the option either (1) after the last *FLAGS variable, or 65532b578d3Smrg # (2) before a word containing "conftest.", or (3) at the end. 65632b578d3Smrg # Note that $ac_compile itself does not contain backslashes and begins 65732b578d3Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 65832b578d3Smrg # The option is referenced via a variable to avoid confusing sed. 65932b578d3Smrg lt_compile=`echo "$ac_compile" | $SED \ 66032b578d3Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 66132b578d3Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 66232b578d3Smrg -e 's:$: $lt_compiler_flag:'` 66332b578d3Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 66432b578d3Smrg (eval "$lt_compile" 2>conftest.err) 66532b578d3Smrg ac_status=$? 66632b578d3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 66732b578d3Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 66832b578d3Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 66932b578d3Smrg # The compiler can only warn and ignore the option if not recognized 67032b578d3Smrg # So say no if there are warnings other than the usual output. 67132b578d3Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 67232b578d3Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 67332b578d3Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 67432b578d3Smrg $2=yes 67532b578d3Smrg fi 67632b578d3Smrg fi 67732b578d3Smrg $rm conftest* 67832b578d3Smrg]) 67932b578d3Smrg 68032b578d3Smrgif test x"[$]$2" = xyes; then 68132b578d3Smrg ifelse([$5], , :, [$5]) 68232b578d3Smrgelse 68332b578d3Smrg ifelse([$6], , :, [$6]) 68432b578d3Smrgfi 68532b578d3Smrg])# AC_LIBTOOL_COMPILER_OPTION 68632b578d3Smrg 68732b578d3Smrg 68832b578d3Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 68932b578d3Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 69032b578d3Smrg# ------------------------------------------------------------ 69132b578d3Smrg# Check whether the given compiler option works 69232b578d3SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 69332b578d3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 69432b578d3SmrgAC_CACHE_CHECK([$1], [$2], 69532b578d3Smrg [$2=no 69632b578d3Smrg save_LDFLAGS="$LDFLAGS" 69732b578d3Smrg LDFLAGS="$LDFLAGS $3" 69832b578d3Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 69932b578d3Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 70032b578d3Smrg # The linker can only warn and ignore the option if not recognized 70132b578d3Smrg # So say no if there are warnings 70232b578d3Smrg if test -s conftest.err; then 70332b578d3Smrg # Append any errors to the config.log. 70432b578d3Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 70532b578d3Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 70632b578d3Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 70732b578d3Smrg if diff conftest.exp conftest.er2 >/dev/null; then 70832b578d3Smrg $2=yes 70932b578d3Smrg fi 71032b578d3Smrg else 71132b578d3Smrg $2=yes 71232b578d3Smrg fi 71332b578d3Smrg fi 71432b578d3Smrg $rm conftest* 71532b578d3Smrg LDFLAGS="$save_LDFLAGS" 71632b578d3Smrg]) 71732b578d3Smrg 71832b578d3Smrgif test x"[$]$2" = xyes; then 71932b578d3Smrg ifelse([$4], , :, [$4]) 72032b578d3Smrgelse 72132b578d3Smrg ifelse([$5], , :, [$5]) 72232b578d3Smrgfi 72332b578d3Smrg])# AC_LIBTOOL_LINKER_OPTION 72432b578d3Smrg 72532b578d3Smrg 72632b578d3Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 72732b578d3Smrg# -------------------------- 72832b578d3SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 72932b578d3Smrg[# find the maximum length of command line arguments 73032b578d3SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 73132b578d3SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 73232b578d3Smrg i=0 73332b578d3Smrg teststring="ABCD" 73432b578d3Smrg 73532b578d3Smrg case $build_os in 73632b578d3Smrg msdosdjgpp*) 73732b578d3Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 73832b578d3Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 73932b578d3Smrg # during glob expansion). Even if it were fixed, the result of this 74032b578d3Smrg # check would be larger than it should be. 74132b578d3Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 74232b578d3Smrg ;; 74332b578d3Smrg 74432b578d3Smrg gnu*) 74532b578d3Smrg # Under GNU Hurd, this test is not required because there is 74632b578d3Smrg # no limit to the length of command line arguments. 74732b578d3Smrg # Libtool will interpret -1 as no limit whatsoever 74832b578d3Smrg lt_cv_sys_max_cmd_len=-1; 74932b578d3Smrg ;; 75032b578d3Smrg 75132b578d3Smrg cygwin* | mingw*) 75232b578d3Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 75332b578d3Smrg # about 5 minutes as the teststring grows exponentially. 75432b578d3Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 75532b578d3Smrg # you end up with a "frozen" computer, even though with patience 75632b578d3Smrg # the test eventually succeeds (with a max line length of 256k). 75732b578d3Smrg # Instead, let's just punt: use the minimum linelength reported by 75832b578d3Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 75932b578d3Smrg lt_cv_sys_max_cmd_len=8192; 76032b578d3Smrg ;; 76132b578d3Smrg 76232b578d3Smrg amigaos*) 76332b578d3Smrg # On AmigaOS with pdksh, this test takes hours, literally. 76432b578d3Smrg # So we just punt and use a minimum line length of 8192. 76532b578d3Smrg lt_cv_sys_max_cmd_len=8192; 76632b578d3Smrg ;; 76732b578d3Smrg 76832b578d3Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 76932b578d3Smrg # This has been around since 386BSD, at least. Likely further. 77032b578d3Smrg if test -x /sbin/sysctl; then 77132b578d3Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 77232b578d3Smrg elif test -x /usr/sbin/sysctl; then 77332b578d3Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 77432b578d3Smrg else 77532b578d3Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 77632b578d3Smrg fi 77732b578d3Smrg # And add a safety zone 77832b578d3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 77932b578d3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 78032b578d3Smrg ;; 78132b578d3Smrg 78232b578d3Smrg interix*) 78332b578d3Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 78432b578d3Smrg lt_cv_sys_max_cmd_len=196608 78532b578d3Smrg ;; 78632b578d3Smrg 78732b578d3Smrg osf*) 78832b578d3Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 78932b578d3Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 79032b578d3Smrg # nice to cause kernel panics so lets avoid the loop below. 79132b578d3Smrg # First set a reasonable default. 79232b578d3Smrg lt_cv_sys_max_cmd_len=16384 79332b578d3Smrg # 79432b578d3Smrg if test -x /sbin/sysconfig; then 79532b578d3Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 79632b578d3Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 79732b578d3Smrg esac 79832b578d3Smrg fi 79932b578d3Smrg ;; 80032b578d3Smrg sco3.2v5*) 80132b578d3Smrg lt_cv_sys_max_cmd_len=102400 80232b578d3Smrg ;; 80332b578d3Smrg sysv5* | sco5v6* | sysv4.2uw2*) 80432b578d3Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 80532b578d3Smrg if test -n "$kargmax"; then 80632b578d3Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 80732b578d3Smrg else 80832b578d3Smrg lt_cv_sys_max_cmd_len=32768 80932b578d3Smrg fi 81032b578d3Smrg ;; 81132b578d3Smrg *) 81232b578d3Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 81332b578d3Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 81432b578d3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 81532b578d3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 81632b578d3Smrg else 81732b578d3Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 81832b578d3Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 81932b578d3Smrg = "XX$teststring") >/dev/null 2>&1 && 82032b578d3Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 82132b578d3Smrg lt_cv_sys_max_cmd_len=$new_result && 82232b578d3Smrg test $i != 17 # 1/2 MB should be enough 82332b578d3Smrg do 82432b578d3Smrg i=`expr $i + 1` 82532b578d3Smrg teststring=$teststring$teststring 82632b578d3Smrg done 82732b578d3Smrg teststring= 82832b578d3Smrg # Add a significant safety factor because C++ compilers can tack on massive 82932b578d3Smrg # amounts of additional arguments before passing them to the linker. 83032b578d3Smrg # It appears as though 1/2 is a usable value. 83132b578d3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 83232b578d3Smrg fi 83332b578d3Smrg ;; 83432b578d3Smrg esac 83532b578d3Smrg]) 83632b578d3Smrgif test -n $lt_cv_sys_max_cmd_len ; then 83732b578d3Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 83832b578d3Smrgelse 83932b578d3Smrg AC_MSG_RESULT(none) 84032b578d3Smrgfi 84132b578d3Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 84232b578d3Smrg 84332b578d3Smrg 84432b578d3Smrg# _LT_AC_CHECK_DLFCN 84532b578d3Smrg# ------------------ 84632b578d3SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 84732b578d3Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 84832b578d3Smrg])# _LT_AC_CHECK_DLFCN 84932b578d3Smrg 85032b578d3Smrg 85132b578d3Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 85232b578d3Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 85332b578d3Smrg# --------------------------------------------------------------------- 85432b578d3SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 85532b578d3Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 85632b578d3Smrgif test "$cross_compiling" = yes; then : 85732b578d3Smrg [$4] 85832b578d3Smrgelse 85932b578d3Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 86032b578d3Smrg lt_status=$lt_dlunknown 86132b578d3Smrg cat > conftest.$ac_ext <<EOF 86232b578d3Smrg[#line __oline__ "configure" 86332b578d3Smrg#include "confdefs.h" 86432b578d3Smrg 86532b578d3Smrg#if HAVE_DLFCN_H 86632b578d3Smrg#include <dlfcn.h> 86732b578d3Smrg#endif 86832b578d3Smrg 86932b578d3Smrg#include <stdio.h> 87032b578d3Smrg 87132b578d3Smrg#ifdef RTLD_GLOBAL 87232b578d3Smrg# define LT_DLGLOBAL RTLD_GLOBAL 87332b578d3Smrg#else 87432b578d3Smrg# ifdef DL_GLOBAL 87532b578d3Smrg# define LT_DLGLOBAL DL_GLOBAL 87632b578d3Smrg# else 87732b578d3Smrg# define LT_DLGLOBAL 0 87832b578d3Smrg# endif 87932b578d3Smrg#endif 88032b578d3Smrg 88132b578d3Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 88232b578d3Smrg find out it does not work in some platform. */ 88332b578d3Smrg#ifndef LT_DLLAZY_OR_NOW 88432b578d3Smrg# ifdef RTLD_LAZY 88532b578d3Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 88632b578d3Smrg# else 88732b578d3Smrg# ifdef DL_LAZY 88832b578d3Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 88932b578d3Smrg# else 89032b578d3Smrg# ifdef RTLD_NOW 89132b578d3Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 89232b578d3Smrg# else 89332b578d3Smrg# ifdef DL_NOW 89432b578d3Smrg# define LT_DLLAZY_OR_NOW DL_NOW 89532b578d3Smrg# else 89632b578d3Smrg# define LT_DLLAZY_OR_NOW 0 89732b578d3Smrg# endif 89832b578d3Smrg# endif 89932b578d3Smrg# endif 90032b578d3Smrg# endif 90132b578d3Smrg#endif 90232b578d3Smrg 90332b578d3Smrg#ifdef __cplusplus 90432b578d3Smrgextern "C" void exit (int); 90532b578d3Smrg#endif 90632b578d3Smrg 90732b578d3Smrgvoid fnord() { int i=42;} 90832b578d3Smrgint main () 90932b578d3Smrg{ 91032b578d3Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 91132b578d3Smrg int status = $lt_dlunknown; 91232b578d3Smrg 91332b578d3Smrg if (self) 91432b578d3Smrg { 91532b578d3Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 91632b578d3Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 91732b578d3Smrg /* dlclose (self); */ 91832b578d3Smrg } 91932b578d3Smrg else 92032b578d3Smrg puts (dlerror ()); 92132b578d3Smrg 92232b578d3Smrg exit (status); 92332b578d3Smrg}] 92432b578d3SmrgEOF 92532b578d3Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 92632b578d3Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 92732b578d3Smrg lt_status=$? 92832b578d3Smrg case x$lt_status in 92932b578d3Smrg x$lt_dlno_uscore) $1 ;; 93032b578d3Smrg x$lt_dlneed_uscore) $2 ;; 93132b578d3Smrg x$lt_dlunknown|x*) $3 ;; 93232b578d3Smrg esac 93332b578d3Smrg else : 93432b578d3Smrg # compilation failed 93532b578d3Smrg $3 93632b578d3Smrg fi 93732b578d3Smrgfi 93832b578d3Smrgrm -fr conftest* 93932b578d3Smrg])# _LT_AC_TRY_DLOPEN_SELF 94032b578d3Smrg 94132b578d3Smrg 94232b578d3Smrg# AC_LIBTOOL_DLOPEN_SELF 94332b578d3Smrg# ---------------------- 94432b578d3SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 94532b578d3Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 94632b578d3Smrgif test "x$enable_dlopen" != xyes; then 94732b578d3Smrg enable_dlopen=unknown 94832b578d3Smrg enable_dlopen_self=unknown 94932b578d3Smrg enable_dlopen_self_static=unknown 95032b578d3Smrgelse 95132b578d3Smrg lt_cv_dlopen=no 95232b578d3Smrg lt_cv_dlopen_libs= 95332b578d3Smrg 95432b578d3Smrg case $host_os in 95532b578d3Smrg beos*) 95632b578d3Smrg lt_cv_dlopen="load_add_on" 95732b578d3Smrg lt_cv_dlopen_libs= 95832b578d3Smrg lt_cv_dlopen_self=yes 95932b578d3Smrg ;; 96032b578d3Smrg 96132b578d3Smrg mingw* | pw32*) 96232b578d3Smrg lt_cv_dlopen="LoadLibrary" 96332b578d3Smrg lt_cv_dlopen_libs= 96432b578d3Smrg ;; 96532b578d3Smrg 96632b578d3Smrg cygwin*) 96732b578d3Smrg lt_cv_dlopen="dlopen" 96832b578d3Smrg lt_cv_dlopen_libs= 96932b578d3Smrg ;; 97032b578d3Smrg 97132b578d3Smrg darwin*) 97232b578d3Smrg # if libdl is installed we need to link against it 97332b578d3Smrg AC_CHECK_LIB([dl], [dlopen], 97432b578d3Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 97532b578d3Smrg lt_cv_dlopen="dyld" 97632b578d3Smrg lt_cv_dlopen_libs= 97732b578d3Smrg lt_cv_dlopen_self=yes 97832b578d3Smrg ]) 97932b578d3Smrg ;; 98032b578d3Smrg 98132b578d3Smrg *) 98232b578d3Smrg AC_CHECK_FUNC([shl_load], 98332b578d3Smrg [lt_cv_dlopen="shl_load"], 98432b578d3Smrg [AC_CHECK_LIB([dld], [shl_load], 98532b578d3Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 98632b578d3Smrg [AC_CHECK_FUNC([dlopen], 98732b578d3Smrg [lt_cv_dlopen="dlopen"], 98832b578d3Smrg [AC_CHECK_LIB([dl], [dlopen], 98932b578d3Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 99032b578d3Smrg [AC_CHECK_LIB([svld], [dlopen], 99132b578d3Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 99232b578d3Smrg [AC_CHECK_LIB([dld], [dld_link], 99332b578d3Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 99432b578d3Smrg ]) 99532b578d3Smrg ]) 99632b578d3Smrg ]) 99732b578d3Smrg ]) 99832b578d3Smrg ]) 99932b578d3Smrg ;; 100032b578d3Smrg esac 100132b578d3Smrg 100232b578d3Smrg if test "x$lt_cv_dlopen" != xno; then 100332b578d3Smrg enable_dlopen=yes 100432b578d3Smrg else 100532b578d3Smrg enable_dlopen=no 100632b578d3Smrg fi 100732b578d3Smrg 100832b578d3Smrg case $lt_cv_dlopen in 100932b578d3Smrg dlopen) 101032b578d3Smrg save_CPPFLAGS="$CPPFLAGS" 101132b578d3Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 101232b578d3Smrg 101332b578d3Smrg save_LDFLAGS="$LDFLAGS" 101432b578d3Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 101532b578d3Smrg 101632b578d3Smrg save_LIBS="$LIBS" 101732b578d3Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 101832b578d3Smrg 101932b578d3Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 102032b578d3Smrg lt_cv_dlopen_self, [dnl 102132b578d3Smrg _LT_AC_TRY_DLOPEN_SELF( 102232b578d3Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 102332b578d3Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 102432b578d3Smrg ]) 102532b578d3Smrg 102632b578d3Smrg if test "x$lt_cv_dlopen_self" = xyes; then 102732b578d3Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 102832b578d3Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 102932b578d3Smrg lt_cv_dlopen_self_static, [dnl 103032b578d3Smrg _LT_AC_TRY_DLOPEN_SELF( 103132b578d3Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 103232b578d3Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 103332b578d3Smrg ]) 103432b578d3Smrg fi 103532b578d3Smrg 103632b578d3Smrg CPPFLAGS="$save_CPPFLAGS" 103732b578d3Smrg LDFLAGS="$save_LDFLAGS" 103832b578d3Smrg LIBS="$save_LIBS" 103932b578d3Smrg ;; 104032b578d3Smrg esac 104132b578d3Smrg 104232b578d3Smrg case $lt_cv_dlopen_self in 104332b578d3Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 104432b578d3Smrg *) enable_dlopen_self=unknown ;; 104532b578d3Smrg esac 104632b578d3Smrg 104732b578d3Smrg case $lt_cv_dlopen_self_static in 104832b578d3Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 104932b578d3Smrg *) enable_dlopen_self_static=unknown ;; 105032b578d3Smrg esac 105132b578d3Smrgfi 105232b578d3Smrg])# AC_LIBTOOL_DLOPEN_SELF 105332b578d3Smrg 105432b578d3Smrg 105532b578d3Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 105632b578d3Smrg# --------------------------------- 105732b578d3Smrg# Check to see if options -c and -o are simultaneously supported by compiler 105832b578d3SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 105932b578d3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 106032b578d3SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 106132b578d3SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 106232b578d3Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 106332b578d3Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 106432b578d3Smrg $rm -r conftest 2>/dev/null 106532b578d3Smrg mkdir conftest 106632b578d3Smrg cd conftest 106732b578d3Smrg mkdir out 106832b578d3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 106932b578d3Smrg 107032b578d3Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 107132b578d3Smrg # Insert the option either (1) after the last *FLAGS variable, or 107232b578d3Smrg # (2) before a word containing "conftest.", or (3) at the end. 107332b578d3Smrg # Note that $ac_compile itself does not contain backslashes and begins 107432b578d3Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 107532b578d3Smrg lt_compile=`echo "$ac_compile" | $SED \ 107632b578d3Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 107732b578d3Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 107832b578d3Smrg -e 's:$: $lt_compiler_flag:'` 107932b578d3Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 108032b578d3Smrg (eval "$lt_compile" 2>out/conftest.err) 108132b578d3Smrg ac_status=$? 108232b578d3Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 108332b578d3Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 108432b578d3Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 108532b578d3Smrg then 108632b578d3Smrg # The compiler can only warn and ignore the option if not recognized 108732b578d3Smrg # So say no if there are warnings 108832b578d3Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 108932b578d3Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 109032b578d3Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 109132b578d3Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 109232b578d3Smrg fi 109332b578d3Smrg fi 109432b578d3Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 109532b578d3Smrg $rm conftest* 109632b578d3Smrg # SGI C++ compiler will create directory out/ii_files/ for 109732b578d3Smrg # template instantiation 109832b578d3Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 109932b578d3Smrg $rm out/* && rmdir out 110032b578d3Smrg cd .. 110132b578d3Smrg rmdir conftest 110232b578d3Smrg $rm conftest* 110332b578d3Smrg]) 110432b578d3Smrg])# AC_LIBTOOL_PROG_CC_C_O 110532b578d3Smrg 110632b578d3Smrg 110732b578d3Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 110832b578d3Smrg# ----------------------------------------- 110932b578d3Smrg# Check to see if we can do hard links to lock some files if needed 111032b578d3SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 111132b578d3Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 111232b578d3Smrg 111332b578d3Smrghard_links="nottested" 111432b578d3Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 111532b578d3Smrg # do not overwrite the value of need_locks provided by the user 111632b578d3Smrg AC_MSG_CHECKING([if we can lock with hard links]) 111732b578d3Smrg hard_links=yes 111832b578d3Smrg $rm conftest* 111932b578d3Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 112032b578d3Smrg touch conftest.a 112132b578d3Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 112232b578d3Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 112332b578d3Smrg AC_MSG_RESULT([$hard_links]) 112432b578d3Smrg if test "$hard_links" = no; then 112532b578d3Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 112632b578d3Smrg need_locks=warn 112732b578d3Smrg fi 112832b578d3Smrgelse 112932b578d3Smrg need_locks=no 113032b578d3Smrgfi 113132b578d3Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 113232b578d3Smrg 113332b578d3Smrg 113432b578d3Smrg# AC_LIBTOOL_OBJDIR 113532b578d3Smrg# ----------------- 113632b578d3SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 113732b578d3Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 113832b578d3Smrg[rm -f .libs 2>/dev/null 113932b578d3Smrgmkdir .libs 2>/dev/null 114032b578d3Smrgif test -d .libs; then 114132b578d3Smrg lt_cv_objdir=.libs 114232b578d3Smrgelse 114332b578d3Smrg # MS-DOS does not allow filenames that begin with a dot. 114432b578d3Smrg lt_cv_objdir=_libs 114532b578d3Smrgfi 114632b578d3Smrgrmdir .libs 2>/dev/null]) 114732b578d3Smrgobjdir=$lt_cv_objdir 114832b578d3Smrg])# AC_LIBTOOL_OBJDIR 114932b578d3Smrg 115032b578d3Smrg 115132b578d3Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 115232b578d3Smrg# ---------------------------------------------- 115332b578d3Smrg# Check hardcoding attributes. 115432b578d3SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 115532b578d3Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 115632b578d3Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 115732b578d3Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 115832b578d3Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 115932b578d3Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 116032b578d3Smrg 116132b578d3Smrg # We can hardcode non-existant directories. 116232b578d3Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 116332b578d3Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 116432b578d3Smrg # have to relink, otherwise we might link with an installed library 116532b578d3Smrg # when we should be linking with a yet-to-be-installed one 116632b578d3Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 116732b578d3Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 116832b578d3Smrg # Linking always hardcodes the temporary library directory. 116932b578d3Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 117032b578d3Smrg else 117132b578d3Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 117232b578d3Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 117332b578d3Smrg fi 117432b578d3Smrgelse 117532b578d3Smrg # We cannot hardcode anything, or else we can only hardcode existing 117632b578d3Smrg # directories. 117732b578d3Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 117832b578d3Smrgfi 117932b578d3SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 118032b578d3Smrg 118132b578d3Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 118232b578d3Smrg # Fast installation is not supported 118332b578d3Smrg enable_fast_install=no 118432b578d3Smrgelif test "$shlibpath_overrides_runpath" = yes || 118532b578d3Smrg test "$enable_shared" = no; then 118632b578d3Smrg # Fast installation is not necessary 118732b578d3Smrg enable_fast_install=needless 118832b578d3Smrgfi 118932b578d3Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 119032b578d3Smrg 119132b578d3Smrg 119232b578d3Smrg# AC_LIBTOOL_SYS_LIB_STRIP 119332b578d3Smrg# ------------------------ 119432b578d3SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 119532b578d3Smrg[striplib= 119632b578d3Smrgold_striplib= 119732b578d3SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 119832b578d3Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 119932b578d3Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 120032b578d3Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 120132b578d3Smrg AC_MSG_RESULT([yes]) 120232b578d3Smrgelse 120332b578d3Smrg# FIXME - insert some real tests, host_os isn't really good enough 120432b578d3Smrg case $host_os in 120532b578d3Smrg darwin*) 120632b578d3Smrg if test -n "$STRIP" ; then 120732b578d3Smrg striplib="$STRIP -x" 120832b578d3Smrg old_striplib="$STRIP -S" 120932b578d3Smrg AC_MSG_RESULT([yes]) 121032b578d3Smrg else 121132b578d3Smrg AC_MSG_RESULT([no]) 121232b578d3Smrgfi 121332b578d3Smrg ;; 121432b578d3Smrg *) 121532b578d3Smrg AC_MSG_RESULT([no]) 121632b578d3Smrg ;; 121732b578d3Smrg esac 121832b578d3Smrgfi 121932b578d3Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 122032b578d3Smrg 122132b578d3Smrg 122232b578d3Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 122332b578d3Smrg# ----------------------------- 122432b578d3Smrg# PORTME Fill in your ld.so characteristics 122532b578d3SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 122632b578d3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 122732b578d3SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 122832b578d3Smrglibrary_names_spec= 122932b578d3Smrglibname_spec='lib$name' 123032b578d3Smrgsoname_spec= 123132b578d3Smrgshrext_cmds=".so" 123232b578d3Smrgpostinstall_cmds= 123332b578d3Smrgpostuninstall_cmds= 123432b578d3Smrgfinish_cmds= 123532b578d3Smrgfinish_eval= 123632b578d3Smrgshlibpath_var= 123732b578d3Smrgshlibpath_overrides_runpath=unknown 123832b578d3Smrgversion_type=none 123932b578d3Smrgdynamic_linker="$host_os ld.so" 124032b578d3Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 124132b578d3Smrgm4_if($1,[],[ 124232b578d3Smrgif test "$GCC" = yes; then 124332b578d3Smrg case $host_os in 124432b578d3Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 124532b578d3Smrg *) lt_awk_arg="/^libraries:/" ;; 124632b578d3Smrg esac 124732b578d3Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 124832b578d3Smrg if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 124932b578d3Smrg # if the path contains ";" then we assume it to be the separator 125032b578d3Smrg # otherwise default to the standard path separator (i.e. ":") - it is 125132b578d3Smrg # assumed that no part of a normal pathname contains ";" but that should 125232b578d3Smrg # okay in the real world where ";" in dirpaths is itself problematic. 125332b578d3Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 125432b578d3Smrg else 125532b578d3Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 125632b578d3Smrg fi 125732b578d3Smrg # Ok, now we have the path, separated by spaces, we can step through it 125832b578d3Smrg # and add multilib dir if necessary. 125932b578d3Smrg lt_tmp_lt_search_path_spec= 126032b578d3Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 126132b578d3Smrg for lt_sys_path in $lt_search_path_spec; do 126232b578d3Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 126332b578d3Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 126432b578d3Smrg else 126532b578d3Smrg test -d "$lt_sys_path" && \ 126632b578d3Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 126732b578d3Smrg fi 126832b578d3Smrg done 126932b578d3Smrg lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 127032b578d3SmrgBEGIN {RS=" "; FS="/|\n";} { 127132b578d3Smrg lt_foo=""; 127232b578d3Smrg lt_count=0; 127332b578d3Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 127432b578d3Smrg if ($lt_i != "" && $lt_i != ".") { 127532b578d3Smrg if ($lt_i == "..") { 127632b578d3Smrg lt_count++; 127732b578d3Smrg } else { 127832b578d3Smrg if (lt_count == 0) { 127932b578d3Smrg lt_foo="/" $lt_i lt_foo; 128032b578d3Smrg } else { 128132b578d3Smrg lt_count--; 128232b578d3Smrg } 128332b578d3Smrg } 128432b578d3Smrg } 128532b578d3Smrg } 128632b578d3Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 128732b578d3Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 128832b578d3Smrg}'` 128932b578d3Smrg sys_lib_search_path_spec=`echo $lt_search_path_spec` 129032b578d3Smrgelse 129132b578d3Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 129232b578d3Smrgfi]) 129332b578d3Smrgneed_lib_prefix=unknown 129432b578d3Smrghardcode_into_libs=no 129532b578d3Smrg 129632b578d3Smrg# when you set need_version to no, make sure it does not cause -set_version 129732b578d3Smrg# flags to be left without arguments 129832b578d3Smrgneed_version=unknown 129932b578d3Smrg 130032b578d3Smrgcase $host_os in 130132b578d3Smrgaix3*) 130232b578d3Smrg version_type=linux 130332b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 130432b578d3Smrg shlibpath_var=LIBPATH 130532b578d3Smrg 130632b578d3Smrg # AIX 3 has no versioning support, so we append a major version to the name. 130732b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 130832b578d3Smrg ;; 130932b578d3Smrg 131032b578d3Smrgaix4* | aix5*) 131132b578d3Smrg version_type=linux 131232b578d3Smrg need_lib_prefix=no 131332b578d3Smrg need_version=no 131432b578d3Smrg hardcode_into_libs=yes 131532b578d3Smrg if test "$host_cpu" = ia64; then 131632b578d3Smrg # AIX 5 supports IA64 131732b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 131832b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 131932b578d3Smrg else 132032b578d3Smrg # With GCC up to 2.95.x, collect2 would create an import file 132132b578d3Smrg # for dependence libraries. The import file would start with 132232b578d3Smrg # the line `#! .'. This would cause the generated library to 132332b578d3Smrg # depend on `.', always an invalid library. This was fixed in 132432b578d3Smrg # development snapshots of GCC prior to 3.0. 132532b578d3Smrg case $host_os in 132632b578d3Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 132732b578d3Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 132832b578d3Smrg echo ' yes ' 132932b578d3Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 133032b578d3Smrg : 133132b578d3Smrg else 133232b578d3Smrg can_build_shared=no 133332b578d3Smrg fi 133432b578d3Smrg ;; 133532b578d3Smrg esac 133632b578d3Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 133732b578d3Smrg # soname into executable. Probably we can add versioning support to 133832b578d3Smrg # collect2, so additional links can be useful in future. 133932b578d3Smrg if test "$aix_use_runtimelinking" = yes; then 134032b578d3Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 134132b578d3Smrg # instead of lib<name>.a to let people know that these are not 134232b578d3Smrg # typical AIX shared libraries. 134332b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 134432b578d3Smrg else 134532b578d3Smrg # We preserve .a as extension for shared libraries through AIX4.2 134632b578d3Smrg # and later when we are not doing run time linking. 134732b578d3Smrg library_names_spec='${libname}${release}.a $libname.a' 134832b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 134932b578d3Smrg fi 135032b578d3Smrg shlibpath_var=LIBPATH 135132b578d3Smrg fi 135232b578d3Smrg ;; 135332b578d3Smrg 135432b578d3Smrgamigaos*) 135532b578d3Smrg library_names_spec='$libname.ixlibrary $libname.a' 135632b578d3Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 135732b578d3Smrg 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' 135832b578d3Smrg ;; 135932b578d3Smrg 136032b578d3Smrgbeos*) 136132b578d3Smrg library_names_spec='${libname}${shared_ext}' 136232b578d3Smrg dynamic_linker="$host_os ld.so" 136332b578d3Smrg shlibpath_var=LIBRARY_PATH 136432b578d3Smrg ;; 136532b578d3Smrg 136632b578d3Smrgbsdi[[45]]*) 136732b578d3Smrg version_type=linux 136832b578d3Smrg need_version=no 136932b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 137032b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 137132b578d3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 137232b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 137332b578d3Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 137432b578d3Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 137532b578d3Smrg # the default ld.so.conf also contains /usr/contrib/lib and 137632b578d3Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 137732b578d3Smrg # libtool to hard-code these into programs 137832b578d3Smrg ;; 137932b578d3Smrg 138032b578d3Smrgcygwin* | mingw* | pw32*) 138132b578d3Smrg version_type=windows 138232b578d3Smrg shrext_cmds=".dll" 138332b578d3Smrg need_version=no 138432b578d3Smrg need_lib_prefix=no 138532b578d3Smrg 138632b578d3Smrg case $GCC,$host_os in 138732b578d3Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 138832b578d3Smrg library_names_spec='$libname.dll.a' 138932b578d3Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 139032b578d3Smrg postinstall_cmds='base_file=`basename \${file}`~ 139132b578d3Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 139232b578d3Smrg dldir=$destdir/`dirname \$dlpath`~ 139332b578d3Smrg test -d \$dldir || mkdir -p \$dldir~ 139432b578d3Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 139532b578d3Smrg chmod a+x \$dldir/$dlname' 139632b578d3Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 139732b578d3Smrg dlpath=$dir/\$dldll~ 139832b578d3Smrg $rm \$dlpath' 139932b578d3Smrg shlibpath_overrides_runpath=yes 140032b578d3Smrg 140132b578d3Smrg case $host_os in 140232b578d3Smrg cygwin*) 140332b578d3Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 140432b578d3Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 140532b578d3Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 140632b578d3Smrg ;; 140732b578d3Smrg mingw*) 140832b578d3Smrg # MinGW DLLs use traditional 'lib' prefix 140932b578d3Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 141032b578d3Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 141132b578d3Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 141232b578d3Smrg # It is most probably a Windows format PATH printed by 141332b578d3Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 141432b578d3Smrg # path with ; separators, and with drive letters. We can handle the 141532b578d3Smrg # drive letters (cygwin fileutils understands them), so leave them, 141632b578d3Smrg # especially as we might pass files found there to a mingw objdump, 141732b578d3Smrg # which wouldn't understand a cygwinified path. Ahh. 141832b578d3Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 141932b578d3Smrg else 142032b578d3Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 142132b578d3Smrg fi 142232b578d3Smrg ;; 142332b578d3Smrg pw32*) 142432b578d3Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 142532b578d3Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 142632b578d3Smrg ;; 142732b578d3Smrg esac 142832b578d3Smrg ;; 142932b578d3Smrg 143032b578d3Smrg *) 143132b578d3Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 143232b578d3Smrg ;; 143332b578d3Smrg esac 143432b578d3Smrg dynamic_linker='Win32 ld.exe' 143532b578d3Smrg # FIXME: first we should search . and the directory the executable is in 143632b578d3Smrg shlibpath_var=PATH 143732b578d3Smrg ;; 143832b578d3Smrg 143932b578d3Smrgdarwin* | rhapsody*) 144032b578d3Smrg dynamic_linker="$host_os dyld" 144132b578d3Smrg version_type=darwin 144232b578d3Smrg need_lib_prefix=no 144332b578d3Smrg need_version=no 144432b578d3Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 144532b578d3Smrg soname_spec='${libname}${release}${major}$shared_ext' 144632b578d3Smrg shlibpath_overrides_runpath=yes 144732b578d3Smrg shlibpath_var=DYLD_LIBRARY_PATH 144832b578d3Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 144932b578d3Smrg m4_if([$1], [],[ 145032b578d3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 145132b578d3Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 145232b578d3Smrg ;; 145332b578d3Smrg 145432b578d3Smrgdgux*) 145532b578d3Smrg version_type=linux 145632b578d3Smrg need_lib_prefix=no 145732b578d3Smrg need_version=no 145832b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 145932b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 146032b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 146132b578d3Smrg ;; 146232b578d3Smrg 146332b578d3Smrgfreebsd1*) 146432b578d3Smrg dynamic_linker=no 146532b578d3Smrg ;; 146632b578d3Smrg 146732b578d3Smrgfreebsd* | dragonfly*) 146832b578d3Smrg # DragonFly does not have aout. When/if they implement a new 146932b578d3Smrg # versioning mechanism, adjust this. 147032b578d3Smrg if test -x /usr/bin/objformat; then 147132b578d3Smrg objformat=`/usr/bin/objformat` 147232b578d3Smrg else 147332b578d3Smrg case $host_os in 147432b578d3Smrg freebsd[[123]]*) objformat=aout ;; 147532b578d3Smrg *) objformat=elf ;; 147632b578d3Smrg esac 147732b578d3Smrg fi 147832b578d3Smrg version_type=freebsd-$objformat 147932b578d3Smrg case $version_type in 148032b578d3Smrg freebsd-elf*) 148132b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 148232b578d3Smrg need_version=no 148332b578d3Smrg need_lib_prefix=no 148432b578d3Smrg ;; 148532b578d3Smrg freebsd-*) 148632b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 148732b578d3Smrg need_version=yes 148832b578d3Smrg ;; 148932b578d3Smrg esac 149032b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 149132b578d3Smrg case $host_os in 149232b578d3Smrg freebsd2*) 149332b578d3Smrg shlibpath_overrides_runpath=yes 149432b578d3Smrg ;; 149532b578d3Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 149632b578d3Smrg shlibpath_overrides_runpath=yes 149732b578d3Smrg hardcode_into_libs=yes 149832b578d3Smrg ;; 149932b578d3Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 150032b578d3Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 150132b578d3Smrg shlibpath_overrides_runpath=no 150232b578d3Smrg hardcode_into_libs=yes 150332b578d3Smrg ;; 150432b578d3Smrg *) # from 4.6 on, and DragonFly 150532b578d3Smrg shlibpath_overrides_runpath=yes 150632b578d3Smrg hardcode_into_libs=yes 150732b578d3Smrg ;; 150832b578d3Smrg esac 150932b578d3Smrg ;; 151032b578d3Smrg 151132b578d3Smrggnu*) 151232b578d3Smrg version_type=linux 151332b578d3Smrg need_lib_prefix=no 151432b578d3Smrg need_version=no 151532b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 151632b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 151732b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 151832b578d3Smrg hardcode_into_libs=yes 151932b578d3Smrg ;; 152032b578d3Smrg 152132b578d3Smrghpux9* | hpux10* | hpux11*) 152232b578d3Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 152332b578d3Smrg # link against other versions. 152432b578d3Smrg version_type=sunos 152532b578d3Smrg need_lib_prefix=no 152632b578d3Smrg need_version=no 152732b578d3Smrg case $host_cpu in 152832b578d3Smrg ia64*) 152932b578d3Smrg shrext_cmds='.so' 153032b578d3Smrg hardcode_into_libs=yes 153132b578d3Smrg dynamic_linker="$host_os dld.so" 153232b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 153332b578d3Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 153432b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 153532b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 153632b578d3Smrg if test "X$HPUX_IA64_MODE" = X32; then 153732b578d3Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 153832b578d3Smrg else 153932b578d3Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 154032b578d3Smrg fi 154132b578d3Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 154232b578d3Smrg ;; 154332b578d3Smrg hppa*64*) 154432b578d3Smrg shrext_cmds='.sl' 154532b578d3Smrg hardcode_into_libs=yes 154632b578d3Smrg dynamic_linker="$host_os dld.sl" 154732b578d3Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 154832b578d3Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 154932b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 155032b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 155132b578d3Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 155232b578d3Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 155332b578d3Smrg ;; 155432b578d3Smrg *) 155532b578d3Smrg shrext_cmds='.sl' 155632b578d3Smrg dynamic_linker="$host_os dld.sl" 155732b578d3Smrg shlibpath_var=SHLIB_PATH 155832b578d3Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 155932b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 156032b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 156132b578d3Smrg ;; 156232b578d3Smrg esac 156332b578d3Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 156432b578d3Smrg postinstall_cmds='chmod 555 $lib' 156532b578d3Smrg ;; 156632b578d3Smrg 156732b578d3Smrginterix[[3-9]]*) 156832b578d3Smrg version_type=linux 156932b578d3Smrg need_lib_prefix=no 157032b578d3Smrg need_version=no 157132b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 157232b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 157332b578d3Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 157432b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 157532b578d3Smrg shlibpath_overrides_runpath=no 157632b578d3Smrg hardcode_into_libs=yes 157732b578d3Smrg ;; 157832b578d3Smrg 157932b578d3Smrgirix5* | irix6* | nonstopux*) 158032b578d3Smrg case $host_os in 158132b578d3Smrg nonstopux*) version_type=nonstopux ;; 158232b578d3Smrg *) 158332b578d3Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 158432b578d3Smrg version_type=linux 158532b578d3Smrg else 158632b578d3Smrg version_type=irix 158732b578d3Smrg fi ;; 158832b578d3Smrg esac 158932b578d3Smrg need_lib_prefix=no 159032b578d3Smrg need_version=no 159132b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 159232b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 159332b578d3Smrg case $host_os in 159432b578d3Smrg irix5* | nonstopux*) 159532b578d3Smrg libsuff= shlibsuff= 159632b578d3Smrg ;; 159732b578d3Smrg *) 159832b578d3Smrg case $LD in # libtool.m4 will add one of these switches to LD 159932b578d3Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 160032b578d3Smrg libsuff= shlibsuff= libmagic=32-bit;; 160132b578d3Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 160232b578d3Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 160332b578d3Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 160432b578d3Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 160532b578d3Smrg *) libsuff= shlibsuff= libmagic=never-match;; 160632b578d3Smrg esac 160732b578d3Smrg ;; 160832b578d3Smrg esac 160932b578d3Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 161032b578d3Smrg shlibpath_overrides_runpath=no 161132b578d3Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 161232b578d3Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 161332b578d3Smrg hardcode_into_libs=yes 161432b578d3Smrg ;; 161532b578d3Smrg 161632b578d3Smrg# No shared lib support for Linux oldld, aout, or coff. 161732b578d3Smrglinux*oldld* | linux*aout* | linux*coff*) 161832b578d3Smrg dynamic_linker=no 161932b578d3Smrg ;; 162032b578d3Smrg 162132b578d3Smrg# This must be Linux ELF. 162232b578d3Smrglinux* | k*bsd*-gnu) 162332b578d3Smrg version_type=linux 162432b578d3Smrg need_lib_prefix=no 162532b578d3Smrg need_version=no 162632b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 162732b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 162832b578d3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 162932b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 163032b578d3Smrg shlibpath_overrides_runpath=no 163132b578d3Smrg # This implies no fast_install, which is unacceptable. 163232b578d3Smrg # Some rework will be needed to allow for fast_install 163332b578d3Smrg # before this can be enabled. 163432b578d3Smrg hardcode_into_libs=yes 163532b578d3Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 163632b578d3Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 163732b578d3Smrg 163832b578d3Smrg # Append ld.so.conf contents to the search path 163932b578d3Smrg if test -f /etc/ld.so.conf; then 164032b578d3Smrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 164132b578d3Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 164232b578d3Smrg fi 164332b578d3Smrg 164432b578d3Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 164532b578d3Smrg # powerpc, because MkLinux only supported shared libraries with the 164632b578d3Smrg # GNU dynamic linker. Since this was broken with cross compilers, 164732b578d3Smrg # most powerpc-linux boxes support dynamic linking these days and 164832b578d3Smrg # people can always --disable-shared, the test was removed, and we 164932b578d3Smrg # assume the GNU/Linux dynamic linker is in use. 165032b578d3Smrg dynamic_linker='GNU/Linux ld.so' 165132b578d3Smrg ;; 165232b578d3Smrg 165332b578d3Smrgnetbsd*) 165432b578d3Smrg version_type=sunos 165532b578d3Smrg need_lib_prefix=no 165632b578d3Smrg need_version=no 165732b578d3Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 165832b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 165932b578d3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 166032b578d3Smrg dynamic_linker='NetBSD (a.out) ld.so' 166132b578d3Smrg else 166232b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 166332b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 166432b578d3Smrg dynamic_linker='NetBSD ld.elf_so' 166532b578d3Smrg fi 166632b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 166732b578d3Smrg shlibpath_overrides_runpath=yes 166832b578d3Smrg hardcode_into_libs=yes 166932b578d3Smrg ;; 167032b578d3Smrg 167132b578d3Smrgnewsos6) 167232b578d3Smrg version_type=linux 167332b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 167432b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 167532b578d3Smrg shlibpath_overrides_runpath=yes 167632b578d3Smrg ;; 167732b578d3Smrg 167832b578d3Smrgnto-qnx*) 167932b578d3Smrg version_type=linux 168032b578d3Smrg need_lib_prefix=no 168132b578d3Smrg need_version=no 168232b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 168332b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 168432b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 168532b578d3Smrg shlibpath_overrides_runpath=yes 168632b578d3Smrg ;; 168732b578d3Smrg 168832b578d3Smrgopenbsd*) 168932b578d3Smrg version_type=sunos 169032b578d3Smrg sys_lib_dlsearch_path_spec="/usr/lib" 169132b578d3Smrg need_lib_prefix=no 169232b578d3Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 169332b578d3Smrg case $host_os in 169432b578d3Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 169532b578d3Smrg *) need_version=no ;; 169632b578d3Smrg esac 169732b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 169832b578d3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 169932b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 170032b578d3Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 170132b578d3Smrg case $host_os in 170232b578d3Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 170332b578d3Smrg shlibpath_overrides_runpath=no 170432b578d3Smrg ;; 170532b578d3Smrg *) 170632b578d3Smrg shlibpath_overrides_runpath=yes 170732b578d3Smrg ;; 170832b578d3Smrg esac 170932b578d3Smrg else 171032b578d3Smrg shlibpath_overrides_runpath=yes 171132b578d3Smrg fi 171232b578d3Smrg ;; 171332b578d3Smrg 171432b578d3Smrgos2*) 171532b578d3Smrg libname_spec='$name' 171632b578d3Smrg shrext_cmds=".dll" 171732b578d3Smrg need_lib_prefix=no 171832b578d3Smrg library_names_spec='$libname${shared_ext} $libname.a' 171932b578d3Smrg dynamic_linker='OS/2 ld.exe' 172032b578d3Smrg shlibpath_var=LIBPATH 172132b578d3Smrg ;; 172232b578d3Smrg 172332b578d3Smrgosf3* | osf4* | osf5*) 172432b578d3Smrg version_type=osf 172532b578d3Smrg need_lib_prefix=no 172632b578d3Smrg need_version=no 172732b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 172832b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 172932b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 173032b578d3Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 173132b578d3Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 173232b578d3Smrg ;; 173332b578d3Smrg 173432b578d3Smrgrdos*) 173532b578d3Smrg dynamic_linker=no 173632b578d3Smrg ;; 173732b578d3Smrg 173832b578d3Smrgsolaris*) 173932b578d3Smrg version_type=linux 174032b578d3Smrg need_lib_prefix=no 174132b578d3Smrg need_version=no 174232b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 174332b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 174432b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 174532b578d3Smrg shlibpath_overrides_runpath=yes 174632b578d3Smrg hardcode_into_libs=yes 174732b578d3Smrg # ldd complains unless libraries are executable 174832b578d3Smrg postinstall_cmds='chmod +x $lib' 174932b578d3Smrg ;; 175032b578d3Smrg 175132b578d3Smrgsunos4*) 175232b578d3Smrg version_type=sunos 175332b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 175432b578d3Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 175532b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 175632b578d3Smrg shlibpath_overrides_runpath=yes 175732b578d3Smrg if test "$with_gnu_ld" = yes; then 175832b578d3Smrg need_lib_prefix=no 175932b578d3Smrg fi 176032b578d3Smrg need_version=yes 176132b578d3Smrg ;; 176232b578d3Smrg 176332b578d3Smrgsysv4 | sysv4.3*) 176432b578d3Smrg version_type=linux 176532b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 176632b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 176732b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 176832b578d3Smrg case $host_vendor in 176932b578d3Smrg sni) 177032b578d3Smrg shlibpath_overrides_runpath=no 177132b578d3Smrg need_lib_prefix=no 177232b578d3Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 177332b578d3Smrg runpath_var=LD_RUN_PATH 177432b578d3Smrg ;; 177532b578d3Smrg siemens) 177632b578d3Smrg need_lib_prefix=no 177732b578d3Smrg ;; 177832b578d3Smrg motorola) 177932b578d3Smrg need_lib_prefix=no 178032b578d3Smrg need_version=no 178132b578d3Smrg shlibpath_overrides_runpath=no 178232b578d3Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 178332b578d3Smrg ;; 178432b578d3Smrg esac 178532b578d3Smrg ;; 178632b578d3Smrg 178732b578d3Smrgsysv4*MP*) 178832b578d3Smrg if test -d /usr/nec ;then 178932b578d3Smrg version_type=linux 179032b578d3Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 179132b578d3Smrg soname_spec='$libname${shared_ext}.$major' 179232b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 179332b578d3Smrg fi 179432b578d3Smrg ;; 179532b578d3Smrg 179632b578d3Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 179732b578d3Smrg version_type=freebsd-elf 179832b578d3Smrg need_lib_prefix=no 179932b578d3Smrg need_version=no 180032b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 180132b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 180232b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 180332b578d3Smrg hardcode_into_libs=yes 180432b578d3Smrg if test "$with_gnu_ld" = yes; then 180532b578d3Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 180632b578d3Smrg shlibpath_overrides_runpath=no 180732b578d3Smrg else 180832b578d3Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 180932b578d3Smrg shlibpath_overrides_runpath=yes 181032b578d3Smrg case $host_os in 181132b578d3Smrg sco3.2v5*) 181232b578d3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 181332b578d3Smrg ;; 181432b578d3Smrg esac 181532b578d3Smrg fi 181632b578d3Smrg sys_lib_dlsearch_path_spec='/usr/lib' 181732b578d3Smrg ;; 181832b578d3Smrg 181932b578d3Smrguts4*) 182032b578d3Smrg version_type=linux 182132b578d3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 182232b578d3Smrg soname_spec='${libname}${release}${shared_ext}$major' 182332b578d3Smrg shlibpath_var=LD_LIBRARY_PATH 182432b578d3Smrg ;; 182532b578d3Smrg 182632b578d3Smrg*) 182732b578d3Smrg dynamic_linker=no 182832b578d3Smrg ;; 182932b578d3Smrgesac 183032b578d3SmrgAC_MSG_RESULT([$dynamic_linker]) 183132b578d3Smrgtest "$dynamic_linker" = no && can_build_shared=no 183232b578d3Smrg 183332b578d3Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 183432b578d3Smrgif test "$GCC" = yes; then 183532b578d3Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 183632b578d3Smrgfi 183732b578d3Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 183832b578d3Smrg 183932b578d3Smrg 184032b578d3Smrg# _LT_AC_TAGCONFIG 184132b578d3Smrg# ---------------- 184232b578d3SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 184332b578d3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 184432b578d3SmrgAC_ARG_WITH([tags], 184532b578d3Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 184632b578d3Smrg [include additional configurations @<:@automatic@:>@])], 184732b578d3Smrg [tagnames="$withval"]) 184832b578d3Smrg 184932b578d3Smrgif test -f "$ltmain" && test -n "$tagnames"; then 185032b578d3Smrg if test ! -f "${ofile}"; then 185132b578d3Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 185232b578d3Smrg fi 185332b578d3Smrg 185432b578d3Smrg if test -z "$LTCC"; then 185532b578d3Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 185632b578d3Smrg if test -z "$LTCC"; then 185732b578d3Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 185832b578d3Smrg else 185932b578d3Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 186032b578d3Smrg fi 186132b578d3Smrg fi 186232b578d3Smrg if test -z "$LTCFLAGS"; then 186332b578d3Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 186432b578d3Smrg fi 186532b578d3Smrg 186632b578d3Smrg # Extract list of available tagged configurations in $ofile. 186732b578d3Smrg # Note that this assumes the entire list is on one line. 186832b578d3Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 186932b578d3Smrg 187032b578d3Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 187132b578d3Smrg for tagname in $tagnames; do 187232b578d3Smrg IFS="$lt_save_ifs" 187332b578d3Smrg # Check whether tagname contains only valid characters 187432b578d3Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 187532b578d3Smrg "") ;; 187632b578d3Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 187732b578d3Smrg ;; 187832b578d3Smrg esac 187932b578d3Smrg 188032b578d3Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 188132b578d3Smrg then 188232b578d3Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 188332b578d3Smrg fi 188432b578d3Smrg 188532b578d3Smrg # Update the list of available tags. 188632b578d3Smrg if test -n "$tagname"; then 188732b578d3Smrg echo appending configuration tag \"$tagname\" to $ofile 188832b578d3Smrg 188932b578d3Smrg case $tagname in 189032b578d3Smrg CXX) 189132b578d3Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 189232b578d3Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 189332b578d3Smrg (test "X$CXX" != "Xg++"))) ; then 189432b578d3Smrg AC_LIBTOOL_LANG_CXX_CONFIG 189532b578d3Smrg else 189632b578d3Smrg tagname="" 189732b578d3Smrg fi 189832b578d3Smrg ;; 189932b578d3Smrg 190032b578d3Smrg F77) 190132b578d3Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 190232b578d3Smrg AC_LIBTOOL_LANG_F77_CONFIG 190332b578d3Smrg else 190432b578d3Smrg tagname="" 190532b578d3Smrg fi 190632b578d3Smrg ;; 190732b578d3Smrg 190832b578d3Smrg GCJ) 190932b578d3Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 191032b578d3Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 191132b578d3Smrg else 191232b578d3Smrg tagname="" 191332b578d3Smrg fi 191432b578d3Smrg ;; 191532b578d3Smrg 191632b578d3Smrg RC) 191732b578d3Smrg AC_LIBTOOL_LANG_RC_CONFIG 191832b578d3Smrg ;; 191932b578d3Smrg 192032b578d3Smrg *) 192132b578d3Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 192232b578d3Smrg ;; 192332b578d3Smrg esac 192432b578d3Smrg 192532b578d3Smrg # Append the new tag name to the list of available tags. 192632b578d3Smrg if test -n "$tagname" ; then 192732b578d3Smrg available_tags="$available_tags $tagname" 192832b578d3Smrg fi 192932b578d3Smrg fi 193032b578d3Smrg done 193132b578d3Smrg IFS="$lt_save_ifs" 193232b578d3Smrg 193332b578d3Smrg # Now substitute the updated list of available tags. 193432b578d3Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 193532b578d3Smrg mv "${ofile}T" "$ofile" 193632b578d3Smrg chmod +x "$ofile" 193732b578d3Smrg else 193832b578d3Smrg rm -f "${ofile}T" 193932b578d3Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 194032b578d3Smrg fi 194132b578d3Smrgfi 194232b578d3Smrg])# _LT_AC_TAGCONFIG 194332b578d3Smrg 194432b578d3Smrg 194532b578d3Smrg# AC_LIBTOOL_DLOPEN 194632b578d3Smrg# ----------------- 194732b578d3Smrg# enable checks for dlopen support 194832b578d3SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 194932b578d3Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 195032b578d3Smrg])# AC_LIBTOOL_DLOPEN 195132b578d3Smrg 195232b578d3Smrg 195332b578d3Smrg# AC_LIBTOOL_WIN32_DLL 195432b578d3Smrg# -------------------- 195532b578d3Smrg# declare package support for building win32 DLLs 195632b578d3SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 195732b578d3Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 195832b578d3Smrg])# AC_LIBTOOL_WIN32_DLL 195932b578d3Smrg 196032b578d3Smrg 196132b578d3Smrg# AC_ENABLE_SHARED([DEFAULT]) 196232b578d3Smrg# --------------------------- 196332b578d3Smrg# implement the --enable-shared flag 196432b578d3Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 196532b578d3SmrgAC_DEFUN([AC_ENABLE_SHARED], 196632b578d3Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 196732b578d3SmrgAC_ARG_ENABLE([shared], 196832b578d3Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 196932b578d3Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 197032b578d3Smrg [p=${PACKAGE-default} 197132b578d3Smrg case $enableval in 197232b578d3Smrg yes) enable_shared=yes ;; 197332b578d3Smrg no) enable_shared=no ;; 197432b578d3Smrg *) 197532b578d3Smrg enable_shared=no 197632b578d3Smrg # Look at the argument we got. We use all the common list separators. 197732b578d3Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 197832b578d3Smrg for pkg in $enableval; do 197932b578d3Smrg IFS="$lt_save_ifs" 198032b578d3Smrg if test "X$pkg" = "X$p"; then 198132b578d3Smrg enable_shared=yes 198232b578d3Smrg fi 198332b578d3Smrg done 198432b578d3Smrg IFS="$lt_save_ifs" 198532b578d3Smrg ;; 198632b578d3Smrg esac], 198732b578d3Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 198832b578d3Smrg])# AC_ENABLE_SHARED 198932b578d3Smrg 199032b578d3Smrg 199132b578d3Smrg# AC_DISABLE_SHARED 199232b578d3Smrg# ----------------- 199332b578d3Smrg# set the default shared flag to --disable-shared 199432b578d3SmrgAC_DEFUN([AC_DISABLE_SHARED], 199532b578d3Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 199632b578d3SmrgAC_ENABLE_SHARED(no) 199732b578d3Smrg])# AC_DISABLE_SHARED 199832b578d3Smrg 199932b578d3Smrg 200032b578d3Smrg# AC_ENABLE_STATIC([DEFAULT]) 200132b578d3Smrg# --------------------------- 200232b578d3Smrg# implement the --enable-static flag 200332b578d3Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 200432b578d3SmrgAC_DEFUN([AC_ENABLE_STATIC], 200532b578d3Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 200632b578d3SmrgAC_ARG_ENABLE([static], 200732b578d3Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 200832b578d3Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 200932b578d3Smrg [p=${PACKAGE-default} 201032b578d3Smrg case $enableval in 201132b578d3Smrg yes) enable_static=yes ;; 201232b578d3Smrg no) enable_static=no ;; 201332b578d3Smrg *) 201432b578d3Smrg enable_static=no 201532b578d3Smrg # Look at the argument we got. We use all the common list separators. 201632b578d3Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 201732b578d3Smrg for pkg in $enableval; do 201832b578d3Smrg IFS="$lt_save_ifs" 201932b578d3Smrg if test "X$pkg" = "X$p"; then 202032b578d3Smrg enable_static=yes 202132b578d3Smrg fi 202232b578d3Smrg done 202332b578d3Smrg IFS="$lt_save_ifs" 202432b578d3Smrg ;; 202532b578d3Smrg esac], 202632b578d3Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 202732b578d3Smrg])# AC_ENABLE_STATIC 202832b578d3Smrg 202932b578d3Smrg 203032b578d3Smrg# AC_DISABLE_STATIC 203132b578d3Smrg# ----------------- 203232b578d3Smrg# set the default static flag to --disable-static 203332b578d3SmrgAC_DEFUN([AC_DISABLE_STATIC], 203432b578d3Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 203532b578d3SmrgAC_ENABLE_STATIC(no) 203632b578d3Smrg])# AC_DISABLE_STATIC 203732b578d3Smrg 203832b578d3Smrg 203932b578d3Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 204032b578d3Smrg# --------------------------------- 204132b578d3Smrg# implement the --enable-fast-install flag 204232b578d3Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 204332b578d3SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 204432b578d3Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 204532b578d3SmrgAC_ARG_ENABLE([fast-install], 204632b578d3Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 204732b578d3Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 204832b578d3Smrg [p=${PACKAGE-default} 204932b578d3Smrg case $enableval in 205032b578d3Smrg yes) enable_fast_install=yes ;; 205132b578d3Smrg no) enable_fast_install=no ;; 205232b578d3Smrg *) 205332b578d3Smrg enable_fast_install=no 205432b578d3Smrg # Look at the argument we got. We use all the common list separators. 205532b578d3Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 205632b578d3Smrg for pkg in $enableval; do 205732b578d3Smrg IFS="$lt_save_ifs" 205832b578d3Smrg if test "X$pkg" = "X$p"; then 205932b578d3Smrg enable_fast_install=yes 206032b578d3Smrg fi 206132b578d3Smrg done 206232b578d3Smrg IFS="$lt_save_ifs" 206332b578d3Smrg ;; 206432b578d3Smrg esac], 206532b578d3Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 206632b578d3Smrg])# AC_ENABLE_FAST_INSTALL 206732b578d3Smrg 206832b578d3Smrg 206932b578d3Smrg# AC_DISABLE_FAST_INSTALL 207032b578d3Smrg# ----------------------- 207132b578d3Smrg# set the default to --disable-fast-install 207232b578d3SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 207332b578d3Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 207432b578d3SmrgAC_ENABLE_FAST_INSTALL(no) 207532b578d3Smrg])# AC_DISABLE_FAST_INSTALL 207632b578d3Smrg 207732b578d3Smrg 207832b578d3Smrg# AC_LIBTOOL_PICMODE([MODE]) 207932b578d3Smrg# -------------------------- 208032b578d3Smrg# implement the --with-pic flag 208132b578d3Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 208232b578d3SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 208332b578d3Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 208432b578d3Smrgpic_mode=ifelse($#,1,$1,default) 208532b578d3Smrg])# AC_LIBTOOL_PICMODE 208632b578d3Smrg 208732b578d3Smrg 208832b578d3Smrg# AC_PROG_EGREP 208932b578d3Smrg# ------------- 209032b578d3Smrg# This is predefined starting with Autoconf 2.54, so this conditional 209132b578d3Smrg# definition can be removed once we require Autoconf 2.54 or later. 209232b578d3Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 209332b578d3Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 209432b578d3Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 209532b578d3Smrg then ac_cv_prog_egrep='grep -E' 209632b578d3Smrg else ac_cv_prog_egrep='egrep' 209732b578d3Smrg fi]) 209832b578d3Smrg EGREP=$ac_cv_prog_egrep 209932b578d3Smrg AC_SUBST([EGREP]) 210032b578d3Smrg])]) 210132b578d3Smrg 210232b578d3Smrg 210332b578d3Smrg# AC_PATH_TOOL_PREFIX 210432b578d3Smrg# ------------------- 210532b578d3Smrg# find a file program which can recognize shared library 210632b578d3SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 210732b578d3Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 210832b578d3SmrgAC_MSG_CHECKING([for $1]) 210932b578d3SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 211032b578d3Smrg[case $MAGIC_CMD in 211132b578d3Smrg[[\\/*] | ?:[\\/]*]) 211232b578d3Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 211332b578d3Smrg ;; 211432b578d3Smrg*) 211532b578d3Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 211632b578d3Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 211732b578d3Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 211832b578d3Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 211932b578d3Smrgdnl not every word. This closes a longstanding sh security hole. 212032b578d3Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 212132b578d3Smrg for ac_dir in $ac_dummy; do 212232b578d3Smrg IFS="$lt_save_ifs" 212332b578d3Smrg test -z "$ac_dir" && ac_dir=. 212432b578d3Smrg if test -f $ac_dir/$1; then 212532b578d3Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 212632b578d3Smrg if test -n "$file_magic_test_file"; then 212732b578d3Smrg case $deplibs_check_method in 212832b578d3Smrg "file_magic "*) 212932b578d3Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 213032b578d3Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 213132b578d3Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 213232b578d3Smrg $EGREP "$file_magic_regex" > /dev/null; then 213332b578d3Smrg : 213432b578d3Smrg else 213532b578d3Smrg cat <<EOF 1>&2 213632b578d3Smrg 213732b578d3Smrg*** Warning: the command libtool uses to detect shared libraries, 213832b578d3Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 213932b578d3Smrg*** The result is that libtool may fail to recognize shared libraries 214032b578d3Smrg*** as such. This will affect the creation of libtool libraries that 214132b578d3Smrg*** depend on shared libraries, but programs linked with such libtool 214232b578d3Smrg*** libraries will work regardless of this problem. Nevertheless, you 214332b578d3Smrg*** may want to report the problem to your system manager and/or to 214432b578d3Smrg*** bug-libtool@gnu.org 214532b578d3Smrg 214632b578d3SmrgEOF 214732b578d3Smrg fi ;; 214832b578d3Smrg esac 214932b578d3Smrg fi 215032b578d3Smrg break 215132b578d3Smrg fi 215232b578d3Smrg done 215332b578d3Smrg IFS="$lt_save_ifs" 215432b578d3Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 215532b578d3Smrg ;; 215632b578d3Smrgesac]) 215732b578d3SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 215832b578d3Smrgif test -n "$MAGIC_CMD"; then 215932b578d3Smrg AC_MSG_RESULT($MAGIC_CMD) 216032b578d3Smrgelse 216132b578d3Smrg AC_MSG_RESULT(no) 216232b578d3Smrgfi 216332b578d3Smrg])# AC_PATH_TOOL_PREFIX 216432b578d3Smrg 216532b578d3Smrg 216632b578d3Smrg# AC_PATH_MAGIC 216732b578d3Smrg# ------------- 216832b578d3Smrg# find a file program which can recognize a shared library 216932b578d3SmrgAC_DEFUN([AC_PATH_MAGIC], 217032b578d3Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 217132b578d3Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 217232b578d3Smrg if test -n "$ac_tool_prefix"; then 217332b578d3Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 217432b578d3Smrg else 217532b578d3Smrg MAGIC_CMD=: 217632b578d3Smrg fi 217732b578d3Smrgfi 217832b578d3Smrg])# AC_PATH_MAGIC 217932b578d3Smrg 218032b578d3Smrg 218132b578d3Smrg# AC_PROG_LD 218232b578d3Smrg# ---------- 218332b578d3Smrg# find the pathname to the GNU or non-GNU linker 218432b578d3SmrgAC_DEFUN([AC_PROG_LD], 218532b578d3Smrg[AC_ARG_WITH([gnu-ld], 218632b578d3Smrg [AC_HELP_STRING([--with-gnu-ld], 218732b578d3Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 218832b578d3Smrg [test "$withval" = no || with_gnu_ld=yes], 218932b578d3Smrg [with_gnu_ld=no]) 219032b578d3SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 219132b578d3SmrgAC_REQUIRE([AC_PROG_CC])dnl 219232b578d3SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 219332b578d3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 219432b578d3Smrgac_prog=ld 219532b578d3Smrgif test "$GCC" = yes; then 219632b578d3Smrg # Check if gcc -print-prog-name=ld gives a path. 219732b578d3Smrg AC_MSG_CHECKING([for ld used by $CC]) 219832b578d3Smrg case $host in 219932b578d3Smrg *-*-mingw*) 220032b578d3Smrg # gcc leaves a trailing carriage return which upsets mingw 220132b578d3Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 220232b578d3Smrg *) 220332b578d3Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 220432b578d3Smrg esac 220532b578d3Smrg case $ac_prog in 220632b578d3Smrg # Accept absolute paths. 220732b578d3Smrg [[\\/]]* | ?:[[\\/]]*) 220832b578d3Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 220932b578d3Smrg # Canonicalize the pathname of ld 221032b578d3Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 221132b578d3Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 221232b578d3Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 221332b578d3Smrg done 221432b578d3Smrg test -z "$LD" && LD="$ac_prog" 221532b578d3Smrg ;; 221632b578d3Smrg "") 221732b578d3Smrg # If it fails, then pretend we aren't using GCC. 221832b578d3Smrg ac_prog=ld 221932b578d3Smrg ;; 222032b578d3Smrg *) 222132b578d3Smrg # If it is relative, then search for the first ld in PATH. 222232b578d3Smrg with_gnu_ld=unknown 222332b578d3Smrg ;; 222432b578d3Smrg esac 222532b578d3Smrgelif test "$with_gnu_ld" = yes; then 222632b578d3Smrg AC_MSG_CHECKING([for GNU ld]) 222732b578d3Smrgelse 222832b578d3Smrg AC_MSG_CHECKING([for non-GNU ld]) 222932b578d3Smrgfi 223032b578d3SmrgAC_CACHE_VAL(lt_cv_path_LD, 223132b578d3Smrg[if test -z "$LD"; then 223232b578d3Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 223332b578d3Smrg for ac_dir in $PATH; do 223432b578d3Smrg IFS="$lt_save_ifs" 223532b578d3Smrg test -z "$ac_dir" && ac_dir=. 223632b578d3Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 223732b578d3Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 223832b578d3Smrg # Check to see if the program is GNU ld. I'd rather use --version, 223932b578d3Smrg # but apparently some variants of GNU ld only accept -v. 224032b578d3Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 224132b578d3Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 224232b578d3Smrg *GNU* | *'with BFD'*) 224332b578d3Smrg test "$with_gnu_ld" != no && break 224432b578d3Smrg ;; 224532b578d3Smrg *) 224632b578d3Smrg test "$with_gnu_ld" != yes && break 224732b578d3Smrg ;; 224832b578d3Smrg esac 224932b578d3Smrg fi 225032b578d3Smrg done 225132b578d3Smrg IFS="$lt_save_ifs" 225232b578d3Smrgelse 225332b578d3Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 225432b578d3Smrgfi]) 225532b578d3SmrgLD="$lt_cv_path_LD" 225632b578d3Smrgif test -n "$LD"; then 225732b578d3Smrg AC_MSG_RESULT($LD) 225832b578d3Smrgelse 225932b578d3Smrg AC_MSG_RESULT(no) 226032b578d3Smrgfi 226132b578d3Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 226232b578d3SmrgAC_PROG_LD_GNU 226332b578d3Smrg])# AC_PROG_LD 226432b578d3Smrg 226532b578d3Smrg 226632b578d3Smrg# AC_PROG_LD_GNU 226732b578d3Smrg# -------------- 226832b578d3SmrgAC_DEFUN([AC_PROG_LD_GNU], 226932b578d3Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 227032b578d3SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 227132b578d3Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 227232b578d3Smrgcase `$LD -v 2>&1 </dev/null` in 227332b578d3Smrg*GNU* | *'with BFD'*) 227432b578d3Smrg lt_cv_prog_gnu_ld=yes 227532b578d3Smrg ;; 227632b578d3Smrg*) 227732b578d3Smrg lt_cv_prog_gnu_ld=no 227832b578d3Smrg ;; 227932b578d3Smrgesac]) 228032b578d3Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 228132b578d3Smrg])# AC_PROG_LD_GNU 228232b578d3Smrg 228332b578d3Smrg 228432b578d3Smrg# AC_PROG_LD_RELOAD_FLAG 228532b578d3Smrg# ---------------------- 228632b578d3Smrg# find reload flag for linker 228732b578d3Smrg# -- PORTME Some linkers may need a different reload flag. 228832b578d3SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 228932b578d3Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 229032b578d3Smrg lt_cv_ld_reload_flag, 229132b578d3Smrg [lt_cv_ld_reload_flag='-r']) 229232b578d3Smrgreload_flag=$lt_cv_ld_reload_flag 229332b578d3Smrgcase $reload_flag in 229432b578d3Smrg"" | " "*) ;; 229532b578d3Smrg*) reload_flag=" $reload_flag" ;; 229632b578d3Smrgesac 229732b578d3Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 229832b578d3Smrgcase $host_os in 229932b578d3Smrg darwin*) 230032b578d3Smrg if test "$GCC" = yes; then 230132b578d3Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 230232b578d3Smrg else 230332b578d3Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 230432b578d3Smrg fi 230532b578d3Smrg ;; 230632b578d3Smrgesac 230732b578d3Smrg])# AC_PROG_LD_RELOAD_FLAG 230832b578d3Smrg 230932b578d3Smrg 231032b578d3Smrg# AC_DEPLIBS_CHECK_METHOD 231132b578d3Smrg# ----------------------- 231232b578d3Smrg# how to check for library dependencies 231332b578d3Smrg# -- PORTME fill in with the dynamic library characteristics 231432b578d3SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 231532b578d3Smrg[AC_CACHE_CHECK([how to recognize dependent libraries], 231632b578d3Smrglt_cv_deplibs_check_method, 231732b578d3Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 231832b578d3Smrglt_cv_file_magic_test_file= 231932b578d3Smrglt_cv_deplibs_check_method='unknown' 232032b578d3Smrg# Need to set the preceding variable on all platforms that support 232132b578d3Smrg# interlibrary dependencies. 232232b578d3Smrg# 'none' -- dependencies not supported. 232332b578d3Smrg# `unknown' -- same as none, but documents that we really don't know. 232432b578d3Smrg# 'pass_all' -- all dependencies passed with no checks. 232532b578d3Smrg# 'test_compile' -- check by making test program. 232632b578d3Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 232732b578d3Smrg# which responds to the $file_magic_cmd with a given extended regex. 232832b578d3Smrg# If you have `file' or equivalent on your system and you're not sure 232932b578d3Smrg# whether `pass_all' will *always* work, you probably want this one. 233032b578d3Smrg 233132b578d3Smrgcase $host_os in 233232b578d3Smrgaix4* | aix5*) 233332b578d3Smrg lt_cv_deplibs_check_method=pass_all 233432b578d3Smrg ;; 233532b578d3Smrg 233632b578d3Smrgbeos*) 233732b578d3Smrg lt_cv_deplibs_check_method=pass_all 233832b578d3Smrg ;; 233932b578d3Smrg 234032b578d3Smrgbsdi[[45]]*) 234132b578d3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 234232b578d3Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 234332b578d3Smrg lt_cv_file_magic_test_file=/shlib/libc.so 234432b578d3Smrg ;; 234532b578d3Smrg 234632b578d3Smrgcygwin*) 234732b578d3Smrg # func_win32_libid is a shell function defined in ltmain.sh 234832b578d3Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 234932b578d3Smrg lt_cv_file_magic_cmd='func_win32_libid' 235032b578d3Smrg ;; 235132b578d3Smrg 235232b578d3Smrgmingw* | pw32*) 235332b578d3Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 235432b578d3Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 235532b578d3Smrg # unless we find 'file', for example because we are cross-compiling. 235632b578d3Smrg if ( file / ) >/dev/null 2>&1; then 235732b578d3Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 235832b578d3Smrg lt_cv_file_magic_cmd='func_win32_libid' 235932b578d3Smrg else 236032b578d3Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 236132b578d3Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 236232b578d3Smrg fi 236332b578d3Smrg ;; 236432b578d3Smrg 236532b578d3Smrgdarwin* | rhapsody*) 236632b578d3Smrg lt_cv_deplibs_check_method=pass_all 236732b578d3Smrg ;; 236832b578d3Smrg 236932b578d3Smrgfreebsd* | dragonfly*) 237032b578d3Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 237132b578d3Smrg case $host_cpu in 237232b578d3Smrg i*86 ) 237332b578d3Smrg # Not sure whether the presence of OpenBSD here was a mistake. 237432b578d3Smrg # Let's accept both of them until this is cleared up. 237532b578d3Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 237632b578d3Smrg lt_cv_file_magic_cmd=/usr/bin/file 237732b578d3Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 237832b578d3Smrg ;; 237932b578d3Smrg esac 238032b578d3Smrg else 238132b578d3Smrg lt_cv_deplibs_check_method=pass_all 238232b578d3Smrg fi 238332b578d3Smrg ;; 238432b578d3Smrg 238532b578d3Smrggnu*) 238632b578d3Smrg lt_cv_deplibs_check_method=pass_all 238732b578d3Smrg ;; 238832b578d3Smrg 238932b578d3Smrghpux10.20* | hpux11*) 239032b578d3Smrg lt_cv_file_magic_cmd=/usr/bin/file 239132b578d3Smrg case $host_cpu in 239232b578d3Smrg ia64*) 239332b578d3Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 239432b578d3Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 239532b578d3Smrg ;; 239632b578d3Smrg hppa*64*) 239732b578d3Smrg [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]'] 239832b578d3Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 239932b578d3Smrg ;; 240032b578d3Smrg *) 240132b578d3Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 240232b578d3Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 240332b578d3Smrg ;; 240432b578d3Smrg esac 240532b578d3Smrg ;; 240632b578d3Smrg 240732b578d3Smrginterix[[3-9]]*) 240832b578d3Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 240932b578d3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 241032b578d3Smrg ;; 241132b578d3Smrg 241232b578d3Smrgirix5* | irix6* | nonstopux*) 241332b578d3Smrg case $LD in 241432b578d3Smrg *-32|*"-32 ") libmagic=32-bit;; 241532b578d3Smrg *-n32|*"-n32 ") libmagic=N32;; 241632b578d3Smrg *-64|*"-64 ") libmagic=64-bit;; 241732b578d3Smrg *) libmagic=never-match;; 241832b578d3Smrg esac 241932b578d3Smrg lt_cv_deplibs_check_method=pass_all 242032b578d3Smrg ;; 242132b578d3Smrg 242232b578d3Smrg# This must be Linux ELF. 242332b578d3Smrglinux* | k*bsd*-gnu) 242432b578d3Smrg lt_cv_deplibs_check_method=pass_all 242532b578d3Smrg ;; 242632b578d3Smrg 242732b578d3Smrgnetbsd*) 242832b578d3Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 242932b578d3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 243032b578d3Smrg else 243132b578d3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 243232b578d3Smrg fi 243332b578d3Smrg ;; 243432b578d3Smrg 243532b578d3Smrgnewos6*) 243632b578d3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 243732b578d3Smrg lt_cv_file_magic_cmd=/usr/bin/file 243832b578d3Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 243932b578d3Smrg ;; 244032b578d3Smrg 244132b578d3Smrgnto-qnx*) 244232b578d3Smrg lt_cv_deplibs_check_method=unknown 244332b578d3Smrg ;; 244432b578d3Smrg 244532b578d3Smrgopenbsd*) 244632b578d3Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 244732b578d3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 244832b578d3Smrg else 244932b578d3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 245032b578d3Smrg fi 245132b578d3Smrg ;; 245232b578d3Smrg 245332b578d3Smrgosf3* | osf4* | osf5*) 245432b578d3Smrg lt_cv_deplibs_check_method=pass_all 245532b578d3Smrg ;; 245632b578d3Smrg 245732b578d3Smrgrdos*) 245832b578d3Smrg lt_cv_deplibs_check_method=pass_all 245932b578d3Smrg ;; 246032b578d3Smrg 246132b578d3Smrgsolaris*) 246232b578d3Smrg lt_cv_deplibs_check_method=pass_all 246332b578d3Smrg ;; 246432b578d3Smrg 246532b578d3Smrgsysv4 | sysv4.3*) 246632b578d3Smrg case $host_vendor in 246732b578d3Smrg motorola) 246832b578d3Smrg 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]]' 246932b578d3Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 247032b578d3Smrg ;; 247132b578d3Smrg ncr) 247232b578d3Smrg lt_cv_deplibs_check_method=pass_all 247332b578d3Smrg ;; 247432b578d3Smrg sequent) 247532b578d3Smrg lt_cv_file_magic_cmd='/bin/file' 247632b578d3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 247732b578d3Smrg ;; 247832b578d3Smrg sni) 247932b578d3Smrg lt_cv_file_magic_cmd='/bin/file' 248032b578d3Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 248132b578d3Smrg lt_cv_file_magic_test_file=/lib/libc.so 248232b578d3Smrg ;; 248332b578d3Smrg siemens) 248432b578d3Smrg lt_cv_deplibs_check_method=pass_all 248532b578d3Smrg ;; 248632b578d3Smrg pc) 248732b578d3Smrg lt_cv_deplibs_check_method=pass_all 248832b578d3Smrg ;; 248932b578d3Smrg esac 249032b578d3Smrg ;; 249132b578d3Smrg 249232b578d3Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 249332b578d3Smrg lt_cv_deplibs_check_method=pass_all 249432b578d3Smrg ;; 249532b578d3Smrgesac 249632b578d3Smrg]) 249732b578d3Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 249832b578d3Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 249932b578d3Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 250032b578d3Smrg])# AC_DEPLIBS_CHECK_METHOD 250132b578d3Smrg 250232b578d3Smrg 250332b578d3Smrg# AC_PROG_NM 250432b578d3Smrg# ---------- 250532b578d3Smrg# find the pathname to a BSD-compatible name lister 250632b578d3SmrgAC_DEFUN([AC_PROG_NM], 250732b578d3Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 250832b578d3Smrg[if test -n "$NM"; then 250932b578d3Smrg # Let the user override the test. 251032b578d3Smrg lt_cv_path_NM="$NM" 251132b578d3Smrgelse 251232b578d3Smrg lt_nm_to_check="${ac_tool_prefix}nm" 251332b578d3Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 251432b578d3Smrg lt_nm_to_check="$lt_nm_to_check nm" 251532b578d3Smrg fi 251632b578d3Smrg for lt_tmp_nm in $lt_nm_to_check; do 251732b578d3Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 251832b578d3Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 251932b578d3Smrg IFS="$lt_save_ifs" 252032b578d3Smrg test -z "$ac_dir" && ac_dir=. 252132b578d3Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 252232b578d3Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 252332b578d3Smrg # Check to see if the nm accepts a BSD-compat flag. 252432b578d3Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 252532b578d3Smrg # nm: unknown option "B" ignored 252632b578d3Smrg # Tru64's nm complains that /dev/null is an invalid object file 252732b578d3Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 252832b578d3Smrg */dev/null* | *'Invalid file or object type'*) 252932b578d3Smrg lt_cv_path_NM="$tmp_nm -B" 253032b578d3Smrg break 253132b578d3Smrg ;; 253232b578d3Smrg *) 253332b578d3Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 253432b578d3Smrg */dev/null*) 253532b578d3Smrg lt_cv_path_NM="$tmp_nm -p" 253632b578d3Smrg break 253732b578d3Smrg ;; 253832b578d3Smrg *) 253932b578d3Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 254032b578d3Smrg continue # so that we can try to find one that supports BSD flags 254132b578d3Smrg ;; 254232b578d3Smrg esac 254332b578d3Smrg ;; 254432b578d3Smrg esac 254532b578d3Smrg fi 254632b578d3Smrg done 254732b578d3Smrg IFS="$lt_save_ifs" 254832b578d3Smrg done 254932b578d3Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 255032b578d3Smrgfi]) 255132b578d3SmrgNM="$lt_cv_path_NM" 255232b578d3Smrg])# AC_PROG_NM 255332b578d3Smrg 255432b578d3Smrg 255532b578d3Smrg# AC_CHECK_LIBM 255632b578d3Smrg# ------------- 255732b578d3Smrg# check for math library 255832b578d3SmrgAC_DEFUN([AC_CHECK_LIBM], 255932b578d3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 256032b578d3SmrgLIBM= 256132b578d3Smrgcase $host in 256232b578d3Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 256332b578d3Smrg # These system don't have libm, or don't need it 256432b578d3Smrg ;; 256532b578d3Smrg*-ncr-sysv4.3*) 256632b578d3Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 256732b578d3Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 256832b578d3Smrg ;; 256932b578d3Smrg*) 257032b578d3Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 257132b578d3Smrg ;; 257232b578d3Smrgesac 257332b578d3Smrg])# AC_CHECK_LIBM 257432b578d3Smrg 257532b578d3Smrg 257632b578d3Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 257732b578d3Smrg# ----------------------------------- 257832b578d3Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 257932b578d3Smrg# LTDLINCL to the include flags for the libltdl header and adds 258032b578d3Smrg# --enable-ltdl-convenience to the configure arguments. Note that 258132b578d3Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 258232b578d3Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 258332b578d3Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 258432b578d3Smrg# (note the single quotes!). If your package is not flat and you're not 258532b578d3Smrg# using automake, define top_builddir and top_srcdir appropriately in 258632b578d3Smrg# the Makefiles. 258732b578d3SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 258832b578d3Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 258932b578d3Smrg case $enable_ltdl_convenience in 259032b578d3Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 259132b578d3Smrg "") enable_ltdl_convenience=yes 259232b578d3Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 259332b578d3Smrg esac 259432b578d3Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 259532b578d3Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 259632b578d3Smrg # For backwards non-gettext consistent compatibility... 259732b578d3Smrg INCLTDL="$LTDLINCL" 259832b578d3Smrg])# AC_LIBLTDL_CONVENIENCE 259932b578d3Smrg 260032b578d3Smrg 260132b578d3Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 260232b578d3Smrg# ----------------------------------- 260332b578d3Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 260432b578d3Smrg# LTDLINCL to the include flags for the libltdl header and adds 260532b578d3Smrg# --enable-ltdl-install to the configure arguments. Note that 260632b578d3Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 260732b578d3Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 260832b578d3Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 260932b578d3Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 261032b578d3Smrg# flat and you're not using automake, define top_builddir and top_srcdir 261132b578d3Smrg# appropriately in the Makefiles. 261232b578d3Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 261332b578d3SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 261432b578d3Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 261532b578d3Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 261632b578d3Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 261732b578d3Smrg [if test x"$enable_ltdl_install" = xno; then 261832b578d3Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 261932b578d3Smrg else 262032b578d3Smrg enable_ltdl_install=yes 262132b578d3Smrg fi 262232b578d3Smrg ]) 262332b578d3Smrg if test x"$enable_ltdl_install" = x"yes"; then 262432b578d3Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 262532b578d3Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 262632b578d3Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 262732b578d3Smrg else 262832b578d3Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 262932b578d3Smrg LIBLTDL="-lltdl" 263032b578d3Smrg LTDLINCL= 263132b578d3Smrg fi 263232b578d3Smrg # For backwards non-gettext consistent compatibility... 263332b578d3Smrg INCLTDL="$LTDLINCL" 263432b578d3Smrg])# AC_LIBLTDL_INSTALLABLE 263532b578d3Smrg 263632b578d3Smrg 263732b578d3Smrg# AC_LIBTOOL_CXX 263832b578d3Smrg# -------------- 263932b578d3Smrg# enable support for C++ libraries 264032b578d3SmrgAC_DEFUN([AC_LIBTOOL_CXX], 264132b578d3Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 264232b578d3Smrg])# AC_LIBTOOL_CXX 264332b578d3Smrg 264432b578d3Smrg 264532b578d3Smrg# _LT_AC_LANG_CXX 264632b578d3Smrg# --------------- 264732b578d3SmrgAC_DEFUN([_LT_AC_LANG_CXX], 264832b578d3Smrg[AC_REQUIRE([AC_PROG_CXX]) 264932b578d3SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 265032b578d3Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 265132b578d3Smrg])# _LT_AC_LANG_CXX 265232b578d3Smrg 265332b578d3Smrg# _LT_AC_PROG_CXXCPP 265432b578d3Smrg# ------------------ 265532b578d3SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 265632b578d3Smrg[ 265732b578d3SmrgAC_REQUIRE([AC_PROG_CXX]) 265832b578d3Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 265932b578d3Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 266032b578d3Smrg (test "X$CXX" != "Xg++"))) ; then 266132b578d3Smrg AC_PROG_CXXCPP 266232b578d3Smrgfi 266332b578d3Smrg])# _LT_AC_PROG_CXXCPP 266432b578d3Smrg 266532b578d3Smrg# AC_LIBTOOL_F77 266632b578d3Smrg# -------------- 266732b578d3Smrg# enable support for Fortran 77 libraries 266832b578d3SmrgAC_DEFUN([AC_LIBTOOL_F77], 266932b578d3Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 267032b578d3Smrg])# AC_LIBTOOL_F77 267132b578d3Smrg 267232b578d3Smrg 267332b578d3Smrg# _LT_AC_LANG_F77 267432b578d3Smrg# --------------- 267532b578d3SmrgAC_DEFUN([_LT_AC_LANG_F77], 267632b578d3Smrg[AC_REQUIRE([AC_PROG_F77]) 267732b578d3Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 267832b578d3Smrg])# _LT_AC_LANG_F77 267932b578d3Smrg 268032b578d3Smrg 268132b578d3Smrg# AC_LIBTOOL_GCJ 268232b578d3Smrg# -------------- 268332b578d3Smrg# enable support for GCJ libraries 268432b578d3SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 268532b578d3Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 268632b578d3Smrg])# AC_LIBTOOL_GCJ 268732b578d3Smrg 268832b578d3Smrg 268932b578d3Smrg# _LT_AC_LANG_GCJ 269032b578d3Smrg# --------------- 269132b578d3SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 269232b578d3Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 269332b578d3Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 269432b578d3Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 269532b578d3Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 269632b578d3Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 269732b578d3Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 269832b578d3Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 269932b578d3Smrg])# _LT_AC_LANG_GCJ 270032b578d3Smrg 270132b578d3Smrg 270232b578d3Smrg# AC_LIBTOOL_RC 270332b578d3Smrg# ------------- 270432b578d3Smrg# enable support for Windows resource files 270532b578d3SmrgAC_DEFUN([AC_LIBTOOL_RC], 270632b578d3Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 270732b578d3Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 270832b578d3Smrg])# AC_LIBTOOL_RC 270932b578d3Smrg 271032b578d3Smrg 271132b578d3Smrg# AC_LIBTOOL_LANG_C_CONFIG 271232b578d3Smrg# ------------------------ 271332b578d3Smrg# Ensure that the configuration vars for the C compiler are 271432b578d3Smrg# suitably defined. Those variables are subsequently used by 271532b578d3Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 271632b578d3SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 271732b578d3SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 271832b578d3Smrg[lt_save_CC="$CC" 271932b578d3SmrgAC_LANG_PUSH(C) 272032b578d3Smrg 272132b578d3Smrg# Source file extension for C test sources. 272232b578d3Smrgac_ext=c 272332b578d3Smrg 272432b578d3Smrg# Object file extension for compiled C test sources. 272532b578d3Smrgobjext=o 272632b578d3Smrg_LT_AC_TAGVAR(objext, $1)=$objext 272732b578d3Smrg 272832b578d3Smrg# Code to be used in simple compile tests 272932b578d3Smrglt_simple_compile_test_code="int some_variable = 0;" 273032b578d3Smrg 273132b578d3Smrg# Code to be used in simple link tests 273232b578d3Smrglt_simple_link_test_code='int main(){return(0);}' 273332b578d3Smrg 273432b578d3Smrg_LT_AC_SYS_COMPILER 273532b578d3Smrg 273632b578d3Smrg# save warnings/boilerplate of simple test code 273732b578d3Smrg_LT_COMPILER_BOILERPLATE 273832b578d3Smrg_LT_LINKER_BOILERPLATE 273932b578d3Smrg 274032b578d3SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 274132b578d3SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 274232b578d3SmrgAC_LIBTOOL_PROG_CC_C_O($1) 274332b578d3SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 274432b578d3SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 274532b578d3SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 274632b578d3SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 274732b578d3SmrgAC_LIBTOOL_SYS_LIB_STRIP 274832b578d3SmrgAC_LIBTOOL_DLOPEN_SELF 274932b578d3Smrg 275032b578d3Smrg# Report which library types will actually be built 275132b578d3SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 275232b578d3SmrgAC_MSG_RESULT([$can_build_shared]) 275332b578d3Smrg 275432b578d3SmrgAC_MSG_CHECKING([whether to build shared libraries]) 275532b578d3Smrgtest "$can_build_shared" = "no" && enable_shared=no 275632b578d3Smrg 275732b578d3Smrg# On AIX, shared libraries and static libraries use the same namespace, and 275832b578d3Smrg# are all built from PIC. 275932b578d3Smrgcase $host_os in 276032b578d3Smrgaix3*) 276132b578d3Smrg test "$enable_shared" = yes && enable_static=no 276232b578d3Smrg if test -n "$RANLIB"; then 276332b578d3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 276432b578d3Smrg postinstall_cmds='$RANLIB $lib' 276532b578d3Smrg fi 276632b578d3Smrg ;; 276732b578d3Smrg 276832b578d3Smrgaix4* | aix5*) 276932b578d3Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 277032b578d3Smrg test "$enable_shared" = yes && enable_static=no 277132b578d3Smrg fi 277232b578d3Smrg ;; 277332b578d3Smrgesac 277432b578d3SmrgAC_MSG_RESULT([$enable_shared]) 277532b578d3Smrg 277632b578d3SmrgAC_MSG_CHECKING([whether to build static libraries]) 277732b578d3Smrg# Make sure either enable_shared or enable_static is yes. 277832b578d3Smrgtest "$enable_shared" = yes || enable_static=yes 277932b578d3SmrgAC_MSG_RESULT([$enable_static]) 278032b578d3Smrg 278132b578d3SmrgAC_LIBTOOL_CONFIG($1) 278232b578d3Smrg 278332b578d3SmrgAC_LANG_POP 278432b578d3SmrgCC="$lt_save_CC" 278532b578d3Smrg])# AC_LIBTOOL_LANG_C_CONFIG 278632b578d3Smrg 278732b578d3Smrg 278832b578d3Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 278932b578d3Smrg# -------------------------- 279032b578d3Smrg# Ensure that the configuration vars for the C compiler are 279132b578d3Smrg# suitably defined. Those variables are subsequently used by 279232b578d3Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 279332b578d3SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 279432b578d3SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 279532b578d3Smrg[AC_LANG_PUSH(C++) 279632b578d3SmrgAC_REQUIRE([AC_PROG_CXX]) 279732b578d3SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 279832b578d3Smrg 279932b578d3Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 280032b578d3Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 280132b578d3Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 280232b578d3Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 280332b578d3Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 280432b578d3Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 280532b578d3Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 280632b578d3Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 280732b578d3Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 280832b578d3Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 280932b578d3Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 281032b578d3Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 281132b578d3Smrg_LT_AC_TAGVAR(module_cmds, $1)= 281232b578d3Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 281332b578d3Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 281432b578d3Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 281532b578d3Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 281632b578d3Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 281732b578d3Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 281832b578d3Smrg 281932b578d3Smrg# Dependencies to place before and after the object being linked: 282032b578d3Smrg_LT_AC_TAGVAR(predep_objects, $1)= 282132b578d3Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 282232b578d3Smrg_LT_AC_TAGVAR(predeps, $1)= 282332b578d3Smrg_LT_AC_TAGVAR(postdeps, $1)= 282432b578d3Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 282532b578d3Smrg 282632b578d3Smrg# Source file extension for C++ test sources. 282732b578d3Smrgac_ext=cpp 282832b578d3Smrg 282932b578d3Smrg# Object file extension for compiled C++ test sources. 283032b578d3Smrgobjext=o 283132b578d3Smrg_LT_AC_TAGVAR(objext, $1)=$objext 283232b578d3Smrg 283332b578d3Smrg# Code to be used in simple compile tests 283432b578d3Smrglt_simple_compile_test_code="int some_variable = 0;" 283532b578d3Smrg 283632b578d3Smrg# Code to be used in simple link tests 283732b578d3Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 283832b578d3Smrg 283932b578d3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 284032b578d3Smrg_LT_AC_SYS_COMPILER 284132b578d3Smrg 284232b578d3Smrg# save warnings/boilerplate of simple test code 284332b578d3Smrg_LT_COMPILER_BOILERPLATE 284432b578d3Smrg_LT_LINKER_BOILERPLATE 284532b578d3Smrg 284632b578d3Smrg# Allow CC to be a program name with arguments. 284732b578d3Smrglt_save_CC=$CC 284832b578d3Smrglt_save_LD=$LD 284932b578d3Smrglt_save_GCC=$GCC 285032b578d3SmrgGCC=$GXX 285132b578d3Smrglt_save_with_gnu_ld=$with_gnu_ld 285232b578d3Smrglt_save_path_LD=$lt_cv_path_LD 285332b578d3Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 285432b578d3Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 285532b578d3Smrgelse 285632b578d3Smrg $as_unset lt_cv_prog_gnu_ld 285732b578d3Smrgfi 285832b578d3Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 285932b578d3Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 286032b578d3Smrgelse 286132b578d3Smrg $as_unset lt_cv_path_LD 286232b578d3Smrgfi 286332b578d3Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 286432b578d3SmrgCC=${CXX-"c++"} 286532b578d3Smrgcompiler=$CC 286632b578d3Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 286732b578d3Smrg_LT_CC_BASENAME([$compiler]) 286832b578d3Smrg 286932b578d3Smrg# We don't want -fno-exception wen compiling C++ code, so set the 287032b578d3Smrg# no_builtin_flag separately 287132b578d3Smrgif test "$GXX" = yes; then 287232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 287332b578d3Smrgelse 287432b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 287532b578d3Smrgfi 287632b578d3Smrg 287732b578d3Smrgif test "$GXX" = yes; then 287832b578d3Smrg # Set up default GNU C++ configuration 287932b578d3Smrg 288032b578d3Smrg AC_PROG_LD 288132b578d3Smrg 288232b578d3Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 288332b578d3Smrg # archiving commands below assume that GNU ld is being used. 288432b578d3Smrg if test "$with_gnu_ld" = yes; then 288532b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 288632b578d3Smrg _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' 288732b578d3Smrg 288832b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 288932b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 289032b578d3Smrg 289132b578d3Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 289232b578d3Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 289332b578d3Smrg # investigate it a little bit more. (MM) 289432b578d3Smrg wlarc='${wl}' 289532b578d3Smrg 289632b578d3Smrg # ancient GNU ld didn't support --whole-archive et. al. 289732b578d3Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 289832b578d3Smrg grep 'no-whole-archive' > /dev/null; then 289932b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 290032b578d3Smrg else 290132b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 290232b578d3Smrg fi 290332b578d3Smrg else 290432b578d3Smrg with_gnu_ld=no 290532b578d3Smrg wlarc= 290632b578d3Smrg 290732b578d3Smrg # A generic and very simple default shared library creation 290832b578d3Smrg # command for GNU C++ for the case where it uses the native 290932b578d3Smrg # linker, instead of GNU ld. If possible, this setting should 291032b578d3Smrg # overridden to take advantage of the native linker features on 291132b578d3Smrg # the platform it is being used on. 291232b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 291332b578d3Smrg fi 291432b578d3Smrg 291532b578d3Smrg # Commands to make compiler produce verbose output that lists 291632b578d3Smrg # what "hidden" libraries, object files and flags are used when 291732b578d3Smrg # linking a shared library. 291832b578d3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 291932b578d3Smrg 292032b578d3Smrgelse 292132b578d3Smrg GXX=no 292232b578d3Smrg with_gnu_ld=no 292332b578d3Smrg wlarc= 292432b578d3Smrgfi 292532b578d3Smrg 292632b578d3Smrg# PORTME: fill in a description of your system's C++ link characteristics 292732b578d3SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 292832b578d3Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 292932b578d3Smrgcase $host_os in 293032b578d3Smrg aix3*) 293132b578d3Smrg # FIXME: insert proper C++ library support 293232b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 293332b578d3Smrg ;; 293432b578d3Smrg aix4* | aix5*) 293532b578d3Smrg if test "$host_cpu" = ia64; then 293632b578d3Smrg # On IA64, the linker does run time linking by default, so we don't 293732b578d3Smrg # have to do anything special. 293832b578d3Smrg aix_use_runtimelinking=no 293932b578d3Smrg exp_sym_flag='-Bexport' 294032b578d3Smrg no_entry_flag="" 294132b578d3Smrg else 294232b578d3Smrg aix_use_runtimelinking=no 294332b578d3Smrg 294432b578d3Smrg # Test if we are trying to use run time linking or normal 294532b578d3Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 294632b578d3Smrg # need to do runtime linking. 294732b578d3Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 294832b578d3Smrg for ld_flag in $LDFLAGS; do 294932b578d3Smrg case $ld_flag in 295032b578d3Smrg *-brtl*) 295132b578d3Smrg aix_use_runtimelinking=yes 295232b578d3Smrg break 295332b578d3Smrg ;; 295432b578d3Smrg esac 295532b578d3Smrg done 295632b578d3Smrg ;; 295732b578d3Smrg esac 295832b578d3Smrg 295932b578d3Smrg exp_sym_flag='-bexport' 296032b578d3Smrg no_entry_flag='-bnoentry' 296132b578d3Smrg fi 296232b578d3Smrg 296332b578d3Smrg # When large executables or shared objects are built, AIX ld can 296432b578d3Smrg # have problems creating the table of contents. If linking a library 296532b578d3Smrg # or program results in "error TOC overflow" add -mminimal-toc to 296632b578d3Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 296732b578d3Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 296832b578d3Smrg 296932b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 297032b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 297132b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 297232b578d3Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 297332b578d3Smrg 297432b578d3Smrg if test "$GXX" = yes; then 297532b578d3Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 297632b578d3Smrg # We only want to do this on AIX 4.2 and lower, the check 297732b578d3Smrg # below for broken collect2 doesn't work under 4.3+ 297832b578d3Smrg collect2name=`${CC} -print-prog-name=collect2` 297932b578d3Smrg if test -f "$collect2name" && \ 298032b578d3Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 298132b578d3Smrg then 298232b578d3Smrg # We have reworked collect2 298332b578d3Smrg : 298432b578d3Smrg else 298532b578d3Smrg # We have old collect2 298632b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 298732b578d3Smrg # It fails to find uninstalled libraries when the uninstalled 298832b578d3Smrg # path is not listed in the libpath. Setting hardcode_minus_L 298932b578d3Smrg # to unsupported forces relinking 299032b578d3Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 299132b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 299232b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 299332b578d3Smrg fi 299432b578d3Smrg ;; 299532b578d3Smrg esac 299632b578d3Smrg shared_flag='-shared' 299732b578d3Smrg if test "$aix_use_runtimelinking" = yes; then 299832b578d3Smrg shared_flag="$shared_flag "'${wl}-G' 299932b578d3Smrg fi 300032b578d3Smrg else 300132b578d3Smrg # not using gcc 300232b578d3Smrg if test "$host_cpu" = ia64; then 300332b578d3Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 300432b578d3Smrg # chokes on -Wl,-G. The following line is correct: 300532b578d3Smrg shared_flag='-G' 300632b578d3Smrg else 300732b578d3Smrg if test "$aix_use_runtimelinking" = yes; then 300832b578d3Smrg shared_flag='${wl}-G' 300932b578d3Smrg else 301032b578d3Smrg shared_flag='${wl}-bM:SRE' 301132b578d3Smrg fi 301232b578d3Smrg fi 301332b578d3Smrg fi 301432b578d3Smrg 301532b578d3Smrg # It seems that -bexpall does not export symbols beginning with 301632b578d3Smrg # underscore (_), so it is better to generate a list of symbols to export. 301732b578d3Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 301832b578d3Smrg if test "$aix_use_runtimelinking" = yes; then 301932b578d3Smrg # Warning - without using the other runtime loading flags (-brtl), 302032b578d3Smrg # -berok will link without error, but may produce a broken library. 302132b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 302232b578d3Smrg # Determine the default libpath from the value encoded in an empty executable. 302332b578d3Smrg _LT_AC_SYS_LIBPATH_AIX 302432b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 302532b578d3Smrg 302632b578d3Smrg _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" 302732b578d3Smrg else 302832b578d3Smrg if test "$host_cpu" = ia64; then 302932b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 303032b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 303132b578d3Smrg _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" 303232b578d3Smrg else 303332b578d3Smrg # Determine the default libpath from the value encoded in an empty executable. 303432b578d3Smrg _LT_AC_SYS_LIBPATH_AIX 303532b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 303632b578d3Smrg # Warning - without using the other run time loading flags, 303732b578d3Smrg # -berok will link without error, but may produce a broken library. 303832b578d3Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 303932b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 304032b578d3Smrg # Exported symbols can be pulled into shared objects from archives 304132b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 304232b578d3Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 304332b578d3Smrg # This is similar to how AIX traditionally builds its shared libraries. 304432b578d3Smrg _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' 304532b578d3Smrg fi 304632b578d3Smrg fi 304732b578d3Smrg ;; 304832b578d3Smrg 304932b578d3Smrg beos*) 305032b578d3Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 305132b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 305232b578d3Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 305332b578d3Smrg # support --undefined. This deserves some investigation. FIXME 305432b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 305532b578d3Smrg else 305632b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 305732b578d3Smrg fi 305832b578d3Smrg ;; 305932b578d3Smrg 306032b578d3Smrg chorus*) 306132b578d3Smrg case $cc_basename in 306232b578d3Smrg *) 306332b578d3Smrg # FIXME: insert proper C++ library support 306432b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 306532b578d3Smrg ;; 306632b578d3Smrg esac 306732b578d3Smrg ;; 306832b578d3Smrg 306932b578d3Smrg cygwin* | mingw* | pw32*) 307032b578d3Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 307132b578d3Smrg # as there is no search path for DLLs. 307232b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 307332b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 307432b578d3Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 307532b578d3Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 307632b578d3Smrg 307732b578d3Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 307832b578d3Smrg _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' 307932b578d3Smrg # If the export-symbols file already is a .def file (1st line 308032b578d3Smrg # is EXPORTS), use it as is; otherwise, prepend... 308132b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 308232b578d3Smrg cp $export_symbols $output_objdir/$soname.def; 308332b578d3Smrg else 308432b578d3Smrg echo EXPORTS > $output_objdir/$soname.def; 308532b578d3Smrg cat $export_symbols >> $output_objdir/$soname.def; 308632b578d3Smrg fi~ 308732b578d3Smrg $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' 308832b578d3Smrg else 308932b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 309032b578d3Smrg fi 309132b578d3Smrg ;; 309232b578d3Smrg darwin* | rhapsody*) 309332b578d3Smrg case $host_os in 309432b578d3Smrg rhapsody* | darwin1.[[012]]) 309532b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 309632b578d3Smrg ;; 309732b578d3Smrg *) # Darwin 1.3 on 309832b578d3Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 309932b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 310032b578d3Smrg else 310132b578d3Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 310232b578d3Smrg 10.[[012]]) 310332b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 310432b578d3Smrg ;; 310532b578d3Smrg 10.*) 310632b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 310732b578d3Smrg ;; 310832b578d3Smrg esac 310932b578d3Smrg fi 311032b578d3Smrg ;; 311132b578d3Smrg esac 311232b578d3Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 311332b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 311432b578d3Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 311532b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 311632b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 311732b578d3Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 311832b578d3Smrg 311932b578d3Smrg if test "$GXX" = yes ; then 312032b578d3Smrg lt_int_apple_cc_single_mod=no 312132b578d3Smrg output_verbose_link_cmd='echo' 312232b578d3Smrg if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 312332b578d3Smrg lt_int_apple_cc_single_mod=yes 312432b578d3Smrg fi 312532b578d3Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 312632b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 312732b578d3Smrg else 312832b578d3Smrg _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' 312932b578d3Smrg fi 313032b578d3Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 313132b578d3Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 313232b578d3Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 313332b578d3Smrg _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}' 313432b578d3Smrg else 313532b578d3Smrg _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}' 313632b578d3Smrg fi 313732b578d3Smrg _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}' 313832b578d3Smrg else 313932b578d3Smrg case $cc_basename in 314032b578d3Smrg xlc*) 314132b578d3Smrg output_verbose_link_cmd='echo' 314232b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' 314332b578d3Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 314432b578d3Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 314532b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 314632b578d3Smrg _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}' 314732b578d3Smrg ;; 314832b578d3Smrg *) 314932b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 315032b578d3Smrg ;; 315132b578d3Smrg esac 315232b578d3Smrg fi 315332b578d3Smrg ;; 315432b578d3Smrg 315532b578d3Smrg dgux*) 315632b578d3Smrg case $cc_basename in 315732b578d3Smrg ec++*) 315832b578d3Smrg # FIXME: insert proper C++ library support 315932b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 316032b578d3Smrg ;; 316132b578d3Smrg ghcx*) 316232b578d3Smrg # Green Hills C++ Compiler 316332b578d3Smrg # FIXME: insert proper C++ library support 316432b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 316532b578d3Smrg ;; 316632b578d3Smrg *) 316732b578d3Smrg # FIXME: insert proper C++ library support 316832b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 316932b578d3Smrg ;; 317032b578d3Smrg esac 317132b578d3Smrg ;; 317232b578d3Smrg freebsd[[12]]*) 317332b578d3Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 317432b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 317532b578d3Smrg ;; 317632b578d3Smrg freebsd-elf*) 317732b578d3Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 317832b578d3Smrg ;; 317932b578d3Smrg freebsd* | dragonfly*) 318032b578d3Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 318132b578d3Smrg # conventions 318232b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 318332b578d3Smrg ;; 318432b578d3Smrg gnu*) 318532b578d3Smrg ;; 318632b578d3Smrg hpux9*) 318732b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 318832b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 318932b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 319032b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 319132b578d3Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 319232b578d3Smrg # but as the default 319332b578d3Smrg # location of the library. 319432b578d3Smrg 319532b578d3Smrg case $cc_basename in 319632b578d3Smrg CC*) 319732b578d3Smrg # FIXME: insert proper C++ library support 319832b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 319932b578d3Smrg ;; 320032b578d3Smrg aCC*) 320132b578d3Smrg _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' 320232b578d3Smrg # Commands to make compiler produce verbose output that lists 320332b578d3Smrg # what "hidden" libraries, object files and flags are used when 320432b578d3Smrg # linking a shared library. 320532b578d3Smrg # 320632b578d3Smrg # There doesn't appear to be a way to prevent this compiler from 320732b578d3Smrg # explicitly linking system object files so we need to strip them 320832b578d3Smrg # from the output so that they don't get included in the library 320932b578d3Smrg # dependencies. 321032b578d3Smrg 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' 321132b578d3Smrg ;; 321232b578d3Smrg *) 321332b578d3Smrg if test "$GXX" = yes; then 321432b578d3Smrg _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' 321532b578d3Smrg else 321632b578d3Smrg # FIXME: insert proper C++ library support 321732b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 321832b578d3Smrg fi 321932b578d3Smrg ;; 322032b578d3Smrg esac 322132b578d3Smrg ;; 322232b578d3Smrg hpux10*|hpux11*) 322332b578d3Smrg if test $with_gnu_ld = no; then 322432b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 322532b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 322632b578d3Smrg 322732b578d3Smrg case $host_cpu in 322832b578d3Smrg hppa*64*|ia64*) ;; 322932b578d3Smrg *) 323032b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 323132b578d3Smrg ;; 323232b578d3Smrg esac 323332b578d3Smrg fi 323432b578d3Smrg case $host_cpu in 323532b578d3Smrg hppa*64*|ia64*) 323632b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 323732b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 323832b578d3Smrg ;; 323932b578d3Smrg *) 324032b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 324132b578d3Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 324232b578d3Smrg # but as the default 324332b578d3Smrg # location of the library. 324432b578d3Smrg ;; 324532b578d3Smrg esac 324632b578d3Smrg 324732b578d3Smrg case $cc_basename in 324832b578d3Smrg CC*) 324932b578d3Smrg # FIXME: insert proper C++ library support 325032b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 325132b578d3Smrg ;; 325232b578d3Smrg aCC*) 325332b578d3Smrg case $host_cpu in 325432b578d3Smrg hppa*64*) 325532b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 325632b578d3Smrg ;; 325732b578d3Smrg ia64*) 325832b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 325932b578d3Smrg ;; 326032b578d3Smrg *) 326132b578d3Smrg _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' 326232b578d3Smrg ;; 326332b578d3Smrg esac 326432b578d3Smrg # Commands to make compiler produce verbose output that lists 326532b578d3Smrg # what "hidden" libraries, object files and flags are used when 326632b578d3Smrg # linking a shared library. 326732b578d3Smrg # 326832b578d3Smrg # There doesn't appear to be a way to prevent this compiler from 326932b578d3Smrg # explicitly linking system object files so we need to strip them 327032b578d3Smrg # from the output so that they don't get included in the library 327132b578d3Smrg # dependencies. 327232b578d3Smrg 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' 327332b578d3Smrg ;; 327432b578d3Smrg *) 327532b578d3Smrg if test "$GXX" = yes; then 327632b578d3Smrg if test $with_gnu_ld = no; then 327732b578d3Smrg case $host_cpu in 327832b578d3Smrg hppa*64*) 327932b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 328032b578d3Smrg ;; 328132b578d3Smrg ia64*) 328232b578d3Smrg _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' 328332b578d3Smrg ;; 328432b578d3Smrg *) 328532b578d3Smrg _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' 328632b578d3Smrg ;; 328732b578d3Smrg esac 328832b578d3Smrg fi 328932b578d3Smrg else 329032b578d3Smrg # FIXME: insert proper C++ library support 329132b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 329232b578d3Smrg fi 329332b578d3Smrg ;; 329432b578d3Smrg esac 329532b578d3Smrg ;; 329632b578d3Smrg interix[[3-9]]*) 329732b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 329832b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 329932b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 330032b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 330132b578d3Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 330232b578d3Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 330332b578d3Smrg # default) and relocated if they conflict, which is a slow very memory 330432b578d3Smrg # consuming and fragmenting process. To avoid this, we pick a random, 330532b578d3Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 330632b578d3Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 330732b578d3Smrg _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' 330832b578d3Smrg _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' 330932b578d3Smrg ;; 331032b578d3Smrg irix5* | irix6*) 331132b578d3Smrg case $cc_basename in 331232b578d3Smrg CC*) 331332b578d3Smrg # SGI C++ 331432b578d3Smrg _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' 331532b578d3Smrg 331632b578d3Smrg # Archives containing C++ object files must be created using 331732b578d3Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 331832b578d3Smrg # necessary to make sure instantiated templates are included 331932b578d3Smrg # in the archive. 332032b578d3Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 332132b578d3Smrg ;; 332232b578d3Smrg *) 332332b578d3Smrg if test "$GXX" = yes; then 332432b578d3Smrg if test "$with_gnu_ld" = no; then 332532b578d3Smrg _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' 332632b578d3Smrg else 332732b578d3Smrg _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' 332832b578d3Smrg fi 332932b578d3Smrg fi 333032b578d3Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 333132b578d3Smrg ;; 333232b578d3Smrg esac 333332b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 333432b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 333532b578d3Smrg ;; 333632b578d3Smrg linux* | k*bsd*-gnu) 333732b578d3Smrg case $cc_basename in 333832b578d3Smrg KCC*) 333932b578d3Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 334032b578d3Smrg 334132b578d3Smrg # KCC will only create a shared library if the output file 334232b578d3Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 334332b578d3Smrg # to its proper name (with version) after linking. 334432b578d3Smrg _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' 334532b578d3Smrg _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' 334632b578d3Smrg # Commands to make compiler produce verbose output that lists 334732b578d3Smrg # what "hidden" libraries, object files and flags are used when 334832b578d3Smrg # linking a shared library. 334932b578d3Smrg # 335032b578d3Smrg # There doesn't appear to be a way to prevent this compiler from 335132b578d3Smrg # explicitly linking system object files so we need to strip them 335232b578d3Smrg # from the output so that they don't get included in the library 335332b578d3Smrg # dependencies. 335432b578d3Smrg 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' 335532b578d3Smrg 335632b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 335732b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 335832b578d3Smrg 335932b578d3Smrg # Archives containing C++ object files must be created using 336032b578d3Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 336132b578d3Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 336232b578d3Smrg ;; 336332b578d3Smrg icpc*) 336432b578d3Smrg # Intel C++ 336532b578d3Smrg with_gnu_ld=yes 336632b578d3Smrg # version 8.0 and above of icpc choke on multiply defined symbols 336732b578d3Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 336832b578d3Smrg # earlier do not add the objects themselves. 336932b578d3Smrg case `$CC -V 2>&1` in 337032b578d3Smrg *"Version 7."*) 337132b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 337232b578d3Smrg _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' 337332b578d3Smrg ;; 337432b578d3Smrg *) # Version 8.0 or newer 337532b578d3Smrg tmp_idyn= 337632b578d3Smrg case $host_cpu in 337732b578d3Smrg ia64*) tmp_idyn=' -i_dynamic';; 337832b578d3Smrg esac 337932b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 338032b578d3Smrg _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' 338132b578d3Smrg ;; 338232b578d3Smrg esac 338332b578d3Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 338432b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 338532b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 338632b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 338732b578d3Smrg ;; 338832b578d3Smrg pgCC*) 338932b578d3Smrg # Portland Group C++ compiler 339032b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 339132b578d3Smrg _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' 339232b578d3Smrg 339332b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 339432b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 339532b578d3Smrg _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' 339632b578d3Smrg ;; 339732b578d3Smrg cxx*) 339832b578d3Smrg # Compaq C++ 339932b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 340032b578d3Smrg _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' 340132b578d3Smrg 340232b578d3Smrg runpath_var=LD_RUN_PATH 340332b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 340432b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 340532b578d3Smrg 340632b578d3Smrg # Commands to make compiler produce verbose output that lists 340732b578d3Smrg # what "hidden" libraries, object files and flags are used when 340832b578d3Smrg # linking a shared library. 340932b578d3Smrg # 341032b578d3Smrg # There doesn't appear to be a way to prevent this compiler from 341132b578d3Smrg # explicitly linking system object files so we need to strip them 341232b578d3Smrg # from the output so that they don't get included in the library 341332b578d3Smrg # dependencies. 341432b578d3Smrg 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' 341532b578d3Smrg ;; 341632b578d3Smrg *) 341732b578d3Smrg case `$CC -V 2>&1 | sed 5q` in 341832b578d3Smrg *Sun\ C*) 341932b578d3Smrg # Sun C++ 5.9 342032b578d3Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 342132b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 342232b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' 342332b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 342432b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 342532b578d3Smrg 342632b578d3Smrg # Not sure whether something based on 342732b578d3Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 342832b578d3Smrg # would be better. 342932b578d3Smrg output_verbose_link_cmd='echo' 343032b578d3Smrg 343132b578d3Smrg # Archives containing C++ object files must be created using 343232b578d3Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 343332b578d3Smrg # necessary to make sure instantiated templates are included 343432b578d3Smrg # in the archive. 343532b578d3Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 343632b578d3Smrg ;; 343732b578d3Smrg esac 343832b578d3Smrg ;; 343932b578d3Smrg esac 344032b578d3Smrg ;; 344132b578d3Smrg lynxos*) 344232b578d3Smrg # FIXME: insert proper C++ library support 344332b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 344432b578d3Smrg ;; 344532b578d3Smrg m88k*) 344632b578d3Smrg # FIXME: insert proper C++ library support 344732b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 344832b578d3Smrg ;; 344932b578d3Smrg mvs*) 345032b578d3Smrg case $cc_basename in 345132b578d3Smrg cxx*) 345232b578d3Smrg # FIXME: insert proper C++ library support 345332b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 345432b578d3Smrg ;; 345532b578d3Smrg *) 345632b578d3Smrg # FIXME: insert proper C++ library support 345732b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 345832b578d3Smrg ;; 345932b578d3Smrg esac 346032b578d3Smrg ;; 346132b578d3Smrg netbsd*) 346232b578d3Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 346332b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 346432b578d3Smrg wlarc= 346532b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 346632b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 346732b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 346832b578d3Smrg fi 346932b578d3Smrg # Workaround some broken pre-1.5 toolchains 347032b578d3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 347132b578d3Smrg ;; 347232b578d3Smrg openbsd2*) 347332b578d3Smrg # C++ shared libraries are fairly broken 347432b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 347532b578d3Smrg ;; 347632b578d3Smrg openbsd*) 347732b578d3Smrg if test -f /usr/libexec/ld.so; then 347832b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 347932b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 348032b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 348132b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 348232b578d3Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 348332b578d3Smrg _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' 348432b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 348532b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 348632b578d3Smrg fi 348732b578d3Smrg output_verbose_link_cmd='echo' 348832b578d3Smrg else 348932b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 349032b578d3Smrg fi 349132b578d3Smrg ;; 349232b578d3Smrg osf3*) 349332b578d3Smrg case $cc_basename in 349432b578d3Smrg KCC*) 349532b578d3Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 349632b578d3Smrg 349732b578d3Smrg # KCC will only create a shared library if the output file 349832b578d3Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 349932b578d3Smrg # to its proper name (with version) after linking. 350032b578d3Smrg _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' 350132b578d3Smrg 350232b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 350332b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 350432b578d3Smrg 350532b578d3Smrg # Archives containing C++ object files must be created using 350632b578d3Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 350732b578d3Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 350832b578d3Smrg 350932b578d3Smrg ;; 351032b578d3Smrg RCC*) 351132b578d3Smrg # Rational C++ 2.4.1 351232b578d3Smrg # FIXME: insert proper C++ library support 351332b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 351432b578d3Smrg ;; 351532b578d3Smrg cxx*) 351632b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 351732b578d3Smrg _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' 351832b578d3Smrg 351932b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 352032b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 352132b578d3Smrg 352232b578d3Smrg # Commands to make compiler produce verbose output that lists 352332b578d3Smrg # what "hidden" libraries, object files and flags are used when 352432b578d3Smrg # linking a shared library. 352532b578d3Smrg # 352632b578d3Smrg # There doesn't appear to be a way to prevent this compiler from 352732b578d3Smrg # explicitly linking system object files so we need to strip them 352832b578d3Smrg # from the output so that they don't get included in the library 352932b578d3Smrg # dependencies. 353032b578d3Smrg 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' 353132b578d3Smrg ;; 353232b578d3Smrg *) 353332b578d3Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 353432b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 353532b578d3Smrg _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' 353632b578d3Smrg 353732b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 353832b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 353932b578d3Smrg 354032b578d3Smrg # Commands to make compiler produce verbose output that lists 354132b578d3Smrg # what "hidden" libraries, object files and flags are used when 354232b578d3Smrg # linking a shared library. 354332b578d3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 354432b578d3Smrg 354532b578d3Smrg else 354632b578d3Smrg # FIXME: insert proper C++ library support 354732b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 354832b578d3Smrg fi 354932b578d3Smrg ;; 355032b578d3Smrg esac 355132b578d3Smrg ;; 355232b578d3Smrg osf4* | osf5*) 355332b578d3Smrg case $cc_basename in 355432b578d3Smrg KCC*) 355532b578d3Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 355632b578d3Smrg 355732b578d3Smrg # KCC will only create a shared library if the output file 355832b578d3Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 355932b578d3Smrg # to its proper name (with version) after linking. 356032b578d3Smrg _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' 356132b578d3Smrg 356232b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 356332b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 356432b578d3Smrg 356532b578d3Smrg # Archives containing C++ object files must be created using 356632b578d3Smrg # the KAI C++ compiler. 356732b578d3Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 356832b578d3Smrg ;; 356932b578d3Smrg RCC*) 357032b578d3Smrg # Rational C++ 2.4.1 357132b578d3Smrg # FIXME: insert proper C++ library support 357232b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 357332b578d3Smrg ;; 357432b578d3Smrg cxx*) 357532b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 357632b578d3Smrg _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' 357732b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 357832b578d3Smrg echo "-hidden">> $lib.exp~ 357932b578d3Smrg $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~ 358032b578d3Smrg $rm $lib.exp' 358132b578d3Smrg 358232b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 358332b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 358432b578d3Smrg 358532b578d3Smrg # Commands to make compiler produce verbose output that lists 358632b578d3Smrg # what "hidden" libraries, object files and flags are used when 358732b578d3Smrg # linking a shared library. 358832b578d3Smrg # 358932b578d3Smrg # There doesn't appear to be a way to prevent this compiler from 359032b578d3Smrg # explicitly linking system object files so we need to strip them 359132b578d3Smrg # from the output so that they don't get included in the library 359232b578d3Smrg # dependencies. 359332b578d3Smrg 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' 359432b578d3Smrg ;; 359532b578d3Smrg *) 359632b578d3Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 359732b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 359832b578d3Smrg _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' 359932b578d3Smrg 360032b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 360132b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 360232b578d3Smrg 360332b578d3Smrg # Commands to make compiler produce verbose output that lists 360432b578d3Smrg # what "hidden" libraries, object files and flags are used when 360532b578d3Smrg # linking a shared library. 360632b578d3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 360732b578d3Smrg 360832b578d3Smrg else 360932b578d3Smrg # FIXME: insert proper C++ library support 361032b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 361132b578d3Smrg fi 361232b578d3Smrg ;; 361332b578d3Smrg esac 361432b578d3Smrg ;; 361532b578d3Smrg psos*) 361632b578d3Smrg # FIXME: insert proper C++ library support 361732b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 361832b578d3Smrg ;; 361932b578d3Smrg sunos4*) 362032b578d3Smrg case $cc_basename in 362132b578d3Smrg CC*) 362232b578d3Smrg # Sun C++ 4.x 362332b578d3Smrg # FIXME: insert proper C++ library support 362432b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 362532b578d3Smrg ;; 362632b578d3Smrg lcc*) 362732b578d3Smrg # Lucid 362832b578d3Smrg # FIXME: insert proper C++ library support 362932b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 363032b578d3Smrg ;; 363132b578d3Smrg *) 363232b578d3Smrg # FIXME: insert proper C++ library support 363332b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 363432b578d3Smrg ;; 363532b578d3Smrg esac 363632b578d3Smrg ;; 363732b578d3Smrg solaris*) 363832b578d3Smrg case $cc_basename in 363932b578d3Smrg CC*) 364032b578d3Smrg # Sun C++ 4.2, 5.x and Centerline C++ 364132b578d3Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 364232b578d3Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 364332b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 364432b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 364532b578d3Smrg $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' 364632b578d3Smrg 364732b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 364832b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 364932b578d3Smrg case $host_os in 365032b578d3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 365132b578d3Smrg *) 365232b578d3Smrg # The compiler driver will combine and reorder linker options, 365332b578d3Smrg # but understands `-z linker_flag'. 365432b578d3Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 365532b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 365632b578d3Smrg ;; 365732b578d3Smrg esac 365832b578d3Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 365932b578d3Smrg 366032b578d3Smrg output_verbose_link_cmd='echo' 366132b578d3Smrg 366232b578d3Smrg # Archives containing C++ object files must be created using 366332b578d3Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 366432b578d3Smrg # necessary to make sure instantiated templates are included 366532b578d3Smrg # in the archive. 366632b578d3Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 366732b578d3Smrg ;; 366832b578d3Smrg gcx*) 366932b578d3Smrg # Green Hills C++ Compiler 367032b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 367132b578d3Smrg 367232b578d3Smrg # The C++ compiler must be used to create the archive. 367332b578d3Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 367432b578d3Smrg ;; 367532b578d3Smrg *) 367632b578d3Smrg # GNU C++ compiler with Solaris linker 367732b578d3Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 367832b578d3Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 367932b578d3Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 368032b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 368132b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 368232b578d3Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 368332b578d3Smrg 368432b578d3Smrg # Commands to make compiler produce verbose output that lists 368532b578d3Smrg # what "hidden" libraries, object files and flags are used when 368632b578d3Smrg # linking a shared library. 368732b578d3Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 368832b578d3Smrg else 368932b578d3Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 369032b578d3Smrg # platform. 369132b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 369232b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 369332b578d3Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 369432b578d3Smrg 369532b578d3Smrg # Commands to make compiler produce verbose output that lists 369632b578d3Smrg # what "hidden" libraries, object files and flags are used when 369732b578d3Smrg # linking a shared library. 369832b578d3Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 369932b578d3Smrg fi 370032b578d3Smrg 370132b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 370232b578d3Smrg case $host_os in 370332b578d3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 370432b578d3Smrg *) 370532b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 370632b578d3Smrg ;; 370732b578d3Smrg esac 370832b578d3Smrg fi 370932b578d3Smrg ;; 371032b578d3Smrg esac 371132b578d3Smrg ;; 371232b578d3Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 371332b578d3Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 371432b578d3Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 371532b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 371632b578d3Smrg runpath_var='LD_RUN_PATH' 371732b578d3Smrg 371832b578d3Smrg case $cc_basename in 371932b578d3Smrg CC*) 372032b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 372132b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 372232b578d3Smrg ;; 372332b578d3Smrg *) 372432b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 372532b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 372632b578d3Smrg ;; 372732b578d3Smrg esac 372832b578d3Smrg ;; 372932b578d3Smrg sysv5* | sco3.2v5* | sco5v6*) 373032b578d3Smrg # Note: We can NOT use -z defs as we might desire, because we do not 373132b578d3Smrg # link with -lc, and that would cause any symbols used from libc to 373232b578d3Smrg # always be unresolved, which means just about no library would 373332b578d3Smrg # ever link correctly. If we're not using GNU ld we use -z text 373432b578d3Smrg # though, which does catch some bad symbols but isn't as heavy-handed 373532b578d3Smrg # as -z defs. 373632b578d3Smrg # For security reasons, it is highly recommended that you always 373732b578d3Smrg # use absolute paths for naming shared libraries, and exclude the 373832b578d3Smrg # DT_RUNPATH tag from executables and libraries. But doing so 373932b578d3Smrg # requires that you compile everything twice, which is a pain. 374032b578d3Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 374132b578d3Smrg # non-empty value in the environment. Most likely only useful for 374232b578d3Smrg # creating official distributions of packages. 374332b578d3Smrg # This is a hack until libtool officially supports absolute path 374432b578d3Smrg # names for shared libraries. 374532b578d3Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 374632b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 374732b578d3Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 374832b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 374932b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 375032b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 375132b578d3Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 375232b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 375332b578d3Smrg runpath_var='LD_RUN_PATH' 375432b578d3Smrg 375532b578d3Smrg case $cc_basename in 375632b578d3Smrg CC*) 375732b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 375832b578d3Smrg _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' 375932b578d3Smrg ;; 376032b578d3Smrg *) 376132b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 376232b578d3Smrg _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' 376332b578d3Smrg ;; 376432b578d3Smrg esac 376532b578d3Smrg ;; 376632b578d3Smrg tandem*) 376732b578d3Smrg case $cc_basename in 376832b578d3Smrg NCC*) 376932b578d3Smrg # NonStop-UX NCC 3.20 377032b578d3Smrg # FIXME: insert proper C++ library support 377132b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 377232b578d3Smrg ;; 377332b578d3Smrg *) 377432b578d3Smrg # FIXME: insert proper C++ library support 377532b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 377632b578d3Smrg ;; 377732b578d3Smrg esac 377832b578d3Smrg ;; 377932b578d3Smrg vxworks*) 378032b578d3Smrg # FIXME: insert proper C++ library support 378132b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 378232b578d3Smrg ;; 378332b578d3Smrg *) 378432b578d3Smrg # FIXME: insert proper C++ library support 378532b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 378632b578d3Smrg ;; 378732b578d3Smrgesac 378832b578d3SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 378932b578d3Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 379032b578d3Smrg 379132b578d3Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 379232b578d3Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 379332b578d3Smrg 379432b578d3SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 379532b578d3SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 379632b578d3SmrgAC_LIBTOOL_PROG_CC_C_O($1) 379732b578d3SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 379832b578d3SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 379932b578d3SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 380032b578d3SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 380132b578d3Smrg 380232b578d3SmrgAC_LIBTOOL_CONFIG($1) 380332b578d3Smrg 380432b578d3SmrgAC_LANG_POP 380532b578d3SmrgCC=$lt_save_CC 380632b578d3SmrgLDCXX=$LD 380732b578d3SmrgLD=$lt_save_LD 380832b578d3SmrgGCC=$lt_save_GCC 380932b578d3Smrgwith_gnu_ldcxx=$with_gnu_ld 381032b578d3Smrgwith_gnu_ld=$lt_save_with_gnu_ld 381132b578d3Smrglt_cv_path_LDCXX=$lt_cv_path_LD 381232b578d3Smrglt_cv_path_LD=$lt_save_path_LD 381332b578d3Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 381432b578d3Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 381532b578d3Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 381632b578d3Smrg 381732b578d3Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 381832b578d3Smrg# ------------------------------------ 381932b578d3Smrg# Figure out "hidden" library dependencies from verbose 382032b578d3Smrg# compiler output when linking a shared library. 382132b578d3Smrg# Parse the compiler output and extract the necessary 382232b578d3Smrg# objects, libraries and library flags. 382332b578d3SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 382432b578d3Smrgdnl we can't use the lt_simple_compile_test_code here, 382532b578d3Smrgdnl because it contains code intended for an executable, 382632b578d3Smrgdnl not a library. It's possible we should let each 382732b578d3Smrgdnl tag define a new lt_????_link_test_code variable, 382832b578d3Smrgdnl but it's only used here... 382932b578d3Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 383032b578d3Smrgint a; 383132b578d3Smrgvoid foo (void) { a = 0; } 383232b578d3SmrgEOF 383332b578d3Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 383432b578d3Smrgclass Foo 383532b578d3Smrg{ 383632b578d3Smrgpublic: 383732b578d3Smrg Foo (void) { a = 0; } 383832b578d3Smrgprivate: 383932b578d3Smrg int a; 384032b578d3Smrg}; 384132b578d3SmrgEOF 384232b578d3Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 384332b578d3Smrg subroutine foo 384432b578d3Smrg implicit none 384532b578d3Smrg integer*4 a 384632b578d3Smrg a=0 384732b578d3Smrg return 384832b578d3Smrg end 384932b578d3SmrgEOF 385032b578d3Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 385132b578d3Smrgpublic class foo { 385232b578d3Smrg private int a; 385332b578d3Smrg public void bar (void) { 385432b578d3Smrg a = 0; 385532b578d3Smrg } 385632b578d3Smrg}; 385732b578d3SmrgEOF 385832b578d3Smrg]) 385932b578d3Smrgdnl Parse the compiler output and extract the necessary 386032b578d3Smrgdnl objects, libraries and library flags. 386132b578d3Smrgif AC_TRY_EVAL(ac_compile); then 386232b578d3Smrg # Parse the compiler output and extract the necessary 386332b578d3Smrg # objects, libraries and library flags. 386432b578d3Smrg 386532b578d3Smrg # Sentinel used to keep track of whether or not we are before 386632b578d3Smrg # the conftest object file. 386732b578d3Smrg pre_test_object_deps_done=no 386832b578d3Smrg 386932b578d3Smrg # The `*' in the case matches for architectures that use `case' in 387032b578d3Smrg # $output_verbose_cmd can trigger glob expansion during the loop 387132b578d3Smrg # eval without this substitution. 387232b578d3Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 387332b578d3Smrg 387432b578d3Smrg for p in `eval $output_verbose_link_cmd`; do 387532b578d3Smrg case $p in 387632b578d3Smrg 387732b578d3Smrg -L* | -R* | -l*) 387832b578d3Smrg # Some compilers place space between "-{L,R}" and the path. 387932b578d3Smrg # Remove the space. 388032b578d3Smrg if test $p = "-L" \ 388132b578d3Smrg || test $p = "-R"; then 388232b578d3Smrg prev=$p 388332b578d3Smrg continue 388432b578d3Smrg else 388532b578d3Smrg prev= 388632b578d3Smrg fi 388732b578d3Smrg 388832b578d3Smrg if test "$pre_test_object_deps_done" = no; then 388932b578d3Smrg case $p in 389032b578d3Smrg -L* | -R*) 389132b578d3Smrg # Internal compiler library paths should come after those 389232b578d3Smrg # provided the user. The postdeps already come after the 389332b578d3Smrg # user supplied libs so there is no need to process them. 389432b578d3Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 389532b578d3Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 389632b578d3Smrg else 389732b578d3Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 389832b578d3Smrg fi 389932b578d3Smrg ;; 390032b578d3Smrg # The "-l" case would never come before the object being 390132b578d3Smrg # linked, so don't bother handling this case. 390232b578d3Smrg esac 390332b578d3Smrg else 390432b578d3Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 390532b578d3Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 390632b578d3Smrg else 390732b578d3Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 390832b578d3Smrg fi 390932b578d3Smrg fi 391032b578d3Smrg ;; 391132b578d3Smrg 391232b578d3Smrg *.$objext) 391332b578d3Smrg # This assumes that the test object file only shows up 391432b578d3Smrg # once in the compiler output. 391532b578d3Smrg if test "$p" = "conftest.$objext"; then 391632b578d3Smrg pre_test_object_deps_done=yes 391732b578d3Smrg continue 391832b578d3Smrg fi 391932b578d3Smrg 392032b578d3Smrg if test "$pre_test_object_deps_done" = no; then 392132b578d3Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 392232b578d3Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 392332b578d3Smrg else 392432b578d3Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 392532b578d3Smrg fi 392632b578d3Smrg else 392732b578d3Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 392832b578d3Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 392932b578d3Smrg else 393032b578d3Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 393132b578d3Smrg fi 393232b578d3Smrg fi 393332b578d3Smrg ;; 393432b578d3Smrg 393532b578d3Smrg *) ;; # Ignore the rest. 393632b578d3Smrg 393732b578d3Smrg esac 393832b578d3Smrg done 393932b578d3Smrg 394032b578d3Smrg # Clean up. 394132b578d3Smrg rm -f a.out a.exe 394232b578d3Smrgelse 394332b578d3Smrg echo "libtool.m4: error: problem compiling $1 test program" 394432b578d3Smrgfi 394532b578d3Smrg 394632b578d3Smrg$rm -f confest.$objext 394732b578d3Smrg 394832b578d3Smrg# PORTME: override above test on systems where it is broken 394932b578d3Smrgifelse([$1],[CXX], 395032b578d3Smrg[case $host_os in 395132b578d3Smrginterix[[3-9]]*) 395232b578d3Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 395332b578d3Smrg # hack all around it, let's just trust "g++" to DTRT. 395432b578d3Smrg _LT_AC_TAGVAR(predep_objects,$1)= 395532b578d3Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 395632b578d3Smrg _LT_AC_TAGVAR(postdeps,$1)= 395732b578d3Smrg ;; 395832b578d3Smrg 395932b578d3Smrglinux*) 396032b578d3Smrg case `$CC -V 2>&1 | sed 5q` in 396132b578d3Smrg *Sun\ C*) 396232b578d3Smrg # Sun C++ 5.9 396332b578d3Smrg # 396432b578d3Smrg # The more standards-conforming stlport4 library is 396532b578d3Smrg # incompatible with the Cstd library. Avoid specifying 396632b578d3Smrg # it if it's in CXXFLAGS. Ignore libCrun as 396732b578d3Smrg # -library=stlport4 depends on it. 396832b578d3Smrg case " $CXX $CXXFLAGS " in 396932b578d3Smrg *" -library=stlport4 "*) 397032b578d3Smrg solaris_use_stlport4=yes 397132b578d3Smrg ;; 397232b578d3Smrg esac 397332b578d3Smrg if test "$solaris_use_stlport4" != yes; then 397432b578d3Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 397532b578d3Smrg fi 397632b578d3Smrg ;; 397732b578d3Smrg esac 397832b578d3Smrg ;; 397932b578d3Smrg 398032b578d3Smrgsolaris*) 398132b578d3Smrg case $cc_basename in 398232b578d3Smrg CC*) 398332b578d3Smrg # The more standards-conforming stlport4 library is 398432b578d3Smrg # incompatible with the Cstd library. Avoid specifying 398532b578d3Smrg # it if it's in CXXFLAGS. Ignore libCrun as 398632b578d3Smrg # -library=stlport4 depends on it. 398732b578d3Smrg case " $CXX $CXXFLAGS " in 398832b578d3Smrg *" -library=stlport4 "*) 398932b578d3Smrg solaris_use_stlport4=yes 399032b578d3Smrg ;; 399132b578d3Smrg esac 399232b578d3Smrg 399332b578d3Smrg # Adding this requires a known-good setup of shared libraries for 399432b578d3Smrg # Sun compiler versions before 5.6, else PIC objects from an old 399532b578d3Smrg # archive will be linked into the output, leading to subtle bugs. 399632b578d3Smrg if test "$solaris_use_stlport4" != yes; then 399732b578d3Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 399832b578d3Smrg fi 399932b578d3Smrg ;; 400032b578d3Smrg esac 400132b578d3Smrg ;; 400232b578d3Smrgesac 400332b578d3Smrg]) 400432b578d3Smrg 400532b578d3Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 400632b578d3Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 400732b578d3Smrgesac 400832b578d3Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 400932b578d3Smrg 401032b578d3Smrg# AC_LIBTOOL_LANG_F77_CONFIG 401132b578d3Smrg# -------------------------- 401232b578d3Smrg# Ensure that the configuration vars for the C compiler are 401332b578d3Smrg# suitably defined. Those variables are subsequently used by 401432b578d3Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 401532b578d3SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 401632b578d3SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 401732b578d3Smrg[AC_REQUIRE([AC_PROG_F77]) 401832b578d3SmrgAC_LANG_PUSH(Fortran 77) 401932b578d3Smrg 402032b578d3Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 402132b578d3Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 402232b578d3Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 402332b578d3Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 402432b578d3Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 402532b578d3Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 402632b578d3Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 402732b578d3Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 402832b578d3Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 402932b578d3Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 403032b578d3Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 403132b578d3Smrg_LT_AC_TAGVAR(module_cmds, $1)= 403232b578d3Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 403332b578d3Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 403432b578d3Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 403532b578d3Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 403632b578d3Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 403732b578d3Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 403832b578d3Smrg 403932b578d3Smrg# Source file extension for f77 test sources. 404032b578d3Smrgac_ext=f 404132b578d3Smrg 404232b578d3Smrg# Object file extension for compiled f77 test sources. 404332b578d3Smrgobjext=o 404432b578d3Smrg_LT_AC_TAGVAR(objext, $1)=$objext 404532b578d3Smrg 404632b578d3Smrg# Code to be used in simple compile tests 404732b578d3Smrglt_simple_compile_test_code="\ 404832b578d3Smrg subroutine t 404932b578d3Smrg return 405032b578d3Smrg end 405132b578d3Smrg" 405232b578d3Smrg 405332b578d3Smrg# Code to be used in simple link tests 405432b578d3Smrglt_simple_link_test_code="\ 405532b578d3Smrg program t 405632b578d3Smrg end 405732b578d3Smrg" 405832b578d3Smrg 405932b578d3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 406032b578d3Smrg_LT_AC_SYS_COMPILER 406132b578d3Smrg 406232b578d3Smrg# save warnings/boilerplate of simple test code 406332b578d3Smrg_LT_COMPILER_BOILERPLATE 406432b578d3Smrg_LT_LINKER_BOILERPLATE 406532b578d3Smrg 406632b578d3Smrg# Allow CC to be a program name with arguments. 406732b578d3Smrglt_save_CC="$CC" 406832b578d3SmrgCC=${F77-"f77"} 406932b578d3Smrgcompiler=$CC 407032b578d3Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 407132b578d3Smrg_LT_CC_BASENAME([$compiler]) 407232b578d3Smrg 407332b578d3SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 407432b578d3SmrgAC_MSG_RESULT([$can_build_shared]) 407532b578d3Smrg 407632b578d3SmrgAC_MSG_CHECKING([whether to build shared libraries]) 407732b578d3Smrgtest "$can_build_shared" = "no" && enable_shared=no 407832b578d3Smrg 407932b578d3Smrg# On AIX, shared libraries and static libraries use the same namespace, and 408032b578d3Smrg# are all built from PIC. 408132b578d3Smrgcase $host_os in 408232b578d3Smrgaix3*) 408332b578d3Smrg test "$enable_shared" = yes && enable_static=no 408432b578d3Smrg if test -n "$RANLIB"; then 408532b578d3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 408632b578d3Smrg postinstall_cmds='$RANLIB $lib' 408732b578d3Smrg fi 408832b578d3Smrg ;; 408932b578d3Smrgaix4* | aix5*) 409032b578d3Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 409132b578d3Smrg test "$enable_shared" = yes && enable_static=no 409232b578d3Smrg fi 409332b578d3Smrg ;; 409432b578d3Smrgesac 409532b578d3SmrgAC_MSG_RESULT([$enable_shared]) 409632b578d3Smrg 409732b578d3SmrgAC_MSG_CHECKING([whether to build static libraries]) 409832b578d3Smrg# Make sure either enable_shared or enable_static is yes. 409932b578d3Smrgtest "$enable_shared" = yes || enable_static=yes 410032b578d3SmrgAC_MSG_RESULT([$enable_static]) 410132b578d3Smrg 410232b578d3Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 410332b578d3Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 410432b578d3Smrg 410532b578d3SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 410632b578d3SmrgAC_LIBTOOL_PROG_CC_C_O($1) 410732b578d3SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 410832b578d3SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 410932b578d3SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 411032b578d3SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 411132b578d3Smrg 411232b578d3SmrgAC_LIBTOOL_CONFIG($1) 411332b578d3Smrg 411432b578d3SmrgAC_LANG_POP 411532b578d3SmrgCC="$lt_save_CC" 411632b578d3Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 411732b578d3Smrg 411832b578d3Smrg 411932b578d3Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 412032b578d3Smrg# -------------------------- 412132b578d3Smrg# Ensure that the configuration vars for the C compiler are 412232b578d3Smrg# suitably defined. Those variables are subsequently used by 412332b578d3Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 412432b578d3SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 412532b578d3SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 412632b578d3Smrg[AC_LANG_SAVE 412732b578d3Smrg 412832b578d3Smrg# Source file extension for Java test sources. 412932b578d3Smrgac_ext=java 413032b578d3Smrg 413132b578d3Smrg# Object file extension for compiled Java test sources. 413232b578d3Smrgobjext=o 413332b578d3Smrg_LT_AC_TAGVAR(objext, $1)=$objext 413432b578d3Smrg 413532b578d3Smrg# Code to be used in simple compile tests 413632b578d3Smrglt_simple_compile_test_code="class foo {}" 413732b578d3Smrg 413832b578d3Smrg# Code to be used in simple link tests 413932b578d3Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 414032b578d3Smrg 414132b578d3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 414232b578d3Smrg_LT_AC_SYS_COMPILER 414332b578d3Smrg 414432b578d3Smrg# save warnings/boilerplate of simple test code 414532b578d3Smrg_LT_COMPILER_BOILERPLATE 414632b578d3Smrg_LT_LINKER_BOILERPLATE 414732b578d3Smrg 414832b578d3Smrg# Allow CC to be a program name with arguments. 414932b578d3Smrglt_save_CC="$CC" 415032b578d3SmrgCC=${GCJ-"gcj"} 415132b578d3Smrgcompiler=$CC 415232b578d3Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 415332b578d3Smrg_LT_CC_BASENAME([$compiler]) 415432b578d3Smrg 415532b578d3Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 415632b578d3Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 415732b578d3Smrg 415832b578d3Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 415932b578d3Smrg 416032b578d3SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 416132b578d3SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 416232b578d3SmrgAC_LIBTOOL_PROG_CC_C_O($1) 416332b578d3SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 416432b578d3SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 416532b578d3SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 416632b578d3SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 416732b578d3Smrg 416832b578d3SmrgAC_LIBTOOL_CONFIG($1) 416932b578d3Smrg 417032b578d3SmrgAC_LANG_RESTORE 417132b578d3SmrgCC="$lt_save_CC" 417232b578d3Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 417332b578d3Smrg 417432b578d3Smrg 417532b578d3Smrg# AC_LIBTOOL_LANG_RC_CONFIG 417632b578d3Smrg# ------------------------- 417732b578d3Smrg# Ensure that the configuration vars for the Windows resource compiler are 417832b578d3Smrg# suitably defined. Those variables are subsequently used by 417932b578d3Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 418032b578d3SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 418132b578d3SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 418232b578d3Smrg[AC_LANG_SAVE 418332b578d3Smrg 418432b578d3Smrg# Source file extension for RC test sources. 418532b578d3Smrgac_ext=rc 418632b578d3Smrg 418732b578d3Smrg# Object file extension for compiled RC test sources. 418832b578d3Smrgobjext=o 418932b578d3Smrg_LT_AC_TAGVAR(objext, $1)=$objext 419032b578d3Smrg 419132b578d3Smrg# Code to be used in simple compile tests 419232b578d3Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 419332b578d3Smrg 419432b578d3Smrg# Code to be used in simple link tests 419532b578d3Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 419632b578d3Smrg 419732b578d3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 419832b578d3Smrg_LT_AC_SYS_COMPILER 419932b578d3Smrg 420032b578d3Smrg# save warnings/boilerplate of simple test code 420132b578d3Smrg_LT_COMPILER_BOILERPLATE 420232b578d3Smrg_LT_LINKER_BOILERPLATE 420332b578d3Smrg 420432b578d3Smrg# Allow CC to be a program name with arguments. 420532b578d3Smrglt_save_CC="$CC" 420632b578d3SmrgCC=${RC-"windres"} 420732b578d3Smrgcompiler=$CC 420832b578d3Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 420932b578d3Smrg_LT_CC_BASENAME([$compiler]) 421032b578d3Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 421132b578d3Smrg 421232b578d3SmrgAC_LIBTOOL_CONFIG($1) 421332b578d3Smrg 421432b578d3SmrgAC_LANG_RESTORE 421532b578d3SmrgCC="$lt_save_CC" 421632b578d3Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 421732b578d3Smrg 421832b578d3Smrg 421932b578d3Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 422032b578d3Smrg# ---------------------------- 422132b578d3Smrg# If TAGNAME is not passed, then create an initial libtool script 422232b578d3Smrg# with a default configuration from the untagged config vars. Otherwise 422332b578d3Smrg# add code to config.status for appending the configuration named by 422432b578d3Smrg# TAGNAME from the matching tagged config vars. 422532b578d3SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 422632b578d3Smrg[# The else clause should only fire when bootstrapping the 422732b578d3Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 422832b578d3Smrg# with your package, and you will get complaints that there are 422932b578d3Smrg# no rules to generate ltmain.sh. 423032b578d3Smrgif test -f "$ltmain"; then 423132b578d3Smrg # See if we are running on zsh, and set the options which allow our commands through 423232b578d3Smrg # without removal of \ escapes. 423332b578d3Smrg if test -n "${ZSH_VERSION+set}" ; then 423432b578d3Smrg setopt NO_GLOB_SUBST 423532b578d3Smrg fi 423632b578d3Smrg # Now quote all the things that may contain metacharacters while being 423732b578d3Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 423832b578d3Smrg # variables and quote the copies for generation of the libtool script. 423932b578d3Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 424032b578d3Smrg SED SHELL STRIP \ 424132b578d3Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 424232b578d3Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 424332b578d3Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 424432b578d3Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 424532b578d3Smrg lt_cv_sys_global_symbol_to_c_name_address \ 424632b578d3Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 424732b578d3Smrg old_postinstall_cmds old_postuninstall_cmds \ 424832b578d3Smrg _LT_AC_TAGVAR(compiler, $1) \ 424932b578d3Smrg _LT_AC_TAGVAR(CC, $1) \ 425032b578d3Smrg _LT_AC_TAGVAR(LD, $1) \ 425132b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 425232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 425332b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 425432b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 425532b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 425632b578d3Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 425732b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 425832b578d3Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 425932b578d3Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 426032b578d3Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 426132b578d3Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 426232b578d3Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 426332b578d3Smrg _LT_AC_TAGVAR(predeps, $1) \ 426432b578d3Smrg _LT_AC_TAGVAR(postdeps, $1) \ 426532b578d3Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 426632b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 426732b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 426832b578d3Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 426932b578d3Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 427032b578d3Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 427132b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 427232b578d3Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 427332b578d3Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 427432b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 427532b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 427632b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 427732b578d3Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 427832b578d3Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 427932b578d3Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 428032b578d3Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 428132b578d3Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 428232b578d3Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 428332b578d3Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 428432b578d3Smrg 428532b578d3Smrg case $var in 428632b578d3Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 428732b578d3Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 428832b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 428932b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 429032b578d3Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 429132b578d3Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 429232b578d3Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 429332b578d3Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 429432b578d3Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 429532b578d3Smrg postinstall_cmds | postuninstall_cmds | \ 429632b578d3Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 429732b578d3Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 429832b578d3Smrg # Double-quote double-evaled strings. 429932b578d3Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 430032b578d3Smrg ;; 430132b578d3Smrg *) 430232b578d3Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 430332b578d3Smrg ;; 430432b578d3Smrg esac 430532b578d3Smrg done 430632b578d3Smrg 430732b578d3Smrg case $lt_echo in 430832b578d3Smrg *'\[$]0 --fallback-echo"') 430932b578d3Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 431032b578d3Smrg ;; 431132b578d3Smrg esac 431232b578d3Smrg 431332b578d3Smrgifelse([$1], [], 431432b578d3Smrg [cfgfile="${ofile}T" 431532b578d3Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 431632b578d3Smrg $rm -f "$cfgfile" 431732b578d3Smrg AC_MSG_NOTICE([creating $ofile])], 431832b578d3Smrg [cfgfile="$ofile"]) 431932b578d3Smrg 432032b578d3Smrg cat <<__EOF__ >> "$cfgfile" 432132b578d3Smrgifelse([$1], [], 432232b578d3Smrg[#! $SHELL 432332b578d3Smrg 432432b578d3Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 432532b578d3Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 432632b578d3Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 432732b578d3Smrg# 432832b578d3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 432932b578d3Smrg# Free Software Foundation, Inc. 433032b578d3Smrg# 433132b578d3Smrg# This file is part of GNU Libtool: 433232b578d3Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 433332b578d3Smrg# 433432b578d3Smrg# This program is free software; you can redistribute it and/or modify 433532b578d3Smrg# it under the terms of the GNU General Public License as published by 433632b578d3Smrg# the Free Software Foundation; either version 2 of the License, or 433732b578d3Smrg# (at your option) any later version. 433832b578d3Smrg# 433932b578d3Smrg# This program is distributed in the hope that it will be useful, but 434032b578d3Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 434132b578d3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 434232b578d3Smrg# General Public License for more details. 434332b578d3Smrg# 434432b578d3Smrg# You should have received a copy of the GNU General Public License 434532b578d3Smrg# along with this program; if not, write to the Free Software 434632b578d3Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 434732b578d3Smrg# 434832b578d3Smrg# As a special exception to the GNU General Public License, if you 434932b578d3Smrg# distribute this file as part of a program that contains a 435032b578d3Smrg# configuration script generated by Autoconf, you may include it under 435132b578d3Smrg# the same distribution terms that you use for the rest of that program. 435232b578d3Smrg 435332b578d3Smrg# A sed program that does not truncate output. 435432b578d3SmrgSED=$lt_SED 435532b578d3Smrg 435632b578d3Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 435732b578d3SmrgXsed="$SED -e 1s/^X//" 435832b578d3Smrg 435932b578d3Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 436032b578d3Smrg# if CDPATH is set. 436132b578d3Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 436232b578d3Smrg 436332b578d3Smrg# The names of the tagged configurations supported by this script. 436432b578d3Smrgavailable_tags= 436532b578d3Smrg 436632b578d3Smrg# ### BEGIN LIBTOOL CONFIG], 436732b578d3Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 436832b578d3Smrg 436932b578d3Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 437032b578d3Smrg 437132b578d3Smrg# Shell to use when invoking shell scripts. 437232b578d3SmrgSHELL=$lt_SHELL 437332b578d3Smrg 437432b578d3Smrg# Whether or not to build shared libraries. 437532b578d3Smrgbuild_libtool_libs=$enable_shared 437632b578d3Smrg 437732b578d3Smrg# Whether or not to build static libraries. 437832b578d3Smrgbuild_old_libs=$enable_static 437932b578d3Smrg 438032b578d3Smrg# Whether or not to add -lc for building shared libraries. 438132b578d3Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 438232b578d3Smrg 438332b578d3Smrg# Whether or not to disallow shared libs when runtime libs are static 438432b578d3Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 438532b578d3Smrg 438632b578d3Smrg# Whether or not to optimize for fast installation. 438732b578d3Smrgfast_install=$enable_fast_install 438832b578d3Smrg 438932b578d3Smrg# The host system. 439032b578d3Smrghost_alias=$host_alias 439132b578d3Smrghost=$host 439232b578d3Smrghost_os=$host_os 439332b578d3Smrg 439432b578d3Smrg# The build system. 439532b578d3Smrgbuild_alias=$build_alias 439632b578d3Smrgbuild=$build 439732b578d3Smrgbuild_os=$build_os 439832b578d3Smrg 439932b578d3Smrg# An echo program that does not interpret backslashes. 440032b578d3Smrgecho=$lt_echo 440132b578d3Smrg 440232b578d3Smrg# The archiver. 440332b578d3SmrgAR=$lt_AR 440432b578d3SmrgAR_FLAGS=$lt_AR_FLAGS 440532b578d3Smrg 440632b578d3Smrg# A C compiler. 440732b578d3SmrgLTCC=$lt_LTCC 440832b578d3Smrg 440932b578d3Smrg# LTCC compiler flags. 441032b578d3SmrgLTCFLAGS=$lt_LTCFLAGS 441132b578d3Smrg 441232b578d3Smrg# A language-specific compiler. 441332b578d3SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 441432b578d3Smrg 441532b578d3Smrg# Is the compiler the GNU C compiler? 441632b578d3Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 441732b578d3Smrg 441832b578d3Smrg# An ERE matcher. 441932b578d3SmrgEGREP=$lt_EGREP 442032b578d3Smrg 442132b578d3Smrg# The linker used to build libraries. 442232b578d3SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 442332b578d3Smrg 442432b578d3Smrg# Whether we need hard or soft links. 442532b578d3SmrgLN_S=$lt_LN_S 442632b578d3Smrg 442732b578d3Smrg# A BSD-compatible nm program. 442832b578d3SmrgNM=$lt_NM 442932b578d3Smrg 443032b578d3Smrg# A symbol stripping program 443132b578d3SmrgSTRIP=$lt_STRIP 443232b578d3Smrg 443332b578d3Smrg# Used to examine libraries when file_magic_cmd begins "file" 443432b578d3SmrgMAGIC_CMD=$MAGIC_CMD 443532b578d3Smrg 443632b578d3Smrg# Used on cygwin: DLL creation program. 443732b578d3SmrgDLLTOOL="$DLLTOOL" 443832b578d3Smrg 443932b578d3Smrg# Used on cygwin: object dumper. 444032b578d3SmrgOBJDUMP="$OBJDUMP" 444132b578d3Smrg 444232b578d3Smrg# Used on cygwin: assembler. 444332b578d3SmrgAS="$AS" 444432b578d3Smrg 444532b578d3Smrg# The name of the directory that contains temporary libtool files. 444632b578d3Smrgobjdir=$objdir 444732b578d3Smrg 444832b578d3Smrg# How to create reloadable object files. 444932b578d3Smrgreload_flag=$lt_reload_flag 445032b578d3Smrgreload_cmds=$lt_reload_cmds 445132b578d3Smrg 445232b578d3Smrg# How to pass a linker flag through the compiler. 445332b578d3Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 445432b578d3Smrg 445532b578d3Smrg# Object file suffix (normally "o"). 445632b578d3Smrgobjext="$ac_objext" 445732b578d3Smrg 445832b578d3Smrg# Old archive suffix (normally "a"). 445932b578d3Smrglibext="$libext" 446032b578d3Smrg 446132b578d3Smrg# Shared library suffix (normally ".so"). 446232b578d3Smrgshrext_cmds='$shrext_cmds' 446332b578d3Smrg 446432b578d3Smrg# Executable file suffix (normally ""). 446532b578d3Smrgexeext="$exeext" 446632b578d3Smrg 446732b578d3Smrg# Additional compiler flags for building library objects. 446832b578d3Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 446932b578d3Smrgpic_mode=$pic_mode 447032b578d3Smrg 447132b578d3Smrg# What is the maximum length of a command? 447232b578d3Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 447332b578d3Smrg 447432b578d3Smrg# Does compiler simultaneously support -c and -o options? 447532b578d3Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 447632b578d3Smrg 447732b578d3Smrg# Must we lock files when doing compilation? 447832b578d3Smrgneed_locks=$lt_need_locks 447932b578d3Smrg 448032b578d3Smrg# Do we need the lib prefix for modules? 448132b578d3Smrgneed_lib_prefix=$need_lib_prefix 448232b578d3Smrg 448332b578d3Smrg# Do we need a version for libraries? 448432b578d3Smrgneed_version=$need_version 448532b578d3Smrg 448632b578d3Smrg# Whether dlopen is supported. 448732b578d3Smrgdlopen_support=$enable_dlopen 448832b578d3Smrg 448932b578d3Smrg# Whether dlopen of programs is supported. 449032b578d3Smrgdlopen_self=$enable_dlopen_self 449132b578d3Smrg 449232b578d3Smrg# Whether dlopen of statically linked programs is supported. 449332b578d3Smrgdlopen_self_static=$enable_dlopen_self_static 449432b578d3Smrg 449532b578d3Smrg# Compiler flag to prevent dynamic linking. 449632b578d3Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 449732b578d3Smrg 449832b578d3Smrg# Compiler flag to turn off builtin functions. 449932b578d3Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 450032b578d3Smrg 450132b578d3Smrg# Compiler flag to allow reflexive dlopens. 450232b578d3Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 450332b578d3Smrg 450432b578d3Smrg# Compiler flag to generate shared objects directly from archives. 450532b578d3Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 450632b578d3Smrg 450732b578d3Smrg# Compiler flag to generate thread-safe objects. 450832b578d3Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 450932b578d3Smrg 451032b578d3Smrg# Library versioning type. 451132b578d3Smrgversion_type=$version_type 451232b578d3Smrg 451332b578d3Smrg# Format of library name prefix. 451432b578d3Smrglibname_spec=$lt_libname_spec 451532b578d3Smrg 451632b578d3Smrg# List of archive names. First name is the real one, the rest are links. 451732b578d3Smrg# The last name is the one that the linker finds with -lNAME. 451832b578d3Smrglibrary_names_spec=$lt_library_names_spec 451932b578d3Smrg 452032b578d3Smrg# The coded name of the library, if different from the real name. 452132b578d3Smrgsoname_spec=$lt_soname_spec 452232b578d3Smrg 452332b578d3Smrg# Commands used to build and install an old-style archive. 452432b578d3SmrgRANLIB=$lt_RANLIB 452532b578d3Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 452632b578d3Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 452732b578d3Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 452832b578d3Smrg 452932b578d3Smrg# Create an old-style archive from a shared archive. 453032b578d3Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 453132b578d3Smrg 453232b578d3Smrg# Create a temporary old-style archive to link instead of a shared archive. 453332b578d3Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 453432b578d3Smrg 453532b578d3Smrg# Commands used to build and install a shared archive. 453632b578d3Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 453732b578d3Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 453832b578d3Smrgpostinstall_cmds=$lt_postinstall_cmds 453932b578d3Smrgpostuninstall_cmds=$lt_postuninstall_cmds 454032b578d3Smrg 454132b578d3Smrg# Commands used to build a loadable module (assumed same as above if empty) 454232b578d3Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 454332b578d3Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 454432b578d3Smrg 454532b578d3Smrg# Commands to strip libraries. 454632b578d3Smrgold_striplib=$lt_old_striplib 454732b578d3Smrgstriplib=$lt_striplib 454832b578d3Smrg 454932b578d3Smrg# Dependencies to place before the objects being linked to create a 455032b578d3Smrg# shared library. 455132b578d3Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 455232b578d3Smrg 455332b578d3Smrg# Dependencies to place after the objects being linked to create a 455432b578d3Smrg# shared library. 455532b578d3Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 455632b578d3Smrg 455732b578d3Smrg# Dependencies to place before the objects being linked to create a 455832b578d3Smrg# shared library. 455932b578d3Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 456032b578d3Smrg 456132b578d3Smrg# Dependencies to place after the objects being linked to create a 456232b578d3Smrg# shared library. 456332b578d3Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 456432b578d3Smrg 456532b578d3Smrg# The library search path used internally by the compiler when linking 456632b578d3Smrg# a shared library. 456732b578d3Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 456832b578d3Smrg 456932b578d3Smrg# Method to check whether dependent libraries are shared objects. 457032b578d3Smrgdeplibs_check_method=$lt_deplibs_check_method 457132b578d3Smrg 457232b578d3Smrg# Command to use when deplibs_check_method == file_magic. 457332b578d3Smrgfile_magic_cmd=$lt_file_magic_cmd 457432b578d3Smrg 457532b578d3Smrg# Flag that allows shared libraries with undefined symbols to be built. 457632b578d3Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 457732b578d3Smrg 457832b578d3Smrg# Flag that forces no undefined symbols. 457932b578d3Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 458032b578d3Smrg 458132b578d3Smrg# Commands used to finish a libtool library installation in a directory. 458232b578d3Smrgfinish_cmds=$lt_finish_cmds 458332b578d3Smrg 458432b578d3Smrg# Same as above, but a single script fragment to be evaled but not shown. 458532b578d3Smrgfinish_eval=$lt_finish_eval 458632b578d3Smrg 458732b578d3Smrg# Take the output of nm and produce a listing of raw symbols and C names. 458832b578d3Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 458932b578d3Smrg 459032b578d3Smrg# Transform the output of nm in a proper C declaration 459132b578d3Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 459232b578d3Smrg 459332b578d3Smrg# Transform the output of nm in a C name address pair 459432b578d3Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 459532b578d3Smrg 459632b578d3Smrg# This is the shared library runtime path variable. 459732b578d3Smrgrunpath_var=$runpath_var 459832b578d3Smrg 459932b578d3Smrg# This is the shared library path variable. 460032b578d3Smrgshlibpath_var=$shlibpath_var 460132b578d3Smrg 460232b578d3Smrg# Is shlibpath searched before the hard-coded library search path? 460332b578d3Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 460432b578d3Smrg 460532b578d3Smrg# How to hardcode a shared library path into an executable. 460632b578d3Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 460732b578d3Smrg 460832b578d3Smrg# Whether we should hardcode library paths into libraries. 460932b578d3Smrghardcode_into_libs=$hardcode_into_libs 461032b578d3Smrg 461132b578d3Smrg# Flag to hardcode \$libdir into a binary during linking. 461232b578d3Smrg# This must work even if \$libdir does not exist. 461332b578d3Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 461432b578d3Smrg 461532b578d3Smrg# If ld is used when linking, flag to hardcode \$libdir into 461632b578d3Smrg# a binary during linking. This must work even if \$libdir does 461732b578d3Smrg# not exist. 461832b578d3Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 461932b578d3Smrg 462032b578d3Smrg# Whether we need a single -rpath flag with a separated argument. 462132b578d3Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 462232b578d3Smrg 462332b578d3Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 462432b578d3Smrg# resulting binary. 462532b578d3Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 462632b578d3Smrg 462732b578d3Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 462832b578d3Smrg# resulting binary. 462932b578d3Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 463032b578d3Smrg 463132b578d3Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 463232b578d3Smrg# the resulting binary. 463332b578d3Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 463432b578d3Smrg 463532b578d3Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 463632b578d3Smrg# and all subsequent libraries and executables linked against it. 463732b578d3Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 463832b578d3Smrg 463932b578d3Smrg# Variables whose values should be saved in libtool wrapper scripts and 464032b578d3Smrg# restored at relink time. 464132b578d3Smrgvariables_saved_for_relink="$variables_saved_for_relink" 464232b578d3Smrg 464332b578d3Smrg# Whether libtool must link a program against all its dependency libraries. 464432b578d3Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 464532b578d3Smrg 464632b578d3Smrg# Compile-time system search path for libraries 464732b578d3Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 464832b578d3Smrg 464932b578d3Smrg# Run-time system search path for libraries 465032b578d3Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 465132b578d3Smrg 465232b578d3Smrg# Fix the shell variable \$srcfile for the compiler. 465332b578d3Smrgfix_srcfile_path=$lt_fix_srcfile_path 465432b578d3Smrg 465532b578d3Smrg# Set to yes if exported symbols are required. 465632b578d3Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 465732b578d3Smrg 465832b578d3Smrg# The commands to list exported symbols. 465932b578d3Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 466032b578d3Smrg 466132b578d3Smrg# The commands to extract the exported symbol list from a shared archive. 466232b578d3Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 466332b578d3Smrg 466432b578d3Smrg# Symbols that should not be listed in the preloaded symbols. 466532b578d3Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 466632b578d3Smrg 466732b578d3Smrg# Symbols that must always be exported. 466832b578d3Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 466932b578d3Smrg 467032b578d3Smrgifelse([$1],[], 467132b578d3Smrg[# ### END LIBTOOL CONFIG], 467232b578d3Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 467332b578d3Smrg 467432b578d3Smrg__EOF__ 467532b578d3Smrg 467632b578d3Smrgifelse([$1],[], [ 467732b578d3Smrg case $host_os in 467832b578d3Smrg aix3*) 467932b578d3Smrg cat <<\EOF >> "$cfgfile" 468032b578d3Smrg 468132b578d3Smrg# AIX sometimes has problems with the GCC collect2 program. For some 468232b578d3Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 468332b578d3Smrg# vanish in a puff of smoke. 468432b578d3Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 468532b578d3Smrg COLLECT_NAMES= 468632b578d3Smrg export COLLECT_NAMES 468732b578d3Smrgfi 468832b578d3SmrgEOF 468932b578d3Smrg ;; 469032b578d3Smrg esac 469132b578d3Smrg 469232b578d3Smrg # We use sed instead of cat because bash on DJGPP gets confused if 469332b578d3Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 469432b578d3Smrg # text mode, it properly converts lines to CR/LF. This bash problem 469532b578d3Smrg # is reportedly fixed, but why not run on old versions too? 469632b578d3Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 469732b578d3Smrg 469832b578d3Smrg mv -f "$cfgfile" "$ofile" || \ 469932b578d3Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 470032b578d3Smrg chmod +x "$ofile" 470132b578d3Smrg]) 470232b578d3Smrgelse 470332b578d3Smrg # If there is no Makefile yet, we rely on a make rule to execute 470432b578d3Smrg # `config.status --recheck' to rerun these tests and create the 470532b578d3Smrg # libtool script then. 470632b578d3Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 470732b578d3Smrg if test -f "$ltmain_in"; then 470832b578d3Smrg test -f Makefile && make "$ltmain" 470932b578d3Smrg fi 471032b578d3Smrgfi 471132b578d3Smrg])# AC_LIBTOOL_CONFIG 471232b578d3Smrg 471332b578d3Smrg 471432b578d3Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 471532b578d3Smrg# ------------------------------------------- 471632b578d3SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 471732b578d3Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 471832b578d3Smrg 471932b578d3Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 472032b578d3Smrg 472132b578d3Smrgif test "$GCC" = yes; then 472232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 472332b578d3Smrg 472432b578d3Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 472532b578d3Smrg lt_cv_prog_compiler_rtti_exceptions, 472632b578d3Smrg [-fno-rtti -fno-exceptions], [], 472732b578d3Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 472832b578d3Smrgfi 472932b578d3Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 473032b578d3Smrg 473132b578d3Smrg 473232b578d3Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 473332b578d3Smrg# --------------------------------- 473432b578d3SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 473532b578d3Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 473632b578d3SmrgAC_REQUIRE([LT_AC_PROG_SED]) 473732b578d3SmrgAC_REQUIRE([AC_PROG_NM]) 473832b578d3SmrgAC_REQUIRE([AC_OBJEXT]) 473932b578d3Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 474032b578d3SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 474132b578d3SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 474232b578d3Smrg[ 474332b578d3Smrg# These are sane defaults that work on at least a few old systems. 474432b578d3Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 474532b578d3Smrg 474632b578d3Smrg# Character class describing NM global symbol codes. 474732b578d3Smrgsymcode='[[BCDEGRST]]' 474832b578d3Smrg 474932b578d3Smrg# Regexp to match symbols that can be accessed directly from C. 475032b578d3Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 475132b578d3Smrg 475232b578d3Smrg# Transform an extracted symbol line into a proper C declaration 475332b578d3Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 475432b578d3Smrg 475532b578d3Smrg# Transform an extracted symbol line into symbol name and symbol address 475632b578d3Smrglt_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'" 475732b578d3Smrg 475832b578d3Smrg# Define system-specific variables. 475932b578d3Smrgcase $host_os in 476032b578d3Smrgaix*) 476132b578d3Smrg symcode='[[BCDT]]' 476232b578d3Smrg ;; 476332b578d3Smrgcygwin* | mingw* | pw32*) 476432b578d3Smrg symcode='[[ABCDGISTW]]' 476532b578d3Smrg ;; 476632b578d3Smrghpux*) # Its linker distinguishes data from code symbols 476732b578d3Smrg if test "$host_cpu" = ia64; then 476832b578d3Smrg symcode='[[ABCDEGRST]]' 476932b578d3Smrg fi 477032b578d3Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 477132b578d3Smrg 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'" 477232b578d3Smrg ;; 477332b578d3Smrglinux* | k*bsd*-gnu) 477432b578d3Smrg if test "$host_cpu" = ia64; then 477532b578d3Smrg symcode='[[ABCDGIRSTW]]' 477632b578d3Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 477732b578d3Smrg 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'" 477832b578d3Smrg fi 477932b578d3Smrg ;; 478032b578d3Smrgirix* | nonstopux*) 478132b578d3Smrg symcode='[[BCDEGRST]]' 478232b578d3Smrg ;; 478332b578d3Smrgosf*) 478432b578d3Smrg symcode='[[BCDEGQRST]]' 478532b578d3Smrg ;; 478632b578d3Smrgsolaris*) 478732b578d3Smrg symcode='[[BDRT]]' 478832b578d3Smrg ;; 478932b578d3Smrgsco3.2v5*) 479032b578d3Smrg symcode='[[DT]]' 479132b578d3Smrg ;; 479232b578d3Smrgsysv4.2uw2*) 479332b578d3Smrg symcode='[[DT]]' 479432b578d3Smrg ;; 479532b578d3Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 479632b578d3Smrg symcode='[[ABDT]]' 479732b578d3Smrg ;; 479832b578d3Smrgsysv4) 479932b578d3Smrg symcode='[[DFNSTU]]' 480032b578d3Smrg ;; 480132b578d3Smrgesac 480232b578d3Smrg 480332b578d3Smrg# Handle CRLF in mingw tool chain 480432b578d3Smrgopt_cr= 480532b578d3Smrgcase $build_os in 480632b578d3Smrgmingw*) 480732b578d3Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 480832b578d3Smrg ;; 480932b578d3Smrgesac 481032b578d3Smrg 481132b578d3Smrg# If we're using GNU nm, then use its standard symbol codes. 481232b578d3Smrgcase `$NM -V 2>&1` in 481332b578d3Smrg*GNU* | *'with BFD'*) 481432b578d3Smrg symcode='[[ABCDGIRSTW]]' ;; 481532b578d3Smrgesac 481632b578d3Smrg 481732b578d3Smrg# Try without a prefix undercore, then with it. 481832b578d3Smrgfor ac_symprfx in "" "_"; do 481932b578d3Smrg 482032b578d3Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 482132b578d3Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 482232b578d3Smrg 482332b578d3Smrg # Write the raw and C identifiers. 482432b578d3Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 482532b578d3Smrg 482632b578d3Smrg # Check to see that the pipe works correctly. 482732b578d3Smrg pipe_works=no 482832b578d3Smrg 482932b578d3Smrg rm -f conftest* 483032b578d3Smrg cat > conftest.$ac_ext <<EOF 483132b578d3Smrg#ifdef __cplusplus 483232b578d3Smrgextern "C" { 483332b578d3Smrg#endif 483432b578d3Smrgchar nm_test_var; 483532b578d3Smrgvoid nm_test_func(){} 483632b578d3Smrg#ifdef __cplusplus 483732b578d3Smrg} 483832b578d3Smrg#endif 483932b578d3Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 484032b578d3SmrgEOF 484132b578d3Smrg 484232b578d3Smrg if AC_TRY_EVAL(ac_compile); then 484332b578d3Smrg # Now try to grab the symbols. 484432b578d3Smrg nlist=conftest.nm 484532b578d3Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 484632b578d3Smrg # Try sorting and uniquifying the output. 484732b578d3Smrg if sort "$nlist" | uniq > "$nlist"T; then 484832b578d3Smrg mv -f "$nlist"T "$nlist" 484932b578d3Smrg else 485032b578d3Smrg rm -f "$nlist"T 485132b578d3Smrg fi 485232b578d3Smrg 485332b578d3Smrg # Make sure that we snagged all the symbols we need. 485432b578d3Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 485532b578d3Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 485632b578d3Smrg cat <<EOF > conftest.$ac_ext 485732b578d3Smrg#ifdef __cplusplus 485832b578d3Smrgextern "C" { 485932b578d3Smrg#endif 486032b578d3Smrg 486132b578d3SmrgEOF 486232b578d3Smrg # Now generate the symbol file. 486332b578d3Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 486432b578d3Smrg 486532b578d3Smrg cat <<EOF >> conftest.$ac_ext 486632b578d3Smrg#if defined (__STDC__) && __STDC__ 486732b578d3Smrg# define lt_ptr_t void * 486832b578d3Smrg#else 486932b578d3Smrg# define lt_ptr_t char * 487032b578d3Smrg# define const 487132b578d3Smrg#endif 487232b578d3Smrg 487332b578d3Smrg/* The mapping between symbol names and symbols. */ 487432b578d3Smrgconst struct { 487532b578d3Smrg const char *name; 487632b578d3Smrg lt_ptr_t address; 487732b578d3Smrg} 487832b578d3Smrglt_preloaded_symbols[[]] = 487932b578d3Smrg{ 488032b578d3SmrgEOF 488132b578d3Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 488232b578d3Smrg cat <<\EOF >> conftest.$ac_ext 488332b578d3Smrg {0, (lt_ptr_t) 0} 488432b578d3Smrg}; 488532b578d3Smrg 488632b578d3Smrg#ifdef __cplusplus 488732b578d3Smrg} 488832b578d3Smrg#endif 488932b578d3SmrgEOF 489032b578d3Smrg # Now try linking the two files. 489132b578d3Smrg mv conftest.$ac_objext conftstm.$ac_objext 489232b578d3Smrg lt_save_LIBS="$LIBS" 489332b578d3Smrg lt_save_CFLAGS="$CFLAGS" 489432b578d3Smrg LIBS="conftstm.$ac_objext" 489532b578d3Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 489632b578d3Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 489732b578d3Smrg pipe_works=yes 489832b578d3Smrg fi 489932b578d3Smrg LIBS="$lt_save_LIBS" 490032b578d3Smrg CFLAGS="$lt_save_CFLAGS" 490132b578d3Smrg else 490232b578d3Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 490332b578d3Smrg fi 490432b578d3Smrg else 490532b578d3Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 490632b578d3Smrg fi 490732b578d3Smrg else 490832b578d3Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 490932b578d3Smrg fi 491032b578d3Smrg else 491132b578d3Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 491232b578d3Smrg cat conftest.$ac_ext >&5 491332b578d3Smrg fi 491432b578d3Smrg rm -f conftest* conftst* 491532b578d3Smrg 491632b578d3Smrg # Do not use the global_symbol_pipe unless it works. 491732b578d3Smrg if test "$pipe_works" = yes; then 491832b578d3Smrg break 491932b578d3Smrg else 492032b578d3Smrg lt_cv_sys_global_symbol_pipe= 492132b578d3Smrg fi 492232b578d3Smrgdone 492332b578d3Smrg]) 492432b578d3Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 492532b578d3Smrg lt_cv_sys_global_symbol_to_cdecl= 492632b578d3Smrgfi 492732b578d3Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 492832b578d3Smrg AC_MSG_RESULT(failed) 492932b578d3Smrgelse 493032b578d3Smrg AC_MSG_RESULT(ok) 493132b578d3Smrgfi 493232b578d3Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 493332b578d3Smrg 493432b578d3Smrg 493532b578d3Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 493632b578d3Smrg# --------------------------------------- 493732b578d3SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 493832b578d3Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 493932b578d3Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 494032b578d3Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 494132b578d3Smrg 494232b578d3SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 494332b578d3Smrg ifelse([$1],[CXX],[ 494432b578d3Smrg # C++ specific cases for pic, static, wl, etc. 494532b578d3Smrg if test "$GXX" = yes; then 494632b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 494732b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 494832b578d3Smrg 494932b578d3Smrg case $host_os in 495032b578d3Smrg aix*) 495132b578d3Smrg # All AIX code is PIC. 495232b578d3Smrg if test "$host_cpu" = ia64; then 495332b578d3Smrg # AIX 5 now supports IA64 processor 495432b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 495532b578d3Smrg fi 495632b578d3Smrg ;; 495732b578d3Smrg amigaos*) 495832b578d3Smrg # FIXME: we need at least 68020 code to build shared libraries, but 495932b578d3Smrg # adding the `-m68020' flag to GCC prevents building anything better, 496032b578d3Smrg # like `-m68040'. 496132b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 496232b578d3Smrg ;; 496332b578d3Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 496432b578d3Smrg # PIC is the default for these OSes. 496532b578d3Smrg ;; 496632b578d3Smrg mingw* | cygwin* | os2* | pw32*) 496732b578d3Smrg # This hack is so that the source file can tell whether it is being 496832b578d3Smrg # built for inclusion in a dll (and should export symbols for example). 496932b578d3Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 497032b578d3Smrg # (--disable-auto-import) libraries 497132b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 497232b578d3Smrg ;; 497332b578d3Smrg darwin* | rhapsody*) 497432b578d3Smrg # PIC is the default on this platform 497532b578d3Smrg # Common symbols not allowed in MH_DYLIB files 497632b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 497732b578d3Smrg ;; 497832b578d3Smrg *djgpp*) 497932b578d3Smrg # DJGPP does not support shared libraries at all 498032b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 498132b578d3Smrg ;; 498232b578d3Smrg interix[[3-9]]*) 498332b578d3Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 498432b578d3Smrg # Instead, we relocate shared libraries at runtime. 498532b578d3Smrg ;; 498632b578d3Smrg sysv4*MP*) 498732b578d3Smrg if test -d /usr/nec; then 498832b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 498932b578d3Smrg fi 499032b578d3Smrg ;; 499132b578d3Smrg hpux*) 499232b578d3Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 499332b578d3Smrg # not for PA HP-UX. 499432b578d3Smrg case $host_cpu in 499532b578d3Smrg hppa*64*|ia64*) 499632b578d3Smrg ;; 499732b578d3Smrg *) 499832b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 499932b578d3Smrg ;; 500032b578d3Smrg esac 500132b578d3Smrg ;; 500232b578d3Smrg *) 500332b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 500432b578d3Smrg ;; 500532b578d3Smrg esac 500632b578d3Smrg else 500732b578d3Smrg case $host_os in 500832b578d3Smrg aix4* | aix5*) 500932b578d3Smrg # All AIX code is PIC. 501032b578d3Smrg if test "$host_cpu" = ia64; then 501132b578d3Smrg # AIX 5 now supports IA64 processor 501232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 501332b578d3Smrg else 501432b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 501532b578d3Smrg fi 501632b578d3Smrg ;; 501732b578d3Smrg chorus*) 501832b578d3Smrg case $cc_basename in 501932b578d3Smrg cxch68*) 502032b578d3Smrg # Green Hills C++ Compiler 502132b578d3Smrg # _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" 502232b578d3Smrg ;; 502332b578d3Smrg esac 502432b578d3Smrg ;; 502532b578d3Smrg darwin*) 502632b578d3Smrg # PIC is the default on this platform 502732b578d3Smrg # Common symbols not allowed in MH_DYLIB files 502832b578d3Smrg case $cc_basename in 502932b578d3Smrg xlc*) 503032b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 503132b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 503232b578d3Smrg ;; 503332b578d3Smrg esac 503432b578d3Smrg ;; 503532b578d3Smrg dgux*) 503632b578d3Smrg case $cc_basename in 503732b578d3Smrg ec++*) 503832b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 503932b578d3Smrg ;; 504032b578d3Smrg ghcx*) 504132b578d3Smrg # Green Hills C++ Compiler 504232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 504332b578d3Smrg ;; 504432b578d3Smrg *) 504532b578d3Smrg ;; 504632b578d3Smrg esac 504732b578d3Smrg ;; 504832b578d3Smrg freebsd* | dragonfly*) 504932b578d3Smrg # FreeBSD uses GNU C++ 505032b578d3Smrg ;; 505132b578d3Smrg hpux9* | hpux10* | hpux11*) 505232b578d3Smrg case $cc_basename in 505332b578d3Smrg CC*) 505432b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 505532b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 505632b578d3Smrg if test "$host_cpu" != ia64; then 505732b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 505832b578d3Smrg fi 505932b578d3Smrg ;; 506032b578d3Smrg aCC*) 506132b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 506232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 506332b578d3Smrg case $host_cpu in 506432b578d3Smrg hppa*64*|ia64*) 506532b578d3Smrg # +Z the default 506632b578d3Smrg ;; 506732b578d3Smrg *) 506832b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 506932b578d3Smrg ;; 507032b578d3Smrg esac 507132b578d3Smrg ;; 507232b578d3Smrg *) 507332b578d3Smrg ;; 507432b578d3Smrg esac 507532b578d3Smrg ;; 507632b578d3Smrg interix*) 507732b578d3Smrg # This is c89, which is MS Visual C++ (no shared libs) 507832b578d3Smrg # Anyone wants to do a port? 507932b578d3Smrg ;; 508032b578d3Smrg irix5* | irix6* | nonstopux*) 508132b578d3Smrg case $cc_basename in 508232b578d3Smrg CC*) 508332b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 508432b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 508532b578d3Smrg # CC pic flag -KPIC is the default. 508632b578d3Smrg ;; 508732b578d3Smrg *) 508832b578d3Smrg ;; 508932b578d3Smrg esac 509032b578d3Smrg ;; 509132b578d3Smrg linux* | k*bsd*-gnu) 509232b578d3Smrg case $cc_basename in 509332b578d3Smrg KCC*) 509432b578d3Smrg # KAI C++ Compiler 509532b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 509632b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 509732b578d3Smrg ;; 509832b578d3Smrg icpc* | ecpc*) 509932b578d3Smrg # Intel C++ 510032b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 510132b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 510232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 510332b578d3Smrg ;; 510432b578d3Smrg pgCC*) 510532b578d3Smrg # Portland Group C++ compiler. 510632b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 510732b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 510832b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 510932b578d3Smrg ;; 511032b578d3Smrg cxx*) 511132b578d3Smrg # Compaq C++ 511232b578d3Smrg # Make sure the PIC flag is empty. It appears that all Alpha 511332b578d3Smrg # Linux and Compaq Tru64 Unix objects are PIC. 511432b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 511532b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 511632b578d3Smrg ;; 511732b578d3Smrg *) 511832b578d3Smrg case `$CC -V 2>&1 | sed 5q` in 511932b578d3Smrg *Sun\ C*) 512032b578d3Smrg # Sun C++ 5.9 512132b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 512232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 512332b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 512432b578d3Smrg ;; 512532b578d3Smrg esac 512632b578d3Smrg ;; 512732b578d3Smrg esac 512832b578d3Smrg ;; 512932b578d3Smrg lynxos*) 513032b578d3Smrg ;; 513132b578d3Smrg m88k*) 513232b578d3Smrg ;; 513332b578d3Smrg mvs*) 513432b578d3Smrg case $cc_basename in 513532b578d3Smrg cxx*) 513632b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 513732b578d3Smrg ;; 513832b578d3Smrg *) 513932b578d3Smrg ;; 514032b578d3Smrg esac 514132b578d3Smrg ;; 514232b578d3Smrg netbsd*) 514332b578d3Smrg ;; 514432b578d3Smrg osf3* | osf4* | osf5*) 514532b578d3Smrg case $cc_basename in 514632b578d3Smrg KCC*) 514732b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 514832b578d3Smrg ;; 514932b578d3Smrg RCC*) 515032b578d3Smrg # Rational C++ 2.4.1 515132b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 515232b578d3Smrg ;; 515332b578d3Smrg cxx*) 515432b578d3Smrg # Digital/Compaq C++ 515532b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 515632b578d3Smrg # Make sure the PIC flag is empty. It appears that all Alpha 515732b578d3Smrg # Linux and Compaq Tru64 Unix objects are PIC. 515832b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 515932b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 516032b578d3Smrg ;; 516132b578d3Smrg *) 516232b578d3Smrg ;; 516332b578d3Smrg esac 516432b578d3Smrg ;; 516532b578d3Smrg psos*) 516632b578d3Smrg ;; 516732b578d3Smrg solaris*) 516832b578d3Smrg case $cc_basename in 516932b578d3Smrg CC*) 517032b578d3Smrg # Sun C++ 4.2, 5.x and Centerline C++ 517132b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 517232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 517332b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 517432b578d3Smrg ;; 517532b578d3Smrg gcx*) 517632b578d3Smrg # Green Hills C++ Compiler 517732b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 517832b578d3Smrg ;; 517932b578d3Smrg *) 518032b578d3Smrg ;; 518132b578d3Smrg esac 518232b578d3Smrg ;; 518332b578d3Smrg sunos4*) 518432b578d3Smrg case $cc_basename in 518532b578d3Smrg CC*) 518632b578d3Smrg # Sun C++ 4.x 518732b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 518832b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 518932b578d3Smrg ;; 519032b578d3Smrg lcc*) 519132b578d3Smrg # Lucid 519232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 519332b578d3Smrg ;; 519432b578d3Smrg *) 519532b578d3Smrg ;; 519632b578d3Smrg esac 519732b578d3Smrg ;; 519832b578d3Smrg tandem*) 519932b578d3Smrg case $cc_basename in 520032b578d3Smrg NCC*) 520132b578d3Smrg # NonStop-UX NCC 3.20 520232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 520332b578d3Smrg ;; 520432b578d3Smrg *) 520532b578d3Smrg ;; 520632b578d3Smrg esac 520732b578d3Smrg ;; 520832b578d3Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 520932b578d3Smrg case $cc_basename in 521032b578d3Smrg CC*) 521132b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 521232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 521332b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 521432b578d3Smrg ;; 521532b578d3Smrg esac 521632b578d3Smrg ;; 521732b578d3Smrg vxworks*) 521832b578d3Smrg ;; 521932b578d3Smrg *) 522032b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 522132b578d3Smrg ;; 522232b578d3Smrg esac 522332b578d3Smrg fi 522432b578d3Smrg], 522532b578d3Smrg[ 522632b578d3Smrg if test "$GCC" = yes; then 522732b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 522832b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 522932b578d3Smrg 523032b578d3Smrg case $host_os in 523132b578d3Smrg aix*) 523232b578d3Smrg # All AIX code is PIC. 523332b578d3Smrg if test "$host_cpu" = ia64; then 523432b578d3Smrg # AIX 5 now supports IA64 processor 523532b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 523632b578d3Smrg fi 523732b578d3Smrg ;; 523832b578d3Smrg 523932b578d3Smrg amigaos*) 524032b578d3Smrg # FIXME: we need at least 68020 code to build shared libraries, but 524132b578d3Smrg # adding the `-m68020' flag to GCC prevents building anything better, 524232b578d3Smrg # like `-m68040'. 524332b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 524432b578d3Smrg ;; 524532b578d3Smrg 524632b578d3Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 524732b578d3Smrg # PIC is the default for these OSes. 524832b578d3Smrg ;; 524932b578d3Smrg 525032b578d3Smrg mingw* | cygwin* | pw32* | os2*) 525132b578d3Smrg # This hack is so that the source file can tell whether it is being 525232b578d3Smrg # built for inclusion in a dll (and should export symbols for example). 525332b578d3Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 525432b578d3Smrg # (--disable-auto-import) libraries 525532b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 525632b578d3Smrg ;; 525732b578d3Smrg 525832b578d3Smrg darwin* | rhapsody*) 525932b578d3Smrg # PIC is the default on this platform 526032b578d3Smrg # Common symbols not allowed in MH_DYLIB files 526132b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 526232b578d3Smrg ;; 526332b578d3Smrg 526432b578d3Smrg interix[[3-9]]*) 526532b578d3Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 526632b578d3Smrg # Instead, we relocate shared libraries at runtime. 526732b578d3Smrg ;; 526832b578d3Smrg 526932b578d3Smrg msdosdjgpp*) 527032b578d3Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 527132b578d3Smrg # on systems that don't support them. 527232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 527332b578d3Smrg enable_shared=no 527432b578d3Smrg ;; 527532b578d3Smrg 527632b578d3Smrg sysv4*MP*) 527732b578d3Smrg if test -d /usr/nec; then 527832b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 527932b578d3Smrg fi 528032b578d3Smrg ;; 528132b578d3Smrg 528232b578d3Smrg hpux*) 528332b578d3Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 528432b578d3Smrg # not for PA HP-UX. 528532b578d3Smrg case $host_cpu in 528632b578d3Smrg hppa*64*|ia64*) 528732b578d3Smrg # +Z the default 528832b578d3Smrg ;; 528932b578d3Smrg *) 529032b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 529132b578d3Smrg ;; 529232b578d3Smrg esac 529332b578d3Smrg ;; 529432b578d3Smrg 529532b578d3Smrg *) 529632b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 529732b578d3Smrg ;; 529832b578d3Smrg esac 529932b578d3Smrg else 530032b578d3Smrg # PORTME Check for flag to pass linker flags through the system compiler. 530132b578d3Smrg case $host_os in 530232b578d3Smrg aix*) 530332b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 530432b578d3Smrg if test "$host_cpu" = ia64; then 530532b578d3Smrg # AIX 5 now supports IA64 processor 530632b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 530732b578d3Smrg else 530832b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 530932b578d3Smrg fi 531032b578d3Smrg ;; 531132b578d3Smrg darwin*) 531232b578d3Smrg # PIC is the default on this platform 531332b578d3Smrg # Common symbols not allowed in MH_DYLIB files 531432b578d3Smrg case $cc_basename in 531532b578d3Smrg xlc*) 531632b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 531732b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 531832b578d3Smrg ;; 531932b578d3Smrg esac 532032b578d3Smrg ;; 532132b578d3Smrg 532232b578d3Smrg mingw* | cygwin* | pw32* | os2*) 532332b578d3Smrg # This hack is so that the source file can tell whether it is being 532432b578d3Smrg # built for inclusion in a dll (and should export symbols for example). 532532b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 532632b578d3Smrg ;; 532732b578d3Smrg 532832b578d3Smrg hpux9* | hpux10* | hpux11*) 532932b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 533032b578d3Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 533132b578d3Smrg # not for PA HP-UX. 533232b578d3Smrg case $host_cpu in 533332b578d3Smrg hppa*64*|ia64*) 533432b578d3Smrg # +Z the default 533532b578d3Smrg ;; 533632b578d3Smrg *) 533732b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 533832b578d3Smrg ;; 533932b578d3Smrg esac 534032b578d3Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 534132b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 534232b578d3Smrg ;; 534332b578d3Smrg 534432b578d3Smrg irix5* | irix6* | nonstopux*) 534532b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 534632b578d3Smrg # PIC (with -KPIC) is the default. 534732b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 534832b578d3Smrg ;; 534932b578d3Smrg 535032b578d3Smrg newsos6) 535132b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 535232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 535332b578d3Smrg ;; 535432b578d3Smrg 535532b578d3Smrg linux* | k*bsd*-gnu) 535632b578d3Smrg case $cc_basename in 535732b578d3Smrg icc* | ecc*) 535832b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 535932b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 536032b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 536132b578d3Smrg ;; 536232b578d3Smrg pgcc* | pgf77* | pgf90* | pgf95*) 536332b578d3Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 536432b578d3Smrg # which looks to be a dead project) 536532b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 536632b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 536732b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 536832b578d3Smrg ;; 536932b578d3Smrg ccc*) 537032b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 537132b578d3Smrg # All Alpha code is PIC. 537232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 537332b578d3Smrg ;; 537432b578d3Smrg *) 537532b578d3Smrg case `$CC -V 2>&1 | sed 5q` in 537632b578d3Smrg *Sun\ C*) 537732b578d3Smrg # Sun C 5.9 537832b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 537932b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 538032b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 538132b578d3Smrg ;; 538232b578d3Smrg *Sun\ F*) 538332b578d3Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 538432b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 538532b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 538632b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 538732b578d3Smrg ;; 538832b578d3Smrg esac 538932b578d3Smrg ;; 539032b578d3Smrg esac 539132b578d3Smrg ;; 539232b578d3Smrg 539332b578d3Smrg osf3* | osf4* | osf5*) 539432b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 539532b578d3Smrg # All OSF/1 code is PIC. 539632b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 539732b578d3Smrg ;; 539832b578d3Smrg 539932b578d3Smrg rdos*) 540032b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 540132b578d3Smrg ;; 540232b578d3Smrg 540332b578d3Smrg solaris*) 540432b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 540532b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 540632b578d3Smrg case $cc_basename in 540732b578d3Smrg f77* | f90* | f95*) 540832b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 540932b578d3Smrg *) 541032b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 541132b578d3Smrg esac 541232b578d3Smrg ;; 541332b578d3Smrg 541432b578d3Smrg sunos4*) 541532b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 541632b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 541732b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 541832b578d3Smrg ;; 541932b578d3Smrg 542032b578d3Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 542132b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 542232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 542332b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 542432b578d3Smrg ;; 542532b578d3Smrg 542632b578d3Smrg sysv4*MP*) 542732b578d3Smrg if test -d /usr/nec ;then 542832b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 542932b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 543032b578d3Smrg fi 543132b578d3Smrg ;; 543232b578d3Smrg 543332b578d3Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 543432b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 543532b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 543632b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 543732b578d3Smrg ;; 543832b578d3Smrg 543932b578d3Smrg unicos*) 544032b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 544132b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 544232b578d3Smrg ;; 544332b578d3Smrg 544432b578d3Smrg uts4*) 544532b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 544632b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 544732b578d3Smrg ;; 544832b578d3Smrg 544932b578d3Smrg *) 545032b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 545132b578d3Smrg ;; 545232b578d3Smrg esac 545332b578d3Smrg fi 545432b578d3Smrg]) 545532b578d3SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 545632b578d3Smrg 545732b578d3Smrg# 545832b578d3Smrg# Check to make sure the PIC flag actually works. 545932b578d3Smrg# 546032b578d3Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 546132b578d3Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 546232b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 546332b578d3Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 546432b578d3Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 546532b578d3Smrg "" | " "*) ;; 546632b578d3Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 546732b578d3Smrg esac], 546832b578d3Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 546932b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 547032b578d3Smrgfi 547132b578d3Smrgcase $host_os in 547232b578d3Smrg # For platforms which do not support PIC, -DPIC is meaningless: 547332b578d3Smrg *djgpp*) 547432b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 547532b578d3Smrg ;; 547632b578d3Smrg *) 547732b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 547832b578d3Smrg ;; 547932b578d3Smrgesac 548032b578d3Smrg 548132b578d3Smrg# 548232b578d3Smrg# Check to make sure the static flag actually works. 548332b578d3Smrg# 548432b578d3Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 548532b578d3SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 548632b578d3Smrg _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 548732b578d3Smrg $lt_tmp_static_flag, 548832b578d3Smrg [], 548932b578d3Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 549032b578d3Smrg]) 549132b578d3Smrg 549232b578d3Smrg 549332b578d3Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 549432b578d3Smrg# ------------------------------------ 549532b578d3Smrg# See if the linker supports building shared libraries. 549632b578d3SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 549732b578d3Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 549832b578d3SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 549932b578d3Smrgifelse([$1],[CXX],[ 550032b578d3Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 550132b578d3Smrg case $host_os in 550232b578d3Smrg aix4* | aix5*) 550332b578d3Smrg # If we're using GNU nm, then we don't want the "-C" option. 550432b578d3Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 550532b578d3Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 550632b578d3Smrg _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' 550732b578d3Smrg else 550832b578d3Smrg _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' 550932b578d3Smrg fi 551032b578d3Smrg ;; 551132b578d3Smrg pw32*) 551232b578d3Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 551332b578d3Smrg ;; 551432b578d3Smrg cygwin* | mingw*) 551532b578d3Smrg _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' 551632b578d3Smrg ;; 551732b578d3Smrg *) 551832b578d3Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 551932b578d3Smrg ;; 552032b578d3Smrg esac 552132b578d3Smrg],[ 552232b578d3Smrg runpath_var= 552332b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 552432b578d3Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 552532b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 552632b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 552732b578d3Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 552832b578d3Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 552932b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 553032b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 553132b578d3Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 553232b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 553332b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 553432b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 553532b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 553632b578d3Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 553732b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 553832b578d3Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 553932b578d3Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 554032b578d3Smrg _LT_AC_TAGVAR(module_cmds, $1)= 554132b578d3Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 554232b578d3Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 554332b578d3Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 554432b578d3Smrg # include_expsyms should be a list of space-separated symbols to be *always* 554532b578d3Smrg # included in the symbol list 554632b578d3Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 554732b578d3Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 554832b578d3Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 554932b578d3Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 555032b578d3Smrg # as well as any symbol that contains `d'. 555132b578d3Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 555232b578d3Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 555332b578d3Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 555432b578d3Smrg # the symbol is explicitly referenced. Since portable code cannot 555532b578d3Smrg # rely on this symbol name, it's probably fine to never include it in 555632b578d3Smrg # preloaded symbol tables. 555732b578d3Smrg extract_expsyms_cmds= 555832b578d3Smrg # Just being paranoid about ensuring that cc_basename is set. 555932b578d3Smrg _LT_CC_BASENAME([$compiler]) 556032b578d3Smrg case $host_os in 556132b578d3Smrg cygwin* | mingw* | pw32*) 556232b578d3Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 556332b578d3Smrg # When not using gcc, we currently assume that we are using 556432b578d3Smrg # Microsoft Visual C++. 556532b578d3Smrg if test "$GCC" != yes; then 556632b578d3Smrg with_gnu_ld=no 556732b578d3Smrg fi 556832b578d3Smrg ;; 556932b578d3Smrg interix*) 557032b578d3Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 557132b578d3Smrg with_gnu_ld=yes 557232b578d3Smrg ;; 557332b578d3Smrg openbsd*) 557432b578d3Smrg with_gnu_ld=no 557532b578d3Smrg ;; 557632b578d3Smrg esac 557732b578d3Smrg 557832b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 557932b578d3Smrg if test "$with_gnu_ld" = yes; then 558032b578d3Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 558132b578d3Smrg wlarc='${wl}' 558232b578d3Smrg 558332b578d3Smrg # Set some defaults for GNU ld with shared library support. These 558432b578d3Smrg # are reset later if shared libraries are not supported. Putting them 558532b578d3Smrg # here allows them to be overridden if necessary. 558632b578d3Smrg runpath_var=LD_RUN_PATH 558732b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 558832b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 558932b578d3Smrg # ancient GNU ld didn't support --whole-archive et. al. 559032b578d3Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 559132b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 559232b578d3Smrg else 559332b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 559432b578d3Smrg fi 559532b578d3Smrg supports_anon_versioning=no 559632b578d3Smrg case `$LD -v 2>/dev/null` in 559732b578d3Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 559832b578d3Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 559932b578d3Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 560032b578d3Smrg *\ 2.11.*) ;; # other 2.11 versions 560132b578d3Smrg *) supports_anon_versioning=yes ;; 560232b578d3Smrg esac 560332b578d3Smrg 560432b578d3Smrg # See if GNU ld supports shared libraries. 560532b578d3Smrg case $host_os in 560632b578d3Smrg aix3* | aix4* | aix5*) 560732b578d3Smrg # On AIX/PPC, the GNU linker is very broken 560832b578d3Smrg if test "$host_cpu" != ia64; then 560932b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 561032b578d3Smrg cat <<EOF 1>&2 561132b578d3Smrg 561232b578d3Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 561332b578d3Smrg*** to be unable to reliably create shared libraries on AIX. 561432b578d3Smrg*** Therefore, libtool is disabling shared libraries support. If you 561532b578d3Smrg*** really care for shared libraries, you may want to modify your PATH 561632b578d3Smrg*** so that a non-GNU linker is found, and then restart. 561732b578d3Smrg 561832b578d3SmrgEOF 561932b578d3Smrg fi 562032b578d3Smrg ;; 562132b578d3Smrg 562232b578d3Smrg amigaos*) 562332b578d3Smrg _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)' 562432b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 562532b578d3Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 562632b578d3Smrg 562732b578d3Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 562832b578d3Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 562932b578d3Smrg # to version 4, is to share data among multiple programs linked 563032b578d3Smrg # with the same dynamic library. Since this doesn't match the 563132b578d3Smrg # behavior of shared libraries on other platforms, we can't use 563232b578d3Smrg # them. 563332b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 563432b578d3Smrg ;; 563532b578d3Smrg 563632b578d3Smrg beos*) 563732b578d3Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 563832b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 563932b578d3Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 564032b578d3Smrg # support --undefined. This deserves some investigation. FIXME 564132b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 564232b578d3Smrg else 564332b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 564432b578d3Smrg fi 564532b578d3Smrg ;; 564632b578d3Smrg 564732b578d3Smrg cygwin* | mingw* | pw32*) 564832b578d3Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 564932b578d3Smrg # as there is no search path for DLLs. 565032b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 565132b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 565232b578d3Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 565332b578d3Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 565432b578d3Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' 565532b578d3Smrg 565632b578d3Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 565732b578d3Smrg _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' 565832b578d3Smrg # If the export-symbols file already is a .def file (1st line 565932b578d3Smrg # is EXPORTS), use it as is; otherwise, prepend... 566032b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 566132b578d3Smrg cp $export_symbols $output_objdir/$soname.def; 566232b578d3Smrg else 566332b578d3Smrg echo EXPORTS > $output_objdir/$soname.def; 566432b578d3Smrg cat $export_symbols >> $output_objdir/$soname.def; 566532b578d3Smrg fi~ 566632b578d3Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 566732b578d3Smrg else 566832b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 566932b578d3Smrg fi 567032b578d3Smrg ;; 567132b578d3Smrg 567232b578d3Smrg interix[[3-9]]*) 567332b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 567432b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 567532b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 567632b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 567732b578d3Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 567832b578d3Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 567932b578d3Smrg # default) and relocated if they conflict, which is a slow very memory 568032b578d3Smrg # consuming and fragmenting process. To avoid this, we pick a random, 568132b578d3Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 568232b578d3Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 568332b578d3Smrg _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' 568432b578d3Smrg _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' 568532b578d3Smrg ;; 568632b578d3Smrg 568732b578d3Smrg gnu* | linux* | k*bsd*-gnu) 568832b578d3Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 568932b578d3Smrg tmp_addflag= 569032b578d3Smrg case $cc_basename,$host_cpu in 569132b578d3Smrg pgcc*) # Portland Group C compiler 569232b578d3Smrg _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' 569332b578d3Smrg tmp_addflag=' $pic_flag' 569432b578d3Smrg ;; 569532b578d3Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 569632b578d3Smrg _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' 569732b578d3Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 569832b578d3Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 569932b578d3Smrg tmp_addflag=' -i_dynamic' ;; 570032b578d3Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 570132b578d3Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 570232b578d3Smrg ifc* | ifort*) # Intel Fortran compiler 570332b578d3Smrg tmp_addflag=' -nofor_main' ;; 570432b578d3Smrg esac 570532b578d3Smrg case `$CC -V 2>&1 | sed 5q` in 570632b578d3Smrg *Sun\ C*) # Sun C 5.9 570732b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 570832b578d3Smrg tmp_sharedflag='-G' ;; 570932b578d3Smrg *Sun\ F*) # Sun Fortran 8.3 571032b578d3Smrg tmp_sharedflag='-G' ;; 571132b578d3Smrg *) 571232b578d3Smrg tmp_sharedflag='-shared' ;; 571332b578d3Smrg esac 571432b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 571532b578d3Smrg 571632b578d3Smrg if test $supports_anon_versioning = yes; then 571732b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 571832b578d3Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 571932b578d3Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 572032b578d3Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 572132b578d3Smrg fi 572232b578d3Smrg else 572332b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 572432b578d3Smrg fi 572532b578d3Smrg ;; 572632b578d3Smrg 572732b578d3Smrg netbsd*) 572832b578d3Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 572932b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 573032b578d3Smrg wlarc= 573132b578d3Smrg else 573232b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 573332b578d3Smrg _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' 573432b578d3Smrg fi 573532b578d3Smrg ;; 573632b578d3Smrg 573732b578d3Smrg solaris*) 573832b578d3Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 573932b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 574032b578d3Smrg cat <<EOF 1>&2 574132b578d3Smrg 574232b578d3Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 574332b578d3Smrg*** create shared libraries on Solaris systems. Therefore, libtool 574432b578d3Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 574532b578d3Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 574632b578d3Smrg*** your PATH or compiler configuration so that the native linker is 574732b578d3Smrg*** used, and then restart. 574832b578d3Smrg 574932b578d3SmrgEOF 575032b578d3Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 575132b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 575232b578d3Smrg _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' 575332b578d3Smrg else 575432b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 575532b578d3Smrg fi 575632b578d3Smrg ;; 575732b578d3Smrg 575832b578d3Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 575932b578d3Smrg case `$LD -v 2>&1` in 576032b578d3Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 576132b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 576232b578d3Smrg cat <<_LT_EOF 1>&2 576332b578d3Smrg 576432b578d3Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 576532b578d3Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 576632b578d3Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 576732b578d3Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 576832b578d3Smrg*** your PATH or compiler configuration so that the native linker is 576932b578d3Smrg*** used, and then restart. 577032b578d3Smrg 577132b578d3Smrg_LT_EOF 577232b578d3Smrg ;; 577332b578d3Smrg *) 577432b578d3Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 577532b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 577632b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 577732b578d3Smrg _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' 577832b578d3Smrg else 577932b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 578032b578d3Smrg fi 578132b578d3Smrg ;; 578232b578d3Smrg esac 578332b578d3Smrg ;; 578432b578d3Smrg 578532b578d3Smrg sunos4*) 578632b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 578732b578d3Smrg wlarc= 578832b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 578932b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 579032b578d3Smrg ;; 579132b578d3Smrg 579232b578d3Smrg *) 579332b578d3Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 579432b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 579532b578d3Smrg _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' 579632b578d3Smrg else 579732b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 579832b578d3Smrg fi 579932b578d3Smrg ;; 580032b578d3Smrg esac 580132b578d3Smrg 580232b578d3Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 580332b578d3Smrg runpath_var= 580432b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 580532b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 580632b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 580732b578d3Smrg fi 580832b578d3Smrg else 580932b578d3Smrg # PORTME fill in a description of your system's linker (not GNU ld) 581032b578d3Smrg case $host_os in 581132b578d3Smrg aix3*) 581232b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 581332b578d3Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 581432b578d3Smrg _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' 581532b578d3Smrg # Note: this linker hardcodes the directories in LIBPATH if there 581632b578d3Smrg # are no directories specified by -L. 581732b578d3Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 581832b578d3Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 581932b578d3Smrg # Neither direct hardcoding nor static linking is supported with a 582032b578d3Smrg # broken collect2. 582132b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 582232b578d3Smrg fi 582332b578d3Smrg ;; 582432b578d3Smrg 582532b578d3Smrg aix4* | aix5*) 582632b578d3Smrg if test "$host_cpu" = ia64; then 582732b578d3Smrg # On IA64, the linker does run time linking by default, so we don't 582832b578d3Smrg # have to do anything special. 582932b578d3Smrg aix_use_runtimelinking=no 583032b578d3Smrg exp_sym_flag='-Bexport' 583132b578d3Smrg no_entry_flag="" 583232b578d3Smrg else 583332b578d3Smrg # If we're using GNU nm, then we don't want the "-C" option. 583432b578d3Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 583532b578d3Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 583632b578d3Smrg _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' 583732b578d3Smrg else 583832b578d3Smrg _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' 583932b578d3Smrg fi 584032b578d3Smrg aix_use_runtimelinking=no 584132b578d3Smrg 584232b578d3Smrg # Test if we are trying to use run time linking or normal 584332b578d3Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 584432b578d3Smrg # need to do runtime linking. 584532b578d3Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 584632b578d3Smrg for ld_flag in $LDFLAGS; do 584732b578d3Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 584832b578d3Smrg aix_use_runtimelinking=yes 584932b578d3Smrg break 585032b578d3Smrg fi 585132b578d3Smrg done 585232b578d3Smrg ;; 585332b578d3Smrg esac 585432b578d3Smrg 585532b578d3Smrg exp_sym_flag='-bexport' 585632b578d3Smrg no_entry_flag='-bnoentry' 585732b578d3Smrg fi 585832b578d3Smrg 585932b578d3Smrg # When large executables or shared objects are built, AIX ld can 586032b578d3Smrg # have problems creating the table of contents. If linking a library 586132b578d3Smrg # or program results in "error TOC overflow" add -mminimal-toc to 586232b578d3Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 586332b578d3Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 586432b578d3Smrg 586532b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 586632b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 586732b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 586832b578d3Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 586932b578d3Smrg 587032b578d3Smrg if test "$GCC" = yes; then 587132b578d3Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 587232b578d3Smrg # We only want to do this on AIX 4.2 and lower, the check 587332b578d3Smrg # below for broken collect2 doesn't work under 4.3+ 587432b578d3Smrg collect2name=`${CC} -print-prog-name=collect2` 587532b578d3Smrg if test -f "$collect2name" && \ 587632b578d3Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 587732b578d3Smrg then 587832b578d3Smrg # We have reworked collect2 587932b578d3Smrg : 588032b578d3Smrg else 588132b578d3Smrg # We have old collect2 588232b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 588332b578d3Smrg # It fails to find uninstalled libraries when the uninstalled 588432b578d3Smrg # path is not listed in the libpath. Setting hardcode_minus_L 588532b578d3Smrg # to unsupported forces relinking 588632b578d3Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 588732b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 588832b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 588932b578d3Smrg fi 589032b578d3Smrg ;; 589132b578d3Smrg esac 589232b578d3Smrg shared_flag='-shared' 589332b578d3Smrg if test "$aix_use_runtimelinking" = yes; then 589432b578d3Smrg shared_flag="$shared_flag "'${wl}-G' 589532b578d3Smrg fi 589632b578d3Smrg else 589732b578d3Smrg # not using gcc 589832b578d3Smrg if test "$host_cpu" = ia64; then 589932b578d3Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 590032b578d3Smrg # chokes on -Wl,-G. The following line is correct: 590132b578d3Smrg shared_flag='-G' 590232b578d3Smrg else 590332b578d3Smrg if test "$aix_use_runtimelinking" = yes; then 590432b578d3Smrg shared_flag='${wl}-G' 590532b578d3Smrg else 590632b578d3Smrg shared_flag='${wl}-bM:SRE' 590732b578d3Smrg fi 590832b578d3Smrg fi 590932b578d3Smrg fi 591032b578d3Smrg 591132b578d3Smrg # It seems that -bexpall does not export symbols beginning with 591232b578d3Smrg # underscore (_), so it is better to generate a list of symbols to export. 591332b578d3Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 591432b578d3Smrg if test "$aix_use_runtimelinking" = yes; then 591532b578d3Smrg # Warning - without using the other runtime loading flags (-brtl), 591632b578d3Smrg # -berok will link without error, but may produce a broken library. 591732b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 591832b578d3Smrg # Determine the default libpath from the value encoded in an empty executable. 591932b578d3Smrg _LT_AC_SYS_LIBPATH_AIX 592032b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 592132b578d3Smrg _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" 592232b578d3Smrg else 592332b578d3Smrg if test "$host_cpu" = ia64; then 592432b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 592532b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 592632b578d3Smrg _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" 592732b578d3Smrg else 592832b578d3Smrg # Determine the default libpath from the value encoded in an empty executable. 592932b578d3Smrg _LT_AC_SYS_LIBPATH_AIX 593032b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 593132b578d3Smrg # Warning - without using the other run time loading flags, 593232b578d3Smrg # -berok will link without error, but may produce a broken library. 593332b578d3Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 593432b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 593532b578d3Smrg # Exported symbols can be pulled into shared objects from archives 593632b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 593732b578d3Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 593832b578d3Smrg # This is similar to how AIX traditionally builds its shared libraries. 593932b578d3Smrg _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' 594032b578d3Smrg fi 594132b578d3Smrg fi 594232b578d3Smrg ;; 594332b578d3Smrg 594432b578d3Smrg amigaos*) 594532b578d3Smrg _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)' 594632b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 594732b578d3Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 594832b578d3Smrg # see comment about different semantics on the GNU ld section 594932b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 595032b578d3Smrg ;; 595132b578d3Smrg 595232b578d3Smrg bsdi[[45]]*) 595332b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 595432b578d3Smrg ;; 595532b578d3Smrg 595632b578d3Smrg cygwin* | mingw* | pw32*) 595732b578d3Smrg # When not using gcc, we currently assume that we are using 595832b578d3Smrg # Microsoft Visual C++. 595932b578d3Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 596032b578d3Smrg # no search path for DLLs. 596132b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 596232b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 596332b578d3Smrg # Tell ltmain to make .lib files, not .a files. 596432b578d3Smrg libext=lib 596532b578d3Smrg # Tell ltmain to make .dll files, not .so files. 596632b578d3Smrg shrext_cmds=".dll" 596732b578d3Smrg # FIXME: Setting linknames here is a bad hack. 596832b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 596932b578d3Smrg # The linker will automatically build a .lib file if we build a DLL. 597032b578d3Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 597132b578d3Smrg # FIXME: Should let the user specify the lib program. 597232b578d3Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 597332b578d3Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 597432b578d3Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 597532b578d3Smrg ;; 597632b578d3Smrg 597732b578d3Smrg darwin* | rhapsody*) 597832b578d3Smrg case $host_os in 597932b578d3Smrg rhapsody* | darwin1.[[012]]) 598032b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 598132b578d3Smrg ;; 598232b578d3Smrg *) # Darwin 1.3 on 598332b578d3Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 598432b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 598532b578d3Smrg else 598632b578d3Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 598732b578d3Smrg 10.[[012]]) 598832b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 598932b578d3Smrg ;; 599032b578d3Smrg 10.*) 599132b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 599232b578d3Smrg ;; 599332b578d3Smrg esac 599432b578d3Smrg fi 599532b578d3Smrg ;; 599632b578d3Smrg esac 599732b578d3Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 599832b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 599932b578d3Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 600032b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 600132b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 600232b578d3Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 600332b578d3Smrg if test "$GCC" = yes ; then 600432b578d3Smrg output_verbose_link_cmd='echo' 600532b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 600632b578d3Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 600732b578d3Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 600832b578d3Smrg _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}' 600932b578d3Smrg _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}' 601032b578d3Smrg else 601132b578d3Smrg case $cc_basename in 601232b578d3Smrg xlc*) 601332b578d3Smrg output_verbose_link_cmd='echo' 601432b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' 601532b578d3Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 601632b578d3Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 601732b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 601832b578d3Smrg _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}' 601932b578d3Smrg ;; 602032b578d3Smrg *) 602132b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 602232b578d3Smrg ;; 602332b578d3Smrg esac 602432b578d3Smrg fi 602532b578d3Smrg ;; 602632b578d3Smrg 602732b578d3Smrg dgux*) 602832b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 602932b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 603032b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 603132b578d3Smrg ;; 603232b578d3Smrg 603332b578d3Smrg freebsd1*) 603432b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 603532b578d3Smrg ;; 603632b578d3Smrg 603732b578d3Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 603832b578d3Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 603932b578d3Smrg # does not break anything, and helps significantly (at the cost of a little 604032b578d3Smrg # extra space). 604132b578d3Smrg freebsd2.2*) 604232b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 604332b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 604432b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 604532b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 604632b578d3Smrg ;; 604732b578d3Smrg 604832b578d3Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 604932b578d3Smrg freebsd2*) 605032b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 605132b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 605232b578d3Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 605332b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 605432b578d3Smrg ;; 605532b578d3Smrg 605632b578d3Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 605732b578d3Smrg freebsd* | dragonfly*) 605832b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 605932b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 606032b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 606132b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 606232b578d3Smrg ;; 606332b578d3Smrg 606432b578d3Smrg hpux9*) 606532b578d3Smrg if test "$GCC" = yes; then 606632b578d3Smrg _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' 606732b578d3Smrg else 606832b578d3Smrg _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' 606932b578d3Smrg fi 607032b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 607132b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 607232b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 607332b578d3Smrg 607432b578d3Smrg # hardcode_minus_L: Not really in the search PATH, 607532b578d3Smrg # but as the default location of the library. 607632b578d3Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 607732b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 607832b578d3Smrg ;; 607932b578d3Smrg 608032b578d3Smrg hpux10*) 608132b578d3Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 608232b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 608332b578d3Smrg else 608432b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 608532b578d3Smrg fi 608632b578d3Smrg if test "$with_gnu_ld" = no; then 608732b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 608832b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 608932b578d3Smrg 609032b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 609132b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 609232b578d3Smrg 609332b578d3Smrg # hardcode_minus_L: Not really in the search PATH, 609432b578d3Smrg # but as the default location of the library. 609532b578d3Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 609632b578d3Smrg fi 609732b578d3Smrg ;; 609832b578d3Smrg 609932b578d3Smrg hpux11*) 610032b578d3Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 610132b578d3Smrg case $host_cpu in 610232b578d3Smrg hppa*64*) 610332b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 610432b578d3Smrg ;; 610532b578d3Smrg ia64*) 610632b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 610732b578d3Smrg ;; 610832b578d3Smrg *) 610932b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 611032b578d3Smrg ;; 611132b578d3Smrg esac 611232b578d3Smrg else 611332b578d3Smrg case $host_cpu in 611432b578d3Smrg hppa*64*) 611532b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 611632b578d3Smrg ;; 611732b578d3Smrg ia64*) 611832b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 611932b578d3Smrg ;; 612032b578d3Smrg *) 612132b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 612232b578d3Smrg ;; 612332b578d3Smrg esac 612432b578d3Smrg fi 612532b578d3Smrg if test "$with_gnu_ld" = no; then 612632b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 612732b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 612832b578d3Smrg 612932b578d3Smrg case $host_cpu in 613032b578d3Smrg hppa*64*|ia64*) 613132b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 613232b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 613332b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 613432b578d3Smrg ;; 613532b578d3Smrg *) 613632b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 613732b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 613832b578d3Smrg 613932b578d3Smrg # hardcode_minus_L: Not really in the search PATH, 614032b578d3Smrg # but as the default location of the library. 614132b578d3Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 614232b578d3Smrg ;; 614332b578d3Smrg esac 614432b578d3Smrg fi 614532b578d3Smrg ;; 614632b578d3Smrg 614732b578d3Smrg irix5* | irix6* | nonstopux*) 614832b578d3Smrg if test "$GCC" = yes; then 614932b578d3Smrg _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' 615032b578d3Smrg else 615132b578d3Smrg _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' 615232b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 615332b578d3Smrg fi 615432b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 615532b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 615632b578d3Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 615732b578d3Smrg ;; 615832b578d3Smrg 615932b578d3Smrg netbsd*) 616032b578d3Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 616132b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 616232b578d3Smrg else 616332b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 616432b578d3Smrg fi 616532b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 616632b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 616732b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 616832b578d3Smrg ;; 616932b578d3Smrg 617032b578d3Smrg newsos6) 617132b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 617232b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 617332b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 617432b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 617532b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 617632b578d3Smrg ;; 617732b578d3Smrg 617832b578d3Smrg openbsd*) 617932b578d3Smrg if test -f /usr/libexec/ld.so; then 618032b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 618132b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 618232b578d3Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 618332b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 618432b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 618532b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 618632b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 618732b578d3Smrg else 618832b578d3Smrg case $host_os in 618932b578d3Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 619032b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 619132b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 619232b578d3Smrg ;; 619332b578d3Smrg *) 619432b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 619532b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 619632b578d3Smrg ;; 619732b578d3Smrg esac 619832b578d3Smrg fi 619932b578d3Smrg else 620032b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 620132b578d3Smrg fi 620232b578d3Smrg ;; 620332b578d3Smrg 620432b578d3Smrg os2*) 620532b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 620632b578d3Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 620732b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 620832b578d3Smrg _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' 620932b578d3Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 621032b578d3Smrg ;; 621132b578d3Smrg 621232b578d3Smrg osf3*) 621332b578d3Smrg if test "$GCC" = yes; then 621432b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 621532b578d3Smrg _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' 621632b578d3Smrg else 621732b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 621832b578d3Smrg _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' 621932b578d3Smrg fi 622032b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 622132b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 622232b578d3Smrg ;; 622332b578d3Smrg 622432b578d3Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 622532b578d3Smrg if test "$GCC" = yes; then 622632b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 622732b578d3Smrg _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' 622832b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 622932b578d3Smrg else 623032b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 623132b578d3Smrg _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' 623232b578d3Smrg _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~ 623332b578d3Smrg $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' 623432b578d3Smrg 623532b578d3Smrg # Both c and cxx compiler support -rpath directly 623632b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 623732b578d3Smrg fi 623832b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 623932b578d3Smrg ;; 624032b578d3Smrg 624132b578d3Smrg solaris*) 624232b578d3Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 624332b578d3Smrg if test "$GCC" = yes; then 624432b578d3Smrg wlarc='${wl}' 624532b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 624632b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 624732b578d3Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 624832b578d3Smrg else 624932b578d3Smrg wlarc='' 625032b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 625132b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 625232b578d3Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 625332b578d3Smrg fi 625432b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 625532b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 625632b578d3Smrg case $host_os in 625732b578d3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 625832b578d3Smrg *) 625932b578d3Smrg # The compiler driver will combine and reorder linker options, 626032b578d3Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 626132b578d3Smrg # but is careful enough not to reorder. 626232b578d3Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 626332b578d3Smrg if test "$GCC" = yes; then 626432b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 626532b578d3Smrg else 626632b578d3Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 626732b578d3Smrg fi 626832b578d3Smrg ;; 626932b578d3Smrg esac 627032b578d3Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 627132b578d3Smrg ;; 627232b578d3Smrg 627332b578d3Smrg sunos4*) 627432b578d3Smrg if test "x$host_vendor" = xsequent; then 627532b578d3Smrg # Use $CC to link under sequent, because it throws in some extra .o 627632b578d3Smrg # files that make .init and .fini sections work. 627732b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 627832b578d3Smrg else 627932b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 628032b578d3Smrg fi 628132b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 628232b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 628332b578d3Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 628432b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 628532b578d3Smrg ;; 628632b578d3Smrg 628732b578d3Smrg sysv4) 628832b578d3Smrg case $host_vendor in 628932b578d3Smrg sni) 629032b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 629132b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 629232b578d3Smrg ;; 629332b578d3Smrg siemens) 629432b578d3Smrg ## LD is ld it makes a PLAMLIB 629532b578d3Smrg ## CC just makes a GrossModule. 629632b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 629732b578d3Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 629832b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 629932b578d3Smrg ;; 630032b578d3Smrg motorola) 630132b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 630232b578d3Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 630332b578d3Smrg ;; 630432b578d3Smrg esac 630532b578d3Smrg runpath_var='LD_RUN_PATH' 630632b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 630732b578d3Smrg ;; 630832b578d3Smrg 630932b578d3Smrg sysv4.3*) 631032b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 631132b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 631232b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 631332b578d3Smrg ;; 631432b578d3Smrg 631532b578d3Smrg sysv4*MP*) 631632b578d3Smrg if test -d /usr/nec; then 631732b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 631832b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 631932b578d3Smrg runpath_var=LD_RUN_PATH 632032b578d3Smrg hardcode_runpath_var=yes 632132b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 632232b578d3Smrg fi 632332b578d3Smrg ;; 632432b578d3Smrg 632532b578d3Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 632632b578d3Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 632732b578d3Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 632832b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 632932b578d3Smrg runpath_var='LD_RUN_PATH' 633032b578d3Smrg 633132b578d3Smrg if test "$GCC" = yes; then 633232b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 633332b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 633432b578d3Smrg else 633532b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 633632b578d3Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 633732b578d3Smrg fi 633832b578d3Smrg ;; 633932b578d3Smrg 634032b578d3Smrg sysv5* | sco3.2v5* | sco5v6*) 634132b578d3Smrg # Note: We can NOT use -z defs as we might desire, because we do not 634232b578d3Smrg # link with -lc, and that would cause any symbols used from libc to 634332b578d3Smrg # always be unresolved, which means just about no library would 634432b578d3Smrg # ever link correctly. If we're not using GNU ld we use -z text 634532b578d3Smrg # though, which does catch some bad symbols but isn't as heavy-handed 634632b578d3Smrg # as -z defs. 634732b578d3Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 634832b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 634932b578d3Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 635032b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 635132b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 635232b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 635332b578d3Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 635432b578d3Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 635532b578d3Smrg runpath_var='LD_RUN_PATH' 635632b578d3Smrg 635732b578d3Smrg if test "$GCC" = yes; then 635832b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 635932b578d3Smrg _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' 636032b578d3Smrg else 636132b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 636232b578d3Smrg _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' 636332b578d3Smrg fi 636432b578d3Smrg ;; 636532b578d3Smrg 636632b578d3Smrg uts4*) 636732b578d3Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 636832b578d3Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 636932b578d3Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 637032b578d3Smrg ;; 637132b578d3Smrg 637232b578d3Smrg *) 637332b578d3Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 637432b578d3Smrg ;; 637532b578d3Smrg esac 637632b578d3Smrg fi 637732b578d3Smrg]) 637832b578d3SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 637932b578d3Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 638032b578d3Smrg 638132b578d3Smrg# 638232b578d3Smrg# Do we need to explicitly link libc? 638332b578d3Smrg# 638432b578d3Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 638532b578d3Smrgx|xyes) 638632b578d3Smrg # Assume -lc should be added 638732b578d3Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 638832b578d3Smrg 638932b578d3Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 639032b578d3Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 639132b578d3Smrg *'~'*) 639232b578d3Smrg # FIXME: we may have to deal with multi-command sequences. 639332b578d3Smrg ;; 639432b578d3Smrg '$CC '*) 639532b578d3Smrg # Test whether the compiler implicitly links with -lc since on some 639632b578d3Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 639732b578d3Smrg # to ld, don't add -lc before -lgcc. 639832b578d3Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 639932b578d3Smrg $rm conftest* 640032b578d3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 640132b578d3Smrg 640232b578d3Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 640332b578d3Smrg soname=conftest 640432b578d3Smrg lib=conftest 640532b578d3Smrg libobjs=conftest.$ac_objext 640632b578d3Smrg deplibs= 640732b578d3Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 640832b578d3Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 640932b578d3Smrg compiler_flags=-v 641032b578d3Smrg linker_flags=-v 641132b578d3Smrg verstring= 641232b578d3Smrg output_objdir=. 641332b578d3Smrg libname=conftest 641432b578d3Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 641532b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 641632b578d3Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 641732b578d3Smrg then 641832b578d3Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 641932b578d3Smrg else 642032b578d3Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 642132b578d3Smrg fi 642232b578d3Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 642332b578d3Smrg else 642432b578d3Smrg cat conftest.err 1>&5 642532b578d3Smrg fi 642632b578d3Smrg $rm conftest* 642732b578d3Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 642832b578d3Smrg ;; 642932b578d3Smrg esac 643032b578d3Smrg fi 643132b578d3Smrg ;; 643232b578d3Smrgesac 643332b578d3Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 643432b578d3Smrg 643532b578d3Smrg 643632b578d3Smrg# _LT_AC_FILE_LTDLL_C 643732b578d3Smrg# ------------------- 643832b578d3Smrg# Be careful that the start marker always follows a newline. 643932b578d3SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 644032b578d3Smrg# /* ltdll.c starts here */ 644132b578d3Smrg# #define WIN32_LEAN_AND_MEAN 644232b578d3Smrg# #include <windows.h> 644332b578d3Smrg# #undef WIN32_LEAN_AND_MEAN 644432b578d3Smrg# #include <stdio.h> 644532b578d3Smrg# 644632b578d3Smrg# #ifndef __CYGWIN__ 644732b578d3Smrg# # ifdef __CYGWIN32__ 644832b578d3Smrg# # define __CYGWIN__ __CYGWIN32__ 644932b578d3Smrg# # endif 645032b578d3Smrg# #endif 645132b578d3Smrg# 645232b578d3Smrg# #ifdef __cplusplus 645332b578d3Smrg# extern "C" { 645432b578d3Smrg# #endif 645532b578d3Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 645632b578d3Smrg# #ifdef __cplusplus 645732b578d3Smrg# } 645832b578d3Smrg# #endif 645932b578d3Smrg# 646032b578d3Smrg# #ifdef __CYGWIN__ 646132b578d3Smrg# #include <cygwin/cygwin_dll.h> 646232b578d3Smrg# DECLARE_CYGWIN_DLL( DllMain ); 646332b578d3Smrg# #endif 646432b578d3Smrg# HINSTANCE __hDllInstance_base; 646532b578d3Smrg# 646632b578d3Smrg# BOOL APIENTRY 646732b578d3Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 646832b578d3Smrg# { 646932b578d3Smrg# __hDllInstance_base = hInst; 647032b578d3Smrg# return TRUE; 647132b578d3Smrg# } 647232b578d3Smrg# /* ltdll.c ends here */ 647332b578d3Smrg])# _LT_AC_FILE_LTDLL_C 647432b578d3Smrg 647532b578d3Smrg 647632b578d3Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 647732b578d3Smrg# --------------------------------- 647832b578d3SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 647932b578d3Smrg 648032b578d3Smrg 648132b578d3Smrg# old names 648232b578d3SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 648332b578d3SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 648432b578d3SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 648532b578d3SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 648632b578d3SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 648732b578d3SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 648832b578d3SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 648932b578d3Smrg 649032b578d3Smrg# This is just to silence aclocal about the macro not being used 649132b578d3Smrgifelse([AC_DISABLE_FAST_INSTALL]) 649232b578d3Smrg 649332b578d3SmrgAC_DEFUN([LT_AC_PROG_GCJ], 649432b578d3Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 649532b578d3Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 649632b578d3Smrg AC_SUBST(GCJFLAGS) 649732b578d3Smrg]) 649832b578d3Smrg 649932b578d3SmrgAC_DEFUN([LT_AC_PROG_RC], 650032b578d3Smrg[AC_CHECK_TOOL(RC, windres, no) 650132b578d3Smrg]) 650232b578d3Smrg 650332b578d3Smrg 650432b578d3Smrg# Cheap backport of AS_EXECUTABLE_P and required macros 650532b578d3Smrg# from Autoconf 2.59; we should not use $as_executable_p directly. 650632b578d3Smrg 650732b578d3Smrg# _AS_TEST_PREPARE 650832b578d3Smrg# ---------------- 650932b578d3Smrgm4_ifndef([_AS_TEST_PREPARE], 651032b578d3Smrg[m4_defun([_AS_TEST_PREPARE], 651132b578d3Smrg[if test -x / >/dev/null 2>&1; then 651232b578d3Smrg as_executable_p='test -x' 651332b578d3Smrgelse 651432b578d3Smrg as_executable_p='test -f' 651532b578d3Smrgfi 651632b578d3Smrg])])# _AS_TEST_PREPARE 651732b578d3Smrg 651832b578d3Smrg# AS_EXECUTABLE_P 651932b578d3Smrg# --------------- 652032b578d3Smrg# Check whether a file is executable. 652132b578d3Smrgm4_ifndef([AS_EXECUTABLE_P], 652232b578d3Smrg[m4_defun([AS_EXECUTABLE_P], 652332b578d3Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl 652432b578d3Smrg$as_executable_p $1[]dnl 652532b578d3Smrg])])# AS_EXECUTABLE_P 652632b578d3Smrg 652732b578d3Smrg# NOTE: This macro has been submitted for inclusion into # 652832b578d3Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 652932b578d3Smrg# a released version of Autoconf we should remove this # 653032b578d3Smrg# macro and use it instead. # 653132b578d3Smrg# LT_AC_PROG_SED 653232b578d3Smrg# -------------- 653332b578d3Smrg# Check for a fully-functional sed program, that truncates 653432b578d3Smrg# as few characters as possible. Prefer GNU sed if found. 653532b578d3SmrgAC_DEFUN([LT_AC_PROG_SED], 653632b578d3Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 653732b578d3SmrgAC_CACHE_VAL(lt_cv_path_SED, 653832b578d3Smrg[# Loop through the user's path and test for sed and gsed. 653932b578d3Smrg# Then use that list of sed's as ones to test for truncation. 654032b578d3Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 654132b578d3Smrgfor as_dir in $PATH 654232b578d3Smrgdo 654332b578d3Smrg IFS=$as_save_IFS 654432b578d3Smrg test -z "$as_dir" && as_dir=. 654532b578d3Smrg for lt_ac_prog in sed gsed; do 654632b578d3Smrg for ac_exec_ext in '' $ac_executable_extensions; do 654732b578d3Smrg if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 654832b578d3Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 654932b578d3Smrg fi 655032b578d3Smrg done 655132b578d3Smrg done 655232b578d3Smrgdone 655332b578d3SmrgIFS=$as_save_IFS 655432b578d3Smrglt_ac_max=0 655532b578d3Smrglt_ac_count=0 655632b578d3Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 655732b578d3Smrg# along with /bin/sed that truncates output. 655832b578d3Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 655932b578d3Smrg test ! -f $lt_ac_sed && continue 656032b578d3Smrg cat /dev/null > conftest.in 656132b578d3Smrg lt_ac_count=0 656232b578d3Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 656332b578d3Smrg # Check for GNU sed and select it if it is found. 656432b578d3Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 656532b578d3Smrg lt_cv_path_SED=$lt_ac_sed 656632b578d3Smrg break 656732b578d3Smrg fi 656832b578d3Smrg while true; do 656932b578d3Smrg cat conftest.in conftest.in >conftest.tmp 657032b578d3Smrg mv conftest.tmp conftest.in 657132b578d3Smrg cp conftest.in conftest.nl 657232b578d3Smrg echo >>conftest.nl 657332b578d3Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 657432b578d3Smrg cmp -s conftest.out conftest.nl || break 657532b578d3Smrg # 10000 chars as input seems more than enough 657632b578d3Smrg test $lt_ac_count -gt 10 && break 657732b578d3Smrg lt_ac_count=`expr $lt_ac_count + 1` 657832b578d3Smrg if test $lt_ac_count -gt $lt_ac_max; then 657932b578d3Smrg lt_ac_max=$lt_ac_count 658032b578d3Smrg lt_cv_path_SED=$lt_ac_sed 658132b578d3Smrg fi 658232b578d3Smrg done 658332b578d3Smrgdone 658432b578d3Smrg]) 658532b578d3SmrgSED=$lt_cv_path_SED 658632b578d3SmrgAC_SUBST([SED]) 658732b578d3SmrgAC_MSG_RESULT([$SED]) 658832b578d3Smrg]) 658932b578d3Smrg 659032b578d3Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 659132b578d3Smrg# 659232b578d3Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 659332b578d3Smrg# 659432b578d3Smrg# This program is free software; you can redistribute it and/or modify 659532b578d3Smrg# it under the terms of the GNU General Public License as published by 659632b578d3Smrg# the Free Software Foundation; either version 2 of the License, or 659732b578d3Smrg# (at your option) any later version. 659832b578d3Smrg# 659932b578d3Smrg# This program is distributed in the hope that it will be useful, but 660032b578d3Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 660132b578d3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 660232b578d3Smrg# General Public License for more details. 660332b578d3Smrg# 660432b578d3Smrg# You should have received a copy of the GNU General Public License 660532b578d3Smrg# along with this program; if not, write to the Free Software 660632b578d3Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 660732b578d3Smrg# 660832b578d3Smrg# As a special exception to the GNU General Public License, if you 660932b578d3Smrg# distribute this file as part of a program that contains a 661032b578d3Smrg# configuration script generated by Autoconf, you may include it under 661132b578d3Smrg# the same distribution terms that you use for the rest of that program. 661232b578d3Smrg 661332b578d3Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 661432b578d3Smrg# ---------------------------------- 661532b578d3SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 661632b578d3Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 661732b578d3Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 661832b578d3SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 661932b578d3Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 662032b578d3Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 662132b578d3Smrgfi 662232b578d3Smrgif test -n "$PKG_CONFIG"; then 662332b578d3Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 662432b578d3Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 662532b578d3Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 662632b578d3Smrg AC_MSG_RESULT([yes]) 662732b578d3Smrg else 662832b578d3Smrg AC_MSG_RESULT([no]) 662932b578d3Smrg PKG_CONFIG="" 663032b578d3Smrg fi 663132b578d3Smrg 663232b578d3Smrgfi[]dnl 663332b578d3Smrg])# PKG_PROG_PKG_CONFIG 663432b578d3Smrg 663532b578d3Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 663632b578d3Smrg# 663732b578d3Smrg# Check to see whether a particular set of modules exists. Similar 663832b578d3Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 663932b578d3Smrg# 664032b578d3Smrg# 664132b578d3Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 664232b578d3Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 664332b578d3Smrg# PKG_CHECK_EXISTS manually 664432b578d3Smrg# -------------------------------------------------------------- 664532b578d3SmrgAC_DEFUN([PKG_CHECK_EXISTS], 664632b578d3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 664732b578d3Smrgif test -n "$PKG_CONFIG" && \ 664832b578d3Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 664932b578d3Smrg m4_ifval([$2], [$2], [:]) 665032b578d3Smrgm4_ifvaln([$3], [else 665132b578d3Smrg $3])dnl 665232b578d3Smrgfi]) 665332b578d3Smrg 665432b578d3Smrg 665532b578d3Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 665632b578d3Smrg# --------------------------------------------- 665732b578d3Smrgm4_define([_PKG_CONFIG], 665832b578d3Smrg[if test -n "$$1"; then 665932b578d3Smrg pkg_cv_[]$1="$$1" 666032b578d3Smrg elif test -n "$PKG_CONFIG"; then 666132b578d3Smrg PKG_CHECK_EXISTS([$3], 666232b578d3Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 666332b578d3Smrg [pkg_failed=yes]) 666432b578d3Smrg else 666532b578d3Smrg pkg_failed=untried 666632b578d3Smrgfi[]dnl 666732b578d3Smrg])# _PKG_CONFIG 666832b578d3Smrg 666932b578d3Smrg# _PKG_SHORT_ERRORS_SUPPORTED 667032b578d3Smrg# ----------------------------- 667132b578d3SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 667232b578d3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 667332b578d3Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 667432b578d3Smrg _pkg_short_errors_supported=yes 667532b578d3Smrgelse 667632b578d3Smrg _pkg_short_errors_supported=no 667732b578d3Smrgfi[]dnl 667832b578d3Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 667932b578d3Smrg 668032b578d3Smrg 668132b578d3Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 668232b578d3Smrg# [ACTION-IF-NOT-FOUND]) 668332b578d3Smrg# 668432b578d3Smrg# 668532b578d3Smrg# Note that if there is a possibility the first call to 668632b578d3Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 668732b578d3Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 668832b578d3Smrg# 668932b578d3Smrg# 669032b578d3Smrg# -------------------------------------------------------------- 669132b578d3SmrgAC_DEFUN([PKG_CHECK_MODULES], 669232b578d3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 669332b578d3SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 669432b578d3SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 669532b578d3Smrg 669632b578d3Smrgpkg_failed=no 669732b578d3SmrgAC_MSG_CHECKING([for $1]) 669832b578d3Smrg 669932b578d3Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 670032b578d3Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 670132b578d3Smrg 670232b578d3Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 670332b578d3Smrgand $1[]_LIBS to avoid the need to call pkg-config. 670432b578d3SmrgSee the pkg-config man page for more details.]) 670532b578d3Smrg 670632b578d3Smrgif test $pkg_failed = yes; then 670732b578d3Smrg _PKG_SHORT_ERRORS_SUPPORTED 670832b578d3Smrg if test $_pkg_short_errors_supported = yes; then 670932b578d3Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 671032b578d3Smrg else 671132b578d3Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 671232b578d3Smrg fi 671332b578d3Smrg # Put the nasty error message in config.log where it belongs 671432b578d3Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 671532b578d3Smrg 671632b578d3Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 671732b578d3Smrg[Package requirements ($2) were not met: 671832b578d3Smrg 671932b578d3Smrg$$1_PKG_ERRORS 672032b578d3Smrg 672132b578d3SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 672232b578d3Smrginstalled software in a non-standard prefix. 672332b578d3Smrg 672432b578d3Smrg_PKG_TEXT 672532b578d3Smrg])], 672632b578d3Smrg [AC_MSG_RESULT([no]) 672732b578d3Smrg $4]) 672832b578d3Smrgelif test $pkg_failed = untried; then 672932b578d3Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 673032b578d3Smrg[The pkg-config script could not be found or is too old. Make sure it 673132b578d3Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 673232b578d3Smrgpath to pkg-config. 673332b578d3Smrg 673432b578d3Smrg_PKG_TEXT 673532b578d3Smrg 673632b578d3SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 673732b578d3Smrg [$4]) 673832b578d3Smrgelse 673932b578d3Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 674032b578d3Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 674132b578d3Smrg AC_MSG_RESULT([yes]) 674232b578d3Smrg ifelse([$3], , :, [$3]) 674332b578d3Smrgfi[]dnl 674432b578d3Smrg])# PKG_CHECK_MODULES 674532b578d3Smrg 674632b578d3Smrgdnl 674732b578d3Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 674832b578d3Smrgdnl 674932b578d3Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 675032b578d3Smrgdnl copy of this software and associated documentation files (the 675132b578d3Smrgdnl "Software"), to deal in the Software without restriction, including 675232b578d3Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 675332b578d3Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 675432b578d3Smrgdnl to whom the Software is furnished to do so, provided that the above 675532b578d3Smrgdnl copyright notice(s) and this permission notice appear in all copies of 675632b578d3Smrgdnl the Software and that both the above copyright notice(s) and this 675732b578d3Smrgdnl permission notice appear in supporting documentation. 675832b578d3Smrgdnl 675932b578d3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 676032b578d3Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 676132b578d3Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 676232b578d3Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 676332b578d3Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 676432b578d3Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 676532b578d3Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 676632b578d3Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 676732b578d3Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 676832b578d3Smrgdnl 676932b578d3Smrgdnl Except as contained in this notice, the name of a copyright holder 677032b578d3Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 677132b578d3Smrgdnl or other dealings in this Software without prior written authorization 677232b578d3Smrgdnl of the copyright holder. 677332b578d3Smrg 677432b578d3Smrg# XORG_MACROS_VERSION(required-version) 677532b578d3Smrg# ------------------------------------- 677632b578d3Smrg# Minimum version: 1.1.0 677732b578d3Smrg# 677832b578d3Smrg# If you're using a macro added in Version 1.1 or newer, include this in 677932b578d3Smrg# your configure.ac with the minimum required version, such as: 678032b578d3Smrg# XORG_MACROS_VERSION(1.1) 678132b578d3Smrg# 678232b578d3Smrg# To force at least a version with this macro defined, also add: 678332b578d3Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 678432b578d3Smrg# 678532b578d3Smrg# 678632b578d3Smrg# See the "minimum version" comment for each macro you use to see what 678732b578d3Smrg# version you require. 678832b578d3SmrgAC_DEFUN([XORG_MACROS_VERSION],[ 678932b578d3Smrg [XORG_MACROS_needed_version=$1 679032b578d3Smrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 679132b578d3Smrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 679232b578d3Smrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 679332b578d3Smrg [XORG_MACROS_version=1.1.6 679432b578d3Smrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 679532b578d3Smrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 679632b578d3Smrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 679732b578d3Smrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 679832b578d3Smrg fi 679932b578d3Smrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 680032b578d3Smrg 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]) 680132b578d3Smrg fi 680232b578d3Smrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 680332b578d3Smrg]) # XORG_MACROS_VERSION 680432b578d3Smrg 680532b578d3Smrg# XORG_PROG_RAWCPP() 680632b578d3Smrg# ------------------ 680732b578d3Smrg# Minimum version: 1.0.0 680832b578d3Smrg# 680932b578d3Smrg# Find cpp program and necessary flags for use in pre-processing text files 681032b578d3Smrg# such as man pages and config files 681132b578d3SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 681232b578d3SmrgAC_REQUIRE([AC_PROG_CPP]) 681332b578d3SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 681432b578d3Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 681532b578d3Smrg 681632b578d3Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 681732b578d3Smrg# which is not the best choice for supporting other OS'es, but covers most 681832b578d3Smrg# of the ones we need for now. 681932b578d3SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 682032b578d3SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 682132b578d3Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 682232b578d3Smrg AC_MSG_RESULT([no]) 682332b578d3Smrgelse 682432b578d3Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 682532b578d3Smrg RAWCPPFLAGS=-undef 682632b578d3Smrg AC_MSG_RESULT([yes]) 682732b578d3Smrg else 682832b578d3Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 682932b578d3Smrg fi 683032b578d3Smrgfi 683132b578d3Smrgrm -f conftest.$ac_ext 683232b578d3Smrg 683332b578d3SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 683432b578d3SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 683532b578d3Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 683632b578d3Smrg AC_MSG_RESULT([no]) 683732b578d3Smrgelse 683832b578d3Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 683932b578d3Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 684032b578d3Smrg AC_MSG_RESULT([yes]) 684132b578d3Smrg else 684232b578d3Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 684332b578d3Smrg fi 684432b578d3Smrgfi 684532b578d3Smrgrm -f conftest.$ac_ext 684632b578d3SmrgAC_SUBST(RAWCPPFLAGS) 684732b578d3Smrg]) # XORG_PROG_RAWCPP 684832b578d3Smrg 684932b578d3Smrg# XORG_MANPAGE_SECTIONS() 685032b578d3Smrg# ----------------------- 685132b578d3Smrg# Minimum version: 1.0.0 685232b578d3Smrg# 685332b578d3Smrg# Determine which sections man pages go in for the different man page types 685432b578d3Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 685532b578d3Smrg# Not sure if there's any better way than just hardcoding by OS name. 685632b578d3Smrg# Override default settings by setting environment variables 685732b578d3Smrg 685832b578d3SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 685932b578d3SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 686032b578d3Smrg 686132b578d3Smrgif test x$APP_MAN_SUFFIX = x ; then 686232b578d3Smrg APP_MAN_SUFFIX=1 686332b578d3Smrgfi 686432b578d3Smrgif test x$APP_MAN_DIR = x ; then 686532b578d3Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 686632b578d3Smrgfi 686732b578d3Smrg 686832b578d3Smrgif test x$LIB_MAN_SUFFIX = x ; then 686932b578d3Smrg LIB_MAN_SUFFIX=3 687032b578d3Smrgfi 687132b578d3Smrgif test x$LIB_MAN_DIR = x ; then 687232b578d3Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 687332b578d3Smrgfi 687432b578d3Smrg 687532b578d3Smrgif test x$FILE_MAN_SUFFIX = x ; then 687632b578d3Smrg case $host_os in 687732b578d3Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 687832b578d3Smrg *) FILE_MAN_SUFFIX=5 ;; 687932b578d3Smrg esac 688032b578d3Smrgfi 688132b578d3Smrgif test x$FILE_MAN_DIR = x ; then 688232b578d3Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 688332b578d3Smrgfi 688432b578d3Smrg 688532b578d3Smrgif test x$MISC_MAN_SUFFIX = x ; then 688632b578d3Smrg case $host_os in 688732b578d3Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 688832b578d3Smrg *) MISC_MAN_SUFFIX=7 ;; 688932b578d3Smrg esac 689032b578d3Smrgfi 689132b578d3Smrgif test x$MISC_MAN_DIR = x ; then 689232b578d3Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 689332b578d3Smrgfi 689432b578d3Smrg 689532b578d3Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 689632b578d3Smrg case $host_os in 689732b578d3Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 689832b578d3Smrg *) DRIVER_MAN_SUFFIX=4 ;; 689932b578d3Smrg esac 690032b578d3Smrgfi 690132b578d3Smrgif test x$DRIVER_MAN_DIR = x ; then 690232b578d3Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 690332b578d3Smrgfi 690432b578d3Smrg 690532b578d3Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 690632b578d3Smrg case $host_os in 690732b578d3Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 690832b578d3Smrg *) ADMIN_MAN_SUFFIX=8 ;; 690932b578d3Smrg esac 691032b578d3Smrgfi 691132b578d3Smrgif test x$ADMIN_MAN_DIR = x ; then 691232b578d3Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 691332b578d3Smrgfi 691432b578d3Smrg 691532b578d3Smrg 691632b578d3SmrgAC_SUBST([APP_MAN_SUFFIX]) 691732b578d3SmrgAC_SUBST([LIB_MAN_SUFFIX]) 691832b578d3SmrgAC_SUBST([FILE_MAN_SUFFIX]) 691932b578d3SmrgAC_SUBST([MISC_MAN_SUFFIX]) 692032b578d3SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 692132b578d3SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 692232b578d3SmrgAC_SUBST([APP_MAN_DIR]) 692332b578d3SmrgAC_SUBST([LIB_MAN_DIR]) 692432b578d3SmrgAC_SUBST([FILE_MAN_DIR]) 692532b578d3SmrgAC_SUBST([MISC_MAN_DIR]) 692632b578d3SmrgAC_SUBST([DRIVER_MAN_DIR]) 692732b578d3SmrgAC_SUBST([ADMIN_MAN_DIR]) 692832b578d3Smrg]) # XORG_MANPAGE_SECTIONS 692932b578d3Smrg 693032b578d3Smrg# XORG_CHECK_LINUXDOC 693132b578d3Smrg# ------------------- 693232b578d3Smrg# Minimum version: 1.0.0 693332b578d3Smrg# 693432b578d3Smrg# Defines the variable MAKE_TEXT if the necessary tools and 693532b578d3Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 693632b578d3Smrg# Whether or not the necessary tools and files are found can be checked 693732b578d3Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 693832b578d3SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 693932b578d3SmrgXORG_SGML_PATH=$prefix/share/sgml 694032b578d3SmrgHAVE_DEFS_ENT= 694132b578d3Smrg 694232b578d3Smrgif test x"$cross_compiling" = x"yes" ; then 694332b578d3Smrg HAVE_DEFS_ENT=no 694432b578d3Smrgelse 694532b578d3Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 694632b578d3Smrgfi 694732b578d3Smrg 694832b578d3SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 694932b578d3SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 695032b578d3Smrg 695132b578d3SmrgAC_MSG_CHECKING([Whether to build documentation]) 695232b578d3Smrg 695332b578d3Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 695432b578d3Smrg BUILDDOC=yes 695532b578d3Smrgelse 695632b578d3Smrg BUILDDOC=no 695732b578d3Smrgfi 695832b578d3Smrg 695932b578d3SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 696032b578d3Smrg 696132b578d3SmrgAC_MSG_RESULT([$BUILDDOC]) 696232b578d3Smrg 696332b578d3SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 696432b578d3Smrg 696532b578d3Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 696632b578d3Smrg BUILDPDFDOC=yes 696732b578d3Smrgelse 696832b578d3Smrg BUILDPDFDOC=no 696932b578d3Smrgfi 697032b578d3Smrg 697132b578d3SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 697232b578d3Smrg 697332b578d3SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 697432b578d3Smrg 697532b578d3SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 697632b578d3SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 697732b578d3SmrgMAKE_PDF="$PS2PDF" 697832b578d3SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 697932b578d3Smrg 698032b578d3SmrgAC_SUBST(MAKE_TEXT) 698132b578d3SmrgAC_SUBST(MAKE_PS) 698232b578d3SmrgAC_SUBST(MAKE_PDF) 698332b578d3SmrgAC_SUBST(MAKE_HTML) 698432b578d3Smrg]) # XORG_CHECK_LINUXDOC 698532b578d3Smrg 698632b578d3Smrg# XORG_CHECK_DOCBOOK 698732b578d3Smrg# ------------------- 698832b578d3Smrg# Minimum version: 1.0.0 698932b578d3Smrg# 699032b578d3Smrg# Checks for the ability to build output formats from SGML DocBook source. 699132b578d3Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 699232b578d3Smrg# indicates whether the necessary tools and files are found and, if set, 699332b578d3Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 699432b578d3SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 699532b578d3SmrgXORG_SGML_PATH=$prefix/share/sgml 699632b578d3SmrgHAVE_DEFS_ENT= 699732b578d3SmrgBUILDTXTDOC=no 699832b578d3SmrgBUILDPDFDOC=no 699932b578d3SmrgBUILDPSDOC=no 700032b578d3SmrgBUILDHTMLDOC=no 700132b578d3Smrg 700232b578d3SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 700332b578d3Smrg 700432b578d3SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 700532b578d3SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 700632b578d3SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 700732b578d3SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 700832b578d3Smrg 700932b578d3SmrgAC_MSG_CHECKING([Whether to build text documentation]) 701032b578d3Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 701132b578d3Smrg test x$BUILD_TXTDOC != xno; then 701232b578d3Smrg BUILDTXTDOC=yes 701332b578d3Smrgfi 701432b578d3SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 701532b578d3SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 701632b578d3Smrg 701732b578d3SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 701832b578d3Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 701932b578d3Smrg test x$BUILD_PDFDOC != xno; then 702032b578d3Smrg BUILDPDFDOC=yes 702132b578d3Smrgfi 702232b578d3SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 702332b578d3SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 702432b578d3Smrg 702532b578d3SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 702632b578d3Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 702732b578d3Smrg test x$BUILD_PSDOC != xno; then 702832b578d3Smrg BUILDPSDOC=yes 702932b578d3Smrgfi 703032b578d3SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 703132b578d3SmrgAC_MSG_RESULT([$BUILDPSDOC]) 703232b578d3Smrg 703332b578d3SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 703432b578d3Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 703532b578d3Smrg test x$BUILD_HTMLDOC != xno; then 703632b578d3Smrg BUILDHTMLDOC=yes 703732b578d3Smrgfi 703832b578d3SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 703932b578d3SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 704032b578d3Smrg 704132b578d3SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 704232b578d3SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 704332b578d3SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 704432b578d3SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 704532b578d3Smrg 704632b578d3SmrgAC_SUBST(MAKE_TEXT) 704732b578d3SmrgAC_SUBST(MAKE_PS) 704832b578d3SmrgAC_SUBST(MAKE_PDF) 704932b578d3SmrgAC_SUBST(MAKE_HTML) 705032b578d3Smrg]) # XORG_CHECK_DOCBOOK 705132b578d3Smrg 705232b578d3Smrg# XORG_CHECK_MALLOC_ZERO 705332b578d3Smrg# ---------------------- 705432b578d3Smrg# Minimum version: 1.0.0 705532b578d3Smrg# 705632b578d3Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 705732b578d3Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 705832b578d3Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 705932b578d3SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 706032b578d3SmrgAC_ARG_ENABLE(malloc0returnsnull, 706132b578d3Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 706232b578d3Smrg [malloc(0) returns NULL (default: auto)]), 706332b578d3Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 706432b578d3Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 706532b578d3Smrg 706632b578d3SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 706732b578d3Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 706832b578d3Smrg AC_RUN_IFELSE([ 706932b578d3Smrgchar *malloc(); 707032b578d3Smrgchar *realloc(); 707132b578d3Smrgchar *calloc(); 707232b578d3Smrgmain() { 707332b578d3Smrg char *m0, *r0, *c0, *p; 707432b578d3Smrg m0 = malloc(0); 707532b578d3Smrg p = malloc(10); 707632b578d3Smrg r0 = realloc(p,0); 707732b578d3Smrg c0 = calloc(0); 707832b578d3Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 707932b578d3Smrg}], 708032b578d3Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 708132b578d3Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 708232b578d3Smrgfi 708332b578d3SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 708432b578d3Smrg 708532b578d3Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 708632b578d3Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 708732b578d3Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 708832b578d3Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 708932b578d3Smrgelse 709032b578d3Smrg MALLOC_ZERO_CFLAGS="" 709132b578d3Smrg XMALLOC_ZERO_CFLAGS="" 709232b578d3Smrg XTMALLOC_ZERO_CFLAGS="" 709332b578d3Smrgfi 709432b578d3Smrg 709532b578d3SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 709632b578d3SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 709732b578d3SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 709832b578d3Smrg]) # XORG_CHECK_MALLOC_ZERO 709932b578d3Smrg 710032b578d3Smrg# XORG_WITH_LINT() 710132b578d3Smrg# ---------------- 710232b578d3Smrg# Minimum version: 1.1.0 710332b578d3Smrg# 710432b578d3Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 710532b578d3Smrg# is specified. (Use --with-lint=sparse for sparse.) 710632b578d3Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 710732b578d3Smrg# Sets $LINT_FLAGS to flags to pass to source checker 710832b578d3Smrg# Sets LINT automake conditional if enabled (default: disabled) 710932b578d3Smrg# 711032b578d3SmrgAC_DEFUN([XORG_WITH_LINT],[ 711132b578d3Smrg 711232b578d3Smrg# Allow checking code with lint, sparse, etc. 711332b578d3SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 711432b578d3Smrg [Use a lint-style source code checker (default: disabled)])], 711532b578d3Smrg [use_lint=$withval], [use_lint=no]) 711632b578d3Smrgif test "x$use_lint" = "xyes" ; then 711732b578d3Smrg LINT="lint" 711832b578d3Smrgelse 711932b578d3Smrg LINT="$use_lint" 712032b578d3Smrgfi 712132b578d3Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 712232b578d3Smrg case $LINT in 712332b578d3Smrg lint|*/lint) 712432b578d3Smrg case $host_os in 712532b578d3Smrg solaris*) 712632b578d3Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 712732b578d3Smrg ;; 712832b578d3Smrg esac 712932b578d3Smrg ;; 713032b578d3Smrg esac 713132b578d3Smrgfi 713232b578d3Smrg 713332b578d3SmrgAC_SUBST(LINT) 713432b578d3SmrgAC_SUBST(LINT_FLAGS) 713532b578d3SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 713632b578d3Smrg 713732b578d3Smrg]) # XORG_WITH_LINT 713832b578d3Smrg 713932b578d3Smrg# XORG_LINT_LIBRARY(LIBNAME) 714032b578d3Smrg# -------------------------- 714132b578d3Smrg# Minimum version: 1.1.0 714232b578d3Smrg# 714332b578d3Smrg# Sets up flags for building lint libraries for checking programs that call 714432b578d3Smrg# functions in the library. 714532b578d3Smrg# Disabled by default, enable with --enable-lint-library 714632b578d3Smrg# Sets: 714732b578d3Smrg# @LINTLIB@ - name of lint library file to make 714832b578d3Smrg# MAKE_LINT_LIB - automake conditional 714932b578d3Smrg# 715032b578d3Smrg 715132b578d3SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 715232b578d3SmrgAC_REQUIRE([XORG_WITH_LINT]) 715332b578d3Smrg# Build lint "library" for more indepth checks of programs calling this library 715432b578d3SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 715532b578d3Smrg [Create lint library (default: disabled)])], 715632b578d3Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 715732b578d3Smrgif test "x$make_lint_lib" != "xno" ; then 715832b578d3Smrg if test "x$LINT" = "xno" ; then 715932b578d3Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 716032b578d3Smrg fi 716132b578d3Smrg if test "x$make_lint_lib" = "xyes" ; then 716232b578d3Smrg LINTLIB=llib-l$1.ln 716332b578d3Smrg else 716432b578d3Smrg LINTLIB=$make_lint_lib 716532b578d3Smrg fi 716632b578d3Smrgfi 716732b578d3SmrgAC_SUBST(LINTLIB) 716832b578d3SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 716932b578d3Smrg 717032b578d3Smrg]) # XORG_LINT_LIBRARY 717132b578d3Smrg 717232b578d3Smrgdnl Copyright 2005 Red Hat, Inc 717332b578d3Smrgdnl 717432b578d3Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 717532b578d3Smrgdnl documentation for any purpose is hereby granted without fee, provided that 717632b578d3Smrgdnl the above copyright notice appear in all copies and that both that 717732b578d3Smrgdnl copyright notice and this permission notice appear in supporting 717832b578d3Smrgdnl documentation. 717932b578d3Smrgdnl 718032b578d3Smrgdnl The above copyright notice and this permission notice shall be included 718132b578d3Smrgdnl in all copies or substantial portions of the Software. 718232b578d3Smrgdnl 718332b578d3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 718432b578d3Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 718532b578d3Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 718632b578d3Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 718732b578d3Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 718832b578d3Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 718932b578d3Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 719032b578d3Smrgdnl 719132b578d3Smrgdnl Except as contained in this notice, the name of the copyright holders shall 719232b578d3Smrgdnl not be used in advertising or otherwise to promote the sale, use or 719332b578d3Smrgdnl other dealings in this Software without prior written authorization 719432b578d3Smrgdnl from the copyright holders. 719532b578d3Smrgdnl 719632b578d3Smrg 719732b578d3Smrg# XORG_DRIVER_CHECK_EXT() 719832b578d3Smrg# -------------------------- 719932b578d3Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 720032b578d3Smrg# is defined, then add $1 to $REQUIRED_MODULES. 720132b578d3Smrg 720232b578d3SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 720332b578d3Smrg SAVE_CFLAGS="$CFLAGS" 720432b578d3Smrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 720532b578d3Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 720632b578d3Smrg#include "xorg-server.h" 720732b578d3Smrg#if !defined $1 720832b578d3Smrg#error $1 not defined 720932b578d3Smrg#endif 721032b578d3Smrg ]])], 721132b578d3Smrg [_EXT_CHECK=yes], 721232b578d3Smrg [_EXT_CHECK=no]) 721332b578d3Smrg CFLAGS="$SAVE_CFLAGS" 721432b578d3Smrg AC_MSG_CHECKING([if $1 is defined]) 721532b578d3Smrg AC_MSG_RESULT([$_EXT_CHECK]) 721632b578d3Smrg if test "$_EXT_CHECK" != no; then 721732b578d3Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 721832b578d3Smrg fi 721932b578d3Smrg]) 722032b578d3Smrg 722132b578d3Smrgdnl Copyright 2005 Red Hat, Inc 722232b578d3Smrgdnl 722332b578d3Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 722432b578d3Smrgdnl documentation for any purpose is hereby granted without fee, provided that 722532b578d3Smrgdnl the above copyright notice appear in all copies and that both that 722632b578d3Smrgdnl copyright notice and this permission notice appear in supporting 722732b578d3Smrgdnl documentation. 722832b578d3Smrgdnl 722932b578d3Smrgdnl The above copyright notice and this permission notice shall be included 723032b578d3Smrgdnl in all copies or substantial portions of the Software. 723132b578d3Smrgdnl 723232b578d3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 723332b578d3Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 723432b578d3Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 723532b578d3Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 723632b578d3Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 723732b578d3Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 723832b578d3Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 723932b578d3Smrgdnl 724032b578d3Smrgdnl Except as contained in this notice, the name of the copyright holders shall 724132b578d3Smrgdnl not be used in advertising or otherwise to promote the sale, use or 724232b578d3Smrgdnl other dealings in this Software without prior written authorization 724332b578d3Smrgdnl from the copyright holders. 724432b578d3Smrgdnl 724532b578d3Smrg 724632b578d3Smrg# XORG_RELEASE_VERSION 724732b578d3Smrg# -------------------- 724832b578d3Smrg# Adds --with/without-release-string and changes the PACKAGE and 724932b578d3Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 725032b578d3Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 725132b578d3Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 725232b578d3Smrg 725332b578d3SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 725432b578d3Smrg AC_ARG_WITH(release-version, 725532b578d3Smrg AC_HELP_STRING([--with-release-version=STRING], 725632b578d3Smrg [Use release version string in package name]), 725732b578d3Smrg [RELEASE_VERSION="$withval"], 725832b578d3Smrg [RELEASE_VERSION=""]) 725932b578d3Smrg if test "x$RELEASE_VERSION" != "x"; then 726032b578d3Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 726132b578d3Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 726232b578d3Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 726332b578d3Smrg fi 726432b578d3Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 726532b578d3Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 726632b578d3Smrg [Major version of this package]) 726732b578d3Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 726832b578d3Smrg if test "x$PVM" = "x"; then 726932b578d3Smrg PVM="0" 727032b578d3Smrg fi 727132b578d3Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 727232b578d3Smrg [$PVM], 727332b578d3Smrg [Minor version of this package]) 727432b578d3Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 727532b578d3Smrg if test "x$PVP" = "x"; then 727632b578d3Smrg PVP="0" 727732b578d3Smrg fi 727832b578d3Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 727932b578d3Smrg [$PVP], 728032b578d3Smrg [Patch version of this package]) 728132b578d3Smrg]) 728232b578d3Smrg 728332b578d3Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. 728432b578d3Smrg# 728532b578d3Smrg# This file is free software; the Free Software Foundation 728632b578d3Smrg# gives unlimited permission to copy and/or distribute it, 728732b578d3Smrg# with or without modifications, as long as this notice is preserved. 728832b578d3Smrg 728932b578d3Smrg# AM_AUTOMAKE_VERSION(VERSION) 729032b578d3Smrg# ---------------------------- 729132b578d3Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 729232b578d3Smrg# generated from the m4 files accompanying Automake X.Y. 729332b578d3Smrg# (This private macro should not be called outside this file.) 729432b578d3SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 729532b578d3Smrg[am__api_version='1.10' 729632b578d3Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 729732b578d3Smrgdnl require some minimum version. Point them to the right macro. 729832b578d3Smrgm4_if([$1], [1.10.1], [], 729932b578d3Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 730032b578d3Smrg]) 730132b578d3Smrg 730232b578d3Smrg# _AM_AUTOCONF_VERSION(VERSION) 730332b578d3Smrg# ----------------------------- 730432b578d3Smrg# aclocal traces this macro to find the Autoconf version. 730532b578d3Smrg# This is a private macro too. Using m4_define simplifies 730632b578d3Smrg# the logic in aclocal, which can simply ignore this definition. 730732b578d3Smrgm4_define([_AM_AUTOCONF_VERSION], []) 730832b578d3Smrg 730932b578d3Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 731032b578d3Smrg# ------------------------------- 731132b578d3Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 731232b578d3Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 731332b578d3SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 731432b578d3Smrg[AM_AUTOMAKE_VERSION([1.10.1])dnl 731532b578d3Smrgm4_ifndef([AC_AUTOCONF_VERSION], 731632b578d3Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 731732b578d3Smrg_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) 731832b578d3Smrg 731932b578d3Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 732032b578d3Smrg 732132b578d3Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 732232b578d3Smrg# 732332b578d3Smrg# This file is free software; the Free Software Foundation 732432b578d3Smrg# gives unlimited permission to copy and/or distribute it, 732532b578d3Smrg# with or without modifications, as long as this notice is preserved. 732632b578d3Smrg 732732b578d3Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 732832b578d3Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 732932b578d3Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 733032b578d3Smrg# 733132b578d3Smrg# Of course, Automake must honor this variable whenever it calls a 733232b578d3Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 733332b578d3Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 733432b578d3Smrg# depending on how configure is run. This is pretty annoying, since 733532b578d3Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 733632b578d3Smrg# source directory, any form will work fine, but in subdirectories a 733732b578d3Smrg# relative path needs to be adjusted first. 733832b578d3Smrg# 733932b578d3Smrg# $ac_aux_dir/missing 734032b578d3Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 734132b578d3Smrg# $top_srcdir/$ac_aux_dir/missing 734232b578d3Smrg# fails if $ac_aux_dir is absolute, 734332b578d3Smrg# fails when called from a subdirectory in a VPATH build with 734432b578d3Smrg# a relative $ac_aux_dir 734532b578d3Smrg# 734632b578d3Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 734732b578d3Smrg# are both prefixed by $srcdir. In an in-source build this is usually 734832b578d3Smrg# harmless because $srcdir is `.', but things will broke when you 734932b578d3Smrg# start a VPATH build or use an absolute $srcdir. 735032b578d3Smrg# 735132b578d3Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 735232b578d3Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 735332b578d3Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 735432b578d3Smrg# and then we would define $MISSING as 735532b578d3Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 735632b578d3Smrg# This will work as long as MISSING is not called from configure, because 735732b578d3Smrg# unfortunately $(top_srcdir) has no meaning in configure. 735832b578d3Smrg# However there are other variables, like CC, which are often used in 735932b578d3Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 736032b578d3Smrg# 736132b578d3Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 736232b578d3Smrg# absolute PATH. The drawback is that using absolute paths prevent a 736332b578d3Smrg# configured tree to be moved without reconfiguration. 736432b578d3Smrg 736532b578d3SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 736632b578d3Smrg[dnl Rely on autoconf to set up CDPATH properly. 736732b578d3SmrgAC_PREREQ([2.50])dnl 736832b578d3Smrg# expand $ac_aux_dir to an absolute path 736932b578d3Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 737032b578d3Smrg]) 737132b578d3Smrg 737232b578d3Smrg# AM_CONDITIONAL -*- Autoconf -*- 737332b578d3Smrg 737432b578d3Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 737532b578d3Smrg# Free Software Foundation, Inc. 737632b578d3Smrg# 737732b578d3Smrg# This file is free software; the Free Software Foundation 737832b578d3Smrg# gives unlimited permission to copy and/or distribute it, 737932b578d3Smrg# with or without modifications, as long as this notice is preserved. 738032b578d3Smrg 738132b578d3Smrg# serial 8 738232b578d3Smrg 738332b578d3Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 738432b578d3Smrg# ------------------------------------- 738532b578d3Smrg# Define a conditional. 738632b578d3SmrgAC_DEFUN([AM_CONDITIONAL], 738732b578d3Smrg[AC_PREREQ(2.52)dnl 738832b578d3Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 738932b578d3Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 739032b578d3SmrgAC_SUBST([$1_TRUE])dnl 739132b578d3SmrgAC_SUBST([$1_FALSE])dnl 739232b578d3Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 739332b578d3Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 739432b578d3Smrgif $2; then 739532b578d3Smrg $1_TRUE= 739632b578d3Smrg $1_FALSE='#' 739732b578d3Smrgelse 739832b578d3Smrg $1_TRUE='#' 739932b578d3Smrg $1_FALSE= 740032b578d3Smrgfi 740132b578d3SmrgAC_CONFIG_COMMANDS_PRE( 740232b578d3Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 740332b578d3Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 740432b578d3SmrgUsually this means the macro was only invoked conditionally.]]) 740532b578d3Smrgfi])]) 740632b578d3Smrg 740732b578d3Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 740832b578d3Smrg# Free Software Foundation, Inc. 740932b578d3Smrg# 741032b578d3Smrg# This file is free software; the Free Software Foundation 741132b578d3Smrg# gives unlimited permission to copy and/or distribute it, 741232b578d3Smrg# with or without modifications, as long as this notice is preserved. 741332b578d3Smrg 741432b578d3Smrg# serial 9 741532b578d3Smrg 741632b578d3Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 741732b578d3Smrg# written in clear, in which case automake, when reading aclocal.m4, 741832b578d3Smrg# will think it sees a *use*, and therefore will trigger all it's 741932b578d3Smrg# C support machinery. Also note that it means that autoscan, seeing 742032b578d3Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 742132b578d3Smrg 742232b578d3Smrg 742332b578d3Smrg# _AM_DEPENDENCIES(NAME) 742432b578d3Smrg# ---------------------- 742532b578d3Smrg# See how the compiler implements dependency checking. 742632b578d3Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 742732b578d3Smrg# We try a few techniques and use that to set a single cache variable. 742832b578d3Smrg# 742932b578d3Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 743032b578d3Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 743132b578d3Smrg# dependency, and given that the user is not expected to run this macro, 743232b578d3Smrg# just rely on AC_PROG_CC. 743332b578d3SmrgAC_DEFUN([_AM_DEPENDENCIES], 743432b578d3Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 743532b578d3SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 743632b578d3SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 743732b578d3SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 743832b578d3Smrg 743932b578d3Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 744032b578d3Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 744132b578d3Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 744232b578d3Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 744332b578d3Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 744432b578d3Smrg [depcc="$$1" am_compiler_list=]) 744532b578d3Smrg 744632b578d3SmrgAC_CACHE_CHECK([dependency style of $depcc], 744732b578d3Smrg [am_cv_$1_dependencies_compiler_type], 744832b578d3Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 744932b578d3Smrg # We make a subdir and do the tests there. Otherwise we can end up 745032b578d3Smrg # making bogus files that we don't know about and never remove. For 745132b578d3Smrg # instance it was reported that on HP-UX the gcc test will end up 745232b578d3Smrg # making a dummy file named `D' -- because `-MD' means `put the output 745332b578d3Smrg # in D'. 745432b578d3Smrg mkdir conftest.dir 745532b578d3Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 745632b578d3Smrg # using a relative directory. 745732b578d3Smrg cp "$am_depcomp" conftest.dir 745832b578d3Smrg cd conftest.dir 745932b578d3Smrg # We will build objects and dependencies in a subdirectory because 746032b578d3Smrg # it helps to detect inapplicable dependency modes. For instance 746132b578d3Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 746232b578d3Smrg # side effect of compilation, but ICC will put the dependencies in 746332b578d3Smrg # the current directory while Tru64 will put them in the object 746432b578d3Smrg # directory. 746532b578d3Smrg mkdir sub 746632b578d3Smrg 746732b578d3Smrg am_cv_$1_dependencies_compiler_type=none 746832b578d3Smrg if test "$am_compiler_list" = ""; then 746932b578d3Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 747032b578d3Smrg fi 747132b578d3Smrg for depmode in $am_compiler_list; do 747232b578d3Smrg # Setup a source with many dependencies, because some compilers 747332b578d3Smrg # like to wrap large dependency lists on column 80 (with \), and 747432b578d3Smrg # we should not choose a depcomp mode which is confused by this. 747532b578d3Smrg # 747632b578d3Smrg # We need to recreate these files for each test, as the compiler may 747732b578d3Smrg # overwrite some of them when testing with obscure command lines. 747832b578d3Smrg # This happens at least with the AIX C compiler. 747932b578d3Smrg : > sub/conftest.c 748032b578d3Smrg for i in 1 2 3 4 5 6; do 748132b578d3Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 748232b578d3Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 748332b578d3Smrg # Solaris 8's {/usr,}/bin/sh. 748432b578d3Smrg touch sub/conftst$i.h 748532b578d3Smrg done 748632b578d3Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 748732b578d3Smrg 748832b578d3Smrg case $depmode in 748932b578d3Smrg nosideeffect) 749032b578d3Smrg # after this tag, mechanisms are not by side-effect, so they'll 749132b578d3Smrg # only be used when explicitly requested 749232b578d3Smrg if test "x$enable_dependency_tracking" = xyes; then 749332b578d3Smrg continue 749432b578d3Smrg else 749532b578d3Smrg break 749632b578d3Smrg fi 749732b578d3Smrg ;; 749832b578d3Smrg none) break ;; 749932b578d3Smrg esac 750032b578d3Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 750132b578d3Smrg # mode. It turns out that the SunPro C++ compiler does not properly 750232b578d3Smrg # handle `-M -o', and we need to detect this. 750332b578d3Smrg if depmode=$depmode \ 750432b578d3Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 750532b578d3Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 750632b578d3Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 750732b578d3Smrg >/dev/null 2>conftest.err && 750832b578d3Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 750932b578d3Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 751032b578d3Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 751132b578d3Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 751232b578d3Smrg # icc doesn't choke on unknown options, it will just issue warnings 751332b578d3Smrg # or remarks (even with -Werror). So we grep stderr for any message 751432b578d3Smrg # that says an option was ignored or not supported. 751532b578d3Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 751632b578d3Smrg # icc: Command line warning: ignoring option '-M'; no argument required 751732b578d3Smrg # The diagnosis changed in icc 8.0: 751832b578d3Smrg # icc: Command line remark: option '-MP' not supported 751932b578d3Smrg if (grep 'ignoring option' conftest.err || 752032b578d3Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 752132b578d3Smrg am_cv_$1_dependencies_compiler_type=$depmode 752232b578d3Smrg break 752332b578d3Smrg fi 752432b578d3Smrg fi 752532b578d3Smrg done 752632b578d3Smrg 752732b578d3Smrg cd .. 752832b578d3Smrg rm -rf conftest.dir 752932b578d3Smrgelse 753032b578d3Smrg am_cv_$1_dependencies_compiler_type=none 753132b578d3Smrgfi 753232b578d3Smrg]) 753332b578d3SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 753432b578d3SmrgAM_CONDITIONAL([am__fastdep$1], [ 753532b578d3Smrg test "x$enable_dependency_tracking" != xno \ 753632b578d3Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 753732b578d3Smrg]) 753832b578d3Smrg 753932b578d3Smrg 754032b578d3Smrg# AM_SET_DEPDIR 754132b578d3Smrg# ------------- 754232b578d3Smrg# Choose a directory name for dependency files. 754332b578d3Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 754432b578d3SmrgAC_DEFUN([AM_SET_DEPDIR], 754532b578d3Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 754632b578d3SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 754732b578d3Smrg]) 754832b578d3Smrg 754932b578d3Smrg 755032b578d3Smrg# AM_DEP_TRACK 755132b578d3Smrg# ------------ 755232b578d3SmrgAC_DEFUN([AM_DEP_TRACK], 755332b578d3Smrg[AC_ARG_ENABLE(dependency-tracking, 755432b578d3Smrg[ --disable-dependency-tracking speeds up one-time build 755532b578d3Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 755632b578d3Smrgif test "x$enable_dependency_tracking" != xno; then 755732b578d3Smrg am_depcomp="$ac_aux_dir/depcomp" 755832b578d3Smrg AMDEPBACKSLASH='\' 755932b578d3Smrgfi 756032b578d3SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 756132b578d3SmrgAC_SUBST([AMDEPBACKSLASH])dnl 756232b578d3Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 756332b578d3Smrg]) 756432b578d3Smrg 756532b578d3Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 756632b578d3Smrg 756732b578d3Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 756832b578d3Smrg# Free Software Foundation, Inc. 756932b578d3Smrg# 757032b578d3Smrg# This file is free software; the Free Software Foundation 757132b578d3Smrg# gives unlimited permission to copy and/or distribute it, 757232b578d3Smrg# with or without modifications, as long as this notice is preserved. 757332b578d3Smrg 757432b578d3Smrg#serial 3 757532b578d3Smrg 757632b578d3Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 757732b578d3Smrg# ------------------------------ 757832b578d3SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 757932b578d3Smrg[for mf in $CONFIG_FILES; do 758032b578d3Smrg # Strip MF so we end up with the name of the file. 758132b578d3Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 758232b578d3Smrg # Check whether this is an Automake generated Makefile or not. 758332b578d3Smrg # We used to match only the files named `Makefile.in', but 758432b578d3Smrg # some people rename them; so instead we look at the file content. 758532b578d3Smrg # Grep'ing the first line is not enough: some people post-process 758632b578d3Smrg # each Makefile.in and add a new line on top of each file to say so. 758732b578d3Smrg # Grep'ing the whole file is not good either: AIX grep has a line 758832b578d3Smrg # limit of 2048, but all sed's we know have understand at least 4000. 758932b578d3Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 759032b578d3Smrg dirpart=`AS_DIRNAME("$mf")` 759132b578d3Smrg else 759232b578d3Smrg continue 759332b578d3Smrg fi 759432b578d3Smrg # Extract the definition of DEPDIR, am__include, and am__quote 759532b578d3Smrg # from the Makefile without running `make'. 759632b578d3Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 759732b578d3Smrg test -z "$DEPDIR" && continue 759832b578d3Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 759932b578d3Smrg test -z "am__include" && continue 760032b578d3Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 760132b578d3Smrg # When using ansi2knr, U may be empty or an underscore; expand it 760232b578d3Smrg U=`sed -n 's/^U = //p' < "$mf"` 760332b578d3Smrg # Find all dependency output files, they are included files with 760432b578d3Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 760532b578d3Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 760632b578d3Smrg # expansion. 760732b578d3Smrg for file in `sed -n " 760832b578d3Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 760932b578d3Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 761032b578d3Smrg # Make sure the directory exists. 761132b578d3Smrg test -f "$dirpart/$file" && continue 761232b578d3Smrg fdir=`AS_DIRNAME(["$file"])` 761332b578d3Smrg AS_MKDIR_P([$dirpart/$fdir]) 761432b578d3Smrg # echo "creating $dirpart/$file" 761532b578d3Smrg echo '# dummy' > "$dirpart/$file" 761632b578d3Smrg done 761732b578d3Smrgdone 761832b578d3Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 761932b578d3Smrg 762032b578d3Smrg 762132b578d3Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 762232b578d3Smrg# ----------------------------- 762332b578d3Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 762432b578d3Smrg# 762532b578d3Smrg# This code is only required when automatic dependency tracking 762632b578d3Smrg# is enabled. FIXME. This creates each `.P' file that we will 762732b578d3Smrg# need in order to bootstrap the dependency handling code. 762832b578d3SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 762932b578d3Smrg[AC_CONFIG_COMMANDS([depfiles], 763032b578d3Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 763132b578d3Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 763232b578d3Smrg]) 763332b578d3Smrg 763432b578d3Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 763532b578d3Smrg# Free Software Foundation, Inc. 763632b578d3Smrg# 763732b578d3Smrg# This file is free software; the Free Software Foundation 763832b578d3Smrg# gives unlimited permission to copy and/or distribute it, 763932b578d3Smrg# with or without modifications, as long as this notice is preserved. 764032b578d3Smrg 764132b578d3Smrg# serial 8 764232b578d3Smrg 764332b578d3Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 764432b578d3SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 764532b578d3Smrg 764632b578d3Smrg# Do all the work for Automake. -*- Autoconf -*- 764732b578d3Smrg 764832b578d3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 764932b578d3Smrg# 2005, 2006, 2008 Free Software Foundation, Inc. 765032b578d3Smrg# 765132b578d3Smrg# This file is free software; the Free Software Foundation 765232b578d3Smrg# gives unlimited permission to copy and/or distribute it, 765332b578d3Smrg# with or without modifications, as long as this notice is preserved. 765432b578d3Smrg 765532b578d3Smrg# serial 13 765632b578d3Smrg 765732b578d3Smrg# This macro actually does too much. Some checks are only needed if 765832b578d3Smrg# your package does certain things. But this isn't really a big deal. 765932b578d3Smrg 766032b578d3Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 766132b578d3Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 766232b578d3Smrg# ----------------------------------------------- 766332b578d3Smrg# The call with PACKAGE and VERSION arguments is the old style 766432b578d3Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 766532b578d3Smrg# and VERSION should now be passed to AC_INIT and removed from 766632b578d3Smrg# the call to AM_INIT_AUTOMAKE. 766732b578d3Smrg# We support both call styles for the transition. After 766832b578d3Smrg# the next Automake release, Autoconf can make the AC_INIT 766932b578d3Smrg# arguments mandatory, and then we can depend on a new Autoconf 767032b578d3Smrg# release and drop the old call support. 767132b578d3SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 767232b578d3Smrg[AC_PREREQ([2.60])dnl 767332b578d3Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 767432b578d3Smrgdnl the ones we care about. 767532b578d3Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 767632b578d3SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 767732b578d3SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 767832b578d3Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 767932b578d3Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 768032b578d3Smrg # is not polluted with repeated "-I." 768132b578d3Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 768232b578d3Smrg # test to see if srcdir already configured 768332b578d3Smrg if test -f $srcdir/config.status; then 768432b578d3Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 768532b578d3Smrg fi 768632b578d3Smrgfi 768732b578d3Smrg 768832b578d3Smrg# test whether we have cygpath 768932b578d3Smrgif test -z "$CYGPATH_W"; then 769032b578d3Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 769132b578d3Smrg CYGPATH_W='cygpath -w' 769232b578d3Smrg else 769332b578d3Smrg CYGPATH_W=echo 769432b578d3Smrg fi 769532b578d3Smrgfi 769632b578d3SmrgAC_SUBST([CYGPATH_W]) 769732b578d3Smrg 769832b578d3Smrg# Define the identity of the package. 769932b578d3Smrgdnl Distinguish between old-style and new-style calls. 770032b578d3Smrgm4_ifval([$2], 770132b578d3Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 770232b578d3Smrg AC_SUBST([PACKAGE], [$1])dnl 770332b578d3Smrg AC_SUBST([VERSION], [$2])], 770432b578d3Smrg[_AM_SET_OPTIONS([$1])dnl 770532b578d3Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 770632b578d3Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 770732b578d3Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 770832b578d3Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 770932b578d3Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 771032b578d3Smrg 771132b578d3Smrg_AM_IF_OPTION([no-define],, 771232b578d3Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 771332b578d3Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 771432b578d3Smrg 771532b578d3Smrg# Some tools Automake needs. 771632b578d3SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 771732b578d3SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 771832b578d3SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 771932b578d3SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 772032b578d3SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 772132b578d3SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 772232b578d3SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 772332b578d3SmrgAM_PROG_INSTALL_SH 772432b578d3SmrgAM_PROG_INSTALL_STRIP 772532b578d3SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 772632b578d3Smrg# We need awk for the "check" target. The system "awk" is bad on 772732b578d3Smrg# some platforms. 772832b578d3SmrgAC_REQUIRE([AC_PROG_AWK])dnl 772932b578d3SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 773032b578d3SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 773132b578d3Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 773232b578d3Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 773332b578d3Smrg [_AM_PROG_TAR([v7])])]) 773432b578d3Smrg_AM_IF_OPTION([no-dependencies],, 773532b578d3Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 773632b578d3Smrg [_AM_DEPENDENCIES(CC)], 773732b578d3Smrg [define([AC_PROG_CC], 773832b578d3Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 773932b578d3SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 774032b578d3Smrg [_AM_DEPENDENCIES(CXX)], 774132b578d3Smrg [define([AC_PROG_CXX], 774232b578d3Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 774332b578d3SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 774432b578d3Smrg [_AM_DEPENDENCIES(OBJC)], 774532b578d3Smrg [define([AC_PROG_OBJC], 774632b578d3Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 774732b578d3Smrg]) 774832b578d3Smrg]) 774932b578d3Smrg 775032b578d3Smrg 775132b578d3Smrg# When config.status generates a header, we must update the stamp-h file. 775232b578d3Smrg# This file resides in the same directory as the config header 775332b578d3Smrg# that is generated. The stamp files are numbered to have different names. 775432b578d3Smrg 775532b578d3Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 775632b578d3Smrg# loop where config.status creates the headers, so we can generate 775732b578d3Smrg# our stamp files there. 775832b578d3SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 775932b578d3Smrg[# Compute $1's index in $config_headers. 776032b578d3Smrg_am_arg=$1 776132b578d3Smrg_am_stamp_count=1 776232b578d3Smrgfor _am_header in $config_headers :; do 776332b578d3Smrg case $_am_header in 776432b578d3Smrg $_am_arg | $_am_arg:* ) 776532b578d3Smrg break ;; 776632b578d3Smrg * ) 776732b578d3Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 776832b578d3Smrg esac 776932b578d3Smrgdone 777032b578d3Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 777132b578d3Smrg 777232b578d3Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 777332b578d3Smrg# 777432b578d3Smrg# This file is free software; the Free Software Foundation 777532b578d3Smrg# gives unlimited permission to copy and/or distribute it, 777632b578d3Smrg# with or without modifications, as long as this notice is preserved. 777732b578d3Smrg 777832b578d3Smrg# AM_PROG_INSTALL_SH 777932b578d3Smrg# ------------------ 778032b578d3Smrg# Define $install_sh. 778132b578d3SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 778232b578d3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 778332b578d3Smrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 778432b578d3SmrgAC_SUBST(install_sh)]) 778532b578d3Smrg 778632b578d3Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 778732b578d3Smrg# 778832b578d3Smrg# This file is free software; the Free Software Foundation 778932b578d3Smrg# gives unlimited permission to copy and/or distribute it, 779032b578d3Smrg# with or without modifications, as long as this notice is preserved. 779132b578d3Smrg 779232b578d3Smrg# serial 2 779332b578d3Smrg 779432b578d3Smrg# Check whether the underlying file-system supports filenames 779532b578d3Smrg# with a leading dot. For instance MS-DOS doesn't. 779632b578d3SmrgAC_DEFUN([AM_SET_LEADING_DOT], 779732b578d3Smrg[rm -rf .tst 2>/dev/null 779832b578d3Smrgmkdir .tst 2>/dev/null 779932b578d3Smrgif test -d .tst; then 780032b578d3Smrg am__leading_dot=. 780132b578d3Smrgelse 780232b578d3Smrg am__leading_dot=_ 780332b578d3Smrgfi 780432b578d3Smrgrmdir .tst 2>/dev/null 780532b578d3SmrgAC_SUBST([am__leading_dot])]) 780632b578d3Smrg 780732b578d3Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 780832b578d3Smrg# From Jim Meyering 780932b578d3Smrg 781032b578d3Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 781132b578d3Smrg# Free Software Foundation, Inc. 781232b578d3Smrg# 781332b578d3Smrg# This file is free software; the Free Software Foundation 781432b578d3Smrg# gives unlimited permission to copy and/or distribute it, 781532b578d3Smrg# with or without modifications, as long as this notice is preserved. 781632b578d3Smrg 781732b578d3Smrg# serial 4 781832b578d3Smrg 781932b578d3SmrgAC_DEFUN([AM_MAINTAINER_MODE], 782032b578d3Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 782132b578d3Smrg dnl maintainer-mode is disabled by default 782232b578d3Smrg AC_ARG_ENABLE(maintainer-mode, 782332b578d3Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 782432b578d3Smrg (and sometimes confusing) to the casual installer], 782532b578d3Smrg USE_MAINTAINER_MODE=$enableval, 782632b578d3Smrg USE_MAINTAINER_MODE=no) 782732b578d3Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 782832b578d3Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 782932b578d3Smrg MAINT=$MAINTAINER_MODE_TRUE 783032b578d3Smrg AC_SUBST(MAINT)dnl 783132b578d3Smrg] 783232b578d3Smrg) 783332b578d3Smrg 783432b578d3SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 783532b578d3Smrg 783632b578d3Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 783732b578d3Smrg 783832b578d3Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 783932b578d3Smrg# 784032b578d3Smrg# This file is free software; the Free Software Foundation 784132b578d3Smrg# gives unlimited permission to copy and/or distribute it, 784232b578d3Smrg# with or without modifications, as long as this notice is preserved. 784332b578d3Smrg 784432b578d3Smrg# serial 3 784532b578d3Smrg 784632b578d3Smrg# AM_MAKE_INCLUDE() 784732b578d3Smrg# ----------------- 784832b578d3Smrg# Check to see how make treats includes. 784932b578d3SmrgAC_DEFUN([AM_MAKE_INCLUDE], 785032b578d3Smrg[am_make=${MAKE-make} 785132b578d3Smrgcat > confinc << 'END' 785232b578d3Smrgam__doit: 785332b578d3Smrg @echo done 785432b578d3Smrg.PHONY: am__doit 785532b578d3SmrgEND 785632b578d3Smrg# If we don't find an include directive, just comment out the code. 785732b578d3SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 785832b578d3Smrgam__include="#" 785932b578d3Smrgam__quote= 786032b578d3Smrg_am_result=none 786132b578d3Smrg# First try GNU make style include. 786232b578d3Smrgecho "include confinc" > confmf 786332b578d3Smrg# We grep out `Entering directory' and `Leaving directory' 786432b578d3Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 786532b578d3Smrg# In particular we don't look at `^make:' because GNU make might 786632b578d3Smrg# be invoked under some other name (usually "gmake"), in which 786732b578d3Smrg# case it prints its new name instead of `make'. 786832b578d3Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 786932b578d3Smrg am__include=include 787032b578d3Smrg am__quote= 787132b578d3Smrg _am_result=GNU 787232b578d3Smrgfi 787332b578d3Smrg# Now try BSD make style include. 787432b578d3Smrgif test "$am__include" = "#"; then 787532b578d3Smrg echo '.include "confinc"' > confmf 787632b578d3Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 787732b578d3Smrg am__include=.include 787832b578d3Smrg am__quote="\"" 787932b578d3Smrg _am_result=BSD 788032b578d3Smrg fi 788132b578d3Smrgfi 788232b578d3SmrgAC_SUBST([am__include]) 788332b578d3SmrgAC_SUBST([am__quote]) 788432b578d3SmrgAC_MSG_RESULT([$_am_result]) 788532b578d3Smrgrm -f confinc confmf 788632b578d3Smrg]) 788732b578d3Smrg 788832b578d3Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 788932b578d3Smrg 789032b578d3Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 789132b578d3Smrg# Free Software Foundation, Inc. 789232b578d3Smrg# 789332b578d3Smrg# This file is free software; the Free Software Foundation 789432b578d3Smrg# gives unlimited permission to copy and/or distribute it, 789532b578d3Smrg# with or without modifications, as long as this notice is preserved. 789632b578d3Smrg 789732b578d3Smrg# serial 5 789832b578d3Smrg 789932b578d3Smrg# AM_MISSING_PROG(NAME, PROGRAM) 790032b578d3Smrg# ------------------------------ 790132b578d3SmrgAC_DEFUN([AM_MISSING_PROG], 790232b578d3Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 790332b578d3Smrg$1=${$1-"${am_missing_run}$2"} 790432b578d3SmrgAC_SUBST($1)]) 790532b578d3Smrg 790632b578d3Smrg 790732b578d3Smrg# AM_MISSING_HAS_RUN 790832b578d3Smrg# ------------------ 790932b578d3Smrg# Define MISSING if not defined so far and test if it supports --run. 791032b578d3Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 791132b578d3SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 791232b578d3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 791332b578d3SmrgAC_REQUIRE_AUX_FILE([missing])dnl 791432b578d3Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 791532b578d3Smrg# Use eval to expand $SHELL 791632b578d3Smrgif eval "$MISSING --run true"; then 791732b578d3Smrg am_missing_run="$MISSING --run " 791832b578d3Smrgelse 791932b578d3Smrg am_missing_run= 792032b578d3Smrg AC_MSG_WARN([`missing' script is too old or missing]) 792132b578d3Smrgfi 792232b578d3Smrg]) 792332b578d3Smrg 792432b578d3Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 792532b578d3Smrg# 792632b578d3Smrg# This file is free software; the Free Software Foundation 792732b578d3Smrg# gives unlimited permission to copy and/or distribute it, 792832b578d3Smrg# with or without modifications, as long as this notice is preserved. 792932b578d3Smrg 793032b578d3Smrg# AM_PROG_MKDIR_P 793132b578d3Smrg# --------------- 793232b578d3Smrg# Check for `mkdir -p'. 793332b578d3SmrgAC_DEFUN([AM_PROG_MKDIR_P], 793432b578d3Smrg[AC_PREREQ([2.60])dnl 793532b578d3SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 793632b578d3Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 793732b578d3Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 793832b578d3Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 793932b578d3Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 794032b578d3Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 794132b578d3Smrgdnl adjustment using top_builddir (which is defined more often than 794232b578d3Smrgdnl MKDIR_P). 794332b578d3SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 794432b578d3Smrgcase $mkdir_p in 794532b578d3Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 794632b578d3Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 794732b578d3Smrgesac 794832b578d3Smrg]) 794932b578d3Smrg 795032b578d3Smrg# Helper functions for option handling. -*- Autoconf -*- 795132b578d3Smrg 795232b578d3Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 795332b578d3Smrg# 795432b578d3Smrg# This file is free software; the Free Software Foundation 795532b578d3Smrg# gives unlimited permission to copy and/or distribute it, 795632b578d3Smrg# with or without modifications, as long as this notice is preserved. 795732b578d3Smrg 795832b578d3Smrg# serial 3 795932b578d3Smrg 796032b578d3Smrg# _AM_MANGLE_OPTION(NAME) 796132b578d3Smrg# ----------------------- 796232b578d3SmrgAC_DEFUN([_AM_MANGLE_OPTION], 796332b578d3Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 796432b578d3Smrg 796532b578d3Smrg# _AM_SET_OPTION(NAME) 796632b578d3Smrg# ------------------------------ 796732b578d3Smrg# Set option NAME. Presently that only means defining a flag for this option. 796832b578d3SmrgAC_DEFUN([_AM_SET_OPTION], 796932b578d3Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 797032b578d3Smrg 797132b578d3Smrg# _AM_SET_OPTIONS(OPTIONS) 797232b578d3Smrg# ---------------------------------- 797332b578d3Smrg# OPTIONS is a space-separated list of Automake options. 797432b578d3SmrgAC_DEFUN([_AM_SET_OPTIONS], 797532b578d3Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 797632b578d3Smrg 797732b578d3Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 797832b578d3Smrg# ------------------------------------------- 797932b578d3Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 798032b578d3SmrgAC_DEFUN([_AM_IF_OPTION], 798132b578d3Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 798232b578d3Smrg 798332b578d3Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 798432b578d3Smrg 798532b578d3Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 798632b578d3Smrg# Free Software Foundation, Inc. 798732b578d3Smrg# 798832b578d3Smrg# This file is free software; the Free Software Foundation 798932b578d3Smrg# gives unlimited permission to copy and/or distribute it, 799032b578d3Smrg# with or without modifications, as long as this notice is preserved. 799132b578d3Smrg 799232b578d3Smrg# serial 4 799332b578d3Smrg 799432b578d3Smrg# AM_SANITY_CHECK 799532b578d3Smrg# --------------- 799632b578d3SmrgAC_DEFUN([AM_SANITY_CHECK], 799732b578d3Smrg[AC_MSG_CHECKING([whether build environment is sane]) 799832b578d3Smrg# Just in case 799932b578d3Smrgsleep 1 800032b578d3Smrgecho timestamp > conftest.file 800132b578d3Smrg# Do `set' in a subshell so we don't clobber the current shell's 800232b578d3Smrg# arguments. Must try -L first in case configure is actually a 800332b578d3Smrg# symlink; some systems play weird games with the mod time of symlinks 800432b578d3Smrg# (eg FreeBSD returns the mod time of the symlink's containing 800532b578d3Smrg# directory). 800632b578d3Smrgif ( 800732b578d3Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 800832b578d3Smrg if test "$[*]" = "X"; then 800932b578d3Smrg # -L didn't work. 801032b578d3Smrg set X `ls -t $srcdir/configure conftest.file` 801132b578d3Smrg fi 801232b578d3Smrg rm -f conftest.file 801332b578d3Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 801432b578d3Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 801532b578d3Smrg 801632b578d3Smrg # If neither matched, then we have a broken ls. This can happen 801732b578d3Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 801832b578d3Smrg # broken ls alias from the environment. This has actually 801932b578d3Smrg # happened. Such a system could not be considered "sane". 802032b578d3Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 802132b578d3Smrgalias in your environment]) 802232b578d3Smrg fi 802332b578d3Smrg 802432b578d3Smrg test "$[2]" = conftest.file 802532b578d3Smrg ) 802632b578d3Smrgthen 802732b578d3Smrg # Ok. 802832b578d3Smrg : 802932b578d3Smrgelse 803032b578d3Smrg AC_MSG_ERROR([newly created file is older than distributed files! 803132b578d3SmrgCheck your system clock]) 803232b578d3Smrgfi 803332b578d3SmrgAC_MSG_RESULT(yes)]) 803432b578d3Smrg 803532b578d3Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 803632b578d3Smrg# 803732b578d3Smrg# This file is free software; the Free Software Foundation 803832b578d3Smrg# gives unlimited permission to copy and/or distribute it, 803932b578d3Smrg# with or without modifications, as long as this notice is preserved. 804032b578d3Smrg 804132b578d3Smrg# AM_PROG_INSTALL_STRIP 804232b578d3Smrg# --------------------- 804332b578d3Smrg# One issue with vendor `install' (even GNU) is that you can't 804432b578d3Smrg# specify the program used to strip binaries. This is especially 804532b578d3Smrg# annoying in cross-compiling environments, where the build's strip 804632b578d3Smrg# is unlikely to handle the host's binaries. 804732b578d3Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 804832b578d3Smrg# always use install-sh in `make install-strip', and initialize 804932b578d3Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 805032b578d3SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 805132b578d3Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 805232b578d3Smrg# Installed binaries are usually stripped using `strip' when the user 805332b578d3Smrg# run `make install-strip'. However `strip' might not be the right 805432b578d3Smrg# tool to use in cross-compilation environments, therefore Automake 805532b578d3Smrg# will honor the `STRIP' environment variable to overrule this program. 805632b578d3Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 805732b578d3Smrgif test "$cross_compiling" != no; then 805832b578d3Smrg AC_CHECK_TOOL([STRIP], [strip], :) 805932b578d3Smrgfi 806032b578d3SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 806132b578d3SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 806232b578d3Smrg 806332b578d3Smrg# Copyright (C) 2006 Free Software Foundation, Inc. 806432b578d3Smrg# 806532b578d3Smrg# This file is free software; the Free Software Foundation 806632b578d3Smrg# gives unlimited permission to copy and/or distribute it, 806732b578d3Smrg# with or without modifications, as long as this notice is preserved. 806832b578d3Smrg 806932b578d3Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 807032b578d3Smrg# --------------------------- 807132b578d3Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 807232b578d3Smrg# This macro is traced by Automake. 807332b578d3SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 807432b578d3Smrg 807532b578d3Smrg# Check how to create a tarball. -*- Autoconf -*- 807632b578d3Smrg 807732b578d3Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 807832b578d3Smrg# 807932b578d3Smrg# This file is free software; the Free Software Foundation 808032b578d3Smrg# gives unlimited permission to copy and/or distribute it, 808132b578d3Smrg# with or without modifications, as long as this notice is preserved. 808232b578d3Smrg 808332b578d3Smrg# serial 2 808432b578d3Smrg 808532b578d3Smrg# _AM_PROG_TAR(FORMAT) 808632b578d3Smrg# -------------------- 808732b578d3Smrg# Check how to create a tarball in format FORMAT. 808832b578d3Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 808932b578d3Smrg# 809032b578d3Smrg# Substitute a variable $(am__tar) that is a command 809132b578d3Smrg# writing to stdout a FORMAT-tarball containing the directory 809232b578d3Smrg# $tardir. 809332b578d3Smrg# tardir=directory && $(am__tar) > result.tar 809432b578d3Smrg# 809532b578d3Smrg# Substitute a variable $(am__untar) that extract such 809632b578d3Smrg# a tarball read from stdin. 809732b578d3Smrg# $(am__untar) < result.tar 809832b578d3SmrgAC_DEFUN([_AM_PROG_TAR], 809932b578d3Smrg[# Always define AMTAR for backward compatibility. 810032b578d3SmrgAM_MISSING_PROG([AMTAR], [tar]) 810132b578d3Smrgm4_if([$1], [v7], 810232b578d3Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 810332b578d3Smrg [m4_case([$1], [ustar],, [pax],, 810432b578d3Smrg [m4_fatal([Unknown tar format])]) 810532b578d3SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 810632b578d3Smrg# Loop over all known methods to create a tar archive until one works. 810732b578d3Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 810832b578d3Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 810932b578d3Smrg# Do not fold the above two line into one, because Tru64 sh and 811032b578d3Smrg# Solaris sh will not grok spaces in the rhs of `-'. 811132b578d3Smrgfor _am_tool in $_am_tools 811232b578d3Smrgdo 811332b578d3Smrg case $_am_tool in 811432b578d3Smrg gnutar) 811532b578d3Smrg for _am_tar in tar gnutar gtar; 811632b578d3Smrg do 811732b578d3Smrg AM_RUN_LOG([$_am_tar --version]) && break 811832b578d3Smrg done 811932b578d3Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 812032b578d3Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 812132b578d3Smrg am__untar="$_am_tar -xf -" 812232b578d3Smrg ;; 812332b578d3Smrg plaintar) 812432b578d3Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 812532b578d3Smrg # ustar tarball either. 812632b578d3Smrg (tar --version) >/dev/null 2>&1 && continue 812732b578d3Smrg am__tar='tar chf - "$$tardir"' 812832b578d3Smrg am__tar_='tar chf - "$tardir"' 812932b578d3Smrg am__untar='tar xf -' 813032b578d3Smrg ;; 813132b578d3Smrg pax) 813232b578d3Smrg am__tar='pax -L -x $1 -w "$$tardir"' 813332b578d3Smrg am__tar_='pax -L -x $1 -w "$tardir"' 813432b578d3Smrg am__untar='pax -r' 813532b578d3Smrg ;; 813632b578d3Smrg cpio) 813732b578d3Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 813832b578d3Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 813932b578d3Smrg am__untar='cpio -i -H $1 -d' 814032b578d3Smrg ;; 814132b578d3Smrg none) 814232b578d3Smrg am__tar=false 814332b578d3Smrg am__tar_=false 814432b578d3Smrg am__untar=false 814532b578d3Smrg ;; 814632b578d3Smrg esac 814732b578d3Smrg 814832b578d3Smrg # If the value was cached, stop now. We just wanted to have am__tar 814932b578d3Smrg # and am__untar set. 815032b578d3Smrg test -n "${am_cv_prog_tar_$1}" && break 815132b578d3Smrg 815232b578d3Smrg # tar/untar a dummy directory, and stop if the command works 815332b578d3Smrg rm -rf conftest.dir 815432b578d3Smrg mkdir conftest.dir 815532b578d3Smrg echo GrepMe > conftest.dir/file 815632b578d3Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 815732b578d3Smrg rm -rf conftest.dir 815832b578d3Smrg if test -s conftest.tar; then 815932b578d3Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 816032b578d3Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 816132b578d3Smrg fi 816232b578d3Smrgdone 816332b578d3Smrgrm -rf conftest.dir 816432b578d3Smrg 816532b578d3SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 816632b578d3SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 816732b578d3SmrgAC_SUBST([am__tar]) 816832b578d3SmrgAC_SUBST([am__untar]) 816932b578d3Smrg]) # _AM_PROG_TAR 817032b578d3Smrg 8171