aclocal.m4 revision 5c42550e
15c42550eSmrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 2ab47cfaaSmrg 3ab47cfaaSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 45c42550eSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5ab47cfaaSmrg# This file is free software; the Free Software Foundation 6ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it, 7ab47cfaaSmrg# with or without modifications, as long as this notice is preserved. 8ab47cfaaSmrg 9ab47cfaaSmrg# This program is distributed in the hope that it will be useful, 10ab47cfaaSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11ab47cfaaSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12ab47cfaaSmrg# PARTICULAR PURPOSE. 13ab47cfaaSmrg 148697ee19Smrgm4_ifndef([AC_AUTOCONF_VERSION], 158697ee19Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 161473d951Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 171473d951Smrg[m4_warning([this file was generated for autoconf 2.63. 188697ee19SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 198697ee19SmrgIf you have problems, you may need to regenerate the build system entirely. 208697ee19SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 218697ee19Smrg 22ab47cfaaSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23ab47cfaaSmrg 245c42550eSmrg# serial 52 AC_PROG_LIBTOOL 25ab47cfaaSmrg 26ab47cfaaSmrg 275c42550eSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 285c42550eSmrg# ----------------------------------------------------------- 295c42550eSmrg# If this macro is not defined by Autoconf, define it here. 305c42550eSmrgm4_ifdef([AC_PROVIDE_IFELSE], 315c42550eSmrg [], 325c42550eSmrg [m4_define([AC_PROVIDE_IFELSE], 335c42550eSmrg [m4_ifdef([AC_PROVIDE_$1], 345c42550eSmrg [$2], [$3])])]) 351473d951Smrg 361473d951Smrg 375c42550eSmrg# AC_PROG_LIBTOOL 385c42550eSmrg# --------------- 395c42550eSmrgAC_DEFUN([AC_PROG_LIBTOOL], 405c42550eSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 415c42550eSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 425c42550eSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 435c42550eSmrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 445c42550eSmrg [AC_LIBTOOL_CXX], 455c42550eSmrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 465c42550eSmrg ])]) 475c42550eSmrgdnl And a similar setup for Fortran 77 support 485c42550eSmrg AC_PROVIDE_IFELSE([AC_PROG_F77], 495c42550eSmrg [AC_LIBTOOL_F77], 505c42550eSmrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 515c42550eSmrg])]) 525c42550eSmrg 535c42550eSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 545c42550eSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 555c42550eSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 565c42550eSmrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 575c42550eSmrg [AC_LIBTOOL_GCJ], 585c42550eSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 595c42550eSmrg [AC_LIBTOOL_GCJ], 605c42550eSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 615c42550eSmrg [AC_LIBTOOL_GCJ], 625c42550eSmrg [ifdef([AC_PROG_GCJ], 635c42550eSmrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 645c42550eSmrg ifdef([A][M_PROG_GCJ], 655c42550eSmrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 665c42550eSmrg ifdef([LT_AC_PROG_GCJ], 675c42550eSmrg [define([LT_AC_PROG_GCJ], 685c42550eSmrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 695c42550eSmrg])])# AC_PROG_LIBTOOL 705c42550eSmrg 715c42550eSmrg 725c42550eSmrg# _AC_PROG_LIBTOOL 735c42550eSmrg# ---------------- 745c42550eSmrgAC_DEFUN([_AC_PROG_LIBTOOL], 755c42550eSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 765c42550eSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 775c42550eSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 785c42550eSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 79ab47cfaaSmrg 80ab47cfaaSmrg# This can be used to rebuild libtool when needed 815c42550eSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 82ab47cfaaSmrg 83ab47cfaaSmrg# Always use our own libtool. 84ab47cfaaSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 85ab47cfaaSmrgAC_SUBST(LIBTOOL)dnl 86ab47cfaaSmrg 875c42550eSmrg# Prevent multiple expansion 885c42550eSmrgdefine([AC_PROG_LIBTOOL], []) 895c42550eSmrg])# _AC_PROG_LIBTOOL 901473d951Smrg 911473d951Smrg 925c42550eSmrg# AC_LIBTOOL_SETUP 935c42550eSmrg# ---------------- 945c42550eSmrgAC_DEFUN([AC_LIBTOOL_SETUP], 955c42550eSmrg[AC_PREREQ(2.50)dnl 965c42550eSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 975c42550eSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 985c42550eSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 995c42550eSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 100ab47cfaaSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 101ab47cfaaSmrgAC_REQUIRE([AC_PROG_CC])dnl 1025c42550eSmrgAC_REQUIRE([AC_PROG_LD])dnl 1035c42550eSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 1045c42550eSmrgAC_REQUIRE([AC_PROG_NM])dnl 1055c42550eSmrg 106ab47cfaaSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1075c42550eSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 1085c42550eSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 1095c42550eSmrgAC_REQUIRE([AC_OBJEXT])dnl 1105c42550eSmrgAC_REQUIRE([AC_EXEEXT])dnl 1111473d951Smrgdnl 1125c42550eSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 1135c42550eSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 1145c42550eSmrgAC_LIBTOOL_OBJDIR 115ab47cfaaSmrg 1165c42550eSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1175c42550eSmrg_LT_AC_PROG_ECHO_BACKSLASH 118ab47cfaaSmrg 119ab47cfaaSmrgcase $host_os in 120ab47cfaaSmrgaix3*) 121ab47cfaaSmrg # AIX sometimes has problems with the GCC collect2 program. For some 122ab47cfaaSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 123ab47cfaaSmrg # vanish in a puff of smoke. 124ab47cfaaSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 125ab47cfaaSmrg COLLECT_NAMES= 126ab47cfaaSmrg export COLLECT_NAMES 127ab47cfaaSmrg fi 128ab47cfaaSmrg ;; 129ab47cfaaSmrgesac 130ab47cfaaSmrg 131ab47cfaaSmrg# Sed substitution that helps us do robust quoting. It backslashifies 132ab47cfaaSmrg# metacharacters that are still active within double-quoted strings. 1335c42550eSmrgXsed='sed -e 1s/^X//' 1345c42550eSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 135ab47cfaaSmrg 136ab47cfaaSmrg# Same as above, but do not quote variable references. 1375c42550eSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 138ab47cfaaSmrg 139ab47cfaaSmrg# Sed substitution to delay expansion of an escaped shell variable in a 140ab47cfaaSmrg# double_quote_subst'ed string. 141ab47cfaaSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 142ab47cfaaSmrg 143ab47cfaaSmrg# Sed substitution to avoid accidental globbing in evaled expressions 144ab47cfaaSmrgno_glob_subst='s/\*/\\\*/g' 145ab47cfaaSmrg 1465c42550eSmrg# Constants: 1475c42550eSmrgrm="rm -f" 1485c42550eSmrg 149ab47cfaaSmrg# Global variables: 1505c42550eSmrgdefault_ofile=libtool 151ab47cfaaSmrgcan_build_shared=yes 152ab47cfaaSmrg 153ab47cfaaSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 154ab47cfaaSmrg# which needs '.lib'). 155ab47cfaaSmrglibext=a 1565c42550eSmrgltmain="$ac_aux_dir/ltmain.sh" 1575c42550eSmrgofile="$default_ofile" 1581473d951Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 159ab47cfaaSmrg 1605c42550eSmrgAC_CHECK_TOOL(AR, ar, false) 1615c42550eSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1625c42550eSmrgAC_CHECK_TOOL(STRIP, strip, :) 1635c42550eSmrg 164ab47cfaaSmrgold_CC="$CC" 165ab47cfaaSmrgold_CFLAGS="$CFLAGS" 166ab47cfaaSmrg 167ab47cfaaSmrg# Set sane defaults for various variables 1685c42550eSmrgtest -z "$AR" && AR=ar 1695c42550eSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1705c42550eSmrgtest -z "$AS" && AS=as 171ab47cfaaSmrgtest -z "$CC" && CC=cc 172ab47cfaaSmrgtest -z "$LTCC" && LTCC=$CC 173ab47cfaaSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1745c42550eSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 175ab47cfaaSmrgtest -z "$LD" && LD=ld 1765c42550eSmrgtest -z "$LN_S" && LN_S="ln -s" 1775c42550eSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 1785c42550eSmrgtest -z "$NM" && NM=nm 1795c42550eSmrgtest -z "$SED" && SED=sed 1805c42550eSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 1815c42550eSmrgtest -z "$RANLIB" && RANLIB=: 1825c42550eSmrgtest -z "$STRIP" && STRIP=: 183ab47cfaaSmrgtest -z "$ac_objext" && ac_objext=o 184ab47cfaaSmrg 1855c42550eSmrg# Determine commands to create old-style static archives. 1865c42550eSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1875c42550eSmrgold_postinstall_cmds='chmod 644 $oldlib' 1885c42550eSmrgold_postuninstall_cmds= 1895c42550eSmrg 1905c42550eSmrgif test -n "$RANLIB"; then 1915c42550eSmrg case $host_os in 1925c42550eSmrg openbsd*) 1935c42550eSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1945c42550eSmrg ;; 1955c42550eSmrg *) 1965c42550eSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1975c42550eSmrg ;; 1985c42550eSmrg esac 1995c42550eSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 2005c42550eSmrgfi 2015c42550eSmrg 202ab47cfaaSmrg_LT_CC_BASENAME([$compiler]) 203ab47cfaaSmrg 204ab47cfaaSmrg# Only perform the check for file, if the check method requires it 205ab47cfaaSmrgcase $deplibs_check_method in 206ab47cfaaSmrgfile_magic*) 207ab47cfaaSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2085c42550eSmrg AC_PATH_MAGIC 209ab47cfaaSmrg fi 210ab47cfaaSmrg ;; 211ab47cfaaSmrgesac 212ab47cfaaSmrg 2135c42550eSmrg_LT_REQUIRED_DARWIN_CHECKS 2141473d951Smrg 2155c42550eSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 2165c42550eSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 2175c42550eSmrgenable_win32_dll=yes, enable_win32_dll=no) 2181473d951Smrg 2195c42550eSmrgAC_ARG_ENABLE([libtool-lock], 2205c42550eSmrg [AC_HELP_STRING([--disable-libtool-lock], 2215c42550eSmrg [avoid locking (might break parallel builds)])]) 2225c42550eSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2231473d951Smrg 2245c42550eSmrgAC_ARG_WITH([pic], 2255c42550eSmrg [AC_HELP_STRING([--with-pic], 2265c42550eSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 2275c42550eSmrg [pic_mode="$withval"], 2285c42550eSmrg [pic_mode=default]) 2295c42550eSmrgtest -z "$pic_mode" && pic_mode=default 2301473d951Smrg 2315c42550eSmrg# Use C for the default configuration in the libtool script 2325c42550eSmrgtagname= 2335c42550eSmrgAC_LIBTOOL_LANG_C_CONFIG 2345c42550eSmrg_LT_AC_TAGCONFIG 2355c42550eSmrg])# AC_LIBTOOL_SETUP 2361473d951Smrg 2371473d951Smrg 2385c42550eSmrg# _LT_AC_SYS_COMPILER 239ab47cfaaSmrg# ------------------- 2405c42550eSmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 241ab47cfaaSmrg[AC_REQUIRE([AC_PROG_CC])dnl 242ab47cfaaSmrg 243ab47cfaaSmrg# If no C compiler was specified, use CC. 244ab47cfaaSmrgLTCC=${LTCC-"$CC"} 245ab47cfaaSmrg 246ab47cfaaSmrg# If no C compiler flags were specified, use CFLAGS. 247ab47cfaaSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 248ab47cfaaSmrg 249ab47cfaaSmrg# Allow CC to be a program name with arguments. 250ab47cfaaSmrgcompiler=$CC 2515c42550eSmrg])# _LT_AC_SYS_COMPILER 2525c42550eSmrg 2535c42550eSmrg 2545c42550eSmrg# _LT_CC_BASENAME(CC) 2555c42550eSmrg# ------------------- 2565c42550eSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2575c42550eSmrgAC_DEFUN([_LT_CC_BASENAME], 2585c42550eSmrg[for cc_temp in $1""; do 2595c42550eSmrg case $cc_temp in 2605c42550eSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2615c42550eSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2625c42550eSmrg \-*) ;; 2635c42550eSmrg *) break;; 2645c42550eSmrg esac 2655c42550eSmrgdone 2665c42550eSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 2675c42550eSmrg]) 268ab47cfaaSmrg 269ab47cfaaSmrg 270ab47cfaaSmrg# _LT_COMPILER_BOILERPLATE 271ab47cfaaSmrg# ------------------------ 272ab47cfaaSmrg# Check for compiler boilerplate output or warnings with 273ab47cfaaSmrg# the simple compiler test code. 2745c42550eSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 2755c42550eSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 2768697ee19Smrgac_outfile=conftest.$ac_objext 2778697ee19Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 278ab47cfaaSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 279ab47cfaaSmrg_lt_compiler_boilerplate=`cat conftest.err` 2805c42550eSmrg$rm conftest* 281ab47cfaaSmrg])# _LT_COMPILER_BOILERPLATE 282ab47cfaaSmrg 283ab47cfaaSmrg 284ab47cfaaSmrg# _LT_LINKER_BOILERPLATE 285ab47cfaaSmrg# ---------------------- 286ab47cfaaSmrg# Check for linker boilerplate output or warnings with 287ab47cfaaSmrg# the simple link test code. 2885c42550eSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 2895c42550eSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 2908697ee19Smrgac_outfile=conftest.$ac_objext 2918697ee19Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 292ab47cfaaSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 293ab47cfaaSmrg_lt_linker_boilerplate=`cat conftest.err` 2945c42550eSmrg$rm -r conftest* 295ab47cfaaSmrg])# _LT_LINKER_BOILERPLATE 296ab47cfaaSmrg 2971473d951Smrg# _LT_REQUIRED_DARWIN_CHECKS 2985c42550eSmrg# -------------------------- 2995c42550eSmrg# Check for some things on darwin 3005c42550eSmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ 3011473d951Smrg case $host_os in 3021473d951Smrg rhapsody* | darwin*) 3031473d951Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 3041473d951Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 3051473d951Smrg 3061473d951Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 3071473d951Smrg [lt_cv_apple_cc_single_mod=no 3081473d951Smrg if test -z "${LT_MULTI_MODULE}"; then 3095c42550eSmrg # By default we will add the -single_module flag. You can override 3105c42550eSmrg # by either setting the environment variable LT_MULTI_MODULE 3115c42550eSmrg # non-empty at configure time, or by adding -multi_module to the 3125c42550eSmrg # link flags. 3135c42550eSmrg echo "int foo(void){return 1;}" > conftest.c 3145c42550eSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3155c42550eSmrg -dynamiclib ${wl}-single_module conftest.c 3165c42550eSmrg if test -f libconftest.dylib; then 3175c42550eSmrg lt_cv_apple_cc_single_mod=yes 3185c42550eSmrg rm -rf libconftest.dylib* 3195c42550eSmrg fi 3205c42550eSmrg rm conftest.c 3211473d951Smrg fi]) 3221473d951Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 3231473d951Smrg [lt_cv_ld_exported_symbols_list], 3241473d951Smrg [lt_cv_ld_exported_symbols_list=no 3251473d951Smrg save_LDFLAGS=$LDFLAGS 3261473d951Smrg echo "_main" > conftest.sym 3271473d951Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 3281473d951Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3295c42550eSmrg [lt_cv_ld_exported_symbols_list=yes], 3305c42550eSmrg [lt_cv_ld_exported_symbols_list=no]) 3315c42550eSmrg LDFLAGS="$save_LDFLAGS" 3321473d951Smrg ]) 3331473d951Smrg case $host_os in 3345c42550eSmrg rhapsody* | darwin1.[[0123]]) 3351473d951Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 3361473d951Smrg darwin1.*) 3375c42550eSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3385c42550eSmrg darwin*) 3391473d951Smrg # if running on 10.5 or later, the deployment target defaults 3401473d951Smrg # to the OS version, if on x86, and 10.4, the deployment 3411473d951Smrg # target defaults to 10.4. Don't you love it? 3421473d951Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 3435c42550eSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 3445c42550eSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3455c42550eSmrg 10.[[012]]*) 3465c42550eSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3475c42550eSmrg 10.*) 3485c42550eSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3491473d951Smrg esac 3501473d951Smrg ;; 3511473d951Smrg esac 3521473d951Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 3531473d951Smrg _lt_dar_single_mod='$single_module' 3541473d951Smrg fi 3551473d951Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 3561473d951Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 3571473d951Smrg else 3585c42550eSmrg _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 3591473d951Smrg fi 3601473d951Smrg if test "$DSYMUTIL" != ":"; then 3615c42550eSmrg _lt_dsymutil="~$DSYMUTIL \$lib || :" 3621473d951Smrg else 3631473d951Smrg _lt_dsymutil= 3641473d951Smrg fi 3651473d951Smrg ;; 3661473d951Smrg esac 3671473d951Smrg]) 3681473d951Smrg 3695c42550eSmrg# _LT_AC_SYS_LIBPATH_AIX 3705c42550eSmrg# ---------------------- 3711473d951Smrg# Links a minimal program and checks the executable 372ab47cfaaSmrg# for the system default hardcoded library path. In most cases, 373ab47cfaaSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 374ab47cfaaSmrg# the location of the communication and MPI libs are included too. 375ab47cfaaSmrg# If we don't find anything, use the default library path according 376ab47cfaaSmrg# to the aix ld manual. 3775c42550eSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 3785c42550eSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 3798697ee19SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 3808697ee19Smrglt_aix_libpath_sed=' 3818697ee19Smrg /Import File Strings/,/^$/ { 3828697ee19Smrg /^0/ { 3838697ee19Smrg s/^0 *\(.*\)$/\1/ 3848697ee19Smrg p 3858697ee19Smrg } 3868697ee19Smrg }' 3878697ee19Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 388ab47cfaaSmrg# Check for a 64-bit object if we didn't find anything. 3898697ee19Smrgif test -z "$aix_libpath"; then 3908697ee19Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3918697ee19Smrgfi],[]) 392ab47cfaaSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 3935c42550eSmrg])# _LT_AC_SYS_LIBPATH_AIX 394ab47cfaaSmrg 395ab47cfaaSmrg 3965c42550eSmrg# _LT_AC_SHELL_INIT(ARG) 3975c42550eSmrg# ---------------------- 3985c42550eSmrgAC_DEFUN([_LT_AC_SHELL_INIT], 399ab47cfaaSmrg[ifdef([AC_DIVERSION_NOTICE], 400ab47cfaaSmrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 401ab47cfaaSmrg [AC_DIVERT_PUSH(NOTICE)]) 402ab47cfaaSmrg$1 403ab47cfaaSmrgAC_DIVERT_POP 4045c42550eSmrg])# _LT_AC_SHELL_INIT 405ab47cfaaSmrg 406ab47cfaaSmrg 4075c42550eSmrg# _LT_AC_PROG_ECHO_BACKSLASH 4085c42550eSmrg# -------------------------- 409ab47cfaaSmrg# Add some code to the start of the generated configure script which 410ab47cfaaSmrg# will find an echo command which doesn't interpret backslashes. 4115c42550eSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 4125c42550eSmrg[_LT_AC_SHELL_INIT([ 413ab47cfaaSmrg# Check that we are running under the correct shell. 414ab47cfaaSmrgSHELL=${CONFIG_SHELL-/bin/sh} 415ab47cfaaSmrg 4165c42550eSmrgcase X$ECHO in 417ab47cfaaSmrgX*--fallback-echo) 418ab47cfaaSmrg # Remove one level of quotation (which was required for Make). 4195c42550eSmrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 420ab47cfaaSmrg ;; 421ab47cfaaSmrgesac 422ab47cfaaSmrg 4235c42550eSmrgecho=${ECHO-echo} 424ab47cfaaSmrgif test "X[$]1" = X--no-reexec; then 425ab47cfaaSmrg # Discard the --no-reexec flag, and continue. 426ab47cfaaSmrg shift 427ab47cfaaSmrgelif test "X[$]1" = X--fallback-echo; then 428ab47cfaaSmrg # Avoid inline document here, it may be left over 429ab47cfaaSmrg : 4305c42550eSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 4315c42550eSmrg # Yippee, $echo works! 432ab47cfaaSmrg : 433ab47cfaaSmrgelse 434ab47cfaaSmrg # Restart under the correct shell. 435ab47cfaaSmrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 436ab47cfaaSmrgfi 437ab47cfaaSmrg 438ab47cfaaSmrgif test "X[$]1" = X--fallback-echo; then 439ab47cfaaSmrg # used as fallback echo 440ab47cfaaSmrg shift 4415c42550eSmrg cat <<EOF 442ab47cfaaSmrg[$]* 4435c42550eSmrgEOF 444ab47cfaaSmrg exit 0 445ab47cfaaSmrgfi 446ab47cfaaSmrg 447ab47cfaaSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 448ab47cfaaSmrg# if CDPATH is set. 449ab47cfaaSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 450ab47cfaaSmrg 4515c42550eSmrgif test -z "$ECHO"; then 4525c42550eSmrgif test "X${echo_test_string+set}" != Xset; then 4535c42550eSmrg# find a string as large as possible, as long as the shell can cope with it 4545c42550eSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 4555c42550eSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 4565c42550eSmrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 4575c42550eSmrg echo_test_string=`eval $cmd` && 4585c42550eSmrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 4595c42550eSmrg then 4605c42550eSmrg break 4615c42550eSmrg fi 4625c42550eSmrg done 4635c42550eSmrgfi 464ab47cfaaSmrg 4655c42550eSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 4665c42550eSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 4675c42550eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 4685c42550eSmrg : 4695c42550eSmrgelse 4705c42550eSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 4715c42550eSmrg # backslashes. This makes it impossible to quote backslashes using 4725c42550eSmrg # echo "$something" | sed 's/\\/\\\\/g' 4735c42550eSmrg # 4745c42550eSmrg # So, first we look for a working echo in the user's PATH. 475ab47cfaaSmrg 4765c42550eSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4775c42550eSmrg for dir in $PATH /usr/ucb; do 478ab47cfaaSmrg IFS="$lt_save_ifs" 4795c42550eSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 4805c42550eSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 4815c42550eSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 4825c42550eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 4835c42550eSmrg echo="$dir/echo" 4845c42550eSmrg break 4855c42550eSmrg fi 4865c42550eSmrg done 4875c42550eSmrg IFS="$lt_save_ifs" 488ab47cfaaSmrg 4895c42550eSmrg if test "X$echo" = Xecho; then 4905c42550eSmrg # We didn't find a better echo, so look for alternatives. 4915c42550eSmrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 4925c42550eSmrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 4935c42550eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 4945c42550eSmrg # This shell has a builtin print -r that does the trick. 4955c42550eSmrg echo='print -r' 4965c42550eSmrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 4975c42550eSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 4985c42550eSmrg # If we have ksh, try running configure again with it. 4995c42550eSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 5005c42550eSmrg export ORIGINAL_CONFIG_SHELL 5015c42550eSmrg CONFIG_SHELL=/bin/ksh 5025c42550eSmrg export CONFIG_SHELL 5035c42550eSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 5045c42550eSmrg else 5055c42550eSmrg # Try using printf. 5065c42550eSmrg echo='printf %s\n' 5075c42550eSmrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 5085c42550eSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 5095c42550eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 5105c42550eSmrg # Cool, printf works 5115c42550eSmrg : 5125c42550eSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 5135c42550eSmrg test "X$echo_testing_string" = 'X\t' && 5145c42550eSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 5151473d951Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 5165c42550eSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 5175c42550eSmrg export CONFIG_SHELL 5185c42550eSmrg SHELL="$CONFIG_SHELL" 5195c42550eSmrg export SHELL 5205c42550eSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 5215c42550eSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 5225c42550eSmrg test "X$echo_testing_string" = 'X\t' && 5235c42550eSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 5245c42550eSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 5255c42550eSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 5265c42550eSmrg else 5275c42550eSmrg # maybe with a smaller string... 5285c42550eSmrg prev=: 529ab47cfaaSmrg 5305c42550eSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 5315c42550eSmrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 5325c42550eSmrg then 5335c42550eSmrg break 5341473d951Smrg fi 5355c42550eSmrg prev="$cmd" 5365c42550eSmrg done 5375c42550eSmrg 5385c42550eSmrg if test "$prev" != 'sed 50q "[$]0"'; then 5395c42550eSmrg echo_test_string=`eval $prev` 5405c42550eSmrg export echo_test_string 5415c42550eSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 5425c42550eSmrg else 5435c42550eSmrg # Oops. We lost completely, so just stick with echo. 5445c42550eSmrg echo=echo 5455c42550eSmrg fi 546ab47cfaaSmrg fi 547ab47cfaaSmrg fi 548ab47cfaaSmrg fi 549ab47cfaaSmrgfi 5505c42550eSmrgfi 551ab47cfaaSmrg 552ab47cfaaSmrg# Copy echo and quote the copy suitably for passing to libtool from 553ab47cfaaSmrg# the Makefile, instead of quoting the original, which is used later. 5545c42550eSmrgECHO=$echo 5555c42550eSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 5565c42550eSmrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 557ab47cfaaSmrgfi 558ab47cfaaSmrg 5595c42550eSmrgAC_SUBST(ECHO) 5605c42550eSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH 561ab47cfaaSmrg 562ab47cfaaSmrg 5635c42550eSmrg# _LT_AC_LOCK 5645c42550eSmrg# ----------- 5655c42550eSmrgAC_DEFUN([_LT_AC_LOCK], 566ab47cfaaSmrg[AC_ARG_ENABLE([libtool-lock], 5675c42550eSmrg [AC_HELP_STRING([--disable-libtool-lock], 5685c42550eSmrg [avoid locking (might break parallel builds)])]) 569ab47cfaaSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 570ab47cfaaSmrg 571ab47cfaaSmrg# Some flags need to be propagated to the compiler or linker for good 572ab47cfaaSmrg# libtool support. 573ab47cfaaSmrgcase $host in 574ab47cfaaSmrgia64-*-hpux*) 575ab47cfaaSmrg # Find out which ABI we are using. 576ab47cfaaSmrg echo 'int i;' > conftest.$ac_ext 577ab47cfaaSmrg if AC_TRY_EVAL(ac_compile); then 578ab47cfaaSmrg case `/usr/bin/file conftest.$ac_objext` in 5795c42550eSmrg *ELF-32*) 5805c42550eSmrg HPUX_IA64_MODE="32" 5815c42550eSmrg ;; 5825c42550eSmrg *ELF-64*) 5835c42550eSmrg HPUX_IA64_MODE="64" 5845c42550eSmrg ;; 585ab47cfaaSmrg esac 586ab47cfaaSmrg fi 587ab47cfaaSmrg rm -rf conftest* 588ab47cfaaSmrg ;; 589ab47cfaaSmrg*-*-irix6*) 590ab47cfaaSmrg # Find out which ABI we are using. 591ab47cfaaSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 592ab47cfaaSmrg if AC_TRY_EVAL(ac_compile); then 5935c42550eSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 5945c42550eSmrg case `/usr/bin/file conftest.$ac_objext` in 5955c42550eSmrg *32-bit*) 5965c42550eSmrg LD="${LD-ld} -melf32bsmip" 5975c42550eSmrg ;; 5985c42550eSmrg *N32*) 5995c42550eSmrg LD="${LD-ld} -melf32bmipn32" 6005c42550eSmrg ;; 6015c42550eSmrg *64-bit*) 6025c42550eSmrg LD="${LD-ld} -melf64bmip" 6035c42550eSmrg ;; 6045c42550eSmrg esac 6055c42550eSmrg else 6065c42550eSmrg case `/usr/bin/file conftest.$ac_objext` in 6075c42550eSmrg *32-bit*) 6085c42550eSmrg LD="${LD-ld} -32" 6095c42550eSmrg ;; 6105c42550eSmrg *N32*) 6115c42550eSmrg LD="${LD-ld} -n32" 6125c42550eSmrg ;; 6135c42550eSmrg *64-bit*) 6145c42550eSmrg LD="${LD-ld} -64" 6155c42550eSmrg ;; 6165c42550eSmrg esac 6175c42550eSmrg fi 618ab47cfaaSmrg fi 619ab47cfaaSmrg rm -rf conftest* 620ab47cfaaSmrg ;; 621ab47cfaaSmrg 6228697ee19Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 6235c42550eSmrgs390*-*linux*|sparc*-*linux*) 624ab47cfaaSmrg # Find out which ABI we are using. 625ab47cfaaSmrg echo 'int i;' > conftest.$ac_ext 626ab47cfaaSmrg if AC_TRY_EVAL(ac_compile); then 627ab47cfaaSmrg case `/usr/bin/file conftest.o` in 6285c42550eSmrg *32-bit*) 6295c42550eSmrg case $host in 6305c42550eSmrg x86_64-*kfreebsd*-gnu) 6315c42550eSmrg LD="${LD-ld} -m elf_i386_fbsd" 6325c42550eSmrg ;; 6335c42550eSmrg x86_64-*linux*) 6345c42550eSmrg LD="${LD-ld} -m elf_i386" 6355c42550eSmrg ;; 6365c42550eSmrg ppc64-*linux*|powerpc64-*linux*) 6375c42550eSmrg LD="${LD-ld} -m elf32ppclinux" 6385c42550eSmrg ;; 6395c42550eSmrg s390x-*linux*) 6405c42550eSmrg LD="${LD-ld} -m elf_s390" 6415c42550eSmrg ;; 6425c42550eSmrg sparc64-*linux*) 6435c42550eSmrg LD="${LD-ld} -m elf32_sparc" 6445c42550eSmrg ;; 6455c42550eSmrg esac 6465c42550eSmrg ;; 6475c42550eSmrg *64-bit*) 6485c42550eSmrg libsuff=64 6495c42550eSmrg case $host in 6505c42550eSmrg x86_64-*kfreebsd*-gnu) 6515c42550eSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 6525c42550eSmrg ;; 6535c42550eSmrg x86_64-*linux*) 6545c42550eSmrg LD="${LD-ld} -m elf_x86_64" 6555c42550eSmrg ;; 6565c42550eSmrg ppc*-*linux*|powerpc*-*linux*) 6575c42550eSmrg LD="${LD-ld} -m elf64ppc" 6585c42550eSmrg ;; 6595c42550eSmrg s390*-*linux*) 6605c42550eSmrg LD="${LD-ld} -m elf64_s390" 6615c42550eSmrg ;; 6625c42550eSmrg sparc*-*linux*) 6635c42550eSmrg LD="${LD-ld} -m elf64_sparc" 6645c42550eSmrg ;; 6655c42550eSmrg esac 6665c42550eSmrg ;; 667ab47cfaaSmrg esac 668ab47cfaaSmrg fi 669ab47cfaaSmrg rm -rf conftest* 670ab47cfaaSmrg ;; 671ab47cfaaSmrg 672ab47cfaaSmrg*-*-sco3.2v5*) 673ab47cfaaSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 674ab47cfaaSmrg SAVE_CFLAGS="$CFLAGS" 675ab47cfaaSmrg CFLAGS="$CFLAGS -belf" 676ab47cfaaSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 677ab47cfaaSmrg [AC_LANG_PUSH(C) 6785c42550eSmrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 679ab47cfaaSmrg AC_LANG_POP]) 680ab47cfaaSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 681ab47cfaaSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 682ab47cfaaSmrg CFLAGS="$SAVE_CFLAGS" 683ab47cfaaSmrg fi 684ab47cfaaSmrg ;; 685ab47cfaaSmrgsparc*-*solaris*) 686ab47cfaaSmrg # Find out which ABI we are using. 687ab47cfaaSmrg echo 'int i;' > conftest.$ac_ext 688ab47cfaaSmrg if AC_TRY_EVAL(ac_compile); then 689ab47cfaaSmrg case `/usr/bin/file conftest.o` in 690ab47cfaaSmrg *64-bit*) 691ab47cfaaSmrg case $lt_cv_prog_gnu_ld in 692ab47cfaaSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 6931473d951Smrg *) 6945c42550eSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 6951473d951Smrg LD="${LD-ld} -64" 6961473d951Smrg fi 6971473d951Smrg ;; 698ab47cfaaSmrg esac 699ab47cfaaSmrg ;; 700ab47cfaaSmrg esac 701ab47cfaaSmrg fi 702ab47cfaaSmrg rm -rf conftest* 703ab47cfaaSmrg ;; 7045c42550eSmrg 7055c42550eSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 7065c42550eSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 7075c42550eSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7085c42550eSmrg AC_CHECK_TOOL(AS, as, false) 7095c42550eSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7105c42550eSmrg ;; 7115c42550eSmrg ]) 712ab47cfaaSmrgesac 713ab47cfaaSmrg 714ab47cfaaSmrgneed_locks="$enable_libtool_lock" 7151473d951Smrg 7165c42550eSmrg])# _LT_AC_LOCK 717ab47cfaaSmrg 718ab47cfaaSmrg 7195c42550eSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 720ab47cfaaSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 721ab47cfaaSmrg# ---------------------------------------------------------------- 722ab47cfaaSmrg# Check whether the given compiler option works 7235c42550eSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 7245c42550eSmrg[AC_REQUIRE([LT_AC_PROG_SED]) 725ab47cfaaSmrgAC_CACHE_CHECK([$1], [$2], 726ab47cfaaSmrg [$2=no 7275c42550eSmrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 7288697ee19Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 729ab47cfaaSmrg lt_compiler_flag="$3" 730ab47cfaaSmrg # Insert the option either (1) after the last *FLAGS variable, or 731ab47cfaaSmrg # (2) before a word containing "conftest.", or (3) at the end. 732ab47cfaaSmrg # Note that $ac_compile itself does not contain backslashes and begins 733ab47cfaaSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 734ab47cfaaSmrg # The option is referenced via a variable to avoid confusing sed. 735ab47cfaaSmrg lt_compile=`echo "$ac_compile" | $SED \ 736ab47cfaaSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 737ab47cfaaSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 738ab47cfaaSmrg -e 's:$: $lt_compiler_flag:'` 739ab47cfaaSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 740ab47cfaaSmrg (eval "$lt_compile" 2>conftest.err) 741ab47cfaaSmrg ac_status=$? 742ab47cfaaSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 743ab47cfaaSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 744ab47cfaaSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 745ab47cfaaSmrg # The compiler can only warn and ignore the option if not recognized 746ab47cfaaSmrg # So say no if there are warnings other than the usual output. 7475c42550eSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 748ab47cfaaSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 749ab47cfaaSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 750ab47cfaaSmrg $2=yes 751ab47cfaaSmrg fi 752ab47cfaaSmrg fi 7535c42550eSmrg $rm conftest* 754ab47cfaaSmrg]) 755ab47cfaaSmrg 756ab47cfaaSmrgif test x"[$]$2" = xyes; then 7575c42550eSmrg ifelse([$5], , :, [$5]) 758ab47cfaaSmrgelse 7595c42550eSmrg ifelse([$6], , :, [$6]) 760ab47cfaaSmrgfi 7615c42550eSmrg])# AC_LIBTOOL_COMPILER_OPTION 762ab47cfaaSmrg 7631473d951Smrg 7645c42550eSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 7655c42550eSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 7665c42550eSmrg# ------------------------------------------------------------ 7675c42550eSmrg# Check whether the given compiler option works 7685c42550eSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 7695c42550eSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 7708697ee19SmrgAC_CACHE_CHECK([$1], [$2], 771ab47cfaaSmrg [$2=no 772ab47cfaaSmrg save_LDFLAGS="$LDFLAGS" 773ab47cfaaSmrg LDFLAGS="$LDFLAGS $3" 7748697ee19Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 775ab47cfaaSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 776ab47cfaaSmrg # The linker can only warn and ignore the option if not recognized 777ab47cfaaSmrg # So say no if there are warnings 778ab47cfaaSmrg if test -s conftest.err; then 779ab47cfaaSmrg # Append any errors to the config.log. 780ab47cfaaSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 7815c42550eSmrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 782ab47cfaaSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 783ab47cfaaSmrg if diff conftest.exp conftest.er2 >/dev/null; then 784ab47cfaaSmrg $2=yes 785ab47cfaaSmrg fi 786ab47cfaaSmrg else 787ab47cfaaSmrg $2=yes 788ab47cfaaSmrg fi 789ab47cfaaSmrg fi 7905c42550eSmrg $rm -r conftest* 791ab47cfaaSmrg LDFLAGS="$save_LDFLAGS" 792ab47cfaaSmrg]) 793ab47cfaaSmrg 794ab47cfaaSmrgif test x"[$]$2" = xyes; then 7955c42550eSmrg ifelse([$4], , :, [$4]) 796ab47cfaaSmrgelse 7975c42550eSmrg ifelse([$5], , :, [$5]) 798ab47cfaaSmrgfi 7995c42550eSmrg])# AC_LIBTOOL_LINKER_OPTION 800ab47cfaaSmrg 801ab47cfaaSmrg 8025c42550eSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 8035c42550eSmrg# -------------------------- 8045c42550eSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 8055c42550eSmrg[# find the maximum length of command line arguments 806ab47cfaaSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 807ab47cfaaSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 808ab47cfaaSmrg i=0 809ab47cfaaSmrg teststring="ABCD" 810ab47cfaaSmrg 811ab47cfaaSmrg case $build_os in 812ab47cfaaSmrg msdosdjgpp*) 813ab47cfaaSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 814ab47cfaaSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 815ab47cfaaSmrg # during glob expansion). Even if it were fixed, the result of this 816ab47cfaaSmrg # check would be larger than it should be. 817ab47cfaaSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 818ab47cfaaSmrg ;; 819ab47cfaaSmrg 820ab47cfaaSmrg gnu*) 821ab47cfaaSmrg # Under GNU Hurd, this test is not required because there is 822ab47cfaaSmrg # no limit to the length of command line arguments. 823ab47cfaaSmrg # Libtool will interpret -1 as no limit whatsoever 824ab47cfaaSmrg lt_cv_sys_max_cmd_len=-1; 825ab47cfaaSmrg ;; 826ab47cfaaSmrg 8275c42550eSmrg cygwin* | mingw*) 828ab47cfaaSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 829ab47cfaaSmrg # about 5 minutes as the teststring grows exponentially. 830ab47cfaaSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 831ab47cfaaSmrg # you end up with a "frozen" computer, even though with patience 832ab47cfaaSmrg # the test eventually succeeds (with a max line length of 256k). 833ab47cfaaSmrg # Instead, let's just punt: use the minimum linelength reported by 834ab47cfaaSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 835ab47cfaaSmrg lt_cv_sys_max_cmd_len=8192; 836ab47cfaaSmrg ;; 837ab47cfaaSmrg 838ab47cfaaSmrg amigaos*) 839ab47cfaaSmrg # On AmigaOS with pdksh, this test takes hours, literally. 840ab47cfaaSmrg # So we just punt and use a minimum line length of 8192. 841ab47cfaaSmrg lt_cv_sys_max_cmd_len=8192; 842ab47cfaaSmrg ;; 843ab47cfaaSmrg 844ab47cfaaSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 845ab47cfaaSmrg # This has been around since 386BSD, at least. Likely further. 846ab47cfaaSmrg if test -x /sbin/sysctl; then 847ab47cfaaSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 848ab47cfaaSmrg elif test -x /usr/sbin/sysctl; then 849ab47cfaaSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 850ab47cfaaSmrg else 851ab47cfaaSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 852ab47cfaaSmrg fi 853ab47cfaaSmrg # And add a safety zone 854ab47cfaaSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 855ab47cfaaSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 856ab47cfaaSmrg ;; 857ab47cfaaSmrg 858ab47cfaaSmrg interix*) 859ab47cfaaSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 860ab47cfaaSmrg lt_cv_sys_max_cmd_len=196608 861ab47cfaaSmrg ;; 862ab47cfaaSmrg 863ab47cfaaSmrg osf*) 864ab47cfaaSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 865ab47cfaaSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 866ab47cfaaSmrg # nice to cause kernel panics so lets avoid the loop below. 867ab47cfaaSmrg # First set a reasonable default. 868ab47cfaaSmrg lt_cv_sys_max_cmd_len=16384 869ab47cfaaSmrg # 870ab47cfaaSmrg if test -x /sbin/sysconfig; then 871ab47cfaaSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 872ab47cfaaSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 873ab47cfaaSmrg esac 874ab47cfaaSmrg fi 875ab47cfaaSmrg ;; 876ab47cfaaSmrg sco3.2v5*) 877ab47cfaaSmrg lt_cv_sys_max_cmd_len=102400 878ab47cfaaSmrg ;; 879ab47cfaaSmrg sysv5* | sco5v6* | sysv4.2uw2*) 880ab47cfaaSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 881ab47cfaaSmrg if test -n "$kargmax"; then 8825c42550eSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 883ab47cfaaSmrg else 884ab47cfaaSmrg lt_cv_sys_max_cmd_len=32768 885ab47cfaaSmrg fi 886ab47cfaaSmrg ;; 887ab47cfaaSmrg *) 8888697ee19Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 8898697ee19Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 8908697ee19Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 8918697ee19Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 8928697ee19Smrg else 8938697ee19Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 8945c42550eSmrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 8955c42550eSmrg = "XX$teststring") >/dev/null 2>&1 && 8965c42550eSmrg new_result=`expr "X$teststring" : ".*" 2>&1` && 8975c42550eSmrg lt_cv_sys_max_cmd_len=$new_result && 8988697ee19Smrg test $i != 17 # 1/2 MB should be enough 8998697ee19Smrg do 9008697ee19Smrg i=`expr $i + 1` 9018697ee19Smrg teststring=$teststring$teststring 9028697ee19Smrg done 9038697ee19Smrg teststring= 9045c42550eSmrg # Add a significant safety factor because C++ compilers can tack on massive 9055c42550eSmrg # amounts of additional arguments before passing them to the linker. 9065c42550eSmrg # It appears as though 1/2 is a usable value. 9078697ee19Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 9088697ee19Smrg fi 909ab47cfaaSmrg ;; 910ab47cfaaSmrg esac 911ab47cfaaSmrg]) 912ab47cfaaSmrgif test -n $lt_cv_sys_max_cmd_len ; then 913ab47cfaaSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 914ab47cfaaSmrgelse 915ab47cfaaSmrg AC_MSG_RESULT(none) 916ab47cfaaSmrgfi 9175c42550eSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 918ab47cfaaSmrg 919ab47cfaaSmrg 9205c42550eSmrg# _LT_AC_CHECK_DLFCN 9215c42550eSmrg# ------------------ 9225c42550eSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 9235c42550eSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl 9245c42550eSmrg])# _LT_AC_CHECK_DLFCN 925ab47cfaaSmrg 926ab47cfaaSmrg 9275c42550eSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 9285c42550eSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 9295c42550eSmrg# --------------------------------------------------------------------- 9305c42550eSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 9315c42550eSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 932ab47cfaaSmrgif test "$cross_compiling" = yes; then : 933ab47cfaaSmrg [$4] 934ab47cfaaSmrgelse 935ab47cfaaSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 936ab47cfaaSmrg lt_status=$lt_dlunknown 9375c42550eSmrg cat > conftest.$ac_ext <<EOF 938ab47cfaaSmrg[#line __oline__ "configure" 939ab47cfaaSmrg#include "confdefs.h" 940ab47cfaaSmrg 941ab47cfaaSmrg#if HAVE_DLFCN_H 942ab47cfaaSmrg#include <dlfcn.h> 943ab47cfaaSmrg#endif 944ab47cfaaSmrg 945ab47cfaaSmrg#include <stdio.h> 946ab47cfaaSmrg 947ab47cfaaSmrg#ifdef RTLD_GLOBAL 948ab47cfaaSmrg# define LT_DLGLOBAL RTLD_GLOBAL 949ab47cfaaSmrg#else 950ab47cfaaSmrg# ifdef DL_GLOBAL 951ab47cfaaSmrg# define LT_DLGLOBAL DL_GLOBAL 952ab47cfaaSmrg# else 953ab47cfaaSmrg# define LT_DLGLOBAL 0 954ab47cfaaSmrg# endif 955ab47cfaaSmrg#endif 956ab47cfaaSmrg 957ab47cfaaSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 958ab47cfaaSmrg find out it does not work in some platform. */ 959ab47cfaaSmrg#ifndef LT_DLLAZY_OR_NOW 960ab47cfaaSmrg# ifdef RTLD_LAZY 961ab47cfaaSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 962ab47cfaaSmrg# else 963ab47cfaaSmrg# ifdef DL_LAZY 964ab47cfaaSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 965ab47cfaaSmrg# else 966ab47cfaaSmrg# ifdef RTLD_NOW 967ab47cfaaSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 968ab47cfaaSmrg# else 969ab47cfaaSmrg# ifdef DL_NOW 970ab47cfaaSmrg# define LT_DLLAZY_OR_NOW DL_NOW 971ab47cfaaSmrg# else 972ab47cfaaSmrg# define LT_DLLAZY_OR_NOW 0 973ab47cfaaSmrg# endif 974ab47cfaaSmrg# endif 975ab47cfaaSmrg# endif 976ab47cfaaSmrg# endif 977ab47cfaaSmrg#endif 978ab47cfaaSmrg 9795c42550eSmrg#ifdef __cplusplus 9805c42550eSmrgextern "C" void exit (int); 9815c42550eSmrg#endif 9825c42550eSmrg 983ab47cfaaSmrgvoid fnord() { int i=42;} 984ab47cfaaSmrgint main () 985ab47cfaaSmrg{ 986ab47cfaaSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 987ab47cfaaSmrg int status = $lt_dlunknown; 988ab47cfaaSmrg 989ab47cfaaSmrg if (self) 990ab47cfaaSmrg { 991ab47cfaaSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 992ab47cfaaSmrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 993ab47cfaaSmrg /* dlclose (self); */ 994ab47cfaaSmrg } 995ab47cfaaSmrg else 996ab47cfaaSmrg puts (dlerror ()); 997ab47cfaaSmrg 9985c42550eSmrg exit (status); 999ab47cfaaSmrg}] 10005c42550eSmrgEOF 1001ab47cfaaSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1002ab47cfaaSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1003ab47cfaaSmrg lt_status=$? 1004ab47cfaaSmrg case x$lt_status in 1005ab47cfaaSmrg x$lt_dlno_uscore) $1 ;; 1006ab47cfaaSmrg x$lt_dlneed_uscore) $2 ;; 1007ab47cfaaSmrg x$lt_dlunknown|x*) $3 ;; 1008ab47cfaaSmrg esac 1009ab47cfaaSmrg else : 1010ab47cfaaSmrg # compilation failed 1011ab47cfaaSmrg $3 1012ab47cfaaSmrg fi 1013ab47cfaaSmrgfi 1014ab47cfaaSmrgrm -fr conftest* 10155c42550eSmrg])# _LT_AC_TRY_DLOPEN_SELF 1016ab47cfaaSmrg 1017ab47cfaaSmrg 10185c42550eSmrg# AC_LIBTOOL_DLOPEN_SELF 10195c42550eSmrg# ---------------------- 10205c42550eSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 10215c42550eSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 1022ab47cfaaSmrgif test "x$enable_dlopen" != xyes; then 1023ab47cfaaSmrg enable_dlopen=unknown 1024ab47cfaaSmrg enable_dlopen_self=unknown 1025ab47cfaaSmrg enable_dlopen_self_static=unknown 1026ab47cfaaSmrgelse 1027ab47cfaaSmrg lt_cv_dlopen=no 1028ab47cfaaSmrg lt_cv_dlopen_libs= 1029ab47cfaaSmrg 1030ab47cfaaSmrg case $host_os in 1031ab47cfaaSmrg beos*) 1032ab47cfaaSmrg lt_cv_dlopen="load_add_on" 1033ab47cfaaSmrg lt_cv_dlopen_libs= 1034ab47cfaaSmrg lt_cv_dlopen_self=yes 1035ab47cfaaSmrg ;; 1036ab47cfaaSmrg 10375c42550eSmrg mingw* | pw32*) 1038ab47cfaaSmrg lt_cv_dlopen="LoadLibrary" 1039ab47cfaaSmrg lt_cv_dlopen_libs= 10405c42550eSmrg ;; 1041ab47cfaaSmrg 1042ab47cfaaSmrg cygwin*) 1043ab47cfaaSmrg lt_cv_dlopen="dlopen" 1044ab47cfaaSmrg lt_cv_dlopen_libs= 10455c42550eSmrg ;; 1046ab47cfaaSmrg 1047ab47cfaaSmrg darwin*) 1048ab47cfaaSmrg # if libdl is installed we need to link against it 1049ab47cfaaSmrg AC_CHECK_LIB([dl], [dlopen], 1050ab47cfaaSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1051ab47cfaaSmrg lt_cv_dlopen="dyld" 1052ab47cfaaSmrg lt_cv_dlopen_libs= 1053ab47cfaaSmrg lt_cv_dlopen_self=yes 1054ab47cfaaSmrg ]) 10555c42550eSmrg ;; 1056ab47cfaaSmrg 1057ab47cfaaSmrg *) 1058ab47cfaaSmrg AC_CHECK_FUNC([shl_load], 1059ab47cfaaSmrg [lt_cv_dlopen="shl_load"], 1060ab47cfaaSmrg [AC_CHECK_LIB([dld], [shl_load], 10611473d951Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1062ab47cfaaSmrg [AC_CHECK_FUNC([dlopen], 1063ab47cfaaSmrg [lt_cv_dlopen="dlopen"], 1064ab47cfaaSmrg [AC_CHECK_LIB([dl], [dlopen], 1065ab47cfaaSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1066ab47cfaaSmrg [AC_CHECK_LIB([svld], [dlopen], 1067ab47cfaaSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1068ab47cfaaSmrg [AC_CHECK_LIB([dld], [dld_link], 10691473d951Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1070ab47cfaaSmrg ]) 1071ab47cfaaSmrg ]) 1072ab47cfaaSmrg ]) 1073ab47cfaaSmrg ]) 1074ab47cfaaSmrg ]) 1075ab47cfaaSmrg ;; 1076ab47cfaaSmrg esac 1077ab47cfaaSmrg 1078ab47cfaaSmrg if test "x$lt_cv_dlopen" != xno; then 1079ab47cfaaSmrg enable_dlopen=yes 1080ab47cfaaSmrg else 1081ab47cfaaSmrg enable_dlopen=no 1082ab47cfaaSmrg fi 1083ab47cfaaSmrg 1084ab47cfaaSmrg case $lt_cv_dlopen in 1085ab47cfaaSmrg dlopen) 1086ab47cfaaSmrg save_CPPFLAGS="$CPPFLAGS" 1087ab47cfaaSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1088ab47cfaaSmrg 1089ab47cfaaSmrg save_LDFLAGS="$LDFLAGS" 1090ab47cfaaSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1091ab47cfaaSmrg 1092ab47cfaaSmrg save_LIBS="$LIBS" 1093ab47cfaaSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 1094ab47cfaaSmrg 1095ab47cfaaSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 1096ab47cfaaSmrg lt_cv_dlopen_self, [dnl 10975c42550eSmrg _LT_AC_TRY_DLOPEN_SELF( 1098ab47cfaaSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1099ab47cfaaSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1100ab47cfaaSmrg ]) 1101ab47cfaaSmrg 1102ab47cfaaSmrg if test "x$lt_cv_dlopen_self" = xyes; then 1103ab47cfaaSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1104ab47cfaaSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 11055c42550eSmrg lt_cv_dlopen_self_static, [dnl 11065c42550eSmrg _LT_AC_TRY_DLOPEN_SELF( 1107ab47cfaaSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1108ab47cfaaSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1109ab47cfaaSmrg ]) 1110ab47cfaaSmrg fi 1111ab47cfaaSmrg 1112ab47cfaaSmrg CPPFLAGS="$save_CPPFLAGS" 1113ab47cfaaSmrg LDFLAGS="$save_LDFLAGS" 1114ab47cfaaSmrg LIBS="$save_LIBS" 1115ab47cfaaSmrg ;; 1116ab47cfaaSmrg esac 1117ab47cfaaSmrg 1118ab47cfaaSmrg case $lt_cv_dlopen_self in 1119ab47cfaaSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1120ab47cfaaSmrg *) enable_dlopen_self=unknown ;; 1121ab47cfaaSmrg esac 1122ab47cfaaSmrg 1123ab47cfaaSmrg case $lt_cv_dlopen_self_static in 1124ab47cfaaSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1125ab47cfaaSmrg *) enable_dlopen_self_static=unknown ;; 1126ab47cfaaSmrg esac 1127ab47cfaaSmrgfi 11285c42550eSmrg])# AC_LIBTOOL_DLOPEN_SELF 1129ab47cfaaSmrg 11301473d951Smrg 11315c42550eSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 11325c42550eSmrg# --------------------------------- 11335c42550eSmrg# Check to see if options -c and -o are simultaneously supported by compiler 11345c42550eSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 11355c42550eSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 11365c42550eSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1137ab47cfaaSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 11385c42550eSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 11395c42550eSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 11405c42550eSmrg $rm -r conftest 2>/dev/null 1141ab47cfaaSmrg mkdir conftest 1142ab47cfaaSmrg cd conftest 1143ab47cfaaSmrg mkdir out 11448697ee19Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1145ab47cfaaSmrg 1146ab47cfaaSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1147ab47cfaaSmrg # Insert the option either (1) after the last *FLAGS variable, or 1148ab47cfaaSmrg # (2) before a word containing "conftest.", or (3) at the end. 1149ab47cfaaSmrg # Note that $ac_compile itself does not contain backslashes and begins 1150ab47cfaaSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1151ab47cfaaSmrg lt_compile=`echo "$ac_compile" | $SED \ 1152ab47cfaaSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1153ab47cfaaSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1154ab47cfaaSmrg -e 's:$: $lt_compiler_flag:'` 1155ab47cfaaSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1156ab47cfaaSmrg (eval "$lt_compile" 2>out/conftest.err) 1157ab47cfaaSmrg ac_status=$? 1158ab47cfaaSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 1159ab47cfaaSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1160ab47cfaaSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 1161ab47cfaaSmrg then 1162ab47cfaaSmrg # The compiler can only warn and ignore the option if not recognized 1163ab47cfaaSmrg # So say no if there are warnings 11645c42550eSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1165ab47cfaaSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1166ab47cfaaSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 11675c42550eSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1168ab47cfaaSmrg fi 1169ab47cfaaSmrg fi 1170ab47cfaaSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 11715c42550eSmrg $rm conftest* 1172ab47cfaaSmrg # SGI C++ compiler will create directory out/ii_files/ for 1173ab47cfaaSmrg # template instantiation 11745c42550eSmrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 11755c42550eSmrg $rm out/* && rmdir out 1176ab47cfaaSmrg cd .. 11775c42550eSmrg rmdir conftest 11785c42550eSmrg $rm conftest* 1179ab47cfaaSmrg]) 11805c42550eSmrg])# AC_LIBTOOL_PROG_CC_C_O 1181ab47cfaaSmrg 1182ab47cfaaSmrg 11835c42550eSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 11845c42550eSmrg# ----------------------------------------- 1185ab47cfaaSmrg# Check to see if we can do hard links to lock some files if needed 11865c42550eSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 11875c42550eSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl 1188ab47cfaaSmrg 1189ab47cfaaSmrghard_links="nottested" 11905c42550eSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1191ab47cfaaSmrg # do not overwrite the value of need_locks provided by the user 1192ab47cfaaSmrg AC_MSG_CHECKING([if we can lock with hard links]) 1193ab47cfaaSmrg hard_links=yes 11945c42550eSmrg $rm conftest* 1195ab47cfaaSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1196ab47cfaaSmrg touch conftest.a 1197ab47cfaaSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 1198ab47cfaaSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1199ab47cfaaSmrg AC_MSG_RESULT([$hard_links]) 1200ab47cfaaSmrg if test "$hard_links" = no; then 1201ab47cfaaSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1202ab47cfaaSmrg need_locks=warn 1203ab47cfaaSmrg fi 1204ab47cfaaSmrgelse 1205ab47cfaaSmrg need_locks=no 1206ab47cfaaSmrgfi 12075c42550eSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1208ab47cfaaSmrg 1209ab47cfaaSmrg 12105c42550eSmrg# AC_LIBTOOL_OBJDIR 12115c42550eSmrg# ----------------- 12125c42550eSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 1213ab47cfaaSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1214ab47cfaaSmrg[rm -f .libs 2>/dev/null 1215ab47cfaaSmrgmkdir .libs 2>/dev/null 1216ab47cfaaSmrgif test -d .libs; then 1217ab47cfaaSmrg lt_cv_objdir=.libs 1218ab47cfaaSmrgelse 1219ab47cfaaSmrg # MS-DOS does not allow filenames that begin with a dot. 1220ab47cfaaSmrg lt_cv_objdir=_libs 1221ab47cfaaSmrgfi 1222ab47cfaaSmrgrmdir .libs 2>/dev/null]) 1223ab47cfaaSmrgobjdir=$lt_cv_objdir 12245c42550eSmrg])# AC_LIBTOOL_OBJDIR 1225ab47cfaaSmrg 1226ab47cfaaSmrg 12275c42550eSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 12285c42550eSmrg# ---------------------------------------------- 1229ab47cfaaSmrg# Check hardcoding attributes. 12305c42550eSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 1231ab47cfaaSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 12325c42550eSmrg_LT_AC_TAGVAR(hardcode_action, $1)= 12335c42550eSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 12345c42550eSmrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 12355c42550eSmrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1236ab47cfaaSmrg 12375c42550eSmrg # We can hardcode non-existant directories. 12385c42550eSmrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 1239ab47cfaaSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 1240ab47cfaaSmrg # have to relink, otherwise we might link with an installed library 1241ab47cfaaSmrg # when we should be linking with a yet-to-be-installed one 12425c42550eSmrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 12435c42550eSmrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 1244ab47cfaaSmrg # Linking always hardcodes the temporary library directory. 12455c42550eSmrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 1246ab47cfaaSmrg else 1247ab47cfaaSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 12485c42550eSmrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 1249ab47cfaaSmrg fi 1250ab47cfaaSmrgelse 1251ab47cfaaSmrg # We cannot hardcode anything, or else we can only hardcode existing 1252ab47cfaaSmrg # directories. 12535c42550eSmrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1254ab47cfaaSmrgfi 12555c42550eSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1256ab47cfaaSmrg 12575c42550eSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 1258ab47cfaaSmrg # Fast installation is not supported 1259ab47cfaaSmrg enable_fast_install=no 1260ab47cfaaSmrgelif test "$shlibpath_overrides_runpath" = yes || 1261ab47cfaaSmrg test "$enable_shared" = no; then 1262ab47cfaaSmrg # Fast installation is not necessary 1263ab47cfaaSmrg enable_fast_install=needless 1264ab47cfaaSmrgfi 12655c42550eSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 1266ab47cfaaSmrg 1267ab47cfaaSmrg 12685c42550eSmrg# AC_LIBTOOL_SYS_LIB_STRIP 12695c42550eSmrg# ------------------------ 12705c42550eSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 12715c42550eSmrg[striplib= 1272ab47cfaaSmrgold_striplib= 1273ab47cfaaSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 12745c42550eSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 1275ab47cfaaSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 1276ab47cfaaSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 1277ab47cfaaSmrg AC_MSG_RESULT([yes]) 1278ab47cfaaSmrgelse 1279ab47cfaaSmrg# FIXME - insert some real tests, host_os isn't really good enough 1280ab47cfaaSmrg case $host_os in 12815c42550eSmrg darwin*) 12825c42550eSmrg if test -n "$STRIP" ; then 12835c42550eSmrg striplib="$STRIP -x" 12845c42550eSmrg old_striplib="$STRIP -S" 12855c42550eSmrg AC_MSG_RESULT([yes]) 12865c42550eSmrg else 12875c42550eSmrg AC_MSG_RESULT([no]) 12885c42550eSmrgfi 12895c42550eSmrg ;; 12905c42550eSmrg *) 12915c42550eSmrg AC_MSG_RESULT([no]) 1292ab47cfaaSmrg ;; 1293ab47cfaaSmrg esac 1294ab47cfaaSmrgfi 12955c42550eSmrg])# AC_LIBTOOL_SYS_LIB_STRIP 1296ab47cfaaSmrg 1297ab47cfaaSmrg 12985c42550eSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1299ab47cfaaSmrg# ----------------------------- 1300ab47cfaaSmrg# PORTME Fill in your ld.so characteristics 13015c42550eSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 13025c42550eSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 13038697ee19SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 13045c42550eSmrglibrary_names_spec= 13055c42550eSmrglibname_spec='lib$name' 13065c42550eSmrgsoname_spec= 13075c42550eSmrgshrext_cmds=".so" 13085c42550eSmrgpostinstall_cmds= 13095c42550eSmrgpostuninstall_cmds= 13105c42550eSmrgfinish_cmds= 13115c42550eSmrgfinish_eval= 13125c42550eSmrgshlibpath_var= 13135c42550eSmrgshlibpath_overrides_runpath=unknown 13145c42550eSmrgversion_type=none 13155c42550eSmrgdynamic_linker="$host_os ld.so" 13165c42550eSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 13175c42550eSmrgm4_if($1,[],[ 1318ab47cfaaSmrgif test "$GCC" = yes; then 13198697ee19Smrg case $host_os in 13208697ee19Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 13218697ee19Smrg *) lt_awk_arg="/^libraries:/" ;; 13228697ee19Smrg esac 13238697ee19Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 13245c42550eSmrg if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 1325ab47cfaaSmrg # if the path contains ";" then we assume it to be the separator 1326ab47cfaaSmrg # otherwise default to the standard path separator (i.e. ":") - it is 1327ab47cfaaSmrg # assumed that no part of a normal pathname contains ";" but that should 1328ab47cfaaSmrg # okay in the real world where ";" in dirpaths is itself problematic. 13295c42550eSmrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 1330ab47cfaaSmrg else 13315c42550eSmrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1332ab47cfaaSmrg fi 13338697ee19Smrg # Ok, now we have the path, separated by spaces, we can step through it 13348697ee19Smrg # and add multilib dir if necessary. 13358697ee19Smrg lt_tmp_lt_search_path_spec= 13368697ee19Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 13378697ee19Smrg for lt_sys_path in $lt_search_path_spec; do 13388697ee19Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 13398697ee19Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 13408697ee19Smrg else 13418697ee19Smrg test -d "$lt_sys_path" && \ 13428697ee19Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 13438697ee19Smrg fi 13448697ee19Smrg done 13455c42550eSmrg lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 13468697ee19SmrgBEGIN {RS=" "; FS="/|\n";} { 13478697ee19Smrg lt_foo=""; 13488697ee19Smrg lt_count=0; 13498697ee19Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 13508697ee19Smrg if ($lt_i != "" && $lt_i != ".") { 13518697ee19Smrg if ($lt_i == "..") { 13528697ee19Smrg lt_count++; 13538697ee19Smrg } else { 13548697ee19Smrg if (lt_count == 0) { 13558697ee19Smrg lt_foo="/" $lt_i lt_foo; 13568697ee19Smrg } else { 13578697ee19Smrg lt_count--; 13588697ee19Smrg } 13598697ee19Smrg } 13608697ee19Smrg } 13618697ee19Smrg } 13628697ee19Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 13638697ee19Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 13648697ee19Smrg}'` 13655c42550eSmrg sys_lib_search_path_spec=`echo $lt_search_path_spec` 1366ab47cfaaSmrgelse 1367ab47cfaaSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 13688697ee19Smrgfi]) 1369ab47cfaaSmrgneed_lib_prefix=unknown 1370ab47cfaaSmrghardcode_into_libs=no 1371ab47cfaaSmrg 1372ab47cfaaSmrg# when you set need_version to no, make sure it does not cause -set_version 1373ab47cfaaSmrg# flags to be left without arguments 1374ab47cfaaSmrgneed_version=unknown 1375ab47cfaaSmrg 1376ab47cfaaSmrgcase $host_os in 1377ab47cfaaSmrgaix3*) 1378ab47cfaaSmrg version_type=linux 1379ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 1380ab47cfaaSmrg shlibpath_var=LIBPATH 1381ab47cfaaSmrg 1382ab47cfaaSmrg # AIX 3 has no versioning support, so we append a major version to the name. 1383ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1384ab47cfaaSmrg ;; 1385ab47cfaaSmrg 13861473d951Smrgaix[[4-9]]*) 1387ab47cfaaSmrg version_type=linux 1388ab47cfaaSmrg need_lib_prefix=no 1389ab47cfaaSmrg need_version=no 1390ab47cfaaSmrg hardcode_into_libs=yes 1391ab47cfaaSmrg if test "$host_cpu" = ia64; then 1392ab47cfaaSmrg # AIX 5 supports IA64 1393ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 1394ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1395ab47cfaaSmrg else 1396ab47cfaaSmrg # With GCC up to 2.95.x, collect2 would create an import file 1397ab47cfaaSmrg # for dependence libraries. The import file would start with 1398ab47cfaaSmrg # the line `#! .'. This would cause the generated library to 1399ab47cfaaSmrg # depend on `.', always an invalid library. This was fixed in 1400ab47cfaaSmrg # development snapshots of GCC prior to 3.0. 1401ab47cfaaSmrg case $host_os in 1402ab47cfaaSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 1403ab47cfaaSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 1404ab47cfaaSmrg echo ' yes ' 14055c42550eSmrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 1406ab47cfaaSmrg : 1407ab47cfaaSmrg else 1408ab47cfaaSmrg can_build_shared=no 1409ab47cfaaSmrg fi 1410ab47cfaaSmrg ;; 1411ab47cfaaSmrg esac 1412ab47cfaaSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 1413ab47cfaaSmrg # soname into executable. Probably we can add versioning support to 1414ab47cfaaSmrg # collect2, so additional links can be useful in future. 1415ab47cfaaSmrg if test "$aix_use_runtimelinking" = yes; then 1416ab47cfaaSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 1417ab47cfaaSmrg # instead of lib<name>.a to let people know that these are not 1418ab47cfaaSmrg # typical AIX shared libraries. 1419ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1420ab47cfaaSmrg else 1421ab47cfaaSmrg # We preserve .a as extension for shared libraries through AIX4.2 1422ab47cfaaSmrg # and later when we are not doing run time linking. 1423ab47cfaaSmrg library_names_spec='${libname}${release}.a $libname.a' 1424ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1425ab47cfaaSmrg fi 1426ab47cfaaSmrg shlibpath_var=LIBPATH 1427ab47cfaaSmrg fi 1428ab47cfaaSmrg ;; 1429ab47cfaaSmrg 1430ab47cfaaSmrgamigaos*) 14315c42550eSmrg library_names_spec='$libname.ixlibrary $libname.a' 14325c42550eSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 14335c42550eSmrg 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' 1434ab47cfaaSmrg ;; 1435ab47cfaaSmrg 1436ab47cfaaSmrgbeos*) 1437ab47cfaaSmrg library_names_spec='${libname}${shared_ext}' 1438ab47cfaaSmrg dynamic_linker="$host_os ld.so" 1439ab47cfaaSmrg shlibpath_var=LIBRARY_PATH 1440ab47cfaaSmrg ;; 1441ab47cfaaSmrg 1442ab47cfaaSmrgbsdi[[45]]*) 1443ab47cfaaSmrg version_type=linux 1444ab47cfaaSmrg need_version=no 1445ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1446ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1447ab47cfaaSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 1448ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1449ab47cfaaSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 1450ab47cfaaSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 1451ab47cfaaSmrg # the default ld.so.conf also contains /usr/contrib/lib and 1452ab47cfaaSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 1453ab47cfaaSmrg # libtool to hard-code these into programs 1454ab47cfaaSmrg ;; 1455ab47cfaaSmrg 14565c42550eSmrgcygwin* | mingw* | pw32*) 1457ab47cfaaSmrg version_type=windows 1458ab47cfaaSmrg shrext_cmds=".dll" 1459ab47cfaaSmrg need_version=no 1460ab47cfaaSmrg need_lib_prefix=no 1461ab47cfaaSmrg 1462ab47cfaaSmrg case $GCC,$host_os in 14635c42550eSmrg yes,cygwin* | yes,mingw* | yes,pw32*) 1464ab47cfaaSmrg library_names_spec='$libname.dll.a' 1465ab47cfaaSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 1466ab47cfaaSmrg postinstall_cmds='base_file=`basename \${file}`~ 14675c42550eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 1468ab47cfaaSmrg dldir=$destdir/`dirname \$dlpath`~ 1469ab47cfaaSmrg test -d \$dldir || mkdir -p \$dldir~ 1470ab47cfaaSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 14715c42550eSmrg chmod a+x \$dldir/$dlname' 1472ab47cfaaSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 1473ab47cfaaSmrg dlpath=$dir/\$dldll~ 14745c42550eSmrg $rm \$dlpath' 1475ab47cfaaSmrg shlibpath_overrides_runpath=yes 1476ab47cfaaSmrg 1477ab47cfaaSmrg case $host_os in 1478ab47cfaaSmrg cygwin*) 1479ab47cfaaSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 1480ab47cfaaSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1481ab47cfaaSmrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 1482ab47cfaaSmrg ;; 14835c42550eSmrg mingw*) 1484ab47cfaaSmrg # MinGW DLLs use traditional 'lib' prefix 1485ab47cfaaSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 14865c42550eSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 14875c42550eSmrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 1488ab47cfaaSmrg # It is most probably a Windows format PATH printed by 1489ab47cfaaSmrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 1490ab47cfaaSmrg # path with ; separators, and with drive letters. We can handle the 1491ab47cfaaSmrg # drive letters (cygwin fileutils understands them), so leave them, 1492ab47cfaaSmrg # especially as we might pass files found there to a mingw objdump, 1493ab47cfaaSmrg # which wouldn't understand a cygwinified path. Ahh. 14945c42550eSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1495ab47cfaaSmrg else 14965c42550eSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1497ab47cfaaSmrg fi 1498ab47cfaaSmrg ;; 1499ab47cfaaSmrg pw32*) 1500ab47cfaaSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 1501ab47cfaaSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1502ab47cfaaSmrg ;; 1503ab47cfaaSmrg esac 1504ab47cfaaSmrg ;; 1505ab47cfaaSmrg 1506ab47cfaaSmrg *) 1507ab47cfaaSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 1508ab47cfaaSmrg ;; 1509ab47cfaaSmrg esac 1510ab47cfaaSmrg dynamic_linker='Win32 ld.exe' 1511ab47cfaaSmrg # FIXME: first we should search . and the directory the executable is in 1512ab47cfaaSmrg shlibpath_var=PATH 1513ab47cfaaSmrg ;; 1514ab47cfaaSmrg 1515ab47cfaaSmrgdarwin* | rhapsody*) 1516ab47cfaaSmrg dynamic_linker="$host_os dyld" 1517ab47cfaaSmrg version_type=darwin 1518ab47cfaaSmrg need_lib_prefix=no 1519ab47cfaaSmrg need_version=no 15205c42550eSmrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 1521ab47cfaaSmrg soname_spec='${libname}${release}${major}$shared_ext' 1522ab47cfaaSmrg shlibpath_overrides_runpath=yes 1523ab47cfaaSmrg shlibpath_var=DYLD_LIBRARY_PATH 1524ab47cfaaSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 15255c42550eSmrg m4_if([$1], [],[ 15265c42550eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 1527ab47cfaaSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 1528ab47cfaaSmrg ;; 1529ab47cfaaSmrg 1530ab47cfaaSmrgdgux*) 1531ab47cfaaSmrg version_type=linux 1532ab47cfaaSmrg need_lib_prefix=no 1533ab47cfaaSmrg need_version=no 1534ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 1535ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1536ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1537ab47cfaaSmrg ;; 1538ab47cfaaSmrg 1539ab47cfaaSmrgfreebsd1*) 1540ab47cfaaSmrg dynamic_linker=no 1541ab47cfaaSmrg ;; 1542ab47cfaaSmrg 1543ab47cfaaSmrgfreebsd* | dragonfly*) 1544ab47cfaaSmrg # DragonFly does not have aout. When/if they implement a new 1545ab47cfaaSmrg # versioning mechanism, adjust this. 1546ab47cfaaSmrg if test -x /usr/bin/objformat; then 1547ab47cfaaSmrg objformat=`/usr/bin/objformat` 1548ab47cfaaSmrg else 1549ab47cfaaSmrg case $host_os in 1550ab47cfaaSmrg freebsd[[123]]*) objformat=aout ;; 1551ab47cfaaSmrg *) objformat=elf ;; 1552ab47cfaaSmrg esac 1553ab47cfaaSmrg fi 1554ab47cfaaSmrg version_type=freebsd-$objformat 1555ab47cfaaSmrg case $version_type in 1556ab47cfaaSmrg freebsd-elf*) 1557ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1558ab47cfaaSmrg need_version=no 1559ab47cfaaSmrg need_lib_prefix=no 1560ab47cfaaSmrg ;; 1561ab47cfaaSmrg freebsd-*) 1562ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 1563ab47cfaaSmrg need_version=yes 1564ab47cfaaSmrg ;; 1565ab47cfaaSmrg esac 1566ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1567ab47cfaaSmrg case $host_os in 1568ab47cfaaSmrg freebsd2*) 1569ab47cfaaSmrg shlibpath_overrides_runpath=yes 1570ab47cfaaSmrg ;; 1571ab47cfaaSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 1572ab47cfaaSmrg shlibpath_overrides_runpath=yes 1573ab47cfaaSmrg hardcode_into_libs=yes 1574ab47cfaaSmrg ;; 1575ab47cfaaSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 1576ab47cfaaSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 1577ab47cfaaSmrg shlibpath_overrides_runpath=no 1578ab47cfaaSmrg hardcode_into_libs=yes 1579ab47cfaaSmrg ;; 15808697ee19Smrg *) # from 4.6 on, and DragonFly 1581ab47cfaaSmrg shlibpath_overrides_runpath=yes 1582ab47cfaaSmrg hardcode_into_libs=yes 1583ab47cfaaSmrg ;; 1584ab47cfaaSmrg esac 1585ab47cfaaSmrg ;; 1586ab47cfaaSmrg 1587ab47cfaaSmrggnu*) 1588ab47cfaaSmrg version_type=linux 1589ab47cfaaSmrg need_lib_prefix=no 1590ab47cfaaSmrg need_version=no 1591ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 1592ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1593ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1594ab47cfaaSmrg hardcode_into_libs=yes 1595ab47cfaaSmrg ;; 1596ab47cfaaSmrg 1597ab47cfaaSmrghpux9* | hpux10* | hpux11*) 1598ab47cfaaSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 1599ab47cfaaSmrg # link against other versions. 1600ab47cfaaSmrg version_type=sunos 1601ab47cfaaSmrg need_lib_prefix=no 1602ab47cfaaSmrg need_version=no 1603ab47cfaaSmrg case $host_cpu in 1604ab47cfaaSmrg ia64*) 1605ab47cfaaSmrg shrext_cmds='.so' 1606ab47cfaaSmrg hardcode_into_libs=yes 1607ab47cfaaSmrg dynamic_linker="$host_os dld.so" 1608ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1609ab47cfaaSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1610ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1611ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1612ab47cfaaSmrg if test "X$HPUX_IA64_MODE" = X32; then 1613ab47cfaaSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 1614ab47cfaaSmrg else 1615ab47cfaaSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 1616ab47cfaaSmrg fi 1617ab47cfaaSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1618ab47cfaaSmrg ;; 16195c42550eSmrg hppa*64*) 16205c42550eSmrg shrext_cmds='.sl' 16215c42550eSmrg hardcode_into_libs=yes 16225c42550eSmrg dynamic_linker="$host_os dld.sl" 16235c42550eSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 16245c42550eSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 16255c42550eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 16265c42550eSmrg soname_spec='${libname}${release}${shared_ext}$major' 16275c42550eSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 16285c42550eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 16295c42550eSmrg ;; 16305c42550eSmrg *) 1631ab47cfaaSmrg shrext_cmds='.sl' 1632ab47cfaaSmrg dynamic_linker="$host_os dld.sl" 1633ab47cfaaSmrg shlibpath_var=SHLIB_PATH 1634ab47cfaaSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 1635ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1636ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1637ab47cfaaSmrg ;; 1638ab47cfaaSmrg esac 1639ab47cfaaSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 1640ab47cfaaSmrg postinstall_cmds='chmod 555 $lib' 1641ab47cfaaSmrg ;; 1642ab47cfaaSmrg 16438697ee19Smrginterix[[3-9]]*) 1644ab47cfaaSmrg version_type=linux 1645ab47cfaaSmrg need_lib_prefix=no 1646ab47cfaaSmrg need_version=no 1647ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1648ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1649ab47cfaaSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 1650ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1651ab47cfaaSmrg shlibpath_overrides_runpath=no 1652ab47cfaaSmrg hardcode_into_libs=yes 1653ab47cfaaSmrg ;; 1654ab47cfaaSmrg 1655ab47cfaaSmrgirix5* | irix6* | nonstopux*) 1656ab47cfaaSmrg case $host_os in 1657ab47cfaaSmrg nonstopux*) version_type=nonstopux ;; 1658ab47cfaaSmrg *) 1659ab47cfaaSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 1660ab47cfaaSmrg version_type=linux 1661ab47cfaaSmrg else 1662ab47cfaaSmrg version_type=irix 1663ab47cfaaSmrg fi ;; 1664ab47cfaaSmrg esac 1665ab47cfaaSmrg need_lib_prefix=no 1666ab47cfaaSmrg need_version=no 1667ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1668ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 1669ab47cfaaSmrg case $host_os in 1670ab47cfaaSmrg irix5* | nonstopux*) 1671ab47cfaaSmrg libsuff= shlibsuff= 1672ab47cfaaSmrg ;; 1673ab47cfaaSmrg *) 1674ab47cfaaSmrg case $LD in # libtool.m4 will add one of these switches to LD 1675ab47cfaaSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 1676ab47cfaaSmrg libsuff= shlibsuff= libmagic=32-bit;; 1677ab47cfaaSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 1678ab47cfaaSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 1679ab47cfaaSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 1680ab47cfaaSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 1681ab47cfaaSmrg *) libsuff= shlibsuff= libmagic=never-match;; 1682ab47cfaaSmrg esac 1683ab47cfaaSmrg ;; 1684ab47cfaaSmrg esac 1685ab47cfaaSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 1686ab47cfaaSmrg shlibpath_overrides_runpath=no 1687ab47cfaaSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1688ab47cfaaSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1689ab47cfaaSmrg hardcode_into_libs=yes 1690ab47cfaaSmrg ;; 1691ab47cfaaSmrg 1692ab47cfaaSmrg# No shared lib support for Linux oldld, aout, or coff. 1693ab47cfaaSmrglinux*oldld* | linux*aout* | linux*coff*) 1694ab47cfaaSmrg dynamic_linker=no 1695ab47cfaaSmrg ;; 1696ab47cfaaSmrg 1697ab47cfaaSmrg# This must be Linux ELF. 1698ab47cfaaSmrglinux* | k*bsd*-gnu) 1699ab47cfaaSmrg version_type=linux 1700ab47cfaaSmrg need_lib_prefix=no 1701ab47cfaaSmrg need_version=no 1702ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1703ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1704ab47cfaaSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 1705ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1706ab47cfaaSmrg shlibpath_overrides_runpath=no 1707ab47cfaaSmrg # This implies no fast_install, which is unacceptable. 1708ab47cfaaSmrg # Some rework will be needed to allow for fast_install 1709ab47cfaaSmrg # before this can be enabled. 1710ab47cfaaSmrg hardcode_into_libs=yes 17115c42550eSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 17125c42550eSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1713ab47cfaaSmrg 1714ab47cfaaSmrg # Append ld.so.conf contents to the search path 1715ab47cfaaSmrg if test -f /etc/ld.so.conf; then 17165c42550eSmrg 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' ' '` 17178697ee19Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 1718ab47cfaaSmrg fi 1719ab47cfaaSmrg 1720ab47cfaaSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 1721ab47cfaaSmrg # powerpc, because MkLinux only supported shared libraries with the 1722ab47cfaaSmrg # GNU dynamic linker. Since this was broken with cross compilers, 1723ab47cfaaSmrg # most powerpc-linux boxes support dynamic linking these days and 1724ab47cfaaSmrg # people can always --disable-shared, the test was removed, and we 1725ab47cfaaSmrg # assume the GNU/Linux dynamic linker is in use. 1726ab47cfaaSmrg dynamic_linker='GNU/Linux ld.so' 1727ab47cfaaSmrg ;; 1728ab47cfaaSmrg 1729ab47cfaaSmrgnetbsd*) 1730ab47cfaaSmrg version_type=sunos 1731ab47cfaaSmrg need_lib_prefix=no 1732ab47cfaaSmrg need_version=no 17335c42550eSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 1734ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1735ab47cfaaSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1736ab47cfaaSmrg dynamic_linker='NetBSD (a.out) ld.so' 1737ab47cfaaSmrg else 1738ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1739ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1740ab47cfaaSmrg dynamic_linker='NetBSD ld.elf_so' 1741ab47cfaaSmrg fi 1742ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1743ab47cfaaSmrg shlibpath_overrides_runpath=yes 1744ab47cfaaSmrg hardcode_into_libs=yes 1745ab47cfaaSmrg ;; 1746ab47cfaaSmrg 1747ab47cfaaSmrgnewsos6) 1748ab47cfaaSmrg version_type=linux 1749ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1750ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1751ab47cfaaSmrg shlibpath_overrides_runpath=yes 1752ab47cfaaSmrg ;; 1753ab47cfaaSmrg 17545c42550eSmrgnto-qnx*) 17555c42550eSmrg version_type=linux 1756ab47cfaaSmrg need_lib_prefix=no 1757ab47cfaaSmrg need_version=no 1758ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1759ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1760ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 17615c42550eSmrg shlibpath_overrides_runpath=yes 1762ab47cfaaSmrg ;; 1763ab47cfaaSmrg 1764ab47cfaaSmrgopenbsd*) 1765ab47cfaaSmrg version_type=sunos 1766ab47cfaaSmrg sys_lib_dlsearch_path_spec="/usr/lib" 1767ab47cfaaSmrg need_lib_prefix=no 1768ab47cfaaSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 1769ab47cfaaSmrg case $host_os in 17705c42550eSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 17715c42550eSmrg *) need_version=no ;; 1772ab47cfaaSmrg esac 1773ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1774ab47cfaaSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1775ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 17765c42550eSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 1777ab47cfaaSmrg case $host_os in 1778ab47cfaaSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 1779ab47cfaaSmrg shlibpath_overrides_runpath=no 1780ab47cfaaSmrg ;; 1781ab47cfaaSmrg *) 1782ab47cfaaSmrg shlibpath_overrides_runpath=yes 1783ab47cfaaSmrg ;; 1784ab47cfaaSmrg esac 1785ab47cfaaSmrg else 1786ab47cfaaSmrg shlibpath_overrides_runpath=yes 1787ab47cfaaSmrg fi 1788ab47cfaaSmrg ;; 1789ab47cfaaSmrg 1790ab47cfaaSmrgos2*) 1791ab47cfaaSmrg libname_spec='$name' 1792ab47cfaaSmrg shrext_cmds=".dll" 1793ab47cfaaSmrg need_lib_prefix=no 1794ab47cfaaSmrg library_names_spec='$libname${shared_ext} $libname.a' 1795ab47cfaaSmrg dynamic_linker='OS/2 ld.exe' 1796ab47cfaaSmrg shlibpath_var=LIBPATH 1797ab47cfaaSmrg ;; 1798ab47cfaaSmrg 1799ab47cfaaSmrgosf3* | osf4* | osf5*) 1800ab47cfaaSmrg version_type=osf 1801ab47cfaaSmrg need_lib_prefix=no 1802ab47cfaaSmrg need_version=no 1803ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1804ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1805ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1806ab47cfaaSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 1807ab47cfaaSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 1808ab47cfaaSmrg ;; 1809ab47cfaaSmrg 18108697ee19Smrgrdos*) 18118697ee19Smrg dynamic_linker=no 18128697ee19Smrg ;; 18138697ee19Smrg 1814ab47cfaaSmrgsolaris*) 1815ab47cfaaSmrg version_type=linux 1816ab47cfaaSmrg need_lib_prefix=no 1817ab47cfaaSmrg need_version=no 1818ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1819ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1820ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1821ab47cfaaSmrg shlibpath_overrides_runpath=yes 1822ab47cfaaSmrg hardcode_into_libs=yes 1823ab47cfaaSmrg # ldd complains unless libraries are executable 1824ab47cfaaSmrg postinstall_cmds='chmod +x $lib' 1825ab47cfaaSmrg ;; 1826ab47cfaaSmrg 1827ab47cfaaSmrgsunos4*) 1828ab47cfaaSmrg version_type=sunos 1829ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1830ab47cfaaSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 1831ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1832ab47cfaaSmrg shlibpath_overrides_runpath=yes 1833ab47cfaaSmrg if test "$with_gnu_ld" = yes; then 1834ab47cfaaSmrg need_lib_prefix=no 1835ab47cfaaSmrg fi 1836ab47cfaaSmrg need_version=yes 1837ab47cfaaSmrg ;; 1838ab47cfaaSmrg 1839ab47cfaaSmrgsysv4 | sysv4.3*) 1840ab47cfaaSmrg version_type=linux 1841ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1842ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1843ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1844ab47cfaaSmrg case $host_vendor in 1845ab47cfaaSmrg sni) 1846ab47cfaaSmrg shlibpath_overrides_runpath=no 1847ab47cfaaSmrg need_lib_prefix=no 18485c42550eSmrg export_dynamic_flag_spec='${wl}-Blargedynsym' 1849ab47cfaaSmrg runpath_var=LD_RUN_PATH 1850ab47cfaaSmrg ;; 1851ab47cfaaSmrg siemens) 1852ab47cfaaSmrg need_lib_prefix=no 1853ab47cfaaSmrg ;; 1854ab47cfaaSmrg motorola) 1855ab47cfaaSmrg need_lib_prefix=no 1856ab47cfaaSmrg need_version=no 1857ab47cfaaSmrg shlibpath_overrides_runpath=no 1858ab47cfaaSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 1859ab47cfaaSmrg ;; 1860ab47cfaaSmrg esac 1861ab47cfaaSmrg ;; 1862ab47cfaaSmrg 1863ab47cfaaSmrgsysv4*MP*) 1864ab47cfaaSmrg if test -d /usr/nec ;then 1865ab47cfaaSmrg version_type=linux 1866ab47cfaaSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 1867ab47cfaaSmrg soname_spec='$libname${shared_ext}.$major' 1868ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1869ab47cfaaSmrg fi 1870ab47cfaaSmrg ;; 1871ab47cfaaSmrg 1872ab47cfaaSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 1873ab47cfaaSmrg version_type=freebsd-elf 1874ab47cfaaSmrg need_lib_prefix=no 1875ab47cfaaSmrg need_version=no 1876ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1877ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1878ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1879ab47cfaaSmrg hardcode_into_libs=yes 1880ab47cfaaSmrg if test "$with_gnu_ld" = yes; then 1881ab47cfaaSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 18825c42550eSmrg shlibpath_overrides_runpath=no 1883ab47cfaaSmrg else 1884ab47cfaaSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 18855c42550eSmrg shlibpath_overrides_runpath=yes 1886ab47cfaaSmrg case $host_os in 1887ab47cfaaSmrg sco3.2v5*) 1888ab47cfaaSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 1889ab47cfaaSmrg ;; 1890ab47cfaaSmrg esac 1891ab47cfaaSmrg fi 1892ab47cfaaSmrg sys_lib_dlsearch_path_spec='/usr/lib' 1893ab47cfaaSmrg ;; 1894ab47cfaaSmrg 18951473d951Smrguts4*) 18961473d951Smrg version_type=linux 18971473d951Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1898ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 1899ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 1900ab47cfaaSmrg ;; 1901ab47cfaaSmrg 1902ab47cfaaSmrg*) 1903ab47cfaaSmrg dynamic_linker=no 1904ab47cfaaSmrg ;; 1905ab47cfaaSmrgesac 1906ab47cfaaSmrgAC_MSG_RESULT([$dynamic_linker]) 1907ab47cfaaSmrgtest "$dynamic_linker" = no && can_build_shared=no 1908ab47cfaaSmrg 19095c42550eSmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 19105c42550eSmrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 19115c42550eSmrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 19125c42550eSmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 19135c42550eSmrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 19145c42550eSmrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 19155c42550eSmrg 1916ab47cfaaSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 1917ab47cfaaSmrgif test "$GCC" = yes; then 1918ab47cfaaSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 1919ab47cfaaSmrgfi 19205c42550eSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1921ab47cfaaSmrg 1922ab47cfaaSmrg 19235c42550eSmrg# _LT_AC_TAGCONFIG 19245c42550eSmrg# ---------------- 19255c42550eSmrgAC_DEFUN([_LT_AC_TAGCONFIG], 19265c42550eSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 19275c42550eSmrgAC_ARG_WITH([tags], 19285c42550eSmrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 19295c42550eSmrg [include additional configurations @<:@automatic@:>@])], 19305c42550eSmrg [tagnames="$withval"]) 19315c42550eSmrg 19325c42550eSmrgif test -f "$ltmain" && test -n "$tagnames"; then 19335c42550eSmrg if test ! -f "${ofile}"; then 19345c42550eSmrg AC_MSG_WARN([output file `$ofile' does not exist]) 19355c42550eSmrg fi 19365c42550eSmrg 19375c42550eSmrg if test -z "$LTCC"; then 19385c42550eSmrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 19395c42550eSmrg if test -z "$LTCC"; then 19405c42550eSmrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 19415c42550eSmrg else 19425c42550eSmrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 19435c42550eSmrg fi 19445c42550eSmrg fi 19455c42550eSmrg if test -z "$LTCFLAGS"; then 19465c42550eSmrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 19475c42550eSmrg fi 19485c42550eSmrg 19495c42550eSmrg # Extract list of available tagged configurations in $ofile. 19505c42550eSmrg # Note that this assumes the entire list is on one line. 19515c42550eSmrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 19525c42550eSmrg 19535c42550eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 19545c42550eSmrg for tagname in $tagnames; do 19555c42550eSmrg IFS="$lt_save_ifs" 19565c42550eSmrg # Check whether tagname contains only valid characters 19575c42550eSmrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 19585c42550eSmrg "") ;; 19595c42550eSmrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 19605c42550eSmrg ;; 19615c42550eSmrg esac 19625c42550eSmrg 19635c42550eSmrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 19645c42550eSmrg then 19655c42550eSmrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 19665c42550eSmrg fi 19675c42550eSmrg 19685c42550eSmrg # Update the list of available tags. 19695c42550eSmrg if test -n "$tagname"; then 19705c42550eSmrg echo appending configuration tag \"$tagname\" to $ofile 19715c42550eSmrg 19725c42550eSmrg case $tagname in 19735c42550eSmrg CXX) 19745c42550eSmrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 19755c42550eSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 19765c42550eSmrg (test "X$CXX" != "Xg++"))) ; then 19775c42550eSmrg AC_LIBTOOL_LANG_CXX_CONFIG 19785c42550eSmrg else 19795c42550eSmrg tagname="" 19805c42550eSmrg fi 19815c42550eSmrg ;; 19825c42550eSmrg 19835c42550eSmrg F77) 19845c42550eSmrg if test -n "$F77" && test "X$F77" != "Xno"; then 19855c42550eSmrg AC_LIBTOOL_LANG_F77_CONFIG 19865c42550eSmrg else 19875c42550eSmrg tagname="" 19885c42550eSmrg fi 19895c42550eSmrg ;; 19905c42550eSmrg 19915c42550eSmrg GCJ) 19925c42550eSmrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 19935c42550eSmrg AC_LIBTOOL_LANG_GCJ_CONFIG 19945c42550eSmrg else 19955c42550eSmrg tagname="" 19965c42550eSmrg fi 19975c42550eSmrg ;; 19985c42550eSmrg 19995c42550eSmrg RC) 20005c42550eSmrg AC_LIBTOOL_LANG_RC_CONFIG 20015c42550eSmrg ;; 20025c42550eSmrg 20035c42550eSmrg *) 20045c42550eSmrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 20055c42550eSmrg ;; 20065c42550eSmrg esac 20075c42550eSmrg 20085c42550eSmrg # Append the new tag name to the list of available tags. 20095c42550eSmrg if test -n "$tagname" ; then 20105c42550eSmrg available_tags="$available_tags $tagname" 20115c42550eSmrg fi 20125c42550eSmrg fi 20135c42550eSmrg done 20145c42550eSmrg IFS="$lt_save_ifs" 20155c42550eSmrg 20165c42550eSmrg # Now substitute the updated list of available tags. 20175c42550eSmrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 20185c42550eSmrg mv "${ofile}T" "$ofile" 20195c42550eSmrg chmod +x "$ofile" 20205c42550eSmrg else 20215c42550eSmrg rm -f "${ofile}T" 20225c42550eSmrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 20235c42550eSmrg fi 20245c42550eSmrgfi 20255c42550eSmrg])# _LT_AC_TAGCONFIG 20265c42550eSmrg 20275c42550eSmrg 20285c42550eSmrg# AC_LIBTOOL_DLOPEN 20295c42550eSmrg# ----------------- 20305c42550eSmrg# enable checks for dlopen support 20315c42550eSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 20325c42550eSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 20335c42550eSmrg])# AC_LIBTOOL_DLOPEN 20345c42550eSmrg 20355c42550eSmrg 20365c42550eSmrg# AC_LIBTOOL_WIN32_DLL 20375c42550eSmrg# -------------------- 20385c42550eSmrg# declare package support for building win32 DLLs 20395c42550eSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 20405c42550eSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 20415c42550eSmrg])# AC_LIBTOOL_WIN32_DLL 20425c42550eSmrg 20435c42550eSmrg 20445c42550eSmrg# AC_ENABLE_SHARED([DEFAULT]) 20455c42550eSmrg# --------------------------- 20465c42550eSmrg# implement the --enable-shared flag 20475c42550eSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 20485c42550eSmrgAC_DEFUN([AC_ENABLE_SHARED], 20495c42550eSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 20505c42550eSmrgAC_ARG_ENABLE([shared], 20515c42550eSmrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 20525c42550eSmrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 20535c42550eSmrg [p=${PACKAGE-default} 20545c42550eSmrg case $enableval in 20555c42550eSmrg yes) enable_shared=yes ;; 20565c42550eSmrg no) enable_shared=no ;; 20575c42550eSmrg *) 20585c42550eSmrg enable_shared=no 20595c42550eSmrg # Look at the argument we got. We use all the common list separators. 20605c42550eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 20615c42550eSmrg for pkg in $enableval; do 20625c42550eSmrg IFS="$lt_save_ifs" 20635c42550eSmrg if test "X$pkg" = "X$p"; then 20645c42550eSmrg enable_shared=yes 20655c42550eSmrg fi 20665c42550eSmrg done 20675c42550eSmrg IFS="$lt_save_ifs" 20685c42550eSmrg ;; 20695c42550eSmrg esac], 20705c42550eSmrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 20715c42550eSmrg])# AC_ENABLE_SHARED 20725c42550eSmrg 20735c42550eSmrg 20745c42550eSmrg# AC_DISABLE_SHARED 20755c42550eSmrg# ----------------- 20765c42550eSmrg# set the default shared flag to --disable-shared 20775c42550eSmrgAC_DEFUN([AC_DISABLE_SHARED], 20785c42550eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 20795c42550eSmrgAC_ENABLE_SHARED(no) 20805c42550eSmrg])# AC_DISABLE_SHARED 20815c42550eSmrg 20825c42550eSmrg 20835c42550eSmrg# AC_ENABLE_STATIC([DEFAULT]) 20845c42550eSmrg# --------------------------- 20855c42550eSmrg# implement the --enable-static flag 20865c42550eSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 20875c42550eSmrgAC_DEFUN([AC_ENABLE_STATIC], 20885c42550eSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 20895c42550eSmrgAC_ARG_ENABLE([static], 20905c42550eSmrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 20915c42550eSmrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 20925c42550eSmrg [p=${PACKAGE-default} 20935c42550eSmrg case $enableval in 20945c42550eSmrg yes) enable_static=yes ;; 20955c42550eSmrg no) enable_static=no ;; 20965c42550eSmrg *) 20975c42550eSmrg enable_static=no 20985c42550eSmrg # Look at the argument we got. We use all the common list separators. 20995c42550eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 21005c42550eSmrg for pkg in $enableval; do 21015c42550eSmrg IFS="$lt_save_ifs" 21025c42550eSmrg if test "X$pkg" = "X$p"; then 21035c42550eSmrg enable_static=yes 21045c42550eSmrg fi 21055c42550eSmrg done 21065c42550eSmrg IFS="$lt_save_ifs" 21075c42550eSmrg ;; 21085c42550eSmrg esac], 21095c42550eSmrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 21105c42550eSmrg])# AC_ENABLE_STATIC 21115c42550eSmrg 21125c42550eSmrg 21135c42550eSmrg# AC_DISABLE_STATIC 21145c42550eSmrg# ----------------- 21155c42550eSmrg# set the default static flag to --disable-static 21165c42550eSmrgAC_DEFUN([AC_DISABLE_STATIC], 21175c42550eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 21185c42550eSmrgAC_ENABLE_STATIC(no) 21195c42550eSmrg])# AC_DISABLE_STATIC 21205c42550eSmrg 21215c42550eSmrg 21225c42550eSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 21235c42550eSmrg# --------------------------------- 21245c42550eSmrg# implement the --enable-fast-install flag 21255c42550eSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 21265c42550eSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 21275c42550eSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 21285c42550eSmrgAC_ARG_ENABLE([fast-install], 21295c42550eSmrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 21305c42550eSmrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 21315c42550eSmrg [p=${PACKAGE-default} 21325c42550eSmrg case $enableval in 21335c42550eSmrg yes) enable_fast_install=yes ;; 21345c42550eSmrg no) enable_fast_install=no ;; 21355c42550eSmrg *) 21365c42550eSmrg enable_fast_install=no 21375c42550eSmrg # Look at the argument we got. We use all the common list separators. 21385c42550eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 21395c42550eSmrg for pkg in $enableval; do 21405c42550eSmrg IFS="$lt_save_ifs" 21415c42550eSmrg if test "X$pkg" = "X$p"; then 21425c42550eSmrg enable_fast_install=yes 21435c42550eSmrg fi 21445c42550eSmrg done 21455c42550eSmrg IFS="$lt_save_ifs" 21465c42550eSmrg ;; 21475c42550eSmrg esac], 21485c42550eSmrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 21495c42550eSmrg])# AC_ENABLE_FAST_INSTALL 21505c42550eSmrg 21515c42550eSmrg 21525c42550eSmrg# AC_DISABLE_FAST_INSTALL 21535c42550eSmrg# ----------------------- 21545c42550eSmrg# set the default to --disable-fast-install 21555c42550eSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 21565c42550eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 21575c42550eSmrgAC_ENABLE_FAST_INSTALL(no) 21585c42550eSmrg])# AC_DISABLE_FAST_INSTALL 21595c42550eSmrg 21605c42550eSmrg 21615c42550eSmrg# AC_LIBTOOL_PICMODE([MODE]) 21625c42550eSmrg# -------------------------- 21635c42550eSmrg# implement the --with-pic flag 21645c42550eSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 21655c42550eSmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 21665c42550eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 21675c42550eSmrgpic_mode=ifelse($#,1,$1,default) 21685c42550eSmrg])# AC_LIBTOOL_PICMODE 21695c42550eSmrg 21705c42550eSmrg 21715c42550eSmrg# AC_PROG_EGREP 21725c42550eSmrg# ------------- 21735c42550eSmrg# This is predefined starting with Autoconf 2.54, so this conditional 21745c42550eSmrg# definition can be removed once we require Autoconf 2.54 or later. 21755c42550eSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 21765c42550eSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 21775c42550eSmrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 21785c42550eSmrg then ac_cv_prog_egrep='grep -E' 21795c42550eSmrg else ac_cv_prog_egrep='egrep' 21805c42550eSmrg fi]) 21815c42550eSmrg EGREP=$ac_cv_prog_egrep 21825c42550eSmrg AC_SUBST([EGREP]) 21835c42550eSmrg])]) 21845c42550eSmrg 21855c42550eSmrg 21865c42550eSmrg# AC_PATH_TOOL_PREFIX 21875c42550eSmrg# ------------------- 21885c42550eSmrg# find a file program which can recognize shared library 21895c42550eSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 21905c42550eSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 21915c42550eSmrgAC_MSG_CHECKING([for $1]) 21925c42550eSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 21935c42550eSmrg[case $MAGIC_CMD in 2194ab47cfaaSmrg[[\\/*] | ?:[\\/]*]) 2195ab47cfaaSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2196ab47cfaaSmrg ;; 2197ab47cfaaSmrg*) 2198ab47cfaaSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2199ab47cfaaSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2200ab47cfaaSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2201ab47cfaaSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2202ab47cfaaSmrgdnl not every word. This closes a longstanding sh security hole. 22035c42550eSmrg ac_dummy="ifelse([$2], , $PATH, [$2])" 2204ab47cfaaSmrg for ac_dir in $ac_dummy; do 2205ab47cfaaSmrg IFS="$lt_save_ifs" 2206ab47cfaaSmrg test -z "$ac_dir" && ac_dir=. 2207ab47cfaaSmrg if test -f $ac_dir/$1; then 2208ab47cfaaSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2209ab47cfaaSmrg if test -n "$file_magic_test_file"; then 2210ab47cfaaSmrg case $deplibs_check_method in 2211ab47cfaaSmrg "file_magic "*) 2212ab47cfaaSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2213ab47cfaaSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2214ab47cfaaSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2215ab47cfaaSmrg $EGREP "$file_magic_regex" > /dev/null; then 2216ab47cfaaSmrg : 2217ab47cfaaSmrg else 22185c42550eSmrg cat <<EOF 1>&2 2219ab47cfaaSmrg 2220ab47cfaaSmrg*** Warning: the command libtool uses to detect shared libraries, 2221ab47cfaaSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2222ab47cfaaSmrg*** The result is that libtool may fail to recognize shared libraries 2223ab47cfaaSmrg*** as such. This will affect the creation of libtool libraries that 2224ab47cfaaSmrg*** depend on shared libraries, but programs linked with such libtool 2225ab47cfaaSmrg*** libraries will work regardless of this problem. Nevertheless, you 2226ab47cfaaSmrg*** may want to report the problem to your system manager and/or to 2227ab47cfaaSmrg*** bug-libtool@gnu.org 2228ab47cfaaSmrg 22295c42550eSmrgEOF 2230ab47cfaaSmrg fi ;; 2231ab47cfaaSmrg esac 2232ab47cfaaSmrg fi 2233ab47cfaaSmrg break 2234ab47cfaaSmrg fi 2235ab47cfaaSmrg done 2236ab47cfaaSmrg IFS="$lt_save_ifs" 2237ab47cfaaSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2238ab47cfaaSmrg ;; 2239ab47cfaaSmrgesac]) 2240ab47cfaaSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2241ab47cfaaSmrgif test -n "$MAGIC_CMD"; then 2242ab47cfaaSmrg AC_MSG_RESULT($MAGIC_CMD) 2243ab47cfaaSmrgelse 2244ab47cfaaSmrg AC_MSG_RESULT(no) 2245ab47cfaaSmrgfi 22465c42550eSmrg])# AC_PATH_TOOL_PREFIX 2247ab47cfaaSmrg 22481473d951Smrg 22495c42550eSmrg# AC_PATH_MAGIC 22505c42550eSmrg# ------------- 22518697ee19Smrg# find a file program which can recognize a shared library 22525c42550eSmrgAC_DEFUN([AC_PATH_MAGIC], 22535c42550eSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2254ab47cfaaSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 2255ab47cfaaSmrg if test -n "$ac_tool_prefix"; then 22565c42550eSmrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2257ab47cfaaSmrg else 2258ab47cfaaSmrg MAGIC_CMD=: 2259ab47cfaaSmrg fi 2260ab47cfaaSmrgfi 22615c42550eSmrg])# AC_PATH_MAGIC 2262ab47cfaaSmrg 2263ab47cfaaSmrg 22645c42550eSmrg# AC_PROG_LD 2265ab47cfaaSmrg# ---------- 2266ab47cfaaSmrg# find the pathname to the GNU or non-GNU linker 22675c42550eSmrgAC_DEFUN([AC_PROG_LD], 22685c42550eSmrg[AC_ARG_WITH([gnu-ld], 22695c42550eSmrg [AC_HELP_STRING([--with-gnu-ld], 22701473d951Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 22711473d951Smrg [test "$withval" = no || with_gnu_ld=yes], 22725c42550eSmrg [with_gnu_ld=no]) 22735c42550eSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 22745c42550eSmrgAC_REQUIRE([AC_PROG_CC])dnl 22755c42550eSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 22765c42550eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2277ab47cfaaSmrgac_prog=ld 2278ab47cfaaSmrgif test "$GCC" = yes; then 2279ab47cfaaSmrg # Check if gcc -print-prog-name=ld gives a path. 2280ab47cfaaSmrg AC_MSG_CHECKING([for ld used by $CC]) 2281ab47cfaaSmrg case $host in 2282ab47cfaaSmrg *-*-mingw*) 2283ab47cfaaSmrg # gcc leaves a trailing carriage return which upsets mingw 2284ab47cfaaSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2285ab47cfaaSmrg *) 2286ab47cfaaSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2287ab47cfaaSmrg esac 2288ab47cfaaSmrg case $ac_prog in 2289ab47cfaaSmrg # Accept absolute paths. 2290ab47cfaaSmrg [[\\/]]* | ?:[[\\/]]*) 2291ab47cfaaSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 2292ab47cfaaSmrg # Canonicalize the pathname of ld 22935c42550eSmrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 22945c42550eSmrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 22955c42550eSmrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 2296ab47cfaaSmrg done 2297ab47cfaaSmrg test -z "$LD" && LD="$ac_prog" 2298ab47cfaaSmrg ;; 2299ab47cfaaSmrg "") 2300ab47cfaaSmrg # If it fails, then pretend we aren't using GCC. 2301ab47cfaaSmrg ac_prog=ld 2302ab47cfaaSmrg ;; 2303ab47cfaaSmrg *) 2304ab47cfaaSmrg # If it is relative, then search for the first ld in PATH. 2305ab47cfaaSmrg with_gnu_ld=unknown 2306ab47cfaaSmrg ;; 2307ab47cfaaSmrg esac 2308ab47cfaaSmrgelif test "$with_gnu_ld" = yes; then 2309ab47cfaaSmrg AC_MSG_CHECKING([for GNU ld]) 2310ab47cfaaSmrgelse 2311ab47cfaaSmrg AC_MSG_CHECKING([for non-GNU ld]) 2312ab47cfaaSmrgfi 2313ab47cfaaSmrgAC_CACHE_VAL(lt_cv_path_LD, 2314ab47cfaaSmrg[if test -z "$LD"; then 2315ab47cfaaSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2316ab47cfaaSmrg for ac_dir in $PATH; do 2317ab47cfaaSmrg IFS="$lt_save_ifs" 2318ab47cfaaSmrg test -z "$ac_dir" && ac_dir=. 2319ab47cfaaSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2320ab47cfaaSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 2321ab47cfaaSmrg # Check to see if the program is GNU ld. I'd rather use --version, 2322ab47cfaaSmrg # but apparently some variants of GNU ld only accept -v. 2323ab47cfaaSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 2324ab47cfaaSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2325ab47cfaaSmrg *GNU* | *'with BFD'*) 2326ab47cfaaSmrg test "$with_gnu_ld" != no && break 2327ab47cfaaSmrg ;; 2328ab47cfaaSmrg *) 2329ab47cfaaSmrg test "$with_gnu_ld" != yes && break 2330ab47cfaaSmrg ;; 2331ab47cfaaSmrg esac 2332ab47cfaaSmrg fi 2333ab47cfaaSmrg done 2334ab47cfaaSmrg IFS="$lt_save_ifs" 2335ab47cfaaSmrgelse 2336ab47cfaaSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 2337ab47cfaaSmrgfi]) 2338ab47cfaaSmrgLD="$lt_cv_path_LD" 2339ab47cfaaSmrgif test -n "$LD"; then 2340ab47cfaaSmrg AC_MSG_RESULT($LD) 2341ab47cfaaSmrgelse 2342ab47cfaaSmrg AC_MSG_RESULT(no) 2343ab47cfaaSmrgfi 2344ab47cfaaSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 23455c42550eSmrgAC_PROG_LD_GNU 23465c42550eSmrg])# AC_PROG_LD 2347ab47cfaaSmrg 2348ab47cfaaSmrg 23495c42550eSmrg# AC_PROG_LD_GNU 23505c42550eSmrg# -------------- 23515c42550eSmrgAC_DEFUN([AC_PROG_LD_GNU], 23525c42550eSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 23535c42550eSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2354ab47cfaaSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2355ab47cfaaSmrgcase `$LD -v 2>&1 </dev/null` in 2356ab47cfaaSmrg*GNU* | *'with BFD'*) 2357ab47cfaaSmrg lt_cv_prog_gnu_ld=yes 2358ab47cfaaSmrg ;; 2359ab47cfaaSmrg*) 2360ab47cfaaSmrg lt_cv_prog_gnu_ld=no 2361ab47cfaaSmrg ;; 2362ab47cfaaSmrgesac]) 2363ab47cfaaSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 23645c42550eSmrg])# AC_PROG_LD_GNU 2365ab47cfaaSmrg 2366ab47cfaaSmrg 23675c42550eSmrg# AC_PROG_LD_RELOAD_FLAG 23685c42550eSmrg# ---------------------- 2369ab47cfaaSmrg# find reload flag for linker 2370ab47cfaaSmrg# -- PORTME Some linkers may need a different reload flag. 23715c42550eSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 2372ab47cfaaSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 2373ab47cfaaSmrg lt_cv_ld_reload_flag, 2374ab47cfaaSmrg [lt_cv_ld_reload_flag='-r']) 2375ab47cfaaSmrgreload_flag=$lt_cv_ld_reload_flag 2376ab47cfaaSmrgcase $reload_flag in 2377ab47cfaaSmrg"" | " "*) ;; 2378ab47cfaaSmrg*) reload_flag=" $reload_flag" ;; 2379ab47cfaaSmrgesac 2380ab47cfaaSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 2381ab47cfaaSmrgcase $host_os in 2382ab47cfaaSmrg darwin*) 2383ab47cfaaSmrg if test "$GCC" = yes; then 2384ab47cfaaSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2385ab47cfaaSmrg else 2386ab47cfaaSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 2387ab47cfaaSmrg fi 2388ab47cfaaSmrg ;; 2389ab47cfaaSmrgesac 23905c42550eSmrg])# AC_PROG_LD_RELOAD_FLAG 2391ab47cfaaSmrg 2392ab47cfaaSmrg 23935c42550eSmrg# AC_DEPLIBS_CHECK_METHOD 23945c42550eSmrg# ----------------------- 2395ab47cfaaSmrg# how to check for library dependencies 2396ab47cfaaSmrg# -- PORTME fill in with the dynamic library characteristics 23975c42550eSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 23985c42550eSmrg[AC_CACHE_CHECK([how to recognize dependent libraries], 2399ab47cfaaSmrglt_cv_deplibs_check_method, 2400ab47cfaaSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 2401ab47cfaaSmrglt_cv_file_magic_test_file= 2402ab47cfaaSmrglt_cv_deplibs_check_method='unknown' 2403ab47cfaaSmrg# Need to set the preceding variable on all platforms that support 2404ab47cfaaSmrg# interlibrary dependencies. 2405ab47cfaaSmrg# 'none' -- dependencies not supported. 2406ab47cfaaSmrg# `unknown' -- same as none, but documents that we really don't know. 2407ab47cfaaSmrg# 'pass_all' -- all dependencies passed with no checks. 2408ab47cfaaSmrg# 'test_compile' -- check by making test program. 2409ab47cfaaSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 2410ab47cfaaSmrg# which responds to the $file_magic_cmd with a given extended regex. 2411ab47cfaaSmrg# If you have `file' or equivalent on your system and you're not sure 2412ab47cfaaSmrg# whether `pass_all' will *always* work, you probably want this one. 2413ab47cfaaSmrg 2414ab47cfaaSmrgcase $host_os in 24151473d951Smrgaix[[4-9]]*) 2416ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 2417ab47cfaaSmrg ;; 2418ab47cfaaSmrg 2419ab47cfaaSmrgbeos*) 2420ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 2421ab47cfaaSmrg ;; 2422ab47cfaaSmrg 2423ab47cfaaSmrgbsdi[[45]]*) 2424ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 2425ab47cfaaSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 2426ab47cfaaSmrg lt_cv_file_magic_test_file=/shlib/libc.so 2427ab47cfaaSmrg ;; 2428ab47cfaaSmrg 2429ab47cfaaSmrgcygwin*) 2430ab47cfaaSmrg # func_win32_libid is a shell function defined in ltmain.sh 2431ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2432ab47cfaaSmrg lt_cv_file_magic_cmd='func_win32_libid' 2433ab47cfaaSmrg ;; 2434ab47cfaaSmrg 2435ab47cfaaSmrgmingw* | pw32*) 2436ab47cfaaSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 24378697ee19Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 24388697ee19Smrg # unless we find 'file', for example because we are cross-compiling. 24398697ee19Smrg if ( file / ) >/dev/null 2>&1; then 24408697ee19Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 24418697ee19Smrg lt_cv_file_magic_cmd='func_win32_libid' 24428697ee19Smrg else 24438697ee19Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 24448697ee19Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 24458697ee19Smrg fi 2446ab47cfaaSmrg ;; 2447ab47cfaaSmrg 2448ab47cfaaSmrgdarwin* | rhapsody*) 2449ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 2450ab47cfaaSmrg ;; 2451ab47cfaaSmrg 2452ab47cfaaSmrgfreebsd* | dragonfly*) 24535c42550eSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2454ab47cfaaSmrg case $host_cpu in 2455ab47cfaaSmrg i*86 ) 2456ab47cfaaSmrg # Not sure whether the presence of OpenBSD here was a mistake. 2457ab47cfaaSmrg # Let's accept both of them until this is cleared up. 2458ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 2459ab47cfaaSmrg lt_cv_file_magic_cmd=/usr/bin/file 2460ab47cfaaSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2461ab47cfaaSmrg ;; 2462ab47cfaaSmrg esac 2463ab47cfaaSmrg else 2464ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 2465ab47cfaaSmrg fi 2466ab47cfaaSmrg ;; 2467ab47cfaaSmrg 2468ab47cfaaSmrggnu*) 2469ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 2470ab47cfaaSmrg ;; 2471ab47cfaaSmrg 2472ab47cfaaSmrghpux10.20* | hpux11*) 2473ab47cfaaSmrg lt_cv_file_magic_cmd=/usr/bin/file 2474ab47cfaaSmrg case $host_cpu in 2475ab47cfaaSmrg ia64*) 2476ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 2477ab47cfaaSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 2478ab47cfaaSmrg ;; 2479ab47cfaaSmrg hppa*64*) 2480ab47cfaaSmrg [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]'] 2481ab47cfaaSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 2482ab47cfaaSmrg ;; 2483ab47cfaaSmrg *) 2484ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 2485ab47cfaaSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 2486ab47cfaaSmrg ;; 2487ab47cfaaSmrg esac 2488ab47cfaaSmrg ;; 2489ab47cfaaSmrg 24908697ee19Smrginterix[[3-9]]*) 2491ab47cfaaSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 2492ab47cfaaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 2493ab47cfaaSmrg ;; 2494ab47cfaaSmrg 2495ab47cfaaSmrgirix5* | irix6* | nonstopux*) 2496ab47cfaaSmrg case $LD in 2497ab47cfaaSmrg *-32|*"-32 ") libmagic=32-bit;; 2498ab47cfaaSmrg *-n32|*"-n32 ") libmagic=N32;; 2499ab47cfaaSmrg *-64|*"-64 ") libmagic=64-bit;; 2500ab47cfaaSmrg *) libmagic=never-match;; 2501ab47cfaaSmrg esac 2502ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 2503ab47cfaaSmrg ;; 2504ab47cfaaSmrg 2505ab47cfaaSmrg# This must be Linux ELF. 2506ab47cfaaSmrglinux* | k*bsd*-gnu) 2507ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 2508ab47cfaaSmrg ;; 2509ab47cfaaSmrg 25108697ee19Smrgnetbsd*) 25115c42550eSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2512ab47cfaaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2513ab47cfaaSmrg else 2514ab47cfaaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 2515ab47cfaaSmrg fi 2516ab47cfaaSmrg ;; 2517ab47cfaaSmrg 2518ab47cfaaSmrgnewos6*) 2519ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 2520ab47cfaaSmrg lt_cv_file_magic_cmd=/usr/bin/file 2521ab47cfaaSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 2522ab47cfaaSmrg ;; 2523ab47cfaaSmrg 25245c42550eSmrgnto-qnx*) 25255c42550eSmrg lt_cv_deplibs_check_method=unknown 2526ab47cfaaSmrg ;; 2527ab47cfaaSmrg 2528ab47cfaaSmrgopenbsd*) 25295c42550eSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2530ab47cfaaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 2531ab47cfaaSmrg else 2532ab47cfaaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2533ab47cfaaSmrg fi 2534ab47cfaaSmrg ;; 2535ab47cfaaSmrg 2536ab47cfaaSmrgosf3* | osf4* | osf5*) 2537ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 2538ab47cfaaSmrg ;; 2539ab47cfaaSmrg 25408697ee19Smrgrdos*) 25418697ee19Smrg lt_cv_deplibs_check_method=pass_all 25428697ee19Smrg ;; 25438697ee19Smrg 2544ab47cfaaSmrgsolaris*) 2545ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 2546ab47cfaaSmrg ;; 2547ab47cfaaSmrg 2548ab47cfaaSmrgsysv4 | sysv4.3*) 2549ab47cfaaSmrg case $host_vendor in 2550ab47cfaaSmrg motorola) 2551ab47cfaaSmrg 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]]' 2552ab47cfaaSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 2553ab47cfaaSmrg ;; 2554ab47cfaaSmrg ncr) 2555ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 2556ab47cfaaSmrg ;; 2557ab47cfaaSmrg sequent) 2558ab47cfaaSmrg lt_cv_file_magic_cmd='/bin/file' 2559ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 2560ab47cfaaSmrg ;; 2561ab47cfaaSmrg sni) 2562ab47cfaaSmrg lt_cv_file_magic_cmd='/bin/file' 2563ab47cfaaSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 2564ab47cfaaSmrg lt_cv_file_magic_test_file=/lib/libc.so 2565ab47cfaaSmrg ;; 2566ab47cfaaSmrg siemens) 2567ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 2568ab47cfaaSmrg ;; 2569ab47cfaaSmrg pc) 2570ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 2571ab47cfaaSmrg ;; 2572ab47cfaaSmrg esac 2573ab47cfaaSmrg ;; 2574ab47cfaaSmrg 25755c42550eSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2576ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 2577ab47cfaaSmrg ;; 2578ab47cfaaSmrgesac 2579ab47cfaaSmrg]) 2580ab47cfaaSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 2581ab47cfaaSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 2582ab47cfaaSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 25835c42550eSmrg])# AC_DEPLIBS_CHECK_METHOD 2584ab47cfaaSmrg 2585ab47cfaaSmrg 25865c42550eSmrg# AC_PROG_NM 2587ab47cfaaSmrg# ---------- 25885c42550eSmrg# find the pathname to a BSD-compatible name lister 25895c42550eSmrgAC_DEFUN([AC_PROG_NM], 25905c42550eSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 2591ab47cfaaSmrg[if test -n "$NM"; then 2592ab47cfaaSmrg # Let the user override the test. 2593ab47cfaaSmrg lt_cv_path_NM="$NM" 2594ab47cfaaSmrgelse 2595ab47cfaaSmrg lt_nm_to_check="${ac_tool_prefix}nm" 25968697ee19Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 2597ab47cfaaSmrg lt_nm_to_check="$lt_nm_to_check nm" 2598ab47cfaaSmrg fi 2599ab47cfaaSmrg for lt_tmp_nm in $lt_nm_to_check; do 2600ab47cfaaSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2601ab47cfaaSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 2602ab47cfaaSmrg IFS="$lt_save_ifs" 2603ab47cfaaSmrg test -z "$ac_dir" && ac_dir=. 2604ab47cfaaSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 2605ab47cfaaSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 2606ab47cfaaSmrg # Check to see if the nm accepts a BSD-compat flag. 2607ab47cfaaSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 2608ab47cfaaSmrg # nm: unknown option "B" ignored 2609ab47cfaaSmrg # Tru64's nm complains that /dev/null is an invalid object file 2610ab47cfaaSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 2611ab47cfaaSmrg */dev/null* | *'Invalid file or object type'*) 2612ab47cfaaSmrg lt_cv_path_NM="$tmp_nm -B" 2613ab47cfaaSmrg break 2614ab47cfaaSmrg ;; 2615ab47cfaaSmrg *) 2616ab47cfaaSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 2617ab47cfaaSmrg */dev/null*) 2618ab47cfaaSmrg lt_cv_path_NM="$tmp_nm -p" 2619ab47cfaaSmrg break 2620ab47cfaaSmrg ;; 2621ab47cfaaSmrg *) 2622ab47cfaaSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 2623ab47cfaaSmrg continue # so that we can try to find one that supports BSD flags 2624ab47cfaaSmrg ;; 2625ab47cfaaSmrg esac 2626ab47cfaaSmrg ;; 2627ab47cfaaSmrg esac 2628ab47cfaaSmrg fi 2629ab47cfaaSmrg done 2630ab47cfaaSmrg IFS="$lt_save_ifs" 2631ab47cfaaSmrg done 26325c42550eSmrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 2633ab47cfaaSmrgfi]) 26345c42550eSmrgNM="$lt_cv_path_NM" 26355c42550eSmrg])# AC_PROG_NM 2636ab47cfaaSmrg 26371473d951Smrg 26385c42550eSmrg# AC_CHECK_LIBM 26395c42550eSmrg# ------------- 2640ab47cfaaSmrg# check for math library 26415c42550eSmrgAC_DEFUN([AC_CHECK_LIBM], 2642ab47cfaaSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2643ab47cfaaSmrgLIBM= 2644ab47cfaaSmrgcase $host in 2645ab47cfaaSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 2646ab47cfaaSmrg # These system don't have libm, or don't need it 2647ab47cfaaSmrg ;; 2648ab47cfaaSmrg*-ncr-sysv4.3*) 2649ab47cfaaSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 2650ab47cfaaSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 2651ab47cfaaSmrg ;; 2652ab47cfaaSmrg*) 2653ab47cfaaSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 2654ab47cfaaSmrg ;; 2655ab47cfaaSmrgesac 26565c42550eSmrg])# AC_CHECK_LIBM 2657ab47cfaaSmrg 2658ab47cfaaSmrg 26595c42550eSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 26605c42550eSmrg# ----------------------------------- 26615c42550eSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and 26625c42550eSmrg# LTDLINCL to the include flags for the libltdl header and adds 26635c42550eSmrg# --enable-ltdl-convenience to the configure arguments. Note that 26645c42550eSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 26655c42550eSmrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 26665c42550eSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 26675c42550eSmrg# (note the single quotes!). If your package is not flat and you're not 26685c42550eSmrg# using automake, define top_builddir and top_srcdir appropriately in 26695c42550eSmrg# the Makefiles. 26705c42550eSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 26715c42550eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 26725c42550eSmrg case $enable_ltdl_convenience in 26735c42550eSmrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 26745c42550eSmrg "") enable_ltdl_convenience=yes 26755c42550eSmrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 26765c42550eSmrg esac 26775c42550eSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 26785c42550eSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 26795c42550eSmrg # For backwards non-gettext consistent compatibility... 26805c42550eSmrg INCLTDL="$LTDLINCL" 26815c42550eSmrg])# AC_LIBLTDL_CONVENIENCE 2682ab47cfaaSmrg 2683ab47cfaaSmrg 26845c42550eSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 26855c42550eSmrg# ----------------------------------- 26865c42550eSmrg# sets LIBLTDL to the link flags for the libltdl installable library and 26875c42550eSmrg# LTDLINCL to the include flags for the libltdl header and adds 26885c42550eSmrg# --enable-ltdl-install to the configure arguments. Note that 26895c42550eSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 26905c42550eSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 26915c42550eSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 26925c42550eSmrg# '${top_srcdir}/' (note the single quotes!). If your package is not 26935c42550eSmrg# flat and you're not using automake, define top_builddir and top_srcdir 26945c42550eSmrg# appropriately in the Makefiles. 26955c42550eSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 26965c42550eSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 26975c42550eSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 26985c42550eSmrg AC_CHECK_LIB(ltdl, lt_dlinit, 26995c42550eSmrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 27005c42550eSmrg [if test x"$enable_ltdl_install" = xno; then 27015c42550eSmrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 27025c42550eSmrg else 27035c42550eSmrg enable_ltdl_install=yes 27045c42550eSmrg fi 27055c42550eSmrg ]) 27065c42550eSmrg if test x"$enable_ltdl_install" = x"yes"; then 27075c42550eSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 27085c42550eSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 27095c42550eSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 27105c42550eSmrg else 27115c42550eSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 27125c42550eSmrg LIBLTDL="-lltdl" 27135c42550eSmrg LTDLINCL= 27145c42550eSmrg fi 27155c42550eSmrg # For backwards non-gettext consistent compatibility... 27165c42550eSmrg INCLTDL="$LTDLINCL" 27175c42550eSmrg])# AC_LIBLTDL_INSTALLABLE 2718ab47cfaaSmrg 2719ab47cfaaSmrg 27205c42550eSmrg# AC_LIBTOOL_CXX 27215c42550eSmrg# -------------- 27225c42550eSmrg# enable support for C++ libraries 27235c42550eSmrgAC_DEFUN([AC_LIBTOOL_CXX], 27245c42550eSmrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 27255c42550eSmrg])# AC_LIBTOOL_CXX 2726ab47cfaaSmrg 2727ab47cfaaSmrg 27285c42550eSmrg# _LT_AC_LANG_CXX 27295c42550eSmrg# --------------- 27305c42550eSmrgAC_DEFUN([_LT_AC_LANG_CXX], 27315c42550eSmrg[AC_REQUIRE([AC_PROG_CXX]) 27325c42550eSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 27335c42550eSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 27345c42550eSmrg])# _LT_AC_LANG_CXX 2735ab47cfaaSmrg 27365c42550eSmrg# _LT_AC_PROG_CXXCPP 27375c42550eSmrg# ------------------ 27385c42550eSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 27391473d951Smrg[ 27405c42550eSmrgAC_REQUIRE([AC_PROG_CXX]) 27415c42550eSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 27425c42550eSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 27435c42550eSmrg (test "X$CXX" != "Xg++"))) ; then 27445c42550eSmrg AC_PROG_CXXCPP 27455c42550eSmrgfi 27465c42550eSmrg])# _LT_AC_PROG_CXXCPP 2747ab47cfaaSmrg 27485c42550eSmrg# AC_LIBTOOL_F77 27495c42550eSmrg# -------------- 27505c42550eSmrg# enable support for Fortran 77 libraries 27515c42550eSmrgAC_DEFUN([AC_LIBTOOL_F77], 27525c42550eSmrg[AC_REQUIRE([_LT_AC_LANG_F77]) 27535c42550eSmrg])# AC_LIBTOOL_F77 2754ab47cfaaSmrg 2755ab47cfaaSmrg 27565c42550eSmrg# _LT_AC_LANG_F77 27575c42550eSmrg# --------------- 27585c42550eSmrgAC_DEFUN([_LT_AC_LANG_F77], 27595c42550eSmrg[AC_REQUIRE([AC_PROG_F77]) 27605c42550eSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 27615c42550eSmrg])# _LT_AC_LANG_F77 2762ab47cfaaSmrg 2763ab47cfaaSmrg 27645c42550eSmrg# AC_LIBTOOL_GCJ 27655c42550eSmrg# -------------- 27665c42550eSmrg# enable support for GCJ libraries 27675c42550eSmrgAC_DEFUN([AC_LIBTOOL_GCJ], 27685c42550eSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 27695c42550eSmrg])# AC_LIBTOOL_GCJ 2770ab47cfaaSmrg 2771ab47cfaaSmrg 27725c42550eSmrg# _LT_AC_LANG_GCJ 27735c42550eSmrg# --------------- 27745c42550eSmrgAC_DEFUN([_LT_AC_LANG_GCJ], 27755c42550eSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 27765c42550eSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 27775c42550eSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 27785c42550eSmrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 27795c42550eSmrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 27805c42550eSmrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 27815c42550eSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 27825c42550eSmrg])# _LT_AC_LANG_GCJ 27835c42550eSmrg 27845c42550eSmrg 27855c42550eSmrg# AC_LIBTOOL_RC 27865c42550eSmrg# ------------- 27875c42550eSmrg# enable support for Windows resource files 27885c42550eSmrgAC_DEFUN([AC_LIBTOOL_RC], 27895c42550eSmrg[AC_REQUIRE([LT_AC_PROG_RC]) 27905c42550eSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 27915c42550eSmrg])# AC_LIBTOOL_RC 2792ab47cfaaSmrg 2793ab47cfaaSmrg 27945c42550eSmrg# AC_LIBTOOL_LANG_C_CONFIG 27955c42550eSmrg# ------------------------ 27965c42550eSmrg# Ensure that the configuration vars for the C compiler are 27975c42550eSmrg# suitably defined. Those variables are subsequently used by 27985c42550eSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 27995c42550eSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 28005c42550eSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 28015c42550eSmrg[lt_save_CC="$CC" 28025c42550eSmrgAC_LANG_PUSH(C) 2803ab47cfaaSmrg 28045c42550eSmrg# Source file extension for C test sources. 28055c42550eSmrgac_ext=c 28065c42550eSmrg 28075c42550eSmrg# Object file extension for compiled C test sources. 28085c42550eSmrgobjext=o 28095c42550eSmrg_LT_AC_TAGVAR(objext, $1)=$objext 28105c42550eSmrg 28115c42550eSmrg# Code to be used in simple compile tests 28125c42550eSmrglt_simple_compile_test_code="int some_variable = 0;" 28135c42550eSmrg 28145c42550eSmrg# Code to be used in simple link tests 28155c42550eSmrglt_simple_link_test_code='int main(){return(0);}' 28165c42550eSmrg 28175c42550eSmrg_LT_AC_SYS_COMPILER 28185c42550eSmrg 28195c42550eSmrg# save warnings/boilerplate of simple test code 28205c42550eSmrg_LT_COMPILER_BOILERPLATE 28215c42550eSmrg_LT_LINKER_BOILERPLATE 28225c42550eSmrg 28235c42550eSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 28245c42550eSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 28255c42550eSmrgAC_LIBTOOL_PROG_CC_C_O($1) 28265c42550eSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 28275c42550eSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 28285c42550eSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 28295c42550eSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 28305c42550eSmrgAC_LIBTOOL_SYS_LIB_STRIP 28315c42550eSmrgAC_LIBTOOL_DLOPEN_SELF 28325c42550eSmrg 28335c42550eSmrg# Report which library types will actually be built 28345c42550eSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 28355c42550eSmrgAC_MSG_RESULT([$can_build_shared]) 28365c42550eSmrg 28375c42550eSmrgAC_MSG_CHECKING([whether to build shared libraries]) 28385c42550eSmrgtest "$can_build_shared" = "no" && enable_shared=no 28395c42550eSmrg 28405c42550eSmrg# On AIX, shared libraries and static libraries use the same namespace, and 28415c42550eSmrg# are all built from PIC. 28425c42550eSmrgcase $host_os in 28435c42550eSmrgaix3*) 28445c42550eSmrg test "$enable_shared" = yes && enable_static=no 28455c42550eSmrg if test -n "$RANLIB"; then 28465c42550eSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 28475c42550eSmrg postinstall_cmds='$RANLIB $lib' 28481473d951Smrg fi 28495c42550eSmrg ;; 2850ab47cfaaSmrg 28515c42550eSmrgaix[[4-9]]*) 28525c42550eSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 28535c42550eSmrg test "$enable_shared" = yes && enable_static=no 28545c42550eSmrg fi 28555c42550eSmrg ;; 28565c42550eSmrgesac 28575c42550eSmrgAC_MSG_RESULT([$enable_shared]) 2858ab47cfaaSmrg 28595c42550eSmrgAC_MSG_CHECKING([whether to build static libraries]) 28605c42550eSmrg# Make sure either enable_shared or enable_static is yes. 28615c42550eSmrgtest "$enable_shared" = yes || enable_static=yes 28625c42550eSmrgAC_MSG_RESULT([$enable_static]) 2863ab47cfaaSmrg 28645c42550eSmrgAC_LIBTOOL_CONFIG($1) 2865ab47cfaaSmrg 28665c42550eSmrgAC_LANG_POP 28675c42550eSmrgCC="$lt_save_CC" 28685c42550eSmrg])# AC_LIBTOOL_LANG_C_CONFIG 2869ab47cfaaSmrg 2870ab47cfaaSmrg 28715c42550eSmrg# AC_LIBTOOL_LANG_CXX_CONFIG 28725c42550eSmrg# -------------------------- 28735c42550eSmrg# Ensure that the configuration vars for the C compiler are 28745c42550eSmrg# suitably defined. Those variables are subsequently used by 28755c42550eSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 28765c42550eSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 28775c42550eSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 28785c42550eSmrg[AC_LANG_PUSH(C++) 28795c42550eSmrgAC_REQUIRE([AC_PROG_CXX]) 28805c42550eSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 28815c42550eSmrg 28825c42550eSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 28835c42550eSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 28845c42550eSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 28855c42550eSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 28865c42550eSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 28875c42550eSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 28885c42550eSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 28895c42550eSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 28905c42550eSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 28915c42550eSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 28925c42550eSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 28935c42550eSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 28945c42550eSmrg_LT_AC_TAGVAR(module_cmds, $1)= 28955c42550eSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 28965c42550eSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 28975c42550eSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 28985c42550eSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 28995c42550eSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 29005c42550eSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 2901ab47cfaaSmrg 29025c42550eSmrg# Dependencies to place before and after the object being linked: 29035c42550eSmrg_LT_AC_TAGVAR(predep_objects, $1)= 29045c42550eSmrg_LT_AC_TAGVAR(postdep_objects, $1)= 29055c42550eSmrg_LT_AC_TAGVAR(predeps, $1)= 29065c42550eSmrg_LT_AC_TAGVAR(postdeps, $1)= 29075c42550eSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 29085c42550eSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 2909ab47cfaaSmrg 29105c42550eSmrg# Source file extension for C++ test sources. 29115c42550eSmrgac_ext=cpp 2912ab47cfaaSmrg 29135c42550eSmrg# Object file extension for compiled C++ test sources. 29145c42550eSmrgobjext=o 29155c42550eSmrg_LT_AC_TAGVAR(objext, $1)=$objext 29165c42550eSmrg 29175c42550eSmrg# Code to be used in simple compile tests 29185c42550eSmrglt_simple_compile_test_code="int some_variable = 0;" 29195c42550eSmrg 29205c42550eSmrg# Code to be used in simple link tests 29215c42550eSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 29225c42550eSmrg 29235c42550eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 29245c42550eSmrg_LT_AC_SYS_COMPILER 29255c42550eSmrg 29265c42550eSmrg# save warnings/boilerplate of simple test code 29275c42550eSmrg_LT_COMPILER_BOILERPLATE 29285c42550eSmrg_LT_LINKER_BOILERPLATE 29295c42550eSmrg 29305c42550eSmrg# Allow CC to be a program name with arguments. 29315c42550eSmrglt_save_CC=$CC 29325c42550eSmrglt_save_LD=$LD 29335c42550eSmrglt_save_GCC=$GCC 29345c42550eSmrgGCC=$GXX 29355c42550eSmrglt_save_with_gnu_ld=$with_gnu_ld 29365c42550eSmrglt_save_path_LD=$lt_cv_path_LD 29375c42550eSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 29385c42550eSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 29395c42550eSmrgelse 29405c42550eSmrg $as_unset lt_cv_prog_gnu_ld 29415c42550eSmrgfi 29425c42550eSmrgif test -n "${lt_cv_path_LDCXX+set}"; then 29435c42550eSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 29445c42550eSmrgelse 29455c42550eSmrg $as_unset lt_cv_path_LD 29465c42550eSmrgfi 29475c42550eSmrgtest -z "${LDCXX+set}" || LD=$LDCXX 29485c42550eSmrgCC=${CXX-"c++"} 29495c42550eSmrgcompiler=$CC 29505c42550eSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 29515c42550eSmrg_LT_CC_BASENAME([$compiler]) 29525c42550eSmrg 29535c42550eSmrg# We don't want -fno-exception wen compiling C++ code, so set the 29545c42550eSmrg# no_builtin_flag separately 29555c42550eSmrgif test "$GXX" = yes; then 29565c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 29575c42550eSmrgelse 29585c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 29595c42550eSmrgfi 29605c42550eSmrg 29615c42550eSmrgif test "$GXX" = yes; then 29625c42550eSmrg # Set up default GNU C++ configuration 29635c42550eSmrg 29645c42550eSmrg AC_PROG_LD 29655c42550eSmrg 29665c42550eSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 29675c42550eSmrg # archiving commands below assume that GNU ld is being used. 29685c42550eSmrg if test "$with_gnu_ld" = yes; then 29695c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 29705c42550eSmrg _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' 29715c42550eSmrg 29725c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 29735c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 29745c42550eSmrg 29755c42550eSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 29765c42550eSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 29775c42550eSmrg # investigate it a little bit more. (MM) 29785c42550eSmrg wlarc='${wl}' 29795c42550eSmrg 29805c42550eSmrg # ancient GNU ld didn't support --whole-archive et. al. 29815c42550eSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 29825c42550eSmrg grep 'no-whole-archive' > /dev/null; then 29835c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 2984ab47cfaaSmrg else 29855c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2986ab47cfaaSmrg fi 2987ab47cfaaSmrg else 29885c42550eSmrg with_gnu_ld=no 29895c42550eSmrg wlarc= 29905c42550eSmrg 29915c42550eSmrg # A generic and very simple default shared library creation 29925c42550eSmrg # command for GNU C++ for the case where it uses the native 29935c42550eSmrg # linker, instead of GNU ld. If possible, this setting should 29945c42550eSmrg # overridden to take advantage of the native linker features on 29955c42550eSmrg # the platform it is being used on. 29965c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 2997ab47cfaaSmrg fi 2998ab47cfaaSmrg 29995c42550eSmrg # Commands to make compiler produce verbose output that lists 30005c42550eSmrg # what "hidden" libraries, object files and flags are used when 30015c42550eSmrg # linking a shared library. 30025c42550eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 30035c42550eSmrg 3004ab47cfaaSmrgelse 30055c42550eSmrg GXX=no 30065c42550eSmrg with_gnu_ld=no 30075c42550eSmrg wlarc= 3008ab47cfaaSmrgfi 3009ab47cfaaSmrg 30105c42550eSmrg# PORTME: fill in a description of your system's C++ link characteristics 30115c42550eSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 30125c42550eSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 30135c42550eSmrgcase $host_os in 30145c42550eSmrg aix3*) 30155c42550eSmrg # FIXME: insert proper C++ library support 30165c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 30175c42550eSmrg ;; 30185c42550eSmrg aix[[4-9]]*) 30195c42550eSmrg if test "$host_cpu" = ia64; then 30205c42550eSmrg # On IA64, the linker does run time linking by default, so we don't 30215c42550eSmrg # have to do anything special. 30225c42550eSmrg aix_use_runtimelinking=no 30235c42550eSmrg exp_sym_flag='-Bexport' 30245c42550eSmrg no_entry_flag="" 30255c42550eSmrg else 30265c42550eSmrg aix_use_runtimelinking=no 30275c42550eSmrg 30285c42550eSmrg # Test if we are trying to use run time linking or normal 30295c42550eSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 30305c42550eSmrg # need to do runtime linking. 30315c42550eSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 30325c42550eSmrg for ld_flag in $LDFLAGS; do 30335c42550eSmrg case $ld_flag in 30345c42550eSmrg *-brtl*) 30355c42550eSmrg aix_use_runtimelinking=yes 30365c42550eSmrg break 30375c42550eSmrg ;; 30385c42550eSmrg esac 30395c42550eSmrg done 30405c42550eSmrg ;; 30415c42550eSmrg esac 3042ab47cfaaSmrg 30435c42550eSmrg exp_sym_flag='-bexport' 30445c42550eSmrg no_entry_flag='-bnoentry' 30455c42550eSmrg fi 3046ab47cfaaSmrg 30475c42550eSmrg # When large executables or shared objects are built, AIX ld can 30485c42550eSmrg # have problems creating the table of contents. If linking a library 30495c42550eSmrg # or program results in "error TOC overflow" add -mminimal-toc to 30505c42550eSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 30515c42550eSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 3052ab47cfaaSmrg 30535c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 30545c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 30555c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 30565c42550eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3057ab47cfaaSmrg 30585c42550eSmrg if test "$GXX" = yes; then 30595c42550eSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 30605c42550eSmrg # We only want to do this on AIX 4.2 and lower, the check 30615c42550eSmrg # below for broken collect2 doesn't work under 4.3+ 30625c42550eSmrg collect2name=`${CC} -print-prog-name=collect2` 30635c42550eSmrg if test -f "$collect2name" && \ 30645c42550eSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 30655c42550eSmrg then 30665c42550eSmrg # We have reworked collect2 30675c42550eSmrg : 30685c42550eSmrg else 30695c42550eSmrg # We have old collect2 30705c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 30715c42550eSmrg # It fails to find uninstalled libraries when the uninstalled 30725c42550eSmrg # path is not listed in the libpath. Setting hardcode_minus_L 30735c42550eSmrg # to unsupported forces relinking 30745c42550eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 30755c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 30765c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 30775c42550eSmrg fi 30785c42550eSmrg ;; 30795c42550eSmrg esac 30805c42550eSmrg shared_flag='-shared' 30815c42550eSmrg if test "$aix_use_runtimelinking" = yes; then 30825c42550eSmrg shared_flag="$shared_flag "'${wl}-G' 30835c42550eSmrg fi 30845c42550eSmrg else 30855c42550eSmrg # not using gcc 3086ab47cfaaSmrg if test "$host_cpu" = ia64; then 30875c42550eSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 30885c42550eSmrg # chokes on -Wl,-G. The following line is correct: 30895c42550eSmrg shared_flag='-G' 30905c42550eSmrg else 30915c42550eSmrg if test "$aix_use_runtimelinking" = yes; then 30925c42550eSmrg shared_flag='${wl}-G' 30935c42550eSmrg else 30945c42550eSmrg shared_flag='${wl}-bM:SRE' 30955c42550eSmrg fi 30965c42550eSmrg fi 30975c42550eSmrg fi 30985c42550eSmrg 30995c42550eSmrg # It seems that -bexpall does not export symbols beginning with 31005c42550eSmrg # underscore (_), so it is better to generate a list of symbols to export. 31015c42550eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 31025c42550eSmrg if test "$aix_use_runtimelinking" = yes; then 31035c42550eSmrg # Warning - without using the other runtime loading flags (-brtl), 31045c42550eSmrg # -berok will link without error, but may produce a broken library. 31055c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 31065c42550eSmrg # Determine the default libpath from the value encoded in an empty executable. 31075c42550eSmrg _LT_AC_SYS_LIBPATH_AIX 31085c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 31095c42550eSmrg 31105c42550eSmrg _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" 31115c42550eSmrg else 31125c42550eSmrg if test "$host_cpu" = ia64; then 31135c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 31145c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 31155c42550eSmrg _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" 31165c42550eSmrg else 31175c42550eSmrg # Determine the default libpath from the value encoded in an empty executable. 31185c42550eSmrg _LT_AC_SYS_LIBPATH_AIX 31195c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 31205c42550eSmrg # Warning - without using the other run time loading flags, 31215c42550eSmrg # -berok will link without error, but may produce a broken library. 31225c42550eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 31235c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 31245c42550eSmrg # Exported symbols can be pulled into shared objects from archives 31255c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 31265c42550eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 31275c42550eSmrg # This is similar to how AIX traditionally builds its shared libraries. 31285c42550eSmrg _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' 31295c42550eSmrg fi 31305c42550eSmrg fi 31315c42550eSmrg ;; 31325c42550eSmrg 31335c42550eSmrg beos*) 31345c42550eSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 31355c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 31365c42550eSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 31375c42550eSmrg # support --undefined. This deserves some investigation. FIXME 31385c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 31395c42550eSmrg else 31405c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 31415c42550eSmrg fi 31425c42550eSmrg ;; 31435c42550eSmrg 31445c42550eSmrg chorus*) 31455c42550eSmrg case $cc_basename in 31465c42550eSmrg *) 31475c42550eSmrg # FIXME: insert proper C++ library support 31485c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 31495c42550eSmrg ;; 31505c42550eSmrg esac 31515c42550eSmrg ;; 31525c42550eSmrg 31535c42550eSmrg cygwin* | mingw* | pw32*) 31545c42550eSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 31555c42550eSmrg # as there is no search path for DLLs. 31565c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 31575c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 31585c42550eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 31595c42550eSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 31605c42550eSmrg 31615c42550eSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 31625c42550eSmrg _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' 31635c42550eSmrg # If the export-symbols file already is a .def file (1st line 31645c42550eSmrg # is EXPORTS), use it as is; otherwise, prepend... 31655c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 31665c42550eSmrg cp $export_symbols $output_objdir/$soname.def; 31675c42550eSmrg else 31685c42550eSmrg echo EXPORTS > $output_objdir/$soname.def; 31695c42550eSmrg cat $export_symbols >> $output_objdir/$soname.def; 31705c42550eSmrg fi~ 31715c42550eSmrg $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' 31725c42550eSmrg else 31735c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 31745c42550eSmrg fi 31755c42550eSmrg ;; 31765c42550eSmrg darwin* | rhapsody*) 31775c42550eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 31785c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 31795c42550eSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 31805c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 31815c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 31825c42550eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 31835c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 31845c42550eSmrg if test "$GXX" = yes ; then 31855c42550eSmrg output_verbose_link_cmd='echo' 31865c42550eSmrg _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}" 31875c42550eSmrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 31885c42550eSmrg _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}" 31895c42550eSmrg _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}" 31905c42550eSmrg if test "$lt_cv_apple_cc_single_mod" != "yes"; then 31915c42550eSmrg _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}" 31925c42550eSmrg _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}" 31935c42550eSmrg fi 31945c42550eSmrg else 31955c42550eSmrg case $cc_basename in 31965c42550eSmrg xlc*) 31975c42550eSmrg output_verbose_link_cmd='echo' 31985c42550eSmrg _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' 31995c42550eSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 32005c42550eSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 32015c42550eSmrg _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}' 32025c42550eSmrg _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}' 32035c42550eSmrg ;; 32045c42550eSmrg *) 32055c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32065c42550eSmrg ;; 32075c42550eSmrg esac 32085c42550eSmrg fi 32095c42550eSmrg ;; 32105c42550eSmrg 32115c42550eSmrg dgux*) 32125c42550eSmrg case $cc_basename in 32135c42550eSmrg ec++*) 32145c42550eSmrg # FIXME: insert proper C++ library support 32155c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32165c42550eSmrg ;; 32175c42550eSmrg ghcx*) 32185c42550eSmrg # Green Hills C++ Compiler 32195c42550eSmrg # FIXME: insert proper C++ library support 32205c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32215c42550eSmrg ;; 32225c42550eSmrg *) 32235c42550eSmrg # FIXME: insert proper C++ library support 32245c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32255c42550eSmrg ;; 32265c42550eSmrg esac 32275c42550eSmrg ;; 32285c42550eSmrg freebsd[[12]]*) 32295c42550eSmrg # C++ shared libraries reported to be fairly broken before switch to ELF 32305c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32315c42550eSmrg ;; 32325c42550eSmrg freebsd-elf*) 32335c42550eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 32345c42550eSmrg ;; 32355c42550eSmrg freebsd* | dragonfly*) 32365c42550eSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 32375c42550eSmrg # conventions 32385c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 32395c42550eSmrg ;; 32405c42550eSmrg gnu*) 32415c42550eSmrg ;; 32425c42550eSmrg hpux9*) 32435c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 32445c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 32455c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 32465c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 32475c42550eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 32485c42550eSmrg # but as the default 32495c42550eSmrg # location of the library. 32505c42550eSmrg 32515c42550eSmrg case $cc_basename in 32525c42550eSmrg CC*) 32535c42550eSmrg # FIXME: insert proper C++ library support 32545c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 32555c42550eSmrg ;; 32565c42550eSmrg aCC*) 32575c42550eSmrg _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' 32585c42550eSmrg # Commands to make compiler produce verbose output that lists 32595c42550eSmrg # what "hidden" libraries, object files and flags are used when 32605c42550eSmrg # linking a shared library. 32615c42550eSmrg # 32625c42550eSmrg # There doesn't appear to be a way to prevent this compiler from 32635c42550eSmrg # explicitly linking system object files so we need to strip them 32645c42550eSmrg # from the output so that they don't get included in the library 32655c42550eSmrg # dependencies. 32665c42550eSmrg 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' 32675c42550eSmrg ;; 32685c42550eSmrg *) 32695c42550eSmrg if test "$GXX" = yes; then 32705c42550eSmrg _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' 32715c42550eSmrg else 32725c42550eSmrg # FIXME: insert proper C++ library support 32735c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3274ab47cfaaSmrg fi 3275ab47cfaaSmrg ;; 32765c42550eSmrg esac 32775c42550eSmrg ;; 32785c42550eSmrg hpux10*|hpux11*) 32795c42550eSmrg if test $with_gnu_ld = no; then 32805c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 32815c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3282ab47cfaaSmrg 3283ab47cfaaSmrg case $host_cpu in 32845c42550eSmrg hppa*64*|ia64*) ;; 32855c42550eSmrg *) 32865c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3287ab47cfaaSmrg ;; 3288ab47cfaaSmrg esac 32895c42550eSmrg fi 32905c42550eSmrg case $host_cpu in 32915c42550eSmrg hppa*64*|ia64*) 32925c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 32935c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 32945c42550eSmrg ;; 32955c42550eSmrg *) 32965c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 32975c42550eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 32985c42550eSmrg # but as the default 32995c42550eSmrg # location of the library. 3300ab47cfaaSmrg ;; 33015c42550eSmrg esac 33021473d951Smrg 33035c42550eSmrg case $cc_basename in 33045c42550eSmrg CC*) 33055c42550eSmrg # FIXME: insert proper C++ library support 33065c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3307ab47cfaaSmrg ;; 33085c42550eSmrg aCC*) 33095c42550eSmrg case $host_cpu in 33105c42550eSmrg hppa*64*) 33115c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33125c42550eSmrg ;; 33135c42550eSmrg ia64*) 33145c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33155c42550eSmrg ;; 33165c42550eSmrg *) 33175c42550eSmrg _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' 3318ab47cfaaSmrg ;; 3319ab47cfaaSmrg esac 33205c42550eSmrg # Commands to make compiler produce verbose output that lists 33215c42550eSmrg # what "hidden" libraries, object files and flags are used when 33225c42550eSmrg # linking a shared library. 33235c42550eSmrg # 33245c42550eSmrg # There doesn't appear to be a way to prevent this compiler from 33255c42550eSmrg # explicitly linking system object files so we need to strip them 33265c42550eSmrg # from the output so that they don't get included in the library 33275c42550eSmrg # dependencies. 33285c42550eSmrg 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' 3329ab47cfaaSmrg ;; 33305c42550eSmrg *) 33315c42550eSmrg if test "$GXX" = yes; then 33325c42550eSmrg if test $with_gnu_ld = no; then 3333ab47cfaaSmrg case $host_cpu in 33345c42550eSmrg hppa*64*) 33355c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 33365c42550eSmrg ;; 33375c42550eSmrg ia64*) 33385c42550eSmrg _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' 3339ab47cfaaSmrg ;; 3340ab47cfaaSmrg *) 33415c42550eSmrg _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' 3342ab47cfaaSmrg ;; 3343ab47cfaaSmrg esac 33445c42550eSmrg fi 33455c42550eSmrg else 33465c42550eSmrg # FIXME: insert proper C++ library support 33475c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 33485c42550eSmrg fi 3349ab47cfaaSmrg ;; 33505c42550eSmrg esac 33515c42550eSmrg ;; 33525c42550eSmrg interix[[3-9]]*) 33535c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 33545c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 33555c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 33565c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 33575c42550eSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 33585c42550eSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 33595c42550eSmrg # default) and relocated if they conflict, which is a slow very memory 33605c42550eSmrg # consuming and fragmenting process. To avoid this, we pick a random, 33615c42550eSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 33625c42550eSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 33635c42550eSmrg _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' 33645c42550eSmrg _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' 33655c42550eSmrg ;; 33665c42550eSmrg irix5* | irix6*) 33675c42550eSmrg case $cc_basename in 33685c42550eSmrg CC*) 33695c42550eSmrg # SGI C++ 33705c42550eSmrg _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' 33715c42550eSmrg 33725c42550eSmrg # Archives containing C++ object files must be created using 33735c42550eSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 33745c42550eSmrg # necessary to make sure instantiated templates are included 33755c42550eSmrg # in the archive. 33765c42550eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 3377ab47cfaaSmrg ;; 33785c42550eSmrg *) 33795c42550eSmrg if test "$GXX" = yes; then 33805c42550eSmrg if test "$with_gnu_ld" = no; then 33815c42550eSmrg _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' 33825c42550eSmrg else 33835c42550eSmrg _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' 33845c42550eSmrg fi 33855c42550eSmrg fi 33865c42550eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 33875c42550eSmrg ;; 33885c42550eSmrg esac 33895c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 33905c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 33915c42550eSmrg ;; 33925c42550eSmrg linux* | k*bsd*-gnu) 33935c42550eSmrg case $cc_basename in 33945c42550eSmrg KCC*) 33955c42550eSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 33965c42550eSmrg 33975c42550eSmrg # KCC will only create a shared library if the output file 33985c42550eSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 33995c42550eSmrg # to its proper name (with version) after linking. 34005c42550eSmrg _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' 34015c42550eSmrg _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' 34025c42550eSmrg # Commands to make compiler produce verbose output that lists 34035c42550eSmrg # what "hidden" libraries, object files and flags are used when 34045c42550eSmrg # linking a shared library. 34055c42550eSmrg # 34065c42550eSmrg # There doesn't appear to be a way to prevent this compiler from 34075c42550eSmrg # explicitly linking system object files so we need to strip them 34085c42550eSmrg # from the output so that they don't get included in the library 34095c42550eSmrg # dependencies. 34105c42550eSmrg 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' 34115c42550eSmrg 34125c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 34135c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 34145c42550eSmrg 34155c42550eSmrg # Archives containing C++ object files must be created using 34165c42550eSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 34175c42550eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 34185c42550eSmrg ;; 34195c42550eSmrg icpc*) 34205c42550eSmrg # Intel C++ 34215c42550eSmrg with_gnu_ld=yes 34225c42550eSmrg # version 8.0 and above of icpc choke on multiply defined symbols 34235c42550eSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 34245c42550eSmrg # earlier do not add the objects themselves. 34255c42550eSmrg case `$CC -V 2>&1` in 34265c42550eSmrg *"Version 7."*) 34275c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 34285c42550eSmrg _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' 34295c42550eSmrg ;; 34305c42550eSmrg *) # Version 8.0 or newer 34315c42550eSmrg tmp_idyn= 34325c42550eSmrg case $host_cpu in 34335c42550eSmrg ia64*) tmp_idyn=' -i_dynamic';; 34345c42550eSmrg esac 34355c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 34365c42550eSmrg _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' 34375c42550eSmrg ;; 34388697ee19Smrg esac 34395c42550eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 34405c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 34415c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 34425c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 34438697ee19Smrg ;; 34445c42550eSmrg pgCC* | pgcpp*) 34455c42550eSmrg # Portland Group C++ compiler 34465c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 34475c42550eSmrg _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' 34485c42550eSmrg 34495c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 34505c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 34515c42550eSmrg _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' 34525c42550eSmrg ;; 34535c42550eSmrg cxx*) 34545c42550eSmrg # Compaq C++ 34555c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 34565c42550eSmrg _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' 34575c42550eSmrg 34585c42550eSmrg runpath_var=LD_RUN_PATH 34595c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 34605c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 34615c42550eSmrg 34625c42550eSmrg # Commands to make compiler produce verbose output that lists 34635c42550eSmrg # what "hidden" libraries, object files and flags are used when 34645c42550eSmrg # linking a shared library. 34655c42550eSmrg # 34665c42550eSmrg # There doesn't appear to be a way to prevent this compiler from 34675c42550eSmrg # explicitly linking system object files so we need to strip them 34685c42550eSmrg # from the output so that they don't get included in the library 34695c42550eSmrg # dependencies. 34705c42550eSmrg 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' 34715c42550eSmrg ;; 34725c42550eSmrg *) 34735c42550eSmrg case `$CC -V 2>&1 | sed 5q` in 34745c42550eSmrg *Sun\ C*) 34755c42550eSmrg # Sun C++ 5.9 34765c42550eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 34775c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 34785c42550eSmrg _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' 34795c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 34805c42550eSmrg _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' 34815c42550eSmrg 34825c42550eSmrg # Not sure whether something based on 34835c42550eSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 34845c42550eSmrg # would be better. 34855c42550eSmrg output_verbose_link_cmd='echo' 34865c42550eSmrg 34875c42550eSmrg # Archives containing C++ object files must be created using 34885c42550eSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 34895c42550eSmrg # necessary to make sure instantiated templates are included 34905c42550eSmrg # in the archive. 34915c42550eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 34925c42550eSmrg ;; 34931473d951Smrg esac 3494ab47cfaaSmrg ;; 34955c42550eSmrg esac 34965c42550eSmrg ;; 34975c42550eSmrg lynxos*) 34985c42550eSmrg # FIXME: insert proper C++ library support 34995c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35005c42550eSmrg ;; 35015c42550eSmrg m88k*) 35025c42550eSmrg # FIXME: insert proper C++ library support 35035c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35045c42550eSmrg ;; 35055c42550eSmrg mvs*) 35065c42550eSmrg case $cc_basename in 35075c42550eSmrg cxx*) 35085c42550eSmrg # FIXME: insert proper C++ library support 35095c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3510ab47cfaaSmrg ;; 35115c42550eSmrg *) 35125c42550eSmrg # FIXME: insert proper C++ library support 35135c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3514ab47cfaaSmrg ;; 35155c42550eSmrg esac 35165c42550eSmrg ;; 35175c42550eSmrg netbsd*) 35185c42550eSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 35195c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 35205c42550eSmrg wlarc= 35215c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 35225c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 35235c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 35245c42550eSmrg fi 35255c42550eSmrg # Workaround some broken pre-1.5 toolchains 35265c42550eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 35275c42550eSmrg ;; 35285c42550eSmrg openbsd2*) 35295c42550eSmrg # C++ shared libraries are fairly broken 35305c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35315c42550eSmrg ;; 35325c42550eSmrg openbsd*) 35335c42550eSmrg if test -f /usr/libexec/ld.so; then 35345c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 35355c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 35365c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 35375c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 35385c42550eSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 35395c42550eSmrg _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' 35405c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 35415c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 35425c42550eSmrg fi 35435c42550eSmrg output_verbose_link_cmd='echo' 35445c42550eSmrg else 35455c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 35465c42550eSmrg fi 35475c42550eSmrg ;; 35485c42550eSmrg osf3*) 35495c42550eSmrg case $cc_basename in 35505c42550eSmrg KCC*) 35515c42550eSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 35525c42550eSmrg 35535c42550eSmrg # KCC will only create a shared library if the output file 35545c42550eSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 35555c42550eSmrg # to its proper name (with version) after linking. 35565c42550eSmrg _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' 35575c42550eSmrg 35585c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 35595c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 35605c42550eSmrg 35615c42550eSmrg # Archives containing C++ object files must be created using 35625c42550eSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 35635c42550eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 35645c42550eSmrg 3565ab47cfaaSmrg ;; 35665c42550eSmrg RCC*) 35675c42550eSmrg # Rational C++ 2.4.1 35685c42550eSmrg # FIXME: insert proper C++ library support 35695c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3570ab47cfaaSmrg ;; 35715c42550eSmrg cxx*) 35725c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 35735c42550eSmrg _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' 35745c42550eSmrg 35755c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 35765c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 35775c42550eSmrg 35785c42550eSmrg # Commands to make compiler produce verbose output that lists 35795c42550eSmrg # what "hidden" libraries, object files and flags are used when 35805c42550eSmrg # linking a shared library. 35815c42550eSmrg # 35825c42550eSmrg # There doesn't appear to be a way to prevent this compiler from 35835c42550eSmrg # explicitly linking system object files so we need to strip them 35845c42550eSmrg # from the output so that they don't get included in the library 35855c42550eSmrg # dependencies. 35865c42550eSmrg 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' 3587ab47cfaaSmrg ;; 35885c42550eSmrg *) 35895c42550eSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 35905c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 35915c42550eSmrg _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' 35925c42550eSmrg 35935c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 35945c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 35955c42550eSmrg 35965c42550eSmrg # Commands to make compiler produce verbose output that lists 35975c42550eSmrg # what "hidden" libraries, object files and flags are used when 35985c42550eSmrg # linking a shared library. 35995c42550eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 36005c42550eSmrg 36015c42550eSmrg else 36025c42550eSmrg # FIXME: insert proper C++ library support 36035c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36045c42550eSmrg fi 3605ab47cfaaSmrg ;; 36065c42550eSmrg esac 36075c42550eSmrg ;; 36085c42550eSmrg osf4* | osf5*) 36095c42550eSmrg case $cc_basename in 36105c42550eSmrg KCC*) 36115c42550eSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 36125c42550eSmrg 36135c42550eSmrg # KCC will only create a shared library if the output file 36145c42550eSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 36155c42550eSmrg # to its proper name (with version) after linking. 36165c42550eSmrg _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' 36175c42550eSmrg 36185c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 36195c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 36205c42550eSmrg 36215c42550eSmrg # Archives containing C++ object files must be created using 36225c42550eSmrg # the KAI C++ compiler. 36235c42550eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 3624ab47cfaaSmrg ;; 36255c42550eSmrg RCC*) 36265c42550eSmrg # Rational C++ 2.4.1 36275c42550eSmrg # FIXME: insert proper C++ library support 36285c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3629ab47cfaaSmrg ;; 36305c42550eSmrg cxx*) 36315c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 36325c42550eSmrg _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' 36335c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 36345c42550eSmrg echo "-hidden">> $lib.exp~ 36355c42550eSmrg $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~ 36365c42550eSmrg $rm $lib.exp' 36375c42550eSmrg 36385c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 36395c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 36405c42550eSmrg 36415c42550eSmrg # Commands to make compiler produce verbose output that lists 36425c42550eSmrg # what "hidden" libraries, object files and flags are used when 36435c42550eSmrg # linking a shared library. 36445c42550eSmrg # 36455c42550eSmrg # There doesn't appear to be a way to prevent this compiler from 36465c42550eSmrg # explicitly linking system object files so we need to strip them 36475c42550eSmrg # from the output so that they don't get included in the library 36485c42550eSmrg # dependencies. 36495c42550eSmrg 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' 3650ab47cfaaSmrg ;; 36515c42550eSmrg *) 36525c42550eSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 36535c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 36545c42550eSmrg _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' 36555c42550eSmrg 36565c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 36575c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 36585c42550eSmrg 36595c42550eSmrg # Commands to make compiler produce verbose output that lists 36605c42550eSmrg # what "hidden" libraries, object files and flags are used when 36615c42550eSmrg # linking a shared library. 36625c42550eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 36635c42550eSmrg 36645c42550eSmrg else 36655c42550eSmrg # FIXME: insert proper C++ library support 36665c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36675c42550eSmrg fi 36685c42550eSmrg ;; 36695c42550eSmrg esac 36705c42550eSmrg ;; 36715c42550eSmrg psos*) 36725c42550eSmrg # FIXME: insert proper C++ library support 36735c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36745c42550eSmrg ;; 36755c42550eSmrg sunos4*) 36765c42550eSmrg case $cc_basename in 36775c42550eSmrg CC*) 36785c42550eSmrg # Sun C++ 4.x 36795c42550eSmrg # FIXME: insert proper C++ library support 36805c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36815c42550eSmrg ;; 36825c42550eSmrg lcc*) 36835c42550eSmrg # Lucid 36845c42550eSmrg # FIXME: insert proper C++ library support 36855c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36865c42550eSmrg ;; 36875c42550eSmrg *) 36885c42550eSmrg # FIXME: insert proper C++ library support 36895c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 36905c42550eSmrg ;; 36915c42550eSmrg esac 36925c42550eSmrg ;; 36935c42550eSmrg solaris*) 36945c42550eSmrg case $cc_basename in 36955c42550eSmrg CC*) 36965c42550eSmrg # Sun C++ 4.2, 5.x and Centerline C++ 36975c42550eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 36985c42550eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 36995c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 37005c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 37015c42550eSmrg $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' 37025c42550eSmrg 37035c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 37045c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 37055c42550eSmrg case $host_os in 37065c42550eSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3707ab47cfaaSmrg *) 37085c42550eSmrg # The compiler driver will combine and reorder linker options, 37095c42550eSmrg # but understands `-z linker_flag'. 37105c42550eSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 37115c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 3712ab47cfaaSmrg ;; 3713ab47cfaaSmrg esac 37145c42550eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 37155c42550eSmrg 37165c42550eSmrg output_verbose_link_cmd='echo' 37175c42550eSmrg 37185c42550eSmrg # Archives containing C++ object files must be created using 37195c42550eSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 37205c42550eSmrg # necessary to make sure instantiated templates are included 37215c42550eSmrg # in the archive. 37225c42550eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3723ab47cfaaSmrg ;; 37245c42550eSmrg gcx*) 37255c42550eSmrg # Green Hills C++ Compiler 37265c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 37275c42550eSmrg 37285c42550eSmrg # The C++ compiler must be used to create the archive. 37295c42550eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 3730ab47cfaaSmrg ;; 3731ab47cfaaSmrg *) 37325c42550eSmrg # GNU C++ compiler with Solaris linker 37335c42550eSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 37345c42550eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 37355c42550eSmrg if $CC --version | grep -v '^2\.7' > /dev/null; then 37365c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 37375c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 37385c42550eSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3739ab47cfaaSmrg 37405c42550eSmrg # Commands to make compiler produce verbose output that lists 37415c42550eSmrg # what "hidden" libraries, object files and flags are used when 37425c42550eSmrg # linking a shared library. 37435c42550eSmrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 37445c42550eSmrg else 37455c42550eSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 37465c42550eSmrg # platform. 37475c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 37485c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 37495c42550eSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 37501473d951Smrg 37515c42550eSmrg # Commands to make compiler produce verbose output that lists 37525c42550eSmrg # what "hidden" libraries, object files and flags are used when 37535c42550eSmrg # linking a shared library. 37545c42550eSmrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 37555c42550eSmrg fi 37561473d951Smrg 37575c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 37585c42550eSmrg case $host_os in 37595c42550eSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 37605c42550eSmrg *) 37615c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 37625c42550eSmrg ;; 37635c42550eSmrg esac 37645c42550eSmrg fi 37655c42550eSmrg ;; 37665c42550eSmrg esac 37675c42550eSmrg ;; 37685c42550eSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 37695c42550eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 37705c42550eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 37715c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 37725c42550eSmrg runpath_var='LD_RUN_PATH' 37735c42550eSmrg 37745c42550eSmrg case $cc_basename in 37755c42550eSmrg CC*) 37765c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37775c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3778ab47cfaaSmrg ;; 3779ab47cfaaSmrg *) 37805c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 37815c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3782ab47cfaaSmrg ;; 3783ab47cfaaSmrg esac 37845c42550eSmrg ;; 37855c42550eSmrg sysv5* | sco3.2v5* | sco5v6*) 37865c42550eSmrg # Note: We can NOT use -z defs as we might desire, because we do not 37875c42550eSmrg # link with -lc, and that would cause any symbols used from libc to 37885c42550eSmrg # always be unresolved, which means just about no library would 37895c42550eSmrg # ever link correctly. If we're not using GNU ld we use -z text 37905c42550eSmrg # though, which does catch some bad symbols but isn't as heavy-handed 37915c42550eSmrg # as -z defs. 37925c42550eSmrg # For security reasons, it is highly recommended that you always 37935c42550eSmrg # use absolute paths for naming shared libraries, and exclude the 37945c42550eSmrg # DT_RUNPATH tag from executables and libraries. But doing so 37955c42550eSmrg # requires that you compile everything twice, which is a pain. 37965c42550eSmrg # So that behaviour is only enabled if SCOABSPATH is set to a 37975c42550eSmrg # non-empty value in the environment. Most likely only useful for 37985c42550eSmrg # creating official distributions of packages. 37995c42550eSmrg # This is a hack until libtool officially supports absolute path 38005c42550eSmrg # names for shared libraries. 38015c42550eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 38025c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 38035c42550eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 38045c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 38055c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 38065c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 38075c42550eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 38085c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 38095c42550eSmrg runpath_var='LD_RUN_PATH' 38105c42550eSmrg 38115c42550eSmrg case $cc_basename in 38125c42550eSmrg CC*) 38135c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 38145c42550eSmrg _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' 3815ab47cfaaSmrg ;; 3816ab47cfaaSmrg *) 38175c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 38185c42550eSmrg _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' 38191473d951Smrg ;; 38205c42550eSmrg esac 38215c42550eSmrg ;; 38225c42550eSmrg tandem*) 38235c42550eSmrg case $cc_basename in 38245c42550eSmrg NCC*) 38255c42550eSmrg # NonStop-UX NCC 3.20 38265c42550eSmrg # FIXME: insert proper C++ library support 38275c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3828ab47cfaaSmrg ;; 3829ab47cfaaSmrg *) 38305c42550eSmrg # FIXME: insert proper C++ library support 38315c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3832ab47cfaaSmrg ;; 38335c42550eSmrg esac 38345c42550eSmrg ;; 38355c42550eSmrg vxworks*) 38365c42550eSmrg # FIXME: insert proper C++ library support 38375c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 38385c42550eSmrg ;; 38395c42550eSmrg *) 38405c42550eSmrg # FIXME: insert proper C++ library support 38415c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 38425c42550eSmrg ;; 38435c42550eSmrgesac 38445c42550eSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 38455c42550eSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 3846ab47cfaaSmrg 38475c42550eSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 38485c42550eSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 3849ab47cfaaSmrg 38505c42550eSmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 38515c42550eSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 38525c42550eSmrgAC_LIBTOOL_PROG_CC_C_O($1) 38535c42550eSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 38545c42550eSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 38555c42550eSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 38565c42550eSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3857ab47cfaaSmrg 38585c42550eSmrgAC_LIBTOOL_CONFIG($1) 3859ab47cfaaSmrg 38605c42550eSmrgAC_LANG_POP 38615c42550eSmrgCC=$lt_save_CC 38625c42550eSmrgLDCXX=$LD 38635c42550eSmrgLD=$lt_save_LD 38645c42550eSmrgGCC=$lt_save_GCC 38655c42550eSmrgwith_gnu_ldcxx=$with_gnu_ld 38665c42550eSmrgwith_gnu_ld=$lt_save_with_gnu_ld 38675c42550eSmrglt_cv_path_LDCXX=$lt_cv_path_LD 38685c42550eSmrglt_cv_path_LD=$lt_save_path_LD 38695c42550eSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 38705c42550eSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 38715c42550eSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG 38725c42550eSmrg 38735c42550eSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 38745c42550eSmrg# ------------------------------------ 38755c42550eSmrg# Figure out "hidden" library dependencies from verbose 38765c42550eSmrg# compiler output when linking a shared library. 38775c42550eSmrg# Parse the compiler output and extract the necessary 38785c42550eSmrg# objects, libraries and library flags. 38795c42550eSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 38805c42550eSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 38815c42550eSmrgdnl we can't use the lt_simple_compile_test_code here, 38825c42550eSmrgdnl because it contains code intended for an executable, 38835c42550eSmrgdnl not a library. It's possible we should let each 38845c42550eSmrgdnl tag define a new lt_????_link_test_code variable, 38855c42550eSmrgdnl but it's only used here... 38865c42550eSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 38875c42550eSmrgint a; 38885c42550eSmrgvoid foo (void) { a = 0; } 38895c42550eSmrgEOF 38905c42550eSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 38915c42550eSmrgclass Foo 38925c42550eSmrg{ 38935c42550eSmrgpublic: 38945c42550eSmrg Foo (void) { a = 0; } 38955c42550eSmrgprivate: 38965c42550eSmrg int a; 38975c42550eSmrg}; 38985c42550eSmrgEOF 38995c42550eSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 39005c42550eSmrg subroutine foo 39015c42550eSmrg implicit none 39025c42550eSmrg integer*4 a 39035c42550eSmrg a=0 39045c42550eSmrg return 39055c42550eSmrg end 39065c42550eSmrgEOF 39075c42550eSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 39085c42550eSmrgpublic class foo { 39095c42550eSmrg private int a; 39105c42550eSmrg public void bar (void) { 39115c42550eSmrg a = 0; 39125c42550eSmrg } 39135c42550eSmrg}; 39145c42550eSmrgEOF 39155c42550eSmrg]) 39165c42550eSmrgdnl Parse the compiler output and extract the necessary 39175c42550eSmrgdnl objects, libraries and library flags. 39185c42550eSmrgif AC_TRY_EVAL(ac_compile); then 39195c42550eSmrg # Parse the compiler output and extract the necessary 39205c42550eSmrg # objects, libraries and library flags. 3921ab47cfaaSmrg 39225c42550eSmrg # Sentinel used to keep track of whether or not we are before 39235c42550eSmrg # the conftest object file. 39245c42550eSmrg pre_test_object_deps_done=no 3925ab47cfaaSmrg 39265c42550eSmrg # The `*' in the case matches for architectures that use `case' in 39275c42550eSmrg # $output_verbose_cmd can trigger glob expansion during the loop 39285c42550eSmrg # eval without this substitution. 39295c42550eSmrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 3930ab47cfaaSmrg 39315c42550eSmrg for p in `eval $output_verbose_link_cmd`; do 39325c42550eSmrg case $p in 3933ab47cfaaSmrg 39345c42550eSmrg -L* | -R* | -l*) 39355c42550eSmrg # Some compilers place space between "-{L,R}" and the path. 39365c42550eSmrg # Remove the space. 39375c42550eSmrg if test $p = "-L" \ 39385c42550eSmrg || test $p = "-R"; then 39395c42550eSmrg prev=$p 39405c42550eSmrg continue 39415c42550eSmrg else 39425c42550eSmrg prev= 39435c42550eSmrg fi 3944ab47cfaaSmrg 39455c42550eSmrg if test "$pre_test_object_deps_done" = no; then 39465c42550eSmrg case $p in 39475c42550eSmrg -L* | -R*) 39485c42550eSmrg # Internal compiler library paths should come after those 39495c42550eSmrg # provided the user. The postdeps already come after the 39505c42550eSmrg # user supplied libs so there is no need to process them. 39515c42550eSmrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 39525c42550eSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 39535c42550eSmrg else 39545c42550eSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 39555c42550eSmrg fi 39565c42550eSmrg ;; 39575c42550eSmrg # The "-l" case would never come before the object being 39585c42550eSmrg # linked, so don't bother handling this case. 39595c42550eSmrg esac 39605c42550eSmrg else 39615c42550eSmrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 39625c42550eSmrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 39635c42550eSmrg else 39645c42550eSmrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 39655c42550eSmrg fi 39665c42550eSmrg fi 39675c42550eSmrg ;; 3968ab47cfaaSmrg 39695c42550eSmrg *.$objext) 39705c42550eSmrg # This assumes that the test object file only shows up 39715c42550eSmrg # once in the compiler output. 39725c42550eSmrg if test "$p" = "conftest.$objext"; then 39735c42550eSmrg pre_test_object_deps_done=yes 39745c42550eSmrg continue 39755c42550eSmrg fi 3976ab47cfaaSmrg 39775c42550eSmrg if test "$pre_test_object_deps_done" = no; then 39785c42550eSmrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 39795c42550eSmrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 39805c42550eSmrg else 39815c42550eSmrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 39825c42550eSmrg fi 39835c42550eSmrg else 39845c42550eSmrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 39855c42550eSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 39865c42550eSmrg else 39875c42550eSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 39885c42550eSmrg fi 39895c42550eSmrg fi 39905c42550eSmrg ;; 39915c42550eSmrg 39925c42550eSmrg *) ;; # Ignore the rest. 3993ab47cfaaSmrg 3994ab47cfaaSmrg esac 39955c42550eSmrg done 3996ab47cfaaSmrg 39975c42550eSmrg # Clean up. 39985c42550eSmrg rm -f a.out a.exe 39995c42550eSmrgelse 40005c42550eSmrg echo "libtool.m4: error: problem compiling $1 test program" 40011473d951Smrgfi 4002ab47cfaaSmrg 40035c42550eSmrg$rm -f confest.$objext 4004ab47cfaaSmrg 40055c42550eSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 40065c42550eSmrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 40075c42550eSmrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 40085c42550eSmrgfi 4009ab47cfaaSmrg 40105c42550eSmrg# PORTME: override above test on systems where it is broken 40115c42550eSmrgifelse([$1],[CXX], 40125c42550eSmrg[case $host_os in 40135c42550eSmrginterix[[3-9]]*) 40145c42550eSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 40155c42550eSmrg # hack all around it, let's just trust "g++" to DTRT. 40165c42550eSmrg _LT_AC_TAGVAR(predep_objects,$1)= 40175c42550eSmrg _LT_AC_TAGVAR(postdep_objects,$1)= 40185c42550eSmrg _LT_AC_TAGVAR(postdeps,$1)= 40195c42550eSmrg ;; 40205c42550eSmrg 40215c42550eSmrglinux*) 40225c42550eSmrg case `$CC -V 2>&1 | sed 5q` in 40235c42550eSmrg *Sun\ C*) 40245c42550eSmrg # Sun C++ 5.9 40255c42550eSmrg # 40265c42550eSmrg # The more standards-conforming stlport4 library is 40275c42550eSmrg # incompatible with the Cstd library. Avoid specifying 40285c42550eSmrg # it if it's in CXXFLAGS. Ignore libCrun as 40295c42550eSmrg # -library=stlport4 depends on it. 40305c42550eSmrg case " $CXX $CXXFLAGS " in 40315c42550eSmrg *" -library=stlport4 "*) 40325c42550eSmrg solaris_use_stlport4=yes 40335c42550eSmrg ;; 40345c42550eSmrg esac 40355c42550eSmrg if test "$solaris_use_stlport4" != yes; then 40365c42550eSmrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 40378697ee19Smrg fi 40388697ee19Smrg ;; 40391473d951Smrg esac 40405c42550eSmrg ;; 40418697ee19Smrg 40425c42550eSmrgsolaris*) 40435c42550eSmrg case $cc_basename in 40445c42550eSmrg CC*) 40455c42550eSmrg # The more standards-conforming stlport4 library is 40465c42550eSmrg # incompatible with the Cstd library. Avoid specifying 40475c42550eSmrg # it if it's in CXXFLAGS. Ignore libCrun as 40485c42550eSmrg # -library=stlport4 depends on it. 40495c42550eSmrg case " $CXX $CXXFLAGS " in 40505c42550eSmrg *" -library=stlport4 "*) 40515c42550eSmrg solaris_use_stlport4=yes 40525c42550eSmrg ;; 40535c42550eSmrg esac 40545c42550eSmrg 40555c42550eSmrg # Adding this requires a known-good setup of shared libraries for 40565c42550eSmrg # Sun compiler versions before 5.6, else PIC objects from an old 40575c42550eSmrg # archive will be linked into the output, leading to subtle bugs. 40585c42550eSmrg if test "$solaris_use_stlport4" != yes; then 40595c42550eSmrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 40608697ee19Smrg fi 4061ab47cfaaSmrg ;; 4062ab47cfaaSmrg esac 40635c42550eSmrg ;; 40645c42550eSmrgesac 40655c42550eSmrg]) 40665c42550eSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 40675c42550eSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 40685c42550eSmrgesac 40695c42550eSmrg])# AC_LIBTOOL_POSTDEP_PREDEP 4070ab47cfaaSmrg 40715c42550eSmrg# AC_LIBTOOL_LANG_F77_CONFIG 40725c42550eSmrg# -------------------------- 40735c42550eSmrg# Ensure that the configuration vars for the C compiler are 40745c42550eSmrg# suitably defined. Those variables are subsequently used by 40755c42550eSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 40765c42550eSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 40775c42550eSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 40785c42550eSmrg[AC_REQUIRE([AC_PROG_F77]) 40795c42550eSmrgAC_LANG_PUSH(Fortran 77) 4080ab47cfaaSmrg 40815c42550eSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 40825c42550eSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 40835c42550eSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 40845c42550eSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 40855c42550eSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 40865c42550eSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 40875c42550eSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 40885c42550eSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 40895c42550eSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 40905c42550eSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 40915c42550eSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 40925c42550eSmrg_LT_AC_TAGVAR(module_cmds, $1)= 40935c42550eSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 40945c42550eSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 40955c42550eSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 40965c42550eSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 40975c42550eSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 40985c42550eSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4099ab47cfaaSmrg 41005c42550eSmrg# Source file extension for f77 test sources. 41015c42550eSmrgac_ext=f 4102ab47cfaaSmrg 41035c42550eSmrg# Object file extension for compiled f77 test sources. 41045c42550eSmrgobjext=o 41055c42550eSmrg_LT_AC_TAGVAR(objext, $1)=$objext 4106ab47cfaaSmrg 41075c42550eSmrg# Code to be used in simple compile tests 41085c42550eSmrglt_simple_compile_test_code="\ 41095c42550eSmrg subroutine t 41105c42550eSmrg return 41115c42550eSmrg end 41125c42550eSmrg" 4113ab47cfaaSmrg 41145c42550eSmrg# Code to be used in simple link tests 41155c42550eSmrglt_simple_link_test_code="\ 41165c42550eSmrg program t 41175c42550eSmrg end 41185c42550eSmrg" 4119ab47cfaaSmrg 41205c42550eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 41215c42550eSmrg_LT_AC_SYS_COMPILER 4122ab47cfaaSmrg 41235c42550eSmrg# save warnings/boilerplate of simple test code 41245c42550eSmrg_LT_COMPILER_BOILERPLATE 41255c42550eSmrg_LT_LINKER_BOILERPLATE 4126ab47cfaaSmrg 41275c42550eSmrg# Allow CC to be a program name with arguments. 41285c42550eSmrglt_save_CC="$CC" 41295c42550eSmrgCC=${F77-"f77"} 41305c42550eSmrgcompiler=$CC 41315c42550eSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 41325c42550eSmrg_LT_CC_BASENAME([$compiler]) 4133ab47cfaaSmrg 41345c42550eSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 41355c42550eSmrgAC_MSG_RESULT([$can_build_shared]) 4136ab47cfaaSmrg 41375c42550eSmrgAC_MSG_CHECKING([whether to build shared libraries]) 41385c42550eSmrgtest "$can_build_shared" = "no" && enable_shared=no 4139ab47cfaaSmrg 41405c42550eSmrg# On AIX, shared libraries and static libraries use the same namespace, and 41415c42550eSmrg# are all built from PIC. 41425c42550eSmrgcase $host_os in 41435c42550eSmrgaix3*) 41445c42550eSmrg test "$enable_shared" = yes && enable_static=no 41455c42550eSmrg if test -n "$RANLIB"; then 41465c42550eSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 41475c42550eSmrg postinstall_cmds='$RANLIB $lib' 41485c42550eSmrg fi 41495c42550eSmrg ;; 41505c42550eSmrgaix[[4-9]]*) 41515c42550eSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 41525c42550eSmrg test "$enable_shared" = yes && enable_static=no 41535c42550eSmrg fi 41545c42550eSmrg ;; 41555c42550eSmrgesac 41565c42550eSmrgAC_MSG_RESULT([$enable_shared]) 4157ab47cfaaSmrg 41585c42550eSmrgAC_MSG_CHECKING([whether to build static libraries]) 41595c42550eSmrg# Make sure either enable_shared or enable_static is yes. 41605c42550eSmrgtest "$enable_shared" = yes || enable_static=yes 41615c42550eSmrgAC_MSG_RESULT([$enable_static]) 4162ab47cfaaSmrg 41635c42550eSmrg_LT_AC_TAGVAR(GCC, $1)="$G77" 41645c42550eSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 4165ab47cfaaSmrg 41665c42550eSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 41675c42550eSmrgAC_LIBTOOL_PROG_CC_C_O($1) 41685c42550eSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 41695c42550eSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 41705c42550eSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 41715c42550eSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4172ab47cfaaSmrg 41735c42550eSmrgAC_LIBTOOL_CONFIG($1) 4174ab47cfaaSmrg 41755c42550eSmrgAC_LANG_POP 41765c42550eSmrgCC="$lt_save_CC" 41775c42550eSmrg])# AC_LIBTOOL_LANG_F77_CONFIG 4178ab47cfaaSmrg 4179ab47cfaaSmrg 41805c42550eSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG 41815c42550eSmrg# -------------------------- 41825c42550eSmrg# Ensure that the configuration vars for the C compiler are 41835c42550eSmrg# suitably defined. Those variables are subsequently used by 41845c42550eSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 41855c42550eSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 41865c42550eSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 41875c42550eSmrg[AC_LANG_SAVE 4188ab47cfaaSmrg 41895c42550eSmrg# Source file extension for Java test sources. 41905c42550eSmrgac_ext=java 4191ab47cfaaSmrg 41925c42550eSmrg# Object file extension for compiled Java test sources. 41935c42550eSmrgobjext=o 41945c42550eSmrg_LT_AC_TAGVAR(objext, $1)=$objext 4195ab47cfaaSmrg 41965c42550eSmrg# Code to be used in simple compile tests 41975c42550eSmrglt_simple_compile_test_code="class foo {}" 4198ab47cfaaSmrg 41995c42550eSmrg# Code to be used in simple link tests 42005c42550eSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 4201ab47cfaaSmrg 42025c42550eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 42035c42550eSmrg_LT_AC_SYS_COMPILER 4204ab47cfaaSmrg 42055c42550eSmrg# save warnings/boilerplate of simple test code 42065c42550eSmrg_LT_COMPILER_BOILERPLATE 42075c42550eSmrg_LT_LINKER_BOILERPLATE 4208ab47cfaaSmrg 42095c42550eSmrg# Allow CC to be a program name with arguments. 42105c42550eSmrglt_save_CC="$CC" 42115c42550eSmrgCC=${GCJ-"gcj"} 42125c42550eSmrgcompiler=$CC 42135c42550eSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 42145c42550eSmrg_LT_CC_BASENAME([$compiler]) 4215ab47cfaaSmrg 42165c42550eSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 42175c42550eSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4218ab47cfaaSmrg 42195c42550eSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4220ab47cfaaSmrg 42215c42550eSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 42225c42550eSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 42235c42550eSmrgAC_LIBTOOL_PROG_CC_C_O($1) 42245c42550eSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 42255c42550eSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 42265c42550eSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 42275c42550eSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4228ab47cfaaSmrg 42295c42550eSmrgAC_LIBTOOL_CONFIG($1) 4230ab47cfaaSmrg 42315c42550eSmrgAC_LANG_RESTORE 42325c42550eSmrgCC="$lt_save_CC" 42335c42550eSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 4234ab47cfaaSmrg 4235ab47cfaaSmrg 42365c42550eSmrg# AC_LIBTOOL_LANG_RC_CONFIG 42375c42550eSmrg# ------------------------- 42385c42550eSmrg# Ensure that the configuration vars for the Windows resource compiler are 42395c42550eSmrg# suitably defined. Those variables are subsequently used by 42405c42550eSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 42415c42550eSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 42425c42550eSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 42435c42550eSmrg[AC_LANG_SAVE 4244ab47cfaaSmrg 42455c42550eSmrg# Source file extension for RC test sources. 42465c42550eSmrgac_ext=rc 4247ab47cfaaSmrg 42485c42550eSmrg# Object file extension for compiled RC test sources. 42495c42550eSmrgobjext=o 42505c42550eSmrg_LT_AC_TAGVAR(objext, $1)=$objext 4251ab47cfaaSmrg 42525c42550eSmrg# Code to be used in simple compile tests 42535c42550eSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 4254ab47cfaaSmrg 42555c42550eSmrg# Code to be used in simple link tests 42565c42550eSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 4257ab47cfaaSmrg 42585c42550eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 42595c42550eSmrg_LT_AC_SYS_COMPILER 4260ab47cfaaSmrg 42615c42550eSmrg# save warnings/boilerplate of simple test code 42625c42550eSmrg_LT_COMPILER_BOILERPLATE 42635c42550eSmrg_LT_LINKER_BOILERPLATE 4264ab47cfaaSmrg 42655c42550eSmrg# Allow CC to be a program name with arguments. 42665c42550eSmrglt_save_CC="$CC" 42675c42550eSmrgCC=${RC-"windres"} 42685c42550eSmrgcompiler=$CC 42695c42550eSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 42705c42550eSmrg_LT_CC_BASENAME([$compiler]) 42715c42550eSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4272ab47cfaaSmrg 42735c42550eSmrgAC_LIBTOOL_CONFIG($1) 4274ab47cfaaSmrg 42755c42550eSmrgAC_LANG_RESTORE 42765c42550eSmrgCC="$lt_save_CC" 42775c42550eSmrg])# AC_LIBTOOL_LANG_RC_CONFIG 4278ab47cfaaSmrg 4279ab47cfaaSmrg 42805c42550eSmrg# AC_LIBTOOL_CONFIG([TAGNAME]) 42815c42550eSmrg# ---------------------------- 42825c42550eSmrg# If TAGNAME is not passed, then create an initial libtool script 42835c42550eSmrg# with a default configuration from the untagged config vars. Otherwise 42845c42550eSmrg# add code to config.status for appending the configuration named by 42855c42550eSmrg# TAGNAME from the matching tagged config vars. 42865c42550eSmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 42875c42550eSmrg[# The else clause should only fire when bootstrapping the 42885c42550eSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh 42895c42550eSmrg# with your package, and you will get complaints that there are 42905c42550eSmrg# no rules to generate ltmain.sh. 42915c42550eSmrgif test -f "$ltmain"; then 42925c42550eSmrg # See if we are running on zsh, and set the options which allow our commands through 42935c42550eSmrg # without removal of \ escapes. 42945c42550eSmrg if test -n "${ZSH_VERSION+set}" ; then 42955c42550eSmrg setopt NO_GLOB_SUBST 42965c42550eSmrg fi 42975c42550eSmrg # Now quote all the things that may contain metacharacters while being 42985c42550eSmrg # careful not to overquote the AC_SUBSTed values. We take copies of the 42995c42550eSmrg # variables and quote the copies for generation of the libtool script. 43005c42550eSmrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 43015c42550eSmrg SED SHELL STRIP \ 43025c42550eSmrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 43035c42550eSmrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 43045c42550eSmrg deplibs_check_method reload_flag reload_cmds need_locks \ 43055c42550eSmrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 43065c42550eSmrg lt_cv_sys_global_symbol_to_c_name_address \ 43075c42550eSmrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 43085c42550eSmrg old_postinstall_cmds old_postuninstall_cmds \ 43095c42550eSmrg _LT_AC_TAGVAR(compiler, $1) \ 43105c42550eSmrg _LT_AC_TAGVAR(CC, $1) \ 43115c42550eSmrg _LT_AC_TAGVAR(LD, $1) \ 43125c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 43135c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 43145c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 43155c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 43165c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 43175c42550eSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 43185c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 43195c42550eSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 43205c42550eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 43215c42550eSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 43225c42550eSmrg _LT_AC_TAGVAR(predep_objects, $1) \ 43235c42550eSmrg _LT_AC_TAGVAR(postdep_objects, $1) \ 43245c42550eSmrg _LT_AC_TAGVAR(predeps, $1) \ 43255c42550eSmrg _LT_AC_TAGVAR(postdeps, $1) \ 43265c42550eSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 43275c42550eSmrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 43285c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1) \ 43295c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 43305c42550eSmrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 43315c42550eSmrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 43325c42550eSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 43335c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 43345c42550eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 43355c42550eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 43365c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 43375c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 43385c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 43395c42550eSmrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 43405c42550eSmrg _LT_AC_TAGVAR(module_cmds, $1) \ 43415c42550eSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 43425c42550eSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 43435c42550eSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 43445c42550eSmrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 43455c42550eSmrg _LT_AC_TAGVAR(include_expsyms, $1); do 43465c42550eSmrg 43475c42550eSmrg case $var in 43485c42550eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 43495c42550eSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 43505c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 43515c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 43525c42550eSmrg _LT_AC_TAGVAR(module_cmds, $1) | \ 43535c42550eSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 43545c42550eSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 43555c42550eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 43565c42550eSmrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 43575c42550eSmrg postinstall_cmds | postuninstall_cmds | \ 43585c42550eSmrg old_postinstall_cmds | old_postuninstall_cmds | \ 43595c42550eSmrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 43605c42550eSmrg # Double-quote double-evaled strings. 43615c42550eSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 43621473d951Smrg ;; 43635c42550eSmrg *) 43645c42550eSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 4365ab47cfaaSmrg ;; 43665c42550eSmrg esac 43675c42550eSmrg done 43681473d951Smrg 43695c42550eSmrg case $lt_echo in 43705c42550eSmrg *'\[$]0 --fallback-echo"') 43715c42550eSmrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 43725c42550eSmrg ;; 43735c42550eSmrg esac 4374ab47cfaaSmrg 43755c42550eSmrgifelse([$1], [], 43765c42550eSmrg [cfgfile="${ofile}T" 43775c42550eSmrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 43785c42550eSmrg $rm -f "$cfgfile" 43795c42550eSmrg AC_MSG_NOTICE([creating $ofile])], 43805c42550eSmrg [cfgfile="$ofile"]) 4381ab47cfaaSmrg 43825c42550eSmrg cat <<__EOF__ >> "$cfgfile" 43835c42550eSmrgifelse([$1], [], 43845c42550eSmrg[#! $SHELL 4385ab47cfaaSmrg 43865c42550eSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 43875c42550eSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 43885c42550eSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 43895c42550eSmrg# 43905c42550eSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 43915c42550eSmrg# Free Software Foundation, Inc. 43925c42550eSmrg# 43935c42550eSmrg# This file is part of GNU Libtool: 43945c42550eSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 43955c42550eSmrg# 43965c42550eSmrg# This program is free software; you can redistribute it and/or modify 43975c42550eSmrg# it under the terms of the GNU General Public License as published by 43985c42550eSmrg# the Free Software Foundation; either version 2 of the License, or 43995c42550eSmrg# (at your option) any later version. 44005c42550eSmrg# 44015c42550eSmrg# This program is distributed in the hope that it will be useful, but 44025c42550eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 44035c42550eSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 44045c42550eSmrg# General Public License for more details. 44055c42550eSmrg# 44065c42550eSmrg# You should have received a copy of the GNU General Public License 44075c42550eSmrg# along with this program; if not, write to the Free Software 44085c42550eSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 44095c42550eSmrg# 44105c42550eSmrg# As a special exception to the GNU General Public License, if you 44115c42550eSmrg# distribute this file as part of a program that contains a 44125c42550eSmrg# configuration script generated by Autoconf, you may include it under 44135c42550eSmrg# the same distribution terms that you use for the rest of that program. 4414ab47cfaaSmrg 44155c42550eSmrg# A sed program that does not truncate output. 44165c42550eSmrgSED=$lt_SED 4417ab47cfaaSmrg 44185c42550eSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 44195c42550eSmrgXsed="$SED -e 1s/^X//" 4420ab47cfaaSmrg 44215c42550eSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 44225c42550eSmrg# if CDPATH is set. 44235c42550eSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4424ab47cfaaSmrg 44255c42550eSmrg# The names of the tagged configurations supported by this script. 44265c42550eSmrgavailable_tags= 4427ab47cfaaSmrg 44285c42550eSmrg# ### BEGIN LIBTOOL CONFIG], 44295c42550eSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 4430ab47cfaaSmrg 44315c42550eSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4432ab47cfaaSmrg 44335c42550eSmrg# Shell to use when invoking shell scripts. 44345c42550eSmrgSHELL=$lt_SHELL 4435ab47cfaaSmrg 44365c42550eSmrg# Whether or not to build shared libraries. 44375c42550eSmrgbuild_libtool_libs=$enable_shared 4438ab47cfaaSmrg 44395c42550eSmrg# Whether or not to build static libraries. 44405c42550eSmrgbuild_old_libs=$enable_static 4441ab47cfaaSmrg 44425c42550eSmrg# Whether or not to add -lc for building shared libraries. 44435c42550eSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 4444ab47cfaaSmrg 44455c42550eSmrg# Whether or not to disallow shared libs when runtime libs are static 44465c42550eSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 4447ab47cfaaSmrg 44485c42550eSmrg# Whether or not to optimize for fast installation. 44495c42550eSmrgfast_install=$enable_fast_install 4450ab47cfaaSmrg 44515c42550eSmrg# The host system. 44525c42550eSmrghost_alias=$host_alias 44535c42550eSmrghost=$host 44545c42550eSmrghost_os=$host_os 4455ab47cfaaSmrg 44565c42550eSmrg# The build system. 44575c42550eSmrgbuild_alias=$build_alias 44585c42550eSmrgbuild=$build 44595c42550eSmrgbuild_os=$build_os 4460ab47cfaaSmrg 44615c42550eSmrg# An echo program that does not interpret backslashes. 44625c42550eSmrgecho=$lt_echo 4463ab47cfaaSmrg 44645c42550eSmrg# The archiver. 44655c42550eSmrgAR=$lt_AR 44665c42550eSmrgAR_FLAGS=$lt_AR_FLAGS 4467ab47cfaaSmrg 44685c42550eSmrg# A C compiler. 44695c42550eSmrgLTCC=$lt_LTCC 4470ab47cfaaSmrg 44715c42550eSmrg# LTCC compiler flags. 44725c42550eSmrgLTCFLAGS=$lt_LTCFLAGS 4473ab47cfaaSmrg 44745c42550eSmrg# A language-specific compiler. 44755c42550eSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 4476ab47cfaaSmrg 44775c42550eSmrg# Is the compiler the GNU C compiler? 44785c42550eSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 4479ab47cfaaSmrg 44805c42550eSmrg# An ERE matcher. 44815c42550eSmrgEGREP=$lt_EGREP 4482ab47cfaaSmrg 44835c42550eSmrg# The linker used to build libraries. 44845c42550eSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 4485ab47cfaaSmrg 44865c42550eSmrg# Whether we need hard or soft links. 44875c42550eSmrgLN_S=$lt_LN_S 4488ab47cfaaSmrg 44895c42550eSmrg# A BSD-compatible nm program. 44905c42550eSmrgNM=$lt_NM 4491ab47cfaaSmrg 44925c42550eSmrg# A symbol stripping program 44935c42550eSmrgSTRIP=$lt_STRIP 4494ab47cfaaSmrg 44955c42550eSmrg# Used to examine libraries when file_magic_cmd begins "file" 44965c42550eSmrgMAGIC_CMD=$MAGIC_CMD 4497ab47cfaaSmrg 44985c42550eSmrg# Used on cygwin: DLL creation program. 44995c42550eSmrgDLLTOOL="$DLLTOOL" 4500ab47cfaaSmrg 45015c42550eSmrg# Used on cygwin: object dumper. 45025c42550eSmrgOBJDUMP="$OBJDUMP" 4503ab47cfaaSmrg 45045c42550eSmrg# Used on cygwin: assembler. 45055c42550eSmrgAS="$AS" 4506ab47cfaaSmrg 45075c42550eSmrg# The name of the directory that contains temporary libtool files. 45085c42550eSmrgobjdir=$objdir 4509ab47cfaaSmrg 45105c42550eSmrg# How to create reloadable object files. 45115c42550eSmrgreload_flag=$lt_reload_flag 45125c42550eSmrgreload_cmds=$lt_reload_cmds 4513ab47cfaaSmrg 45145c42550eSmrg# How to pass a linker flag through the compiler. 45155c42550eSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 4516ab47cfaaSmrg 45175c42550eSmrg# Object file suffix (normally "o"). 45185c42550eSmrgobjext="$ac_objext" 4519ab47cfaaSmrg 45205c42550eSmrg# Old archive suffix (normally "a"). 45215c42550eSmrglibext="$libext" 4522ab47cfaaSmrg 45235c42550eSmrg# Shared library suffix (normally ".so"). 45245c42550eSmrgshrext_cmds='$shrext_cmds' 4525ab47cfaaSmrg 45265c42550eSmrg# Executable file suffix (normally ""). 45275c42550eSmrgexeext="$exeext" 4528ab47cfaaSmrg 45295c42550eSmrg# Additional compiler flags for building library objects. 45305c42550eSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 45315c42550eSmrgpic_mode=$pic_mode 4532ab47cfaaSmrg 45335c42550eSmrg# What is the maximum length of a command? 45345c42550eSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 4535ab47cfaaSmrg 45365c42550eSmrg# Does compiler simultaneously support -c and -o options? 45375c42550eSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 4538ab47cfaaSmrg 45395c42550eSmrg# Must we lock files when doing compilation? 45405c42550eSmrgneed_locks=$lt_need_locks 4541ab47cfaaSmrg 45425c42550eSmrg# Do we need the lib prefix for modules? 45435c42550eSmrgneed_lib_prefix=$need_lib_prefix 4544ab47cfaaSmrg 45455c42550eSmrg# Do we need a version for libraries? 45465c42550eSmrgneed_version=$need_version 4547ab47cfaaSmrg 45485c42550eSmrg# Whether dlopen is supported. 45495c42550eSmrgdlopen_support=$enable_dlopen 4550ab47cfaaSmrg 45515c42550eSmrg# Whether dlopen of programs is supported. 45525c42550eSmrgdlopen_self=$enable_dlopen_self 4553ab47cfaaSmrg 45545c42550eSmrg# Whether dlopen of statically linked programs is supported. 45555c42550eSmrgdlopen_self_static=$enable_dlopen_self_static 4556ab47cfaaSmrg 45575c42550eSmrg# Compiler flag to prevent dynamic linking. 45585c42550eSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 4559ab47cfaaSmrg 45605c42550eSmrg# Compiler flag to turn off builtin functions. 45615c42550eSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 4562ab47cfaaSmrg 45635c42550eSmrg# Compiler flag to allow reflexive dlopens. 45645c42550eSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 4565ab47cfaaSmrg 45665c42550eSmrg# Compiler flag to generate shared objects directly from archives. 45675c42550eSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 4568ab47cfaaSmrg 45695c42550eSmrg# Compiler flag to generate thread-safe objects. 45705c42550eSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 4571ab47cfaaSmrg 45725c42550eSmrg# Library versioning type. 45735c42550eSmrgversion_type=$version_type 4574ab47cfaaSmrg 45755c42550eSmrg# Format of library name prefix. 45765c42550eSmrglibname_spec=$lt_libname_spec 4577ab47cfaaSmrg 45785c42550eSmrg# List of archive names. First name is the real one, the rest are links. 45795c42550eSmrg# The last name is the one that the linker finds with -lNAME. 45805c42550eSmrglibrary_names_spec=$lt_library_names_spec 4581ab47cfaaSmrg 45825c42550eSmrg# The coded name of the library, if different from the real name. 45835c42550eSmrgsoname_spec=$lt_soname_spec 4584ab47cfaaSmrg 45855c42550eSmrg# Commands used to build and install an old-style archive. 45865c42550eSmrgRANLIB=$lt_RANLIB 45875c42550eSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 45885c42550eSmrgold_postinstall_cmds=$lt_old_postinstall_cmds 45895c42550eSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 4590ab47cfaaSmrg 45915c42550eSmrg# Create an old-style archive from a shared archive. 45925c42550eSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 4593ab47cfaaSmrg 45945c42550eSmrg# Create a temporary old-style archive to link instead of a shared archive. 45955c42550eSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 4596ab47cfaaSmrg 45975c42550eSmrg# Commands used to build and install a shared archive. 45985c42550eSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 45995c42550eSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 46005c42550eSmrgpostinstall_cmds=$lt_postinstall_cmds 46015c42550eSmrgpostuninstall_cmds=$lt_postuninstall_cmds 4602ab47cfaaSmrg 46035c42550eSmrg# Commands used to build a loadable module (assumed same as above if empty) 46045c42550eSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 46055c42550eSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 4606ab47cfaaSmrg 46075c42550eSmrg# Commands to strip libraries. 46085c42550eSmrgold_striplib=$lt_old_striplib 46095c42550eSmrgstriplib=$lt_striplib 4610ab47cfaaSmrg 46115c42550eSmrg# Dependencies to place before the objects being linked to create a 46125c42550eSmrg# shared library. 46135c42550eSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 4614ab47cfaaSmrg 46155c42550eSmrg# Dependencies to place after the objects being linked to create a 46165c42550eSmrg# shared library. 46175c42550eSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 4618ab47cfaaSmrg 46195c42550eSmrg# Dependencies to place before the objects being linked to create a 46205c42550eSmrg# shared library. 46215c42550eSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 4622ab47cfaaSmrg 46235c42550eSmrg# Dependencies to place after the objects being linked to create a 46245c42550eSmrg# shared library. 46255c42550eSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 4626ab47cfaaSmrg 46275c42550eSmrg# The directories searched by this compiler when creating a shared 46285c42550eSmrg# library 46295c42550eSmrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 4630ab47cfaaSmrg 46315c42550eSmrg# The library search path used internally by the compiler when linking 46325c42550eSmrg# a shared library. 46335c42550eSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 4634ab47cfaaSmrg 46355c42550eSmrg# Method to check whether dependent libraries are shared objects. 46365c42550eSmrgdeplibs_check_method=$lt_deplibs_check_method 4637ab47cfaaSmrg 46385c42550eSmrg# Command to use when deplibs_check_method == file_magic. 46395c42550eSmrgfile_magic_cmd=$lt_file_magic_cmd 4640ab47cfaaSmrg 46415c42550eSmrg# Flag that allows shared libraries with undefined symbols to be built. 46425c42550eSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 4643ab47cfaaSmrg 46445c42550eSmrg# Flag that forces no undefined symbols. 46455c42550eSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 4646ab47cfaaSmrg 46475c42550eSmrg# Commands used to finish a libtool library installation in a directory. 46485c42550eSmrgfinish_cmds=$lt_finish_cmds 4649ab47cfaaSmrg 46505c42550eSmrg# Same as above, but a single script fragment to be evaled but not shown. 46515c42550eSmrgfinish_eval=$lt_finish_eval 4652ab47cfaaSmrg 46535c42550eSmrg# Take the output of nm and produce a listing of raw symbols and C names. 46545c42550eSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 4655ab47cfaaSmrg 46565c42550eSmrg# Transform the output of nm in a proper C declaration 46575c42550eSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 4658ab47cfaaSmrg 46595c42550eSmrg# Transform the output of nm in a C name address pair 46605c42550eSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 4661ab47cfaaSmrg 46625c42550eSmrg# This is the shared library runtime path variable. 46635c42550eSmrgrunpath_var=$runpath_var 4664ab47cfaaSmrg 46655c42550eSmrg# This is the shared library path variable. 46665c42550eSmrgshlibpath_var=$shlibpath_var 4667ab47cfaaSmrg 46685c42550eSmrg# Is shlibpath searched before the hard-coded library search path? 46695c42550eSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 4670ab47cfaaSmrg 46715c42550eSmrg# How to hardcode a shared library path into an executable. 46725c42550eSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 4673ab47cfaaSmrg 46745c42550eSmrg# Whether we should hardcode library paths into libraries. 46755c42550eSmrghardcode_into_libs=$hardcode_into_libs 4676ab47cfaaSmrg 46775c42550eSmrg# Flag to hardcode \$libdir into a binary during linking. 46785c42550eSmrg# This must work even if \$libdir does not exist. 46795c42550eSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 4680ab47cfaaSmrg 46815c42550eSmrg# If ld is used when linking, flag to hardcode \$libdir into 46825c42550eSmrg# a binary during linking. This must work even if \$libdir does 46835c42550eSmrg# not exist. 46845c42550eSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 4685ab47cfaaSmrg 46865c42550eSmrg# Whether we need a single -rpath flag with a separated argument. 46875c42550eSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 4688ab47cfaaSmrg 46895c42550eSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 46905c42550eSmrg# resulting binary. 46915c42550eSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 4692ab47cfaaSmrg 46935c42550eSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 46945c42550eSmrg# resulting binary. 46955c42550eSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 4696ab47cfaaSmrg 46975c42550eSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 46985c42550eSmrg# the resulting binary. 46995c42550eSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 4700ab47cfaaSmrg 47015c42550eSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library 47025c42550eSmrg# and all subsequent libraries and executables linked against it. 47035c42550eSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 4704ab47cfaaSmrg 47055c42550eSmrg# Variables whose values should be saved in libtool wrapper scripts and 47065c42550eSmrg# restored at relink time. 47075c42550eSmrgvariables_saved_for_relink="$variables_saved_for_relink" 4708ab47cfaaSmrg 47095c42550eSmrg# Whether libtool must link a program against all its dependency libraries. 47105c42550eSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 4711ab47cfaaSmrg 47125c42550eSmrg# Compile-time system search path for libraries 47135c42550eSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 4714ab47cfaaSmrg 47155c42550eSmrg# Run-time system search path for libraries 47165c42550eSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 4717ab47cfaaSmrg 47185c42550eSmrg# Fix the shell variable \$srcfile for the compiler. 47195c42550eSmrgfix_srcfile_path=$lt_fix_srcfile_path 4720ab47cfaaSmrg 47215c42550eSmrg# Set to yes if exported symbols are required. 47225c42550eSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 4723ab47cfaaSmrg 47245c42550eSmrg# The commands to list exported symbols. 47255c42550eSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 4726ab47cfaaSmrg 47275c42550eSmrg# The commands to extract the exported symbol list from a shared archive. 47285c42550eSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 4729ab47cfaaSmrg 47305c42550eSmrg# Symbols that should not be listed in the preloaded symbols. 47315c42550eSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 4732ab47cfaaSmrg 47335c42550eSmrg# Symbols that must always be exported. 47345c42550eSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 4735ab47cfaaSmrg 47365c42550eSmrgifelse([$1],[], 47375c42550eSmrg[# ### END LIBTOOL CONFIG], 47385c42550eSmrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 4739ab47cfaaSmrg 47405c42550eSmrg__EOF__ 4741ab47cfaaSmrg 47425c42550eSmrgifelse([$1],[], [ 47435c42550eSmrg case $host_os in 47445c42550eSmrg aix3*) 47455c42550eSmrg cat <<\EOF >> "$cfgfile" 4746ab47cfaaSmrg 47475c42550eSmrg# AIX sometimes has problems with the GCC collect2 program. For some 47485c42550eSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 47495c42550eSmrg# vanish in a puff of smoke. 47505c42550eSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 47515c42550eSmrg COLLECT_NAMES= 47525c42550eSmrg export COLLECT_NAMES 47535c42550eSmrgfi 47545c42550eSmrgEOF 47555c42550eSmrg ;; 47565c42550eSmrg esac 4757ab47cfaaSmrg 47585c42550eSmrg # We use sed instead of cat because bash on DJGPP gets confused if 47595c42550eSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 47605c42550eSmrg # text mode, it properly converts lines to CR/LF. This bash problem 47615c42550eSmrg # is reportedly fixed, but why not run on old versions too? 47625c42550eSmrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 4763ab47cfaaSmrg 47645c42550eSmrg mv -f "$cfgfile" "$ofile" || \ 47655c42550eSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 47665c42550eSmrg chmod +x "$ofile" 47675c42550eSmrg]) 47681473d951Smrgelse 47695c42550eSmrg # If there is no Makefile yet, we rely on a make rule to execute 47705c42550eSmrg # `config.status --recheck' to rerun these tests and create the 47715c42550eSmrg # libtool script then. 47725c42550eSmrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 47735c42550eSmrg if test -f "$ltmain_in"; then 47745c42550eSmrg test -f Makefile && make "$ltmain" 47755c42550eSmrg fi 4776ab47cfaaSmrgfi 47775c42550eSmrg])# AC_LIBTOOL_CONFIG 4778ab47cfaaSmrg 4779ab47cfaaSmrg 47805c42550eSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 47815c42550eSmrg# ------------------------------------------- 47825c42550eSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 47835c42550eSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 47841473d951Smrg 47855c42550eSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4786ab47cfaaSmrg 47875c42550eSmrgif test "$GCC" = yes; then 47885c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4789ab47cfaaSmrg 47905c42550eSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 47915c42550eSmrg lt_cv_prog_compiler_rtti_exceptions, 47925c42550eSmrg [-fno-rtti -fno-exceptions], [], 47935c42550eSmrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 47941473d951Smrgfi 47955c42550eSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 4796ab47cfaaSmrg 4797ab47cfaaSmrg 47985c42550eSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 47995c42550eSmrg# --------------------------------- 48005c42550eSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 48015c42550eSmrg[AC_REQUIRE([AC_CANONICAL_HOST]) 48025c42550eSmrgAC_REQUIRE([LT_AC_PROG_SED]) 48035c42550eSmrgAC_REQUIRE([AC_PROG_NM]) 48045c42550eSmrgAC_REQUIRE([AC_OBJEXT]) 48055c42550eSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 48065c42550eSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 48075c42550eSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 48085c42550eSmrg[ 48095c42550eSmrg# These are sane defaults that work on at least a few old systems. 48105c42550eSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4811ab47cfaaSmrg 48125c42550eSmrg# Character class describing NM global symbol codes. 48135c42550eSmrgsymcode='[[BCDEGRST]]' 4814ab47cfaaSmrg 48155c42550eSmrg# Regexp to match symbols that can be accessed directly from C. 48165c42550eSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4817ab47cfaaSmrg 48185c42550eSmrg# Transform an extracted symbol line into a proper C declaration 48195c42550eSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 48201473d951Smrg 48215c42550eSmrg# Transform an extracted symbol line into symbol name and symbol address 48225c42550eSmrglt_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'" 4823ab47cfaaSmrg 48245c42550eSmrg# Define system-specific variables. 48255c42550eSmrgcase $host_os in 48265c42550eSmrgaix*) 48275c42550eSmrg symcode='[[BCDT]]' 48285c42550eSmrg ;; 48295c42550eSmrgcygwin* | mingw* | pw32*) 48305c42550eSmrg symcode='[[ABCDGISTW]]' 48315c42550eSmrg ;; 48325c42550eSmrghpux*) # Its linker distinguishes data from code symbols 48335c42550eSmrg if test "$host_cpu" = ia64; then 48345c42550eSmrg symcode='[[ABCDEGRST]]' 48355c42550eSmrg fi 48365c42550eSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 48375c42550eSmrg 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'" 48385c42550eSmrg ;; 48395c42550eSmrglinux* | k*bsd*-gnu) 48405c42550eSmrg if test "$host_cpu" = ia64; then 48415c42550eSmrg symcode='[[ABCDGIRSTW]]' 48425c42550eSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 48435c42550eSmrg 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'" 48445c42550eSmrg fi 48455c42550eSmrg ;; 48465c42550eSmrgirix* | nonstopux*) 48475c42550eSmrg symcode='[[BCDEGRST]]' 48485c42550eSmrg ;; 48495c42550eSmrgosf*) 48505c42550eSmrg symcode='[[BCDEGQRST]]' 48515c42550eSmrg ;; 48525c42550eSmrgsolaris*) 48535c42550eSmrg symcode='[[BDRT]]' 48545c42550eSmrg ;; 48555c42550eSmrgsco3.2v5*) 48565c42550eSmrg symcode='[[DT]]' 48575c42550eSmrg ;; 48585c42550eSmrgsysv4.2uw2*) 48595c42550eSmrg symcode='[[DT]]' 48605c42550eSmrg ;; 48615c42550eSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 48625c42550eSmrg symcode='[[ABDT]]' 48635c42550eSmrg ;; 48645c42550eSmrgsysv4) 48655c42550eSmrg symcode='[[DFNSTU]]' 48665c42550eSmrg ;; 48675c42550eSmrgesac 48681473d951Smrg 48695c42550eSmrg# Handle CRLF in mingw tool chain 48705c42550eSmrgopt_cr= 48715c42550eSmrgcase $build_os in 48725c42550eSmrgmingw*) 48735c42550eSmrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 48745c42550eSmrg ;; 48755c42550eSmrgesac 48761473d951Smrg 48775c42550eSmrg# If we're using GNU nm, then use its standard symbol codes. 48785c42550eSmrgcase `$NM -V 2>&1` in 48795c42550eSmrg*GNU* | *'with BFD'*) 48805c42550eSmrg symcode='[[ABCDGIRSTW]]' ;; 48815c42550eSmrgesac 4882ab47cfaaSmrg 48835c42550eSmrg# Try without a prefix undercore, then with it. 48845c42550eSmrgfor ac_symprfx in "" "_"; do 4885ab47cfaaSmrg 48865c42550eSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 48875c42550eSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4888ab47cfaaSmrg 48895c42550eSmrg # Write the raw and C identifiers. 48905c42550eSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 48911473d951Smrg 48925c42550eSmrg # Check to see that the pipe works correctly. 48935c42550eSmrg pipe_works=no 48941473d951Smrg 48955c42550eSmrg rm -f conftest* 48965c42550eSmrg cat > conftest.$ac_ext <<EOF 48975c42550eSmrg#ifdef __cplusplus 48985c42550eSmrgextern "C" { 48995c42550eSmrg#endif 49005c42550eSmrgchar nm_test_var; 49015c42550eSmrgvoid nm_test_func(){} 49025c42550eSmrg#ifdef __cplusplus 49035c42550eSmrg} 49045c42550eSmrg#endif 49055c42550eSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 49065c42550eSmrgEOF 49071473d951Smrg 49085c42550eSmrg if AC_TRY_EVAL(ac_compile); then 49095c42550eSmrg # Now try to grab the symbols. 49105c42550eSmrg nlist=conftest.nm 49115c42550eSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 49125c42550eSmrg # Try sorting and uniquifying the output. 49135c42550eSmrg if sort "$nlist" | uniq > "$nlist"T; then 49145c42550eSmrg mv -f "$nlist"T "$nlist" 49155c42550eSmrg else 49165c42550eSmrg rm -f "$nlist"T 49175c42550eSmrg fi 4918ab47cfaaSmrg 49195c42550eSmrg # Make sure that we snagged all the symbols we need. 49205c42550eSmrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 49215c42550eSmrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 49225c42550eSmrg cat <<EOF > conftest.$ac_ext 49235c42550eSmrg#ifdef __cplusplus 49245c42550eSmrgextern "C" { 49255c42550eSmrg#endif 49261473d951Smrg 49275c42550eSmrgEOF 49285c42550eSmrg # Now generate the symbol file. 49295c42550eSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 49301473d951Smrg 49315c42550eSmrg cat <<EOF >> conftest.$ac_ext 49325c42550eSmrg#if defined (__STDC__) && __STDC__ 49335c42550eSmrg# define lt_ptr_t void * 49345c42550eSmrg#else 49355c42550eSmrg# define lt_ptr_t char * 49365c42550eSmrg# define const 49375c42550eSmrg#endif 49381473d951Smrg 49395c42550eSmrg/* The mapping between symbol names and symbols. */ 49405c42550eSmrgconst struct { 49415c42550eSmrg const char *name; 49425c42550eSmrg lt_ptr_t address; 49435c42550eSmrg} 49445c42550eSmrglt_preloaded_symbols[[]] = 49455c42550eSmrg{ 49465c42550eSmrgEOF 49475c42550eSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 49485c42550eSmrg cat <<\EOF >> conftest.$ac_ext 49495c42550eSmrg {0, (lt_ptr_t) 0} 49505c42550eSmrg}; 49511473d951Smrg 49525c42550eSmrg#ifdef __cplusplus 49535c42550eSmrg} 49545c42550eSmrg#endif 49555c42550eSmrgEOF 49565c42550eSmrg # Now try linking the two files. 49575c42550eSmrg mv conftest.$ac_objext conftstm.$ac_objext 49585c42550eSmrg lt_save_LIBS="$LIBS" 49595c42550eSmrg lt_save_CFLAGS="$CFLAGS" 49605c42550eSmrg LIBS="conftstm.$ac_objext" 49615c42550eSmrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 49625c42550eSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 49635c42550eSmrg pipe_works=yes 49645c42550eSmrg fi 49655c42550eSmrg LIBS="$lt_save_LIBS" 49665c42550eSmrg CFLAGS="$lt_save_CFLAGS" 49675c42550eSmrg else 49685c42550eSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4969ab47cfaaSmrg fi 49705c42550eSmrg else 49715c42550eSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 49725c42550eSmrg fi 49735c42550eSmrg else 49745c42550eSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 49755c42550eSmrg fi 49765c42550eSmrg else 49775c42550eSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 49785c42550eSmrg cat conftest.$ac_ext >&5 49795c42550eSmrg fi 49805c42550eSmrg rm -rf conftest* conftst* 4981ab47cfaaSmrg 49825c42550eSmrg # Do not use the global_symbol_pipe unless it works. 49835c42550eSmrg if test "$pipe_works" = yes; then 49845c42550eSmrg break 49855c42550eSmrg else 49865c42550eSmrg lt_cv_sys_global_symbol_pipe= 49875c42550eSmrg fi 49885c42550eSmrgdone 49895c42550eSmrg]) 49905c42550eSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 49915c42550eSmrg lt_cv_sys_global_symbol_to_cdecl= 49925c42550eSmrgfi 49935c42550eSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 49945c42550eSmrg AC_MSG_RESULT(failed) 49955c42550eSmrgelse 49965c42550eSmrg AC_MSG_RESULT(ok) 49975c42550eSmrgfi 49985c42550eSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4999ab47cfaaSmrg 5000ab47cfaaSmrg 50015c42550eSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 50025c42550eSmrg# --------------------------------------- 50035c42550eSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 50045c42550eSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 50055c42550eSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 50065c42550eSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 5007ab47cfaaSmrg 50085c42550eSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 50095c42550eSmrg ifelse([$1],[CXX],[ 50105c42550eSmrg # C++ specific cases for pic, static, wl, etc. 50115c42550eSmrg if test "$GXX" = yes; then 50125c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50135c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5014ab47cfaaSmrg 50155c42550eSmrg case $host_os in 50165c42550eSmrg aix*) 50175c42550eSmrg # All AIX code is PIC. 50185c42550eSmrg if test "$host_cpu" = ia64; then 50195c42550eSmrg # AIX 5 now supports IA64 processor 50205c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50211473d951Smrg fi 50225c42550eSmrg ;; 50235c42550eSmrg amigaos*) 50245c42550eSmrg # FIXME: we need at least 68020 code to build shared libraries, but 50255c42550eSmrg # adding the `-m68020' flag to GCC prevents building anything better, 50265c42550eSmrg # like `-m68040'. 50275c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 50285c42550eSmrg ;; 50295c42550eSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 50305c42550eSmrg # PIC is the default for these OSes. 50315c42550eSmrg ;; 50325c42550eSmrg mingw* | cygwin* | os2* | pw32*) 50335c42550eSmrg # This hack is so that the source file can tell whether it is being 50345c42550eSmrg # built for inclusion in a dll (and should export symbols for example). 50355c42550eSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 50365c42550eSmrg # (--disable-auto-import) libraries 50375c42550eSmrg m4_if([$1], [GCJ], [], 50385c42550eSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50395c42550eSmrg ;; 50405c42550eSmrg darwin* | rhapsody*) 50415c42550eSmrg # PIC is the default on this platform 50425c42550eSmrg # Common symbols not allowed in MH_DYLIB files 50435c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 50445c42550eSmrg ;; 50455c42550eSmrg *djgpp*) 50465c42550eSmrg # DJGPP does not support shared libraries at all 50475c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 50485c42550eSmrg ;; 50495c42550eSmrg interix[[3-9]]*) 50505c42550eSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 50515c42550eSmrg # Instead, we relocate shared libraries at runtime. 50525c42550eSmrg ;; 50535c42550eSmrg sysv4*MP*) 50545c42550eSmrg if test -d /usr/nec; then 50555c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 50565c42550eSmrg fi 50575c42550eSmrg ;; 50585c42550eSmrg hpux*) 50595c42550eSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 50605c42550eSmrg # not for PA HP-UX. 50615c42550eSmrg case $host_cpu in 50625c42550eSmrg hppa*64*|ia64*) 50635c42550eSmrg ;; 50645c42550eSmrg *) 50655c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50665c42550eSmrg ;; 50675c42550eSmrg esac 50685c42550eSmrg ;; 50695c42550eSmrg *) 50705c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50715c42550eSmrg ;; 50725c42550eSmrg esac 50735c42550eSmrg else 50745c42550eSmrg case $host_os in 50755c42550eSmrg aix[[4-9]]*) 50765c42550eSmrg # All AIX code is PIC. 50775c42550eSmrg if test "$host_cpu" = ia64; then 50785c42550eSmrg # AIX 5 now supports IA64 processor 50795c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50805c42550eSmrg else 50815c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 50825c42550eSmrg fi 50835c42550eSmrg ;; 50845c42550eSmrg chorus*) 50855c42550eSmrg case $cc_basename in 50865c42550eSmrg cxch68*) 50875c42550eSmrg # Green Hills C++ Compiler 50885c42550eSmrg # _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" 50895c42550eSmrg ;; 50905c42550eSmrg esac 50915c42550eSmrg ;; 50925c42550eSmrg darwin*) 50935c42550eSmrg # PIC is the default on this platform 50945c42550eSmrg # Common symbols not allowed in MH_DYLIB files 50955c42550eSmrg case $cc_basename in 50965c42550eSmrg xlc*) 50975c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 50985c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50995c42550eSmrg ;; 51005c42550eSmrg esac 51015c42550eSmrg ;; 51025c42550eSmrg dgux*) 51035c42550eSmrg case $cc_basename in 51045c42550eSmrg ec++*) 51055c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51065c42550eSmrg ;; 51075c42550eSmrg ghcx*) 51085c42550eSmrg # Green Hills C++ Compiler 51095c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51105c42550eSmrg ;; 51115c42550eSmrg *) 51125c42550eSmrg ;; 51135c42550eSmrg esac 51145c42550eSmrg ;; 51155c42550eSmrg freebsd* | dragonfly*) 51165c42550eSmrg # FreeBSD uses GNU C++ 51175c42550eSmrg ;; 51185c42550eSmrg hpux9* | hpux10* | hpux11*) 51195c42550eSmrg case $cc_basename in 51205c42550eSmrg CC*) 51215c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51225c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51235c42550eSmrg if test "$host_cpu" != ia64; then 51245c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51255c42550eSmrg fi 51265c42550eSmrg ;; 51275c42550eSmrg aCC*) 51285c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51295c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51305c42550eSmrg case $host_cpu in 51315c42550eSmrg hppa*64*|ia64*) 51325c42550eSmrg # +Z the default 51335c42550eSmrg ;; 51345c42550eSmrg *) 51355c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51365c42550eSmrg ;; 51375c42550eSmrg esac 51385c42550eSmrg ;; 51395c42550eSmrg *) 51405c42550eSmrg ;; 51415c42550eSmrg esac 51425c42550eSmrg ;; 51435c42550eSmrg interix*) 51445c42550eSmrg # This is c89, which is MS Visual C++ (no shared libs) 51455c42550eSmrg # Anyone wants to do a port? 51465c42550eSmrg ;; 51475c42550eSmrg irix5* | irix6* | nonstopux*) 51485c42550eSmrg case $cc_basename in 51495c42550eSmrg CC*) 51505c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51515c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51525c42550eSmrg # CC pic flag -KPIC is the default. 51535c42550eSmrg ;; 51545c42550eSmrg *) 51555c42550eSmrg ;; 51565c42550eSmrg esac 51575c42550eSmrg ;; 51585c42550eSmrg linux* | k*bsd*-gnu) 51595c42550eSmrg case $cc_basename in 51605c42550eSmrg KCC*) 51615c42550eSmrg # KAI C++ Compiler 51625c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 51635c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51645c42550eSmrg ;; 51655c42550eSmrg icpc* | ecpc*) 51665c42550eSmrg # Intel C++ 51675c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51685c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51695c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 51705c42550eSmrg ;; 51715c42550eSmrg pgCC* | pgcpp*) 51725c42550eSmrg # Portland Group C++ compiler. 51735c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51745c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 51755c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51765c42550eSmrg ;; 51775c42550eSmrg cxx*) 51785c42550eSmrg # Compaq C++ 51795c42550eSmrg # Make sure the PIC flag is empty. It appears that all Alpha 51805c42550eSmrg # Linux and Compaq Tru64 Unix objects are PIC. 51815c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 51825c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51835c42550eSmrg ;; 51845c42550eSmrg *) 51855c42550eSmrg case `$CC -V 2>&1 | sed 5q` in 51865c42550eSmrg *Sun\ C*) 51875c42550eSmrg # Sun C++ 5.9 51885c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51895c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51905c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 51915c42550eSmrg ;; 51925c42550eSmrg esac 51935c42550eSmrg ;; 51945c42550eSmrg esac 51955c42550eSmrg ;; 51965c42550eSmrg lynxos*) 51975c42550eSmrg ;; 51985c42550eSmrg m88k*) 51995c42550eSmrg ;; 52005c42550eSmrg mvs*) 52015c42550eSmrg case $cc_basename in 52025c42550eSmrg cxx*) 52035c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 52045c42550eSmrg ;; 52055c42550eSmrg *) 52065c42550eSmrg ;; 52075c42550eSmrg esac 52085c42550eSmrg ;; 52095c42550eSmrg netbsd*) 52105c42550eSmrg ;; 52115c42550eSmrg osf3* | osf4* | osf5*) 52125c42550eSmrg case $cc_basename in 52135c42550eSmrg KCC*) 52145c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 52155c42550eSmrg ;; 52165c42550eSmrg RCC*) 52175c42550eSmrg # Rational C++ 2.4.1 52185c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52195c42550eSmrg ;; 52205c42550eSmrg cxx*) 52215c42550eSmrg # Digital/Compaq C++ 52225c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52235c42550eSmrg # Make sure the PIC flag is empty. It appears that all Alpha 52245c42550eSmrg # Linux and Compaq Tru64 Unix objects are PIC. 52255c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 52265c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52275c42550eSmrg ;; 52285c42550eSmrg *) 52295c42550eSmrg ;; 52305c42550eSmrg esac 52315c42550eSmrg ;; 52325c42550eSmrg psos*) 52335c42550eSmrg ;; 52345c42550eSmrg solaris*) 52355c42550eSmrg case $cc_basename in 52365c42550eSmrg CC*) 52375c42550eSmrg # Sun C++ 4.2, 5.x and Centerline C++ 52385c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52395c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52405c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52415c42550eSmrg ;; 52425c42550eSmrg gcx*) 52435c42550eSmrg # Green Hills C++ Compiler 52445c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 52455c42550eSmrg ;; 52465c42550eSmrg *) 52475c42550eSmrg ;; 52485c42550eSmrg esac 52495c42550eSmrg ;; 52505c42550eSmrg sunos4*) 52515c42550eSmrg case $cc_basename in 52525c42550eSmrg CC*) 52535c42550eSmrg # Sun C++ 4.x 52545c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52555c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52565c42550eSmrg ;; 52575c42550eSmrg lcc*) 52585c42550eSmrg # Lucid 52595c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52605c42550eSmrg ;; 52615c42550eSmrg *) 52625c42550eSmrg ;; 52635c42550eSmrg esac 52645c42550eSmrg ;; 52655c42550eSmrg tandem*) 52665c42550eSmrg case $cc_basename in 52675c42550eSmrg NCC*) 52685c42550eSmrg # NonStop-UX NCC 3.20 52695c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52705c42550eSmrg ;; 52715c42550eSmrg *) 52725c42550eSmrg ;; 52735c42550eSmrg esac 52745c42550eSmrg ;; 52755c42550eSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 52765c42550eSmrg case $cc_basename in 52775c42550eSmrg CC*) 52785c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52795c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52805c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52815c42550eSmrg ;; 52825c42550eSmrg esac 52835c42550eSmrg ;; 52845c42550eSmrg vxworks*) 52855c42550eSmrg ;; 52865c42550eSmrg *) 52875c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 52885c42550eSmrg ;; 52895c42550eSmrg esac 52901473d951Smrg fi 52915c42550eSmrg], 52925c42550eSmrg[ 52935c42550eSmrg if test "$GCC" = yes; then 52945c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52955c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 52961473d951Smrg 52975c42550eSmrg case $host_os in 52985c42550eSmrg aix*) 52995c42550eSmrg # All AIX code is PIC. 53005c42550eSmrg if test "$host_cpu" = ia64; then 53015c42550eSmrg # AIX 5 now supports IA64 processor 53025c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53035c42550eSmrg fi 53045c42550eSmrg ;; 53051473d951Smrg 53065c42550eSmrg amigaos*) 53075c42550eSmrg # FIXME: we need at least 68020 code to build shared libraries, but 53085c42550eSmrg # adding the `-m68020' flag to GCC prevents building anything better, 53095c42550eSmrg # like `-m68040'. 53105c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 53115c42550eSmrg ;; 53121473d951Smrg 53135c42550eSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 53145c42550eSmrg # PIC is the default for these OSes. 53155c42550eSmrg ;; 53161473d951Smrg 53175c42550eSmrg mingw* | cygwin* | pw32* | os2*) 53185c42550eSmrg # This hack is so that the source file can tell whether it is being 53195c42550eSmrg # built for inclusion in a dll (and should export symbols for example). 53205c42550eSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 53215c42550eSmrg # (--disable-auto-import) libraries 53225c42550eSmrg m4_if([$1], [GCJ], [], 53235c42550eSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53245c42550eSmrg ;; 53251473d951Smrg 53265c42550eSmrg darwin* | rhapsody*) 53275c42550eSmrg # PIC is the default on this platform 53285c42550eSmrg # Common symbols not allowed in MH_DYLIB files 53295c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 53305c42550eSmrg ;; 53311473d951Smrg 53325c42550eSmrg interix[[3-9]]*) 53335c42550eSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 53345c42550eSmrg # Instead, we relocate shared libraries at runtime. 53355c42550eSmrg ;; 53361473d951Smrg 53375c42550eSmrg msdosdjgpp*) 53385c42550eSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 53395c42550eSmrg # on systems that don't support them. 53405c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 53415c42550eSmrg enable_shared=no 53425c42550eSmrg ;; 53431473d951Smrg 53445c42550eSmrg sysv4*MP*) 53455c42550eSmrg if test -d /usr/nec; then 53465c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 53475c42550eSmrg fi 53485c42550eSmrg ;; 53491473d951Smrg 53505c42550eSmrg hpux*) 53515c42550eSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 53525c42550eSmrg # not for PA HP-UX. 53535c42550eSmrg case $host_cpu in 53545c42550eSmrg hppa*64*|ia64*) 53555c42550eSmrg # +Z the default 53565c42550eSmrg ;; 53575c42550eSmrg *) 53585c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53595c42550eSmrg ;; 53605c42550eSmrg esac 53615c42550eSmrg ;; 53621473d951Smrg 53635c42550eSmrg *) 53645c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53655c42550eSmrg ;; 53665c42550eSmrg esac 53675c42550eSmrg else 53685c42550eSmrg # PORTME Check for flag to pass linker flags through the system compiler. 53695c42550eSmrg case $host_os in 53705c42550eSmrg aix*) 53715c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53725c42550eSmrg if test "$host_cpu" = ia64; then 53735c42550eSmrg # AIX 5 now supports IA64 processor 53745c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53755c42550eSmrg else 53765c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 53775c42550eSmrg fi 53785c42550eSmrg ;; 53795c42550eSmrg darwin*) 53805c42550eSmrg # PIC is the default on this platform 53815c42550eSmrg # Common symbols not allowed in MH_DYLIB files 53825c42550eSmrg case $cc_basename in 53835c42550eSmrg xlc*) 53845c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 53855c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53865c42550eSmrg ;; 53875c42550eSmrg esac 53885c42550eSmrg ;; 53891473d951Smrg 53905c42550eSmrg mingw* | cygwin* | pw32* | os2*) 53915c42550eSmrg # This hack is so that the source file can tell whether it is being 53925c42550eSmrg # built for inclusion in a dll (and should export symbols for example). 53935c42550eSmrg m4_if([$1], [GCJ], [], 53945c42550eSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53955c42550eSmrg ;; 53961473d951Smrg 53975c42550eSmrg hpux9* | hpux10* | hpux11*) 53985c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53995c42550eSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 54005c42550eSmrg # not for PA HP-UX. 54015c42550eSmrg case $host_cpu in 54025c42550eSmrg hppa*64*|ia64*) 54035c42550eSmrg # +Z the default 54045c42550eSmrg ;; 54055c42550eSmrg *) 54065c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 54075c42550eSmrg ;; 54085c42550eSmrg esac 54095c42550eSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 54105c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 54115c42550eSmrg ;; 54121473d951Smrg 54135c42550eSmrg irix5* | irix6* | nonstopux*) 54145c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54155c42550eSmrg # PIC (with -KPIC) is the default. 54165c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54175c42550eSmrg ;; 54181473d951Smrg 54195c42550eSmrg newsos6) 54205c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54215c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54225c42550eSmrg ;; 54231473d951Smrg 54245c42550eSmrg linux* | k*bsd*-gnu) 54255c42550eSmrg case $cc_basename in 54265c42550eSmrg icc* | ecc*) 54275c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54285c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54295c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 54305c42550eSmrg ;; 54315c42550eSmrg pgcc* | pgf77* | pgf90* | pgf95*) 54325c42550eSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 54335c42550eSmrg # which looks to be a dead project) 54345c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54355c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 54365c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54375c42550eSmrg ;; 54385c42550eSmrg ccc*) 54395c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54405c42550eSmrg # All Alpha code is PIC. 54415c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54425c42550eSmrg ;; 54435c42550eSmrg *) 54445c42550eSmrg case `$CC -V 2>&1 | sed 5q` in 54455c42550eSmrg *Sun\ C*) 54465c42550eSmrg # Sun C 5.9 54475c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54485c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54495c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54505c42550eSmrg ;; 54515c42550eSmrg *Sun\ F*) 54525c42550eSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 54535c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54545c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54555c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 54565c42550eSmrg ;; 54575c42550eSmrg esac 54585c42550eSmrg ;; 54595c42550eSmrg esac 54605c42550eSmrg ;; 54611473d951Smrg 54625c42550eSmrg osf3* | osf4* | osf5*) 54635c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54645c42550eSmrg # All OSF/1 code is PIC. 54655c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54665c42550eSmrg ;; 54671473d951Smrg 54685c42550eSmrg rdos*) 54695c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54705c42550eSmrg ;; 5471ab47cfaaSmrg 54725c42550eSmrg solaris*) 54735c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54745c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54755c42550eSmrg case $cc_basename in 54765c42550eSmrg f77* | f90* | f95*) 54775c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 54785c42550eSmrg *) 54795c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 54805c42550eSmrg esac 54815c42550eSmrg ;; 5482ab47cfaaSmrg 54835c42550eSmrg sunos4*) 54845c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 54855c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 54865c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54875c42550eSmrg ;; 5488ab47cfaaSmrg 54895c42550eSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 54905c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54915c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54925c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54935c42550eSmrg ;; 5494ab47cfaaSmrg 54955c42550eSmrg sysv4*MP*) 54965c42550eSmrg if test -d /usr/nec ;then 54975c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 54985c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54995c42550eSmrg fi 55005c42550eSmrg ;; 5501ab47cfaaSmrg 55025c42550eSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 55035c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55045c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55055c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55065c42550eSmrg ;; 5507ab47cfaaSmrg 55085c42550eSmrg unicos*) 55095c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55105c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55115c42550eSmrg ;; 5512ab47cfaaSmrg 55135c42550eSmrg uts4*) 55145c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 55155c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55165c42550eSmrg ;; 5517ab47cfaaSmrg 55185c42550eSmrg *) 55195c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55205c42550eSmrg ;; 55215c42550eSmrg esac 55225c42550eSmrg fi 55235c42550eSmrg]) 55245c42550eSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 5525ab47cfaaSmrg 55265c42550eSmrg# 55275c42550eSmrg# Check to make sure the PIC flag actually works. 55285c42550eSmrg# 55295c42550eSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 55305c42550eSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 55315c42550eSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 55325c42550eSmrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 55335c42550eSmrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 55345c42550eSmrg "" | " "*) ;; 55355c42550eSmrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 55365c42550eSmrg esac], 55375c42550eSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 55385c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 55395c42550eSmrgfi 55405c42550eSmrgcase $host_os in 55415c42550eSmrg # For platforms which do not support PIC, -DPIC is meaningless: 55425c42550eSmrg *djgpp*) 55435c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 55441473d951Smrg ;; 55451473d951Smrg *) 55465c42550eSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 55475c42550eSmrg ;; 55485c42550eSmrgesac 5549ab47cfaaSmrg 55505c42550eSmrg# 55515c42550eSmrg# Check to make sure the static flag actually works. 55525c42550eSmrg# 55535c42550eSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 55545c42550eSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 55555c42550eSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 55565c42550eSmrg $lt_tmp_static_flag, 55575c42550eSmrg [], 55585c42550eSmrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 55595c42550eSmrg]) 5560ab47cfaaSmrg 55615c42550eSmrg 55625c42550eSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 55635c42550eSmrg# ------------------------------------ 55645c42550eSmrg# See if the linker supports building shared libraries. 55655c42550eSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 55665c42550eSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 55675c42550eSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 55685c42550eSmrgifelse([$1],[CXX],[ 55695c42550eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 55705c42550eSmrg case $host_os in 55715c42550eSmrg aix[[4-9]]*) 55725c42550eSmrg # If we're using GNU nm, then we don't want the "-C" option. 55735c42550eSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 55745c42550eSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 55755c42550eSmrg _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' 55765c42550eSmrg else 55775c42550eSmrg _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' 55785c42550eSmrg fi 55795c42550eSmrg ;; 55805c42550eSmrg pw32*) 55815c42550eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 55825c42550eSmrg ;; 55835c42550eSmrg cygwin* | mingw*) 55845c42550eSmrg _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' 55855c42550eSmrg ;; 55865c42550eSmrg *) 55875c42550eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 55885c42550eSmrg ;; 55895c42550eSmrg esac 55905c42550eSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 55915c42550eSmrg],[ 55925c42550eSmrg runpath_var= 55935c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 55945c42550eSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 55955c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)= 55965c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 55975c42550eSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 55985c42550eSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 55995c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 56005c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 56015c42550eSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 56025c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 56035c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 56045c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 56055c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 56065c42550eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 56075c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 56085c42550eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 56095c42550eSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 56105c42550eSmrg _LT_AC_TAGVAR(module_cmds, $1)= 56115c42550eSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 56125c42550eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 56135c42550eSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56145c42550eSmrg # include_expsyms should be a list of space-separated symbols to be *always* 56155c42550eSmrg # included in the symbol list 56165c42550eSmrg _LT_AC_TAGVAR(include_expsyms, $1)= 56175c42550eSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 56185c42550eSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 56195c42550eSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 56205c42550eSmrg # as well as any symbol that contains `d'. 56215c42550eSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 56225c42550eSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 56235c42550eSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 56245c42550eSmrg # the symbol is explicitly referenced. Since portable code cannot 56255c42550eSmrg # rely on this symbol name, it's probably fine to never include it in 56265c42550eSmrg # preloaded symbol tables. 56275c42550eSmrg # Exclude shared library initialization/finalization symbols. 56285c42550eSmrgdnl Note also adjust exclude_expsyms for C++ above. 56295c42550eSmrg extract_expsyms_cmds= 56305c42550eSmrg # Just being paranoid about ensuring that cc_basename is set. 56315c42550eSmrg _LT_CC_BASENAME([$compiler]) 56325c42550eSmrg case $host_os in 56335c42550eSmrg cygwin* | mingw* | pw32*) 56345c42550eSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 56355c42550eSmrg # When not using gcc, we currently assume that we are using 56365c42550eSmrg # Microsoft Visual C++. 56375c42550eSmrg if test "$GCC" != yes; then 56385c42550eSmrg with_gnu_ld=no 56395c42550eSmrg fi 56405c42550eSmrg ;; 56415c42550eSmrg interix*) 56425c42550eSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 56435c42550eSmrg with_gnu_ld=yes 56445c42550eSmrg ;; 56455c42550eSmrg openbsd*) 56465c42550eSmrg with_gnu_ld=no 56471473d951Smrg ;; 56481473d951Smrg esac 5649ab47cfaaSmrg 56505c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 56515c42550eSmrg if test "$with_gnu_ld" = yes; then 56525c42550eSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 56535c42550eSmrg wlarc='${wl}' 56545c42550eSmrg 56555c42550eSmrg # Set some defaults for GNU ld with shared library support. These 56565c42550eSmrg # are reset later if shared libraries are not supported. Putting them 56575c42550eSmrg # here allows them to be overridden if necessary. 56585c42550eSmrg runpath_var=LD_RUN_PATH 56595c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 56605c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 56615c42550eSmrg # ancient GNU ld didn't support --whole-archive et. al. 56625c42550eSmrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 56635c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 56645c42550eSmrg else 56655c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 56665c42550eSmrg fi 56675c42550eSmrg supports_anon_versioning=no 56685c42550eSmrg case `$LD -v 2>/dev/null` in 56695c42550eSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 56705c42550eSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 56715c42550eSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 56725c42550eSmrg *\ 2.11.*) ;; # other 2.11 versions 56735c42550eSmrg *) supports_anon_versioning=yes ;; 56745c42550eSmrg esac 56755c42550eSmrg 56765c42550eSmrg # See if GNU ld supports shared libraries. 56775c42550eSmrg case $host_os in 56785c42550eSmrg aix[[3-9]]*) 56795c42550eSmrg # On AIX/PPC, the GNU linker is very broken 56805c42550eSmrg if test "$host_cpu" != ia64; then 56815c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 56825c42550eSmrg cat <<EOF 1>&2 56835c42550eSmrg 56845c42550eSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 56855c42550eSmrg*** to be unable to reliably create shared libraries on AIX. 56865c42550eSmrg*** Therefore, libtool is disabling shared libraries support. If you 56875c42550eSmrg*** really care for shared libraries, you may want to modify your PATH 56885c42550eSmrg*** so that a non-GNU linker is found, and then restart. 5689ab47cfaaSmrg 56905c42550eSmrgEOF 56915c42550eSmrg fi 56925c42550eSmrg ;; 5693ab47cfaaSmrg 56945c42550eSmrg amigaos*) 56955c42550eSmrg _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)' 56965c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56975c42550eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 56985c42550eSmrg 56995c42550eSmrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 57005c42550eSmrg # that the semantics of dynamic libraries on AmigaOS, at least up 57015c42550eSmrg # to version 4, is to share data among multiple programs linked 57025c42550eSmrg # with the same dynamic library. Since this doesn't match the 57035c42550eSmrg # behavior of shared libraries on other platforms, we can't use 57045c42550eSmrg # them. 57055c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57065c42550eSmrg ;; 5707ab47cfaaSmrg 57085c42550eSmrg beos*) 57095c42550eSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 57105c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 57115c42550eSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 57125c42550eSmrg # support --undefined. This deserves some investigation. FIXME 57135c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 57145c42550eSmrg else 57155c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57165c42550eSmrg fi 57175c42550eSmrg ;; 5718ab47cfaaSmrg 57195c42550eSmrg cygwin* | mingw* | pw32*) 57205c42550eSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 57215c42550eSmrg # as there is no search path for DLLs. 57225c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57235c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 57245c42550eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 57255c42550eSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 57265c42550eSmrg _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' 57275c42550eSmrg 57285c42550eSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 57295c42550eSmrg _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' 57305c42550eSmrg # If the export-symbols file already is a .def file (1st line 57315c42550eSmrg # is EXPORTS), use it as is; otherwise, prepend... 57325c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 57335c42550eSmrg cp $export_symbols $output_objdir/$soname.def; 57345c42550eSmrg else 57355c42550eSmrg echo EXPORTS > $output_objdir/$soname.def; 57365c42550eSmrg cat $export_symbols >> $output_objdir/$soname.def; 57375c42550eSmrg fi~ 57385c42550eSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 57395c42550eSmrg else 57405c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57415c42550eSmrg fi 57425c42550eSmrg ;; 5743ab47cfaaSmrg 57445c42550eSmrg interix[[3-9]]*) 57455c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 57465c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 57475c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 57485c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 57495c42550eSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 57505c42550eSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 57515c42550eSmrg # default) and relocated if they conflict, which is a slow very memory 57525c42550eSmrg # consuming and fragmenting process. To avoid this, we pick a random, 57535c42550eSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 57545c42550eSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 57555c42550eSmrg _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' 57565c42550eSmrg _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' 57575c42550eSmrg ;; 5758ab47cfaaSmrg 57595c42550eSmrg gnu* | linux* | k*bsd*-gnu) 57605c42550eSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 57615c42550eSmrg tmp_addflag= 57625c42550eSmrg case $cc_basename,$host_cpu in 57635c42550eSmrg pgcc*) # Portland Group C compiler 57645c42550eSmrg _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' 57655c42550eSmrg tmp_addflag=' $pic_flag' 57665c42550eSmrg ;; 57675c42550eSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 57685c42550eSmrg _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' 57695c42550eSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 57705c42550eSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 57715c42550eSmrg tmp_addflag=' -i_dynamic' ;; 57725c42550eSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 57735c42550eSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 57745c42550eSmrg ifc* | ifort*) # Intel Fortran compiler 57755c42550eSmrg tmp_addflag=' -nofor_main' ;; 57765c42550eSmrg esac 57775c42550eSmrg case `$CC -V 2>&1 | sed 5q` in 57785c42550eSmrg *Sun\ C*) # Sun C 5.9 57795c42550eSmrg _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' 57805c42550eSmrg tmp_sharedflag='-G' ;; 57815c42550eSmrg *Sun\ F*) # Sun Fortran 8.3 57825c42550eSmrg tmp_sharedflag='-G' ;; 57835c42550eSmrg *) 57845c42550eSmrg tmp_sharedflag='-shared' ;; 57855c42550eSmrg esac 57865c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5787ab47cfaaSmrg 57885c42550eSmrg if test $supports_anon_versioning = yes; then 57895c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 57905c42550eSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 57915c42550eSmrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 57925c42550eSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 57935c42550eSmrg fi 57945c42550eSmrg else 57955c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57965c42550eSmrg fi 57975c42550eSmrg ;; 5798ab47cfaaSmrg 57995c42550eSmrg netbsd*) 58005c42550eSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 58015c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 58025c42550eSmrg wlarc= 58035c42550eSmrg else 58045c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58055c42550eSmrg _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' 58065c42550eSmrg fi 58075c42550eSmrg ;; 5808ab47cfaaSmrg 58095c42550eSmrg solaris*) 58105c42550eSmrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 58115c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58125c42550eSmrg cat <<EOF 1>&2 5813ab47cfaaSmrg 58145c42550eSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 58155c42550eSmrg*** create shared libraries on Solaris systems. Therefore, libtool 58165c42550eSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 58175c42550eSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 58185c42550eSmrg*** your PATH or compiler configuration so that the native linker is 58195c42550eSmrg*** used, and then restart. 5820ab47cfaaSmrg 58215c42550eSmrgEOF 58225c42550eSmrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 58235c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58245c42550eSmrg _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' 58255c42550eSmrg else 58265c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58275c42550eSmrg fi 58285c42550eSmrg ;; 5829ab47cfaaSmrg 58305c42550eSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 58315c42550eSmrg case `$LD -v 2>&1` in 58325c42550eSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 58335c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58345c42550eSmrg cat <<_LT_EOF 1>&2 5835ab47cfaaSmrg 58365c42550eSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 58375c42550eSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 58385c42550eSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 58395c42550eSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 58405c42550eSmrg*** your PATH or compiler configuration so that the native linker is 58415c42550eSmrg*** used, and then restart. 5842ab47cfaaSmrg 58435c42550eSmrg_LT_EOF 58445c42550eSmrg ;; 58455c42550eSmrg *) 58465c42550eSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 58475c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 58485c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 58495c42550eSmrg _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' 58505c42550eSmrg else 58515c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58525c42550eSmrg fi 58535c42550eSmrg ;; 58545c42550eSmrg esac 58555c42550eSmrg ;; 5856ab47cfaaSmrg 58575c42550eSmrg sunos4*) 58585c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 58595c42550eSmrg wlarc= 58605c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 58615c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 58625c42550eSmrg ;; 5863ab47cfaaSmrg 58645c42550eSmrg *) 58655c42550eSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 58665c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58675c42550eSmrg _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' 58685c42550eSmrg else 58695c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 58705c42550eSmrg fi 58715c42550eSmrg ;; 58725c42550eSmrg esac 5873ab47cfaaSmrg 58745c42550eSmrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 58755c42550eSmrg runpath_var= 58765c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 58775c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 58785c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 58795c42550eSmrg fi 58805c42550eSmrg else 58815c42550eSmrg # PORTME fill in a description of your system's linker (not GNU ld) 58825c42550eSmrg case $host_os in 58835c42550eSmrg aix3*) 58845c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 58855c42550eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 58865c42550eSmrg _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' 58875c42550eSmrg # Note: this linker hardcodes the directories in LIBPATH if there 58885c42550eSmrg # are no directories specified by -L. 58895c42550eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 58905c42550eSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 58915c42550eSmrg # Neither direct hardcoding nor static linking is supported with a 58925c42550eSmrg # broken collect2. 58935c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 58945c42550eSmrg fi 58955c42550eSmrg ;; 58961473d951Smrg 58975c42550eSmrg aix[[4-9]]*) 58985c42550eSmrg if test "$host_cpu" = ia64; then 58995c42550eSmrg # On IA64, the linker does run time linking by default, so we don't 59005c42550eSmrg # have to do anything special. 59015c42550eSmrg aix_use_runtimelinking=no 59025c42550eSmrg exp_sym_flag='-Bexport' 59035c42550eSmrg no_entry_flag="" 59045c42550eSmrg else 59055c42550eSmrg # If we're using GNU nm, then we don't want the "-C" option. 59065c42550eSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 59075c42550eSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 59085c42550eSmrg _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' 59095c42550eSmrg else 59105c42550eSmrg _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' 59115c42550eSmrg fi 59125c42550eSmrg aix_use_runtimelinking=no 59131473d951Smrg 59145c42550eSmrg # Test if we are trying to use run time linking or normal 59155c42550eSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 59165c42550eSmrg # need to do runtime linking. 59175c42550eSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 59185c42550eSmrg for ld_flag in $LDFLAGS; do 59195c42550eSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 59205c42550eSmrg aix_use_runtimelinking=yes 59215c42550eSmrg break 59225c42550eSmrg fi 59235c42550eSmrg done 59245c42550eSmrg ;; 59255c42550eSmrg esac 59261473d951Smrg 59275c42550eSmrg exp_sym_flag='-bexport' 59285c42550eSmrg no_entry_flag='-bnoentry' 59295c42550eSmrg fi 59301473d951Smrg 59315c42550eSmrg # When large executables or shared objects are built, AIX ld can 59325c42550eSmrg # have problems creating the table of contents. If linking a library 59335c42550eSmrg # or program results in "error TOC overflow" add -mminimal-toc to 59345c42550eSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 59355c42550eSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5936ab47cfaaSmrg 59375c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 59385c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 59395c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 59405c42550eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5941ab47cfaaSmrg 59425c42550eSmrg if test "$GCC" = yes; then 59435c42550eSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 59445c42550eSmrg # We only want to do this on AIX 4.2 and lower, the check 59455c42550eSmrg # below for broken collect2 doesn't work under 4.3+ 59465c42550eSmrg collect2name=`${CC} -print-prog-name=collect2` 59475c42550eSmrg if test -f "$collect2name" && \ 59485c42550eSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 59495c42550eSmrg then 59505c42550eSmrg # We have reworked collect2 59515c42550eSmrg : 59525c42550eSmrg else 59535c42550eSmrg # We have old collect2 59545c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 59555c42550eSmrg # It fails to find uninstalled libraries when the uninstalled 59565c42550eSmrg # path is not listed in the libpath. Setting hardcode_minus_L 59575c42550eSmrg # to unsupported forces relinking 59585c42550eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 59595c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59605c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 59615c42550eSmrg fi 59625c42550eSmrg ;; 59635c42550eSmrg esac 59645c42550eSmrg shared_flag='-shared' 59655c42550eSmrg if test "$aix_use_runtimelinking" = yes; then 59665c42550eSmrg shared_flag="$shared_flag "'${wl}-G' 59675c42550eSmrg fi 59685c42550eSmrg else 59695c42550eSmrg # not using gcc 59705c42550eSmrg if test "$host_cpu" = ia64; then 59715c42550eSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 59725c42550eSmrg # chokes on -Wl,-G. The following line is correct: 59735c42550eSmrg shared_flag='-G' 59745c42550eSmrg else 59755c42550eSmrg if test "$aix_use_runtimelinking" = yes; then 59765c42550eSmrg shared_flag='${wl}-G' 59775c42550eSmrg else 59785c42550eSmrg shared_flag='${wl}-bM:SRE' 59795c42550eSmrg fi 59805c42550eSmrg fi 59815c42550eSmrg fi 5982ab47cfaaSmrg 59835c42550eSmrg # It seems that -bexpall does not export symbols beginning with 59845c42550eSmrg # underscore (_), so it is better to generate a list of symbols to export. 59855c42550eSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 59865c42550eSmrg if test "$aix_use_runtimelinking" = yes; then 59875c42550eSmrg # Warning - without using the other runtime loading flags (-brtl), 59885c42550eSmrg # -berok will link without error, but may produce a broken library. 59895c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 59905c42550eSmrg # Determine the default libpath from the value encoded in an empty executable. 59915c42550eSmrg _LT_AC_SYS_LIBPATH_AIX 59925c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 59935c42550eSmrg _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" 59945c42550eSmrg else 59955c42550eSmrg if test "$host_cpu" = ia64; then 59965c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 59975c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 59985c42550eSmrg _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" 59995c42550eSmrg else 60005c42550eSmrg # Determine the default libpath from the value encoded in an empty executable. 60015c42550eSmrg _LT_AC_SYS_LIBPATH_AIX 60025c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60035c42550eSmrg # Warning - without using the other run time loading flags, 60045c42550eSmrg # -berok will link without error, but may produce a broken library. 60055c42550eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 60065c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 60075c42550eSmrg # Exported symbols can be pulled into shared objects from archives 60085c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 60095c42550eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 60105c42550eSmrg # This is similar to how AIX traditionally builds its shared libraries. 60115c42550eSmrg _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' 60125c42550eSmrg fi 60135c42550eSmrg fi 60145c42550eSmrg ;; 6015ab47cfaaSmrg 60165c42550eSmrg amigaos*) 60175c42550eSmrg _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)' 60185c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60195c42550eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 60205c42550eSmrg # see comment about different semantics on the GNU ld section 60215c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 60225c42550eSmrg ;; 6023ab47cfaaSmrg 60245c42550eSmrg bsdi[[45]]*) 60255c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 60265c42550eSmrg ;; 6027ab47cfaaSmrg 60285c42550eSmrg cygwin* | mingw* | pw32*) 60295c42550eSmrg # When not using gcc, we currently assume that we are using 60305c42550eSmrg # Microsoft Visual C++. 60315c42550eSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 60325c42550eSmrg # no search path for DLLs. 60335c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 60345c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 60355c42550eSmrg # Tell ltmain to make .lib files, not .a files. 60365c42550eSmrg libext=lib 60375c42550eSmrg # Tell ltmain to make .dll files, not .so files. 60385c42550eSmrg shrext_cmds=".dll" 60395c42550eSmrg # FIXME: Setting linknames here is a bad hack. 60405c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 60415c42550eSmrg # The linker will automatically build a .lib file if we build a DLL. 60425c42550eSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 60435c42550eSmrg # FIXME: Should let the user specify the lib program. 60445c42550eSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 60455c42550eSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 60465c42550eSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 60475c42550eSmrg ;; 6048ab47cfaaSmrg 60495c42550eSmrg darwin* | rhapsody*) 60505c42550eSmrg case $host_os in 60515c42550eSmrg rhapsody* | darwin1.[[012]]) 60525c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 60535c42550eSmrg ;; 60545c42550eSmrg *) # Darwin 1.3 on 60555c42550eSmrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 60565c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 60575c42550eSmrg else 60585c42550eSmrg case ${MACOSX_DEPLOYMENT_TARGET} in 60595c42550eSmrg 10.[[012]]) 60605c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 60615c42550eSmrg ;; 60625c42550eSmrg 10.*) 60635c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 60645c42550eSmrg ;; 60655c42550eSmrg esac 60665c42550eSmrg fi 60675c42550eSmrg ;; 60685c42550eSmrg esac 60695c42550eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 60705c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 60715c42550eSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 60725c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 60735c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 60745c42550eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 60755c42550eSmrg if test "$GCC" = yes ; then 60765c42550eSmrg output_verbose_link_cmd='echo' 60775c42550eSmrg _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}" 60785c42550eSmrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 60795c42550eSmrg _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}" 60805c42550eSmrg _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}" 60815c42550eSmrg else 60825c42550eSmrg case $cc_basename in 60835c42550eSmrg xlc*) 60845c42550eSmrg output_verbose_link_cmd='echo' 60855c42550eSmrg _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' 60865c42550eSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 60875c42550eSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 60885c42550eSmrg _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}' 60895c42550eSmrg _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}' 60905c42550eSmrg ;; 60915c42550eSmrg *) 60925c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 60935c42550eSmrg ;; 60945c42550eSmrg esac 60955c42550eSmrg fi 60965c42550eSmrg ;; 6097ab47cfaaSmrg 60985c42550eSmrg dgux*) 60995c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 61005c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61015c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6102ab47cfaaSmrg ;; 6103ab47cfaaSmrg 61045c42550eSmrg freebsd1*) 61055c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 61065c42550eSmrg ;; 6107ab47cfaaSmrg 61085c42550eSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 61095c42550eSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 61105c42550eSmrg # does not break anything, and helps significantly (at the cost of a little 61115c42550eSmrg # extra space). 61125c42550eSmrg freebsd2.2*) 61135c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 61145c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 61155c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61165c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61175c42550eSmrg ;; 6118ab47cfaaSmrg 61195c42550eSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 61205c42550eSmrg freebsd2*) 61215c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 61225c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61235c42550eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 61245c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61255c42550eSmrg ;; 6126ab47cfaaSmrg 61275c42550eSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 61285c42550eSmrg freebsd* | dragonfly*) 61295c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 61305c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 61315c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61325c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 61335c42550eSmrg ;; 6134ab47cfaaSmrg 61355c42550eSmrg hpux9*) 61365c42550eSmrg if test "$GCC" = yes; then 61375c42550eSmrg _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' 61385c42550eSmrg else 61395c42550eSmrg _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' 61405c42550eSmrg fi 61415c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 61425c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 61435c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6144ab47cfaaSmrg 61455c42550eSmrg # hardcode_minus_L: Not really in the search PATH, 61465c42550eSmrg # but as the default location of the library. 61475c42550eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 61485c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 61495c42550eSmrg ;; 6150ab47cfaaSmrg 61515c42550eSmrg hpux10*) 61525c42550eSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 61535c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 61545c42550eSmrg else 61555c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 61565c42550eSmrg fi 61575c42550eSmrg if test "$with_gnu_ld" = no; then 61585c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 61595c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6160ab47cfaaSmrg 61615c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 61625c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6163ab47cfaaSmrg 61645c42550eSmrg # hardcode_minus_L: Not really in the search PATH, 61655c42550eSmrg # but as the default location of the library. 61665c42550eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 61675c42550eSmrg fi 6168ab47cfaaSmrg ;; 6169ab47cfaaSmrg 61705c42550eSmrg hpux11*) 61715c42550eSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 61725c42550eSmrg case $host_cpu in 61735c42550eSmrg hppa*64*) 61745c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 61755c42550eSmrg ;; 61765c42550eSmrg ia64*) 61775c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 61785c42550eSmrg ;; 61795c42550eSmrg *) 61805c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 61815c42550eSmrg ;; 61825c42550eSmrg esac 61835c42550eSmrg else 61845c42550eSmrg case $host_cpu in 61855c42550eSmrg hppa*64*) 61865c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 61875c42550eSmrg ;; 61885c42550eSmrg ia64*) 61895c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 61905c42550eSmrg ;; 61915c42550eSmrg *) 61925c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 61935c42550eSmrg ;; 61945c42550eSmrg esac 61955c42550eSmrg fi 61965c42550eSmrg if test "$with_gnu_ld" = no; then 61975c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 61985c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6199ab47cfaaSmrg 62005c42550eSmrg case $host_cpu in 62015c42550eSmrg hppa*64*|ia64*) 62025c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 62035c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 62045c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62055c42550eSmrg ;; 62065c42550eSmrg *) 62075c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62085c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6209ab47cfaaSmrg 62105c42550eSmrg # hardcode_minus_L: Not really in the search PATH, 62115c42550eSmrg # but as the default location of the library. 62125c42550eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 62135c42550eSmrg ;; 62145c42550eSmrg esac 62155c42550eSmrg fi 62165c42550eSmrg ;; 6217ab47cfaaSmrg 62185c42550eSmrg irix5* | irix6* | nonstopux*) 62195c42550eSmrg if test "$GCC" = yes; then 62205c42550eSmrg _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' 62215c42550eSmrg else 62225c42550eSmrg _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' 62235c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 62245c42550eSmrg fi 62255c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 62265c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62275c42550eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 62285c42550eSmrg ;; 6229ab47cfaaSmrg 62305c42550eSmrg netbsd*) 62315c42550eSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 62325c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 62335c42550eSmrg else 62345c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 62355c42550eSmrg fi 62365c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62375c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62385c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62395c42550eSmrg ;; 6240ab47cfaaSmrg 62415c42550eSmrg newsos6) 62425c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 62435c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62445c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 62455c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62465c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62475c42550eSmrg ;; 62481473d951Smrg 62495c42550eSmrg openbsd*) 62505c42550eSmrg if test -f /usr/libexec/ld.so; then 62515c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 62525c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 62535c42550eSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 62545c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 62555c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 62565c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 62575c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62585c42550eSmrg else 62595c42550eSmrg case $host_os in 62605c42550eSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 62615c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 62625c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62635c42550eSmrg ;; 62645c42550eSmrg *) 62655c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 62665c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 62675c42550eSmrg ;; 62685c42550eSmrg esac 62695c42550eSmrg fi 62705c42550eSmrg else 62715c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 62725c42550eSmrg fi 6273ab47cfaaSmrg ;; 6274ab47cfaaSmrg 62755c42550eSmrg os2*) 62765c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62775c42550eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 62785c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 62795c42550eSmrg _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' 62805c42550eSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 62815c42550eSmrg ;; 6282ab47cfaaSmrg 62835c42550eSmrg osf3*) 62845c42550eSmrg if test "$GCC" = yes; then 62855c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 62865c42550eSmrg _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' 62875c42550eSmrg else 62885c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 62895c42550eSmrg _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' 62905c42550eSmrg fi 62915c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 62925c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 62935c42550eSmrg ;; 6294ab47cfaaSmrg 62955c42550eSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 62965c42550eSmrg if test "$GCC" = yes; then 62975c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 62985c42550eSmrg _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' 62995c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 63005c42550eSmrg else 63015c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 63025c42550eSmrg _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' 63035c42550eSmrg _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~ 63045c42550eSmrg $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' 6305ab47cfaaSmrg 63065c42550eSmrg # Both c and cxx compiler support -rpath directly 63075c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 63085c42550eSmrg fi 63095c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 63105c42550eSmrg ;; 6311ab47cfaaSmrg 63125c42550eSmrg solaris*) 63135c42550eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 63145c42550eSmrg if test "$GCC" = yes; then 63155c42550eSmrg wlarc='${wl}' 63165c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63175c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 63185c42550eSmrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 63195c42550eSmrg else 63205c42550eSmrg wlarc='' 63215c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 63225c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 63235c42550eSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 63245c42550eSmrg fi 63255c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63265c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63275c42550eSmrg case $host_os in 63285c42550eSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 63295c42550eSmrg *) 63305c42550eSmrg # The compiler driver will combine and reorder linker options, 63315c42550eSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 63325c42550eSmrg # but is careful enough not to reorder. 63335c42550eSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 63345c42550eSmrg if test "$GCC" = yes; then 63355c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 63365c42550eSmrg else 63375c42550eSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 63385c42550eSmrg fi 63395c42550eSmrg ;; 63405c42550eSmrg esac 63415c42550eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 63425c42550eSmrg ;; 6343ab47cfaaSmrg 63445c42550eSmrg sunos4*) 63455c42550eSmrg if test "x$host_vendor" = xsequent; then 63465c42550eSmrg # Use $CC to link under sequent, because it throws in some extra .o 63475c42550eSmrg # files that make .init and .fini sections work. 63485c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 63495c42550eSmrg else 63505c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 63515c42550eSmrg fi 63525c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 63535c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 63545c42550eSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 63555c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63565c42550eSmrg ;; 6357ab47cfaaSmrg 63585c42550eSmrg sysv4) 63595c42550eSmrg case $host_vendor in 63605c42550eSmrg sni) 63615c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63625c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 63635c42550eSmrg ;; 63645c42550eSmrg siemens) 63655c42550eSmrg ## LD is ld it makes a PLAMLIB 63665c42550eSmrg ## CC just makes a GrossModule. 63675c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 63685c42550eSmrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 63695c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 63705c42550eSmrg ;; 63715c42550eSmrg motorola) 63725c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63735c42550eSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 63745c42550eSmrg ;; 63755c42550eSmrg esac 63765c42550eSmrg runpath_var='LD_RUN_PATH' 63775c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63785c42550eSmrg ;; 6379ab47cfaaSmrg 63805c42550eSmrg sysv4.3*) 63815c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63825c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63835c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 63845c42550eSmrg ;; 6385ab47cfaaSmrg 63865c42550eSmrg sysv4*MP*) 63875c42550eSmrg if test -d /usr/nec; then 63885c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63895c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 63905c42550eSmrg runpath_var=LD_RUN_PATH 63915c42550eSmrg hardcode_runpath_var=yes 63925c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 63935c42550eSmrg fi 63945c42550eSmrg ;; 6395ab47cfaaSmrg 63965c42550eSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 63975c42550eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 63985c42550eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 63995c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64005c42550eSmrg runpath_var='LD_RUN_PATH' 64011473d951Smrg 64025c42550eSmrg if test "$GCC" = yes; then 64035c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64045c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64055c42550eSmrg else 64065c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64075c42550eSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 64085c42550eSmrg fi 64095c42550eSmrg ;; 6410ab47cfaaSmrg 64115c42550eSmrg sysv5* | sco3.2v5* | sco5v6*) 64125c42550eSmrg # Note: We can NOT use -z defs as we might desire, because we do not 64135c42550eSmrg # link with -lc, and that would cause any symbols used from libc to 64145c42550eSmrg # always be unresolved, which means just about no library would 64155c42550eSmrg # ever link correctly. If we're not using GNU ld we use -z text 64165c42550eSmrg # though, which does catch some bad symbols but isn't as heavy-handed 64175c42550eSmrg # as -z defs. 64185c42550eSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 64195c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 64205c42550eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 64215c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64225c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 64235c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 64245c42550eSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 64255c42550eSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 64265c42550eSmrg runpath_var='LD_RUN_PATH' 6427ab47cfaaSmrg 64285c42550eSmrg if test "$GCC" = yes; then 64295c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 64305c42550eSmrg _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' 64315c42550eSmrg else 64325c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 64335c42550eSmrg _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' 64345c42550eSmrg fi 64355c42550eSmrg ;; 6436ab47cfaaSmrg 64375c42550eSmrg uts4*) 64385c42550eSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 64395c42550eSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 64405c42550eSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 64415c42550eSmrg ;; 6442ab47cfaaSmrg 64435c42550eSmrg *) 64445c42550eSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 64455c42550eSmrg ;; 64465c42550eSmrg esac 64475c42550eSmrg fi 64485c42550eSmrg]) 64495c42550eSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 64505c42550eSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6451ab47cfaaSmrg 6452ab47cfaaSmrg# 64535c42550eSmrg# Do we need to explicitly link libc? 6454ab47cfaaSmrg# 64555c42550eSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 64565c42550eSmrgx|xyes) 64575c42550eSmrg # Assume -lc should be added 64585c42550eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 64591473d951Smrg 64605c42550eSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 64615c42550eSmrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 64625c42550eSmrg *'~'*) 64635c42550eSmrg # FIXME: we may have to deal with multi-command sequences. 64645c42550eSmrg ;; 64655c42550eSmrg '$CC '*) 64665c42550eSmrg # Test whether the compiler implicitly links with -lc since on some 64675c42550eSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 64685c42550eSmrg # to ld, don't add -lc before -lgcc. 64695c42550eSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 64705c42550eSmrg $rm conftest* 64715c42550eSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 64721473d951Smrg 64735c42550eSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 64745c42550eSmrg soname=conftest 64755c42550eSmrg lib=conftest 64765c42550eSmrg libobjs=conftest.$ac_objext 64775c42550eSmrg deplibs= 64785c42550eSmrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 64795c42550eSmrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 64805c42550eSmrg compiler_flags=-v 64815c42550eSmrg linker_flags=-v 64825c42550eSmrg verstring= 64835c42550eSmrg output_objdir=. 64845c42550eSmrg libname=conftest 64855c42550eSmrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 64865c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 64875c42550eSmrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 64885c42550eSmrg then 64895c42550eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 64905c42550eSmrg else 64915c42550eSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 64925c42550eSmrg fi 64935c42550eSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 64945c42550eSmrg else 64955c42550eSmrg cat conftest.err 1>&5 64965c42550eSmrg fi 64975c42550eSmrg $rm conftest* 64985c42550eSmrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 64995c42550eSmrg ;; 65005c42550eSmrg esac 65015c42550eSmrg fi 65025c42550eSmrg ;; 65035c42550eSmrgesac 65045c42550eSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS 65051473d951Smrg 65061473d951Smrg 65075c42550eSmrg# _LT_AC_FILE_LTDLL_C 65085c42550eSmrg# ------------------- 65095c42550eSmrg# Be careful that the start marker always follows a newline. 65105c42550eSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 65115c42550eSmrg# /* ltdll.c starts here */ 65125c42550eSmrg# #define WIN32_LEAN_AND_MEAN 65135c42550eSmrg# #include <windows.h> 65145c42550eSmrg# #undef WIN32_LEAN_AND_MEAN 65155c42550eSmrg# #include <stdio.h> 6516ab47cfaaSmrg# 65175c42550eSmrg# #ifndef __CYGWIN__ 65185c42550eSmrg# # ifdef __CYGWIN32__ 65195c42550eSmrg# # define __CYGWIN__ __CYGWIN32__ 65205c42550eSmrg# # endif 65215c42550eSmrg# #endif 65225c42550eSmrg# 65235c42550eSmrg# #ifdef __cplusplus 65245c42550eSmrg# extern "C" { 65255c42550eSmrg# #endif 65265c42550eSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 65275c42550eSmrg# #ifdef __cplusplus 65285c42550eSmrg# } 65295c42550eSmrg# #endif 65305c42550eSmrg# 65315c42550eSmrg# #ifdef __CYGWIN__ 65325c42550eSmrg# #include <cygwin/cygwin_dll.h> 65335c42550eSmrg# DECLARE_CYGWIN_DLL( DllMain ); 65345c42550eSmrg# #endif 65355c42550eSmrg# HINSTANCE __hDllInstance_base; 65365c42550eSmrg# 65375c42550eSmrg# BOOL APIENTRY 65385c42550eSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 65395c42550eSmrg# { 65405c42550eSmrg# __hDllInstance_base = hInst; 65415c42550eSmrg# return TRUE; 65425c42550eSmrg# } 65435c42550eSmrg# /* ltdll.c ends here */ 65445c42550eSmrg])# _LT_AC_FILE_LTDLL_C 6545ab47cfaaSmrg 65461473d951Smrg 65475c42550eSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 65485c42550eSmrg# --------------------------------- 65495c42550eSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 6550ab47cfaaSmrg 6551ab47cfaaSmrg 65525c42550eSmrg# old names 65535c42550eSmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 65545c42550eSmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 65555c42550eSmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 65565c42550eSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 65575c42550eSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 65585c42550eSmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 65595c42550eSmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 6560ab47cfaaSmrg 65615c42550eSmrg# This is just to silence aclocal about the macro not being used 65625c42550eSmrgifelse([AC_DISABLE_FAST_INSTALL]) 6563ab47cfaaSmrg 65645c42550eSmrgAC_DEFUN([LT_AC_PROG_GCJ], 65655c42550eSmrg[AC_CHECK_TOOL(GCJ, gcj, no) 65665c42550eSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 65675c42550eSmrg AC_SUBST(GCJFLAGS) 65685c42550eSmrg]) 6569ab47cfaaSmrg 65705c42550eSmrgAC_DEFUN([LT_AC_PROG_RC], 65715c42550eSmrg[AC_CHECK_TOOL(RC, windres, no) 6572ab47cfaaSmrg]) 6573ab47cfaaSmrg 65748697ee19Smrg 65755c42550eSmrg# Cheap backport of AS_EXECUTABLE_P and required macros 65765c42550eSmrg# from Autoconf 2.59; we should not use $as_executable_p directly. 65778697ee19Smrg 65785c42550eSmrg# _AS_TEST_PREPARE 65795c42550eSmrg# ---------------- 65805c42550eSmrgm4_ifndef([_AS_TEST_PREPARE], 65815c42550eSmrg[m4_defun([_AS_TEST_PREPARE], 65825c42550eSmrg[if test -x / >/dev/null 2>&1; then 65835c42550eSmrg as_executable_p='test -x' 65845c42550eSmrgelse 65855c42550eSmrg as_executable_p='test -f' 65865c42550eSmrgfi 65875c42550eSmrg])])# _AS_TEST_PREPARE 65888697ee19Smrg 65895c42550eSmrg# AS_EXECUTABLE_P 65905c42550eSmrg# --------------- 65915c42550eSmrg# Check whether a file is executable. 65925c42550eSmrgm4_ifndef([AS_EXECUTABLE_P], 65935c42550eSmrg[m4_defun([AS_EXECUTABLE_P], 65945c42550eSmrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl 65955c42550eSmrg$as_executable_p $1[]dnl 65965c42550eSmrg])])# AS_EXECUTABLE_P 65978697ee19Smrg 65985c42550eSmrg# NOTE: This macro has been submitted for inclusion into # 65995c42550eSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 66005c42550eSmrg# a released version of Autoconf we should remove this # 66015c42550eSmrg# macro and use it instead. # 66025c42550eSmrg# LT_AC_PROG_SED 66035c42550eSmrg# -------------- 66045c42550eSmrg# Check for a fully-functional sed program, that truncates 66055c42550eSmrg# as few characters as possible. Prefer GNU sed if found. 66065c42550eSmrgAC_DEFUN([LT_AC_PROG_SED], 66075c42550eSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 66085c42550eSmrgAC_CACHE_VAL(lt_cv_path_SED, 66095c42550eSmrg[# Loop through the user's path and test for sed and gsed. 66105c42550eSmrg# Then use that list of sed's as ones to test for truncation. 66115c42550eSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 66125c42550eSmrgfor as_dir in $PATH 66135c42550eSmrgdo 66145c42550eSmrg IFS=$as_save_IFS 66155c42550eSmrg test -z "$as_dir" && as_dir=. 66165c42550eSmrg for lt_ac_prog in sed gsed; do 66175c42550eSmrg for ac_exec_ext in '' $ac_executable_extensions; do 66185c42550eSmrg if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 66195c42550eSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 66205c42550eSmrg fi 66215c42550eSmrg done 66225c42550eSmrg done 66235c42550eSmrgdone 66245c42550eSmrgIFS=$as_save_IFS 66255c42550eSmrglt_ac_max=0 66265c42550eSmrglt_ac_count=0 66275c42550eSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 66285c42550eSmrg# along with /bin/sed that truncates output. 66295c42550eSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 66305c42550eSmrg test ! -f $lt_ac_sed && continue 66315c42550eSmrg cat /dev/null > conftest.in 66325c42550eSmrg lt_ac_count=0 66335c42550eSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 66345c42550eSmrg # Check for GNU sed and select it if it is found. 66355c42550eSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 66365c42550eSmrg lt_cv_path_SED=$lt_ac_sed 66375c42550eSmrg break 66385c42550eSmrg fi 66395c42550eSmrg while true; do 66405c42550eSmrg cat conftest.in conftest.in >conftest.tmp 66415c42550eSmrg mv conftest.tmp conftest.in 66425c42550eSmrg cp conftest.in conftest.nl 66435c42550eSmrg echo >>conftest.nl 66445c42550eSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 66455c42550eSmrg cmp -s conftest.out conftest.nl || break 66465c42550eSmrg # 10000 chars as input seems more than enough 66475c42550eSmrg test $lt_ac_count -gt 10 && break 66485c42550eSmrg lt_ac_count=`expr $lt_ac_count + 1` 66495c42550eSmrg if test $lt_ac_count -gt $lt_ac_max; then 66505c42550eSmrg lt_ac_max=$lt_ac_count 66515c42550eSmrg lt_cv_path_SED=$lt_ac_sed 66525c42550eSmrg fi 66535c42550eSmrg done 66545c42550eSmrgdone 66555c42550eSmrg]) 66565c42550eSmrgSED=$lt_cv_path_SED 66575c42550eSmrgAC_SUBST([SED]) 66585c42550eSmrgAC_MSG_RESULT([$SED]) 6659ab47cfaaSmrg]) 66601473d951Smrg 6661ab47cfaaSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 6662ab47cfaaSmrg# 6663ab47cfaaSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 6664ab47cfaaSmrg# 6665ab47cfaaSmrg# This program is free software; you can redistribute it and/or modify 6666ab47cfaaSmrg# it under the terms of the GNU General Public License as published by 6667ab47cfaaSmrg# the Free Software Foundation; either version 2 of the License, or 6668ab47cfaaSmrg# (at your option) any later version. 6669ab47cfaaSmrg# 6670ab47cfaaSmrg# This program is distributed in the hope that it will be useful, but 6671ab47cfaaSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 6672ab47cfaaSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 6673ab47cfaaSmrg# General Public License for more details. 6674ab47cfaaSmrg# 6675ab47cfaaSmrg# You should have received a copy of the GNU General Public License 6676ab47cfaaSmrg# along with this program; if not, write to the Free Software 6677ab47cfaaSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 6678ab47cfaaSmrg# 6679ab47cfaaSmrg# As a special exception to the GNU General Public License, if you 6680ab47cfaaSmrg# distribute this file as part of a program that contains a 6681ab47cfaaSmrg# configuration script generated by Autoconf, you may include it under 6682ab47cfaaSmrg# the same distribution terms that you use for the rest of that program. 6683ab47cfaaSmrg 6684ab47cfaaSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 6685ab47cfaaSmrg# ---------------------------------- 6686ab47cfaaSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 6687ab47cfaaSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 6688ab47cfaaSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 6689ab47cfaaSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 6690ab47cfaaSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 6691ab47cfaaSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 6692ab47cfaaSmrgfi 6693ab47cfaaSmrgif test -n "$PKG_CONFIG"; then 6694ab47cfaaSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 6695ab47cfaaSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 6696ab47cfaaSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 6697ab47cfaaSmrg AC_MSG_RESULT([yes]) 6698ab47cfaaSmrg else 6699ab47cfaaSmrg AC_MSG_RESULT([no]) 6700ab47cfaaSmrg PKG_CONFIG="" 6701ab47cfaaSmrg fi 6702ab47cfaaSmrg 6703ab47cfaaSmrgfi[]dnl 6704ab47cfaaSmrg])# PKG_PROG_PKG_CONFIG 6705ab47cfaaSmrg 6706ab47cfaaSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 6707ab47cfaaSmrg# 6708ab47cfaaSmrg# Check to see whether a particular set of modules exists. Similar 6709ab47cfaaSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 6710ab47cfaaSmrg# 6711ab47cfaaSmrg# 6712ab47cfaaSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 6713ab47cfaaSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 6714ab47cfaaSmrg# PKG_CHECK_EXISTS manually 6715ab47cfaaSmrg# -------------------------------------------------------------- 6716ab47cfaaSmrgAC_DEFUN([PKG_CHECK_EXISTS], 6717ab47cfaaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 6718ab47cfaaSmrgif test -n "$PKG_CONFIG" && \ 6719ab47cfaaSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 6720ab47cfaaSmrg m4_ifval([$2], [$2], [:]) 6721ab47cfaaSmrgm4_ifvaln([$3], [else 6722ab47cfaaSmrg $3])dnl 6723ab47cfaaSmrgfi]) 6724ab47cfaaSmrg 6725ab47cfaaSmrg 6726ab47cfaaSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 6727ab47cfaaSmrg# --------------------------------------------- 6728ab47cfaaSmrgm4_define([_PKG_CONFIG], 67298697ee19Smrg[if test -n "$$1"; then 67308697ee19Smrg pkg_cv_[]$1="$$1" 67318697ee19Smrg elif test -n "$PKG_CONFIG"; then 67328697ee19Smrg PKG_CHECK_EXISTS([$3], 67338697ee19Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 67348697ee19Smrg [pkg_failed=yes]) 67358697ee19Smrg else 67368697ee19Smrg pkg_failed=untried 6737ab47cfaaSmrgfi[]dnl 6738ab47cfaaSmrg])# _PKG_CONFIG 6739ab47cfaaSmrg 6740ab47cfaaSmrg# _PKG_SHORT_ERRORS_SUPPORTED 6741ab47cfaaSmrg# ----------------------------- 6742ab47cfaaSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 6743ab47cfaaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 6744ab47cfaaSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 6745ab47cfaaSmrg _pkg_short_errors_supported=yes 6746ab47cfaaSmrgelse 6747ab47cfaaSmrg _pkg_short_errors_supported=no 6748ab47cfaaSmrgfi[]dnl 6749ab47cfaaSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 6750ab47cfaaSmrg 6751ab47cfaaSmrg 6752ab47cfaaSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 6753ab47cfaaSmrg# [ACTION-IF-NOT-FOUND]) 6754ab47cfaaSmrg# 6755ab47cfaaSmrg# 6756ab47cfaaSmrg# Note that if there is a possibility the first call to 6757ab47cfaaSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 6758ab47cfaaSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 6759ab47cfaaSmrg# 6760ab47cfaaSmrg# 6761ab47cfaaSmrg# -------------------------------------------------------------- 6762ab47cfaaSmrgAC_DEFUN([PKG_CHECK_MODULES], 6763ab47cfaaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 6764ab47cfaaSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 6765ab47cfaaSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 6766ab47cfaaSmrg 6767ab47cfaaSmrgpkg_failed=no 6768ab47cfaaSmrgAC_MSG_CHECKING([for $1]) 6769ab47cfaaSmrg 6770ab47cfaaSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 6771ab47cfaaSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 6772ab47cfaaSmrg 6773ab47cfaaSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 6774ab47cfaaSmrgand $1[]_LIBS to avoid the need to call pkg-config. 6775ab47cfaaSmrgSee the pkg-config man page for more details.]) 6776ab47cfaaSmrg 6777ab47cfaaSmrgif test $pkg_failed = yes; then 6778ab47cfaaSmrg _PKG_SHORT_ERRORS_SUPPORTED 6779ab47cfaaSmrg if test $_pkg_short_errors_supported = yes; then 67808697ee19Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 6781ab47cfaaSmrg else 67828697ee19Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 6783ab47cfaaSmrg fi 6784ab47cfaaSmrg # Put the nasty error message in config.log where it belongs 6785ab47cfaaSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 6786ab47cfaaSmrg 6787ab47cfaaSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 6788ab47cfaaSmrg[Package requirements ($2) were not met: 6789ab47cfaaSmrg 6790ab47cfaaSmrg$$1_PKG_ERRORS 6791ab47cfaaSmrg 6792ab47cfaaSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 6793ab47cfaaSmrginstalled software in a non-standard prefix. 6794ab47cfaaSmrg 6795ab47cfaaSmrg_PKG_TEXT 6796ab47cfaaSmrg])], 6797ab47cfaaSmrg [AC_MSG_RESULT([no]) 6798ab47cfaaSmrg $4]) 6799ab47cfaaSmrgelif test $pkg_failed = untried; then 6800ab47cfaaSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 6801ab47cfaaSmrg[The pkg-config script could not be found or is too old. Make sure it 6802ab47cfaaSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 6803ab47cfaaSmrgpath to pkg-config. 6804ab47cfaaSmrg 6805ab47cfaaSmrg_PKG_TEXT 6806ab47cfaaSmrg 68078697ee19SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 6808ab47cfaaSmrg [$4]) 6809ab47cfaaSmrgelse 6810ab47cfaaSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 6811ab47cfaaSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 6812ab47cfaaSmrg AC_MSG_RESULT([yes]) 6813ab47cfaaSmrg ifelse([$3], , :, [$3]) 6814ab47cfaaSmrgfi[]dnl 6815ab47cfaaSmrg])# PKG_CHECK_MODULES 6816ab47cfaaSmrg 68171473d951Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 68188697ee19Smrgdnl 68198697ee19Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 68208697ee19Smrgdnl 68218697ee19Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 68228697ee19Smrgdnl copy of this software and associated documentation files (the 68238697ee19Smrgdnl "Software"), to deal in the Software without restriction, including 68248697ee19Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 68258697ee19Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 68268697ee19Smrgdnl to whom the Software is furnished to do so, provided that the above 68278697ee19Smrgdnl copyright notice(s) and this permission notice appear in all copies of 68288697ee19Smrgdnl the Software and that both the above copyright notice(s) and this 68298697ee19Smrgdnl permission notice appear in supporting documentation. 68308697ee19Smrgdnl 68318697ee19Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 68328697ee19Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 68338697ee19Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 68348697ee19Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 68358697ee19Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 68368697ee19Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 68378697ee19Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 68388697ee19Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 68398697ee19Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 68408697ee19Smrgdnl 68418697ee19Smrgdnl Except as contained in this notice, the name of a copyright holder 68428697ee19Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 68438697ee19Smrgdnl or other dealings in this Software without prior written authorization 68448697ee19Smrgdnl of the copyright holder. 6845ab47cfaaSmrg 68468697ee19Smrg# XORG_MACROS_VERSION(required-version) 68478697ee19Smrg# ------------------------------------- 68488697ee19Smrg# Minimum version: 1.1.0 6849ab47cfaaSmrg# 68508697ee19Smrg# If you're using a macro added in Version 1.1 or newer, include this in 68518697ee19Smrg# your configure.ac with the minimum required version, such as: 68528697ee19Smrg# XORG_MACROS_VERSION(1.1) 6853ab47cfaaSmrg# 68548697ee19Smrg# To force at least a version with this macro defined, also add: 68558697ee19Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 6856ab47cfaaSmrg# 6857ab47cfaaSmrg# 68588697ee19Smrg# See the "minimum version" comment for each macro you use to see what 68598697ee19Smrg# version you require. 68608697ee19SmrgAC_DEFUN([XORG_MACROS_VERSION],[ 68618697ee19Smrg [XORG_MACROS_needed_version=$1 68628697ee19Smrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 68638697ee19Smrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 68648697ee19Smrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 68651473d951Smrg [XORG_MACROS_version=1.2.1 68668697ee19Smrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 68678697ee19Smrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 68688697ee19Smrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 68698697ee19Smrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 68708697ee19Smrg fi 68718697ee19Smrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 68728697ee19Smrg 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]) 68738697ee19Smrg fi 68748697ee19Smrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 68758697ee19Smrg]) # XORG_MACROS_VERSION 6876ab47cfaaSmrg 68778697ee19Smrg# XORG_PROG_RAWCPP() 68788697ee19Smrg# ------------------ 68798697ee19Smrg# Minimum version: 1.0.0 6880ab47cfaaSmrg# 68818697ee19Smrg# Find cpp program and necessary flags for use in pre-processing text files 68828697ee19Smrg# such as man pages and config files 68838697ee19SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 68848697ee19SmrgAC_REQUIRE([AC_PROG_CPP]) 68858697ee19SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 68868697ee19Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 6887ab47cfaaSmrg 68888697ee19Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 68898697ee19Smrg# which is not the best choice for supporting other OS'es, but covers most 68908697ee19Smrg# of the ones we need for now. 68918697ee19SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 68928697ee19SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 68938697ee19Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 68948697ee19Smrg AC_MSG_RESULT([no]) 6895ab47cfaaSmrgelse 68968697ee19Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 68978697ee19Smrg RAWCPPFLAGS=-undef 68988697ee19Smrg AC_MSG_RESULT([yes]) 68991473d951Smrg # under Cygwin unix is still defined even with -undef 69001473d951Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 69011473d951Smrg RAWCPPFLAGS="-undef -ansi" 69021473d951Smrg AC_MSG_RESULT([yes, with -ansi]) 69038697ee19Smrg else 69048697ee19Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 69058697ee19Smrg fi 6906ab47cfaaSmrgfi 69078697ee19Smrgrm -f conftest.$ac_ext 6908ab47cfaaSmrg 69098697ee19SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 69108697ee19SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 69118697ee19Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 69128697ee19Smrg AC_MSG_RESULT([no]) 69138697ee19Smrgelse 69148697ee19Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 69158697ee19Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 69168697ee19Smrg AC_MSG_RESULT([yes]) 69178697ee19Smrg else 69188697ee19Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 69198697ee19Smrg fi 69208697ee19Smrgfi 69218697ee19Smrgrm -f conftest.$ac_ext 69228697ee19SmrgAC_SUBST(RAWCPPFLAGS) 69238697ee19Smrg]) # XORG_PROG_RAWCPP 6924ab47cfaaSmrg 69258697ee19Smrg# XORG_MANPAGE_SECTIONS() 69268697ee19Smrg# ----------------------- 69278697ee19Smrg# Minimum version: 1.0.0 6928ab47cfaaSmrg# 69298697ee19Smrg# Determine which sections man pages go in for the different man page types 69308697ee19Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 69318697ee19Smrg# Not sure if there's any better way than just hardcoding by OS name. 69328697ee19Smrg# Override default settings by setting environment variables 6933ab47cfaaSmrg 69348697ee19SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 69358697ee19SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 6936ab47cfaaSmrg 69378697ee19Smrgif test x$APP_MAN_SUFFIX = x ; then 69388697ee19Smrg APP_MAN_SUFFIX=1 69398697ee19Smrgfi 69408697ee19Smrgif test x$APP_MAN_DIR = x ; then 69418697ee19Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 69428697ee19Smrgfi 6943ab47cfaaSmrg 69448697ee19Smrgif test x$LIB_MAN_SUFFIX = x ; then 69458697ee19Smrg LIB_MAN_SUFFIX=3 69468697ee19Smrgfi 69478697ee19Smrgif test x$LIB_MAN_DIR = x ; then 69488697ee19Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 69498697ee19Smrgfi 6950ab47cfaaSmrg 69518697ee19Smrgif test x$FILE_MAN_SUFFIX = x ; then 69528697ee19Smrg case $host_os in 69538697ee19Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 69548697ee19Smrg *) FILE_MAN_SUFFIX=5 ;; 6955ab47cfaaSmrg esac 6956ab47cfaaSmrgfi 69578697ee19Smrgif test x$FILE_MAN_DIR = x ; then 69588697ee19Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 69598697ee19Smrgfi 6960ab47cfaaSmrg 69618697ee19Smrgif test x$MISC_MAN_SUFFIX = x ; then 69628697ee19Smrg case $host_os in 69638697ee19Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 69648697ee19Smrg *) MISC_MAN_SUFFIX=7 ;; 69658697ee19Smrg esac 69668697ee19Smrgfi 69678697ee19Smrgif test x$MISC_MAN_DIR = x ; then 69688697ee19Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 69698697ee19Smrgfi 6970ab47cfaaSmrg 69718697ee19Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 69728697ee19Smrg case $host_os in 69738697ee19Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 69748697ee19Smrg *) DRIVER_MAN_SUFFIX=4 ;; 69758697ee19Smrg esac 69768697ee19Smrgfi 69778697ee19Smrgif test x$DRIVER_MAN_DIR = x ; then 69788697ee19Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 69798697ee19Smrgfi 6980ab47cfaaSmrg 69818697ee19Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 69828697ee19Smrg case $host_os in 69838697ee19Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 69848697ee19Smrg *) ADMIN_MAN_SUFFIX=8 ;; 69858697ee19Smrg esac 69868697ee19Smrgfi 69878697ee19Smrgif test x$ADMIN_MAN_DIR = x ; then 69888697ee19Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 6989ab47cfaaSmrgfi 6990ab47cfaaSmrg 6991ab47cfaaSmrg 69928697ee19SmrgAC_SUBST([APP_MAN_SUFFIX]) 69938697ee19SmrgAC_SUBST([LIB_MAN_SUFFIX]) 69948697ee19SmrgAC_SUBST([FILE_MAN_SUFFIX]) 69958697ee19SmrgAC_SUBST([MISC_MAN_SUFFIX]) 69968697ee19SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 69978697ee19SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 69988697ee19SmrgAC_SUBST([APP_MAN_DIR]) 69998697ee19SmrgAC_SUBST([LIB_MAN_DIR]) 70008697ee19SmrgAC_SUBST([FILE_MAN_DIR]) 70018697ee19SmrgAC_SUBST([MISC_MAN_DIR]) 70028697ee19SmrgAC_SUBST([DRIVER_MAN_DIR]) 70038697ee19SmrgAC_SUBST([ADMIN_MAN_DIR]) 70048697ee19Smrg]) # XORG_MANPAGE_SECTIONS 7005ab47cfaaSmrg 70068697ee19Smrg# XORG_CHECK_LINUXDOC 70078697ee19Smrg# ------------------- 70088697ee19Smrg# Minimum version: 1.0.0 7009ab47cfaaSmrg# 70108697ee19Smrg# Defines the variable MAKE_TEXT if the necessary tools and 70118697ee19Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 70128697ee19Smrg# Whether or not the necessary tools and files are found can be checked 70138697ee19Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 70148697ee19SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 70151473d951Smrgif test x$XORG_SGML_PATH = x ; then 70161473d951Smrg XORG_SGML_PATH=$prefix/share/sgml 70171473d951Smrgfi 70188697ee19SmrgHAVE_DEFS_ENT= 7019ab47cfaaSmrg 70208697ee19Smrgif test x"$cross_compiling" = x"yes" ; then 70218697ee19Smrg HAVE_DEFS_ENT=no 70228697ee19Smrgelse 70238697ee19Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 70248697ee19Smrgfi 7025ab47cfaaSmrg 70268697ee19SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 70278697ee19SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 7028ab47cfaaSmrg 70298697ee19SmrgAC_MSG_CHECKING([Whether to build documentation]) 7030ab47cfaaSmrg 70318697ee19Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 70328697ee19Smrg BUILDDOC=yes 70338697ee19Smrgelse 70348697ee19Smrg BUILDDOC=no 70358697ee19Smrgfi 7036ab47cfaaSmrg 70378697ee19SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 7038ab47cfaaSmrg 70398697ee19SmrgAC_MSG_RESULT([$BUILDDOC]) 7040ab47cfaaSmrg 70418697ee19SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 7042ab47cfaaSmrg 70438697ee19Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 70448697ee19Smrg BUILDPDFDOC=yes 70458697ee19Smrgelse 70468697ee19Smrg BUILDPDFDOC=no 7047ab47cfaaSmrgfi 7048ab47cfaaSmrg 70498697ee19SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 7050ab47cfaaSmrg 70518697ee19SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 7052ab47cfaaSmrg 70538697ee19SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 70548697ee19SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 70558697ee19SmrgMAKE_PDF="$PS2PDF" 70568697ee19SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 7057ab47cfaaSmrg 70588697ee19SmrgAC_SUBST(MAKE_TEXT) 70598697ee19SmrgAC_SUBST(MAKE_PS) 70608697ee19SmrgAC_SUBST(MAKE_PDF) 70618697ee19SmrgAC_SUBST(MAKE_HTML) 70628697ee19Smrg]) # XORG_CHECK_LINUXDOC 7063ab47cfaaSmrg 70648697ee19Smrg# XORG_CHECK_DOCBOOK 70658697ee19Smrg# ------------------- 70668697ee19Smrg# Minimum version: 1.0.0 7067ab47cfaaSmrg# 70688697ee19Smrg# Checks for the ability to build output formats from SGML DocBook source. 70698697ee19Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 70708697ee19Smrg# indicates whether the necessary tools and files are found and, if set, 70718697ee19Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 70728697ee19SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 70731473d951Smrgif test x$XORG_SGML_PATH = x ; then 70741473d951Smrg XORG_SGML_PATH=$prefix/share/sgml 70751473d951Smrgfi 70768697ee19SmrgHAVE_DEFS_ENT= 70778697ee19SmrgBUILDTXTDOC=no 70788697ee19SmrgBUILDPDFDOC=no 70798697ee19SmrgBUILDPSDOC=no 70808697ee19SmrgBUILDHTMLDOC=no 7081ab47cfaaSmrg 70828697ee19SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 7083ab47cfaaSmrg 70848697ee19SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 70858697ee19SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 70868697ee19SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 70878697ee19SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 7088ab47cfaaSmrg 70898697ee19SmrgAC_MSG_CHECKING([Whether to build text documentation]) 70908697ee19Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 70918697ee19Smrg test x$BUILD_TXTDOC != xno; then 70928697ee19Smrg BUILDTXTDOC=yes 70938697ee19Smrgfi 70948697ee19SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 70958697ee19SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 7096ab47cfaaSmrg 70978697ee19SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 70988697ee19Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 70998697ee19Smrg test x$BUILD_PDFDOC != xno; then 71008697ee19Smrg BUILDPDFDOC=yes 7101ab47cfaaSmrgfi 71028697ee19SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 71038697ee19SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 7104ab47cfaaSmrg 71058697ee19SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 71068697ee19Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 71078697ee19Smrg test x$BUILD_PSDOC != xno; then 71088697ee19Smrg BUILDPSDOC=yes 71098697ee19Smrgfi 71108697ee19SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 71118697ee19SmrgAC_MSG_RESULT([$BUILDPSDOC]) 7112ab47cfaaSmrg 71138697ee19SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 71148697ee19Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 71158697ee19Smrg test x$BUILD_HTMLDOC != xno; then 71168697ee19Smrg BUILDHTMLDOC=yes 71178697ee19Smrgfi 71188697ee19SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 71198697ee19SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 7120ab47cfaaSmrg 71218697ee19SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 71228697ee19SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 71238697ee19SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 71248697ee19SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 7125ab47cfaaSmrg 71268697ee19SmrgAC_SUBST(MAKE_TEXT) 71278697ee19SmrgAC_SUBST(MAKE_PS) 71288697ee19SmrgAC_SUBST(MAKE_PDF) 71298697ee19SmrgAC_SUBST(MAKE_HTML) 71308697ee19Smrg]) # XORG_CHECK_DOCBOOK 7131ab47cfaaSmrg 71328697ee19Smrg# XORG_CHECK_MALLOC_ZERO 71338697ee19Smrg# ---------------------- 71348697ee19Smrg# Minimum version: 1.0.0 7135ab47cfaaSmrg# 71368697ee19Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 71378697ee19Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 71388697ee19Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 71398697ee19SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 71408697ee19SmrgAC_ARG_ENABLE(malloc0returnsnull, 71418697ee19Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 71428697ee19Smrg [malloc(0) returns NULL (default: auto)]), 71438697ee19Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 71448697ee19Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 7145ab47cfaaSmrg 71468697ee19SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 71478697ee19Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 71488697ee19Smrg AC_RUN_IFELSE([ 71498697ee19Smrgchar *malloc(); 71508697ee19Smrgchar *realloc(); 71518697ee19Smrgchar *calloc(); 71528697ee19Smrgmain() { 71538697ee19Smrg char *m0, *r0, *c0, *p; 71548697ee19Smrg m0 = malloc(0); 71558697ee19Smrg p = malloc(10); 71568697ee19Smrg r0 = realloc(p,0); 71578697ee19Smrg c0 = calloc(0); 71588697ee19Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 71598697ee19Smrg}], 71608697ee19Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 71618697ee19Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 7162ab47cfaaSmrgfi 71638697ee19SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 71648697ee19Smrg 71658697ee19Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 71668697ee19Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 71678697ee19Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 71688697ee19Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 71698697ee19Smrgelse 71708697ee19Smrg MALLOC_ZERO_CFLAGS="" 71718697ee19Smrg XMALLOC_ZERO_CFLAGS="" 71728697ee19Smrg XTMALLOC_ZERO_CFLAGS="" 7173ab47cfaaSmrgfi 7174ab47cfaaSmrg 71758697ee19SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 71768697ee19SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 71778697ee19SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 71788697ee19Smrg]) # XORG_CHECK_MALLOC_ZERO 7179ab47cfaaSmrg 71808697ee19Smrg# XORG_WITH_LINT() 71818697ee19Smrg# ---------------- 71828697ee19Smrg# Minimum version: 1.1.0 7183ab47cfaaSmrg# 71848697ee19Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 71858697ee19Smrg# is specified. (Use --with-lint=sparse for sparse.) 71868697ee19Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 71878697ee19Smrg# Sets $LINT_FLAGS to flags to pass to source checker 71888697ee19Smrg# Sets LINT automake conditional if enabled (default: disabled) 71898697ee19Smrg# 71908697ee19SmrgAC_DEFUN([XORG_WITH_LINT],[ 7191ab47cfaaSmrg 71928697ee19Smrg# Allow checking code with lint, sparse, etc. 71938697ee19SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 71948697ee19Smrg [Use a lint-style source code checker (default: disabled)])], 71958697ee19Smrg [use_lint=$withval], [use_lint=no]) 71968697ee19Smrgif test "x$use_lint" = "xyes" ; then 71978697ee19Smrg LINT="lint" 7198ab47cfaaSmrgelse 71998697ee19Smrg LINT="$use_lint" 72008697ee19Smrgfi 72018697ee19Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 72028697ee19Smrg case $LINT in 72038697ee19Smrg lint|*/lint) 72048697ee19Smrg case $host_os in 72058697ee19Smrg solaris*) 72068697ee19Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 72078697ee19Smrg ;; 72088697ee19Smrg esac 72098697ee19Smrg ;; 72108697ee19Smrg esac 7211ab47cfaaSmrgfi 7212ab47cfaaSmrg 72138697ee19SmrgAC_SUBST(LINT) 72148697ee19SmrgAC_SUBST(LINT_FLAGS) 72158697ee19SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 7216ab47cfaaSmrg 72178697ee19Smrg]) # XORG_WITH_LINT 72188697ee19Smrg 72198697ee19Smrg# XORG_LINT_LIBRARY(LIBNAME) 72208697ee19Smrg# -------------------------- 72218697ee19Smrg# Minimum version: 1.1.0 7222ab47cfaaSmrg# 72238697ee19Smrg# Sets up flags for building lint libraries for checking programs that call 72248697ee19Smrg# functions in the library. 72258697ee19Smrg# Disabled by default, enable with --enable-lint-library 72268697ee19Smrg# Sets: 72278697ee19Smrg# @LINTLIB@ - name of lint library file to make 72288697ee19Smrg# MAKE_LINT_LIB - automake conditional 7229ab47cfaaSmrg# 72308697ee19Smrg 72318697ee19SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 72328697ee19SmrgAC_REQUIRE([XORG_WITH_LINT]) 72338697ee19Smrg# Build lint "library" for more indepth checks of programs calling this library 72348697ee19SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 72358697ee19Smrg [Create lint library (default: disabled)])], 72368697ee19Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 72378697ee19Smrgif test "x$make_lint_lib" != "xno" ; then 72388697ee19Smrg if test "x$LINT" = "xno" ; then 72398697ee19Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 72408697ee19Smrg fi 72418697ee19Smrg if test "x$make_lint_lib" = "xyes" ; then 72428697ee19Smrg LINTLIB=llib-l$1.ln 72438697ee19Smrg else 72448697ee19Smrg LINTLIB=$make_lint_lib 72458697ee19Smrg fi 7246ab47cfaaSmrgfi 72478697ee19SmrgAC_SUBST(LINTLIB) 72488697ee19SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 7249ab47cfaaSmrg 72508697ee19Smrg]) # XORG_LINT_LIBRARY 7251ab47cfaaSmrg 72521473d951Smrg# XORG_CWARNFLAGS 72531473d951Smrg# --------------- 72541473d951Smrg# Minimum version: 1.2.0 72551473d951Smrg# 72561473d951Smrg# Defines CWARNFLAGS to enable C compiler warnings. 72571473d951Smrg# 72581473d951SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 72591473d951SmrgAC_REQUIRE([AC_PROG_CC]) 72601473d951Smrgif test "x$GCC" = xyes ; then 72611473d951Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 72621473d951Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 72631473d951Smrg-Wbad-function-cast" 72641473d951Smrg case `gcc -dumpversion` in 72651473d951Smrg 3.4.* | 4.*) 72661473d951Smrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 72671473d951Smrg ;; 72681473d951Smrg esac 72691473d951Smrgelse 72701473d951Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 72711473d951Smrg if test "x$SUNCC" = "xyes"; then 72721473d951Smrg CWARNFLAGS="-v" 72731473d951Smrg fi 72741473d951Smrgfi 72751473d951SmrgAC_SUBST(CWARNFLAGS) 72761473d951Smrg]) # XORG_CWARNFLAGS 72778697ee19Smrgdnl Copyright 2005 Red Hat, Inc 72788697ee19Smrgdnl 72798697ee19Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 72808697ee19Smrgdnl documentation for any purpose is hereby granted without fee, provided that 72818697ee19Smrgdnl the above copyright notice appear in all copies and that both that 72828697ee19Smrgdnl copyright notice and this permission notice appear in supporting 72838697ee19Smrgdnl documentation. 72848697ee19Smrgdnl 72858697ee19Smrgdnl The above copyright notice and this permission notice shall be included 72868697ee19Smrgdnl in all copies or substantial portions of the Software. 72878697ee19Smrgdnl 72888697ee19Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 72898697ee19Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 72908697ee19Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 72918697ee19Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 72928697ee19Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 72938697ee19Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 72948697ee19Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 72958697ee19Smrgdnl 72968697ee19Smrgdnl Except as contained in this notice, the name of the copyright holders shall 72978697ee19Smrgdnl not be used in advertising or otherwise to promote the sale, use or 72988697ee19Smrgdnl other dealings in this Software without prior written authorization 72998697ee19Smrgdnl from the copyright holders. 73008697ee19Smrgdnl 7301ab47cfaaSmrg 73028697ee19Smrg# XORG_RELEASE_VERSION 73038697ee19Smrg# -------------------- 73048697ee19Smrg# Adds --with/without-release-string and changes the PACKAGE and 73058697ee19Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 73068697ee19Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 73078697ee19Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 73088697ee19Smrg 73098697ee19SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 73108697ee19Smrg AC_ARG_WITH(release-version, 73118697ee19Smrg AC_HELP_STRING([--with-release-version=STRING], 73128697ee19Smrg [Use release version string in package name]), 73138697ee19Smrg [RELEASE_VERSION="$withval"], 73148697ee19Smrg [RELEASE_VERSION=""]) 73158697ee19Smrg if test "x$RELEASE_VERSION" != "x"; then 73168697ee19Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 73178697ee19Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 73188697ee19Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 73198697ee19Smrg fi 73208697ee19Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 73218697ee19Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 73228697ee19Smrg [Major version of this package]) 73238697ee19Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 73248697ee19Smrg if test "x$PVM" = "x"; then 73258697ee19Smrg PVM="0" 73268697ee19Smrg fi 73278697ee19Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 73288697ee19Smrg [$PVM], 73298697ee19Smrg [Minor version of this package]) 73308697ee19Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 73318697ee19Smrg if test "x$PVP" = "x"; then 73328697ee19Smrg PVP="0" 73338697ee19Smrg fi 73348697ee19Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 73358697ee19Smrg [$PVP], 73368697ee19Smrg [Patch version of this package]) 73378697ee19Smrg]) 7338ab47cfaaSmrg 73391473d951Smrg# XORG_CHANGELOG() 73401473d951Smrg# ---------------- 73411473d951Smrg# Minimum version: 1.2.0 73421473d951Smrg# 73431473d951Smrg# Defines the variable CHANGELOG_CMD as the command to generate 73441473d951Smrg# ChangeLog from git. 73451473d951Smrg# 73461473d951Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 73471473d951Smrg# 73481473d951SmrgAC_DEFUN([XORG_CHANGELOG], [ 73491473d951SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 73501473d951Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 73511473d951Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 73521473d951SmrgAC_SUBST([CHANGELOG_CMD]) 73531473d951SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 73541473d951Smrg]) # XORG_CHANGELOG 73551473d951Smrg 73561473d951Smrgdnl Copyright 2005 Red Hat, Inc 73571473d951Smrgdnl 73581473d951Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 73591473d951Smrgdnl documentation for any purpose is hereby granted without fee, provided that 73601473d951Smrgdnl the above copyright notice appear in all copies and that both that 73611473d951Smrgdnl copyright notice and this permission notice appear in supporting 73621473d951Smrgdnl documentation. 73631473d951Smrgdnl 73641473d951Smrgdnl The above copyright notice and this permission notice shall be included 73651473d951Smrgdnl in all copies or substantial portions of the Software. 73661473d951Smrgdnl 73671473d951Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 73681473d951Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 73691473d951Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 73701473d951Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 73711473d951Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 73721473d951Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 73731473d951Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 73741473d951Smrgdnl 73751473d951Smrgdnl Except as contained in this notice, the name of the copyright holders shall 73761473d951Smrgdnl not be used in advertising or otherwise to promote the sale, use or 73771473d951Smrgdnl other dealings in this Software without prior written authorization 73781473d951Smrgdnl from the copyright holders. 73791473d951Smrgdnl 73801473d951Smrg 73811473d951Smrg# XORG_DRIVER_CHECK_EXT() 73821473d951Smrg# -------------------------- 73831473d951Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 73841473d951Smrg# is defined, then add $1 to $REQUIRED_MODULES. 73851473d951Smrg 73861473d951SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 73871473d951Smrg SAVE_CFLAGS="$CFLAGS" 73881473d951Smrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 73891473d951Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 73901473d951Smrg#include "xorg-server.h" 73911473d951Smrg#if !defined $1 73921473d951Smrg#error $1 not defined 73931473d951Smrg#endif 73941473d951Smrg ]])], 73951473d951Smrg [_EXT_CHECK=yes], 73961473d951Smrg [_EXT_CHECK=no]) 73971473d951Smrg CFLAGS="$SAVE_CFLAGS" 73981473d951Smrg AC_MSG_CHECKING([if $1 is defined]) 73991473d951Smrg AC_MSG_RESULT([$_EXT_CHECK]) 74001473d951Smrg if test "$_EXT_CHECK" != no; then 74011473d951Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 74021473d951Smrg fi 74031473d951Smrg]) 74041473d951Smrg 74051473d951Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 7406ab47cfaaSmrg# 7407ab47cfaaSmrg# This file is free software; the Free Software Foundation 7408ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it, 7409ab47cfaaSmrg# with or without modifications, as long as this notice is preserved. 7410ab47cfaaSmrg 74118697ee19Smrg# AM_AUTOMAKE_VERSION(VERSION) 74128697ee19Smrg# ---------------------------- 74138697ee19Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 74148697ee19Smrg# generated from the m4 files accompanying Automake X.Y. 74158697ee19Smrg# (This private macro should not be called outside this file.) 74168697ee19SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 74175c42550eSmrg[am__api_version='1.11' 74188697ee19Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 74198697ee19Smrgdnl require some minimum version. Point them to the right macro. 74205c42550eSmrgm4_if([$1], [1.11], [], 74218697ee19Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 74228697ee19Smrg]) 7423ab47cfaaSmrg 74248697ee19Smrg# _AM_AUTOCONF_VERSION(VERSION) 74258697ee19Smrg# ----------------------------- 74268697ee19Smrg# aclocal traces this macro to find the Autoconf version. 74278697ee19Smrg# This is a private macro too. Using m4_define simplifies 74288697ee19Smrg# the logic in aclocal, which can simply ignore this definition. 74298697ee19Smrgm4_define([_AM_AUTOCONF_VERSION], []) 7430ab47cfaaSmrg 74318697ee19Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 74328697ee19Smrg# ------------------------------- 74338697ee19Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 74341473d951Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 74358697ee19SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 74365c42550eSmrg[AM_AUTOMAKE_VERSION([1.11])dnl 74378697ee19Smrgm4_ifndef([AC_AUTOCONF_VERSION], 74388697ee19Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 74391473d951Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 7440ab47cfaaSmrg 74418697ee19Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 7442ab47cfaaSmrg 7443ab47cfaaSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7444ab47cfaaSmrg# 7445ab47cfaaSmrg# This file is free software; the Free Software Foundation 7446ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it, 7447ab47cfaaSmrg# with or without modifications, as long as this notice is preserved. 7448ab47cfaaSmrg 74498697ee19Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 74508697ee19Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 74518697ee19Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 74528697ee19Smrg# 74538697ee19Smrg# Of course, Automake must honor this variable whenever it calls a 74548697ee19Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 74558697ee19Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74568697ee19Smrg# depending on how configure is run. This is pretty annoying, since 74578697ee19Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 74588697ee19Smrg# source directory, any form will work fine, but in subdirectories a 74598697ee19Smrg# relative path needs to be adjusted first. 74608697ee19Smrg# 74618697ee19Smrg# $ac_aux_dir/missing 74628697ee19Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 74638697ee19Smrg# $top_srcdir/$ac_aux_dir/missing 74648697ee19Smrg# fails if $ac_aux_dir is absolute, 74658697ee19Smrg# fails when called from a subdirectory in a VPATH build with 74668697ee19Smrg# a relative $ac_aux_dir 74678697ee19Smrg# 74688697ee19Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 74698697ee19Smrg# are both prefixed by $srcdir. In an in-source build this is usually 74708697ee19Smrg# harmless because $srcdir is `.', but things will broke when you 74718697ee19Smrg# start a VPATH build or use an absolute $srcdir. 74728697ee19Smrg# 74738697ee19Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 74748697ee19Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 74758697ee19Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 74768697ee19Smrg# and then we would define $MISSING as 74778697ee19Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 74788697ee19Smrg# This will work as long as MISSING is not called from configure, because 74798697ee19Smrg# unfortunately $(top_srcdir) has no meaning in configure. 74808697ee19Smrg# However there are other variables, like CC, which are often used in 74818697ee19Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 74828697ee19Smrg# 74838697ee19Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 74848697ee19Smrg# absolute PATH. The drawback is that using absolute paths prevent a 74858697ee19Smrg# configured tree to be moved without reconfiguration. 7486ab47cfaaSmrg 74878697ee19SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 74888697ee19Smrg[dnl Rely on autoconf to set up CDPATH properly. 74898697ee19SmrgAC_PREREQ([2.50])dnl 74908697ee19Smrg# expand $ac_aux_dir to an absolute path 74918697ee19Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 74928697ee19Smrg]) 7493ab47cfaaSmrg 74948697ee19Smrg# AM_CONDITIONAL -*- Autoconf -*- 74958697ee19Smrg 74965c42550eSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 74978697ee19Smrg# Free Software Foundation, Inc. 7498ab47cfaaSmrg# 7499ab47cfaaSmrg# This file is free software; the Free Software Foundation 7500ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it, 7501ab47cfaaSmrg# with or without modifications, as long as this notice is preserved. 7502ab47cfaaSmrg 75035c42550eSmrg# serial 9 7504ab47cfaaSmrg 75058697ee19Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 75068697ee19Smrg# ------------------------------------- 75078697ee19Smrg# Define a conditional. 75088697ee19SmrgAC_DEFUN([AM_CONDITIONAL], 75098697ee19Smrg[AC_PREREQ(2.52)dnl 75108697ee19Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 75118697ee19Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 75128697ee19SmrgAC_SUBST([$1_TRUE])dnl 75138697ee19SmrgAC_SUBST([$1_FALSE])dnl 75148697ee19Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 75158697ee19Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 75165c42550eSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 75178697ee19Smrgif $2; then 75188697ee19Smrg $1_TRUE= 75198697ee19Smrg $1_FALSE='#' 75208697ee19Smrgelse 75218697ee19Smrg $1_TRUE='#' 75228697ee19Smrg $1_FALSE= 75238697ee19Smrgfi 75248697ee19SmrgAC_CONFIG_COMMANDS_PRE( 75258697ee19Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 75268697ee19Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 75278697ee19SmrgUsually this means the macro was only invoked conditionally.]]) 75288697ee19Smrgfi])]) 75298697ee19Smrg 75305c42550eSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 75318697ee19Smrg# Free Software Foundation, Inc. 7532ab47cfaaSmrg# 75338697ee19Smrg# This file is free software; the Free Software Foundation 75348697ee19Smrg# gives unlimited permission to copy and/or distribute it, 75358697ee19Smrg# with or without modifications, as long as this notice is preserved. 75368697ee19Smrg 75375c42550eSmrg# serial 10 75388697ee19Smrg 75398697ee19Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 75408697ee19Smrg# written in clear, in which case automake, when reading aclocal.m4, 75418697ee19Smrg# will think it sees a *use*, and therefore will trigger all it's 75428697ee19Smrg# C support machinery. Also note that it means that autoscan, seeing 75438697ee19Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 75448697ee19Smrg 75458697ee19Smrg 75468697ee19Smrg# _AM_DEPENDENCIES(NAME) 75478697ee19Smrg# ---------------------- 75488697ee19Smrg# See how the compiler implements dependency checking. 75498697ee19Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 75508697ee19Smrg# We try a few techniques and use that to set a single cache variable. 7551ab47cfaaSmrg# 75528697ee19Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 75538697ee19Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 75548697ee19Smrg# dependency, and given that the user is not expected to run this macro, 75558697ee19Smrg# just rely on AC_PROG_CC. 75568697ee19SmrgAC_DEFUN([_AM_DEPENDENCIES], 75578697ee19Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 75588697ee19SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 75598697ee19SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 75608697ee19SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 7561ab47cfaaSmrg 75628697ee19Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 75638697ee19Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 75648697ee19Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 75658697ee19Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 75668697ee19Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 75678697ee19Smrg [depcc="$$1" am_compiler_list=]) 7568ab47cfaaSmrg 75698697ee19SmrgAC_CACHE_CHECK([dependency style of $depcc], 75708697ee19Smrg [am_cv_$1_dependencies_compiler_type], 75718697ee19Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 75728697ee19Smrg # We make a subdir and do the tests there. Otherwise we can end up 75738697ee19Smrg # making bogus files that we don't know about and never remove. For 75748697ee19Smrg # instance it was reported that on HP-UX the gcc test will end up 75758697ee19Smrg # making a dummy file named `D' -- because `-MD' means `put the output 75768697ee19Smrg # in D'. 7577ab47cfaaSmrg mkdir conftest.dir 75788697ee19Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 75798697ee19Smrg # using a relative directory. 75808697ee19Smrg cp "$am_depcomp" conftest.dir 75818697ee19Smrg cd conftest.dir 75828697ee19Smrg # We will build objects and dependencies in a subdirectory because 75838697ee19Smrg # it helps to detect inapplicable dependency modes. For instance 75848697ee19Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 75858697ee19Smrg # side effect of compilation, but ICC will put the dependencies in 75868697ee19Smrg # the current directory while Tru64 will put them in the object 75878697ee19Smrg # directory. 75888697ee19Smrg mkdir sub 75898697ee19Smrg 75908697ee19Smrg am_cv_$1_dependencies_compiler_type=none 75918697ee19Smrg if test "$am_compiler_list" = ""; then 75928697ee19Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 7593ab47cfaaSmrg fi 75945c42550eSmrg am__universal=false 75955c42550eSmrg m4_case([$1], [CC], 75965c42550eSmrg [case " $depcc " in #( 75975c42550eSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 75985c42550eSmrg esac], 75995c42550eSmrg [CXX], 76005c42550eSmrg [case " $depcc " in #( 76015c42550eSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 76025c42550eSmrg esac]) 76035c42550eSmrg 76048697ee19Smrg for depmode in $am_compiler_list; do 76058697ee19Smrg # Setup a source with many dependencies, because some compilers 76068697ee19Smrg # like to wrap large dependency lists on column 80 (with \), and 76078697ee19Smrg # we should not choose a depcomp mode which is confused by this. 76088697ee19Smrg # 76098697ee19Smrg # We need to recreate these files for each test, as the compiler may 76108697ee19Smrg # overwrite some of them when testing with obscure command lines. 76118697ee19Smrg # This happens at least with the AIX C compiler. 76128697ee19Smrg : > sub/conftest.c 76138697ee19Smrg for i in 1 2 3 4 5 6; do 76148697ee19Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 76158697ee19Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 76168697ee19Smrg # Solaris 8's {/usr,}/bin/sh. 76178697ee19Smrg touch sub/conftst$i.h 76188697ee19Smrg done 76198697ee19Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 7620ab47cfaaSmrg 76215c42550eSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 76225c42550eSmrg # mode. It turns out that the SunPro C++ compiler does not properly 76235c42550eSmrg # handle `-M -o', and we need to detect this. Also, some Intel 76245c42550eSmrg # versions had trouble with output in subdirs 76255c42550eSmrg am__obj=sub/conftest.${OBJEXT-o} 76265c42550eSmrg am__minus_obj="-o $am__obj" 76278697ee19Smrg case $depmode in 76285c42550eSmrg gcc) 76295c42550eSmrg # This depmode causes a compiler race in universal mode. 76305c42550eSmrg test "$am__universal" = false || continue 76315c42550eSmrg ;; 76328697ee19Smrg nosideeffect) 76338697ee19Smrg # after this tag, mechanisms are not by side-effect, so they'll 76348697ee19Smrg # only be used when explicitly requested 76358697ee19Smrg if test "x$enable_dependency_tracking" = xyes; then 76368697ee19Smrg continue 76378697ee19Smrg else 76388697ee19Smrg break 76398697ee19Smrg fi 76408697ee19Smrg ;; 76415c42550eSmrg msvisualcpp | msvcmsys) 76425c42550eSmrg # This compiler won't grok `-c -o', but also, the minuso test has 76435c42550eSmrg # not run yet. These depmodes are late enough in the game, and 76445c42550eSmrg # so weak that their functioning should not be impacted. 76455c42550eSmrg am__obj=conftest.${OBJEXT-o} 76465c42550eSmrg am__minus_obj= 76475c42550eSmrg ;; 76488697ee19Smrg none) break ;; 76498697ee19Smrg esac 76508697ee19Smrg if depmode=$depmode \ 76515c42550eSmrg source=sub/conftest.c object=$am__obj \ 76528697ee19Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 76535c42550eSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 76548697ee19Smrg >/dev/null 2>conftest.err && 76558697ee19Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 76568697ee19Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 76575c42550eSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 76588697ee19Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 76598697ee19Smrg # icc doesn't choke on unknown options, it will just issue warnings 76608697ee19Smrg # or remarks (even with -Werror). So we grep stderr for any message 76618697ee19Smrg # that says an option was ignored or not supported. 76628697ee19Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 76638697ee19Smrg # icc: Command line warning: ignoring option '-M'; no argument required 76648697ee19Smrg # The diagnosis changed in icc 8.0: 76658697ee19Smrg # icc: Command line remark: option '-MP' not supported 76668697ee19Smrg if (grep 'ignoring option' conftest.err || 76678697ee19Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 76688697ee19Smrg am_cv_$1_dependencies_compiler_type=$depmode 76698697ee19Smrg break 76708697ee19Smrg fi 76718697ee19Smrg fi 76728697ee19Smrg done 7673ab47cfaaSmrg 76748697ee19Smrg cd .. 76758697ee19Smrg rm -rf conftest.dir 76768697ee19Smrgelse 76778697ee19Smrg am_cv_$1_dependencies_compiler_type=none 76788697ee19Smrgfi 76798697ee19Smrg]) 76808697ee19SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 76818697ee19SmrgAM_CONDITIONAL([am__fastdep$1], [ 76828697ee19Smrg test "x$enable_dependency_tracking" != xno \ 76838697ee19Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 76848697ee19Smrg]) 7685ab47cfaaSmrg 76868697ee19Smrg 76878697ee19Smrg# AM_SET_DEPDIR 76888697ee19Smrg# ------------- 76898697ee19Smrg# Choose a directory name for dependency files. 76908697ee19Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 76918697ee19SmrgAC_DEFUN([AM_SET_DEPDIR], 76928697ee19Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 76938697ee19SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 76948697ee19Smrg]) 76958697ee19Smrg 76968697ee19Smrg 76978697ee19Smrg# AM_DEP_TRACK 76988697ee19Smrg# ------------ 76998697ee19SmrgAC_DEFUN([AM_DEP_TRACK], 77008697ee19Smrg[AC_ARG_ENABLE(dependency-tracking, 77018697ee19Smrg[ --disable-dependency-tracking speeds up one-time build 77028697ee19Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 77038697ee19Smrgif test "x$enable_dependency_tracking" != xno; then 77048697ee19Smrg am_depcomp="$ac_aux_dir/depcomp" 77058697ee19Smrg AMDEPBACKSLASH='\' 77068697ee19Smrgfi 77078697ee19SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 77088697ee19SmrgAC_SUBST([AMDEPBACKSLASH])dnl 77098697ee19Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 77108697ee19Smrg]) 77118697ee19Smrg 77128697ee19Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 77138697ee19Smrg 77141473d951Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 77158697ee19Smrg# Free Software Foundation, Inc. 7716ab47cfaaSmrg# 77178697ee19Smrg# This file is free software; the Free Software Foundation 77188697ee19Smrg# gives unlimited permission to copy and/or distribute it, 77198697ee19Smrg# with or without modifications, as long as this notice is preserved. 77208697ee19Smrg 77215c42550eSmrg#serial 5 77228697ee19Smrg 77238697ee19Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 77248697ee19Smrg# ------------------------------ 77258697ee19SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 77265c42550eSmrg[{ 77275c42550eSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 77285c42550eSmrg # are listed without --file. Let's play safe and only enable the eval 77295c42550eSmrg # if we detect the quoting. 77305c42550eSmrg case $CONFIG_FILES in 77315c42550eSmrg *\'*) eval set x "$CONFIG_FILES" ;; 77325c42550eSmrg *) set x $CONFIG_FILES ;; 77335c42550eSmrg esac 77345c42550eSmrg shift 77355c42550eSmrg for mf 77365c42550eSmrg do 77375c42550eSmrg # Strip MF so we end up with the name of the file. 77385c42550eSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 77395c42550eSmrg # Check whether this is an Automake generated Makefile or not. 77405c42550eSmrg # We used to match only the files named `Makefile.in', but 77415c42550eSmrg # some people rename them; so instead we look at the file content. 77425c42550eSmrg # Grep'ing the first line is not enough: some people post-process 77435c42550eSmrg # each Makefile.in and add a new line on top of each file to say so. 77445c42550eSmrg # Grep'ing the whole file is not good either: AIX grep has a line 77455c42550eSmrg # limit of 2048, but all sed's we know have understand at least 4000. 77465c42550eSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 77475c42550eSmrg dirpart=`AS_DIRNAME("$mf")` 77485c42550eSmrg else 77495c42550eSmrg continue 77505c42550eSmrg fi 77515c42550eSmrg # Extract the definition of DEPDIR, am__include, and am__quote 77525c42550eSmrg # from the Makefile without running `make'. 77535c42550eSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 77545c42550eSmrg test -z "$DEPDIR" && continue 77555c42550eSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 77565c42550eSmrg test -z "am__include" && continue 77575c42550eSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 77585c42550eSmrg # When using ansi2knr, U may be empty or an underscore; expand it 77595c42550eSmrg U=`sed -n 's/^U = //p' < "$mf"` 77605c42550eSmrg # Find all dependency output files, they are included files with 77615c42550eSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 77625c42550eSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 77635c42550eSmrg # expansion. 77645c42550eSmrg for file in `sed -n " 77655c42550eSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 77665c42550eSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 77675c42550eSmrg # Make sure the directory exists. 77685c42550eSmrg test -f "$dirpart/$file" && continue 77695c42550eSmrg fdir=`AS_DIRNAME(["$file"])` 77705c42550eSmrg AS_MKDIR_P([$dirpart/$fdir]) 77715c42550eSmrg # echo "creating $dirpart/$file" 77725c42550eSmrg echo '# dummy' > "$dirpart/$file" 77735c42550eSmrg done 77748697ee19Smrg done 77755c42550eSmrg} 77768697ee19Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 77778697ee19Smrg 77788697ee19Smrg 77798697ee19Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 77808697ee19Smrg# ----------------------------- 77818697ee19Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 7782ab47cfaaSmrg# 77838697ee19Smrg# This code is only required when automatic dependency tracking 77848697ee19Smrg# is enabled. FIXME. This creates each `.P' file that we will 77858697ee19Smrg# need in order to bootstrap the dependency handling code. 77868697ee19SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 77878697ee19Smrg[AC_CONFIG_COMMANDS([depfiles], 77888697ee19Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 77898697ee19Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 77908697ee19Smrg]) 77918697ee19Smrg 77928697ee19Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 77938697ee19Smrg# Free Software Foundation, Inc. 7794ab47cfaaSmrg# 77958697ee19Smrg# This file is free software; the Free Software Foundation 77968697ee19Smrg# gives unlimited permission to copy and/or distribute it, 77978697ee19Smrg# with or without modifications, as long as this notice is preserved. 77988697ee19Smrg 77998697ee19Smrg# serial 8 78008697ee19Smrg 78018697ee19Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 78028697ee19SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 78038697ee19Smrg 78048697ee19Smrg# Do all the work for Automake. -*- Autoconf -*- 78058697ee19Smrg 78068697ee19Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 78075c42550eSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 7808ab47cfaaSmrg# 78098697ee19Smrg# This file is free software; the Free Software Foundation 78108697ee19Smrg# gives unlimited permission to copy and/or distribute it, 78118697ee19Smrg# with or without modifications, as long as this notice is preserved. 78128697ee19Smrg 78135c42550eSmrg# serial 16 78148697ee19Smrg 78158697ee19Smrg# This macro actually does too much. Some checks are only needed if 78168697ee19Smrg# your package does certain things. But this isn't really a big deal. 78178697ee19Smrg 78188697ee19Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 78198697ee19Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 78208697ee19Smrg# ----------------------------------------------- 78218697ee19Smrg# The call with PACKAGE and VERSION arguments is the old style 78228697ee19Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 78238697ee19Smrg# and VERSION should now be passed to AC_INIT and removed from 78248697ee19Smrg# the call to AM_INIT_AUTOMAKE. 78258697ee19Smrg# We support both call styles for the transition. After 78268697ee19Smrg# the next Automake release, Autoconf can make the AC_INIT 78278697ee19Smrg# arguments mandatory, and then we can depend on a new Autoconf 78288697ee19Smrg# release and drop the old call support. 78298697ee19SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 78305c42550eSmrg[AC_PREREQ([2.62])dnl 78318697ee19Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 78328697ee19Smrgdnl the ones we care about. 78338697ee19Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 78348697ee19SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 78358697ee19SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 78368697ee19Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 78378697ee19Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 78388697ee19Smrg # is not polluted with repeated "-I." 78398697ee19Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 78408697ee19Smrg # test to see if srcdir already configured 78418697ee19Smrg if test -f $srcdir/config.status; then 78428697ee19Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 78438697ee19Smrg fi 78448697ee19Smrgfi 78458697ee19Smrg 78468697ee19Smrg# test whether we have cygpath 78478697ee19Smrgif test -z "$CYGPATH_W"; then 78488697ee19Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 78498697ee19Smrg CYGPATH_W='cygpath -w' 78508697ee19Smrg else 78518697ee19Smrg CYGPATH_W=echo 78528697ee19Smrg fi 78538697ee19Smrgfi 78548697ee19SmrgAC_SUBST([CYGPATH_W]) 78558697ee19Smrg 78568697ee19Smrg# Define the identity of the package. 78578697ee19Smrgdnl Distinguish between old-style and new-style calls. 78588697ee19Smrgm4_ifval([$2], 78598697ee19Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 78608697ee19Smrg AC_SUBST([PACKAGE], [$1])dnl 78618697ee19Smrg AC_SUBST([VERSION], [$2])], 78628697ee19Smrg[_AM_SET_OPTIONS([$1])dnl 78638697ee19Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 78648697ee19Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 78658697ee19Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 78668697ee19Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 78678697ee19Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 78688697ee19Smrg 78698697ee19Smrg_AM_IF_OPTION([no-define],, 78708697ee19Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 78718697ee19Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 78728697ee19Smrg 78738697ee19Smrg# Some tools Automake needs. 78748697ee19SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 78758697ee19SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 78768697ee19SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 78778697ee19SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 78788697ee19SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 78798697ee19SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 78808697ee19SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 78815c42550eSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 78825c42550eSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 78838697ee19SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 78848697ee19Smrg# We need awk for the "check" target. The system "awk" is bad on 78858697ee19Smrg# some platforms. 78868697ee19SmrgAC_REQUIRE([AC_PROG_AWK])dnl 78878697ee19SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 78888697ee19SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 78898697ee19Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 78905c42550eSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 78915c42550eSmrg [_AM_PROG_TAR([v7])])]) 78928697ee19Smrg_AM_IF_OPTION([no-dependencies],, 78938697ee19Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 78945c42550eSmrg [_AM_DEPENDENCIES(CC)], 78955c42550eSmrg [define([AC_PROG_CC], 78965c42550eSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 78978697ee19SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 78985c42550eSmrg [_AM_DEPENDENCIES(CXX)], 78995c42550eSmrg [define([AC_PROG_CXX], 79005c42550eSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 79018697ee19SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 79025c42550eSmrg [_AM_DEPENDENCIES(OBJC)], 79035c42550eSmrg [define([AC_PROG_OBJC], 79045c42550eSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 79058697ee19Smrg]) 79065c42550eSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 79075c42550eSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 79085c42550eSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 79095c42550eSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 79105c42550eSmrgAC_CONFIG_COMMANDS_PRE(dnl 79115c42550eSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 79125c42550eSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 79138697ee19Smrg]) 7914ab47cfaaSmrg 79155c42550eSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 79165c42550eSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 79175c42550eSmrgdnl mangled by Autoconf and run in a shell conditional statement. 79185c42550eSmrgm4_define([_AC_COMPILER_EXEEXT], 79195c42550eSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 79205c42550eSmrg 7921ab47cfaaSmrg 79228697ee19Smrg# When config.status generates a header, we must update the stamp-h file. 79238697ee19Smrg# This file resides in the same directory as the config header 79248697ee19Smrg# that is generated. The stamp files are numbered to have different names. 7925ab47cfaaSmrg 79268697ee19Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 79278697ee19Smrg# loop where config.status creates the headers, so we can generate 79288697ee19Smrg# our stamp files there. 79298697ee19SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 79308697ee19Smrg[# Compute $1's index in $config_headers. 79318697ee19Smrg_am_arg=$1 79328697ee19Smrg_am_stamp_count=1 79338697ee19Smrgfor _am_header in $config_headers :; do 79348697ee19Smrg case $_am_header in 79358697ee19Smrg $_am_arg | $_am_arg:* ) 79368697ee19Smrg break ;; 79378697ee19Smrg * ) 79388697ee19Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 79398697ee19Smrg esac 79408697ee19Smrgdone 79418697ee19Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 7942ab47cfaaSmrg 79435c42550eSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 7944ab47cfaaSmrg# 79458697ee19Smrg# This file is free software; the Free Software Foundation 79468697ee19Smrg# gives unlimited permission to copy and/or distribute it, 79478697ee19Smrg# with or without modifications, as long as this notice is preserved. 7948ab47cfaaSmrg 79498697ee19Smrg# AM_PROG_INSTALL_SH 79508697ee19Smrg# ------------------ 79518697ee19Smrg# Define $install_sh. 79528697ee19SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 79538697ee19Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 79545c42550eSmrgif test x"${install_sh}" != xset; then 79555c42550eSmrg case $am_aux_dir in 79565c42550eSmrg *\ * | *\ *) 79575c42550eSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 79585c42550eSmrg *) 79595c42550eSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 79605c42550eSmrg esac 79615c42550eSmrgfi 79628697ee19SmrgAC_SUBST(install_sh)]) 7963ab47cfaaSmrg 79648697ee19Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 79658697ee19Smrg# 79668697ee19Smrg# This file is free software; the Free Software Foundation 79678697ee19Smrg# gives unlimited permission to copy and/or distribute it, 79688697ee19Smrg# with or without modifications, as long as this notice is preserved. 7969ab47cfaaSmrg 79708697ee19Smrg# serial 2 7971ab47cfaaSmrg 79728697ee19Smrg# Check whether the underlying file-system supports filenames 79738697ee19Smrg# with a leading dot. For instance MS-DOS doesn't. 79748697ee19SmrgAC_DEFUN([AM_SET_LEADING_DOT], 79758697ee19Smrg[rm -rf .tst 2>/dev/null 79768697ee19Smrgmkdir .tst 2>/dev/null 79778697ee19Smrgif test -d .tst; then 79788697ee19Smrg am__leading_dot=. 79798697ee19Smrgelse 79808697ee19Smrg am__leading_dot=_ 7981ab47cfaaSmrgfi 79828697ee19Smrgrmdir .tst 2>/dev/null 79838697ee19SmrgAC_SUBST([am__leading_dot])]) 7984ab47cfaaSmrg 79858697ee19Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 79868697ee19Smrg# From Jim Meyering 7987ab47cfaaSmrg 79885c42550eSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 79898697ee19Smrg# Free Software Foundation, Inc. 79908697ee19Smrg# 79918697ee19Smrg# This file is free software; the Free Software Foundation 79928697ee19Smrg# gives unlimited permission to copy and/or distribute it, 79938697ee19Smrg# with or without modifications, as long as this notice is preserved. 7994ab47cfaaSmrg 79955c42550eSmrg# serial 5 7996ab47cfaaSmrg 79975c42550eSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 79985c42550eSmrg# ---------------------------------- 79995c42550eSmrg# Control maintainer-specific portions of Makefiles. 80005c42550eSmrg# Default is to disable them, unless `enable' is passed literally. 80015c42550eSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 80025c42550eSmrg# can override the default with the --enable/--disable switch. 80038697ee19SmrgAC_DEFUN([AM_MAINTAINER_MODE], 80045c42550eSmrg[m4_case(m4_default([$1], [disable]), 80055c42550eSmrg [enable], [m4_define([am_maintainer_other], [disable])], 80065c42550eSmrg [disable], [m4_define([am_maintainer_other], [enable])], 80075c42550eSmrg [m4_define([am_maintainer_other], [enable]) 80085c42550eSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 80095c42550eSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 80105c42550eSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 80115c42550eSmrg AC_ARG_ENABLE([maintainer-mode], 80125c42550eSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 80138697ee19Smrg (and sometimes confusing) to the casual installer], 80145c42550eSmrg [USE_MAINTAINER_MODE=$enableval], 80155c42550eSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 80168697ee19Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 80175c42550eSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 80188697ee19Smrg MAINT=$MAINTAINER_MODE_TRUE 80195c42550eSmrg AC_SUBST([MAINT])dnl 80208697ee19Smrg] 80218697ee19Smrg) 8022ab47cfaaSmrg 80238697ee19SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 8024ab47cfaaSmrg 80258697ee19Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 8026ab47cfaaSmrg 80275c42550eSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 80288697ee19Smrg# 80298697ee19Smrg# This file is free software; the Free Software Foundation 80308697ee19Smrg# gives unlimited permission to copy and/or distribute it, 80318697ee19Smrg# with or without modifications, as long as this notice is preserved. 8032ab47cfaaSmrg 80335c42550eSmrg# serial 4 8034ab47cfaaSmrg 80358697ee19Smrg# AM_MAKE_INCLUDE() 80368697ee19Smrg# ----------------- 80378697ee19Smrg# Check to see how make treats includes. 80388697ee19SmrgAC_DEFUN([AM_MAKE_INCLUDE], 80398697ee19Smrg[am_make=${MAKE-make} 80408697ee19Smrgcat > confinc << 'END' 80418697ee19Smrgam__doit: 80425c42550eSmrg @echo this is the am__doit target 80438697ee19Smrg.PHONY: am__doit 80448697ee19SmrgEND 80458697ee19Smrg# If we don't find an include directive, just comment out the code. 80468697ee19SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 80478697ee19Smrgam__include="#" 80488697ee19Smrgam__quote= 80498697ee19Smrg_am_result=none 80508697ee19Smrg# First try GNU make style include. 80518697ee19Smrgecho "include confinc" > confmf 80525c42550eSmrg# Ignore all kinds of additional output from `make'. 80535c42550eSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 80545c42550eSmrg*the\ am__doit\ target*) 80555c42550eSmrg am__include=include 80565c42550eSmrg am__quote= 80575c42550eSmrg _am_result=GNU 80585c42550eSmrg ;; 80595c42550eSmrgesac 80608697ee19Smrg# Now try BSD make style include. 80618697ee19Smrgif test "$am__include" = "#"; then 80628697ee19Smrg echo '.include "confinc"' > confmf 80635c42550eSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 80645c42550eSmrg *the\ am__doit\ target*) 80655c42550eSmrg am__include=.include 80665c42550eSmrg am__quote="\"" 80675c42550eSmrg _am_result=BSD 80685c42550eSmrg ;; 80695c42550eSmrg esac 8070ab47cfaaSmrgfi 80718697ee19SmrgAC_SUBST([am__include]) 80728697ee19SmrgAC_SUBST([am__quote]) 80738697ee19SmrgAC_MSG_RESULT([$_am_result]) 80748697ee19Smrgrm -f confinc confmf 80758697ee19Smrg]) 80768697ee19Smrg 80778697ee19Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 8078ab47cfaaSmrg 80795c42550eSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 80808697ee19Smrg# Free Software Foundation, Inc. 80818697ee19Smrg# 80828697ee19Smrg# This file is free software; the Free Software Foundation 80838697ee19Smrg# gives unlimited permission to copy and/or distribute it, 80848697ee19Smrg# with or without modifications, as long as this notice is preserved. 8085ab47cfaaSmrg 80865c42550eSmrg# serial 6 8087ab47cfaaSmrg 80888697ee19Smrg# AM_MISSING_PROG(NAME, PROGRAM) 80898697ee19Smrg# ------------------------------ 80908697ee19SmrgAC_DEFUN([AM_MISSING_PROG], 80918697ee19Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 80928697ee19Smrg$1=${$1-"${am_missing_run}$2"} 80938697ee19SmrgAC_SUBST($1)]) 8094ab47cfaaSmrg 80958697ee19Smrg 80968697ee19Smrg# AM_MISSING_HAS_RUN 80978697ee19Smrg# ------------------ 80988697ee19Smrg# Define MISSING if not defined so far and test if it supports --run. 80998697ee19Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 81008697ee19SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 81018697ee19Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 81028697ee19SmrgAC_REQUIRE_AUX_FILE([missing])dnl 81035c42550eSmrgif test x"${MISSING+set}" != xset; then 81045c42550eSmrg case $am_aux_dir in 81055c42550eSmrg *\ * | *\ *) 81065c42550eSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 81075c42550eSmrg *) 81085c42550eSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 81095c42550eSmrg esac 81105c42550eSmrgfi 81118697ee19Smrg# Use eval to expand $SHELL 81128697ee19Smrgif eval "$MISSING --run true"; then 81138697ee19Smrg am_missing_run="$MISSING --run " 8114ab47cfaaSmrgelse 81158697ee19Smrg am_missing_run= 81168697ee19Smrg AC_MSG_WARN([`missing' script is too old or missing]) 8117ab47cfaaSmrgfi 81188697ee19Smrg]) 8119ab47cfaaSmrg 81208697ee19Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 81218697ee19Smrg# 81228697ee19Smrg# This file is free software; the Free Software Foundation 81238697ee19Smrg# gives unlimited permission to copy and/or distribute it, 81248697ee19Smrg# with or without modifications, as long as this notice is preserved. 8125ab47cfaaSmrg 81268697ee19Smrg# AM_PROG_MKDIR_P 81278697ee19Smrg# --------------- 81288697ee19Smrg# Check for `mkdir -p'. 81298697ee19SmrgAC_DEFUN([AM_PROG_MKDIR_P], 81308697ee19Smrg[AC_PREREQ([2.60])dnl 81318697ee19SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 81328697ee19Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 81338697ee19Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 81348697ee19Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 81358697ee19Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 81368697ee19Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 81378697ee19Smrgdnl adjustment using top_builddir (which is defined more often than 81388697ee19Smrgdnl MKDIR_P). 81398697ee19SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 81408697ee19Smrgcase $mkdir_p in 81418697ee19Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 81428697ee19Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 81438697ee19Smrgesac 81448697ee19Smrg]) 8145ab47cfaaSmrg 81468697ee19Smrg# Helper functions for option handling. -*- Autoconf -*- 8147ab47cfaaSmrg 81481473d951Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 8149ab47cfaaSmrg# 81508697ee19Smrg# This file is free software; the Free Software Foundation 81518697ee19Smrg# gives unlimited permission to copy and/or distribute it, 81528697ee19Smrg# with or without modifications, as long as this notice is preserved. 8153ab47cfaaSmrg 81541473d951Smrg# serial 4 8155ab47cfaaSmrg 81568697ee19Smrg# _AM_MANGLE_OPTION(NAME) 81578697ee19Smrg# ----------------------- 81588697ee19SmrgAC_DEFUN([_AM_MANGLE_OPTION], 81598697ee19Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 8160ab47cfaaSmrg 81618697ee19Smrg# _AM_SET_OPTION(NAME) 81628697ee19Smrg# ------------------------------ 81638697ee19Smrg# Set option NAME. Presently that only means defining a flag for this option. 81648697ee19SmrgAC_DEFUN([_AM_SET_OPTION], 81658697ee19Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 8166ab47cfaaSmrg 81678697ee19Smrg# _AM_SET_OPTIONS(OPTIONS) 81688697ee19Smrg# ---------------------------------- 81698697ee19Smrg# OPTIONS is a space-separated list of Automake options. 81708697ee19SmrgAC_DEFUN([_AM_SET_OPTIONS], 81711473d951Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 8172ab47cfaaSmrg 81738697ee19Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 81748697ee19Smrg# ------------------------------------------- 81758697ee19Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 81768697ee19SmrgAC_DEFUN([_AM_IF_OPTION], 81778697ee19Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 8178ab47cfaaSmrg 81798697ee19Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8180ab47cfaaSmrg 81815c42550eSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 81828697ee19Smrg# Free Software Foundation, Inc. 8183ab47cfaaSmrg# 81848697ee19Smrg# This file is free software; the Free Software Foundation 81858697ee19Smrg# gives unlimited permission to copy and/or distribute it, 81868697ee19Smrg# with or without modifications, as long as this notice is preserved. 8187ab47cfaaSmrg 81885c42550eSmrg# serial 5 8189ab47cfaaSmrg 81908697ee19Smrg# AM_SANITY_CHECK 81918697ee19Smrg# --------------- 81928697ee19SmrgAC_DEFUN([AM_SANITY_CHECK], 81938697ee19Smrg[AC_MSG_CHECKING([whether build environment is sane]) 81948697ee19Smrg# Just in case 81958697ee19Smrgsleep 1 81968697ee19Smrgecho timestamp > conftest.file 81975c42550eSmrg# Reject unsafe characters in $srcdir or the absolute working directory 81985c42550eSmrg# name. Accept space and tab only in the latter. 81995c42550eSmrgam_lf=' 82005c42550eSmrg' 82015c42550eSmrgcase `pwd` in 82025c42550eSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 82035c42550eSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 82045c42550eSmrgesac 82055c42550eSmrgcase $srcdir in 82065c42550eSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 82075c42550eSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 82085c42550eSmrgesac 82095c42550eSmrg 82108697ee19Smrg# Do `set' in a subshell so we don't clobber the current shell's 82118697ee19Smrg# arguments. Must try -L first in case configure is actually a 82128697ee19Smrg# symlink; some systems play weird games with the mod time of symlinks 82138697ee19Smrg# (eg FreeBSD returns the mod time of the symlink's containing 82148697ee19Smrg# directory). 82158697ee19Smrgif ( 82165c42550eSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 82178697ee19Smrg if test "$[*]" = "X"; then 82188697ee19Smrg # -L didn't work. 82195c42550eSmrg set X `ls -t "$srcdir/configure" conftest.file` 82208697ee19Smrg fi 82218697ee19Smrg rm -f conftest.file 82228697ee19Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 82238697ee19Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8224ab47cfaaSmrg 82258697ee19Smrg # If neither matched, then we have a broken ls. This can happen 82268697ee19Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 82278697ee19Smrg # broken ls alias from the environment. This has actually 82288697ee19Smrg # happened. Such a system could not be considered "sane". 82298697ee19Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 82308697ee19Smrgalias in your environment]) 82318697ee19Smrg fi 8232ab47cfaaSmrg 82338697ee19Smrg test "$[2]" = conftest.file 82348697ee19Smrg ) 82358697ee19Smrgthen 82368697ee19Smrg # Ok. 82378697ee19Smrg : 82388697ee19Smrgelse 82398697ee19Smrg AC_MSG_ERROR([newly created file is older than distributed files! 82408697ee19SmrgCheck your system clock]) 82418697ee19Smrgfi 82428697ee19SmrgAC_MSG_RESULT(yes)]) 8243ab47cfaaSmrg 82448697ee19Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8245ab47cfaaSmrg# 82468697ee19Smrg# This file is free software; the Free Software Foundation 82478697ee19Smrg# gives unlimited permission to copy and/or distribute it, 82488697ee19Smrg# with or without modifications, as long as this notice is preserved. 8249ab47cfaaSmrg 82508697ee19Smrg# AM_PROG_INSTALL_STRIP 82518697ee19Smrg# --------------------- 82528697ee19Smrg# One issue with vendor `install' (even GNU) is that you can't 82538697ee19Smrg# specify the program used to strip binaries. This is especially 82548697ee19Smrg# annoying in cross-compiling environments, where the build's strip 82558697ee19Smrg# is unlikely to handle the host's binaries. 82568697ee19Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 82578697ee19Smrg# always use install-sh in `make install-strip', and initialize 82588697ee19Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 82598697ee19SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 82608697ee19Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 82618697ee19Smrg# Installed binaries are usually stripped using `strip' when the user 82628697ee19Smrg# run `make install-strip'. However `strip' might not be the right 82638697ee19Smrg# tool to use in cross-compilation environments, therefore Automake 82648697ee19Smrg# will honor the `STRIP' environment variable to overrule this program. 82658697ee19Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 82668697ee19Smrgif test "$cross_compiling" != no; then 82678697ee19Smrg AC_CHECK_TOOL([STRIP], [strip], :) 8268ab47cfaaSmrgfi 82698697ee19SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 82708697ee19SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 8271ab47cfaaSmrg 82725c42550eSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 82738697ee19Smrg# 82748697ee19Smrg# This file is free software; the Free Software Foundation 82758697ee19Smrg# gives unlimited permission to copy and/or distribute it, 82768697ee19Smrg# with or without modifications, as long as this notice is preserved. 8277ab47cfaaSmrg 82785c42550eSmrg# serial 2 82795c42550eSmrg 82808697ee19Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 82818697ee19Smrg# --------------------------- 82828697ee19Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 82838697ee19Smrg# This macro is traced by Automake. 82848697ee19SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 8285ab47cfaaSmrg 82865c42550eSmrg# AM_SUBST_NOTMAKE(VARIABLE) 82875c42550eSmrg# --------------------------- 82885c42550eSmrg# Public sister of _AM_SUBST_NOTMAKE. 82895c42550eSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 82905c42550eSmrg 82918697ee19Smrg# Check how to create a tarball. -*- Autoconf -*- 8292ab47cfaaSmrg 82938697ee19Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 82948697ee19Smrg# 82958697ee19Smrg# This file is free software; the Free Software Foundation 82968697ee19Smrg# gives unlimited permission to copy and/or distribute it, 82978697ee19Smrg# with or without modifications, as long as this notice is preserved. 8298ab47cfaaSmrg 82998697ee19Smrg# serial 2 8300ab47cfaaSmrg 83018697ee19Smrg# _AM_PROG_TAR(FORMAT) 8302ab47cfaaSmrg# -------------------- 83038697ee19Smrg# Check how to create a tarball in format FORMAT. 83048697ee19Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 83058697ee19Smrg# 83068697ee19Smrg# Substitute a variable $(am__tar) that is a command 83078697ee19Smrg# writing to stdout a FORMAT-tarball containing the directory 83088697ee19Smrg# $tardir. 83098697ee19Smrg# tardir=directory && $(am__tar) > result.tar 83108697ee19Smrg# 83118697ee19Smrg# Substitute a variable $(am__untar) that extract such 83128697ee19Smrg# a tarball read from stdin. 83138697ee19Smrg# $(am__untar) < result.tar 83148697ee19SmrgAC_DEFUN([_AM_PROG_TAR], 83158697ee19Smrg[# Always define AMTAR for backward compatibility. 83168697ee19SmrgAM_MISSING_PROG([AMTAR], [tar]) 83178697ee19Smrgm4_if([$1], [v7], 83188697ee19Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 83198697ee19Smrg [m4_case([$1], [ustar],, [pax],, 83208697ee19Smrg [m4_fatal([Unknown tar format])]) 83218697ee19SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 83228697ee19Smrg# Loop over all known methods to create a tar archive until one works. 83238697ee19Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 83248697ee19Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 83258697ee19Smrg# Do not fold the above two line into one, because Tru64 sh and 83268697ee19Smrg# Solaris sh will not grok spaces in the rhs of `-'. 83278697ee19Smrgfor _am_tool in $_am_tools 83288697ee19Smrgdo 83298697ee19Smrg case $_am_tool in 83308697ee19Smrg gnutar) 83318697ee19Smrg for _am_tar in tar gnutar gtar; 83328697ee19Smrg do 83338697ee19Smrg AM_RUN_LOG([$_am_tar --version]) && break 83348697ee19Smrg done 83358697ee19Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 83368697ee19Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 83378697ee19Smrg am__untar="$_am_tar -xf -" 83388697ee19Smrg ;; 83398697ee19Smrg plaintar) 83408697ee19Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 83418697ee19Smrg # ustar tarball either. 83428697ee19Smrg (tar --version) >/dev/null 2>&1 && continue 83438697ee19Smrg am__tar='tar chf - "$$tardir"' 83448697ee19Smrg am__tar_='tar chf - "$tardir"' 83458697ee19Smrg am__untar='tar xf -' 83468697ee19Smrg ;; 83478697ee19Smrg pax) 83488697ee19Smrg am__tar='pax -L -x $1 -w "$$tardir"' 83498697ee19Smrg am__tar_='pax -L -x $1 -w "$tardir"' 83508697ee19Smrg am__untar='pax -r' 83518697ee19Smrg ;; 83528697ee19Smrg cpio) 83538697ee19Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 83548697ee19Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 83558697ee19Smrg am__untar='cpio -i -H $1 -d' 83568697ee19Smrg ;; 83578697ee19Smrg none) 83588697ee19Smrg am__tar=false 83598697ee19Smrg am__tar_=false 83608697ee19Smrg am__untar=false 83618697ee19Smrg ;; 83628697ee19Smrg esac 83638697ee19Smrg 83648697ee19Smrg # If the value was cached, stop now. We just wanted to have am__tar 83658697ee19Smrg # and am__untar set. 83668697ee19Smrg test -n "${am_cv_prog_tar_$1}" && break 83678697ee19Smrg 83688697ee19Smrg # tar/untar a dummy directory, and stop if the command works 83698697ee19Smrg rm -rf conftest.dir 83708697ee19Smrg mkdir conftest.dir 83718697ee19Smrg echo GrepMe > conftest.dir/file 83728697ee19Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 83738697ee19Smrg rm -rf conftest.dir 83748697ee19Smrg if test -s conftest.tar; then 83758697ee19Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 83768697ee19Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 83778697ee19Smrg fi 83788697ee19Smrgdone 83798697ee19Smrgrm -rf conftest.dir 83808697ee19Smrg 83818697ee19SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 83828697ee19SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 83838697ee19SmrgAC_SUBST([am__tar]) 83848697ee19SmrgAC_SUBST([am__untar]) 83858697ee19Smrg]) # _AM_PROG_TAR 8386ab47cfaaSmrg 8387