aclocal.m4 revision 2a51b5be
12a51b5beSmrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 232b578d3Smrg 332b578d3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42a51b5beSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 532b578d3Smrg# This file is free software; the Free Software Foundation 632b578d3Smrg# gives unlimited permission to copy and/or distribute it, 732b578d3Smrg# with or without modifications, as long as this notice is preserved. 832b578d3Smrg 932b578d3Smrg# This program is distributed in the hope that it will be useful, 1032b578d3Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1132b578d3Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1232b578d3Smrg# PARTICULAR PURPOSE. 1332b578d3Smrg 142a51b5beSmrgm4_ifndef([AC_AUTOCONF_VERSION], 152a51b5beSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 162a51b5beSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 172a51b5beSmrg[m4_warning([this file was generated for autoconf 2.63. 182a51b5beSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 192a51b5beSmrgIf you have problems, you may need to regenerate the build system entirely. 202a51b5beSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 2132b578d3Smrg 222a51b5beSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2332b578d3Smrg 242a51b5beSmrg# serial 52 AC_PROG_LIBTOOL 2532b578d3Smrg 2632b578d3Smrg 272a51b5beSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 282a51b5beSmrg# ----------------------------------------------------------- 292a51b5beSmrg# If this macro is not defined by Autoconf, define it here. 302a51b5beSmrgm4_ifdef([AC_PROVIDE_IFELSE], 312a51b5beSmrg [], 322a51b5beSmrg [m4_define([AC_PROVIDE_IFELSE], 332a51b5beSmrg [m4_ifdef([AC_PROVIDE_$1], 342a51b5beSmrg [$2], [$3])])]) 3532b578d3Smrg 3632b578d3Smrg 372a51b5beSmrg# AC_PROG_LIBTOOL 382a51b5beSmrg# --------------- 392a51b5beSmrgAC_DEFUN([AC_PROG_LIBTOOL], 402a51b5beSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 412a51b5beSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 422a51b5beSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 432a51b5beSmrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 442a51b5beSmrg [AC_LIBTOOL_CXX], 452a51b5beSmrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 462a51b5beSmrg ])]) 472a51b5beSmrgdnl And a similar setup for Fortran 77 support 482a51b5beSmrg AC_PROVIDE_IFELSE([AC_PROG_F77], 492a51b5beSmrg [AC_LIBTOOL_F77], 502a51b5beSmrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 512a51b5beSmrg])]) 5232b578d3Smrg 532a51b5beSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 542a51b5beSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 552a51b5beSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 562a51b5beSmrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 572a51b5beSmrg [AC_LIBTOOL_GCJ], 582a51b5beSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 592a51b5beSmrg [AC_LIBTOOL_GCJ], 602a51b5beSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 612a51b5beSmrg [AC_LIBTOOL_GCJ], 622a51b5beSmrg [ifdef([AC_PROG_GCJ], 632a51b5beSmrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 642a51b5beSmrg ifdef([A][M_PROG_GCJ], 652a51b5beSmrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 662a51b5beSmrg ifdef([LT_AC_PROG_GCJ], 672a51b5beSmrg [define([LT_AC_PROG_GCJ], 682a51b5beSmrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 692a51b5beSmrg])])# AC_PROG_LIBTOOL 7032b578d3Smrg 7132b578d3Smrg 722a51b5beSmrg# _AC_PROG_LIBTOOL 732a51b5beSmrg# ---------------- 742a51b5beSmrgAC_DEFUN([_AC_PROG_LIBTOOL], 752a51b5beSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 762a51b5beSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 772a51b5beSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 782a51b5beSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 7932b578d3Smrg 802a51b5beSmrg# This can be used to rebuild libtool when needed 812a51b5beSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 8232b578d3Smrg 832a51b5beSmrg# Always use our own libtool. 842a51b5beSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 852a51b5beSmrgAC_SUBST(LIBTOOL)dnl 8632b578d3Smrg 872a51b5beSmrg# Prevent multiple expansion 882a51b5beSmrgdefine([AC_PROG_LIBTOOL], []) 892a51b5beSmrg])# _AC_PROG_LIBTOOL 9032b578d3Smrg 9132b578d3Smrg 922a51b5beSmrg# AC_LIBTOOL_SETUP 932a51b5beSmrg# ---------------- 942a51b5beSmrgAC_DEFUN([AC_LIBTOOL_SETUP], 952a51b5beSmrg[AC_PREREQ(2.50)dnl 962a51b5beSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 972a51b5beSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 982a51b5beSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 992a51b5beSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 1002a51b5beSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1012a51b5beSmrgAC_REQUIRE([AC_PROG_CC])dnl 1022a51b5beSmrgAC_REQUIRE([AC_PROG_LD])dnl 1032a51b5beSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 1042a51b5beSmrgAC_REQUIRE([AC_PROG_NM])dnl 10532b578d3Smrg 1062a51b5beSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1072a51b5beSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 1082a51b5beSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 1092a51b5beSmrgAC_REQUIRE([AC_OBJEXT])dnl 1102a51b5beSmrgAC_REQUIRE([AC_EXEEXT])dnl 1112a51b5beSmrgdnl 1122a51b5beSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 1132a51b5beSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 1142a51b5beSmrgAC_LIBTOOL_OBJDIR 11532b578d3Smrg 1162a51b5beSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1172a51b5beSmrg_LT_AC_PROG_ECHO_BACKSLASH 11832b578d3Smrg 1192a51b5beSmrgcase $host_os in 1202a51b5beSmrgaix3*) 1212a51b5beSmrg # AIX sometimes has problems with the GCC collect2 program. For some 1222a51b5beSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 1232a51b5beSmrg # vanish in a puff of smoke. 1242a51b5beSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 1252a51b5beSmrg COLLECT_NAMES= 1262a51b5beSmrg export COLLECT_NAMES 1272a51b5beSmrg fi 1282a51b5beSmrg ;; 1292a51b5beSmrgesac 13032b578d3Smrg 1312a51b5beSmrg# Sed substitution that helps us do robust quoting. It backslashifies 1322a51b5beSmrg# metacharacters that are still active within double-quoted strings. 1332a51b5beSmrgXsed='sed -e 1s/^X//' 1342a51b5beSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 13532b578d3Smrg 1362a51b5beSmrg# Same as above, but do not quote variable references. 1372a51b5beSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 13832b578d3Smrg 1392a51b5beSmrg# Sed substitution to delay expansion of an escaped shell variable in a 1402a51b5beSmrg# double_quote_subst'ed string. 1412a51b5beSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 14232b578d3Smrg 1432a51b5beSmrg# Sed substitution to avoid accidental globbing in evaled expressions 1442a51b5beSmrgno_glob_subst='s/\*/\\\*/g' 14532b578d3Smrg 1462a51b5beSmrg# Constants: 1472a51b5beSmrgrm="rm -f" 14832b578d3Smrg 1492a51b5beSmrg# Global variables: 1502a51b5beSmrgdefault_ofile=libtool 1512a51b5beSmrgcan_build_shared=yes 15232b578d3Smrg 1532a51b5beSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 1542a51b5beSmrg# which needs '.lib'). 1552a51b5beSmrglibext=a 1562a51b5beSmrgltmain="$ac_aux_dir/ltmain.sh" 1572a51b5beSmrgofile="$default_ofile" 1582a51b5beSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 15932b578d3Smrg 1602a51b5beSmrgAC_CHECK_TOOL(AR, ar, false) 1612a51b5beSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1622a51b5beSmrgAC_CHECK_TOOL(STRIP, strip, :) 16332b578d3Smrg 1642a51b5beSmrgold_CC="$CC" 1652a51b5beSmrgold_CFLAGS="$CFLAGS" 16632b578d3Smrg 1672a51b5beSmrg# Set sane defaults for various variables 1682a51b5beSmrgtest -z "$AR" && AR=ar 1692a51b5beSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1702a51b5beSmrgtest -z "$AS" && AS=as 1712a51b5beSmrgtest -z "$CC" && CC=cc 1722a51b5beSmrgtest -z "$LTCC" && LTCC=$CC 1732a51b5beSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1742a51b5beSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 1752a51b5beSmrgtest -z "$LD" && LD=ld 1762a51b5beSmrgtest -z "$LN_S" && LN_S="ln -s" 1772a51b5beSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 1782a51b5beSmrgtest -z "$NM" && NM=nm 1792a51b5beSmrgtest -z "$SED" && SED=sed 1802a51b5beSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 1812a51b5beSmrgtest -z "$RANLIB" && RANLIB=: 1822a51b5beSmrgtest -z "$STRIP" && STRIP=: 1832a51b5beSmrgtest -z "$ac_objext" && ac_objext=o 18432b578d3Smrg 1852a51b5beSmrg# Determine commands to create old-style static archives. 1862a51b5beSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1872a51b5beSmrgold_postinstall_cmds='chmod 644 $oldlib' 1882a51b5beSmrgold_postuninstall_cmds= 18932b578d3Smrg 1902a51b5beSmrgif test -n "$RANLIB"; then 1912a51b5beSmrg case $host_os in 1922a51b5beSmrg openbsd*) 1932a51b5beSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1942a51b5beSmrg ;; 1952a51b5beSmrg *) 1962a51b5beSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1972a51b5beSmrg ;; 1982a51b5beSmrg esac 1992a51b5beSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 200d31dbc53Smrgfi 20132b578d3Smrg 2022a51b5beSmrg_LT_CC_BASENAME([$compiler]) 20332b578d3Smrg 2042a51b5beSmrg# Only perform the check for file, if the check method requires it 2052a51b5beSmrgcase $deplibs_check_method in 2062a51b5beSmrgfile_magic*) 2072a51b5beSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2082a51b5beSmrg AC_PATH_MAGIC 2092a51b5beSmrg fi 2102a51b5beSmrg ;; 2112a51b5beSmrgesac 21232b578d3Smrg 2132a51b5beSmrg_LT_REQUIRED_DARWIN_CHECKS 21432b578d3Smrg 2152a51b5beSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 2162a51b5beSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 2172a51b5beSmrgenable_win32_dll=yes, enable_win32_dll=no) 21832b578d3Smrg 2192a51b5beSmrgAC_ARG_ENABLE([libtool-lock], 2202a51b5beSmrg [AC_HELP_STRING([--disable-libtool-lock], 2212a51b5beSmrg [avoid locking (might break parallel builds)])]) 2222a51b5beSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 22332b578d3Smrg 2242a51b5beSmrgAC_ARG_WITH([pic], 2252a51b5beSmrg [AC_HELP_STRING([--with-pic], 2262a51b5beSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 2272a51b5beSmrg [pic_mode="$withval"], 2282a51b5beSmrg [pic_mode=default]) 2292a51b5beSmrgtest -z "$pic_mode" && pic_mode=default 23032b578d3Smrg 2312a51b5beSmrg# Use C for the default configuration in the libtool script 2322a51b5beSmrgtagname= 2332a51b5beSmrgAC_LIBTOOL_LANG_C_CONFIG 2342a51b5beSmrg_LT_AC_TAGCONFIG 2352a51b5beSmrg])# AC_LIBTOOL_SETUP 23632b578d3Smrg 23732b578d3Smrg 2382a51b5beSmrg# _LT_AC_SYS_COMPILER 2392a51b5beSmrg# ------------------- 2402a51b5beSmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 2412a51b5beSmrg[AC_REQUIRE([AC_PROG_CC])dnl 24232b578d3Smrg 2432a51b5beSmrg# If no C compiler was specified, use CC. 2442a51b5beSmrgLTCC=${LTCC-"$CC"} 24532b578d3Smrg 2462a51b5beSmrg# If no C compiler flags were specified, use CFLAGS. 2472a51b5beSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 24832b578d3Smrg 2492a51b5beSmrg# Allow CC to be a program name with arguments. 2502a51b5beSmrgcompiler=$CC 2512a51b5beSmrg])# _LT_AC_SYS_COMPILER 25232b578d3Smrg 25332b578d3Smrg 2542a51b5beSmrg# _LT_CC_BASENAME(CC) 2552a51b5beSmrg# ------------------- 2562a51b5beSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2572a51b5beSmrgAC_DEFUN([_LT_CC_BASENAME], 2582a51b5beSmrg[for cc_temp in $1""; do 2592a51b5beSmrg case $cc_temp in 2602a51b5beSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2612a51b5beSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2622a51b5beSmrg \-*) ;; 2632a51b5beSmrg *) break;; 2642a51b5beSmrg esac 2652a51b5beSmrgdone 2662a51b5beSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 2672a51b5beSmrg]) 26832b578d3Smrg 26932b578d3Smrg 2702a51b5beSmrg# _LT_COMPILER_BOILERPLATE 2712a51b5beSmrg# ------------------------ 2722a51b5beSmrg# Check for compiler boilerplate output or warnings with 2732a51b5beSmrg# the simple compiler test code. 2742a51b5beSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 2752a51b5beSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 2762a51b5beSmrgac_outfile=conftest.$ac_objext 2772a51b5beSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 2782a51b5beSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2792a51b5beSmrg_lt_compiler_boilerplate=`cat conftest.err` 2802a51b5beSmrg$rm conftest* 2812a51b5beSmrg])# _LT_COMPILER_BOILERPLATE 28232b578d3Smrg 28332b578d3Smrg 2842a51b5beSmrg# _LT_LINKER_BOILERPLATE 2852a51b5beSmrg# ---------------------- 2862a51b5beSmrg# Check for linker boilerplate output or warnings with 2872a51b5beSmrg# the simple link test code. 2882a51b5beSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 2892a51b5beSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 2902a51b5beSmrgac_outfile=conftest.$ac_objext 2912a51b5beSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 2922a51b5beSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2932a51b5beSmrg_lt_linker_boilerplate=`cat conftest.err` 2942a51b5beSmrg$rm -r conftest* 2952a51b5beSmrg])# _LT_LINKER_BOILERPLATE 29632b578d3Smrg 2972a51b5beSmrg# _LT_REQUIRED_DARWIN_CHECKS 2982a51b5beSmrg# -------------------------- 2992a51b5beSmrg# Check for some things on darwin 3002a51b5beSmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ 3012a51b5beSmrg case $host_os in 3022a51b5beSmrg rhapsody* | darwin*) 3032a51b5beSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 3042a51b5beSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 3052a51b5beSmrg 3062a51b5beSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 3072a51b5beSmrg [lt_cv_apple_cc_single_mod=no 3082a51b5beSmrg if test -z "${LT_MULTI_MODULE}"; then 3092a51b5beSmrg # By default we will add the -single_module flag. You can override 3102a51b5beSmrg # by either setting the environment variable LT_MULTI_MODULE 3112a51b5beSmrg # non-empty at configure time, or by adding -multi_module to the 3122a51b5beSmrg # link flags. 3132a51b5beSmrg echo "int foo(void){return 1;}" > conftest.c 3142a51b5beSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3152a51b5beSmrg -dynamiclib ${wl}-single_module conftest.c 3162a51b5beSmrg if test -f libconftest.dylib; then 3172a51b5beSmrg lt_cv_apple_cc_single_mod=yes 3182a51b5beSmrg rm -rf libconftest.dylib* 3192a51b5beSmrg fi 3202a51b5beSmrg rm conftest.c 3212a51b5beSmrg fi]) 3222a51b5beSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 3232a51b5beSmrg [lt_cv_ld_exported_symbols_list], 3242a51b5beSmrg [lt_cv_ld_exported_symbols_list=no 3252a51b5beSmrg save_LDFLAGS=$LDFLAGS 3262a51b5beSmrg echo "_main" > conftest.sym 3272a51b5beSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 3282a51b5beSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3292a51b5beSmrg [lt_cv_ld_exported_symbols_list=yes], 3302a51b5beSmrg [lt_cv_ld_exported_symbols_list=no]) 3312a51b5beSmrg LDFLAGS="$save_LDFLAGS" 3322a51b5beSmrg ]) 3332a51b5beSmrg case $host_os in 3342a51b5beSmrg rhapsody* | darwin1.[[0123]]) 3352a51b5beSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 3362a51b5beSmrg darwin1.*) 3372a51b5beSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3382a51b5beSmrg darwin*) 3392a51b5beSmrg # if running on 10.5 or later, the deployment target defaults 3402a51b5beSmrg # to the OS version, if on x86, and 10.4, the deployment 3412a51b5beSmrg # target defaults to 10.4. Don't you love it? 3422a51b5beSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 3432a51b5beSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 3442a51b5beSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3452a51b5beSmrg 10.[[012]]*) 3462a51b5beSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3472a51b5beSmrg 10.*) 3482a51b5beSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3492a51b5beSmrg esac 3502a51b5beSmrg ;; 3512a51b5beSmrg esac 3522a51b5beSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 3532a51b5beSmrg _lt_dar_single_mod='$single_module' 354d31dbc53Smrg fi 3552a51b5beSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 3562a51b5beSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 3572a51b5beSmrg else 3582a51b5beSmrg _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 3592a51b5beSmrg fi 3602a51b5beSmrg if test "$DSYMUTIL" != ":"; then 3612a51b5beSmrg _lt_dsymutil="~$DSYMUTIL \$lib || :" 3622a51b5beSmrg else 3632a51b5beSmrg _lt_dsymutil= 3642a51b5beSmrg fi 3652a51b5beSmrg ;; 3662a51b5beSmrg esac 367d31dbc53Smrg]) 36832b578d3Smrg 3692a51b5beSmrg# _LT_AC_SYS_LIBPATH_AIX 3702a51b5beSmrg# ---------------------- 3712a51b5beSmrg# Links a minimal program and checks the executable 3722a51b5beSmrg# for the system default hardcoded library path. In most cases, 3732a51b5beSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 3742a51b5beSmrg# the location of the communication and MPI libs are included too. 3752a51b5beSmrg# If we don't find anything, use the default library path according 3762a51b5beSmrg# to the aix ld manual. 3772a51b5beSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 3782a51b5beSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 3792a51b5beSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 3802a51b5beSmrglt_aix_libpath_sed=' 3812a51b5beSmrg /Import File Strings/,/^$/ { 3822a51b5beSmrg /^0/ { 3832a51b5beSmrg s/^0 *\(.*\)$/\1/ 3842a51b5beSmrg p 3852a51b5beSmrg } 3862a51b5beSmrg }' 3872a51b5beSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3882a51b5beSmrg# Check for a 64-bit object if we didn't find anything. 3892a51b5beSmrgif test -z "$aix_libpath"; then 3902a51b5beSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3912a51b5beSmrgfi],[]) 3922a51b5beSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 3932a51b5beSmrg])# _LT_AC_SYS_LIBPATH_AIX 39432b578d3Smrg 39532b578d3Smrg 3962a51b5beSmrg# _LT_AC_SHELL_INIT(ARG) 3972a51b5beSmrg# ---------------------- 3982a51b5beSmrgAC_DEFUN([_LT_AC_SHELL_INIT], 3992a51b5beSmrg[ifdef([AC_DIVERSION_NOTICE], 4002a51b5beSmrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 4012a51b5beSmrg [AC_DIVERT_PUSH(NOTICE)]) 4022a51b5beSmrg$1 4032a51b5beSmrgAC_DIVERT_POP 4042a51b5beSmrg])# _LT_AC_SHELL_INIT 40532b578d3Smrg 40632b578d3Smrg 4072a51b5beSmrg# _LT_AC_PROG_ECHO_BACKSLASH 4082a51b5beSmrg# -------------------------- 4092a51b5beSmrg# Add some code to the start of the generated configure script which 4102a51b5beSmrg# will find an echo command which doesn't interpret backslashes. 4112a51b5beSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 4122a51b5beSmrg[_LT_AC_SHELL_INIT([ 4132a51b5beSmrg# Check that we are running under the correct shell. 4142a51b5beSmrgSHELL=${CONFIG_SHELL-/bin/sh} 415d31dbc53Smrg 4162a51b5beSmrgcase X$ECHO in 4172a51b5beSmrgX*--fallback-echo) 4182a51b5beSmrg # Remove one level of quotation (which was required for Make). 4192a51b5beSmrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 4202a51b5beSmrg ;; 4212a51b5beSmrgesac 422d31dbc53Smrg 4232a51b5beSmrgecho=${ECHO-echo} 4242a51b5beSmrgif test "X[$]1" = X--no-reexec; then 4252a51b5beSmrg # Discard the --no-reexec flag, and continue. 4262a51b5beSmrg shift 4272a51b5beSmrgelif test "X[$]1" = X--fallback-echo; then 4282a51b5beSmrg # Avoid inline document here, it may be left over 4292a51b5beSmrg : 4302a51b5beSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 4312a51b5beSmrg # Yippee, $echo works! 4322a51b5beSmrg : 4332a51b5beSmrgelse 4342a51b5beSmrg # Restart under the correct shell. 4352a51b5beSmrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 4362a51b5beSmrgfi 43732b578d3Smrg 4382a51b5beSmrgif test "X[$]1" = X--fallback-echo; then 4392a51b5beSmrg # used as fallback echo 4402a51b5beSmrg shift 4412a51b5beSmrg cat <<EOF 4422a51b5beSmrg[$]* 4432a51b5beSmrgEOF 4442a51b5beSmrg exit 0 4452a51b5beSmrgfi 44632b578d3Smrg 4472a51b5beSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 4482a51b5beSmrg# if CDPATH is set. 4492a51b5beSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 45032b578d3Smrg 4512a51b5beSmrgif test -z "$ECHO"; then 4522a51b5beSmrgif test "X${echo_test_string+set}" != Xset; then 4532a51b5beSmrg# find a string as large as possible, as long as the shell can cope with it 4542a51b5beSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 4552a51b5beSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 4562a51b5beSmrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 4572a51b5beSmrg echo_test_string=`eval $cmd` && 4582a51b5beSmrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 4592a51b5beSmrg then 4602a51b5beSmrg break 4612a51b5beSmrg fi 4622a51b5beSmrg done 4632a51b5beSmrgfi 46432b578d3Smrg 4652a51b5beSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 4662a51b5beSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 4672a51b5beSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 4682a51b5beSmrg : 46932b578d3Smrgelse 4702a51b5beSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 4712a51b5beSmrg # backslashes. This makes it impossible to quote backslashes using 4722a51b5beSmrg # echo "$something" | sed 's/\\/\\\\/g' 4732a51b5beSmrg # 4742a51b5beSmrg # So, first we look for a working echo in the user's PATH. 47532b578d3Smrg 4762a51b5beSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4772a51b5beSmrg for dir in $PATH /usr/ucb; do 4782a51b5beSmrg IFS="$lt_save_ifs" 4792a51b5beSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 4802a51b5beSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 4812a51b5beSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 4822a51b5beSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 4832a51b5beSmrg echo="$dir/echo" 4842a51b5beSmrg break 4852a51b5beSmrg fi 4862a51b5beSmrg done 4872a51b5beSmrg IFS="$lt_save_ifs" 48832b578d3Smrg 4892a51b5beSmrg if test "X$echo" = Xecho; then 4902a51b5beSmrg # We didn't find a better echo, so look for alternatives. 4912a51b5beSmrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 4922a51b5beSmrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 4932a51b5beSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 4942a51b5beSmrg # This shell has a builtin print -r that does the trick. 4952a51b5beSmrg echo='print -r' 4962a51b5beSmrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 4972a51b5beSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 4982a51b5beSmrg # If we have ksh, try running configure again with it. 4992a51b5beSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 5002a51b5beSmrg export ORIGINAL_CONFIG_SHELL 5012a51b5beSmrg CONFIG_SHELL=/bin/ksh 5022a51b5beSmrg export CONFIG_SHELL 5032a51b5beSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 5042a51b5beSmrg else 5052a51b5beSmrg # Try using printf. 5062a51b5beSmrg echo='printf %s\n' 5072a51b5beSmrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 5082a51b5beSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 5092a51b5beSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 5102a51b5beSmrg # Cool, printf works 5112a51b5beSmrg : 5122a51b5beSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 5132a51b5beSmrg test "X$echo_testing_string" = 'X\t' && 5142a51b5beSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 5152a51b5beSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 5162a51b5beSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 5172a51b5beSmrg export CONFIG_SHELL 5182a51b5beSmrg SHELL="$CONFIG_SHELL" 5192a51b5beSmrg export SHELL 5202a51b5beSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 5212a51b5beSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 5222a51b5beSmrg test "X$echo_testing_string" = 'X\t' && 5232a51b5beSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 5242a51b5beSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 5252a51b5beSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 5262a51b5beSmrg else 5272a51b5beSmrg # maybe with a smaller string... 5282a51b5beSmrg prev=: 52932b578d3Smrg 5302a51b5beSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 5312a51b5beSmrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 5322a51b5beSmrg then 5332a51b5beSmrg break 5342a51b5beSmrg fi 5352a51b5beSmrg prev="$cmd" 5362a51b5beSmrg done 53732b578d3Smrg 5382a51b5beSmrg if test "$prev" != 'sed 50q "[$]0"'; then 5392a51b5beSmrg echo_test_string=`eval $prev` 5402a51b5beSmrg export echo_test_string 5412a51b5beSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 5422a51b5beSmrg else 5432a51b5beSmrg # Oops. We lost completely, so just stick with echo. 5442a51b5beSmrg echo=echo 5452a51b5beSmrg fi 5462a51b5beSmrg fi 5472a51b5beSmrg fi 5482a51b5beSmrg fi 5492a51b5beSmrgfi 5502a51b5beSmrgfi 55132b578d3Smrg 5522a51b5beSmrg# Copy echo and quote the copy suitably for passing to libtool from 5532a51b5beSmrg# the Makefile, instead of quoting the original, which is used later. 5542a51b5beSmrgECHO=$echo 5552a51b5beSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 5562a51b5beSmrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 5572a51b5beSmrgfi 55832b578d3Smrg 5592a51b5beSmrgAC_SUBST(ECHO) 5602a51b5beSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH 56132b578d3Smrg 56232b578d3Smrg 5632a51b5beSmrg# _LT_AC_LOCK 5642a51b5beSmrg# ----------- 5652a51b5beSmrgAC_DEFUN([_LT_AC_LOCK], 5662a51b5beSmrg[AC_ARG_ENABLE([libtool-lock], 5672a51b5beSmrg [AC_HELP_STRING([--disable-libtool-lock], 5682a51b5beSmrg [avoid locking (might break parallel builds)])]) 5692a51b5beSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 570d31dbc53Smrg 5712a51b5beSmrg# Some flags need to be propagated to the compiler or linker for good 5722a51b5beSmrg# libtool support. 5732a51b5beSmrgcase $host in 5742a51b5beSmrgia64-*-hpux*) 5752a51b5beSmrg # Find out which ABI we are using. 5762a51b5beSmrg echo 'int i;' > conftest.$ac_ext 5772a51b5beSmrg if AC_TRY_EVAL(ac_compile); then 5782a51b5beSmrg case `/usr/bin/file conftest.$ac_objext` in 5792a51b5beSmrg *ELF-32*) 5802a51b5beSmrg HPUX_IA64_MODE="32" 5812a51b5beSmrg ;; 5822a51b5beSmrg *ELF-64*) 5832a51b5beSmrg HPUX_IA64_MODE="64" 584d31dbc53Smrg ;; 585d31dbc53Smrg esac 5862a51b5beSmrg fi 5872a51b5beSmrg rm -rf conftest* 5882a51b5beSmrg ;; 5892a51b5beSmrg*-*-irix6*) 5902a51b5beSmrg # Find out which ABI we are using. 5912a51b5beSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 5922a51b5beSmrg if AC_TRY_EVAL(ac_compile); then 5932a51b5beSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 5942a51b5beSmrg case `/usr/bin/file conftest.$ac_objext` in 5952a51b5beSmrg *32-bit*) 5962a51b5beSmrg LD="${LD-ld} -melf32bsmip" 5972a51b5beSmrg ;; 5982a51b5beSmrg *N32*) 5992a51b5beSmrg LD="${LD-ld} -melf32bmipn32" 6002a51b5beSmrg ;; 6012a51b5beSmrg *64-bit*) 6022a51b5beSmrg LD="${LD-ld} -melf64bmip" 6032a51b5beSmrg ;; 6042a51b5beSmrg esac 6052a51b5beSmrg else 6062a51b5beSmrg case `/usr/bin/file conftest.$ac_objext` in 6072a51b5beSmrg *32-bit*) 6082a51b5beSmrg LD="${LD-ld} -32" 6092a51b5beSmrg ;; 6102a51b5beSmrg *N32*) 6112a51b5beSmrg LD="${LD-ld} -n32" 6122a51b5beSmrg ;; 6132a51b5beSmrg *64-bit*) 6142a51b5beSmrg LD="${LD-ld} -64" 6152a51b5beSmrg ;; 6162a51b5beSmrg esac 6172a51b5beSmrg fi 6182a51b5beSmrg fi 6192a51b5beSmrg rm -rf conftest* 6202a51b5beSmrg ;; 62132b578d3Smrg 6222a51b5beSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 6232a51b5beSmrgs390*-*linux*|sparc*-*linux*) 6242a51b5beSmrg # Find out which ABI we are using. 6252a51b5beSmrg echo 'int i;' > conftest.$ac_ext 6262a51b5beSmrg if AC_TRY_EVAL(ac_compile); then 6272a51b5beSmrg case `/usr/bin/file conftest.o` in 6282a51b5beSmrg *32-bit*) 6292a51b5beSmrg case $host in 6302a51b5beSmrg x86_64-*kfreebsd*-gnu) 6312a51b5beSmrg LD="${LD-ld} -m elf_i386_fbsd" 6322a51b5beSmrg ;; 6332a51b5beSmrg x86_64-*linux*) 6342a51b5beSmrg LD="${LD-ld} -m elf_i386" 6352a51b5beSmrg ;; 6362a51b5beSmrg ppc64-*linux*|powerpc64-*linux*) 6372a51b5beSmrg LD="${LD-ld} -m elf32ppclinux" 6382a51b5beSmrg ;; 6392a51b5beSmrg s390x-*linux*) 6402a51b5beSmrg LD="${LD-ld} -m elf_s390" 6412a51b5beSmrg ;; 6422a51b5beSmrg sparc64-*linux*) 6432a51b5beSmrg LD="${LD-ld} -m elf32_sparc" 6442a51b5beSmrg ;; 6452a51b5beSmrg esac 6462a51b5beSmrg ;; 6472a51b5beSmrg *64-bit*) 6482a51b5beSmrg libsuff=64 6492a51b5beSmrg case $host in 6502a51b5beSmrg x86_64-*kfreebsd*-gnu) 6512a51b5beSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 6522a51b5beSmrg ;; 6532a51b5beSmrg x86_64-*linux*) 6542a51b5beSmrg LD="${LD-ld} -m elf_x86_64" 6552a51b5beSmrg ;; 6562a51b5beSmrg ppc*-*linux*|powerpc*-*linux*) 6572a51b5beSmrg LD="${LD-ld} -m elf64ppc" 6582a51b5beSmrg ;; 6592a51b5beSmrg s390*-*linux*) 6602a51b5beSmrg LD="${LD-ld} -m elf64_s390" 6612a51b5beSmrg ;; 6622a51b5beSmrg sparc*-*linux*) 6632a51b5beSmrg LD="${LD-ld} -m elf64_sparc" 6642a51b5beSmrg ;; 6652a51b5beSmrg esac 6662a51b5beSmrg ;; 6672a51b5beSmrg esac 6682a51b5beSmrg fi 6692a51b5beSmrg rm -rf conftest* 6702a51b5beSmrg ;; 67132b578d3Smrg 6722a51b5beSmrg*-*-sco3.2v5*) 6732a51b5beSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 6742a51b5beSmrg SAVE_CFLAGS="$CFLAGS" 6752a51b5beSmrg CFLAGS="$CFLAGS -belf" 6762a51b5beSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 6772a51b5beSmrg [AC_LANG_PUSH(C) 6782a51b5beSmrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 6792a51b5beSmrg AC_LANG_POP]) 6802a51b5beSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 6812a51b5beSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 6822a51b5beSmrg CFLAGS="$SAVE_CFLAGS" 6832a51b5beSmrg fi 6842a51b5beSmrg ;; 6852a51b5beSmrgsparc*-*solaris*) 6862a51b5beSmrg # Find out which ABI we are using. 6872a51b5beSmrg echo 'int i;' > conftest.$ac_ext 6882a51b5beSmrg if AC_TRY_EVAL(ac_compile); then 6892a51b5beSmrg case `/usr/bin/file conftest.o` in 6902a51b5beSmrg *64-bit*) 6912a51b5beSmrg case $lt_cv_prog_gnu_ld in 6922a51b5beSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 6932a51b5beSmrg *) 6942a51b5beSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 6952a51b5beSmrg LD="${LD-ld} -64" 6962a51b5beSmrg fi 6972a51b5beSmrg ;; 6982a51b5beSmrg esac 6992a51b5beSmrg ;; 7002a51b5beSmrg esac 7012a51b5beSmrg fi 7022a51b5beSmrg rm -rf conftest* 7032a51b5beSmrg ;; 70432b578d3Smrg 7052a51b5beSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 7062a51b5beSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 7072a51b5beSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7082a51b5beSmrg AC_CHECK_TOOL(AS, as, false) 7092a51b5beSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7102a51b5beSmrg ;; 7112a51b5beSmrg ]) 7122a51b5beSmrgesac 71332b578d3Smrg 7142a51b5beSmrgneed_locks="$enable_libtool_lock" 71532b578d3Smrg 7162a51b5beSmrg])# _LT_AC_LOCK 71732b578d3Smrg 71832b578d3Smrg 7192a51b5beSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 7202a51b5beSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 7212a51b5beSmrg# ---------------------------------------------------------------- 7222a51b5beSmrg# Check whether the given compiler option works 7232a51b5beSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 7242a51b5beSmrg[AC_REQUIRE([LT_AC_PROG_SED]) 7252a51b5beSmrgAC_CACHE_CHECK([$1], [$2], 7262a51b5beSmrg [$2=no 7272a51b5beSmrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 7282a51b5beSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 7292a51b5beSmrg lt_compiler_flag="$3" 7302a51b5beSmrg # Insert the option either (1) after the last *FLAGS variable, or 7312a51b5beSmrg # (2) before a word containing "conftest.", or (3) at the end. 7322a51b5beSmrg # Note that $ac_compile itself does not contain backslashes and begins 7332a51b5beSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 7342a51b5beSmrg # The option is referenced via a variable to avoid confusing sed. 7352a51b5beSmrg lt_compile=`echo "$ac_compile" | $SED \ 7362a51b5beSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 7372a51b5beSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 7382a51b5beSmrg -e 's:$: $lt_compiler_flag:'` 7392a51b5beSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 7402a51b5beSmrg (eval "$lt_compile" 2>conftest.err) 7412a51b5beSmrg ac_status=$? 7422a51b5beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7432a51b5beSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 7442a51b5beSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 7452a51b5beSmrg # The compiler can only warn and ignore the option if not recognized 7462a51b5beSmrg # So say no if there are warnings other than the usual output. 7472a51b5beSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 7482a51b5beSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 7492a51b5beSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 7502a51b5beSmrg $2=yes 7512a51b5beSmrg fi 7522a51b5beSmrg fi 7532a51b5beSmrg $rm conftest* 754d31dbc53Smrg]) 75532b578d3Smrg 7562a51b5beSmrgif test x"[$]$2" = xyes; then 7572a51b5beSmrg ifelse([$5], , :, [$5]) 7582a51b5beSmrgelse 7592a51b5beSmrg ifelse([$6], , :, [$6]) 7602a51b5beSmrgfi 7612a51b5beSmrg])# AC_LIBTOOL_COMPILER_OPTION 76232b578d3Smrg 76332b578d3Smrg 7642a51b5beSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 7652a51b5beSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 7662a51b5beSmrg# ------------------------------------------------------------ 7672a51b5beSmrg# Check whether the given compiler option works 7682a51b5beSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 7692a51b5beSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 7702a51b5beSmrgAC_CACHE_CHECK([$1], [$2], 7712a51b5beSmrg [$2=no 7722a51b5beSmrg save_LDFLAGS="$LDFLAGS" 7732a51b5beSmrg LDFLAGS="$LDFLAGS $3" 7742a51b5beSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 7752a51b5beSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 7762a51b5beSmrg # The linker can only warn and ignore the option if not recognized 7772a51b5beSmrg # So say no if there are warnings 7782a51b5beSmrg if test -s conftest.err; then 7792a51b5beSmrg # Append any errors to the config.log. 7802a51b5beSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 7812a51b5beSmrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 7822a51b5beSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 7832a51b5beSmrg if diff conftest.exp conftest.er2 >/dev/null; then 7842a51b5beSmrg $2=yes 7852a51b5beSmrg fi 7862a51b5beSmrg else 7872a51b5beSmrg $2=yes 7882a51b5beSmrg fi 7892a51b5beSmrg fi 7902a51b5beSmrg $rm -r conftest* 7912a51b5beSmrg LDFLAGS="$save_LDFLAGS" 7922a51b5beSmrg]) 79332b578d3Smrg 7942a51b5beSmrgif test x"[$]$2" = xyes; then 7952a51b5beSmrg ifelse([$4], , :, [$4]) 7962a51b5beSmrgelse 7972a51b5beSmrg ifelse([$5], , :, [$5]) 798d31dbc53Smrgfi 7992a51b5beSmrg])# AC_LIBTOOL_LINKER_OPTION 80032b578d3Smrg 80132b578d3Smrg 8022a51b5beSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 8032a51b5beSmrg# -------------------------- 8042a51b5beSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 8052a51b5beSmrg[# find the maximum length of command line arguments 8062a51b5beSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 8072a51b5beSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 8082a51b5beSmrg i=0 8092a51b5beSmrg teststring="ABCD" 81032b578d3Smrg 8112a51b5beSmrg case $build_os in 8122a51b5beSmrg msdosdjgpp*) 8132a51b5beSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 8142a51b5beSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 8152a51b5beSmrg # during glob expansion). Even if it were fixed, the result of this 8162a51b5beSmrg # check would be larger than it should be. 8172a51b5beSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 8182a51b5beSmrg ;; 81932b578d3Smrg 8202a51b5beSmrg gnu*) 8212a51b5beSmrg # Under GNU Hurd, this test is not required because there is 8222a51b5beSmrg # no limit to the length of command line arguments. 8232a51b5beSmrg # Libtool will interpret -1 as no limit whatsoever 8242a51b5beSmrg lt_cv_sys_max_cmd_len=-1; 8252a51b5beSmrg ;; 82632b578d3Smrg 8272a51b5beSmrg cygwin* | mingw*) 8282a51b5beSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 8292a51b5beSmrg # about 5 minutes as the teststring grows exponentially. 8302a51b5beSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 8312a51b5beSmrg # you end up with a "frozen" computer, even though with patience 8322a51b5beSmrg # the test eventually succeeds (with a max line length of 256k). 8332a51b5beSmrg # Instead, let's just punt: use the minimum linelength reported by 8342a51b5beSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 8352a51b5beSmrg lt_cv_sys_max_cmd_len=8192; 8362a51b5beSmrg ;; 83732b578d3Smrg 8382a51b5beSmrg amigaos*) 8392a51b5beSmrg # On AmigaOS with pdksh, this test takes hours, literally. 8402a51b5beSmrg # So we just punt and use a minimum line length of 8192. 8412a51b5beSmrg lt_cv_sys_max_cmd_len=8192; 8422a51b5beSmrg ;; 84332b578d3Smrg 8442a51b5beSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 8452a51b5beSmrg # This has been around since 386BSD, at least. Likely further. 8462a51b5beSmrg if test -x /sbin/sysctl; then 8472a51b5beSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 8482a51b5beSmrg elif test -x /usr/sbin/sysctl; then 8492a51b5beSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 8502a51b5beSmrg else 8512a51b5beSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 8522a51b5beSmrg fi 8532a51b5beSmrg # And add a safety zone 8542a51b5beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 8552a51b5beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 8562a51b5beSmrg ;; 85732b578d3Smrg 8582a51b5beSmrg interix*) 8592a51b5beSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 8602a51b5beSmrg lt_cv_sys_max_cmd_len=196608 8612a51b5beSmrg ;; 862d31dbc53Smrg 8632a51b5beSmrg osf*) 8642a51b5beSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 8652a51b5beSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 8662a51b5beSmrg # nice to cause kernel panics so lets avoid the loop below. 8672a51b5beSmrg # First set a reasonable default. 8682a51b5beSmrg lt_cv_sys_max_cmd_len=16384 8692a51b5beSmrg # 8702a51b5beSmrg if test -x /sbin/sysconfig; then 8712a51b5beSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 8722a51b5beSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 8732a51b5beSmrg esac 8742a51b5beSmrg fi 8752a51b5beSmrg ;; 8762a51b5beSmrg sco3.2v5*) 8772a51b5beSmrg lt_cv_sys_max_cmd_len=102400 8782a51b5beSmrg ;; 8792a51b5beSmrg sysv5* | sco5v6* | sysv4.2uw2*) 8802a51b5beSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 8812a51b5beSmrg if test -n "$kargmax"; then 8822a51b5beSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 8832a51b5beSmrg else 8842a51b5beSmrg lt_cv_sys_max_cmd_len=32768 8852a51b5beSmrg fi 8862a51b5beSmrg ;; 8872a51b5beSmrg *) 8882a51b5beSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 8892a51b5beSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 8902a51b5beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 8912a51b5beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 8922a51b5beSmrg else 8932a51b5beSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 8942a51b5beSmrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 8952a51b5beSmrg = "XX$teststring") >/dev/null 2>&1 && 8962a51b5beSmrg new_result=`expr "X$teststring" : ".*" 2>&1` && 8972a51b5beSmrg lt_cv_sys_max_cmd_len=$new_result && 8982a51b5beSmrg test $i != 17 # 1/2 MB should be enough 8992a51b5beSmrg do 9002a51b5beSmrg i=`expr $i + 1` 9012a51b5beSmrg teststring=$teststring$teststring 9022a51b5beSmrg done 9032a51b5beSmrg teststring= 9042a51b5beSmrg # Add a significant safety factor because C++ compilers can tack on massive 9052a51b5beSmrg # amounts of additional arguments before passing them to the linker. 9062a51b5beSmrg # It appears as though 1/2 is a usable value. 9072a51b5beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 9082a51b5beSmrg fi 9092a51b5beSmrg ;; 9102a51b5beSmrg esac 9112a51b5beSmrg]) 9122a51b5beSmrgif test -n $lt_cv_sys_max_cmd_len ; then 9132a51b5beSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 914d31dbc53Smrgelse 9152a51b5beSmrg AC_MSG_RESULT(none) 91632b578d3Smrgfi 9172a51b5beSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 91832b578d3Smrg 91932b578d3Smrg 9202a51b5beSmrg# _LT_AC_CHECK_DLFCN 9212a51b5beSmrg# ------------------ 9222a51b5beSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 9232a51b5beSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl 9242a51b5beSmrg])# _LT_AC_CHECK_DLFCN 92532b578d3Smrg 92632b578d3Smrg 9272a51b5beSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 9282a51b5beSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 9292a51b5beSmrg# --------------------------------------------------------------------- 9302a51b5beSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 9312a51b5beSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 9322a51b5beSmrgif test "$cross_compiling" = yes; then : 9332a51b5beSmrg [$4] 9342a51b5beSmrgelse 9352a51b5beSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 9362a51b5beSmrg lt_status=$lt_dlunknown 9372a51b5beSmrg cat > conftest.$ac_ext <<EOF 9382a51b5beSmrg[#line __oline__ "configure" 9392a51b5beSmrg#include "confdefs.h" 94032b578d3Smrg 9412a51b5beSmrg#if HAVE_DLFCN_H 9422a51b5beSmrg#include <dlfcn.h> 9432a51b5beSmrg#endif 944d31dbc53Smrg 9452a51b5beSmrg#include <stdio.h> 94632b578d3Smrg 9472a51b5beSmrg#ifdef RTLD_GLOBAL 9482a51b5beSmrg# define LT_DLGLOBAL RTLD_GLOBAL 9492a51b5beSmrg#else 9502a51b5beSmrg# ifdef DL_GLOBAL 9512a51b5beSmrg# define LT_DLGLOBAL DL_GLOBAL 9522a51b5beSmrg# else 9532a51b5beSmrg# define LT_DLGLOBAL 0 9542a51b5beSmrg# endif 9552a51b5beSmrg#endif 95632b578d3Smrg 9572a51b5beSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 9582a51b5beSmrg find out it does not work in some platform. */ 9592a51b5beSmrg#ifndef LT_DLLAZY_OR_NOW 9602a51b5beSmrg# ifdef RTLD_LAZY 9612a51b5beSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 9622a51b5beSmrg# else 9632a51b5beSmrg# ifdef DL_LAZY 9642a51b5beSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 9652a51b5beSmrg# else 9662a51b5beSmrg# ifdef RTLD_NOW 9672a51b5beSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 9682a51b5beSmrg# else 9692a51b5beSmrg# ifdef DL_NOW 9702a51b5beSmrg# define LT_DLLAZY_OR_NOW DL_NOW 9712a51b5beSmrg# else 9722a51b5beSmrg# define LT_DLLAZY_OR_NOW 0 9732a51b5beSmrg# endif 9742a51b5beSmrg# endif 9752a51b5beSmrg# endif 9762a51b5beSmrg# endif 9772a51b5beSmrg#endif 97832b578d3Smrg 9792a51b5beSmrg#ifdef __cplusplus 9802a51b5beSmrgextern "C" void exit (int); 9812a51b5beSmrg#endif 98232b578d3Smrg 9832a51b5beSmrgvoid fnord() { int i=42;} 9842a51b5beSmrgint main () 9852a51b5beSmrg{ 9862a51b5beSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 9872a51b5beSmrg int status = $lt_dlunknown; 98832b578d3Smrg 9892a51b5beSmrg if (self) 9902a51b5beSmrg { 9912a51b5beSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 9922a51b5beSmrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 9932a51b5beSmrg /* dlclose (self); */ 9942a51b5beSmrg } 9952a51b5beSmrg else 9962a51b5beSmrg puts (dlerror ()); 99732b578d3Smrg 9982a51b5beSmrg exit (status); 9992a51b5beSmrg}] 10002a51b5beSmrgEOF 10012a51b5beSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 10022a51b5beSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 10032a51b5beSmrg lt_status=$? 10042a51b5beSmrg case x$lt_status in 10052a51b5beSmrg x$lt_dlno_uscore) $1 ;; 10062a51b5beSmrg x$lt_dlneed_uscore) $2 ;; 10072a51b5beSmrg x$lt_dlunknown|x*) $3 ;; 10082a51b5beSmrg esac 10092a51b5beSmrg else : 10102a51b5beSmrg # compilation failed 10112a51b5beSmrg $3 10122a51b5beSmrg fi 10132a51b5beSmrgfi 10142a51b5beSmrgrm -fr conftest* 10152a51b5beSmrg])# _LT_AC_TRY_DLOPEN_SELF 101632b578d3Smrg 101732b578d3Smrg 10182a51b5beSmrg# AC_LIBTOOL_DLOPEN_SELF 10192a51b5beSmrg# ---------------------- 10202a51b5beSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 10212a51b5beSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 10222a51b5beSmrgif test "x$enable_dlopen" != xyes; then 10232a51b5beSmrg enable_dlopen=unknown 10242a51b5beSmrg enable_dlopen_self=unknown 10252a51b5beSmrg enable_dlopen_self_static=unknown 102632b578d3Smrgelse 10272a51b5beSmrg lt_cv_dlopen=no 10282a51b5beSmrg lt_cv_dlopen_libs= 102932b578d3Smrg 10302a51b5beSmrg case $host_os in 10312a51b5beSmrg beos*) 10322a51b5beSmrg lt_cv_dlopen="load_add_on" 10332a51b5beSmrg lt_cv_dlopen_libs= 10342a51b5beSmrg lt_cv_dlopen_self=yes 10352a51b5beSmrg ;; 103632b578d3Smrg 10372a51b5beSmrg mingw* | pw32*) 10382a51b5beSmrg lt_cv_dlopen="LoadLibrary" 10392a51b5beSmrg lt_cv_dlopen_libs= 10402a51b5beSmrg ;; 104132b578d3Smrg 10422a51b5beSmrg cygwin*) 10432a51b5beSmrg lt_cv_dlopen="dlopen" 10442a51b5beSmrg lt_cv_dlopen_libs= 10452a51b5beSmrg ;; 104632b578d3Smrg 10472a51b5beSmrg darwin*) 10482a51b5beSmrg # if libdl is installed we need to link against it 10492a51b5beSmrg AC_CHECK_LIB([dl], [dlopen], 10502a51b5beSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 10512a51b5beSmrg lt_cv_dlopen="dyld" 10522a51b5beSmrg lt_cv_dlopen_libs= 10532a51b5beSmrg lt_cv_dlopen_self=yes 10542a51b5beSmrg ]) 10552a51b5beSmrg ;; 105632b578d3Smrg 10572a51b5beSmrg *) 10582a51b5beSmrg AC_CHECK_FUNC([shl_load], 10592a51b5beSmrg [lt_cv_dlopen="shl_load"], 10602a51b5beSmrg [AC_CHECK_LIB([dld], [shl_load], 10612a51b5beSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 10622a51b5beSmrg [AC_CHECK_FUNC([dlopen], 10632a51b5beSmrg [lt_cv_dlopen="dlopen"], 10642a51b5beSmrg [AC_CHECK_LIB([dl], [dlopen], 10652a51b5beSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 10662a51b5beSmrg [AC_CHECK_LIB([svld], [dlopen], 10672a51b5beSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 10682a51b5beSmrg [AC_CHECK_LIB([dld], [dld_link], 10692a51b5beSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 10702a51b5beSmrg ]) 10712a51b5beSmrg ]) 10722a51b5beSmrg ]) 10732a51b5beSmrg ]) 10742a51b5beSmrg ]) 10752a51b5beSmrg ;; 10762a51b5beSmrg esac 107732b578d3Smrg 10782a51b5beSmrg if test "x$lt_cv_dlopen" != xno; then 10792a51b5beSmrg enable_dlopen=yes 10802a51b5beSmrg else 10812a51b5beSmrg enable_dlopen=no 10822a51b5beSmrg fi 108332b578d3Smrg 10842a51b5beSmrg case $lt_cv_dlopen in 10852a51b5beSmrg dlopen) 10862a51b5beSmrg save_CPPFLAGS="$CPPFLAGS" 10872a51b5beSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 108832b578d3Smrg 10892a51b5beSmrg save_LDFLAGS="$LDFLAGS" 10902a51b5beSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 109132b578d3Smrg 10922a51b5beSmrg save_LIBS="$LIBS" 10932a51b5beSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 109432b578d3Smrg 10952a51b5beSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 10962a51b5beSmrg lt_cv_dlopen_self, [dnl 10972a51b5beSmrg _LT_AC_TRY_DLOPEN_SELF( 10982a51b5beSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 10992a51b5beSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 11002a51b5beSmrg ]) 110132b578d3Smrg 11022a51b5beSmrg if test "x$lt_cv_dlopen_self" = xyes; then 11032a51b5beSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 11042a51b5beSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 11052a51b5beSmrg lt_cv_dlopen_self_static, [dnl 11062a51b5beSmrg _LT_AC_TRY_DLOPEN_SELF( 11072a51b5beSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 11082a51b5beSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 11092a51b5beSmrg ]) 11102a51b5beSmrg fi 111132b578d3Smrg 11122a51b5beSmrg CPPFLAGS="$save_CPPFLAGS" 11132a51b5beSmrg LDFLAGS="$save_LDFLAGS" 11142a51b5beSmrg LIBS="$save_LIBS" 11152a51b5beSmrg ;; 11162a51b5beSmrg esac 111732b578d3Smrg 11182a51b5beSmrg case $lt_cv_dlopen_self in 11192a51b5beSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 11202a51b5beSmrg *) enable_dlopen_self=unknown ;; 11212a51b5beSmrg esac 112232b578d3Smrg 11232a51b5beSmrg case $lt_cv_dlopen_self_static in 11242a51b5beSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 11252a51b5beSmrg *) enable_dlopen_self_static=unknown ;; 11262a51b5beSmrg esac 1127d31dbc53Smrgfi 11282a51b5beSmrg])# AC_LIBTOOL_DLOPEN_SELF 112932b578d3Smrg 113032b578d3Smrg 11312a51b5beSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 11322a51b5beSmrg# --------------------------------- 11332a51b5beSmrg# Check to see if options -c and -o are simultaneously supported by compiler 11342a51b5beSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 11352a51b5beSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 11362a51b5beSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 11372a51b5beSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 11382a51b5beSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 11392a51b5beSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 11402a51b5beSmrg $rm -r conftest 2>/dev/null 11412a51b5beSmrg mkdir conftest 11422a51b5beSmrg cd conftest 11432a51b5beSmrg mkdir out 11442a51b5beSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 114532b578d3Smrg 11462a51b5beSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 11472a51b5beSmrg # Insert the option either (1) after the last *FLAGS variable, or 11482a51b5beSmrg # (2) before a word containing "conftest.", or (3) at the end. 11492a51b5beSmrg # Note that $ac_compile itself does not contain backslashes and begins 11502a51b5beSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 11512a51b5beSmrg lt_compile=`echo "$ac_compile" | $SED \ 11522a51b5beSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 11532a51b5beSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 11542a51b5beSmrg -e 's:$: $lt_compiler_flag:'` 11552a51b5beSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 11562a51b5beSmrg (eval "$lt_compile" 2>out/conftest.err) 11572a51b5beSmrg ac_status=$? 11582a51b5beSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 11592a51b5beSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 11602a51b5beSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 11612a51b5beSmrg then 11622a51b5beSmrg # The compiler can only warn and ignore the option if not recognized 11632a51b5beSmrg # So say no if there are warnings 11642a51b5beSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 11652a51b5beSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 11662a51b5beSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 11672a51b5beSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11682a51b5beSmrg fi 11692a51b5beSmrg fi 11702a51b5beSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 11712a51b5beSmrg $rm conftest* 11722a51b5beSmrg # SGI C++ compiler will create directory out/ii_files/ for 11732a51b5beSmrg # template instantiation 11742a51b5beSmrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 11752a51b5beSmrg $rm out/* && rmdir out 11762a51b5beSmrg cd .. 11772a51b5beSmrg rmdir conftest 11782a51b5beSmrg $rm conftest* 11792a51b5beSmrg]) 11802a51b5beSmrg])# AC_LIBTOOL_PROG_CC_C_O 118132b578d3Smrg 118232b578d3Smrg 11832a51b5beSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 11842a51b5beSmrg# ----------------------------------------- 11852a51b5beSmrg# Check to see if we can do hard links to lock some files if needed 11862a51b5beSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 11872a51b5beSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl 118832b578d3Smrg 11892a51b5beSmrghard_links="nottested" 11902a51b5beSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 11912a51b5beSmrg # do not overwrite the value of need_locks provided by the user 11922a51b5beSmrg AC_MSG_CHECKING([if we can lock with hard links]) 11932a51b5beSmrg hard_links=yes 11942a51b5beSmrg $rm conftest* 11952a51b5beSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 11962a51b5beSmrg touch conftest.a 11972a51b5beSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 11982a51b5beSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 11992a51b5beSmrg AC_MSG_RESULT([$hard_links]) 12002a51b5beSmrg if test "$hard_links" = no; then 12012a51b5beSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 12022a51b5beSmrg need_locks=warn 12032a51b5beSmrg fi 12042a51b5beSmrgelse 12052a51b5beSmrg need_locks=no 12062a51b5beSmrgfi 12072a51b5beSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1208d31dbc53Smrg 1209d31dbc53Smrg 12102a51b5beSmrg# AC_LIBTOOL_OBJDIR 12112a51b5beSmrg# ----------------- 12122a51b5beSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 12132a51b5beSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 12142a51b5beSmrg[rm -f .libs 2>/dev/null 12152a51b5beSmrgmkdir .libs 2>/dev/null 12162a51b5beSmrgif test -d .libs; then 12172a51b5beSmrg lt_cv_objdir=.libs 12182a51b5beSmrgelse 12192a51b5beSmrg # MS-DOS does not allow filenames that begin with a dot. 12202a51b5beSmrg lt_cv_objdir=_libs 12212a51b5beSmrgfi 12222a51b5beSmrgrmdir .libs 2>/dev/null]) 12232a51b5beSmrgobjdir=$lt_cv_objdir 12242a51b5beSmrg])# AC_LIBTOOL_OBJDIR 122532b578d3Smrg 122632b578d3Smrg 12272a51b5beSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 12282a51b5beSmrg# ---------------------------------------------- 12292a51b5beSmrg# Check hardcoding attributes. 12302a51b5beSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 12312a51b5beSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 12322a51b5beSmrg_LT_AC_TAGVAR(hardcode_action, $1)= 12332a51b5beSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 12342a51b5beSmrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 12352a51b5beSmrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 123632b578d3Smrg 12372a51b5beSmrg # We can hardcode non-existant directories. 12382a51b5beSmrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 12392a51b5beSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 12402a51b5beSmrg # have to relink, otherwise we might link with an installed library 12412a51b5beSmrg # when we should be linking with a yet-to-be-installed one 12422a51b5beSmrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 12432a51b5beSmrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 12442a51b5beSmrg # Linking always hardcodes the temporary library directory. 12452a51b5beSmrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 12462a51b5beSmrg else 12472a51b5beSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 12482a51b5beSmrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 12492a51b5beSmrg fi 1250d31dbc53Smrgelse 12512a51b5beSmrg # We cannot hardcode anything, or else we can only hardcode existing 12522a51b5beSmrg # directories. 12532a51b5beSmrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1254d31dbc53Smrgfi 12552a51b5beSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 125632b578d3Smrg 12572a51b5beSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 12582a51b5beSmrg # Fast installation is not supported 12592a51b5beSmrg enable_fast_install=no 12602a51b5beSmrgelif test "$shlibpath_overrides_runpath" = yes || 12612a51b5beSmrg test "$enable_shared" = no; then 12622a51b5beSmrg # Fast installation is not necessary 12632a51b5beSmrg enable_fast_install=needless 1264d31dbc53Smrgfi 12652a51b5beSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 126632b578d3Smrg 126732b578d3Smrg 12682a51b5beSmrg# AC_LIBTOOL_SYS_LIB_STRIP 12692a51b5beSmrg# ------------------------ 12702a51b5beSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 12712a51b5beSmrg[striplib= 12722a51b5beSmrgold_striplib= 12732a51b5beSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 12742a51b5beSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 12752a51b5beSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 12762a51b5beSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 12772a51b5beSmrg AC_MSG_RESULT([yes]) 12782a51b5beSmrgelse 12792a51b5beSmrg# FIXME - insert some real tests, host_os isn't really good enough 12802a51b5beSmrg case $host_os in 12812a51b5beSmrg darwin*) 12822a51b5beSmrg if test -n "$STRIP" ; then 12832a51b5beSmrg striplib="$STRIP -x" 12842a51b5beSmrg old_striplib="$STRIP -S" 12852a51b5beSmrg AC_MSG_RESULT([yes]) 12862a51b5beSmrg else 12872a51b5beSmrg AC_MSG_RESULT([no]) 1288d31dbc53Smrgfi 12892a51b5beSmrg ;; 12902a51b5beSmrg *) 12912a51b5beSmrg AC_MSG_RESULT([no]) 12922a51b5beSmrg ;; 12932a51b5beSmrg esac 1294d31dbc53Smrgfi 12952a51b5beSmrg])# AC_LIBTOOL_SYS_LIB_STRIP 129632b578d3Smrg 129732b578d3Smrg 12982a51b5beSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 12992a51b5beSmrg# ----------------------------- 13002a51b5beSmrg# PORTME Fill in your ld.so characteristics 13012a51b5beSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 13022a51b5beSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 13032a51b5beSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 13042a51b5beSmrglibrary_names_spec= 13052a51b5beSmrglibname_spec='lib$name' 13062a51b5beSmrgsoname_spec= 13072a51b5beSmrgshrext_cmds=".so" 13082a51b5beSmrgpostinstall_cmds= 13092a51b5beSmrgpostuninstall_cmds= 13102a51b5beSmrgfinish_cmds= 13112a51b5beSmrgfinish_eval= 13122a51b5beSmrgshlibpath_var= 13132a51b5beSmrgshlibpath_overrides_runpath=unknown 13142a51b5beSmrgversion_type=none 13152a51b5beSmrgdynamic_linker="$host_os ld.so" 13162a51b5beSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 13172a51b5beSmrgm4_if($1,[],[ 13182a51b5beSmrgif test "$GCC" = yes; then 13192a51b5beSmrg case $host_os in 13202a51b5beSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 13212a51b5beSmrg *) lt_awk_arg="/^libraries:/" ;; 13222a51b5beSmrg esac 13232a51b5beSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 13242a51b5beSmrg if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 13252a51b5beSmrg # if the path contains ";" then we assume it to be the separator 13262a51b5beSmrg # otherwise default to the standard path separator (i.e. ":") - it is 13272a51b5beSmrg # assumed that no part of a normal pathname contains ";" but that should 13282a51b5beSmrg # okay in the real world where ";" in dirpaths is itself problematic. 13292a51b5beSmrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 13302a51b5beSmrg else 13312a51b5beSmrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 13322a51b5beSmrg fi 13332a51b5beSmrg # Ok, now we have the path, separated by spaces, we can step through it 13342a51b5beSmrg # and add multilib dir if necessary. 13352a51b5beSmrg lt_tmp_lt_search_path_spec= 13362a51b5beSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 13372a51b5beSmrg for lt_sys_path in $lt_search_path_spec; do 13382a51b5beSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 13392a51b5beSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 13402a51b5beSmrg else 13412a51b5beSmrg test -d "$lt_sys_path" && \ 13422a51b5beSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 13432a51b5beSmrg fi 13442a51b5beSmrg done 13452a51b5beSmrg lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 13462a51b5beSmrgBEGIN {RS=" "; FS="/|\n";} { 13472a51b5beSmrg lt_foo=""; 13482a51b5beSmrg lt_count=0; 13492a51b5beSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 13502a51b5beSmrg if ($lt_i != "" && $lt_i != ".") { 13512a51b5beSmrg if ($lt_i == "..") { 13522a51b5beSmrg lt_count++; 13532a51b5beSmrg } else { 13542a51b5beSmrg if (lt_count == 0) { 13552a51b5beSmrg lt_foo="/" $lt_i lt_foo; 13562a51b5beSmrg } else { 13572a51b5beSmrg lt_count--; 13582a51b5beSmrg } 13592a51b5beSmrg } 13602a51b5beSmrg } 13612a51b5beSmrg } 13622a51b5beSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 13632a51b5beSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 13642a51b5beSmrg}'` 13652a51b5beSmrg sys_lib_search_path_spec=`echo $lt_search_path_spec` 13662a51b5beSmrgelse 13672a51b5beSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 13682a51b5beSmrgfi]) 13692a51b5beSmrgneed_lib_prefix=unknown 13702a51b5beSmrghardcode_into_libs=no 137132b578d3Smrg 13722a51b5beSmrg# when you set need_version to no, make sure it does not cause -set_version 13732a51b5beSmrg# flags to be left without arguments 13742a51b5beSmrgneed_version=unknown 137532b578d3Smrg 13762a51b5beSmrgcase $host_os in 13772a51b5beSmrgaix3*) 13782a51b5beSmrg version_type=linux 13792a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 13802a51b5beSmrg shlibpath_var=LIBPATH 138132b578d3Smrg 13822a51b5beSmrg # AIX 3 has no versioning support, so we append a major version to the name. 13832a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 13842a51b5beSmrg ;; 13852a51b5beSmrg 13862a51b5beSmrgaix[[4-9]]*) 13872a51b5beSmrg version_type=linux 13882a51b5beSmrg need_lib_prefix=no 13892a51b5beSmrg need_version=no 13902a51b5beSmrg hardcode_into_libs=yes 13912a51b5beSmrg if test "$host_cpu" = ia64; then 13922a51b5beSmrg # AIX 5 supports IA64 13932a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 13942a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 13952a51b5beSmrg else 13962a51b5beSmrg # With GCC up to 2.95.x, collect2 would create an import file 13972a51b5beSmrg # for dependence libraries. The import file would start with 13982a51b5beSmrg # the line `#! .'. This would cause the generated library to 13992a51b5beSmrg # depend on `.', always an invalid library. This was fixed in 14002a51b5beSmrg # development snapshots of GCC prior to 3.0. 1401d31dbc53Smrg case $host_os in 14022a51b5beSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 14032a51b5beSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 14042a51b5beSmrg echo ' yes ' 14052a51b5beSmrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 14062a51b5beSmrg : 14072a51b5beSmrg else 14082a51b5beSmrg can_build_shared=no 14092a51b5beSmrg fi 14102a51b5beSmrg ;; 1411d31dbc53Smrg esac 14122a51b5beSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 14132a51b5beSmrg # soname into executable. Probably we can add versioning support to 14142a51b5beSmrg # collect2, so additional links can be useful in future. 14152a51b5beSmrg if test "$aix_use_runtimelinking" = yes; then 14162a51b5beSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 14172a51b5beSmrg # instead of lib<name>.a to let people know that these are not 14182a51b5beSmrg # typical AIX shared libraries. 14192a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 14202a51b5beSmrg else 14212a51b5beSmrg # We preserve .a as extension for shared libraries through AIX4.2 14222a51b5beSmrg # and later when we are not doing run time linking. 14232a51b5beSmrg library_names_spec='${libname}${release}.a $libname.a' 14242a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 14252a51b5beSmrg fi 14262a51b5beSmrg shlibpath_var=LIBPATH 14272a51b5beSmrg fi 14282a51b5beSmrg ;; 142932b578d3Smrg 14302a51b5beSmrgamigaos*) 14312a51b5beSmrg library_names_spec='$libname.ixlibrary $libname.a' 14322a51b5beSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 14332a51b5beSmrg 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' 14342a51b5beSmrg ;; 143532b578d3Smrg 14362a51b5beSmrgbeos*) 14372a51b5beSmrg library_names_spec='${libname}${shared_ext}' 14382a51b5beSmrg dynamic_linker="$host_os ld.so" 14392a51b5beSmrg shlibpath_var=LIBRARY_PATH 14402a51b5beSmrg ;; 144132b578d3Smrg 14422a51b5beSmrgbsdi[[45]]*) 14432a51b5beSmrg version_type=linux 14442a51b5beSmrg need_version=no 14452a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 14462a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 14472a51b5beSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 14482a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 14492a51b5beSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 14502a51b5beSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 14512a51b5beSmrg # the default ld.so.conf also contains /usr/contrib/lib and 14522a51b5beSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 14532a51b5beSmrg # libtool to hard-code these into programs 14542a51b5beSmrg ;; 145532b578d3Smrg 14562a51b5beSmrgcygwin* | mingw* | pw32*) 14572a51b5beSmrg version_type=windows 14582a51b5beSmrg shrext_cmds=".dll" 14592a51b5beSmrg need_version=no 14602a51b5beSmrg need_lib_prefix=no 146132b578d3Smrg 14622a51b5beSmrg case $GCC,$host_os in 14632a51b5beSmrg yes,cygwin* | yes,mingw* | yes,pw32*) 14642a51b5beSmrg library_names_spec='$libname.dll.a' 14652a51b5beSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 14662a51b5beSmrg postinstall_cmds='base_file=`basename \${file}`~ 14672a51b5beSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 14682a51b5beSmrg dldir=$destdir/`dirname \$dlpath`~ 14692a51b5beSmrg test -d \$dldir || mkdir -p \$dldir~ 14702a51b5beSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 14712a51b5beSmrg chmod a+x \$dldir/$dlname' 14722a51b5beSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 14732a51b5beSmrg dlpath=$dir/\$dldll~ 14742a51b5beSmrg $rm \$dlpath' 14752a51b5beSmrg shlibpath_overrides_runpath=yes 147632b578d3Smrg 14772a51b5beSmrg case $host_os in 14782a51b5beSmrg cygwin*) 14792a51b5beSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 14802a51b5beSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 14812a51b5beSmrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 14822a51b5beSmrg ;; 14832a51b5beSmrg mingw*) 14842a51b5beSmrg # MinGW DLLs use traditional 'lib' prefix 14852a51b5beSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 14862a51b5beSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 14872a51b5beSmrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 14882a51b5beSmrg # It is most probably a Windows format PATH printed by 14892a51b5beSmrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 14902a51b5beSmrg # path with ; separators, and with drive letters. We can handle the 14912a51b5beSmrg # drive letters (cygwin fileutils understands them), so leave them, 14922a51b5beSmrg # especially as we might pass files found there to a mingw objdump, 14932a51b5beSmrg # which wouldn't understand a cygwinified path. Ahh. 14942a51b5beSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 14952a51b5beSmrg else 14962a51b5beSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 14972a51b5beSmrg fi 14982a51b5beSmrg ;; 14992a51b5beSmrg pw32*) 15002a51b5beSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 15012a51b5beSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 15022a51b5beSmrg ;; 15032a51b5beSmrg esac 15042a51b5beSmrg ;; 150532b578d3Smrg 15062a51b5beSmrg *) 15072a51b5beSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 15082a51b5beSmrg ;; 15092a51b5beSmrg esac 15102a51b5beSmrg dynamic_linker='Win32 ld.exe' 15112a51b5beSmrg # FIXME: first we should search . and the directory the executable is in 15122a51b5beSmrg shlibpath_var=PATH 15132a51b5beSmrg ;; 151432b578d3Smrg 15152a51b5beSmrgdarwin* | rhapsody*) 15162a51b5beSmrg dynamic_linker="$host_os dyld" 15172a51b5beSmrg version_type=darwin 15182a51b5beSmrg need_lib_prefix=no 15192a51b5beSmrg need_version=no 15202a51b5beSmrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 15212a51b5beSmrg soname_spec='${libname}${release}${major}$shared_ext' 15222a51b5beSmrg shlibpath_overrides_runpath=yes 15232a51b5beSmrg shlibpath_var=DYLD_LIBRARY_PATH 15242a51b5beSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 15252a51b5beSmrg m4_if([$1], [],[ 15262a51b5beSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 15272a51b5beSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 15282a51b5beSmrg ;; 152932b578d3Smrg 15302a51b5beSmrgdgux*) 15312a51b5beSmrg version_type=linux 15322a51b5beSmrg need_lib_prefix=no 15332a51b5beSmrg need_version=no 15342a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 15352a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 15362a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 15372a51b5beSmrg ;; 153832b578d3Smrg 15392a51b5beSmrgfreebsd1*) 15402a51b5beSmrg dynamic_linker=no 15412a51b5beSmrg ;; 1542d31dbc53Smrg 15432a51b5beSmrgfreebsd* | dragonfly*) 15442a51b5beSmrg # DragonFly does not have aout. When/if they implement a new 15452a51b5beSmrg # versioning mechanism, adjust this. 15462a51b5beSmrg if test -x /usr/bin/objformat; then 15472a51b5beSmrg objformat=`/usr/bin/objformat` 15482a51b5beSmrg else 15492a51b5beSmrg case $host_os in 15502a51b5beSmrg freebsd[[123]]*) objformat=aout ;; 15512a51b5beSmrg *) objformat=elf ;; 15522a51b5beSmrg esac 15532a51b5beSmrg fi 15542a51b5beSmrg version_type=freebsd-$objformat 15552a51b5beSmrg case $version_type in 15562a51b5beSmrg freebsd-elf*) 15572a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 15582a51b5beSmrg need_version=no 15592a51b5beSmrg need_lib_prefix=no 15602a51b5beSmrg ;; 15612a51b5beSmrg freebsd-*) 15622a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 15632a51b5beSmrg need_version=yes 15642a51b5beSmrg ;; 15652a51b5beSmrg esac 15662a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 15672a51b5beSmrg case $host_os in 15682a51b5beSmrg freebsd2*) 15692a51b5beSmrg shlibpath_overrides_runpath=yes 15702a51b5beSmrg ;; 15712a51b5beSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 15722a51b5beSmrg shlibpath_overrides_runpath=yes 15732a51b5beSmrg hardcode_into_libs=yes 15742a51b5beSmrg ;; 15752a51b5beSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 15762a51b5beSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 15772a51b5beSmrg shlibpath_overrides_runpath=no 15782a51b5beSmrg hardcode_into_libs=yes 15792a51b5beSmrg ;; 15802a51b5beSmrg *) # from 4.6 on, and DragonFly 15812a51b5beSmrg shlibpath_overrides_runpath=yes 15822a51b5beSmrg hardcode_into_libs=yes 15832a51b5beSmrg ;; 15842a51b5beSmrg esac 15852a51b5beSmrg ;; 158632b578d3Smrg 15872a51b5beSmrggnu*) 15882a51b5beSmrg version_type=linux 15892a51b5beSmrg need_lib_prefix=no 15902a51b5beSmrg need_version=no 15912a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 15922a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 15932a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 15942a51b5beSmrg hardcode_into_libs=yes 15952a51b5beSmrg ;; 159632b578d3Smrg 15972a51b5beSmrghpux9* | hpux10* | hpux11*) 15982a51b5beSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 15992a51b5beSmrg # link against other versions. 16002a51b5beSmrg version_type=sunos 16012a51b5beSmrg need_lib_prefix=no 16022a51b5beSmrg need_version=no 16032a51b5beSmrg case $host_cpu in 16042a51b5beSmrg ia64*) 16052a51b5beSmrg shrext_cmds='.so' 16062a51b5beSmrg hardcode_into_libs=yes 16072a51b5beSmrg dynamic_linker="$host_os dld.so" 16082a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 16092a51b5beSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 16102a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 16112a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 16122a51b5beSmrg if test "X$HPUX_IA64_MODE" = X32; then 16132a51b5beSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 16142a51b5beSmrg else 16152a51b5beSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 16162a51b5beSmrg fi 16172a51b5beSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 16182a51b5beSmrg ;; 16192a51b5beSmrg hppa*64*) 16202a51b5beSmrg shrext_cmds='.sl' 16212a51b5beSmrg hardcode_into_libs=yes 16222a51b5beSmrg dynamic_linker="$host_os dld.sl" 16232a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 16242a51b5beSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 16252a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 16262a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 16272a51b5beSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 16282a51b5beSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 16292a51b5beSmrg ;; 16302a51b5beSmrg *) 16312a51b5beSmrg shrext_cmds='.sl' 16322a51b5beSmrg dynamic_linker="$host_os dld.sl" 16332a51b5beSmrg shlibpath_var=SHLIB_PATH 16342a51b5beSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 16352a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 16362a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 16372a51b5beSmrg ;; 16382a51b5beSmrg esac 16392a51b5beSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 16402a51b5beSmrg postinstall_cmds='chmod 555 $lib' 16412a51b5beSmrg ;; 164232b578d3Smrg 16432a51b5beSmrginterix[[3-9]]*) 16442a51b5beSmrg version_type=linux 16452a51b5beSmrg need_lib_prefix=no 16462a51b5beSmrg need_version=no 16472a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 16482a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 16492a51b5beSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 16502a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 16512a51b5beSmrg shlibpath_overrides_runpath=no 16522a51b5beSmrg hardcode_into_libs=yes 16532a51b5beSmrg ;; 165432b578d3Smrg 16552a51b5beSmrgirix5* | irix6* | nonstopux*) 16562a51b5beSmrg case $host_os in 16572a51b5beSmrg nonstopux*) version_type=nonstopux ;; 16582a51b5beSmrg *) 16592a51b5beSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 16602a51b5beSmrg version_type=linux 16612a51b5beSmrg else 16622a51b5beSmrg version_type=irix 16632a51b5beSmrg fi ;; 16642a51b5beSmrg esac 16652a51b5beSmrg need_lib_prefix=no 16662a51b5beSmrg need_version=no 16672a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 16682a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 16692a51b5beSmrg case $host_os in 16702a51b5beSmrg irix5* | nonstopux*) 16712a51b5beSmrg libsuff= shlibsuff= 16722a51b5beSmrg ;; 16732a51b5beSmrg *) 16742a51b5beSmrg case $LD in # libtool.m4 will add one of these switches to LD 16752a51b5beSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 16762a51b5beSmrg libsuff= shlibsuff= libmagic=32-bit;; 16772a51b5beSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 16782a51b5beSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 16792a51b5beSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 16802a51b5beSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 16812a51b5beSmrg *) libsuff= shlibsuff= libmagic=never-match;; 16822a51b5beSmrg esac 16832a51b5beSmrg ;; 16842a51b5beSmrg esac 16852a51b5beSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 16862a51b5beSmrg shlibpath_overrides_runpath=no 16872a51b5beSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 16882a51b5beSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 16892a51b5beSmrg hardcode_into_libs=yes 16902a51b5beSmrg ;; 169132b578d3Smrg 16922a51b5beSmrg# No shared lib support for Linux oldld, aout, or coff. 16932a51b5beSmrglinux*oldld* | linux*aout* | linux*coff*) 16942a51b5beSmrg dynamic_linker=no 16952a51b5beSmrg ;; 169632b578d3Smrg 16972a51b5beSmrg# This must be Linux ELF. 16982a51b5beSmrglinux* | k*bsd*-gnu) 16992a51b5beSmrg version_type=linux 17002a51b5beSmrg need_lib_prefix=no 17012a51b5beSmrg need_version=no 17022a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 17032a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 17042a51b5beSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 17052a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 17062a51b5beSmrg shlibpath_overrides_runpath=no 17072a51b5beSmrg # This implies no fast_install, which is unacceptable. 17082a51b5beSmrg # Some rework will be needed to allow for fast_install 17092a51b5beSmrg # before this can be enabled. 17102a51b5beSmrg hardcode_into_libs=yes 17112a51b5beSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 17122a51b5beSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 171332b578d3Smrg 17142a51b5beSmrg # Append ld.so.conf contents to the search path 17152a51b5beSmrg if test -f /etc/ld.so.conf; then 17162a51b5beSmrg 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' ' '` 17172a51b5beSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 17182a51b5beSmrg fi 171932b578d3Smrg 17202a51b5beSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 17212a51b5beSmrg # powerpc, because MkLinux only supported shared libraries with the 17222a51b5beSmrg # GNU dynamic linker. Since this was broken with cross compilers, 17232a51b5beSmrg # most powerpc-linux boxes support dynamic linking these days and 17242a51b5beSmrg # people can always --disable-shared, the test was removed, and we 17252a51b5beSmrg # assume the GNU/Linux dynamic linker is in use. 17262a51b5beSmrg dynamic_linker='GNU/Linux ld.so' 17272a51b5beSmrg ;; 172832b578d3Smrg 17292a51b5beSmrgnetbsd*) 17302a51b5beSmrg version_type=sunos 17312a51b5beSmrg need_lib_prefix=no 17322a51b5beSmrg need_version=no 17332a51b5beSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 17342a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 17352a51b5beSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 17362a51b5beSmrg dynamic_linker='NetBSD (a.out) ld.so' 17372a51b5beSmrg else 17382a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 17392a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 17402a51b5beSmrg dynamic_linker='NetBSD ld.elf_so' 17412a51b5beSmrg fi 17422a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 17432a51b5beSmrg shlibpath_overrides_runpath=yes 17442a51b5beSmrg hardcode_into_libs=yes 17452a51b5beSmrg ;; 174632b578d3Smrg 17472a51b5beSmrgnewsos6) 17482a51b5beSmrg version_type=linux 17492a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 17502a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 17512a51b5beSmrg shlibpath_overrides_runpath=yes 17522a51b5beSmrg ;; 175332b578d3Smrg 17542a51b5beSmrgnto-qnx*) 17552a51b5beSmrg version_type=linux 17562a51b5beSmrg need_lib_prefix=no 17572a51b5beSmrg need_version=no 17582a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 17592a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 17602a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 17612a51b5beSmrg shlibpath_overrides_runpath=yes 17622a51b5beSmrg ;; 176332b578d3Smrg 17642a51b5beSmrgopenbsd*) 17652a51b5beSmrg version_type=sunos 17662a51b5beSmrg sys_lib_dlsearch_path_spec="/usr/lib" 17672a51b5beSmrg need_lib_prefix=no 17682a51b5beSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 17692a51b5beSmrg case $host_os in 17702a51b5beSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 17712a51b5beSmrg *) need_version=no ;; 17722a51b5beSmrg esac 17732a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 17742a51b5beSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 17752a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 17762a51b5beSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 17772a51b5beSmrg case $host_os in 17782a51b5beSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 17792a51b5beSmrg shlibpath_overrides_runpath=no 17802a51b5beSmrg ;; 17812a51b5beSmrg *) 17822a51b5beSmrg shlibpath_overrides_runpath=yes 17832a51b5beSmrg ;; 17842a51b5beSmrg esac 17852a51b5beSmrg else 17862a51b5beSmrg shlibpath_overrides_runpath=yes 17872a51b5beSmrg fi 17882a51b5beSmrg ;; 178932b578d3Smrg 17902a51b5beSmrgos2*) 17912a51b5beSmrg libname_spec='$name' 17922a51b5beSmrg shrext_cmds=".dll" 17932a51b5beSmrg need_lib_prefix=no 17942a51b5beSmrg library_names_spec='$libname${shared_ext} $libname.a' 17952a51b5beSmrg dynamic_linker='OS/2 ld.exe' 17962a51b5beSmrg shlibpath_var=LIBPATH 17972a51b5beSmrg ;; 179832b578d3Smrg 17992a51b5beSmrgosf3* | osf4* | osf5*) 18002a51b5beSmrg version_type=osf 18012a51b5beSmrg need_lib_prefix=no 18022a51b5beSmrg need_version=no 18032a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 18042a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 18052a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 18062a51b5beSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 18072a51b5beSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 18082a51b5beSmrg ;; 180932b578d3Smrg 18102a51b5beSmrgrdos*) 18112a51b5beSmrg dynamic_linker=no 18122a51b5beSmrg ;; 181332b578d3Smrg 18142a51b5beSmrgsolaris*) 18152a51b5beSmrg version_type=linux 18162a51b5beSmrg need_lib_prefix=no 18172a51b5beSmrg need_version=no 18182a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 18192a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 18202a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 18212a51b5beSmrg shlibpath_overrides_runpath=yes 18222a51b5beSmrg hardcode_into_libs=yes 18232a51b5beSmrg # ldd complains unless libraries are executable 18242a51b5beSmrg postinstall_cmds='chmod +x $lib' 18252a51b5beSmrg ;; 182632b578d3Smrg 18272a51b5beSmrgsunos4*) 18282a51b5beSmrg version_type=sunos 18292a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 18302a51b5beSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 18312a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 18322a51b5beSmrg shlibpath_overrides_runpath=yes 18332a51b5beSmrg if test "$with_gnu_ld" = yes; then 18342a51b5beSmrg need_lib_prefix=no 18352a51b5beSmrg fi 18362a51b5beSmrg need_version=yes 18372a51b5beSmrg ;; 183832b578d3Smrg 18392a51b5beSmrgsysv4 | sysv4.3*) 18402a51b5beSmrg version_type=linux 18412a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 18422a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 18432a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 18442a51b5beSmrg case $host_vendor in 18452a51b5beSmrg sni) 18462a51b5beSmrg shlibpath_overrides_runpath=no 18472a51b5beSmrg need_lib_prefix=no 18482a51b5beSmrg export_dynamic_flag_spec='${wl}-Blargedynsym' 18492a51b5beSmrg runpath_var=LD_RUN_PATH 18502a51b5beSmrg ;; 18512a51b5beSmrg siemens) 18522a51b5beSmrg need_lib_prefix=no 18532a51b5beSmrg ;; 18542a51b5beSmrg motorola) 18552a51b5beSmrg need_lib_prefix=no 18562a51b5beSmrg need_version=no 18572a51b5beSmrg shlibpath_overrides_runpath=no 18582a51b5beSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 18592a51b5beSmrg ;; 18602a51b5beSmrg esac 18612a51b5beSmrg ;; 186232b578d3Smrg 18632a51b5beSmrgsysv4*MP*) 18642a51b5beSmrg if test -d /usr/nec ;then 18652a51b5beSmrg version_type=linux 18662a51b5beSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 18672a51b5beSmrg soname_spec='$libname${shared_ext}.$major' 18682a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 18692a51b5beSmrg fi 18702a51b5beSmrg ;; 187132b578d3Smrg 18722a51b5beSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 18732a51b5beSmrg version_type=freebsd-elf 18742a51b5beSmrg need_lib_prefix=no 18752a51b5beSmrg need_version=no 18762a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 18772a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 18782a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 18792a51b5beSmrg hardcode_into_libs=yes 18802a51b5beSmrg if test "$with_gnu_ld" = yes; then 18812a51b5beSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 18822a51b5beSmrg shlibpath_overrides_runpath=no 18832a51b5beSmrg else 18842a51b5beSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 18852a51b5beSmrg shlibpath_overrides_runpath=yes 18862a51b5beSmrg case $host_os in 18872a51b5beSmrg sco3.2v5*) 18882a51b5beSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 1889d31dbc53Smrg ;; 1890d31dbc53Smrg esac 18912a51b5beSmrg fi 18922a51b5beSmrg sys_lib_dlsearch_path_spec='/usr/lib' 18932a51b5beSmrg ;; 189432b578d3Smrg 18952a51b5beSmrguts4*) 18962a51b5beSmrg version_type=linux 18972a51b5beSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 18982a51b5beSmrg soname_spec='${libname}${release}${shared_ext}$major' 18992a51b5beSmrg shlibpath_var=LD_LIBRARY_PATH 19002a51b5beSmrg ;; 190132b578d3Smrg 19022a51b5beSmrg*) 19032a51b5beSmrg dynamic_linker=no 19042a51b5beSmrg ;; 19052a51b5beSmrgesac 19062a51b5beSmrgAC_MSG_RESULT([$dynamic_linker]) 19072a51b5beSmrgtest "$dynamic_linker" = no && can_build_shared=no 190832b578d3Smrg 19092a51b5beSmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 19102a51b5beSmrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 19112a51b5beSmrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 19122a51b5beSmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 19132a51b5beSmrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 19142a51b5beSmrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 191532b578d3Smrg 19162a51b5beSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 19172a51b5beSmrgif test "$GCC" = yes; then 19182a51b5beSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 19192a51b5beSmrgfi 19202a51b5beSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 192132b578d3Smrg 192232b578d3Smrg 19232a51b5beSmrg# _LT_AC_TAGCONFIG 19242a51b5beSmrg# ---------------- 19252a51b5beSmrgAC_DEFUN([_LT_AC_TAGCONFIG], 19262a51b5beSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 19272a51b5beSmrgAC_ARG_WITH([tags], 19282a51b5beSmrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 19292a51b5beSmrg [include additional configurations @<:@automatic@:>@])], 19302a51b5beSmrg [tagnames="$withval"]) 193132b578d3Smrg 19322a51b5beSmrgif test -f "$ltmain" && test -n "$tagnames"; then 19332a51b5beSmrg if test ! -f "${ofile}"; then 19342a51b5beSmrg AC_MSG_WARN([output file `$ofile' does not exist]) 19352a51b5beSmrg fi 193632b578d3Smrg 19372a51b5beSmrg if test -z "$LTCC"; then 19382a51b5beSmrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 19392a51b5beSmrg if test -z "$LTCC"; then 19402a51b5beSmrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 19412a51b5beSmrg else 19422a51b5beSmrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 19432a51b5beSmrg fi 19442a51b5beSmrg fi 19452a51b5beSmrg if test -z "$LTCFLAGS"; then 19462a51b5beSmrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 19472a51b5beSmrg fi 194832b578d3Smrg 19492a51b5beSmrg # Extract list of available tagged configurations in $ofile. 19502a51b5beSmrg # Note that this assumes the entire list is on one line. 19512a51b5beSmrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 195232b578d3Smrg 19532a51b5beSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 19542a51b5beSmrg for tagname in $tagnames; do 19552a51b5beSmrg IFS="$lt_save_ifs" 19562a51b5beSmrg # Check whether tagname contains only valid characters 19572a51b5beSmrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 19582a51b5beSmrg "") ;; 19592a51b5beSmrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 19602a51b5beSmrg ;; 19612a51b5beSmrg esac 196232b578d3Smrg 19632a51b5beSmrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 19642a51b5beSmrg then 19652a51b5beSmrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 19662a51b5beSmrg fi 196732b578d3Smrg 19682a51b5beSmrg # Update the list of available tags. 19692a51b5beSmrg if test -n "$tagname"; then 19702a51b5beSmrg echo appending configuration tag \"$tagname\" to $ofile 197132b578d3Smrg 19722a51b5beSmrg case $tagname in 19732a51b5beSmrg CXX) 19742a51b5beSmrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 19752a51b5beSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 19762a51b5beSmrg (test "X$CXX" != "Xg++"))) ; then 19772a51b5beSmrg AC_LIBTOOL_LANG_CXX_CONFIG 19782a51b5beSmrg else 19792a51b5beSmrg tagname="" 19802a51b5beSmrg fi 19812a51b5beSmrg ;; 198232b578d3Smrg 19832a51b5beSmrg F77) 19842a51b5beSmrg if test -n "$F77" && test "X$F77" != "Xno"; then 19852a51b5beSmrg AC_LIBTOOL_LANG_F77_CONFIG 19862a51b5beSmrg else 19872a51b5beSmrg tagname="" 19882a51b5beSmrg fi 19892a51b5beSmrg ;; 199032b578d3Smrg 19912a51b5beSmrg GCJ) 19922a51b5beSmrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 19932a51b5beSmrg AC_LIBTOOL_LANG_GCJ_CONFIG 19942a51b5beSmrg else 19952a51b5beSmrg tagname="" 19962a51b5beSmrg fi 19972a51b5beSmrg ;; 199832b578d3Smrg 19992a51b5beSmrg RC) 20002a51b5beSmrg AC_LIBTOOL_LANG_RC_CONFIG 20012a51b5beSmrg ;; 200232b578d3Smrg 20032a51b5beSmrg *) 20042a51b5beSmrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 20052a51b5beSmrg ;; 20062a51b5beSmrg esac 200732b578d3Smrg 20082a51b5beSmrg # Append the new tag name to the list of available tags. 20092a51b5beSmrg if test -n "$tagname" ; then 20102a51b5beSmrg available_tags="$available_tags $tagname" 20112a51b5beSmrg fi 20122a51b5beSmrg fi 20132a51b5beSmrg done 20142a51b5beSmrg IFS="$lt_save_ifs" 201532b578d3Smrg 20162a51b5beSmrg # Now substitute the updated list of available tags. 20172a51b5beSmrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 20182a51b5beSmrg mv "${ofile}T" "$ofile" 20192a51b5beSmrg chmod +x "$ofile" 20202a51b5beSmrg else 20212a51b5beSmrg rm -f "${ofile}T" 20222a51b5beSmrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 20232a51b5beSmrg fi 20242a51b5beSmrgfi 20252a51b5beSmrg])# _LT_AC_TAGCONFIG 202632b578d3Smrg 202732b578d3Smrg 20282a51b5beSmrg# AC_LIBTOOL_DLOPEN 20292a51b5beSmrg# ----------------- 20302a51b5beSmrg# enable checks for dlopen support 20312a51b5beSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 20322a51b5beSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 20332a51b5beSmrg])# AC_LIBTOOL_DLOPEN 203432b578d3Smrg 203532b578d3Smrg 20362a51b5beSmrg# AC_LIBTOOL_WIN32_DLL 20372a51b5beSmrg# -------------------- 20382a51b5beSmrg# declare package support for building win32 DLLs 20392a51b5beSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 20402a51b5beSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 20412a51b5beSmrg])# AC_LIBTOOL_WIN32_DLL 204232b578d3Smrg 204332b578d3Smrg 20442a51b5beSmrg# AC_ENABLE_SHARED([DEFAULT]) 20452a51b5beSmrg# --------------------------- 20462a51b5beSmrg# implement the --enable-shared flag 20472a51b5beSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 20482a51b5beSmrgAC_DEFUN([AC_ENABLE_SHARED], 20492a51b5beSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 20502a51b5beSmrgAC_ARG_ENABLE([shared], 20512a51b5beSmrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 20522a51b5beSmrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 20532a51b5beSmrg [p=${PACKAGE-default} 20542a51b5beSmrg case $enableval in 20552a51b5beSmrg yes) enable_shared=yes ;; 20562a51b5beSmrg no) enable_shared=no ;; 20572a51b5beSmrg *) 20582a51b5beSmrg enable_shared=no 20592a51b5beSmrg # Look at the argument we got. We use all the common list separators. 20602a51b5beSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 20612a51b5beSmrg for pkg in $enableval; do 20622a51b5beSmrg IFS="$lt_save_ifs" 20632a51b5beSmrg if test "X$pkg" = "X$p"; then 20642a51b5beSmrg enable_shared=yes 20652a51b5beSmrg fi 20662a51b5beSmrg done 20672a51b5beSmrg IFS="$lt_save_ifs" 20682a51b5beSmrg ;; 20692a51b5beSmrg esac], 20702a51b5beSmrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 20712a51b5beSmrg])# AC_ENABLE_SHARED 207232b578d3Smrg 207332b578d3Smrg 20742a51b5beSmrg# AC_DISABLE_SHARED 20752a51b5beSmrg# ----------------- 20762a51b5beSmrg# set the default shared flag to --disable-shared 20772a51b5beSmrgAC_DEFUN([AC_DISABLE_SHARED], 20782a51b5beSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 20792a51b5beSmrgAC_ENABLE_SHARED(no) 20802a51b5beSmrg])# AC_DISABLE_SHARED 208132b578d3Smrg 208232b578d3Smrg 20832a51b5beSmrg# AC_ENABLE_STATIC([DEFAULT]) 20842a51b5beSmrg# --------------------------- 20852a51b5beSmrg# implement the --enable-static flag 20862a51b5beSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 20872a51b5beSmrgAC_DEFUN([AC_ENABLE_STATIC], 20882a51b5beSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 20892a51b5beSmrgAC_ARG_ENABLE([static], 20902a51b5beSmrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 20912a51b5beSmrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 20922a51b5beSmrg [p=${PACKAGE-default} 20932a51b5beSmrg case $enableval in 20942a51b5beSmrg yes) enable_static=yes ;; 20952a51b5beSmrg no) enable_static=no ;; 20962a51b5beSmrg *) 20972a51b5beSmrg enable_static=no 20982a51b5beSmrg # Look at the argument we got. We use all the common list separators. 20992a51b5beSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 21002a51b5beSmrg for pkg in $enableval; do 21012a51b5beSmrg IFS="$lt_save_ifs" 21022a51b5beSmrg if test "X$pkg" = "X$p"; then 21032a51b5beSmrg enable_static=yes 21042a51b5beSmrg fi 21052a51b5beSmrg done 21062a51b5beSmrg IFS="$lt_save_ifs" 21072a51b5beSmrg ;; 21082a51b5beSmrg esac], 21092a51b5beSmrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 21102a51b5beSmrg])# AC_ENABLE_STATIC 211132b578d3Smrg 211232b578d3Smrg 21132a51b5beSmrg# AC_DISABLE_STATIC 21142a51b5beSmrg# ----------------- 21152a51b5beSmrg# set the default static flag to --disable-static 21162a51b5beSmrgAC_DEFUN([AC_DISABLE_STATIC], 21172a51b5beSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 21182a51b5beSmrgAC_ENABLE_STATIC(no) 21192a51b5beSmrg])# AC_DISABLE_STATIC 212032b578d3Smrg 212132b578d3Smrg 21222a51b5beSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 21232a51b5beSmrg# --------------------------------- 21242a51b5beSmrg# implement the --enable-fast-install flag 21252a51b5beSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 21262a51b5beSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 21272a51b5beSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 21282a51b5beSmrgAC_ARG_ENABLE([fast-install], 21292a51b5beSmrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 21302a51b5beSmrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 21312a51b5beSmrg [p=${PACKAGE-default} 21322a51b5beSmrg case $enableval in 21332a51b5beSmrg yes) enable_fast_install=yes ;; 21342a51b5beSmrg no) enable_fast_install=no ;; 21352a51b5beSmrg *) 21362a51b5beSmrg enable_fast_install=no 21372a51b5beSmrg # Look at the argument we got. We use all the common list separators. 21382a51b5beSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 21392a51b5beSmrg for pkg in $enableval; do 21402a51b5beSmrg IFS="$lt_save_ifs" 21412a51b5beSmrg if test "X$pkg" = "X$p"; then 21422a51b5beSmrg enable_fast_install=yes 21432a51b5beSmrg fi 21442a51b5beSmrg done 21452a51b5beSmrg IFS="$lt_save_ifs" 21462a51b5beSmrg ;; 21472a51b5beSmrg esac], 21482a51b5beSmrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 21492a51b5beSmrg])# AC_ENABLE_FAST_INSTALL 2150d31dbc53Smrg 215132b578d3Smrg 21522a51b5beSmrg# AC_DISABLE_FAST_INSTALL 21532a51b5beSmrg# ----------------------- 21542a51b5beSmrg# set the default to --disable-fast-install 21552a51b5beSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 21562a51b5beSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 21572a51b5beSmrgAC_ENABLE_FAST_INSTALL(no) 21582a51b5beSmrg])# AC_DISABLE_FAST_INSTALL 215932b578d3Smrg 2160d31dbc53Smrg 21612a51b5beSmrg# AC_LIBTOOL_PICMODE([MODE]) 21622a51b5beSmrg# -------------------------- 21632a51b5beSmrg# implement the --with-pic flag 21642a51b5beSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 21652a51b5beSmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 21662a51b5beSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 21672a51b5beSmrgpic_mode=ifelse($#,1,$1,default) 21682a51b5beSmrg])# AC_LIBTOOL_PICMODE 2169d31dbc53Smrg 2170d31dbc53Smrg 21712a51b5beSmrg# AC_PROG_EGREP 21722a51b5beSmrg# ------------- 21732a51b5beSmrg# This is predefined starting with Autoconf 2.54, so this conditional 21742a51b5beSmrg# definition can be removed once we require Autoconf 2.54 or later. 21752a51b5beSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 21762a51b5beSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 21772a51b5beSmrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 21782a51b5beSmrg then ac_cv_prog_egrep='grep -E' 21792a51b5beSmrg else ac_cv_prog_egrep='egrep' 21802a51b5beSmrg fi]) 21812a51b5beSmrg EGREP=$ac_cv_prog_egrep 21822a51b5beSmrg AC_SUBST([EGREP]) 21832a51b5beSmrg])]) 2184d31dbc53Smrg 2185d31dbc53Smrg 21862a51b5beSmrg# AC_PATH_TOOL_PREFIX 2187d31dbc53Smrg# ------------------- 21882a51b5beSmrg# find a file program which can recognize shared library 21892a51b5beSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 21902a51b5beSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 21912a51b5beSmrgAC_MSG_CHECKING([for $1]) 21922a51b5beSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 21932a51b5beSmrg[case $MAGIC_CMD in 21942a51b5beSmrg[[\\/*] | ?:[\\/]*]) 21952a51b5beSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 219632b578d3Smrg ;; 21972a51b5beSmrg*) 21982a51b5beSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 21992a51b5beSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 22002a51b5beSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 22012a51b5beSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 22022a51b5beSmrgdnl not every word. This closes a longstanding sh security hole. 22032a51b5beSmrg ac_dummy="ifelse([$2], , $PATH, [$2])" 22042a51b5beSmrg for ac_dir in $ac_dummy; do 22052a51b5beSmrg IFS="$lt_save_ifs" 22062a51b5beSmrg test -z "$ac_dir" && ac_dir=. 22072a51b5beSmrg if test -f $ac_dir/$1; then 22082a51b5beSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 22092a51b5beSmrg if test -n "$file_magic_test_file"; then 22102a51b5beSmrg case $deplibs_check_method in 22112a51b5beSmrg "file_magic "*) 22122a51b5beSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 22132a51b5beSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 22142a51b5beSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 22152a51b5beSmrg $EGREP "$file_magic_regex" > /dev/null; then 22162a51b5beSmrg : 22172a51b5beSmrg else 22182a51b5beSmrg cat <<EOF 1>&2 221932b578d3Smrg 22202a51b5beSmrg*** Warning: the command libtool uses to detect shared libraries, 22212a51b5beSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 22222a51b5beSmrg*** The result is that libtool may fail to recognize shared libraries 22232a51b5beSmrg*** as such. This will affect the creation of libtool libraries that 22242a51b5beSmrg*** depend on shared libraries, but programs linked with such libtool 22252a51b5beSmrg*** libraries will work regardless of this problem. Nevertheless, you 22262a51b5beSmrg*** may want to report the problem to your system manager and/or to 22272a51b5beSmrg*** bug-libtool@gnu.org 222832b578d3Smrg 2229d31dbc53SmrgEOF 22302a51b5beSmrg fi ;; 22312a51b5beSmrg esac 22322a51b5beSmrg fi 2233d31dbc53Smrg break 2234d31dbc53Smrg fi 2235d31dbc53Smrg done 22362a51b5beSmrg IFS="$lt_save_ifs" 22372a51b5beSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 22382a51b5beSmrg ;; 22392a51b5beSmrgesac]) 22402a51b5beSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 22412a51b5beSmrgif test -n "$MAGIC_CMD"; then 22422a51b5beSmrg AC_MSG_RESULT($MAGIC_CMD) 22432a51b5beSmrgelse 22442a51b5beSmrg AC_MSG_RESULT(no) 2245d31dbc53Smrgfi 22462a51b5beSmrg])# AC_PATH_TOOL_PREFIX 224732b578d3Smrg 224832b578d3Smrg 22492a51b5beSmrg# AC_PATH_MAGIC 22502a51b5beSmrg# ------------- 22512a51b5beSmrg# find a file program which can recognize a shared library 22522a51b5beSmrgAC_DEFUN([AC_PATH_MAGIC], 22532a51b5beSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 22542a51b5beSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 22552a51b5beSmrg if test -n "$ac_tool_prefix"; then 22562a51b5beSmrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 22572a51b5beSmrg else 22582a51b5beSmrg MAGIC_CMD=: 22592a51b5beSmrg fi 22602a51b5beSmrgfi 22612a51b5beSmrg])# AC_PATH_MAGIC 22622a51b5beSmrg 22632a51b5beSmrg 22642a51b5beSmrg# AC_PROG_LD 22652a51b5beSmrg# ---------- 22662a51b5beSmrg# find the pathname to the GNU or non-GNU linker 22672a51b5beSmrgAC_DEFUN([AC_PROG_LD], 22682a51b5beSmrg[AC_ARG_WITH([gnu-ld], 22692a51b5beSmrg [AC_HELP_STRING([--with-gnu-ld], 22702a51b5beSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 22712a51b5beSmrg [test "$withval" = no || with_gnu_ld=yes], 22722a51b5beSmrg [with_gnu_ld=no]) 22732a51b5beSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 22742a51b5beSmrgAC_REQUIRE([AC_PROG_CC])dnl 22752a51b5beSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 22762a51b5beSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 22772a51b5beSmrgac_prog=ld 22782a51b5beSmrgif test "$GCC" = yes; then 22792a51b5beSmrg # Check if gcc -print-prog-name=ld gives a path. 22802a51b5beSmrg AC_MSG_CHECKING([for ld used by $CC]) 22812a51b5beSmrg case $host in 22822a51b5beSmrg *-*-mingw*) 22832a51b5beSmrg # gcc leaves a trailing carriage return which upsets mingw 22842a51b5beSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 22852a51b5beSmrg *) 22862a51b5beSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 22872a51b5beSmrg esac 22882a51b5beSmrg case $ac_prog in 22892a51b5beSmrg # Accept absolute paths. 22902a51b5beSmrg [[\\/]]* | ?:[[\\/]]*) 22912a51b5beSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 22922a51b5beSmrg # Canonicalize the pathname of ld 22932a51b5beSmrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 22942a51b5beSmrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 22952a51b5beSmrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 22962a51b5beSmrg done 22972a51b5beSmrg test -z "$LD" && LD="$ac_prog" 22982a51b5beSmrg ;; 22992a51b5beSmrg "") 23002a51b5beSmrg # If it fails, then pretend we aren't using GCC. 23012a51b5beSmrg ac_prog=ld 23022a51b5beSmrg ;; 23032a51b5beSmrg *) 23042a51b5beSmrg # If it is relative, then search for the first ld in PATH. 23052a51b5beSmrg with_gnu_ld=unknown 23062a51b5beSmrg ;; 23072a51b5beSmrg esac 23082a51b5beSmrgelif test "$with_gnu_ld" = yes; then 23092a51b5beSmrg AC_MSG_CHECKING([for GNU ld]) 23102a51b5beSmrgelse 23112a51b5beSmrg AC_MSG_CHECKING([for non-GNU ld]) 23122a51b5beSmrgfi 23132a51b5beSmrgAC_CACHE_VAL(lt_cv_path_LD, 23142a51b5beSmrg[if test -z "$LD"; then 2315d31dbc53Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 23162a51b5beSmrg for ac_dir in $PATH; do 2317d31dbc53Smrg IFS="$lt_save_ifs" 23182a51b5beSmrg test -z "$ac_dir" && ac_dir=. 23192a51b5beSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 23202a51b5beSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 23212a51b5beSmrg # Check to see if the program is GNU ld. I'd rather use --version, 23222a51b5beSmrg # but apparently some variants of GNU ld only accept -v. 23232a51b5beSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 23242a51b5beSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 23252a51b5beSmrg *GNU* | *'with BFD'*) 23262a51b5beSmrg test "$with_gnu_ld" != no && break 23272a51b5beSmrg ;; 23282a51b5beSmrg *) 23292a51b5beSmrg test "$with_gnu_ld" != yes && break 23302a51b5beSmrg ;; 23312a51b5beSmrg esac 2332d31dbc53Smrg fi 2333d31dbc53Smrg done 2334d31dbc53Smrg IFS="$lt_save_ifs" 23352a51b5beSmrgelse 23362a51b5beSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 23372a51b5beSmrgfi]) 23382a51b5beSmrgLD="$lt_cv_path_LD" 23392a51b5beSmrgif test -n "$LD"; then 23402a51b5beSmrg AC_MSG_RESULT($LD) 23412a51b5beSmrgelse 23422a51b5beSmrg AC_MSG_RESULT(no) 23432a51b5beSmrgfi 23442a51b5beSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 23452a51b5beSmrgAC_PROG_LD_GNU 23462a51b5beSmrg])# AC_PROG_LD 234732b578d3Smrg 234832b578d3Smrg 23492a51b5beSmrg# AC_PROG_LD_GNU 23502a51b5beSmrg# -------------- 23512a51b5beSmrgAC_DEFUN([AC_PROG_LD_GNU], 23522a51b5beSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 23532a51b5beSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 23542a51b5beSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 23552a51b5beSmrgcase `$LD -v 2>&1 </dev/null` in 23562a51b5beSmrg*GNU* | *'with BFD'*) 23572a51b5beSmrg lt_cv_prog_gnu_ld=yes 23582a51b5beSmrg ;; 23592a51b5beSmrg*) 23602a51b5beSmrg lt_cv_prog_gnu_ld=no 23612a51b5beSmrg ;; 23622a51b5beSmrgesac]) 23632a51b5beSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 23642a51b5beSmrg])# AC_PROG_LD_GNU 236532b578d3Smrg 236632b578d3Smrg 23672a51b5beSmrg# AC_PROG_LD_RELOAD_FLAG 23682a51b5beSmrg# ---------------------- 23692a51b5beSmrg# find reload flag for linker 23702a51b5beSmrg# -- PORTME Some linkers may need a different reload flag. 23712a51b5beSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 23722a51b5beSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 23732a51b5beSmrg lt_cv_ld_reload_flag, 23742a51b5beSmrg [lt_cv_ld_reload_flag='-r']) 23752a51b5beSmrgreload_flag=$lt_cv_ld_reload_flag 23762a51b5beSmrgcase $reload_flag in 23772a51b5beSmrg"" | " "*) ;; 23782a51b5beSmrg*) reload_flag=" $reload_flag" ;; 23792a51b5beSmrgesac 23802a51b5beSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 23812a51b5beSmrgcase $host_os in 23822a51b5beSmrg darwin*) 23832a51b5beSmrg if test "$GCC" = yes; then 23842a51b5beSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 23852a51b5beSmrg else 23862a51b5beSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 23872a51b5beSmrg fi 23882a51b5beSmrg ;; 23892a51b5beSmrgesac 23902a51b5beSmrg])# AC_PROG_LD_RELOAD_FLAG 239132b578d3Smrg 239232b578d3Smrg 23932a51b5beSmrg# AC_DEPLIBS_CHECK_METHOD 23942a51b5beSmrg# ----------------------- 23952a51b5beSmrg# how to check for library dependencies 23962a51b5beSmrg# -- PORTME fill in with the dynamic library characteristics 23972a51b5beSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 23982a51b5beSmrg[AC_CACHE_CHECK([how to recognize dependent libraries], 23992a51b5beSmrglt_cv_deplibs_check_method, 24002a51b5beSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 24012a51b5beSmrglt_cv_file_magic_test_file= 24022a51b5beSmrglt_cv_deplibs_check_method='unknown' 24032a51b5beSmrg# Need to set the preceding variable on all platforms that support 24042a51b5beSmrg# interlibrary dependencies. 24052a51b5beSmrg# 'none' -- dependencies not supported. 24062a51b5beSmrg# `unknown' -- same as none, but documents that we really don't know. 24072a51b5beSmrg# 'pass_all' -- all dependencies passed with no checks. 24082a51b5beSmrg# 'test_compile' -- check by making test program. 24092a51b5beSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 24102a51b5beSmrg# which responds to the $file_magic_cmd with a given extended regex. 24112a51b5beSmrg# If you have `file' or equivalent on your system and you're not sure 24122a51b5beSmrg# whether `pass_all' will *always* work, you probably want this one. 241332b578d3Smrg 24142a51b5beSmrgcase $host_os in 24152a51b5beSmrgaix[[4-9]]*) 24162a51b5beSmrg lt_cv_deplibs_check_method=pass_all 24172a51b5beSmrg ;; 241832b578d3Smrg 24192a51b5beSmrgbeos*) 24202a51b5beSmrg lt_cv_deplibs_check_method=pass_all 2421d31dbc53Smrg ;; 24222a51b5beSmrg 24232a51b5beSmrgbsdi[[45]]*) 24242a51b5beSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 24252a51b5beSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 24262a51b5beSmrg lt_cv_file_magic_test_file=/shlib/libc.so 2427d31dbc53Smrg ;; 242832b578d3Smrg 24292a51b5beSmrgcygwin*) 24302a51b5beSmrg # func_win32_libid is a shell function defined in ltmain.sh 24312a51b5beSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 24322a51b5beSmrg lt_cv_file_magic_cmd='func_win32_libid' 2433d31dbc53Smrg ;; 243432b578d3Smrg 24352a51b5beSmrgmingw* | pw32*) 24362a51b5beSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 24372a51b5beSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 24382a51b5beSmrg # unless we find 'file', for example because we are cross-compiling. 24392a51b5beSmrg if ( file / ) >/dev/null 2>&1; then 24402a51b5beSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 24412a51b5beSmrg lt_cv_file_magic_cmd='func_win32_libid' 24422a51b5beSmrg else 24432a51b5beSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 24442a51b5beSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 2445d31dbc53Smrg fi 2446d31dbc53Smrg ;; 24472a51b5beSmrg 24482a51b5beSmrgdarwin* | rhapsody*) 24492a51b5beSmrg lt_cv_deplibs_check_method=pass_all 24502a51b5beSmrg ;; 24512a51b5beSmrg 24522a51b5beSmrgfreebsd* | dragonfly*) 24532a51b5beSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 24542a51b5beSmrg case $host_cpu in 24552a51b5beSmrg i*86 ) 24562a51b5beSmrg # Not sure whether the presence of OpenBSD here was a mistake. 24572a51b5beSmrg # Let's accept both of them until this is cleared up. 24582a51b5beSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 24592a51b5beSmrg lt_cv_file_magic_cmd=/usr/bin/file 24602a51b5beSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2461d31dbc53Smrg ;; 2462d31dbc53Smrg esac 24632a51b5beSmrg else 24642a51b5beSmrg lt_cv_deplibs_check_method=pass_all 2465d31dbc53Smrg fi 2466d31dbc53Smrg ;; 246732b578d3Smrg 24682a51b5beSmrggnu*) 24692a51b5beSmrg lt_cv_deplibs_check_method=pass_all 2470d31dbc53Smrg ;; 247132b578d3Smrg 24722a51b5beSmrghpux10.20* | hpux11*) 24732a51b5beSmrg lt_cv_file_magic_cmd=/usr/bin/file 24742a51b5beSmrg case $host_cpu in 24752a51b5beSmrg ia64*) 24762a51b5beSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 24772a51b5beSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 24782a51b5beSmrg ;; 24792a51b5beSmrg hppa*64*) 24802a51b5beSmrg [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]'] 24812a51b5beSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 24822a51b5beSmrg ;; 24832a51b5beSmrg *) 24842a51b5beSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 24852a51b5beSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 24862a51b5beSmrg ;; 24872a51b5beSmrg esac 24882a51b5beSmrg ;; 248932b578d3Smrg 24902a51b5beSmrginterix[[3-9]]*) 24912a51b5beSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 24922a51b5beSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 24932a51b5beSmrg ;; 249432b578d3Smrg 24952a51b5beSmrgirix5* | irix6* | nonstopux*) 24962a51b5beSmrg case $LD in 24972a51b5beSmrg *-32|*"-32 ") libmagic=32-bit;; 24982a51b5beSmrg *-n32|*"-n32 ") libmagic=N32;; 24992a51b5beSmrg *-64|*"-64 ") libmagic=64-bit;; 25002a51b5beSmrg *) libmagic=never-match;; 25012a51b5beSmrg esac 25022a51b5beSmrg lt_cv_deplibs_check_method=pass_all 25032a51b5beSmrg ;; 250432b578d3Smrg 25052a51b5beSmrg# This must be Linux ELF. 25062a51b5beSmrglinux* | k*bsd*-gnu) 25072a51b5beSmrg lt_cv_deplibs_check_method=pass_all 25082a51b5beSmrg ;; 250932b578d3Smrg 25102a51b5beSmrgnetbsd*) 25112a51b5beSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 25122a51b5beSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 25132a51b5beSmrg else 25142a51b5beSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 25152a51b5beSmrg fi 25162a51b5beSmrg ;; 251732b578d3Smrg 25182a51b5beSmrgnewos6*) 25192a51b5beSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 25202a51b5beSmrg lt_cv_file_magic_cmd=/usr/bin/file 25212a51b5beSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 25222a51b5beSmrg ;; 252332b578d3Smrg 25242a51b5beSmrgnto-qnx*) 25252a51b5beSmrg lt_cv_deplibs_check_method=unknown 25262a51b5beSmrg ;; 252732b578d3Smrg 25282a51b5beSmrgopenbsd*) 25292a51b5beSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 25302a51b5beSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 25312a51b5beSmrg else 25322a51b5beSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 25332a51b5beSmrg fi 25342a51b5beSmrg ;; 253532b578d3Smrg 25362a51b5beSmrgosf3* | osf4* | osf5*) 25372a51b5beSmrg lt_cv_deplibs_check_method=pass_all 25382a51b5beSmrg ;; 253932b578d3Smrg 25402a51b5beSmrgrdos*) 25412a51b5beSmrg lt_cv_deplibs_check_method=pass_all 25422a51b5beSmrg ;; 2543d31dbc53Smrg 25442a51b5beSmrgsolaris*) 25452a51b5beSmrg lt_cv_deplibs_check_method=pass_all 25462a51b5beSmrg ;; 2547d31dbc53Smrg 25482a51b5beSmrgsysv4 | sysv4.3*) 25492a51b5beSmrg case $host_vendor in 25502a51b5beSmrg motorola) 25512a51b5beSmrg 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]]' 25522a51b5beSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 255332b578d3Smrg ;; 25542a51b5beSmrg ncr) 25552a51b5beSmrg lt_cv_deplibs_check_method=pass_all 255632b578d3Smrg ;; 25572a51b5beSmrg sequent) 25582a51b5beSmrg lt_cv_file_magic_cmd='/bin/file' 25592a51b5beSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 256032b578d3Smrg ;; 25612a51b5beSmrg sni) 25622a51b5beSmrg lt_cv_file_magic_cmd='/bin/file' 25632a51b5beSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 25642a51b5beSmrg lt_cv_file_magic_test_file=/lib/libc.so 256532b578d3Smrg ;; 25662a51b5beSmrg siemens) 25672a51b5beSmrg lt_cv_deplibs_check_method=pass_all 256832b578d3Smrg ;; 25692a51b5beSmrg pc) 25702a51b5beSmrg lt_cv_deplibs_check_method=pass_all 2571d31dbc53Smrg ;; 2572d31dbc53Smrg esac 25732a51b5beSmrg ;; 25742a51b5beSmrg 25752a51b5beSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 25762a51b5beSmrg lt_cv_deplibs_check_method=pass_all 25772a51b5beSmrg ;; 25782a51b5beSmrgesac 2579d31dbc53Smrg]) 25802a51b5beSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 25812a51b5beSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 25822a51b5beSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 25832a51b5beSmrg])# AC_DEPLIBS_CHECK_METHOD 258432b578d3Smrg 258532b578d3Smrg 25862a51b5beSmrg# AC_PROG_NM 25872a51b5beSmrg# ---------- 25882a51b5beSmrg# find the pathname to a BSD-compatible name lister 25892a51b5beSmrgAC_DEFUN([AC_PROG_NM], 25902a51b5beSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 25912a51b5beSmrg[if test -n "$NM"; then 25922a51b5beSmrg # Let the user override the test. 25932a51b5beSmrg lt_cv_path_NM="$NM" 25942a51b5beSmrgelse 25952a51b5beSmrg lt_nm_to_check="${ac_tool_prefix}nm" 25962a51b5beSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 25972a51b5beSmrg lt_nm_to_check="$lt_nm_to_check nm" 25982a51b5beSmrg fi 25992a51b5beSmrg for lt_tmp_nm in $lt_nm_to_check; do 26002a51b5beSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 26012a51b5beSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 26022a51b5beSmrg IFS="$lt_save_ifs" 26032a51b5beSmrg test -z "$ac_dir" && ac_dir=. 26042a51b5beSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 26052a51b5beSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 26062a51b5beSmrg # Check to see if the nm accepts a BSD-compat flag. 26072a51b5beSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 26082a51b5beSmrg # nm: unknown option "B" ignored 26092a51b5beSmrg # Tru64's nm complains that /dev/null is an invalid object file 26102a51b5beSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 26112a51b5beSmrg */dev/null* | *'Invalid file or object type'*) 26122a51b5beSmrg lt_cv_path_NM="$tmp_nm -B" 26132a51b5beSmrg break 26142a51b5beSmrg ;; 26152a51b5beSmrg *) 26162a51b5beSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 26172a51b5beSmrg */dev/null*) 26182a51b5beSmrg lt_cv_path_NM="$tmp_nm -p" 26192a51b5beSmrg break 26202a51b5beSmrg ;; 26212a51b5beSmrg *) 26222a51b5beSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 26232a51b5beSmrg continue # so that we can try to find one that supports BSD flags 26242a51b5beSmrg ;; 26252a51b5beSmrg esac 26262a51b5beSmrg ;; 26272a51b5beSmrg esac 26282a51b5beSmrg fi 26292a51b5beSmrg done 26302a51b5beSmrg IFS="$lt_save_ifs" 26312a51b5beSmrg done 26322a51b5beSmrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 26332a51b5beSmrgfi]) 26342a51b5beSmrgNM="$lt_cv_path_NM" 26352a51b5beSmrg])# AC_PROG_NM 263632b578d3Smrg 263732b578d3Smrg 26382a51b5beSmrg# AC_CHECK_LIBM 26392a51b5beSmrg# ------------- 26402a51b5beSmrg# check for math library 26412a51b5beSmrgAC_DEFUN([AC_CHECK_LIBM], 26422a51b5beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 26432a51b5beSmrgLIBM= 26442a51b5beSmrgcase $host in 26452a51b5beSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 26462a51b5beSmrg # These system don't have libm, or don't need it 26472a51b5beSmrg ;; 26482a51b5beSmrg*-ncr-sysv4.3*) 26492a51b5beSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 26502a51b5beSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 26512a51b5beSmrg ;; 26522a51b5beSmrg*) 26532a51b5beSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 26542a51b5beSmrg ;; 26552a51b5beSmrgesac 26562a51b5beSmrg])# AC_CHECK_LIBM 265732b578d3Smrg 265832b578d3Smrg 26592a51b5beSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 26602a51b5beSmrg# ----------------------------------- 26612a51b5beSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and 26622a51b5beSmrg# LTDLINCL to the include flags for the libltdl header and adds 26632a51b5beSmrg# --enable-ltdl-convenience to the configure arguments. Note that 26642a51b5beSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 26652a51b5beSmrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 26662a51b5beSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 26672a51b5beSmrg# (note the single quotes!). If your package is not flat and you're not 26682a51b5beSmrg# using automake, define top_builddir and top_srcdir appropriately in 26692a51b5beSmrg# the Makefiles. 26702a51b5beSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 26712a51b5beSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 26722a51b5beSmrg case $enable_ltdl_convenience in 26732a51b5beSmrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 26742a51b5beSmrg "") enable_ltdl_convenience=yes 26752a51b5beSmrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 26762a51b5beSmrg esac 26772a51b5beSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 26782a51b5beSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 26792a51b5beSmrg # For backwards non-gettext consistent compatibility... 26802a51b5beSmrg INCLTDL="$LTDLINCL" 26812a51b5beSmrg])# AC_LIBLTDL_CONVENIENCE 268232b578d3Smrg 268332b578d3Smrg 26842a51b5beSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 26852a51b5beSmrg# ----------------------------------- 26862a51b5beSmrg# sets LIBLTDL to the link flags for the libltdl installable library and 26872a51b5beSmrg# LTDLINCL to the include flags for the libltdl header and adds 26882a51b5beSmrg# --enable-ltdl-install to the configure arguments. Note that 26892a51b5beSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 26902a51b5beSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 26912a51b5beSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 26922a51b5beSmrg# '${top_srcdir}/' (note the single quotes!). If your package is not 26932a51b5beSmrg# flat and you're not using automake, define top_builddir and top_srcdir 26942a51b5beSmrg# appropriately in the Makefiles. 26952a51b5beSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 26962a51b5beSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 26972a51b5beSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 26982a51b5beSmrg AC_CHECK_LIB(ltdl, lt_dlinit, 26992a51b5beSmrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 27002a51b5beSmrg [if test x"$enable_ltdl_install" = xno; then 27012a51b5beSmrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 27022a51b5beSmrg else 27032a51b5beSmrg enable_ltdl_install=yes 27042a51b5beSmrg fi 27052a51b5beSmrg ]) 27062a51b5beSmrg if test x"$enable_ltdl_install" = x"yes"; then 27072a51b5beSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 27082a51b5beSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 27092a51b5beSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 27102a51b5beSmrg else 27112a51b5beSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 27122a51b5beSmrg LIBLTDL="-lltdl" 27132a51b5beSmrg LTDLINCL= 27142a51b5beSmrg fi 27152a51b5beSmrg # For backwards non-gettext consistent compatibility... 27162a51b5beSmrg INCLTDL="$LTDLINCL" 27172a51b5beSmrg])# AC_LIBLTDL_INSTALLABLE 271832b578d3Smrg 271932b578d3Smrg 27202a51b5beSmrg# AC_LIBTOOL_CXX 27212a51b5beSmrg# -------------- 27222a51b5beSmrg# enable support for C++ libraries 27232a51b5beSmrgAC_DEFUN([AC_LIBTOOL_CXX], 27242a51b5beSmrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 27252a51b5beSmrg])# AC_LIBTOOL_CXX 272632b578d3Smrg 272732b578d3Smrg 27282a51b5beSmrg# _LT_AC_LANG_CXX 27292a51b5beSmrg# --------------- 27302a51b5beSmrgAC_DEFUN([_LT_AC_LANG_CXX], 27312a51b5beSmrg[AC_REQUIRE([AC_PROG_CXX]) 27322a51b5beSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 27332a51b5beSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 27342a51b5beSmrg])# _LT_AC_LANG_CXX 27352a51b5beSmrg 27362a51b5beSmrg# _LT_AC_PROG_CXXCPP 27372a51b5beSmrg# ------------------ 27382a51b5beSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 27392a51b5beSmrg[ 27402a51b5beSmrgAC_REQUIRE([AC_PROG_CXX]) 27412a51b5beSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 27422a51b5beSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 27432a51b5beSmrg (test "X$CXX" != "Xg++"))) ; then 27442a51b5beSmrg AC_PROG_CXXCPP 2745d31dbc53Smrgfi 27462a51b5beSmrg])# _LT_AC_PROG_CXXCPP 274732b578d3Smrg 27482a51b5beSmrg# AC_LIBTOOL_F77 27492a51b5beSmrg# -------------- 27502a51b5beSmrg# enable support for Fortran 77 libraries 27512a51b5beSmrgAC_DEFUN([AC_LIBTOOL_F77], 27522a51b5beSmrg[AC_REQUIRE([_LT_AC_LANG_F77]) 27532a51b5beSmrg])# AC_LIBTOOL_F77 275432b578d3Smrg 275532b578d3Smrg 27562a51b5beSmrg# _LT_AC_LANG_F77 27572a51b5beSmrg# --------------- 27582a51b5beSmrgAC_DEFUN([_LT_AC_LANG_F77], 27592a51b5beSmrg[AC_REQUIRE([AC_PROG_F77]) 27602a51b5beSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 27612a51b5beSmrg])# _LT_AC_LANG_F77 276232b578d3Smrg 276332b578d3Smrg 27642a51b5beSmrg# AC_LIBTOOL_GCJ 27652a51b5beSmrg# -------------- 27662a51b5beSmrg# enable support for GCJ libraries 27672a51b5beSmrgAC_DEFUN([AC_LIBTOOL_GCJ], 27682a51b5beSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 27692a51b5beSmrg])# AC_LIBTOOL_GCJ 277032b578d3Smrg 277132b578d3Smrg 27722a51b5beSmrg# _LT_AC_LANG_GCJ 27732a51b5beSmrg# --------------- 27742a51b5beSmrgAC_DEFUN([_LT_AC_LANG_GCJ], 27752a51b5beSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 27762a51b5beSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 27772a51b5beSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 27782a51b5beSmrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 27792a51b5beSmrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 27802a51b5beSmrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 27812a51b5beSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 27822a51b5beSmrg])# _LT_AC_LANG_GCJ 278332b578d3Smrg 278432b578d3Smrg 27852a51b5beSmrg# AC_LIBTOOL_RC 27862a51b5beSmrg# ------------- 27872a51b5beSmrg# enable support for Windows resource files 27882a51b5beSmrgAC_DEFUN([AC_LIBTOOL_RC], 27892a51b5beSmrg[AC_REQUIRE([LT_AC_PROG_RC]) 27902a51b5beSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 27912a51b5beSmrg])# AC_LIBTOOL_RC 279232b578d3Smrg 279332b578d3Smrg 27942a51b5beSmrg# AC_LIBTOOL_LANG_C_CONFIG 27952a51b5beSmrg# ------------------------ 27962a51b5beSmrg# Ensure that the configuration vars for the C compiler are 27972a51b5beSmrg# suitably defined. Those variables are subsequently used by 27982a51b5beSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 27992a51b5beSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 28002a51b5beSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 28012a51b5beSmrg[lt_save_CC="$CC" 28022a51b5beSmrgAC_LANG_PUSH(C) 280332b578d3Smrg 28042a51b5beSmrg# Source file extension for C test sources. 28052a51b5beSmrgac_ext=c 280632b578d3Smrg 28072a51b5beSmrg# Object file extension for compiled C test sources. 28082a51b5beSmrgobjext=o 28092a51b5beSmrg_LT_AC_TAGVAR(objext, $1)=$objext 281032b578d3Smrg 28112a51b5beSmrg# Code to be used in simple compile tests 28122a51b5beSmrglt_simple_compile_test_code="int some_variable = 0;" 281332b578d3Smrg 28142a51b5beSmrg# Code to be used in simple link tests 28152a51b5beSmrglt_simple_link_test_code='int main(){return(0);}' 281632b578d3Smrg 28172a51b5beSmrg_LT_AC_SYS_COMPILER 281832b578d3Smrg 28192a51b5beSmrg# save warnings/boilerplate of simple test code 28202a51b5beSmrg_LT_COMPILER_BOILERPLATE 28212a51b5beSmrg_LT_LINKER_BOILERPLATE 282232b578d3Smrg 28232a51b5beSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 28242a51b5beSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 28252a51b5beSmrgAC_LIBTOOL_PROG_CC_C_O($1) 28262a51b5beSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 28272a51b5beSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 28282a51b5beSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 28292a51b5beSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 28302a51b5beSmrgAC_LIBTOOL_SYS_LIB_STRIP 28312a51b5beSmrgAC_LIBTOOL_DLOPEN_SELF 283232b578d3Smrg 28332a51b5beSmrg# Report which library types will actually be built 28342a51b5beSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 28352a51b5beSmrgAC_MSG_RESULT([$can_build_shared]) 283632b578d3Smrg 28372a51b5beSmrgAC_MSG_CHECKING([whether to build shared libraries]) 28382a51b5beSmrgtest "$can_build_shared" = "no" && enable_shared=no 283932b578d3Smrg 28402a51b5beSmrg# On AIX, shared libraries and static libraries use the same namespace, and 28412a51b5beSmrg# are all built from PIC. 28422a51b5beSmrgcase $host_os in 28432a51b5beSmrgaix3*) 28442a51b5beSmrg test "$enable_shared" = yes && enable_static=no 28452a51b5beSmrg if test -n "$RANLIB"; then 28462a51b5beSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 28472a51b5beSmrg postinstall_cmds='$RANLIB $lib' 28482a51b5beSmrg fi 28492a51b5beSmrg ;; 285032b578d3Smrg 28512a51b5beSmrgaix[[4-9]]*) 28522a51b5beSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 28532a51b5beSmrg test "$enable_shared" = yes && enable_static=no 2854d31dbc53Smrg fi 28552a51b5beSmrg ;; 28562a51b5beSmrgesac 28572a51b5beSmrgAC_MSG_RESULT([$enable_shared]) 285832b578d3Smrg 28592a51b5beSmrgAC_MSG_CHECKING([whether to build static libraries]) 28602a51b5beSmrg# Make sure either enable_shared or enable_static is yes. 28612a51b5beSmrgtest "$enable_shared" = yes || enable_static=yes 28622a51b5beSmrgAC_MSG_RESULT([$enable_static]) 286332b578d3Smrg 28642a51b5beSmrgAC_LIBTOOL_CONFIG($1) 286532b578d3Smrg 28662a51b5beSmrgAC_LANG_POP 28672a51b5beSmrgCC="$lt_save_CC" 28682a51b5beSmrg])# AC_LIBTOOL_LANG_C_CONFIG 286932b578d3Smrg 287032b578d3Smrg 28712a51b5beSmrg# AC_LIBTOOL_LANG_CXX_CONFIG 28722a51b5beSmrg# -------------------------- 28732a51b5beSmrg# Ensure that the configuration vars for the C compiler are 28742a51b5beSmrg# suitably defined. Those variables are subsequently used by 28752a51b5beSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 28762a51b5beSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 28772a51b5beSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 28782a51b5beSmrg[AC_LANG_PUSH(C++) 28792a51b5beSmrgAC_REQUIRE([AC_PROG_CXX]) 28802a51b5beSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 288132b578d3Smrg 28822a51b5beSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 28832a51b5beSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 28842a51b5beSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 28852a51b5beSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 28862a51b5beSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 28872a51b5beSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 28882a51b5beSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 28892a51b5beSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 28902a51b5beSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 28912a51b5beSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 28922a51b5beSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 28932a51b5beSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 28942a51b5beSmrg_LT_AC_TAGVAR(module_cmds, $1)= 28952a51b5beSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 28962a51b5beSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 28972a51b5beSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 28982a51b5beSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 28992a51b5beSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 29002a51b5beSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 290132b578d3Smrg 29022a51b5beSmrg# Dependencies to place before and after the object being linked: 29032a51b5beSmrg_LT_AC_TAGVAR(predep_objects, $1)= 29042a51b5beSmrg_LT_AC_TAGVAR(postdep_objects, $1)= 29052a51b5beSmrg_LT_AC_TAGVAR(predeps, $1)= 29062a51b5beSmrg_LT_AC_TAGVAR(postdeps, $1)= 29072a51b5beSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 29082a51b5beSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 2909d31dbc53Smrg 29102a51b5beSmrg# Source file extension for C++ test sources. 29112a51b5beSmrgac_ext=cpp 29122a51b5beSmrg 29132a51b5beSmrg# Object file extension for compiled C++ test sources. 29142a51b5beSmrgobjext=o 29152a51b5beSmrg_LT_AC_TAGVAR(objext, $1)=$objext 29162a51b5beSmrg 29172a51b5beSmrg# Code to be used in simple compile tests 29182a51b5beSmrglt_simple_compile_test_code="int some_variable = 0;" 29192a51b5beSmrg 29202a51b5beSmrg# Code to be used in simple link tests 29212a51b5beSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 29222a51b5beSmrg 29232a51b5beSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 29242a51b5beSmrg_LT_AC_SYS_COMPILER 29252a51b5beSmrg 29262a51b5beSmrg# save warnings/boilerplate of simple test code 29272a51b5beSmrg_LT_COMPILER_BOILERPLATE 29282a51b5beSmrg_LT_LINKER_BOILERPLATE 29292a51b5beSmrg 29302a51b5beSmrg# Allow CC to be a program name with arguments. 29312a51b5beSmrglt_save_CC=$CC 29322a51b5beSmrglt_save_LD=$LD 29332a51b5beSmrglt_save_GCC=$GCC 29342a51b5beSmrgGCC=$GXX 29352a51b5beSmrglt_save_with_gnu_ld=$with_gnu_ld 29362a51b5beSmrglt_save_path_LD=$lt_cv_path_LD 29372a51b5beSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 29382a51b5beSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 2939d31dbc53Smrgelse 29402a51b5beSmrg $as_unset lt_cv_prog_gnu_ld 2941d31dbc53Smrgfi 29422a51b5beSmrgif test -n "${lt_cv_path_LDCXX+set}"; then 29432a51b5beSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 29442a51b5beSmrgelse 29452a51b5beSmrg $as_unset lt_cv_path_LD 2946d31dbc53Smrgfi 29472a51b5beSmrgtest -z "${LDCXX+set}" || LD=$LDCXX 29482a51b5beSmrgCC=${CXX-"c++"} 29492a51b5beSmrgcompiler=$CC 29502a51b5beSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 29512a51b5beSmrg_LT_CC_BASENAME([$compiler]) 295232b578d3Smrg 29532a51b5beSmrg# We don't want -fno-exception wen compiling C++ code, so set the 29542a51b5beSmrg# no_builtin_flag separately 29552a51b5beSmrgif test "$GXX" = yes; then 29562a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 2957d31dbc53Smrgelse 29582a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 2959d31dbc53Smrgfi 296032b578d3Smrg 29612a51b5beSmrgif test "$GXX" = yes; then 29622a51b5beSmrg # Set up default GNU C++ configuration 296332b578d3Smrg 29642a51b5beSmrg AC_PROG_LD 2965d31dbc53Smrg 29662a51b5beSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 29672a51b5beSmrg # archiving commands below assume that GNU ld is being used. 29682a51b5beSmrg if test "$with_gnu_ld" = yes; then 29692a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 29702a51b5beSmrg _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' 2971d31dbc53Smrg 29722a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 29732a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 29742a51b5beSmrg 29752a51b5beSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 29762a51b5beSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 29772a51b5beSmrg # investigate it a little bit more. (MM) 29782a51b5beSmrg wlarc='${wl}' 29792a51b5beSmrg 29802a51b5beSmrg # ancient GNU ld didn't support --whole-archive et. al. 29812a51b5beSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 29822a51b5beSmrg grep 'no-whole-archive' > /dev/null; then 29832a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 2984d31dbc53Smrg else 29852a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2986d31dbc53Smrg fi 29872a51b5beSmrg else 29882a51b5beSmrg with_gnu_ld=no 29892a51b5beSmrg wlarc= 299032b578d3Smrg 29912a51b5beSmrg # A generic and very simple default shared library creation 29922a51b5beSmrg # command for GNU C++ for the case where it uses the native 29932a51b5beSmrg # linker, instead of GNU ld. If possible, this setting should 29942a51b5beSmrg # overridden to take advantage of the native linker features on 29952a51b5beSmrg # the platform it is being used on. 29962a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 29972a51b5beSmrg fi 299832b578d3Smrg 29992a51b5beSmrg # Commands to make compiler produce verbose output that lists 30002a51b5beSmrg # what "hidden" libraries, object files and flags are used when 30012a51b5beSmrg # linking a shared library. 30022a51b5beSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 300332b578d3Smrg 30042a51b5beSmrgelse 30052a51b5beSmrg GXX=no 30062a51b5beSmrg with_gnu_ld=no 30072a51b5beSmrg wlarc= 30082a51b5beSmrgfi 300932b578d3Smrg 30102a51b5beSmrg# PORTME: fill in a description of your system's C++ link characteristics 30112a51b5beSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 30122a51b5beSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 30132a51b5beSmrgcase $host_os in 30142a51b5beSmrg aix3*) 30152a51b5beSmrg # FIXME: insert proper C++ library support 30162a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 30172a51b5beSmrg ;; 30182a51b5beSmrg aix[[4-9]]*) 30192a51b5beSmrg if test "$host_cpu" = ia64; then 30202a51b5beSmrg # On IA64, the linker does run time linking by default, so we don't 30212a51b5beSmrg # have to do anything special. 30222a51b5beSmrg aix_use_runtimelinking=no 30232a51b5beSmrg exp_sym_flag='-Bexport' 30242a51b5beSmrg no_entry_flag="" 30252a51b5beSmrg else 30262a51b5beSmrg aix_use_runtimelinking=no 302732b578d3Smrg 30282a51b5beSmrg # Test if we are trying to use run time linking or normal 30292a51b5beSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 30302a51b5beSmrg # need to do runtime linking. 30312a51b5beSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 30322a51b5beSmrg for ld_flag in $LDFLAGS; do 30332a51b5beSmrg case $ld_flag in 30342a51b5beSmrg *-brtl*) 30352a51b5beSmrg aix_use_runtimelinking=yes 30362a51b5beSmrg break 30372a51b5beSmrg ;; 30382a51b5beSmrg esac 30392a51b5beSmrg done 30402a51b5beSmrg ;; 30412a51b5beSmrg esac 304232b578d3Smrg 30432a51b5beSmrg exp_sym_flag='-bexport' 30442a51b5beSmrg no_entry_flag='-bnoentry' 30452a51b5beSmrg fi 304632b578d3Smrg 30472a51b5beSmrg # When large executables or shared objects are built, AIX ld can 30482a51b5beSmrg # have problems creating the table of contents. If linking a library 30492a51b5beSmrg # or program results in "error TOC overflow" add -mminimal-toc to 30502a51b5beSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 30512a51b5beSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 305232b578d3Smrg 30532a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 30542a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 30552a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 30562a51b5beSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 305732b578d3Smrg 30582a51b5beSmrg if test "$GXX" = yes; then 30592a51b5beSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 30602a51b5beSmrg # We only want to do this on AIX 4.2 and lower, the check 30612a51b5beSmrg # below for broken collect2 doesn't work under 4.3+ 30622a51b5beSmrg collect2name=`${CC} -print-prog-name=collect2` 30632a51b5beSmrg if test -f "$collect2name" && \ 30642a51b5beSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 30652a51b5beSmrg then 30662a51b5beSmrg # We have reworked collect2 30672a51b5beSmrg : 30682a51b5beSmrg else 30692a51b5beSmrg # We have old collect2 30702a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 30712a51b5beSmrg # It fails to find uninstalled libraries when the uninstalled 30722a51b5beSmrg # path is not listed in the libpath. Setting hardcode_minus_L 30732a51b5beSmrg # to unsupported forces relinking 30742a51b5beSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 30752a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 30762a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 30772a51b5beSmrg fi 30782a51b5beSmrg ;; 30792a51b5beSmrg esac 30802a51b5beSmrg shared_flag='-shared' 30812a51b5beSmrg if test "$aix_use_runtimelinking" = yes; then 30822a51b5beSmrg shared_flag="$shared_flag "'${wl}-G' 30832a51b5beSmrg fi 30842a51b5beSmrg else 30852a51b5beSmrg # not using gcc 30862a51b5beSmrg if test "$host_cpu" = ia64; then 30872a51b5beSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 30882a51b5beSmrg # chokes on -Wl,-G. The following line is correct: 30892a51b5beSmrg shared_flag='-G' 30902a51b5beSmrg else 30912a51b5beSmrg if test "$aix_use_runtimelinking" = yes; then 30922a51b5beSmrg shared_flag='${wl}-G' 30932a51b5beSmrg else 30942a51b5beSmrg shared_flag='${wl}-bM:SRE' 30952a51b5beSmrg fi 30962a51b5beSmrg fi 30972a51b5beSmrg fi 309832b578d3Smrg 30992a51b5beSmrg # It seems that -bexpall does not export symbols beginning with 31002a51b5beSmrg # underscore (_), so it is better to generate a list of symbols to export. 31012a51b5beSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 31022a51b5beSmrg if test "$aix_use_runtimelinking" = yes; then 31032a51b5beSmrg # Warning - without using the other runtime loading flags (-brtl), 31042a51b5beSmrg # -berok will link without error, but may produce a broken library. 31052a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 31062a51b5beSmrg # Determine the default libpath from the value encoded in an empty executable. 31072a51b5beSmrg _LT_AC_SYS_LIBPATH_AIX 31082a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 310932b578d3Smrg 31102a51b5beSmrg _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" 31112a51b5beSmrg else 31122a51b5beSmrg if test "$host_cpu" = ia64; then 31132a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 31142a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 31152a51b5beSmrg _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" 31162a51b5beSmrg else 31172a51b5beSmrg # Determine the default libpath from the value encoded in an empty executable. 31182a51b5beSmrg _LT_AC_SYS_LIBPATH_AIX 31192a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 31202a51b5beSmrg # Warning - without using the other run time loading flags, 31212a51b5beSmrg # -berok will link without error, but may produce a broken library. 31222a51b5beSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 31232a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 31242a51b5beSmrg # Exported symbols can be pulled into shared objects from archives 31252a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 31262a51b5beSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 31272a51b5beSmrg # This is similar to how AIX traditionally builds its shared libraries. 31282a51b5beSmrg _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' 31292a51b5beSmrg fi 31302a51b5beSmrg fi 3131d31dbc53Smrg ;; 313232b578d3Smrg 31332a51b5beSmrg beos*) 31342a51b5beSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 31352a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 31362a51b5beSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 31372a51b5beSmrg # support --undefined. This deserves some investigation. FIXME 31382a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3139d31dbc53Smrg else 31402a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3141d31dbc53Smrg fi 3142d31dbc53Smrg ;; 314332b578d3Smrg 31442a51b5beSmrg chorus*) 31452a51b5beSmrg case $cc_basename in 31462a51b5beSmrg *) 31472a51b5beSmrg # FIXME: insert proper C++ library support 31482a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 31492a51b5beSmrg ;; 3150d31dbc53Smrg esac 3151d31dbc53Smrg ;; 315232b578d3Smrg 31532a51b5beSmrg cygwin* | mingw* | pw32*) 31542a51b5beSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 31552a51b5beSmrg # as there is no search path for DLLs. 31562a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 31572a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 31582a51b5beSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 31592a51b5beSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 316032b578d3Smrg 31612a51b5beSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 31622a51b5beSmrg _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' 31632a51b5beSmrg # If the export-symbols file already is a .def file (1st line 31642a51b5beSmrg # is EXPORTS), use it as is; otherwise, prepend... 31652a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 31662a51b5beSmrg cp $export_symbols $output_objdir/$soname.def; 31672a51b5beSmrg else 31682a51b5beSmrg echo EXPORTS > $output_objdir/$soname.def; 31692a51b5beSmrg cat $export_symbols >> $output_objdir/$soname.def; 31702a51b5beSmrg fi~ 31712a51b5beSmrg $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' 31722a51b5beSmrg else 31732a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 31742a51b5beSmrg fi 3175d31dbc53Smrg ;; 31762a51b5beSmrg darwin* | rhapsody*) 31772a51b5beSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 31782a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 31792a51b5beSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 31802a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 31812a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 31822a51b5beSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 31832a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 31842a51b5beSmrg if test "$GXX" = yes ; then 31852a51b5beSmrg output_verbose_link_cmd='echo' 31862a51b5beSmrg _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}" 31872a51b5beSmrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 31882a51b5beSmrg _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}" 31892a51b5beSmrg _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}" 31902a51b5beSmrg if test "$lt_cv_apple_cc_single_mod" != "yes"; then 31912a51b5beSmrg _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}" 31922a51b5beSmrg _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}" 31932a51b5beSmrg fi 31942a51b5beSmrg else 31952a51b5beSmrg case $cc_basename in 31962a51b5beSmrg xlc*) 31972a51b5beSmrg output_verbose_link_cmd='echo' 31982a51b5beSmrg _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' 31992a51b5beSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 32002a51b5beSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 32012a51b5beSmrg _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}' 32022a51b5beSmrg _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}' 32032a51b5beSmrg ;; 32042a51b5beSmrg *) 32052a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32062a51b5beSmrg ;; 32072a51b5beSmrg esac 32082a51b5beSmrg fi 32092a51b5beSmrg ;; 3210d31dbc53Smrg 32112a51b5beSmrg dgux*) 32122a51b5beSmrg case $cc_basename in 32132a51b5beSmrg ec++*) 32142a51b5beSmrg # FIXME: insert proper C++ library support 32152a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32162a51b5beSmrg ;; 32172a51b5beSmrg ghcx*) 32182a51b5beSmrg # Green Hills C++ Compiler 32192a51b5beSmrg # FIXME: insert proper C++ library support 32202a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3221d31dbc53Smrg ;; 3222d31dbc53Smrg *) 32232a51b5beSmrg # FIXME: insert proper C++ library support 32242a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3225d31dbc53Smrg ;; 32262a51b5beSmrg esac 32272a51b5beSmrg ;; 32282a51b5beSmrg freebsd[[12]]*) 32292a51b5beSmrg # C++ shared libraries reported to be fairly broken before switch to ELF 32302a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32312a51b5beSmrg ;; 32322a51b5beSmrg freebsd-elf*) 32332a51b5beSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 32342a51b5beSmrg ;; 32352a51b5beSmrg freebsd* | dragonfly*) 32362a51b5beSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 32372a51b5beSmrg # conventions 32382a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 32392a51b5beSmrg ;; 32402a51b5beSmrg gnu*) 32412a51b5beSmrg ;; 32422a51b5beSmrg hpux9*) 32432a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 32442a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 32452a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 32462a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 32472a51b5beSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 32482a51b5beSmrg # but as the default 32492a51b5beSmrg # location of the library. 325032b578d3Smrg 32512a51b5beSmrg case $cc_basename in 32522a51b5beSmrg CC*) 32532a51b5beSmrg # FIXME: insert proper C++ library support 32542a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 325532b578d3Smrg ;; 32562a51b5beSmrg aCC*) 32572a51b5beSmrg _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' 32582a51b5beSmrg # Commands to make compiler produce verbose output that lists 32592a51b5beSmrg # what "hidden" libraries, object files and flags are used when 32602a51b5beSmrg # linking a shared library. 32612a51b5beSmrg # 32622a51b5beSmrg # There doesn't appear to be a way to prevent this compiler from 32632a51b5beSmrg # explicitly linking system object files so we need to strip them 32642a51b5beSmrg # from the output so that they don't get included in the library 32652a51b5beSmrg # dependencies. 32662a51b5beSmrg 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' 3267d31dbc53Smrg ;; 32682a51b5beSmrg *) 32692a51b5beSmrg if test "$GXX" = yes; then 32702a51b5beSmrg _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' 32712a51b5beSmrg else 32722a51b5beSmrg # FIXME: insert proper C++ library support 32732a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32742a51b5beSmrg fi 327532b578d3Smrg ;; 32762a51b5beSmrg esac 32772a51b5beSmrg ;; 32782a51b5beSmrg hpux10*|hpux11*) 32792a51b5beSmrg if test $with_gnu_ld = no; then 32802a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 32812a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 328232b578d3Smrg 32832a51b5beSmrg case $host_cpu in 32842a51b5beSmrg hppa*64*|ia64*) ;; 32852a51b5beSmrg *) 32862a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 32872a51b5beSmrg ;; 32882a51b5beSmrg esac 3289d31dbc53Smrg fi 32902a51b5beSmrg case $host_cpu in 32912a51b5beSmrg hppa*64*|ia64*) 32922a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 32932a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 32942a51b5beSmrg ;; 32952a51b5beSmrg *) 32962a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 32972a51b5beSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 32982a51b5beSmrg # but as the default 32992a51b5beSmrg # location of the library. 33002a51b5beSmrg ;; 3301d31dbc53Smrg esac 330232b578d3Smrg 33032a51b5beSmrg case $cc_basename in 33042a51b5beSmrg CC*) 33052a51b5beSmrg # FIXME: insert proper C++ library support 33062a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3307d31dbc53Smrg ;; 33082a51b5beSmrg aCC*) 33092a51b5beSmrg case $host_cpu in 33102a51b5beSmrg hppa*64*) 33112a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33122a51b5beSmrg ;; 33132a51b5beSmrg ia64*) 33142a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33152a51b5beSmrg ;; 33162a51b5beSmrg *) 33172a51b5beSmrg _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' 33182a51b5beSmrg ;; 33192a51b5beSmrg esac 33202a51b5beSmrg # Commands to make compiler produce verbose output that lists 33212a51b5beSmrg # what "hidden" libraries, object files and flags are used when 33222a51b5beSmrg # linking a shared library. 33232a51b5beSmrg # 33242a51b5beSmrg # There doesn't appear to be a way to prevent this compiler from 33252a51b5beSmrg # explicitly linking system object files so we need to strip them 33262a51b5beSmrg # from the output so that they don't get included in the library 33272a51b5beSmrg # dependencies. 33282a51b5beSmrg 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' 3329d31dbc53Smrg ;; 33302a51b5beSmrg *) 33312a51b5beSmrg if test "$GXX" = yes; then 33322a51b5beSmrg if test $with_gnu_ld = no; then 33332a51b5beSmrg case $host_cpu in 33342a51b5beSmrg hppa*64*) 33352a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33362a51b5beSmrg ;; 33372a51b5beSmrg ia64*) 33382a51b5beSmrg _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' 33392a51b5beSmrg ;; 33402a51b5beSmrg *) 33412a51b5beSmrg _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' 33422a51b5beSmrg ;; 33432a51b5beSmrg esac 33442a51b5beSmrg fi 3345d31dbc53Smrg else 33462a51b5beSmrg # FIXME: insert proper C++ library support 33472a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3348d31dbc53Smrg fi 3349d31dbc53Smrg ;; 33502a51b5beSmrg esac 33512a51b5beSmrg ;; 33522a51b5beSmrg interix[[3-9]]*) 33532a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 33542a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 33552a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 33562a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 33572a51b5beSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 33582a51b5beSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 33592a51b5beSmrg # default) and relocated if they conflict, which is a slow very memory 33602a51b5beSmrg # consuming and fragmenting process. To avoid this, we pick a random, 33612a51b5beSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 33622a51b5beSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 33632a51b5beSmrg _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' 33642a51b5beSmrg _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' 33652a51b5beSmrg ;; 33662a51b5beSmrg irix5* | irix6*) 33672a51b5beSmrg case $cc_basename in 33682a51b5beSmrg CC*) 33692a51b5beSmrg # SGI C++ 33702a51b5beSmrg _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' 337132b578d3Smrg 33722a51b5beSmrg # Archives containing C++ object files must be created using 33732a51b5beSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 33742a51b5beSmrg # necessary to make sure instantiated templates are included 33752a51b5beSmrg # in the archive. 33762a51b5beSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 3377d31dbc53Smrg ;; 3378d31dbc53Smrg *) 33792a51b5beSmrg if test "$GXX" = yes; then 33802a51b5beSmrg if test "$with_gnu_ld" = no; then 33812a51b5beSmrg _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' 33822a51b5beSmrg else 33832a51b5beSmrg _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' 33842a51b5beSmrg fi 33852a51b5beSmrg fi 33862a51b5beSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3387d31dbc53Smrg ;; 33882a51b5beSmrg esac 33892a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 33902a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 33912a51b5beSmrg ;; 33922a51b5beSmrg linux* | k*bsd*-gnu) 33932a51b5beSmrg case $cc_basename in 33942a51b5beSmrg KCC*) 33952a51b5beSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 339632b578d3Smrg 33972a51b5beSmrg # KCC will only create a shared library if the output file 33982a51b5beSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 33992a51b5beSmrg # to its proper name (with version) after linking. 34002a51b5beSmrg _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' 34012a51b5beSmrg _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' 34022a51b5beSmrg # Commands to make compiler produce verbose output that lists 34032a51b5beSmrg # what "hidden" libraries, object files and flags are used when 34042a51b5beSmrg # linking a shared library. 34052a51b5beSmrg # 34062a51b5beSmrg # There doesn't appear to be a way to prevent this compiler from 34072a51b5beSmrg # explicitly linking system object files so we need to strip them 34082a51b5beSmrg # from the output so that they don't get included in the library 34092a51b5beSmrg # dependencies. 34102a51b5beSmrg 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' 341132b578d3Smrg 34122a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 34132a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 341432b578d3Smrg 34152a51b5beSmrg # Archives containing C++ object files must be created using 34162a51b5beSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 34172a51b5beSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 34182a51b5beSmrg ;; 34192a51b5beSmrg icpc*) 34202a51b5beSmrg # Intel C++ 34212a51b5beSmrg with_gnu_ld=yes 34222a51b5beSmrg # version 8.0 and above of icpc choke on multiply defined symbols 34232a51b5beSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 34242a51b5beSmrg # earlier do not add the objects themselves. 34252a51b5beSmrg case `$CC -V 2>&1` in 34262a51b5beSmrg *"Version 7."*) 34272a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 34282a51b5beSmrg _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' 34292a51b5beSmrg ;; 34302a51b5beSmrg *) # Version 8.0 or newer 34312a51b5beSmrg tmp_idyn= 34322a51b5beSmrg case $host_cpu in 34332a51b5beSmrg ia64*) tmp_idyn=' -i_dynamic';; 34342a51b5beSmrg esac 34352a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 34362a51b5beSmrg _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' 34372a51b5beSmrg ;; 34382a51b5beSmrg esac 34392a51b5beSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 34402a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 34412a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 34422a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 34432a51b5beSmrg ;; 34442a51b5beSmrg pgCC* | pgcpp*) 34452a51b5beSmrg # Portland Group C++ compiler 34462a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 34472a51b5beSmrg _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' 344832b578d3Smrg 34492a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 34502a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 34512a51b5beSmrg _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' 34522a51b5beSmrg ;; 34532a51b5beSmrg cxx*) 34542a51b5beSmrg # Compaq C++ 34552a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 34562a51b5beSmrg _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' 345732b578d3Smrg 34582a51b5beSmrg runpath_var=LD_RUN_PATH 34592a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 34602a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 346132b578d3Smrg 34622a51b5beSmrg # Commands to make compiler produce verbose output that lists 34632a51b5beSmrg # what "hidden" libraries, object files and flags are used when 34642a51b5beSmrg # linking a shared library. 34652a51b5beSmrg # 34662a51b5beSmrg # There doesn't appear to be a way to prevent this compiler from 34672a51b5beSmrg # explicitly linking system object files so we need to strip them 34682a51b5beSmrg # from the output so that they don't get included in the library 34692a51b5beSmrg # dependencies. 34702a51b5beSmrg 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' 34712a51b5beSmrg ;; 34722a51b5beSmrg *) 34732a51b5beSmrg case `$CC -V 2>&1 | sed 5q` in 34742a51b5beSmrg *Sun\ C*) 34752a51b5beSmrg # Sun C++ 5.9 34762a51b5beSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 34772a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 34782a51b5beSmrg _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' 34792a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 34802a51b5beSmrg _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' 34812a51b5beSmrg 34822a51b5beSmrg # Not sure whether something based on 34832a51b5beSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 34842a51b5beSmrg # would be better. 34852a51b5beSmrg output_verbose_link_cmd='echo' 34862a51b5beSmrg 34872a51b5beSmrg # Archives containing C++ object files must be created using 34882a51b5beSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 34892a51b5beSmrg # necessary to make sure instantiated templates are included 34902a51b5beSmrg # in the archive. 34912a51b5beSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 34922a51b5beSmrg ;; 34932a51b5beSmrg esac 34942a51b5beSmrg ;; 34952a51b5beSmrg esac 34962a51b5beSmrg ;; 34972a51b5beSmrg lynxos*) 34982a51b5beSmrg # FIXME: insert proper C++ library support 34992a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35002a51b5beSmrg ;; 35012a51b5beSmrg m88k*) 35022a51b5beSmrg # FIXME: insert proper C++ library support 35032a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35042a51b5beSmrg ;; 35052a51b5beSmrg mvs*) 35062a51b5beSmrg case $cc_basename in 35072a51b5beSmrg cxx*) 35082a51b5beSmrg # FIXME: insert proper C++ library support 35092a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35102a51b5beSmrg ;; 35112a51b5beSmrg *) 35122a51b5beSmrg # FIXME: insert proper C++ library support 35132a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35142a51b5beSmrg ;; 35152a51b5beSmrg esac 35162a51b5beSmrg ;; 35172a51b5beSmrg netbsd*) 35182a51b5beSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 35192a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 35202a51b5beSmrg wlarc= 35212a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 35222a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 35232a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 35242a51b5beSmrg fi 35252a51b5beSmrg # Workaround some broken pre-1.5 toolchains 35262a51b5beSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 35272a51b5beSmrg ;; 35282a51b5beSmrg openbsd2*) 35292a51b5beSmrg # C++ shared libraries are fairly broken 35302a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35312a51b5beSmrg ;; 35322a51b5beSmrg openbsd*) 35332a51b5beSmrg if test -f /usr/libexec/ld.so; then 35342a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 35352a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 35362a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 35372a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 35382a51b5beSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 35392a51b5beSmrg _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' 35402a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 35412a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 35422a51b5beSmrg fi 35432a51b5beSmrg output_verbose_link_cmd='echo' 35442a51b5beSmrg else 35452a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35462a51b5beSmrg fi 35472a51b5beSmrg ;; 35482a51b5beSmrg osf3*) 35492a51b5beSmrg case $cc_basename in 35502a51b5beSmrg KCC*) 35512a51b5beSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 355232b578d3Smrg 35532a51b5beSmrg # KCC will only create a shared library if the output file 35542a51b5beSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 35552a51b5beSmrg # to its proper name (with version) after linking. 35562a51b5beSmrg _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' 355732b578d3Smrg 35582a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 35592a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 356032b578d3Smrg 35612a51b5beSmrg # Archives containing C++ object files must be created using 35622a51b5beSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 35632a51b5beSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 356432b578d3Smrg 35652a51b5beSmrg ;; 35662a51b5beSmrg RCC*) 35672a51b5beSmrg # Rational C++ 2.4.1 35682a51b5beSmrg # FIXME: insert proper C++ library support 35692a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35702a51b5beSmrg ;; 35712a51b5beSmrg cxx*) 35722a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 35732a51b5beSmrg _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' 357432b578d3Smrg 35752a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 35762a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 357732b578d3Smrg 35782a51b5beSmrg # Commands to make compiler produce verbose output that lists 35792a51b5beSmrg # what "hidden" libraries, object files and flags are used when 35802a51b5beSmrg # linking a shared library. 35812a51b5beSmrg # 35822a51b5beSmrg # There doesn't appear to be a way to prevent this compiler from 35832a51b5beSmrg # explicitly linking system object files so we need to strip them 35842a51b5beSmrg # from the output so that they don't get included in the library 35852a51b5beSmrg # dependencies. 35862a51b5beSmrg 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' 35872a51b5beSmrg ;; 35882a51b5beSmrg *) 35892a51b5beSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 35902a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 35912a51b5beSmrg _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' 359232b578d3Smrg 35932a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 35942a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 359532b578d3Smrg 35962a51b5beSmrg # Commands to make compiler produce verbose output that lists 35972a51b5beSmrg # what "hidden" libraries, object files and flags are used when 35982a51b5beSmrg # linking a shared library. 35992a51b5beSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 360032b578d3Smrg 36012a51b5beSmrg else 36022a51b5beSmrg # FIXME: insert proper C++ library support 36032a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3604d31dbc53Smrg fi 36052a51b5beSmrg ;; 36062a51b5beSmrg esac 36072a51b5beSmrg ;; 36082a51b5beSmrg osf4* | osf5*) 36092a51b5beSmrg case $cc_basename in 36102a51b5beSmrg KCC*) 36112a51b5beSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 361232b578d3Smrg 36132a51b5beSmrg # KCC will only create a shared library if the output file 36142a51b5beSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 36152a51b5beSmrg # to its proper name (with version) after linking. 36162a51b5beSmrg _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' 361732b578d3Smrg 36182a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 36192a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 362032b578d3Smrg 36212a51b5beSmrg # Archives containing C++ object files must be created using 36222a51b5beSmrg # the KAI C++ compiler. 36232a51b5beSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 36242a51b5beSmrg ;; 36252a51b5beSmrg RCC*) 36262a51b5beSmrg # Rational C++ 2.4.1 36272a51b5beSmrg # FIXME: insert proper C++ library support 36282a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36292a51b5beSmrg ;; 36302a51b5beSmrg cxx*) 36312a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 36322a51b5beSmrg _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' 36332a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 36342a51b5beSmrg echo "-hidden">> $lib.exp~ 36352a51b5beSmrg $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~ 36362a51b5beSmrg $rm $lib.exp' 363732b578d3Smrg 36382a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 36392a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 364032b578d3Smrg 36412a51b5beSmrg # Commands to make compiler produce verbose output that lists 36422a51b5beSmrg # what "hidden" libraries, object files and flags are used when 36432a51b5beSmrg # linking a shared library. 36442a51b5beSmrg # 36452a51b5beSmrg # There doesn't appear to be a way to prevent this compiler from 36462a51b5beSmrg # explicitly linking system object files so we need to strip them 36472a51b5beSmrg # from the output so that they don't get included in the library 36482a51b5beSmrg # dependencies. 36492a51b5beSmrg 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' 36502a51b5beSmrg ;; 36512a51b5beSmrg *) 36522a51b5beSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 36532a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 36542a51b5beSmrg _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' 365532b578d3Smrg 36562a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 36572a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 365832b578d3Smrg 36592a51b5beSmrg # Commands to make compiler produce verbose output that lists 36602a51b5beSmrg # what "hidden" libraries, object files and flags are used when 36612a51b5beSmrg # linking a shared library. 36622a51b5beSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 366332b578d3Smrg 36642a51b5beSmrg else 36652a51b5beSmrg # FIXME: insert proper C++ library support 36662a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36672a51b5beSmrg fi 36682a51b5beSmrg ;; 36692a51b5beSmrg esac 36702a51b5beSmrg ;; 36712a51b5beSmrg psos*) 36722a51b5beSmrg # FIXME: insert proper C++ library support 36732a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36742a51b5beSmrg ;; 36752a51b5beSmrg sunos4*) 36762a51b5beSmrg case $cc_basename in 36772a51b5beSmrg CC*) 36782a51b5beSmrg # Sun C++ 4.x 36792a51b5beSmrg # FIXME: insert proper C++ library support 36802a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36812a51b5beSmrg ;; 36822a51b5beSmrg lcc*) 36832a51b5beSmrg # Lucid 36842a51b5beSmrg # FIXME: insert proper C++ library support 36852a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36862a51b5beSmrg ;; 36872a51b5beSmrg *) 36882a51b5beSmrg # FIXME: insert proper C++ library support 36892a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36902a51b5beSmrg ;; 36912a51b5beSmrg esac 36922a51b5beSmrg ;; 36932a51b5beSmrg solaris*) 36942a51b5beSmrg case $cc_basename in 36952a51b5beSmrg CC*) 36962a51b5beSmrg # Sun C++ 4.2, 5.x and Centerline C++ 36972a51b5beSmrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 36982a51b5beSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 36992a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 37002a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 37012a51b5beSmrg $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' 370232b578d3Smrg 37032a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 37042a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 37052a51b5beSmrg case $host_os in 37062a51b5beSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 37072a51b5beSmrg *) 37082a51b5beSmrg # The compiler driver will combine and reorder linker options, 37092a51b5beSmrg # but understands `-z linker_flag'. 37102a51b5beSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 37112a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 37122a51b5beSmrg ;; 3713d31dbc53Smrg esac 37142a51b5beSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 371532b578d3Smrg 37162a51b5beSmrg output_verbose_link_cmd='echo' 371732b578d3Smrg 37182a51b5beSmrg # Archives containing C++ object files must be created using 37192a51b5beSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 37202a51b5beSmrg # necessary to make sure instantiated templates are included 37212a51b5beSmrg # in the archive. 37222a51b5beSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 37232a51b5beSmrg ;; 37242a51b5beSmrg gcx*) 37252a51b5beSmrg # Green Hills C++ Compiler 37262a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 372732b578d3Smrg 37282a51b5beSmrg # The C++ compiler must be used to create the archive. 37292a51b5beSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 37302a51b5beSmrg ;; 37312a51b5beSmrg *) 37322a51b5beSmrg # GNU C++ compiler with Solaris linker 37332a51b5beSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 37342a51b5beSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 37352a51b5beSmrg if $CC --version | grep -v '^2\.7' > /dev/null; then 37362a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 37372a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 37382a51b5beSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 373932b578d3Smrg 37402a51b5beSmrg # Commands to make compiler produce verbose output that lists 37412a51b5beSmrg # what "hidden" libraries, object files and flags are used when 37422a51b5beSmrg # linking a shared library. 37432a51b5beSmrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 37442a51b5beSmrg else 37452a51b5beSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 37462a51b5beSmrg # platform. 37472a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 37482a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 37492a51b5beSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 37502a51b5beSmrg 37512a51b5beSmrg # Commands to make compiler produce verbose output that lists 37522a51b5beSmrg # what "hidden" libraries, object files and flags are used when 37532a51b5beSmrg # linking a shared library. 37542a51b5beSmrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 37552a51b5beSmrg fi 37562a51b5beSmrg 37572a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 37582a51b5beSmrg case $host_os in 37592a51b5beSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 37602a51b5beSmrg *) 37612a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 37622a51b5beSmrg ;; 37632a51b5beSmrg esac 37642a51b5beSmrg fi 37652a51b5beSmrg ;; 37662a51b5beSmrg esac 3767d31dbc53Smrg ;; 37682a51b5beSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 37692a51b5beSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 37702a51b5beSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 37712a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 37722a51b5beSmrg runpath_var='LD_RUN_PATH' 37732a51b5beSmrg 37742a51b5beSmrg case $cc_basename in 37752a51b5beSmrg CC*) 37762a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37772a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3778d31dbc53Smrg ;; 3779d31dbc53Smrg *) 37802a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37812a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3782d31dbc53Smrg ;; 37832a51b5beSmrg esac 37842a51b5beSmrg ;; 37852a51b5beSmrg sysv5* | sco3.2v5* | sco5v6*) 37862a51b5beSmrg # Note: We can NOT use -z defs as we might desire, because we do not 37872a51b5beSmrg # link with -lc, and that would cause any symbols used from libc to 37882a51b5beSmrg # always be unresolved, which means just about no library would 37892a51b5beSmrg # ever link correctly. If we're not using GNU ld we use -z text 37902a51b5beSmrg # though, which does catch some bad symbols but isn't as heavy-handed 37912a51b5beSmrg # as -z defs. 37922a51b5beSmrg # For security reasons, it is highly recommended that you always 37932a51b5beSmrg # use absolute paths for naming shared libraries, and exclude the 37942a51b5beSmrg # DT_RUNPATH tag from executables and libraries. But doing so 37952a51b5beSmrg # requires that you compile everything twice, which is a pain. 37962a51b5beSmrg # So that behaviour is only enabled if SCOABSPATH is set to a 37972a51b5beSmrg # non-empty value in the environment. Most likely only useful for 37982a51b5beSmrg # creating official distributions of packages. 37992a51b5beSmrg # This is a hack until libtool officially supports absolute path 38002a51b5beSmrg # names for shared libraries. 38012a51b5beSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 38022a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 38032a51b5beSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 38042a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 38052a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 38062a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 38072a51b5beSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 38082a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 38092a51b5beSmrg runpath_var='LD_RUN_PATH' 381032b578d3Smrg 38112a51b5beSmrg case $cc_basename in 38122a51b5beSmrg CC*) 38132a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 38142a51b5beSmrg _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' 38152a51b5beSmrg ;; 38162a51b5beSmrg *) 38172a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 38182a51b5beSmrg _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' 38192a51b5beSmrg ;; 38202a51b5beSmrg esac 38212a51b5beSmrg ;; 38222a51b5beSmrg tandem*) 38232a51b5beSmrg case $cc_basename in 38242a51b5beSmrg NCC*) 38252a51b5beSmrg # NonStop-UX NCC 3.20 38262a51b5beSmrg # FIXME: insert proper C++ library support 38272a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 38282a51b5beSmrg ;; 38292a51b5beSmrg *) 38302a51b5beSmrg # FIXME: insert proper C++ library support 38312a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 38322a51b5beSmrg ;; 38332a51b5beSmrg esac 38342a51b5beSmrg ;; 38352a51b5beSmrg vxworks*) 38362a51b5beSmrg # FIXME: insert proper C++ library support 38372a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 38382a51b5beSmrg ;; 38392a51b5beSmrg *) 38402a51b5beSmrg # FIXME: insert proper C++ library support 38412a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3842d31dbc53Smrg ;; 3843d31dbc53Smrgesac 38442a51b5beSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 38452a51b5beSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 384632b578d3Smrg 38472a51b5beSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 38482a51b5beSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 384932b578d3Smrg 38502a51b5beSmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 38512a51b5beSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 38522a51b5beSmrgAC_LIBTOOL_PROG_CC_C_O($1) 38532a51b5beSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 38542a51b5beSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 38552a51b5beSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 38562a51b5beSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 385732b578d3Smrg 38582a51b5beSmrgAC_LIBTOOL_CONFIG($1) 385932b578d3Smrg 38602a51b5beSmrgAC_LANG_POP 38612a51b5beSmrgCC=$lt_save_CC 38622a51b5beSmrgLDCXX=$LD 38632a51b5beSmrgLD=$lt_save_LD 38642a51b5beSmrgGCC=$lt_save_GCC 38652a51b5beSmrgwith_gnu_ldcxx=$with_gnu_ld 38662a51b5beSmrgwith_gnu_ld=$lt_save_with_gnu_ld 38672a51b5beSmrglt_cv_path_LDCXX=$lt_cv_path_LD 38682a51b5beSmrglt_cv_path_LD=$lt_save_path_LD 38692a51b5beSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 38702a51b5beSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 38712a51b5beSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG 387232b578d3Smrg 38732a51b5beSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 38742a51b5beSmrg# ------------------------------------ 38752a51b5beSmrg# Figure out "hidden" library dependencies from verbose 38762a51b5beSmrg# compiler output when linking a shared library. 38772a51b5beSmrg# Parse the compiler output and extract the necessary 38782a51b5beSmrg# objects, libraries and library flags. 38792a51b5beSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 38802a51b5beSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 38812a51b5beSmrgdnl we can't use the lt_simple_compile_test_code here, 38822a51b5beSmrgdnl because it contains code intended for an executable, 38832a51b5beSmrgdnl not a library. It's possible we should let each 38842a51b5beSmrgdnl tag define a new lt_????_link_test_code variable, 38852a51b5beSmrgdnl but it's only used here... 38862a51b5beSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 38872a51b5beSmrgint a; 38882a51b5beSmrgvoid foo (void) { a = 0; } 38892a51b5beSmrgEOF 38902a51b5beSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 38912a51b5beSmrgclass Foo 38922a51b5beSmrg{ 38932a51b5beSmrgpublic: 38942a51b5beSmrg Foo (void) { a = 0; } 38952a51b5beSmrgprivate: 38962a51b5beSmrg int a; 38972a51b5beSmrg}; 38982a51b5beSmrgEOF 38992a51b5beSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 39002a51b5beSmrg subroutine foo 39012a51b5beSmrg implicit none 39022a51b5beSmrg integer*4 a 39032a51b5beSmrg a=0 39042a51b5beSmrg return 39052a51b5beSmrg end 39062a51b5beSmrgEOF 39072a51b5beSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 39082a51b5beSmrgpublic class foo { 39092a51b5beSmrg private int a; 39102a51b5beSmrg public void bar (void) { 39112a51b5beSmrg a = 0; 39122a51b5beSmrg } 39132a51b5beSmrg}; 39142a51b5beSmrgEOF 39152a51b5beSmrg]) 39162a51b5beSmrgdnl Parse the compiler output and extract the necessary 39172a51b5beSmrgdnl objects, libraries and library flags. 39182a51b5beSmrgif AC_TRY_EVAL(ac_compile); then 39192a51b5beSmrg # Parse the compiler output and extract the necessary 39202a51b5beSmrg # objects, libraries and library flags. 392132b578d3Smrg 39222a51b5beSmrg # Sentinel used to keep track of whether or not we are before 39232a51b5beSmrg # the conftest object file. 39242a51b5beSmrg pre_test_object_deps_done=no 392532b578d3Smrg 39262a51b5beSmrg # The `*' in the case matches for architectures that use `case' in 39272a51b5beSmrg # $output_verbose_cmd can trigger glob expansion during the loop 39282a51b5beSmrg # eval without this substitution. 39292a51b5beSmrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 393032b578d3Smrg 39312a51b5beSmrg for p in `eval $output_verbose_link_cmd`; do 39322a51b5beSmrg case $p in 393332b578d3Smrg 39342a51b5beSmrg -L* | -R* | -l*) 39352a51b5beSmrg # Some compilers place space between "-{L,R}" and the path. 39362a51b5beSmrg # Remove the space. 39372a51b5beSmrg if test $p = "-L" \ 39382a51b5beSmrg || test $p = "-R"; then 39392a51b5beSmrg prev=$p 39402a51b5beSmrg continue 39412a51b5beSmrg else 39422a51b5beSmrg prev= 39432a51b5beSmrg fi 394432b578d3Smrg 39452a51b5beSmrg if test "$pre_test_object_deps_done" = no; then 39462a51b5beSmrg case $p in 39472a51b5beSmrg -L* | -R*) 39482a51b5beSmrg # Internal compiler library paths should come after those 39492a51b5beSmrg # provided the user. The postdeps already come after the 39502a51b5beSmrg # user supplied libs so there is no need to process them. 39512a51b5beSmrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 39522a51b5beSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 39532a51b5beSmrg else 39542a51b5beSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 39552a51b5beSmrg fi 39562a51b5beSmrg ;; 39572a51b5beSmrg # The "-l" case would never come before the object being 39582a51b5beSmrg # linked, so don't bother handling this case. 39592a51b5beSmrg esac 39602a51b5beSmrg else 39612a51b5beSmrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 39622a51b5beSmrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 39632a51b5beSmrg else 39642a51b5beSmrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 39652a51b5beSmrg fi 39662a51b5beSmrg fi 39672a51b5beSmrg ;; 396832b578d3Smrg 39692a51b5beSmrg *.$objext) 39702a51b5beSmrg # This assumes that the test object file only shows up 39712a51b5beSmrg # once in the compiler output. 39722a51b5beSmrg if test "$p" = "conftest.$objext"; then 39732a51b5beSmrg pre_test_object_deps_done=yes 39742a51b5beSmrg continue 39752a51b5beSmrg fi 397632b578d3Smrg 39772a51b5beSmrg if test "$pre_test_object_deps_done" = no; then 39782a51b5beSmrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 39792a51b5beSmrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 39802a51b5beSmrg else 39812a51b5beSmrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 39822a51b5beSmrg fi 39832a51b5beSmrg else 39842a51b5beSmrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 39852a51b5beSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 39862a51b5beSmrg else 39872a51b5beSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 39882a51b5beSmrg fi 39892a51b5beSmrg fi 39902a51b5beSmrg ;; 399132b578d3Smrg 39922a51b5beSmrg *) ;; # Ignore the rest. 399332b578d3Smrg 39942a51b5beSmrg esac 39952a51b5beSmrg done 399632b578d3Smrg 39972a51b5beSmrg # Clean up. 39982a51b5beSmrg rm -f a.out a.exe 39992a51b5beSmrgelse 40002a51b5beSmrg echo "libtool.m4: error: problem compiling $1 test program" 40012a51b5beSmrgfi 400232b578d3Smrg 40032a51b5beSmrg$rm -f confest.$objext 40042a51b5beSmrg 40052a51b5beSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 40062a51b5beSmrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 40072a51b5beSmrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 40082a51b5beSmrgfi 40092a51b5beSmrg 40102a51b5beSmrg# PORTME: override above test on systems where it is broken 40112a51b5beSmrgifelse([$1],[CXX], 40122a51b5beSmrg[case $host_os in 40132a51b5beSmrginterix[[3-9]]*) 40142a51b5beSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 40152a51b5beSmrg # hack all around it, let's just trust "g++" to DTRT. 40162a51b5beSmrg _LT_AC_TAGVAR(predep_objects,$1)= 40172a51b5beSmrg _LT_AC_TAGVAR(postdep_objects,$1)= 40182a51b5beSmrg _LT_AC_TAGVAR(postdeps,$1)= 4019d31dbc53Smrg ;; 402032b578d3Smrg 40212a51b5beSmrglinux*) 40222a51b5beSmrg case `$CC -V 2>&1 | sed 5q` in 40232a51b5beSmrg *Sun\ C*) 40242a51b5beSmrg # Sun C++ 5.9 40252a51b5beSmrg # 40262a51b5beSmrg # The more standards-conforming stlport4 library is 40272a51b5beSmrg # incompatible with the Cstd library. Avoid specifying 40282a51b5beSmrg # it if it's in CXXFLAGS. Ignore libCrun as 40292a51b5beSmrg # -library=stlport4 depends on it. 40302a51b5beSmrg case " $CXX $CXXFLAGS " in 40312a51b5beSmrg *" -library=stlport4 "*) 40322a51b5beSmrg solaris_use_stlport4=yes 40332a51b5beSmrg ;; 40342a51b5beSmrg esac 40352a51b5beSmrg if test "$solaris_use_stlport4" != yes; then 40362a51b5beSmrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 40372a51b5beSmrg fi 4038d31dbc53Smrg ;; 4039d31dbc53Smrg esac 4040d31dbc53Smrg ;; 404132b578d3Smrg 40422a51b5beSmrgsolaris*) 40432a51b5beSmrg case $cc_basename in 40442a51b5beSmrg CC*) 40452a51b5beSmrg # The more standards-conforming stlport4 library is 40462a51b5beSmrg # incompatible with the Cstd library. Avoid specifying 40472a51b5beSmrg # it if it's in CXXFLAGS. Ignore libCrun as 40482a51b5beSmrg # -library=stlport4 depends on it. 40492a51b5beSmrg case " $CXX $CXXFLAGS " in 40502a51b5beSmrg *" -library=stlport4 "*) 40512a51b5beSmrg solaris_use_stlport4=yes 40522a51b5beSmrg ;; 40532a51b5beSmrg esac 40542a51b5beSmrg 40552a51b5beSmrg # Adding this requires a known-good setup of shared libraries for 40562a51b5beSmrg # Sun compiler versions before 5.6, else PIC objects from an old 40572a51b5beSmrg # archive will be linked into the output, leading to subtle bugs. 40582a51b5beSmrg if test "$solaris_use_stlport4" != yes; then 40592a51b5beSmrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 40602a51b5beSmrg fi 40612a51b5beSmrg ;; 40622a51b5beSmrg esac 4063d31dbc53Smrg ;; 4064d31dbc53Smrgesac 4065d31dbc53Smrg]) 40662a51b5beSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 40672a51b5beSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 40682a51b5beSmrgesac 40692a51b5beSmrg])# AC_LIBTOOL_POSTDEP_PREDEP 407032b578d3Smrg 40712a51b5beSmrg# AC_LIBTOOL_LANG_F77_CONFIG 40722a51b5beSmrg# -------------------------- 40732a51b5beSmrg# Ensure that the configuration vars for the C compiler are 40742a51b5beSmrg# suitably defined. Those variables are subsequently used by 40752a51b5beSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 40762a51b5beSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 40772a51b5beSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 40782a51b5beSmrg[AC_REQUIRE([AC_PROG_F77]) 40792a51b5beSmrgAC_LANG_PUSH(Fortran 77) 408032b578d3Smrg 40812a51b5beSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 40822a51b5beSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 40832a51b5beSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 40842a51b5beSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 40852a51b5beSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 40862a51b5beSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 40872a51b5beSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 40882a51b5beSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 40892a51b5beSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 40902a51b5beSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 40912a51b5beSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 40922a51b5beSmrg_LT_AC_TAGVAR(module_cmds, $1)= 40932a51b5beSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 40942a51b5beSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 40952a51b5beSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 40962a51b5beSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 40972a51b5beSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 40982a51b5beSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 409932b578d3Smrg 41002a51b5beSmrg# Source file extension for f77 test sources. 41012a51b5beSmrgac_ext=f 410232b578d3Smrg 41032a51b5beSmrg# Object file extension for compiled f77 test sources. 41042a51b5beSmrgobjext=o 41052a51b5beSmrg_LT_AC_TAGVAR(objext, $1)=$objext 410632b578d3Smrg 41072a51b5beSmrg# Code to be used in simple compile tests 41082a51b5beSmrglt_simple_compile_test_code="\ 41092a51b5beSmrg subroutine t 41102a51b5beSmrg return 41112a51b5beSmrg end 41122a51b5beSmrg" 411332b578d3Smrg 41142a51b5beSmrg# Code to be used in simple link tests 41152a51b5beSmrglt_simple_link_test_code="\ 41162a51b5beSmrg program t 41172a51b5beSmrg end 41182a51b5beSmrg" 411932b578d3Smrg 41202a51b5beSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 41212a51b5beSmrg_LT_AC_SYS_COMPILER 412232b578d3Smrg 41232a51b5beSmrg# save warnings/boilerplate of simple test code 41242a51b5beSmrg_LT_COMPILER_BOILERPLATE 41252a51b5beSmrg_LT_LINKER_BOILERPLATE 412632b578d3Smrg 41272a51b5beSmrg# Allow CC to be a program name with arguments. 41282a51b5beSmrglt_save_CC="$CC" 41292a51b5beSmrgCC=${F77-"f77"} 41302a51b5beSmrgcompiler=$CC 41312a51b5beSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 41322a51b5beSmrg_LT_CC_BASENAME([$compiler]) 413332b578d3Smrg 41342a51b5beSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 41352a51b5beSmrgAC_MSG_RESULT([$can_build_shared]) 413632b578d3Smrg 41372a51b5beSmrgAC_MSG_CHECKING([whether to build shared libraries]) 41382a51b5beSmrgtest "$can_build_shared" = "no" && enable_shared=no 413932b578d3Smrg 41402a51b5beSmrg# On AIX, shared libraries and static libraries use the same namespace, and 41412a51b5beSmrg# are all built from PIC. 41422a51b5beSmrgcase $host_os in 41432a51b5beSmrgaix3*) 41442a51b5beSmrg test "$enable_shared" = yes && enable_static=no 41452a51b5beSmrg if test -n "$RANLIB"; then 41462a51b5beSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 41472a51b5beSmrg postinstall_cmds='$RANLIB $lib' 41482a51b5beSmrg fi 41492a51b5beSmrg ;; 41502a51b5beSmrgaix[[4-9]]*) 41512a51b5beSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 41522a51b5beSmrg test "$enable_shared" = yes && enable_static=no 41532a51b5beSmrg fi 41542a51b5beSmrg ;; 41552a51b5beSmrgesac 41562a51b5beSmrgAC_MSG_RESULT([$enable_shared]) 415732b578d3Smrg 41582a51b5beSmrgAC_MSG_CHECKING([whether to build static libraries]) 41592a51b5beSmrg# Make sure either enable_shared or enable_static is yes. 41602a51b5beSmrgtest "$enable_shared" = yes || enable_static=yes 41612a51b5beSmrgAC_MSG_RESULT([$enable_static]) 416232b578d3Smrg 41632a51b5beSmrg_LT_AC_TAGVAR(GCC, $1)="$G77" 41642a51b5beSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 416532b578d3Smrg 41662a51b5beSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 41672a51b5beSmrgAC_LIBTOOL_PROG_CC_C_O($1) 41682a51b5beSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 41692a51b5beSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 41702a51b5beSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 41712a51b5beSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 417232b578d3Smrg 41732a51b5beSmrgAC_LIBTOOL_CONFIG($1) 417432b578d3Smrg 41752a51b5beSmrgAC_LANG_POP 41762a51b5beSmrgCC="$lt_save_CC" 41772a51b5beSmrg])# AC_LIBTOOL_LANG_F77_CONFIG 417832b578d3Smrg 417932b578d3Smrg 41802a51b5beSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG 41812a51b5beSmrg# -------------------------- 41822a51b5beSmrg# Ensure that the configuration vars for the C compiler are 41832a51b5beSmrg# suitably defined. Those variables are subsequently used by 41842a51b5beSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 41852a51b5beSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 41862a51b5beSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 41872a51b5beSmrg[AC_LANG_SAVE 418832b578d3Smrg 41892a51b5beSmrg# Source file extension for Java test sources. 41902a51b5beSmrgac_ext=java 419132b578d3Smrg 41922a51b5beSmrg# Object file extension for compiled Java test sources. 4193d31dbc53Smrgobjext=o 4194d31dbc53Smrg_LT_AC_TAGVAR(objext, $1)=$objext 419532b578d3Smrg 4196d31dbc53Smrg# Code to be used in simple compile tests 41972a51b5beSmrglt_simple_compile_test_code="class foo {}" 419832b578d3Smrg 4199d31dbc53Smrg# Code to be used in simple link tests 42002a51b5beSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 420132b578d3Smrg 42022a51b5beSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4203d31dbc53Smrg_LT_AC_SYS_COMPILER 420432b578d3Smrg 4205d31dbc53Smrg# save warnings/boilerplate of simple test code 4206d31dbc53Smrg_LT_COMPILER_BOILERPLATE 4207d31dbc53Smrg_LT_LINKER_BOILERPLATE 420832b578d3Smrg 42092a51b5beSmrg# Allow CC to be a program name with arguments. 42102a51b5beSmrglt_save_CC="$CC" 42112a51b5beSmrgCC=${GCJ-"gcj"} 42122a51b5beSmrgcompiler=$CC 42132a51b5beSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 42142a51b5beSmrg_LT_CC_BASENAME([$compiler]) 42152a51b5beSmrg 42162a51b5beSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 42172a51b5beSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 42182a51b5beSmrg 42192a51b5beSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 42202a51b5beSmrg 4221d31dbc53SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4222d31dbc53SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4223d31dbc53SmrgAC_LIBTOOL_PROG_CC_C_O($1) 4224d31dbc53SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4225d31dbc53SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4226d31dbc53SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4227d31dbc53SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4228d31dbc53Smrg 4229d31dbc53SmrgAC_LIBTOOL_CONFIG($1) 4230d31dbc53Smrg 42312a51b5beSmrgAC_LANG_RESTORE 4232d31dbc53SmrgCC="$lt_save_CC" 42332a51b5beSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 4234d31dbc53Smrg 4235d31dbc53Smrg 42362a51b5beSmrg# AC_LIBTOOL_LANG_RC_CONFIG 42372a51b5beSmrg# ------------------------- 42382a51b5beSmrg# Ensure that the configuration vars for the Windows resource compiler are 4239d31dbc53Smrg# suitably defined. Those variables are subsequently used by 4240d31dbc53Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 42412a51b5beSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 42422a51b5beSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 42432a51b5beSmrg[AC_LANG_SAVE 4244d31dbc53Smrg 42452a51b5beSmrg# Source file extension for RC test sources. 42462a51b5beSmrgac_ext=rc 4247d31dbc53Smrg 42482a51b5beSmrg# Object file extension for compiled RC test sources. 4249d31dbc53Smrgobjext=o 4250d31dbc53Smrg_LT_AC_TAGVAR(objext, $1)=$objext 4251d31dbc53Smrg 4252d31dbc53Smrg# Code to be used in simple compile tests 42532a51b5beSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 4254d31dbc53Smrg 4255d31dbc53Smrg# Code to be used in simple link tests 42562a51b5beSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 4257d31dbc53Smrg 4258d31dbc53Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4259d31dbc53Smrg_LT_AC_SYS_COMPILER 4260d31dbc53Smrg 4261d31dbc53Smrg# save warnings/boilerplate of simple test code 4262d31dbc53Smrg_LT_COMPILER_BOILERPLATE 4263d31dbc53Smrg_LT_LINKER_BOILERPLATE 4264d31dbc53Smrg 4265d31dbc53Smrg# Allow CC to be a program name with arguments. 42662a51b5beSmrglt_save_CC="$CC" 42672a51b5beSmrgCC=${RC-"windres"} 4268d31dbc53Smrgcompiler=$CC 4269d31dbc53Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 4270d31dbc53Smrg_LT_CC_BASENAME([$compiler]) 42712a51b5beSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 427232b578d3Smrg 42732a51b5beSmrgAC_LIBTOOL_CONFIG($1) 427432b578d3Smrg 42752a51b5beSmrgAC_LANG_RESTORE 42762a51b5beSmrgCC="$lt_save_CC" 42772a51b5beSmrg])# AC_LIBTOOL_LANG_RC_CONFIG 427832b578d3Smrg 427932b578d3Smrg 42802a51b5beSmrg# AC_LIBTOOL_CONFIG([TAGNAME]) 42812a51b5beSmrg# ---------------------------- 42822a51b5beSmrg# If TAGNAME is not passed, then create an initial libtool script 42832a51b5beSmrg# with a default configuration from the untagged config vars. Otherwise 42842a51b5beSmrg# add code to config.status for appending the configuration named by 42852a51b5beSmrg# TAGNAME from the matching tagged config vars. 42862a51b5beSmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 42872a51b5beSmrg[# The else clause should only fire when bootstrapping the 42882a51b5beSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh 42892a51b5beSmrg# with your package, and you will get complaints that there are 42902a51b5beSmrg# no rules to generate ltmain.sh. 42912a51b5beSmrgif test -f "$ltmain"; then 42922a51b5beSmrg # See if we are running on zsh, and set the options which allow our commands through 42932a51b5beSmrg # without removal of \ escapes. 42942a51b5beSmrg if test -n "${ZSH_VERSION+set}" ; then 42952a51b5beSmrg setopt NO_GLOB_SUBST 42962a51b5beSmrg fi 42972a51b5beSmrg # Now quote all the things that may contain metacharacters while being 42982a51b5beSmrg # careful not to overquote the AC_SUBSTed values. We take copies of the 42992a51b5beSmrg # variables and quote the copies for generation of the libtool script. 43002a51b5beSmrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 43012a51b5beSmrg SED SHELL STRIP \ 43022a51b5beSmrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 43032a51b5beSmrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 43042a51b5beSmrg deplibs_check_method reload_flag reload_cmds need_locks \ 43052a51b5beSmrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 43062a51b5beSmrg lt_cv_sys_global_symbol_to_c_name_address \ 43072a51b5beSmrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 43082a51b5beSmrg old_postinstall_cmds old_postuninstall_cmds \ 43092a51b5beSmrg _LT_AC_TAGVAR(compiler, $1) \ 43102a51b5beSmrg _LT_AC_TAGVAR(CC, $1) \ 43112a51b5beSmrg _LT_AC_TAGVAR(LD, $1) \ 43122a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 43132a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 43142a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 43152a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 43162a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 43172a51b5beSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 43182a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 43192a51b5beSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 43202a51b5beSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 43212a51b5beSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 43222a51b5beSmrg _LT_AC_TAGVAR(predep_objects, $1) \ 43232a51b5beSmrg _LT_AC_TAGVAR(postdep_objects, $1) \ 43242a51b5beSmrg _LT_AC_TAGVAR(predeps, $1) \ 43252a51b5beSmrg _LT_AC_TAGVAR(postdeps, $1) \ 43262a51b5beSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 43272a51b5beSmrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 43282a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1) \ 43292a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 43302a51b5beSmrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 43312a51b5beSmrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 43322a51b5beSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 43332a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 43342a51b5beSmrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 43352a51b5beSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 43362a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 43372a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 43382a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 43392a51b5beSmrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 43402a51b5beSmrg _LT_AC_TAGVAR(module_cmds, $1) \ 43412a51b5beSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 43422a51b5beSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 43432a51b5beSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 43442a51b5beSmrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 43452a51b5beSmrg _LT_AC_TAGVAR(include_expsyms, $1); do 4346d31dbc53Smrg 43472a51b5beSmrg case $var in 43482a51b5beSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 43492a51b5beSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 43502a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 43512a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 43522a51b5beSmrg _LT_AC_TAGVAR(module_cmds, $1) | \ 43532a51b5beSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 43542a51b5beSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 43552a51b5beSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 43562a51b5beSmrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 43572a51b5beSmrg postinstall_cmds | postuninstall_cmds | \ 43582a51b5beSmrg old_postinstall_cmds | old_postuninstall_cmds | \ 43592a51b5beSmrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 43602a51b5beSmrg # Double-quote double-evaled strings. 43612a51b5beSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 43622a51b5beSmrg ;; 43632a51b5beSmrg *) 43642a51b5beSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 43652a51b5beSmrg ;; 43662a51b5beSmrg esac 43672a51b5beSmrg done 4368d31dbc53Smrg 43692a51b5beSmrg case $lt_echo in 43702a51b5beSmrg *'\[$]0 --fallback-echo"') 43712a51b5beSmrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 43722a51b5beSmrg ;; 43732a51b5beSmrg esac 4374d31dbc53Smrg 43752a51b5beSmrgifelse([$1], [], 43762a51b5beSmrg [cfgfile="${ofile}T" 43772a51b5beSmrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 43782a51b5beSmrg $rm -f "$cfgfile" 43792a51b5beSmrg AC_MSG_NOTICE([creating $ofile])], 43802a51b5beSmrg [cfgfile="$ofile"]) 4381d31dbc53Smrg 43822a51b5beSmrg cat <<__EOF__ >> "$cfgfile" 43832a51b5beSmrgifelse([$1], [], 43842a51b5beSmrg[#! $SHELL 438532b578d3Smrg 43862a51b5beSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 43872a51b5beSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 43882a51b5beSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 43892a51b5beSmrg# 43902a51b5beSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 43912a51b5beSmrg# Free Software Foundation, Inc. 43922a51b5beSmrg# 43932a51b5beSmrg# This file is part of GNU Libtool: 43942a51b5beSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 43952a51b5beSmrg# 43962a51b5beSmrg# This program is free software; you can redistribute it and/or modify 43972a51b5beSmrg# it under the terms of the GNU General Public License as published by 43982a51b5beSmrg# the Free Software Foundation; either version 2 of the License, or 43992a51b5beSmrg# (at your option) any later version. 44002a51b5beSmrg# 44012a51b5beSmrg# This program is distributed in the hope that it will be useful, but 44022a51b5beSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 44032a51b5beSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 44042a51b5beSmrg# General Public License for more details. 44052a51b5beSmrg# 44062a51b5beSmrg# You should have received a copy of the GNU General Public License 44072a51b5beSmrg# along with this program; if not, write to the Free Software 44082a51b5beSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 44092a51b5beSmrg# 44102a51b5beSmrg# As a special exception to the GNU General Public License, if you 44112a51b5beSmrg# distribute this file as part of a program that contains a 44122a51b5beSmrg# configuration script generated by Autoconf, you may include it under 44132a51b5beSmrg# the same distribution terms that you use for the rest of that program. 441432b578d3Smrg 44152a51b5beSmrg# A sed program that does not truncate output. 44162a51b5beSmrgSED=$lt_SED 441732b578d3Smrg 44182a51b5beSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 44192a51b5beSmrgXsed="$SED -e 1s/^X//" 442032b578d3Smrg 44212a51b5beSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 44222a51b5beSmrg# if CDPATH is set. 44232a51b5beSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 442432b578d3Smrg 44252a51b5beSmrg# The names of the tagged configurations supported by this script. 44262a51b5beSmrgavailable_tags= 442732b578d3Smrg 44282a51b5beSmrg# ### BEGIN LIBTOOL CONFIG], 44292a51b5beSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 443032b578d3Smrg 44312a51b5beSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 443232b578d3Smrg 44332a51b5beSmrg# Shell to use when invoking shell scripts. 44342a51b5beSmrgSHELL=$lt_SHELL 443532b578d3Smrg 44362a51b5beSmrg# Whether or not to build shared libraries. 44372a51b5beSmrgbuild_libtool_libs=$enable_shared 4438d31dbc53Smrg 44392a51b5beSmrg# Whether or not to build static libraries. 44402a51b5beSmrgbuild_old_libs=$enable_static 444132b578d3Smrg 44422a51b5beSmrg# Whether or not to add -lc for building shared libraries. 44432a51b5beSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 444432b578d3Smrg 44452a51b5beSmrg# Whether or not to disallow shared libs when runtime libs are static 44462a51b5beSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 444732b578d3Smrg 44482a51b5beSmrg# Whether or not to optimize for fast installation. 44492a51b5beSmrgfast_install=$enable_fast_install 445032b578d3Smrg 44512a51b5beSmrg# The host system. 44522a51b5beSmrghost_alias=$host_alias 44532a51b5beSmrghost=$host 44542a51b5beSmrghost_os=$host_os 445532b578d3Smrg 44562a51b5beSmrg# The build system. 44572a51b5beSmrgbuild_alias=$build_alias 44582a51b5beSmrgbuild=$build 44592a51b5beSmrgbuild_os=$build_os 446032b578d3Smrg 44612a51b5beSmrg# An echo program that does not interpret backslashes. 44622a51b5beSmrgecho=$lt_echo 446332b578d3Smrg 44642a51b5beSmrg# The archiver. 44652a51b5beSmrgAR=$lt_AR 44662a51b5beSmrgAR_FLAGS=$lt_AR_FLAGS 446732b578d3Smrg 44682a51b5beSmrg# A C compiler. 44692a51b5beSmrgLTCC=$lt_LTCC 447032b578d3Smrg 44712a51b5beSmrg# LTCC compiler flags. 44722a51b5beSmrgLTCFLAGS=$lt_LTCFLAGS 447332b578d3Smrg 44742a51b5beSmrg# A language-specific compiler. 44752a51b5beSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 4476d31dbc53Smrg 44772a51b5beSmrg# Is the compiler the GNU C compiler? 44782a51b5beSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 4479d31dbc53Smrg 44802a51b5beSmrg# An ERE matcher. 44812a51b5beSmrgEGREP=$lt_EGREP 4482d31dbc53Smrg 44832a51b5beSmrg# The linker used to build libraries. 44842a51b5beSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 4485d31dbc53Smrg 44862a51b5beSmrg# Whether we need hard or soft links. 44872a51b5beSmrgLN_S=$lt_LN_S 4488d31dbc53Smrg 44892a51b5beSmrg# A BSD-compatible nm program. 44902a51b5beSmrgNM=$lt_NM 4491d31dbc53Smrg 44922a51b5beSmrg# A symbol stripping program 44932a51b5beSmrgSTRIP=$lt_STRIP 449432b578d3Smrg 44952a51b5beSmrg# Used to examine libraries when file_magic_cmd begins "file" 44962a51b5beSmrgMAGIC_CMD=$MAGIC_CMD 449732b578d3Smrg 44982a51b5beSmrg# Used on cygwin: DLL creation program. 44992a51b5beSmrgDLLTOOL="$DLLTOOL" 450032b578d3Smrg 45012a51b5beSmrg# Used on cygwin: object dumper. 45022a51b5beSmrgOBJDUMP="$OBJDUMP" 450332b578d3Smrg 45042a51b5beSmrg# Used on cygwin: assembler. 45052a51b5beSmrgAS="$AS" 450632b578d3Smrg 45072a51b5beSmrg# The name of the directory that contains temporary libtool files. 45082a51b5beSmrgobjdir=$objdir 450932b578d3Smrg 45102a51b5beSmrg# How to create reloadable object files. 45112a51b5beSmrgreload_flag=$lt_reload_flag 45122a51b5beSmrgreload_cmds=$lt_reload_cmds 451332b578d3Smrg 45142a51b5beSmrg# How to pass a linker flag through the compiler. 45152a51b5beSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 451632b578d3Smrg 45172a51b5beSmrg# Object file suffix (normally "o"). 45182a51b5beSmrgobjext="$ac_objext" 451932b578d3Smrg 45202a51b5beSmrg# Old archive suffix (normally "a"). 45212a51b5beSmrglibext="$libext" 452232b578d3Smrg 45232a51b5beSmrg# Shared library suffix (normally ".so"). 45242a51b5beSmrgshrext_cmds='$shrext_cmds' 452532b578d3Smrg 45262a51b5beSmrg# Executable file suffix (normally ""). 45272a51b5beSmrgexeext="$exeext" 452832b578d3Smrg 45292a51b5beSmrg# Additional compiler flags for building library objects. 45302a51b5beSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 45312a51b5beSmrgpic_mode=$pic_mode 453232b578d3Smrg 45332a51b5beSmrg# What is the maximum length of a command? 45342a51b5beSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 453532b578d3Smrg 45362a51b5beSmrg# Does compiler simultaneously support -c and -o options? 45372a51b5beSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 453832b578d3Smrg 45392a51b5beSmrg# Must we lock files when doing compilation? 45402a51b5beSmrgneed_locks=$lt_need_locks 454132b578d3Smrg 45422a51b5beSmrg# Do we need the lib prefix for modules? 45432a51b5beSmrgneed_lib_prefix=$need_lib_prefix 454432b578d3Smrg 45452a51b5beSmrg# Do we need a version for libraries? 45462a51b5beSmrgneed_version=$need_version 454732b578d3Smrg 45482a51b5beSmrg# Whether dlopen is supported. 45492a51b5beSmrgdlopen_support=$enable_dlopen 455032b578d3Smrg 45512a51b5beSmrg# Whether dlopen of programs is supported. 45522a51b5beSmrgdlopen_self=$enable_dlopen_self 455332b578d3Smrg 45542a51b5beSmrg# Whether dlopen of statically linked programs is supported. 45552a51b5beSmrgdlopen_self_static=$enable_dlopen_self_static 455632b578d3Smrg 45572a51b5beSmrg# Compiler flag to prevent dynamic linking. 45582a51b5beSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 4559d31dbc53Smrg 45602a51b5beSmrg# Compiler flag to turn off builtin functions. 45612a51b5beSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 456232b578d3Smrg 45632a51b5beSmrg# Compiler flag to allow reflexive dlopens. 45642a51b5beSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 456532b578d3Smrg 45662a51b5beSmrg# Compiler flag to generate shared objects directly from archives. 45672a51b5beSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 456832b578d3Smrg 45692a51b5beSmrg# Compiler flag to generate thread-safe objects. 45702a51b5beSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 457132b578d3Smrg 45722a51b5beSmrg# Library versioning type. 45732a51b5beSmrgversion_type=$version_type 457432b578d3Smrg 45752a51b5beSmrg# Format of library name prefix. 45762a51b5beSmrglibname_spec=$lt_libname_spec 457732b578d3Smrg 45782a51b5beSmrg# List of archive names. First name is the real one, the rest are links. 45792a51b5beSmrg# The last name is the one that the linker finds with -lNAME. 45802a51b5beSmrglibrary_names_spec=$lt_library_names_spec 458132b578d3Smrg 45822a51b5beSmrg# The coded name of the library, if different from the real name. 45832a51b5beSmrgsoname_spec=$lt_soname_spec 458432b578d3Smrg 45852a51b5beSmrg# Commands used to build and install an old-style archive. 45862a51b5beSmrgRANLIB=$lt_RANLIB 45872a51b5beSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 45882a51b5beSmrgold_postinstall_cmds=$lt_old_postinstall_cmds 45892a51b5beSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 459032b578d3Smrg 45912a51b5beSmrg# Create an old-style archive from a shared archive. 45922a51b5beSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 459332b578d3Smrg 45942a51b5beSmrg# Create a temporary old-style archive to link instead of a shared archive. 45952a51b5beSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 459632b578d3Smrg 45972a51b5beSmrg# Commands used to build and install a shared archive. 45982a51b5beSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 45992a51b5beSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 46002a51b5beSmrgpostinstall_cmds=$lt_postinstall_cmds 46012a51b5beSmrgpostuninstall_cmds=$lt_postuninstall_cmds 460232b578d3Smrg 46032a51b5beSmrg# Commands used to build a loadable module (assumed same as above if empty) 46042a51b5beSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 46052a51b5beSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 460632b578d3Smrg 46072a51b5beSmrg# Commands to strip libraries. 46082a51b5beSmrgold_striplib=$lt_old_striplib 46092a51b5beSmrgstriplib=$lt_striplib 461032b578d3Smrg 46112a51b5beSmrg# Dependencies to place before the objects being linked to create a 46122a51b5beSmrg# shared library. 46132a51b5beSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 461432b578d3Smrg 46152a51b5beSmrg# Dependencies to place after the objects being linked to create a 46162a51b5beSmrg# shared library. 46172a51b5beSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 461832b578d3Smrg 46192a51b5beSmrg# Dependencies to place before the objects being linked to create a 46202a51b5beSmrg# shared library. 46212a51b5beSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 462232b578d3Smrg 46232a51b5beSmrg# Dependencies to place after the objects being linked to create a 46242a51b5beSmrg# shared library. 46252a51b5beSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 462632b578d3Smrg 46272a51b5beSmrg# The directories searched by this compiler when creating a shared 46282a51b5beSmrg# library 46292a51b5beSmrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 463032b578d3Smrg 46312a51b5beSmrg# The library search path used internally by the compiler when linking 46322a51b5beSmrg# a shared library. 46332a51b5beSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 463432b578d3Smrg 46352a51b5beSmrg# Method to check whether dependent libraries are shared objects. 46362a51b5beSmrgdeplibs_check_method=$lt_deplibs_check_method 463732b578d3Smrg 46382a51b5beSmrg# Command to use when deplibs_check_method == file_magic. 46392a51b5beSmrgfile_magic_cmd=$lt_file_magic_cmd 464032b578d3Smrg 46412a51b5beSmrg# Flag that allows shared libraries with undefined symbols to be built. 46422a51b5beSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 464332b578d3Smrg 46442a51b5beSmrg# Flag that forces no undefined symbols. 46452a51b5beSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 464632b578d3Smrg 46472a51b5beSmrg# Commands used to finish a libtool library installation in a directory. 46482a51b5beSmrgfinish_cmds=$lt_finish_cmds 464932b578d3Smrg 46502a51b5beSmrg# Same as above, but a single script fragment to be evaled but not shown. 46512a51b5beSmrgfinish_eval=$lt_finish_eval 465232b578d3Smrg 46532a51b5beSmrg# Take the output of nm and produce a listing of raw symbols and C names. 46542a51b5beSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 465532b578d3Smrg 46562a51b5beSmrg# Transform the output of nm in a proper C declaration 46572a51b5beSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 465832b578d3Smrg 46592a51b5beSmrg# Transform the output of nm in a C name address pair 46602a51b5beSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 466132b578d3Smrg 46622a51b5beSmrg# This is the shared library runtime path variable. 46632a51b5beSmrgrunpath_var=$runpath_var 466432b578d3Smrg 46652a51b5beSmrg# This is the shared library path variable. 46662a51b5beSmrgshlibpath_var=$shlibpath_var 466732b578d3Smrg 46682a51b5beSmrg# Is shlibpath searched before the hard-coded library search path? 46692a51b5beSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 467032b578d3Smrg 46712a51b5beSmrg# How to hardcode a shared library path into an executable. 46722a51b5beSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 467332b578d3Smrg 46742a51b5beSmrg# Whether we should hardcode library paths into libraries. 46752a51b5beSmrghardcode_into_libs=$hardcode_into_libs 467632b578d3Smrg 46772a51b5beSmrg# Flag to hardcode \$libdir into a binary during linking. 46782a51b5beSmrg# This must work even if \$libdir does not exist. 46792a51b5beSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 468032b578d3Smrg 46812a51b5beSmrg# If ld is used when linking, flag to hardcode \$libdir into 46822a51b5beSmrg# a binary during linking. This must work even if \$libdir does 46832a51b5beSmrg# not exist. 46842a51b5beSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 468532b578d3Smrg 46862a51b5beSmrg# Whether we need a single -rpath flag with a separated argument. 46872a51b5beSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 468832b578d3Smrg 46892a51b5beSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 46902a51b5beSmrg# resulting binary. 46912a51b5beSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 469232b578d3Smrg 46932a51b5beSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 46942a51b5beSmrg# resulting binary. 46952a51b5beSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 469632b578d3Smrg 46972a51b5beSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 46982a51b5beSmrg# the resulting binary. 46992a51b5beSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 470032b578d3Smrg 47012a51b5beSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library 47022a51b5beSmrg# and all subsequent libraries and executables linked against it. 47032a51b5beSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 470432b578d3Smrg 47052a51b5beSmrg# Variables whose values should be saved in libtool wrapper scripts and 47062a51b5beSmrg# restored at relink time. 47072a51b5beSmrgvariables_saved_for_relink="$variables_saved_for_relink" 470832b578d3Smrg 47092a51b5beSmrg# Whether libtool must link a program against all its dependency libraries. 47102a51b5beSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 471132b578d3Smrg 47122a51b5beSmrg# Compile-time system search path for libraries 47132a51b5beSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 471432b578d3Smrg 47152a51b5beSmrg# Run-time system search path for libraries 47162a51b5beSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 471732b578d3Smrg 47182a51b5beSmrg# Fix the shell variable \$srcfile for the compiler. 47192a51b5beSmrgfix_srcfile_path=$lt_fix_srcfile_path 4720d31dbc53Smrg 47212a51b5beSmrg# Set to yes if exported symbols are required. 47222a51b5beSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 4723d31dbc53Smrg 47242a51b5beSmrg# The commands to list exported symbols. 47252a51b5beSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 4726d31dbc53Smrg 47272a51b5beSmrg# The commands to extract the exported symbol list from a shared archive. 47282a51b5beSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 4729d31dbc53Smrg 47302a51b5beSmrg# Symbols that should not be listed in the preloaded symbols. 47312a51b5beSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 4732d31dbc53Smrg 47332a51b5beSmrg# Symbols that must always be exported. 47342a51b5beSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 4735d31dbc53Smrg 47362a51b5beSmrgifelse([$1],[], 47372a51b5beSmrg[# ### END LIBTOOL CONFIG], 47382a51b5beSmrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 4739d31dbc53Smrg 47402a51b5beSmrg__EOF__ 4741d31dbc53Smrg 47422a51b5beSmrgifelse([$1],[], [ 47432a51b5beSmrg case $host_os in 47442a51b5beSmrg aix3*) 47452a51b5beSmrg cat <<\EOF >> "$cfgfile" 4746d31dbc53Smrg 47472a51b5beSmrg# AIX sometimes has problems with the GCC collect2 program. For some 47482a51b5beSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 47492a51b5beSmrg# vanish in a puff of smoke. 47502a51b5beSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 47512a51b5beSmrg COLLECT_NAMES= 47522a51b5beSmrg export COLLECT_NAMES 47532a51b5beSmrgfi 47542a51b5beSmrgEOF 47552a51b5beSmrg ;; 47562a51b5beSmrg esac 4757d31dbc53Smrg 47582a51b5beSmrg # We use sed instead of cat because bash on DJGPP gets confused if 47592a51b5beSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 47602a51b5beSmrg # text mode, it properly converts lines to CR/LF. This bash problem 47612a51b5beSmrg # is reportedly fixed, but why not run on old versions too? 47622a51b5beSmrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 4763d31dbc53Smrg 47642a51b5beSmrg mv -f "$cfgfile" "$ofile" || \ 47652a51b5beSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 47662a51b5beSmrg chmod +x "$ofile" 47672a51b5beSmrg]) 47682a51b5beSmrgelse 47692a51b5beSmrg # If there is no Makefile yet, we rely on a make rule to execute 47702a51b5beSmrg # `config.status --recheck' to rerun these tests and create the 47712a51b5beSmrg # libtool script then. 47722a51b5beSmrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 47732a51b5beSmrg if test -f "$ltmain_in"; then 47742a51b5beSmrg test -f Makefile && make "$ltmain" 47752a51b5beSmrg fi 47762a51b5beSmrgfi 47772a51b5beSmrg])# AC_LIBTOOL_CONFIG 4778d31dbc53Smrg 4779d31dbc53Smrg 47802a51b5beSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 47812a51b5beSmrg# ------------------------------------------- 47822a51b5beSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 47832a51b5beSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 4784d31dbc53Smrg 47852a51b5beSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4786d31dbc53Smrg 47872a51b5beSmrgif test "$GCC" = yes; then 47882a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4789d31dbc53Smrg 47902a51b5beSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 47912a51b5beSmrg lt_cv_prog_compiler_rtti_exceptions, 47922a51b5beSmrg [-fno-rtti -fno-exceptions], [], 47932a51b5beSmrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 47942a51b5beSmrgfi 47952a51b5beSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 4796d31dbc53Smrg 4797d31dbc53Smrg 47982a51b5beSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 47992a51b5beSmrg# --------------------------------- 48002a51b5beSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 48012a51b5beSmrg[AC_REQUIRE([AC_CANONICAL_HOST]) 48022a51b5beSmrgAC_REQUIRE([LT_AC_PROG_SED]) 48032a51b5beSmrgAC_REQUIRE([AC_PROG_NM]) 48042a51b5beSmrgAC_REQUIRE([AC_OBJEXT]) 48052a51b5beSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 48062a51b5beSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 48072a51b5beSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 48082a51b5beSmrg[ 48092a51b5beSmrg# These are sane defaults that work on at least a few old systems. 48102a51b5beSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4811d31dbc53Smrg 48122a51b5beSmrg# Character class describing NM global symbol codes. 48132a51b5beSmrgsymcode='[[BCDEGRST]]' 481432b578d3Smrg 48152a51b5beSmrg# Regexp to match symbols that can be accessed directly from C. 48162a51b5beSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4817d31dbc53Smrg 48182a51b5beSmrg# Transform an extracted symbol line into a proper C declaration 48192a51b5beSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 4820d31dbc53Smrg 48212a51b5beSmrg# Transform an extracted symbol line into symbol name and symbol address 48222a51b5beSmrglt_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'" 4823d31dbc53Smrg 48242a51b5beSmrg# Define system-specific variables. 48252a51b5beSmrgcase $host_os in 48262a51b5beSmrgaix*) 48272a51b5beSmrg symcode='[[BCDT]]' 48282a51b5beSmrg ;; 48292a51b5beSmrgcygwin* | mingw* | pw32*) 48302a51b5beSmrg symcode='[[ABCDGISTW]]' 48312a51b5beSmrg ;; 48322a51b5beSmrghpux*) # Its linker distinguishes data from code symbols 48332a51b5beSmrg if test "$host_cpu" = ia64; then 48342a51b5beSmrg symcode='[[ABCDEGRST]]' 48352a51b5beSmrg fi 48362a51b5beSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 48372a51b5beSmrg 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'" 48382a51b5beSmrg ;; 48392a51b5beSmrglinux* | k*bsd*-gnu) 48402a51b5beSmrg if test "$host_cpu" = ia64; then 48412a51b5beSmrg symcode='[[ABCDGIRSTW]]' 48422a51b5beSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 48432a51b5beSmrg 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'" 48442a51b5beSmrg fi 48452a51b5beSmrg ;; 48462a51b5beSmrgirix* | nonstopux*) 48472a51b5beSmrg symcode='[[BCDEGRST]]' 48482a51b5beSmrg ;; 48492a51b5beSmrgosf*) 48502a51b5beSmrg symcode='[[BCDEGQRST]]' 48512a51b5beSmrg ;; 48522a51b5beSmrgsolaris*) 48532a51b5beSmrg symcode='[[BDRT]]' 48542a51b5beSmrg ;; 48552a51b5beSmrgsco3.2v5*) 48562a51b5beSmrg symcode='[[DT]]' 48572a51b5beSmrg ;; 48582a51b5beSmrgsysv4.2uw2*) 48592a51b5beSmrg symcode='[[DT]]' 48602a51b5beSmrg ;; 48612a51b5beSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 48622a51b5beSmrg symcode='[[ABDT]]' 48632a51b5beSmrg ;; 48642a51b5beSmrgsysv4) 48652a51b5beSmrg symcode='[[DFNSTU]]' 48662a51b5beSmrg ;; 48672a51b5beSmrgesac 486832b578d3Smrg 48692a51b5beSmrg# Handle CRLF in mingw tool chain 48702a51b5beSmrgopt_cr= 48712a51b5beSmrgcase $build_os in 48722a51b5beSmrgmingw*) 48732a51b5beSmrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 48742a51b5beSmrg ;; 48752a51b5beSmrgesac 487632b578d3Smrg 48772a51b5beSmrg# If we're using GNU nm, then use its standard symbol codes. 48782a51b5beSmrgcase `$NM -V 2>&1` in 48792a51b5beSmrg*GNU* | *'with BFD'*) 48802a51b5beSmrg symcode='[[ABCDGIRSTW]]' ;; 48812a51b5beSmrgesac 488232b578d3Smrg 48832a51b5beSmrg# Try without a prefix undercore, then with it. 48842a51b5beSmrgfor ac_symprfx in "" "_"; do 488532b578d3Smrg 48862a51b5beSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 48872a51b5beSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 488832b578d3Smrg 48892a51b5beSmrg # Write the raw and C identifiers. 48902a51b5beSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 489132b578d3Smrg 48922a51b5beSmrg # Check to see that the pipe works correctly. 48932a51b5beSmrg pipe_works=no 489432b578d3Smrg 48952a51b5beSmrg rm -f conftest* 48962a51b5beSmrg cat > conftest.$ac_ext <<EOF 48972a51b5beSmrg#ifdef __cplusplus 48982a51b5beSmrgextern "C" { 48992a51b5beSmrg#endif 49002a51b5beSmrgchar nm_test_var; 49012a51b5beSmrgvoid nm_test_func(){} 49022a51b5beSmrg#ifdef __cplusplus 49032a51b5beSmrg} 49042a51b5beSmrg#endif 49052a51b5beSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 49062a51b5beSmrgEOF 490732b578d3Smrg 49082a51b5beSmrg if AC_TRY_EVAL(ac_compile); then 49092a51b5beSmrg # Now try to grab the symbols. 49102a51b5beSmrg nlist=conftest.nm 49112a51b5beSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 49122a51b5beSmrg # Try sorting and uniquifying the output. 49132a51b5beSmrg if sort "$nlist" | uniq > "$nlist"T; then 49142a51b5beSmrg mv -f "$nlist"T "$nlist" 49152a51b5beSmrg else 49162a51b5beSmrg rm -f "$nlist"T 49172a51b5beSmrg fi 491832b578d3Smrg 49192a51b5beSmrg # Make sure that we snagged all the symbols we need. 49202a51b5beSmrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 49212a51b5beSmrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 49222a51b5beSmrg cat <<EOF > conftest.$ac_ext 49232a51b5beSmrg#ifdef __cplusplus 49242a51b5beSmrgextern "C" { 49252a51b5beSmrg#endif 492632b578d3Smrg 49272a51b5beSmrgEOF 49282a51b5beSmrg # Now generate the symbol file. 49292a51b5beSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 493032b578d3Smrg 49312a51b5beSmrg cat <<EOF >> conftest.$ac_ext 49322a51b5beSmrg#if defined (__STDC__) && __STDC__ 49332a51b5beSmrg# define lt_ptr_t void * 49342a51b5beSmrg#else 49352a51b5beSmrg# define lt_ptr_t char * 49362a51b5beSmrg# define const 49372a51b5beSmrg#endif 493832b578d3Smrg 49392a51b5beSmrg/* The mapping between symbol names and symbols. */ 49402a51b5beSmrgconst struct { 49412a51b5beSmrg const char *name; 49422a51b5beSmrg lt_ptr_t address; 49432a51b5beSmrg} 49442a51b5beSmrglt_preloaded_symbols[[]] = 49452a51b5beSmrg{ 49462a51b5beSmrgEOF 49472a51b5beSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 49482a51b5beSmrg cat <<\EOF >> conftest.$ac_ext 49492a51b5beSmrg {0, (lt_ptr_t) 0} 49502a51b5beSmrg}; 495132b578d3Smrg 49522a51b5beSmrg#ifdef __cplusplus 49532a51b5beSmrg} 49542a51b5beSmrg#endif 49552a51b5beSmrgEOF 49562a51b5beSmrg # Now try linking the two files. 49572a51b5beSmrg mv conftest.$ac_objext conftstm.$ac_objext 49582a51b5beSmrg lt_save_LIBS="$LIBS" 49592a51b5beSmrg lt_save_CFLAGS="$CFLAGS" 49602a51b5beSmrg LIBS="conftstm.$ac_objext" 49612a51b5beSmrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 49622a51b5beSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 49632a51b5beSmrg pipe_works=yes 49642a51b5beSmrg fi 49652a51b5beSmrg LIBS="$lt_save_LIBS" 49662a51b5beSmrg CFLAGS="$lt_save_CFLAGS" 49672a51b5beSmrg else 49682a51b5beSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 49692a51b5beSmrg fi 49702a51b5beSmrg else 49712a51b5beSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 49722a51b5beSmrg fi 49732a51b5beSmrg else 49742a51b5beSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 49752a51b5beSmrg fi 49762a51b5beSmrg else 49772a51b5beSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 49782a51b5beSmrg cat conftest.$ac_ext >&5 49792a51b5beSmrg fi 49802a51b5beSmrg rm -rf conftest* conftst* 498132b578d3Smrg 49822a51b5beSmrg # Do not use the global_symbol_pipe unless it works. 49832a51b5beSmrg if test "$pipe_works" = yes; then 49842a51b5beSmrg break 49852a51b5beSmrg else 49862a51b5beSmrg lt_cv_sys_global_symbol_pipe= 49872a51b5beSmrg fi 49882a51b5beSmrgdone 49892a51b5beSmrg]) 49902a51b5beSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 49912a51b5beSmrg lt_cv_sys_global_symbol_to_cdecl= 49922a51b5beSmrgfi 49932a51b5beSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 49942a51b5beSmrg AC_MSG_RESULT(failed) 49952a51b5beSmrgelse 49962a51b5beSmrg AC_MSG_RESULT(ok) 49972a51b5beSmrgfi 49982a51b5beSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 499932b578d3Smrg 500032b578d3Smrg 50012a51b5beSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 50022a51b5beSmrg# --------------------------------------- 50032a51b5beSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 50042a51b5beSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 50052a51b5beSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 50062a51b5beSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 500732b578d3Smrg 50082a51b5beSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 50092a51b5beSmrg ifelse([$1],[CXX],[ 50102a51b5beSmrg # C++ specific cases for pic, static, wl, etc. 50112a51b5beSmrg if test "$GXX" = yes; then 50122a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50132a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 501432b578d3Smrg 50152a51b5beSmrg case $host_os in 50162a51b5beSmrg aix*) 50172a51b5beSmrg # All AIX code is PIC. 50182a51b5beSmrg if test "$host_cpu" = ia64; then 50192a51b5beSmrg # AIX 5 now supports IA64 processor 50202a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50212a51b5beSmrg fi 50222a51b5beSmrg ;; 50232a51b5beSmrg amigaos*) 50242a51b5beSmrg # FIXME: we need at least 68020 code to build shared libraries, but 50252a51b5beSmrg # adding the `-m68020' flag to GCC prevents building anything better, 50262a51b5beSmrg # like `-m68040'. 50272a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 50282a51b5beSmrg ;; 50292a51b5beSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 50302a51b5beSmrg # PIC is the default for these OSes. 50312a51b5beSmrg ;; 50322a51b5beSmrg mingw* | cygwin* | os2* | pw32*) 50332a51b5beSmrg # This hack is so that the source file can tell whether it is being 50342a51b5beSmrg # built for inclusion in a dll (and should export symbols for example). 50352a51b5beSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 50362a51b5beSmrg # (--disable-auto-import) libraries 50372a51b5beSmrg m4_if([$1], [GCJ], [], 50382a51b5beSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50392a51b5beSmrg ;; 50402a51b5beSmrg darwin* | rhapsody*) 50412a51b5beSmrg # PIC is the default on this platform 50422a51b5beSmrg # Common symbols not allowed in MH_DYLIB files 50432a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 50442a51b5beSmrg ;; 50452a51b5beSmrg *djgpp*) 50462a51b5beSmrg # DJGPP does not support shared libraries at all 50472a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 50482a51b5beSmrg ;; 50492a51b5beSmrg interix[[3-9]]*) 50502a51b5beSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 50512a51b5beSmrg # Instead, we relocate shared libraries at runtime. 50522a51b5beSmrg ;; 50532a51b5beSmrg sysv4*MP*) 50542a51b5beSmrg if test -d /usr/nec; then 50552a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 50562a51b5beSmrg fi 50572a51b5beSmrg ;; 50582a51b5beSmrg hpux*) 50592a51b5beSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 50602a51b5beSmrg # not for PA HP-UX. 50612a51b5beSmrg case $host_cpu in 50622a51b5beSmrg hppa*64*|ia64*) 50632a51b5beSmrg ;; 50642a51b5beSmrg *) 50652a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50662a51b5beSmrg ;; 50672a51b5beSmrg esac 50682a51b5beSmrg ;; 50692a51b5beSmrg *) 50702a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50712a51b5beSmrg ;; 50722a51b5beSmrg esac 50732a51b5beSmrg else 50742a51b5beSmrg case $host_os in 50752a51b5beSmrg aix[[4-9]]*) 50762a51b5beSmrg # All AIX code is PIC. 50772a51b5beSmrg if test "$host_cpu" = ia64; then 50782a51b5beSmrg # AIX 5 now supports IA64 processor 50792a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50802a51b5beSmrg else 50812a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 50822a51b5beSmrg fi 50832a51b5beSmrg ;; 50842a51b5beSmrg chorus*) 50852a51b5beSmrg case $cc_basename in 50862a51b5beSmrg cxch68*) 50872a51b5beSmrg # Green Hills C++ Compiler 50882a51b5beSmrg # _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" 50892a51b5beSmrg ;; 50902a51b5beSmrg esac 50912a51b5beSmrg ;; 50922a51b5beSmrg darwin*) 50932a51b5beSmrg # PIC is the default on this platform 50942a51b5beSmrg # Common symbols not allowed in MH_DYLIB files 50952a51b5beSmrg case $cc_basename in 50962a51b5beSmrg xlc*) 50972a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 50982a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50992a51b5beSmrg ;; 51002a51b5beSmrg esac 51012a51b5beSmrg ;; 51022a51b5beSmrg dgux*) 51032a51b5beSmrg case $cc_basename in 51042a51b5beSmrg ec++*) 51052a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51062a51b5beSmrg ;; 51072a51b5beSmrg ghcx*) 51082a51b5beSmrg # Green Hills C++ Compiler 51092a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51102a51b5beSmrg ;; 51112a51b5beSmrg *) 51122a51b5beSmrg ;; 51132a51b5beSmrg esac 51142a51b5beSmrg ;; 51152a51b5beSmrg freebsd* | dragonfly*) 51162a51b5beSmrg # FreeBSD uses GNU C++ 51172a51b5beSmrg ;; 51182a51b5beSmrg hpux9* | hpux10* | hpux11*) 51192a51b5beSmrg case $cc_basename in 51202a51b5beSmrg CC*) 51212a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51222a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51232a51b5beSmrg if test "$host_cpu" != ia64; then 51242a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51252a51b5beSmrg fi 51262a51b5beSmrg ;; 51272a51b5beSmrg aCC*) 51282a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51292a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51302a51b5beSmrg case $host_cpu in 51312a51b5beSmrg hppa*64*|ia64*) 51322a51b5beSmrg # +Z the default 51332a51b5beSmrg ;; 51342a51b5beSmrg *) 51352a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51362a51b5beSmrg ;; 51372a51b5beSmrg esac 51382a51b5beSmrg ;; 51392a51b5beSmrg *) 51402a51b5beSmrg ;; 51412a51b5beSmrg esac 51422a51b5beSmrg ;; 51432a51b5beSmrg interix*) 51442a51b5beSmrg # This is c89, which is MS Visual C++ (no shared libs) 51452a51b5beSmrg # Anyone wants to do a port? 51462a51b5beSmrg ;; 51472a51b5beSmrg irix5* | irix6* | nonstopux*) 51482a51b5beSmrg case $cc_basename in 51492a51b5beSmrg CC*) 51502a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51512a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51522a51b5beSmrg # CC pic flag -KPIC is the default. 51532a51b5beSmrg ;; 51542a51b5beSmrg *) 51552a51b5beSmrg ;; 51562a51b5beSmrg esac 51572a51b5beSmrg ;; 51582a51b5beSmrg linux* | k*bsd*-gnu) 51592a51b5beSmrg case $cc_basename in 51602a51b5beSmrg KCC*) 51612a51b5beSmrg # KAI C++ Compiler 51622a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 51632a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51642a51b5beSmrg ;; 51652a51b5beSmrg icpc* | ecpc*) 51662a51b5beSmrg # Intel C++ 51672a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51682a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51692a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 51702a51b5beSmrg ;; 51712a51b5beSmrg pgCC* | pgcpp*) 51722a51b5beSmrg # Portland Group C++ compiler. 51732a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51742a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 51752a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51762a51b5beSmrg ;; 51772a51b5beSmrg cxx*) 51782a51b5beSmrg # Compaq C++ 51792a51b5beSmrg # Make sure the PIC flag is empty. It appears that all Alpha 51802a51b5beSmrg # Linux and Compaq Tru64 Unix objects are PIC. 51812a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 51822a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51832a51b5beSmrg ;; 51842a51b5beSmrg *) 51852a51b5beSmrg case `$CC -V 2>&1 | sed 5q` in 51862a51b5beSmrg *Sun\ C*) 51872a51b5beSmrg # Sun C++ 5.9 51882a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51892a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51902a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 51912a51b5beSmrg ;; 51922a51b5beSmrg esac 51932a51b5beSmrg ;; 51942a51b5beSmrg esac 51952a51b5beSmrg ;; 51962a51b5beSmrg lynxos*) 51972a51b5beSmrg ;; 51982a51b5beSmrg m88k*) 51992a51b5beSmrg ;; 52002a51b5beSmrg mvs*) 52012a51b5beSmrg case $cc_basename in 52022a51b5beSmrg cxx*) 52032a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 52042a51b5beSmrg ;; 52052a51b5beSmrg *) 52062a51b5beSmrg ;; 52072a51b5beSmrg esac 52082a51b5beSmrg ;; 52092a51b5beSmrg netbsd*) 52102a51b5beSmrg ;; 52112a51b5beSmrg osf3* | osf4* | osf5*) 52122a51b5beSmrg case $cc_basename in 52132a51b5beSmrg KCC*) 52142a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 52152a51b5beSmrg ;; 52162a51b5beSmrg RCC*) 52172a51b5beSmrg # Rational C++ 2.4.1 52182a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52192a51b5beSmrg ;; 52202a51b5beSmrg cxx*) 52212a51b5beSmrg # Digital/Compaq C++ 52222a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52232a51b5beSmrg # Make sure the PIC flag is empty. It appears that all Alpha 52242a51b5beSmrg # Linux and Compaq Tru64 Unix objects are PIC. 52252a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 52262a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52272a51b5beSmrg ;; 52282a51b5beSmrg *) 52292a51b5beSmrg ;; 52302a51b5beSmrg esac 52312a51b5beSmrg ;; 52322a51b5beSmrg psos*) 52332a51b5beSmrg ;; 52342a51b5beSmrg solaris*) 52352a51b5beSmrg case $cc_basename in 52362a51b5beSmrg CC*) 52372a51b5beSmrg # Sun C++ 4.2, 5.x and Centerline C++ 52382a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52392a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52402a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52412a51b5beSmrg ;; 52422a51b5beSmrg gcx*) 52432a51b5beSmrg # Green Hills C++ Compiler 52442a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 52452a51b5beSmrg ;; 52462a51b5beSmrg *) 52472a51b5beSmrg ;; 52482a51b5beSmrg esac 52492a51b5beSmrg ;; 52502a51b5beSmrg sunos4*) 52512a51b5beSmrg case $cc_basename in 52522a51b5beSmrg CC*) 52532a51b5beSmrg # Sun C++ 4.x 52542a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52552a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52562a51b5beSmrg ;; 52572a51b5beSmrg lcc*) 52582a51b5beSmrg # Lucid 52592a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52602a51b5beSmrg ;; 52612a51b5beSmrg *) 52622a51b5beSmrg ;; 52632a51b5beSmrg esac 52642a51b5beSmrg ;; 52652a51b5beSmrg tandem*) 52662a51b5beSmrg case $cc_basename in 52672a51b5beSmrg NCC*) 52682a51b5beSmrg # NonStop-UX NCC 3.20 52692a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52702a51b5beSmrg ;; 52712a51b5beSmrg *) 52722a51b5beSmrg ;; 52732a51b5beSmrg esac 52742a51b5beSmrg ;; 52752a51b5beSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 52762a51b5beSmrg case $cc_basename in 52772a51b5beSmrg CC*) 52782a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52792a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52802a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52812a51b5beSmrg ;; 52822a51b5beSmrg esac 52832a51b5beSmrg ;; 52842a51b5beSmrg vxworks*) 52852a51b5beSmrg ;; 52862a51b5beSmrg *) 52872a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 52882a51b5beSmrg ;; 52892a51b5beSmrg esac 52902a51b5beSmrg fi 52912a51b5beSmrg], 52922a51b5beSmrg[ 52932a51b5beSmrg if test "$GCC" = yes; then 52942a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52952a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 52962a51b5beSmrg 52972a51b5beSmrg case $host_os in 52982a51b5beSmrg aix*) 52992a51b5beSmrg # All AIX code is PIC. 53002a51b5beSmrg if test "$host_cpu" = ia64; then 53012a51b5beSmrg # AIX 5 now supports IA64 processor 53022a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53032a51b5beSmrg fi 53042a51b5beSmrg ;; 53052a51b5beSmrg 53062a51b5beSmrg amigaos*) 53072a51b5beSmrg # FIXME: we need at least 68020 code to build shared libraries, but 53082a51b5beSmrg # adding the `-m68020' flag to GCC prevents building anything better, 53092a51b5beSmrg # like `-m68040'. 53102a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 53112a51b5beSmrg ;; 53122a51b5beSmrg 53132a51b5beSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 53142a51b5beSmrg # PIC is the default for these OSes. 53152a51b5beSmrg ;; 53162a51b5beSmrg 53172a51b5beSmrg mingw* | cygwin* | pw32* | os2*) 53182a51b5beSmrg # This hack is so that the source file can tell whether it is being 53192a51b5beSmrg # built for inclusion in a dll (and should export symbols for example). 53202a51b5beSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 53212a51b5beSmrg # (--disable-auto-import) libraries 53222a51b5beSmrg m4_if([$1], [GCJ], [], 53232a51b5beSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53242a51b5beSmrg ;; 53252a51b5beSmrg 53262a51b5beSmrg darwin* | rhapsody*) 53272a51b5beSmrg # PIC is the default on this platform 53282a51b5beSmrg # Common symbols not allowed in MH_DYLIB files 53292a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 53302a51b5beSmrg ;; 53312a51b5beSmrg 53322a51b5beSmrg interix[[3-9]]*) 53332a51b5beSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 53342a51b5beSmrg # Instead, we relocate shared libraries at runtime. 53352a51b5beSmrg ;; 53362a51b5beSmrg 53372a51b5beSmrg msdosdjgpp*) 53382a51b5beSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 53392a51b5beSmrg # on systems that don't support them. 53402a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 53412a51b5beSmrg enable_shared=no 53422a51b5beSmrg ;; 53432a51b5beSmrg 53442a51b5beSmrg sysv4*MP*) 53452a51b5beSmrg if test -d /usr/nec; then 53462a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 53472a51b5beSmrg fi 53482a51b5beSmrg ;; 53492a51b5beSmrg 53502a51b5beSmrg hpux*) 53512a51b5beSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 53522a51b5beSmrg # not for PA HP-UX. 53532a51b5beSmrg case $host_cpu in 53542a51b5beSmrg hppa*64*|ia64*) 53552a51b5beSmrg # +Z the default 53562a51b5beSmrg ;; 53572a51b5beSmrg *) 53582a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53592a51b5beSmrg ;; 53602a51b5beSmrg esac 53612a51b5beSmrg ;; 53622a51b5beSmrg 53632a51b5beSmrg *) 53642a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53652a51b5beSmrg ;; 53662a51b5beSmrg esac 53672a51b5beSmrg else 53682a51b5beSmrg # PORTME Check for flag to pass linker flags through the system compiler. 53692a51b5beSmrg case $host_os in 53702a51b5beSmrg aix*) 53712a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53722a51b5beSmrg if test "$host_cpu" = ia64; then 53732a51b5beSmrg # AIX 5 now supports IA64 processor 53742a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53752a51b5beSmrg else 53762a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 53772a51b5beSmrg fi 53782a51b5beSmrg ;; 53792a51b5beSmrg darwin*) 53802a51b5beSmrg # PIC is the default on this platform 53812a51b5beSmrg # Common symbols not allowed in MH_DYLIB files 53822a51b5beSmrg case $cc_basename in 53832a51b5beSmrg xlc*) 53842a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 53852a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53862a51b5beSmrg ;; 53872a51b5beSmrg esac 53882a51b5beSmrg ;; 53892a51b5beSmrg 53902a51b5beSmrg mingw* | cygwin* | pw32* | os2*) 53912a51b5beSmrg # This hack is so that the source file can tell whether it is being 53922a51b5beSmrg # built for inclusion in a dll (and should export symbols for example). 53932a51b5beSmrg m4_if([$1], [GCJ], [], 53942a51b5beSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53952a51b5beSmrg ;; 53962a51b5beSmrg 53972a51b5beSmrg hpux9* | hpux10* | hpux11*) 53982a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53992a51b5beSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 54002a51b5beSmrg # not for PA HP-UX. 54012a51b5beSmrg case $host_cpu in 54022a51b5beSmrg hppa*64*|ia64*) 54032a51b5beSmrg # +Z the default 54042a51b5beSmrg ;; 54052a51b5beSmrg *) 54062a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 54072a51b5beSmrg ;; 54082a51b5beSmrg esac 54092a51b5beSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 54102a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 54112a51b5beSmrg ;; 54122a51b5beSmrg 54132a51b5beSmrg irix5* | irix6* | nonstopux*) 54142a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54152a51b5beSmrg # PIC (with -KPIC) is the default. 54162a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54172a51b5beSmrg ;; 54182a51b5beSmrg 54192a51b5beSmrg newsos6) 54202a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54212a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54222a51b5beSmrg ;; 54232a51b5beSmrg 54242a51b5beSmrg linux* | k*bsd*-gnu) 54252a51b5beSmrg case $cc_basename in 54262a51b5beSmrg icc* | ecc*) 54272a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54282a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54292a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 54302a51b5beSmrg ;; 54312a51b5beSmrg pgcc* | pgf77* | pgf90* | pgf95*) 54322a51b5beSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 54332a51b5beSmrg # which looks to be a dead project) 54342a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54352a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 54362a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54372a51b5beSmrg ;; 54382a51b5beSmrg ccc*) 54392a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54402a51b5beSmrg # All Alpha code is PIC. 54412a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54422a51b5beSmrg ;; 54432a51b5beSmrg *) 54442a51b5beSmrg case `$CC -V 2>&1 | sed 5q` in 54452a51b5beSmrg *Sun\ C*) 54462a51b5beSmrg # Sun C 5.9 54472a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54482a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54492a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54502a51b5beSmrg ;; 54512a51b5beSmrg *Sun\ F*) 54522a51b5beSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 54532a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54542a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54552a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 54562a51b5beSmrg ;; 54572a51b5beSmrg esac 54582a51b5beSmrg ;; 54592a51b5beSmrg esac 54602a51b5beSmrg ;; 54612a51b5beSmrg 54622a51b5beSmrg osf3* | osf4* | osf5*) 54632a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54642a51b5beSmrg # All OSF/1 code is PIC. 54652a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54662a51b5beSmrg ;; 54672a51b5beSmrg 54682a51b5beSmrg rdos*) 54692a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54702a51b5beSmrg ;; 54712a51b5beSmrg 54722a51b5beSmrg solaris*) 54732a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54742a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54752a51b5beSmrg case $cc_basename in 54762a51b5beSmrg f77* | f90* | f95*) 54772a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 54782a51b5beSmrg *) 54792a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 54802a51b5beSmrg esac 54812a51b5beSmrg ;; 54822a51b5beSmrg 54832a51b5beSmrg sunos4*) 54842a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 54852a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 54862a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54872a51b5beSmrg ;; 54882a51b5beSmrg 54892a51b5beSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 54902a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54912a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54922a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54932a51b5beSmrg ;; 54942a51b5beSmrg 54952a51b5beSmrg sysv4*MP*) 54962a51b5beSmrg if test -d /usr/nec ;then 54972a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 54982a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54992a51b5beSmrg fi 55002a51b5beSmrg ;; 55012a51b5beSmrg 55022a51b5beSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 55032a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55042a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55052a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55062a51b5beSmrg ;; 55072a51b5beSmrg 55082a51b5beSmrg unicos*) 55092a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55102a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55112a51b5beSmrg ;; 55122a51b5beSmrg 55132a51b5beSmrg uts4*) 55142a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 55152a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55162a51b5beSmrg ;; 55172a51b5beSmrg 55182a51b5beSmrg *) 55192a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55202a51b5beSmrg ;; 55212a51b5beSmrg esac 55222a51b5beSmrg fi 55232a51b5beSmrg]) 55242a51b5beSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 55252a51b5beSmrg 55262a51b5beSmrg# 55272a51b5beSmrg# Check to make sure the PIC flag actually works. 55282a51b5beSmrg# 55292a51b5beSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 55302a51b5beSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 55312a51b5beSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 55322a51b5beSmrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 55332a51b5beSmrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 55342a51b5beSmrg "" | " "*) ;; 55352a51b5beSmrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 55362a51b5beSmrg esac], 55372a51b5beSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 55382a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 55392a51b5beSmrgfi 55402a51b5beSmrgcase $host_os in 55412a51b5beSmrg # For platforms which do not support PIC, -DPIC is meaningless: 55422a51b5beSmrg *djgpp*) 55432a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 55442a51b5beSmrg ;; 55452a51b5beSmrg *) 55462a51b5beSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 55472a51b5beSmrg ;; 55482a51b5beSmrgesac 55492a51b5beSmrg 55502a51b5beSmrg# 55512a51b5beSmrg# Check to make sure the static flag actually works. 55522a51b5beSmrg# 55532a51b5beSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 55542a51b5beSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 55552a51b5beSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 55562a51b5beSmrg $lt_tmp_static_flag, 55572a51b5beSmrg [], 55582a51b5beSmrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 55592a51b5beSmrg]) 55602a51b5beSmrg 55612a51b5beSmrg 55622a51b5beSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 55632a51b5beSmrg# ------------------------------------ 55642a51b5beSmrg# See if the linker supports building shared libraries. 55652a51b5beSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 55662a51b5beSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 55672a51b5beSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 55682a51b5beSmrgifelse([$1],[CXX],[ 55692a51b5beSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 55702a51b5beSmrg case $host_os in 55712a51b5beSmrg aix[[4-9]]*) 55722a51b5beSmrg # If we're using GNU nm, then we don't want the "-C" option. 55732a51b5beSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 55742a51b5beSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 55752a51b5beSmrg _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' 55762a51b5beSmrg else 55772a51b5beSmrg _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' 55782a51b5beSmrg fi 55792a51b5beSmrg ;; 55802a51b5beSmrg pw32*) 55812a51b5beSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 55822a51b5beSmrg ;; 55832a51b5beSmrg cygwin* | mingw*) 55842a51b5beSmrg _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' 55852a51b5beSmrg ;; 55862a51b5beSmrg *) 55872a51b5beSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 55882a51b5beSmrg ;; 55892a51b5beSmrg esac 55902a51b5beSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 55912a51b5beSmrg],[ 55922a51b5beSmrg runpath_var= 55932a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 55942a51b5beSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 55952a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)= 55962a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 55972a51b5beSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 55982a51b5beSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 55992a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 56002a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 56012a51b5beSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 56022a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 56032a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 56042a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 56052a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 56062a51b5beSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 56072a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 56082a51b5beSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 56092a51b5beSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 56102a51b5beSmrg _LT_AC_TAGVAR(module_cmds, $1)= 56112a51b5beSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 56122a51b5beSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 56132a51b5beSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56142a51b5beSmrg # include_expsyms should be a list of space-separated symbols to be *always* 56152a51b5beSmrg # included in the symbol list 56162a51b5beSmrg _LT_AC_TAGVAR(include_expsyms, $1)= 56172a51b5beSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 56182a51b5beSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 56192a51b5beSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 56202a51b5beSmrg # as well as any symbol that contains `d'. 56212a51b5beSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 56222a51b5beSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 56232a51b5beSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 56242a51b5beSmrg # the symbol is explicitly referenced. Since portable code cannot 56252a51b5beSmrg # rely on this symbol name, it's probably fine to never include it in 56262a51b5beSmrg # preloaded symbol tables. 56272a51b5beSmrg # Exclude shared library initialization/finalization symbols. 56282a51b5beSmrgdnl Note also adjust exclude_expsyms for C++ above. 56292a51b5beSmrg extract_expsyms_cmds= 56302a51b5beSmrg # Just being paranoid about ensuring that cc_basename is set. 56312a51b5beSmrg _LT_CC_BASENAME([$compiler]) 56322a51b5beSmrg case $host_os in 56332a51b5beSmrg cygwin* | mingw* | pw32*) 56342a51b5beSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 56352a51b5beSmrg # When not using gcc, we currently assume that we are using 56362a51b5beSmrg # Microsoft Visual C++. 56372a51b5beSmrg if test "$GCC" != yes; then 56382a51b5beSmrg with_gnu_ld=no 56392a51b5beSmrg fi 56402a51b5beSmrg ;; 56412a51b5beSmrg interix*) 56422a51b5beSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 56432a51b5beSmrg with_gnu_ld=yes 56442a51b5beSmrg ;; 56452a51b5beSmrg openbsd*) 56462a51b5beSmrg with_gnu_ld=no 56472a51b5beSmrg ;; 56482a51b5beSmrg esac 56492a51b5beSmrg 56502a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 56512a51b5beSmrg if test "$with_gnu_ld" = yes; then 56522a51b5beSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 56532a51b5beSmrg wlarc='${wl}' 56542a51b5beSmrg 56552a51b5beSmrg # Set some defaults for GNU ld with shared library support. These 56562a51b5beSmrg # are reset later if shared libraries are not supported. Putting them 56572a51b5beSmrg # here allows them to be overridden if necessary. 56582a51b5beSmrg runpath_var=LD_RUN_PATH 56592a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 56602a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 56612a51b5beSmrg # ancient GNU ld didn't support --whole-archive et. al. 56622a51b5beSmrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 56632a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 56642a51b5beSmrg else 56652a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 56662a51b5beSmrg fi 56672a51b5beSmrg supports_anon_versioning=no 56682a51b5beSmrg case `$LD -v 2>/dev/null` in 56692a51b5beSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 56702a51b5beSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 56712a51b5beSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 56722a51b5beSmrg *\ 2.11.*) ;; # other 2.11 versions 56732a51b5beSmrg *) supports_anon_versioning=yes ;; 56742a51b5beSmrg esac 567532b578d3Smrg 56762a51b5beSmrg # See if GNU ld supports shared libraries. 56772a51b5beSmrg case $host_os in 56782a51b5beSmrg aix[[3-9]]*) 56792a51b5beSmrg # On AIX/PPC, the GNU linker is very broken 56802a51b5beSmrg if test "$host_cpu" != ia64; then 56812a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 56822a51b5beSmrg cat <<EOF 1>&2 568332b578d3Smrg 56842a51b5beSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 56852a51b5beSmrg*** to be unable to reliably create shared libraries on AIX. 56862a51b5beSmrg*** Therefore, libtool is disabling shared libraries support. If you 56872a51b5beSmrg*** really care for shared libraries, you may want to modify your PATH 56882a51b5beSmrg*** so that a non-GNU linker is found, and then restart. 568932b578d3Smrg 56902a51b5beSmrgEOF 56912a51b5beSmrg fi 56922a51b5beSmrg ;; 569332b578d3Smrg 56942a51b5beSmrg amigaos*) 56952a51b5beSmrg _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)' 56962a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56972a51b5beSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 569832b578d3Smrg 56992a51b5beSmrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 57002a51b5beSmrg # that the semantics of dynamic libraries on AmigaOS, at least up 57012a51b5beSmrg # to version 4, is to share data among multiple programs linked 57022a51b5beSmrg # with the same dynamic library. Since this doesn't match the 57032a51b5beSmrg # behavior of shared libraries on other platforms, we can't use 57042a51b5beSmrg # them. 57052a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57062a51b5beSmrg ;; 570732b578d3Smrg 57082a51b5beSmrg beos*) 57092a51b5beSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 57102a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 57112a51b5beSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 57122a51b5beSmrg # support --undefined. This deserves some investigation. FIXME 57132a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 57142a51b5beSmrg else 57152a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57162a51b5beSmrg fi 57172a51b5beSmrg ;; 571832b578d3Smrg 57192a51b5beSmrg cygwin* | mingw* | pw32*) 57202a51b5beSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 57212a51b5beSmrg # as there is no search path for DLLs. 57222a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57232a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 57242a51b5beSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 57252a51b5beSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 57262a51b5beSmrg _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' 572732b578d3Smrg 57282a51b5beSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 57292a51b5beSmrg _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' 57302a51b5beSmrg # If the export-symbols file already is a .def file (1st line 57312a51b5beSmrg # is EXPORTS), use it as is; otherwise, prepend... 57322a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 57332a51b5beSmrg cp $export_symbols $output_objdir/$soname.def; 57342a51b5beSmrg else 57352a51b5beSmrg echo EXPORTS > $output_objdir/$soname.def; 57362a51b5beSmrg cat $export_symbols >> $output_objdir/$soname.def; 57372a51b5beSmrg fi~ 57382a51b5beSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 57392a51b5beSmrg else 57402a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57412a51b5beSmrg fi 57422a51b5beSmrg ;; 574332b578d3Smrg 57442a51b5beSmrg interix[[3-9]]*) 57452a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 57462a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 57472a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 57482a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 57492a51b5beSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 57502a51b5beSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 57512a51b5beSmrg # default) and relocated if they conflict, which is a slow very memory 57522a51b5beSmrg # consuming and fragmenting process. To avoid this, we pick a random, 57532a51b5beSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 57542a51b5beSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 57552a51b5beSmrg _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' 57562a51b5beSmrg _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' 57572a51b5beSmrg ;; 575832b578d3Smrg 57592a51b5beSmrg gnu* | linux* | k*bsd*-gnu) 57602a51b5beSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 57612a51b5beSmrg tmp_addflag= 57622a51b5beSmrg case $cc_basename,$host_cpu in 57632a51b5beSmrg pgcc*) # Portland Group C compiler 57642a51b5beSmrg _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' 57652a51b5beSmrg tmp_addflag=' $pic_flag' 57662a51b5beSmrg ;; 57672a51b5beSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 57682a51b5beSmrg _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' 57692a51b5beSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 57702a51b5beSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 57712a51b5beSmrg tmp_addflag=' -i_dynamic' ;; 57722a51b5beSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 57732a51b5beSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 57742a51b5beSmrg ifc* | ifort*) # Intel Fortran compiler 57752a51b5beSmrg tmp_addflag=' -nofor_main' ;; 57762a51b5beSmrg esac 57772a51b5beSmrg case `$CC -V 2>&1 | sed 5q` in 57782a51b5beSmrg *Sun\ C*) # Sun C 5.9 57792a51b5beSmrg _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' 57802a51b5beSmrg tmp_sharedflag='-G' ;; 57812a51b5beSmrg *Sun\ F*) # Sun Fortran 8.3 57822a51b5beSmrg tmp_sharedflag='-G' ;; 57832a51b5beSmrg *) 57842a51b5beSmrg tmp_sharedflag='-shared' ;; 57852a51b5beSmrg esac 57862a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 578732b578d3Smrg 57882a51b5beSmrg if test $supports_anon_versioning = yes; then 57892a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 57902a51b5beSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 57912a51b5beSmrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 57922a51b5beSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 57932a51b5beSmrg fi 57942a51b5beSmrg else 57952a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57962a51b5beSmrg fi 57972a51b5beSmrg ;; 579832b578d3Smrg 57992a51b5beSmrg netbsd*) 58002a51b5beSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 58012a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 58022a51b5beSmrg wlarc= 58032a51b5beSmrg else 58042a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58052a51b5beSmrg _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' 58062a51b5beSmrg fi 58072a51b5beSmrg ;; 580832b578d3Smrg 58092a51b5beSmrg solaris*) 58102a51b5beSmrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 58112a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58122a51b5beSmrg cat <<EOF 1>&2 581332b578d3Smrg 58142a51b5beSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 58152a51b5beSmrg*** create shared libraries on Solaris systems. Therefore, libtool 58162a51b5beSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 58172a51b5beSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 58182a51b5beSmrg*** your PATH or compiler configuration so that the native linker is 58192a51b5beSmrg*** used, and then restart. 5820d31dbc53Smrg 58212a51b5beSmrgEOF 58222a51b5beSmrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 58232a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58242a51b5beSmrg _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' 58252a51b5beSmrg else 58262a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58272a51b5beSmrg fi 58282a51b5beSmrg ;; 5829d31dbc53Smrg 58302a51b5beSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 58312a51b5beSmrg case `$LD -v 2>&1` in 58322a51b5beSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 58332a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58342a51b5beSmrg cat <<_LT_EOF 1>&2 5835d31dbc53Smrg 58362a51b5beSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 58372a51b5beSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 58382a51b5beSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 58392a51b5beSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 58402a51b5beSmrg*** your PATH or compiler configuration so that the native linker is 58412a51b5beSmrg*** used, and then restart. 5842d31dbc53Smrg 58432a51b5beSmrg_LT_EOF 58442a51b5beSmrg ;; 58452a51b5beSmrg *) 58462a51b5beSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 58472a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 58482a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 58492a51b5beSmrg _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' 58502a51b5beSmrg else 58512a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58522a51b5beSmrg fi 58532a51b5beSmrg ;; 58542a51b5beSmrg esac 58552a51b5beSmrg ;; 58562a51b5beSmrg 58572a51b5beSmrg sunos4*) 58582a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 58592a51b5beSmrg wlarc= 58602a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 58612a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 58622a51b5beSmrg ;; 58632a51b5beSmrg 58642a51b5beSmrg *) 58652a51b5beSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 58662a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58672a51b5beSmrg _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' 58682a51b5beSmrg else 58692a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58702a51b5beSmrg fi 58712a51b5beSmrg ;; 58722a51b5beSmrg esac 58732a51b5beSmrg 58742a51b5beSmrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 58752a51b5beSmrg runpath_var= 58762a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 58772a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 58782a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 58792a51b5beSmrg fi 58802a51b5beSmrg else 58812a51b5beSmrg # PORTME fill in a description of your system's linker (not GNU ld) 58822a51b5beSmrg case $host_os in 58832a51b5beSmrg aix3*) 58842a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 58852a51b5beSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 58862a51b5beSmrg _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' 58872a51b5beSmrg # Note: this linker hardcodes the directories in LIBPATH if there 58882a51b5beSmrg # are no directories specified by -L. 58892a51b5beSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 58902a51b5beSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 58912a51b5beSmrg # Neither direct hardcoding nor static linking is supported with a 58922a51b5beSmrg # broken collect2. 58932a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 58942a51b5beSmrg fi 58952a51b5beSmrg ;; 58962a51b5beSmrg 58972a51b5beSmrg aix[[4-9]]*) 58982a51b5beSmrg if test "$host_cpu" = ia64; then 58992a51b5beSmrg # On IA64, the linker does run time linking by default, so we don't 59002a51b5beSmrg # have to do anything special. 59012a51b5beSmrg aix_use_runtimelinking=no 59022a51b5beSmrg exp_sym_flag='-Bexport' 59032a51b5beSmrg no_entry_flag="" 59042a51b5beSmrg else 59052a51b5beSmrg # If we're using GNU nm, then we don't want the "-C" option. 59062a51b5beSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 59072a51b5beSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 59082a51b5beSmrg _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' 59092a51b5beSmrg else 59102a51b5beSmrg _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' 59112a51b5beSmrg fi 59122a51b5beSmrg aix_use_runtimelinking=no 5913d31dbc53Smrg 59142a51b5beSmrg # Test if we are trying to use run time linking or normal 59152a51b5beSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 59162a51b5beSmrg # need to do runtime linking. 59172a51b5beSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 59182a51b5beSmrg for ld_flag in $LDFLAGS; do 59192a51b5beSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 59202a51b5beSmrg aix_use_runtimelinking=yes 59212a51b5beSmrg break 59222a51b5beSmrg fi 59232a51b5beSmrg done 59242a51b5beSmrg ;; 59252a51b5beSmrg esac 5926d31dbc53Smrg 59272a51b5beSmrg exp_sym_flag='-bexport' 59282a51b5beSmrg no_entry_flag='-bnoentry' 59292a51b5beSmrg fi 5930d31dbc53Smrg 59312a51b5beSmrg # When large executables or shared objects are built, AIX ld can 59322a51b5beSmrg # have problems creating the table of contents. If linking a library 59332a51b5beSmrg # or program results in "error TOC overflow" add -mminimal-toc to 59342a51b5beSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 59352a51b5beSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5936d31dbc53Smrg 59372a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 59382a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 59392a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 59402a51b5beSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5941d31dbc53Smrg 59422a51b5beSmrg if test "$GCC" = yes; then 59432a51b5beSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 59442a51b5beSmrg # We only want to do this on AIX 4.2 and lower, the check 59452a51b5beSmrg # below for broken collect2 doesn't work under 4.3+ 59462a51b5beSmrg collect2name=`${CC} -print-prog-name=collect2` 59472a51b5beSmrg if test -f "$collect2name" && \ 59482a51b5beSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 59492a51b5beSmrg then 59502a51b5beSmrg # We have reworked collect2 59512a51b5beSmrg : 59522a51b5beSmrg else 59532a51b5beSmrg # We have old collect2 59542a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 59552a51b5beSmrg # It fails to find uninstalled libraries when the uninstalled 59562a51b5beSmrg # path is not listed in the libpath. Setting hardcode_minus_L 59572a51b5beSmrg # to unsupported forces relinking 59582a51b5beSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 59592a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59602a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 59612a51b5beSmrg fi 59622a51b5beSmrg ;; 59632a51b5beSmrg esac 59642a51b5beSmrg shared_flag='-shared' 59652a51b5beSmrg if test "$aix_use_runtimelinking" = yes; then 59662a51b5beSmrg shared_flag="$shared_flag "'${wl}-G' 59672a51b5beSmrg fi 59682a51b5beSmrg else 59692a51b5beSmrg # not using gcc 59702a51b5beSmrg if test "$host_cpu" = ia64; then 59712a51b5beSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 59722a51b5beSmrg # chokes on -Wl,-G. The following line is correct: 59732a51b5beSmrg shared_flag='-G' 59742a51b5beSmrg else 59752a51b5beSmrg if test "$aix_use_runtimelinking" = yes; then 59762a51b5beSmrg shared_flag='${wl}-G' 59772a51b5beSmrg else 59782a51b5beSmrg shared_flag='${wl}-bM:SRE' 59792a51b5beSmrg fi 59802a51b5beSmrg fi 59812a51b5beSmrg fi 5982d31dbc53Smrg 59832a51b5beSmrg # It seems that -bexpall does not export symbols beginning with 59842a51b5beSmrg # underscore (_), so it is better to generate a list of symbols to export. 59852a51b5beSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 59862a51b5beSmrg if test "$aix_use_runtimelinking" = yes; then 59872a51b5beSmrg # Warning - without using the other runtime loading flags (-brtl), 59882a51b5beSmrg # -berok will link without error, but may produce a broken library. 59892a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 59902a51b5beSmrg # Determine the default libpath from the value encoded in an empty executable. 59912a51b5beSmrg _LT_AC_SYS_LIBPATH_AIX 59922a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 59932a51b5beSmrg _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" 59942a51b5beSmrg else 59952a51b5beSmrg if test "$host_cpu" = ia64; then 59962a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 59972a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 59982a51b5beSmrg _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" 59992a51b5beSmrg else 60002a51b5beSmrg # Determine the default libpath from the value encoded in an empty executable. 60012a51b5beSmrg _LT_AC_SYS_LIBPATH_AIX 60022a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60032a51b5beSmrg # Warning - without using the other run time loading flags, 60042a51b5beSmrg # -berok will link without error, but may produce a broken library. 60052a51b5beSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 60062a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 60072a51b5beSmrg # Exported symbols can be pulled into shared objects from archives 60082a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 60092a51b5beSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 60102a51b5beSmrg # This is similar to how AIX traditionally builds its shared libraries. 60112a51b5beSmrg _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' 60122a51b5beSmrg fi 60132a51b5beSmrg fi 60142a51b5beSmrg ;; 6015d31dbc53Smrg 60162a51b5beSmrg amigaos*) 60172a51b5beSmrg _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)' 60182a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60192a51b5beSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 60202a51b5beSmrg # see comment about different semantics on the GNU ld section 60212a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 60222a51b5beSmrg ;; 6023d31dbc53Smrg 60242a51b5beSmrg bsdi[[45]]*) 60252a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 60262a51b5beSmrg ;; 6027d31dbc53Smrg 60282a51b5beSmrg cygwin* | mingw* | pw32*) 60292a51b5beSmrg # When not using gcc, we currently assume that we are using 60302a51b5beSmrg # Microsoft Visual C++. 60312a51b5beSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 60322a51b5beSmrg # no search path for DLLs. 60332a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 60342a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 60352a51b5beSmrg # Tell ltmain to make .lib files, not .a files. 60362a51b5beSmrg libext=lib 60372a51b5beSmrg # Tell ltmain to make .dll files, not .so files. 60382a51b5beSmrg shrext_cmds=".dll" 60392a51b5beSmrg # FIXME: Setting linknames here is a bad hack. 60402a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 60412a51b5beSmrg # The linker will automatically build a .lib file if we build a DLL. 60422a51b5beSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 60432a51b5beSmrg # FIXME: Should let the user specify the lib program. 60442a51b5beSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 60452a51b5beSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 60462a51b5beSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 60472a51b5beSmrg ;; 6048d31dbc53Smrg 60492a51b5beSmrg darwin* | rhapsody*) 60502a51b5beSmrg case $host_os in 60512a51b5beSmrg rhapsody* | darwin1.[[012]]) 60522a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 60532a51b5beSmrg ;; 60542a51b5beSmrg *) # Darwin 1.3 on 60552a51b5beSmrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 60562a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 60572a51b5beSmrg else 60582a51b5beSmrg case ${MACOSX_DEPLOYMENT_TARGET} in 60592a51b5beSmrg 10.[[012]]) 60602a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 60612a51b5beSmrg ;; 60622a51b5beSmrg 10.*) 60632a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 60642a51b5beSmrg ;; 60652a51b5beSmrg esac 60662a51b5beSmrg fi 60672a51b5beSmrg ;; 60682a51b5beSmrg esac 60692a51b5beSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 60702a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 60712a51b5beSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 60722a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 60732a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 60742a51b5beSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 60752a51b5beSmrg if test "$GCC" = yes ; then 60762a51b5beSmrg output_verbose_link_cmd='echo' 60772a51b5beSmrg _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}" 60782a51b5beSmrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 60792a51b5beSmrg _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}" 60802a51b5beSmrg _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}" 60812a51b5beSmrg else 60822a51b5beSmrg case $cc_basename in 60832a51b5beSmrg xlc*) 60842a51b5beSmrg output_verbose_link_cmd='echo' 60852a51b5beSmrg _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' 60862a51b5beSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 60872a51b5beSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 60882a51b5beSmrg _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}' 60892a51b5beSmrg _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}' 60902a51b5beSmrg ;; 60912a51b5beSmrg *) 60922a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 60932a51b5beSmrg ;; 60942a51b5beSmrg esac 60952a51b5beSmrg fi 60962a51b5beSmrg ;; 6097d31dbc53Smrg 60982a51b5beSmrg dgux*) 60992a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 61002a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61012a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61022a51b5beSmrg ;; 6103d31dbc53Smrg 61042a51b5beSmrg freebsd1*) 61052a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 61062a51b5beSmrg ;; 6107d31dbc53Smrg 61082a51b5beSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 61092a51b5beSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 61102a51b5beSmrg # does not break anything, and helps significantly (at the cost of a little 61112a51b5beSmrg # extra space). 61122a51b5beSmrg freebsd2.2*) 61132a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 61142a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 61152a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61162a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61172a51b5beSmrg ;; 6118d31dbc53Smrg 61192a51b5beSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 61202a51b5beSmrg freebsd2*) 61212a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 61222a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61232a51b5beSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 61242a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61252a51b5beSmrg ;; 6126d31dbc53Smrg 61272a51b5beSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 61282a51b5beSmrg freebsd* | dragonfly*) 61292a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 61302a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 61312a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61322a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61332a51b5beSmrg ;; 6134d31dbc53Smrg 61352a51b5beSmrg hpux9*) 61362a51b5beSmrg if test "$GCC" = yes; then 61372a51b5beSmrg _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' 61382a51b5beSmrg else 61392a51b5beSmrg _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' 61402a51b5beSmrg fi 61412a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 61422a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 61432a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6144d31dbc53Smrg 61452a51b5beSmrg # hardcode_minus_L: Not really in the search PATH, 61462a51b5beSmrg # but as the default location of the library. 61472a51b5beSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 61482a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 61492a51b5beSmrg ;; 6150d31dbc53Smrg 61512a51b5beSmrg hpux10*) 61522a51b5beSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 61532a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 61542a51b5beSmrg else 61552a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 61562a51b5beSmrg fi 61572a51b5beSmrg if test "$with_gnu_ld" = no; then 61582a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 61592a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6160d31dbc53Smrg 61612a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61622a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6163d31dbc53Smrg 61642a51b5beSmrg # hardcode_minus_L: Not really in the search PATH, 61652a51b5beSmrg # but as the default location of the library. 61662a51b5beSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 61672a51b5beSmrg fi 61682a51b5beSmrg ;; 6169d31dbc53Smrg 61702a51b5beSmrg hpux11*) 61712a51b5beSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 61722a51b5beSmrg case $host_cpu in 61732a51b5beSmrg hppa*64*) 61742a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 61752a51b5beSmrg ;; 61762a51b5beSmrg ia64*) 61772a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 61782a51b5beSmrg ;; 61792a51b5beSmrg *) 61802a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 61812a51b5beSmrg ;; 61822a51b5beSmrg esac 61832a51b5beSmrg else 61842a51b5beSmrg case $host_cpu in 61852a51b5beSmrg hppa*64*) 61862a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 61872a51b5beSmrg ;; 61882a51b5beSmrg ia64*) 61892a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 61902a51b5beSmrg ;; 61912a51b5beSmrg *) 61922a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 61932a51b5beSmrg ;; 61942a51b5beSmrg esac 61952a51b5beSmrg fi 61962a51b5beSmrg if test "$with_gnu_ld" = no; then 61972a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 61982a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6199d31dbc53Smrg 62002a51b5beSmrg case $host_cpu in 62012a51b5beSmrg hppa*64*|ia64*) 62022a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 62032a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 62042a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62052a51b5beSmrg ;; 62062a51b5beSmrg *) 62072a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62082a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6209d31dbc53Smrg 62102a51b5beSmrg # hardcode_minus_L: Not really in the search PATH, 62112a51b5beSmrg # but as the default location of the library. 62122a51b5beSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 62132a51b5beSmrg ;; 62142a51b5beSmrg esac 62152a51b5beSmrg fi 62162a51b5beSmrg ;; 6217d31dbc53Smrg 62182a51b5beSmrg irix5* | irix6* | nonstopux*) 62192a51b5beSmrg if test "$GCC" = yes; then 62202a51b5beSmrg _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' 62212a51b5beSmrg else 62222a51b5beSmrg _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' 62232a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 62242a51b5beSmrg fi 62252a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 62262a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62272a51b5beSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 62282a51b5beSmrg ;; 6229d31dbc53Smrg 62302a51b5beSmrg netbsd*) 62312a51b5beSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 62322a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 62332a51b5beSmrg else 62342a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 62352a51b5beSmrg fi 62362a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62372a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62382a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62392a51b5beSmrg ;; 6240d31dbc53Smrg 62412a51b5beSmrg newsos6) 62422a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 62432a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62442a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 62452a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62462a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62472a51b5beSmrg ;; 6248d31dbc53Smrg 62492a51b5beSmrg openbsd*) 62502a51b5beSmrg if test -f /usr/libexec/ld.so; then 62512a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62522a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62532a51b5beSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 62542a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 62552a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 62562a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 62572a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62582a51b5beSmrg else 62592a51b5beSmrg case $host_os in 62602a51b5beSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 62612a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 62622a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62632a51b5beSmrg ;; 62642a51b5beSmrg *) 62652a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 62662a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 62672a51b5beSmrg ;; 62682a51b5beSmrg esac 62692a51b5beSmrg fi 62702a51b5beSmrg else 62712a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 62722a51b5beSmrg fi 62732a51b5beSmrg ;; 6274d31dbc53Smrg 62752a51b5beSmrg os2*) 62762a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62772a51b5beSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 62782a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 62792a51b5beSmrg _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' 62802a51b5beSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 62812a51b5beSmrg ;; 6282d31dbc53Smrg 62832a51b5beSmrg osf3*) 62842a51b5beSmrg if test "$GCC" = yes; then 62852a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 62862a51b5beSmrg _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' 62872a51b5beSmrg else 62882a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 62892a51b5beSmrg _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' 62902a51b5beSmrg fi 62912a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 62922a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62932a51b5beSmrg ;; 6294d31dbc53Smrg 62952a51b5beSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 62962a51b5beSmrg if test "$GCC" = yes; then 62972a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 62982a51b5beSmrg _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' 62992a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 63002a51b5beSmrg else 63012a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 63022a51b5beSmrg _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' 63032a51b5beSmrg _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~ 63042a51b5beSmrg $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' 6305d31dbc53Smrg 63062a51b5beSmrg # Both c and cxx compiler support -rpath directly 63072a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 63082a51b5beSmrg fi 63092a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 63102a51b5beSmrg ;; 6311d31dbc53Smrg 63122a51b5beSmrg solaris*) 63132a51b5beSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 63142a51b5beSmrg if test "$GCC" = yes; then 63152a51b5beSmrg wlarc='${wl}' 63162a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63172a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 63182a51b5beSmrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 63192a51b5beSmrg else 63202a51b5beSmrg wlarc='' 63212a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 63222a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 63232a51b5beSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 63242a51b5beSmrg fi 63252a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63262a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63272a51b5beSmrg case $host_os in 63282a51b5beSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 63292a51b5beSmrg *) 63302a51b5beSmrg # The compiler driver will combine and reorder linker options, 63312a51b5beSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 63322a51b5beSmrg # but is careful enough not to reorder. 63332a51b5beSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 63342a51b5beSmrg if test "$GCC" = yes; then 63352a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 63362a51b5beSmrg else 63372a51b5beSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 63382a51b5beSmrg fi 63392a51b5beSmrg ;; 63402a51b5beSmrg esac 63412a51b5beSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 63422a51b5beSmrg ;; 6343d31dbc53Smrg 63442a51b5beSmrg sunos4*) 63452a51b5beSmrg if test "x$host_vendor" = xsequent; then 63462a51b5beSmrg # Use $CC to link under sequent, because it throws in some extra .o 63472a51b5beSmrg # files that make .init and .fini sections work. 63482a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 63492a51b5beSmrg else 63502a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 63512a51b5beSmrg fi 63522a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 63532a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 63542a51b5beSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 63552a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63562a51b5beSmrg ;; 6357d31dbc53Smrg 63582a51b5beSmrg sysv4) 63592a51b5beSmrg case $host_vendor in 63602a51b5beSmrg sni) 63612a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63622a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 63632a51b5beSmrg ;; 63642a51b5beSmrg siemens) 63652a51b5beSmrg ## LD is ld it makes a PLAMLIB 63662a51b5beSmrg ## CC just makes a GrossModule. 63672a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 63682a51b5beSmrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 63692a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 63702a51b5beSmrg ;; 63712a51b5beSmrg motorola) 63722a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63732a51b5beSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 63742a51b5beSmrg ;; 63752a51b5beSmrg esac 63762a51b5beSmrg runpath_var='LD_RUN_PATH' 63772a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63782a51b5beSmrg ;; 6379d31dbc53Smrg 63802a51b5beSmrg sysv4.3*) 63812a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63822a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63832a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 63842a51b5beSmrg ;; 6385d31dbc53Smrg 63862a51b5beSmrg sysv4*MP*) 63872a51b5beSmrg if test -d /usr/nec; then 63882a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63892a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63902a51b5beSmrg runpath_var=LD_RUN_PATH 63912a51b5beSmrg hardcode_runpath_var=yes 63922a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 63932a51b5beSmrg fi 63942a51b5beSmrg ;; 6395d31dbc53Smrg 63962a51b5beSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 63972a51b5beSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 63982a51b5beSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 63992a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64002a51b5beSmrg runpath_var='LD_RUN_PATH' 6401d31dbc53Smrg 64022a51b5beSmrg if test "$GCC" = yes; then 64032a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64042a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64052a51b5beSmrg else 64062a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64072a51b5beSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64082a51b5beSmrg fi 64092a51b5beSmrg ;; 6410d31dbc53Smrg 64112a51b5beSmrg sysv5* | sco3.2v5* | sco5v6*) 64122a51b5beSmrg # Note: We can NOT use -z defs as we might desire, because we do not 64132a51b5beSmrg # link with -lc, and that would cause any symbols used from libc to 64142a51b5beSmrg # always be unresolved, which means just about no library would 64152a51b5beSmrg # ever link correctly. If we're not using GNU ld we use -z text 64162a51b5beSmrg # though, which does catch some bad symbols but isn't as heavy-handed 64172a51b5beSmrg # as -z defs. 64182a51b5beSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 64192a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 64202a51b5beSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 64212a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64222a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 64232a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 64242a51b5beSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 64252a51b5beSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 64262a51b5beSmrg runpath_var='LD_RUN_PATH' 6427d31dbc53Smrg 64282a51b5beSmrg if test "$GCC" = yes; then 64292a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 64302a51b5beSmrg _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' 64312a51b5beSmrg else 64322a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 64332a51b5beSmrg _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' 64342a51b5beSmrg fi 64352a51b5beSmrg ;; 6436d31dbc53Smrg 64372a51b5beSmrg uts4*) 64382a51b5beSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 64392a51b5beSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 64402a51b5beSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64412a51b5beSmrg ;; 6442d31dbc53Smrg 64432a51b5beSmrg *) 64442a51b5beSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 64452a51b5beSmrg ;; 64462a51b5beSmrg esac 64472a51b5beSmrg fi 64482a51b5beSmrg]) 64492a51b5beSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 64502a51b5beSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6451d31dbc53Smrg 64522a51b5beSmrg# 64532a51b5beSmrg# Do we need to explicitly link libc? 64542a51b5beSmrg# 64552a51b5beSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 64562a51b5beSmrgx|xyes) 64572a51b5beSmrg # Assume -lc should be added 64582a51b5beSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6459d31dbc53Smrg 64602a51b5beSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 64612a51b5beSmrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 64622a51b5beSmrg *'~'*) 64632a51b5beSmrg # FIXME: we may have to deal with multi-command sequences. 64642a51b5beSmrg ;; 64652a51b5beSmrg '$CC '*) 64662a51b5beSmrg # Test whether the compiler implicitly links with -lc since on some 64672a51b5beSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 64682a51b5beSmrg # to ld, don't add -lc before -lgcc. 64692a51b5beSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 64702a51b5beSmrg $rm conftest* 64712a51b5beSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6472d31dbc53Smrg 64732a51b5beSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 64742a51b5beSmrg soname=conftest 64752a51b5beSmrg lib=conftest 64762a51b5beSmrg libobjs=conftest.$ac_objext 64772a51b5beSmrg deplibs= 64782a51b5beSmrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 64792a51b5beSmrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 64802a51b5beSmrg compiler_flags=-v 64812a51b5beSmrg linker_flags=-v 64822a51b5beSmrg verstring= 64832a51b5beSmrg output_objdir=. 64842a51b5beSmrg libname=conftest 64852a51b5beSmrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 64862a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 64872a51b5beSmrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 64882a51b5beSmrg then 64892a51b5beSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 64902a51b5beSmrg else 64912a51b5beSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 64922a51b5beSmrg fi 64932a51b5beSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 64942a51b5beSmrg else 64952a51b5beSmrg cat conftest.err 1>&5 64962a51b5beSmrg fi 64972a51b5beSmrg $rm conftest* 64982a51b5beSmrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 64992a51b5beSmrg ;; 65002a51b5beSmrg esac 65012a51b5beSmrg fi 65022a51b5beSmrg ;; 65032a51b5beSmrgesac 65042a51b5beSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS 6505d31dbc53Smrg 6506d31dbc53Smrg 65072a51b5beSmrg# _LT_AC_FILE_LTDLL_C 65082a51b5beSmrg# ------------------- 65092a51b5beSmrg# Be careful that the start marker always follows a newline. 65102a51b5beSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 65112a51b5beSmrg# /* ltdll.c starts here */ 65122a51b5beSmrg# #define WIN32_LEAN_AND_MEAN 65132a51b5beSmrg# #include <windows.h> 65142a51b5beSmrg# #undef WIN32_LEAN_AND_MEAN 65152a51b5beSmrg# #include <stdio.h> 65162a51b5beSmrg# 65172a51b5beSmrg# #ifndef __CYGWIN__ 65182a51b5beSmrg# # ifdef __CYGWIN32__ 65192a51b5beSmrg# # define __CYGWIN__ __CYGWIN32__ 65202a51b5beSmrg# # endif 65212a51b5beSmrg# #endif 65222a51b5beSmrg# 65232a51b5beSmrg# #ifdef __cplusplus 65242a51b5beSmrg# extern "C" { 65252a51b5beSmrg# #endif 65262a51b5beSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 65272a51b5beSmrg# #ifdef __cplusplus 65282a51b5beSmrg# } 65292a51b5beSmrg# #endif 65302a51b5beSmrg# 65312a51b5beSmrg# #ifdef __CYGWIN__ 65322a51b5beSmrg# #include <cygwin/cygwin_dll.h> 65332a51b5beSmrg# DECLARE_CYGWIN_DLL( DllMain ); 65342a51b5beSmrg# #endif 65352a51b5beSmrg# HINSTANCE __hDllInstance_base; 65362a51b5beSmrg# 65372a51b5beSmrg# BOOL APIENTRY 65382a51b5beSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 65392a51b5beSmrg# { 65402a51b5beSmrg# __hDllInstance_base = hInst; 65412a51b5beSmrg# return TRUE; 65422a51b5beSmrg# } 65432a51b5beSmrg# /* ltdll.c ends here */ 65442a51b5beSmrg])# _LT_AC_FILE_LTDLL_C 6545d31dbc53Smrg 6546d31dbc53Smrg 65472a51b5beSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 65482a51b5beSmrg# --------------------------------- 65492a51b5beSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 6550d31dbc53Smrg 6551d31dbc53Smrg 65522a51b5beSmrg# old names 65532a51b5beSmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 65542a51b5beSmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 65552a51b5beSmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 65562a51b5beSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 65572a51b5beSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 65582a51b5beSmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 65592a51b5beSmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 6560d31dbc53Smrg 65612a51b5beSmrg# This is just to silence aclocal about the macro not being used 65622a51b5beSmrgifelse([AC_DISABLE_FAST_INSTALL]) 6563d31dbc53Smrg 65642a51b5beSmrgAC_DEFUN([LT_AC_PROG_GCJ], 65652a51b5beSmrg[AC_CHECK_TOOL(GCJ, gcj, no) 65662a51b5beSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 65672a51b5beSmrg AC_SUBST(GCJFLAGS) 65682a51b5beSmrg]) 6569d31dbc53Smrg 65702a51b5beSmrgAC_DEFUN([LT_AC_PROG_RC], 65712a51b5beSmrg[AC_CHECK_TOOL(RC, windres, no) 65722a51b5beSmrg]) 6573d31dbc53Smrg 6574d31dbc53Smrg 65752a51b5beSmrg# Cheap backport of AS_EXECUTABLE_P and required macros 65762a51b5beSmrg# from Autoconf 2.59; we should not use $as_executable_p directly. 6577d31dbc53Smrg 65782a51b5beSmrg# _AS_TEST_PREPARE 65792a51b5beSmrg# ---------------- 65802a51b5beSmrgm4_ifndef([_AS_TEST_PREPARE], 65812a51b5beSmrg[m4_defun([_AS_TEST_PREPARE], 65822a51b5beSmrg[if test -x / >/dev/null 2>&1; then 65832a51b5beSmrg as_executable_p='test -x' 65842a51b5beSmrgelse 65852a51b5beSmrg as_executable_p='test -f' 6586d31dbc53Smrgfi 65872a51b5beSmrg])])# _AS_TEST_PREPARE 6588d31dbc53Smrg 65892a51b5beSmrg# AS_EXECUTABLE_P 65902a51b5beSmrg# --------------- 65912a51b5beSmrg# Check whether a file is executable. 65922a51b5beSmrgm4_ifndef([AS_EXECUTABLE_P], 65932a51b5beSmrg[m4_defun([AS_EXECUTABLE_P], 65942a51b5beSmrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl 65952a51b5beSmrg$as_executable_p $1[]dnl 65962a51b5beSmrg])])# AS_EXECUTABLE_P 6597d31dbc53Smrg 65982a51b5beSmrg# NOTE: This macro has been submitted for inclusion into # 65992a51b5beSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 66002a51b5beSmrg# a released version of Autoconf we should remove this # 66012a51b5beSmrg# macro and use it instead. # 66022a51b5beSmrg# LT_AC_PROG_SED 66032a51b5beSmrg# -------------- 66042a51b5beSmrg# Check for a fully-functional sed program, that truncates 66052a51b5beSmrg# as few characters as possible. Prefer GNU sed if found. 66062a51b5beSmrgAC_DEFUN([LT_AC_PROG_SED], 66072a51b5beSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 66082a51b5beSmrgAC_CACHE_VAL(lt_cv_path_SED, 66092a51b5beSmrg[# Loop through the user's path and test for sed and gsed. 66102a51b5beSmrg# Then use that list of sed's as ones to test for truncation. 66112a51b5beSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 66122a51b5beSmrgfor as_dir in $PATH 66132a51b5beSmrgdo 66142a51b5beSmrg IFS=$as_save_IFS 66152a51b5beSmrg test -z "$as_dir" && as_dir=. 66162a51b5beSmrg for lt_ac_prog in sed gsed; do 66172a51b5beSmrg for ac_exec_ext in '' $ac_executable_extensions; do 66182a51b5beSmrg if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 66192a51b5beSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 66202a51b5beSmrg fi 66212a51b5beSmrg done 66222a51b5beSmrg done 66232a51b5beSmrgdone 66242a51b5beSmrgIFS=$as_save_IFS 66252a51b5beSmrglt_ac_max=0 66262a51b5beSmrglt_ac_count=0 66272a51b5beSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 66282a51b5beSmrg# along with /bin/sed that truncates output. 66292a51b5beSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 66302a51b5beSmrg test ! -f $lt_ac_sed && continue 66312a51b5beSmrg cat /dev/null > conftest.in 66322a51b5beSmrg lt_ac_count=0 66332a51b5beSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 66342a51b5beSmrg # Check for GNU sed and select it if it is found. 66352a51b5beSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 66362a51b5beSmrg lt_cv_path_SED=$lt_ac_sed 66372a51b5beSmrg break 6638d31dbc53Smrg fi 66392a51b5beSmrg while true; do 66402a51b5beSmrg cat conftest.in conftest.in >conftest.tmp 66412a51b5beSmrg mv conftest.tmp conftest.in 66422a51b5beSmrg cp conftest.in conftest.nl 66432a51b5beSmrg echo >>conftest.nl 66442a51b5beSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 66452a51b5beSmrg cmp -s conftest.out conftest.nl || break 66462a51b5beSmrg # 10000 chars as input seems more than enough 66472a51b5beSmrg test $lt_ac_count -gt 10 && break 66482a51b5beSmrg lt_ac_count=`expr $lt_ac_count + 1` 66492a51b5beSmrg if test $lt_ac_count -gt $lt_ac_max; then 66502a51b5beSmrg lt_ac_max=$lt_ac_count 66512a51b5beSmrg lt_cv_path_SED=$lt_ac_sed 66522a51b5beSmrg fi 66532a51b5beSmrg done 66542a51b5beSmrgdone 66552a51b5beSmrg]) 66562a51b5beSmrgSED=$lt_cv_path_SED 66572a51b5beSmrgAC_SUBST([SED]) 66582a51b5beSmrgAC_MSG_RESULT([$SED]) 66592a51b5beSmrg]) 6660d31dbc53Smrg 66612a51b5beSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 66622a51b5beSmrg# 66632a51b5beSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 66642a51b5beSmrg# 66652a51b5beSmrg# This program is free software; you can redistribute it and/or modify 66662a51b5beSmrg# it under the terms of the GNU General Public License as published by 66672a51b5beSmrg# the Free Software Foundation; either version 2 of the License, or 66682a51b5beSmrg# (at your option) any later version. 66692a51b5beSmrg# 66702a51b5beSmrg# This program is distributed in the hope that it will be useful, but 66712a51b5beSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 66722a51b5beSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 66732a51b5beSmrg# General Public License for more details. 66742a51b5beSmrg# 66752a51b5beSmrg# You should have received a copy of the GNU General Public License 66762a51b5beSmrg# along with this program; if not, write to the Free Software 66772a51b5beSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 66782a51b5beSmrg# 66792a51b5beSmrg# As a special exception to the GNU General Public License, if you 66802a51b5beSmrg# distribute this file as part of a program that contains a 66812a51b5beSmrg# configuration script generated by Autoconf, you may include it under 66822a51b5beSmrg# the same distribution terms that you use for the rest of that program. 6683d31dbc53Smrg 66842a51b5beSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 66852a51b5beSmrg# ---------------------------------- 66862a51b5beSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 66872a51b5beSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 66882a51b5beSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 66892a51b5beSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 66902a51b5beSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 66912a51b5beSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 6692d31dbc53Smrgfi 66932a51b5beSmrgif test -n "$PKG_CONFIG"; then 66942a51b5beSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 66952a51b5beSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 66962a51b5beSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 66972a51b5beSmrg AC_MSG_RESULT([yes]) 66982a51b5beSmrg else 66992a51b5beSmrg AC_MSG_RESULT([no]) 67002a51b5beSmrg PKG_CONFIG="" 67012a51b5beSmrg fi 67022a51b5beSmrg 67032a51b5beSmrgfi[]dnl 67042a51b5beSmrg])# PKG_PROG_PKG_CONFIG 6705d31dbc53Smrg 67062a51b5beSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 67072a51b5beSmrg# 67082a51b5beSmrg# Check to see whether a particular set of modules exists. Similar 67092a51b5beSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 67102a51b5beSmrg# 67112a51b5beSmrg# 67122a51b5beSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 67132a51b5beSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 67142a51b5beSmrg# PKG_CHECK_EXISTS manually 67152a51b5beSmrg# -------------------------------------------------------------- 67162a51b5beSmrgAC_DEFUN([PKG_CHECK_EXISTS], 67172a51b5beSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 67182a51b5beSmrgif test -n "$PKG_CONFIG" && \ 67192a51b5beSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 67202a51b5beSmrg m4_ifval([$2], [$2], [:]) 67212a51b5beSmrgm4_ifvaln([$3], [else 67222a51b5beSmrg $3])dnl 67232a51b5beSmrgfi]) 6724d31dbc53Smrg 6725d31dbc53Smrg 67262a51b5beSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 67272a51b5beSmrg# --------------------------------------------- 67282a51b5beSmrgm4_define([_PKG_CONFIG], 67292a51b5beSmrg[if test -n "$$1"; then 67302a51b5beSmrg pkg_cv_[]$1="$$1" 67312a51b5beSmrg elif test -n "$PKG_CONFIG"; then 67322a51b5beSmrg PKG_CHECK_EXISTS([$3], 67332a51b5beSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 67342a51b5beSmrg [pkg_failed=yes]) 67352a51b5beSmrg else 67362a51b5beSmrg pkg_failed=untried 67372a51b5beSmrgfi[]dnl 67382a51b5beSmrg])# _PKG_CONFIG 6739d31dbc53Smrg 67402a51b5beSmrg# _PKG_SHORT_ERRORS_SUPPORTED 67412a51b5beSmrg# ----------------------------- 67422a51b5beSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 67432a51b5beSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 67442a51b5beSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 67452a51b5beSmrg _pkg_short_errors_supported=yes 67462a51b5beSmrgelse 67472a51b5beSmrg _pkg_short_errors_supported=no 67482a51b5beSmrgfi[]dnl 67492a51b5beSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 6750d31dbc53Smrg 6751d31dbc53Smrg 67522a51b5beSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 67532a51b5beSmrg# [ACTION-IF-NOT-FOUND]) 67542a51b5beSmrg# 67552a51b5beSmrg# 67562a51b5beSmrg# Note that if there is a possibility the first call to 67572a51b5beSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 67582a51b5beSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 67592a51b5beSmrg# 67602a51b5beSmrg# 67612a51b5beSmrg# -------------------------------------------------------------- 67622a51b5beSmrgAC_DEFUN([PKG_CHECK_MODULES], 67632a51b5beSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 67642a51b5beSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 67652a51b5beSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 6766d31dbc53Smrg 67672a51b5beSmrgpkg_failed=no 67682a51b5beSmrgAC_MSG_CHECKING([for $1]) 6769d31dbc53Smrg 67702a51b5beSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 67712a51b5beSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 6772d31dbc53Smrg 67732a51b5beSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 67742a51b5beSmrgand $1[]_LIBS to avoid the need to call pkg-config. 67752a51b5beSmrgSee the pkg-config man page for more details.]) 6776d31dbc53Smrg 67772a51b5beSmrgif test $pkg_failed = yes; then 67782a51b5beSmrg _PKG_SHORT_ERRORS_SUPPORTED 67792a51b5beSmrg if test $_pkg_short_errors_supported = yes; then 67802a51b5beSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 67812a51b5beSmrg else 67822a51b5beSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 67832a51b5beSmrg fi 67842a51b5beSmrg # Put the nasty error message in config.log where it belongs 67852a51b5beSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 6786d31dbc53Smrg 67872a51b5beSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 67882a51b5beSmrg[Package requirements ($2) were not met: 6789d31dbc53Smrg 67902a51b5beSmrg$$1_PKG_ERRORS 6791d31dbc53Smrg 67922a51b5beSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 67932a51b5beSmrginstalled software in a non-standard prefix. 6794d31dbc53Smrg 67952a51b5beSmrg_PKG_TEXT 67962a51b5beSmrg])], 67972a51b5beSmrg [AC_MSG_RESULT([no]) 67982a51b5beSmrg $4]) 67992a51b5beSmrgelif test $pkg_failed = untried; then 68002a51b5beSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 68012a51b5beSmrg[The pkg-config script could not be found or is too old. Make sure it 68022a51b5beSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 68032a51b5beSmrgpath to pkg-config. 6804d31dbc53Smrg 68052a51b5beSmrg_PKG_TEXT 6806d31dbc53Smrg 68072a51b5beSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 68082a51b5beSmrg [$4]) 68092a51b5beSmrgelse 68102a51b5beSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 68112a51b5beSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 68122a51b5beSmrg AC_MSG_RESULT([yes]) 68132a51b5beSmrg ifelse([$3], , :, [$3]) 68142a51b5beSmrgfi[]dnl 68152a51b5beSmrg])# PKG_CHECK_MODULES 6816d31dbc53Smrg 68172a51b5beSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 68182a51b5beSmrgdnl 68192a51b5beSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 68202a51b5beSmrgdnl 68212a51b5beSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 68222a51b5beSmrgdnl copy of this software and associated documentation files (the 68232a51b5beSmrgdnl "Software"), to deal in the Software without restriction, including 68242a51b5beSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 68252a51b5beSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 68262a51b5beSmrgdnl to whom the Software is furnished to do so, provided that the above 68272a51b5beSmrgdnl copyright notice(s) and this permission notice appear in all copies of 68282a51b5beSmrgdnl the Software and that both the above copyright notice(s) and this 68292a51b5beSmrgdnl permission notice appear in supporting documentation. 68302a51b5beSmrgdnl 68312a51b5beSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 68322a51b5beSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 68332a51b5beSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 68342a51b5beSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 68352a51b5beSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 68362a51b5beSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 68372a51b5beSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 68382a51b5beSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 68392a51b5beSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 68402a51b5beSmrgdnl 68412a51b5beSmrgdnl Except as contained in this notice, the name of a copyright holder 68422a51b5beSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 68432a51b5beSmrgdnl or other dealings in this Software without prior written authorization 68442a51b5beSmrgdnl of the copyright holder. 6845d31dbc53Smrg 68462a51b5beSmrg# XORG_MACROS_VERSION(required-version) 68472a51b5beSmrg# ------------------------------------- 68482a51b5beSmrg# Minimum version: 1.1.0 68492a51b5beSmrg# 68502a51b5beSmrg# If you're using a macro added in Version 1.1 or newer, include this in 68512a51b5beSmrg# your configure.ac with the minimum required version, such as: 68522a51b5beSmrg# XORG_MACROS_VERSION(1.1) 68532a51b5beSmrg# 68542a51b5beSmrg# To force at least a version with this macro defined, also add: 68552a51b5beSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 68562a51b5beSmrg# 68572a51b5beSmrg# 68582a51b5beSmrg# See the "minimum version" comment for each macro you use to see what 68592a51b5beSmrg# version you require. 68602a51b5beSmrgAC_DEFUN([XORG_MACROS_VERSION],[ 68612a51b5beSmrg [XORG_MACROS_needed_version=$1 68622a51b5beSmrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 68632a51b5beSmrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 68642a51b5beSmrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 68652a51b5beSmrg [XORG_MACROS_version=1.2.1 68662a51b5beSmrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 68672a51b5beSmrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 68682a51b5beSmrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 68692a51b5beSmrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 6870d31dbc53Smrg fi 68712a51b5beSmrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 68722a51b5beSmrg 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]) 68732a51b5beSmrg fi 68742a51b5beSmrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 68752a51b5beSmrg]) # XORG_MACROS_VERSION 6876d31dbc53Smrg 68772a51b5beSmrg# XORG_PROG_RAWCPP() 68782a51b5beSmrg# ------------------ 68792a51b5beSmrg# Minimum version: 1.0.0 68802a51b5beSmrg# 68812a51b5beSmrg# Find cpp program and necessary flags for use in pre-processing text files 68822a51b5beSmrg# such as man pages and config files 68832a51b5beSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 68842a51b5beSmrgAC_REQUIRE([AC_PROG_CPP]) 68852a51b5beSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 68862a51b5beSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 68872a51b5beSmrg 68882a51b5beSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 68892a51b5beSmrg# which is not the best choice for supporting other OS'es, but covers most 68902a51b5beSmrg# of the ones we need for now. 68912a51b5beSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 68922a51b5beSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 68932a51b5beSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 68942a51b5beSmrg AC_MSG_RESULT([no]) 68952a51b5beSmrgelse 68962a51b5beSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 68972a51b5beSmrg RAWCPPFLAGS=-undef 68982a51b5beSmrg AC_MSG_RESULT([yes]) 68992a51b5beSmrg # under Cygwin unix is still defined even with -undef 69002a51b5beSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 69012a51b5beSmrg RAWCPPFLAGS="-undef -ansi" 69022a51b5beSmrg AC_MSG_RESULT([yes, with -ansi]) 69032a51b5beSmrg else 69042a51b5beSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 69052a51b5beSmrg fi 6906d31dbc53Smrgfi 69072a51b5beSmrgrm -f conftest.$ac_ext 69082a51b5beSmrg 69092a51b5beSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 69102a51b5beSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 69112a51b5beSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 69122a51b5beSmrg AC_MSG_RESULT([no]) 6913d31dbc53Smrgelse 69142a51b5beSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 69152a51b5beSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 69162a51b5beSmrg AC_MSG_RESULT([yes]) 69172a51b5beSmrg else 69182a51b5beSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 69192a51b5beSmrg fi 6920d31dbc53Smrgfi 69212a51b5beSmrgrm -f conftest.$ac_ext 69222a51b5beSmrgAC_SUBST(RAWCPPFLAGS) 69232a51b5beSmrg]) # XORG_PROG_RAWCPP 6924d31dbc53Smrg 69252a51b5beSmrg# XORG_MANPAGE_SECTIONS() 69262a51b5beSmrg# ----------------------- 69272a51b5beSmrg# Minimum version: 1.0.0 69282a51b5beSmrg# 69292a51b5beSmrg# Determine which sections man pages go in for the different man page types 69302a51b5beSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 69312a51b5beSmrg# Not sure if there's any better way than just hardcoding by OS name. 69322a51b5beSmrg# Override default settings by setting environment variables 6933d31dbc53Smrg 69342a51b5beSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 69352a51b5beSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 6936d31dbc53Smrg 69372a51b5beSmrgif test x$APP_MAN_SUFFIX = x ; then 69382a51b5beSmrg APP_MAN_SUFFIX=1 69392a51b5beSmrgfi 69402a51b5beSmrgif test x$APP_MAN_DIR = x ; then 69412a51b5beSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 69422a51b5beSmrgfi 6943d31dbc53Smrg 69442a51b5beSmrgif test x$LIB_MAN_SUFFIX = x ; then 69452a51b5beSmrg LIB_MAN_SUFFIX=3 69462a51b5beSmrgfi 69472a51b5beSmrgif test x$LIB_MAN_DIR = x ; then 69482a51b5beSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 69492a51b5beSmrgfi 69502a51b5beSmrg 69512a51b5beSmrgif test x$FILE_MAN_SUFFIX = x ; then 69522a51b5beSmrg case $host_os in 69532a51b5beSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 69542a51b5beSmrg *) FILE_MAN_SUFFIX=5 ;; 6955d31dbc53Smrg esac 69562a51b5beSmrgfi 69572a51b5beSmrgif test x$FILE_MAN_DIR = x ; then 69582a51b5beSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 69592a51b5beSmrgfi 69602a51b5beSmrg 69612a51b5beSmrgif test x$MISC_MAN_SUFFIX = x ; then 6962d31dbc53Smrg case $host_os in 69632a51b5beSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 69642a51b5beSmrg *) MISC_MAN_SUFFIX=7 ;; 6965d31dbc53Smrg esac 69662a51b5beSmrgfi 69672a51b5beSmrgif test x$MISC_MAN_DIR = x ; then 69682a51b5beSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 69692a51b5beSmrgfi 6970d31dbc53Smrg 69712a51b5beSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 6972d31dbc53Smrg case $host_os in 69732a51b5beSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 69742a51b5beSmrg *) DRIVER_MAN_SUFFIX=4 ;; 69752a51b5beSmrg esac 69762a51b5beSmrgfi 69772a51b5beSmrgif test x$DRIVER_MAN_DIR = x ; then 69782a51b5beSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 69792a51b5beSmrgfi 698032b578d3Smrg 69812a51b5beSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 69822a51b5beSmrg case $host_os in 69832a51b5beSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 69842a51b5beSmrg *) ADMIN_MAN_SUFFIX=8 ;; 69852a51b5beSmrg esac 69862a51b5beSmrgfi 69872a51b5beSmrgif test x$ADMIN_MAN_DIR = x ; then 69882a51b5beSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 69892a51b5beSmrgfi 699032b578d3Smrg 699132b578d3Smrg 69922a51b5beSmrgAC_SUBST([APP_MAN_SUFFIX]) 69932a51b5beSmrgAC_SUBST([LIB_MAN_SUFFIX]) 69942a51b5beSmrgAC_SUBST([FILE_MAN_SUFFIX]) 69952a51b5beSmrgAC_SUBST([MISC_MAN_SUFFIX]) 69962a51b5beSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 69972a51b5beSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 69982a51b5beSmrgAC_SUBST([APP_MAN_DIR]) 69992a51b5beSmrgAC_SUBST([LIB_MAN_DIR]) 70002a51b5beSmrgAC_SUBST([FILE_MAN_DIR]) 70012a51b5beSmrgAC_SUBST([MISC_MAN_DIR]) 70022a51b5beSmrgAC_SUBST([DRIVER_MAN_DIR]) 70032a51b5beSmrgAC_SUBST([ADMIN_MAN_DIR]) 70042a51b5beSmrg]) # XORG_MANPAGE_SECTIONS 700532b578d3Smrg 70062a51b5beSmrg# XORG_CHECK_LINUXDOC 70072a51b5beSmrg# ------------------- 70082a51b5beSmrg# Minimum version: 1.0.0 70092a51b5beSmrg# 70102a51b5beSmrg# Defines the variable MAKE_TEXT if the necessary tools and 70112a51b5beSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 70122a51b5beSmrg# Whether or not the necessary tools and files are found can be checked 70132a51b5beSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 70142a51b5beSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 70152a51b5beSmrgif test x$XORG_SGML_PATH = x ; then 70162a51b5beSmrg XORG_SGML_PATH=$prefix/share/sgml 70172a51b5beSmrgfi 70182a51b5beSmrgHAVE_DEFS_ENT= 701932b578d3Smrg 70202a51b5beSmrgif test x"$cross_compiling" = x"yes" ; then 70212a51b5beSmrg HAVE_DEFS_ENT=no 70222a51b5beSmrgelse 70232a51b5beSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 70242a51b5beSmrgfi 702532b578d3Smrg 70262a51b5beSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 70272a51b5beSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 702832b578d3Smrg 70292a51b5beSmrgAC_MSG_CHECKING([Whether to build documentation]) 703032b578d3Smrg 70312a51b5beSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 70322a51b5beSmrg BUILDDOC=yes 70332a51b5beSmrgelse 70342a51b5beSmrg BUILDDOC=no 70352a51b5beSmrgfi 703632b578d3Smrg 70372a51b5beSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 703832b578d3Smrg 70392a51b5beSmrgAC_MSG_RESULT([$BUILDDOC]) 704032b578d3Smrg 70412a51b5beSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 704232b578d3Smrg 70432a51b5beSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 70442a51b5beSmrg BUILDPDFDOC=yes 70452a51b5beSmrgelse 70462a51b5beSmrg BUILDPDFDOC=no 70472a51b5beSmrgfi 704832b578d3Smrg 70492a51b5beSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 705032b578d3Smrg 70512a51b5beSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 705232b578d3Smrg 70532a51b5beSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 70542a51b5beSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 70552a51b5beSmrgMAKE_PDF="$PS2PDF" 70562a51b5beSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 705732b578d3Smrg 70582a51b5beSmrgAC_SUBST(MAKE_TEXT) 70592a51b5beSmrgAC_SUBST(MAKE_PS) 70602a51b5beSmrgAC_SUBST(MAKE_PDF) 70612a51b5beSmrgAC_SUBST(MAKE_HTML) 70622a51b5beSmrg]) # XORG_CHECK_LINUXDOC 706332b578d3Smrg 70642a51b5beSmrg# XORG_CHECK_DOCBOOK 70652a51b5beSmrg# ------------------- 70662a51b5beSmrg# Minimum version: 1.0.0 70672a51b5beSmrg# 70682a51b5beSmrg# Checks for the ability to build output formats from SGML DocBook source. 70692a51b5beSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 70702a51b5beSmrg# indicates whether the necessary tools and files are found and, if set, 70712a51b5beSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 70722a51b5beSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 70732a51b5beSmrgif test x$XORG_SGML_PATH = x ; then 70742a51b5beSmrg XORG_SGML_PATH=$prefix/share/sgml 70752a51b5beSmrgfi 70762a51b5beSmrgHAVE_DEFS_ENT= 70772a51b5beSmrgBUILDTXTDOC=no 70782a51b5beSmrgBUILDPDFDOC=no 70792a51b5beSmrgBUILDPSDOC=no 70802a51b5beSmrgBUILDHTMLDOC=no 708132b578d3Smrg 70822a51b5beSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 708332b578d3Smrg 70842a51b5beSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 70852a51b5beSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 70862a51b5beSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 70872a51b5beSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 708832b578d3Smrg 70892a51b5beSmrgAC_MSG_CHECKING([Whether to build text documentation]) 70902a51b5beSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 70912a51b5beSmrg test x$BUILD_TXTDOC != xno; then 70922a51b5beSmrg BUILDTXTDOC=yes 70932a51b5beSmrgfi 70942a51b5beSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 70952a51b5beSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 709632b578d3Smrg 70972a51b5beSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 70982a51b5beSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 70992a51b5beSmrg test x$BUILD_PDFDOC != xno; then 71002a51b5beSmrg BUILDPDFDOC=yes 71012a51b5beSmrgfi 71022a51b5beSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 71032a51b5beSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 71042a51b5beSmrg 71052a51b5beSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 71062a51b5beSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 71072a51b5beSmrg test x$BUILD_PSDOC != xno; then 71082a51b5beSmrg BUILDPSDOC=yes 71092a51b5beSmrgfi 71102a51b5beSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 71112a51b5beSmrgAC_MSG_RESULT([$BUILDPSDOC]) 71122a51b5beSmrg 71132a51b5beSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 71142a51b5beSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 71152a51b5beSmrg test x$BUILD_HTMLDOC != xno; then 71162a51b5beSmrg BUILDHTMLDOC=yes 71172a51b5beSmrgfi 71182a51b5beSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 71192a51b5beSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 712032b578d3Smrg 71212a51b5beSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 71222a51b5beSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 71232a51b5beSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 71242a51b5beSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 712532b578d3Smrg 71262a51b5beSmrgAC_SUBST(MAKE_TEXT) 71272a51b5beSmrgAC_SUBST(MAKE_PS) 71282a51b5beSmrgAC_SUBST(MAKE_PDF) 71292a51b5beSmrgAC_SUBST(MAKE_HTML) 71302a51b5beSmrg]) # XORG_CHECK_DOCBOOK 713132b578d3Smrg 71322a51b5beSmrg# XORG_CHECK_MALLOC_ZERO 71332a51b5beSmrg# ---------------------- 71342a51b5beSmrg# Minimum version: 1.0.0 713532b578d3Smrg# 71362a51b5beSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 71372a51b5beSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 71382a51b5beSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 71392a51b5beSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 71402a51b5beSmrgAC_ARG_ENABLE(malloc0returnsnull, 71412a51b5beSmrg AC_HELP_STRING([--enable-malloc0returnsnull], 71422a51b5beSmrg [malloc(0) returns NULL (default: auto)]), 71432a51b5beSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 71442a51b5beSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 71452a51b5beSmrg 71462a51b5beSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 71472a51b5beSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 71482a51b5beSmrg AC_RUN_IFELSE([ 71492a51b5beSmrgchar *malloc(); 71502a51b5beSmrgchar *realloc(); 71512a51b5beSmrgchar *calloc(); 71522a51b5beSmrgmain() { 71532a51b5beSmrg char *m0, *r0, *c0, *p; 71542a51b5beSmrg m0 = malloc(0); 71552a51b5beSmrg p = malloc(10); 71562a51b5beSmrg r0 = realloc(p,0); 71572a51b5beSmrg c0 = calloc(0); 71582a51b5beSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 71592a51b5beSmrg}], 71602a51b5beSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 71612a51b5beSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 716232b578d3Smrgfi 71632a51b5beSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 71642a51b5beSmrg 71652a51b5beSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 71662a51b5beSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 71672a51b5beSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 71682a51b5beSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 71692a51b5beSmrgelse 71702a51b5beSmrg MALLOC_ZERO_CFLAGS="" 71712a51b5beSmrg XMALLOC_ZERO_CFLAGS="" 71722a51b5beSmrg XTMALLOC_ZERO_CFLAGS="" 71732a51b5beSmrgfi 71742a51b5beSmrg 71752a51b5beSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 71762a51b5beSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 71772a51b5beSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 71782a51b5beSmrg]) # XORG_CHECK_MALLOC_ZERO 717932b578d3Smrg 71802a51b5beSmrg# XORG_WITH_LINT() 71812a51b5beSmrg# ---------------- 71822a51b5beSmrg# Minimum version: 1.1.0 7183d31dbc53Smrg# 71842a51b5beSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 71852a51b5beSmrg# is specified. (Use --with-lint=sparse for sparse.) 71862a51b5beSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 71872a51b5beSmrg# Sets $LINT_FLAGS to flags to pass to source checker 71882a51b5beSmrg# Sets LINT automake conditional if enabled (default: disabled) 7189d31dbc53Smrg# 71902a51b5beSmrgAC_DEFUN([XORG_WITH_LINT],[ 719132b578d3Smrg 71922a51b5beSmrg# Allow checking code with lint, sparse, etc. 71932a51b5beSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 71942a51b5beSmrg [Use a lint-style source code checker (default: disabled)])], 71952a51b5beSmrg [use_lint=$withval], [use_lint=no]) 71962a51b5beSmrgif test "x$use_lint" = "xyes" ; then 71972a51b5beSmrg LINT="lint" 71982a51b5beSmrgelse 71992a51b5beSmrg LINT="$use_lint" 72002a51b5beSmrgfi 72012a51b5beSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 72022a51b5beSmrg case $LINT in 72032a51b5beSmrg lint|*/lint) 72042a51b5beSmrg case $host_os in 72052a51b5beSmrg solaris*) 72062a51b5beSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 72072a51b5beSmrg ;; 72082a51b5beSmrg esac 72092a51b5beSmrg ;; 72102a51b5beSmrg esac 72112a51b5beSmrgfi 721232b578d3Smrg 72132a51b5beSmrgAC_SUBST(LINT) 72142a51b5beSmrgAC_SUBST(LINT_FLAGS) 72152a51b5beSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 7216d31dbc53Smrg 72172a51b5beSmrg]) # XORG_WITH_LINT 721832b578d3Smrg 72192a51b5beSmrg# XORG_LINT_LIBRARY(LIBNAME) 72202a51b5beSmrg# -------------------------- 72212a51b5beSmrg# Minimum version: 1.1.0 72222a51b5beSmrg# 72232a51b5beSmrg# Sets up flags for building lint libraries for checking programs that call 72242a51b5beSmrg# functions in the library. 72252a51b5beSmrg# Disabled by default, enable with --enable-lint-library 72262a51b5beSmrg# Sets: 72272a51b5beSmrg# @LINTLIB@ - name of lint library file to make 72282a51b5beSmrg# MAKE_LINT_LIB - automake conditional 72292a51b5beSmrg# 72302a51b5beSmrg 72312a51b5beSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 72322a51b5beSmrgAC_REQUIRE([XORG_WITH_LINT]) 72332a51b5beSmrg# Build lint "library" for more indepth checks of programs calling this library 72342a51b5beSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 72352a51b5beSmrg [Create lint library (default: disabled)])], 72362a51b5beSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 72372a51b5beSmrgif test "x$make_lint_lib" != "xno" ; then 72382a51b5beSmrg if test "x$LINT" = "xno" ; then 72392a51b5beSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 72402a51b5beSmrg fi 72412a51b5beSmrg if test "x$make_lint_lib" = "xyes" ; then 72422a51b5beSmrg LINTLIB=llib-l$1.ln 72432a51b5beSmrg else 72442a51b5beSmrg LINTLIB=$make_lint_lib 72452a51b5beSmrg fi 72462a51b5beSmrgfi 72472a51b5beSmrgAC_SUBST(LINTLIB) 72482a51b5beSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 724932b578d3Smrg 72502a51b5beSmrg]) # XORG_LINT_LIBRARY 725132b578d3Smrg 72522a51b5beSmrg# XORG_CWARNFLAGS 72532a51b5beSmrg# --------------- 72542a51b5beSmrg# Minimum version: 1.2.0 72552a51b5beSmrg# 72562a51b5beSmrg# Defines CWARNFLAGS to enable C compiler warnings. 72572a51b5beSmrg# 72582a51b5beSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 72592a51b5beSmrgAC_REQUIRE([AC_PROG_CC]) 72602a51b5beSmrgif test "x$GCC" = xyes ; then 72612a51b5beSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 72622a51b5beSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 72632a51b5beSmrg-Wbad-function-cast" 72642a51b5beSmrg case `gcc -dumpversion` in 72652a51b5beSmrg 3.4.* | 4.*) 72662a51b5beSmrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 72672a51b5beSmrg ;; 72682a51b5beSmrg esac 72692a51b5beSmrgelse 72702a51b5beSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 72712a51b5beSmrg if test "x$SUNCC" = "xyes"; then 72722a51b5beSmrg CWARNFLAGS="-v" 72732a51b5beSmrg fi 72742a51b5beSmrgfi 72752a51b5beSmrgAC_SUBST(CWARNFLAGS) 72762a51b5beSmrg]) # XORG_CWARNFLAGS 72772a51b5beSmrgdnl Copyright 2005 Red Hat, Inc 72782a51b5beSmrgdnl 72792a51b5beSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 72802a51b5beSmrgdnl documentation for any purpose is hereby granted without fee, provided that 72812a51b5beSmrgdnl the above copyright notice appear in all copies and that both that 72822a51b5beSmrgdnl copyright notice and this permission notice appear in supporting 72832a51b5beSmrgdnl documentation. 72842a51b5beSmrgdnl 72852a51b5beSmrgdnl The above copyright notice and this permission notice shall be included 72862a51b5beSmrgdnl in all copies or substantial portions of the Software. 72872a51b5beSmrgdnl 72882a51b5beSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 72892a51b5beSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 72902a51b5beSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 72912a51b5beSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 72922a51b5beSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 72932a51b5beSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 72942a51b5beSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 72952a51b5beSmrgdnl 72962a51b5beSmrgdnl Except as contained in this notice, the name of the copyright holders shall 72972a51b5beSmrgdnl not be used in advertising or otherwise to promote the sale, use or 72982a51b5beSmrgdnl other dealings in this Software without prior written authorization 72992a51b5beSmrgdnl from the copyright holders. 73002a51b5beSmrgdnl 730132b578d3Smrg 73022a51b5beSmrg# XORG_RELEASE_VERSION 73032a51b5beSmrg# -------------------- 73042a51b5beSmrg# Adds --with/without-release-string and changes the PACKAGE and 73052a51b5beSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 73062a51b5beSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 73072a51b5beSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 73082a51b5beSmrg 73092a51b5beSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 73102a51b5beSmrg AC_ARG_WITH(release-version, 73112a51b5beSmrg AC_HELP_STRING([--with-release-version=STRING], 73122a51b5beSmrg [Use release version string in package name]), 73132a51b5beSmrg [RELEASE_VERSION="$withval"], 73142a51b5beSmrg [RELEASE_VERSION=""]) 73152a51b5beSmrg if test "x$RELEASE_VERSION" != "x"; then 73162a51b5beSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 73172a51b5beSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 73182a51b5beSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 73192a51b5beSmrg fi 73202a51b5beSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 73212a51b5beSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 73222a51b5beSmrg [Major version of this package]) 73232a51b5beSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 73242a51b5beSmrg if test "x$PVM" = "x"; then 73252a51b5beSmrg PVM="0" 73262a51b5beSmrg fi 73272a51b5beSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 73282a51b5beSmrg [$PVM], 73292a51b5beSmrg [Minor version of this package]) 73302a51b5beSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 73312a51b5beSmrg if test "x$PVP" = "x"; then 73322a51b5beSmrg PVP="0" 73332a51b5beSmrg fi 73342a51b5beSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 73352a51b5beSmrg [$PVP], 73362a51b5beSmrg [Patch version of this package]) 73372a51b5beSmrg]) 733832b578d3Smrg 73392a51b5beSmrg# XORG_CHANGELOG() 73402a51b5beSmrg# ---------------- 73412a51b5beSmrg# Minimum version: 1.2.0 73422a51b5beSmrg# 73432a51b5beSmrg# Defines the variable CHANGELOG_CMD as the command to generate 73442a51b5beSmrg# ChangeLog from git. 73452a51b5beSmrg# 73462a51b5beSmrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 73472a51b5beSmrg# 73482a51b5beSmrgAC_DEFUN([XORG_CHANGELOG], [ 73492a51b5beSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 73502a51b5beSmrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 73512a51b5beSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 73522a51b5beSmrgAC_SUBST([CHANGELOG_CMD]) 73532a51b5beSmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 73542a51b5beSmrg]) # XORG_CHANGELOG 735532b578d3Smrg 73562a51b5beSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 73572a51b5beSmrg# 73582a51b5beSmrg# This file is free software; the Free Software Foundation 73592a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 73602a51b5beSmrg# with or without modifications, as long as this notice is preserved. 736132b578d3Smrg 73622a51b5beSmrg# AM_AUTOMAKE_VERSION(VERSION) 73632a51b5beSmrg# ---------------------------- 73642a51b5beSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 73652a51b5beSmrg# generated from the m4 files accompanying Automake X.Y. 73662a51b5beSmrg# (This private macro should not be called outside this file.) 73672a51b5beSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 73682a51b5beSmrg[am__api_version='1.11' 73692a51b5beSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 73702a51b5beSmrgdnl require some minimum version. Point them to the right macro. 73712a51b5beSmrgm4_if([$1], [1.11], [], 73722a51b5beSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 73732a51b5beSmrg]) 737432b578d3Smrg 73752a51b5beSmrg# _AM_AUTOCONF_VERSION(VERSION) 73762a51b5beSmrg# ----------------------------- 73772a51b5beSmrg# aclocal traces this macro to find the Autoconf version. 73782a51b5beSmrg# This is a private macro too. Using m4_define simplifies 73792a51b5beSmrg# the logic in aclocal, which can simply ignore this definition. 73802a51b5beSmrgm4_define([_AM_AUTOCONF_VERSION], []) 738132b578d3Smrg 73822a51b5beSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 73832a51b5beSmrg# ------------------------------- 73842a51b5beSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 73852a51b5beSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 73862a51b5beSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 73872a51b5beSmrg[AM_AUTOMAKE_VERSION([1.11])dnl 73882a51b5beSmrgm4_ifndef([AC_AUTOCONF_VERSION], 73892a51b5beSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 73902a51b5beSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 739132b578d3Smrg 73922a51b5beSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 739332b578d3Smrg 73942a51b5beSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 73952a51b5beSmrg# 73962a51b5beSmrg# This file is free software; the Free Software Foundation 73972a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 73982a51b5beSmrg# with or without modifications, as long as this notice is preserved. 73992a51b5beSmrg 74002a51b5beSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 74012a51b5beSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 74022a51b5beSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 74032a51b5beSmrg# 74042a51b5beSmrg# Of course, Automake must honor this variable whenever it calls a 74052a51b5beSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 74062a51b5beSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74072a51b5beSmrg# depending on how configure is run. This is pretty annoying, since 74082a51b5beSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 74092a51b5beSmrg# source directory, any form will work fine, but in subdirectories a 74102a51b5beSmrg# relative path needs to be adjusted first. 74112a51b5beSmrg# 74122a51b5beSmrg# $ac_aux_dir/missing 74132a51b5beSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 74142a51b5beSmrg# $top_srcdir/$ac_aux_dir/missing 74152a51b5beSmrg# fails if $ac_aux_dir is absolute, 74162a51b5beSmrg# fails when called from a subdirectory in a VPATH build with 74172a51b5beSmrg# a relative $ac_aux_dir 74182a51b5beSmrg# 74192a51b5beSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 74202a51b5beSmrg# are both prefixed by $srcdir. In an in-source build this is usually 74212a51b5beSmrg# harmless because $srcdir is `.', but things will broke when you 74222a51b5beSmrg# start a VPATH build or use an absolute $srcdir. 74232a51b5beSmrg# 74242a51b5beSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 74252a51b5beSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 74262a51b5beSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 74272a51b5beSmrg# and then we would define $MISSING as 74282a51b5beSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 74292a51b5beSmrg# This will work as long as MISSING is not called from configure, because 74302a51b5beSmrg# unfortunately $(top_srcdir) has no meaning in configure. 74312a51b5beSmrg# However there are other variables, like CC, which are often used in 74322a51b5beSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 74332a51b5beSmrg# 74342a51b5beSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 74352a51b5beSmrg# absolute PATH. The drawback is that using absolute paths prevent a 74362a51b5beSmrg# configured tree to be moved without reconfiguration. 743732b578d3Smrg 74382a51b5beSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 74392a51b5beSmrg[dnl Rely on autoconf to set up CDPATH properly. 74402a51b5beSmrgAC_PREREQ([2.50])dnl 74412a51b5beSmrg# expand $ac_aux_dir to an absolute path 74422a51b5beSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 74432a51b5beSmrg]) 744432b578d3Smrg 74452a51b5beSmrg# AM_CONDITIONAL -*- Autoconf -*- 744632b578d3Smrg 74472a51b5beSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 74482a51b5beSmrg# Free Software Foundation, Inc. 74492a51b5beSmrg# 74502a51b5beSmrg# This file is free software; the Free Software Foundation 74512a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 74522a51b5beSmrg# with or without modifications, as long as this notice is preserved. 745332b578d3Smrg 74542a51b5beSmrg# serial 9 745532b578d3Smrg 74562a51b5beSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 74572a51b5beSmrg# ------------------------------------- 74582a51b5beSmrg# Define a conditional. 74592a51b5beSmrgAC_DEFUN([AM_CONDITIONAL], 74602a51b5beSmrg[AC_PREREQ(2.52)dnl 74612a51b5beSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 74622a51b5beSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 74632a51b5beSmrgAC_SUBST([$1_TRUE])dnl 74642a51b5beSmrgAC_SUBST([$1_FALSE])dnl 74652a51b5beSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 74662a51b5beSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 74672a51b5beSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 74682a51b5beSmrgif $2; then 74692a51b5beSmrg $1_TRUE= 74702a51b5beSmrg $1_FALSE='#' 74712a51b5beSmrgelse 74722a51b5beSmrg $1_TRUE='#' 74732a51b5beSmrg $1_FALSE= 74742a51b5beSmrgfi 74752a51b5beSmrgAC_CONFIG_COMMANDS_PRE( 74762a51b5beSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 74772a51b5beSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 74782a51b5beSmrgUsually this means the macro was only invoked conditionally.]]) 74792a51b5beSmrgfi])]) 748032b578d3Smrg 74812a51b5beSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 74822a51b5beSmrg# Free Software Foundation, Inc. 74832a51b5beSmrg# 74842a51b5beSmrg# This file is free software; the Free Software Foundation 74852a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 74862a51b5beSmrg# with or without modifications, as long as this notice is preserved. 748732b578d3Smrg 74882a51b5beSmrg# serial 10 748932b578d3Smrg 74902a51b5beSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 74912a51b5beSmrg# written in clear, in which case automake, when reading aclocal.m4, 74922a51b5beSmrg# will think it sees a *use*, and therefore will trigger all it's 74932a51b5beSmrg# C support machinery. Also note that it means that autoscan, seeing 74942a51b5beSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 749532b578d3Smrg 749632b578d3Smrg 74972a51b5beSmrg# _AM_DEPENDENCIES(NAME) 74982a51b5beSmrg# ---------------------- 74992a51b5beSmrg# See how the compiler implements dependency checking. 75002a51b5beSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 75012a51b5beSmrg# We try a few techniques and use that to set a single cache variable. 75022a51b5beSmrg# 75032a51b5beSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 75042a51b5beSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 75052a51b5beSmrg# dependency, and given that the user is not expected to run this macro, 75062a51b5beSmrg# just rely on AC_PROG_CC. 75072a51b5beSmrgAC_DEFUN([_AM_DEPENDENCIES], 75082a51b5beSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 75092a51b5beSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 75102a51b5beSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 75112a51b5beSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 751232b578d3Smrg 75132a51b5beSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 75142a51b5beSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 75152a51b5beSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 75162a51b5beSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 75172a51b5beSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 75182a51b5beSmrg [depcc="$$1" am_compiler_list=]) 751932b578d3Smrg 75202a51b5beSmrgAC_CACHE_CHECK([dependency style of $depcc], 75212a51b5beSmrg [am_cv_$1_dependencies_compiler_type], 75222a51b5beSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 75232a51b5beSmrg # We make a subdir and do the tests there. Otherwise we can end up 75242a51b5beSmrg # making bogus files that we don't know about and never remove. For 75252a51b5beSmrg # instance it was reported that on HP-UX the gcc test will end up 75262a51b5beSmrg # making a dummy file named `D' -- because `-MD' means `put the output 75272a51b5beSmrg # in D'. 75282a51b5beSmrg mkdir conftest.dir 75292a51b5beSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 75302a51b5beSmrg # using a relative directory. 75312a51b5beSmrg cp "$am_depcomp" conftest.dir 75322a51b5beSmrg cd conftest.dir 75332a51b5beSmrg # We will build objects and dependencies in a subdirectory because 75342a51b5beSmrg # it helps to detect inapplicable dependency modes. For instance 75352a51b5beSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 75362a51b5beSmrg # side effect of compilation, but ICC will put the dependencies in 75372a51b5beSmrg # the current directory while Tru64 will put them in the object 75382a51b5beSmrg # directory. 75392a51b5beSmrg mkdir sub 754032b578d3Smrg 75412a51b5beSmrg am_cv_$1_dependencies_compiler_type=none 75422a51b5beSmrg if test "$am_compiler_list" = ""; then 75432a51b5beSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 75442a51b5beSmrg fi 75452a51b5beSmrg am__universal=false 75462a51b5beSmrg m4_case([$1], [CC], 75472a51b5beSmrg [case " $depcc " in #( 75482a51b5beSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 75492a51b5beSmrg esac], 75502a51b5beSmrg [CXX], 75512a51b5beSmrg [case " $depcc " in #( 75522a51b5beSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 75532a51b5beSmrg esac]) 755432b578d3Smrg 75552a51b5beSmrg for depmode in $am_compiler_list; do 75562a51b5beSmrg # Setup a source with many dependencies, because some compilers 75572a51b5beSmrg # like to wrap large dependency lists on column 80 (with \), and 75582a51b5beSmrg # we should not choose a depcomp mode which is confused by this. 75592a51b5beSmrg # 75602a51b5beSmrg # We need to recreate these files for each test, as the compiler may 75612a51b5beSmrg # overwrite some of them when testing with obscure command lines. 75622a51b5beSmrg # This happens at least with the AIX C compiler. 75632a51b5beSmrg : > sub/conftest.c 75642a51b5beSmrg for i in 1 2 3 4 5 6; do 75652a51b5beSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 75662a51b5beSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 75672a51b5beSmrg # Solaris 8's {/usr,}/bin/sh. 75682a51b5beSmrg touch sub/conftst$i.h 75692a51b5beSmrg done 75702a51b5beSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 75712a51b5beSmrg 75722a51b5beSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 75732a51b5beSmrg # mode. It turns out that the SunPro C++ compiler does not properly 75742a51b5beSmrg # handle `-M -o', and we need to detect this. Also, some Intel 75752a51b5beSmrg # versions had trouble with output in subdirs 75762a51b5beSmrg am__obj=sub/conftest.${OBJEXT-o} 75772a51b5beSmrg am__minus_obj="-o $am__obj" 75782a51b5beSmrg case $depmode in 75792a51b5beSmrg gcc) 75802a51b5beSmrg # This depmode causes a compiler race in universal mode. 75812a51b5beSmrg test "$am__universal" = false || continue 75822a51b5beSmrg ;; 75832a51b5beSmrg nosideeffect) 75842a51b5beSmrg # after this tag, mechanisms are not by side-effect, so they'll 75852a51b5beSmrg # only be used when explicitly requested 75862a51b5beSmrg if test "x$enable_dependency_tracking" = xyes; then 75872a51b5beSmrg continue 75882a51b5beSmrg else 75892a51b5beSmrg break 75902a51b5beSmrg fi 75912a51b5beSmrg ;; 75922a51b5beSmrg msvisualcpp | msvcmsys) 75932a51b5beSmrg # This compiler won't grok `-c -o', but also, the minuso test has 75942a51b5beSmrg # not run yet. These depmodes are late enough in the game, and 75952a51b5beSmrg # so weak that their functioning should not be impacted. 75962a51b5beSmrg am__obj=conftest.${OBJEXT-o} 75972a51b5beSmrg am__minus_obj= 75982a51b5beSmrg ;; 75992a51b5beSmrg none) break ;; 76002a51b5beSmrg esac 76012a51b5beSmrg if depmode=$depmode \ 76022a51b5beSmrg source=sub/conftest.c object=$am__obj \ 76032a51b5beSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 76042a51b5beSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 76052a51b5beSmrg >/dev/null 2>conftest.err && 76062a51b5beSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 76072a51b5beSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 76082a51b5beSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 76092a51b5beSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 76102a51b5beSmrg # icc doesn't choke on unknown options, it will just issue warnings 76112a51b5beSmrg # or remarks (even with -Werror). So we grep stderr for any message 76122a51b5beSmrg # that says an option was ignored or not supported. 76132a51b5beSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 76142a51b5beSmrg # icc: Command line warning: ignoring option '-M'; no argument required 76152a51b5beSmrg # The diagnosis changed in icc 8.0: 76162a51b5beSmrg # icc: Command line remark: option '-MP' not supported 76172a51b5beSmrg if (grep 'ignoring option' conftest.err || 76182a51b5beSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 76192a51b5beSmrg am_cv_$1_dependencies_compiler_type=$depmode 76202a51b5beSmrg break 7621d31dbc53Smrg fi 76222a51b5beSmrg fi 76232a51b5beSmrg done 762432b578d3Smrg 76252a51b5beSmrg cd .. 76262a51b5beSmrg rm -rf conftest.dir 76272a51b5beSmrgelse 76282a51b5beSmrg am_cv_$1_dependencies_compiler_type=none 76292a51b5beSmrgfi 76302a51b5beSmrg]) 76312a51b5beSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 76322a51b5beSmrgAM_CONDITIONAL([am__fastdep$1], [ 76332a51b5beSmrg test "x$enable_dependency_tracking" != xno \ 76342a51b5beSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 76352a51b5beSmrg]) 763632b578d3Smrg 763732b578d3Smrg 76382a51b5beSmrg# AM_SET_DEPDIR 76392a51b5beSmrg# ------------- 76402a51b5beSmrg# Choose a directory name for dependency files. 76412a51b5beSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 76422a51b5beSmrgAC_DEFUN([AM_SET_DEPDIR], 76432a51b5beSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 76442a51b5beSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 76452a51b5beSmrg]) 764632b578d3Smrg 764732b578d3Smrg 76482a51b5beSmrg# AM_DEP_TRACK 76492a51b5beSmrg# ------------ 76502a51b5beSmrgAC_DEFUN([AM_DEP_TRACK], 76512a51b5beSmrg[AC_ARG_ENABLE(dependency-tracking, 76522a51b5beSmrg[ --disable-dependency-tracking speeds up one-time build 76532a51b5beSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 76542a51b5beSmrgif test "x$enable_dependency_tracking" != xno; then 76552a51b5beSmrg am_depcomp="$ac_aux_dir/depcomp" 76562a51b5beSmrg AMDEPBACKSLASH='\' 76572a51b5beSmrgfi 76582a51b5beSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 76592a51b5beSmrgAC_SUBST([AMDEPBACKSLASH])dnl 76602a51b5beSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 76612a51b5beSmrg]) 766232b578d3Smrg 76632a51b5beSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 766432b578d3Smrg 76652a51b5beSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 76662a51b5beSmrg# Free Software Foundation, Inc. 76672a51b5beSmrg# 76682a51b5beSmrg# This file is free software; the Free Software Foundation 76692a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 76702a51b5beSmrg# with or without modifications, as long as this notice is preserved. 767132b578d3Smrg 76722a51b5beSmrg#serial 5 76732a51b5beSmrg 76742a51b5beSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 76752a51b5beSmrg# ------------------------------ 76762a51b5beSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 76772a51b5beSmrg[{ 76782a51b5beSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 76792a51b5beSmrg # are listed without --file. Let's play safe and only enable the eval 76802a51b5beSmrg # if we detect the quoting. 76812a51b5beSmrg case $CONFIG_FILES in 76822a51b5beSmrg *\'*) eval set x "$CONFIG_FILES" ;; 76832a51b5beSmrg *) set x $CONFIG_FILES ;; 76842a51b5beSmrg esac 76852a51b5beSmrg shift 76862a51b5beSmrg for mf 76872a51b5beSmrg do 76882a51b5beSmrg # Strip MF so we end up with the name of the file. 76892a51b5beSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 76902a51b5beSmrg # Check whether this is an Automake generated Makefile or not. 76912a51b5beSmrg # We used to match only the files named `Makefile.in', but 76922a51b5beSmrg # some people rename them; so instead we look at the file content. 76932a51b5beSmrg # Grep'ing the first line is not enough: some people post-process 76942a51b5beSmrg # each Makefile.in and add a new line on top of each file to say so. 76952a51b5beSmrg # Grep'ing the whole file is not good either: AIX grep has a line 76962a51b5beSmrg # limit of 2048, but all sed's we know have understand at least 4000. 76972a51b5beSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 76982a51b5beSmrg dirpart=`AS_DIRNAME("$mf")` 7699d31dbc53Smrg else 77002a51b5beSmrg continue 7701d31dbc53Smrg fi 77022a51b5beSmrg # Extract the definition of DEPDIR, am__include, and am__quote 77032a51b5beSmrg # from the Makefile without running `make'. 77042a51b5beSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 77052a51b5beSmrg test -z "$DEPDIR" && continue 77062a51b5beSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 77072a51b5beSmrg test -z "am__include" && continue 77082a51b5beSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 77092a51b5beSmrg # When using ansi2knr, U may be empty or an underscore; expand it 77102a51b5beSmrg U=`sed -n 's/^U = //p' < "$mf"` 77112a51b5beSmrg # Find all dependency output files, they are included files with 77122a51b5beSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 77132a51b5beSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 77142a51b5beSmrg # expansion. 77152a51b5beSmrg for file in `sed -n " 77162a51b5beSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 77172a51b5beSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 77182a51b5beSmrg # Make sure the directory exists. 77192a51b5beSmrg test -f "$dirpart/$file" && continue 77202a51b5beSmrg fdir=`AS_DIRNAME(["$file"])` 77212a51b5beSmrg AS_MKDIR_P([$dirpart/$fdir]) 77222a51b5beSmrg # echo "creating $dirpart/$file" 77232a51b5beSmrg echo '# dummy' > "$dirpart/$file" 77242a51b5beSmrg done 77252a51b5beSmrg done 77262a51b5beSmrg} 77272a51b5beSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 772832b578d3Smrg 772932b578d3Smrg 77302a51b5beSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 77312a51b5beSmrg# ----------------------------- 77322a51b5beSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 77332a51b5beSmrg# 77342a51b5beSmrg# This code is only required when automatic dependency tracking 77352a51b5beSmrg# is enabled. FIXME. This creates each `.P' file that we will 77362a51b5beSmrg# need in order to bootstrap the dependency handling code. 77372a51b5beSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 77382a51b5beSmrg[AC_CONFIG_COMMANDS([depfiles], 77392a51b5beSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 77402a51b5beSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 77412a51b5beSmrg]) 77422a51b5beSmrg 77432a51b5beSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 77442a51b5beSmrg# Free Software Foundation, Inc. 77452a51b5beSmrg# 77462a51b5beSmrg# This file is free software; the Free Software Foundation 77472a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 77482a51b5beSmrg# with or without modifications, as long as this notice is preserved. 77492a51b5beSmrg 77502a51b5beSmrg# serial 8 77512a51b5beSmrg 77522a51b5beSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 77532a51b5beSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 77542a51b5beSmrg 77552a51b5beSmrg# Do all the work for Automake. -*- Autoconf -*- 77562a51b5beSmrg 77572a51b5beSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 77582a51b5beSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 77592a51b5beSmrg# 77602a51b5beSmrg# This file is free software; the Free Software Foundation 77612a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 77622a51b5beSmrg# with or without modifications, as long as this notice is preserved. 77632a51b5beSmrg 77642a51b5beSmrg# serial 16 776532b578d3Smrg 77662a51b5beSmrg# This macro actually does too much. Some checks are only needed if 77672a51b5beSmrg# your package does certain things. But this isn't really a big deal. 776832b578d3Smrg 77692a51b5beSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 77702a51b5beSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 77712a51b5beSmrg# ----------------------------------------------- 77722a51b5beSmrg# The call with PACKAGE and VERSION arguments is the old style 77732a51b5beSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 77742a51b5beSmrg# and VERSION should now be passed to AC_INIT and removed from 77752a51b5beSmrg# the call to AM_INIT_AUTOMAKE. 77762a51b5beSmrg# We support both call styles for the transition. After 77772a51b5beSmrg# the next Automake release, Autoconf can make the AC_INIT 77782a51b5beSmrg# arguments mandatory, and then we can depend on a new Autoconf 77792a51b5beSmrg# release and drop the old call support. 77802a51b5beSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 77812a51b5beSmrg[AC_PREREQ([2.62])dnl 77822a51b5beSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 77832a51b5beSmrgdnl the ones we care about. 77842a51b5beSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 77852a51b5beSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 77862a51b5beSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 77872a51b5beSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 77882a51b5beSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 77892a51b5beSmrg # is not polluted with repeated "-I." 77902a51b5beSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 77912a51b5beSmrg # test to see if srcdir already configured 77922a51b5beSmrg if test -f $srcdir/config.status; then 77932a51b5beSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 77942a51b5beSmrg fi 77952a51b5beSmrgfi 779632b578d3Smrg 77972a51b5beSmrg# test whether we have cygpath 77982a51b5beSmrgif test -z "$CYGPATH_W"; then 77992a51b5beSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 78002a51b5beSmrg CYGPATH_W='cygpath -w' 78012a51b5beSmrg else 78022a51b5beSmrg CYGPATH_W=echo 78032a51b5beSmrg fi 78042a51b5beSmrgfi 78052a51b5beSmrgAC_SUBST([CYGPATH_W]) 780632b578d3Smrg 78072a51b5beSmrg# Define the identity of the package. 78082a51b5beSmrgdnl Distinguish between old-style and new-style calls. 78092a51b5beSmrgm4_ifval([$2], 78102a51b5beSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 78112a51b5beSmrg AC_SUBST([PACKAGE], [$1])dnl 78122a51b5beSmrg AC_SUBST([VERSION], [$2])], 78132a51b5beSmrg[_AM_SET_OPTIONS([$1])dnl 78142a51b5beSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 78152a51b5beSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 78162a51b5beSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 78172a51b5beSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 78182a51b5beSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 781932b578d3Smrg 78202a51b5beSmrg_AM_IF_OPTION([no-define],, 78212a51b5beSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 78222a51b5beSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 782332b578d3Smrg 78242a51b5beSmrg# Some tools Automake needs. 78252a51b5beSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 78262a51b5beSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 78272a51b5beSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 78282a51b5beSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 78292a51b5beSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 78302a51b5beSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 78312a51b5beSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 78322a51b5beSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 78332a51b5beSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 78342a51b5beSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 78352a51b5beSmrg# We need awk for the "check" target. The system "awk" is bad on 78362a51b5beSmrg# some platforms. 78372a51b5beSmrgAC_REQUIRE([AC_PROG_AWK])dnl 78382a51b5beSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 78392a51b5beSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 78402a51b5beSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 78412a51b5beSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 78422a51b5beSmrg [_AM_PROG_TAR([v7])])]) 78432a51b5beSmrg_AM_IF_OPTION([no-dependencies],, 78442a51b5beSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 78452a51b5beSmrg [_AM_DEPENDENCIES(CC)], 78462a51b5beSmrg [define([AC_PROG_CC], 78472a51b5beSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 78482a51b5beSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 78492a51b5beSmrg [_AM_DEPENDENCIES(CXX)], 78502a51b5beSmrg [define([AC_PROG_CXX], 78512a51b5beSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 78522a51b5beSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 78532a51b5beSmrg [_AM_DEPENDENCIES(OBJC)], 78542a51b5beSmrg [define([AC_PROG_OBJC], 78552a51b5beSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 78562a51b5beSmrg]) 78572a51b5beSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 78582a51b5beSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 78592a51b5beSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 78602a51b5beSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 78612a51b5beSmrgAC_CONFIG_COMMANDS_PRE(dnl 78622a51b5beSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 78632a51b5beSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 78642a51b5beSmrg]) 786532b578d3Smrg 78662a51b5beSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 78672a51b5beSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 78682a51b5beSmrgdnl mangled by Autoconf and run in a shell conditional statement. 78692a51b5beSmrgm4_define([_AC_COMPILER_EXEEXT], 78702a51b5beSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 787132b578d3Smrg 787232b578d3Smrg 78732a51b5beSmrg# When config.status generates a header, we must update the stamp-h file. 78742a51b5beSmrg# This file resides in the same directory as the config header 78752a51b5beSmrg# that is generated. The stamp files are numbered to have different names. 787632b578d3Smrg 78772a51b5beSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 78782a51b5beSmrg# loop where config.status creates the headers, so we can generate 78792a51b5beSmrg# our stamp files there. 78802a51b5beSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 78812a51b5beSmrg[# Compute $1's index in $config_headers. 78822a51b5beSmrg_am_arg=$1 78832a51b5beSmrg_am_stamp_count=1 78842a51b5beSmrgfor _am_header in $config_headers :; do 78852a51b5beSmrg case $_am_header in 78862a51b5beSmrg $_am_arg | $_am_arg:* ) 78872a51b5beSmrg break ;; 78882a51b5beSmrg * ) 78892a51b5beSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 78902a51b5beSmrg esac 78912a51b5beSmrgdone 78922a51b5beSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 789332b578d3Smrg 78942a51b5beSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 78952a51b5beSmrg# 78962a51b5beSmrg# This file is free software; the Free Software Foundation 78972a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 78982a51b5beSmrg# with or without modifications, as long as this notice is preserved. 789932b578d3Smrg 79002a51b5beSmrg# AM_PROG_INSTALL_SH 79012a51b5beSmrg# ------------------ 79022a51b5beSmrg# Define $install_sh. 79032a51b5beSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 79042a51b5beSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 79052a51b5beSmrgif test x"${install_sh}" != xset; then 79062a51b5beSmrg case $am_aux_dir in 79072a51b5beSmrg *\ * | *\ *) 79082a51b5beSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 79092a51b5beSmrg *) 79102a51b5beSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 79112a51b5beSmrg esac 79122a51b5beSmrgfi 79132a51b5beSmrgAC_SUBST(install_sh)]) 791432b578d3Smrg 79152a51b5beSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 79162a51b5beSmrg# 79172a51b5beSmrg# This file is free software; the Free Software Foundation 79182a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 79192a51b5beSmrg# with or without modifications, as long as this notice is preserved. 792032b578d3Smrg 79212a51b5beSmrg# serial 2 792232b578d3Smrg 79232a51b5beSmrg# Check whether the underlying file-system supports filenames 79242a51b5beSmrg# with a leading dot. For instance MS-DOS doesn't. 79252a51b5beSmrgAC_DEFUN([AM_SET_LEADING_DOT], 79262a51b5beSmrg[rm -rf .tst 2>/dev/null 79272a51b5beSmrgmkdir .tst 2>/dev/null 79282a51b5beSmrgif test -d .tst; then 79292a51b5beSmrg am__leading_dot=. 79302a51b5beSmrgelse 79312a51b5beSmrg am__leading_dot=_ 79322a51b5beSmrgfi 79332a51b5beSmrgrmdir .tst 2>/dev/null 79342a51b5beSmrgAC_SUBST([am__leading_dot])]) 793532b578d3Smrg 79362a51b5beSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 79372a51b5beSmrg# From Jim Meyering 793832b578d3Smrg 79392a51b5beSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 79402a51b5beSmrg# Free Software Foundation, Inc. 79412a51b5beSmrg# 79422a51b5beSmrg# This file is free software; the Free Software Foundation 79432a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 79442a51b5beSmrg# with or without modifications, as long as this notice is preserved. 794532b578d3Smrg 79462a51b5beSmrg# serial 5 794732b578d3Smrg 79482a51b5beSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 79492a51b5beSmrg# ---------------------------------- 79502a51b5beSmrg# Control maintainer-specific portions of Makefiles. 79512a51b5beSmrg# Default is to disable them, unless `enable' is passed literally. 79522a51b5beSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 79532a51b5beSmrg# can override the default with the --enable/--disable switch. 79542a51b5beSmrgAC_DEFUN([AM_MAINTAINER_MODE], 79552a51b5beSmrg[m4_case(m4_default([$1], [disable]), 79562a51b5beSmrg [enable], [m4_define([am_maintainer_other], [disable])], 79572a51b5beSmrg [disable], [m4_define([am_maintainer_other], [enable])], 79582a51b5beSmrg [m4_define([am_maintainer_other], [enable]) 79592a51b5beSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 79602a51b5beSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 79612a51b5beSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 79622a51b5beSmrg AC_ARG_ENABLE([maintainer-mode], 79632a51b5beSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 79642a51b5beSmrg (and sometimes confusing) to the casual installer], 79652a51b5beSmrg [USE_MAINTAINER_MODE=$enableval], 79662a51b5beSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 79672a51b5beSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 79682a51b5beSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 79692a51b5beSmrg MAINT=$MAINTAINER_MODE_TRUE 79702a51b5beSmrg AC_SUBST([MAINT])dnl 79712a51b5beSmrg] 79722a51b5beSmrg) 797332b578d3Smrg 79742a51b5beSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 797532b578d3Smrg 79762a51b5beSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 797732b578d3Smrg 79782a51b5beSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 79792a51b5beSmrg# 79802a51b5beSmrg# This file is free software; the Free Software Foundation 79812a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 79822a51b5beSmrg# with or without modifications, as long as this notice is preserved. 798332b578d3Smrg 79842a51b5beSmrg# serial 4 798532b578d3Smrg 79862a51b5beSmrg# AM_MAKE_INCLUDE() 79872a51b5beSmrg# ----------------- 79882a51b5beSmrg# Check to see how make treats includes. 79892a51b5beSmrgAC_DEFUN([AM_MAKE_INCLUDE], 79902a51b5beSmrg[am_make=${MAKE-make} 79912a51b5beSmrgcat > confinc << 'END' 79922a51b5beSmrgam__doit: 79932a51b5beSmrg @echo this is the am__doit target 79942a51b5beSmrg.PHONY: am__doit 79952a51b5beSmrgEND 79962a51b5beSmrg# If we don't find an include directive, just comment out the code. 79972a51b5beSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 79982a51b5beSmrgam__include="#" 79992a51b5beSmrgam__quote= 80002a51b5beSmrg_am_result=none 80012a51b5beSmrg# First try GNU make style include. 80022a51b5beSmrgecho "include confinc" > confmf 80032a51b5beSmrg# Ignore all kinds of additional output from `make'. 80042a51b5beSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 80052a51b5beSmrg*the\ am__doit\ target*) 80062a51b5beSmrg am__include=include 80072a51b5beSmrg am__quote= 80082a51b5beSmrg _am_result=GNU 80092a51b5beSmrg ;; 80102a51b5beSmrgesac 80112a51b5beSmrg# Now try BSD make style include. 80122a51b5beSmrgif test "$am__include" = "#"; then 80132a51b5beSmrg echo '.include "confinc"' > confmf 80142a51b5beSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 80152a51b5beSmrg *the\ am__doit\ target*) 80162a51b5beSmrg am__include=.include 80172a51b5beSmrg am__quote="\"" 80182a51b5beSmrg _am_result=BSD 80192a51b5beSmrg ;; 80202a51b5beSmrg esac 80212a51b5beSmrgfi 80222a51b5beSmrgAC_SUBST([am__include]) 80232a51b5beSmrgAC_SUBST([am__quote]) 80242a51b5beSmrgAC_MSG_RESULT([$_am_result]) 80252a51b5beSmrgrm -f confinc confmf 80262a51b5beSmrg]) 802732b578d3Smrg 80282a51b5beSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 802932b578d3Smrg 80302a51b5beSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 80312a51b5beSmrg# Free Software Foundation, Inc. 80322a51b5beSmrg# 80332a51b5beSmrg# This file is free software; the Free Software Foundation 80342a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 80352a51b5beSmrg# with or without modifications, as long as this notice is preserved. 803632b578d3Smrg 80372a51b5beSmrg# serial 6 803832b578d3Smrg 80392a51b5beSmrg# AM_MISSING_PROG(NAME, PROGRAM) 80402a51b5beSmrg# ------------------------------ 80412a51b5beSmrgAC_DEFUN([AM_MISSING_PROG], 80422a51b5beSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 80432a51b5beSmrg$1=${$1-"${am_missing_run}$2"} 80442a51b5beSmrgAC_SUBST($1)]) 804532b578d3Smrg 804632b578d3Smrg 80472a51b5beSmrg# AM_MISSING_HAS_RUN 80482a51b5beSmrg# ------------------ 80492a51b5beSmrg# Define MISSING if not defined so far and test if it supports --run. 80502a51b5beSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 80512a51b5beSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 80522a51b5beSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 80532a51b5beSmrgAC_REQUIRE_AUX_FILE([missing])dnl 80542a51b5beSmrgif test x"${MISSING+set}" != xset; then 80552a51b5beSmrg case $am_aux_dir in 80562a51b5beSmrg *\ * | *\ *) 80572a51b5beSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 80582a51b5beSmrg *) 80592a51b5beSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 80602a51b5beSmrg esac 80612a51b5beSmrgfi 80622a51b5beSmrg# Use eval to expand $SHELL 80632a51b5beSmrgif eval "$MISSING --run true"; then 80642a51b5beSmrg am_missing_run="$MISSING --run " 80652a51b5beSmrgelse 80662a51b5beSmrg am_missing_run= 80672a51b5beSmrg AC_MSG_WARN([`missing' script is too old or missing]) 80682a51b5beSmrgfi 80692a51b5beSmrg]) 80702a51b5beSmrg 80712a51b5beSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 80722a51b5beSmrg# 80732a51b5beSmrg# This file is free software; the Free Software Foundation 80742a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 80752a51b5beSmrg# with or without modifications, as long as this notice is preserved. 80762a51b5beSmrg 80772a51b5beSmrg# AM_PROG_MKDIR_P 80782a51b5beSmrg# --------------- 80792a51b5beSmrg# Check for `mkdir -p'. 80802a51b5beSmrgAC_DEFUN([AM_PROG_MKDIR_P], 80812a51b5beSmrg[AC_PREREQ([2.60])dnl 80822a51b5beSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 80832a51b5beSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 80842a51b5beSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 80852a51b5beSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 80862a51b5beSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 80872a51b5beSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 80882a51b5beSmrgdnl adjustment using top_builddir (which is defined more often than 80892a51b5beSmrgdnl MKDIR_P). 80902a51b5beSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 80912a51b5beSmrgcase $mkdir_p in 80922a51b5beSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 80932a51b5beSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 80942a51b5beSmrgesac 809532b578d3Smrg]) 809632b578d3Smrg 80972a51b5beSmrg# Helper functions for option handling. -*- Autoconf -*- 809832b578d3Smrg 80992a51b5beSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 81002a51b5beSmrg# 81012a51b5beSmrg# This file is free software; the Free Software Foundation 81022a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 81032a51b5beSmrg# with or without modifications, as long as this notice is preserved. 8104d31dbc53Smrg 81052a51b5beSmrg# serial 4 810632b578d3Smrg 81072a51b5beSmrg# _AM_MANGLE_OPTION(NAME) 81082a51b5beSmrg# ----------------------- 81092a51b5beSmrgAC_DEFUN([_AM_MANGLE_OPTION], 81102a51b5beSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 811132b578d3Smrg 81122a51b5beSmrg# _AM_SET_OPTION(NAME) 81132a51b5beSmrg# ------------------------------ 81142a51b5beSmrg# Set option NAME. Presently that only means defining a flag for this option. 81152a51b5beSmrgAC_DEFUN([_AM_SET_OPTION], 81162a51b5beSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 811732b578d3Smrg 81182a51b5beSmrg# _AM_SET_OPTIONS(OPTIONS) 81192a51b5beSmrg# ---------------------------------- 81202a51b5beSmrg# OPTIONS is a space-separated list of Automake options. 81212a51b5beSmrgAC_DEFUN([_AM_SET_OPTIONS], 81222a51b5beSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 812332b578d3Smrg 81242a51b5beSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 81252a51b5beSmrg# ------------------------------------------- 81262a51b5beSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 81272a51b5beSmrgAC_DEFUN([_AM_IF_OPTION], 81282a51b5beSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 812932b578d3Smrg 81302a51b5beSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 813132b578d3Smrg 81322a51b5beSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 81332a51b5beSmrg# Free Software Foundation, Inc. 81342a51b5beSmrg# 81352a51b5beSmrg# This file is free software; the Free Software Foundation 81362a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 81372a51b5beSmrg# with or without modifications, as long as this notice is preserved. 813832b578d3Smrg 81392a51b5beSmrg# serial 5 814032b578d3Smrg 81412a51b5beSmrg# AM_SANITY_CHECK 81422a51b5beSmrg# --------------- 81432a51b5beSmrgAC_DEFUN([AM_SANITY_CHECK], 81442a51b5beSmrg[AC_MSG_CHECKING([whether build environment is sane]) 81452a51b5beSmrg# Just in case 81462a51b5beSmrgsleep 1 81472a51b5beSmrgecho timestamp > conftest.file 81482a51b5beSmrg# Reject unsafe characters in $srcdir or the absolute working directory 81492a51b5beSmrg# name. Accept space and tab only in the latter. 81502a51b5beSmrgam_lf=' 81512a51b5beSmrg' 81522a51b5beSmrgcase `pwd` in 81532a51b5beSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 81542a51b5beSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 81552a51b5beSmrgesac 81562a51b5beSmrgcase $srcdir in 81572a51b5beSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 81582a51b5beSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 81592a51b5beSmrgesac 816032b578d3Smrg 81612a51b5beSmrg# Do `set' in a subshell so we don't clobber the current shell's 81622a51b5beSmrg# arguments. Must try -L first in case configure is actually a 81632a51b5beSmrg# symlink; some systems play weird games with the mod time of symlinks 81642a51b5beSmrg# (eg FreeBSD returns the mod time of the symlink's containing 81652a51b5beSmrg# directory). 81662a51b5beSmrgif ( 81672a51b5beSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 81682a51b5beSmrg if test "$[*]" = "X"; then 81692a51b5beSmrg # -L didn't work. 81702a51b5beSmrg set X `ls -t "$srcdir/configure" conftest.file` 81712a51b5beSmrg fi 81722a51b5beSmrg rm -f conftest.file 81732a51b5beSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 81742a51b5beSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8175d31dbc53Smrg 81762a51b5beSmrg # If neither matched, then we have a broken ls. This can happen 81772a51b5beSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 81782a51b5beSmrg # broken ls alias from the environment. This has actually 81792a51b5beSmrg # happened. Such a system could not be considered "sane". 81802a51b5beSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 81812a51b5beSmrgalias in your environment]) 81822a51b5beSmrg fi 8183d31dbc53Smrg 81842a51b5beSmrg test "$[2]" = conftest.file 81852a51b5beSmrg ) 81862a51b5beSmrgthen 81872a51b5beSmrg # Ok. 81882a51b5beSmrg : 81892a51b5beSmrgelse 81902a51b5beSmrg AC_MSG_ERROR([newly created file is older than distributed files! 81912a51b5beSmrgCheck your system clock]) 81922a51b5beSmrgfi 81932a51b5beSmrgAC_MSG_RESULT(yes)]) 81942a51b5beSmrg 81952a51b5beSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8196d31dbc53Smrg# 81972a51b5beSmrg# This file is free software; the Free Software Foundation 81982a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 81992a51b5beSmrg# with or without modifications, as long as this notice is preserved. 820032b578d3Smrg 82012a51b5beSmrg# AM_PROG_INSTALL_STRIP 82022a51b5beSmrg# --------------------- 82032a51b5beSmrg# One issue with vendor `install' (even GNU) is that you can't 82042a51b5beSmrg# specify the program used to strip binaries. This is especially 82052a51b5beSmrg# annoying in cross-compiling environments, where the build's strip 82062a51b5beSmrg# is unlikely to handle the host's binaries. 82072a51b5beSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 82082a51b5beSmrg# always use install-sh in `make install-strip', and initialize 82092a51b5beSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 82102a51b5beSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 82112a51b5beSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 82122a51b5beSmrg# Installed binaries are usually stripped using `strip' when the user 82132a51b5beSmrg# run `make install-strip'. However `strip' might not be the right 82142a51b5beSmrg# tool to use in cross-compilation environments, therefore Automake 82152a51b5beSmrg# will honor the `STRIP' environment variable to overrule this program. 82162a51b5beSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 82172a51b5beSmrgif test "$cross_compiling" != no; then 82182a51b5beSmrg AC_CHECK_TOOL([STRIP], [strip], :) 8219d31dbc53Smrgfi 82202a51b5beSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 82212a51b5beSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 822232b578d3Smrg 82232a51b5beSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 8224d31dbc53Smrg# 82252a51b5beSmrg# This file is free software; the Free Software Foundation 82262a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 82272a51b5beSmrg# with or without modifications, as long as this notice is preserved. 822832b578d3Smrg 82292a51b5beSmrg# serial 2 823032b578d3Smrg 82312a51b5beSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 82322a51b5beSmrg# --------------------------- 82332a51b5beSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 82342a51b5beSmrg# This macro is traced by Automake. 82352a51b5beSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 823632b578d3Smrg 82372a51b5beSmrg# AM_SUBST_NOTMAKE(VARIABLE) 82382a51b5beSmrg# --------------------------- 82392a51b5beSmrg# Public sister of _AM_SUBST_NOTMAKE. 82402a51b5beSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 82412a51b5beSmrg 82422a51b5beSmrg# Check how to create a tarball. -*- Autoconf -*- 82432a51b5beSmrg 82442a51b5beSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 824532b578d3Smrg# 82462a51b5beSmrg# This file is free software; the Free Software Foundation 82472a51b5beSmrg# gives unlimited permission to copy and/or distribute it, 82482a51b5beSmrg# with or without modifications, as long as this notice is preserved. 82492a51b5beSmrg 82502a51b5beSmrg# serial 2 82512a51b5beSmrg 82522a51b5beSmrg# _AM_PROG_TAR(FORMAT) 82532a51b5beSmrg# -------------------- 82542a51b5beSmrg# Check how to create a tarball in format FORMAT. 82552a51b5beSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 8256d31dbc53Smrg# 82572a51b5beSmrg# Substitute a variable $(am__tar) that is a command 82582a51b5beSmrg# writing to stdout a FORMAT-tarball containing the directory 82592a51b5beSmrg# $tardir. 82602a51b5beSmrg# tardir=directory && $(am__tar) > result.tar 8261d31dbc53Smrg# 82622a51b5beSmrg# Substitute a variable $(am__untar) that extract such 82632a51b5beSmrg# a tarball read from stdin. 82642a51b5beSmrg# $(am__untar) < result.tar 82652a51b5beSmrgAC_DEFUN([_AM_PROG_TAR], 82662a51b5beSmrg[# Always define AMTAR for backward compatibility. 82672a51b5beSmrgAM_MISSING_PROG([AMTAR], [tar]) 82682a51b5beSmrgm4_if([$1], [v7], 82692a51b5beSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 82702a51b5beSmrg [m4_case([$1], [ustar],, [pax],, 82712a51b5beSmrg [m4_fatal([Unknown tar format])]) 82722a51b5beSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 82732a51b5beSmrg# Loop over all known methods to create a tar archive until one works. 82742a51b5beSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 82752a51b5beSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 82762a51b5beSmrg# Do not fold the above two line into one, because Tru64 sh and 82772a51b5beSmrg# Solaris sh will not grok spaces in the rhs of `-'. 82782a51b5beSmrgfor _am_tool in $_am_tools 82792a51b5beSmrgdo 82802a51b5beSmrg case $_am_tool in 82812a51b5beSmrg gnutar) 82822a51b5beSmrg for _am_tar in tar gnutar gtar; 82832a51b5beSmrg do 82842a51b5beSmrg AM_RUN_LOG([$_am_tar --version]) && break 82852a51b5beSmrg done 82862a51b5beSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 82872a51b5beSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 82882a51b5beSmrg am__untar="$_am_tar -xf -" 82892a51b5beSmrg ;; 82902a51b5beSmrg plaintar) 82912a51b5beSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 82922a51b5beSmrg # ustar tarball either. 82932a51b5beSmrg (tar --version) >/dev/null 2>&1 && continue 82942a51b5beSmrg am__tar='tar chf - "$$tardir"' 82952a51b5beSmrg am__tar_='tar chf - "$tardir"' 82962a51b5beSmrg am__untar='tar xf -' 82972a51b5beSmrg ;; 82982a51b5beSmrg pax) 82992a51b5beSmrg am__tar='pax -L -x $1 -w "$$tardir"' 83002a51b5beSmrg am__tar_='pax -L -x $1 -w "$tardir"' 83012a51b5beSmrg am__untar='pax -r' 83022a51b5beSmrg ;; 83032a51b5beSmrg cpio) 83042a51b5beSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 83052a51b5beSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 83062a51b5beSmrg am__untar='cpio -i -H $1 -d' 83072a51b5beSmrg ;; 83082a51b5beSmrg none) 83092a51b5beSmrg am__tar=false 83102a51b5beSmrg am__tar_=false 83112a51b5beSmrg am__untar=false 83122a51b5beSmrg ;; 83132a51b5beSmrg esac 831432b578d3Smrg 83152a51b5beSmrg # If the value was cached, stop now. We just wanted to have am__tar 83162a51b5beSmrg # and am__untar set. 83172a51b5beSmrg test -n "${am_cv_prog_tar_$1}" && break 831832b578d3Smrg 83192a51b5beSmrg # tar/untar a dummy directory, and stop if the command works 83202a51b5beSmrg rm -rf conftest.dir 83212a51b5beSmrg mkdir conftest.dir 83222a51b5beSmrg echo GrepMe > conftest.dir/file 83232a51b5beSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 83242a51b5beSmrg rm -rf conftest.dir 83252a51b5beSmrg if test -s conftest.tar; then 83262a51b5beSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 83272a51b5beSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 83282a51b5beSmrg fi 83292a51b5beSmrgdone 83302a51b5beSmrgrm -rf conftest.dir 833132b578d3Smrg 83322a51b5beSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 83332a51b5beSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 83342a51b5beSmrgAC_SUBST([am__tar]) 83352a51b5beSmrgAC_SUBST([am__untar]) 83362a51b5beSmrg]) # _AM_PROG_TAR 833732b578d3Smrg 83382a51b5beSmrgdnl Copyright 2005 Red Hat, Inc 83392a51b5beSmrgdnl 83402a51b5beSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 83412a51b5beSmrgdnl documentation for any purpose is hereby granted without fee, provided that 83422a51b5beSmrgdnl the above copyright notice appear in all copies and that both that 83432a51b5beSmrgdnl copyright notice and this permission notice appear in supporting 83442a51b5beSmrgdnl documentation. 83452a51b5beSmrgdnl 83462a51b5beSmrgdnl The above copyright notice and this permission notice shall be included 83472a51b5beSmrgdnl in all copies or substantial portions of the Software. 83482a51b5beSmrgdnl 83492a51b5beSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 83502a51b5beSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 83512a51b5beSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 83522a51b5beSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 83532a51b5beSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 83542a51b5beSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 83552a51b5beSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 83562a51b5beSmrgdnl 83572a51b5beSmrgdnl Except as contained in this notice, the name of the copyright holders shall 83582a51b5beSmrgdnl not be used in advertising or otherwise to promote the sale, use or 83592a51b5beSmrgdnl other dealings in this Software without prior written authorization 83602a51b5beSmrgdnl from the copyright holders. 83612a51b5beSmrgdnl 836232b578d3Smrg 83632a51b5beSmrg# XORG_DRIVER_CHECK_EXT() 83642a51b5beSmrg# -------------------------- 83652a51b5beSmrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 83662a51b5beSmrg# is defined, then add $1 to $REQUIRED_MODULES. 836732b578d3Smrg 83682a51b5beSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 83692a51b5beSmrg SAVE_CFLAGS="$CFLAGS" 83702a51b5beSmrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 83712a51b5beSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 83722a51b5beSmrg#include "xorg-server.h" 83732a51b5beSmrg#if !defined $1 83742a51b5beSmrg#error $1 not defined 83752a51b5beSmrg#endif 83762a51b5beSmrg ]])], 83772a51b5beSmrg [_EXT_CHECK=yes], 83782a51b5beSmrg [_EXT_CHECK=no]) 83792a51b5beSmrg CFLAGS="$SAVE_CFLAGS" 83802a51b5beSmrg AC_MSG_CHECKING([if $1 is defined]) 83812a51b5beSmrg AC_MSG_RESULT([$_EXT_CHECK]) 83822a51b5beSmrg if test "$_EXT_CHECK" != no; then 83832a51b5beSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 83842a51b5beSmrg fi 83852a51b5beSmrg]) 838632b578d3Smrg 8387