aclocal.m4 revision 62ab96ba
162ab96baSmrg# generated automatically by aclocal 1.10.2 -*- Autoconf -*- 25eefee25Smacallan 35eefee25Smacallan# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 462ab96baSmrg# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 55eefee25Smacallan# This file is free software; the Free Software Foundation 65eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 75eefee25Smacallan# with or without modifications, as long as this notice is preserved. 85eefee25Smacallan 95eefee25Smacallan# This program is distributed in the hope that it will be useful, 105eefee25Smacallan# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 115eefee25Smacallan# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 125eefee25Smacallan# PARTICULAR PURPOSE. 135eefee25Smacallan 1462ab96baSmrgm4_ifndef([AC_AUTOCONF_VERSION], 1562ab96baSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1662ab96baSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 1762ab96baSmrg[m4_warning([this file was generated for autoconf 2.63. 1862ab96baSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 1962ab96baSmrgIf you have problems, you may need to regenerate the build system entirely. 2062ab96baSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 2162ab96baSmrg 225eefee25Smacallan# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 235eefee25Smacallan 2462ab96baSmrg# serial 52 Debian 1.5.26-4 AC_PROG_LIBTOOL 255eefee25Smacallan 265eefee25Smacallan 275eefee25Smacallan# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 285eefee25Smacallan# ----------------------------------------------------------- 295eefee25Smacallan# If this macro is not defined by Autoconf, define it here. 305eefee25Smacallanm4_ifdef([AC_PROVIDE_IFELSE], 315eefee25Smacallan [], 325eefee25Smacallan [m4_define([AC_PROVIDE_IFELSE], 335eefee25Smacallan [m4_ifdef([AC_PROVIDE_$1], 345eefee25Smacallan [$2], [$3])])]) 355eefee25Smacallan 365eefee25Smacallan 375eefee25Smacallan# AC_PROG_LIBTOOL 385eefee25Smacallan# --------------- 395eefee25SmacallanAC_DEFUN([AC_PROG_LIBTOOL], 405eefee25Smacallan[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 415eefee25Smacallandnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 425eefee25Smacallandnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 435eefee25Smacallan AC_PROVIDE_IFELSE([AC_PROG_CXX], 445eefee25Smacallan [AC_LIBTOOL_CXX], 455eefee25Smacallan [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 465eefee25Smacallan ])]) 475eefee25Smacallandnl And a similar setup for Fortran 77 support 485eefee25Smacallan AC_PROVIDE_IFELSE([AC_PROG_F77], 495eefee25Smacallan [AC_LIBTOOL_F77], 505eefee25Smacallan [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 515eefee25Smacallan])]) 525eefee25Smacallan 535eefee25Smacallandnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 545eefee25Smacallandnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 555eefee25Smacallandnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 565eefee25Smacallan AC_PROVIDE_IFELSE([AC_PROG_GCJ], 575eefee25Smacallan [AC_LIBTOOL_GCJ], 585eefee25Smacallan [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 595eefee25Smacallan [AC_LIBTOOL_GCJ], 605eefee25Smacallan [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 615eefee25Smacallan [AC_LIBTOOL_GCJ], 625eefee25Smacallan [ifdef([AC_PROG_GCJ], 635eefee25Smacallan [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 645eefee25Smacallan ifdef([A][M_PROG_GCJ], 655eefee25Smacallan [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 665eefee25Smacallan ifdef([LT_AC_PROG_GCJ], 675eefee25Smacallan [define([LT_AC_PROG_GCJ], 685eefee25Smacallan defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 695eefee25Smacallan])])# AC_PROG_LIBTOOL 705eefee25Smacallan 715eefee25Smacallan 725eefee25Smacallan# _AC_PROG_LIBTOOL 735eefee25Smacallan# ---------------- 745eefee25SmacallanAC_DEFUN([_AC_PROG_LIBTOOL], 755eefee25Smacallan[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 765eefee25SmacallanAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 775eefee25SmacallanAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 785eefee25SmacallanAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 795eefee25Smacallan 805eefee25Smacallan# This can be used to rebuild libtool when needed 815eefee25SmacallanLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 825eefee25Smacallan 835eefee25Smacallan# Always use our own libtool. 845eefee25SmacallanLIBTOOL='$(SHELL) $(top_builddir)/libtool' 855eefee25SmacallanAC_SUBST(LIBTOOL)dnl 865eefee25Smacallan 875eefee25Smacallan# Prevent multiple expansion 885eefee25Smacallandefine([AC_PROG_LIBTOOL], []) 895eefee25Smacallan])# _AC_PROG_LIBTOOL 905eefee25Smacallan 915eefee25Smacallan 925eefee25Smacallan# AC_LIBTOOL_SETUP 935eefee25Smacallan# ---------------- 945eefee25SmacallanAC_DEFUN([AC_LIBTOOL_SETUP], 955eefee25Smacallan[AC_PREREQ(2.50)dnl 965eefee25SmacallanAC_REQUIRE([AC_ENABLE_SHARED])dnl 975eefee25SmacallanAC_REQUIRE([AC_ENABLE_STATIC])dnl 985eefee25SmacallanAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 995eefee25SmacallanAC_REQUIRE([AC_CANONICAL_HOST])dnl 1005eefee25SmacallanAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1015eefee25SmacallanAC_REQUIRE([AC_PROG_CC])dnl 1025eefee25SmacallanAC_REQUIRE([AC_PROG_LD])dnl 1035eefee25SmacallanAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 1045eefee25SmacallanAC_REQUIRE([AC_PROG_NM])dnl 1055eefee25Smacallan 1065eefee25SmacallanAC_REQUIRE([AC_PROG_LN_S])dnl 1075eefee25SmacallanAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 1085eefee25Smacallan# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 1095eefee25SmacallanAC_REQUIRE([AC_OBJEXT])dnl 1105eefee25SmacallanAC_REQUIRE([AC_EXEEXT])dnl 1115eefee25Smacallandnl 1125eefee25SmacallanAC_LIBTOOL_SYS_MAX_CMD_LEN 1135eefee25SmacallanAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 1145eefee25SmacallanAC_LIBTOOL_OBJDIR 1155eefee25Smacallan 1165eefee25SmacallanAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1175eefee25Smacallan_LT_AC_PROG_ECHO_BACKSLASH 1185eefee25Smacallan 1195eefee25Smacallancase $host_os in 1205eefee25Smacallanaix3*) 1215eefee25Smacallan # AIX sometimes has problems with the GCC collect2 program. For some 1225eefee25Smacallan # reason, if we set the COLLECT_NAMES environment variable, the problems 1235eefee25Smacallan # vanish in a puff of smoke. 1245eefee25Smacallan if test "X${COLLECT_NAMES+set}" != Xset; then 1255eefee25Smacallan COLLECT_NAMES= 1265eefee25Smacallan export COLLECT_NAMES 1275eefee25Smacallan fi 1285eefee25Smacallan ;; 1295eefee25Smacallanesac 1305eefee25Smacallan 1315eefee25Smacallan# Sed substitution that helps us do robust quoting. It backslashifies 1325eefee25Smacallan# metacharacters that are still active within double-quoted strings. 1335eefee25SmacallanXsed='sed -e 1s/^X//' 1345eefee25Smacallan[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 1355eefee25Smacallan 1365eefee25Smacallan# Same as above, but do not quote variable references. 1375eefee25Smacallan[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 1385eefee25Smacallan 1395eefee25Smacallan# Sed substitution to delay expansion of an escaped shell variable in a 1405eefee25Smacallan# double_quote_subst'ed string. 1415eefee25Smacallandelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1425eefee25Smacallan 1435eefee25Smacallan# Sed substitution to avoid accidental globbing in evaled expressions 1445eefee25Smacallanno_glob_subst='s/\*/\\\*/g' 1455eefee25Smacallan 1465eefee25Smacallan# Constants: 1475eefee25Smacallanrm="rm -f" 1485eefee25Smacallan 1495eefee25Smacallan# Global variables: 1505eefee25Smacallandefault_ofile=libtool 1515eefee25Smacallancan_build_shared=yes 1525eefee25Smacallan 1535eefee25Smacallan# All known linkers require a `.a' archive for static linking (except MSVC, 1545eefee25Smacallan# which needs '.lib'). 1555eefee25Smacallanlibext=a 1565eefee25Smacallanltmain="$ac_aux_dir/ltmain.sh" 1575eefee25Smacallanofile="$default_ofile" 1585eefee25Smacallanwith_gnu_ld="$lt_cv_prog_gnu_ld" 1595eefee25Smacallan 1605eefee25SmacallanAC_CHECK_TOOL(AR, ar, false) 1615eefee25SmacallanAC_CHECK_TOOL(RANLIB, ranlib, :) 1625eefee25SmacallanAC_CHECK_TOOL(STRIP, strip, :) 1635eefee25Smacallan 1645eefee25Smacallanold_CC="$CC" 1655eefee25Smacallanold_CFLAGS="$CFLAGS" 1665eefee25Smacallan 1675eefee25Smacallan# Set sane defaults for various variables 1685eefee25Smacallantest -z "$AR" && AR=ar 1695eefee25Smacallantest -z "$AR_FLAGS" && AR_FLAGS=cru 1705eefee25Smacallantest -z "$AS" && AS=as 1715eefee25Smacallantest -z "$CC" && CC=cc 1725eefee25Smacallantest -z "$LTCC" && LTCC=$CC 1735eefee25Smacallantest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1745eefee25Smacallantest -z "$DLLTOOL" && DLLTOOL=dlltool 1755eefee25Smacallantest -z "$LD" && LD=ld 1765eefee25Smacallantest -z "$LN_S" && LN_S="ln -s" 1775eefee25Smacallantest -z "$MAGIC_CMD" && MAGIC_CMD=file 1785eefee25Smacallantest -z "$NM" && NM=nm 1795eefee25Smacallantest -z "$SED" && SED=sed 1805eefee25Smacallantest -z "$OBJDUMP" && OBJDUMP=objdump 1815eefee25Smacallantest -z "$RANLIB" && RANLIB=: 1825eefee25Smacallantest -z "$STRIP" && STRIP=: 1835eefee25Smacallantest -z "$ac_objext" && ac_objext=o 1845eefee25Smacallan 1855eefee25Smacallan# Determine commands to create old-style static archives. 18662ab96baSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1875eefee25Smacallanold_postinstall_cmds='chmod 644 $oldlib' 1885eefee25Smacallanold_postuninstall_cmds= 1895eefee25Smacallan 1905eefee25Smacallanif test -n "$RANLIB"; then 1915eefee25Smacallan case $host_os in 1925eefee25Smacallan openbsd*) 1935eefee25Smacallan old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1945eefee25Smacallan ;; 1955eefee25Smacallan *) 1965eefee25Smacallan old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1975eefee25Smacallan ;; 1985eefee25Smacallan esac 1995eefee25Smacallan old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 2005eefee25Smacallanfi 2015eefee25Smacallan 2025eefee25Smacallan_LT_CC_BASENAME([$compiler]) 2035eefee25Smacallan 2045eefee25Smacallan# Only perform the check for file, if the check method requires it 2055eefee25Smacallancase $deplibs_check_method in 2065eefee25Smacallanfile_magic*) 2075eefee25Smacallan if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2085eefee25Smacallan AC_PATH_MAGIC 2095eefee25Smacallan fi 2105eefee25Smacallan ;; 2115eefee25Smacallanesac 2125eefee25Smacallan 21362ab96baSmrg_LT_REQUIRED_DARWIN_CHECKS 21462ab96baSmrg 2155eefee25SmacallanAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 2165eefee25SmacallanAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 2175eefee25Smacallanenable_win32_dll=yes, enable_win32_dll=no) 2185eefee25Smacallan 2195eefee25SmacallanAC_ARG_ENABLE([libtool-lock], 2205eefee25Smacallan [AC_HELP_STRING([--disable-libtool-lock], 2215eefee25Smacallan [avoid locking (might break parallel builds)])]) 2225eefee25Smacallantest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2235eefee25Smacallan 2245eefee25SmacallanAC_ARG_WITH([pic], 2255eefee25Smacallan [AC_HELP_STRING([--with-pic], 2265eefee25Smacallan [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 2275eefee25Smacallan [pic_mode="$withval"], 2285eefee25Smacallan [pic_mode=default]) 2295eefee25Smacallantest -z "$pic_mode" && pic_mode=default 2305eefee25Smacallan 2315eefee25Smacallan# Use C for the default configuration in the libtool script 2325eefee25Smacallantagname= 2335eefee25SmacallanAC_LIBTOOL_LANG_C_CONFIG 2345eefee25Smacallan_LT_AC_TAGCONFIG 2355eefee25Smacallan])# AC_LIBTOOL_SETUP 2365eefee25Smacallan 2375eefee25Smacallan 2385eefee25Smacallan# _LT_AC_SYS_COMPILER 2395eefee25Smacallan# ------------------- 2405eefee25SmacallanAC_DEFUN([_LT_AC_SYS_COMPILER], 2415eefee25Smacallan[AC_REQUIRE([AC_PROG_CC])dnl 2425eefee25Smacallan 2435eefee25Smacallan# If no C compiler was specified, use CC. 2445eefee25SmacallanLTCC=${LTCC-"$CC"} 2455eefee25Smacallan 2465eefee25Smacallan# If no C compiler flags were specified, use CFLAGS. 2475eefee25SmacallanLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2485eefee25Smacallan 2495eefee25Smacallan# Allow CC to be a program name with arguments. 2505eefee25Smacallancompiler=$CC 2515eefee25Smacallan])# _LT_AC_SYS_COMPILER 2525eefee25Smacallan 2535eefee25Smacallan 2545eefee25Smacallan# _LT_CC_BASENAME(CC) 2555eefee25Smacallan# ------------------- 2565eefee25Smacallan# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2575eefee25SmacallanAC_DEFUN([_LT_CC_BASENAME], 2585eefee25Smacallan[for cc_temp in $1""; do 2595eefee25Smacallan case $cc_temp in 2605eefee25Smacallan compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2615eefee25Smacallan distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2625eefee25Smacallan \-*) ;; 2635eefee25Smacallan *) break;; 2645eefee25Smacallan esac 2655eefee25Smacallandone 2665eefee25Smacallancc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 2675eefee25Smacallan]) 2685eefee25Smacallan 2695eefee25Smacallan 2705eefee25Smacallan# _LT_COMPILER_BOILERPLATE 2715eefee25Smacallan# ------------------------ 2725eefee25Smacallan# Check for compiler boilerplate output or warnings with 2735eefee25Smacallan# the simple compiler test code. 2745eefee25SmacallanAC_DEFUN([_LT_COMPILER_BOILERPLATE], 27562ab96baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 27662ab96baSmrgac_outfile=conftest.$ac_objext 27762ab96baSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 2785eefee25Smacallaneval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2795eefee25Smacallan_lt_compiler_boilerplate=`cat conftest.err` 2805eefee25Smacallan$rm conftest* 2815eefee25Smacallan])# _LT_COMPILER_BOILERPLATE 2825eefee25Smacallan 2835eefee25Smacallan 2845eefee25Smacallan# _LT_LINKER_BOILERPLATE 2855eefee25Smacallan# ---------------------- 2865eefee25Smacallan# Check for linker boilerplate output or warnings with 2875eefee25Smacallan# the simple link test code. 2885eefee25SmacallanAC_DEFUN([_LT_LINKER_BOILERPLATE], 28962ab96baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 29062ab96baSmrgac_outfile=conftest.$ac_objext 29162ab96baSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 2925eefee25Smacallaneval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2935eefee25Smacallan_lt_linker_boilerplate=`cat conftest.err` 29462ab96baSmrg$rm -r conftest* 2955eefee25Smacallan])# _LT_LINKER_BOILERPLATE 2965eefee25Smacallan 29762ab96baSmrg# _LT_REQUIRED_DARWIN_CHECKS 29862ab96baSmrg# -------------------------- 29962ab96baSmrg# Check for some things on darwin 30062ab96baSmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ 30162ab96baSmrg case $host_os in 30262ab96baSmrg rhapsody* | darwin*) 30362ab96baSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 30462ab96baSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 30562ab96baSmrg 30662ab96baSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 30762ab96baSmrg [lt_cv_apple_cc_single_mod=no 30862ab96baSmrg if test -z "${LT_MULTI_MODULE}"; then 30962ab96baSmrg # By default we will add the -single_module flag. You can override 31062ab96baSmrg # by either setting the environment variable LT_MULTI_MODULE 31162ab96baSmrg # non-empty at configure time, or by adding -multi_module to the 31262ab96baSmrg # link flags. 31362ab96baSmrg echo "int foo(void){return 1;}" > conftest.c 31462ab96baSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 31562ab96baSmrg -dynamiclib ${wl}-single_module conftest.c 31662ab96baSmrg if test -f libconftest.dylib; then 31762ab96baSmrg lt_cv_apple_cc_single_mod=yes 31862ab96baSmrg rm -rf libconftest.dylib* 31962ab96baSmrg fi 32062ab96baSmrg rm conftest.c 32162ab96baSmrg fi]) 32262ab96baSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 32362ab96baSmrg [lt_cv_ld_exported_symbols_list], 32462ab96baSmrg [lt_cv_ld_exported_symbols_list=no 32562ab96baSmrg save_LDFLAGS=$LDFLAGS 32662ab96baSmrg echo "_main" > conftest.sym 32762ab96baSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 32862ab96baSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 32962ab96baSmrg [lt_cv_ld_exported_symbols_list=yes], 33062ab96baSmrg [lt_cv_ld_exported_symbols_list=no]) 33162ab96baSmrg LDFLAGS="$save_LDFLAGS" 33262ab96baSmrg ]) 33362ab96baSmrg case $host_os in 33462ab96baSmrg rhapsody* | darwin1.[[0123]]) 33562ab96baSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 33662ab96baSmrg darwin1.*) 33762ab96baSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 33862ab96baSmrg darwin*) 33962ab96baSmrg # if running on 10.5 or later, the deployment target defaults 34062ab96baSmrg # to the OS version, if on x86, and 10.4, the deployment 34162ab96baSmrg # target defaults to 10.4. Don't you love it? 34262ab96baSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 34362ab96baSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 34462ab96baSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 34562ab96baSmrg 10.[[012]]*) 34662ab96baSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 34762ab96baSmrg 10.*) 34862ab96baSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 34962ab96baSmrg esac 35062ab96baSmrg ;; 35162ab96baSmrg esac 35262ab96baSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 35362ab96baSmrg _lt_dar_single_mod='$single_module' 35462ab96baSmrg fi 35562ab96baSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 35662ab96baSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 35762ab96baSmrg else 35862ab96baSmrg _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 35962ab96baSmrg fi 36062ab96baSmrg if test "$DSYMUTIL" != ":"; then 36162ab96baSmrg _lt_dsymutil="~$DSYMUTIL \$lib || :" 36262ab96baSmrg else 36362ab96baSmrg _lt_dsymutil= 36462ab96baSmrg fi 36562ab96baSmrg ;; 36662ab96baSmrg esac 36762ab96baSmrg]) 3685eefee25Smacallan 3695eefee25Smacallan# _LT_AC_SYS_LIBPATH_AIX 3705eefee25Smacallan# ---------------------- 3715eefee25Smacallan# Links a minimal program and checks the executable 3725eefee25Smacallan# for the system default hardcoded library path. In most cases, 3735eefee25Smacallan# this is /usr/lib:/lib, but when the MPI compilers are used 3745eefee25Smacallan# the location of the communication and MPI libs are included too. 3755eefee25Smacallan# If we don't find anything, use the default library path according 3765eefee25Smacallan# to the aix ld manual. 3775eefee25SmacallanAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 37862ab96baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 37962ab96baSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 38062ab96baSmrglt_aix_libpath_sed=' 38162ab96baSmrg /Import File Strings/,/^$/ { 38262ab96baSmrg /^0/ { 38362ab96baSmrg s/^0 *\(.*\)$/\1/ 38462ab96baSmrg p 38562ab96baSmrg } 38662ab96baSmrg }' 38762ab96baSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3885eefee25Smacallan# Check for a 64-bit object if we didn't find anything. 38962ab96baSmrgif test -z "$aix_libpath"; then 39062ab96baSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 39162ab96baSmrgfi],[]) 3925eefee25Smacallanif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 3935eefee25Smacallan])# _LT_AC_SYS_LIBPATH_AIX 3945eefee25Smacallan 3955eefee25Smacallan 3965eefee25Smacallan# _LT_AC_SHELL_INIT(ARG) 3975eefee25Smacallan# ---------------------- 3985eefee25SmacallanAC_DEFUN([_LT_AC_SHELL_INIT], 3995eefee25Smacallan[ifdef([AC_DIVERSION_NOTICE], 4005eefee25Smacallan [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 4015eefee25Smacallan [AC_DIVERT_PUSH(NOTICE)]) 4025eefee25Smacallan$1 4035eefee25SmacallanAC_DIVERT_POP 4045eefee25Smacallan])# _LT_AC_SHELL_INIT 4055eefee25Smacallan 4065eefee25Smacallan 4075eefee25Smacallan# _LT_AC_PROG_ECHO_BACKSLASH 4085eefee25Smacallan# -------------------------- 4095eefee25Smacallan# Add some code to the start of the generated configure script which 4105eefee25Smacallan# will find an echo command which doesn't interpret backslashes. 4115eefee25SmacallanAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 4125eefee25Smacallan[_LT_AC_SHELL_INIT([ 4135eefee25Smacallan# Check that we are running under the correct shell. 4145eefee25SmacallanSHELL=${CONFIG_SHELL-/bin/sh} 4155eefee25Smacallan 4165eefee25Smacallancase X$ECHO in 4175eefee25SmacallanX*--fallback-echo) 4185eefee25Smacallan # Remove one level of quotation (which was required for Make). 4195eefee25Smacallan ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 4205eefee25Smacallan ;; 4215eefee25Smacallanesac 4225eefee25Smacallan 4235eefee25Smacallanecho=${ECHO-echo} 4245eefee25Smacallanif test "X[$]1" = X--no-reexec; then 4255eefee25Smacallan # Discard the --no-reexec flag, and continue. 4265eefee25Smacallan shift 4275eefee25Smacallanelif test "X[$]1" = X--fallback-echo; then 4285eefee25Smacallan # Avoid inline document here, it may be left over 4295eefee25Smacallan : 4305eefee25Smacallanelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 4315eefee25Smacallan # Yippee, $echo works! 4325eefee25Smacallan : 4335eefee25Smacallanelse 4345eefee25Smacallan # Restart under the correct shell. 4355eefee25Smacallan exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 4365eefee25Smacallanfi 4375eefee25Smacallan 4385eefee25Smacallanif test "X[$]1" = X--fallback-echo; then 4395eefee25Smacallan # used as fallback echo 4405eefee25Smacallan shift 4415eefee25Smacallan cat <<EOF 4425eefee25Smacallan[$]* 4435eefee25SmacallanEOF 4445eefee25Smacallan exit 0 4455eefee25Smacallanfi 4465eefee25Smacallan 4475eefee25Smacallan# The HP-UX ksh and POSIX shell print the target directory to stdout 4485eefee25Smacallan# if CDPATH is set. 4495eefee25Smacallan(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4505eefee25Smacallan 4515eefee25Smacallanif test -z "$ECHO"; then 4525eefee25Smacallanif test "X${echo_test_string+set}" != Xset; then 4535eefee25Smacallan# find a string as large as possible, as long as the shell can cope with it 4545eefee25Smacallan for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 4555eefee25Smacallan # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 4565eefee25Smacallan if (echo_test_string=`eval $cmd`) 2>/dev/null && 4575eefee25Smacallan echo_test_string=`eval $cmd` && 4585eefee25Smacallan (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 4595eefee25Smacallan then 4605eefee25Smacallan break 4615eefee25Smacallan fi 4625eefee25Smacallan done 4635eefee25Smacallanfi 4645eefee25Smacallan 4655eefee25Smacallanif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 4665eefee25Smacallan echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 4675eefee25Smacallan test "X$echo_testing_string" = "X$echo_test_string"; then 4685eefee25Smacallan : 4695eefee25Smacallanelse 4705eefee25Smacallan # The Solaris, AIX, and Digital Unix default echo programs unquote 4715eefee25Smacallan # backslashes. This makes it impossible to quote backslashes using 4725eefee25Smacallan # echo "$something" | sed 's/\\/\\\\/g' 4735eefee25Smacallan # 4745eefee25Smacallan # So, first we look for a working echo in the user's PATH. 4755eefee25Smacallan 4765eefee25Smacallan lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4775eefee25Smacallan for dir in $PATH /usr/ucb; do 4785eefee25Smacallan IFS="$lt_save_ifs" 4795eefee25Smacallan if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 4805eefee25Smacallan test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 4815eefee25Smacallan echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 4825eefee25Smacallan test "X$echo_testing_string" = "X$echo_test_string"; then 4835eefee25Smacallan echo="$dir/echo" 4845eefee25Smacallan break 4855eefee25Smacallan fi 4865eefee25Smacallan done 4875eefee25Smacallan IFS="$lt_save_ifs" 4885eefee25Smacallan 4895eefee25Smacallan if test "X$echo" = Xecho; then 4905eefee25Smacallan # We didn't find a better echo, so look for alternatives. 4915eefee25Smacallan if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 4925eefee25Smacallan echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 4935eefee25Smacallan test "X$echo_testing_string" = "X$echo_test_string"; then 4945eefee25Smacallan # This shell has a builtin print -r that does the trick. 4955eefee25Smacallan echo='print -r' 4965eefee25Smacallan elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 4975eefee25Smacallan test "X$CONFIG_SHELL" != X/bin/ksh; then 4985eefee25Smacallan # If we have ksh, try running configure again with it. 4995eefee25Smacallan ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 5005eefee25Smacallan export ORIGINAL_CONFIG_SHELL 5015eefee25Smacallan CONFIG_SHELL=/bin/ksh 5025eefee25Smacallan export CONFIG_SHELL 5035eefee25Smacallan exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 5045eefee25Smacallan else 5055eefee25Smacallan # Try using printf. 5065eefee25Smacallan echo='printf %s\n' 5075eefee25Smacallan if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 5085eefee25Smacallan echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 5095eefee25Smacallan test "X$echo_testing_string" = "X$echo_test_string"; then 5105eefee25Smacallan # Cool, printf works 5115eefee25Smacallan : 5125eefee25Smacallan elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 5135eefee25Smacallan test "X$echo_testing_string" = 'X\t' && 5145eefee25Smacallan echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 5155eefee25Smacallan test "X$echo_testing_string" = "X$echo_test_string"; then 5165eefee25Smacallan CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 5175eefee25Smacallan export CONFIG_SHELL 5185eefee25Smacallan SHELL="$CONFIG_SHELL" 5195eefee25Smacallan export SHELL 5205eefee25Smacallan echo="$CONFIG_SHELL [$]0 --fallback-echo" 5215eefee25Smacallan elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 5225eefee25Smacallan test "X$echo_testing_string" = 'X\t' && 5235eefee25Smacallan echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 5245eefee25Smacallan test "X$echo_testing_string" = "X$echo_test_string"; then 5255eefee25Smacallan echo="$CONFIG_SHELL [$]0 --fallback-echo" 5265eefee25Smacallan else 5275eefee25Smacallan # maybe with a smaller string... 5285eefee25Smacallan prev=: 5295eefee25Smacallan 5305eefee25Smacallan for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 5315eefee25Smacallan if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 5325eefee25Smacallan then 5335eefee25Smacallan break 5345eefee25Smacallan fi 5355eefee25Smacallan prev="$cmd" 5365eefee25Smacallan done 5375eefee25Smacallan 5385eefee25Smacallan if test "$prev" != 'sed 50q "[$]0"'; then 5395eefee25Smacallan echo_test_string=`eval $prev` 5405eefee25Smacallan export echo_test_string 5415eefee25Smacallan exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 5425eefee25Smacallan else 5435eefee25Smacallan # Oops. We lost completely, so just stick with echo. 5445eefee25Smacallan echo=echo 5455eefee25Smacallan fi 5465eefee25Smacallan fi 5475eefee25Smacallan fi 5485eefee25Smacallan fi 5495eefee25Smacallanfi 5505eefee25Smacallanfi 5515eefee25Smacallan 5525eefee25Smacallan# Copy echo and quote the copy suitably for passing to libtool from 5535eefee25Smacallan# the Makefile, instead of quoting the original, which is used later. 5545eefee25SmacallanECHO=$echo 5555eefee25Smacallanif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 5565eefee25Smacallan ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 5575eefee25Smacallanfi 5585eefee25Smacallan 5595eefee25SmacallanAC_SUBST(ECHO) 5605eefee25Smacallan])])# _LT_AC_PROG_ECHO_BACKSLASH 5615eefee25Smacallan 5625eefee25Smacallan 5635eefee25Smacallan# _LT_AC_LOCK 5645eefee25Smacallan# ----------- 5655eefee25SmacallanAC_DEFUN([_LT_AC_LOCK], 5665eefee25Smacallan[AC_ARG_ENABLE([libtool-lock], 5675eefee25Smacallan [AC_HELP_STRING([--disable-libtool-lock], 5685eefee25Smacallan [avoid locking (might break parallel builds)])]) 5695eefee25Smacallantest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 5705eefee25Smacallan 5715eefee25Smacallan# Some flags need to be propagated to the compiler or linker for good 5725eefee25Smacallan# libtool support. 5735eefee25Smacallancase $host in 5745eefee25Smacallania64-*-hpux*) 5755eefee25Smacallan # Find out which ABI we are using. 5765eefee25Smacallan echo 'int i;' > conftest.$ac_ext 5775eefee25Smacallan if AC_TRY_EVAL(ac_compile); then 5785eefee25Smacallan case `/usr/bin/file conftest.$ac_objext` in 5795eefee25Smacallan *ELF-32*) 5805eefee25Smacallan HPUX_IA64_MODE="32" 5815eefee25Smacallan ;; 5825eefee25Smacallan *ELF-64*) 5835eefee25Smacallan HPUX_IA64_MODE="64" 5845eefee25Smacallan ;; 5855eefee25Smacallan esac 5865eefee25Smacallan fi 5875eefee25Smacallan rm -rf conftest* 5885eefee25Smacallan ;; 5895eefee25Smacallan*-*-irix6*) 5905eefee25Smacallan # Find out which ABI we are using. 5915eefee25Smacallan echo '[#]line __oline__ "configure"' > conftest.$ac_ext 5925eefee25Smacallan if AC_TRY_EVAL(ac_compile); then 5935eefee25Smacallan if test "$lt_cv_prog_gnu_ld" = yes; then 5945eefee25Smacallan case `/usr/bin/file conftest.$ac_objext` in 5955eefee25Smacallan *32-bit*) 5965eefee25Smacallan LD="${LD-ld} -melf32bsmip" 5975eefee25Smacallan ;; 5985eefee25Smacallan *N32*) 5995eefee25Smacallan LD="${LD-ld} -melf32bmipn32" 6005eefee25Smacallan ;; 6015eefee25Smacallan *64-bit*) 6025eefee25Smacallan LD="${LD-ld} -melf64bmip" 6035eefee25Smacallan ;; 6045eefee25Smacallan esac 6055eefee25Smacallan else 6065eefee25Smacallan case `/usr/bin/file conftest.$ac_objext` in 6075eefee25Smacallan *32-bit*) 6085eefee25Smacallan LD="${LD-ld} -32" 6095eefee25Smacallan ;; 6105eefee25Smacallan *N32*) 6115eefee25Smacallan LD="${LD-ld} -n32" 6125eefee25Smacallan ;; 6135eefee25Smacallan *64-bit*) 6145eefee25Smacallan LD="${LD-ld} -64" 6155eefee25Smacallan ;; 6165eefee25Smacallan esac 6175eefee25Smacallan fi 6185eefee25Smacallan fi 6195eefee25Smacallan rm -rf conftest* 6205eefee25Smacallan ;; 6215eefee25Smacallan 62262ab96baSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 62362ab96baSmrgs390*-*linux*|sparc*-*linux*) 6245eefee25Smacallan # Find out which ABI we are using. 6255eefee25Smacallan echo 'int i;' > conftest.$ac_ext 6265eefee25Smacallan if AC_TRY_EVAL(ac_compile); then 6275eefee25Smacallan case `/usr/bin/file conftest.o` in 6285eefee25Smacallan *32-bit*) 6295eefee25Smacallan case $host in 63062ab96baSmrg x86_64-*kfreebsd*-gnu) 63162ab96baSmrg LD="${LD-ld} -m elf_i386_fbsd" 63262ab96baSmrg ;; 6335eefee25Smacallan x86_64-*linux*) 6345eefee25Smacallan LD="${LD-ld} -m elf_i386" 6355eefee25Smacallan ;; 6365eefee25Smacallan ppc64-*linux*|powerpc64-*linux*) 6375eefee25Smacallan LD="${LD-ld} -m elf32ppclinux" 6385eefee25Smacallan ;; 6395eefee25Smacallan s390x-*linux*) 6405eefee25Smacallan LD="${LD-ld} -m elf_s390" 6415eefee25Smacallan ;; 6425eefee25Smacallan sparc64-*linux*) 6435eefee25Smacallan LD="${LD-ld} -m elf32_sparc" 6445eefee25Smacallan ;; 6455eefee25Smacallan esac 6465eefee25Smacallan ;; 6475eefee25Smacallan *64-bit*) 6485eefee25Smacallan case $host in 64962ab96baSmrg x86_64-*kfreebsd*-gnu) 65062ab96baSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 65162ab96baSmrg ;; 6525eefee25Smacallan x86_64-*linux*) 6535eefee25Smacallan LD="${LD-ld} -m elf_x86_64" 6545eefee25Smacallan ;; 6555eefee25Smacallan ppc*-*linux*|powerpc*-*linux*) 6565eefee25Smacallan LD="${LD-ld} -m elf64ppc" 6575eefee25Smacallan ;; 6585eefee25Smacallan s390*-*linux*) 6595eefee25Smacallan LD="${LD-ld} -m elf64_s390" 6605eefee25Smacallan ;; 6615eefee25Smacallan sparc*-*linux*) 6625eefee25Smacallan LD="${LD-ld} -m elf64_sparc" 6635eefee25Smacallan ;; 6645eefee25Smacallan esac 6655eefee25Smacallan ;; 6665eefee25Smacallan esac 6675eefee25Smacallan fi 6685eefee25Smacallan rm -rf conftest* 6695eefee25Smacallan ;; 6705eefee25Smacallan 6715eefee25Smacallan*-*-sco3.2v5*) 6725eefee25Smacallan # On SCO OpenServer 5, we need -belf to get full-featured binaries. 6735eefee25Smacallan SAVE_CFLAGS="$CFLAGS" 6745eefee25Smacallan CFLAGS="$CFLAGS -belf" 6755eefee25Smacallan AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 6765eefee25Smacallan [AC_LANG_PUSH(C) 6775eefee25Smacallan AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 6785eefee25Smacallan AC_LANG_POP]) 6795eefee25Smacallan if test x"$lt_cv_cc_needs_belf" != x"yes"; then 6805eefee25Smacallan # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 6815eefee25Smacallan CFLAGS="$SAVE_CFLAGS" 6825eefee25Smacallan fi 6835eefee25Smacallan ;; 6845eefee25Smacallansparc*-*solaris*) 6855eefee25Smacallan # Find out which ABI we are using. 6865eefee25Smacallan echo 'int i;' > conftest.$ac_ext 6875eefee25Smacallan if AC_TRY_EVAL(ac_compile); then 6885eefee25Smacallan case `/usr/bin/file conftest.o` in 6895eefee25Smacallan *64-bit*) 6905eefee25Smacallan case $lt_cv_prog_gnu_ld in 6915eefee25Smacallan yes*) LD="${LD-ld} -m elf64_sparc" ;; 69262ab96baSmrg *) 69362ab96baSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 69462ab96baSmrg LD="${LD-ld} -64" 69562ab96baSmrg fi 69662ab96baSmrg ;; 6975eefee25Smacallan esac 6985eefee25Smacallan ;; 6995eefee25Smacallan esac 7005eefee25Smacallan fi 7015eefee25Smacallan rm -rf conftest* 7025eefee25Smacallan ;; 7035eefee25Smacallan 7045eefee25SmacallanAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 7055eefee25Smacallan[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 7065eefee25Smacallan AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7075eefee25Smacallan AC_CHECK_TOOL(AS, as, false) 7085eefee25Smacallan AC_CHECK_TOOL(OBJDUMP, objdump, false) 7095eefee25Smacallan ;; 7105eefee25Smacallan ]) 7115eefee25Smacallanesac 7125eefee25Smacallan 7135eefee25Smacallanneed_locks="$enable_libtool_lock" 7145eefee25Smacallan 7155eefee25Smacallan])# _LT_AC_LOCK 7165eefee25Smacallan 7175eefee25Smacallan 7185eefee25Smacallan# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 7195eefee25Smacallan# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 7205eefee25Smacallan# ---------------------------------------------------------------- 7215eefee25Smacallan# Check whether the given compiler option works 7225eefee25SmacallanAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 7235eefee25Smacallan[AC_REQUIRE([LT_AC_PROG_SED]) 7245eefee25SmacallanAC_CACHE_CHECK([$1], [$2], 7255eefee25Smacallan [$2=no 7265eefee25Smacallan ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 72762ab96baSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 7285eefee25Smacallan lt_compiler_flag="$3" 7295eefee25Smacallan # Insert the option either (1) after the last *FLAGS variable, or 7305eefee25Smacallan # (2) before a word containing "conftest.", or (3) at the end. 7315eefee25Smacallan # Note that $ac_compile itself does not contain backslashes and begins 7325eefee25Smacallan # with a dollar sign (not a hyphen), so the echo should work correctly. 7335eefee25Smacallan # The option is referenced via a variable to avoid confusing sed. 7345eefee25Smacallan lt_compile=`echo "$ac_compile" | $SED \ 7355eefee25Smacallan -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 7365eefee25Smacallan -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 7375eefee25Smacallan -e 's:$: $lt_compiler_flag:'` 7385eefee25Smacallan (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 7395eefee25Smacallan (eval "$lt_compile" 2>conftest.err) 7405eefee25Smacallan ac_status=$? 7415eefee25Smacallan cat conftest.err >&AS_MESSAGE_LOG_FD 7425eefee25Smacallan echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 7435eefee25Smacallan if (exit $ac_status) && test -s "$ac_outfile"; then 7445eefee25Smacallan # The compiler can only warn and ignore the option if not recognized 7455eefee25Smacallan # So say no if there are warnings other than the usual output. 7465eefee25Smacallan $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 7475eefee25Smacallan $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 7485eefee25Smacallan if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 7495eefee25Smacallan $2=yes 7505eefee25Smacallan fi 7515eefee25Smacallan fi 7525eefee25Smacallan $rm conftest* 7535eefee25Smacallan]) 7545eefee25Smacallan 7555eefee25Smacallanif test x"[$]$2" = xyes; then 7565eefee25Smacallan ifelse([$5], , :, [$5]) 7575eefee25Smacallanelse 7585eefee25Smacallan ifelse([$6], , :, [$6]) 7595eefee25Smacallanfi 7605eefee25Smacallan])# AC_LIBTOOL_COMPILER_OPTION 7615eefee25Smacallan 7625eefee25Smacallan 7635eefee25Smacallan# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 7645eefee25Smacallan# [ACTION-SUCCESS], [ACTION-FAILURE]) 7655eefee25Smacallan# ------------------------------------------------------------ 7665eefee25Smacallan# Check whether the given compiler option works 7675eefee25SmacallanAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 76862ab96baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 76962ab96baSmrgAC_CACHE_CHECK([$1], [$2], 7705eefee25Smacallan [$2=no 7715eefee25Smacallan save_LDFLAGS="$LDFLAGS" 7725eefee25Smacallan LDFLAGS="$LDFLAGS $3" 77362ab96baSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 7745eefee25Smacallan if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 7755eefee25Smacallan # The linker can only warn and ignore the option if not recognized 7765eefee25Smacallan # So say no if there are warnings 7775eefee25Smacallan if test -s conftest.err; then 7785eefee25Smacallan # Append any errors to the config.log. 7795eefee25Smacallan cat conftest.err 1>&AS_MESSAGE_LOG_FD 7805eefee25Smacallan $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 7815eefee25Smacallan $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 7825eefee25Smacallan if diff conftest.exp conftest.er2 >/dev/null; then 7835eefee25Smacallan $2=yes 7845eefee25Smacallan fi 7855eefee25Smacallan else 7865eefee25Smacallan $2=yes 7875eefee25Smacallan fi 7885eefee25Smacallan fi 78962ab96baSmrg $rm -r conftest* 7905eefee25Smacallan LDFLAGS="$save_LDFLAGS" 7915eefee25Smacallan]) 7925eefee25Smacallan 7935eefee25Smacallanif test x"[$]$2" = xyes; then 7945eefee25Smacallan ifelse([$4], , :, [$4]) 7955eefee25Smacallanelse 7965eefee25Smacallan ifelse([$5], , :, [$5]) 7975eefee25Smacallanfi 7985eefee25Smacallan])# AC_LIBTOOL_LINKER_OPTION 7995eefee25Smacallan 8005eefee25Smacallan 8015eefee25Smacallan# AC_LIBTOOL_SYS_MAX_CMD_LEN 8025eefee25Smacallan# -------------------------- 8035eefee25SmacallanAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 8045eefee25Smacallan[# find the maximum length of command line arguments 8055eefee25SmacallanAC_MSG_CHECKING([the maximum length of command line arguments]) 8065eefee25SmacallanAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 8075eefee25Smacallan i=0 8085eefee25Smacallan teststring="ABCD" 8095eefee25Smacallan 8105eefee25Smacallan case $build_os in 8115eefee25Smacallan msdosdjgpp*) 8125eefee25Smacallan # On DJGPP, this test can blow up pretty badly due to problems in libc 8135eefee25Smacallan # (any single argument exceeding 2000 bytes causes a buffer overrun 8145eefee25Smacallan # during glob expansion). Even if it were fixed, the result of this 8155eefee25Smacallan # check would be larger than it should be. 8165eefee25Smacallan lt_cv_sys_max_cmd_len=12288; # 12K is about right 8175eefee25Smacallan ;; 8185eefee25Smacallan 8195eefee25Smacallan gnu*) 8205eefee25Smacallan # Under GNU Hurd, this test is not required because there is 8215eefee25Smacallan # no limit to the length of command line arguments. 8225eefee25Smacallan # Libtool will interpret -1 as no limit whatsoever 8235eefee25Smacallan lt_cv_sys_max_cmd_len=-1; 8245eefee25Smacallan ;; 8255eefee25Smacallan 8265eefee25Smacallan cygwin* | mingw*) 8275eefee25Smacallan # On Win9x/ME, this test blows up -- it succeeds, but takes 8285eefee25Smacallan # about 5 minutes as the teststring grows exponentially. 8295eefee25Smacallan # Worse, since 9x/ME are not pre-emptively multitasking, 8305eefee25Smacallan # you end up with a "frozen" computer, even though with patience 8315eefee25Smacallan # the test eventually succeeds (with a max line length of 256k). 8325eefee25Smacallan # Instead, let's just punt: use the minimum linelength reported by 8335eefee25Smacallan # all of the supported platforms: 8192 (on NT/2K/XP). 8345eefee25Smacallan lt_cv_sys_max_cmd_len=8192; 8355eefee25Smacallan ;; 8365eefee25Smacallan 8375eefee25Smacallan amigaos*) 8385eefee25Smacallan # On AmigaOS with pdksh, this test takes hours, literally. 8395eefee25Smacallan # So we just punt and use a minimum line length of 8192. 8405eefee25Smacallan lt_cv_sys_max_cmd_len=8192; 8415eefee25Smacallan ;; 8425eefee25Smacallan 8435eefee25Smacallan netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 8445eefee25Smacallan # This has been around since 386BSD, at least. Likely further. 8455eefee25Smacallan if test -x /sbin/sysctl; then 8465eefee25Smacallan lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 8475eefee25Smacallan elif test -x /usr/sbin/sysctl; then 8485eefee25Smacallan lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 8495eefee25Smacallan else 8505eefee25Smacallan lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 8515eefee25Smacallan fi 8525eefee25Smacallan # And add a safety zone 8535eefee25Smacallan lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 8545eefee25Smacallan lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 8555eefee25Smacallan ;; 8565eefee25Smacallan 8575eefee25Smacallan interix*) 8585eefee25Smacallan # We know the value 262144 and hardcode it with a safety zone (like BSD) 8595eefee25Smacallan lt_cv_sys_max_cmd_len=196608 8605eefee25Smacallan ;; 8615eefee25Smacallan 8625eefee25Smacallan osf*) 8635eefee25Smacallan # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 8645eefee25Smacallan # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 8655eefee25Smacallan # nice to cause kernel panics so lets avoid the loop below. 8665eefee25Smacallan # First set a reasonable default. 8675eefee25Smacallan lt_cv_sys_max_cmd_len=16384 8685eefee25Smacallan # 8695eefee25Smacallan if test -x /sbin/sysconfig; then 8705eefee25Smacallan case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 8715eefee25Smacallan *1*) lt_cv_sys_max_cmd_len=-1 ;; 8725eefee25Smacallan esac 8735eefee25Smacallan fi 8745eefee25Smacallan ;; 8755eefee25Smacallan sco3.2v5*) 8765eefee25Smacallan lt_cv_sys_max_cmd_len=102400 8775eefee25Smacallan ;; 8785eefee25Smacallan sysv5* | sco5v6* | sysv4.2uw2*) 8795eefee25Smacallan kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 8805eefee25Smacallan if test -n "$kargmax"; then 8815eefee25Smacallan lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 8825eefee25Smacallan else 8835eefee25Smacallan lt_cv_sys_max_cmd_len=32768 8845eefee25Smacallan fi 8855eefee25Smacallan ;; 8865eefee25Smacallan *) 88762ab96baSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 88862ab96baSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 88962ab96baSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 89062ab96baSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 89162ab96baSmrg else 89262ab96baSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 89362ab96baSmrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 8945eefee25Smacallan = "XX$teststring") >/dev/null 2>&1 && 89562ab96baSmrg new_result=`expr "X$teststring" : ".*" 2>&1` && 89662ab96baSmrg lt_cv_sys_max_cmd_len=$new_result && 89762ab96baSmrg test $i != 17 # 1/2 MB should be enough 89862ab96baSmrg do 89962ab96baSmrg i=`expr $i + 1` 90062ab96baSmrg teststring=$teststring$teststring 90162ab96baSmrg done 90262ab96baSmrg teststring= 90362ab96baSmrg # Add a significant safety factor because C++ compilers can tack on massive 90462ab96baSmrg # amounts of additional arguments before passing them to the linker. 90562ab96baSmrg # It appears as though 1/2 is a usable value. 90662ab96baSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 90762ab96baSmrg fi 9085eefee25Smacallan ;; 9095eefee25Smacallan esac 9105eefee25Smacallan]) 9115eefee25Smacallanif test -n $lt_cv_sys_max_cmd_len ; then 9125eefee25Smacallan AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 9135eefee25Smacallanelse 9145eefee25Smacallan AC_MSG_RESULT(none) 9155eefee25Smacallanfi 9165eefee25Smacallan])# AC_LIBTOOL_SYS_MAX_CMD_LEN 9175eefee25Smacallan 9185eefee25Smacallan 9195eefee25Smacallan# _LT_AC_CHECK_DLFCN 9205eefee25Smacallan# ------------------ 9215eefee25SmacallanAC_DEFUN([_LT_AC_CHECK_DLFCN], 9225eefee25Smacallan[AC_CHECK_HEADERS(dlfcn.h)dnl 9235eefee25Smacallan])# _LT_AC_CHECK_DLFCN 9245eefee25Smacallan 9255eefee25Smacallan 9265eefee25Smacallan# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 9275eefee25Smacallan# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 9285eefee25Smacallan# --------------------------------------------------------------------- 9295eefee25SmacallanAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 9305eefee25Smacallan[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 9315eefee25Smacallanif test "$cross_compiling" = yes; then : 9325eefee25Smacallan [$4] 9335eefee25Smacallanelse 9345eefee25Smacallan lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 9355eefee25Smacallan lt_status=$lt_dlunknown 9365eefee25Smacallan cat > conftest.$ac_ext <<EOF 9375eefee25Smacallan[#line __oline__ "configure" 9385eefee25Smacallan#include "confdefs.h" 9395eefee25Smacallan 9405eefee25Smacallan#if HAVE_DLFCN_H 9415eefee25Smacallan#include <dlfcn.h> 9425eefee25Smacallan#endif 9435eefee25Smacallan 9445eefee25Smacallan#include <stdio.h> 9455eefee25Smacallan 9465eefee25Smacallan#ifdef RTLD_GLOBAL 9475eefee25Smacallan# define LT_DLGLOBAL RTLD_GLOBAL 9485eefee25Smacallan#else 9495eefee25Smacallan# ifdef DL_GLOBAL 9505eefee25Smacallan# define LT_DLGLOBAL DL_GLOBAL 9515eefee25Smacallan# else 9525eefee25Smacallan# define LT_DLGLOBAL 0 9535eefee25Smacallan# endif 9545eefee25Smacallan#endif 9555eefee25Smacallan 9565eefee25Smacallan/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 9575eefee25Smacallan find out it does not work in some platform. */ 9585eefee25Smacallan#ifndef LT_DLLAZY_OR_NOW 9595eefee25Smacallan# ifdef RTLD_LAZY 9605eefee25Smacallan# define LT_DLLAZY_OR_NOW RTLD_LAZY 9615eefee25Smacallan# else 9625eefee25Smacallan# ifdef DL_LAZY 9635eefee25Smacallan# define LT_DLLAZY_OR_NOW DL_LAZY 9645eefee25Smacallan# else 9655eefee25Smacallan# ifdef RTLD_NOW 9665eefee25Smacallan# define LT_DLLAZY_OR_NOW RTLD_NOW 9675eefee25Smacallan# else 9685eefee25Smacallan# ifdef DL_NOW 9695eefee25Smacallan# define LT_DLLAZY_OR_NOW DL_NOW 9705eefee25Smacallan# else 9715eefee25Smacallan# define LT_DLLAZY_OR_NOW 0 9725eefee25Smacallan# endif 9735eefee25Smacallan# endif 9745eefee25Smacallan# endif 9755eefee25Smacallan# endif 9765eefee25Smacallan#endif 9775eefee25Smacallan 9785eefee25Smacallan#ifdef __cplusplus 9795eefee25Smacallanextern "C" void exit (int); 9805eefee25Smacallan#endif 9815eefee25Smacallan 9825eefee25Smacallanvoid fnord() { int i=42;} 9835eefee25Smacallanint main () 9845eefee25Smacallan{ 9855eefee25Smacallan void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 9865eefee25Smacallan int status = $lt_dlunknown; 9875eefee25Smacallan 9885eefee25Smacallan if (self) 9895eefee25Smacallan { 9905eefee25Smacallan if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 9915eefee25Smacallan else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 9925eefee25Smacallan /* dlclose (self); */ 9935eefee25Smacallan } 9945eefee25Smacallan else 9955eefee25Smacallan puts (dlerror ()); 9965eefee25Smacallan 9975eefee25Smacallan exit (status); 9985eefee25Smacallan}] 9995eefee25SmacallanEOF 10005eefee25Smacallan if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 10015eefee25Smacallan (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 10025eefee25Smacallan lt_status=$? 10035eefee25Smacallan case x$lt_status in 10045eefee25Smacallan x$lt_dlno_uscore) $1 ;; 10055eefee25Smacallan x$lt_dlneed_uscore) $2 ;; 10065eefee25Smacallan x$lt_dlunknown|x*) $3 ;; 10075eefee25Smacallan esac 10085eefee25Smacallan else : 10095eefee25Smacallan # compilation failed 10105eefee25Smacallan $3 10115eefee25Smacallan fi 10125eefee25Smacallanfi 10135eefee25Smacallanrm -fr conftest* 10145eefee25Smacallan])# _LT_AC_TRY_DLOPEN_SELF 10155eefee25Smacallan 10165eefee25Smacallan 10175eefee25Smacallan# AC_LIBTOOL_DLOPEN_SELF 10185eefee25Smacallan# ---------------------- 10195eefee25SmacallanAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 10205eefee25Smacallan[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 10215eefee25Smacallanif test "x$enable_dlopen" != xyes; then 10225eefee25Smacallan enable_dlopen=unknown 10235eefee25Smacallan enable_dlopen_self=unknown 10245eefee25Smacallan enable_dlopen_self_static=unknown 10255eefee25Smacallanelse 10265eefee25Smacallan lt_cv_dlopen=no 10275eefee25Smacallan lt_cv_dlopen_libs= 10285eefee25Smacallan 10295eefee25Smacallan case $host_os in 10305eefee25Smacallan beos*) 10315eefee25Smacallan lt_cv_dlopen="load_add_on" 10325eefee25Smacallan lt_cv_dlopen_libs= 10335eefee25Smacallan lt_cv_dlopen_self=yes 10345eefee25Smacallan ;; 10355eefee25Smacallan 10365eefee25Smacallan mingw* | pw32*) 10375eefee25Smacallan lt_cv_dlopen="LoadLibrary" 10385eefee25Smacallan lt_cv_dlopen_libs= 10395eefee25Smacallan ;; 10405eefee25Smacallan 10415eefee25Smacallan cygwin*) 10425eefee25Smacallan lt_cv_dlopen="dlopen" 10435eefee25Smacallan lt_cv_dlopen_libs= 10445eefee25Smacallan ;; 10455eefee25Smacallan 10465eefee25Smacallan darwin*) 10475eefee25Smacallan # if libdl is installed we need to link against it 10485eefee25Smacallan AC_CHECK_LIB([dl], [dlopen], 10495eefee25Smacallan [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 10505eefee25Smacallan lt_cv_dlopen="dyld" 10515eefee25Smacallan lt_cv_dlopen_libs= 10525eefee25Smacallan lt_cv_dlopen_self=yes 10535eefee25Smacallan ]) 10545eefee25Smacallan ;; 10555eefee25Smacallan 10565eefee25Smacallan *) 10575eefee25Smacallan AC_CHECK_FUNC([shl_load], 10585eefee25Smacallan [lt_cv_dlopen="shl_load"], 10595eefee25Smacallan [AC_CHECK_LIB([dld], [shl_load], 106062ab96baSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 10615eefee25Smacallan [AC_CHECK_FUNC([dlopen], 10625eefee25Smacallan [lt_cv_dlopen="dlopen"], 10635eefee25Smacallan [AC_CHECK_LIB([dl], [dlopen], 10645eefee25Smacallan [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 10655eefee25Smacallan [AC_CHECK_LIB([svld], [dlopen], 10665eefee25Smacallan [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 10675eefee25Smacallan [AC_CHECK_LIB([dld], [dld_link], 106862ab96baSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 10695eefee25Smacallan ]) 10705eefee25Smacallan ]) 10715eefee25Smacallan ]) 10725eefee25Smacallan ]) 10735eefee25Smacallan ]) 10745eefee25Smacallan ;; 10755eefee25Smacallan esac 10765eefee25Smacallan 10775eefee25Smacallan if test "x$lt_cv_dlopen" != xno; then 10785eefee25Smacallan enable_dlopen=yes 10795eefee25Smacallan else 10805eefee25Smacallan enable_dlopen=no 10815eefee25Smacallan fi 10825eefee25Smacallan 10835eefee25Smacallan case $lt_cv_dlopen in 10845eefee25Smacallan dlopen) 10855eefee25Smacallan save_CPPFLAGS="$CPPFLAGS" 10865eefee25Smacallan test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 10875eefee25Smacallan 10885eefee25Smacallan save_LDFLAGS="$LDFLAGS" 10895eefee25Smacallan wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 10905eefee25Smacallan 10915eefee25Smacallan save_LIBS="$LIBS" 10925eefee25Smacallan LIBS="$lt_cv_dlopen_libs $LIBS" 10935eefee25Smacallan 10945eefee25Smacallan AC_CACHE_CHECK([whether a program can dlopen itself], 10955eefee25Smacallan lt_cv_dlopen_self, [dnl 10965eefee25Smacallan _LT_AC_TRY_DLOPEN_SELF( 10975eefee25Smacallan lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 10985eefee25Smacallan lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 10995eefee25Smacallan ]) 11005eefee25Smacallan 11015eefee25Smacallan if test "x$lt_cv_dlopen_self" = xyes; then 11025eefee25Smacallan wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 11035eefee25Smacallan AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 11045eefee25Smacallan lt_cv_dlopen_self_static, [dnl 11055eefee25Smacallan _LT_AC_TRY_DLOPEN_SELF( 11065eefee25Smacallan lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 11075eefee25Smacallan lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 11085eefee25Smacallan ]) 11095eefee25Smacallan fi 11105eefee25Smacallan 11115eefee25Smacallan CPPFLAGS="$save_CPPFLAGS" 11125eefee25Smacallan LDFLAGS="$save_LDFLAGS" 11135eefee25Smacallan LIBS="$save_LIBS" 11145eefee25Smacallan ;; 11155eefee25Smacallan esac 11165eefee25Smacallan 11175eefee25Smacallan case $lt_cv_dlopen_self in 11185eefee25Smacallan yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 11195eefee25Smacallan *) enable_dlopen_self=unknown ;; 11205eefee25Smacallan esac 11215eefee25Smacallan 11225eefee25Smacallan case $lt_cv_dlopen_self_static in 11235eefee25Smacallan yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 11245eefee25Smacallan *) enable_dlopen_self_static=unknown ;; 11255eefee25Smacallan esac 11265eefee25Smacallanfi 11275eefee25Smacallan])# AC_LIBTOOL_DLOPEN_SELF 11285eefee25Smacallan 11295eefee25Smacallan 11305eefee25Smacallan# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 11315eefee25Smacallan# --------------------------------- 11325eefee25Smacallan# Check to see if options -c and -o are simultaneously supported by compiler 11335eefee25SmacallanAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 113462ab96baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 113562ab96baSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 11365eefee25SmacallanAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 11375eefee25Smacallan [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 11385eefee25Smacallan [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 11395eefee25Smacallan $rm -r conftest 2>/dev/null 11405eefee25Smacallan mkdir conftest 11415eefee25Smacallan cd conftest 11425eefee25Smacallan mkdir out 114362ab96baSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 11445eefee25Smacallan 11455eefee25Smacallan lt_compiler_flag="-o out/conftest2.$ac_objext" 11465eefee25Smacallan # Insert the option either (1) after the last *FLAGS variable, or 11475eefee25Smacallan # (2) before a word containing "conftest.", or (3) at the end. 11485eefee25Smacallan # Note that $ac_compile itself does not contain backslashes and begins 11495eefee25Smacallan # with a dollar sign (not a hyphen), so the echo should work correctly. 11505eefee25Smacallan lt_compile=`echo "$ac_compile" | $SED \ 11515eefee25Smacallan -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 11525eefee25Smacallan -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 11535eefee25Smacallan -e 's:$: $lt_compiler_flag:'` 11545eefee25Smacallan (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 11555eefee25Smacallan (eval "$lt_compile" 2>out/conftest.err) 11565eefee25Smacallan ac_status=$? 11575eefee25Smacallan cat out/conftest.err >&AS_MESSAGE_LOG_FD 11585eefee25Smacallan echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 11595eefee25Smacallan if (exit $ac_status) && test -s out/conftest2.$ac_objext 11605eefee25Smacallan then 11615eefee25Smacallan # The compiler can only warn and ignore the option if not recognized 11625eefee25Smacallan # So say no if there are warnings 11635eefee25Smacallan $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 11645eefee25Smacallan $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 11655eefee25Smacallan if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 11665eefee25Smacallan _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11675eefee25Smacallan fi 11685eefee25Smacallan fi 11695eefee25Smacallan chmod u+w . 2>&AS_MESSAGE_LOG_FD 11705eefee25Smacallan $rm conftest* 11715eefee25Smacallan # SGI C++ compiler will create directory out/ii_files/ for 11725eefee25Smacallan # template instantiation 11735eefee25Smacallan test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 11745eefee25Smacallan $rm out/* && rmdir out 11755eefee25Smacallan cd .. 11765eefee25Smacallan rmdir conftest 11775eefee25Smacallan $rm conftest* 11785eefee25Smacallan]) 11795eefee25Smacallan])# AC_LIBTOOL_PROG_CC_C_O 11805eefee25Smacallan 11815eefee25Smacallan 11825eefee25Smacallan# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 11835eefee25Smacallan# ----------------------------------------- 11845eefee25Smacallan# Check to see if we can do hard links to lock some files if needed 11855eefee25SmacallanAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 11865eefee25Smacallan[AC_REQUIRE([_LT_AC_LOCK])dnl 11875eefee25Smacallan 11885eefee25Smacallanhard_links="nottested" 11895eefee25Smacallanif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 11905eefee25Smacallan # do not overwrite the value of need_locks provided by the user 11915eefee25Smacallan AC_MSG_CHECKING([if we can lock with hard links]) 11925eefee25Smacallan hard_links=yes 11935eefee25Smacallan $rm conftest* 11945eefee25Smacallan ln conftest.a conftest.b 2>/dev/null && hard_links=no 11955eefee25Smacallan touch conftest.a 11965eefee25Smacallan ln conftest.a conftest.b 2>&5 || hard_links=no 11975eefee25Smacallan ln conftest.a conftest.b 2>/dev/null && hard_links=no 11985eefee25Smacallan AC_MSG_RESULT([$hard_links]) 11995eefee25Smacallan if test "$hard_links" = no; then 12005eefee25Smacallan AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 12015eefee25Smacallan need_locks=warn 12025eefee25Smacallan fi 12035eefee25Smacallanelse 12045eefee25Smacallan need_locks=no 12055eefee25Smacallanfi 12065eefee25Smacallan])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 12075eefee25Smacallan 12085eefee25Smacallan 12095eefee25Smacallan# AC_LIBTOOL_OBJDIR 12105eefee25Smacallan# ----------------- 12115eefee25SmacallanAC_DEFUN([AC_LIBTOOL_OBJDIR], 12125eefee25Smacallan[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 12135eefee25Smacallan[rm -f .libs 2>/dev/null 12145eefee25Smacallanmkdir .libs 2>/dev/null 12155eefee25Smacallanif test -d .libs; then 12165eefee25Smacallan lt_cv_objdir=.libs 12175eefee25Smacallanelse 12185eefee25Smacallan # MS-DOS does not allow filenames that begin with a dot. 12195eefee25Smacallan lt_cv_objdir=_libs 12205eefee25Smacallanfi 12215eefee25Smacallanrmdir .libs 2>/dev/null]) 12225eefee25Smacallanobjdir=$lt_cv_objdir 12235eefee25Smacallan])# AC_LIBTOOL_OBJDIR 12245eefee25Smacallan 12255eefee25Smacallan 12265eefee25Smacallan# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 12275eefee25Smacallan# ---------------------------------------------- 12285eefee25Smacallan# Check hardcoding attributes. 12295eefee25SmacallanAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 12305eefee25Smacallan[AC_MSG_CHECKING([how to hardcode library paths into programs]) 12315eefee25Smacallan_LT_AC_TAGVAR(hardcode_action, $1)= 12325eefee25Smacallanif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 12335eefee25Smacallan test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 12345eefee25Smacallan test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 12355eefee25Smacallan 12365eefee25Smacallan # We can hardcode non-existant directories. 12375eefee25Smacallan if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 12385eefee25Smacallan # If the only mechanism to avoid hardcoding is shlibpath_var, we 12395eefee25Smacallan # have to relink, otherwise we might link with an installed library 12405eefee25Smacallan # when we should be linking with a yet-to-be-installed one 12415eefee25Smacallan ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 12425eefee25Smacallan test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 12435eefee25Smacallan # Linking always hardcodes the temporary library directory. 12445eefee25Smacallan _LT_AC_TAGVAR(hardcode_action, $1)=relink 12455eefee25Smacallan else 12465eefee25Smacallan # We can link without hardcoding, and we can hardcode nonexisting dirs. 12475eefee25Smacallan _LT_AC_TAGVAR(hardcode_action, $1)=immediate 12485eefee25Smacallan fi 12495eefee25Smacallanelse 12505eefee25Smacallan # We cannot hardcode anything, or else we can only hardcode existing 12515eefee25Smacallan # directories. 12525eefee25Smacallan _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 12535eefee25Smacallanfi 12545eefee25SmacallanAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 12555eefee25Smacallan 12565eefee25Smacallanif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 12575eefee25Smacallan # Fast installation is not supported 12585eefee25Smacallan enable_fast_install=no 12595eefee25Smacallanelif test "$shlibpath_overrides_runpath" = yes || 12605eefee25Smacallan test "$enable_shared" = no; then 12615eefee25Smacallan # Fast installation is not necessary 12625eefee25Smacallan enable_fast_install=needless 12635eefee25Smacallanfi 12645eefee25Smacallan])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 12655eefee25Smacallan 12665eefee25Smacallan 12675eefee25Smacallan# AC_LIBTOOL_SYS_LIB_STRIP 12685eefee25Smacallan# ------------------------ 12695eefee25SmacallanAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 12705eefee25Smacallan[striplib= 12715eefee25Smacallanold_striplib= 12725eefee25SmacallanAC_MSG_CHECKING([whether stripping libraries is possible]) 12735eefee25Smacallanif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 12745eefee25Smacallan test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 12755eefee25Smacallan test -z "$striplib" && striplib="$STRIP --strip-unneeded" 12765eefee25Smacallan AC_MSG_RESULT([yes]) 12775eefee25Smacallanelse 12785eefee25Smacallan# FIXME - insert some real tests, host_os isn't really good enough 12795eefee25Smacallan case $host_os in 12805eefee25Smacallan darwin*) 12815eefee25Smacallan if test -n "$STRIP" ; then 12825eefee25Smacallan striplib="$STRIP -x" 128362ab96baSmrg old_striplib="$STRIP -S" 12845eefee25Smacallan AC_MSG_RESULT([yes]) 12855eefee25Smacallan else 12865eefee25Smacallan AC_MSG_RESULT([no]) 12875eefee25Smacallanfi 12885eefee25Smacallan ;; 12895eefee25Smacallan *) 12905eefee25Smacallan AC_MSG_RESULT([no]) 12915eefee25Smacallan ;; 12925eefee25Smacallan esac 12935eefee25Smacallanfi 12945eefee25Smacallan])# AC_LIBTOOL_SYS_LIB_STRIP 12955eefee25Smacallan 12965eefee25Smacallan 12975eefee25Smacallan# AC_LIBTOOL_SYS_DYNAMIC_LINKER 12985eefee25Smacallan# ----------------------------- 12995eefee25Smacallan# PORTME Fill in your ld.so characteristics 13005eefee25SmacallanAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 130162ab96baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 130262ab96baSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 13035eefee25Smacallanlibrary_names_spec= 13045eefee25Smacallanlibname_spec='lib$name' 13055eefee25Smacallansoname_spec= 13065eefee25Smacallanshrext_cmds=".so" 13075eefee25Smacallanpostinstall_cmds= 13085eefee25Smacallanpostuninstall_cmds= 13095eefee25Smacallanfinish_cmds= 13105eefee25Smacallanfinish_eval= 13115eefee25Smacallanshlibpath_var= 13125eefee25Smacallanshlibpath_overrides_runpath=unknown 13135eefee25Smacallanversion_type=none 13145eefee25Smacallandynamic_linker="$host_os ld.so" 13155eefee25Smacallansys_lib_dlsearch_path_spec="/lib /usr/lib" 131662ab96baSmrgm4_if($1,[],[ 13175eefee25Smacallanif test "$GCC" = yes; then 131862ab96baSmrg case $host_os in 131962ab96baSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 132062ab96baSmrg *) lt_awk_arg="/^libraries:/" ;; 132162ab96baSmrg esac 132262ab96baSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 132362ab96baSmrg if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 13245eefee25Smacallan # if the path contains ";" then we assume it to be the separator 13255eefee25Smacallan # otherwise default to the standard path separator (i.e. ":") - it is 13265eefee25Smacallan # assumed that no part of a normal pathname contains ";" but that should 13275eefee25Smacallan # okay in the real world where ";" in dirpaths is itself problematic. 132862ab96baSmrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 13295eefee25Smacallan else 133062ab96baSmrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 13315eefee25Smacallan fi 133262ab96baSmrg # Ok, now we have the path, separated by spaces, we can step through it 133362ab96baSmrg # and add multilib dir if necessary. 133462ab96baSmrg lt_tmp_lt_search_path_spec= 133562ab96baSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 133662ab96baSmrg for lt_sys_path in $lt_search_path_spec; do 133762ab96baSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 133862ab96baSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 133962ab96baSmrg else 134062ab96baSmrg test -d "$lt_sys_path" && \ 134162ab96baSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 134262ab96baSmrg fi 134362ab96baSmrg done 134462ab96baSmrg lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 134562ab96baSmrgBEGIN {RS=" "; FS="/|\n";} { 134662ab96baSmrg lt_foo=""; 134762ab96baSmrg lt_count=0; 134862ab96baSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 134962ab96baSmrg if ($lt_i != "" && $lt_i != ".") { 135062ab96baSmrg if ($lt_i == "..") { 135162ab96baSmrg lt_count++; 135262ab96baSmrg } else { 135362ab96baSmrg if (lt_count == 0) { 135462ab96baSmrg lt_foo="/" $lt_i lt_foo; 135562ab96baSmrg } else { 135662ab96baSmrg lt_count--; 135762ab96baSmrg } 135862ab96baSmrg } 135962ab96baSmrg } 136062ab96baSmrg } 136162ab96baSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 136262ab96baSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 136362ab96baSmrg}'` 136462ab96baSmrg sys_lib_search_path_spec=`echo $lt_search_path_spec` 13655eefee25Smacallanelse 13665eefee25Smacallan sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 136762ab96baSmrgfi]) 13685eefee25Smacallanneed_lib_prefix=unknown 13695eefee25Smacallanhardcode_into_libs=no 13705eefee25Smacallan 13715eefee25Smacallan# when you set need_version to no, make sure it does not cause -set_version 13725eefee25Smacallan# flags to be left without arguments 13735eefee25Smacallanneed_version=unknown 13745eefee25Smacallan 13755eefee25Smacallancase $host_os in 13765eefee25Smacallanaix3*) 13775eefee25Smacallan version_type=linux 13785eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 13795eefee25Smacallan shlibpath_var=LIBPATH 13805eefee25Smacallan 13815eefee25Smacallan # AIX 3 has no versioning support, so we append a major version to the name. 13825eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 13835eefee25Smacallan ;; 13845eefee25Smacallan 138562ab96baSmrgaix[[4-9]]*) 13865eefee25Smacallan version_type=linux 13875eefee25Smacallan need_lib_prefix=no 13885eefee25Smacallan need_version=no 13895eefee25Smacallan hardcode_into_libs=yes 13905eefee25Smacallan if test "$host_cpu" = ia64; then 13915eefee25Smacallan # AIX 5 supports IA64 13925eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 13935eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 13945eefee25Smacallan else 13955eefee25Smacallan # With GCC up to 2.95.x, collect2 would create an import file 13965eefee25Smacallan # for dependence libraries. The import file would start with 13975eefee25Smacallan # the line `#! .'. This would cause the generated library to 13985eefee25Smacallan # depend on `.', always an invalid library. This was fixed in 13995eefee25Smacallan # development snapshots of GCC prior to 3.0. 14005eefee25Smacallan case $host_os in 14015eefee25Smacallan aix4 | aix4.[[01]] | aix4.[[01]].*) 14025eefee25Smacallan if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 14035eefee25Smacallan echo ' yes ' 14045eefee25Smacallan echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 14055eefee25Smacallan : 14065eefee25Smacallan else 14075eefee25Smacallan can_build_shared=no 14085eefee25Smacallan fi 14095eefee25Smacallan ;; 14105eefee25Smacallan esac 14115eefee25Smacallan # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 14125eefee25Smacallan # soname into executable. Probably we can add versioning support to 14135eefee25Smacallan # collect2, so additional links can be useful in future. 14145eefee25Smacallan if test "$aix_use_runtimelinking" = yes; then 14155eefee25Smacallan # If using run time linking (on AIX 4.2 or later) use lib<name>.so 14165eefee25Smacallan # instead of lib<name>.a to let people know that these are not 14175eefee25Smacallan # typical AIX shared libraries. 14185eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 14195eefee25Smacallan else 14205eefee25Smacallan # We preserve .a as extension for shared libraries through AIX4.2 14215eefee25Smacallan # and later when we are not doing run time linking. 14225eefee25Smacallan library_names_spec='${libname}${release}.a $libname.a' 14235eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 14245eefee25Smacallan fi 14255eefee25Smacallan shlibpath_var=LIBPATH 14265eefee25Smacallan fi 14275eefee25Smacallan ;; 14285eefee25Smacallan 14295eefee25Smacallanamigaos*) 14305eefee25Smacallan library_names_spec='$libname.ixlibrary $libname.a' 14315eefee25Smacallan # Create ${libname}_ixlibrary.a entries in /sys/libs. 14325eefee25Smacallan 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' 14335eefee25Smacallan ;; 14345eefee25Smacallan 14355eefee25Smacallanbeos*) 14365eefee25Smacallan library_names_spec='${libname}${shared_ext}' 14375eefee25Smacallan dynamic_linker="$host_os ld.so" 14385eefee25Smacallan shlibpath_var=LIBRARY_PATH 14395eefee25Smacallan ;; 14405eefee25Smacallan 14415eefee25Smacallanbsdi[[45]]*) 14425eefee25Smacallan version_type=linux 14435eefee25Smacallan need_version=no 14445eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 14455eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 14465eefee25Smacallan finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 14475eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 14485eefee25Smacallan sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 14495eefee25Smacallan sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 14505eefee25Smacallan # the default ld.so.conf also contains /usr/contrib/lib and 14515eefee25Smacallan # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 14525eefee25Smacallan # libtool to hard-code these into programs 14535eefee25Smacallan ;; 14545eefee25Smacallan 14555eefee25Smacallancygwin* | mingw* | pw32*) 14565eefee25Smacallan version_type=windows 14575eefee25Smacallan shrext_cmds=".dll" 14585eefee25Smacallan need_version=no 14595eefee25Smacallan need_lib_prefix=no 14605eefee25Smacallan 14615eefee25Smacallan case $GCC,$host_os in 14625eefee25Smacallan yes,cygwin* | yes,mingw* | yes,pw32*) 14635eefee25Smacallan library_names_spec='$libname.dll.a' 14645eefee25Smacallan # DLL is installed to $(libdir)/../bin by postinstall_cmds 14655eefee25Smacallan postinstall_cmds='base_file=`basename \${file}`~ 14665eefee25Smacallan dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 14675eefee25Smacallan dldir=$destdir/`dirname \$dlpath`~ 14685eefee25Smacallan test -d \$dldir || mkdir -p \$dldir~ 14695eefee25Smacallan $install_prog $dir/$dlname \$dldir/$dlname~ 14705eefee25Smacallan chmod a+x \$dldir/$dlname' 14715eefee25Smacallan postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 14725eefee25Smacallan dlpath=$dir/\$dldll~ 14735eefee25Smacallan $rm \$dlpath' 14745eefee25Smacallan shlibpath_overrides_runpath=yes 14755eefee25Smacallan 14765eefee25Smacallan case $host_os in 14775eefee25Smacallan cygwin*) 14785eefee25Smacallan # Cygwin DLLs use 'cyg' prefix rather than 'lib' 14795eefee25Smacallan soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 14805eefee25Smacallan sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 14815eefee25Smacallan ;; 14825eefee25Smacallan mingw*) 14835eefee25Smacallan # MinGW DLLs use traditional 'lib' prefix 14845eefee25Smacallan soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 14855eefee25Smacallan sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 14865eefee25Smacallan if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 14875eefee25Smacallan # It is most probably a Windows format PATH printed by 14885eefee25Smacallan # mingw gcc, but we are running on Cygwin. Gcc prints its search 14895eefee25Smacallan # path with ; separators, and with drive letters. We can handle the 14905eefee25Smacallan # drive letters (cygwin fileutils understands them), so leave them, 14915eefee25Smacallan # especially as we might pass files found there to a mingw objdump, 14925eefee25Smacallan # which wouldn't understand a cygwinified path. Ahh. 14935eefee25Smacallan sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 14945eefee25Smacallan else 14955eefee25Smacallan sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 14965eefee25Smacallan fi 14975eefee25Smacallan ;; 14985eefee25Smacallan pw32*) 14995eefee25Smacallan # pw32 DLLs use 'pw' prefix rather than 'lib' 15005eefee25Smacallan library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 15015eefee25Smacallan ;; 15025eefee25Smacallan esac 15035eefee25Smacallan ;; 15045eefee25Smacallan 15055eefee25Smacallan *) 15065eefee25Smacallan library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 15075eefee25Smacallan ;; 15085eefee25Smacallan esac 15095eefee25Smacallan dynamic_linker='Win32 ld.exe' 15105eefee25Smacallan # FIXME: first we should search . and the directory the executable is in 15115eefee25Smacallan shlibpath_var=PATH 15125eefee25Smacallan ;; 15135eefee25Smacallan 15145eefee25Smacallandarwin* | rhapsody*) 15155eefee25Smacallan dynamic_linker="$host_os dyld" 15165eefee25Smacallan version_type=darwin 15175eefee25Smacallan need_lib_prefix=no 15185eefee25Smacallan need_version=no 15195eefee25Smacallan library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 15205eefee25Smacallan soname_spec='${libname}${release}${major}$shared_ext' 15215eefee25Smacallan shlibpath_overrides_runpath=yes 15225eefee25Smacallan shlibpath_var=DYLD_LIBRARY_PATH 15235eefee25Smacallan shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 152462ab96baSmrg m4_if([$1], [],[ 152562ab96baSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 15265eefee25Smacallan sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 15275eefee25Smacallan ;; 15285eefee25Smacallan 15295eefee25Smacallandgux*) 15305eefee25Smacallan version_type=linux 15315eefee25Smacallan need_lib_prefix=no 15325eefee25Smacallan need_version=no 15335eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 15345eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 15355eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 15365eefee25Smacallan ;; 15375eefee25Smacallan 15385eefee25Smacallanfreebsd1*) 15395eefee25Smacallan dynamic_linker=no 15405eefee25Smacallan ;; 15415eefee25Smacallan 15425eefee25Smacallanfreebsd* | dragonfly*) 15435eefee25Smacallan # DragonFly does not have aout. When/if they implement a new 15445eefee25Smacallan # versioning mechanism, adjust this. 15455eefee25Smacallan if test -x /usr/bin/objformat; then 15465eefee25Smacallan objformat=`/usr/bin/objformat` 15475eefee25Smacallan else 15485eefee25Smacallan case $host_os in 15495eefee25Smacallan freebsd[[123]]*) objformat=aout ;; 15505eefee25Smacallan *) objformat=elf ;; 15515eefee25Smacallan esac 15525eefee25Smacallan fi 15535eefee25Smacallan version_type=freebsd-$objformat 15545eefee25Smacallan case $version_type in 15555eefee25Smacallan freebsd-elf*) 15565eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 15575eefee25Smacallan need_version=no 15585eefee25Smacallan need_lib_prefix=no 15595eefee25Smacallan ;; 15605eefee25Smacallan freebsd-*) 15615eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 15625eefee25Smacallan need_version=yes 15635eefee25Smacallan ;; 15645eefee25Smacallan esac 15655eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 15665eefee25Smacallan case $host_os in 15675eefee25Smacallan freebsd2*) 15685eefee25Smacallan shlibpath_overrides_runpath=yes 15695eefee25Smacallan ;; 15705eefee25Smacallan freebsd3.[[01]]* | freebsdelf3.[[01]]*) 15715eefee25Smacallan shlibpath_overrides_runpath=yes 15725eefee25Smacallan hardcode_into_libs=yes 15735eefee25Smacallan ;; 15745eefee25Smacallan freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 15755eefee25Smacallan freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 15765eefee25Smacallan shlibpath_overrides_runpath=no 15775eefee25Smacallan hardcode_into_libs=yes 15785eefee25Smacallan ;; 157962ab96baSmrg *) # from 4.6 on, and DragonFly 15805eefee25Smacallan shlibpath_overrides_runpath=yes 15815eefee25Smacallan hardcode_into_libs=yes 15825eefee25Smacallan ;; 15835eefee25Smacallan esac 15845eefee25Smacallan ;; 15855eefee25Smacallan 15865eefee25Smacallangnu*) 15875eefee25Smacallan version_type=linux 15885eefee25Smacallan need_lib_prefix=no 15895eefee25Smacallan need_version=no 15905eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 15915eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 15925eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 15935eefee25Smacallan hardcode_into_libs=yes 15945eefee25Smacallan ;; 15955eefee25Smacallan 15965eefee25Smacallanhpux9* | hpux10* | hpux11*) 15975eefee25Smacallan # Give a soname corresponding to the major version so that dld.sl refuses to 15985eefee25Smacallan # link against other versions. 15995eefee25Smacallan version_type=sunos 16005eefee25Smacallan need_lib_prefix=no 16015eefee25Smacallan need_version=no 16025eefee25Smacallan case $host_cpu in 16035eefee25Smacallan ia64*) 16045eefee25Smacallan shrext_cmds='.so' 16055eefee25Smacallan hardcode_into_libs=yes 16065eefee25Smacallan dynamic_linker="$host_os dld.so" 16075eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 16085eefee25Smacallan shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 16095eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 16105eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 16115eefee25Smacallan if test "X$HPUX_IA64_MODE" = X32; then 16125eefee25Smacallan sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 16135eefee25Smacallan else 16145eefee25Smacallan sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 16155eefee25Smacallan fi 16165eefee25Smacallan sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 16175eefee25Smacallan ;; 16185eefee25Smacallan hppa*64*) 16195eefee25Smacallan shrext_cmds='.sl' 16205eefee25Smacallan hardcode_into_libs=yes 16215eefee25Smacallan dynamic_linker="$host_os dld.sl" 16225eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 16235eefee25Smacallan shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 16245eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 16255eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 16265eefee25Smacallan sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 16275eefee25Smacallan sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 16285eefee25Smacallan ;; 16295eefee25Smacallan *) 16305eefee25Smacallan shrext_cmds='.sl' 16315eefee25Smacallan dynamic_linker="$host_os dld.sl" 16325eefee25Smacallan shlibpath_var=SHLIB_PATH 16335eefee25Smacallan shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 16345eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 16355eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 16365eefee25Smacallan ;; 16375eefee25Smacallan esac 16385eefee25Smacallan # HP-UX runs *really* slowly unless shared libraries are mode 555. 16395eefee25Smacallan postinstall_cmds='chmod 555 $lib' 16405eefee25Smacallan ;; 16415eefee25Smacallan 164262ab96baSmrginterix[[3-9]]*) 16435eefee25Smacallan version_type=linux 16445eefee25Smacallan need_lib_prefix=no 16455eefee25Smacallan need_version=no 16465eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 16475eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 16485eefee25Smacallan dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 16495eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 16505eefee25Smacallan shlibpath_overrides_runpath=no 16515eefee25Smacallan hardcode_into_libs=yes 16525eefee25Smacallan ;; 16535eefee25Smacallan 16545eefee25Smacallanirix5* | irix6* | nonstopux*) 16555eefee25Smacallan case $host_os in 16565eefee25Smacallan nonstopux*) version_type=nonstopux ;; 16575eefee25Smacallan *) 16585eefee25Smacallan if test "$lt_cv_prog_gnu_ld" = yes; then 16595eefee25Smacallan version_type=linux 16605eefee25Smacallan else 16615eefee25Smacallan version_type=irix 16625eefee25Smacallan fi ;; 16635eefee25Smacallan esac 16645eefee25Smacallan need_lib_prefix=no 16655eefee25Smacallan need_version=no 16665eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 16675eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 16685eefee25Smacallan case $host_os in 16695eefee25Smacallan irix5* | nonstopux*) 16705eefee25Smacallan libsuff= shlibsuff= 16715eefee25Smacallan ;; 16725eefee25Smacallan *) 16735eefee25Smacallan case $LD in # libtool.m4 will add one of these switches to LD 16745eefee25Smacallan *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 16755eefee25Smacallan libsuff= shlibsuff= libmagic=32-bit;; 16765eefee25Smacallan *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 16775eefee25Smacallan libsuff=32 shlibsuff=N32 libmagic=N32;; 16785eefee25Smacallan *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 16795eefee25Smacallan libsuff=64 shlibsuff=64 libmagic=64-bit;; 16805eefee25Smacallan *) libsuff= shlibsuff= libmagic=never-match;; 16815eefee25Smacallan esac 16825eefee25Smacallan ;; 16835eefee25Smacallan esac 16845eefee25Smacallan shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 16855eefee25Smacallan shlibpath_overrides_runpath=no 16865eefee25Smacallan sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 16875eefee25Smacallan sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 16885eefee25Smacallan hardcode_into_libs=yes 16895eefee25Smacallan ;; 16905eefee25Smacallan 16915eefee25Smacallan# No shared lib support for Linux oldld, aout, or coff. 16925eefee25Smacallanlinux*oldld* | linux*aout* | linux*coff*) 16935eefee25Smacallan dynamic_linker=no 16945eefee25Smacallan ;; 16955eefee25Smacallan 16965eefee25Smacallan# This must be Linux ELF. 169762ab96baSmrglinux* | k*bsd*-gnu) 16985eefee25Smacallan version_type=linux 16995eefee25Smacallan need_lib_prefix=no 17005eefee25Smacallan need_version=no 17015eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 17025eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 17035eefee25Smacallan finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 17045eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 17055eefee25Smacallan shlibpath_overrides_runpath=no 17065eefee25Smacallan # This implies no fast_install, which is unacceptable. 17075eefee25Smacallan # Some rework will be needed to allow for fast_install 17085eefee25Smacallan # before this can be enabled. 17095eefee25Smacallan hardcode_into_libs=yes 17105eefee25Smacallan 17115eefee25Smacallan # Append ld.so.conf contents to the search path 17125eefee25Smacallan if test -f /etc/ld.so.conf; then 171362ab96baSmrg 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' ' '` 171462ab96baSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 17155eefee25Smacallan fi 17165eefee25Smacallan 17175eefee25Smacallan # We used to test for /lib/ld.so.1 and disable shared libraries on 17185eefee25Smacallan # powerpc, because MkLinux only supported shared libraries with the 17195eefee25Smacallan # GNU dynamic linker. Since this was broken with cross compilers, 17205eefee25Smacallan # most powerpc-linux boxes support dynamic linking these days and 17215eefee25Smacallan # people can always --disable-shared, the test was removed, and we 17225eefee25Smacallan # assume the GNU/Linux dynamic linker is in use. 17235eefee25Smacallan dynamic_linker='GNU/Linux ld.so' 17245eefee25Smacallan ;; 17255eefee25Smacallan 172662ab96baSmrgnetbsdelf*-gnu) 17275eefee25Smacallan version_type=linux 17285eefee25Smacallan need_lib_prefix=no 17295eefee25Smacallan need_version=no 17305eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 17315eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 17325eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 17335eefee25Smacallan shlibpath_overrides_runpath=no 17345eefee25Smacallan hardcode_into_libs=yes 173562ab96baSmrg dynamic_linker='NetBSD ld.elf_so' 17365eefee25Smacallan ;; 17375eefee25Smacallan 17385eefee25Smacallannetbsd*) 17395eefee25Smacallan version_type=sunos 17405eefee25Smacallan need_lib_prefix=no 17415eefee25Smacallan need_version=no 17425eefee25Smacallan if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 17435eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 17445eefee25Smacallan finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 17455eefee25Smacallan dynamic_linker='NetBSD (a.out) ld.so' 17465eefee25Smacallan else 17475eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 17485eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 17495eefee25Smacallan dynamic_linker='NetBSD ld.elf_so' 17505eefee25Smacallan fi 17515eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 17525eefee25Smacallan shlibpath_overrides_runpath=yes 17535eefee25Smacallan hardcode_into_libs=yes 17545eefee25Smacallan ;; 17555eefee25Smacallan 17565eefee25Smacallannewsos6) 17575eefee25Smacallan version_type=linux 17585eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 17595eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 17605eefee25Smacallan shlibpath_overrides_runpath=yes 17615eefee25Smacallan ;; 17625eefee25Smacallan 17635eefee25Smacallannto-qnx*) 17645eefee25Smacallan version_type=linux 17655eefee25Smacallan need_lib_prefix=no 17665eefee25Smacallan need_version=no 17675eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 17685eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 17695eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 17705eefee25Smacallan shlibpath_overrides_runpath=yes 17715eefee25Smacallan ;; 17725eefee25Smacallan 17735eefee25Smacallanopenbsd*) 17745eefee25Smacallan version_type=sunos 17755eefee25Smacallan sys_lib_dlsearch_path_spec="/usr/lib" 17765eefee25Smacallan need_lib_prefix=no 17775eefee25Smacallan # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 17785eefee25Smacallan case $host_os in 17795eefee25Smacallan openbsd3.3 | openbsd3.3.*) need_version=yes ;; 17805eefee25Smacallan *) need_version=no ;; 17815eefee25Smacallan esac 17825eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 17835eefee25Smacallan finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 17845eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 17855eefee25Smacallan if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 17865eefee25Smacallan case $host_os in 17875eefee25Smacallan openbsd2.[[89]] | openbsd2.[[89]].*) 17885eefee25Smacallan shlibpath_overrides_runpath=no 17895eefee25Smacallan ;; 17905eefee25Smacallan *) 17915eefee25Smacallan shlibpath_overrides_runpath=yes 17925eefee25Smacallan ;; 17935eefee25Smacallan esac 17945eefee25Smacallan else 17955eefee25Smacallan shlibpath_overrides_runpath=yes 17965eefee25Smacallan fi 17975eefee25Smacallan ;; 17985eefee25Smacallan 17995eefee25Smacallanos2*) 18005eefee25Smacallan libname_spec='$name' 18015eefee25Smacallan shrext_cmds=".dll" 18025eefee25Smacallan need_lib_prefix=no 18035eefee25Smacallan library_names_spec='$libname${shared_ext} $libname.a' 18045eefee25Smacallan dynamic_linker='OS/2 ld.exe' 18055eefee25Smacallan shlibpath_var=LIBPATH 18065eefee25Smacallan ;; 18075eefee25Smacallan 18085eefee25Smacallanosf3* | osf4* | osf5*) 18095eefee25Smacallan version_type=osf 18105eefee25Smacallan need_lib_prefix=no 18115eefee25Smacallan need_version=no 18125eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 18135eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 18145eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 18155eefee25Smacallan sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 18165eefee25Smacallan sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 18175eefee25Smacallan ;; 18185eefee25Smacallan 181962ab96baSmrgrdos*) 182062ab96baSmrg dynamic_linker=no 182162ab96baSmrg ;; 182262ab96baSmrg 18235eefee25Smacallansolaris*) 18245eefee25Smacallan version_type=linux 18255eefee25Smacallan need_lib_prefix=no 18265eefee25Smacallan need_version=no 18275eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 18285eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 18295eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 18305eefee25Smacallan shlibpath_overrides_runpath=yes 18315eefee25Smacallan hardcode_into_libs=yes 18325eefee25Smacallan # ldd complains unless libraries are executable 18335eefee25Smacallan postinstall_cmds='chmod +x $lib' 18345eefee25Smacallan ;; 18355eefee25Smacallan 18365eefee25Smacallansunos4*) 18375eefee25Smacallan version_type=sunos 18385eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 18395eefee25Smacallan finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 18405eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 18415eefee25Smacallan shlibpath_overrides_runpath=yes 18425eefee25Smacallan if test "$with_gnu_ld" = yes; then 18435eefee25Smacallan need_lib_prefix=no 18445eefee25Smacallan fi 18455eefee25Smacallan need_version=yes 18465eefee25Smacallan ;; 18475eefee25Smacallan 18485eefee25Smacallansysv4 | sysv4.3*) 18495eefee25Smacallan version_type=linux 18505eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 18515eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 18525eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 18535eefee25Smacallan case $host_vendor in 18545eefee25Smacallan sni) 18555eefee25Smacallan shlibpath_overrides_runpath=no 18565eefee25Smacallan need_lib_prefix=no 18575eefee25Smacallan export_dynamic_flag_spec='${wl}-Blargedynsym' 18585eefee25Smacallan runpath_var=LD_RUN_PATH 18595eefee25Smacallan ;; 18605eefee25Smacallan siemens) 18615eefee25Smacallan need_lib_prefix=no 18625eefee25Smacallan ;; 18635eefee25Smacallan motorola) 18645eefee25Smacallan need_lib_prefix=no 18655eefee25Smacallan need_version=no 18665eefee25Smacallan shlibpath_overrides_runpath=no 18675eefee25Smacallan sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 18685eefee25Smacallan ;; 18695eefee25Smacallan esac 18705eefee25Smacallan ;; 18715eefee25Smacallan 18725eefee25Smacallansysv4*MP*) 18735eefee25Smacallan if test -d /usr/nec ;then 18745eefee25Smacallan version_type=linux 18755eefee25Smacallan library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 18765eefee25Smacallan soname_spec='$libname${shared_ext}.$major' 18775eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 18785eefee25Smacallan fi 18795eefee25Smacallan ;; 18805eefee25Smacallan 18815eefee25Smacallansysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 18825eefee25Smacallan version_type=freebsd-elf 18835eefee25Smacallan need_lib_prefix=no 18845eefee25Smacallan need_version=no 18855eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 18865eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 18875eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 18885eefee25Smacallan hardcode_into_libs=yes 18895eefee25Smacallan if test "$with_gnu_ld" = yes; then 18905eefee25Smacallan sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 18915eefee25Smacallan shlibpath_overrides_runpath=no 18925eefee25Smacallan else 18935eefee25Smacallan sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 18945eefee25Smacallan shlibpath_overrides_runpath=yes 18955eefee25Smacallan case $host_os in 18965eefee25Smacallan sco3.2v5*) 18975eefee25Smacallan sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 18985eefee25Smacallan ;; 18995eefee25Smacallan esac 19005eefee25Smacallan fi 19015eefee25Smacallan sys_lib_dlsearch_path_spec='/usr/lib' 19025eefee25Smacallan ;; 19035eefee25Smacallan 19045eefee25Smacallanuts4*) 19055eefee25Smacallan version_type=linux 19065eefee25Smacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 19075eefee25Smacallan soname_spec='${libname}${release}${shared_ext}$major' 19085eefee25Smacallan shlibpath_var=LD_LIBRARY_PATH 19095eefee25Smacallan ;; 19105eefee25Smacallan 19115eefee25Smacallan*) 19125eefee25Smacallan dynamic_linker=no 19135eefee25Smacallan ;; 19145eefee25Smacallanesac 19155eefee25SmacallanAC_MSG_RESULT([$dynamic_linker]) 19165eefee25Smacallantest "$dynamic_linker" = no && can_build_shared=no 19175eefee25Smacallan 191862ab96baSmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 191962ab96baSmrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 192062ab96baSmrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 192162ab96baSmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 192262ab96baSmrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 192362ab96baSmrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 192462ab96baSmrg 19255eefee25Smacallanvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 19265eefee25Smacallanif test "$GCC" = yes; then 19275eefee25Smacallan variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 19285eefee25Smacallanfi 19295eefee25Smacallan])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 19305eefee25Smacallan 19315eefee25Smacallan 19325eefee25Smacallan# _LT_AC_TAGCONFIG 19335eefee25Smacallan# ---------------- 19345eefee25SmacallanAC_DEFUN([_LT_AC_TAGCONFIG], 193562ab96baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 193662ab96baSmrgAC_ARG_WITH([tags], 19375eefee25Smacallan [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 19385eefee25Smacallan [include additional configurations @<:@automatic@:>@])], 19395eefee25Smacallan [tagnames="$withval"]) 19405eefee25Smacallan 19415eefee25Smacallanif test -f "$ltmain" && test -n "$tagnames"; then 19425eefee25Smacallan if test ! -f "${ofile}"; then 19435eefee25Smacallan AC_MSG_WARN([output file `$ofile' does not exist]) 19445eefee25Smacallan fi 19455eefee25Smacallan 19465eefee25Smacallan if test -z "$LTCC"; then 19475eefee25Smacallan eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 19485eefee25Smacallan if test -z "$LTCC"; then 19495eefee25Smacallan AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 19505eefee25Smacallan else 19515eefee25Smacallan AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 19525eefee25Smacallan fi 19535eefee25Smacallan fi 19545eefee25Smacallan if test -z "$LTCFLAGS"; then 19555eefee25Smacallan eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 19565eefee25Smacallan fi 19575eefee25Smacallan 19585eefee25Smacallan # Extract list of available tagged configurations in $ofile. 19595eefee25Smacallan # Note that this assumes the entire list is on one line. 19605eefee25Smacallan available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 19615eefee25Smacallan 19625eefee25Smacallan lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 19635eefee25Smacallan for tagname in $tagnames; do 19645eefee25Smacallan IFS="$lt_save_ifs" 19655eefee25Smacallan # Check whether tagname contains only valid characters 19665eefee25Smacallan case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 19675eefee25Smacallan "") ;; 19685eefee25Smacallan *) AC_MSG_ERROR([invalid tag name: $tagname]) 19695eefee25Smacallan ;; 19705eefee25Smacallan esac 19715eefee25Smacallan 19725eefee25Smacallan if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 19735eefee25Smacallan then 19745eefee25Smacallan AC_MSG_ERROR([tag name \"$tagname\" already exists]) 19755eefee25Smacallan fi 19765eefee25Smacallan 19775eefee25Smacallan # Update the list of available tags. 19785eefee25Smacallan if test -n "$tagname"; then 19795eefee25Smacallan echo appending configuration tag \"$tagname\" to $ofile 19805eefee25Smacallan 19815eefee25Smacallan case $tagname in 19825eefee25Smacallan CXX) 19835eefee25Smacallan if test -n "$CXX" && ( test "X$CXX" != "Xno" && 19845eefee25Smacallan ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 19855eefee25Smacallan (test "X$CXX" != "Xg++"))) ; then 19865eefee25Smacallan AC_LIBTOOL_LANG_CXX_CONFIG 19875eefee25Smacallan else 19885eefee25Smacallan tagname="" 19895eefee25Smacallan fi 19905eefee25Smacallan ;; 19915eefee25Smacallan 19925eefee25Smacallan F77) 19935eefee25Smacallan if test -n "$F77" && test "X$F77" != "Xno"; then 19945eefee25Smacallan AC_LIBTOOL_LANG_F77_CONFIG 19955eefee25Smacallan else 19965eefee25Smacallan tagname="" 19975eefee25Smacallan fi 19985eefee25Smacallan ;; 19995eefee25Smacallan 20005eefee25Smacallan GCJ) 20015eefee25Smacallan if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 20025eefee25Smacallan AC_LIBTOOL_LANG_GCJ_CONFIG 20035eefee25Smacallan else 20045eefee25Smacallan tagname="" 20055eefee25Smacallan fi 20065eefee25Smacallan ;; 20075eefee25Smacallan 20085eefee25Smacallan RC) 20095eefee25Smacallan AC_LIBTOOL_LANG_RC_CONFIG 20105eefee25Smacallan ;; 20115eefee25Smacallan 20125eefee25Smacallan *) 20135eefee25Smacallan AC_MSG_ERROR([Unsupported tag name: $tagname]) 20145eefee25Smacallan ;; 20155eefee25Smacallan esac 20165eefee25Smacallan 20175eefee25Smacallan # Append the new tag name to the list of available tags. 20185eefee25Smacallan if test -n "$tagname" ; then 20195eefee25Smacallan available_tags="$available_tags $tagname" 20205eefee25Smacallan fi 20215eefee25Smacallan fi 20225eefee25Smacallan done 20235eefee25Smacallan IFS="$lt_save_ifs" 20245eefee25Smacallan 20255eefee25Smacallan # Now substitute the updated list of available tags. 20265eefee25Smacallan if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 20275eefee25Smacallan mv "${ofile}T" "$ofile" 20285eefee25Smacallan chmod +x "$ofile" 20295eefee25Smacallan else 20305eefee25Smacallan rm -f "${ofile}T" 20315eefee25Smacallan AC_MSG_ERROR([unable to update list of available tagged configurations.]) 20325eefee25Smacallan fi 20335eefee25Smacallanfi 20345eefee25Smacallan])# _LT_AC_TAGCONFIG 20355eefee25Smacallan 20365eefee25Smacallan 20375eefee25Smacallan# AC_LIBTOOL_DLOPEN 20385eefee25Smacallan# ----------------- 20395eefee25Smacallan# enable checks for dlopen support 20405eefee25SmacallanAC_DEFUN([AC_LIBTOOL_DLOPEN], 20415eefee25Smacallan [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 20425eefee25Smacallan])# AC_LIBTOOL_DLOPEN 20435eefee25Smacallan 20445eefee25Smacallan 20455eefee25Smacallan# AC_LIBTOOL_WIN32_DLL 20465eefee25Smacallan# -------------------- 20475eefee25Smacallan# declare package support for building win32 DLLs 20485eefee25SmacallanAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 20495eefee25Smacallan[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 20505eefee25Smacallan])# AC_LIBTOOL_WIN32_DLL 20515eefee25Smacallan 20525eefee25Smacallan 20535eefee25Smacallan# AC_ENABLE_SHARED([DEFAULT]) 20545eefee25Smacallan# --------------------------- 20555eefee25Smacallan# implement the --enable-shared flag 20565eefee25Smacallan# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 20575eefee25SmacallanAC_DEFUN([AC_ENABLE_SHARED], 20585eefee25Smacallan[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 20595eefee25SmacallanAC_ARG_ENABLE([shared], 20605eefee25Smacallan [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 20615eefee25Smacallan [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 20625eefee25Smacallan [p=${PACKAGE-default} 20635eefee25Smacallan case $enableval in 20645eefee25Smacallan yes) enable_shared=yes ;; 20655eefee25Smacallan no) enable_shared=no ;; 20665eefee25Smacallan *) 20675eefee25Smacallan enable_shared=no 20685eefee25Smacallan # Look at the argument we got. We use all the common list separators. 20695eefee25Smacallan lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 20705eefee25Smacallan for pkg in $enableval; do 20715eefee25Smacallan IFS="$lt_save_ifs" 20725eefee25Smacallan if test "X$pkg" = "X$p"; then 20735eefee25Smacallan enable_shared=yes 20745eefee25Smacallan fi 20755eefee25Smacallan done 20765eefee25Smacallan IFS="$lt_save_ifs" 20775eefee25Smacallan ;; 20785eefee25Smacallan esac], 20795eefee25Smacallan [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 20805eefee25Smacallan])# AC_ENABLE_SHARED 20815eefee25Smacallan 20825eefee25Smacallan 20835eefee25Smacallan# AC_DISABLE_SHARED 20845eefee25Smacallan# ----------------- 20855eefee25Smacallan# set the default shared flag to --disable-shared 20865eefee25SmacallanAC_DEFUN([AC_DISABLE_SHARED], 20875eefee25Smacallan[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 20885eefee25SmacallanAC_ENABLE_SHARED(no) 20895eefee25Smacallan])# AC_DISABLE_SHARED 20905eefee25Smacallan 20915eefee25Smacallan 20925eefee25Smacallan# AC_ENABLE_STATIC([DEFAULT]) 20935eefee25Smacallan# --------------------------- 20945eefee25Smacallan# implement the --enable-static flag 20955eefee25Smacallan# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 20965eefee25SmacallanAC_DEFUN([AC_ENABLE_STATIC], 20975eefee25Smacallan[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 20985eefee25SmacallanAC_ARG_ENABLE([static], 20995eefee25Smacallan [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 21005eefee25Smacallan [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 21015eefee25Smacallan [p=${PACKAGE-default} 21025eefee25Smacallan case $enableval in 21035eefee25Smacallan yes) enable_static=yes ;; 21045eefee25Smacallan no) enable_static=no ;; 21055eefee25Smacallan *) 21065eefee25Smacallan enable_static=no 21075eefee25Smacallan # Look at the argument we got. We use all the common list separators. 21085eefee25Smacallan lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 21095eefee25Smacallan for pkg in $enableval; do 21105eefee25Smacallan IFS="$lt_save_ifs" 21115eefee25Smacallan if test "X$pkg" = "X$p"; then 21125eefee25Smacallan enable_static=yes 21135eefee25Smacallan fi 21145eefee25Smacallan done 21155eefee25Smacallan IFS="$lt_save_ifs" 21165eefee25Smacallan ;; 21175eefee25Smacallan esac], 21185eefee25Smacallan [enable_static=]AC_ENABLE_STATIC_DEFAULT) 21195eefee25Smacallan])# AC_ENABLE_STATIC 21205eefee25Smacallan 21215eefee25Smacallan 21225eefee25Smacallan# AC_DISABLE_STATIC 21235eefee25Smacallan# ----------------- 21245eefee25Smacallan# set the default static flag to --disable-static 21255eefee25SmacallanAC_DEFUN([AC_DISABLE_STATIC], 21265eefee25Smacallan[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 21275eefee25SmacallanAC_ENABLE_STATIC(no) 21285eefee25Smacallan])# AC_DISABLE_STATIC 21295eefee25Smacallan 21305eefee25Smacallan 21315eefee25Smacallan# AC_ENABLE_FAST_INSTALL([DEFAULT]) 21325eefee25Smacallan# --------------------------------- 21335eefee25Smacallan# implement the --enable-fast-install flag 21345eefee25Smacallan# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 21355eefee25SmacallanAC_DEFUN([AC_ENABLE_FAST_INSTALL], 21365eefee25Smacallan[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 21375eefee25SmacallanAC_ARG_ENABLE([fast-install], 21385eefee25Smacallan [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 21395eefee25Smacallan [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 21405eefee25Smacallan [p=${PACKAGE-default} 21415eefee25Smacallan case $enableval in 21425eefee25Smacallan yes) enable_fast_install=yes ;; 21435eefee25Smacallan no) enable_fast_install=no ;; 21445eefee25Smacallan *) 21455eefee25Smacallan enable_fast_install=no 21465eefee25Smacallan # Look at the argument we got. We use all the common list separators. 21475eefee25Smacallan lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 21485eefee25Smacallan for pkg in $enableval; do 21495eefee25Smacallan IFS="$lt_save_ifs" 21505eefee25Smacallan if test "X$pkg" = "X$p"; then 21515eefee25Smacallan enable_fast_install=yes 21525eefee25Smacallan fi 21535eefee25Smacallan done 21545eefee25Smacallan IFS="$lt_save_ifs" 21555eefee25Smacallan ;; 21565eefee25Smacallan esac], 21575eefee25Smacallan [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 21585eefee25Smacallan])# AC_ENABLE_FAST_INSTALL 21595eefee25Smacallan 21605eefee25Smacallan 21615eefee25Smacallan# AC_DISABLE_FAST_INSTALL 21625eefee25Smacallan# ----------------------- 21635eefee25Smacallan# set the default to --disable-fast-install 21645eefee25SmacallanAC_DEFUN([AC_DISABLE_FAST_INSTALL], 21655eefee25Smacallan[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 21665eefee25SmacallanAC_ENABLE_FAST_INSTALL(no) 21675eefee25Smacallan])# AC_DISABLE_FAST_INSTALL 21685eefee25Smacallan 21695eefee25Smacallan 21705eefee25Smacallan# AC_LIBTOOL_PICMODE([MODE]) 21715eefee25Smacallan# -------------------------- 21725eefee25Smacallan# implement the --with-pic flag 21735eefee25Smacallan# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 21745eefee25SmacallanAC_DEFUN([AC_LIBTOOL_PICMODE], 21755eefee25Smacallan[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 21765eefee25Smacallanpic_mode=ifelse($#,1,$1,default) 21775eefee25Smacallan])# AC_LIBTOOL_PICMODE 21785eefee25Smacallan 21795eefee25Smacallan 21805eefee25Smacallan# AC_PROG_EGREP 21815eefee25Smacallan# ------------- 21825eefee25Smacallan# This is predefined starting with Autoconf 2.54, so this conditional 21835eefee25Smacallan# definition can be removed once we require Autoconf 2.54 or later. 21845eefee25Smacallanm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 21855eefee25Smacallan[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 21865eefee25Smacallan [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 21875eefee25Smacallan then ac_cv_prog_egrep='grep -E' 21885eefee25Smacallan else ac_cv_prog_egrep='egrep' 21895eefee25Smacallan fi]) 21905eefee25Smacallan EGREP=$ac_cv_prog_egrep 21915eefee25Smacallan AC_SUBST([EGREP]) 21925eefee25Smacallan])]) 21935eefee25Smacallan 21945eefee25Smacallan 21955eefee25Smacallan# AC_PATH_TOOL_PREFIX 21965eefee25Smacallan# ------------------- 219762ab96baSmrg# find a file program which can recognize shared library 21985eefee25SmacallanAC_DEFUN([AC_PATH_TOOL_PREFIX], 21995eefee25Smacallan[AC_REQUIRE([AC_PROG_EGREP])dnl 22005eefee25SmacallanAC_MSG_CHECKING([for $1]) 22015eefee25SmacallanAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 22025eefee25Smacallan[case $MAGIC_CMD in 22035eefee25Smacallan[[\\/*] | ?:[\\/]*]) 22045eefee25Smacallan lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 22055eefee25Smacallan ;; 22065eefee25Smacallan*) 22075eefee25Smacallan lt_save_MAGIC_CMD="$MAGIC_CMD" 22085eefee25Smacallan lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 22095eefee25Smacallandnl $ac_dummy forces splitting on constant user-supplied paths. 22105eefee25Smacallandnl POSIX.2 word splitting is done only on the output of word expansions, 22115eefee25Smacallandnl not every word. This closes a longstanding sh security hole. 22125eefee25Smacallan ac_dummy="ifelse([$2], , $PATH, [$2])" 22135eefee25Smacallan for ac_dir in $ac_dummy; do 22145eefee25Smacallan IFS="$lt_save_ifs" 22155eefee25Smacallan test -z "$ac_dir" && ac_dir=. 22165eefee25Smacallan if test -f $ac_dir/$1; then 22175eefee25Smacallan lt_cv_path_MAGIC_CMD="$ac_dir/$1" 22185eefee25Smacallan if test -n "$file_magic_test_file"; then 22195eefee25Smacallan case $deplibs_check_method in 22205eefee25Smacallan "file_magic "*) 22215eefee25Smacallan file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 22225eefee25Smacallan MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 22235eefee25Smacallan if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 22245eefee25Smacallan $EGREP "$file_magic_regex" > /dev/null; then 22255eefee25Smacallan : 22265eefee25Smacallan else 22275eefee25Smacallan cat <<EOF 1>&2 22285eefee25Smacallan 22295eefee25Smacallan*** Warning: the command libtool uses to detect shared libraries, 22305eefee25Smacallan*** $file_magic_cmd, produces output that libtool cannot recognize. 22315eefee25Smacallan*** The result is that libtool may fail to recognize shared libraries 22325eefee25Smacallan*** as such. This will affect the creation of libtool libraries that 22335eefee25Smacallan*** depend on shared libraries, but programs linked with such libtool 22345eefee25Smacallan*** libraries will work regardless of this problem. Nevertheless, you 22355eefee25Smacallan*** may want to report the problem to your system manager and/or to 22365eefee25Smacallan*** bug-libtool@gnu.org 22375eefee25Smacallan 22385eefee25SmacallanEOF 22395eefee25Smacallan fi ;; 22405eefee25Smacallan esac 22415eefee25Smacallan fi 22425eefee25Smacallan break 22435eefee25Smacallan fi 22445eefee25Smacallan done 22455eefee25Smacallan IFS="$lt_save_ifs" 22465eefee25Smacallan MAGIC_CMD="$lt_save_MAGIC_CMD" 22475eefee25Smacallan ;; 22485eefee25Smacallanesac]) 22495eefee25SmacallanMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 22505eefee25Smacallanif test -n "$MAGIC_CMD"; then 22515eefee25Smacallan AC_MSG_RESULT($MAGIC_CMD) 22525eefee25Smacallanelse 22535eefee25Smacallan AC_MSG_RESULT(no) 22545eefee25Smacallanfi 22555eefee25Smacallan])# AC_PATH_TOOL_PREFIX 22565eefee25Smacallan 22575eefee25Smacallan 22585eefee25Smacallan# AC_PATH_MAGIC 22595eefee25Smacallan# ------------- 226062ab96baSmrg# find a file program which can recognize a shared library 22615eefee25SmacallanAC_DEFUN([AC_PATH_MAGIC], 22625eefee25Smacallan[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 22635eefee25Smacallanif test -z "$lt_cv_path_MAGIC_CMD"; then 22645eefee25Smacallan if test -n "$ac_tool_prefix"; then 22655eefee25Smacallan AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 22665eefee25Smacallan else 22675eefee25Smacallan MAGIC_CMD=: 22685eefee25Smacallan fi 22695eefee25Smacallanfi 22705eefee25Smacallan])# AC_PATH_MAGIC 22715eefee25Smacallan 22725eefee25Smacallan 22735eefee25Smacallan# AC_PROG_LD 22745eefee25Smacallan# ---------- 22755eefee25Smacallan# find the pathname to the GNU or non-GNU linker 22765eefee25SmacallanAC_DEFUN([AC_PROG_LD], 22775eefee25Smacallan[AC_ARG_WITH([gnu-ld], 22785eefee25Smacallan [AC_HELP_STRING([--with-gnu-ld], 22795eefee25Smacallan [assume the C compiler uses GNU ld @<:@default=no@:>@])], 22805eefee25Smacallan [test "$withval" = no || with_gnu_ld=yes], 22815eefee25Smacallan [with_gnu_ld=no]) 22825eefee25SmacallanAC_REQUIRE([LT_AC_PROG_SED])dnl 22835eefee25SmacallanAC_REQUIRE([AC_PROG_CC])dnl 22845eefee25SmacallanAC_REQUIRE([AC_CANONICAL_HOST])dnl 22855eefee25SmacallanAC_REQUIRE([AC_CANONICAL_BUILD])dnl 22865eefee25Smacallanac_prog=ld 22875eefee25Smacallanif test "$GCC" = yes; then 22885eefee25Smacallan # Check if gcc -print-prog-name=ld gives a path. 22895eefee25Smacallan AC_MSG_CHECKING([for ld used by $CC]) 22905eefee25Smacallan case $host in 22915eefee25Smacallan *-*-mingw*) 22925eefee25Smacallan # gcc leaves a trailing carriage return which upsets mingw 22935eefee25Smacallan ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 22945eefee25Smacallan *) 22955eefee25Smacallan ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 22965eefee25Smacallan esac 22975eefee25Smacallan case $ac_prog in 22985eefee25Smacallan # Accept absolute paths. 22995eefee25Smacallan [[\\/]]* | ?:[[\\/]]*) 23005eefee25Smacallan re_direlt='/[[^/]][[^/]]*/\.\./' 23015eefee25Smacallan # Canonicalize the pathname of ld 23025eefee25Smacallan ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 23035eefee25Smacallan while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 23045eefee25Smacallan ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 23055eefee25Smacallan done 23065eefee25Smacallan test -z "$LD" && LD="$ac_prog" 23075eefee25Smacallan ;; 23085eefee25Smacallan "") 23095eefee25Smacallan # If it fails, then pretend we aren't using GCC. 23105eefee25Smacallan ac_prog=ld 23115eefee25Smacallan ;; 23125eefee25Smacallan *) 23135eefee25Smacallan # If it is relative, then search for the first ld in PATH. 23145eefee25Smacallan with_gnu_ld=unknown 23155eefee25Smacallan ;; 23165eefee25Smacallan esac 23175eefee25Smacallanelif test "$with_gnu_ld" = yes; then 23185eefee25Smacallan AC_MSG_CHECKING([for GNU ld]) 23195eefee25Smacallanelse 23205eefee25Smacallan AC_MSG_CHECKING([for non-GNU ld]) 23215eefee25Smacallanfi 23225eefee25SmacallanAC_CACHE_VAL(lt_cv_path_LD, 23235eefee25Smacallan[if test -z "$LD"; then 23245eefee25Smacallan lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 23255eefee25Smacallan for ac_dir in $PATH; do 23265eefee25Smacallan IFS="$lt_save_ifs" 23275eefee25Smacallan test -z "$ac_dir" && ac_dir=. 23285eefee25Smacallan if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 23295eefee25Smacallan lt_cv_path_LD="$ac_dir/$ac_prog" 23305eefee25Smacallan # Check to see if the program is GNU ld. I'd rather use --version, 23315eefee25Smacallan # but apparently some variants of GNU ld only accept -v. 23325eefee25Smacallan # Break only if it was the GNU/non-GNU ld that we prefer. 23335eefee25Smacallan case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 23345eefee25Smacallan *GNU* | *'with BFD'*) 23355eefee25Smacallan test "$with_gnu_ld" != no && break 23365eefee25Smacallan ;; 23375eefee25Smacallan *) 23385eefee25Smacallan test "$with_gnu_ld" != yes && break 23395eefee25Smacallan ;; 23405eefee25Smacallan esac 23415eefee25Smacallan fi 23425eefee25Smacallan done 23435eefee25Smacallan IFS="$lt_save_ifs" 23445eefee25Smacallanelse 23455eefee25Smacallan lt_cv_path_LD="$LD" # Let the user override the test with a path. 23465eefee25Smacallanfi]) 23475eefee25SmacallanLD="$lt_cv_path_LD" 23485eefee25Smacallanif test -n "$LD"; then 23495eefee25Smacallan AC_MSG_RESULT($LD) 23505eefee25Smacallanelse 23515eefee25Smacallan AC_MSG_RESULT(no) 23525eefee25Smacallanfi 23535eefee25Smacallantest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 23545eefee25SmacallanAC_PROG_LD_GNU 23555eefee25Smacallan])# AC_PROG_LD 23565eefee25Smacallan 23575eefee25Smacallan 23585eefee25Smacallan# AC_PROG_LD_GNU 23595eefee25Smacallan# -------------- 23605eefee25SmacallanAC_DEFUN([AC_PROG_LD_GNU], 23615eefee25Smacallan[AC_REQUIRE([AC_PROG_EGREP])dnl 23625eefee25SmacallanAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 23635eefee25Smacallan[# I'd rather use --version here, but apparently some GNU lds only accept -v. 23645eefee25Smacallancase `$LD -v 2>&1 </dev/null` in 23655eefee25Smacallan*GNU* | *'with BFD'*) 23665eefee25Smacallan lt_cv_prog_gnu_ld=yes 23675eefee25Smacallan ;; 23685eefee25Smacallan*) 23695eefee25Smacallan lt_cv_prog_gnu_ld=no 23705eefee25Smacallan ;; 23715eefee25Smacallanesac]) 23725eefee25Smacallanwith_gnu_ld=$lt_cv_prog_gnu_ld 23735eefee25Smacallan])# AC_PROG_LD_GNU 23745eefee25Smacallan 23755eefee25Smacallan 23765eefee25Smacallan# AC_PROG_LD_RELOAD_FLAG 23775eefee25Smacallan# ---------------------- 23785eefee25Smacallan# find reload flag for linker 23795eefee25Smacallan# -- PORTME Some linkers may need a different reload flag. 23805eefee25SmacallanAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 23815eefee25Smacallan[AC_CACHE_CHECK([for $LD option to reload object files], 23825eefee25Smacallan lt_cv_ld_reload_flag, 23835eefee25Smacallan [lt_cv_ld_reload_flag='-r']) 23845eefee25Smacallanreload_flag=$lt_cv_ld_reload_flag 23855eefee25Smacallancase $reload_flag in 23865eefee25Smacallan"" | " "*) ;; 23875eefee25Smacallan*) reload_flag=" $reload_flag" ;; 23885eefee25Smacallanesac 23895eefee25Smacallanreload_cmds='$LD$reload_flag -o $output$reload_objs' 23905eefee25Smacallancase $host_os in 23915eefee25Smacallan darwin*) 23925eefee25Smacallan if test "$GCC" = yes; then 23935eefee25Smacallan reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 23945eefee25Smacallan else 23955eefee25Smacallan reload_cmds='$LD$reload_flag -o $output$reload_objs' 23965eefee25Smacallan fi 23975eefee25Smacallan ;; 23985eefee25Smacallanesac 23995eefee25Smacallan])# AC_PROG_LD_RELOAD_FLAG 24005eefee25Smacallan 24015eefee25Smacallan 24025eefee25Smacallan# AC_DEPLIBS_CHECK_METHOD 24035eefee25Smacallan# ----------------------- 24045eefee25Smacallan# how to check for library dependencies 24055eefee25Smacallan# -- PORTME fill in with the dynamic library characteristics 24065eefee25SmacallanAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 240762ab96baSmrg[AC_CACHE_CHECK([how to recognize dependent libraries], 24085eefee25Smacallanlt_cv_deplibs_check_method, 24095eefee25Smacallan[lt_cv_file_magic_cmd='$MAGIC_CMD' 24105eefee25Smacallanlt_cv_file_magic_test_file= 24115eefee25Smacallanlt_cv_deplibs_check_method='unknown' 24125eefee25Smacallan# Need to set the preceding variable on all platforms that support 24135eefee25Smacallan# interlibrary dependencies. 24145eefee25Smacallan# 'none' -- dependencies not supported. 24155eefee25Smacallan# `unknown' -- same as none, but documents that we really don't know. 24165eefee25Smacallan# 'pass_all' -- all dependencies passed with no checks. 24175eefee25Smacallan# 'test_compile' -- check by making test program. 24185eefee25Smacallan# 'file_magic [[regex]]' -- check by looking for files in library path 24195eefee25Smacallan# which responds to the $file_magic_cmd with a given extended regex. 24205eefee25Smacallan# If you have `file' or equivalent on your system and you're not sure 24215eefee25Smacallan# whether `pass_all' will *always* work, you probably want this one. 24225eefee25Smacallan 24235eefee25Smacallancase $host_os in 242462ab96baSmrgaix[[4-9]]*) 24255eefee25Smacallan lt_cv_deplibs_check_method=pass_all 24265eefee25Smacallan ;; 24275eefee25Smacallan 24285eefee25Smacallanbeos*) 24295eefee25Smacallan lt_cv_deplibs_check_method=pass_all 24305eefee25Smacallan ;; 24315eefee25Smacallan 24325eefee25Smacallanbsdi[[45]]*) 24335eefee25Smacallan lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 24345eefee25Smacallan lt_cv_file_magic_cmd='/usr/bin/file -L' 24355eefee25Smacallan lt_cv_file_magic_test_file=/shlib/libc.so 24365eefee25Smacallan ;; 24375eefee25Smacallan 24385eefee25Smacallancygwin*) 24395eefee25Smacallan # func_win32_libid is a shell function defined in ltmain.sh 24405eefee25Smacallan lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 24415eefee25Smacallan lt_cv_file_magic_cmd='func_win32_libid' 24425eefee25Smacallan ;; 24435eefee25Smacallan 24445eefee25Smacallanmingw* | pw32*) 24455eefee25Smacallan # Base MSYS/MinGW do not provide the 'file' command needed by 244662ab96baSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 244762ab96baSmrg # unless we find 'file', for example because we are cross-compiling. 244862ab96baSmrg if ( file / ) >/dev/null 2>&1; then 244962ab96baSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 245062ab96baSmrg lt_cv_file_magic_cmd='func_win32_libid' 245162ab96baSmrg else 245262ab96baSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 245362ab96baSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 245462ab96baSmrg fi 24555eefee25Smacallan ;; 24565eefee25Smacallan 24575eefee25Smacallandarwin* | rhapsody*) 24585eefee25Smacallan lt_cv_deplibs_check_method=pass_all 24595eefee25Smacallan ;; 24605eefee25Smacallan 246162ab96baSmrgfreebsd* | dragonfly*) 24625eefee25Smacallan if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 24635eefee25Smacallan case $host_cpu in 24645eefee25Smacallan i*86 ) 24655eefee25Smacallan # Not sure whether the presence of OpenBSD here was a mistake. 24665eefee25Smacallan # Let's accept both of them until this is cleared up. 24675eefee25Smacallan lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 24685eefee25Smacallan lt_cv_file_magic_cmd=/usr/bin/file 24695eefee25Smacallan lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 24705eefee25Smacallan ;; 24715eefee25Smacallan esac 24725eefee25Smacallan else 24735eefee25Smacallan lt_cv_deplibs_check_method=pass_all 24745eefee25Smacallan fi 24755eefee25Smacallan ;; 24765eefee25Smacallan 24775eefee25Smacallangnu*) 24785eefee25Smacallan lt_cv_deplibs_check_method=pass_all 24795eefee25Smacallan ;; 24805eefee25Smacallan 24815eefee25Smacallanhpux10.20* | hpux11*) 24825eefee25Smacallan lt_cv_file_magic_cmd=/usr/bin/file 24835eefee25Smacallan case $host_cpu in 24845eefee25Smacallan ia64*) 24855eefee25Smacallan lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 24865eefee25Smacallan lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 24875eefee25Smacallan ;; 24885eefee25Smacallan hppa*64*) 24895eefee25Smacallan [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]'] 24905eefee25Smacallan lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 24915eefee25Smacallan ;; 24925eefee25Smacallan *) 24935eefee25Smacallan lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 24945eefee25Smacallan lt_cv_file_magic_test_file=/usr/lib/libc.sl 24955eefee25Smacallan ;; 24965eefee25Smacallan esac 24975eefee25Smacallan ;; 24985eefee25Smacallan 249962ab96baSmrginterix[[3-9]]*) 25005eefee25Smacallan # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 25015eefee25Smacallan lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 25025eefee25Smacallan ;; 25035eefee25Smacallan 25045eefee25Smacallanirix5* | irix6* | nonstopux*) 25055eefee25Smacallan case $LD in 25065eefee25Smacallan *-32|*"-32 ") libmagic=32-bit;; 25075eefee25Smacallan *-n32|*"-n32 ") libmagic=N32;; 25085eefee25Smacallan *-64|*"-64 ") libmagic=64-bit;; 25095eefee25Smacallan *) libmagic=never-match;; 25105eefee25Smacallan esac 25115eefee25Smacallan lt_cv_deplibs_check_method=pass_all 25125eefee25Smacallan ;; 25135eefee25Smacallan 25145eefee25Smacallan# This must be Linux ELF. 251562ab96baSmrglinux* | k*bsd*-gnu) 25165eefee25Smacallan lt_cv_deplibs_check_method=pass_all 25175eefee25Smacallan ;; 25185eefee25Smacallan 251962ab96baSmrgnetbsd* | netbsdelf*-gnu) 25205eefee25Smacallan if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 25215eefee25Smacallan lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 25225eefee25Smacallan else 25235eefee25Smacallan lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 25245eefee25Smacallan fi 25255eefee25Smacallan ;; 25265eefee25Smacallan 25275eefee25Smacallannewos6*) 25285eefee25Smacallan lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 25295eefee25Smacallan lt_cv_file_magic_cmd=/usr/bin/file 25305eefee25Smacallan lt_cv_file_magic_test_file=/usr/lib/libnls.so 25315eefee25Smacallan ;; 25325eefee25Smacallan 25335eefee25Smacallannto-qnx*) 25345eefee25Smacallan lt_cv_deplibs_check_method=unknown 25355eefee25Smacallan ;; 25365eefee25Smacallan 25375eefee25Smacallanopenbsd*) 25385eefee25Smacallan if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 25395eefee25Smacallan lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 25405eefee25Smacallan else 25415eefee25Smacallan lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 25425eefee25Smacallan fi 25435eefee25Smacallan ;; 25445eefee25Smacallan 25455eefee25Smacallanosf3* | osf4* | osf5*) 25465eefee25Smacallan lt_cv_deplibs_check_method=pass_all 25475eefee25Smacallan ;; 25485eefee25Smacallan 254962ab96baSmrgrdos*) 255062ab96baSmrg lt_cv_deplibs_check_method=pass_all 255162ab96baSmrg ;; 255262ab96baSmrg 25535eefee25Smacallansolaris*) 25545eefee25Smacallan lt_cv_deplibs_check_method=pass_all 25555eefee25Smacallan ;; 25565eefee25Smacallan 25575eefee25Smacallansysv4 | sysv4.3*) 25585eefee25Smacallan case $host_vendor in 25595eefee25Smacallan motorola) 25605eefee25Smacallan 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]]' 25615eefee25Smacallan lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 25625eefee25Smacallan ;; 25635eefee25Smacallan ncr) 25645eefee25Smacallan lt_cv_deplibs_check_method=pass_all 25655eefee25Smacallan ;; 25665eefee25Smacallan sequent) 25675eefee25Smacallan lt_cv_file_magic_cmd='/bin/file' 25685eefee25Smacallan lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 25695eefee25Smacallan ;; 25705eefee25Smacallan sni) 25715eefee25Smacallan lt_cv_file_magic_cmd='/bin/file' 25725eefee25Smacallan lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 25735eefee25Smacallan lt_cv_file_magic_test_file=/lib/libc.so 25745eefee25Smacallan ;; 25755eefee25Smacallan siemens) 25765eefee25Smacallan lt_cv_deplibs_check_method=pass_all 25775eefee25Smacallan ;; 25785eefee25Smacallan pc) 25795eefee25Smacallan lt_cv_deplibs_check_method=pass_all 25805eefee25Smacallan ;; 25815eefee25Smacallan esac 25825eefee25Smacallan ;; 25835eefee25Smacallan 25845eefee25Smacallansysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 25855eefee25Smacallan lt_cv_deplibs_check_method=pass_all 25865eefee25Smacallan ;; 25875eefee25Smacallanesac 25885eefee25Smacallan]) 25895eefee25Smacallanfile_magic_cmd=$lt_cv_file_magic_cmd 25905eefee25Smacallandeplibs_check_method=$lt_cv_deplibs_check_method 25915eefee25Smacallantest -z "$deplibs_check_method" && deplibs_check_method=unknown 25925eefee25Smacallan])# AC_DEPLIBS_CHECK_METHOD 25935eefee25Smacallan 25945eefee25Smacallan 25955eefee25Smacallan# AC_PROG_NM 25965eefee25Smacallan# ---------- 25975eefee25Smacallan# find the pathname to a BSD-compatible name lister 25985eefee25SmacallanAC_DEFUN([AC_PROG_NM], 25995eefee25Smacallan[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 26005eefee25Smacallan[if test -n "$NM"; then 26015eefee25Smacallan # Let the user override the test. 26025eefee25Smacallan lt_cv_path_NM="$NM" 26035eefee25Smacallanelse 26045eefee25Smacallan lt_nm_to_check="${ac_tool_prefix}nm" 260562ab96baSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 26065eefee25Smacallan lt_nm_to_check="$lt_nm_to_check nm" 26075eefee25Smacallan fi 26085eefee25Smacallan for lt_tmp_nm in $lt_nm_to_check; do 26095eefee25Smacallan lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 26105eefee25Smacallan for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 26115eefee25Smacallan IFS="$lt_save_ifs" 26125eefee25Smacallan test -z "$ac_dir" && ac_dir=. 26135eefee25Smacallan tmp_nm="$ac_dir/$lt_tmp_nm" 26145eefee25Smacallan if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 26155eefee25Smacallan # Check to see if the nm accepts a BSD-compat flag. 26165eefee25Smacallan # Adding the `sed 1q' prevents false positives on HP-UX, which says: 26175eefee25Smacallan # nm: unknown option "B" ignored 26185eefee25Smacallan # Tru64's nm complains that /dev/null is an invalid object file 26195eefee25Smacallan case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 26205eefee25Smacallan */dev/null* | *'Invalid file or object type'*) 26215eefee25Smacallan lt_cv_path_NM="$tmp_nm -B" 26225eefee25Smacallan break 26235eefee25Smacallan ;; 26245eefee25Smacallan *) 26255eefee25Smacallan case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 26265eefee25Smacallan */dev/null*) 26275eefee25Smacallan lt_cv_path_NM="$tmp_nm -p" 26285eefee25Smacallan break 26295eefee25Smacallan ;; 26305eefee25Smacallan *) 26315eefee25Smacallan lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 26325eefee25Smacallan continue # so that we can try to find one that supports BSD flags 26335eefee25Smacallan ;; 26345eefee25Smacallan esac 26355eefee25Smacallan ;; 26365eefee25Smacallan esac 26375eefee25Smacallan fi 26385eefee25Smacallan done 26395eefee25Smacallan IFS="$lt_save_ifs" 26405eefee25Smacallan done 26415eefee25Smacallan test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 26425eefee25Smacallanfi]) 26435eefee25SmacallanNM="$lt_cv_path_NM" 26445eefee25Smacallan])# AC_PROG_NM 26455eefee25Smacallan 26465eefee25Smacallan 26475eefee25Smacallan# AC_CHECK_LIBM 26485eefee25Smacallan# ------------- 26495eefee25Smacallan# check for math library 26505eefee25SmacallanAC_DEFUN([AC_CHECK_LIBM], 26515eefee25Smacallan[AC_REQUIRE([AC_CANONICAL_HOST])dnl 26525eefee25SmacallanLIBM= 26535eefee25Smacallancase $host in 26545eefee25Smacallan*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 26555eefee25Smacallan # These system don't have libm, or don't need it 26565eefee25Smacallan ;; 26575eefee25Smacallan*-ncr-sysv4.3*) 26585eefee25Smacallan AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 26595eefee25Smacallan AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 26605eefee25Smacallan ;; 26615eefee25Smacallan*) 26625eefee25Smacallan AC_CHECK_LIB(m, cos, LIBM="-lm") 26635eefee25Smacallan ;; 26645eefee25Smacallanesac 26655eefee25Smacallan])# AC_CHECK_LIBM 26665eefee25Smacallan 26675eefee25Smacallan 26685eefee25Smacallan# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 26695eefee25Smacallan# ----------------------------------- 26705eefee25Smacallan# sets LIBLTDL to the link flags for the libltdl convenience library and 26715eefee25Smacallan# LTDLINCL to the include flags for the libltdl header and adds 26725eefee25Smacallan# --enable-ltdl-convenience to the configure arguments. Note that 26735eefee25Smacallan# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 26745eefee25Smacallan# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 26755eefee25Smacallan# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 26765eefee25Smacallan# (note the single quotes!). If your package is not flat and you're not 26775eefee25Smacallan# using automake, define top_builddir and top_srcdir appropriately in 26785eefee25Smacallan# the Makefiles. 26795eefee25SmacallanAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 26805eefee25Smacallan[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 26815eefee25Smacallan case $enable_ltdl_convenience in 26825eefee25Smacallan no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 26835eefee25Smacallan "") enable_ltdl_convenience=yes 26845eefee25Smacallan ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 26855eefee25Smacallan esac 26865eefee25Smacallan LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 26875eefee25Smacallan LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 26885eefee25Smacallan # For backwards non-gettext consistent compatibility... 26895eefee25Smacallan INCLTDL="$LTDLINCL" 26905eefee25Smacallan])# AC_LIBLTDL_CONVENIENCE 26915eefee25Smacallan 26925eefee25Smacallan 26935eefee25Smacallan# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 26945eefee25Smacallan# ----------------------------------- 26955eefee25Smacallan# sets LIBLTDL to the link flags for the libltdl installable library and 26965eefee25Smacallan# LTDLINCL to the include flags for the libltdl header and adds 26975eefee25Smacallan# --enable-ltdl-install to the configure arguments. Note that 26985eefee25Smacallan# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 26995eefee25Smacallan# and an installed libltdl is not found, it is assumed to be `libltdl'. 27005eefee25Smacallan# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 27015eefee25Smacallan# '${top_srcdir}/' (note the single quotes!). If your package is not 27025eefee25Smacallan# flat and you're not using automake, define top_builddir and top_srcdir 27035eefee25Smacallan# appropriately in the Makefiles. 27045eefee25Smacallan# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 27055eefee25SmacallanAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 27065eefee25Smacallan[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 27075eefee25Smacallan AC_CHECK_LIB(ltdl, lt_dlinit, 27085eefee25Smacallan [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 27095eefee25Smacallan [if test x"$enable_ltdl_install" = xno; then 27105eefee25Smacallan AC_MSG_WARN([libltdl not installed, but installation disabled]) 27115eefee25Smacallan else 27125eefee25Smacallan enable_ltdl_install=yes 27135eefee25Smacallan fi 27145eefee25Smacallan ]) 27155eefee25Smacallan if test x"$enable_ltdl_install" = x"yes"; then 27165eefee25Smacallan ac_configure_args="$ac_configure_args --enable-ltdl-install" 27175eefee25Smacallan LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 27185eefee25Smacallan LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 27195eefee25Smacallan else 27205eefee25Smacallan ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 27215eefee25Smacallan LIBLTDL="-lltdl" 27225eefee25Smacallan LTDLINCL= 27235eefee25Smacallan fi 27245eefee25Smacallan # For backwards non-gettext consistent compatibility... 27255eefee25Smacallan INCLTDL="$LTDLINCL" 27265eefee25Smacallan])# AC_LIBLTDL_INSTALLABLE 27275eefee25Smacallan 27285eefee25Smacallan 27295eefee25Smacallan# AC_LIBTOOL_CXX 27305eefee25Smacallan# -------------- 27315eefee25Smacallan# enable support for C++ libraries 27325eefee25SmacallanAC_DEFUN([AC_LIBTOOL_CXX], 27335eefee25Smacallan[AC_REQUIRE([_LT_AC_LANG_CXX]) 27345eefee25Smacallan])# AC_LIBTOOL_CXX 27355eefee25Smacallan 27365eefee25Smacallan 27375eefee25Smacallan# _LT_AC_LANG_CXX 27385eefee25Smacallan# --------------- 27395eefee25SmacallanAC_DEFUN([_LT_AC_LANG_CXX], 27405eefee25Smacallan[AC_REQUIRE([AC_PROG_CXX]) 27415eefee25SmacallanAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 27425eefee25Smacallan_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 27435eefee25Smacallan])# _LT_AC_LANG_CXX 27445eefee25Smacallan 27455eefee25Smacallan# _LT_AC_PROG_CXXCPP 27465eefee25Smacallan# ------------------ 27475eefee25SmacallanAC_DEFUN([_LT_AC_PROG_CXXCPP], 27485eefee25Smacallan[ 27495eefee25SmacallanAC_REQUIRE([AC_PROG_CXX]) 27505eefee25Smacallanif test -n "$CXX" && ( test "X$CXX" != "Xno" && 27515eefee25Smacallan ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 27525eefee25Smacallan (test "X$CXX" != "Xg++"))) ; then 27535eefee25Smacallan AC_PROG_CXXCPP 27545eefee25Smacallanfi 27555eefee25Smacallan])# _LT_AC_PROG_CXXCPP 27565eefee25Smacallan 27575eefee25Smacallan# AC_LIBTOOL_F77 27585eefee25Smacallan# -------------- 27595eefee25Smacallan# enable support for Fortran 77 libraries 27605eefee25SmacallanAC_DEFUN([AC_LIBTOOL_F77], 27615eefee25Smacallan[AC_REQUIRE([_LT_AC_LANG_F77]) 27625eefee25Smacallan])# AC_LIBTOOL_F77 27635eefee25Smacallan 27645eefee25Smacallan 27655eefee25Smacallan# _LT_AC_LANG_F77 27665eefee25Smacallan# --------------- 27675eefee25SmacallanAC_DEFUN([_LT_AC_LANG_F77], 27685eefee25Smacallan[AC_REQUIRE([AC_PROG_F77]) 27695eefee25Smacallan_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 27705eefee25Smacallan])# _LT_AC_LANG_F77 27715eefee25Smacallan 27725eefee25Smacallan 27735eefee25Smacallan# AC_LIBTOOL_GCJ 27745eefee25Smacallan# -------------- 27755eefee25Smacallan# enable support for GCJ libraries 27765eefee25SmacallanAC_DEFUN([AC_LIBTOOL_GCJ], 27775eefee25Smacallan[AC_REQUIRE([_LT_AC_LANG_GCJ]) 27785eefee25Smacallan])# AC_LIBTOOL_GCJ 27795eefee25Smacallan 27805eefee25Smacallan 27815eefee25Smacallan# _LT_AC_LANG_GCJ 27825eefee25Smacallan# --------------- 27835eefee25SmacallanAC_DEFUN([_LT_AC_LANG_GCJ], 27845eefee25Smacallan[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 27855eefee25Smacallan [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 27865eefee25Smacallan [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 27875eefee25Smacallan [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 27885eefee25Smacallan [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 27895eefee25Smacallan [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 27905eefee25Smacallan_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 27915eefee25Smacallan])# _LT_AC_LANG_GCJ 27925eefee25Smacallan 27935eefee25Smacallan 27945eefee25Smacallan# AC_LIBTOOL_RC 27955eefee25Smacallan# ------------- 27965eefee25Smacallan# enable support for Windows resource files 27975eefee25SmacallanAC_DEFUN([AC_LIBTOOL_RC], 27985eefee25Smacallan[AC_REQUIRE([LT_AC_PROG_RC]) 27995eefee25Smacallan_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 28005eefee25Smacallan])# AC_LIBTOOL_RC 28015eefee25Smacallan 28025eefee25Smacallan 28035eefee25Smacallan# AC_LIBTOOL_LANG_C_CONFIG 28045eefee25Smacallan# ------------------------ 28055eefee25Smacallan# Ensure that the configuration vars for the C compiler are 28065eefee25Smacallan# suitably defined. Those variables are subsequently used by 28075eefee25Smacallan# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 28085eefee25SmacallanAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 28095eefee25SmacallanAC_DEFUN([_LT_AC_LANG_C_CONFIG], 28105eefee25Smacallan[lt_save_CC="$CC" 28115eefee25SmacallanAC_LANG_PUSH(C) 28125eefee25Smacallan 28135eefee25Smacallan# Source file extension for C test sources. 28145eefee25Smacallanac_ext=c 28155eefee25Smacallan 28165eefee25Smacallan# Object file extension for compiled C test sources. 28175eefee25Smacallanobjext=o 28185eefee25Smacallan_LT_AC_TAGVAR(objext, $1)=$objext 28195eefee25Smacallan 28205eefee25Smacallan# Code to be used in simple compile tests 282162ab96baSmrglt_simple_compile_test_code="int some_variable = 0;" 28225eefee25Smacallan 28235eefee25Smacallan# Code to be used in simple link tests 282462ab96baSmrglt_simple_link_test_code='int main(){return(0);}' 28255eefee25Smacallan 28265eefee25Smacallan_LT_AC_SYS_COMPILER 28275eefee25Smacallan 28285eefee25Smacallan# save warnings/boilerplate of simple test code 28295eefee25Smacallan_LT_COMPILER_BOILERPLATE 28305eefee25Smacallan_LT_LINKER_BOILERPLATE 28315eefee25Smacallan 28325eefee25SmacallanAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 28335eefee25SmacallanAC_LIBTOOL_PROG_COMPILER_PIC($1) 28345eefee25SmacallanAC_LIBTOOL_PROG_CC_C_O($1) 28355eefee25SmacallanAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 28365eefee25SmacallanAC_LIBTOOL_PROG_LD_SHLIBS($1) 28375eefee25SmacallanAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 28385eefee25SmacallanAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 28395eefee25SmacallanAC_LIBTOOL_SYS_LIB_STRIP 28405eefee25SmacallanAC_LIBTOOL_DLOPEN_SELF 28415eefee25Smacallan 28425eefee25Smacallan# Report which library types will actually be built 28435eefee25SmacallanAC_MSG_CHECKING([if libtool supports shared libraries]) 28445eefee25SmacallanAC_MSG_RESULT([$can_build_shared]) 28455eefee25Smacallan 28465eefee25SmacallanAC_MSG_CHECKING([whether to build shared libraries]) 28475eefee25Smacallantest "$can_build_shared" = "no" && enable_shared=no 28485eefee25Smacallan 28495eefee25Smacallan# On AIX, shared libraries and static libraries use the same namespace, and 28505eefee25Smacallan# are all built from PIC. 28515eefee25Smacallancase $host_os in 28525eefee25Smacallanaix3*) 28535eefee25Smacallan test "$enable_shared" = yes && enable_static=no 28545eefee25Smacallan if test -n "$RANLIB"; then 28555eefee25Smacallan archive_cmds="$archive_cmds~\$RANLIB \$lib" 28565eefee25Smacallan postinstall_cmds='$RANLIB $lib' 28575eefee25Smacallan fi 28585eefee25Smacallan ;; 28595eefee25Smacallan 286062ab96baSmrgaix[[4-9]]*) 28615eefee25Smacallan if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 28625eefee25Smacallan test "$enable_shared" = yes && enable_static=no 28635eefee25Smacallan fi 28645eefee25Smacallan ;; 28655eefee25Smacallanesac 28665eefee25SmacallanAC_MSG_RESULT([$enable_shared]) 28675eefee25Smacallan 28685eefee25SmacallanAC_MSG_CHECKING([whether to build static libraries]) 28695eefee25Smacallan# Make sure either enable_shared or enable_static is yes. 28705eefee25Smacallantest "$enable_shared" = yes || enable_static=yes 28715eefee25SmacallanAC_MSG_RESULT([$enable_static]) 28725eefee25Smacallan 28735eefee25SmacallanAC_LIBTOOL_CONFIG($1) 28745eefee25Smacallan 28755eefee25SmacallanAC_LANG_POP 28765eefee25SmacallanCC="$lt_save_CC" 28775eefee25Smacallan])# AC_LIBTOOL_LANG_C_CONFIG 28785eefee25Smacallan 28795eefee25Smacallan 28805eefee25Smacallan# AC_LIBTOOL_LANG_CXX_CONFIG 28815eefee25Smacallan# -------------------------- 28825eefee25Smacallan# Ensure that the configuration vars for the C compiler are 28835eefee25Smacallan# suitably defined. Those variables are subsequently used by 28845eefee25Smacallan# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 28855eefee25SmacallanAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 28865eefee25SmacallanAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 28875eefee25Smacallan[AC_LANG_PUSH(C++) 28885eefee25SmacallanAC_REQUIRE([AC_PROG_CXX]) 28895eefee25SmacallanAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 28905eefee25Smacallan 28915eefee25Smacallan_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 28925eefee25Smacallan_LT_AC_TAGVAR(allow_undefined_flag, $1)= 28935eefee25Smacallan_LT_AC_TAGVAR(always_export_symbols, $1)=no 28945eefee25Smacallan_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 28955eefee25Smacallan_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 28965eefee25Smacallan_LT_AC_TAGVAR(hardcode_direct, $1)=no 28975eefee25Smacallan_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 28985eefee25Smacallan_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 28995eefee25Smacallan_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 29005eefee25Smacallan_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 29015eefee25Smacallan_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 29025eefee25Smacallan_LT_AC_TAGVAR(hardcode_automatic, $1)=no 29035eefee25Smacallan_LT_AC_TAGVAR(module_cmds, $1)= 29045eefee25Smacallan_LT_AC_TAGVAR(module_expsym_cmds, $1)= 29055eefee25Smacallan_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 29065eefee25Smacallan_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 29075eefee25Smacallan_LT_AC_TAGVAR(no_undefined_flag, $1)= 29085eefee25Smacallan_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 29095eefee25Smacallan_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 29105eefee25Smacallan 29115eefee25Smacallan# Dependencies to place before and after the object being linked: 29125eefee25Smacallan_LT_AC_TAGVAR(predep_objects, $1)= 29135eefee25Smacallan_LT_AC_TAGVAR(postdep_objects, $1)= 29145eefee25Smacallan_LT_AC_TAGVAR(predeps, $1)= 29155eefee25Smacallan_LT_AC_TAGVAR(postdeps, $1)= 29165eefee25Smacallan_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 291762ab96baSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 29185eefee25Smacallan 29195eefee25Smacallan# Source file extension for C++ test sources. 29205eefee25Smacallanac_ext=cpp 29215eefee25Smacallan 29225eefee25Smacallan# Object file extension for compiled C++ test sources. 29235eefee25Smacallanobjext=o 29245eefee25Smacallan_LT_AC_TAGVAR(objext, $1)=$objext 29255eefee25Smacallan 29265eefee25Smacallan# Code to be used in simple compile tests 292762ab96baSmrglt_simple_compile_test_code="int some_variable = 0;" 29285eefee25Smacallan 29295eefee25Smacallan# Code to be used in simple link tests 293062ab96baSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 29315eefee25Smacallan 29325eefee25Smacallan# ltmain only uses $CC for tagged configurations so make sure $CC is set. 29335eefee25Smacallan_LT_AC_SYS_COMPILER 29345eefee25Smacallan 29355eefee25Smacallan# save warnings/boilerplate of simple test code 29365eefee25Smacallan_LT_COMPILER_BOILERPLATE 29375eefee25Smacallan_LT_LINKER_BOILERPLATE 29385eefee25Smacallan 29395eefee25Smacallan# Allow CC to be a program name with arguments. 29405eefee25Smacallanlt_save_CC=$CC 29415eefee25Smacallanlt_save_LD=$LD 29425eefee25Smacallanlt_save_GCC=$GCC 29435eefee25SmacallanGCC=$GXX 29445eefee25Smacallanlt_save_with_gnu_ld=$with_gnu_ld 29455eefee25Smacallanlt_save_path_LD=$lt_cv_path_LD 29465eefee25Smacallanif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 29475eefee25Smacallan lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 29485eefee25Smacallanelse 29495eefee25Smacallan $as_unset lt_cv_prog_gnu_ld 29505eefee25Smacallanfi 29515eefee25Smacallanif test -n "${lt_cv_path_LDCXX+set}"; then 29525eefee25Smacallan lt_cv_path_LD=$lt_cv_path_LDCXX 29535eefee25Smacallanelse 29545eefee25Smacallan $as_unset lt_cv_path_LD 29555eefee25Smacallanfi 29565eefee25Smacallantest -z "${LDCXX+set}" || LD=$LDCXX 29575eefee25SmacallanCC=${CXX-"c++"} 29585eefee25Smacallancompiler=$CC 29595eefee25Smacallan_LT_AC_TAGVAR(compiler, $1)=$CC 29605eefee25Smacallan_LT_CC_BASENAME([$compiler]) 29615eefee25Smacallan 29625eefee25Smacallan# We don't want -fno-exception wen compiling C++ code, so set the 29635eefee25Smacallan# no_builtin_flag separately 29645eefee25Smacallanif test "$GXX" = yes; then 29655eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 29665eefee25Smacallanelse 29675eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 29685eefee25Smacallanfi 29695eefee25Smacallan 29705eefee25Smacallanif test "$GXX" = yes; then 29715eefee25Smacallan # Set up default GNU C++ configuration 29725eefee25Smacallan 29735eefee25Smacallan AC_PROG_LD 29745eefee25Smacallan 29755eefee25Smacallan # Check if GNU C++ uses GNU ld as the underlying linker, since the 29765eefee25Smacallan # archiving commands below assume that GNU ld is being used. 29775eefee25Smacallan if test "$with_gnu_ld" = yes; then 29785eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 29795eefee25Smacallan _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' 29805eefee25Smacallan 29815eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 29825eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 29835eefee25Smacallan 29845eefee25Smacallan # If archive_cmds runs LD, not CC, wlarc should be empty 29855eefee25Smacallan # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 29865eefee25Smacallan # investigate it a little bit more. (MM) 29875eefee25Smacallan wlarc='${wl}' 29885eefee25Smacallan 29895eefee25Smacallan # ancient GNU ld didn't support --whole-archive et. al. 29905eefee25Smacallan if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 29915eefee25Smacallan grep 'no-whole-archive' > /dev/null; then 29925eefee25Smacallan _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 29935eefee25Smacallan else 29945eefee25Smacallan _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 29955eefee25Smacallan fi 29965eefee25Smacallan else 29975eefee25Smacallan with_gnu_ld=no 29985eefee25Smacallan wlarc= 29995eefee25Smacallan 30005eefee25Smacallan # A generic and very simple default shared library creation 30015eefee25Smacallan # command for GNU C++ for the case where it uses the native 30025eefee25Smacallan # linker, instead of GNU ld. If possible, this setting should 30035eefee25Smacallan # overridden to take advantage of the native linker features on 30045eefee25Smacallan # the platform it is being used on. 30055eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 30065eefee25Smacallan fi 30075eefee25Smacallan 30085eefee25Smacallan # Commands to make compiler produce verbose output that lists 30095eefee25Smacallan # what "hidden" libraries, object files and flags are used when 30105eefee25Smacallan # linking a shared library. 30115eefee25Smacallan output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 30125eefee25Smacallan 30135eefee25Smacallanelse 30145eefee25Smacallan GXX=no 30155eefee25Smacallan with_gnu_ld=no 30165eefee25Smacallan wlarc= 30175eefee25Smacallanfi 30185eefee25Smacallan 30195eefee25Smacallan# PORTME: fill in a description of your system's C++ link characteristics 30205eefee25SmacallanAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 30215eefee25Smacallan_LT_AC_TAGVAR(ld_shlibs, $1)=yes 30225eefee25Smacallancase $host_os in 30235eefee25Smacallan aix3*) 30245eefee25Smacallan # FIXME: insert proper C++ library support 30255eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 30265eefee25Smacallan ;; 302762ab96baSmrg aix[[4-9]]*) 30285eefee25Smacallan if test "$host_cpu" = ia64; then 30295eefee25Smacallan # On IA64, the linker does run time linking by default, so we don't 30305eefee25Smacallan # have to do anything special. 30315eefee25Smacallan aix_use_runtimelinking=no 30325eefee25Smacallan exp_sym_flag='-Bexport' 30335eefee25Smacallan no_entry_flag="" 30345eefee25Smacallan else 30355eefee25Smacallan aix_use_runtimelinking=no 30365eefee25Smacallan 30375eefee25Smacallan # Test if we are trying to use run time linking or normal 30385eefee25Smacallan # AIX style linking. If -brtl is somewhere in LDFLAGS, we 30395eefee25Smacallan # need to do runtime linking. 304062ab96baSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 30415eefee25Smacallan for ld_flag in $LDFLAGS; do 30425eefee25Smacallan case $ld_flag in 30435eefee25Smacallan *-brtl*) 30445eefee25Smacallan aix_use_runtimelinking=yes 30455eefee25Smacallan break 30465eefee25Smacallan ;; 30475eefee25Smacallan esac 30485eefee25Smacallan done 30495eefee25Smacallan ;; 30505eefee25Smacallan esac 30515eefee25Smacallan 30525eefee25Smacallan exp_sym_flag='-bexport' 30535eefee25Smacallan no_entry_flag='-bnoentry' 30545eefee25Smacallan fi 30555eefee25Smacallan 30565eefee25Smacallan # When large executables or shared objects are built, AIX ld can 30575eefee25Smacallan # have problems creating the table of contents. If linking a library 30585eefee25Smacallan # or program results in "error TOC overflow" add -mminimal-toc to 30595eefee25Smacallan # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 30605eefee25Smacallan # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 30615eefee25Smacallan 30625eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='' 30635eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes 30645eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 30655eefee25Smacallan _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 30665eefee25Smacallan 30675eefee25Smacallan if test "$GXX" = yes; then 30685eefee25Smacallan case $host_os in aix4.[[012]]|aix4.[[012]].*) 30695eefee25Smacallan # We only want to do this on AIX 4.2 and lower, the check 30705eefee25Smacallan # below for broken collect2 doesn't work under 4.3+ 30715eefee25Smacallan collect2name=`${CC} -print-prog-name=collect2` 30725eefee25Smacallan if test -f "$collect2name" && \ 30735eefee25Smacallan strings "$collect2name" | grep resolve_lib_name >/dev/null 30745eefee25Smacallan then 30755eefee25Smacallan # We have reworked collect2 307662ab96baSmrg : 30775eefee25Smacallan else 30785eefee25Smacallan # We have old collect2 30795eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 30805eefee25Smacallan # It fails to find uninstalled libraries when the uninstalled 30815eefee25Smacallan # path is not listed in the libpath. Setting hardcode_minus_L 30825eefee25Smacallan # to unsupported forces relinking 30835eefee25Smacallan _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 30845eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 30855eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 30865eefee25Smacallan fi 30875eefee25Smacallan ;; 30885eefee25Smacallan esac 30895eefee25Smacallan shared_flag='-shared' 30905eefee25Smacallan if test "$aix_use_runtimelinking" = yes; then 30915eefee25Smacallan shared_flag="$shared_flag "'${wl}-G' 30925eefee25Smacallan fi 30935eefee25Smacallan else 30945eefee25Smacallan # not using gcc 30955eefee25Smacallan if test "$host_cpu" = ia64; then 30965eefee25Smacallan # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 30975eefee25Smacallan # chokes on -Wl,-G. The following line is correct: 30985eefee25Smacallan shared_flag='-G' 30995eefee25Smacallan else 31005eefee25Smacallan if test "$aix_use_runtimelinking" = yes; then 31015eefee25Smacallan shared_flag='${wl}-G' 31025eefee25Smacallan else 31035eefee25Smacallan shared_flag='${wl}-bM:SRE' 31045eefee25Smacallan fi 31055eefee25Smacallan fi 31065eefee25Smacallan fi 31075eefee25Smacallan 31085eefee25Smacallan # It seems that -bexpall does not export symbols beginning with 31095eefee25Smacallan # underscore (_), so it is better to generate a list of symbols to export. 31105eefee25Smacallan _LT_AC_TAGVAR(always_export_symbols, $1)=yes 31115eefee25Smacallan if test "$aix_use_runtimelinking" = yes; then 31125eefee25Smacallan # Warning - without using the other runtime loading flags (-brtl), 31135eefee25Smacallan # -berok will link without error, but may produce a broken library. 31145eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 31155eefee25Smacallan # Determine the default libpath from the value encoded in an empty executable. 31165eefee25Smacallan _LT_AC_SYS_LIBPATH_AIX 31175eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 31185eefee25Smacallan 31195eefee25Smacallan _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" 31205eefee25Smacallan else 31215eefee25Smacallan if test "$host_cpu" = ia64; then 31225eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 31235eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 31245eefee25Smacallan _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" 31255eefee25Smacallan else 31265eefee25Smacallan # Determine the default libpath from the value encoded in an empty executable. 31275eefee25Smacallan _LT_AC_SYS_LIBPATH_AIX 31285eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 31295eefee25Smacallan # Warning - without using the other run time loading flags, 31305eefee25Smacallan # -berok will link without error, but may produce a broken library. 31315eefee25Smacallan _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 31325eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 31335eefee25Smacallan # Exported symbols can be pulled into shared objects from archives 31345eefee25Smacallan _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 31355eefee25Smacallan _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 31365eefee25Smacallan # This is similar to how AIX traditionally builds its shared libraries. 31375eefee25Smacallan _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' 31385eefee25Smacallan fi 31395eefee25Smacallan fi 31405eefee25Smacallan ;; 31415eefee25Smacallan 31425eefee25Smacallan beos*) 31435eefee25Smacallan if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 31445eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 31455eefee25Smacallan # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 31465eefee25Smacallan # support --undefined. This deserves some investigation. FIXME 31475eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 31485eefee25Smacallan else 31495eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 31505eefee25Smacallan fi 31515eefee25Smacallan ;; 31525eefee25Smacallan 31535eefee25Smacallan chorus*) 31545eefee25Smacallan case $cc_basename in 31555eefee25Smacallan *) 31565eefee25Smacallan # FIXME: insert proper C++ library support 31575eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 31585eefee25Smacallan ;; 31595eefee25Smacallan esac 31605eefee25Smacallan ;; 31615eefee25Smacallan 31625eefee25Smacallan cygwin* | mingw* | pw32*) 31635eefee25Smacallan # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 31645eefee25Smacallan # as there is no search path for DLLs. 31655eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 31665eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 31675eefee25Smacallan _LT_AC_TAGVAR(always_export_symbols, $1)=no 31685eefee25Smacallan _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 31695eefee25Smacallan 31705eefee25Smacallan if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 31715eefee25Smacallan _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' 31725eefee25Smacallan # If the export-symbols file already is a .def file (1st line 31735eefee25Smacallan # is EXPORTS), use it as is; otherwise, prepend... 31745eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 31755eefee25Smacallan cp $export_symbols $output_objdir/$soname.def; 31765eefee25Smacallan else 31775eefee25Smacallan echo EXPORTS > $output_objdir/$soname.def; 31785eefee25Smacallan cat $export_symbols >> $output_objdir/$soname.def; 31795eefee25Smacallan fi~ 31805eefee25Smacallan $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' 31815eefee25Smacallan else 31825eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 31835eefee25Smacallan fi 31845eefee25Smacallan ;; 31855eefee25Smacallan darwin* | rhapsody*) 31865eefee25Smacallan _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 31875eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=no 31885eefee25Smacallan _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 31895eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 31905eefee25Smacallan _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 31915eefee25Smacallan _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 319262ab96baSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 319362ab96baSmrg if test "$GXX" = yes ; then 31945eefee25Smacallan output_verbose_link_cmd='echo' 319562ab96baSmrg _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" 319662ab96baSmrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 319762ab96baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" 319862ab96baSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" 319962ab96baSmrg if test "$lt_cv_apple_cc_single_mod" != "yes"; then 320062ab96baSmrg _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${_lt_dsymutil}" 320162ab96baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed '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${_lt_dar_export_syms}${_lt_dsymutil}" 32025eefee25Smacallan fi 32035eefee25Smacallan else 32045eefee25Smacallan case $cc_basename in 32055eefee25Smacallan xlc*) 32065eefee25Smacallan output_verbose_link_cmd='echo' 320762ab96baSmrg _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' 32085eefee25Smacallan _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 32095eefee25Smacallan # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 321062ab96baSmrg _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}' 32115eefee25Smacallan _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}' 32125eefee25Smacallan ;; 32135eefee25Smacallan *) 32145eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 32155eefee25Smacallan ;; 32165eefee25Smacallan esac 32175eefee25Smacallan fi 32185eefee25Smacallan ;; 32195eefee25Smacallan 32205eefee25Smacallan dgux*) 32215eefee25Smacallan case $cc_basename in 32225eefee25Smacallan ec++*) 32235eefee25Smacallan # FIXME: insert proper C++ library support 32245eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 32255eefee25Smacallan ;; 32265eefee25Smacallan ghcx*) 32275eefee25Smacallan # Green Hills C++ Compiler 32285eefee25Smacallan # FIXME: insert proper C++ library support 32295eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 32305eefee25Smacallan ;; 32315eefee25Smacallan *) 32325eefee25Smacallan # FIXME: insert proper C++ library support 32335eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 32345eefee25Smacallan ;; 32355eefee25Smacallan esac 32365eefee25Smacallan ;; 32375eefee25Smacallan freebsd[[12]]*) 32385eefee25Smacallan # C++ shared libraries reported to be fairly broken before switch to ELF 32395eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 32405eefee25Smacallan ;; 32415eefee25Smacallan freebsd-elf*) 32425eefee25Smacallan _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 32435eefee25Smacallan ;; 324462ab96baSmrg freebsd* | dragonfly*) 32455eefee25Smacallan # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 32465eefee25Smacallan # conventions 32475eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=yes 32485eefee25Smacallan ;; 32495eefee25Smacallan gnu*) 32505eefee25Smacallan ;; 32515eefee25Smacallan hpux9*) 32525eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 32535eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 32545eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 32555eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes 32565eefee25Smacallan _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 32575eefee25Smacallan # but as the default 32585eefee25Smacallan # location of the library. 32595eefee25Smacallan 32605eefee25Smacallan case $cc_basename in 32615eefee25Smacallan CC*) 32625eefee25Smacallan # FIXME: insert proper C++ library support 32635eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 32645eefee25Smacallan ;; 32655eefee25Smacallan aCC*) 32665eefee25Smacallan _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' 32675eefee25Smacallan # Commands to make compiler produce verbose output that lists 32685eefee25Smacallan # what "hidden" libraries, object files and flags are used when 32695eefee25Smacallan # linking a shared library. 32705eefee25Smacallan # 32715eefee25Smacallan # There doesn't appear to be a way to prevent this compiler from 32725eefee25Smacallan # explicitly linking system object files so we need to strip them 32735eefee25Smacallan # from the output so that they don't get included in the library 32745eefee25Smacallan # dependencies. 32755eefee25Smacallan 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' 32765eefee25Smacallan ;; 32775eefee25Smacallan *) 32785eefee25Smacallan if test "$GXX" = yes; then 32795eefee25Smacallan _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' 32805eefee25Smacallan else 32815eefee25Smacallan # FIXME: insert proper C++ library support 32825eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 32835eefee25Smacallan fi 32845eefee25Smacallan ;; 32855eefee25Smacallan esac 32865eefee25Smacallan ;; 32875eefee25Smacallan hpux10*|hpux11*) 32885eefee25Smacallan if test $with_gnu_ld = no; then 32895eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 32905eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 32915eefee25Smacallan 32925eefee25Smacallan case $host_cpu in 329362ab96baSmrg hppa*64*|ia64*) ;; 32945eefee25Smacallan *) 32955eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 32965eefee25Smacallan ;; 32975eefee25Smacallan esac 32985eefee25Smacallan fi 32995eefee25Smacallan case $host_cpu in 33005eefee25Smacallan hppa*64*|ia64*) 33015eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=no 33025eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 33035eefee25Smacallan ;; 33045eefee25Smacallan *) 33055eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes 33065eefee25Smacallan _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 33075eefee25Smacallan # but as the default 33085eefee25Smacallan # location of the library. 33095eefee25Smacallan ;; 33105eefee25Smacallan esac 33115eefee25Smacallan 33125eefee25Smacallan case $cc_basename in 33135eefee25Smacallan CC*) 33145eefee25Smacallan # FIXME: insert proper C++ library support 33155eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 33165eefee25Smacallan ;; 33175eefee25Smacallan aCC*) 33185eefee25Smacallan case $host_cpu in 33195eefee25Smacallan hppa*64*) 33205eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33215eefee25Smacallan ;; 33225eefee25Smacallan ia64*) 33235eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33245eefee25Smacallan ;; 33255eefee25Smacallan *) 33265eefee25Smacallan _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' 33275eefee25Smacallan ;; 33285eefee25Smacallan esac 33295eefee25Smacallan # Commands to make compiler produce verbose output that lists 33305eefee25Smacallan # what "hidden" libraries, object files and flags are used when 33315eefee25Smacallan # linking a shared library. 33325eefee25Smacallan # 33335eefee25Smacallan # There doesn't appear to be a way to prevent this compiler from 33345eefee25Smacallan # explicitly linking system object files so we need to strip them 33355eefee25Smacallan # from the output so that they don't get included in the library 33365eefee25Smacallan # dependencies. 33375eefee25Smacallan 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' 33385eefee25Smacallan ;; 33395eefee25Smacallan *) 33405eefee25Smacallan if test "$GXX" = yes; then 33415eefee25Smacallan if test $with_gnu_ld = no; then 33425eefee25Smacallan case $host_cpu in 33435eefee25Smacallan hppa*64*) 33445eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33455eefee25Smacallan ;; 33465eefee25Smacallan ia64*) 33475eefee25Smacallan _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' 33485eefee25Smacallan ;; 33495eefee25Smacallan *) 33505eefee25Smacallan _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' 33515eefee25Smacallan ;; 33525eefee25Smacallan esac 33535eefee25Smacallan fi 33545eefee25Smacallan else 33555eefee25Smacallan # FIXME: insert proper C++ library support 33565eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 33575eefee25Smacallan fi 33585eefee25Smacallan ;; 33595eefee25Smacallan esac 33605eefee25Smacallan ;; 336162ab96baSmrg interix[[3-9]]*) 33625eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=no 33635eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 33645eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 33655eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 33665eefee25Smacallan # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 33675eefee25Smacallan # Instead, shared libraries are loaded at an image base (0x10000000 by 33685eefee25Smacallan # default) and relocated if they conflict, which is a slow very memory 33695eefee25Smacallan # consuming and fragmenting process. To avoid this, we pick a random, 33705eefee25Smacallan # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 33715eefee25Smacallan # time. Moving up from 0x10000000 also allows more sbrk(2) space. 33725eefee25Smacallan _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' 33735eefee25Smacallan _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' 33745eefee25Smacallan ;; 33755eefee25Smacallan irix5* | irix6*) 33765eefee25Smacallan case $cc_basename in 33775eefee25Smacallan CC*) 33785eefee25Smacallan # SGI C++ 33795eefee25Smacallan _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' 33805eefee25Smacallan 33815eefee25Smacallan # Archives containing C++ object files must be created using 33825eefee25Smacallan # "CC -ar", where "CC" is the IRIX C++ compiler. This is 33835eefee25Smacallan # necessary to make sure instantiated templates are included 33845eefee25Smacallan # in the archive. 33855eefee25Smacallan _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 33865eefee25Smacallan ;; 33875eefee25Smacallan *) 33885eefee25Smacallan if test "$GXX" = yes; then 33895eefee25Smacallan if test "$with_gnu_ld" = no; then 33905eefee25Smacallan _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' 33915eefee25Smacallan else 33925eefee25Smacallan _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' 33935eefee25Smacallan fi 33945eefee25Smacallan fi 33955eefee25Smacallan _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 33965eefee25Smacallan ;; 33975eefee25Smacallan esac 33985eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 33995eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 34005eefee25Smacallan ;; 340162ab96baSmrg linux* | k*bsd*-gnu) 34025eefee25Smacallan case $cc_basename in 34035eefee25Smacallan KCC*) 34045eefee25Smacallan # Kuck and Associates, Inc. (KAI) C++ Compiler 34055eefee25Smacallan 34065eefee25Smacallan # KCC will only create a shared library if the output file 34075eefee25Smacallan # ends with ".so" (or ".sl" for HP-UX), so rename the library 34085eefee25Smacallan # to its proper name (with version) after linking. 34095eefee25Smacallan _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' 34105eefee25Smacallan _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' 34115eefee25Smacallan # Commands to make compiler produce verbose output that lists 34125eefee25Smacallan # what "hidden" libraries, object files and flags are used when 34135eefee25Smacallan # linking a shared library. 34145eefee25Smacallan # 34155eefee25Smacallan # There doesn't appear to be a way to prevent this compiler from 34165eefee25Smacallan # explicitly linking system object files so we need to strip them 34175eefee25Smacallan # from the output so that they don't get included in the library 34185eefee25Smacallan # dependencies. 34195eefee25Smacallan 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' 34205eefee25Smacallan 34215eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 34225eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 34235eefee25Smacallan 34245eefee25Smacallan # Archives containing C++ object files must be created using 34255eefee25Smacallan # "CC -Bstatic", where "CC" is the KAI C++ compiler. 34265eefee25Smacallan _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 34275eefee25Smacallan ;; 34285eefee25Smacallan icpc*) 34295eefee25Smacallan # Intel C++ 34305eefee25Smacallan with_gnu_ld=yes 34315eefee25Smacallan # version 8.0 and above of icpc choke on multiply defined symbols 34325eefee25Smacallan # if we add $predep_objects and $postdep_objects, however 7.1 and 34335eefee25Smacallan # earlier do not add the objects themselves. 34345eefee25Smacallan case `$CC -V 2>&1` in 34355eefee25Smacallan *"Version 7."*) 34365eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 34375eefee25Smacallan _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' 34385eefee25Smacallan ;; 34395eefee25Smacallan *) # Version 8.0 or newer 34405eefee25Smacallan tmp_idyn= 34415eefee25Smacallan case $host_cpu in 34425eefee25Smacallan ia64*) tmp_idyn=' -i_dynamic';; 34435eefee25Smacallan esac 34445eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 34455eefee25Smacallan _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' 34465eefee25Smacallan ;; 34475eefee25Smacallan esac 34485eefee25Smacallan _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 34495eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 34505eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 34515eefee25Smacallan _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 34525eefee25Smacallan ;; 345362ab96baSmrg pgCC* | pgcpp*) 34545eefee25Smacallan # Portland Group C++ compiler 34555eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 34565eefee25Smacallan _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' 34575eefee25Smacallan 34585eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 34595eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 34605eefee25Smacallan _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' 34615eefee25Smacallan ;; 34625eefee25Smacallan cxx*) 34635eefee25Smacallan # Compaq C++ 34645eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 34655eefee25Smacallan _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' 34665eefee25Smacallan 34675eefee25Smacallan runpath_var=LD_RUN_PATH 34685eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 34695eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 34705eefee25Smacallan 34715eefee25Smacallan # Commands to make compiler produce verbose output that lists 34725eefee25Smacallan # what "hidden" libraries, object files and flags are used when 34735eefee25Smacallan # linking a shared library. 34745eefee25Smacallan # 34755eefee25Smacallan # There doesn't appear to be a way to prevent this compiler from 34765eefee25Smacallan # explicitly linking system object files so we need to strip them 34775eefee25Smacallan # from the output so that they don't get included in the library 34785eefee25Smacallan # dependencies. 34795eefee25Smacallan 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' 34805eefee25Smacallan ;; 348162ab96baSmrg *) 348262ab96baSmrg case `$CC -V 2>&1 | sed 5q` in 348362ab96baSmrg *Sun\ C*) 348462ab96baSmrg # Sun C++ 5.9 348562ab96baSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 348662ab96baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 348762ab96baSmrg _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' 348862ab96baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 348962ab96baSmrg _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' 349062ab96baSmrg 349162ab96baSmrg # Not sure whether something based on 349262ab96baSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 349362ab96baSmrg # would be better. 349462ab96baSmrg output_verbose_link_cmd='echo' 349562ab96baSmrg 349662ab96baSmrg # Archives containing C++ object files must be created using 349762ab96baSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 349862ab96baSmrg # necessary to make sure instantiated templates are included 349962ab96baSmrg # in the archive. 350062ab96baSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 350162ab96baSmrg ;; 350262ab96baSmrg esac 350362ab96baSmrg ;; 35045eefee25Smacallan esac 35055eefee25Smacallan ;; 35065eefee25Smacallan lynxos*) 35075eefee25Smacallan # FIXME: insert proper C++ library support 35085eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 35095eefee25Smacallan ;; 35105eefee25Smacallan m88k*) 35115eefee25Smacallan # FIXME: insert proper C++ library support 35125eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 35135eefee25Smacallan ;; 35145eefee25Smacallan mvs*) 35155eefee25Smacallan case $cc_basename in 35165eefee25Smacallan cxx*) 35175eefee25Smacallan # FIXME: insert proper C++ library support 35185eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 35195eefee25Smacallan ;; 35205eefee25Smacallan *) 35215eefee25Smacallan # FIXME: insert proper C++ library support 35225eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 35235eefee25Smacallan ;; 35245eefee25Smacallan esac 35255eefee25Smacallan ;; 352662ab96baSmrg netbsd* | netbsdelf*-gnu) 35275eefee25Smacallan if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 35285eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 35295eefee25Smacallan wlarc= 35305eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 35315eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes 35325eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 35335eefee25Smacallan fi 35345eefee25Smacallan # Workaround some broken pre-1.5 toolchains 35355eefee25Smacallan output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 35365eefee25Smacallan ;; 35375eefee25Smacallan openbsd2*) 35385eefee25Smacallan # C++ shared libraries are fairly broken 35395eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 35405eefee25Smacallan ;; 35415eefee25Smacallan openbsd*) 354262ab96baSmrg if test -f /usr/libexec/ld.so; then 354362ab96baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 354462ab96baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 354562ab96baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 354662ab96baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 354762ab96baSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 354862ab96baSmrg _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' 354962ab96baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 355062ab96baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 355162ab96baSmrg fi 355262ab96baSmrg output_verbose_link_cmd='echo' 355362ab96baSmrg else 355462ab96baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35555eefee25Smacallan fi 35565eefee25Smacallan ;; 35575eefee25Smacallan osf3*) 35585eefee25Smacallan case $cc_basename in 35595eefee25Smacallan KCC*) 35605eefee25Smacallan # Kuck and Associates, Inc. (KAI) C++ Compiler 35615eefee25Smacallan 35625eefee25Smacallan # KCC will only create a shared library if the output file 35635eefee25Smacallan # ends with ".so" (or ".sl" for HP-UX), so rename the library 35645eefee25Smacallan # to its proper name (with version) after linking. 35655eefee25Smacallan _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' 35665eefee25Smacallan 35675eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 35685eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 35695eefee25Smacallan 35705eefee25Smacallan # Archives containing C++ object files must be created using 35715eefee25Smacallan # "CC -Bstatic", where "CC" is the KAI C++ compiler. 35725eefee25Smacallan _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 35735eefee25Smacallan 35745eefee25Smacallan ;; 35755eefee25Smacallan RCC*) 35765eefee25Smacallan # Rational C++ 2.4.1 35775eefee25Smacallan # FIXME: insert proper C++ library support 35785eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 35795eefee25Smacallan ;; 35805eefee25Smacallan cxx*) 35815eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 35825eefee25Smacallan _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' 35835eefee25Smacallan 35845eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 35855eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 35865eefee25Smacallan 35875eefee25Smacallan # Commands to make compiler produce verbose output that lists 35885eefee25Smacallan # what "hidden" libraries, object files and flags are used when 35895eefee25Smacallan # linking a shared library. 35905eefee25Smacallan # 35915eefee25Smacallan # There doesn't appear to be a way to prevent this compiler from 35925eefee25Smacallan # explicitly linking system object files so we need to strip them 35935eefee25Smacallan # from the output so that they don't get included in the library 35945eefee25Smacallan # dependencies. 35955eefee25Smacallan 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' 35965eefee25Smacallan ;; 35975eefee25Smacallan *) 35985eefee25Smacallan if test "$GXX" = yes && test "$with_gnu_ld" = no; then 35995eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 36005eefee25Smacallan _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' 36015eefee25Smacallan 36025eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 36035eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 36045eefee25Smacallan 36055eefee25Smacallan # Commands to make compiler produce verbose output that lists 36065eefee25Smacallan # what "hidden" libraries, object files and flags are used when 36075eefee25Smacallan # linking a shared library. 36085eefee25Smacallan output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 36095eefee25Smacallan 36105eefee25Smacallan else 36115eefee25Smacallan # FIXME: insert proper C++ library support 36125eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 36135eefee25Smacallan fi 36145eefee25Smacallan ;; 36155eefee25Smacallan esac 36165eefee25Smacallan ;; 36175eefee25Smacallan osf4* | osf5*) 36185eefee25Smacallan case $cc_basename in 36195eefee25Smacallan KCC*) 36205eefee25Smacallan # Kuck and Associates, Inc. (KAI) C++ Compiler 36215eefee25Smacallan 36225eefee25Smacallan # KCC will only create a shared library if the output file 36235eefee25Smacallan # ends with ".so" (or ".sl" for HP-UX), so rename the library 36245eefee25Smacallan # to its proper name (with version) after linking. 36255eefee25Smacallan _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' 36265eefee25Smacallan 36275eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 36285eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 36295eefee25Smacallan 36305eefee25Smacallan # Archives containing C++ object files must be created using 36315eefee25Smacallan # the KAI C++ compiler. 36325eefee25Smacallan _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 36335eefee25Smacallan ;; 36345eefee25Smacallan RCC*) 36355eefee25Smacallan # Rational C++ 2.4.1 36365eefee25Smacallan # FIXME: insert proper C++ library support 36375eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 36385eefee25Smacallan ;; 36395eefee25Smacallan cxx*) 36405eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 36415eefee25Smacallan _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' 36425eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 36435eefee25Smacallan echo "-hidden">> $lib.exp~ 36445eefee25Smacallan $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~ 36455eefee25Smacallan $rm $lib.exp' 36465eefee25Smacallan 36475eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 36485eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 36495eefee25Smacallan 36505eefee25Smacallan # Commands to make compiler produce verbose output that lists 36515eefee25Smacallan # what "hidden" libraries, object files and flags are used when 36525eefee25Smacallan # linking a shared library. 36535eefee25Smacallan # 36545eefee25Smacallan # There doesn't appear to be a way to prevent this compiler from 36555eefee25Smacallan # explicitly linking system object files so we need to strip them 36565eefee25Smacallan # from the output so that they don't get included in the library 36575eefee25Smacallan # dependencies. 36585eefee25Smacallan 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' 36595eefee25Smacallan ;; 36605eefee25Smacallan *) 36615eefee25Smacallan if test "$GXX" = yes && test "$with_gnu_ld" = no; then 36625eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 36635eefee25Smacallan _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' 36645eefee25Smacallan 36655eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 36665eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 36675eefee25Smacallan 36685eefee25Smacallan # Commands to make compiler produce verbose output that lists 36695eefee25Smacallan # what "hidden" libraries, object files and flags are used when 36705eefee25Smacallan # linking a shared library. 36715eefee25Smacallan output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 36725eefee25Smacallan 36735eefee25Smacallan else 36745eefee25Smacallan # FIXME: insert proper C++ library support 36755eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 36765eefee25Smacallan fi 36775eefee25Smacallan ;; 36785eefee25Smacallan esac 36795eefee25Smacallan ;; 36805eefee25Smacallan psos*) 36815eefee25Smacallan # FIXME: insert proper C++ library support 36825eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 36835eefee25Smacallan ;; 36845eefee25Smacallan sunos4*) 36855eefee25Smacallan case $cc_basename in 36865eefee25Smacallan CC*) 36875eefee25Smacallan # Sun C++ 4.x 36885eefee25Smacallan # FIXME: insert proper C++ library support 36895eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 36905eefee25Smacallan ;; 36915eefee25Smacallan lcc*) 36925eefee25Smacallan # Lucid 36935eefee25Smacallan # FIXME: insert proper C++ library support 36945eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 36955eefee25Smacallan ;; 36965eefee25Smacallan *) 36975eefee25Smacallan # FIXME: insert proper C++ library support 36985eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 36995eefee25Smacallan ;; 37005eefee25Smacallan esac 37015eefee25Smacallan ;; 37025eefee25Smacallan solaris*) 37035eefee25Smacallan case $cc_basename in 37045eefee25Smacallan CC*) 37055eefee25Smacallan # Sun C++ 4.2, 5.x and Centerline C++ 37065eefee25Smacallan _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 37075eefee25Smacallan _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 37085eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 37095eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 37105eefee25Smacallan $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' 37115eefee25Smacallan 37125eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 37135eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 37145eefee25Smacallan case $host_os in 37155eefee25Smacallan solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 37165eefee25Smacallan *) 371762ab96baSmrg # The compiler driver will combine and reorder linker options, 371862ab96baSmrg # but understands `-z linker_flag'. 37195eefee25Smacallan # Supported since Solaris 2.6 (maybe 2.5.1?) 372062ab96baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 37215eefee25Smacallan ;; 37225eefee25Smacallan esac 37235eefee25Smacallan _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 37245eefee25Smacallan 37255eefee25Smacallan output_verbose_link_cmd='echo' 37265eefee25Smacallan 37275eefee25Smacallan # Archives containing C++ object files must be created using 37285eefee25Smacallan # "CC -xar", where "CC" is the Sun C++ compiler. This is 37295eefee25Smacallan # necessary to make sure instantiated templates are included 37305eefee25Smacallan # in the archive. 37315eefee25Smacallan _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 37325eefee25Smacallan ;; 37335eefee25Smacallan gcx*) 37345eefee25Smacallan # Green Hills C++ Compiler 37355eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 37365eefee25Smacallan 37375eefee25Smacallan # The C++ compiler must be used to create the archive. 37385eefee25Smacallan _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 37395eefee25Smacallan ;; 37405eefee25Smacallan *) 37415eefee25Smacallan # GNU C++ compiler with Solaris linker 37425eefee25Smacallan if test "$GXX" = yes && test "$with_gnu_ld" = no; then 37435eefee25Smacallan _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 37445eefee25Smacallan if $CC --version | grep -v '^2\.7' > /dev/null; then 37455eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 37465eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 37475eefee25Smacallan $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 37485eefee25Smacallan 37495eefee25Smacallan # Commands to make compiler produce verbose output that lists 37505eefee25Smacallan # what "hidden" libraries, object files and flags are used when 37515eefee25Smacallan # linking a shared library. 37525eefee25Smacallan output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 37535eefee25Smacallan else 37545eefee25Smacallan # g++ 2.7 appears to require `-G' NOT `-shared' on this 37555eefee25Smacallan # platform. 37565eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 37575eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 37585eefee25Smacallan $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 37595eefee25Smacallan 37605eefee25Smacallan # Commands to make compiler produce verbose output that lists 37615eefee25Smacallan # what "hidden" libraries, object files and flags are used when 37625eefee25Smacallan # linking a shared library. 37635eefee25Smacallan output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 37645eefee25Smacallan fi 37655eefee25Smacallan 37665eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 376762ab96baSmrg case $host_os in 376862ab96baSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 376962ab96baSmrg *) 377062ab96baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 377162ab96baSmrg ;; 377262ab96baSmrg esac 37735eefee25Smacallan fi 37745eefee25Smacallan ;; 37755eefee25Smacallan esac 37765eefee25Smacallan ;; 37775eefee25Smacallan sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 37785eefee25Smacallan _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 37795eefee25Smacallan _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 37805eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 37815eefee25Smacallan runpath_var='LD_RUN_PATH' 37825eefee25Smacallan 37835eefee25Smacallan case $cc_basename in 37845eefee25Smacallan CC*) 37855eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37865eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37875eefee25Smacallan ;; 37885eefee25Smacallan *) 37895eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37905eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37915eefee25Smacallan ;; 37925eefee25Smacallan esac 37935eefee25Smacallan ;; 37945eefee25Smacallan sysv5* | sco3.2v5* | sco5v6*) 37955eefee25Smacallan # Note: We can NOT use -z defs as we might desire, because we do not 37965eefee25Smacallan # link with -lc, and that would cause any symbols used from libc to 37975eefee25Smacallan # always be unresolved, which means just about no library would 37985eefee25Smacallan # ever link correctly. If we're not using GNU ld we use -z text 37995eefee25Smacallan # though, which does catch some bad symbols but isn't as heavy-handed 38005eefee25Smacallan # as -z defs. 38015eefee25Smacallan # For security reasons, it is highly recommended that you always 38025eefee25Smacallan # use absolute paths for naming shared libraries, and exclude the 38035eefee25Smacallan # DT_RUNPATH tag from executables and libraries. But doing so 38045eefee25Smacallan # requires that you compile everything twice, which is a pain. 38055eefee25Smacallan # So that behaviour is only enabled if SCOABSPATH is set to a 38065eefee25Smacallan # non-empty value in the environment. Most likely only useful for 38075eefee25Smacallan # creating official distributions of packages. 38085eefee25Smacallan # This is a hack until libtool officially supports absolute path 38095eefee25Smacallan # names for shared libraries. 38105eefee25Smacallan _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 38115eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 38125eefee25Smacallan _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 38135eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 38145eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 38155eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 38165eefee25Smacallan _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 38175eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 38185eefee25Smacallan runpath_var='LD_RUN_PATH' 38195eefee25Smacallan 38205eefee25Smacallan case $cc_basename in 38215eefee25Smacallan CC*) 38225eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 38235eefee25Smacallan _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' 38245eefee25Smacallan ;; 38255eefee25Smacallan *) 38265eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 38275eefee25Smacallan _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' 38285eefee25Smacallan ;; 38295eefee25Smacallan esac 38305eefee25Smacallan ;; 38315eefee25Smacallan tandem*) 38325eefee25Smacallan case $cc_basename in 38335eefee25Smacallan NCC*) 38345eefee25Smacallan # NonStop-UX NCC 3.20 38355eefee25Smacallan # FIXME: insert proper C++ library support 38365eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 38375eefee25Smacallan ;; 38385eefee25Smacallan *) 38395eefee25Smacallan # FIXME: insert proper C++ library support 38405eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 38415eefee25Smacallan ;; 38425eefee25Smacallan esac 38435eefee25Smacallan ;; 38445eefee25Smacallan vxworks*) 38455eefee25Smacallan # FIXME: insert proper C++ library support 38465eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 38475eefee25Smacallan ;; 38485eefee25Smacallan *) 38495eefee25Smacallan # FIXME: insert proper C++ library support 38505eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 38515eefee25Smacallan ;; 38525eefee25Smacallanesac 38535eefee25SmacallanAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 38545eefee25Smacallantest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 38555eefee25Smacallan 38565eefee25Smacallan_LT_AC_TAGVAR(GCC, $1)="$GXX" 38575eefee25Smacallan_LT_AC_TAGVAR(LD, $1)="$LD" 38585eefee25Smacallan 38595eefee25SmacallanAC_LIBTOOL_POSTDEP_PREDEP($1) 38605eefee25SmacallanAC_LIBTOOL_PROG_COMPILER_PIC($1) 38615eefee25SmacallanAC_LIBTOOL_PROG_CC_C_O($1) 38625eefee25SmacallanAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 38635eefee25SmacallanAC_LIBTOOL_PROG_LD_SHLIBS($1) 38645eefee25SmacallanAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 38655eefee25SmacallanAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 38665eefee25Smacallan 38675eefee25SmacallanAC_LIBTOOL_CONFIG($1) 38685eefee25Smacallan 38695eefee25SmacallanAC_LANG_POP 38705eefee25SmacallanCC=$lt_save_CC 38715eefee25SmacallanLDCXX=$LD 38725eefee25SmacallanLD=$lt_save_LD 38735eefee25SmacallanGCC=$lt_save_GCC 38745eefee25Smacallanwith_gnu_ldcxx=$with_gnu_ld 38755eefee25Smacallanwith_gnu_ld=$lt_save_with_gnu_ld 38765eefee25Smacallanlt_cv_path_LDCXX=$lt_cv_path_LD 38775eefee25Smacallanlt_cv_path_LD=$lt_save_path_LD 38785eefee25Smacallanlt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 38795eefee25Smacallanlt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 38805eefee25Smacallan])# AC_LIBTOOL_LANG_CXX_CONFIG 38815eefee25Smacallan 38825eefee25Smacallan# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 38835eefee25Smacallan# ------------------------------------ 38845eefee25Smacallan# Figure out "hidden" library dependencies from verbose 38855eefee25Smacallan# compiler output when linking a shared library. 38865eefee25Smacallan# Parse the compiler output and extract the necessary 38875eefee25Smacallan# objects, libraries and library flags. 388862ab96baSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 388962ab96baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 38905eefee25Smacallandnl we can't use the lt_simple_compile_test_code here, 38915eefee25Smacallandnl because it contains code intended for an executable, 38925eefee25Smacallandnl not a library. It's possible we should let each 38935eefee25Smacallandnl tag define a new lt_????_link_test_code variable, 38945eefee25Smacallandnl but it's only used here... 38955eefee25Smacallanifelse([$1],[],[cat > conftest.$ac_ext <<EOF 38965eefee25Smacallanint a; 38975eefee25Smacallanvoid foo (void) { a = 0; } 38985eefee25SmacallanEOF 38995eefee25Smacallan],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 39005eefee25Smacallanclass Foo 39015eefee25Smacallan{ 39025eefee25Smacallanpublic: 39035eefee25Smacallan Foo (void) { a = 0; } 39045eefee25Smacallanprivate: 39055eefee25Smacallan int a; 39065eefee25Smacallan}; 39075eefee25SmacallanEOF 39085eefee25Smacallan],[$1],[F77],[cat > conftest.$ac_ext <<EOF 39095eefee25Smacallan subroutine foo 39105eefee25Smacallan implicit none 39115eefee25Smacallan integer*4 a 39125eefee25Smacallan a=0 39135eefee25Smacallan return 39145eefee25Smacallan end 39155eefee25SmacallanEOF 39165eefee25Smacallan],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 39175eefee25Smacallanpublic class foo { 39185eefee25Smacallan private int a; 39195eefee25Smacallan public void bar (void) { 39205eefee25Smacallan a = 0; 39215eefee25Smacallan } 39225eefee25Smacallan}; 39235eefee25SmacallanEOF 39245eefee25Smacallan]) 39255eefee25Smacallandnl Parse the compiler output and extract the necessary 39265eefee25Smacallandnl objects, libraries and library flags. 39275eefee25Smacallanif AC_TRY_EVAL(ac_compile); then 39285eefee25Smacallan # Parse the compiler output and extract the necessary 39295eefee25Smacallan # objects, libraries and library flags. 39305eefee25Smacallan 39315eefee25Smacallan # Sentinel used to keep track of whether or not we are before 39325eefee25Smacallan # the conftest object file. 39335eefee25Smacallan pre_test_object_deps_done=no 39345eefee25Smacallan 39355eefee25Smacallan # The `*' in the case matches for architectures that use `case' in 39365eefee25Smacallan # $output_verbose_cmd can trigger glob expansion during the loop 39375eefee25Smacallan # eval without this substitution. 39385eefee25Smacallan output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 39395eefee25Smacallan 39405eefee25Smacallan for p in `eval $output_verbose_link_cmd`; do 39415eefee25Smacallan case $p in 39425eefee25Smacallan 39435eefee25Smacallan -L* | -R* | -l*) 39445eefee25Smacallan # Some compilers place space between "-{L,R}" and the path. 39455eefee25Smacallan # Remove the space. 39465eefee25Smacallan if test $p = "-L" \ 39475eefee25Smacallan || test $p = "-R"; then 39485eefee25Smacallan prev=$p 39495eefee25Smacallan continue 39505eefee25Smacallan else 39515eefee25Smacallan prev= 39525eefee25Smacallan fi 39535eefee25Smacallan 39545eefee25Smacallan if test "$pre_test_object_deps_done" = no; then 39555eefee25Smacallan case $p in 39565eefee25Smacallan -L* | -R*) 39575eefee25Smacallan # Internal compiler library paths should come after those 39585eefee25Smacallan # provided the user. The postdeps already come after the 39595eefee25Smacallan # user supplied libs so there is no need to process them. 39605eefee25Smacallan if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 39615eefee25Smacallan _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 39625eefee25Smacallan else 39635eefee25Smacallan _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 39645eefee25Smacallan fi 39655eefee25Smacallan ;; 39665eefee25Smacallan # The "-l" case would never come before the object being 39675eefee25Smacallan # linked, so don't bother handling this case. 39685eefee25Smacallan esac 39695eefee25Smacallan else 39705eefee25Smacallan if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 39715eefee25Smacallan _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 39725eefee25Smacallan else 39735eefee25Smacallan _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 39745eefee25Smacallan fi 39755eefee25Smacallan fi 39765eefee25Smacallan ;; 39775eefee25Smacallan 39785eefee25Smacallan *.$objext) 39795eefee25Smacallan # This assumes that the test object file only shows up 39805eefee25Smacallan # once in the compiler output. 39815eefee25Smacallan if test "$p" = "conftest.$objext"; then 39825eefee25Smacallan pre_test_object_deps_done=yes 39835eefee25Smacallan continue 39845eefee25Smacallan fi 39855eefee25Smacallan 39865eefee25Smacallan if test "$pre_test_object_deps_done" = no; then 39875eefee25Smacallan if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 39885eefee25Smacallan _LT_AC_TAGVAR(predep_objects, $1)="$p" 39895eefee25Smacallan else 39905eefee25Smacallan _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 39915eefee25Smacallan fi 39925eefee25Smacallan else 39935eefee25Smacallan if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 39945eefee25Smacallan _LT_AC_TAGVAR(postdep_objects, $1)="$p" 39955eefee25Smacallan else 39965eefee25Smacallan _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 39975eefee25Smacallan fi 39985eefee25Smacallan fi 39995eefee25Smacallan ;; 40005eefee25Smacallan 40015eefee25Smacallan *) ;; # Ignore the rest. 40025eefee25Smacallan 40035eefee25Smacallan esac 40045eefee25Smacallan done 40055eefee25Smacallan 40065eefee25Smacallan # Clean up. 40075eefee25Smacallan rm -f a.out a.exe 40085eefee25Smacallanelse 40095eefee25Smacallan echo "libtool.m4: error: problem compiling $1 test program" 40105eefee25Smacallanfi 40115eefee25Smacallan 40125eefee25Smacallan$rm -f confest.$objext 40135eefee25Smacallan 401462ab96baSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 401562ab96baSmrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 401662ab96baSmrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 401762ab96baSmrgfi 401862ab96baSmrg 40195eefee25Smacallan# PORTME: override above test on systems where it is broken 40205eefee25Smacallanifelse([$1],[CXX], 40215eefee25Smacallan[case $host_os in 402262ab96baSmrginterix[[3-9]]*) 40235eefee25Smacallan # Interix 3.5 installs completely hosed .la files for C++, so rather than 40245eefee25Smacallan # hack all around it, let's just trust "g++" to DTRT. 40255eefee25Smacallan _LT_AC_TAGVAR(predep_objects,$1)= 40265eefee25Smacallan _LT_AC_TAGVAR(postdep_objects,$1)= 40275eefee25Smacallan _LT_AC_TAGVAR(postdeps,$1)= 40285eefee25Smacallan ;; 40295eefee25Smacallan 403062ab96baSmrglinux*) 403162ab96baSmrg case `$CC -V 2>&1 | sed 5q` in 403262ab96baSmrg *Sun\ C*) 403362ab96baSmrg # Sun C++ 5.9 403462ab96baSmrg # 403562ab96baSmrg # The more standards-conforming stlport4 library is 403662ab96baSmrg # incompatible with the Cstd library. Avoid specifying 403762ab96baSmrg # it if it's in CXXFLAGS. Ignore libCrun as 403862ab96baSmrg # -library=stlport4 depends on it. 403962ab96baSmrg case " $CXX $CXXFLAGS " in 404062ab96baSmrg *" -library=stlport4 "*) 404162ab96baSmrg solaris_use_stlport4=yes 404262ab96baSmrg ;; 404362ab96baSmrg esac 404462ab96baSmrg if test "$solaris_use_stlport4" != yes; then 404562ab96baSmrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 404662ab96baSmrg fi 404762ab96baSmrg ;; 404862ab96baSmrg esac 404962ab96baSmrg ;; 405062ab96baSmrg 40515eefee25Smacallansolaris*) 40525eefee25Smacallan case $cc_basename in 40535eefee25Smacallan CC*) 405462ab96baSmrg # The more standards-conforming stlport4 library is 405562ab96baSmrg # incompatible with the Cstd library. Avoid specifying 405662ab96baSmrg # it if it's in CXXFLAGS. Ignore libCrun as 405762ab96baSmrg # -library=stlport4 depends on it. 405862ab96baSmrg case " $CXX $CXXFLAGS " in 405962ab96baSmrg *" -library=stlport4 "*) 406062ab96baSmrg solaris_use_stlport4=yes 406162ab96baSmrg ;; 406262ab96baSmrg esac 406362ab96baSmrg 40645eefee25Smacallan # Adding this requires a known-good setup of shared libraries for 40655eefee25Smacallan # Sun compiler versions before 5.6, else PIC objects from an old 40665eefee25Smacallan # archive will be linked into the output, leading to subtle bugs. 406762ab96baSmrg if test "$solaris_use_stlport4" != yes; then 406862ab96baSmrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 406962ab96baSmrg fi 40705eefee25Smacallan ;; 40715eefee25Smacallan esac 40725eefee25Smacallan ;; 40735eefee25Smacallanesac 40745eefee25Smacallan]) 40755eefee25Smacallancase " $_LT_AC_TAGVAR(postdeps, $1) " in 40765eefee25Smacallan*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 40775eefee25Smacallanesac 40785eefee25Smacallan])# AC_LIBTOOL_POSTDEP_PREDEP 40795eefee25Smacallan 40805eefee25Smacallan# AC_LIBTOOL_LANG_F77_CONFIG 40815eefee25Smacallan# -------------------------- 40825eefee25Smacallan# Ensure that the configuration vars for the C compiler are 40835eefee25Smacallan# suitably defined. Those variables are subsequently used by 40845eefee25Smacallan# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 40855eefee25SmacallanAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 40865eefee25SmacallanAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 40875eefee25Smacallan[AC_REQUIRE([AC_PROG_F77]) 40885eefee25SmacallanAC_LANG_PUSH(Fortran 77) 40895eefee25Smacallan 40905eefee25Smacallan_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 40915eefee25Smacallan_LT_AC_TAGVAR(allow_undefined_flag, $1)= 40925eefee25Smacallan_LT_AC_TAGVAR(always_export_symbols, $1)=no 40935eefee25Smacallan_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 40945eefee25Smacallan_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 40955eefee25Smacallan_LT_AC_TAGVAR(hardcode_direct, $1)=no 40965eefee25Smacallan_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 40975eefee25Smacallan_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 40985eefee25Smacallan_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 40995eefee25Smacallan_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 41005eefee25Smacallan_LT_AC_TAGVAR(hardcode_automatic, $1)=no 41015eefee25Smacallan_LT_AC_TAGVAR(module_cmds, $1)= 41025eefee25Smacallan_LT_AC_TAGVAR(module_expsym_cmds, $1)= 41035eefee25Smacallan_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 41045eefee25Smacallan_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 41055eefee25Smacallan_LT_AC_TAGVAR(no_undefined_flag, $1)= 41065eefee25Smacallan_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 41075eefee25Smacallan_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 41085eefee25Smacallan 41095eefee25Smacallan# Source file extension for f77 test sources. 41105eefee25Smacallanac_ext=f 41115eefee25Smacallan 41125eefee25Smacallan# Object file extension for compiled f77 test sources. 41135eefee25Smacallanobjext=o 41145eefee25Smacallan_LT_AC_TAGVAR(objext, $1)=$objext 41155eefee25Smacallan 41165eefee25Smacallan# Code to be used in simple compile tests 411762ab96baSmrglt_simple_compile_test_code="\ 411862ab96baSmrg subroutine t 411962ab96baSmrg return 412062ab96baSmrg end 412162ab96baSmrg" 41225eefee25Smacallan 41235eefee25Smacallan# Code to be used in simple link tests 412462ab96baSmrglt_simple_link_test_code="\ 412562ab96baSmrg program t 412662ab96baSmrg end 412762ab96baSmrg" 41285eefee25Smacallan 41295eefee25Smacallan# ltmain only uses $CC for tagged configurations so make sure $CC is set. 41305eefee25Smacallan_LT_AC_SYS_COMPILER 41315eefee25Smacallan 41325eefee25Smacallan# save warnings/boilerplate of simple test code 41335eefee25Smacallan_LT_COMPILER_BOILERPLATE 41345eefee25Smacallan_LT_LINKER_BOILERPLATE 41355eefee25Smacallan 41365eefee25Smacallan# Allow CC to be a program name with arguments. 41375eefee25Smacallanlt_save_CC="$CC" 41385eefee25SmacallanCC=${F77-"f77"} 41395eefee25Smacallancompiler=$CC 41405eefee25Smacallan_LT_AC_TAGVAR(compiler, $1)=$CC 41415eefee25Smacallan_LT_CC_BASENAME([$compiler]) 41425eefee25Smacallan 41435eefee25SmacallanAC_MSG_CHECKING([if libtool supports shared libraries]) 41445eefee25SmacallanAC_MSG_RESULT([$can_build_shared]) 41455eefee25Smacallan 41465eefee25SmacallanAC_MSG_CHECKING([whether to build shared libraries]) 41475eefee25Smacallantest "$can_build_shared" = "no" && enable_shared=no 41485eefee25Smacallan 41495eefee25Smacallan# On AIX, shared libraries and static libraries use the same namespace, and 41505eefee25Smacallan# are all built from PIC. 41515eefee25Smacallancase $host_os in 41525eefee25Smacallanaix3*) 41535eefee25Smacallan test "$enable_shared" = yes && enable_static=no 41545eefee25Smacallan if test -n "$RANLIB"; then 41555eefee25Smacallan archive_cmds="$archive_cmds~\$RANLIB \$lib" 41565eefee25Smacallan postinstall_cmds='$RANLIB $lib' 41575eefee25Smacallan fi 41585eefee25Smacallan ;; 415962ab96baSmrgaix[[4-9]]*) 41605eefee25Smacallan if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 41615eefee25Smacallan test "$enable_shared" = yes && enable_static=no 41625eefee25Smacallan fi 41635eefee25Smacallan ;; 41645eefee25Smacallanesac 41655eefee25SmacallanAC_MSG_RESULT([$enable_shared]) 41665eefee25Smacallan 41675eefee25SmacallanAC_MSG_CHECKING([whether to build static libraries]) 41685eefee25Smacallan# Make sure either enable_shared or enable_static is yes. 41695eefee25Smacallantest "$enable_shared" = yes || enable_static=yes 41705eefee25SmacallanAC_MSG_RESULT([$enable_static]) 41715eefee25Smacallan 41725eefee25Smacallan_LT_AC_TAGVAR(GCC, $1)="$G77" 41735eefee25Smacallan_LT_AC_TAGVAR(LD, $1)="$LD" 41745eefee25Smacallan 41755eefee25SmacallanAC_LIBTOOL_PROG_COMPILER_PIC($1) 41765eefee25SmacallanAC_LIBTOOL_PROG_CC_C_O($1) 41775eefee25SmacallanAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 41785eefee25SmacallanAC_LIBTOOL_PROG_LD_SHLIBS($1) 41795eefee25SmacallanAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 41805eefee25SmacallanAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 41815eefee25Smacallan 41825eefee25SmacallanAC_LIBTOOL_CONFIG($1) 41835eefee25Smacallan 41845eefee25SmacallanAC_LANG_POP 41855eefee25SmacallanCC="$lt_save_CC" 41865eefee25Smacallan])# AC_LIBTOOL_LANG_F77_CONFIG 41875eefee25Smacallan 41885eefee25Smacallan 41895eefee25Smacallan# AC_LIBTOOL_LANG_GCJ_CONFIG 41905eefee25Smacallan# -------------------------- 41915eefee25Smacallan# Ensure that the configuration vars for the C compiler are 41925eefee25Smacallan# suitably defined. Those variables are subsequently used by 41935eefee25Smacallan# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 41945eefee25SmacallanAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 41955eefee25SmacallanAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 41965eefee25Smacallan[AC_LANG_SAVE 41975eefee25Smacallan 41985eefee25Smacallan# Source file extension for Java test sources. 41995eefee25Smacallanac_ext=java 42005eefee25Smacallan 42015eefee25Smacallan# Object file extension for compiled Java test sources. 42025eefee25Smacallanobjext=o 42035eefee25Smacallan_LT_AC_TAGVAR(objext, $1)=$objext 42045eefee25Smacallan 42055eefee25Smacallan# Code to be used in simple compile tests 420662ab96baSmrglt_simple_compile_test_code="class foo {}" 42075eefee25Smacallan 42085eefee25Smacallan# Code to be used in simple link tests 420962ab96baSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 42105eefee25Smacallan 42115eefee25Smacallan# ltmain only uses $CC for tagged configurations so make sure $CC is set. 42125eefee25Smacallan_LT_AC_SYS_COMPILER 42135eefee25Smacallan 42145eefee25Smacallan# save warnings/boilerplate of simple test code 42155eefee25Smacallan_LT_COMPILER_BOILERPLATE 42165eefee25Smacallan_LT_LINKER_BOILERPLATE 42175eefee25Smacallan 42185eefee25Smacallan# Allow CC to be a program name with arguments. 42195eefee25Smacallanlt_save_CC="$CC" 42205eefee25SmacallanCC=${GCJ-"gcj"} 42215eefee25Smacallancompiler=$CC 42225eefee25Smacallan_LT_AC_TAGVAR(compiler, $1)=$CC 42235eefee25Smacallan_LT_CC_BASENAME([$compiler]) 42245eefee25Smacallan 42255eefee25Smacallan# GCJ did not exist at the time GCC didn't implicitly link libc in. 42265eefee25Smacallan_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 42275eefee25Smacallan 42285eefee25Smacallan_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 42295eefee25Smacallan 42305eefee25SmacallanAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 42315eefee25SmacallanAC_LIBTOOL_PROG_COMPILER_PIC($1) 42325eefee25SmacallanAC_LIBTOOL_PROG_CC_C_O($1) 42335eefee25SmacallanAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 42345eefee25SmacallanAC_LIBTOOL_PROG_LD_SHLIBS($1) 42355eefee25SmacallanAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 42365eefee25SmacallanAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 42375eefee25Smacallan 42385eefee25SmacallanAC_LIBTOOL_CONFIG($1) 42395eefee25Smacallan 42405eefee25SmacallanAC_LANG_RESTORE 42415eefee25SmacallanCC="$lt_save_CC" 42425eefee25Smacallan])# AC_LIBTOOL_LANG_GCJ_CONFIG 42435eefee25Smacallan 42445eefee25Smacallan 42455eefee25Smacallan# AC_LIBTOOL_LANG_RC_CONFIG 42465eefee25Smacallan# ------------------------- 42475eefee25Smacallan# Ensure that the configuration vars for the Windows resource compiler are 42485eefee25Smacallan# suitably defined. Those variables are subsequently used by 42495eefee25Smacallan# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 42505eefee25SmacallanAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 42515eefee25SmacallanAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 42525eefee25Smacallan[AC_LANG_SAVE 42535eefee25Smacallan 42545eefee25Smacallan# Source file extension for RC test sources. 42555eefee25Smacallanac_ext=rc 42565eefee25Smacallan 42575eefee25Smacallan# Object file extension for compiled RC test sources. 42585eefee25Smacallanobjext=o 42595eefee25Smacallan_LT_AC_TAGVAR(objext, $1)=$objext 42605eefee25Smacallan 42615eefee25Smacallan# Code to be used in simple compile tests 426262ab96baSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 42635eefee25Smacallan 42645eefee25Smacallan# Code to be used in simple link tests 42655eefee25Smacallanlt_simple_link_test_code="$lt_simple_compile_test_code" 42665eefee25Smacallan 42675eefee25Smacallan# ltmain only uses $CC for tagged configurations so make sure $CC is set. 42685eefee25Smacallan_LT_AC_SYS_COMPILER 42695eefee25Smacallan 42705eefee25Smacallan# save warnings/boilerplate of simple test code 42715eefee25Smacallan_LT_COMPILER_BOILERPLATE 42725eefee25Smacallan_LT_LINKER_BOILERPLATE 42735eefee25Smacallan 42745eefee25Smacallan# Allow CC to be a program name with arguments. 42755eefee25Smacallanlt_save_CC="$CC" 42765eefee25SmacallanCC=${RC-"windres"} 42775eefee25Smacallancompiler=$CC 42785eefee25Smacallan_LT_AC_TAGVAR(compiler, $1)=$CC 42795eefee25Smacallan_LT_CC_BASENAME([$compiler]) 42805eefee25Smacallan_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 42815eefee25Smacallan 42825eefee25SmacallanAC_LIBTOOL_CONFIG($1) 42835eefee25Smacallan 42845eefee25SmacallanAC_LANG_RESTORE 42855eefee25SmacallanCC="$lt_save_CC" 42865eefee25Smacallan])# AC_LIBTOOL_LANG_RC_CONFIG 42875eefee25Smacallan 42885eefee25Smacallan 42895eefee25Smacallan# AC_LIBTOOL_CONFIG([TAGNAME]) 42905eefee25Smacallan# ---------------------------- 42915eefee25Smacallan# If TAGNAME is not passed, then create an initial libtool script 42925eefee25Smacallan# with a default configuration from the untagged config vars. Otherwise 42935eefee25Smacallan# add code to config.status for appending the configuration named by 42945eefee25Smacallan# TAGNAME from the matching tagged config vars. 42955eefee25SmacallanAC_DEFUN([AC_LIBTOOL_CONFIG], 42965eefee25Smacallan[# The else clause should only fire when bootstrapping the 42975eefee25Smacallan# libtool distribution, otherwise you forgot to ship ltmain.sh 42985eefee25Smacallan# with your package, and you will get complaints that there are 42995eefee25Smacallan# no rules to generate ltmain.sh. 43005eefee25Smacallanif test -f "$ltmain"; then 43015eefee25Smacallan # See if we are running on zsh, and set the options which allow our commands through 43025eefee25Smacallan # without removal of \ escapes. 43035eefee25Smacallan if test -n "${ZSH_VERSION+set}" ; then 43045eefee25Smacallan setopt NO_GLOB_SUBST 43055eefee25Smacallan fi 43065eefee25Smacallan # Now quote all the things that may contain metacharacters while being 43075eefee25Smacallan # careful not to overquote the AC_SUBSTed values. We take copies of the 43085eefee25Smacallan # variables and quote the copies for generation of the libtool script. 43095eefee25Smacallan for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 43105eefee25Smacallan SED SHELL STRIP \ 43115eefee25Smacallan libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 43125eefee25Smacallan old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 43135eefee25Smacallan deplibs_check_method reload_flag reload_cmds need_locks \ 43145eefee25Smacallan lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 43155eefee25Smacallan lt_cv_sys_global_symbol_to_c_name_address \ 43165eefee25Smacallan sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 43175eefee25Smacallan old_postinstall_cmds old_postuninstall_cmds \ 43185eefee25Smacallan _LT_AC_TAGVAR(compiler, $1) \ 43195eefee25Smacallan _LT_AC_TAGVAR(CC, $1) \ 43205eefee25Smacallan _LT_AC_TAGVAR(LD, $1) \ 43215eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 43225eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 43235eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 43245eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 43255eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 43265eefee25Smacallan _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 43275eefee25Smacallan _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 43285eefee25Smacallan _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 43295eefee25Smacallan _LT_AC_TAGVAR(old_archive_cmds, $1) \ 43305eefee25Smacallan _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 43315eefee25Smacallan _LT_AC_TAGVAR(predep_objects, $1) \ 43325eefee25Smacallan _LT_AC_TAGVAR(postdep_objects, $1) \ 43335eefee25Smacallan _LT_AC_TAGVAR(predeps, $1) \ 43345eefee25Smacallan _LT_AC_TAGVAR(postdeps, $1) \ 43355eefee25Smacallan _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 433662ab96baSmrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 43375eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1) \ 43385eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 43395eefee25Smacallan _LT_AC_TAGVAR(postinstall_cmds, $1) \ 43405eefee25Smacallan _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 43415eefee25Smacallan _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 43425eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 43435eefee25Smacallan _LT_AC_TAGVAR(no_undefined_flag, $1) \ 43445eefee25Smacallan _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 43455eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 43465eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 43475eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 43485eefee25Smacallan _LT_AC_TAGVAR(hardcode_automatic, $1) \ 43495eefee25Smacallan _LT_AC_TAGVAR(module_cmds, $1) \ 43505eefee25Smacallan _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 43515eefee25Smacallan _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 435262ab96baSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 43535eefee25Smacallan _LT_AC_TAGVAR(exclude_expsyms, $1) \ 43545eefee25Smacallan _LT_AC_TAGVAR(include_expsyms, $1); do 43555eefee25Smacallan 43565eefee25Smacallan case $var in 43575eefee25Smacallan _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 43585eefee25Smacallan _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 43595eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1) | \ 43605eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 43615eefee25Smacallan _LT_AC_TAGVAR(module_cmds, $1) | \ 43625eefee25Smacallan _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 43635eefee25Smacallan _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 43645eefee25Smacallan _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 43655eefee25Smacallan extract_expsyms_cmds | reload_cmds | finish_cmds | \ 43665eefee25Smacallan postinstall_cmds | postuninstall_cmds | \ 43675eefee25Smacallan old_postinstall_cmds | old_postuninstall_cmds | \ 43685eefee25Smacallan sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 43695eefee25Smacallan # Double-quote double-evaled strings. 43705eefee25Smacallan eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 43715eefee25Smacallan ;; 43725eefee25Smacallan *) 43735eefee25Smacallan eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 43745eefee25Smacallan ;; 43755eefee25Smacallan esac 43765eefee25Smacallan done 43775eefee25Smacallan 43785eefee25Smacallan case $lt_echo in 43795eefee25Smacallan *'\[$]0 --fallback-echo"') 43805eefee25Smacallan lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 43815eefee25Smacallan ;; 43825eefee25Smacallan esac 43835eefee25Smacallan 43845eefee25Smacallanifelse([$1], [], 43855eefee25Smacallan [cfgfile="${ofile}T" 43865eefee25Smacallan trap "$rm \"$cfgfile\"; exit 1" 1 2 15 43875eefee25Smacallan $rm -f "$cfgfile" 43885eefee25Smacallan AC_MSG_NOTICE([creating $ofile])], 43895eefee25Smacallan [cfgfile="$ofile"]) 43905eefee25Smacallan 43915eefee25Smacallan cat <<__EOF__ >> "$cfgfile" 43925eefee25Smacallanifelse([$1], [], 43935eefee25Smacallan[#! $SHELL 43945eefee25Smacallan 43955eefee25Smacallan# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 43965eefee25Smacallan# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 43975eefee25Smacallan# NOTE: Changes made to this file will be lost: look at ltmain.sh. 43985eefee25Smacallan# 439962ab96baSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 44005eefee25Smacallan# Free Software Foundation, Inc. 44015eefee25Smacallan# 44025eefee25Smacallan# This file is part of GNU Libtool: 44035eefee25Smacallan# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 44045eefee25Smacallan# 44055eefee25Smacallan# This program is free software; you can redistribute it and/or modify 44065eefee25Smacallan# it under the terms of the GNU General Public License as published by 44075eefee25Smacallan# the Free Software Foundation; either version 2 of the License, or 44085eefee25Smacallan# (at your option) any later version. 44095eefee25Smacallan# 44105eefee25Smacallan# This program is distributed in the hope that it will be useful, but 44115eefee25Smacallan# WITHOUT ANY WARRANTY; without even the implied warranty of 44125eefee25Smacallan# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 44135eefee25Smacallan# General Public License for more details. 44145eefee25Smacallan# 44155eefee25Smacallan# You should have received a copy of the GNU General Public License 44165eefee25Smacallan# along with this program; if not, write to the Free Software 44175eefee25Smacallan# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 44185eefee25Smacallan# 44195eefee25Smacallan# As a special exception to the GNU General Public License, if you 44205eefee25Smacallan# distribute this file as part of a program that contains a 44215eefee25Smacallan# configuration script generated by Autoconf, you may include it under 44225eefee25Smacallan# the same distribution terms that you use for the rest of that program. 44235eefee25Smacallan 44245eefee25Smacallan# A sed program that does not truncate output. 44255eefee25SmacallanSED=$lt_SED 44265eefee25Smacallan 44275eefee25Smacallan# Sed that helps us avoid accidentally triggering echo(1) options like -n. 44285eefee25SmacallanXsed="$SED -e 1s/^X//" 44295eefee25Smacallan 44305eefee25Smacallan# The HP-UX ksh and POSIX shell print the target directory to stdout 44315eefee25Smacallan# if CDPATH is set. 44325eefee25Smacallan(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 44335eefee25Smacallan 44345eefee25Smacallan# The names of the tagged configurations supported by this script. 44355eefee25Smacallanavailable_tags= 44365eefee25Smacallan 44375eefee25Smacallan# ### BEGIN LIBTOOL CONFIG], 44385eefee25Smacallan[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 44395eefee25Smacallan 44405eefee25Smacallan# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 44415eefee25Smacallan 44425eefee25Smacallan# Shell to use when invoking shell scripts. 44435eefee25SmacallanSHELL=$lt_SHELL 44445eefee25Smacallan 44455eefee25Smacallan# Whether or not to build shared libraries. 44465eefee25Smacallanbuild_libtool_libs=$enable_shared 44475eefee25Smacallan 44485eefee25Smacallan# Whether or not to build static libraries. 44495eefee25Smacallanbuild_old_libs=$enable_static 44505eefee25Smacallan 44515eefee25Smacallan# Whether or not to add -lc for building shared libraries. 44525eefee25Smacallanbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 44535eefee25Smacallan 44545eefee25Smacallan# Whether or not to disallow shared libs when runtime libs are static 44555eefee25Smacallanallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 44565eefee25Smacallan 44575eefee25Smacallan# Whether or not to optimize for fast installation. 44585eefee25Smacallanfast_install=$enable_fast_install 44595eefee25Smacallan 44605eefee25Smacallan# The host system. 44615eefee25Smacallanhost_alias=$host_alias 44625eefee25Smacallanhost=$host 44635eefee25Smacallanhost_os=$host_os 44645eefee25Smacallan 44655eefee25Smacallan# The build system. 44665eefee25Smacallanbuild_alias=$build_alias 44675eefee25Smacallanbuild=$build 44685eefee25Smacallanbuild_os=$build_os 44695eefee25Smacallan 44705eefee25Smacallan# An echo program that does not interpret backslashes. 44715eefee25Smacallanecho=$lt_echo 44725eefee25Smacallan 44735eefee25Smacallan# The archiver. 44745eefee25SmacallanAR=$lt_AR 44755eefee25SmacallanAR_FLAGS=$lt_AR_FLAGS 44765eefee25Smacallan 44775eefee25Smacallan# A C compiler. 44785eefee25SmacallanLTCC=$lt_LTCC 44795eefee25Smacallan 44805eefee25Smacallan# LTCC compiler flags. 44815eefee25SmacallanLTCFLAGS=$lt_LTCFLAGS 44825eefee25Smacallan 44835eefee25Smacallan# A language-specific compiler. 44845eefee25SmacallanCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 44855eefee25Smacallan 44865eefee25Smacallan# Is the compiler the GNU C compiler? 44875eefee25Smacallanwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 44885eefee25Smacallan 44895eefee25Smacallan# An ERE matcher. 44905eefee25SmacallanEGREP=$lt_EGREP 44915eefee25Smacallan 44925eefee25Smacallan# The linker used to build libraries. 44935eefee25SmacallanLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 44945eefee25Smacallan 44955eefee25Smacallan# Whether we need hard or soft links. 44965eefee25SmacallanLN_S=$lt_LN_S 44975eefee25Smacallan 44985eefee25Smacallan# A BSD-compatible nm program. 44995eefee25SmacallanNM=$lt_NM 45005eefee25Smacallan 45015eefee25Smacallan# A symbol stripping program 45025eefee25SmacallanSTRIP=$lt_STRIP 45035eefee25Smacallan 45045eefee25Smacallan# Used to examine libraries when file_magic_cmd begins "file" 45055eefee25SmacallanMAGIC_CMD=$MAGIC_CMD 45065eefee25Smacallan 45075eefee25Smacallan# Used on cygwin: DLL creation program. 45085eefee25SmacallanDLLTOOL="$DLLTOOL" 45095eefee25Smacallan 45105eefee25Smacallan# Used on cygwin: object dumper. 45115eefee25SmacallanOBJDUMP="$OBJDUMP" 45125eefee25Smacallan 45135eefee25Smacallan# Used on cygwin: assembler. 45145eefee25SmacallanAS="$AS" 45155eefee25Smacallan 45165eefee25Smacallan# The name of the directory that contains temporary libtool files. 45175eefee25Smacallanobjdir=$objdir 45185eefee25Smacallan 45195eefee25Smacallan# How to create reloadable object files. 45205eefee25Smacallanreload_flag=$lt_reload_flag 45215eefee25Smacallanreload_cmds=$lt_reload_cmds 45225eefee25Smacallan 45235eefee25Smacallan# How to pass a linker flag through the compiler. 45245eefee25Smacallanwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 45255eefee25Smacallan 45265eefee25Smacallan# Object file suffix (normally "o"). 45275eefee25Smacallanobjext="$ac_objext" 45285eefee25Smacallan 45295eefee25Smacallan# Old archive suffix (normally "a"). 45305eefee25Smacallanlibext="$libext" 45315eefee25Smacallan 45325eefee25Smacallan# Shared library suffix (normally ".so"). 45335eefee25Smacallanshrext_cmds='$shrext_cmds' 45345eefee25Smacallan 45355eefee25Smacallan# Executable file suffix (normally ""). 45365eefee25Smacallanexeext="$exeext" 45375eefee25Smacallan 45385eefee25Smacallan# Additional compiler flags for building library objects. 45395eefee25Smacallanpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 45405eefee25Smacallanpic_mode=$pic_mode 45415eefee25Smacallan 45425eefee25Smacallan# What is the maximum length of a command? 45435eefee25Smacallanmax_cmd_len=$lt_cv_sys_max_cmd_len 45445eefee25Smacallan 45455eefee25Smacallan# Does compiler simultaneously support -c and -o options? 45465eefee25Smacallancompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 45475eefee25Smacallan 45485eefee25Smacallan# Must we lock files when doing compilation? 45495eefee25Smacallanneed_locks=$lt_need_locks 45505eefee25Smacallan 45515eefee25Smacallan# Do we need the lib prefix for modules? 45525eefee25Smacallanneed_lib_prefix=$need_lib_prefix 45535eefee25Smacallan 45545eefee25Smacallan# Do we need a version for libraries? 45555eefee25Smacallanneed_version=$need_version 45565eefee25Smacallan 45575eefee25Smacallan# Whether dlopen is supported. 45585eefee25Smacallandlopen_support=$enable_dlopen 45595eefee25Smacallan 45605eefee25Smacallan# Whether dlopen of programs is supported. 45615eefee25Smacallandlopen_self=$enable_dlopen_self 45625eefee25Smacallan 45635eefee25Smacallan# Whether dlopen of statically linked programs is supported. 45645eefee25Smacallandlopen_self_static=$enable_dlopen_self_static 45655eefee25Smacallan 45665eefee25Smacallan# Compiler flag to prevent dynamic linking. 45675eefee25Smacallanlink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 45685eefee25Smacallan 45695eefee25Smacallan# Compiler flag to turn off builtin functions. 45705eefee25Smacallanno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 45715eefee25Smacallan 45725eefee25Smacallan# Compiler flag to allow reflexive dlopens. 45735eefee25Smacallanexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 45745eefee25Smacallan 45755eefee25Smacallan# Compiler flag to generate shared objects directly from archives. 45765eefee25Smacallanwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 45775eefee25Smacallan 45785eefee25Smacallan# Compiler flag to generate thread-safe objects. 45795eefee25Smacallanthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 45805eefee25Smacallan 45815eefee25Smacallan# Library versioning type. 45825eefee25Smacallanversion_type=$version_type 45835eefee25Smacallan 45845eefee25Smacallan# Format of library name prefix. 45855eefee25Smacallanlibname_spec=$lt_libname_spec 45865eefee25Smacallan 45875eefee25Smacallan# List of archive names. First name is the real one, the rest are links. 45885eefee25Smacallan# The last name is the one that the linker finds with -lNAME. 45895eefee25Smacallanlibrary_names_spec=$lt_library_names_spec 45905eefee25Smacallan 45915eefee25Smacallan# The coded name of the library, if different from the real name. 45925eefee25Smacallansoname_spec=$lt_soname_spec 45935eefee25Smacallan 45945eefee25Smacallan# Commands used to build and install an old-style archive. 45955eefee25SmacallanRANLIB=$lt_RANLIB 45965eefee25Smacallanold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 45975eefee25Smacallanold_postinstall_cmds=$lt_old_postinstall_cmds 45985eefee25Smacallanold_postuninstall_cmds=$lt_old_postuninstall_cmds 45995eefee25Smacallan 46005eefee25Smacallan# Create an old-style archive from a shared archive. 46015eefee25Smacallanold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 46025eefee25Smacallan 46035eefee25Smacallan# Create a temporary old-style archive to link instead of a shared archive. 46045eefee25Smacallanold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 46055eefee25Smacallan 46065eefee25Smacallan# Commands used to build and install a shared archive. 46075eefee25Smacallanarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 46085eefee25Smacallanarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 46095eefee25Smacallanpostinstall_cmds=$lt_postinstall_cmds 46105eefee25Smacallanpostuninstall_cmds=$lt_postuninstall_cmds 46115eefee25Smacallan 46125eefee25Smacallan# Commands used to build a loadable module (assumed same as above if empty) 46135eefee25Smacallanmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 46145eefee25Smacallanmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 46155eefee25Smacallan 46165eefee25Smacallan# Commands to strip libraries. 46175eefee25Smacallanold_striplib=$lt_old_striplib 46185eefee25Smacallanstriplib=$lt_striplib 46195eefee25Smacallan 46205eefee25Smacallan# Dependencies to place before the objects being linked to create a 46215eefee25Smacallan# shared library. 46225eefee25Smacallanpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 46235eefee25Smacallan 46245eefee25Smacallan# Dependencies to place after the objects being linked to create a 46255eefee25Smacallan# shared library. 46265eefee25Smacallanpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 46275eefee25Smacallan 46285eefee25Smacallan# Dependencies to place before the objects being linked to create a 46295eefee25Smacallan# shared library. 46305eefee25Smacallanpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 46315eefee25Smacallan 46325eefee25Smacallan# Dependencies to place after the objects being linked to create a 46335eefee25Smacallan# shared library. 46345eefee25Smacallanpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 46355eefee25Smacallan 463662ab96baSmrg# The directories searched by this compiler when creating a shared 463762ab96baSmrg# library 463862ab96baSmrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 463962ab96baSmrg 46405eefee25Smacallan# The library search path used internally by the compiler when linking 46415eefee25Smacallan# a shared library. 46425eefee25Smacallancompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 46435eefee25Smacallan 46445eefee25Smacallan# Method to check whether dependent libraries are shared objects. 46455eefee25Smacallandeplibs_check_method=$lt_deplibs_check_method 46465eefee25Smacallan 46475eefee25Smacallan# Command to use when deplibs_check_method == file_magic. 46485eefee25Smacallanfile_magic_cmd=$lt_file_magic_cmd 46495eefee25Smacallan 46505eefee25Smacallan# Flag that allows shared libraries with undefined symbols to be built. 46515eefee25Smacallanallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 46525eefee25Smacallan 46535eefee25Smacallan# Flag that forces no undefined symbols. 46545eefee25Smacallanno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 46555eefee25Smacallan 46565eefee25Smacallan# Commands used to finish a libtool library installation in a directory. 46575eefee25Smacallanfinish_cmds=$lt_finish_cmds 46585eefee25Smacallan 46595eefee25Smacallan# Same as above, but a single script fragment to be evaled but not shown. 46605eefee25Smacallanfinish_eval=$lt_finish_eval 46615eefee25Smacallan 46625eefee25Smacallan# Take the output of nm and produce a listing of raw symbols and C names. 46635eefee25Smacallanglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 46645eefee25Smacallan 46655eefee25Smacallan# Transform the output of nm in a proper C declaration 46665eefee25Smacallanglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 46675eefee25Smacallan 46685eefee25Smacallan# Transform the output of nm in a C name address pair 46695eefee25Smacallanglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 46705eefee25Smacallan 46715eefee25Smacallan# This is the shared library runtime path variable. 46725eefee25Smacallanrunpath_var=$runpath_var 46735eefee25Smacallan 46745eefee25Smacallan# This is the shared library path variable. 46755eefee25Smacallanshlibpath_var=$shlibpath_var 46765eefee25Smacallan 46775eefee25Smacallan# Is shlibpath searched before the hard-coded library search path? 46785eefee25Smacallanshlibpath_overrides_runpath=$shlibpath_overrides_runpath 46795eefee25Smacallan 46805eefee25Smacallan# How to hardcode a shared library path into an executable. 46815eefee25Smacallanhardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 46825eefee25Smacallan 46835eefee25Smacallan# Whether we should hardcode library paths into libraries. 46845eefee25Smacallanhardcode_into_libs=$hardcode_into_libs 46855eefee25Smacallan 46865eefee25Smacallan# Flag to hardcode \$libdir into a binary during linking. 46875eefee25Smacallan# This must work even if \$libdir does not exist. 46885eefee25Smacallanhardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 46895eefee25Smacallan 46905eefee25Smacallan# If ld is used when linking, flag to hardcode \$libdir into 46915eefee25Smacallan# a binary during linking. This must work even if \$libdir does 46925eefee25Smacallan# not exist. 46935eefee25Smacallanhardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 46945eefee25Smacallan 46955eefee25Smacallan# Whether we need a single -rpath flag with a separated argument. 46965eefee25Smacallanhardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 46975eefee25Smacallan 46985eefee25Smacallan# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 46995eefee25Smacallan# resulting binary. 47005eefee25Smacallanhardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 47015eefee25Smacallan 47025eefee25Smacallan# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 47035eefee25Smacallan# resulting binary. 47045eefee25Smacallanhardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 47055eefee25Smacallan 47065eefee25Smacallan# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 47075eefee25Smacallan# the resulting binary. 47085eefee25Smacallanhardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 47095eefee25Smacallan 47105eefee25Smacallan# Set to yes if building a shared library automatically hardcodes DIR into the library 47115eefee25Smacallan# and all subsequent libraries and executables linked against it. 47125eefee25Smacallanhardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 47135eefee25Smacallan 47145eefee25Smacallan# Variables whose values should be saved in libtool wrapper scripts and 47155eefee25Smacallan# restored at relink time. 47165eefee25Smacallanvariables_saved_for_relink="$variables_saved_for_relink" 47175eefee25Smacallan 47185eefee25Smacallan# Whether libtool must link a program against all its dependency libraries. 47195eefee25Smacallanlink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 47205eefee25Smacallan 47215eefee25Smacallan# Compile-time system search path for libraries 47225eefee25Smacallansys_lib_search_path_spec=$lt_sys_lib_search_path_spec 47235eefee25Smacallan 47245eefee25Smacallan# Run-time system search path for libraries 47255eefee25Smacallansys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 47265eefee25Smacallan 47275eefee25Smacallan# Fix the shell variable \$srcfile for the compiler. 472862ab96baSmrgfix_srcfile_path=$lt_fix_srcfile_path 47295eefee25Smacallan 47305eefee25Smacallan# Set to yes if exported symbols are required. 47315eefee25Smacallanalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 47325eefee25Smacallan 47335eefee25Smacallan# The commands to list exported symbols. 47345eefee25Smacallanexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 47355eefee25Smacallan 47365eefee25Smacallan# The commands to extract the exported symbol list from a shared archive. 47375eefee25Smacallanextract_expsyms_cmds=$lt_extract_expsyms_cmds 47385eefee25Smacallan 47395eefee25Smacallan# Symbols that should not be listed in the preloaded symbols. 47405eefee25Smacallanexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 47415eefee25Smacallan 47425eefee25Smacallan# Symbols that must always be exported. 47435eefee25Smacallaninclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 47445eefee25Smacallan 47455eefee25Smacallanifelse([$1],[], 47465eefee25Smacallan[# ### END LIBTOOL CONFIG], 47475eefee25Smacallan[# ### END LIBTOOL TAG CONFIG: $tagname]) 47485eefee25Smacallan 47495eefee25Smacallan__EOF__ 47505eefee25Smacallan 47515eefee25Smacallanifelse([$1],[], [ 47525eefee25Smacallan case $host_os in 47535eefee25Smacallan aix3*) 47545eefee25Smacallan cat <<\EOF >> "$cfgfile" 47555eefee25Smacallan 47565eefee25Smacallan# AIX sometimes has problems with the GCC collect2 program. For some 47575eefee25Smacallan# reason, if we set the COLLECT_NAMES environment variable, the problems 47585eefee25Smacallan# vanish in a puff of smoke. 47595eefee25Smacallanif test "X${COLLECT_NAMES+set}" != Xset; then 47605eefee25Smacallan COLLECT_NAMES= 47615eefee25Smacallan export COLLECT_NAMES 47625eefee25Smacallanfi 47635eefee25SmacallanEOF 47645eefee25Smacallan ;; 47655eefee25Smacallan esac 47665eefee25Smacallan 47675eefee25Smacallan # We use sed instead of cat because bash on DJGPP gets confused if 47685eefee25Smacallan # if finds mixed CR/LF and LF-only lines. Since sed operates in 47695eefee25Smacallan # text mode, it properly converts lines to CR/LF. This bash problem 47705eefee25Smacallan # is reportedly fixed, but why not run on old versions too? 47715eefee25Smacallan sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 47725eefee25Smacallan 47735eefee25Smacallan mv -f "$cfgfile" "$ofile" || \ 47745eefee25Smacallan (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 47755eefee25Smacallan chmod +x "$ofile" 47765eefee25Smacallan]) 47775eefee25Smacallanelse 47785eefee25Smacallan # If there is no Makefile yet, we rely on a make rule to execute 47795eefee25Smacallan # `config.status --recheck' to rerun these tests and create the 47805eefee25Smacallan # libtool script then. 47815eefee25Smacallan ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 47825eefee25Smacallan if test -f "$ltmain_in"; then 47835eefee25Smacallan test -f Makefile && make "$ltmain" 47845eefee25Smacallan fi 47855eefee25Smacallanfi 47865eefee25Smacallan])# AC_LIBTOOL_CONFIG 47875eefee25Smacallan 47885eefee25Smacallan 47895eefee25Smacallan# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 47905eefee25Smacallan# ------------------------------------------- 47915eefee25SmacallanAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 47925eefee25Smacallan[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 47935eefee25Smacallan 47945eefee25Smacallan_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 47955eefee25Smacallan 47965eefee25Smacallanif test "$GCC" = yes; then 47975eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 47985eefee25Smacallan 47995eefee25Smacallan AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 48005eefee25Smacallan lt_cv_prog_compiler_rtti_exceptions, 48015eefee25Smacallan [-fno-rtti -fno-exceptions], [], 48025eefee25Smacallan [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 48035eefee25Smacallanfi 48045eefee25Smacallan])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 48055eefee25Smacallan 48065eefee25Smacallan 48075eefee25Smacallan# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 48085eefee25Smacallan# --------------------------------- 48095eefee25SmacallanAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 48105eefee25Smacallan[AC_REQUIRE([AC_CANONICAL_HOST]) 481162ab96baSmrgAC_REQUIRE([LT_AC_PROG_SED]) 48125eefee25SmacallanAC_REQUIRE([AC_PROG_NM]) 48135eefee25SmacallanAC_REQUIRE([AC_OBJEXT]) 48145eefee25Smacallan# Check for command to grab the raw symbol name followed by C symbol from nm. 48155eefee25SmacallanAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 48165eefee25SmacallanAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 48175eefee25Smacallan[ 48185eefee25Smacallan# These are sane defaults that work on at least a few old systems. 48195eefee25Smacallan# [They come from Ultrix. What could be older than Ultrix?!! ;)] 48205eefee25Smacallan 48215eefee25Smacallan# Character class describing NM global symbol codes. 48225eefee25Smacallansymcode='[[BCDEGRST]]' 48235eefee25Smacallan 48245eefee25Smacallan# Regexp to match symbols that can be accessed directly from C. 48255eefee25Smacallansympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 48265eefee25Smacallan 48275eefee25Smacallan# Transform an extracted symbol line into a proper C declaration 48285eefee25Smacallanlt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 48295eefee25Smacallan 48305eefee25Smacallan# Transform an extracted symbol line into symbol name and symbol address 48315eefee25Smacallanlt_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'" 48325eefee25Smacallan 48335eefee25Smacallan# Define system-specific variables. 48345eefee25Smacallancase $host_os in 48355eefee25Smacallanaix*) 48365eefee25Smacallan symcode='[[BCDT]]' 48375eefee25Smacallan ;; 48385eefee25Smacallancygwin* | mingw* | pw32*) 48395eefee25Smacallan symcode='[[ABCDGISTW]]' 48405eefee25Smacallan ;; 48415eefee25Smacallanhpux*) # Its linker distinguishes data from code symbols 48425eefee25Smacallan if test "$host_cpu" = ia64; then 48435eefee25Smacallan symcode='[[ABCDEGRST]]' 48445eefee25Smacallan fi 48455eefee25Smacallan lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 48465eefee25Smacallan 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'" 48475eefee25Smacallan ;; 484862ab96baSmrglinux* | k*bsd*-gnu) 48495eefee25Smacallan if test "$host_cpu" = ia64; then 48505eefee25Smacallan symcode='[[ABCDGIRSTW]]' 48515eefee25Smacallan lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 48525eefee25Smacallan 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'" 48535eefee25Smacallan fi 48545eefee25Smacallan ;; 48555eefee25Smacallanirix* | nonstopux*) 48565eefee25Smacallan symcode='[[BCDEGRST]]' 48575eefee25Smacallan ;; 48585eefee25Smacallanosf*) 48595eefee25Smacallan symcode='[[BCDEGQRST]]' 48605eefee25Smacallan ;; 48615eefee25Smacallansolaris*) 48625eefee25Smacallan symcode='[[BDRT]]' 48635eefee25Smacallan ;; 48645eefee25Smacallansco3.2v5*) 48655eefee25Smacallan symcode='[[DT]]' 48665eefee25Smacallan ;; 48675eefee25Smacallansysv4.2uw2*) 48685eefee25Smacallan symcode='[[DT]]' 48695eefee25Smacallan ;; 48705eefee25Smacallansysv5* | sco5v6* | unixware* | OpenUNIX*) 48715eefee25Smacallan symcode='[[ABDT]]' 48725eefee25Smacallan ;; 48735eefee25Smacallansysv4) 48745eefee25Smacallan symcode='[[DFNSTU]]' 48755eefee25Smacallan ;; 48765eefee25Smacallanesac 48775eefee25Smacallan 48785eefee25Smacallan# Handle CRLF in mingw tool chain 48795eefee25Smacallanopt_cr= 48805eefee25Smacallancase $build_os in 48815eefee25Smacallanmingw*) 48825eefee25Smacallan opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 48835eefee25Smacallan ;; 48845eefee25Smacallanesac 48855eefee25Smacallan 48865eefee25Smacallan# If we're using GNU nm, then use its standard symbol codes. 48875eefee25Smacallancase `$NM -V 2>&1` in 48885eefee25Smacallan*GNU* | *'with BFD'*) 48895eefee25Smacallan symcode='[[ABCDGIRSTW]]' ;; 48905eefee25Smacallanesac 48915eefee25Smacallan 48925eefee25Smacallan# Try without a prefix undercore, then with it. 48935eefee25Smacallanfor ac_symprfx in "" "_"; do 48945eefee25Smacallan 48955eefee25Smacallan # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 48965eefee25Smacallan symxfrm="\\1 $ac_symprfx\\2 \\2" 48975eefee25Smacallan 48985eefee25Smacallan # Write the raw and C identifiers. 48995eefee25Smacallan lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 49005eefee25Smacallan 49015eefee25Smacallan # Check to see that the pipe works correctly. 49025eefee25Smacallan pipe_works=no 49035eefee25Smacallan 49045eefee25Smacallan rm -f conftest* 49055eefee25Smacallan cat > conftest.$ac_ext <<EOF 49065eefee25Smacallan#ifdef __cplusplus 49075eefee25Smacallanextern "C" { 49085eefee25Smacallan#endif 49095eefee25Smacallanchar nm_test_var; 49105eefee25Smacallanvoid nm_test_func(){} 49115eefee25Smacallan#ifdef __cplusplus 49125eefee25Smacallan} 49135eefee25Smacallan#endif 49145eefee25Smacallanint main(){nm_test_var='a';nm_test_func();return(0);} 49155eefee25SmacallanEOF 49165eefee25Smacallan 49175eefee25Smacallan if AC_TRY_EVAL(ac_compile); then 49185eefee25Smacallan # Now try to grab the symbols. 49195eefee25Smacallan nlist=conftest.nm 49205eefee25Smacallan if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 49215eefee25Smacallan # Try sorting and uniquifying the output. 49225eefee25Smacallan if sort "$nlist" | uniq > "$nlist"T; then 49235eefee25Smacallan mv -f "$nlist"T "$nlist" 49245eefee25Smacallan else 49255eefee25Smacallan rm -f "$nlist"T 49265eefee25Smacallan fi 49275eefee25Smacallan 49285eefee25Smacallan # Make sure that we snagged all the symbols we need. 49295eefee25Smacallan if grep ' nm_test_var$' "$nlist" >/dev/null; then 49305eefee25Smacallan if grep ' nm_test_func$' "$nlist" >/dev/null; then 49315eefee25Smacallan cat <<EOF > conftest.$ac_ext 49325eefee25Smacallan#ifdef __cplusplus 49335eefee25Smacallanextern "C" { 49345eefee25Smacallan#endif 49355eefee25Smacallan 49365eefee25SmacallanEOF 49375eefee25Smacallan # Now generate the symbol file. 49385eefee25Smacallan eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 49395eefee25Smacallan 49405eefee25Smacallan cat <<EOF >> conftest.$ac_ext 49415eefee25Smacallan#if defined (__STDC__) && __STDC__ 49425eefee25Smacallan# define lt_ptr_t void * 49435eefee25Smacallan#else 49445eefee25Smacallan# define lt_ptr_t char * 49455eefee25Smacallan# define const 49465eefee25Smacallan#endif 49475eefee25Smacallan 49485eefee25Smacallan/* The mapping between symbol names and symbols. */ 49495eefee25Smacallanconst struct { 49505eefee25Smacallan const char *name; 49515eefee25Smacallan lt_ptr_t address; 49525eefee25Smacallan} 49535eefee25Smacallanlt_preloaded_symbols[[]] = 49545eefee25Smacallan{ 49555eefee25SmacallanEOF 49565eefee25Smacallan $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 49575eefee25Smacallan cat <<\EOF >> conftest.$ac_ext 49585eefee25Smacallan {0, (lt_ptr_t) 0} 49595eefee25Smacallan}; 49605eefee25Smacallan 49615eefee25Smacallan#ifdef __cplusplus 49625eefee25Smacallan} 49635eefee25Smacallan#endif 49645eefee25SmacallanEOF 49655eefee25Smacallan # Now try linking the two files. 49665eefee25Smacallan mv conftest.$ac_objext conftstm.$ac_objext 49675eefee25Smacallan lt_save_LIBS="$LIBS" 49685eefee25Smacallan lt_save_CFLAGS="$CFLAGS" 49695eefee25Smacallan LIBS="conftstm.$ac_objext" 49705eefee25Smacallan CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 49715eefee25Smacallan if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 49725eefee25Smacallan pipe_works=yes 49735eefee25Smacallan fi 49745eefee25Smacallan LIBS="$lt_save_LIBS" 49755eefee25Smacallan CFLAGS="$lt_save_CFLAGS" 49765eefee25Smacallan else 49775eefee25Smacallan echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 49785eefee25Smacallan fi 49795eefee25Smacallan else 49805eefee25Smacallan echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 49815eefee25Smacallan fi 49825eefee25Smacallan else 49835eefee25Smacallan echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 49845eefee25Smacallan fi 49855eefee25Smacallan else 49865eefee25Smacallan echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 49875eefee25Smacallan cat conftest.$ac_ext >&5 49885eefee25Smacallan fi 498962ab96baSmrg rm -rf conftest* conftst* 49905eefee25Smacallan 49915eefee25Smacallan # Do not use the global_symbol_pipe unless it works. 49925eefee25Smacallan if test "$pipe_works" = yes; then 49935eefee25Smacallan break 49945eefee25Smacallan else 49955eefee25Smacallan lt_cv_sys_global_symbol_pipe= 49965eefee25Smacallan fi 49975eefee25Smacallandone 49985eefee25Smacallan]) 49995eefee25Smacallanif test -z "$lt_cv_sys_global_symbol_pipe"; then 50005eefee25Smacallan lt_cv_sys_global_symbol_to_cdecl= 50015eefee25Smacallanfi 50025eefee25Smacallanif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 50035eefee25Smacallan AC_MSG_RESULT(failed) 50045eefee25Smacallanelse 50055eefee25Smacallan AC_MSG_RESULT(ok) 50065eefee25Smacallanfi 50075eefee25Smacallan]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 50085eefee25Smacallan 50095eefee25Smacallan 50105eefee25Smacallan# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 50115eefee25Smacallan# --------------------------------------- 50125eefee25SmacallanAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 50135eefee25Smacallan[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 50145eefee25Smacallan_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 50155eefee25Smacallan_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 50165eefee25Smacallan 50175eefee25SmacallanAC_MSG_CHECKING([for $compiler option to produce PIC]) 50185eefee25Smacallan ifelse([$1],[CXX],[ 50195eefee25Smacallan # C++ specific cases for pic, static, wl, etc. 50205eefee25Smacallan if test "$GXX" = yes; then 50215eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50225eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 50235eefee25Smacallan 50245eefee25Smacallan case $host_os in 50255eefee25Smacallan aix*) 50265eefee25Smacallan # All AIX code is PIC. 50275eefee25Smacallan if test "$host_cpu" = ia64; then 50285eefee25Smacallan # AIX 5 now supports IA64 processor 50295eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50305eefee25Smacallan fi 50315eefee25Smacallan ;; 50325eefee25Smacallan amigaos*) 50335eefee25Smacallan # FIXME: we need at least 68020 code to build shared libraries, but 50345eefee25Smacallan # adding the `-m68020' flag to GCC prevents building anything better, 50355eefee25Smacallan # like `-m68040'. 50365eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 50375eefee25Smacallan ;; 503862ab96baSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 50395eefee25Smacallan # PIC is the default for these OSes. 50405eefee25Smacallan ;; 504162ab96baSmrg mingw* | cygwin* | os2* | pw32*) 50425eefee25Smacallan # This hack is so that the source file can tell whether it is being 50435eefee25Smacallan # built for inclusion in a dll (and should export symbols for example). 504462ab96baSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 504562ab96baSmrg # (--disable-auto-import) libraries 504662ab96baSmrg m4_if([$1], [GCJ], [], 504762ab96baSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50485eefee25Smacallan ;; 50495eefee25Smacallan darwin* | rhapsody*) 50505eefee25Smacallan # PIC is the default on this platform 50515eefee25Smacallan # Common symbols not allowed in MH_DYLIB files 50525eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 50535eefee25Smacallan ;; 50545eefee25Smacallan *djgpp*) 50555eefee25Smacallan # DJGPP does not support shared libraries at all 50565eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 50575eefee25Smacallan ;; 505862ab96baSmrg interix[[3-9]]*) 50595eefee25Smacallan # Interix 3.x gcc -fpic/-fPIC options generate broken code. 50605eefee25Smacallan # Instead, we relocate shared libraries at runtime. 50615eefee25Smacallan ;; 50625eefee25Smacallan sysv4*MP*) 50635eefee25Smacallan if test -d /usr/nec; then 50645eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 50655eefee25Smacallan fi 50665eefee25Smacallan ;; 50675eefee25Smacallan hpux*) 50685eefee25Smacallan # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 50695eefee25Smacallan # not for PA HP-UX. 50705eefee25Smacallan case $host_cpu in 50715eefee25Smacallan hppa*64*|ia64*) 50725eefee25Smacallan ;; 50735eefee25Smacallan *) 50745eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50755eefee25Smacallan ;; 50765eefee25Smacallan esac 50775eefee25Smacallan ;; 50785eefee25Smacallan *) 50795eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50805eefee25Smacallan ;; 50815eefee25Smacallan esac 50825eefee25Smacallan else 50835eefee25Smacallan case $host_os in 508462ab96baSmrg aix[[4-9]]*) 50855eefee25Smacallan # All AIX code is PIC. 50865eefee25Smacallan if test "$host_cpu" = ia64; then 50875eefee25Smacallan # AIX 5 now supports IA64 processor 50885eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50895eefee25Smacallan else 50905eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 50915eefee25Smacallan fi 50925eefee25Smacallan ;; 50935eefee25Smacallan chorus*) 50945eefee25Smacallan case $cc_basename in 50955eefee25Smacallan cxch68*) 50965eefee25Smacallan # Green Hills C++ Compiler 50975eefee25Smacallan # _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" 50985eefee25Smacallan ;; 50995eefee25Smacallan esac 51005eefee25Smacallan ;; 51015eefee25Smacallan darwin*) 51025eefee25Smacallan # PIC is the default on this platform 51035eefee25Smacallan # Common symbols not allowed in MH_DYLIB files 51045eefee25Smacallan case $cc_basename in 51055eefee25Smacallan xlc*) 51065eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 51075eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51085eefee25Smacallan ;; 51095eefee25Smacallan esac 51105eefee25Smacallan ;; 51115eefee25Smacallan dgux*) 51125eefee25Smacallan case $cc_basename in 51135eefee25Smacallan ec++*) 51145eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51155eefee25Smacallan ;; 51165eefee25Smacallan ghcx*) 51175eefee25Smacallan # Green Hills C++ Compiler 51185eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51195eefee25Smacallan ;; 51205eefee25Smacallan *) 51215eefee25Smacallan ;; 51225eefee25Smacallan esac 51235eefee25Smacallan ;; 512462ab96baSmrg freebsd* | dragonfly*) 51255eefee25Smacallan # FreeBSD uses GNU C++ 51265eefee25Smacallan ;; 51275eefee25Smacallan hpux9* | hpux10* | hpux11*) 51285eefee25Smacallan case $cc_basename in 51295eefee25Smacallan CC*) 51305eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51315eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51325eefee25Smacallan if test "$host_cpu" != ia64; then 51335eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51345eefee25Smacallan fi 51355eefee25Smacallan ;; 51365eefee25Smacallan aCC*) 51375eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51385eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51395eefee25Smacallan case $host_cpu in 51405eefee25Smacallan hppa*64*|ia64*) 51415eefee25Smacallan # +Z the default 51425eefee25Smacallan ;; 51435eefee25Smacallan *) 51445eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51455eefee25Smacallan ;; 51465eefee25Smacallan esac 51475eefee25Smacallan ;; 51485eefee25Smacallan *) 51495eefee25Smacallan ;; 51505eefee25Smacallan esac 51515eefee25Smacallan ;; 51525eefee25Smacallan interix*) 51535eefee25Smacallan # This is c89, which is MS Visual C++ (no shared libs) 51545eefee25Smacallan # Anyone wants to do a port? 51555eefee25Smacallan ;; 51565eefee25Smacallan irix5* | irix6* | nonstopux*) 51575eefee25Smacallan case $cc_basename in 51585eefee25Smacallan CC*) 51595eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51605eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51615eefee25Smacallan # CC pic flag -KPIC is the default. 51625eefee25Smacallan ;; 51635eefee25Smacallan *) 51645eefee25Smacallan ;; 51655eefee25Smacallan esac 51665eefee25Smacallan ;; 516762ab96baSmrg linux* | k*bsd*-gnu) 51685eefee25Smacallan case $cc_basename in 51695eefee25Smacallan KCC*) 51705eefee25Smacallan # KAI C++ Compiler 51715eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 51725eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51735eefee25Smacallan ;; 51745eefee25Smacallan icpc* | ecpc*) 51755eefee25Smacallan # Intel C++ 51765eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51775eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51785eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 51795eefee25Smacallan ;; 518062ab96baSmrg pgCC* | pgcpp*) 51815eefee25Smacallan # Portland Group C++ compiler. 51825eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51835eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 51845eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51855eefee25Smacallan ;; 51865eefee25Smacallan cxx*) 51875eefee25Smacallan # Compaq C++ 51885eefee25Smacallan # Make sure the PIC flag is empty. It appears that all Alpha 51895eefee25Smacallan # Linux and Compaq Tru64 Unix objects are PIC. 51905eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 51915eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51925eefee25Smacallan ;; 51935eefee25Smacallan *) 519462ab96baSmrg case `$CC -V 2>&1 | sed 5q` in 519562ab96baSmrg *Sun\ C*) 519662ab96baSmrg # Sun C++ 5.9 519762ab96baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 519862ab96baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 519962ab96baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 520062ab96baSmrg ;; 520162ab96baSmrg esac 52025eefee25Smacallan ;; 52035eefee25Smacallan esac 52045eefee25Smacallan ;; 52055eefee25Smacallan lynxos*) 52065eefee25Smacallan ;; 52075eefee25Smacallan m88k*) 52085eefee25Smacallan ;; 52095eefee25Smacallan mvs*) 52105eefee25Smacallan case $cc_basename in 52115eefee25Smacallan cxx*) 52125eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 52135eefee25Smacallan ;; 52145eefee25Smacallan *) 52155eefee25Smacallan ;; 52165eefee25Smacallan esac 52175eefee25Smacallan ;; 521862ab96baSmrg netbsd* | netbsdelf*-gnu) 52195eefee25Smacallan ;; 52205eefee25Smacallan osf3* | osf4* | osf5*) 52215eefee25Smacallan case $cc_basename in 52225eefee25Smacallan KCC*) 52235eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 52245eefee25Smacallan ;; 52255eefee25Smacallan RCC*) 52265eefee25Smacallan # Rational C++ 2.4.1 52275eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52285eefee25Smacallan ;; 52295eefee25Smacallan cxx*) 52305eefee25Smacallan # Digital/Compaq C++ 52315eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52325eefee25Smacallan # Make sure the PIC flag is empty. It appears that all Alpha 52335eefee25Smacallan # Linux and Compaq Tru64 Unix objects are PIC. 52345eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 52355eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52365eefee25Smacallan ;; 52375eefee25Smacallan *) 52385eefee25Smacallan ;; 52395eefee25Smacallan esac 52405eefee25Smacallan ;; 52415eefee25Smacallan psos*) 52425eefee25Smacallan ;; 52435eefee25Smacallan solaris*) 52445eefee25Smacallan case $cc_basename in 52455eefee25Smacallan CC*) 52465eefee25Smacallan # Sun C++ 4.2, 5.x and Centerline C++ 52475eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52485eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52495eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52505eefee25Smacallan ;; 52515eefee25Smacallan gcx*) 52525eefee25Smacallan # Green Hills C++ Compiler 52535eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 52545eefee25Smacallan ;; 52555eefee25Smacallan *) 52565eefee25Smacallan ;; 52575eefee25Smacallan esac 52585eefee25Smacallan ;; 52595eefee25Smacallan sunos4*) 52605eefee25Smacallan case $cc_basename in 52615eefee25Smacallan CC*) 52625eefee25Smacallan # Sun C++ 4.x 52635eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52645eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52655eefee25Smacallan ;; 52665eefee25Smacallan lcc*) 52675eefee25Smacallan # Lucid 52685eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52695eefee25Smacallan ;; 52705eefee25Smacallan *) 52715eefee25Smacallan ;; 52725eefee25Smacallan esac 52735eefee25Smacallan ;; 52745eefee25Smacallan tandem*) 52755eefee25Smacallan case $cc_basename in 52765eefee25Smacallan NCC*) 52775eefee25Smacallan # NonStop-UX NCC 3.20 52785eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52795eefee25Smacallan ;; 52805eefee25Smacallan *) 52815eefee25Smacallan ;; 52825eefee25Smacallan esac 52835eefee25Smacallan ;; 52845eefee25Smacallan sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 52855eefee25Smacallan case $cc_basename in 52865eefee25Smacallan CC*) 52875eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52885eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52895eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52905eefee25Smacallan ;; 52915eefee25Smacallan esac 52925eefee25Smacallan ;; 52935eefee25Smacallan vxworks*) 52945eefee25Smacallan ;; 52955eefee25Smacallan *) 52965eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 52975eefee25Smacallan ;; 52985eefee25Smacallan esac 52995eefee25Smacallan fi 53005eefee25Smacallan], 53015eefee25Smacallan[ 53025eefee25Smacallan if test "$GCC" = yes; then 53035eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53045eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 53055eefee25Smacallan 53065eefee25Smacallan case $host_os in 53075eefee25Smacallan aix*) 53085eefee25Smacallan # All AIX code is PIC. 53095eefee25Smacallan if test "$host_cpu" = ia64; then 53105eefee25Smacallan # AIX 5 now supports IA64 processor 53115eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53125eefee25Smacallan fi 53135eefee25Smacallan ;; 53145eefee25Smacallan 53155eefee25Smacallan amigaos*) 53165eefee25Smacallan # FIXME: we need at least 68020 code to build shared libraries, but 53175eefee25Smacallan # adding the `-m68020' flag to GCC prevents building anything better, 53185eefee25Smacallan # like `-m68040'. 53195eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 53205eefee25Smacallan ;; 53215eefee25Smacallan 532262ab96baSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 53235eefee25Smacallan # PIC is the default for these OSes. 53245eefee25Smacallan ;; 53255eefee25Smacallan 532662ab96baSmrg mingw* | cygwin* | pw32* | os2*) 53275eefee25Smacallan # This hack is so that the source file can tell whether it is being 53285eefee25Smacallan # built for inclusion in a dll (and should export symbols for example). 532962ab96baSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 533062ab96baSmrg # (--disable-auto-import) libraries 533162ab96baSmrg m4_if([$1], [GCJ], [], 533262ab96baSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53335eefee25Smacallan ;; 53345eefee25Smacallan 53355eefee25Smacallan darwin* | rhapsody*) 53365eefee25Smacallan # PIC is the default on this platform 53375eefee25Smacallan # Common symbols not allowed in MH_DYLIB files 53385eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 53395eefee25Smacallan ;; 53405eefee25Smacallan 534162ab96baSmrg interix[[3-9]]*) 53425eefee25Smacallan # Interix 3.x gcc -fpic/-fPIC options generate broken code. 53435eefee25Smacallan # Instead, we relocate shared libraries at runtime. 53445eefee25Smacallan ;; 53455eefee25Smacallan 53465eefee25Smacallan msdosdjgpp*) 53475eefee25Smacallan # Just because we use GCC doesn't mean we suddenly get shared libraries 53485eefee25Smacallan # on systems that don't support them. 53495eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 53505eefee25Smacallan enable_shared=no 53515eefee25Smacallan ;; 53525eefee25Smacallan 53535eefee25Smacallan sysv4*MP*) 53545eefee25Smacallan if test -d /usr/nec; then 53555eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 53565eefee25Smacallan fi 53575eefee25Smacallan ;; 53585eefee25Smacallan 53595eefee25Smacallan hpux*) 53605eefee25Smacallan # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 53615eefee25Smacallan # not for PA HP-UX. 53625eefee25Smacallan case $host_cpu in 53635eefee25Smacallan hppa*64*|ia64*) 53645eefee25Smacallan # +Z the default 53655eefee25Smacallan ;; 53665eefee25Smacallan *) 53675eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53685eefee25Smacallan ;; 53695eefee25Smacallan esac 53705eefee25Smacallan ;; 53715eefee25Smacallan 53725eefee25Smacallan *) 53735eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53745eefee25Smacallan ;; 53755eefee25Smacallan esac 53765eefee25Smacallan else 53775eefee25Smacallan # PORTME Check for flag to pass linker flags through the system compiler. 53785eefee25Smacallan case $host_os in 53795eefee25Smacallan aix*) 53805eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53815eefee25Smacallan if test "$host_cpu" = ia64; then 53825eefee25Smacallan # AIX 5 now supports IA64 processor 53835eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53845eefee25Smacallan else 53855eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 53865eefee25Smacallan fi 53875eefee25Smacallan ;; 53885eefee25Smacallan darwin*) 53895eefee25Smacallan # PIC is the default on this platform 53905eefee25Smacallan # Common symbols not allowed in MH_DYLIB files 53915eefee25Smacallan case $cc_basename in 53925eefee25Smacallan xlc*) 53935eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 53945eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53955eefee25Smacallan ;; 53965eefee25Smacallan esac 53975eefee25Smacallan ;; 53985eefee25Smacallan 539962ab96baSmrg mingw* | cygwin* | pw32* | os2*) 54005eefee25Smacallan # This hack is so that the source file can tell whether it is being 54015eefee25Smacallan # built for inclusion in a dll (and should export symbols for example). 540262ab96baSmrg m4_if([$1], [GCJ], [], 540362ab96baSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 54045eefee25Smacallan ;; 54055eefee25Smacallan 54065eefee25Smacallan hpux9* | hpux10* | hpux11*) 54075eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54085eefee25Smacallan # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 54095eefee25Smacallan # not for PA HP-UX. 54105eefee25Smacallan case $host_cpu in 54115eefee25Smacallan hppa*64*|ia64*) 54125eefee25Smacallan # +Z the default 54135eefee25Smacallan ;; 54145eefee25Smacallan *) 54155eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 54165eefee25Smacallan ;; 54175eefee25Smacallan esac 54185eefee25Smacallan # Is there a better lt_prog_compiler_static that works with the bundled CC? 54195eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 54205eefee25Smacallan ;; 54215eefee25Smacallan 54225eefee25Smacallan irix5* | irix6* | nonstopux*) 54235eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54245eefee25Smacallan # PIC (with -KPIC) is the default. 54255eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54265eefee25Smacallan ;; 54275eefee25Smacallan 54285eefee25Smacallan newsos6) 54295eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54305eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54315eefee25Smacallan ;; 54325eefee25Smacallan 543362ab96baSmrg linux* | k*bsd*-gnu) 54345eefee25Smacallan case $cc_basename in 54355eefee25Smacallan icc* | ecc*) 54365eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54375eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54385eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 54395eefee25Smacallan ;; 54405eefee25Smacallan pgcc* | pgf77* | pgf90* | pgf95*) 54415eefee25Smacallan # Portland Group compilers (*not* the Pentium gcc compiler, 54425eefee25Smacallan # which looks to be a dead project) 54435eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54445eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 54455eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54465eefee25Smacallan ;; 54475eefee25Smacallan ccc*) 54485eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54495eefee25Smacallan # All Alpha code is PIC. 54505eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54515eefee25Smacallan ;; 545262ab96baSmrg *) 545362ab96baSmrg case `$CC -V 2>&1 | sed 5q` in 545462ab96baSmrg *Sun\ C*) 545562ab96baSmrg # Sun C 5.9 545662ab96baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 545762ab96baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 545862ab96baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 545962ab96baSmrg ;; 546062ab96baSmrg *Sun\ F*) 546162ab96baSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 546262ab96baSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 546362ab96baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 546462ab96baSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 546562ab96baSmrg ;; 546662ab96baSmrg esac 546762ab96baSmrg ;; 54685eefee25Smacallan esac 54695eefee25Smacallan ;; 54705eefee25Smacallan 54715eefee25Smacallan osf3* | osf4* | osf5*) 54725eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54735eefee25Smacallan # All OSF/1 code is PIC. 54745eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54755eefee25Smacallan ;; 54765eefee25Smacallan 547762ab96baSmrg rdos*) 547862ab96baSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 547962ab96baSmrg ;; 548062ab96baSmrg 54815eefee25Smacallan solaris*) 54825eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54835eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54845eefee25Smacallan case $cc_basename in 54855eefee25Smacallan f77* | f90* | f95*) 54865eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 54875eefee25Smacallan *) 54885eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 54895eefee25Smacallan esac 54905eefee25Smacallan ;; 54915eefee25Smacallan 54925eefee25Smacallan sunos4*) 54935eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 54945eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 54955eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54965eefee25Smacallan ;; 54975eefee25Smacallan 54985eefee25Smacallan sysv4 | sysv4.2uw2* | sysv4.3*) 54995eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55005eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55015eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55025eefee25Smacallan ;; 55035eefee25Smacallan 55045eefee25Smacallan sysv4*MP*) 55055eefee25Smacallan if test -d /usr/nec ;then 55065eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 55075eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55085eefee25Smacallan fi 55095eefee25Smacallan ;; 55105eefee25Smacallan 55115eefee25Smacallan sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 55125eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55135eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55145eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55155eefee25Smacallan ;; 55165eefee25Smacallan 55175eefee25Smacallan unicos*) 55185eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55195eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55205eefee25Smacallan ;; 55215eefee25Smacallan 55225eefee25Smacallan uts4*) 55235eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 55245eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55255eefee25Smacallan ;; 55265eefee25Smacallan 55275eefee25Smacallan *) 55285eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55295eefee25Smacallan ;; 55305eefee25Smacallan esac 55315eefee25Smacallan fi 55325eefee25Smacallan]) 55335eefee25SmacallanAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 55345eefee25Smacallan 55355eefee25Smacallan# 55365eefee25Smacallan# Check to make sure the PIC flag actually works. 55375eefee25Smacallan# 55385eefee25Smacallanif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 55395eefee25Smacallan AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 554062ab96baSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 55415eefee25Smacallan [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 55425eefee25Smacallan [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 55435eefee25Smacallan "" | " "*) ;; 55445eefee25Smacallan *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 55455eefee25Smacallan esac], 55465eefee25Smacallan [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 55475eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 55485eefee25Smacallanfi 55495eefee25Smacallancase $host_os in 55505eefee25Smacallan # For platforms which do not support PIC, -DPIC is meaningless: 55515eefee25Smacallan *djgpp*) 55525eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 55535eefee25Smacallan ;; 55545eefee25Smacallan *) 55555eefee25Smacallan _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 55565eefee25Smacallan ;; 55575eefee25Smacallanesac 55585eefee25Smacallan 55595eefee25Smacallan# 55605eefee25Smacallan# Check to make sure the static flag actually works. 55615eefee25Smacallan# 55625eefee25Smacallanwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 55635eefee25SmacallanAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 556462ab96baSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 55655eefee25Smacallan $lt_tmp_static_flag, 55665eefee25Smacallan [], 55675eefee25Smacallan [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 55685eefee25Smacallan]) 55695eefee25Smacallan 55705eefee25Smacallan 55715eefee25Smacallan# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 55725eefee25Smacallan# ------------------------------------ 55735eefee25Smacallan# See if the linker supports building shared libraries. 55745eefee25SmacallanAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 557562ab96baSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 557662ab96baSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 55775eefee25Smacallanifelse([$1],[CXX],[ 55785eefee25Smacallan _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 55795eefee25Smacallan case $host_os in 558062ab96baSmrg aix[[4-9]]*) 55815eefee25Smacallan # If we're using GNU nm, then we don't want the "-C" option. 55825eefee25Smacallan # -C means demangle to AIX nm, but means don't demangle with GNU nm 55835eefee25Smacallan if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 55845eefee25Smacallan _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' 55855eefee25Smacallan else 55865eefee25Smacallan _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' 55875eefee25Smacallan fi 55885eefee25Smacallan ;; 55895eefee25Smacallan pw32*) 55905eefee25Smacallan _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 55915eefee25Smacallan ;; 55925eefee25Smacallan cygwin* | mingw*) 559362ab96baSmrg _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' 559462ab96baSmrg ;; 559562ab96baSmrg linux* | k*bsd*-gnu) 559662ab96baSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=no 55975eefee25Smacallan ;; 55985eefee25Smacallan *) 55995eefee25Smacallan _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56005eefee25Smacallan ;; 56015eefee25Smacallan esac 560262ab96baSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 56035eefee25Smacallan],[ 56045eefee25Smacallan runpath_var= 56055eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)= 56065eefee25Smacallan _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 56075eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)= 56085eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 56095eefee25Smacallan _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 56105eefee25Smacallan _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 56115eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 56125eefee25Smacallan _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 56135eefee25Smacallan _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 56145eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 56155eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 56165eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 56175eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=no 56185eefee25Smacallan _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 56195eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 56205eefee25Smacallan _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 56215eefee25Smacallan _LT_AC_TAGVAR(hardcode_automatic, $1)=no 56225eefee25Smacallan _LT_AC_TAGVAR(module_cmds, $1)= 56235eefee25Smacallan _LT_AC_TAGVAR(module_expsym_cmds, $1)= 56245eefee25Smacallan _LT_AC_TAGVAR(always_export_symbols, $1)=no 56255eefee25Smacallan _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56265eefee25Smacallan # include_expsyms should be a list of space-separated symbols to be *always* 56275eefee25Smacallan # included in the symbol list 56285eefee25Smacallan _LT_AC_TAGVAR(include_expsyms, $1)= 56295eefee25Smacallan # exclude_expsyms can be an extended regexp of symbols to exclude 56305eefee25Smacallan # it will be wrapped by ` (' and `)$', so one must not match beginning or 56315eefee25Smacallan # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 56325eefee25Smacallan # as well as any symbol that contains `d'. 563362ab96baSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 56345eefee25Smacallan # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 56355eefee25Smacallan # platforms (ab)use it in PIC code, but their linkers get confused if 56365eefee25Smacallan # the symbol is explicitly referenced. Since portable code cannot 56375eefee25Smacallan # rely on this symbol name, it's probably fine to never include it in 56385eefee25Smacallan # preloaded symbol tables. 563962ab96baSmrg # Exclude shared library initialization/finalization symbols. 564062ab96baSmrgdnl Note also adjust exclude_expsyms for C++ above. 56415eefee25Smacallan extract_expsyms_cmds= 56425eefee25Smacallan # Just being paranoid about ensuring that cc_basename is set. 56435eefee25Smacallan _LT_CC_BASENAME([$compiler]) 56445eefee25Smacallan case $host_os in 56455eefee25Smacallan cygwin* | mingw* | pw32*) 56465eefee25Smacallan # FIXME: the MSVC++ port hasn't been tested in a loooong time 56475eefee25Smacallan # When not using gcc, we currently assume that we are using 56485eefee25Smacallan # Microsoft Visual C++. 56495eefee25Smacallan if test "$GCC" != yes; then 56505eefee25Smacallan with_gnu_ld=no 56515eefee25Smacallan fi 56525eefee25Smacallan ;; 56535eefee25Smacallan interix*) 56545eefee25Smacallan # we just hope/assume this is gcc and not c89 (= MSVC++) 56555eefee25Smacallan with_gnu_ld=yes 56565eefee25Smacallan ;; 56575eefee25Smacallan openbsd*) 56585eefee25Smacallan with_gnu_ld=no 56595eefee25Smacallan ;; 56605eefee25Smacallan esac 56615eefee25Smacallan 56625eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=yes 56635eefee25Smacallan if test "$with_gnu_ld" = yes; then 56645eefee25Smacallan # If archive_cmds runs LD, not CC, wlarc should be empty 56655eefee25Smacallan wlarc='${wl}' 56665eefee25Smacallan 56675eefee25Smacallan # Set some defaults for GNU ld with shared library support. These 56685eefee25Smacallan # are reset later if shared libraries are not supported. Putting them 56695eefee25Smacallan # here allows them to be overridden if necessary. 56705eefee25Smacallan runpath_var=LD_RUN_PATH 56715eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 56725eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 56735eefee25Smacallan # ancient GNU ld didn't support --whole-archive et. al. 56745eefee25Smacallan if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 56755eefee25Smacallan _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 56765eefee25Smacallan else 56775eefee25Smacallan _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 56785eefee25Smacallan fi 56795eefee25Smacallan supports_anon_versioning=no 56805eefee25Smacallan case `$LD -v 2>/dev/null` in 56815eefee25Smacallan *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 56825eefee25Smacallan *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 56835eefee25Smacallan *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 56845eefee25Smacallan *\ 2.11.*) ;; # other 2.11 versions 56855eefee25Smacallan *) supports_anon_versioning=yes ;; 56865eefee25Smacallan esac 56875eefee25Smacallan 56885eefee25Smacallan # See if GNU ld supports shared libraries. 56895eefee25Smacallan case $host_os in 569062ab96baSmrg aix[[3-9]]*) 56915eefee25Smacallan # On AIX/PPC, the GNU linker is very broken 56925eefee25Smacallan if test "$host_cpu" != ia64; then 56935eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 56945eefee25Smacallan cat <<EOF 1>&2 56955eefee25Smacallan 56965eefee25Smacallan*** Warning: the GNU linker, at least up to release 2.9.1, is reported 56975eefee25Smacallan*** to be unable to reliably create shared libraries on AIX. 56985eefee25Smacallan*** Therefore, libtool is disabling shared libraries support. If you 56995eefee25Smacallan*** really care for shared libraries, you may want to modify your PATH 57005eefee25Smacallan*** so that a non-GNU linker is found, and then restart. 57015eefee25Smacallan 57025eefee25SmacallanEOF 57035eefee25Smacallan fi 57045eefee25Smacallan ;; 57055eefee25Smacallan 57065eefee25Smacallan amigaos*) 57075eefee25Smacallan _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)' 57085eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57095eefee25Smacallan _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 57105eefee25Smacallan 57115eefee25Smacallan # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 57125eefee25Smacallan # that the semantics of dynamic libraries on AmigaOS, at least up 57135eefee25Smacallan # to version 4, is to share data among multiple programs linked 57145eefee25Smacallan # with the same dynamic library. Since this doesn't match the 57155eefee25Smacallan # behavior of shared libraries on other platforms, we can't use 57165eefee25Smacallan # them. 57175eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 57185eefee25Smacallan ;; 57195eefee25Smacallan 57205eefee25Smacallan beos*) 57215eefee25Smacallan if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 57225eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 57235eefee25Smacallan # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 57245eefee25Smacallan # support --undefined. This deserves some investigation. FIXME 57255eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 57265eefee25Smacallan else 57275eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 57285eefee25Smacallan fi 57295eefee25Smacallan ;; 57305eefee25Smacallan 57315eefee25Smacallan cygwin* | mingw* | pw32*) 57325eefee25Smacallan # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 57335eefee25Smacallan # as there is no search path for DLLs. 57345eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57355eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 57365eefee25Smacallan _LT_AC_TAGVAR(always_export_symbols, $1)=no 57375eefee25Smacallan _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 573862ab96baSmrg _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' 57395eefee25Smacallan 57405eefee25Smacallan if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 57415eefee25Smacallan _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' 57425eefee25Smacallan # If the export-symbols file already is a .def file (1st line 57435eefee25Smacallan # is EXPORTS), use it as is; otherwise, prepend... 57445eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 57455eefee25Smacallan cp $export_symbols $output_objdir/$soname.def; 57465eefee25Smacallan else 57475eefee25Smacallan echo EXPORTS > $output_objdir/$soname.def; 57485eefee25Smacallan cat $export_symbols >> $output_objdir/$soname.def; 57495eefee25Smacallan fi~ 57505eefee25Smacallan $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 57515eefee25Smacallan else 57525eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 57535eefee25Smacallan fi 57545eefee25Smacallan ;; 57555eefee25Smacallan 575662ab96baSmrg interix[[3-9]]*) 57575eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=no 57585eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 57595eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 57605eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 57615eefee25Smacallan # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 57625eefee25Smacallan # Instead, shared libraries are loaded at an image base (0x10000000 by 57635eefee25Smacallan # default) and relocated if they conflict, which is a slow very memory 57645eefee25Smacallan # consuming and fragmenting process. To avoid this, we pick a random, 57655eefee25Smacallan # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 57665eefee25Smacallan # time. Moving up from 0x10000000 also allows more sbrk(2) space. 57675eefee25Smacallan _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' 57685eefee25Smacallan _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' 57695eefee25Smacallan ;; 57705eefee25Smacallan 577162ab96baSmrg gnu* | linux* | k*bsd*-gnu) 57725eefee25Smacallan if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 57735eefee25Smacallan tmp_addflag= 57745eefee25Smacallan case $cc_basename,$host_cpu in 57755eefee25Smacallan pgcc*) # Portland Group C compiler 57765eefee25Smacallan _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' 57775eefee25Smacallan tmp_addflag=' $pic_flag' 57785eefee25Smacallan ;; 57795eefee25Smacallan pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 57805eefee25Smacallan _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' 57815eefee25Smacallan tmp_addflag=' $pic_flag -Mnomain' ;; 57825eefee25Smacallan ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 57835eefee25Smacallan tmp_addflag=' -i_dynamic' ;; 57845eefee25Smacallan efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 57855eefee25Smacallan tmp_addflag=' -i_dynamic -nofor_main' ;; 57865eefee25Smacallan ifc* | ifort*) # Intel Fortran compiler 57875eefee25Smacallan tmp_addflag=' -nofor_main' ;; 57885eefee25Smacallan esac 578962ab96baSmrg case `$CC -V 2>&1 | sed 5q` in 579062ab96baSmrg *Sun\ C*) # Sun C 5.9 579162ab96baSmrg _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' 579262ab96baSmrg tmp_sharedflag='-G' ;; 579362ab96baSmrg *Sun\ F*) # Sun Fortran 8.3 579462ab96baSmrg tmp_sharedflag='-G' ;; 579562ab96baSmrg *) 579662ab96baSmrg tmp_sharedflag='-shared' ;; 579762ab96baSmrg esac 579862ab96baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 57995eefee25Smacallan 58005eefee25Smacallan if test $supports_anon_versioning = yes; then 58015eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 58025eefee25Smacallan cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 58035eefee25Smacallan $echo "local: *; };" >> $output_objdir/$libname.ver~ 580462ab96baSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 58055eefee25Smacallan fi 580662ab96baSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=no 58075eefee25Smacallan else 58085eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 58095eefee25Smacallan fi 58105eefee25Smacallan ;; 58115eefee25Smacallan 581262ab96baSmrg netbsd* | netbsdelf*-gnu) 58135eefee25Smacallan if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 58145eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 58155eefee25Smacallan wlarc= 58165eefee25Smacallan else 58175eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58185eefee25Smacallan _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' 58195eefee25Smacallan fi 58205eefee25Smacallan ;; 58215eefee25Smacallan 58225eefee25Smacallan solaris*) 58235eefee25Smacallan if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 58245eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 58255eefee25Smacallan cat <<EOF 1>&2 58265eefee25Smacallan 58275eefee25Smacallan*** Warning: The releases 2.8.* of the GNU linker cannot reliably 58285eefee25Smacallan*** create shared libraries on Solaris systems. Therefore, libtool 58295eefee25Smacallan*** is disabling shared libraries support. We urge you to upgrade GNU 58305eefee25Smacallan*** binutils to release 2.9.1 or newer. Another option is to modify 58315eefee25Smacallan*** your PATH or compiler configuration so that the native linker is 58325eefee25Smacallan*** used, and then restart. 58335eefee25Smacallan 58345eefee25SmacallanEOF 58355eefee25Smacallan elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 58365eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58375eefee25Smacallan _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' 58385eefee25Smacallan else 58395eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 58405eefee25Smacallan fi 58415eefee25Smacallan ;; 58425eefee25Smacallan 58435eefee25Smacallan sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 58445eefee25Smacallan case `$LD -v 2>&1` in 584562ab96baSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 58465eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 58475eefee25Smacallan cat <<_LT_EOF 1>&2 58485eefee25Smacallan 58495eefee25Smacallan*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 58505eefee25Smacallan*** reliably create shared libraries on SCO systems. Therefore, libtool 58515eefee25Smacallan*** is disabling shared libraries support. We urge you to upgrade GNU 58525eefee25Smacallan*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 58535eefee25Smacallan*** your PATH or compiler configuration so that the native linker is 58545eefee25Smacallan*** used, and then restart. 58555eefee25Smacallan 58565eefee25Smacallan_LT_EOF 58575eefee25Smacallan ;; 58585eefee25Smacallan *) 58595eefee25Smacallan if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 58605eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 58615eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 58625eefee25Smacallan _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' 58635eefee25Smacallan else 58645eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 58655eefee25Smacallan fi 58665eefee25Smacallan ;; 58675eefee25Smacallan esac 58685eefee25Smacallan ;; 58695eefee25Smacallan 58705eefee25Smacallan sunos4*) 58715eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 58725eefee25Smacallan wlarc= 58735eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes 58745eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 58755eefee25Smacallan ;; 58765eefee25Smacallan 58775eefee25Smacallan *) 58785eefee25Smacallan if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 58795eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58805eefee25Smacallan _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' 58815eefee25Smacallan else 58825eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 58835eefee25Smacallan fi 58845eefee25Smacallan ;; 58855eefee25Smacallan esac 58865eefee25Smacallan 58875eefee25Smacallan if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 58885eefee25Smacallan runpath_var= 58895eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 58905eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 58915eefee25Smacallan _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 58925eefee25Smacallan fi 58935eefee25Smacallan else 58945eefee25Smacallan # PORTME fill in a description of your system's linker (not GNU ld) 58955eefee25Smacallan case $host_os in 58965eefee25Smacallan aix3*) 58975eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 58985eefee25Smacallan _LT_AC_TAGVAR(always_export_symbols, $1)=yes 58995eefee25Smacallan _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' 59005eefee25Smacallan # Note: this linker hardcodes the directories in LIBPATH if there 59015eefee25Smacallan # are no directories specified by -L. 59025eefee25Smacallan _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 59035eefee25Smacallan if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 59045eefee25Smacallan # Neither direct hardcoding nor static linking is supported with a 59055eefee25Smacallan # broken collect2. 59065eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 59075eefee25Smacallan fi 59085eefee25Smacallan ;; 59095eefee25Smacallan 591062ab96baSmrg aix[[4-9]]*) 59115eefee25Smacallan if test "$host_cpu" = ia64; then 59125eefee25Smacallan # On IA64, the linker does run time linking by default, so we don't 59135eefee25Smacallan # have to do anything special. 59145eefee25Smacallan aix_use_runtimelinking=no 59155eefee25Smacallan exp_sym_flag='-Bexport' 59165eefee25Smacallan no_entry_flag="" 59175eefee25Smacallan else 59185eefee25Smacallan # If we're using GNU nm, then we don't want the "-C" option. 59195eefee25Smacallan # -C means demangle to AIX nm, but means don't demangle with GNU nm 59205eefee25Smacallan if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 59215eefee25Smacallan _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' 59225eefee25Smacallan else 59235eefee25Smacallan _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' 59245eefee25Smacallan fi 59255eefee25Smacallan aix_use_runtimelinking=no 59265eefee25Smacallan 59275eefee25Smacallan # Test if we are trying to use run time linking or normal 59285eefee25Smacallan # AIX style linking. If -brtl is somewhere in LDFLAGS, we 59295eefee25Smacallan # need to do runtime linking. 593062ab96baSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 59315eefee25Smacallan for ld_flag in $LDFLAGS; do 59325eefee25Smacallan if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 59335eefee25Smacallan aix_use_runtimelinking=yes 59345eefee25Smacallan break 59355eefee25Smacallan fi 59365eefee25Smacallan done 59375eefee25Smacallan ;; 59385eefee25Smacallan esac 59395eefee25Smacallan 59405eefee25Smacallan exp_sym_flag='-bexport' 59415eefee25Smacallan no_entry_flag='-bnoentry' 59425eefee25Smacallan fi 59435eefee25Smacallan 59445eefee25Smacallan # When large executables or shared objects are built, AIX ld can 59455eefee25Smacallan # have problems creating the table of contents. If linking a library 59465eefee25Smacallan # or program results in "error TOC overflow" add -mminimal-toc to 59475eefee25Smacallan # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 59485eefee25Smacallan # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 59495eefee25Smacallan 59505eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='' 59515eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes 59525eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 59535eefee25Smacallan _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 59545eefee25Smacallan 59555eefee25Smacallan if test "$GCC" = yes; then 59565eefee25Smacallan case $host_os in aix4.[[012]]|aix4.[[012]].*) 59575eefee25Smacallan # We only want to do this on AIX 4.2 and lower, the check 59585eefee25Smacallan # below for broken collect2 doesn't work under 4.3+ 59595eefee25Smacallan collect2name=`${CC} -print-prog-name=collect2` 59605eefee25Smacallan if test -f "$collect2name" && \ 59615eefee25Smacallan strings "$collect2name" | grep resolve_lib_name >/dev/null 59625eefee25Smacallan then 59635eefee25Smacallan # We have reworked collect2 596462ab96baSmrg : 59655eefee25Smacallan else 59665eefee25Smacallan # We have old collect2 59675eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 59685eefee25Smacallan # It fails to find uninstalled libraries when the uninstalled 59695eefee25Smacallan # path is not listed in the libpath. Setting hardcode_minus_L 59705eefee25Smacallan # to unsupported forces relinking 59715eefee25Smacallan _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 59725eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59735eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 59745eefee25Smacallan fi 59755eefee25Smacallan ;; 59765eefee25Smacallan esac 59775eefee25Smacallan shared_flag='-shared' 59785eefee25Smacallan if test "$aix_use_runtimelinking" = yes; then 59795eefee25Smacallan shared_flag="$shared_flag "'${wl}-G' 59805eefee25Smacallan fi 59815eefee25Smacallan else 59825eefee25Smacallan # not using gcc 59835eefee25Smacallan if test "$host_cpu" = ia64; then 59845eefee25Smacallan # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 59855eefee25Smacallan # chokes on -Wl,-G. The following line is correct: 59865eefee25Smacallan shared_flag='-G' 59875eefee25Smacallan else 59885eefee25Smacallan if test "$aix_use_runtimelinking" = yes; then 59895eefee25Smacallan shared_flag='${wl}-G' 59905eefee25Smacallan else 59915eefee25Smacallan shared_flag='${wl}-bM:SRE' 59925eefee25Smacallan fi 59935eefee25Smacallan fi 59945eefee25Smacallan fi 59955eefee25Smacallan 59965eefee25Smacallan # It seems that -bexpall does not export symbols beginning with 59975eefee25Smacallan # underscore (_), so it is better to generate a list of symbols to export. 59985eefee25Smacallan _LT_AC_TAGVAR(always_export_symbols, $1)=yes 59995eefee25Smacallan if test "$aix_use_runtimelinking" = yes; then 60005eefee25Smacallan # Warning - without using the other runtime loading flags (-brtl), 60015eefee25Smacallan # -berok will link without error, but may produce a broken library. 60025eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 60035eefee25Smacallan # Determine the default libpath from the value encoded in an empty executable. 60045eefee25Smacallan _LT_AC_SYS_LIBPATH_AIX 60055eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60065eefee25Smacallan _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" 60075eefee25Smacallan else 60085eefee25Smacallan if test "$host_cpu" = ia64; then 60095eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 60105eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 60115eefee25Smacallan _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" 60125eefee25Smacallan else 60135eefee25Smacallan # Determine the default libpath from the value encoded in an empty executable. 60145eefee25Smacallan _LT_AC_SYS_LIBPATH_AIX 60155eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60165eefee25Smacallan # Warning - without using the other run time loading flags, 60175eefee25Smacallan # -berok will link without error, but may produce a broken library. 60185eefee25Smacallan _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 60195eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 60205eefee25Smacallan # Exported symbols can be pulled into shared objects from archives 60215eefee25Smacallan _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 60225eefee25Smacallan _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 60235eefee25Smacallan # This is similar to how AIX traditionally builds its shared libraries. 60245eefee25Smacallan _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' 60255eefee25Smacallan fi 60265eefee25Smacallan fi 60275eefee25Smacallan ;; 60285eefee25Smacallan 60295eefee25Smacallan amigaos*) 60305eefee25Smacallan _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)' 60315eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60325eefee25Smacallan _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 60335eefee25Smacallan # see comment about different semantics on the GNU ld section 60345eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 60355eefee25Smacallan ;; 60365eefee25Smacallan 60375eefee25Smacallan bsdi[[45]]*) 60385eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 60395eefee25Smacallan ;; 60405eefee25Smacallan 60415eefee25Smacallan cygwin* | mingw* | pw32*) 60425eefee25Smacallan # When not using gcc, we currently assume that we are using 60435eefee25Smacallan # Microsoft Visual C++. 60445eefee25Smacallan # hardcode_libdir_flag_spec is actually meaningless, as there is 60455eefee25Smacallan # no search path for DLLs. 60465eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 60475eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 60485eefee25Smacallan # Tell ltmain to make .lib files, not .a files. 60495eefee25Smacallan libext=lib 60505eefee25Smacallan # Tell ltmain to make .dll files, not .so files. 60515eefee25Smacallan shrext_cmds=".dll" 60525eefee25Smacallan # FIXME: Setting linknames here is a bad hack. 60535eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 60545eefee25Smacallan # The linker will automatically build a .lib file if we build a DLL. 60555eefee25Smacallan _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 60565eefee25Smacallan # FIXME: Should let the user specify the lib program. 605762ab96baSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 60585eefee25Smacallan _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 60595eefee25Smacallan _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 60605eefee25Smacallan ;; 60615eefee25Smacallan 60625eefee25Smacallan darwin* | rhapsody*) 60635eefee25Smacallan case $host_os in 60645eefee25Smacallan rhapsody* | darwin1.[[012]]) 60655eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 60665eefee25Smacallan ;; 60675eefee25Smacallan *) # Darwin 1.3 on 60685eefee25Smacallan if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 60695eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 60705eefee25Smacallan else 60715eefee25Smacallan case ${MACOSX_DEPLOYMENT_TARGET} in 60725eefee25Smacallan 10.[[012]]) 60735eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 60745eefee25Smacallan ;; 60755eefee25Smacallan 10.*) 60765eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 60775eefee25Smacallan ;; 60785eefee25Smacallan esac 60795eefee25Smacallan fi 60805eefee25Smacallan ;; 60815eefee25Smacallan esac 60825eefee25Smacallan _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 60835eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=no 60845eefee25Smacallan _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 60855eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 60865eefee25Smacallan _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 60875eefee25Smacallan _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 60885eefee25Smacallan if test "$GCC" = yes ; then 60895eefee25Smacallan output_verbose_link_cmd='echo' 609062ab96baSmrg _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" 609162ab96baSmrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 609262ab96baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" 609362ab96baSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" 60945eefee25Smacallan else 60955eefee25Smacallan case $cc_basename in 60965eefee25Smacallan xlc*) 60975eefee25Smacallan output_verbose_link_cmd='echo' 609862ab96baSmrg _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' 60995eefee25Smacallan _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 61005eefee25Smacallan # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 610162ab96baSmrg _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}' 61025eefee25Smacallan _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}' 61035eefee25Smacallan ;; 61045eefee25Smacallan *) 61055eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 61065eefee25Smacallan ;; 61075eefee25Smacallan esac 61085eefee25Smacallan fi 61095eefee25Smacallan ;; 61105eefee25Smacallan 61115eefee25Smacallan dgux*) 61125eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 61135eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61145eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61155eefee25Smacallan ;; 61165eefee25Smacallan 61175eefee25Smacallan freebsd1*) 61185eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 61195eefee25Smacallan ;; 61205eefee25Smacallan 61215eefee25Smacallan # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 61225eefee25Smacallan # support. Future versions do this automatically, but an explicit c++rt0.o 61235eefee25Smacallan # does not break anything, and helps significantly (at the cost of a little 61245eefee25Smacallan # extra space). 61255eefee25Smacallan freebsd2.2*) 61265eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 61275eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 61285eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61295eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61305eefee25Smacallan ;; 61315eefee25Smacallan 61325eefee25Smacallan # Unfortunately, older versions of FreeBSD 2 do not have this feature. 61335eefee25Smacallan freebsd2*) 61345eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 61355eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61365eefee25Smacallan _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 61375eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61385eefee25Smacallan ;; 61395eefee25Smacallan 61405eefee25Smacallan # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 614162ab96baSmrg freebsd* | dragonfly*) 61425eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 61435eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 61445eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61455eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61465eefee25Smacallan ;; 61475eefee25Smacallan 61485eefee25Smacallan hpux9*) 61495eefee25Smacallan if test "$GCC" = yes; then 61505eefee25Smacallan _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' 61515eefee25Smacallan else 61525eefee25Smacallan _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' 61535eefee25Smacallan fi 61545eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 61555eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 61565eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61575eefee25Smacallan 61585eefee25Smacallan # hardcode_minus_L: Not really in the search PATH, 61595eefee25Smacallan # but as the default location of the library. 61605eefee25Smacallan _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 61615eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 61625eefee25Smacallan ;; 61635eefee25Smacallan 61645eefee25Smacallan hpux10*) 61655eefee25Smacallan if test "$GCC" = yes -a "$with_gnu_ld" = no; then 61665eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 61675eefee25Smacallan else 61685eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 61695eefee25Smacallan fi 61705eefee25Smacallan if test "$with_gnu_ld" = no; then 61715eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 61725eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 61735eefee25Smacallan 61745eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61755eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 61765eefee25Smacallan 61775eefee25Smacallan # hardcode_minus_L: Not really in the search PATH, 61785eefee25Smacallan # but as the default location of the library. 61795eefee25Smacallan _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 61805eefee25Smacallan fi 61815eefee25Smacallan ;; 61825eefee25Smacallan 61835eefee25Smacallan hpux11*) 61845eefee25Smacallan if test "$GCC" = yes -a "$with_gnu_ld" = no; then 61855eefee25Smacallan case $host_cpu in 61865eefee25Smacallan hppa*64*) 61875eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 61885eefee25Smacallan ;; 61895eefee25Smacallan ia64*) 61905eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 61915eefee25Smacallan ;; 61925eefee25Smacallan *) 61935eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 61945eefee25Smacallan ;; 61955eefee25Smacallan esac 61965eefee25Smacallan else 61975eefee25Smacallan case $host_cpu in 61985eefee25Smacallan hppa*64*) 61995eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 62005eefee25Smacallan ;; 62015eefee25Smacallan ia64*) 62025eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 62035eefee25Smacallan ;; 62045eefee25Smacallan *) 62055eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 62065eefee25Smacallan ;; 62075eefee25Smacallan esac 62085eefee25Smacallan fi 62095eefee25Smacallan if test "$with_gnu_ld" = no; then 62105eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62115eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62125eefee25Smacallan 62135eefee25Smacallan case $host_cpu in 62145eefee25Smacallan hppa*64*|ia64*) 62155eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 62165eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=no 62175eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62185eefee25Smacallan ;; 62195eefee25Smacallan *) 62205eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62215eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62225eefee25Smacallan 62235eefee25Smacallan # hardcode_minus_L: Not really in the search PATH, 62245eefee25Smacallan # but as the default location of the library. 62255eefee25Smacallan _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 62265eefee25Smacallan ;; 62275eefee25Smacallan esac 62285eefee25Smacallan fi 62295eefee25Smacallan ;; 62305eefee25Smacallan 62315eefee25Smacallan irix5* | irix6* | nonstopux*) 62325eefee25Smacallan if test "$GCC" = yes; then 62335eefee25Smacallan _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' 62345eefee25Smacallan else 62355eefee25Smacallan _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' 62365eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 62375eefee25Smacallan fi 62385eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 62395eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62405eefee25Smacallan _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 62415eefee25Smacallan ;; 62425eefee25Smacallan 624362ab96baSmrg netbsd* | netbsdelf*-gnu) 62445eefee25Smacallan if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 62455eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 62465eefee25Smacallan else 62475eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 62485eefee25Smacallan fi 62495eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62505eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62515eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62525eefee25Smacallan ;; 62535eefee25Smacallan 62545eefee25Smacallan newsos6) 62555eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 62565eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62575eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 62585eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62595eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62605eefee25Smacallan ;; 62615eefee25Smacallan 62625eefee25Smacallan openbsd*) 626362ab96baSmrg if test -f /usr/libexec/ld.so; then 626462ab96baSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 626562ab96baSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 626662ab96baSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 626762ab96baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 626862ab96baSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 626962ab96baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 627062ab96baSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 627162ab96baSmrg else 627262ab96baSmrg case $host_os in 627362ab96baSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 627462ab96baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 627562ab96baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 627662ab96baSmrg ;; 627762ab96baSmrg *) 627862ab96baSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 627962ab96baSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 628062ab96baSmrg ;; 628162ab96baSmrg esac 628262ab96baSmrg fi 62835eefee25Smacallan else 628462ab96baSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 62855eefee25Smacallan fi 62865eefee25Smacallan ;; 62875eefee25Smacallan 62885eefee25Smacallan os2*) 62895eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62905eefee25Smacallan _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 62915eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 62925eefee25Smacallan _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' 62935eefee25Smacallan _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 62945eefee25Smacallan ;; 62955eefee25Smacallan 62965eefee25Smacallan osf3*) 62975eefee25Smacallan if test "$GCC" = yes; then 62985eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 62995eefee25Smacallan _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' 63005eefee25Smacallan else 63015eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 63025eefee25Smacallan _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' 63035eefee25Smacallan fi 63045eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 63055eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 63065eefee25Smacallan ;; 63075eefee25Smacallan 63085eefee25Smacallan osf4* | osf5*) # as osf3* with the addition of -msym flag 63095eefee25Smacallan if test "$GCC" = yes; then 63105eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 63115eefee25Smacallan _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' 63125eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 63135eefee25Smacallan else 63145eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 63155eefee25Smacallan _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' 63165eefee25Smacallan _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~ 63175eefee25Smacallan $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' 63185eefee25Smacallan 63195eefee25Smacallan # Both c and cxx compiler support -rpath directly 63205eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 63215eefee25Smacallan fi 63225eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 63235eefee25Smacallan ;; 63245eefee25Smacallan 63255eefee25Smacallan solaris*) 63265eefee25Smacallan _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 63275eefee25Smacallan if test "$GCC" = yes; then 63285eefee25Smacallan wlarc='${wl}' 63295eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63305eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 63315eefee25Smacallan $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 63325eefee25Smacallan else 63335eefee25Smacallan wlarc='' 63345eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 63355eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 63365eefee25Smacallan $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 63375eefee25Smacallan fi 63385eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63395eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63405eefee25Smacallan case $host_os in 63415eefee25Smacallan solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 63425eefee25Smacallan *) 634362ab96baSmrg # The compiler driver will combine and reorder linker options, 634462ab96baSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 634562ab96baSmrg # but is careful enough not to reorder. 63465eefee25Smacallan # Supported since Solaris 2.6 (maybe 2.5.1?) 634762ab96baSmrg if test "$GCC" = yes; then 634862ab96baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 634962ab96baSmrg else 635062ab96baSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 635162ab96baSmrg fi 635262ab96baSmrg ;; 63535eefee25Smacallan esac 63545eefee25Smacallan _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 63555eefee25Smacallan ;; 63565eefee25Smacallan 63575eefee25Smacallan sunos4*) 63585eefee25Smacallan if test "x$host_vendor" = xsequent; then 63595eefee25Smacallan # Use $CC to link under sequent, because it throws in some extra .o 63605eefee25Smacallan # files that make .init and .fini sections work. 63615eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 63625eefee25Smacallan else 63635eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 63645eefee25Smacallan fi 63655eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 63665eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes 63675eefee25Smacallan _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 63685eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63695eefee25Smacallan ;; 63705eefee25Smacallan 63715eefee25Smacallan sysv4) 63725eefee25Smacallan case $host_vendor in 63735eefee25Smacallan sni) 63745eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63755eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 63765eefee25Smacallan ;; 63775eefee25Smacallan siemens) 63785eefee25Smacallan ## LD is ld it makes a PLAMLIB 63795eefee25Smacallan ## CC just makes a GrossModule. 63805eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 63815eefee25Smacallan _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 63825eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=no 63835eefee25Smacallan ;; 63845eefee25Smacallan motorola) 63855eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63865eefee25Smacallan _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 63875eefee25Smacallan ;; 63885eefee25Smacallan esac 63895eefee25Smacallan runpath_var='LD_RUN_PATH' 63905eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63915eefee25Smacallan ;; 63925eefee25Smacallan 63935eefee25Smacallan sysv4.3*) 63945eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63955eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63965eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 63975eefee25Smacallan ;; 63985eefee25Smacallan 63995eefee25Smacallan sysv4*MP*) 64005eefee25Smacallan if test -d /usr/nec; then 64015eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 64025eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64035eefee25Smacallan runpath_var=LD_RUN_PATH 64045eefee25Smacallan hardcode_runpath_var=yes 64055eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=yes 64065eefee25Smacallan fi 64075eefee25Smacallan ;; 64085eefee25Smacallan 640962ab96baSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 64105eefee25Smacallan _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 64115eefee25Smacallan _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 64125eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64135eefee25Smacallan runpath_var='LD_RUN_PATH' 64145eefee25Smacallan 64155eefee25Smacallan if test "$GCC" = yes; then 64165eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64175eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64185eefee25Smacallan else 64195eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64205eefee25Smacallan _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64215eefee25Smacallan fi 64225eefee25Smacallan ;; 64235eefee25Smacallan 64245eefee25Smacallan sysv5* | sco3.2v5* | sco5v6*) 64255eefee25Smacallan # Note: We can NOT use -z defs as we might desire, because we do not 64265eefee25Smacallan # link with -lc, and that would cause any symbols used from libc to 64275eefee25Smacallan # always be unresolved, which means just about no library would 64285eefee25Smacallan # ever link correctly. If we're not using GNU ld we use -z text 64295eefee25Smacallan # though, which does catch some bad symbols but isn't as heavy-handed 64305eefee25Smacallan # as -z defs. 64315eefee25Smacallan _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 64325eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 64335eefee25Smacallan _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 64345eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64355eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 64365eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 64375eefee25Smacallan _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 64385eefee25Smacallan _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 64395eefee25Smacallan runpath_var='LD_RUN_PATH' 64405eefee25Smacallan 64415eefee25Smacallan if test "$GCC" = yes; then 64425eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 64435eefee25Smacallan _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' 64445eefee25Smacallan else 64455eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 64465eefee25Smacallan _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' 64475eefee25Smacallan fi 64485eefee25Smacallan ;; 64495eefee25Smacallan 64505eefee25Smacallan uts4*) 64515eefee25Smacallan _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 64525eefee25Smacallan _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 64535eefee25Smacallan _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64545eefee25Smacallan ;; 64555eefee25Smacallan 64565eefee25Smacallan *) 64575eefee25Smacallan _LT_AC_TAGVAR(ld_shlibs, $1)=no 64585eefee25Smacallan ;; 64595eefee25Smacallan esac 64605eefee25Smacallan fi 64615eefee25Smacallan]) 64625eefee25SmacallanAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 64635eefee25Smacallantest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 64645eefee25Smacallan 64655eefee25Smacallan# 64665eefee25Smacallan# Do we need to explicitly link libc? 64675eefee25Smacallan# 64685eefee25Smacallancase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 64695eefee25Smacallanx|xyes) 64705eefee25Smacallan # Assume -lc should be added 64715eefee25Smacallan _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 64725eefee25Smacallan 64735eefee25Smacallan if test "$enable_shared" = yes && test "$GCC" = yes; then 64745eefee25Smacallan case $_LT_AC_TAGVAR(archive_cmds, $1) in 64755eefee25Smacallan *'~'*) 64765eefee25Smacallan # FIXME: we may have to deal with multi-command sequences. 64775eefee25Smacallan ;; 64785eefee25Smacallan '$CC '*) 64795eefee25Smacallan # Test whether the compiler implicitly links with -lc since on some 64805eefee25Smacallan # systems, -lgcc has to come before -lc. If gcc already passes -lc 64815eefee25Smacallan # to ld, don't add -lc before -lgcc. 64825eefee25Smacallan AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 64835eefee25Smacallan $rm conftest* 648462ab96baSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 64855eefee25Smacallan 64865eefee25Smacallan if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 64875eefee25Smacallan soname=conftest 64885eefee25Smacallan lib=conftest 64895eefee25Smacallan libobjs=conftest.$ac_objext 64905eefee25Smacallan deplibs= 64915eefee25Smacallan wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 64925eefee25Smacallan pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 64935eefee25Smacallan compiler_flags=-v 64945eefee25Smacallan linker_flags=-v 64955eefee25Smacallan verstring= 64965eefee25Smacallan output_objdir=. 64975eefee25Smacallan libname=conftest 64985eefee25Smacallan lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 64995eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)= 65005eefee25Smacallan if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 65015eefee25Smacallan then 65025eefee25Smacallan _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 65035eefee25Smacallan else 65045eefee25Smacallan _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 65055eefee25Smacallan fi 65065eefee25Smacallan _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 65075eefee25Smacallan else 65085eefee25Smacallan cat conftest.err 1>&5 65095eefee25Smacallan fi 65105eefee25Smacallan $rm conftest* 65115eefee25Smacallan AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 65125eefee25Smacallan ;; 65135eefee25Smacallan esac 65145eefee25Smacallan fi 65155eefee25Smacallan ;; 65165eefee25Smacallanesac 65175eefee25Smacallan])# AC_LIBTOOL_PROG_LD_SHLIBS 65185eefee25Smacallan 65195eefee25Smacallan 65205eefee25Smacallan# _LT_AC_FILE_LTDLL_C 65215eefee25Smacallan# ------------------- 65225eefee25Smacallan# Be careful that the start marker always follows a newline. 65235eefee25SmacallanAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 65245eefee25Smacallan# /* ltdll.c starts here */ 65255eefee25Smacallan# #define WIN32_LEAN_AND_MEAN 65265eefee25Smacallan# #include <windows.h> 65275eefee25Smacallan# #undef WIN32_LEAN_AND_MEAN 65285eefee25Smacallan# #include <stdio.h> 65295eefee25Smacallan# 65305eefee25Smacallan# #ifndef __CYGWIN__ 65315eefee25Smacallan# # ifdef __CYGWIN32__ 65325eefee25Smacallan# # define __CYGWIN__ __CYGWIN32__ 65335eefee25Smacallan# # endif 65345eefee25Smacallan# #endif 65355eefee25Smacallan# 65365eefee25Smacallan# #ifdef __cplusplus 65375eefee25Smacallan# extern "C" { 65385eefee25Smacallan# #endif 65395eefee25Smacallan# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 65405eefee25Smacallan# #ifdef __cplusplus 65415eefee25Smacallan# } 65425eefee25Smacallan# #endif 65435eefee25Smacallan# 65445eefee25Smacallan# #ifdef __CYGWIN__ 65455eefee25Smacallan# #include <cygwin/cygwin_dll.h> 65465eefee25Smacallan# DECLARE_CYGWIN_DLL( DllMain ); 65475eefee25Smacallan# #endif 65485eefee25Smacallan# HINSTANCE __hDllInstance_base; 65495eefee25Smacallan# 65505eefee25Smacallan# BOOL APIENTRY 65515eefee25Smacallan# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 65525eefee25Smacallan# { 65535eefee25Smacallan# __hDllInstance_base = hInst; 65545eefee25Smacallan# return TRUE; 65555eefee25Smacallan# } 65565eefee25Smacallan# /* ltdll.c ends here */ 65575eefee25Smacallan])# _LT_AC_FILE_LTDLL_C 65585eefee25Smacallan 65595eefee25Smacallan 65605eefee25Smacallan# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 65615eefee25Smacallan# --------------------------------- 65625eefee25SmacallanAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 65635eefee25Smacallan 65645eefee25Smacallan 65655eefee25Smacallan# old names 65665eefee25SmacallanAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 65675eefee25SmacallanAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 65685eefee25SmacallanAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 65695eefee25SmacallanAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 65705eefee25SmacallanAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 65715eefee25SmacallanAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 65725eefee25SmacallanAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 65735eefee25Smacallan 65745eefee25Smacallan# This is just to silence aclocal about the macro not being used 65755eefee25Smacallanifelse([AC_DISABLE_FAST_INSTALL]) 65765eefee25Smacallan 65775eefee25SmacallanAC_DEFUN([LT_AC_PROG_GCJ], 65785eefee25Smacallan[AC_CHECK_TOOL(GCJ, gcj, no) 65795eefee25Smacallan test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 65805eefee25Smacallan AC_SUBST(GCJFLAGS) 65815eefee25Smacallan]) 65825eefee25Smacallan 65835eefee25SmacallanAC_DEFUN([LT_AC_PROG_RC], 65845eefee25Smacallan[AC_CHECK_TOOL(RC, windres, no) 65855eefee25Smacallan]) 65865eefee25Smacallan 658762ab96baSmrg 658862ab96baSmrg# Cheap backport of AS_EXECUTABLE_P and required macros 658962ab96baSmrg# from Autoconf 2.59; we should not use $as_executable_p directly. 659062ab96baSmrg 659162ab96baSmrg# _AS_TEST_PREPARE 659262ab96baSmrg# ---------------- 659362ab96baSmrgm4_ifndef([_AS_TEST_PREPARE], 659462ab96baSmrg[m4_defun([_AS_TEST_PREPARE], 659562ab96baSmrg[if test -x / >/dev/null 2>&1; then 659662ab96baSmrg as_executable_p='test -x' 659762ab96baSmrgelse 659862ab96baSmrg as_executable_p='test -f' 659962ab96baSmrgfi 660062ab96baSmrg])])# _AS_TEST_PREPARE 660162ab96baSmrg 660262ab96baSmrg# AS_EXECUTABLE_P 660362ab96baSmrg# --------------- 660462ab96baSmrg# Check whether a file is executable. 660562ab96baSmrgm4_ifndef([AS_EXECUTABLE_P], 660662ab96baSmrg[m4_defun([AS_EXECUTABLE_P], 660762ab96baSmrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl 660862ab96baSmrg$as_executable_p $1[]dnl 660962ab96baSmrg])])# AS_EXECUTABLE_P 661062ab96baSmrg 66115eefee25Smacallan# NOTE: This macro has been submitted for inclusion into # 66125eefee25Smacallan# GNU Autoconf as AC_PROG_SED. When it is available in # 66135eefee25Smacallan# a released version of Autoconf we should remove this # 66145eefee25Smacallan# macro and use it instead. # 66155eefee25Smacallan# LT_AC_PROG_SED 66165eefee25Smacallan# -------------- 66175eefee25Smacallan# Check for a fully-functional sed program, that truncates 66185eefee25Smacallan# as few characters as possible. Prefer GNU sed if found. 66195eefee25SmacallanAC_DEFUN([LT_AC_PROG_SED], 66205eefee25Smacallan[AC_MSG_CHECKING([for a sed that does not truncate output]) 66215eefee25SmacallanAC_CACHE_VAL(lt_cv_path_SED, 66225eefee25Smacallan[# Loop through the user's path and test for sed and gsed. 66235eefee25Smacallan# Then use that list of sed's as ones to test for truncation. 66245eefee25Smacallanas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 66255eefee25Smacallanfor as_dir in $PATH 66265eefee25Smacallando 66275eefee25Smacallan IFS=$as_save_IFS 66285eefee25Smacallan test -z "$as_dir" && as_dir=. 66295eefee25Smacallan for lt_ac_prog in sed gsed; do 66305eefee25Smacallan for ac_exec_ext in '' $ac_executable_extensions; do 663162ab96baSmrg if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 66325eefee25Smacallan lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 66335eefee25Smacallan fi 66345eefee25Smacallan done 66355eefee25Smacallan done 66365eefee25Smacallandone 663762ab96baSmrgIFS=$as_save_IFS 66385eefee25Smacallanlt_ac_max=0 66395eefee25Smacallanlt_ac_count=0 66405eefee25Smacallan# Add /usr/xpg4/bin/sed as it is typically found on Solaris 66415eefee25Smacallan# along with /bin/sed that truncates output. 66425eefee25Smacallanfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 66435eefee25Smacallan test ! -f $lt_ac_sed && continue 66445eefee25Smacallan cat /dev/null > conftest.in 66455eefee25Smacallan lt_ac_count=0 66465eefee25Smacallan echo $ECHO_N "0123456789$ECHO_C" >conftest.in 66475eefee25Smacallan # Check for GNU sed and select it if it is found. 66485eefee25Smacallan if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 66495eefee25Smacallan lt_cv_path_SED=$lt_ac_sed 66505eefee25Smacallan break 66515eefee25Smacallan fi 66525eefee25Smacallan while true; do 66535eefee25Smacallan cat conftest.in conftest.in >conftest.tmp 66545eefee25Smacallan mv conftest.tmp conftest.in 66555eefee25Smacallan cp conftest.in conftest.nl 66565eefee25Smacallan echo >>conftest.nl 66575eefee25Smacallan $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 66585eefee25Smacallan cmp -s conftest.out conftest.nl || break 66595eefee25Smacallan # 10000 chars as input seems more than enough 66605eefee25Smacallan test $lt_ac_count -gt 10 && break 66615eefee25Smacallan lt_ac_count=`expr $lt_ac_count + 1` 66625eefee25Smacallan if test $lt_ac_count -gt $lt_ac_max; then 66635eefee25Smacallan lt_ac_max=$lt_ac_count 66645eefee25Smacallan lt_cv_path_SED=$lt_ac_sed 66655eefee25Smacallan fi 66665eefee25Smacallan done 66675eefee25Smacallandone 66685eefee25Smacallan]) 66695eefee25SmacallanSED=$lt_cv_path_SED 667062ab96baSmrgAC_SUBST([SED]) 66715eefee25SmacallanAC_MSG_RESULT([$SED]) 66725eefee25Smacallan]) 66735eefee25Smacallan 66745eefee25Smacallan# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 66755eefee25Smacallan# 66765eefee25Smacallan# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 66775eefee25Smacallan# 66785eefee25Smacallan# This program is free software; you can redistribute it and/or modify 66795eefee25Smacallan# it under the terms of the GNU General Public License as published by 66805eefee25Smacallan# the Free Software Foundation; either version 2 of the License, or 66815eefee25Smacallan# (at your option) any later version. 66825eefee25Smacallan# 66835eefee25Smacallan# This program is distributed in the hope that it will be useful, but 66845eefee25Smacallan# WITHOUT ANY WARRANTY; without even the implied warranty of 66855eefee25Smacallan# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 66865eefee25Smacallan# General Public License for more details. 66875eefee25Smacallan# 66885eefee25Smacallan# You should have received a copy of the GNU General Public License 66895eefee25Smacallan# along with this program; if not, write to the Free Software 66905eefee25Smacallan# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 66915eefee25Smacallan# 66925eefee25Smacallan# As a special exception to the GNU General Public License, if you 66935eefee25Smacallan# distribute this file as part of a program that contains a 66945eefee25Smacallan# configuration script generated by Autoconf, you may include it under 66955eefee25Smacallan# the same distribution terms that you use for the rest of that program. 66965eefee25Smacallan 66975eefee25Smacallan# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 66985eefee25Smacallan# ---------------------------------- 66995eefee25SmacallanAC_DEFUN([PKG_PROG_PKG_CONFIG], 67005eefee25Smacallan[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 67015eefee25Smacallanm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 67025eefee25SmacallanAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 67035eefee25Smacallanif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 67045eefee25Smacallan AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 67055eefee25Smacallanfi 67065eefee25Smacallanif test -n "$PKG_CONFIG"; then 67075eefee25Smacallan _pkg_min_version=m4_default([$1], [0.9.0]) 67085eefee25Smacallan AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 67095eefee25Smacallan if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 67105eefee25Smacallan AC_MSG_RESULT([yes]) 67115eefee25Smacallan else 67125eefee25Smacallan AC_MSG_RESULT([no]) 67135eefee25Smacallan PKG_CONFIG="" 67145eefee25Smacallan fi 67155eefee25Smacallan 67165eefee25Smacallanfi[]dnl 67175eefee25Smacallan])# PKG_PROG_PKG_CONFIG 67185eefee25Smacallan 67195eefee25Smacallan# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 67205eefee25Smacallan# 67215eefee25Smacallan# Check to see whether a particular set of modules exists. Similar 67225eefee25Smacallan# to PKG_CHECK_MODULES(), but does not set variables or print errors. 67235eefee25Smacallan# 67245eefee25Smacallan# 67255eefee25Smacallan# Similar to PKG_CHECK_MODULES, make sure that the first instance of 67265eefee25Smacallan# this or PKG_CHECK_MODULES is called, or make sure to call 67275eefee25Smacallan# PKG_CHECK_EXISTS manually 67285eefee25Smacallan# -------------------------------------------------------------- 67295eefee25SmacallanAC_DEFUN([PKG_CHECK_EXISTS], 67305eefee25Smacallan[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 67315eefee25Smacallanif test -n "$PKG_CONFIG" && \ 67325eefee25Smacallan AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 67335eefee25Smacallan m4_ifval([$2], [$2], [:]) 67345eefee25Smacallanm4_ifvaln([$3], [else 67355eefee25Smacallan $3])dnl 67365eefee25Smacallanfi]) 67375eefee25Smacallan 67385eefee25Smacallan 67395eefee25Smacallan# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 67405eefee25Smacallan# --------------------------------------------- 67415eefee25Smacallanm4_define([_PKG_CONFIG], 67425eefee25Smacallan[if test -n "$PKG_CONFIG"; then 67435eefee25Smacallan if test -n "$$1"; then 67445eefee25Smacallan pkg_cv_[]$1="$$1" 67455eefee25Smacallan else 67465eefee25Smacallan PKG_CHECK_EXISTS([$3], 67475eefee25Smacallan [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 67485eefee25Smacallan [pkg_failed=yes]) 67495eefee25Smacallan fi 67505eefee25Smacallanelse 67515eefee25Smacallan pkg_failed=untried 67525eefee25Smacallanfi[]dnl 67535eefee25Smacallan])# _PKG_CONFIG 67545eefee25Smacallan 67555eefee25Smacallan# _PKG_SHORT_ERRORS_SUPPORTED 67565eefee25Smacallan# ----------------------------- 67575eefee25SmacallanAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 67585eefee25Smacallan[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 67595eefee25Smacallanif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 67605eefee25Smacallan _pkg_short_errors_supported=yes 67615eefee25Smacallanelse 67625eefee25Smacallan _pkg_short_errors_supported=no 67635eefee25Smacallanfi[]dnl 67645eefee25Smacallan])# _PKG_SHORT_ERRORS_SUPPORTED 67655eefee25Smacallan 67665eefee25Smacallan 67675eefee25Smacallan# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 67685eefee25Smacallan# [ACTION-IF-NOT-FOUND]) 67695eefee25Smacallan# 67705eefee25Smacallan# 67715eefee25Smacallan# Note that if there is a possibility the first call to 67725eefee25Smacallan# PKG_CHECK_MODULES might not happen, you should be sure to include an 67735eefee25Smacallan# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 67745eefee25Smacallan# 67755eefee25Smacallan# 67765eefee25Smacallan# -------------------------------------------------------------- 67775eefee25SmacallanAC_DEFUN([PKG_CHECK_MODULES], 67785eefee25Smacallan[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 67795eefee25SmacallanAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 67805eefee25SmacallanAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 67815eefee25Smacallan 67825eefee25Smacallanpkg_failed=no 67835eefee25SmacallanAC_MSG_CHECKING([for $1]) 67845eefee25Smacallan 67855eefee25Smacallan_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 67865eefee25Smacallan_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 67875eefee25Smacallan 67885eefee25Smacallanm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 67895eefee25Smacallanand $1[]_LIBS to avoid the need to call pkg-config. 67905eefee25SmacallanSee the pkg-config man page for more details.]) 67915eefee25Smacallan 67925eefee25Smacallanif test $pkg_failed = yes; then 67935eefee25Smacallan _PKG_SHORT_ERRORS_SUPPORTED 67945eefee25Smacallan if test $_pkg_short_errors_supported = yes; then 67955eefee25Smacallan $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 67965eefee25Smacallan else 67975eefee25Smacallan $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 67985eefee25Smacallan fi 67995eefee25Smacallan # Put the nasty error message in config.log where it belongs 68005eefee25Smacallan echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 68015eefee25Smacallan 68025eefee25Smacallan ifelse([$4], , [AC_MSG_ERROR(dnl 68035eefee25Smacallan[Package requirements ($2) were not met: 68045eefee25Smacallan 68055eefee25Smacallan$$1_PKG_ERRORS 68065eefee25Smacallan 68075eefee25SmacallanConsider adjusting the PKG_CONFIG_PATH environment variable if you 68085eefee25Smacallaninstalled software in a non-standard prefix. 68095eefee25Smacallan 68105eefee25Smacallan_PKG_TEXT 68115eefee25Smacallan])], 681262ab96baSmrg [AC_MSG_RESULT([no]) 681362ab96baSmrg $4]) 68145eefee25Smacallanelif test $pkg_failed = untried; then 68155eefee25Smacallan ifelse([$4], , [AC_MSG_FAILURE(dnl 68165eefee25Smacallan[The pkg-config script could not be found or is too old. Make sure it 68175eefee25Smacallanis in your PATH or set the PKG_CONFIG environment variable to the full 68185eefee25Smacallanpath to pkg-config. 68195eefee25Smacallan 68205eefee25Smacallan_PKG_TEXT 68215eefee25Smacallan 682262ab96baSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 68235eefee25Smacallan [$4]) 68245eefee25Smacallanelse 68255eefee25Smacallan $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 68265eefee25Smacallan $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 68275eefee25Smacallan AC_MSG_RESULT([yes]) 68285eefee25Smacallan ifelse([$3], , :, [$3]) 68295eefee25Smacallanfi[]dnl 68305eefee25Smacallan])# PKG_CHECK_MODULES 68315eefee25Smacallan 683262ab96baSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 68335eefee25Smacallandnl 683462ab96baSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 68355eefee25Smacallandnl 683662ab96baSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 683762ab96baSmrgdnl copy of this software and associated documentation files (the 683862ab96baSmrgdnl "Software"), to deal in the Software without restriction, including 683962ab96baSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 684062ab96baSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 684162ab96baSmrgdnl to whom the Software is furnished to do so, provided that the above 684262ab96baSmrgdnl copyright notice(s) and this permission notice appear in all copies of 684362ab96baSmrgdnl the Software and that both the above copyright notice(s) and this 684462ab96baSmrgdnl permission notice appear in supporting documentation. 684562ab96baSmrgdnl 68465eefee25Smacallandnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 68475eefee25Smacallandnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 684862ab96baSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 684962ab96baSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 685062ab96baSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 685162ab96baSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 685262ab96baSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 685362ab96baSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 685462ab96baSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 685562ab96baSmrgdnl 685662ab96baSmrgdnl Except as contained in this notice, the name of a copyright holder 685762ab96baSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 685862ab96baSmrgdnl or other dealings in this Software without prior written authorization 685962ab96baSmrgdnl of the copyright holder. 686062ab96baSmrg 686162ab96baSmrg# XORG_MACROS_VERSION(required-version) 686262ab96baSmrg# ------------------------------------- 686362ab96baSmrg# Minimum version: 1.1.0 686462ab96baSmrg# 686562ab96baSmrg# If you're using a macro added in Version 1.1 or newer, include this in 686662ab96baSmrg# your configure.ac with the minimum required version, such as: 686762ab96baSmrg# XORG_MACROS_VERSION(1.1) 686862ab96baSmrg# 686962ab96baSmrg# To force at least a version with this macro defined, also add: 687062ab96baSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 687162ab96baSmrg# 687262ab96baSmrg# 687362ab96baSmrg# See the "minimum version" comment for each macro you use to see what 687462ab96baSmrg# version you require. 687562ab96baSmrgAC_DEFUN([XORG_MACROS_VERSION],[ 687662ab96baSmrg [XORG_MACROS_needed_version=$1 687762ab96baSmrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 687862ab96baSmrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 687962ab96baSmrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 688062ab96baSmrg [XORG_MACROS_version=1.2.1 688162ab96baSmrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 688262ab96baSmrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 688362ab96baSmrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 688462ab96baSmrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 688562ab96baSmrg fi 688662ab96baSmrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 688762ab96baSmrg 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]) 688862ab96baSmrg fi 688962ab96baSmrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 689062ab96baSmrg]) # XORG_MACROS_VERSION 68915eefee25Smacallan 68925eefee25Smacallan# XORG_PROG_RAWCPP() 68935eefee25Smacallan# ------------------ 689462ab96baSmrg# Minimum version: 1.0.0 689562ab96baSmrg# 68965eefee25Smacallan# Find cpp program and necessary flags for use in pre-processing text files 68975eefee25Smacallan# such as man pages and config files 68985eefee25SmacallanAC_DEFUN([XORG_PROG_RAWCPP],[ 68995eefee25SmacallanAC_REQUIRE([AC_PROG_CPP]) 69005eefee25SmacallanAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 69015eefee25Smacallan [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 69025eefee25Smacallan 69035eefee25Smacallan# Check for flag to avoid builtin definitions - assumes unix is predefined, 69045eefee25Smacallan# which is not the best choice for supporting other OS'es, but covers most 69055eefee25Smacallan# of the ones we need for now. 69065eefee25SmacallanAC_MSG_CHECKING([if $RAWCPP requires -undef]) 69075eefee25SmacallanAC_LANG_CONFTEST([Does cpp redefine unix ?]) 69085eefee25Smacallanif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 69095eefee25Smacallan AC_MSG_RESULT([no]) 69105eefee25Smacallanelse 69115eefee25Smacallan if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 69125eefee25Smacallan RAWCPPFLAGS=-undef 69135eefee25Smacallan AC_MSG_RESULT([yes]) 691462ab96baSmrg # under Cygwin unix is still defined even with -undef 691562ab96baSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 691662ab96baSmrg RAWCPPFLAGS="-undef -ansi" 691762ab96baSmrg AC_MSG_RESULT([yes, with -ansi]) 69185eefee25Smacallan else 69195eefee25Smacallan AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 69205eefee25Smacallan fi 69215eefee25Smacallanfi 69225eefee25Smacallanrm -f conftest.$ac_ext 69235eefee25Smacallan 69245eefee25SmacallanAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 69255eefee25SmacallanAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 69265eefee25Smacallanif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 69275eefee25Smacallan AC_MSG_RESULT([no]) 69285eefee25Smacallanelse 69295eefee25Smacallan if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 69305eefee25Smacallan RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 69315eefee25Smacallan AC_MSG_RESULT([yes]) 69325eefee25Smacallan else 69335eefee25Smacallan AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 69345eefee25Smacallan fi 69355eefee25Smacallanfi 69365eefee25Smacallanrm -f conftest.$ac_ext 69375eefee25SmacallanAC_SUBST(RAWCPPFLAGS) 69385eefee25Smacallan]) # XORG_PROG_RAWCPP 69395eefee25Smacallan 69405eefee25Smacallan# XORG_MANPAGE_SECTIONS() 69415eefee25Smacallan# ----------------------- 694262ab96baSmrg# Minimum version: 1.0.0 694362ab96baSmrg# 69445eefee25Smacallan# Determine which sections man pages go in for the different man page types 69455eefee25Smacallan# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 69465eefee25Smacallan# Not sure if there's any better way than just hardcoding by OS name. 69475eefee25Smacallan# Override default settings by setting environment variables 69485eefee25Smacallan 69495eefee25SmacallanAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 69505eefee25SmacallanAC_REQUIRE([AC_CANONICAL_HOST]) 69515eefee25Smacallan 69525eefee25Smacallanif test x$APP_MAN_SUFFIX = x ; then 695362ab96baSmrg APP_MAN_SUFFIX=1 69545eefee25Smacallanfi 69555eefee25Smacallanif test x$APP_MAN_DIR = x ; then 695662ab96baSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 69575eefee25Smacallanfi 69585eefee25Smacallan 69595eefee25Smacallanif test x$LIB_MAN_SUFFIX = x ; then 696062ab96baSmrg LIB_MAN_SUFFIX=3 69615eefee25Smacallanfi 69625eefee25Smacallanif test x$LIB_MAN_DIR = x ; then 696362ab96baSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 69645eefee25Smacallanfi 69655eefee25Smacallan 69665eefee25Smacallanif test x$FILE_MAN_SUFFIX = x ; then 69675eefee25Smacallan case $host_os in 69685eefee25Smacallan solaris*) FILE_MAN_SUFFIX=4 ;; 69695eefee25Smacallan *) FILE_MAN_SUFFIX=5 ;; 69705eefee25Smacallan esac 69715eefee25Smacallanfi 69725eefee25Smacallanif test x$FILE_MAN_DIR = x ; then 697362ab96baSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 69745eefee25Smacallanfi 69755eefee25Smacallan 69765eefee25Smacallanif test x$MISC_MAN_SUFFIX = x ; then 69775eefee25Smacallan case $host_os in 69785eefee25Smacallan solaris*) MISC_MAN_SUFFIX=5 ;; 69795eefee25Smacallan *) MISC_MAN_SUFFIX=7 ;; 69805eefee25Smacallan esac 69815eefee25Smacallanfi 69825eefee25Smacallanif test x$MISC_MAN_DIR = x ; then 698362ab96baSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 69845eefee25Smacallanfi 69855eefee25Smacallan 69865eefee25Smacallanif test x$DRIVER_MAN_SUFFIX = x ; then 69875eefee25Smacallan case $host_os in 69885eefee25Smacallan solaris*) DRIVER_MAN_SUFFIX=7 ;; 69895eefee25Smacallan *) DRIVER_MAN_SUFFIX=4 ;; 69905eefee25Smacallan esac 69915eefee25Smacallanfi 69925eefee25Smacallanif test x$DRIVER_MAN_DIR = x ; then 699362ab96baSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 69945eefee25Smacallanfi 69955eefee25Smacallan 69965eefee25Smacallanif test x$ADMIN_MAN_SUFFIX = x ; then 69975eefee25Smacallan case $host_os in 69985eefee25Smacallan solaris*) ADMIN_MAN_SUFFIX=1m ;; 69995eefee25Smacallan *) ADMIN_MAN_SUFFIX=8 ;; 70005eefee25Smacallan esac 70015eefee25Smacallanfi 70025eefee25Smacallanif test x$ADMIN_MAN_DIR = x ; then 70035eefee25Smacallan ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 70045eefee25Smacallanfi 70055eefee25Smacallan 70065eefee25Smacallan 70075eefee25SmacallanAC_SUBST([APP_MAN_SUFFIX]) 70085eefee25SmacallanAC_SUBST([LIB_MAN_SUFFIX]) 70095eefee25SmacallanAC_SUBST([FILE_MAN_SUFFIX]) 70105eefee25SmacallanAC_SUBST([MISC_MAN_SUFFIX]) 70115eefee25SmacallanAC_SUBST([DRIVER_MAN_SUFFIX]) 70125eefee25SmacallanAC_SUBST([ADMIN_MAN_SUFFIX]) 70135eefee25SmacallanAC_SUBST([APP_MAN_DIR]) 70145eefee25SmacallanAC_SUBST([LIB_MAN_DIR]) 70155eefee25SmacallanAC_SUBST([FILE_MAN_DIR]) 70165eefee25SmacallanAC_SUBST([MISC_MAN_DIR]) 70175eefee25SmacallanAC_SUBST([DRIVER_MAN_DIR]) 70185eefee25SmacallanAC_SUBST([ADMIN_MAN_DIR]) 70195eefee25Smacallan]) # XORG_MANPAGE_SECTIONS 70205eefee25Smacallan 70215eefee25Smacallan# XORG_CHECK_LINUXDOC 70225eefee25Smacallan# ------------------- 702362ab96baSmrg# Minimum version: 1.0.0 702462ab96baSmrg# 70255eefee25Smacallan# Defines the variable MAKE_TEXT if the necessary tools and 70265eefee25Smacallan# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 70275eefee25Smacallan# Whether or not the necessary tools and files are found can be checked 70285eefee25Smacallan# with the AM_CONDITIONAL "BUILD_LINUXDOC" 70295eefee25SmacallanAC_DEFUN([XORG_CHECK_LINUXDOC],[ 703062ab96baSmrgif test x$XORG_SGML_PATH = x ; then 703162ab96baSmrg XORG_SGML_PATH=$prefix/share/sgml 703262ab96baSmrgfi 703362ab96baSmrgHAVE_DEFS_ENT= 703462ab96baSmrg 703562ab96baSmrgif test x"$cross_compiling" = x"yes" ; then 703662ab96baSmrg HAVE_DEFS_ENT=no 703762ab96baSmrgelse 703862ab96baSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 703962ab96baSmrgfi 70405eefee25Smacallan 70415eefee25SmacallanAC_PATH_PROG(LINUXDOC, linuxdoc) 70425eefee25SmacallanAC_PATH_PROG(PS2PDF, ps2pdf) 70435eefee25Smacallan 70445eefee25SmacallanAC_MSG_CHECKING([Whether to build documentation]) 70455eefee25Smacallan 704662ab96baSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 70475eefee25Smacallan BUILDDOC=yes 70485eefee25Smacallanelse 70495eefee25Smacallan BUILDDOC=no 70505eefee25Smacallanfi 70515eefee25Smacallan 70525eefee25SmacallanAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 70535eefee25Smacallan 70545eefee25SmacallanAC_MSG_RESULT([$BUILDDOC]) 70555eefee25Smacallan 70565eefee25SmacallanAC_MSG_CHECKING([Whether to build pdf documentation]) 70575eefee25Smacallan 705862ab96baSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 70595eefee25Smacallan BUILDPDFDOC=yes 70605eefee25Smacallanelse 70615eefee25Smacallan BUILDPDFDOC=no 70625eefee25Smacallanfi 70635eefee25Smacallan 70645eefee25SmacallanAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 70655eefee25Smacallan 70665eefee25SmacallanAC_MSG_RESULT([$BUILDPDFDOC]) 70675eefee25Smacallan 706862ab96baSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 706962ab96baSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 70705eefee25SmacallanMAKE_PDF="$PS2PDF" 707162ab96baSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 70725eefee25Smacallan 70735eefee25SmacallanAC_SUBST(MAKE_TEXT) 70745eefee25SmacallanAC_SUBST(MAKE_PS) 70755eefee25SmacallanAC_SUBST(MAKE_PDF) 70765eefee25SmacallanAC_SUBST(MAKE_HTML) 70775eefee25Smacallan]) # XORG_CHECK_LINUXDOC 70785eefee25Smacallan 707962ab96baSmrg# XORG_CHECK_DOCBOOK 708062ab96baSmrg# ------------------- 708162ab96baSmrg# Minimum version: 1.0.0 708262ab96baSmrg# 708362ab96baSmrg# Checks for the ability to build output formats from SGML DocBook source. 708462ab96baSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 708562ab96baSmrg# indicates whether the necessary tools and files are found and, if set, 708662ab96baSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 708762ab96baSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 708862ab96baSmrgif test x$XORG_SGML_PATH = x ; then 708962ab96baSmrg XORG_SGML_PATH=$prefix/share/sgml 709062ab96baSmrgfi 709162ab96baSmrgHAVE_DEFS_ENT= 709262ab96baSmrgBUILDTXTDOC=no 709362ab96baSmrgBUILDPDFDOC=no 709462ab96baSmrgBUILDPSDOC=no 709562ab96baSmrgBUILDHTMLDOC=no 709662ab96baSmrg 709762ab96baSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 709862ab96baSmrg 709962ab96baSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 710062ab96baSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 710162ab96baSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 710262ab96baSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 710362ab96baSmrg 710462ab96baSmrgAC_MSG_CHECKING([Whether to build text documentation]) 710562ab96baSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 710662ab96baSmrg test x$BUILD_TXTDOC != xno; then 710762ab96baSmrg BUILDTXTDOC=yes 710862ab96baSmrgfi 710962ab96baSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 711062ab96baSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 711162ab96baSmrg 711262ab96baSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 711362ab96baSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 711462ab96baSmrg test x$BUILD_PDFDOC != xno; then 711562ab96baSmrg BUILDPDFDOC=yes 711662ab96baSmrgfi 711762ab96baSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 711862ab96baSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 711962ab96baSmrg 712062ab96baSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 712162ab96baSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 712262ab96baSmrg test x$BUILD_PSDOC != xno; then 712362ab96baSmrg BUILDPSDOC=yes 712462ab96baSmrgfi 712562ab96baSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 712662ab96baSmrgAC_MSG_RESULT([$BUILDPSDOC]) 712762ab96baSmrg 712862ab96baSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 712962ab96baSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 713062ab96baSmrg test x$BUILD_HTMLDOC != xno; then 713162ab96baSmrg BUILDHTMLDOC=yes 713262ab96baSmrgfi 713362ab96baSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 713462ab96baSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 713562ab96baSmrg 713662ab96baSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 713762ab96baSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 713862ab96baSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 713962ab96baSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 714062ab96baSmrg 714162ab96baSmrgAC_SUBST(MAKE_TEXT) 714262ab96baSmrgAC_SUBST(MAKE_PS) 714362ab96baSmrgAC_SUBST(MAKE_PDF) 714462ab96baSmrgAC_SUBST(MAKE_HTML) 714562ab96baSmrg]) # XORG_CHECK_DOCBOOK 714662ab96baSmrg 71475eefee25Smacallan# XORG_CHECK_MALLOC_ZERO 71485eefee25Smacallan# ---------------------- 714962ab96baSmrg# Minimum version: 1.0.0 715062ab96baSmrg# 71515eefee25Smacallan# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 71525eefee25Smacallan# malloc(0) returns NULL. Packages should add one of these cflags to 71535eefee25Smacallan# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 71545eefee25SmacallanAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 71555eefee25SmacallanAC_ARG_ENABLE(malloc0returnsnull, 71565eefee25Smacallan AC_HELP_STRING([--enable-malloc0returnsnull], 71575eefee25Smacallan [malloc(0) returns NULL (default: auto)]), 71585eefee25Smacallan [MALLOC_ZERO_RETURNS_NULL=$enableval], 71595eefee25Smacallan [MALLOC_ZERO_RETURNS_NULL=auto]) 71605eefee25Smacallan 71615eefee25SmacallanAC_MSG_CHECKING([whether malloc(0) returns NULL]) 71625eefee25Smacallanif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 71635eefee25Smacallan AC_RUN_IFELSE([ 71645eefee25Smacallanchar *malloc(); 71655eefee25Smacallanchar *realloc(); 71665eefee25Smacallanchar *calloc(); 71675eefee25Smacallanmain() { 71685eefee25Smacallan char *m0, *r0, *c0, *p; 71695eefee25Smacallan m0 = malloc(0); 71705eefee25Smacallan p = malloc(10); 71715eefee25Smacallan r0 = realloc(p,0); 71725eefee25Smacallan c0 = calloc(0); 71735eefee25Smacallan exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 71745eefee25Smacallan}], 71755eefee25Smacallan [MALLOC_ZERO_RETURNS_NULL=yes], 71765eefee25Smacallan [MALLOC_ZERO_RETURNS_NULL=no]) 71775eefee25Smacallanfi 71785eefee25SmacallanAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 71795eefee25Smacallan 71805eefee25Smacallanif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 71815eefee25Smacallan MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 71825eefee25Smacallan XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 71835eefee25Smacallan XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 71845eefee25Smacallanelse 71855eefee25Smacallan MALLOC_ZERO_CFLAGS="" 71865eefee25Smacallan XMALLOC_ZERO_CFLAGS="" 71875eefee25Smacallan XTMALLOC_ZERO_CFLAGS="" 71885eefee25Smacallanfi 71895eefee25Smacallan 71905eefee25SmacallanAC_SUBST([MALLOC_ZERO_CFLAGS]) 71915eefee25SmacallanAC_SUBST([XMALLOC_ZERO_CFLAGS]) 71925eefee25SmacallanAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 71935eefee25Smacallan]) # XORG_CHECK_MALLOC_ZERO 71945eefee25Smacallan 719562ab96baSmrg# XORG_WITH_LINT() 719662ab96baSmrg# ---------------- 719762ab96baSmrg# Minimum version: 1.1.0 719862ab96baSmrg# 719962ab96baSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 720062ab96baSmrg# is specified. (Use --with-lint=sparse for sparse.) 720162ab96baSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 720262ab96baSmrg# Sets $LINT_FLAGS to flags to pass to source checker 720362ab96baSmrg# Sets LINT automake conditional if enabled (default: disabled) 720462ab96baSmrg# 720562ab96baSmrgAC_DEFUN([XORG_WITH_LINT],[ 720662ab96baSmrg 720762ab96baSmrg# Allow checking code with lint, sparse, etc. 720862ab96baSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 720962ab96baSmrg [Use a lint-style source code checker (default: disabled)])], 721062ab96baSmrg [use_lint=$withval], [use_lint=no]) 721162ab96baSmrgif test "x$use_lint" = "xyes" ; then 721262ab96baSmrg LINT="lint" 721362ab96baSmrgelse 721462ab96baSmrg LINT="$use_lint" 721562ab96baSmrgfi 721662ab96baSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 721762ab96baSmrg case $LINT in 721862ab96baSmrg lint|*/lint) 721962ab96baSmrg case $host_os in 722062ab96baSmrg solaris*) 722162ab96baSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 722262ab96baSmrg ;; 722362ab96baSmrg esac 722462ab96baSmrg ;; 722562ab96baSmrg esac 722662ab96baSmrgfi 722762ab96baSmrg 722862ab96baSmrgAC_SUBST(LINT) 722962ab96baSmrgAC_SUBST(LINT_FLAGS) 723062ab96baSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 723162ab96baSmrg 723262ab96baSmrg]) # XORG_WITH_LINT 723362ab96baSmrg 723462ab96baSmrg# XORG_LINT_LIBRARY(LIBNAME) 723562ab96baSmrg# -------------------------- 723662ab96baSmrg# Minimum version: 1.1.0 723762ab96baSmrg# 723862ab96baSmrg# Sets up flags for building lint libraries for checking programs that call 723962ab96baSmrg# functions in the library. 724062ab96baSmrg# Disabled by default, enable with --enable-lint-library 724162ab96baSmrg# Sets: 724262ab96baSmrg# @LINTLIB@ - name of lint library file to make 724362ab96baSmrg# MAKE_LINT_LIB - automake conditional 724462ab96baSmrg# 724562ab96baSmrg 724662ab96baSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 724762ab96baSmrgAC_REQUIRE([XORG_WITH_LINT]) 724862ab96baSmrg# Build lint "library" for more indepth checks of programs calling this library 724962ab96baSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 725062ab96baSmrg [Create lint library (default: disabled)])], 725162ab96baSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 725262ab96baSmrgif test "x$make_lint_lib" != "xno" ; then 725362ab96baSmrg if test "x$LINT" = "xno" ; then 725462ab96baSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 725562ab96baSmrg fi 725662ab96baSmrg if test "x$make_lint_lib" = "xyes" ; then 725762ab96baSmrg LINTLIB=llib-l$1.ln 725862ab96baSmrg else 725962ab96baSmrg LINTLIB=$make_lint_lib 726062ab96baSmrg fi 726162ab96baSmrgfi 726262ab96baSmrgAC_SUBST(LINTLIB) 726362ab96baSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 726462ab96baSmrg 726562ab96baSmrg]) # XORG_LINT_LIBRARY 726662ab96baSmrg 726762ab96baSmrg# XORG_CWARNFLAGS 726862ab96baSmrg# --------------- 726962ab96baSmrg# Minimum version: 1.2.0 727062ab96baSmrg# 727162ab96baSmrg# Defines CWARNFLAGS to enable C compiler warnings. 727262ab96baSmrg# 727362ab96baSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 727462ab96baSmrgAC_REQUIRE([AC_PROG_CC]) 727562ab96baSmrgif test "x$GCC" = xyes ; then 727662ab96baSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 727762ab96baSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 727862ab96baSmrg-Wbad-function-cast" 727962ab96baSmrg case `gcc -dumpversion` in 728062ab96baSmrg 3.4.* | 4.*) 728162ab96baSmrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 728262ab96baSmrg ;; 728362ab96baSmrg esac 728462ab96baSmrgelse 728562ab96baSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 728662ab96baSmrg if test "x$SUNCC" = "xyes"; then 728762ab96baSmrg CWARNFLAGS="-v" 728862ab96baSmrg fi 728962ab96baSmrgfi 729062ab96baSmrgAC_SUBST(CWARNFLAGS) 729162ab96baSmrg]) # XORG_CWARNFLAGS 729262ab96baSmrgdnl Copyright 2005 Red Hat, Inc 729362ab96baSmrgdnl 729462ab96baSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 729562ab96baSmrgdnl documentation for any purpose is hereby granted without fee, provided that 729662ab96baSmrgdnl the above copyright notice appear in all copies and that both that 729762ab96baSmrgdnl copyright notice and this permission notice appear in supporting 729862ab96baSmrgdnl documentation. 729962ab96baSmrgdnl 730062ab96baSmrgdnl The above copyright notice and this permission notice shall be included 730162ab96baSmrgdnl in all copies or substantial portions of the Software. 730262ab96baSmrgdnl 730362ab96baSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 730462ab96baSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 730562ab96baSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 730662ab96baSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 730762ab96baSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 730862ab96baSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 730962ab96baSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 731062ab96baSmrgdnl 731162ab96baSmrgdnl Except as contained in this notice, the name of the copyright holders shall 731262ab96baSmrgdnl not be used in advertising or otherwise to promote the sale, use or 731362ab96baSmrgdnl other dealings in this Software without prior written authorization 731462ab96baSmrgdnl from the copyright holders. 731562ab96baSmrgdnl 731662ab96baSmrg 731762ab96baSmrg# XORG_RELEASE_VERSION 731862ab96baSmrg# -------------------- 731962ab96baSmrg# Adds --with/without-release-string and changes the PACKAGE and 732062ab96baSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 732162ab96baSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 732262ab96baSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 732362ab96baSmrg 732462ab96baSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 732562ab96baSmrg AC_ARG_WITH(release-version, 732662ab96baSmrg AC_HELP_STRING([--with-release-version=STRING], 732762ab96baSmrg [Use release version string in package name]), 732862ab96baSmrg [RELEASE_VERSION="$withval"], 732962ab96baSmrg [RELEASE_VERSION=""]) 733062ab96baSmrg if test "x$RELEASE_VERSION" != "x"; then 733162ab96baSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 733262ab96baSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 733362ab96baSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 733462ab96baSmrg fi 733562ab96baSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 733662ab96baSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 733762ab96baSmrg [Major version of this package]) 733862ab96baSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 733962ab96baSmrg if test "x$PVM" = "x"; then 734062ab96baSmrg PVM="0" 734162ab96baSmrg fi 734262ab96baSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 734362ab96baSmrg [$PVM], 734462ab96baSmrg [Minor version of this package]) 734562ab96baSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 734662ab96baSmrg if test "x$PVP" = "x"; then 734762ab96baSmrg PVP="0" 734862ab96baSmrg fi 734962ab96baSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 735062ab96baSmrg [$PVP], 735162ab96baSmrg [Patch version of this package]) 735262ab96baSmrg]) 735362ab96baSmrg 735462ab96baSmrg# XORG_CHANGELOG() 735562ab96baSmrg# ---------------- 735662ab96baSmrg# Minimum version: 1.2.0 735762ab96baSmrg# 735862ab96baSmrg# Defines the variable CHANGELOG_CMD as the command to generate 735962ab96baSmrg# ChangeLog from git. 736062ab96baSmrg# 736162ab96baSmrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 736262ab96baSmrg# 736362ab96baSmrgAC_DEFUN([XORG_CHANGELOG], [ 736462ab96baSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 736562ab96baSmrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 736662ab96baSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 736762ab96baSmrgAC_SUBST([CHANGELOG_CMD]) 736862ab96baSmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 736962ab96baSmrg]) # XORG_CHANGELOG 737062ab96baSmrg 73715eefee25Smacallandnl Copyright 2005 Red Hat, Inc 73725eefee25Smacallandnl 73735eefee25Smacallandnl Permission to use, copy, modify, distribute, and sell this software and its 73745eefee25Smacallandnl documentation for any purpose is hereby granted without fee, provided that 73755eefee25Smacallandnl the above copyright notice appear in all copies and that both that 73765eefee25Smacallandnl copyright notice and this permission notice appear in supporting 73775eefee25Smacallandnl documentation. 73785eefee25Smacallandnl 73795eefee25Smacallandnl The above copyright notice and this permission notice shall be included 73805eefee25Smacallandnl in all copies or substantial portions of the Software. 73815eefee25Smacallandnl 73825eefee25Smacallandnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 73835eefee25Smacallandnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 73845eefee25Smacallandnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 73855eefee25Smacallandnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 73865eefee25Smacallandnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 73875eefee25Smacallandnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 73885eefee25Smacallandnl OTHER DEALINGS IN THE SOFTWARE. 73895eefee25Smacallandnl 73905eefee25Smacallandnl Except as contained in this notice, the name of the copyright holders shall 73915eefee25Smacallandnl not be used in advertising or otherwise to promote the sale, use or 73925eefee25Smacallandnl other dealings in this Software without prior written authorization 73935eefee25Smacallandnl from the copyright holders. 73945eefee25Smacallandnl 73955eefee25Smacallan 73965eefee25Smacallan# XORG_DRIVER_CHECK_EXT() 73975eefee25Smacallan# -------------------------- 73985eefee25Smacallan# Checks for the $1 define in xorg-server.h (from the sdk). If it 73995eefee25Smacallan# is defined, then add $1 to $REQUIRED_MODULES. 74005eefee25Smacallan 74015eefee25SmacallanAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 74025eefee25Smacallan SAVE_CFLAGS="$CFLAGS" 74035eefee25Smacallan CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 74045eefee25Smacallan AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 74055eefee25Smacallan#include "xorg-server.h" 74065eefee25Smacallan#if !defined $1 74075eefee25Smacallan#error $1 not defined 74085eefee25Smacallan#endif 74095eefee25Smacallan ]])], 74105eefee25Smacallan [_EXT_CHECK=yes], 74115eefee25Smacallan [_EXT_CHECK=no]) 74125eefee25Smacallan CFLAGS="$SAVE_CFLAGS" 74135eefee25Smacallan AC_MSG_CHECKING([if $1 is defined]) 74145eefee25Smacallan AC_MSG_RESULT([$_EXT_CHECK]) 74155eefee25Smacallan if test "$_EXT_CHECK" != no; then 74165eefee25Smacallan REQUIRED_MODULES="$REQUIRED_MODULES $2" 74175eefee25Smacallan fi 74185eefee25Smacallan]) 74195eefee25Smacallan 742062ab96baSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 74215eefee25Smacallan# 74225eefee25Smacallan# This file is free software; the Free Software Foundation 74235eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 74245eefee25Smacallan# with or without modifications, as long as this notice is preserved. 74255eefee25Smacallan 74265eefee25Smacallan# AM_AUTOMAKE_VERSION(VERSION) 74275eefee25Smacallan# ---------------------------- 74285eefee25Smacallan# Automake X.Y traces this macro to ensure aclocal.m4 has been 74295eefee25Smacallan# generated from the m4 files accompanying Automake X.Y. 743062ab96baSmrg# (This private macro should not be called outside this file.) 743162ab96baSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 743262ab96baSmrg[am__api_version='1.10' 743362ab96baSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 743462ab96baSmrgdnl require some minimum version. Point them to the right macro. 743562ab96baSmrgm4_if([$1], [1.10.2], [], 743662ab96baSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 743762ab96baSmrg]) 743862ab96baSmrg 743962ab96baSmrg# _AM_AUTOCONF_VERSION(VERSION) 744062ab96baSmrg# ----------------------------- 744162ab96baSmrg# aclocal traces this macro to find the Autoconf version. 744262ab96baSmrg# This is a private macro too. Using m4_define simplifies 744362ab96baSmrg# the logic in aclocal, which can simply ignore this definition. 744462ab96baSmrgm4_define([_AM_AUTOCONF_VERSION], []) 74455eefee25Smacallan 74465eefee25Smacallan# AM_SET_CURRENT_AUTOMAKE_VERSION 74475eefee25Smacallan# ------------------------------- 744862ab96baSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 744962ab96baSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 74505eefee25SmacallanAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 745162ab96baSmrg[AM_AUTOMAKE_VERSION([1.10.2])dnl 745262ab96baSmrgm4_ifndef([AC_AUTOCONF_VERSION], 745362ab96baSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 745462ab96baSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 74555eefee25Smacallan 74565eefee25Smacallan# AM_AUX_DIR_EXPAND -*- Autoconf -*- 74575eefee25Smacallan 74585eefee25Smacallan# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 74595eefee25Smacallan# 74605eefee25Smacallan# This file is free software; the Free Software Foundation 74615eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 74625eefee25Smacallan# with or without modifications, as long as this notice is preserved. 74635eefee25Smacallan 74645eefee25Smacallan# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 74655eefee25Smacallan# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 74665eefee25Smacallan# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 74675eefee25Smacallan# 74685eefee25Smacallan# Of course, Automake must honor this variable whenever it calls a 74695eefee25Smacallan# tool from the auxiliary directory. The problem is that $srcdir (and 74705eefee25Smacallan# therefore $ac_aux_dir as well) can be either absolute or relative, 74715eefee25Smacallan# depending on how configure is run. This is pretty annoying, since 74725eefee25Smacallan# it makes $ac_aux_dir quite unusable in subdirectories: in the top 74735eefee25Smacallan# source directory, any form will work fine, but in subdirectories a 74745eefee25Smacallan# relative path needs to be adjusted first. 74755eefee25Smacallan# 74765eefee25Smacallan# $ac_aux_dir/missing 74775eefee25Smacallan# fails when called from a subdirectory if $ac_aux_dir is relative 74785eefee25Smacallan# $top_srcdir/$ac_aux_dir/missing 74795eefee25Smacallan# fails if $ac_aux_dir is absolute, 74805eefee25Smacallan# fails when called from a subdirectory in a VPATH build with 74815eefee25Smacallan# a relative $ac_aux_dir 74825eefee25Smacallan# 74835eefee25Smacallan# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 74845eefee25Smacallan# are both prefixed by $srcdir. In an in-source build this is usually 74855eefee25Smacallan# harmless because $srcdir is `.', but things will broke when you 74865eefee25Smacallan# start a VPATH build or use an absolute $srcdir. 74875eefee25Smacallan# 74885eefee25Smacallan# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 74895eefee25Smacallan# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 74905eefee25Smacallan# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 74915eefee25Smacallan# and then we would define $MISSING as 74925eefee25Smacallan# MISSING="\${SHELL} $am_aux_dir/missing" 74935eefee25Smacallan# This will work as long as MISSING is not called from configure, because 74945eefee25Smacallan# unfortunately $(top_srcdir) has no meaning in configure. 74955eefee25Smacallan# However there are other variables, like CC, which are often used in 74965eefee25Smacallan# configure, and could therefore not use this "fixed" $ac_aux_dir. 74975eefee25Smacallan# 74985eefee25Smacallan# Another solution, used here, is to always expand $ac_aux_dir to an 74995eefee25Smacallan# absolute PATH. The drawback is that using absolute paths prevent a 75005eefee25Smacallan# configured tree to be moved without reconfiguration. 75015eefee25Smacallan 75025eefee25SmacallanAC_DEFUN([AM_AUX_DIR_EXPAND], 75035eefee25Smacallan[dnl Rely on autoconf to set up CDPATH properly. 75045eefee25SmacallanAC_PREREQ([2.50])dnl 75055eefee25Smacallan# expand $ac_aux_dir to an absolute path 75065eefee25Smacallanam_aux_dir=`cd $ac_aux_dir && pwd` 75075eefee25Smacallan]) 75085eefee25Smacallan 75095eefee25Smacallan# AM_CONDITIONAL -*- Autoconf -*- 75105eefee25Smacallan 751162ab96baSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 75125eefee25Smacallan# Free Software Foundation, Inc. 75135eefee25Smacallan# 75145eefee25Smacallan# This file is free software; the Free Software Foundation 75155eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 75165eefee25Smacallan# with or without modifications, as long as this notice is preserved. 75175eefee25Smacallan 751862ab96baSmrg# serial 8 75195eefee25Smacallan 75205eefee25Smacallan# AM_CONDITIONAL(NAME, SHELL-CONDITION) 75215eefee25Smacallan# ------------------------------------- 75225eefee25Smacallan# Define a conditional. 75235eefee25SmacallanAC_DEFUN([AM_CONDITIONAL], 75245eefee25Smacallan[AC_PREREQ(2.52)dnl 75255eefee25Smacallan ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 75265eefee25Smacallan [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 752762ab96baSmrgAC_SUBST([$1_TRUE])dnl 752862ab96baSmrgAC_SUBST([$1_FALSE])dnl 752962ab96baSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 753062ab96baSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 75315eefee25Smacallanif $2; then 75325eefee25Smacallan $1_TRUE= 75335eefee25Smacallan $1_FALSE='#' 75345eefee25Smacallanelse 75355eefee25Smacallan $1_TRUE='#' 75365eefee25Smacallan $1_FALSE= 75375eefee25Smacallanfi 75385eefee25SmacallanAC_CONFIG_COMMANDS_PRE( 75395eefee25Smacallan[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 75405eefee25Smacallan AC_MSG_ERROR([[conditional "$1" was never defined. 75415eefee25SmacallanUsually this means the macro was only invoked conditionally.]]) 75425eefee25Smacallanfi])]) 75435eefee25Smacallan 754462ab96baSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 75455eefee25Smacallan# Free Software Foundation, Inc. 75465eefee25Smacallan# 75475eefee25Smacallan# This file is free software; the Free Software Foundation 75485eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 75495eefee25Smacallan# with or without modifications, as long as this notice is preserved. 75505eefee25Smacallan 755162ab96baSmrg# serial 9 75525eefee25Smacallan 75535eefee25Smacallan# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 75545eefee25Smacallan# written in clear, in which case automake, when reading aclocal.m4, 75555eefee25Smacallan# will think it sees a *use*, and therefore will trigger all it's 75565eefee25Smacallan# C support machinery. Also note that it means that autoscan, seeing 75575eefee25Smacallan# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 75585eefee25Smacallan 75595eefee25Smacallan 75605eefee25Smacallan# _AM_DEPENDENCIES(NAME) 75615eefee25Smacallan# ---------------------- 75625eefee25Smacallan# See how the compiler implements dependency checking. 75635eefee25Smacallan# NAME is "CC", "CXX", "GCJ", or "OBJC". 75645eefee25Smacallan# We try a few techniques and use that to set a single cache variable. 75655eefee25Smacallan# 75665eefee25Smacallan# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 75675eefee25Smacallan# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 75685eefee25Smacallan# dependency, and given that the user is not expected to run this macro, 75695eefee25Smacallan# just rely on AC_PROG_CC. 75705eefee25SmacallanAC_DEFUN([_AM_DEPENDENCIES], 75715eefee25Smacallan[AC_REQUIRE([AM_SET_DEPDIR])dnl 75725eefee25SmacallanAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 75735eefee25SmacallanAC_REQUIRE([AM_MAKE_INCLUDE])dnl 75745eefee25SmacallanAC_REQUIRE([AM_DEP_TRACK])dnl 75755eefee25Smacallan 75765eefee25Smacallanifelse([$1], CC, [depcc="$CC" am_compiler_list=], 75775eefee25Smacallan [$1], CXX, [depcc="$CXX" am_compiler_list=], 75785eefee25Smacallan [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 757962ab96baSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 75805eefee25Smacallan [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 75815eefee25Smacallan [depcc="$$1" am_compiler_list=]) 75825eefee25Smacallan 75835eefee25SmacallanAC_CACHE_CHECK([dependency style of $depcc], 75845eefee25Smacallan [am_cv_$1_dependencies_compiler_type], 75855eefee25Smacallan[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 75865eefee25Smacallan # We make a subdir and do the tests there. Otherwise we can end up 75875eefee25Smacallan # making bogus files that we don't know about and never remove. For 75885eefee25Smacallan # instance it was reported that on HP-UX the gcc test will end up 75895eefee25Smacallan # making a dummy file named `D' -- because `-MD' means `put the output 75905eefee25Smacallan # in D'. 75915eefee25Smacallan mkdir conftest.dir 75925eefee25Smacallan # Copy depcomp to subdir because otherwise we won't find it if we're 75935eefee25Smacallan # using a relative directory. 75945eefee25Smacallan cp "$am_depcomp" conftest.dir 75955eefee25Smacallan cd conftest.dir 75965eefee25Smacallan # We will build objects and dependencies in a subdirectory because 75975eefee25Smacallan # it helps to detect inapplicable dependency modes. For instance 75985eefee25Smacallan # both Tru64's cc and ICC support -MD to output dependencies as a 75995eefee25Smacallan # side effect of compilation, but ICC will put the dependencies in 76005eefee25Smacallan # the current directory while Tru64 will put them in the object 76015eefee25Smacallan # directory. 76025eefee25Smacallan mkdir sub 76035eefee25Smacallan 76045eefee25Smacallan am_cv_$1_dependencies_compiler_type=none 76055eefee25Smacallan if test "$am_compiler_list" = ""; then 76065eefee25Smacallan am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 76075eefee25Smacallan fi 76085eefee25Smacallan for depmode in $am_compiler_list; do 76095eefee25Smacallan # Setup a source with many dependencies, because some compilers 76105eefee25Smacallan # like to wrap large dependency lists on column 80 (with \), and 76115eefee25Smacallan # we should not choose a depcomp mode which is confused by this. 76125eefee25Smacallan # 76135eefee25Smacallan # We need to recreate these files for each test, as the compiler may 76145eefee25Smacallan # overwrite some of them when testing with obscure command lines. 76155eefee25Smacallan # This happens at least with the AIX C compiler. 76165eefee25Smacallan : > sub/conftest.c 76175eefee25Smacallan for i in 1 2 3 4 5 6; do 76185eefee25Smacallan echo '#include "conftst'$i'.h"' >> sub/conftest.c 76195eefee25Smacallan # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 76205eefee25Smacallan # Solaris 8's {/usr,}/bin/sh. 76215eefee25Smacallan touch sub/conftst$i.h 76225eefee25Smacallan done 76235eefee25Smacallan echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 76245eefee25Smacallan 76255eefee25Smacallan case $depmode in 76265eefee25Smacallan nosideeffect) 76275eefee25Smacallan # after this tag, mechanisms are not by side-effect, so they'll 76285eefee25Smacallan # only be used when explicitly requested 76295eefee25Smacallan if test "x$enable_dependency_tracking" = xyes; then 76305eefee25Smacallan continue 76315eefee25Smacallan else 76325eefee25Smacallan break 76335eefee25Smacallan fi 76345eefee25Smacallan ;; 76355eefee25Smacallan none) break ;; 76365eefee25Smacallan esac 76375eefee25Smacallan # We check with `-c' and `-o' for the sake of the "dashmstdout" 76385eefee25Smacallan # mode. It turns out that the SunPro C++ compiler does not properly 76395eefee25Smacallan # handle `-M -o', and we need to detect this. 76405eefee25Smacallan if depmode=$depmode \ 76415eefee25Smacallan source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 76425eefee25Smacallan depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 76435eefee25Smacallan $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 76445eefee25Smacallan >/dev/null 2>conftest.err && 764562ab96baSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 76465eefee25Smacallan grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 76475eefee25Smacallan grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 76485eefee25Smacallan ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 76495eefee25Smacallan # icc doesn't choke on unknown options, it will just issue warnings 76505eefee25Smacallan # or remarks (even with -Werror). So we grep stderr for any message 76515eefee25Smacallan # that says an option was ignored or not supported. 76525eefee25Smacallan # When given -MP, icc 7.0 and 7.1 complain thusly: 76535eefee25Smacallan # icc: Command line warning: ignoring option '-M'; no argument required 76545eefee25Smacallan # The diagnosis changed in icc 8.0: 76555eefee25Smacallan # icc: Command line remark: option '-MP' not supported 76565eefee25Smacallan if (grep 'ignoring option' conftest.err || 76575eefee25Smacallan grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 76585eefee25Smacallan am_cv_$1_dependencies_compiler_type=$depmode 76595eefee25Smacallan break 76605eefee25Smacallan fi 76615eefee25Smacallan fi 76625eefee25Smacallan done 76635eefee25Smacallan 76645eefee25Smacallan cd .. 76655eefee25Smacallan rm -rf conftest.dir 76665eefee25Smacallanelse 76675eefee25Smacallan am_cv_$1_dependencies_compiler_type=none 76685eefee25Smacallanfi 76695eefee25Smacallan]) 76705eefee25SmacallanAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 76715eefee25SmacallanAM_CONDITIONAL([am__fastdep$1], [ 76725eefee25Smacallan test "x$enable_dependency_tracking" != xno \ 76735eefee25Smacallan && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 76745eefee25Smacallan]) 76755eefee25Smacallan 76765eefee25Smacallan 76775eefee25Smacallan# AM_SET_DEPDIR 76785eefee25Smacallan# ------------- 76795eefee25Smacallan# Choose a directory name for dependency files. 76805eefee25Smacallan# This macro is AC_REQUIREd in _AM_DEPENDENCIES 76815eefee25SmacallanAC_DEFUN([AM_SET_DEPDIR], 76825eefee25Smacallan[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 76835eefee25SmacallanAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 76845eefee25Smacallan]) 76855eefee25Smacallan 76865eefee25Smacallan 76875eefee25Smacallan# AM_DEP_TRACK 76885eefee25Smacallan# ------------ 76895eefee25SmacallanAC_DEFUN([AM_DEP_TRACK], 76905eefee25Smacallan[AC_ARG_ENABLE(dependency-tracking, 76915eefee25Smacallan[ --disable-dependency-tracking speeds up one-time build 76925eefee25Smacallan --enable-dependency-tracking do not reject slow dependency extractors]) 76935eefee25Smacallanif test "x$enable_dependency_tracking" != xno; then 76945eefee25Smacallan am_depcomp="$ac_aux_dir/depcomp" 76955eefee25Smacallan AMDEPBACKSLASH='\' 76965eefee25Smacallanfi 76975eefee25SmacallanAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 769862ab96baSmrgAC_SUBST([AMDEPBACKSLASH])dnl 769962ab96baSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 77005eefee25Smacallan]) 77015eefee25Smacallan 77025eefee25Smacallan# Generate code to set up dependency tracking. -*- Autoconf -*- 77035eefee25Smacallan 770462ab96baSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 77055eefee25Smacallan# Free Software Foundation, Inc. 77065eefee25Smacallan# 77075eefee25Smacallan# This file is free software; the Free Software Foundation 77085eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 77095eefee25Smacallan# with or without modifications, as long as this notice is preserved. 77105eefee25Smacallan 771162ab96baSmrg#serial 4 77125eefee25Smacallan 77135eefee25Smacallan# _AM_OUTPUT_DEPENDENCY_COMMANDS 77145eefee25Smacallan# ------------------------------ 77155eefee25SmacallanAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 771662ab96baSmrg[# Autoconf 2.62 quotes --file arguments for eval, but not when files 771762ab96baSmrg# are listed without --file. Let's play safe and only enable the eval 771862ab96baSmrg# if we detect the quoting. 771962ab96baSmrgcase $CONFIG_FILES in 772062ab96baSmrg*\'*) eval set x "$CONFIG_FILES" ;; 772162ab96baSmrg*) set x $CONFIG_FILES ;; 772262ab96baSmrgesac 772362ab96baSmrgshift 772462ab96baSmrgfor mf 772562ab96baSmrgdo 77265eefee25Smacallan # Strip MF so we end up with the name of the file. 77275eefee25Smacallan mf=`echo "$mf" | sed -e 's/:.*$//'` 77285eefee25Smacallan # Check whether this is an Automake generated Makefile or not. 77295eefee25Smacallan # We used to match only the files named `Makefile.in', but 77305eefee25Smacallan # some people rename them; so instead we look at the file content. 77315eefee25Smacallan # Grep'ing the first line is not enough: some people post-process 77325eefee25Smacallan # each Makefile.in and add a new line on top of each file to say so. 773362ab96baSmrg # Grep'ing the whole file is not good either: AIX grep has a line 773462ab96baSmrg # limit of 2048, but all sed's we know have understand at least 4000. 773562ab96baSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 77365eefee25Smacallan dirpart=`AS_DIRNAME("$mf")` 77375eefee25Smacallan else 77385eefee25Smacallan continue 77395eefee25Smacallan fi 77405eefee25Smacallan # Extract the definition of DEPDIR, am__include, and am__quote 77415eefee25Smacallan # from the Makefile without running `make'. 77425eefee25Smacallan DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 77435eefee25Smacallan test -z "$DEPDIR" && continue 77445eefee25Smacallan am__include=`sed -n 's/^am__include = //p' < "$mf"` 77455eefee25Smacallan test -z "am__include" && continue 77465eefee25Smacallan am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 77475eefee25Smacallan # When using ansi2knr, U may be empty or an underscore; expand it 77485eefee25Smacallan U=`sed -n 's/^U = //p' < "$mf"` 77495eefee25Smacallan # Find all dependency output files, they are included files with 77505eefee25Smacallan # $(DEPDIR) in their names. We invoke sed twice because it is the 77515eefee25Smacallan # simplest approach to changing $(DEPDIR) to its actual value in the 77525eefee25Smacallan # expansion. 77535eefee25Smacallan for file in `sed -n " 77545eefee25Smacallan s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 77555eefee25Smacallan sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 77565eefee25Smacallan # Make sure the directory exists. 77575eefee25Smacallan test -f "$dirpart/$file" && continue 77585eefee25Smacallan fdir=`AS_DIRNAME(["$file"])` 77595eefee25Smacallan AS_MKDIR_P([$dirpart/$fdir]) 77605eefee25Smacallan # echo "creating $dirpart/$file" 77615eefee25Smacallan echo '# dummy' > "$dirpart/$file" 77625eefee25Smacallan done 77635eefee25Smacallandone 77645eefee25Smacallan])# _AM_OUTPUT_DEPENDENCY_COMMANDS 77655eefee25Smacallan 77665eefee25Smacallan 77675eefee25Smacallan# AM_OUTPUT_DEPENDENCY_COMMANDS 77685eefee25Smacallan# ----------------------------- 77695eefee25Smacallan# This macro should only be invoked once -- use via AC_REQUIRE. 77705eefee25Smacallan# 77715eefee25Smacallan# This code is only required when automatic dependency tracking 77725eefee25Smacallan# is enabled. FIXME. This creates each `.P' file that we will 77735eefee25Smacallan# need in order to bootstrap the dependency handling code. 77745eefee25SmacallanAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 77755eefee25Smacallan[AC_CONFIG_COMMANDS([depfiles], 77765eefee25Smacallan [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 77775eefee25Smacallan [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 77785eefee25Smacallan]) 77795eefee25Smacallan 77805eefee25Smacallan# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 77815eefee25Smacallan# Free Software Foundation, Inc. 77825eefee25Smacallan# 77835eefee25Smacallan# This file is free software; the Free Software Foundation 77845eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 77855eefee25Smacallan# with or without modifications, as long as this notice is preserved. 77865eefee25Smacallan 77875eefee25Smacallan# serial 8 77885eefee25Smacallan 77895eefee25Smacallan# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 77905eefee25SmacallanAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 77915eefee25Smacallan 77925eefee25Smacallan# Do all the work for Automake. -*- Autoconf -*- 77935eefee25Smacallan 779462ab96baSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 779562ab96baSmrg# 2005, 2006, 2008 Free Software Foundation, Inc. 77965eefee25Smacallan# 77975eefee25Smacallan# This file is free software; the Free Software Foundation 77985eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 77995eefee25Smacallan# with or without modifications, as long as this notice is preserved. 78005eefee25Smacallan 780162ab96baSmrg# serial 13 78025eefee25Smacallan 78035eefee25Smacallan# This macro actually does too much. Some checks are only needed if 78045eefee25Smacallan# your package does certain things. But this isn't really a big deal. 78055eefee25Smacallan 78065eefee25Smacallan# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 78075eefee25Smacallan# AM_INIT_AUTOMAKE([OPTIONS]) 78085eefee25Smacallan# ----------------------------------------------- 78095eefee25Smacallan# The call with PACKAGE and VERSION arguments is the old style 78105eefee25Smacallan# call (pre autoconf-2.50), which is being phased out. PACKAGE 78115eefee25Smacallan# and VERSION should now be passed to AC_INIT and removed from 78125eefee25Smacallan# the call to AM_INIT_AUTOMAKE. 78135eefee25Smacallan# We support both call styles for the transition. After 78145eefee25Smacallan# the next Automake release, Autoconf can make the AC_INIT 78155eefee25Smacallan# arguments mandatory, and then we can depend on a new Autoconf 78165eefee25Smacallan# release and drop the old call support. 78175eefee25SmacallanAC_DEFUN([AM_INIT_AUTOMAKE], 781862ab96baSmrg[AC_PREREQ([2.60])dnl 78195eefee25Smacallandnl Autoconf wants to disallow AM_ names. We explicitly allow 78205eefee25Smacallandnl the ones we care about. 78215eefee25Smacallanm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 78225eefee25SmacallanAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 78235eefee25SmacallanAC_REQUIRE([AC_PROG_INSTALL])dnl 782462ab96baSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 782562ab96baSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 782662ab96baSmrg # is not polluted with repeated "-I." 782762ab96baSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 782862ab96baSmrg # test to see if srcdir already configured 782962ab96baSmrg if test -f $srcdir/config.status; then 783062ab96baSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 783162ab96baSmrg fi 78325eefee25Smacallanfi 78335eefee25Smacallan 78345eefee25Smacallan# test whether we have cygpath 78355eefee25Smacallanif test -z "$CYGPATH_W"; then 78365eefee25Smacallan if (cygpath --version) >/dev/null 2>/dev/null; then 78375eefee25Smacallan CYGPATH_W='cygpath -w' 78385eefee25Smacallan else 78395eefee25Smacallan CYGPATH_W=echo 78405eefee25Smacallan fi 78415eefee25Smacallanfi 78425eefee25SmacallanAC_SUBST([CYGPATH_W]) 78435eefee25Smacallan 78445eefee25Smacallan# Define the identity of the package. 78455eefee25Smacallandnl Distinguish between old-style and new-style calls. 78465eefee25Smacallanm4_ifval([$2], 78475eefee25Smacallan[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 78485eefee25Smacallan AC_SUBST([PACKAGE], [$1])dnl 78495eefee25Smacallan AC_SUBST([VERSION], [$2])], 78505eefee25Smacallan[_AM_SET_OPTIONS([$1])dnl 785162ab96baSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 785262ab96baSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 785362ab96baSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 78545eefee25Smacallan AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 78555eefee25Smacallan AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 78565eefee25Smacallan 78575eefee25Smacallan_AM_IF_OPTION([no-define],, 78585eefee25Smacallan[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 78595eefee25Smacallan AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 78605eefee25Smacallan 78615eefee25Smacallan# Some tools Automake needs. 78625eefee25SmacallanAC_REQUIRE([AM_SANITY_CHECK])dnl 78635eefee25SmacallanAC_REQUIRE([AC_ARG_PROGRAM])dnl 78645eefee25SmacallanAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 78655eefee25SmacallanAM_MISSING_PROG(AUTOCONF, autoconf) 78665eefee25SmacallanAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 78675eefee25SmacallanAM_MISSING_PROG(AUTOHEADER, autoheader) 78685eefee25SmacallanAM_MISSING_PROG(MAKEINFO, makeinfo) 78695eefee25SmacallanAM_PROG_INSTALL_SH 78705eefee25SmacallanAM_PROG_INSTALL_STRIP 78715eefee25SmacallanAC_REQUIRE([AM_PROG_MKDIR_P])dnl 78725eefee25Smacallan# We need awk for the "check" target. The system "awk" is bad on 78735eefee25Smacallan# some platforms. 78745eefee25SmacallanAC_REQUIRE([AC_PROG_AWK])dnl 78755eefee25SmacallanAC_REQUIRE([AC_PROG_MAKE_SET])dnl 78765eefee25SmacallanAC_REQUIRE([AM_SET_LEADING_DOT])dnl 78775eefee25Smacallan_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 78785eefee25Smacallan [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 78795eefee25Smacallan [_AM_PROG_TAR([v7])])]) 78805eefee25Smacallan_AM_IF_OPTION([no-dependencies],, 78815eefee25Smacallan[AC_PROVIDE_IFELSE([AC_PROG_CC], 78825eefee25Smacallan [_AM_DEPENDENCIES(CC)], 78835eefee25Smacallan [define([AC_PROG_CC], 78845eefee25Smacallan defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 78855eefee25SmacallanAC_PROVIDE_IFELSE([AC_PROG_CXX], 78865eefee25Smacallan [_AM_DEPENDENCIES(CXX)], 78875eefee25Smacallan [define([AC_PROG_CXX], 78885eefee25Smacallan defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 788962ab96baSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 789062ab96baSmrg [_AM_DEPENDENCIES(OBJC)], 789162ab96baSmrg [define([AC_PROG_OBJC], 789262ab96baSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 78935eefee25Smacallan]) 78945eefee25Smacallan]) 78955eefee25Smacallan 78965eefee25Smacallan 78975eefee25Smacallan# When config.status generates a header, we must update the stamp-h file. 78985eefee25Smacallan# This file resides in the same directory as the config header 78995eefee25Smacallan# that is generated. The stamp files are numbered to have different names. 79005eefee25Smacallan 79015eefee25Smacallan# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 79025eefee25Smacallan# loop where config.status creates the headers, so we can generate 79035eefee25Smacallan# our stamp files there. 79045eefee25SmacallanAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 79055eefee25Smacallan[# Compute $1's index in $config_headers. 790662ab96baSmrg_am_arg=$1 79075eefee25Smacallan_am_stamp_count=1 79085eefee25Smacallanfor _am_header in $config_headers :; do 79095eefee25Smacallan case $_am_header in 791062ab96baSmrg $_am_arg | $_am_arg:* ) 79115eefee25Smacallan break ;; 79125eefee25Smacallan * ) 79135eefee25Smacallan _am_stamp_count=`expr $_am_stamp_count + 1` ;; 79145eefee25Smacallan esac 79155eefee25Smacallandone 791662ab96baSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 79175eefee25Smacallan 79185eefee25Smacallan# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 79195eefee25Smacallan# 79205eefee25Smacallan# This file is free software; the Free Software Foundation 79215eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 79225eefee25Smacallan# with or without modifications, as long as this notice is preserved. 79235eefee25Smacallan 79245eefee25Smacallan# AM_PROG_INSTALL_SH 79255eefee25Smacallan# ------------------ 79265eefee25Smacallan# Define $install_sh. 79275eefee25SmacallanAC_DEFUN([AM_PROG_INSTALL_SH], 79285eefee25Smacallan[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 792962ab96baSmrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 79305eefee25SmacallanAC_SUBST(install_sh)]) 79315eefee25Smacallan 79325eefee25Smacallan# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 79335eefee25Smacallan# 79345eefee25Smacallan# This file is free software; the Free Software Foundation 79355eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 79365eefee25Smacallan# with or without modifications, as long as this notice is preserved. 79375eefee25Smacallan 79385eefee25Smacallan# serial 2 79395eefee25Smacallan 79405eefee25Smacallan# Check whether the underlying file-system supports filenames 79415eefee25Smacallan# with a leading dot. For instance MS-DOS doesn't. 79425eefee25SmacallanAC_DEFUN([AM_SET_LEADING_DOT], 79435eefee25Smacallan[rm -rf .tst 2>/dev/null 79445eefee25Smacallanmkdir .tst 2>/dev/null 79455eefee25Smacallanif test -d .tst; then 79465eefee25Smacallan am__leading_dot=. 79475eefee25Smacallanelse 79485eefee25Smacallan am__leading_dot=_ 79495eefee25Smacallanfi 79505eefee25Smacallanrmdir .tst 2>/dev/null 79515eefee25SmacallanAC_SUBST([am__leading_dot])]) 79525eefee25Smacallan 79535eefee25Smacallan# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 79545eefee25Smacallan# From Jim Meyering 79555eefee25Smacallan 79565eefee25Smacallan# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 79575eefee25Smacallan# Free Software Foundation, Inc. 79585eefee25Smacallan# 79595eefee25Smacallan# This file is free software; the Free Software Foundation 79605eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 79615eefee25Smacallan# with or without modifications, as long as this notice is preserved. 79625eefee25Smacallan 79635eefee25Smacallan# serial 4 79645eefee25Smacallan 79655eefee25SmacallanAC_DEFUN([AM_MAINTAINER_MODE], 79665eefee25Smacallan[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 79675eefee25Smacallan dnl maintainer-mode is disabled by default 79685eefee25Smacallan AC_ARG_ENABLE(maintainer-mode, 79695eefee25Smacallan[ --enable-maintainer-mode enable make rules and dependencies not useful 79705eefee25Smacallan (and sometimes confusing) to the casual installer], 79715eefee25Smacallan USE_MAINTAINER_MODE=$enableval, 79725eefee25Smacallan USE_MAINTAINER_MODE=no) 79735eefee25Smacallan AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 79745eefee25Smacallan AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 79755eefee25Smacallan MAINT=$MAINTAINER_MODE_TRUE 79765eefee25Smacallan AC_SUBST(MAINT)dnl 79775eefee25Smacallan] 79785eefee25Smacallan) 79795eefee25Smacallan 79805eefee25SmacallanAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 79815eefee25Smacallan 79825eefee25Smacallan# Check to see how 'make' treats includes. -*- Autoconf -*- 79835eefee25Smacallan 79845eefee25Smacallan# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 79855eefee25Smacallan# 79865eefee25Smacallan# This file is free software; the Free Software Foundation 79875eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 79885eefee25Smacallan# with or without modifications, as long as this notice is preserved. 79895eefee25Smacallan 79905eefee25Smacallan# serial 3 79915eefee25Smacallan 79925eefee25Smacallan# AM_MAKE_INCLUDE() 79935eefee25Smacallan# ----------------- 79945eefee25Smacallan# Check to see how make treats includes. 79955eefee25SmacallanAC_DEFUN([AM_MAKE_INCLUDE], 79965eefee25Smacallan[am_make=${MAKE-make} 79975eefee25Smacallancat > confinc << 'END' 79985eefee25Smacallanam__doit: 79995eefee25Smacallan @echo done 80005eefee25Smacallan.PHONY: am__doit 80015eefee25SmacallanEND 80025eefee25Smacallan# If we don't find an include directive, just comment out the code. 80035eefee25SmacallanAC_MSG_CHECKING([for style of include used by $am_make]) 80045eefee25Smacallanam__include="#" 80055eefee25Smacallanam__quote= 80065eefee25Smacallan_am_result=none 80075eefee25Smacallan# First try GNU make style include. 80085eefee25Smacallanecho "include confinc" > confmf 80095eefee25Smacallan# We grep out `Entering directory' and `Leaving directory' 80105eefee25Smacallan# messages which can occur if `w' ends up in MAKEFLAGS. 80115eefee25Smacallan# In particular we don't look at `^make:' because GNU make might 80125eefee25Smacallan# be invoked under some other name (usually "gmake"), in which 80135eefee25Smacallan# case it prints its new name instead of `make'. 80145eefee25Smacallanif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 80155eefee25Smacallan am__include=include 80165eefee25Smacallan am__quote= 80175eefee25Smacallan _am_result=GNU 80185eefee25Smacallanfi 80195eefee25Smacallan# Now try BSD make style include. 80205eefee25Smacallanif test "$am__include" = "#"; then 80215eefee25Smacallan echo '.include "confinc"' > confmf 80225eefee25Smacallan if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 80235eefee25Smacallan am__include=.include 80245eefee25Smacallan am__quote="\"" 80255eefee25Smacallan _am_result=BSD 80265eefee25Smacallan fi 80275eefee25Smacallanfi 80285eefee25SmacallanAC_SUBST([am__include]) 80295eefee25SmacallanAC_SUBST([am__quote]) 80305eefee25SmacallanAC_MSG_RESULT([$_am_result]) 80315eefee25Smacallanrm -f confinc confmf 80325eefee25Smacallan]) 80335eefee25Smacallan 80345eefee25Smacallan# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 80355eefee25Smacallan 803662ab96baSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 80375eefee25Smacallan# Free Software Foundation, Inc. 80385eefee25Smacallan# 80395eefee25Smacallan# This file is free software; the Free Software Foundation 80405eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 80415eefee25Smacallan# with or without modifications, as long as this notice is preserved. 80425eefee25Smacallan 804362ab96baSmrg# serial 5 80445eefee25Smacallan 80455eefee25Smacallan# AM_MISSING_PROG(NAME, PROGRAM) 80465eefee25Smacallan# ------------------------------ 80475eefee25SmacallanAC_DEFUN([AM_MISSING_PROG], 80485eefee25Smacallan[AC_REQUIRE([AM_MISSING_HAS_RUN]) 80495eefee25Smacallan$1=${$1-"${am_missing_run}$2"} 80505eefee25SmacallanAC_SUBST($1)]) 80515eefee25Smacallan 80525eefee25Smacallan 80535eefee25Smacallan# AM_MISSING_HAS_RUN 80545eefee25Smacallan# ------------------ 80555eefee25Smacallan# Define MISSING if not defined so far and test if it supports --run. 80565eefee25Smacallan# If it does, set am_missing_run to use it, otherwise, to nothing. 80575eefee25SmacallanAC_DEFUN([AM_MISSING_HAS_RUN], 80585eefee25Smacallan[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 805962ab96baSmrgAC_REQUIRE_AUX_FILE([missing])dnl 80605eefee25Smacallantest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 80615eefee25Smacallan# Use eval to expand $SHELL 80625eefee25Smacallanif eval "$MISSING --run true"; then 80635eefee25Smacallan am_missing_run="$MISSING --run " 80645eefee25Smacallanelse 80655eefee25Smacallan am_missing_run= 80665eefee25Smacallan AC_MSG_WARN([`missing' script is too old or missing]) 80675eefee25Smacallanfi 80685eefee25Smacallan]) 80695eefee25Smacallan 807062ab96baSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 80715eefee25Smacallan# 80725eefee25Smacallan# This file is free software; the Free Software Foundation 80735eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 80745eefee25Smacallan# with or without modifications, as long as this notice is preserved. 80755eefee25Smacallan 80765eefee25Smacallan# AM_PROG_MKDIR_P 80775eefee25Smacallan# --------------- 807862ab96baSmrg# Check for `mkdir -p'. 80795eefee25SmacallanAC_DEFUN([AM_PROG_MKDIR_P], 808062ab96baSmrg[AC_PREREQ([2.60])dnl 808162ab96baSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 808262ab96baSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 808362ab96baSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 808462ab96baSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 808562ab96baSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 808662ab96baSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 808762ab96baSmrgdnl adjustment using top_builddir (which is defined more often than 808862ab96baSmrgdnl MKDIR_P). 808962ab96baSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 809062ab96baSmrgcase $mkdir_p in 809162ab96baSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 809262ab96baSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 809362ab96baSmrgesac 809462ab96baSmrg]) 80955eefee25Smacallan 80965eefee25Smacallan# Helper functions for option handling. -*- Autoconf -*- 80975eefee25Smacallan 809862ab96baSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 80995eefee25Smacallan# 81005eefee25Smacallan# This file is free software; the Free Software Foundation 81015eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 81025eefee25Smacallan# with or without modifications, as long as this notice is preserved. 81035eefee25Smacallan 810462ab96baSmrg# serial 4 81055eefee25Smacallan 81065eefee25Smacallan# _AM_MANGLE_OPTION(NAME) 81075eefee25Smacallan# ----------------------- 81085eefee25SmacallanAC_DEFUN([_AM_MANGLE_OPTION], 81095eefee25Smacallan[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 81105eefee25Smacallan 81115eefee25Smacallan# _AM_SET_OPTION(NAME) 81125eefee25Smacallan# ------------------------------ 81135eefee25Smacallan# Set option NAME. Presently that only means defining a flag for this option. 81145eefee25SmacallanAC_DEFUN([_AM_SET_OPTION], 81155eefee25Smacallan[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 81165eefee25Smacallan 81175eefee25Smacallan# _AM_SET_OPTIONS(OPTIONS) 81185eefee25Smacallan# ---------------------------------- 81195eefee25Smacallan# OPTIONS is a space-separated list of Automake options. 81205eefee25SmacallanAC_DEFUN([_AM_SET_OPTIONS], 812162ab96baSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 81225eefee25Smacallan 81235eefee25Smacallan# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 81245eefee25Smacallan# ------------------------------------------- 81255eefee25Smacallan# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 81265eefee25SmacallanAC_DEFUN([_AM_IF_OPTION], 81275eefee25Smacallan[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 81285eefee25Smacallan 81295eefee25Smacallan# Check to make sure that the build environment is sane. -*- Autoconf -*- 81305eefee25Smacallan 81315eefee25Smacallan# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 81325eefee25Smacallan# Free Software Foundation, Inc. 81335eefee25Smacallan# 81345eefee25Smacallan# This file is free software; the Free Software Foundation 81355eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 81365eefee25Smacallan# with or without modifications, as long as this notice is preserved. 81375eefee25Smacallan 81385eefee25Smacallan# serial 4 81395eefee25Smacallan 81405eefee25Smacallan# AM_SANITY_CHECK 81415eefee25Smacallan# --------------- 81425eefee25SmacallanAC_DEFUN([AM_SANITY_CHECK], 81435eefee25Smacallan[AC_MSG_CHECKING([whether build environment is sane]) 81445eefee25Smacallan# Just in case 81455eefee25Smacallansleep 1 81465eefee25Smacallanecho timestamp > conftest.file 81475eefee25Smacallan# Do `set' in a subshell so we don't clobber the current shell's 81485eefee25Smacallan# arguments. Must try -L first in case configure is actually a 81495eefee25Smacallan# symlink; some systems play weird games with the mod time of symlinks 81505eefee25Smacallan# (eg FreeBSD returns the mod time of the symlink's containing 81515eefee25Smacallan# directory). 81525eefee25Smacallanif ( 81535eefee25Smacallan set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 81545eefee25Smacallan if test "$[*]" = "X"; then 81555eefee25Smacallan # -L didn't work. 81565eefee25Smacallan set X `ls -t $srcdir/configure conftest.file` 81575eefee25Smacallan fi 81585eefee25Smacallan rm -f conftest.file 81595eefee25Smacallan if test "$[*]" != "X $srcdir/configure conftest.file" \ 81605eefee25Smacallan && test "$[*]" != "X conftest.file $srcdir/configure"; then 81615eefee25Smacallan 81625eefee25Smacallan # If neither matched, then we have a broken ls. This can happen 81635eefee25Smacallan # if, for instance, CONFIG_SHELL is bash and it inherits a 81645eefee25Smacallan # broken ls alias from the environment. This has actually 81655eefee25Smacallan # happened. Such a system could not be considered "sane". 81665eefee25Smacallan AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 81675eefee25Smacallanalias in your environment]) 81685eefee25Smacallan fi 81695eefee25Smacallan 81705eefee25Smacallan test "$[2]" = conftest.file 81715eefee25Smacallan ) 81725eefee25Smacallanthen 81735eefee25Smacallan # Ok. 81745eefee25Smacallan : 81755eefee25Smacallanelse 81765eefee25Smacallan AC_MSG_ERROR([newly created file is older than distributed files! 81775eefee25SmacallanCheck your system clock]) 81785eefee25Smacallanfi 81795eefee25SmacallanAC_MSG_RESULT(yes)]) 81805eefee25Smacallan 81815eefee25Smacallan# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 81825eefee25Smacallan# 81835eefee25Smacallan# This file is free software; the Free Software Foundation 81845eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 81855eefee25Smacallan# with or without modifications, as long as this notice is preserved. 81865eefee25Smacallan 81875eefee25Smacallan# AM_PROG_INSTALL_STRIP 81885eefee25Smacallan# --------------------- 81895eefee25Smacallan# One issue with vendor `install' (even GNU) is that you can't 81905eefee25Smacallan# specify the program used to strip binaries. This is especially 81915eefee25Smacallan# annoying in cross-compiling environments, where the build's strip 81925eefee25Smacallan# is unlikely to handle the host's binaries. 81935eefee25Smacallan# Fortunately install-sh will honor a STRIPPROG variable, so we 81945eefee25Smacallan# always use install-sh in `make install-strip', and initialize 81955eefee25Smacallan# STRIPPROG with the value of the STRIP variable (set by the user). 81965eefee25SmacallanAC_DEFUN([AM_PROG_INSTALL_STRIP], 81975eefee25Smacallan[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 81985eefee25Smacallan# Installed binaries are usually stripped using `strip' when the user 81995eefee25Smacallan# run `make install-strip'. However `strip' might not be the right 82005eefee25Smacallan# tool to use in cross-compilation environments, therefore Automake 82015eefee25Smacallan# will honor the `STRIP' environment variable to overrule this program. 82025eefee25Smacallandnl Don't test for $cross_compiling = yes, because it might be `maybe'. 82035eefee25Smacallanif test "$cross_compiling" != no; then 82045eefee25Smacallan AC_CHECK_TOOL([STRIP], [strip], :) 82055eefee25Smacallanfi 820662ab96baSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 82075eefee25SmacallanAC_SUBST([INSTALL_STRIP_PROGRAM])]) 82085eefee25Smacallan 820962ab96baSmrg# Copyright (C) 2006 Free Software Foundation, Inc. 821062ab96baSmrg# 821162ab96baSmrg# This file is free software; the Free Software Foundation 821262ab96baSmrg# gives unlimited permission to copy and/or distribute it, 821362ab96baSmrg# with or without modifications, as long as this notice is preserved. 821462ab96baSmrg 821562ab96baSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 821662ab96baSmrg# --------------------------- 821762ab96baSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 821862ab96baSmrg# This macro is traced by Automake. 821962ab96baSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 822062ab96baSmrg 82215eefee25Smacallan# Check how to create a tarball. -*- Autoconf -*- 82225eefee25Smacallan 82235eefee25Smacallan# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 82245eefee25Smacallan# 82255eefee25Smacallan# This file is free software; the Free Software Foundation 82265eefee25Smacallan# gives unlimited permission to copy and/or distribute it, 82275eefee25Smacallan# with or without modifications, as long as this notice is preserved. 82285eefee25Smacallan 82295eefee25Smacallan# serial 2 82305eefee25Smacallan 82315eefee25Smacallan# _AM_PROG_TAR(FORMAT) 82325eefee25Smacallan# -------------------- 82335eefee25Smacallan# Check how to create a tarball in format FORMAT. 82345eefee25Smacallan# FORMAT should be one of `v7', `ustar', or `pax'. 82355eefee25Smacallan# 82365eefee25Smacallan# Substitute a variable $(am__tar) that is a command 82375eefee25Smacallan# writing to stdout a FORMAT-tarball containing the directory 82385eefee25Smacallan# $tardir. 82395eefee25Smacallan# tardir=directory && $(am__tar) > result.tar 82405eefee25Smacallan# 82415eefee25Smacallan# Substitute a variable $(am__untar) that extract such 82425eefee25Smacallan# a tarball read from stdin. 82435eefee25Smacallan# $(am__untar) < result.tar 82445eefee25SmacallanAC_DEFUN([_AM_PROG_TAR], 82455eefee25Smacallan[# Always define AMTAR for backward compatibility. 82465eefee25SmacallanAM_MISSING_PROG([AMTAR], [tar]) 82475eefee25Smacallanm4_if([$1], [v7], 82485eefee25Smacallan [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 82495eefee25Smacallan [m4_case([$1], [ustar],, [pax],, 82505eefee25Smacallan [m4_fatal([Unknown tar format])]) 82515eefee25SmacallanAC_MSG_CHECKING([how to create a $1 tar archive]) 82525eefee25Smacallan# Loop over all known methods to create a tar archive until one works. 82535eefee25Smacallan_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 82545eefee25Smacallan_am_tools=${am_cv_prog_tar_$1-$_am_tools} 82555eefee25Smacallan# Do not fold the above two line into one, because Tru64 sh and 82565eefee25Smacallan# Solaris sh will not grok spaces in the rhs of `-'. 82575eefee25Smacallanfor _am_tool in $_am_tools 82585eefee25Smacallando 82595eefee25Smacallan case $_am_tool in 82605eefee25Smacallan gnutar) 82615eefee25Smacallan for _am_tar in tar gnutar gtar; 82625eefee25Smacallan do 82635eefee25Smacallan AM_RUN_LOG([$_am_tar --version]) && break 82645eefee25Smacallan done 82655eefee25Smacallan am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 82665eefee25Smacallan am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 82675eefee25Smacallan am__untar="$_am_tar -xf -" 82685eefee25Smacallan ;; 82695eefee25Smacallan plaintar) 82705eefee25Smacallan # Must skip GNU tar: if it does not support --format= it doesn't create 82715eefee25Smacallan # ustar tarball either. 82725eefee25Smacallan (tar --version) >/dev/null 2>&1 && continue 82735eefee25Smacallan am__tar='tar chf - "$$tardir"' 82745eefee25Smacallan am__tar_='tar chf - "$tardir"' 82755eefee25Smacallan am__untar='tar xf -' 82765eefee25Smacallan ;; 82775eefee25Smacallan pax) 82785eefee25Smacallan am__tar='pax -L -x $1 -w "$$tardir"' 82795eefee25Smacallan am__tar_='pax -L -x $1 -w "$tardir"' 82805eefee25Smacallan am__untar='pax -r' 82815eefee25Smacallan ;; 82825eefee25Smacallan cpio) 82835eefee25Smacallan am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 82845eefee25Smacallan am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 82855eefee25Smacallan am__untar='cpio -i -H $1 -d' 82865eefee25Smacallan ;; 82875eefee25Smacallan none) 82885eefee25Smacallan am__tar=false 82895eefee25Smacallan am__tar_=false 82905eefee25Smacallan am__untar=false 82915eefee25Smacallan ;; 82925eefee25Smacallan esac 82935eefee25Smacallan 82945eefee25Smacallan # If the value was cached, stop now. We just wanted to have am__tar 82955eefee25Smacallan # and am__untar set. 82965eefee25Smacallan test -n "${am_cv_prog_tar_$1}" && break 82975eefee25Smacallan 82985eefee25Smacallan # tar/untar a dummy directory, and stop if the command works 82995eefee25Smacallan rm -rf conftest.dir 83005eefee25Smacallan mkdir conftest.dir 83015eefee25Smacallan echo GrepMe > conftest.dir/file 83025eefee25Smacallan AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 83035eefee25Smacallan rm -rf conftest.dir 83045eefee25Smacallan if test -s conftest.tar; then 83055eefee25Smacallan AM_RUN_LOG([$am__untar <conftest.tar]) 83065eefee25Smacallan grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 83075eefee25Smacallan fi 83085eefee25Smacallandone 83095eefee25Smacallanrm -rf conftest.dir 83105eefee25Smacallan 83115eefee25SmacallanAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 83125eefee25SmacallanAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 83135eefee25SmacallanAC_SUBST([am__tar]) 83145eefee25SmacallanAC_SUBST([am__untar]) 83155eefee25Smacallan]) # _AM_PROG_TAR 83165eefee25Smacallan 8317