aclocal.m4 revision ff89ac2b
1ff89ac2bSmrg# generated automatically by aclocal 1.10.1 -*- Autoconf -*- 295b296d0Smrg 395b296d0Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4ff89ac2bSmrg# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 595b296d0Smrg# This file is free software; the Free Software Foundation 695b296d0Smrg# gives unlimited permission to copy and/or distribute it, 795b296d0Smrg# with or without modifications, as long as this notice is preserved. 895b296d0Smrg 995b296d0Smrg# This program is distributed in the hope that it will be useful, 1095b296d0Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1195b296d0Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1295b296d0Smrg# PARTICULAR PURPOSE. 1395b296d0Smrg 14ff89ac2bSmrgm4_ifndef([AC_AUTOCONF_VERSION], 15ff89ac2bSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16ff89ac2bSmrgm4_if(AC_AUTOCONF_VERSION, [2.63],, 17ff89ac2bSmrg[m4_warning([this file was generated for autoconf 2.63. 18ff89ac2bSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19ff89ac2bSmrgIf you have problems, you may need to regenerate the build system entirely. 20ff89ac2bSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21ff89ac2bSmrg 2295b296d0Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2395b296d0Smrg 24ff89ac2bSmrg# serial 52 AC_PROG_LIBTOOL 2595b296d0Smrg 2695b296d0Smrg 2795b296d0Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 2895b296d0Smrg# ----------------------------------------------------------- 2995b296d0Smrg# If this macro is not defined by Autoconf, define it here. 3095b296d0Smrgm4_ifdef([AC_PROVIDE_IFELSE], 3195b296d0Smrg [], 3295b296d0Smrg [m4_define([AC_PROVIDE_IFELSE], 3395b296d0Smrg [m4_ifdef([AC_PROVIDE_$1], 3495b296d0Smrg [$2], [$3])])]) 3595b296d0Smrg 3695b296d0Smrg 3795b296d0Smrg# AC_PROG_LIBTOOL 3895b296d0Smrg# --------------- 3995b296d0SmrgAC_DEFUN([AC_PROG_LIBTOOL], 4095b296d0Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 4195b296d0Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 4295b296d0Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 4395b296d0Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 4495b296d0Smrg [AC_LIBTOOL_CXX], 4595b296d0Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 4695b296d0Smrg ])]) 4795b296d0Smrgdnl And a similar setup for Fortran 77 support 4895b296d0Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 4995b296d0Smrg [AC_LIBTOOL_F77], 5095b296d0Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 5195b296d0Smrg])]) 5295b296d0Smrg 5395b296d0Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 5495b296d0Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 5595b296d0Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 5695b296d0Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 5795b296d0Smrg [AC_LIBTOOL_GCJ], 5895b296d0Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 5995b296d0Smrg [AC_LIBTOOL_GCJ], 6095b296d0Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 6195b296d0Smrg [AC_LIBTOOL_GCJ], 6295b296d0Smrg [ifdef([AC_PROG_GCJ], 6395b296d0Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 6495b296d0Smrg ifdef([A][M_PROG_GCJ], 6595b296d0Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 6695b296d0Smrg ifdef([LT_AC_PROG_GCJ], 6795b296d0Smrg [define([LT_AC_PROG_GCJ], 6895b296d0Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 6995b296d0Smrg])])# AC_PROG_LIBTOOL 7095b296d0Smrg 7195b296d0Smrg 7295b296d0Smrg# _AC_PROG_LIBTOOL 7395b296d0Smrg# ---------------- 7495b296d0SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 7595b296d0Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 7695b296d0SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 7795b296d0SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 7895b296d0SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 7995b296d0Smrg 8095b296d0Smrg# This can be used to rebuild libtool when needed 8195b296d0SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 8295b296d0Smrg 8395b296d0Smrg# Always use our own libtool. 8495b296d0SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 8595b296d0SmrgAC_SUBST(LIBTOOL)dnl 8695b296d0Smrg 8795b296d0Smrg# Prevent multiple expansion 8895b296d0Smrgdefine([AC_PROG_LIBTOOL], []) 8995b296d0Smrg])# _AC_PROG_LIBTOOL 9095b296d0Smrg 9195b296d0Smrg 9295b296d0Smrg# AC_LIBTOOL_SETUP 9395b296d0Smrg# ---------------- 9495b296d0SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 9595b296d0Smrg[AC_PREREQ(2.50)dnl 9695b296d0SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 9795b296d0SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 9895b296d0SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 9995b296d0SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 10095b296d0SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 10195b296d0SmrgAC_REQUIRE([AC_PROG_CC])dnl 10295b296d0SmrgAC_REQUIRE([AC_PROG_LD])dnl 10395b296d0SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 10495b296d0SmrgAC_REQUIRE([AC_PROG_NM])dnl 10595b296d0Smrg 10695b296d0SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 10795b296d0SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 10895b296d0Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 10995b296d0SmrgAC_REQUIRE([AC_OBJEXT])dnl 11095b296d0SmrgAC_REQUIRE([AC_EXEEXT])dnl 11195b296d0Smrgdnl 11295b296d0SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 11395b296d0SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 11495b296d0SmrgAC_LIBTOOL_OBJDIR 11595b296d0Smrg 11695b296d0SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 11795b296d0Smrg_LT_AC_PROG_ECHO_BACKSLASH 11895b296d0Smrg 11995b296d0Smrgcase $host_os in 12095b296d0Smrgaix3*) 12195b296d0Smrg # AIX sometimes has problems with the GCC collect2 program. For some 12295b296d0Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 12395b296d0Smrg # vanish in a puff of smoke. 12495b296d0Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 12595b296d0Smrg COLLECT_NAMES= 12695b296d0Smrg export COLLECT_NAMES 12795b296d0Smrg fi 12895b296d0Smrg ;; 12995b296d0Smrgesac 13095b296d0Smrg 13195b296d0Smrg# Sed substitution that helps us do robust quoting. It backslashifies 13295b296d0Smrg# metacharacters that are still active within double-quoted strings. 13395b296d0SmrgXsed='sed -e 1s/^X//' 13495b296d0Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 13595b296d0Smrg 13695b296d0Smrg# Same as above, but do not quote variable references. 13795b296d0Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 13895b296d0Smrg 13995b296d0Smrg# Sed substitution to delay expansion of an escaped shell variable in a 14095b296d0Smrg# double_quote_subst'ed string. 14195b296d0Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 14295b296d0Smrg 14395b296d0Smrg# Sed substitution to avoid accidental globbing in evaled expressions 14495b296d0Smrgno_glob_subst='s/\*/\\\*/g' 14595b296d0Smrg 14695b296d0Smrg# Constants: 14795b296d0Smrgrm="rm -f" 14895b296d0Smrg 14995b296d0Smrg# Global variables: 15095b296d0Smrgdefault_ofile=libtool 15195b296d0Smrgcan_build_shared=yes 15295b296d0Smrg 15395b296d0Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 15495b296d0Smrg# which needs '.lib'). 15595b296d0Smrglibext=a 15695b296d0Smrgltmain="$ac_aux_dir/ltmain.sh" 15795b296d0Smrgofile="$default_ofile" 15895b296d0Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 15995b296d0Smrg 16095b296d0SmrgAC_CHECK_TOOL(AR, ar, false) 16195b296d0SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 16295b296d0SmrgAC_CHECK_TOOL(STRIP, strip, :) 16395b296d0Smrg 16495b296d0Smrgold_CC="$CC" 16595b296d0Smrgold_CFLAGS="$CFLAGS" 16695b296d0Smrg 16795b296d0Smrg# Set sane defaults for various variables 16895b296d0Smrgtest -z "$AR" && AR=ar 16995b296d0Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 17095b296d0Smrgtest -z "$AS" && AS=as 17195b296d0Smrgtest -z "$CC" && CC=cc 17295b296d0Smrgtest -z "$LTCC" && LTCC=$CC 17395b296d0Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 17495b296d0Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 17595b296d0Smrgtest -z "$LD" && LD=ld 17695b296d0Smrgtest -z "$LN_S" && LN_S="ln -s" 17795b296d0Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 17895b296d0Smrgtest -z "$NM" && NM=nm 17995b296d0Smrgtest -z "$SED" && SED=sed 18095b296d0Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 18195b296d0Smrgtest -z "$RANLIB" && RANLIB=: 18295b296d0Smrgtest -z "$STRIP" && STRIP=: 18395b296d0Smrgtest -z "$ac_objext" && ac_objext=o 18495b296d0Smrg 18595b296d0Smrg# Determine commands to create old-style static archives. 186ff89ac2bSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 18795b296d0Smrgold_postinstall_cmds='chmod 644 $oldlib' 18895b296d0Smrgold_postuninstall_cmds= 18995b296d0Smrg 19095b296d0Smrgif test -n "$RANLIB"; then 19195b296d0Smrg case $host_os in 19295b296d0Smrg openbsd*) 19395b296d0Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 19495b296d0Smrg ;; 19595b296d0Smrg *) 19695b296d0Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 19795b296d0Smrg ;; 19895b296d0Smrg esac 19995b296d0Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 20095b296d0Smrgfi 20195b296d0Smrg 20295b296d0Smrg_LT_CC_BASENAME([$compiler]) 20395b296d0Smrg 20495b296d0Smrg# Only perform the check for file, if the check method requires it 20595b296d0Smrgcase $deplibs_check_method in 20695b296d0Smrgfile_magic*) 20795b296d0Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 20895b296d0Smrg AC_PATH_MAGIC 20995b296d0Smrg fi 21095b296d0Smrg ;; 21195b296d0Smrgesac 21295b296d0Smrg 213ff89ac2bSmrg_LT_REQUIRED_DARWIN_CHECKS 214ff89ac2bSmrg 21595b296d0SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 21695b296d0SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 21795b296d0Smrgenable_win32_dll=yes, enable_win32_dll=no) 21895b296d0Smrg 21995b296d0SmrgAC_ARG_ENABLE([libtool-lock], 22095b296d0Smrg [AC_HELP_STRING([--disable-libtool-lock], 22195b296d0Smrg [avoid locking (might break parallel builds)])]) 22295b296d0Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 22395b296d0Smrg 22495b296d0SmrgAC_ARG_WITH([pic], 22595b296d0Smrg [AC_HELP_STRING([--with-pic], 22695b296d0Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 22795b296d0Smrg [pic_mode="$withval"], 22895b296d0Smrg [pic_mode=default]) 22995b296d0Smrgtest -z "$pic_mode" && pic_mode=default 23095b296d0Smrg 23195b296d0Smrg# Use C for the default configuration in the libtool script 23295b296d0Smrgtagname= 23395b296d0SmrgAC_LIBTOOL_LANG_C_CONFIG 23495b296d0Smrg_LT_AC_TAGCONFIG 23595b296d0Smrg])# AC_LIBTOOL_SETUP 23695b296d0Smrg 23795b296d0Smrg 23895b296d0Smrg# _LT_AC_SYS_COMPILER 23995b296d0Smrg# ------------------- 24095b296d0SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 24195b296d0Smrg[AC_REQUIRE([AC_PROG_CC])dnl 24295b296d0Smrg 24395b296d0Smrg# If no C compiler was specified, use CC. 24495b296d0SmrgLTCC=${LTCC-"$CC"} 24595b296d0Smrg 24695b296d0Smrg# If no C compiler flags were specified, use CFLAGS. 24795b296d0SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 24895b296d0Smrg 24995b296d0Smrg# Allow CC to be a program name with arguments. 25095b296d0Smrgcompiler=$CC 25195b296d0Smrg])# _LT_AC_SYS_COMPILER 25295b296d0Smrg 25395b296d0Smrg 25495b296d0Smrg# _LT_CC_BASENAME(CC) 25595b296d0Smrg# ------------------- 25695b296d0Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 25795b296d0SmrgAC_DEFUN([_LT_CC_BASENAME], 25895b296d0Smrg[for cc_temp in $1""; do 25995b296d0Smrg case $cc_temp in 26095b296d0Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 26195b296d0Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 26295b296d0Smrg \-*) ;; 26395b296d0Smrg *) break;; 26495b296d0Smrg esac 26595b296d0Smrgdone 26695b296d0Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 26795b296d0Smrg]) 26895b296d0Smrg 26995b296d0Smrg 27095b296d0Smrg# _LT_COMPILER_BOILERPLATE 27195b296d0Smrg# ------------------------ 27295b296d0Smrg# Check for compiler boilerplate output or warnings with 27395b296d0Smrg# the simple compiler test code. 27495b296d0SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 275ff89ac2bSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 276ff89ac2bSmrgac_outfile=conftest.$ac_objext 277ff89ac2bSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 27895b296d0Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 27995b296d0Smrg_lt_compiler_boilerplate=`cat conftest.err` 28095b296d0Smrg$rm conftest* 28195b296d0Smrg])# _LT_COMPILER_BOILERPLATE 28295b296d0Smrg 28395b296d0Smrg 28495b296d0Smrg# _LT_LINKER_BOILERPLATE 28595b296d0Smrg# ---------------------- 28695b296d0Smrg# Check for linker boilerplate output or warnings with 28795b296d0Smrg# the simple link test code. 28895b296d0SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 289ff89ac2bSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 290ff89ac2bSmrgac_outfile=conftest.$ac_objext 291ff89ac2bSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 29295b296d0Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 29395b296d0Smrg_lt_linker_boilerplate=`cat conftest.err` 294ff89ac2bSmrg$rm -r conftest* 29595b296d0Smrg])# _LT_LINKER_BOILERPLATE 29695b296d0Smrg 297ff89ac2bSmrg# _LT_REQUIRED_DARWIN_CHECKS 298ff89ac2bSmrg# -------------------------- 299ff89ac2bSmrg# Check for some things on darwin 300ff89ac2bSmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ 301ff89ac2bSmrg case $host_os in 302ff89ac2bSmrg rhapsody* | darwin*) 303ff89ac2bSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 304ff89ac2bSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 305ff89ac2bSmrg 306ff89ac2bSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 307ff89ac2bSmrg [lt_cv_apple_cc_single_mod=no 308ff89ac2bSmrg if test -z "${LT_MULTI_MODULE}"; then 309ff89ac2bSmrg # By default we will add the -single_module flag. You can override 310ff89ac2bSmrg # by either setting the environment variable LT_MULTI_MODULE 311ff89ac2bSmrg # non-empty at configure time, or by adding -multi_module to the 312ff89ac2bSmrg # link flags. 313ff89ac2bSmrg echo "int foo(void){return 1;}" > conftest.c 314ff89ac2bSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 315ff89ac2bSmrg -dynamiclib ${wl}-single_module conftest.c 316ff89ac2bSmrg if test -f libconftest.dylib; then 317ff89ac2bSmrg lt_cv_apple_cc_single_mod=yes 318ff89ac2bSmrg rm -rf libconftest.dylib* 319ff89ac2bSmrg fi 320ff89ac2bSmrg rm conftest.c 321ff89ac2bSmrg fi]) 322ff89ac2bSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 323ff89ac2bSmrg [lt_cv_ld_exported_symbols_list], 324ff89ac2bSmrg [lt_cv_ld_exported_symbols_list=no 325ff89ac2bSmrg save_LDFLAGS=$LDFLAGS 326ff89ac2bSmrg echo "_main" > conftest.sym 327ff89ac2bSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 328ff89ac2bSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 329ff89ac2bSmrg [lt_cv_ld_exported_symbols_list=yes], 330ff89ac2bSmrg [lt_cv_ld_exported_symbols_list=no]) 331ff89ac2bSmrg LDFLAGS="$save_LDFLAGS" 332ff89ac2bSmrg ]) 333ff89ac2bSmrg case $host_os in 334ff89ac2bSmrg rhapsody* | darwin1.[[0123]]) 335ff89ac2bSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 336ff89ac2bSmrg darwin1.*) 337ff89ac2bSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 338ff89ac2bSmrg darwin*) 339ff89ac2bSmrg # if running on 10.5 or later, the deployment target defaults 340ff89ac2bSmrg # to the OS version, if on x86, and 10.4, the deployment 341ff89ac2bSmrg # target defaults to 10.4. Don't you love it? 342ff89ac2bSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 343ff89ac2bSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 344ff89ac2bSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 345ff89ac2bSmrg 10.[[012]]*) 346ff89ac2bSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 347ff89ac2bSmrg 10.*) 348ff89ac2bSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 349ff89ac2bSmrg esac 350ff89ac2bSmrg ;; 351ff89ac2bSmrg esac 352ff89ac2bSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 353ff89ac2bSmrg _lt_dar_single_mod='$single_module' 354ff89ac2bSmrg fi 355ff89ac2bSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 356ff89ac2bSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 357ff89ac2bSmrg else 358ff89ac2bSmrg _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 359ff89ac2bSmrg fi 360ff89ac2bSmrg if test "$DSYMUTIL" != ":"; then 361ff89ac2bSmrg _lt_dsymutil="~$DSYMUTIL \$lib || :" 362ff89ac2bSmrg else 363ff89ac2bSmrg _lt_dsymutil= 364ff89ac2bSmrg fi 365ff89ac2bSmrg ;; 366ff89ac2bSmrg esac 367ff89ac2bSmrg]) 36895b296d0Smrg 36995b296d0Smrg# _LT_AC_SYS_LIBPATH_AIX 37095b296d0Smrg# ---------------------- 37195b296d0Smrg# Links a minimal program and checks the executable 37295b296d0Smrg# for the system default hardcoded library path. In most cases, 37395b296d0Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 37495b296d0Smrg# the location of the communication and MPI libs are included too. 37595b296d0Smrg# If we don't find anything, use the default library path according 37695b296d0Smrg# to the aix ld manual. 37795b296d0SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 378ff89ac2bSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 379ff89ac2bSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 380ff89ac2bSmrglt_aix_libpath_sed=' 381ff89ac2bSmrg /Import File Strings/,/^$/ { 382ff89ac2bSmrg /^0/ { 383ff89ac2bSmrg s/^0 *\(.*\)$/\1/ 384ff89ac2bSmrg p 385ff89ac2bSmrg } 386ff89ac2bSmrg }' 387ff89ac2bSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 38895b296d0Smrg# Check for a 64-bit object if we didn't find anything. 389ff89ac2bSmrgif test -z "$aix_libpath"; then 390ff89ac2bSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 391ff89ac2bSmrgfi],[]) 39295b296d0Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 39395b296d0Smrg])# _LT_AC_SYS_LIBPATH_AIX 39495b296d0Smrg 39595b296d0Smrg 39695b296d0Smrg# _LT_AC_SHELL_INIT(ARG) 39795b296d0Smrg# ---------------------- 39895b296d0SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 39995b296d0Smrg[ifdef([AC_DIVERSION_NOTICE], 40095b296d0Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 40195b296d0Smrg [AC_DIVERT_PUSH(NOTICE)]) 40295b296d0Smrg$1 40395b296d0SmrgAC_DIVERT_POP 40495b296d0Smrg])# _LT_AC_SHELL_INIT 40595b296d0Smrg 40695b296d0Smrg 40795b296d0Smrg# _LT_AC_PROG_ECHO_BACKSLASH 40895b296d0Smrg# -------------------------- 40995b296d0Smrg# Add some code to the start of the generated configure script which 41095b296d0Smrg# will find an echo command which doesn't interpret backslashes. 41195b296d0SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 41295b296d0Smrg[_LT_AC_SHELL_INIT([ 41395b296d0Smrg# Check that we are running under the correct shell. 41495b296d0SmrgSHELL=${CONFIG_SHELL-/bin/sh} 41595b296d0Smrg 41695b296d0Smrgcase X$ECHO in 41795b296d0SmrgX*--fallback-echo) 41895b296d0Smrg # Remove one level of quotation (which was required for Make). 41995b296d0Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 42095b296d0Smrg ;; 42195b296d0Smrgesac 42295b296d0Smrg 42395b296d0Smrgecho=${ECHO-echo} 42495b296d0Smrgif test "X[$]1" = X--no-reexec; then 42595b296d0Smrg # Discard the --no-reexec flag, and continue. 42695b296d0Smrg shift 42795b296d0Smrgelif test "X[$]1" = X--fallback-echo; then 42895b296d0Smrg # Avoid inline document here, it may be left over 42995b296d0Smrg : 43095b296d0Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 43195b296d0Smrg # Yippee, $echo works! 43295b296d0Smrg : 43395b296d0Smrgelse 43495b296d0Smrg # Restart under the correct shell. 43595b296d0Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 43695b296d0Smrgfi 43795b296d0Smrg 43895b296d0Smrgif test "X[$]1" = X--fallback-echo; then 43995b296d0Smrg # used as fallback echo 44095b296d0Smrg shift 44195b296d0Smrg cat <<EOF 44295b296d0Smrg[$]* 44395b296d0SmrgEOF 44495b296d0Smrg exit 0 44595b296d0Smrgfi 44695b296d0Smrg 44795b296d0Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 44895b296d0Smrg# if CDPATH is set. 44995b296d0Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 45095b296d0Smrg 45195b296d0Smrgif test -z "$ECHO"; then 45295b296d0Smrgif test "X${echo_test_string+set}" != Xset; then 45395b296d0Smrg# find a string as large as possible, as long as the shell can cope with it 45495b296d0Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 45595b296d0Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 45695b296d0Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 45795b296d0Smrg echo_test_string=`eval $cmd` && 45895b296d0Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 45995b296d0Smrg then 46095b296d0Smrg break 46195b296d0Smrg fi 46295b296d0Smrg done 46395b296d0Smrgfi 46495b296d0Smrg 46595b296d0Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 46695b296d0Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 46795b296d0Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 46895b296d0Smrg : 46995b296d0Smrgelse 47095b296d0Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 47195b296d0Smrg # backslashes. This makes it impossible to quote backslashes using 47295b296d0Smrg # echo "$something" | sed 's/\\/\\\\/g' 47395b296d0Smrg # 47495b296d0Smrg # So, first we look for a working echo in the user's PATH. 47595b296d0Smrg 47695b296d0Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 47795b296d0Smrg for dir in $PATH /usr/ucb; do 47895b296d0Smrg IFS="$lt_save_ifs" 47995b296d0Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 48095b296d0Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 48195b296d0Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 48295b296d0Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 48395b296d0Smrg echo="$dir/echo" 48495b296d0Smrg break 48595b296d0Smrg fi 48695b296d0Smrg done 48795b296d0Smrg IFS="$lt_save_ifs" 48895b296d0Smrg 48995b296d0Smrg if test "X$echo" = Xecho; then 49095b296d0Smrg # We didn't find a better echo, so look for alternatives. 49195b296d0Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 49295b296d0Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 49395b296d0Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 49495b296d0Smrg # This shell has a builtin print -r that does the trick. 49595b296d0Smrg echo='print -r' 49695b296d0Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 49795b296d0Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 49895b296d0Smrg # If we have ksh, try running configure again with it. 49995b296d0Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 50095b296d0Smrg export ORIGINAL_CONFIG_SHELL 50195b296d0Smrg CONFIG_SHELL=/bin/ksh 50295b296d0Smrg export CONFIG_SHELL 50395b296d0Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 50495b296d0Smrg else 50595b296d0Smrg # Try using printf. 50695b296d0Smrg echo='printf %s\n' 50795b296d0Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 50895b296d0Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 50995b296d0Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 51095b296d0Smrg # Cool, printf works 51195b296d0Smrg : 51295b296d0Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 51395b296d0Smrg test "X$echo_testing_string" = 'X\t' && 51495b296d0Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 51595b296d0Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 51695b296d0Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 51795b296d0Smrg export CONFIG_SHELL 51895b296d0Smrg SHELL="$CONFIG_SHELL" 51995b296d0Smrg export SHELL 52095b296d0Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 52195b296d0Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 52295b296d0Smrg test "X$echo_testing_string" = 'X\t' && 52395b296d0Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 52495b296d0Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 52595b296d0Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 52695b296d0Smrg else 52795b296d0Smrg # maybe with a smaller string... 52895b296d0Smrg prev=: 52995b296d0Smrg 53095b296d0Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 53195b296d0Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 53295b296d0Smrg then 53395b296d0Smrg break 53495b296d0Smrg fi 53595b296d0Smrg prev="$cmd" 53695b296d0Smrg done 53795b296d0Smrg 53895b296d0Smrg if test "$prev" != 'sed 50q "[$]0"'; then 53995b296d0Smrg echo_test_string=`eval $prev` 54095b296d0Smrg export echo_test_string 54195b296d0Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 54295b296d0Smrg else 54395b296d0Smrg # Oops. We lost completely, so just stick with echo. 54495b296d0Smrg echo=echo 54595b296d0Smrg fi 54695b296d0Smrg fi 54795b296d0Smrg fi 54895b296d0Smrg fi 54995b296d0Smrgfi 55095b296d0Smrgfi 55195b296d0Smrg 55295b296d0Smrg# Copy echo and quote the copy suitably for passing to libtool from 55395b296d0Smrg# the Makefile, instead of quoting the original, which is used later. 55495b296d0SmrgECHO=$echo 55595b296d0Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 55695b296d0Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 55795b296d0Smrgfi 55895b296d0Smrg 55995b296d0SmrgAC_SUBST(ECHO) 56095b296d0Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 56195b296d0Smrg 56295b296d0Smrg 56395b296d0Smrg# _LT_AC_LOCK 56495b296d0Smrg# ----------- 56595b296d0SmrgAC_DEFUN([_LT_AC_LOCK], 56695b296d0Smrg[AC_ARG_ENABLE([libtool-lock], 56795b296d0Smrg [AC_HELP_STRING([--disable-libtool-lock], 56895b296d0Smrg [avoid locking (might break parallel builds)])]) 56995b296d0Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 57095b296d0Smrg 57195b296d0Smrg# Some flags need to be propagated to the compiler or linker for good 57295b296d0Smrg# libtool support. 57395b296d0Smrgcase $host in 57495b296d0Smrgia64-*-hpux*) 57595b296d0Smrg # Find out which ABI we are using. 57695b296d0Smrg echo 'int i;' > conftest.$ac_ext 57795b296d0Smrg if AC_TRY_EVAL(ac_compile); then 57895b296d0Smrg case `/usr/bin/file conftest.$ac_objext` in 57995b296d0Smrg *ELF-32*) 58095b296d0Smrg HPUX_IA64_MODE="32" 58195b296d0Smrg ;; 58295b296d0Smrg *ELF-64*) 58395b296d0Smrg HPUX_IA64_MODE="64" 58495b296d0Smrg ;; 58595b296d0Smrg esac 58695b296d0Smrg fi 58795b296d0Smrg rm -rf conftest* 58895b296d0Smrg ;; 58995b296d0Smrg*-*-irix6*) 59095b296d0Smrg # Find out which ABI we are using. 59195b296d0Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 59295b296d0Smrg if AC_TRY_EVAL(ac_compile); then 59395b296d0Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 59495b296d0Smrg case `/usr/bin/file conftest.$ac_objext` in 59595b296d0Smrg *32-bit*) 59695b296d0Smrg LD="${LD-ld} -melf32bsmip" 59795b296d0Smrg ;; 59895b296d0Smrg *N32*) 59995b296d0Smrg LD="${LD-ld} -melf32bmipn32" 60095b296d0Smrg ;; 60195b296d0Smrg *64-bit*) 60295b296d0Smrg LD="${LD-ld} -melf64bmip" 60395b296d0Smrg ;; 60495b296d0Smrg esac 60595b296d0Smrg else 60695b296d0Smrg case `/usr/bin/file conftest.$ac_objext` in 60795b296d0Smrg *32-bit*) 60895b296d0Smrg LD="${LD-ld} -32" 60995b296d0Smrg ;; 61095b296d0Smrg *N32*) 61195b296d0Smrg LD="${LD-ld} -n32" 61295b296d0Smrg ;; 61395b296d0Smrg *64-bit*) 61495b296d0Smrg LD="${LD-ld} -64" 61595b296d0Smrg ;; 61695b296d0Smrg esac 61795b296d0Smrg fi 61895b296d0Smrg fi 61995b296d0Smrg rm -rf conftest* 62095b296d0Smrg ;; 62195b296d0Smrg 622ff89ac2bSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 623ff89ac2bSmrgs390*-*linux*|sparc*-*linux*) 62495b296d0Smrg # Find out which ABI we are using. 62595b296d0Smrg echo 'int i;' > conftest.$ac_ext 62695b296d0Smrg if AC_TRY_EVAL(ac_compile); then 62795b296d0Smrg case `/usr/bin/file conftest.o` in 62895b296d0Smrg *32-bit*) 62995b296d0Smrg case $host in 630ff89ac2bSmrg x86_64-*kfreebsd*-gnu) 631ff89ac2bSmrg LD="${LD-ld} -m elf_i386_fbsd" 632ff89ac2bSmrg ;; 63395b296d0Smrg x86_64-*linux*) 63495b296d0Smrg LD="${LD-ld} -m elf_i386" 63595b296d0Smrg ;; 63695b296d0Smrg ppc64-*linux*|powerpc64-*linux*) 63795b296d0Smrg LD="${LD-ld} -m elf32ppclinux" 63895b296d0Smrg ;; 63995b296d0Smrg s390x-*linux*) 64095b296d0Smrg LD="${LD-ld} -m elf_s390" 64195b296d0Smrg ;; 64295b296d0Smrg sparc64-*linux*) 64395b296d0Smrg LD="${LD-ld} -m elf32_sparc" 64495b296d0Smrg ;; 64595b296d0Smrg esac 64695b296d0Smrg ;; 64795b296d0Smrg *64-bit*) 648ff89ac2bSmrg libsuff=64 64995b296d0Smrg case $host in 650ff89ac2bSmrg x86_64-*kfreebsd*-gnu) 651ff89ac2bSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 652ff89ac2bSmrg ;; 65395b296d0Smrg x86_64-*linux*) 65495b296d0Smrg LD="${LD-ld} -m elf_x86_64" 65595b296d0Smrg ;; 65695b296d0Smrg ppc*-*linux*|powerpc*-*linux*) 65795b296d0Smrg LD="${LD-ld} -m elf64ppc" 65895b296d0Smrg ;; 65995b296d0Smrg s390*-*linux*) 66095b296d0Smrg LD="${LD-ld} -m elf64_s390" 66195b296d0Smrg ;; 66295b296d0Smrg sparc*-*linux*) 66395b296d0Smrg LD="${LD-ld} -m elf64_sparc" 66495b296d0Smrg ;; 66595b296d0Smrg esac 66695b296d0Smrg ;; 66795b296d0Smrg esac 66895b296d0Smrg fi 66995b296d0Smrg rm -rf conftest* 67095b296d0Smrg ;; 67195b296d0Smrg 67295b296d0Smrg*-*-sco3.2v5*) 67395b296d0Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 67495b296d0Smrg SAVE_CFLAGS="$CFLAGS" 67595b296d0Smrg CFLAGS="$CFLAGS -belf" 67695b296d0Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 67795b296d0Smrg [AC_LANG_PUSH(C) 67895b296d0Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 67995b296d0Smrg AC_LANG_POP]) 68095b296d0Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 68195b296d0Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 68295b296d0Smrg CFLAGS="$SAVE_CFLAGS" 68395b296d0Smrg fi 68495b296d0Smrg ;; 68595b296d0Smrgsparc*-*solaris*) 68695b296d0Smrg # Find out which ABI we are using. 68795b296d0Smrg echo 'int i;' > conftest.$ac_ext 68895b296d0Smrg if AC_TRY_EVAL(ac_compile); then 68995b296d0Smrg case `/usr/bin/file conftest.o` in 69095b296d0Smrg *64-bit*) 69195b296d0Smrg case $lt_cv_prog_gnu_ld in 69295b296d0Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 693ff89ac2bSmrg *) 694ff89ac2bSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 695ff89ac2bSmrg LD="${LD-ld} -64" 696ff89ac2bSmrg fi 697ff89ac2bSmrg ;; 69895b296d0Smrg esac 69995b296d0Smrg ;; 70095b296d0Smrg esac 70195b296d0Smrg fi 70295b296d0Smrg rm -rf conftest* 70395b296d0Smrg ;; 70495b296d0Smrg 70595b296d0SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 70695b296d0Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 70795b296d0Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 70895b296d0Smrg AC_CHECK_TOOL(AS, as, false) 70995b296d0Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 71095b296d0Smrg ;; 71195b296d0Smrg ]) 71295b296d0Smrgesac 71395b296d0Smrg 71495b296d0Smrgneed_locks="$enable_libtool_lock" 71595b296d0Smrg 71695b296d0Smrg])# _LT_AC_LOCK 71795b296d0Smrg 71895b296d0Smrg 71995b296d0Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 72095b296d0Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 72195b296d0Smrg# ---------------------------------------------------------------- 72295b296d0Smrg# Check whether the given compiler option works 72395b296d0SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 72495b296d0Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 72595b296d0SmrgAC_CACHE_CHECK([$1], [$2], 72695b296d0Smrg [$2=no 72795b296d0Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 728ff89ac2bSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 72995b296d0Smrg lt_compiler_flag="$3" 73095b296d0Smrg # Insert the option either (1) after the last *FLAGS variable, or 73195b296d0Smrg # (2) before a word containing "conftest.", or (3) at the end. 73295b296d0Smrg # Note that $ac_compile itself does not contain backslashes and begins 73395b296d0Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 73495b296d0Smrg # The option is referenced via a variable to avoid confusing sed. 73595b296d0Smrg lt_compile=`echo "$ac_compile" | $SED \ 73695b296d0Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 73795b296d0Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 73895b296d0Smrg -e 's:$: $lt_compiler_flag:'` 73995b296d0Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 74095b296d0Smrg (eval "$lt_compile" 2>conftest.err) 74195b296d0Smrg ac_status=$? 74295b296d0Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 74395b296d0Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 74495b296d0Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 74595b296d0Smrg # The compiler can only warn and ignore the option if not recognized 74695b296d0Smrg # So say no if there are warnings other than the usual output. 74795b296d0Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 74895b296d0Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 74995b296d0Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 75095b296d0Smrg $2=yes 75195b296d0Smrg fi 75295b296d0Smrg fi 75395b296d0Smrg $rm conftest* 75495b296d0Smrg]) 75595b296d0Smrg 75695b296d0Smrgif test x"[$]$2" = xyes; then 75795b296d0Smrg ifelse([$5], , :, [$5]) 75895b296d0Smrgelse 75995b296d0Smrg ifelse([$6], , :, [$6]) 76095b296d0Smrgfi 76195b296d0Smrg])# AC_LIBTOOL_COMPILER_OPTION 76295b296d0Smrg 76395b296d0Smrg 76495b296d0Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 76595b296d0Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 76695b296d0Smrg# ------------------------------------------------------------ 76795b296d0Smrg# Check whether the given compiler option works 76895b296d0SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 769ff89ac2bSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 770ff89ac2bSmrgAC_CACHE_CHECK([$1], [$2], 77195b296d0Smrg [$2=no 77295b296d0Smrg save_LDFLAGS="$LDFLAGS" 77395b296d0Smrg LDFLAGS="$LDFLAGS $3" 774ff89ac2bSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 77595b296d0Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 77695b296d0Smrg # The linker can only warn and ignore the option if not recognized 77795b296d0Smrg # So say no if there are warnings 77895b296d0Smrg if test -s conftest.err; then 77995b296d0Smrg # Append any errors to the config.log. 78095b296d0Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 78195b296d0Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 78295b296d0Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 78395b296d0Smrg if diff conftest.exp conftest.er2 >/dev/null; then 78495b296d0Smrg $2=yes 78595b296d0Smrg fi 78695b296d0Smrg else 78795b296d0Smrg $2=yes 78895b296d0Smrg fi 78995b296d0Smrg fi 790ff89ac2bSmrg $rm -r conftest* 79195b296d0Smrg LDFLAGS="$save_LDFLAGS" 79295b296d0Smrg]) 79395b296d0Smrg 79495b296d0Smrgif test x"[$]$2" = xyes; then 79595b296d0Smrg ifelse([$4], , :, [$4]) 79695b296d0Smrgelse 79795b296d0Smrg ifelse([$5], , :, [$5]) 79895b296d0Smrgfi 79995b296d0Smrg])# AC_LIBTOOL_LINKER_OPTION 80095b296d0Smrg 80195b296d0Smrg 80295b296d0Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 80395b296d0Smrg# -------------------------- 80495b296d0SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 80595b296d0Smrg[# find the maximum length of command line arguments 80695b296d0SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 80795b296d0SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 80895b296d0Smrg i=0 80995b296d0Smrg teststring="ABCD" 81095b296d0Smrg 81195b296d0Smrg case $build_os in 81295b296d0Smrg msdosdjgpp*) 81395b296d0Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 81495b296d0Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 81595b296d0Smrg # during glob expansion). Even if it were fixed, the result of this 81695b296d0Smrg # check would be larger than it should be. 81795b296d0Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 81895b296d0Smrg ;; 81995b296d0Smrg 82095b296d0Smrg gnu*) 82195b296d0Smrg # Under GNU Hurd, this test is not required because there is 82295b296d0Smrg # no limit to the length of command line arguments. 82395b296d0Smrg # Libtool will interpret -1 as no limit whatsoever 82495b296d0Smrg lt_cv_sys_max_cmd_len=-1; 82595b296d0Smrg ;; 82695b296d0Smrg 82795b296d0Smrg cygwin* | mingw*) 82895b296d0Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 82995b296d0Smrg # about 5 minutes as the teststring grows exponentially. 83095b296d0Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 83195b296d0Smrg # you end up with a "frozen" computer, even though with patience 83295b296d0Smrg # the test eventually succeeds (with a max line length of 256k). 83395b296d0Smrg # Instead, let's just punt: use the minimum linelength reported by 83495b296d0Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 83595b296d0Smrg lt_cv_sys_max_cmd_len=8192; 83695b296d0Smrg ;; 83795b296d0Smrg 83895b296d0Smrg amigaos*) 83995b296d0Smrg # On AmigaOS with pdksh, this test takes hours, literally. 84095b296d0Smrg # So we just punt and use a minimum line length of 8192. 84195b296d0Smrg lt_cv_sys_max_cmd_len=8192; 84295b296d0Smrg ;; 84395b296d0Smrg 84495b296d0Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 84595b296d0Smrg # This has been around since 386BSD, at least. Likely further. 84695b296d0Smrg if test -x /sbin/sysctl; then 84795b296d0Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 84895b296d0Smrg elif test -x /usr/sbin/sysctl; then 84995b296d0Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 85095b296d0Smrg else 85195b296d0Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 85295b296d0Smrg fi 85395b296d0Smrg # And add a safety zone 85495b296d0Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 85595b296d0Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 85695b296d0Smrg ;; 85795b296d0Smrg 85895b296d0Smrg interix*) 85995b296d0Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 86095b296d0Smrg lt_cv_sys_max_cmd_len=196608 86195b296d0Smrg ;; 86295b296d0Smrg 86395b296d0Smrg osf*) 86495b296d0Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 86595b296d0Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 86695b296d0Smrg # nice to cause kernel panics so lets avoid the loop below. 86795b296d0Smrg # First set a reasonable default. 86895b296d0Smrg lt_cv_sys_max_cmd_len=16384 86995b296d0Smrg # 87095b296d0Smrg if test -x /sbin/sysconfig; then 87195b296d0Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 87295b296d0Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 87395b296d0Smrg esac 87495b296d0Smrg fi 87595b296d0Smrg ;; 87695b296d0Smrg sco3.2v5*) 87795b296d0Smrg lt_cv_sys_max_cmd_len=102400 87895b296d0Smrg ;; 87995b296d0Smrg sysv5* | sco5v6* | sysv4.2uw2*) 88095b296d0Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 88195b296d0Smrg if test -n "$kargmax"; then 88295b296d0Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 88395b296d0Smrg else 88495b296d0Smrg lt_cv_sys_max_cmd_len=32768 88595b296d0Smrg fi 88695b296d0Smrg ;; 88795b296d0Smrg *) 888ff89ac2bSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 889ff89ac2bSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 890ff89ac2bSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 891ff89ac2bSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 892ff89ac2bSmrg else 893ff89ac2bSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 894ff89ac2bSmrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 89595b296d0Smrg = "XX$teststring") >/dev/null 2>&1 && 896ff89ac2bSmrg new_result=`expr "X$teststring" : ".*" 2>&1` && 897ff89ac2bSmrg lt_cv_sys_max_cmd_len=$new_result && 898ff89ac2bSmrg test $i != 17 # 1/2 MB should be enough 899ff89ac2bSmrg do 900ff89ac2bSmrg i=`expr $i + 1` 901ff89ac2bSmrg teststring=$teststring$teststring 902ff89ac2bSmrg done 903ff89ac2bSmrg teststring= 904ff89ac2bSmrg # Add a significant safety factor because C++ compilers can tack on massive 905ff89ac2bSmrg # amounts of additional arguments before passing them to the linker. 906ff89ac2bSmrg # It appears as though 1/2 is a usable value. 907ff89ac2bSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 908ff89ac2bSmrg fi 90995b296d0Smrg ;; 91095b296d0Smrg esac 91195b296d0Smrg]) 91295b296d0Smrgif test -n $lt_cv_sys_max_cmd_len ; then 91395b296d0Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 91495b296d0Smrgelse 91595b296d0Smrg AC_MSG_RESULT(none) 91695b296d0Smrgfi 91795b296d0Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 91895b296d0Smrg 91995b296d0Smrg 92095b296d0Smrg# _LT_AC_CHECK_DLFCN 92195b296d0Smrg# ------------------ 92295b296d0SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 92395b296d0Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 92495b296d0Smrg])# _LT_AC_CHECK_DLFCN 92595b296d0Smrg 92695b296d0Smrg 92795b296d0Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 92895b296d0Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 92995b296d0Smrg# --------------------------------------------------------------------- 93095b296d0SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 93195b296d0Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 93295b296d0Smrgif test "$cross_compiling" = yes; then : 93395b296d0Smrg [$4] 93495b296d0Smrgelse 93595b296d0Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 93695b296d0Smrg lt_status=$lt_dlunknown 93795b296d0Smrg cat > conftest.$ac_ext <<EOF 93895b296d0Smrg[#line __oline__ "configure" 93995b296d0Smrg#include "confdefs.h" 94095b296d0Smrg 94195b296d0Smrg#if HAVE_DLFCN_H 94295b296d0Smrg#include <dlfcn.h> 94395b296d0Smrg#endif 94495b296d0Smrg 94595b296d0Smrg#include <stdio.h> 94695b296d0Smrg 94795b296d0Smrg#ifdef RTLD_GLOBAL 94895b296d0Smrg# define LT_DLGLOBAL RTLD_GLOBAL 94995b296d0Smrg#else 95095b296d0Smrg# ifdef DL_GLOBAL 95195b296d0Smrg# define LT_DLGLOBAL DL_GLOBAL 95295b296d0Smrg# else 95395b296d0Smrg# define LT_DLGLOBAL 0 95495b296d0Smrg# endif 95595b296d0Smrg#endif 95695b296d0Smrg 95795b296d0Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 95895b296d0Smrg find out it does not work in some platform. */ 95995b296d0Smrg#ifndef LT_DLLAZY_OR_NOW 96095b296d0Smrg# ifdef RTLD_LAZY 96195b296d0Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 96295b296d0Smrg# else 96395b296d0Smrg# ifdef DL_LAZY 96495b296d0Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 96595b296d0Smrg# else 96695b296d0Smrg# ifdef RTLD_NOW 96795b296d0Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 96895b296d0Smrg# else 96995b296d0Smrg# ifdef DL_NOW 97095b296d0Smrg# define LT_DLLAZY_OR_NOW DL_NOW 97195b296d0Smrg# else 97295b296d0Smrg# define LT_DLLAZY_OR_NOW 0 97395b296d0Smrg# endif 97495b296d0Smrg# endif 97595b296d0Smrg# endif 97695b296d0Smrg# endif 97795b296d0Smrg#endif 97895b296d0Smrg 97995b296d0Smrg#ifdef __cplusplus 98095b296d0Smrgextern "C" void exit (int); 98195b296d0Smrg#endif 98295b296d0Smrg 98395b296d0Smrgvoid fnord() { int i=42;} 98495b296d0Smrgint main () 98595b296d0Smrg{ 98695b296d0Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 98795b296d0Smrg int status = $lt_dlunknown; 98895b296d0Smrg 98995b296d0Smrg if (self) 99095b296d0Smrg { 99195b296d0Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 99295b296d0Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 99395b296d0Smrg /* dlclose (self); */ 99495b296d0Smrg } 99595b296d0Smrg else 99695b296d0Smrg puts (dlerror ()); 99795b296d0Smrg 99895b296d0Smrg exit (status); 99995b296d0Smrg}] 100095b296d0SmrgEOF 100195b296d0Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 100295b296d0Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 100395b296d0Smrg lt_status=$? 100495b296d0Smrg case x$lt_status in 100595b296d0Smrg x$lt_dlno_uscore) $1 ;; 100695b296d0Smrg x$lt_dlneed_uscore) $2 ;; 100795b296d0Smrg x$lt_dlunknown|x*) $3 ;; 100895b296d0Smrg esac 100995b296d0Smrg else : 101095b296d0Smrg # compilation failed 101195b296d0Smrg $3 101295b296d0Smrg fi 101395b296d0Smrgfi 101495b296d0Smrgrm -fr conftest* 101595b296d0Smrg])# _LT_AC_TRY_DLOPEN_SELF 101695b296d0Smrg 101795b296d0Smrg 101895b296d0Smrg# AC_LIBTOOL_DLOPEN_SELF 101995b296d0Smrg# ---------------------- 102095b296d0SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 102195b296d0Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 102295b296d0Smrgif test "x$enable_dlopen" != xyes; then 102395b296d0Smrg enable_dlopen=unknown 102495b296d0Smrg enable_dlopen_self=unknown 102595b296d0Smrg enable_dlopen_self_static=unknown 102695b296d0Smrgelse 102795b296d0Smrg lt_cv_dlopen=no 102895b296d0Smrg lt_cv_dlopen_libs= 102995b296d0Smrg 103095b296d0Smrg case $host_os in 103195b296d0Smrg beos*) 103295b296d0Smrg lt_cv_dlopen="load_add_on" 103395b296d0Smrg lt_cv_dlopen_libs= 103495b296d0Smrg lt_cv_dlopen_self=yes 103595b296d0Smrg ;; 103695b296d0Smrg 103795b296d0Smrg mingw* | pw32*) 103895b296d0Smrg lt_cv_dlopen="LoadLibrary" 103995b296d0Smrg lt_cv_dlopen_libs= 104095b296d0Smrg ;; 104195b296d0Smrg 104295b296d0Smrg cygwin*) 104395b296d0Smrg lt_cv_dlopen="dlopen" 104495b296d0Smrg lt_cv_dlopen_libs= 104595b296d0Smrg ;; 104695b296d0Smrg 104795b296d0Smrg darwin*) 104895b296d0Smrg # if libdl is installed we need to link against it 104995b296d0Smrg AC_CHECK_LIB([dl], [dlopen], 105095b296d0Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 105195b296d0Smrg lt_cv_dlopen="dyld" 105295b296d0Smrg lt_cv_dlopen_libs= 105395b296d0Smrg lt_cv_dlopen_self=yes 105495b296d0Smrg ]) 105595b296d0Smrg ;; 105695b296d0Smrg 105795b296d0Smrg *) 105895b296d0Smrg AC_CHECK_FUNC([shl_load], 105995b296d0Smrg [lt_cv_dlopen="shl_load"], 106095b296d0Smrg [AC_CHECK_LIB([dld], [shl_load], 1061ff89ac2bSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 106295b296d0Smrg [AC_CHECK_FUNC([dlopen], 106395b296d0Smrg [lt_cv_dlopen="dlopen"], 106495b296d0Smrg [AC_CHECK_LIB([dl], [dlopen], 106595b296d0Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 106695b296d0Smrg [AC_CHECK_LIB([svld], [dlopen], 106795b296d0Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 106895b296d0Smrg [AC_CHECK_LIB([dld], [dld_link], 1069ff89ac2bSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 107095b296d0Smrg ]) 107195b296d0Smrg ]) 107295b296d0Smrg ]) 107395b296d0Smrg ]) 107495b296d0Smrg ]) 107595b296d0Smrg ;; 107695b296d0Smrg esac 107795b296d0Smrg 107895b296d0Smrg if test "x$lt_cv_dlopen" != xno; then 107995b296d0Smrg enable_dlopen=yes 108095b296d0Smrg else 108195b296d0Smrg enable_dlopen=no 108295b296d0Smrg fi 108395b296d0Smrg 108495b296d0Smrg case $lt_cv_dlopen in 108595b296d0Smrg dlopen) 108695b296d0Smrg save_CPPFLAGS="$CPPFLAGS" 108795b296d0Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 108895b296d0Smrg 108995b296d0Smrg save_LDFLAGS="$LDFLAGS" 109095b296d0Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 109195b296d0Smrg 109295b296d0Smrg save_LIBS="$LIBS" 109395b296d0Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 109495b296d0Smrg 109595b296d0Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 109695b296d0Smrg lt_cv_dlopen_self, [dnl 109795b296d0Smrg _LT_AC_TRY_DLOPEN_SELF( 109895b296d0Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 109995b296d0Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 110095b296d0Smrg ]) 110195b296d0Smrg 110295b296d0Smrg if test "x$lt_cv_dlopen_self" = xyes; then 110395b296d0Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 110495b296d0Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 110595b296d0Smrg lt_cv_dlopen_self_static, [dnl 110695b296d0Smrg _LT_AC_TRY_DLOPEN_SELF( 110795b296d0Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 110895b296d0Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 110995b296d0Smrg ]) 111095b296d0Smrg fi 111195b296d0Smrg 111295b296d0Smrg CPPFLAGS="$save_CPPFLAGS" 111395b296d0Smrg LDFLAGS="$save_LDFLAGS" 111495b296d0Smrg LIBS="$save_LIBS" 111595b296d0Smrg ;; 111695b296d0Smrg esac 111795b296d0Smrg 111895b296d0Smrg case $lt_cv_dlopen_self in 111995b296d0Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 112095b296d0Smrg *) enable_dlopen_self=unknown ;; 112195b296d0Smrg esac 112295b296d0Smrg 112395b296d0Smrg case $lt_cv_dlopen_self_static in 112495b296d0Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 112595b296d0Smrg *) enable_dlopen_self_static=unknown ;; 112695b296d0Smrg esac 112795b296d0Smrgfi 112895b296d0Smrg])# AC_LIBTOOL_DLOPEN_SELF 112995b296d0Smrg 113095b296d0Smrg 113195b296d0Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 113295b296d0Smrg# --------------------------------- 113395b296d0Smrg# Check to see if options -c and -o are simultaneously supported by compiler 113495b296d0SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 1135ff89ac2bSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1136ff89ac2bSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 113795b296d0SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 113895b296d0Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 113995b296d0Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 114095b296d0Smrg $rm -r conftest 2>/dev/null 114195b296d0Smrg mkdir conftest 114295b296d0Smrg cd conftest 114395b296d0Smrg mkdir out 1144ff89ac2bSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 114595b296d0Smrg 114695b296d0Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 114795b296d0Smrg # Insert the option either (1) after the last *FLAGS variable, or 114895b296d0Smrg # (2) before a word containing "conftest.", or (3) at the end. 114995b296d0Smrg # Note that $ac_compile itself does not contain backslashes and begins 115095b296d0Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 115195b296d0Smrg lt_compile=`echo "$ac_compile" | $SED \ 115295b296d0Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 115395b296d0Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 115495b296d0Smrg -e 's:$: $lt_compiler_flag:'` 115595b296d0Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 115695b296d0Smrg (eval "$lt_compile" 2>out/conftest.err) 115795b296d0Smrg ac_status=$? 115895b296d0Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 115995b296d0Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 116095b296d0Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 116195b296d0Smrg then 116295b296d0Smrg # The compiler can only warn and ignore the option if not recognized 116395b296d0Smrg # So say no if there are warnings 116495b296d0Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 116595b296d0Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 116695b296d0Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 116795b296d0Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 116895b296d0Smrg fi 116995b296d0Smrg fi 117095b296d0Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 117195b296d0Smrg $rm conftest* 117295b296d0Smrg # SGI C++ compiler will create directory out/ii_files/ for 117395b296d0Smrg # template instantiation 117495b296d0Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 117595b296d0Smrg $rm out/* && rmdir out 117695b296d0Smrg cd .. 117795b296d0Smrg rmdir conftest 117895b296d0Smrg $rm conftest* 117995b296d0Smrg]) 118095b296d0Smrg])# AC_LIBTOOL_PROG_CC_C_O 118195b296d0Smrg 118295b296d0Smrg 118395b296d0Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 118495b296d0Smrg# ----------------------------------------- 118595b296d0Smrg# Check to see if we can do hard links to lock some files if needed 118695b296d0SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 118795b296d0Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 118895b296d0Smrg 118995b296d0Smrghard_links="nottested" 119095b296d0Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 119195b296d0Smrg # do not overwrite the value of need_locks provided by the user 119295b296d0Smrg AC_MSG_CHECKING([if we can lock with hard links]) 119395b296d0Smrg hard_links=yes 119495b296d0Smrg $rm conftest* 119595b296d0Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 119695b296d0Smrg touch conftest.a 119795b296d0Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 119895b296d0Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 119995b296d0Smrg AC_MSG_RESULT([$hard_links]) 120095b296d0Smrg if test "$hard_links" = no; then 120195b296d0Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 120295b296d0Smrg need_locks=warn 120395b296d0Smrg fi 120495b296d0Smrgelse 120595b296d0Smrg need_locks=no 120695b296d0Smrgfi 120795b296d0Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 120895b296d0Smrg 120995b296d0Smrg 121095b296d0Smrg# AC_LIBTOOL_OBJDIR 121195b296d0Smrg# ----------------- 121295b296d0SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 121395b296d0Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 121495b296d0Smrg[rm -f .libs 2>/dev/null 121595b296d0Smrgmkdir .libs 2>/dev/null 121695b296d0Smrgif test -d .libs; then 121795b296d0Smrg lt_cv_objdir=.libs 121895b296d0Smrgelse 121995b296d0Smrg # MS-DOS does not allow filenames that begin with a dot. 122095b296d0Smrg lt_cv_objdir=_libs 122195b296d0Smrgfi 122295b296d0Smrgrmdir .libs 2>/dev/null]) 122395b296d0Smrgobjdir=$lt_cv_objdir 122495b296d0Smrg])# AC_LIBTOOL_OBJDIR 122595b296d0Smrg 122695b296d0Smrg 122795b296d0Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 122895b296d0Smrg# ---------------------------------------------- 122995b296d0Smrg# Check hardcoding attributes. 123095b296d0SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 123195b296d0Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 123295b296d0Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 123395b296d0Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 123495b296d0Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 123595b296d0Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 123695b296d0Smrg 123795b296d0Smrg # We can hardcode non-existant directories. 123895b296d0Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 123995b296d0Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 124095b296d0Smrg # have to relink, otherwise we might link with an installed library 124195b296d0Smrg # when we should be linking with a yet-to-be-installed one 124295b296d0Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 124395b296d0Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 124495b296d0Smrg # Linking always hardcodes the temporary library directory. 124595b296d0Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 124695b296d0Smrg else 124795b296d0Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 124895b296d0Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 124995b296d0Smrg fi 125095b296d0Smrgelse 125195b296d0Smrg # We cannot hardcode anything, or else we can only hardcode existing 125295b296d0Smrg # directories. 125395b296d0Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 125495b296d0Smrgfi 125595b296d0SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 125695b296d0Smrg 125795b296d0Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 125895b296d0Smrg # Fast installation is not supported 125995b296d0Smrg enable_fast_install=no 126095b296d0Smrgelif test "$shlibpath_overrides_runpath" = yes || 126195b296d0Smrg test "$enable_shared" = no; then 126295b296d0Smrg # Fast installation is not necessary 126395b296d0Smrg enable_fast_install=needless 126495b296d0Smrgfi 126595b296d0Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 126695b296d0Smrg 126795b296d0Smrg 126895b296d0Smrg# AC_LIBTOOL_SYS_LIB_STRIP 126995b296d0Smrg# ------------------------ 127095b296d0SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 127195b296d0Smrg[striplib= 127295b296d0Smrgold_striplib= 127395b296d0SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 127495b296d0Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 127595b296d0Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 127695b296d0Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 127795b296d0Smrg AC_MSG_RESULT([yes]) 127895b296d0Smrgelse 127995b296d0Smrg# FIXME - insert some real tests, host_os isn't really good enough 128095b296d0Smrg case $host_os in 128195b296d0Smrg darwin*) 128295b296d0Smrg if test -n "$STRIP" ; then 128395b296d0Smrg striplib="$STRIP -x" 1284ff89ac2bSmrg old_striplib="$STRIP -S" 128595b296d0Smrg AC_MSG_RESULT([yes]) 128695b296d0Smrg else 128795b296d0Smrg AC_MSG_RESULT([no]) 128895b296d0Smrgfi 128995b296d0Smrg ;; 129095b296d0Smrg *) 129195b296d0Smrg AC_MSG_RESULT([no]) 129295b296d0Smrg ;; 129395b296d0Smrg esac 129495b296d0Smrgfi 129595b296d0Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 129695b296d0Smrg 129795b296d0Smrg 129895b296d0Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 129995b296d0Smrg# ----------------------------- 130095b296d0Smrg# PORTME Fill in your ld.so characteristics 130195b296d0SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1302ff89ac2bSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1303ff89ac2bSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 130495b296d0Smrglibrary_names_spec= 130595b296d0Smrglibname_spec='lib$name' 130695b296d0Smrgsoname_spec= 130795b296d0Smrgshrext_cmds=".so" 130895b296d0Smrgpostinstall_cmds= 130995b296d0Smrgpostuninstall_cmds= 131095b296d0Smrgfinish_cmds= 131195b296d0Smrgfinish_eval= 131295b296d0Smrgshlibpath_var= 131395b296d0Smrgshlibpath_overrides_runpath=unknown 131495b296d0Smrgversion_type=none 131595b296d0Smrgdynamic_linker="$host_os ld.so" 131695b296d0Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 1317ff89ac2bSmrgm4_if($1,[],[ 131895b296d0Smrgif test "$GCC" = yes; then 1319ff89ac2bSmrg case $host_os in 1320ff89ac2bSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 1321ff89ac2bSmrg *) lt_awk_arg="/^libraries:/" ;; 1322ff89ac2bSmrg esac 1323ff89ac2bSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1324ff89ac2bSmrg if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 132595b296d0Smrg # if the path contains ";" then we assume it to be the separator 132695b296d0Smrg # otherwise default to the standard path separator (i.e. ":") - it is 132795b296d0Smrg # assumed that no part of a normal pathname contains ";" but that should 132895b296d0Smrg # okay in the real world where ";" in dirpaths is itself problematic. 1329ff89ac2bSmrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 133095b296d0Smrg else 1331ff89ac2bSmrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 133295b296d0Smrg fi 1333ff89ac2bSmrg # Ok, now we have the path, separated by spaces, we can step through it 1334ff89ac2bSmrg # and add multilib dir if necessary. 1335ff89ac2bSmrg lt_tmp_lt_search_path_spec= 1336ff89ac2bSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 1337ff89ac2bSmrg for lt_sys_path in $lt_search_path_spec; do 1338ff89ac2bSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 1339ff89ac2bSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 1340ff89ac2bSmrg else 1341ff89ac2bSmrg test -d "$lt_sys_path" && \ 1342ff89ac2bSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 1343ff89ac2bSmrg fi 1344ff89ac2bSmrg done 1345ff89ac2bSmrg lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 1346ff89ac2bSmrgBEGIN {RS=" "; FS="/|\n";} { 1347ff89ac2bSmrg lt_foo=""; 1348ff89ac2bSmrg lt_count=0; 1349ff89ac2bSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 1350ff89ac2bSmrg if ($lt_i != "" && $lt_i != ".") { 1351ff89ac2bSmrg if ($lt_i == "..") { 1352ff89ac2bSmrg lt_count++; 1353ff89ac2bSmrg } else { 1354ff89ac2bSmrg if (lt_count == 0) { 1355ff89ac2bSmrg lt_foo="/" $lt_i lt_foo; 1356ff89ac2bSmrg } else { 1357ff89ac2bSmrg lt_count--; 1358ff89ac2bSmrg } 1359ff89ac2bSmrg } 1360ff89ac2bSmrg } 1361ff89ac2bSmrg } 1362ff89ac2bSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 1363ff89ac2bSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 1364ff89ac2bSmrg}'` 1365ff89ac2bSmrg sys_lib_search_path_spec=`echo $lt_search_path_spec` 136695b296d0Smrgelse 136795b296d0Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 1368ff89ac2bSmrgfi]) 136995b296d0Smrgneed_lib_prefix=unknown 137095b296d0Smrghardcode_into_libs=no 137195b296d0Smrg 137295b296d0Smrg# when you set need_version to no, make sure it does not cause -set_version 137395b296d0Smrg# flags to be left without arguments 137495b296d0Smrgneed_version=unknown 137595b296d0Smrg 137695b296d0Smrgcase $host_os in 137795b296d0Smrgaix3*) 137895b296d0Smrg version_type=linux 137995b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 138095b296d0Smrg shlibpath_var=LIBPATH 138195b296d0Smrg 138295b296d0Smrg # AIX 3 has no versioning support, so we append a major version to the name. 138395b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 138495b296d0Smrg ;; 138595b296d0Smrg 1386ff89ac2bSmrgaix[[4-9]]*) 138795b296d0Smrg version_type=linux 138895b296d0Smrg need_lib_prefix=no 138995b296d0Smrg need_version=no 139095b296d0Smrg hardcode_into_libs=yes 139195b296d0Smrg if test "$host_cpu" = ia64; then 139295b296d0Smrg # AIX 5 supports IA64 139395b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 139495b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 139595b296d0Smrg else 139695b296d0Smrg # With GCC up to 2.95.x, collect2 would create an import file 139795b296d0Smrg # for dependence libraries. The import file would start with 139895b296d0Smrg # the line `#! .'. This would cause the generated library to 139995b296d0Smrg # depend on `.', always an invalid library. This was fixed in 140095b296d0Smrg # development snapshots of GCC prior to 3.0. 140195b296d0Smrg case $host_os in 140295b296d0Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 140395b296d0Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 140495b296d0Smrg echo ' yes ' 140595b296d0Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 140695b296d0Smrg : 140795b296d0Smrg else 140895b296d0Smrg can_build_shared=no 140995b296d0Smrg fi 141095b296d0Smrg ;; 141195b296d0Smrg esac 141295b296d0Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 141395b296d0Smrg # soname into executable. Probably we can add versioning support to 141495b296d0Smrg # collect2, so additional links can be useful in future. 141595b296d0Smrg if test "$aix_use_runtimelinking" = yes; then 141695b296d0Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 141795b296d0Smrg # instead of lib<name>.a to let people know that these are not 141895b296d0Smrg # typical AIX shared libraries. 141995b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 142095b296d0Smrg else 142195b296d0Smrg # We preserve .a as extension for shared libraries through AIX4.2 142295b296d0Smrg # and later when we are not doing run time linking. 142395b296d0Smrg library_names_spec='${libname}${release}.a $libname.a' 142495b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 142595b296d0Smrg fi 142695b296d0Smrg shlibpath_var=LIBPATH 142795b296d0Smrg fi 142895b296d0Smrg ;; 142995b296d0Smrg 143095b296d0Smrgamigaos*) 143195b296d0Smrg library_names_spec='$libname.ixlibrary $libname.a' 143295b296d0Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 143395b296d0Smrg 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' 143495b296d0Smrg ;; 143595b296d0Smrg 143695b296d0Smrgbeos*) 143795b296d0Smrg library_names_spec='${libname}${shared_ext}' 143895b296d0Smrg dynamic_linker="$host_os ld.so" 143995b296d0Smrg shlibpath_var=LIBRARY_PATH 144095b296d0Smrg ;; 144195b296d0Smrg 144295b296d0Smrgbsdi[[45]]*) 144395b296d0Smrg version_type=linux 144495b296d0Smrg need_version=no 144595b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 144695b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 144795b296d0Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 144895b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 144995b296d0Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 145095b296d0Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 145195b296d0Smrg # the default ld.so.conf also contains /usr/contrib/lib and 145295b296d0Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 145395b296d0Smrg # libtool to hard-code these into programs 145495b296d0Smrg ;; 145595b296d0Smrg 145695b296d0Smrgcygwin* | mingw* | pw32*) 145795b296d0Smrg version_type=windows 145895b296d0Smrg shrext_cmds=".dll" 145995b296d0Smrg need_version=no 146095b296d0Smrg need_lib_prefix=no 146195b296d0Smrg 146295b296d0Smrg case $GCC,$host_os in 146395b296d0Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 146495b296d0Smrg library_names_spec='$libname.dll.a' 146595b296d0Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 146695b296d0Smrg postinstall_cmds='base_file=`basename \${file}`~ 146795b296d0Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 146895b296d0Smrg dldir=$destdir/`dirname \$dlpath`~ 146995b296d0Smrg test -d \$dldir || mkdir -p \$dldir~ 147095b296d0Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 147195b296d0Smrg chmod a+x \$dldir/$dlname' 147295b296d0Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 147395b296d0Smrg dlpath=$dir/\$dldll~ 147495b296d0Smrg $rm \$dlpath' 147595b296d0Smrg shlibpath_overrides_runpath=yes 147695b296d0Smrg 147795b296d0Smrg case $host_os in 147895b296d0Smrg cygwin*) 147995b296d0Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 148095b296d0Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 148195b296d0Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 148295b296d0Smrg ;; 148395b296d0Smrg mingw*) 148495b296d0Smrg # MinGW DLLs use traditional 'lib' prefix 148595b296d0Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 148695b296d0Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 148795b296d0Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 148895b296d0Smrg # It is most probably a Windows format PATH printed by 148995b296d0Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 149095b296d0Smrg # path with ; separators, and with drive letters. We can handle the 149195b296d0Smrg # drive letters (cygwin fileutils understands them), so leave them, 149295b296d0Smrg # especially as we might pass files found there to a mingw objdump, 149395b296d0Smrg # which wouldn't understand a cygwinified path. Ahh. 149495b296d0Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 149595b296d0Smrg else 149695b296d0Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 149795b296d0Smrg fi 149895b296d0Smrg ;; 149995b296d0Smrg pw32*) 150095b296d0Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 150195b296d0Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 150295b296d0Smrg ;; 150395b296d0Smrg esac 150495b296d0Smrg ;; 150595b296d0Smrg 150695b296d0Smrg *) 150795b296d0Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 150895b296d0Smrg ;; 150995b296d0Smrg esac 151095b296d0Smrg dynamic_linker='Win32 ld.exe' 151195b296d0Smrg # FIXME: first we should search . and the directory the executable is in 151295b296d0Smrg shlibpath_var=PATH 151395b296d0Smrg ;; 151495b296d0Smrg 151595b296d0Smrgdarwin* | rhapsody*) 151695b296d0Smrg dynamic_linker="$host_os dyld" 151795b296d0Smrg version_type=darwin 151895b296d0Smrg need_lib_prefix=no 151995b296d0Smrg need_version=no 152095b296d0Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 152195b296d0Smrg soname_spec='${libname}${release}${major}$shared_ext' 152295b296d0Smrg shlibpath_overrides_runpath=yes 152395b296d0Smrg shlibpath_var=DYLD_LIBRARY_PATH 152495b296d0Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 1525ff89ac2bSmrg m4_if([$1], [],[ 1526ff89ac2bSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 152795b296d0Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 152895b296d0Smrg ;; 152995b296d0Smrg 153095b296d0Smrgdgux*) 153195b296d0Smrg version_type=linux 153295b296d0Smrg need_lib_prefix=no 153395b296d0Smrg need_version=no 153495b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 153595b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 153695b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 153795b296d0Smrg ;; 153895b296d0Smrg 153995b296d0Smrgfreebsd1*) 154095b296d0Smrg dynamic_linker=no 154195b296d0Smrg ;; 154295b296d0Smrg 154395b296d0Smrgfreebsd* | dragonfly*) 154495b296d0Smrg # DragonFly does not have aout. When/if they implement a new 154595b296d0Smrg # versioning mechanism, adjust this. 154695b296d0Smrg if test -x /usr/bin/objformat; then 154795b296d0Smrg objformat=`/usr/bin/objformat` 154895b296d0Smrg else 154995b296d0Smrg case $host_os in 155095b296d0Smrg freebsd[[123]]*) objformat=aout ;; 155195b296d0Smrg *) objformat=elf ;; 155295b296d0Smrg esac 155395b296d0Smrg fi 1554ff89ac2bSmrg version_type=freebsd-$objformat 155595b296d0Smrg case $version_type in 155695b296d0Smrg freebsd-elf*) 155795b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 155895b296d0Smrg need_version=no 155995b296d0Smrg need_lib_prefix=no 156095b296d0Smrg ;; 156195b296d0Smrg freebsd-*) 156295b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 156395b296d0Smrg need_version=yes 156495b296d0Smrg ;; 156595b296d0Smrg esac 156695b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 156795b296d0Smrg case $host_os in 156895b296d0Smrg freebsd2*) 156995b296d0Smrg shlibpath_overrides_runpath=yes 157095b296d0Smrg ;; 157195b296d0Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 157295b296d0Smrg shlibpath_overrides_runpath=yes 157395b296d0Smrg hardcode_into_libs=yes 157495b296d0Smrg ;; 157595b296d0Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 157695b296d0Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 157795b296d0Smrg shlibpath_overrides_runpath=no 157895b296d0Smrg hardcode_into_libs=yes 157995b296d0Smrg ;; 1580ff89ac2bSmrg *) # from 4.6 on, and DragonFly 158195b296d0Smrg shlibpath_overrides_runpath=yes 158295b296d0Smrg hardcode_into_libs=yes 158395b296d0Smrg ;; 158495b296d0Smrg esac 158595b296d0Smrg ;; 158695b296d0Smrg 158795b296d0Smrggnu*) 158895b296d0Smrg version_type=linux 158995b296d0Smrg need_lib_prefix=no 159095b296d0Smrg need_version=no 159195b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 159295b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 159395b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 159495b296d0Smrg hardcode_into_libs=yes 159595b296d0Smrg ;; 159695b296d0Smrg 159795b296d0Smrghpux9* | hpux10* | hpux11*) 159895b296d0Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 159995b296d0Smrg # link against other versions. 160095b296d0Smrg version_type=sunos 160195b296d0Smrg need_lib_prefix=no 160295b296d0Smrg need_version=no 160395b296d0Smrg case $host_cpu in 160495b296d0Smrg ia64*) 160595b296d0Smrg shrext_cmds='.so' 160695b296d0Smrg hardcode_into_libs=yes 160795b296d0Smrg dynamic_linker="$host_os dld.so" 160895b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 160995b296d0Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 161095b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 161195b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 161295b296d0Smrg if test "X$HPUX_IA64_MODE" = X32; then 161395b296d0Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 161495b296d0Smrg else 161595b296d0Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 161695b296d0Smrg fi 161795b296d0Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 161895b296d0Smrg ;; 161995b296d0Smrg hppa*64*) 162095b296d0Smrg shrext_cmds='.sl' 162195b296d0Smrg hardcode_into_libs=yes 162295b296d0Smrg dynamic_linker="$host_os dld.sl" 162395b296d0Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 162495b296d0Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 162595b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 162695b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 162795b296d0Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 162895b296d0Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 162995b296d0Smrg ;; 163095b296d0Smrg *) 163195b296d0Smrg shrext_cmds='.sl' 163295b296d0Smrg dynamic_linker="$host_os dld.sl" 163395b296d0Smrg shlibpath_var=SHLIB_PATH 163495b296d0Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 163595b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 163695b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 163795b296d0Smrg ;; 163895b296d0Smrg esac 163995b296d0Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 164095b296d0Smrg postinstall_cmds='chmod 555 $lib' 164195b296d0Smrg ;; 164295b296d0Smrg 1643ff89ac2bSmrginterix[[3-9]]*) 164495b296d0Smrg version_type=linux 164595b296d0Smrg need_lib_prefix=no 164695b296d0Smrg need_version=no 164795b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 164895b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 164995b296d0Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 165095b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 165195b296d0Smrg shlibpath_overrides_runpath=no 165295b296d0Smrg hardcode_into_libs=yes 165395b296d0Smrg ;; 165495b296d0Smrg 165595b296d0Smrgirix5* | irix6* | nonstopux*) 165695b296d0Smrg case $host_os in 165795b296d0Smrg nonstopux*) version_type=nonstopux ;; 165895b296d0Smrg *) 165995b296d0Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 166095b296d0Smrg version_type=linux 166195b296d0Smrg else 166295b296d0Smrg version_type=irix 166395b296d0Smrg fi ;; 166495b296d0Smrg esac 166595b296d0Smrg need_lib_prefix=no 166695b296d0Smrg need_version=no 166795b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 166895b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 166995b296d0Smrg case $host_os in 167095b296d0Smrg irix5* | nonstopux*) 167195b296d0Smrg libsuff= shlibsuff= 167295b296d0Smrg ;; 167395b296d0Smrg *) 167495b296d0Smrg case $LD in # libtool.m4 will add one of these switches to LD 167595b296d0Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 167695b296d0Smrg libsuff= shlibsuff= libmagic=32-bit;; 167795b296d0Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 167895b296d0Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 167995b296d0Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 168095b296d0Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 168195b296d0Smrg *) libsuff= shlibsuff= libmagic=never-match;; 168295b296d0Smrg esac 168395b296d0Smrg ;; 168495b296d0Smrg esac 168595b296d0Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 168695b296d0Smrg shlibpath_overrides_runpath=no 168795b296d0Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 168895b296d0Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 168995b296d0Smrg hardcode_into_libs=yes 169095b296d0Smrg ;; 169195b296d0Smrg 169295b296d0Smrg# No shared lib support for Linux oldld, aout, or coff. 169395b296d0Smrglinux*oldld* | linux*aout* | linux*coff*) 169495b296d0Smrg dynamic_linker=no 169595b296d0Smrg ;; 169695b296d0Smrg 169795b296d0Smrg# This must be Linux ELF. 1698ff89ac2bSmrglinux* | k*bsd*-gnu) 169995b296d0Smrg version_type=linux 170095b296d0Smrg need_lib_prefix=no 170195b296d0Smrg need_version=no 170295b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 170395b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 170495b296d0Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 170595b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 170695b296d0Smrg shlibpath_overrides_runpath=no 170795b296d0Smrg # This implies no fast_install, which is unacceptable. 170895b296d0Smrg # Some rework will be needed to allow for fast_install 170995b296d0Smrg # before this can be enabled. 171095b296d0Smrg hardcode_into_libs=yes 1711ff89ac2bSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1712ff89ac2bSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 171395b296d0Smrg 171495b296d0Smrg # Append ld.so.conf contents to the search path 171595b296d0Smrg if test -f /etc/ld.so.conf; then 1716ff89ac2bSmrg 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' ' '` 1717ff89ac2bSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 171895b296d0Smrg fi 171995b296d0Smrg 172095b296d0Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 172195b296d0Smrg # powerpc, because MkLinux only supported shared libraries with the 172295b296d0Smrg # GNU dynamic linker. Since this was broken with cross compilers, 172395b296d0Smrg # most powerpc-linux boxes support dynamic linking these days and 172495b296d0Smrg # people can always --disable-shared, the test was removed, and we 172595b296d0Smrg # assume the GNU/Linux dynamic linker is in use. 172695b296d0Smrg dynamic_linker='GNU/Linux ld.so' 172795b296d0Smrg ;; 172895b296d0Smrg 172995b296d0Smrgnetbsd*) 173095b296d0Smrg version_type=sunos 173195b296d0Smrg need_lib_prefix=no 173295b296d0Smrg need_version=no 173395b296d0Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 173495b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 173595b296d0Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 173695b296d0Smrg dynamic_linker='NetBSD (a.out) ld.so' 173795b296d0Smrg else 173895b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 173995b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 174095b296d0Smrg dynamic_linker='NetBSD ld.elf_so' 174195b296d0Smrg fi 174295b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 174395b296d0Smrg shlibpath_overrides_runpath=yes 174495b296d0Smrg hardcode_into_libs=yes 174595b296d0Smrg ;; 174695b296d0Smrg 174795b296d0Smrgnewsos6) 174895b296d0Smrg version_type=linux 174995b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 175095b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 175195b296d0Smrg shlibpath_overrides_runpath=yes 175295b296d0Smrg ;; 175395b296d0Smrg 175495b296d0Smrgnto-qnx*) 175595b296d0Smrg version_type=linux 175695b296d0Smrg need_lib_prefix=no 175795b296d0Smrg need_version=no 175895b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 175995b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 176095b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 176195b296d0Smrg shlibpath_overrides_runpath=yes 176295b296d0Smrg ;; 176395b296d0Smrg 176495b296d0Smrgopenbsd*) 176595b296d0Smrg version_type=sunos 176695b296d0Smrg sys_lib_dlsearch_path_spec="/usr/lib" 176795b296d0Smrg need_lib_prefix=no 176895b296d0Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 176995b296d0Smrg case $host_os in 177095b296d0Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 177195b296d0Smrg *) need_version=no ;; 177295b296d0Smrg esac 177395b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 177495b296d0Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 177595b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 177695b296d0Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 177795b296d0Smrg case $host_os in 177895b296d0Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 177995b296d0Smrg shlibpath_overrides_runpath=no 178095b296d0Smrg ;; 178195b296d0Smrg *) 178295b296d0Smrg shlibpath_overrides_runpath=yes 178395b296d0Smrg ;; 178495b296d0Smrg esac 178595b296d0Smrg else 178695b296d0Smrg shlibpath_overrides_runpath=yes 178795b296d0Smrg fi 178895b296d0Smrg ;; 178995b296d0Smrg 179095b296d0Smrgos2*) 179195b296d0Smrg libname_spec='$name' 179295b296d0Smrg shrext_cmds=".dll" 179395b296d0Smrg need_lib_prefix=no 179495b296d0Smrg library_names_spec='$libname${shared_ext} $libname.a' 179595b296d0Smrg dynamic_linker='OS/2 ld.exe' 179695b296d0Smrg shlibpath_var=LIBPATH 179795b296d0Smrg ;; 179895b296d0Smrg 179995b296d0Smrgosf3* | osf4* | osf5*) 180095b296d0Smrg version_type=osf 180195b296d0Smrg need_lib_prefix=no 180295b296d0Smrg need_version=no 180395b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 180495b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 180595b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 180695b296d0Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 180795b296d0Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 180895b296d0Smrg ;; 180995b296d0Smrg 1810ff89ac2bSmrgrdos*) 1811ff89ac2bSmrg dynamic_linker=no 1812ff89ac2bSmrg ;; 1813ff89ac2bSmrg 181495b296d0Smrgsolaris*) 181595b296d0Smrg version_type=linux 181695b296d0Smrg need_lib_prefix=no 181795b296d0Smrg need_version=no 181895b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 181995b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 182095b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 182195b296d0Smrg shlibpath_overrides_runpath=yes 182295b296d0Smrg hardcode_into_libs=yes 182395b296d0Smrg # ldd complains unless libraries are executable 182495b296d0Smrg postinstall_cmds='chmod +x $lib' 182595b296d0Smrg ;; 182695b296d0Smrg 182795b296d0Smrgsunos4*) 182895b296d0Smrg version_type=sunos 182995b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 183095b296d0Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 183195b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 183295b296d0Smrg shlibpath_overrides_runpath=yes 183395b296d0Smrg if test "$with_gnu_ld" = yes; then 183495b296d0Smrg need_lib_prefix=no 183595b296d0Smrg fi 183695b296d0Smrg need_version=yes 183795b296d0Smrg ;; 183895b296d0Smrg 183995b296d0Smrgsysv4 | sysv4.3*) 184095b296d0Smrg version_type=linux 184195b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 184295b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 184395b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 184495b296d0Smrg case $host_vendor in 184595b296d0Smrg sni) 184695b296d0Smrg shlibpath_overrides_runpath=no 184795b296d0Smrg need_lib_prefix=no 184895b296d0Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 184995b296d0Smrg runpath_var=LD_RUN_PATH 185095b296d0Smrg ;; 185195b296d0Smrg siemens) 185295b296d0Smrg need_lib_prefix=no 185395b296d0Smrg ;; 185495b296d0Smrg motorola) 185595b296d0Smrg need_lib_prefix=no 185695b296d0Smrg need_version=no 185795b296d0Smrg shlibpath_overrides_runpath=no 185895b296d0Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 185995b296d0Smrg ;; 186095b296d0Smrg esac 186195b296d0Smrg ;; 186295b296d0Smrg 186395b296d0Smrgsysv4*MP*) 186495b296d0Smrg if test -d /usr/nec ;then 186595b296d0Smrg version_type=linux 186695b296d0Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 186795b296d0Smrg soname_spec='$libname${shared_ext}.$major' 186895b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 186995b296d0Smrg fi 187095b296d0Smrg ;; 187195b296d0Smrg 187295b296d0Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 187395b296d0Smrg version_type=freebsd-elf 187495b296d0Smrg need_lib_prefix=no 187595b296d0Smrg need_version=no 187695b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 187795b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 187895b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 187995b296d0Smrg hardcode_into_libs=yes 188095b296d0Smrg if test "$with_gnu_ld" = yes; then 188195b296d0Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 188295b296d0Smrg shlibpath_overrides_runpath=no 188395b296d0Smrg else 188495b296d0Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 188595b296d0Smrg shlibpath_overrides_runpath=yes 188695b296d0Smrg case $host_os in 188795b296d0Smrg sco3.2v5*) 188895b296d0Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 188995b296d0Smrg ;; 189095b296d0Smrg esac 189195b296d0Smrg fi 189295b296d0Smrg sys_lib_dlsearch_path_spec='/usr/lib' 189395b296d0Smrg ;; 189495b296d0Smrg 189595b296d0Smrguts4*) 189695b296d0Smrg version_type=linux 189795b296d0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 189895b296d0Smrg soname_spec='${libname}${release}${shared_ext}$major' 189995b296d0Smrg shlibpath_var=LD_LIBRARY_PATH 190095b296d0Smrg ;; 190195b296d0Smrg 190295b296d0Smrg*) 190395b296d0Smrg dynamic_linker=no 190495b296d0Smrg ;; 190595b296d0Smrgesac 190695b296d0SmrgAC_MSG_RESULT([$dynamic_linker]) 190795b296d0Smrgtest "$dynamic_linker" = no && can_build_shared=no 190895b296d0Smrg 1909ff89ac2bSmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 1910ff89ac2bSmrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 1911ff89ac2bSmrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 1912ff89ac2bSmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 1913ff89ac2bSmrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 1914ff89ac2bSmrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 1915ff89ac2bSmrg 191695b296d0Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 191795b296d0Smrgif test "$GCC" = yes; then 191895b296d0Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 191995b296d0Smrgfi 192095b296d0Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 192195b296d0Smrg 192295b296d0Smrg 192395b296d0Smrg# _LT_AC_TAGCONFIG 192495b296d0Smrg# ---------------- 192595b296d0SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 1926ff89ac2bSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1927ff89ac2bSmrgAC_ARG_WITH([tags], 192895b296d0Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 192995b296d0Smrg [include additional configurations @<:@automatic@:>@])], 193095b296d0Smrg [tagnames="$withval"]) 193195b296d0Smrg 193295b296d0Smrgif test -f "$ltmain" && test -n "$tagnames"; then 193395b296d0Smrg if test ! -f "${ofile}"; then 193495b296d0Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 193595b296d0Smrg fi 193695b296d0Smrg 193795b296d0Smrg if test -z "$LTCC"; then 193895b296d0Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 193995b296d0Smrg if test -z "$LTCC"; then 194095b296d0Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 194195b296d0Smrg else 194295b296d0Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 194395b296d0Smrg fi 194495b296d0Smrg fi 194595b296d0Smrg if test -z "$LTCFLAGS"; then 194695b296d0Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 194795b296d0Smrg fi 194895b296d0Smrg 194995b296d0Smrg # Extract list of available tagged configurations in $ofile. 195095b296d0Smrg # Note that this assumes the entire list is on one line. 195195b296d0Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 195295b296d0Smrg 195395b296d0Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 195495b296d0Smrg for tagname in $tagnames; do 195595b296d0Smrg IFS="$lt_save_ifs" 195695b296d0Smrg # Check whether tagname contains only valid characters 195795b296d0Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 195895b296d0Smrg "") ;; 195995b296d0Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 196095b296d0Smrg ;; 196195b296d0Smrg esac 196295b296d0Smrg 196395b296d0Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 196495b296d0Smrg then 196595b296d0Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 196695b296d0Smrg fi 196795b296d0Smrg 196895b296d0Smrg # Update the list of available tags. 196995b296d0Smrg if test -n "$tagname"; then 197095b296d0Smrg echo appending configuration tag \"$tagname\" to $ofile 197195b296d0Smrg 197295b296d0Smrg case $tagname in 197395b296d0Smrg CXX) 197495b296d0Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 197595b296d0Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 197695b296d0Smrg (test "X$CXX" != "Xg++"))) ; then 197795b296d0Smrg AC_LIBTOOL_LANG_CXX_CONFIG 197895b296d0Smrg else 197995b296d0Smrg tagname="" 198095b296d0Smrg fi 198195b296d0Smrg ;; 198295b296d0Smrg 198395b296d0Smrg F77) 198495b296d0Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 198595b296d0Smrg AC_LIBTOOL_LANG_F77_CONFIG 198695b296d0Smrg else 198795b296d0Smrg tagname="" 198895b296d0Smrg fi 198995b296d0Smrg ;; 199095b296d0Smrg 199195b296d0Smrg GCJ) 199295b296d0Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 199395b296d0Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 199495b296d0Smrg else 199595b296d0Smrg tagname="" 199695b296d0Smrg fi 199795b296d0Smrg ;; 199895b296d0Smrg 199995b296d0Smrg RC) 200095b296d0Smrg AC_LIBTOOL_LANG_RC_CONFIG 200195b296d0Smrg ;; 200295b296d0Smrg 200395b296d0Smrg *) 200495b296d0Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 200595b296d0Smrg ;; 200695b296d0Smrg esac 200795b296d0Smrg 200895b296d0Smrg # Append the new tag name to the list of available tags. 200995b296d0Smrg if test -n "$tagname" ; then 201095b296d0Smrg available_tags="$available_tags $tagname" 201195b296d0Smrg fi 201295b296d0Smrg fi 201395b296d0Smrg done 201495b296d0Smrg IFS="$lt_save_ifs" 201595b296d0Smrg 201695b296d0Smrg # Now substitute the updated list of available tags. 201795b296d0Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 201895b296d0Smrg mv "${ofile}T" "$ofile" 201995b296d0Smrg chmod +x "$ofile" 202095b296d0Smrg else 202195b296d0Smrg rm -f "${ofile}T" 202295b296d0Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 202395b296d0Smrg fi 202495b296d0Smrgfi 202595b296d0Smrg])# _LT_AC_TAGCONFIG 202695b296d0Smrg 202795b296d0Smrg 202895b296d0Smrg# AC_LIBTOOL_DLOPEN 202995b296d0Smrg# ----------------- 203095b296d0Smrg# enable checks for dlopen support 203195b296d0SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 203295b296d0Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 203395b296d0Smrg])# AC_LIBTOOL_DLOPEN 203495b296d0Smrg 203595b296d0Smrg 203695b296d0Smrg# AC_LIBTOOL_WIN32_DLL 203795b296d0Smrg# -------------------- 203895b296d0Smrg# declare package support for building win32 DLLs 203995b296d0SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 204095b296d0Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 204195b296d0Smrg])# AC_LIBTOOL_WIN32_DLL 204295b296d0Smrg 204395b296d0Smrg 204495b296d0Smrg# AC_ENABLE_SHARED([DEFAULT]) 204595b296d0Smrg# --------------------------- 204695b296d0Smrg# implement the --enable-shared flag 204795b296d0Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 204895b296d0SmrgAC_DEFUN([AC_ENABLE_SHARED], 204995b296d0Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 205095b296d0SmrgAC_ARG_ENABLE([shared], 205195b296d0Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 205295b296d0Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 205395b296d0Smrg [p=${PACKAGE-default} 205495b296d0Smrg case $enableval in 205595b296d0Smrg yes) enable_shared=yes ;; 205695b296d0Smrg no) enable_shared=no ;; 205795b296d0Smrg *) 205895b296d0Smrg enable_shared=no 205995b296d0Smrg # Look at the argument we got. We use all the common list separators. 206095b296d0Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 206195b296d0Smrg for pkg in $enableval; do 206295b296d0Smrg IFS="$lt_save_ifs" 206395b296d0Smrg if test "X$pkg" = "X$p"; then 206495b296d0Smrg enable_shared=yes 206595b296d0Smrg fi 206695b296d0Smrg done 206795b296d0Smrg IFS="$lt_save_ifs" 206895b296d0Smrg ;; 206995b296d0Smrg esac], 207095b296d0Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 207195b296d0Smrg])# AC_ENABLE_SHARED 207295b296d0Smrg 207395b296d0Smrg 207495b296d0Smrg# AC_DISABLE_SHARED 207595b296d0Smrg# ----------------- 207695b296d0Smrg# set the default shared flag to --disable-shared 207795b296d0SmrgAC_DEFUN([AC_DISABLE_SHARED], 207895b296d0Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 207995b296d0SmrgAC_ENABLE_SHARED(no) 208095b296d0Smrg])# AC_DISABLE_SHARED 208195b296d0Smrg 208295b296d0Smrg 208395b296d0Smrg# AC_ENABLE_STATIC([DEFAULT]) 208495b296d0Smrg# --------------------------- 208595b296d0Smrg# implement the --enable-static flag 208695b296d0Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 208795b296d0SmrgAC_DEFUN([AC_ENABLE_STATIC], 208895b296d0Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 208995b296d0SmrgAC_ARG_ENABLE([static], 209095b296d0Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 209195b296d0Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 209295b296d0Smrg [p=${PACKAGE-default} 209395b296d0Smrg case $enableval in 209495b296d0Smrg yes) enable_static=yes ;; 209595b296d0Smrg no) enable_static=no ;; 209695b296d0Smrg *) 209795b296d0Smrg enable_static=no 209895b296d0Smrg # Look at the argument we got. We use all the common list separators. 209995b296d0Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 210095b296d0Smrg for pkg in $enableval; do 210195b296d0Smrg IFS="$lt_save_ifs" 210295b296d0Smrg if test "X$pkg" = "X$p"; then 210395b296d0Smrg enable_static=yes 210495b296d0Smrg fi 210595b296d0Smrg done 210695b296d0Smrg IFS="$lt_save_ifs" 210795b296d0Smrg ;; 210895b296d0Smrg esac], 210995b296d0Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 211095b296d0Smrg])# AC_ENABLE_STATIC 211195b296d0Smrg 211295b296d0Smrg 211395b296d0Smrg# AC_DISABLE_STATIC 211495b296d0Smrg# ----------------- 211595b296d0Smrg# set the default static flag to --disable-static 211695b296d0SmrgAC_DEFUN([AC_DISABLE_STATIC], 211795b296d0Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 211895b296d0SmrgAC_ENABLE_STATIC(no) 211995b296d0Smrg])# AC_DISABLE_STATIC 212095b296d0Smrg 212195b296d0Smrg 212295b296d0Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 212395b296d0Smrg# --------------------------------- 212495b296d0Smrg# implement the --enable-fast-install flag 212595b296d0Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 212695b296d0SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 212795b296d0Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 212895b296d0SmrgAC_ARG_ENABLE([fast-install], 212995b296d0Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 213095b296d0Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 213195b296d0Smrg [p=${PACKAGE-default} 213295b296d0Smrg case $enableval in 213395b296d0Smrg yes) enable_fast_install=yes ;; 213495b296d0Smrg no) enable_fast_install=no ;; 213595b296d0Smrg *) 213695b296d0Smrg enable_fast_install=no 213795b296d0Smrg # Look at the argument we got. We use all the common list separators. 213895b296d0Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 213995b296d0Smrg for pkg in $enableval; do 214095b296d0Smrg IFS="$lt_save_ifs" 214195b296d0Smrg if test "X$pkg" = "X$p"; then 214295b296d0Smrg enable_fast_install=yes 214395b296d0Smrg fi 214495b296d0Smrg done 214595b296d0Smrg IFS="$lt_save_ifs" 214695b296d0Smrg ;; 214795b296d0Smrg esac], 214895b296d0Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 214995b296d0Smrg])# AC_ENABLE_FAST_INSTALL 215095b296d0Smrg 215195b296d0Smrg 215295b296d0Smrg# AC_DISABLE_FAST_INSTALL 215395b296d0Smrg# ----------------------- 215495b296d0Smrg# set the default to --disable-fast-install 215595b296d0SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 215695b296d0Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 215795b296d0SmrgAC_ENABLE_FAST_INSTALL(no) 215895b296d0Smrg])# AC_DISABLE_FAST_INSTALL 215995b296d0Smrg 216095b296d0Smrg 216195b296d0Smrg# AC_LIBTOOL_PICMODE([MODE]) 216295b296d0Smrg# -------------------------- 216395b296d0Smrg# implement the --with-pic flag 216495b296d0Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 216595b296d0SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 216695b296d0Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 216795b296d0Smrgpic_mode=ifelse($#,1,$1,default) 216895b296d0Smrg])# AC_LIBTOOL_PICMODE 216995b296d0Smrg 217095b296d0Smrg 217195b296d0Smrg# AC_PROG_EGREP 217295b296d0Smrg# ------------- 217395b296d0Smrg# This is predefined starting with Autoconf 2.54, so this conditional 217495b296d0Smrg# definition can be removed once we require Autoconf 2.54 or later. 217595b296d0Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 217695b296d0Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 217795b296d0Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 217895b296d0Smrg then ac_cv_prog_egrep='grep -E' 217995b296d0Smrg else ac_cv_prog_egrep='egrep' 218095b296d0Smrg fi]) 218195b296d0Smrg EGREP=$ac_cv_prog_egrep 218295b296d0Smrg AC_SUBST([EGREP]) 218395b296d0Smrg])]) 218495b296d0Smrg 218595b296d0Smrg 218695b296d0Smrg# AC_PATH_TOOL_PREFIX 218795b296d0Smrg# ------------------- 2188ff89ac2bSmrg# find a file program which can recognize shared library 218995b296d0SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 219095b296d0Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 219195b296d0SmrgAC_MSG_CHECKING([for $1]) 219295b296d0SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 219395b296d0Smrg[case $MAGIC_CMD in 219495b296d0Smrg[[\\/*] | ?:[\\/]*]) 219595b296d0Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 219695b296d0Smrg ;; 219795b296d0Smrg*) 219895b296d0Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 219995b296d0Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 220095b296d0Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 220195b296d0Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 220295b296d0Smrgdnl not every word. This closes a longstanding sh security hole. 220395b296d0Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 220495b296d0Smrg for ac_dir in $ac_dummy; do 220595b296d0Smrg IFS="$lt_save_ifs" 220695b296d0Smrg test -z "$ac_dir" && ac_dir=. 220795b296d0Smrg if test -f $ac_dir/$1; then 220895b296d0Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 220995b296d0Smrg if test -n "$file_magic_test_file"; then 221095b296d0Smrg case $deplibs_check_method in 221195b296d0Smrg "file_magic "*) 221295b296d0Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 221395b296d0Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 221495b296d0Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 221595b296d0Smrg $EGREP "$file_magic_regex" > /dev/null; then 221695b296d0Smrg : 221795b296d0Smrg else 221895b296d0Smrg cat <<EOF 1>&2 221995b296d0Smrg 222095b296d0Smrg*** Warning: the command libtool uses to detect shared libraries, 222195b296d0Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 222295b296d0Smrg*** The result is that libtool may fail to recognize shared libraries 222395b296d0Smrg*** as such. This will affect the creation of libtool libraries that 222495b296d0Smrg*** depend on shared libraries, but programs linked with such libtool 222595b296d0Smrg*** libraries will work regardless of this problem. Nevertheless, you 222695b296d0Smrg*** may want to report the problem to your system manager and/or to 222795b296d0Smrg*** bug-libtool@gnu.org 222895b296d0Smrg 222995b296d0SmrgEOF 223095b296d0Smrg fi ;; 223195b296d0Smrg esac 223295b296d0Smrg fi 223395b296d0Smrg break 223495b296d0Smrg fi 223595b296d0Smrg done 223695b296d0Smrg IFS="$lt_save_ifs" 223795b296d0Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 223895b296d0Smrg ;; 223995b296d0Smrgesac]) 224095b296d0SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 224195b296d0Smrgif test -n "$MAGIC_CMD"; then 224295b296d0Smrg AC_MSG_RESULT($MAGIC_CMD) 224395b296d0Smrgelse 224495b296d0Smrg AC_MSG_RESULT(no) 224595b296d0Smrgfi 224695b296d0Smrg])# AC_PATH_TOOL_PREFIX 224795b296d0Smrg 224895b296d0Smrg 224995b296d0Smrg# AC_PATH_MAGIC 225095b296d0Smrg# ------------- 2251ff89ac2bSmrg# find a file program which can recognize a shared library 225295b296d0SmrgAC_DEFUN([AC_PATH_MAGIC], 225395b296d0Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 225495b296d0Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 225595b296d0Smrg if test -n "$ac_tool_prefix"; then 225695b296d0Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 225795b296d0Smrg else 225895b296d0Smrg MAGIC_CMD=: 225995b296d0Smrg fi 226095b296d0Smrgfi 226195b296d0Smrg])# AC_PATH_MAGIC 226295b296d0Smrg 226395b296d0Smrg 226495b296d0Smrg# AC_PROG_LD 226595b296d0Smrg# ---------- 226695b296d0Smrg# find the pathname to the GNU or non-GNU linker 226795b296d0SmrgAC_DEFUN([AC_PROG_LD], 226895b296d0Smrg[AC_ARG_WITH([gnu-ld], 226995b296d0Smrg [AC_HELP_STRING([--with-gnu-ld], 227095b296d0Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 227195b296d0Smrg [test "$withval" = no || with_gnu_ld=yes], 227295b296d0Smrg [with_gnu_ld=no]) 227395b296d0SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 227495b296d0SmrgAC_REQUIRE([AC_PROG_CC])dnl 227595b296d0SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 227695b296d0SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 227795b296d0Smrgac_prog=ld 227895b296d0Smrgif test "$GCC" = yes; then 227995b296d0Smrg # Check if gcc -print-prog-name=ld gives a path. 228095b296d0Smrg AC_MSG_CHECKING([for ld used by $CC]) 228195b296d0Smrg case $host in 228295b296d0Smrg *-*-mingw*) 228395b296d0Smrg # gcc leaves a trailing carriage return which upsets mingw 228495b296d0Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 228595b296d0Smrg *) 228695b296d0Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 228795b296d0Smrg esac 228895b296d0Smrg case $ac_prog in 228995b296d0Smrg # Accept absolute paths. 229095b296d0Smrg [[\\/]]* | ?:[[\\/]]*) 229195b296d0Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 229295b296d0Smrg # Canonicalize the pathname of ld 229395b296d0Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 229495b296d0Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 229595b296d0Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 229695b296d0Smrg done 229795b296d0Smrg test -z "$LD" && LD="$ac_prog" 229895b296d0Smrg ;; 229995b296d0Smrg "") 230095b296d0Smrg # If it fails, then pretend we aren't using GCC. 230195b296d0Smrg ac_prog=ld 230295b296d0Smrg ;; 230395b296d0Smrg *) 230495b296d0Smrg # If it is relative, then search for the first ld in PATH. 230595b296d0Smrg with_gnu_ld=unknown 230695b296d0Smrg ;; 230795b296d0Smrg esac 230895b296d0Smrgelif test "$with_gnu_ld" = yes; then 230995b296d0Smrg AC_MSG_CHECKING([for GNU ld]) 231095b296d0Smrgelse 231195b296d0Smrg AC_MSG_CHECKING([for non-GNU ld]) 231295b296d0Smrgfi 231395b296d0SmrgAC_CACHE_VAL(lt_cv_path_LD, 231495b296d0Smrg[if test -z "$LD"; then 231595b296d0Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 231695b296d0Smrg for ac_dir in $PATH; do 231795b296d0Smrg IFS="$lt_save_ifs" 231895b296d0Smrg test -z "$ac_dir" && ac_dir=. 231995b296d0Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 232095b296d0Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 232195b296d0Smrg # Check to see if the program is GNU ld. I'd rather use --version, 232295b296d0Smrg # but apparently some variants of GNU ld only accept -v. 232395b296d0Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 232495b296d0Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 232595b296d0Smrg *GNU* | *'with BFD'*) 232695b296d0Smrg test "$with_gnu_ld" != no && break 232795b296d0Smrg ;; 232895b296d0Smrg *) 232995b296d0Smrg test "$with_gnu_ld" != yes && break 233095b296d0Smrg ;; 233195b296d0Smrg esac 233295b296d0Smrg fi 233395b296d0Smrg done 233495b296d0Smrg IFS="$lt_save_ifs" 233595b296d0Smrgelse 233695b296d0Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 233795b296d0Smrgfi]) 233895b296d0SmrgLD="$lt_cv_path_LD" 233995b296d0Smrgif test -n "$LD"; then 234095b296d0Smrg AC_MSG_RESULT($LD) 234195b296d0Smrgelse 234295b296d0Smrg AC_MSG_RESULT(no) 234395b296d0Smrgfi 234495b296d0Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 234595b296d0SmrgAC_PROG_LD_GNU 234695b296d0Smrg])# AC_PROG_LD 234795b296d0Smrg 234895b296d0Smrg 234995b296d0Smrg# AC_PROG_LD_GNU 235095b296d0Smrg# -------------- 235195b296d0SmrgAC_DEFUN([AC_PROG_LD_GNU], 235295b296d0Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 235395b296d0SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 235495b296d0Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 235595b296d0Smrgcase `$LD -v 2>&1 </dev/null` in 235695b296d0Smrg*GNU* | *'with BFD'*) 235795b296d0Smrg lt_cv_prog_gnu_ld=yes 235895b296d0Smrg ;; 235995b296d0Smrg*) 236095b296d0Smrg lt_cv_prog_gnu_ld=no 236195b296d0Smrg ;; 236295b296d0Smrgesac]) 236395b296d0Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 236495b296d0Smrg])# AC_PROG_LD_GNU 236595b296d0Smrg 236695b296d0Smrg 236795b296d0Smrg# AC_PROG_LD_RELOAD_FLAG 236895b296d0Smrg# ---------------------- 236995b296d0Smrg# find reload flag for linker 237095b296d0Smrg# -- PORTME Some linkers may need a different reload flag. 237195b296d0SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 237295b296d0Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 237395b296d0Smrg lt_cv_ld_reload_flag, 237495b296d0Smrg [lt_cv_ld_reload_flag='-r']) 237595b296d0Smrgreload_flag=$lt_cv_ld_reload_flag 237695b296d0Smrgcase $reload_flag in 237795b296d0Smrg"" | " "*) ;; 237895b296d0Smrg*) reload_flag=" $reload_flag" ;; 237995b296d0Smrgesac 238095b296d0Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 238195b296d0Smrgcase $host_os in 238295b296d0Smrg darwin*) 238395b296d0Smrg if test "$GCC" = yes; then 238495b296d0Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 238595b296d0Smrg else 238695b296d0Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 238795b296d0Smrg fi 238895b296d0Smrg ;; 238995b296d0Smrgesac 239095b296d0Smrg])# AC_PROG_LD_RELOAD_FLAG 239195b296d0Smrg 239295b296d0Smrg 239395b296d0Smrg# AC_DEPLIBS_CHECK_METHOD 239495b296d0Smrg# ----------------------- 239595b296d0Smrg# how to check for library dependencies 239695b296d0Smrg# -- PORTME fill in with the dynamic library characteristics 239795b296d0SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2398ff89ac2bSmrg[AC_CACHE_CHECK([how to recognize dependent libraries], 239995b296d0Smrglt_cv_deplibs_check_method, 240095b296d0Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 240195b296d0Smrglt_cv_file_magic_test_file= 240295b296d0Smrglt_cv_deplibs_check_method='unknown' 240395b296d0Smrg# Need to set the preceding variable on all platforms that support 240495b296d0Smrg# interlibrary dependencies. 240595b296d0Smrg# 'none' -- dependencies not supported. 240695b296d0Smrg# `unknown' -- same as none, but documents that we really don't know. 240795b296d0Smrg# 'pass_all' -- all dependencies passed with no checks. 240895b296d0Smrg# 'test_compile' -- check by making test program. 240995b296d0Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 241095b296d0Smrg# which responds to the $file_magic_cmd with a given extended regex. 241195b296d0Smrg# If you have `file' or equivalent on your system and you're not sure 241295b296d0Smrg# whether `pass_all' will *always* work, you probably want this one. 241395b296d0Smrg 241495b296d0Smrgcase $host_os in 2415ff89ac2bSmrgaix[[4-9]]*) 241695b296d0Smrg lt_cv_deplibs_check_method=pass_all 241795b296d0Smrg ;; 241895b296d0Smrg 241995b296d0Smrgbeos*) 242095b296d0Smrg lt_cv_deplibs_check_method=pass_all 242195b296d0Smrg ;; 242295b296d0Smrg 242395b296d0Smrgbsdi[[45]]*) 242495b296d0Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 242595b296d0Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 242695b296d0Smrg lt_cv_file_magic_test_file=/shlib/libc.so 242795b296d0Smrg ;; 242895b296d0Smrg 242995b296d0Smrgcygwin*) 243095b296d0Smrg # func_win32_libid is a shell function defined in ltmain.sh 243195b296d0Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 243295b296d0Smrg lt_cv_file_magic_cmd='func_win32_libid' 243395b296d0Smrg ;; 243495b296d0Smrg 243595b296d0Smrgmingw* | pw32*) 243695b296d0Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 2437ff89ac2bSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 2438ff89ac2bSmrg # unless we find 'file', for example because we are cross-compiling. 2439ff89ac2bSmrg if ( file / ) >/dev/null 2>&1; then 2440ff89ac2bSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2441ff89ac2bSmrg lt_cv_file_magic_cmd='func_win32_libid' 2442ff89ac2bSmrg else 2443ff89ac2bSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 2444ff89ac2bSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 2445ff89ac2bSmrg fi 244695b296d0Smrg ;; 244795b296d0Smrg 244895b296d0Smrgdarwin* | rhapsody*) 244995b296d0Smrg lt_cv_deplibs_check_method=pass_all 245095b296d0Smrg ;; 245195b296d0Smrg 2452ff89ac2bSmrgfreebsd* | dragonfly*) 245395b296d0Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 245495b296d0Smrg case $host_cpu in 245595b296d0Smrg i*86 ) 245695b296d0Smrg # Not sure whether the presence of OpenBSD here was a mistake. 245795b296d0Smrg # Let's accept both of them until this is cleared up. 245895b296d0Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 245995b296d0Smrg lt_cv_file_magic_cmd=/usr/bin/file 246095b296d0Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 246195b296d0Smrg ;; 246295b296d0Smrg esac 246395b296d0Smrg else 246495b296d0Smrg lt_cv_deplibs_check_method=pass_all 246595b296d0Smrg fi 246695b296d0Smrg ;; 246795b296d0Smrg 246895b296d0Smrggnu*) 246995b296d0Smrg lt_cv_deplibs_check_method=pass_all 247095b296d0Smrg ;; 247195b296d0Smrg 247295b296d0Smrghpux10.20* | hpux11*) 247395b296d0Smrg lt_cv_file_magic_cmd=/usr/bin/file 247495b296d0Smrg case $host_cpu in 247595b296d0Smrg ia64*) 247695b296d0Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 247795b296d0Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 247895b296d0Smrg ;; 247995b296d0Smrg hppa*64*) 248095b296d0Smrg [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]'] 248195b296d0Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 248295b296d0Smrg ;; 248395b296d0Smrg *) 248495b296d0Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 248595b296d0Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 248695b296d0Smrg ;; 248795b296d0Smrg esac 248895b296d0Smrg ;; 248995b296d0Smrg 2490ff89ac2bSmrginterix[[3-9]]*) 249195b296d0Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 249295b296d0Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 249395b296d0Smrg ;; 249495b296d0Smrg 249595b296d0Smrgirix5* | irix6* | nonstopux*) 249695b296d0Smrg case $LD in 249795b296d0Smrg *-32|*"-32 ") libmagic=32-bit;; 249895b296d0Smrg *-n32|*"-n32 ") libmagic=N32;; 249995b296d0Smrg *-64|*"-64 ") libmagic=64-bit;; 250095b296d0Smrg *) libmagic=never-match;; 250195b296d0Smrg esac 250295b296d0Smrg lt_cv_deplibs_check_method=pass_all 250395b296d0Smrg ;; 250495b296d0Smrg 250595b296d0Smrg# This must be Linux ELF. 2506ff89ac2bSmrglinux* | k*bsd*-gnu) 250795b296d0Smrg lt_cv_deplibs_check_method=pass_all 250895b296d0Smrg ;; 250995b296d0Smrg 251095b296d0Smrgnetbsd*) 251195b296d0Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 251295b296d0Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 251395b296d0Smrg else 251495b296d0Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 251595b296d0Smrg fi 251695b296d0Smrg ;; 251795b296d0Smrg 251895b296d0Smrgnewos6*) 251995b296d0Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 252095b296d0Smrg lt_cv_file_magic_cmd=/usr/bin/file 252195b296d0Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 252295b296d0Smrg ;; 252395b296d0Smrg 252495b296d0Smrgnto-qnx*) 252595b296d0Smrg lt_cv_deplibs_check_method=unknown 252695b296d0Smrg ;; 252795b296d0Smrg 252895b296d0Smrgopenbsd*) 252995b296d0Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 253095b296d0Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 253195b296d0Smrg else 253295b296d0Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 253395b296d0Smrg fi 253495b296d0Smrg ;; 253595b296d0Smrg 253695b296d0Smrgosf3* | osf4* | osf5*) 253795b296d0Smrg lt_cv_deplibs_check_method=pass_all 253895b296d0Smrg ;; 253995b296d0Smrg 2540ff89ac2bSmrgrdos*) 2541ff89ac2bSmrg lt_cv_deplibs_check_method=pass_all 2542ff89ac2bSmrg ;; 2543ff89ac2bSmrg 254495b296d0Smrgsolaris*) 254595b296d0Smrg lt_cv_deplibs_check_method=pass_all 254695b296d0Smrg ;; 254795b296d0Smrg 254895b296d0Smrgsysv4 | sysv4.3*) 254995b296d0Smrg case $host_vendor in 255095b296d0Smrg motorola) 255195b296d0Smrg 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]]' 255295b296d0Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 255395b296d0Smrg ;; 255495b296d0Smrg ncr) 255595b296d0Smrg lt_cv_deplibs_check_method=pass_all 255695b296d0Smrg ;; 255795b296d0Smrg sequent) 255895b296d0Smrg lt_cv_file_magic_cmd='/bin/file' 255995b296d0Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 256095b296d0Smrg ;; 256195b296d0Smrg sni) 256295b296d0Smrg lt_cv_file_magic_cmd='/bin/file' 256395b296d0Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 256495b296d0Smrg lt_cv_file_magic_test_file=/lib/libc.so 256595b296d0Smrg ;; 256695b296d0Smrg siemens) 256795b296d0Smrg lt_cv_deplibs_check_method=pass_all 256895b296d0Smrg ;; 256995b296d0Smrg pc) 257095b296d0Smrg lt_cv_deplibs_check_method=pass_all 257195b296d0Smrg ;; 257295b296d0Smrg esac 257395b296d0Smrg ;; 257495b296d0Smrg 257595b296d0Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 257695b296d0Smrg lt_cv_deplibs_check_method=pass_all 257795b296d0Smrg ;; 257895b296d0Smrgesac 257995b296d0Smrg]) 258095b296d0Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 258195b296d0Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 258295b296d0Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 258395b296d0Smrg])# AC_DEPLIBS_CHECK_METHOD 258495b296d0Smrg 258595b296d0Smrg 258695b296d0Smrg# AC_PROG_NM 258795b296d0Smrg# ---------- 258895b296d0Smrg# find the pathname to a BSD-compatible name lister 258995b296d0SmrgAC_DEFUN([AC_PROG_NM], 259095b296d0Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 259195b296d0Smrg[if test -n "$NM"; then 259295b296d0Smrg # Let the user override the test. 259395b296d0Smrg lt_cv_path_NM="$NM" 259495b296d0Smrgelse 259595b296d0Smrg lt_nm_to_check="${ac_tool_prefix}nm" 2596ff89ac2bSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 259795b296d0Smrg lt_nm_to_check="$lt_nm_to_check nm" 259895b296d0Smrg fi 259995b296d0Smrg for lt_tmp_nm in $lt_nm_to_check; do 260095b296d0Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 260195b296d0Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 260295b296d0Smrg IFS="$lt_save_ifs" 260395b296d0Smrg test -z "$ac_dir" && ac_dir=. 260495b296d0Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 260595b296d0Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 260695b296d0Smrg # Check to see if the nm accepts a BSD-compat flag. 260795b296d0Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 260895b296d0Smrg # nm: unknown option "B" ignored 260995b296d0Smrg # Tru64's nm complains that /dev/null is an invalid object file 261095b296d0Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 261195b296d0Smrg */dev/null* | *'Invalid file or object type'*) 261295b296d0Smrg lt_cv_path_NM="$tmp_nm -B" 261395b296d0Smrg break 261495b296d0Smrg ;; 261595b296d0Smrg *) 261695b296d0Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 261795b296d0Smrg */dev/null*) 261895b296d0Smrg lt_cv_path_NM="$tmp_nm -p" 261995b296d0Smrg break 262095b296d0Smrg ;; 262195b296d0Smrg *) 262295b296d0Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 262395b296d0Smrg continue # so that we can try to find one that supports BSD flags 262495b296d0Smrg ;; 262595b296d0Smrg esac 262695b296d0Smrg ;; 262795b296d0Smrg esac 262895b296d0Smrg fi 262995b296d0Smrg done 263095b296d0Smrg IFS="$lt_save_ifs" 263195b296d0Smrg done 263295b296d0Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 263395b296d0Smrgfi]) 263495b296d0SmrgNM="$lt_cv_path_NM" 263595b296d0Smrg])# AC_PROG_NM 263695b296d0Smrg 263795b296d0Smrg 263895b296d0Smrg# AC_CHECK_LIBM 263995b296d0Smrg# ------------- 264095b296d0Smrg# check for math library 264195b296d0SmrgAC_DEFUN([AC_CHECK_LIBM], 264295b296d0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 264395b296d0SmrgLIBM= 264495b296d0Smrgcase $host in 264595b296d0Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 264695b296d0Smrg # These system don't have libm, or don't need it 264795b296d0Smrg ;; 264895b296d0Smrg*-ncr-sysv4.3*) 264995b296d0Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 265095b296d0Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 265195b296d0Smrg ;; 265295b296d0Smrg*) 265395b296d0Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 265495b296d0Smrg ;; 265595b296d0Smrgesac 265695b296d0Smrg])# AC_CHECK_LIBM 265795b296d0Smrg 265895b296d0Smrg 265995b296d0Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 266095b296d0Smrg# ----------------------------------- 266195b296d0Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 266295b296d0Smrg# LTDLINCL to the include flags for the libltdl header and adds 266395b296d0Smrg# --enable-ltdl-convenience to the configure arguments. Note that 266495b296d0Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 266595b296d0Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 266695b296d0Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 266795b296d0Smrg# (note the single quotes!). If your package is not flat and you're not 266895b296d0Smrg# using automake, define top_builddir and top_srcdir appropriately in 266995b296d0Smrg# the Makefiles. 267095b296d0SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 267195b296d0Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 267295b296d0Smrg case $enable_ltdl_convenience in 267395b296d0Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 267495b296d0Smrg "") enable_ltdl_convenience=yes 267595b296d0Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 267695b296d0Smrg esac 267795b296d0Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 267895b296d0Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 267995b296d0Smrg # For backwards non-gettext consistent compatibility... 268095b296d0Smrg INCLTDL="$LTDLINCL" 268195b296d0Smrg])# AC_LIBLTDL_CONVENIENCE 268295b296d0Smrg 268395b296d0Smrg 268495b296d0Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 268595b296d0Smrg# ----------------------------------- 268695b296d0Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 268795b296d0Smrg# LTDLINCL to the include flags for the libltdl header and adds 268895b296d0Smrg# --enable-ltdl-install to the configure arguments. Note that 268995b296d0Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 269095b296d0Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 269195b296d0Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 269295b296d0Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 269395b296d0Smrg# flat and you're not using automake, define top_builddir and top_srcdir 269495b296d0Smrg# appropriately in the Makefiles. 269595b296d0Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 269695b296d0SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 269795b296d0Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 269895b296d0Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 269995b296d0Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 270095b296d0Smrg [if test x"$enable_ltdl_install" = xno; then 270195b296d0Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 270295b296d0Smrg else 270395b296d0Smrg enable_ltdl_install=yes 270495b296d0Smrg fi 270595b296d0Smrg ]) 270695b296d0Smrg if test x"$enable_ltdl_install" = x"yes"; then 270795b296d0Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 270895b296d0Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 270995b296d0Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 271095b296d0Smrg else 271195b296d0Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 271295b296d0Smrg LIBLTDL="-lltdl" 271395b296d0Smrg LTDLINCL= 271495b296d0Smrg fi 271595b296d0Smrg # For backwards non-gettext consistent compatibility... 271695b296d0Smrg INCLTDL="$LTDLINCL" 271795b296d0Smrg])# AC_LIBLTDL_INSTALLABLE 271895b296d0Smrg 271995b296d0Smrg 272095b296d0Smrg# AC_LIBTOOL_CXX 272195b296d0Smrg# -------------- 272295b296d0Smrg# enable support for C++ libraries 272395b296d0SmrgAC_DEFUN([AC_LIBTOOL_CXX], 272495b296d0Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 272595b296d0Smrg])# AC_LIBTOOL_CXX 272695b296d0Smrg 272795b296d0Smrg 272895b296d0Smrg# _LT_AC_LANG_CXX 272995b296d0Smrg# --------------- 273095b296d0SmrgAC_DEFUN([_LT_AC_LANG_CXX], 273195b296d0Smrg[AC_REQUIRE([AC_PROG_CXX]) 273295b296d0SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 273395b296d0Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 273495b296d0Smrg])# _LT_AC_LANG_CXX 273595b296d0Smrg 273695b296d0Smrg# _LT_AC_PROG_CXXCPP 273795b296d0Smrg# ------------------ 273895b296d0SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 273995b296d0Smrg[ 274095b296d0SmrgAC_REQUIRE([AC_PROG_CXX]) 274195b296d0Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 274295b296d0Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 274395b296d0Smrg (test "X$CXX" != "Xg++"))) ; then 274495b296d0Smrg AC_PROG_CXXCPP 274595b296d0Smrgfi 274695b296d0Smrg])# _LT_AC_PROG_CXXCPP 274795b296d0Smrg 274895b296d0Smrg# AC_LIBTOOL_F77 274995b296d0Smrg# -------------- 275095b296d0Smrg# enable support for Fortran 77 libraries 275195b296d0SmrgAC_DEFUN([AC_LIBTOOL_F77], 275295b296d0Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 275395b296d0Smrg])# AC_LIBTOOL_F77 275495b296d0Smrg 275595b296d0Smrg 275695b296d0Smrg# _LT_AC_LANG_F77 275795b296d0Smrg# --------------- 275895b296d0SmrgAC_DEFUN([_LT_AC_LANG_F77], 275995b296d0Smrg[AC_REQUIRE([AC_PROG_F77]) 276095b296d0Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 276195b296d0Smrg])# _LT_AC_LANG_F77 276295b296d0Smrg 276395b296d0Smrg 276495b296d0Smrg# AC_LIBTOOL_GCJ 276595b296d0Smrg# -------------- 276695b296d0Smrg# enable support for GCJ libraries 276795b296d0SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 276895b296d0Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 276995b296d0Smrg])# AC_LIBTOOL_GCJ 277095b296d0Smrg 277195b296d0Smrg 277295b296d0Smrg# _LT_AC_LANG_GCJ 277395b296d0Smrg# --------------- 277495b296d0SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 277595b296d0Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 277695b296d0Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 277795b296d0Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 277895b296d0Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 277995b296d0Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 278095b296d0Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 278195b296d0Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 278295b296d0Smrg])# _LT_AC_LANG_GCJ 278395b296d0Smrg 278495b296d0Smrg 278595b296d0Smrg# AC_LIBTOOL_RC 278695b296d0Smrg# ------------- 278795b296d0Smrg# enable support for Windows resource files 278895b296d0SmrgAC_DEFUN([AC_LIBTOOL_RC], 278995b296d0Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 279095b296d0Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 279195b296d0Smrg])# AC_LIBTOOL_RC 279295b296d0Smrg 279395b296d0Smrg 279495b296d0Smrg# AC_LIBTOOL_LANG_C_CONFIG 279595b296d0Smrg# ------------------------ 279695b296d0Smrg# Ensure that the configuration vars for the C compiler are 279795b296d0Smrg# suitably defined. Those variables are subsequently used by 279895b296d0Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 279995b296d0SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 280095b296d0SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 280195b296d0Smrg[lt_save_CC="$CC" 280295b296d0SmrgAC_LANG_PUSH(C) 280395b296d0Smrg 280495b296d0Smrg# Source file extension for C test sources. 280595b296d0Smrgac_ext=c 280695b296d0Smrg 280795b296d0Smrg# Object file extension for compiled C test sources. 280895b296d0Smrgobjext=o 280995b296d0Smrg_LT_AC_TAGVAR(objext, $1)=$objext 281095b296d0Smrg 281195b296d0Smrg# Code to be used in simple compile tests 2812ff89ac2bSmrglt_simple_compile_test_code="int some_variable = 0;" 281395b296d0Smrg 281495b296d0Smrg# Code to be used in simple link tests 2815ff89ac2bSmrglt_simple_link_test_code='int main(){return(0);}' 281695b296d0Smrg 281795b296d0Smrg_LT_AC_SYS_COMPILER 281895b296d0Smrg 281995b296d0Smrg# save warnings/boilerplate of simple test code 282095b296d0Smrg_LT_COMPILER_BOILERPLATE 282195b296d0Smrg_LT_LINKER_BOILERPLATE 282295b296d0Smrg 282395b296d0SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 282495b296d0SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 282595b296d0SmrgAC_LIBTOOL_PROG_CC_C_O($1) 282695b296d0SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 282795b296d0SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 282895b296d0SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 282995b296d0SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 283095b296d0SmrgAC_LIBTOOL_SYS_LIB_STRIP 283195b296d0SmrgAC_LIBTOOL_DLOPEN_SELF 283295b296d0Smrg 283395b296d0Smrg# Report which library types will actually be built 283495b296d0SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 283595b296d0SmrgAC_MSG_RESULT([$can_build_shared]) 283695b296d0Smrg 283795b296d0SmrgAC_MSG_CHECKING([whether to build shared libraries]) 283895b296d0Smrgtest "$can_build_shared" = "no" && enable_shared=no 283995b296d0Smrg 284095b296d0Smrg# On AIX, shared libraries and static libraries use the same namespace, and 284195b296d0Smrg# are all built from PIC. 284295b296d0Smrgcase $host_os in 284395b296d0Smrgaix3*) 284495b296d0Smrg test "$enable_shared" = yes && enable_static=no 284595b296d0Smrg if test -n "$RANLIB"; then 284695b296d0Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 284795b296d0Smrg postinstall_cmds='$RANLIB $lib' 284895b296d0Smrg fi 284995b296d0Smrg ;; 285095b296d0Smrg 2851ff89ac2bSmrgaix[[4-9]]*) 285295b296d0Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 285395b296d0Smrg test "$enable_shared" = yes && enable_static=no 285495b296d0Smrg fi 285595b296d0Smrg ;; 285695b296d0Smrgesac 285795b296d0SmrgAC_MSG_RESULT([$enable_shared]) 285895b296d0Smrg 285995b296d0SmrgAC_MSG_CHECKING([whether to build static libraries]) 286095b296d0Smrg# Make sure either enable_shared or enable_static is yes. 286195b296d0Smrgtest "$enable_shared" = yes || enable_static=yes 286295b296d0SmrgAC_MSG_RESULT([$enable_static]) 286395b296d0Smrg 286495b296d0SmrgAC_LIBTOOL_CONFIG($1) 286595b296d0Smrg 286695b296d0SmrgAC_LANG_POP 286795b296d0SmrgCC="$lt_save_CC" 286895b296d0Smrg])# AC_LIBTOOL_LANG_C_CONFIG 286995b296d0Smrg 287095b296d0Smrg 287195b296d0Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 287295b296d0Smrg# -------------------------- 287395b296d0Smrg# Ensure that the configuration vars for the C compiler are 287495b296d0Smrg# suitably defined. Those variables are subsequently used by 287595b296d0Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 287695b296d0SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 287795b296d0SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 287895b296d0Smrg[AC_LANG_PUSH(C++) 287995b296d0SmrgAC_REQUIRE([AC_PROG_CXX]) 288095b296d0SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 288195b296d0Smrg 288295b296d0Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 288395b296d0Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 288495b296d0Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 288595b296d0Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 288695b296d0Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 288795b296d0Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 288895b296d0Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 288995b296d0Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 289095b296d0Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 289195b296d0Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 289295b296d0Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 289395b296d0Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 289495b296d0Smrg_LT_AC_TAGVAR(module_cmds, $1)= 289595b296d0Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 289695b296d0Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 289795b296d0Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 289895b296d0Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 289995b296d0Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 290095b296d0Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 290195b296d0Smrg 290295b296d0Smrg# Dependencies to place before and after the object being linked: 290395b296d0Smrg_LT_AC_TAGVAR(predep_objects, $1)= 290495b296d0Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 290595b296d0Smrg_LT_AC_TAGVAR(predeps, $1)= 290695b296d0Smrg_LT_AC_TAGVAR(postdeps, $1)= 290795b296d0Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 2908ff89ac2bSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 290995b296d0Smrg 291095b296d0Smrg# Source file extension for C++ test sources. 291195b296d0Smrgac_ext=cpp 291295b296d0Smrg 291395b296d0Smrg# Object file extension for compiled C++ test sources. 291495b296d0Smrgobjext=o 291595b296d0Smrg_LT_AC_TAGVAR(objext, $1)=$objext 291695b296d0Smrg 291795b296d0Smrg# Code to be used in simple compile tests 2918ff89ac2bSmrglt_simple_compile_test_code="int some_variable = 0;" 291995b296d0Smrg 292095b296d0Smrg# Code to be used in simple link tests 2921ff89ac2bSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 292295b296d0Smrg 292395b296d0Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 292495b296d0Smrg_LT_AC_SYS_COMPILER 292595b296d0Smrg 292695b296d0Smrg# save warnings/boilerplate of simple test code 292795b296d0Smrg_LT_COMPILER_BOILERPLATE 292895b296d0Smrg_LT_LINKER_BOILERPLATE 292995b296d0Smrg 293095b296d0Smrg# Allow CC to be a program name with arguments. 293195b296d0Smrglt_save_CC=$CC 293295b296d0Smrglt_save_LD=$LD 293395b296d0Smrglt_save_GCC=$GCC 293495b296d0SmrgGCC=$GXX 293595b296d0Smrglt_save_with_gnu_ld=$with_gnu_ld 293695b296d0Smrglt_save_path_LD=$lt_cv_path_LD 293795b296d0Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 293895b296d0Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 293995b296d0Smrgelse 294095b296d0Smrg $as_unset lt_cv_prog_gnu_ld 294195b296d0Smrgfi 294295b296d0Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 294395b296d0Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 294495b296d0Smrgelse 294595b296d0Smrg $as_unset lt_cv_path_LD 294695b296d0Smrgfi 294795b296d0Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 294895b296d0SmrgCC=${CXX-"c++"} 294995b296d0Smrgcompiler=$CC 295095b296d0Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 295195b296d0Smrg_LT_CC_BASENAME([$compiler]) 295295b296d0Smrg 295395b296d0Smrg# We don't want -fno-exception wen compiling C++ code, so set the 295495b296d0Smrg# no_builtin_flag separately 295595b296d0Smrgif test "$GXX" = yes; then 295695b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 295795b296d0Smrgelse 295895b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 295995b296d0Smrgfi 296095b296d0Smrg 296195b296d0Smrgif test "$GXX" = yes; then 296295b296d0Smrg # Set up default GNU C++ configuration 296395b296d0Smrg 296495b296d0Smrg AC_PROG_LD 296595b296d0Smrg 296695b296d0Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 296795b296d0Smrg # archiving commands below assume that GNU ld is being used. 296895b296d0Smrg if test "$with_gnu_ld" = yes; then 296995b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 297095b296d0Smrg _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' 297195b296d0Smrg 297295b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 297395b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 297495b296d0Smrg 297595b296d0Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 297695b296d0Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 297795b296d0Smrg # investigate it a little bit more. (MM) 297895b296d0Smrg wlarc='${wl}' 297995b296d0Smrg 298095b296d0Smrg # ancient GNU ld didn't support --whole-archive et. al. 298195b296d0Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 298295b296d0Smrg grep 'no-whole-archive' > /dev/null; then 298395b296d0Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 298495b296d0Smrg else 298595b296d0Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 298695b296d0Smrg fi 298795b296d0Smrg else 298895b296d0Smrg with_gnu_ld=no 298995b296d0Smrg wlarc= 299095b296d0Smrg 299195b296d0Smrg # A generic and very simple default shared library creation 299295b296d0Smrg # command for GNU C++ for the case where it uses the native 299395b296d0Smrg # linker, instead of GNU ld. If possible, this setting should 299495b296d0Smrg # overridden to take advantage of the native linker features on 299595b296d0Smrg # the platform it is being used on. 299695b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 299795b296d0Smrg fi 299895b296d0Smrg 299995b296d0Smrg # Commands to make compiler produce verbose output that lists 300095b296d0Smrg # what "hidden" libraries, object files and flags are used when 300195b296d0Smrg # linking a shared library. 300295b296d0Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 300395b296d0Smrg 300495b296d0Smrgelse 300595b296d0Smrg GXX=no 300695b296d0Smrg with_gnu_ld=no 300795b296d0Smrg wlarc= 300895b296d0Smrgfi 300995b296d0Smrg 301095b296d0Smrg# PORTME: fill in a description of your system's C++ link characteristics 301195b296d0SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 301295b296d0Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 301395b296d0Smrgcase $host_os in 301495b296d0Smrg aix3*) 301595b296d0Smrg # FIXME: insert proper C++ library support 301695b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 301795b296d0Smrg ;; 3018ff89ac2bSmrg aix[[4-9]]*) 301995b296d0Smrg if test "$host_cpu" = ia64; then 302095b296d0Smrg # On IA64, the linker does run time linking by default, so we don't 302195b296d0Smrg # have to do anything special. 302295b296d0Smrg aix_use_runtimelinking=no 302395b296d0Smrg exp_sym_flag='-Bexport' 302495b296d0Smrg no_entry_flag="" 302595b296d0Smrg else 302695b296d0Smrg aix_use_runtimelinking=no 302795b296d0Smrg 302895b296d0Smrg # Test if we are trying to use run time linking or normal 302995b296d0Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 303095b296d0Smrg # need to do runtime linking. 3031ff89ac2bSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 303295b296d0Smrg for ld_flag in $LDFLAGS; do 303395b296d0Smrg case $ld_flag in 303495b296d0Smrg *-brtl*) 303595b296d0Smrg aix_use_runtimelinking=yes 303695b296d0Smrg break 303795b296d0Smrg ;; 303895b296d0Smrg esac 303995b296d0Smrg done 304095b296d0Smrg ;; 304195b296d0Smrg esac 304295b296d0Smrg 304395b296d0Smrg exp_sym_flag='-bexport' 304495b296d0Smrg no_entry_flag='-bnoentry' 304595b296d0Smrg fi 304695b296d0Smrg 304795b296d0Smrg # When large executables or shared objects are built, AIX ld can 304895b296d0Smrg # have problems creating the table of contents. If linking a library 304995b296d0Smrg # or program results in "error TOC overflow" add -mminimal-toc to 305095b296d0Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 305195b296d0Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 305295b296d0Smrg 305395b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 305495b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 305595b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 305695b296d0Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 305795b296d0Smrg 305895b296d0Smrg if test "$GXX" = yes; then 305995b296d0Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 306095b296d0Smrg # We only want to do this on AIX 4.2 and lower, the check 306195b296d0Smrg # below for broken collect2 doesn't work under 4.3+ 306295b296d0Smrg collect2name=`${CC} -print-prog-name=collect2` 306395b296d0Smrg if test -f "$collect2name" && \ 306495b296d0Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 306595b296d0Smrg then 306695b296d0Smrg # We have reworked collect2 3067ff89ac2bSmrg : 306895b296d0Smrg else 306995b296d0Smrg # We have old collect2 307095b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 307195b296d0Smrg # It fails to find uninstalled libraries when the uninstalled 307295b296d0Smrg # path is not listed in the libpath. Setting hardcode_minus_L 307395b296d0Smrg # to unsupported forces relinking 307495b296d0Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 307595b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 307695b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 307795b296d0Smrg fi 307895b296d0Smrg ;; 307995b296d0Smrg esac 308095b296d0Smrg shared_flag='-shared' 308195b296d0Smrg if test "$aix_use_runtimelinking" = yes; then 308295b296d0Smrg shared_flag="$shared_flag "'${wl}-G' 308395b296d0Smrg fi 308495b296d0Smrg else 308595b296d0Smrg # not using gcc 308695b296d0Smrg if test "$host_cpu" = ia64; then 308795b296d0Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 308895b296d0Smrg # chokes on -Wl,-G. The following line is correct: 308995b296d0Smrg shared_flag='-G' 309095b296d0Smrg else 309195b296d0Smrg if test "$aix_use_runtimelinking" = yes; then 309295b296d0Smrg shared_flag='${wl}-G' 309395b296d0Smrg else 309495b296d0Smrg shared_flag='${wl}-bM:SRE' 309595b296d0Smrg fi 309695b296d0Smrg fi 309795b296d0Smrg fi 309895b296d0Smrg 309995b296d0Smrg # It seems that -bexpall does not export symbols beginning with 310095b296d0Smrg # underscore (_), so it is better to generate a list of symbols to export. 310195b296d0Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 310295b296d0Smrg if test "$aix_use_runtimelinking" = yes; then 310395b296d0Smrg # Warning - without using the other runtime loading flags (-brtl), 310495b296d0Smrg # -berok will link without error, but may produce a broken library. 310595b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 310695b296d0Smrg # Determine the default libpath from the value encoded in an empty executable. 310795b296d0Smrg _LT_AC_SYS_LIBPATH_AIX 310895b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 310995b296d0Smrg 311095b296d0Smrg _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" 311195b296d0Smrg else 311295b296d0Smrg if test "$host_cpu" = ia64; then 311395b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 311495b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 311595b296d0Smrg _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" 311695b296d0Smrg else 311795b296d0Smrg # Determine the default libpath from the value encoded in an empty executable. 311895b296d0Smrg _LT_AC_SYS_LIBPATH_AIX 311995b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 312095b296d0Smrg # Warning - without using the other run time loading flags, 312195b296d0Smrg # -berok will link without error, but may produce a broken library. 312295b296d0Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 312395b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 312495b296d0Smrg # Exported symbols can be pulled into shared objects from archives 312595b296d0Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 312695b296d0Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 312795b296d0Smrg # This is similar to how AIX traditionally builds its shared libraries. 312895b296d0Smrg _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' 312995b296d0Smrg fi 313095b296d0Smrg fi 313195b296d0Smrg ;; 313295b296d0Smrg 313395b296d0Smrg beos*) 313495b296d0Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 313595b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 313695b296d0Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 313795b296d0Smrg # support --undefined. This deserves some investigation. FIXME 313895b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 313995b296d0Smrg else 314095b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 314195b296d0Smrg fi 314295b296d0Smrg ;; 314395b296d0Smrg 314495b296d0Smrg chorus*) 314595b296d0Smrg case $cc_basename in 314695b296d0Smrg *) 314795b296d0Smrg # FIXME: insert proper C++ library support 314895b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 314995b296d0Smrg ;; 315095b296d0Smrg esac 315195b296d0Smrg ;; 315295b296d0Smrg 315395b296d0Smrg cygwin* | mingw* | pw32*) 315495b296d0Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 315595b296d0Smrg # as there is no search path for DLLs. 315695b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 315795b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 315895b296d0Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 315995b296d0Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 316095b296d0Smrg 316195b296d0Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 316295b296d0Smrg _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' 316395b296d0Smrg # If the export-symbols file already is a .def file (1st line 316495b296d0Smrg # is EXPORTS), use it as is; otherwise, prepend... 316595b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 316695b296d0Smrg cp $export_symbols $output_objdir/$soname.def; 316795b296d0Smrg else 316895b296d0Smrg echo EXPORTS > $output_objdir/$soname.def; 316995b296d0Smrg cat $export_symbols >> $output_objdir/$soname.def; 317095b296d0Smrg fi~ 317195b296d0Smrg $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' 317295b296d0Smrg else 317395b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 317495b296d0Smrg fi 317595b296d0Smrg ;; 317695b296d0Smrg darwin* | rhapsody*) 317795b296d0Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 317895b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 317995b296d0Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 318095b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 318195b296d0Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 318295b296d0Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3183ff89ac2bSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3184ff89ac2bSmrg if test "$GXX" = yes ; then 318595b296d0Smrg output_verbose_link_cmd='echo' 3186ff89ac2bSmrg _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}" 3187ff89ac2bSmrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3188ff89ac2bSmrg _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}" 3189ff89ac2bSmrg _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}" 3190ff89ac2bSmrg if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3191ff89ac2bSmrg _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}" 3192ff89ac2bSmrg _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}" 319395b296d0Smrg fi 319495b296d0Smrg else 319595b296d0Smrg case $cc_basename in 319695b296d0Smrg xlc*) 319795b296d0Smrg output_verbose_link_cmd='echo' 3198ff89ac2bSmrg _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' 319995b296d0Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 320095b296d0Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3201ff89ac2bSmrg _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}' 320295b296d0Smrg _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}' 320395b296d0Smrg ;; 320495b296d0Smrg *) 320595b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 320695b296d0Smrg ;; 320795b296d0Smrg esac 320895b296d0Smrg fi 320995b296d0Smrg ;; 321095b296d0Smrg 321195b296d0Smrg dgux*) 321295b296d0Smrg case $cc_basename in 321395b296d0Smrg ec++*) 321495b296d0Smrg # FIXME: insert proper C++ library support 321595b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 321695b296d0Smrg ;; 321795b296d0Smrg ghcx*) 321895b296d0Smrg # Green Hills C++ Compiler 321995b296d0Smrg # FIXME: insert proper C++ library support 322095b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 322195b296d0Smrg ;; 322295b296d0Smrg *) 322395b296d0Smrg # FIXME: insert proper C++ library support 322495b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 322595b296d0Smrg ;; 322695b296d0Smrg esac 322795b296d0Smrg ;; 322895b296d0Smrg freebsd[[12]]*) 322995b296d0Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 323095b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 323195b296d0Smrg ;; 323295b296d0Smrg freebsd-elf*) 323395b296d0Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 323495b296d0Smrg ;; 3235ff89ac2bSmrg freebsd* | dragonfly*) 323695b296d0Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 323795b296d0Smrg # conventions 323895b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 323995b296d0Smrg ;; 324095b296d0Smrg gnu*) 324195b296d0Smrg ;; 324295b296d0Smrg hpux9*) 324395b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 324495b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 324595b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 324695b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 324795b296d0Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 324895b296d0Smrg # but as the default 324995b296d0Smrg # location of the library. 325095b296d0Smrg 325195b296d0Smrg case $cc_basename in 325295b296d0Smrg CC*) 325395b296d0Smrg # FIXME: insert proper C++ library support 325495b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 325595b296d0Smrg ;; 325695b296d0Smrg aCC*) 325795b296d0Smrg _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' 325895b296d0Smrg # Commands to make compiler produce verbose output that lists 325995b296d0Smrg # what "hidden" libraries, object files and flags are used when 326095b296d0Smrg # linking a shared library. 326195b296d0Smrg # 326295b296d0Smrg # There doesn't appear to be a way to prevent this compiler from 326395b296d0Smrg # explicitly linking system object files so we need to strip them 326495b296d0Smrg # from the output so that they don't get included in the library 326595b296d0Smrg # dependencies. 326695b296d0Smrg 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' 326795b296d0Smrg ;; 326895b296d0Smrg *) 326995b296d0Smrg if test "$GXX" = yes; then 327095b296d0Smrg _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' 327195b296d0Smrg else 327295b296d0Smrg # FIXME: insert proper C++ library support 327395b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 327495b296d0Smrg fi 327595b296d0Smrg ;; 327695b296d0Smrg esac 327795b296d0Smrg ;; 327895b296d0Smrg hpux10*|hpux11*) 327995b296d0Smrg if test $with_gnu_ld = no; then 328095b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 328195b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 328295b296d0Smrg 328395b296d0Smrg case $host_cpu in 3284ff89ac2bSmrg hppa*64*|ia64*) ;; 328595b296d0Smrg *) 328695b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 328795b296d0Smrg ;; 328895b296d0Smrg esac 328995b296d0Smrg fi 329095b296d0Smrg case $host_cpu in 329195b296d0Smrg hppa*64*|ia64*) 329295b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 329395b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 329495b296d0Smrg ;; 329595b296d0Smrg *) 329695b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 329795b296d0Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 329895b296d0Smrg # but as the default 329995b296d0Smrg # location of the library. 330095b296d0Smrg ;; 330195b296d0Smrg esac 330295b296d0Smrg 330395b296d0Smrg case $cc_basename in 330495b296d0Smrg CC*) 330595b296d0Smrg # FIXME: insert proper C++ library support 330695b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 330795b296d0Smrg ;; 330895b296d0Smrg aCC*) 330995b296d0Smrg case $host_cpu in 331095b296d0Smrg hppa*64*) 331195b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 331295b296d0Smrg ;; 331395b296d0Smrg ia64*) 331495b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 331595b296d0Smrg ;; 331695b296d0Smrg *) 331795b296d0Smrg _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' 331895b296d0Smrg ;; 331995b296d0Smrg esac 332095b296d0Smrg # Commands to make compiler produce verbose output that lists 332195b296d0Smrg # what "hidden" libraries, object files and flags are used when 332295b296d0Smrg # linking a shared library. 332395b296d0Smrg # 332495b296d0Smrg # There doesn't appear to be a way to prevent this compiler from 332595b296d0Smrg # explicitly linking system object files so we need to strip them 332695b296d0Smrg # from the output so that they don't get included in the library 332795b296d0Smrg # dependencies. 332895b296d0Smrg 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' 332995b296d0Smrg ;; 333095b296d0Smrg *) 333195b296d0Smrg if test "$GXX" = yes; then 333295b296d0Smrg if test $with_gnu_ld = no; then 333395b296d0Smrg case $host_cpu in 333495b296d0Smrg hppa*64*) 333595b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 333695b296d0Smrg ;; 333795b296d0Smrg ia64*) 333895b296d0Smrg _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' 333995b296d0Smrg ;; 334095b296d0Smrg *) 334195b296d0Smrg _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' 334295b296d0Smrg ;; 334395b296d0Smrg esac 334495b296d0Smrg fi 334595b296d0Smrg else 334695b296d0Smrg # FIXME: insert proper C++ library support 334795b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 334895b296d0Smrg fi 334995b296d0Smrg ;; 335095b296d0Smrg esac 335195b296d0Smrg ;; 3352ff89ac2bSmrg interix[[3-9]]*) 335395b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 335495b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 335595b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 335695b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 335795b296d0Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 335895b296d0Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 335995b296d0Smrg # default) and relocated if they conflict, which is a slow very memory 336095b296d0Smrg # consuming and fragmenting process. To avoid this, we pick a random, 336195b296d0Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 336295b296d0Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 336395b296d0Smrg _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' 336495b296d0Smrg _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' 336595b296d0Smrg ;; 336695b296d0Smrg irix5* | irix6*) 336795b296d0Smrg case $cc_basename in 336895b296d0Smrg CC*) 336995b296d0Smrg # SGI C++ 337095b296d0Smrg _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' 337195b296d0Smrg 337295b296d0Smrg # Archives containing C++ object files must be created using 337395b296d0Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 337495b296d0Smrg # necessary to make sure instantiated templates are included 337595b296d0Smrg # in the archive. 337695b296d0Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 337795b296d0Smrg ;; 337895b296d0Smrg *) 337995b296d0Smrg if test "$GXX" = yes; then 338095b296d0Smrg if test "$with_gnu_ld" = no; then 338195b296d0Smrg _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' 338295b296d0Smrg else 338395b296d0Smrg _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' 338495b296d0Smrg fi 338595b296d0Smrg fi 338695b296d0Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 338795b296d0Smrg ;; 338895b296d0Smrg esac 338995b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 339095b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 339195b296d0Smrg ;; 3392ff89ac2bSmrg linux* | k*bsd*-gnu) 339395b296d0Smrg case $cc_basename in 339495b296d0Smrg KCC*) 339595b296d0Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 339695b296d0Smrg 339795b296d0Smrg # KCC will only create a shared library if the output file 339895b296d0Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 339995b296d0Smrg # to its proper name (with version) after linking. 340095b296d0Smrg _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' 340195b296d0Smrg _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' 340295b296d0Smrg # Commands to make compiler produce verbose output that lists 340395b296d0Smrg # what "hidden" libraries, object files and flags are used when 340495b296d0Smrg # linking a shared library. 340595b296d0Smrg # 340695b296d0Smrg # There doesn't appear to be a way to prevent this compiler from 340795b296d0Smrg # explicitly linking system object files so we need to strip them 340895b296d0Smrg # from the output so that they don't get included in the library 340995b296d0Smrg # dependencies. 341095b296d0Smrg 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' 341195b296d0Smrg 341295b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 341395b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 341495b296d0Smrg 341595b296d0Smrg # Archives containing C++ object files must be created using 341695b296d0Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 341795b296d0Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 341895b296d0Smrg ;; 341995b296d0Smrg icpc*) 342095b296d0Smrg # Intel C++ 342195b296d0Smrg with_gnu_ld=yes 342295b296d0Smrg # version 8.0 and above of icpc choke on multiply defined symbols 342395b296d0Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 342495b296d0Smrg # earlier do not add the objects themselves. 342595b296d0Smrg case `$CC -V 2>&1` in 342695b296d0Smrg *"Version 7."*) 342795b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 342895b296d0Smrg _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' 342995b296d0Smrg ;; 343095b296d0Smrg *) # Version 8.0 or newer 343195b296d0Smrg tmp_idyn= 343295b296d0Smrg case $host_cpu in 343395b296d0Smrg ia64*) tmp_idyn=' -i_dynamic';; 343495b296d0Smrg esac 343595b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 343695b296d0Smrg _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' 343795b296d0Smrg ;; 343895b296d0Smrg esac 343995b296d0Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 344095b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 344195b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 344295b296d0Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 344395b296d0Smrg ;; 3444ff89ac2bSmrg pgCC* | pgcpp*) 344595b296d0Smrg # Portland Group C++ compiler 344695b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 344795b296d0Smrg _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' 344895b296d0Smrg 344995b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 345095b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 345195b296d0Smrg _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' 345295b296d0Smrg ;; 345395b296d0Smrg cxx*) 345495b296d0Smrg # Compaq C++ 345595b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 345695b296d0Smrg _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' 345795b296d0Smrg 345895b296d0Smrg runpath_var=LD_RUN_PATH 345995b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 346095b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 346195b296d0Smrg 346295b296d0Smrg # Commands to make compiler produce verbose output that lists 346395b296d0Smrg # what "hidden" libraries, object files and flags are used when 346495b296d0Smrg # linking a shared library. 346595b296d0Smrg # 346695b296d0Smrg # There doesn't appear to be a way to prevent this compiler from 346795b296d0Smrg # explicitly linking system object files so we need to strip them 346895b296d0Smrg # from the output so that they don't get included in the library 346995b296d0Smrg # dependencies. 347095b296d0Smrg 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' 347195b296d0Smrg ;; 3472ff89ac2bSmrg *) 3473ff89ac2bSmrg case `$CC -V 2>&1 | sed 5q` in 3474ff89ac2bSmrg *Sun\ C*) 3475ff89ac2bSmrg # Sun C++ 5.9 3476ff89ac2bSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3477ff89ac2bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3478ff89ac2bSmrg _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' 3479ff89ac2bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3480ff89ac2bSmrg _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' 3481ff89ac2bSmrg 3482ff89ac2bSmrg # Not sure whether something based on 3483ff89ac2bSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 3484ff89ac2bSmrg # would be better. 3485ff89ac2bSmrg output_verbose_link_cmd='echo' 3486ff89ac2bSmrg 3487ff89ac2bSmrg # Archives containing C++ object files must be created using 3488ff89ac2bSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 3489ff89ac2bSmrg # necessary to make sure instantiated templates are included 3490ff89ac2bSmrg # in the archive. 3491ff89ac2bSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3492ff89ac2bSmrg ;; 3493ff89ac2bSmrg esac 3494ff89ac2bSmrg ;; 349595b296d0Smrg esac 349695b296d0Smrg ;; 349795b296d0Smrg lynxos*) 349895b296d0Smrg # FIXME: insert proper C++ library support 349995b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 350095b296d0Smrg ;; 350195b296d0Smrg m88k*) 350295b296d0Smrg # FIXME: insert proper C++ library support 350395b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 350495b296d0Smrg ;; 350595b296d0Smrg mvs*) 350695b296d0Smrg case $cc_basename in 350795b296d0Smrg cxx*) 350895b296d0Smrg # FIXME: insert proper C++ library support 350995b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 351095b296d0Smrg ;; 351195b296d0Smrg *) 351295b296d0Smrg # FIXME: insert proper C++ library support 351395b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 351495b296d0Smrg ;; 351595b296d0Smrg esac 351695b296d0Smrg ;; 351795b296d0Smrg netbsd*) 351895b296d0Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 351995b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 352095b296d0Smrg wlarc= 352195b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 352295b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 352395b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 352495b296d0Smrg fi 352595b296d0Smrg # Workaround some broken pre-1.5 toolchains 352695b296d0Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 352795b296d0Smrg ;; 352895b296d0Smrg openbsd2*) 352995b296d0Smrg # C++ shared libraries are fairly broken 353095b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 353195b296d0Smrg ;; 353295b296d0Smrg openbsd*) 3533ff89ac2bSmrg if test -f /usr/libexec/ld.so; then 3534ff89ac2bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3535ff89ac2bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3536ff89ac2bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3537ff89ac2bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3538ff89ac2bSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3539ff89ac2bSmrg _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' 3540ff89ac2bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3541ff89ac2bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3542ff89ac2bSmrg fi 3543ff89ac2bSmrg output_verbose_link_cmd='echo' 3544ff89ac2bSmrg else 3545ff89ac2bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 354695b296d0Smrg fi 354795b296d0Smrg ;; 354895b296d0Smrg osf3*) 354995b296d0Smrg case $cc_basename in 355095b296d0Smrg KCC*) 355195b296d0Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 355295b296d0Smrg 355395b296d0Smrg # KCC will only create a shared library if the output file 355495b296d0Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 355595b296d0Smrg # to its proper name (with version) after linking. 355695b296d0Smrg _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' 355795b296d0Smrg 355895b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 355995b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 356095b296d0Smrg 356195b296d0Smrg # Archives containing C++ object files must be created using 356295b296d0Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 356395b296d0Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 356495b296d0Smrg 356595b296d0Smrg ;; 356695b296d0Smrg RCC*) 356795b296d0Smrg # Rational C++ 2.4.1 356895b296d0Smrg # FIXME: insert proper C++ library support 356995b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 357095b296d0Smrg ;; 357195b296d0Smrg cxx*) 357295b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 357395b296d0Smrg _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' 357495b296d0Smrg 357595b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 357695b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 357795b296d0Smrg 357895b296d0Smrg # Commands to make compiler produce verbose output that lists 357995b296d0Smrg # what "hidden" libraries, object files and flags are used when 358095b296d0Smrg # linking a shared library. 358195b296d0Smrg # 358295b296d0Smrg # There doesn't appear to be a way to prevent this compiler from 358395b296d0Smrg # explicitly linking system object files so we need to strip them 358495b296d0Smrg # from the output so that they don't get included in the library 358595b296d0Smrg # dependencies. 358695b296d0Smrg 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' 358795b296d0Smrg ;; 358895b296d0Smrg *) 358995b296d0Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 359095b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 359195b296d0Smrg _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' 359295b296d0Smrg 359395b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 359495b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 359595b296d0Smrg 359695b296d0Smrg # Commands to make compiler produce verbose output that lists 359795b296d0Smrg # what "hidden" libraries, object files and flags are used when 359895b296d0Smrg # linking a shared library. 359995b296d0Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 360095b296d0Smrg 360195b296d0Smrg else 360295b296d0Smrg # FIXME: insert proper C++ library support 360395b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 360495b296d0Smrg fi 360595b296d0Smrg ;; 360695b296d0Smrg esac 360795b296d0Smrg ;; 360895b296d0Smrg osf4* | osf5*) 360995b296d0Smrg case $cc_basename in 361095b296d0Smrg KCC*) 361195b296d0Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 361295b296d0Smrg 361395b296d0Smrg # KCC will only create a shared library if the output file 361495b296d0Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 361595b296d0Smrg # to its proper name (with version) after linking. 361695b296d0Smrg _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' 361795b296d0Smrg 361895b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 361995b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 362095b296d0Smrg 362195b296d0Smrg # Archives containing C++ object files must be created using 362295b296d0Smrg # the KAI C++ compiler. 362395b296d0Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 362495b296d0Smrg ;; 362595b296d0Smrg RCC*) 362695b296d0Smrg # Rational C++ 2.4.1 362795b296d0Smrg # FIXME: insert proper C++ library support 362895b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 362995b296d0Smrg ;; 363095b296d0Smrg cxx*) 363195b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 363295b296d0Smrg _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' 363395b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 363495b296d0Smrg echo "-hidden">> $lib.exp~ 363595b296d0Smrg $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~ 363695b296d0Smrg $rm $lib.exp' 363795b296d0Smrg 363895b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 363995b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 364095b296d0Smrg 364195b296d0Smrg # Commands to make compiler produce verbose output that lists 364295b296d0Smrg # what "hidden" libraries, object files and flags are used when 364395b296d0Smrg # linking a shared library. 364495b296d0Smrg # 364595b296d0Smrg # There doesn't appear to be a way to prevent this compiler from 364695b296d0Smrg # explicitly linking system object files so we need to strip them 364795b296d0Smrg # from the output so that they don't get included in the library 364895b296d0Smrg # dependencies. 364995b296d0Smrg 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' 365095b296d0Smrg ;; 365195b296d0Smrg *) 365295b296d0Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 365395b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 365495b296d0Smrg _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' 365595b296d0Smrg 365695b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 365795b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 365895b296d0Smrg 365995b296d0Smrg # Commands to make compiler produce verbose output that lists 366095b296d0Smrg # what "hidden" libraries, object files and flags are used when 366195b296d0Smrg # linking a shared library. 366295b296d0Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 366395b296d0Smrg 366495b296d0Smrg else 366595b296d0Smrg # FIXME: insert proper C++ library support 366695b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 366795b296d0Smrg fi 366895b296d0Smrg ;; 366995b296d0Smrg esac 367095b296d0Smrg ;; 367195b296d0Smrg psos*) 367295b296d0Smrg # FIXME: insert proper C++ library support 367395b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 367495b296d0Smrg ;; 367595b296d0Smrg sunos4*) 367695b296d0Smrg case $cc_basename in 367795b296d0Smrg CC*) 367895b296d0Smrg # Sun C++ 4.x 367995b296d0Smrg # FIXME: insert proper C++ library support 368095b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 368195b296d0Smrg ;; 368295b296d0Smrg lcc*) 368395b296d0Smrg # Lucid 368495b296d0Smrg # FIXME: insert proper C++ library support 368595b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 368695b296d0Smrg ;; 368795b296d0Smrg *) 368895b296d0Smrg # FIXME: insert proper C++ library support 368995b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 369095b296d0Smrg ;; 369195b296d0Smrg esac 369295b296d0Smrg ;; 369395b296d0Smrg solaris*) 369495b296d0Smrg case $cc_basename in 369595b296d0Smrg CC*) 369695b296d0Smrg # Sun C++ 4.2, 5.x and Centerline C++ 369795b296d0Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 369895b296d0Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 369995b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 370095b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 370195b296d0Smrg $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' 370295b296d0Smrg 370395b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 370495b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 370595b296d0Smrg case $host_os in 370695b296d0Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 370795b296d0Smrg *) 3708ff89ac2bSmrg # The compiler driver will combine and reorder linker options, 3709ff89ac2bSmrg # but understands `-z linker_flag'. 371095b296d0Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 3711ff89ac2bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 371295b296d0Smrg ;; 371395b296d0Smrg esac 371495b296d0Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 371595b296d0Smrg 371695b296d0Smrg output_verbose_link_cmd='echo' 371795b296d0Smrg 371895b296d0Smrg # Archives containing C++ object files must be created using 371995b296d0Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 372095b296d0Smrg # necessary to make sure instantiated templates are included 372195b296d0Smrg # in the archive. 372295b296d0Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 372395b296d0Smrg ;; 372495b296d0Smrg gcx*) 372595b296d0Smrg # Green Hills C++ Compiler 372695b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 372795b296d0Smrg 372895b296d0Smrg # The C++ compiler must be used to create the archive. 372995b296d0Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 373095b296d0Smrg ;; 373195b296d0Smrg *) 373295b296d0Smrg # GNU C++ compiler with Solaris linker 373395b296d0Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 373495b296d0Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 373595b296d0Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 373695b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 373795b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 373895b296d0Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 373995b296d0Smrg 374095b296d0Smrg # Commands to make compiler produce verbose output that lists 374195b296d0Smrg # what "hidden" libraries, object files and flags are used when 374295b296d0Smrg # linking a shared library. 374395b296d0Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 374495b296d0Smrg else 374595b296d0Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 374695b296d0Smrg # platform. 374795b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 374895b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 374995b296d0Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 375095b296d0Smrg 375195b296d0Smrg # Commands to make compiler produce verbose output that lists 375295b296d0Smrg # what "hidden" libraries, object files and flags are used when 375395b296d0Smrg # linking a shared library. 375495b296d0Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 375595b296d0Smrg fi 375695b296d0Smrg 375795b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 3758ff89ac2bSmrg case $host_os in 3759ff89ac2bSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3760ff89ac2bSmrg *) 3761ff89ac2bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 3762ff89ac2bSmrg ;; 3763ff89ac2bSmrg esac 376495b296d0Smrg fi 376595b296d0Smrg ;; 376695b296d0Smrg esac 376795b296d0Smrg ;; 376895b296d0Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 376995b296d0Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 377095b296d0Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 377195b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 377295b296d0Smrg runpath_var='LD_RUN_PATH' 377395b296d0Smrg 377495b296d0Smrg case $cc_basename in 377595b296d0Smrg CC*) 377695b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 377795b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 377895b296d0Smrg ;; 377995b296d0Smrg *) 378095b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 378195b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 378295b296d0Smrg ;; 378395b296d0Smrg esac 378495b296d0Smrg ;; 378595b296d0Smrg sysv5* | sco3.2v5* | sco5v6*) 378695b296d0Smrg # Note: We can NOT use -z defs as we might desire, because we do not 378795b296d0Smrg # link with -lc, and that would cause any symbols used from libc to 378895b296d0Smrg # always be unresolved, which means just about no library would 378995b296d0Smrg # ever link correctly. If we're not using GNU ld we use -z text 379095b296d0Smrg # though, which does catch some bad symbols but isn't as heavy-handed 379195b296d0Smrg # as -z defs. 379295b296d0Smrg # For security reasons, it is highly recommended that you always 379395b296d0Smrg # use absolute paths for naming shared libraries, and exclude the 379495b296d0Smrg # DT_RUNPATH tag from executables and libraries. But doing so 379595b296d0Smrg # requires that you compile everything twice, which is a pain. 379695b296d0Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 379795b296d0Smrg # non-empty value in the environment. Most likely only useful for 379895b296d0Smrg # creating official distributions of packages. 379995b296d0Smrg # This is a hack until libtool officially supports absolute path 380095b296d0Smrg # names for shared libraries. 380195b296d0Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 380295b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 380395b296d0Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 380495b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 380595b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 380695b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 380795b296d0Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 380895b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 380995b296d0Smrg runpath_var='LD_RUN_PATH' 381095b296d0Smrg 381195b296d0Smrg case $cc_basename in 381295b296d0Smrg CC*) 381395b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 381495b296d0Smrg _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' 381595b296d0Smrg ;; 381695b296d0Smrg *) 381795b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 381895b296d0Smrg _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' 381995b296d0Smrg ;; 382095b296d0Smrg esac 382195b296d0Smrg ;; 382295b296d0Smrg tandem*) 382395b296d0Smrg case $cc_basename in 382495b296d0Smrg NCC*) 382595b296d0Smrg # NonStop-UX NCC 3.20 382695b296d0Smrg # FIXME: insert proper C++ library support 382795b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 382895b296d0Smrg ;; 382995b296d0Smrg *) 383095b296d0Smrg # FIXME: insert proper C++ library support 383195b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 383295b296d0Smrg ;; 383395b296d0Smrg esac 383495b296d0Smrg ;; 383595b296d0Smrg vxworks*) 383695b296d0Smrg # FIXME: insert proper C++ library support 383795b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 383895b296d0Smrg ;; 383995b296d0Smrg *) 384095b296d0Smrg # FIXME: insert proper C++ library support 384195b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 384295b296d0Smrg ;; 384395b296d0Smrgesac 384495b296d0SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 384595b296d0Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 384695b296d0Smrg 384795b296d0Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 384895b296d0Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 384995b296d0Smrg 385095b296d0SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 385195b296d0SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 385295b296d0SmrgAC_LIBTOOL_PROG_CC_C_O($1) 385395b296d0SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 385495b296d0SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 385595b296d0SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 385695b296d0SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 385795b296d0Smrg 385895b296d0SmrgAC_LIBTOOL_CONFIG($1) 385995b296d0Smrg 386095b296d0SmrgAC_LANG_POP 386195b296d0SmrgCC=$lt_save_CC 386295b296d0SmrgLDCXX=$LD 386395b296d0SmrgLD=$lt_save_LD 386495b296d0SmrgGCC=$lt_save_GCC 386595b296d0Smrgwith_gnu_ldcxx=$with_gnu_ld 386695b296d0Smrgwith_gnu_ld=$lt_save_with_gnu_ld 386795b296d0Smrglt_cv_path_LDCXX=$lt_cv_path_LD 386895b296d0Smrglt_cv_path_LD=$lt_save_path_LD 386995b296d0Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 387095b296d0Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 387195b296d0Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 387295b296d0Smrg 387395b296d0Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 387495b296d0Smrg# ------------------------------------ 387595b296d0Smrg# Figure out "hidden" library dependencies from verbose 387695b296d0Smrg# compiler output when linking a shared library. 387795b296d0Smrg# Parse the compiler output and extract the necessary 387895b296d0Smrg# objects, libraries and library flags. 3879ff89ac2bSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 3880ff89ac2bSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 388195b296d0Smrgdnl we can't use the lt_simple_compile_test_code here, 388295b296d0Smrgdnl because it contains code intended for an executable, 388395b296d0Smrgdnl not a library. It's possible we should let each 388495b296d0Smrgdnl tag define a new lt_????_link_test_code variable, 388595b296d0Smrgdnl but it's only used here... 388695b296d0Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 388795b296d0Smrgint a; 388895b296d0Smrgvoid foo (void) { a = 0; } 388995b296d0SmrgEOF 389095b296d0Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 389195b296d0Smrgclass Foo 389295b296d0Smrg{ 389395b296d0Smrgpublic: 389495b296d0Smrg Foo (void) { a = 0; } 389595b296d0Smrgprivate: 389695b296d0Smrg int a; 389795b296d0Smrg}; 389895b296d0SmrgEOF 389995b296d0Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 390095b296d0Smrg subroutine foo 390195b296d0Smrg implicit none 390295b296d0Smrg integer*4 a 390395b296d0Smrg a=0 390495b296d0Smrg return 390595b296d0Smrg end 390695b296d0SmrgEOF 390795b296d0Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 390895b296d0Smrgpublic class foo { 390995b296d0Smrg private int a; 391095b296d0Smrg public void bar (void) { 391195b296d0Smrg a = 0; 391295b296d0Smrg } 391395b296d0Smrg}; 391495b296d0SmrgEOF 391595b296d0Smrg]) 391695b296d0Smrgdnl Parse the compiler output and extract the necessary 391795b296d0Smrgdnl objects, libraries and library flags. 391895b296d0Smrgif AC_TRY_EVAL(ac_compile); then 391995b296d0Smrg # Parse the compiler output and extract the necessary 392095b296d0Smrg # objects, libraries and library flags. 392195b296d0Smrg 392295b296d0Smrg # Sentinel used to keep track of whether or not we are before 392395b296d0Smrg # the conftest object file. 392495b296d0Smrg pre_test_object_deps_done=no 392595b296d0Smrg 392695b296d0Smrg # The `*' in the case matches for architectures that use `case' in 392795b296d0Smrg # $output_verbose_cmd can trigger glob expansion during the loop 392895b296d0Smrg # eval without this substitution. 392995b296d0Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 393095b296d0Smrg 393195b296d0Smrg for p in `eval $output_verbose_link_cmd`; do 393295b296d0Smrg case $p in 393395b296d0Smrg 393495b296d0Smrg -L* | -R* | -l*) 393595b296d0Smrg # Some compilers place space between "-{L,R}" and the path. 393695b296d0Smrg # Remove the space. 393795b296d0Smrg if test $p = "-L" \ 393895b296d0Smrg || test $p = "-R"; then 393995b296d0Smrg prev=$p 394095b296d0Smrg continue 394195b296d0Smrg else 394295b296d0Smrg prev= 394395b296d0Smrg fi 394495b296d0Smrg 394595b296d0Smrg if test "$pre_test_object_deps_done" = no; then 394695b296d0Smrg case $p in 394795b296d0Smrg -L* | -R*) 394895b296d0Smrg # Internal compiler library paths should come after those 394995b296d0Smrg # provided the user. The postdeps already come after the 395095b296d0Smrg # user supplied libs so there is no need to process them. 395195b296d0Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 395295b296d0Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 395395b296d0Smrg else 395495b296d0Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 395595b296d0Smrg fi 395695b296d0Smrg ;; 395795b296d0Smrg # The "-l" case would never come before the object being 395895b296d0Smrg # linked, so don't bother handling this case. 395995b296d0Smrg esac 396095b296d0Smrg else 396195b296d0Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 396295b296d0Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 396395b296d0Smrg else 396495b296d0Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 396595b296d0Smrg fi 396695b296d0Smrg fi 396795b296d0Smrg ;; 396895b296d0Smrg 396995b296d0Smrg *.$objext) 397095b296d0Smrg # This assumes that the test object file only shows up 397195b296d0Smrg # once in the compiler output. 397295b296d0Smrg if test "$p" = "conftest.$objext"; then 397395b296d0Smrg pre_test_object_deps_done=yes 397495b296d0Smrg continue 397595b296d0Smrg fi 397695b296d0Smrg 397795b296d0Smrg if test "$pre_test_object_deps_done" = no; then 397895b296d0Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 397995b296d0Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 398095b296d0Smrg else 398195b296d0Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 398295b296d0Smrg fi 398395b296d0Smrg else 398495b296d0Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 398595b296d0Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 398695b296d0Smrg else 398795b296d0Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 398895b296d0Smrg fi 398995b296d0Smrg fi 399095b296d0Smrg ;; 399195b296d0Smrg 399295b296d0Smrg *) ;; # Ignore the rest. 399395b296d0Smrg 399495b296d0Smrg esac 399595b296d0Smrg done 399695b296d0Smrg 399795b296d0Smrg # Clean up. 399895b296d0Smrg rm -f a.out a.exe 399995b296d0Smrgelse 400095b296d0Smrg echo "libtool.m4: error: problem compiling $1 test program" 400195b296d0Smrgfi 400295b296d0Smrg 400395b296d0Smrg$rm -f confest.$objext 400495b296d0Smrg 4005ff89ac2bSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 4006ff89ac2bSmrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 4007ff89ac2bSmrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 4008ff89ac2bSmrgfi 4009ff89ac2bSmrg 401095b296d0Smrg# PORTME: override above test on systems where it is broken 401195b296d0Smrgifelse([$1],[CXX], 401295b296d0Smrg[case $host_os in 4013ff89ac2bSmrginterix[[3-9]]*) 401495b296d0Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 401595b296d0Smrg # hack all around it, let's just trust "g++" to DTRT. 401695b296d0Smrg _LT_AC_TAGVAR(predep_objects,$1)= 401795b296d0Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 401895b296d0Smrg _LT_AC_TAGVAR(postdeps,$1)= 401995b296d0Smrg ;; 402095b296d0Smrg 4021ff89ac2bSmrglinux*) 4022ff89ac2bSmrg case `$CC -V 2>&1 | sed 5q` in 4023ff89ac2bSmrg *Sun\ C*) 4024ff89ac2bSmrg # Sun C++ 5.9 4025ff89ac2bSmrg # 4026ff89ac2bSmrg # The more standards-conforming stlport4 library is 4027ff89ac2bSmrg # incompatible with the Cstd library. Avoid specifying 4028ff89ac2bSmrg # it if it's in CXXFLAGS. Ignore libCrun as 4029ff89ac2bSmrg # -library=stlport4 depends on it. 4030ff89ac2bSmrg case " $CXX $CXXFLAGS " in 4031ff89ac2bSmrg *" -library=stlport4 "*) 4032ff89ac2bSmrg solaris_use_stlport4=yes 4033ff89ac2bSmrg ;; 4034ff89ac2bSmrg esac 4035ff89ac2bSmrg if test "$solaris_use_stlport4" != yes; then 4036ff89ac2bSmrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 4037ff89ac2bSmrg fi 4038ff89ac2bSmrg ;; 4039ff89ac2bSmrg esac 4040ff89ac2bSmrg ;; 4041ff89ac2bSmrg 404295b296d0Smrgsolaris*) 404395b296d0Smrg case $cc_basename in 404495b296d0Smrg CC*) 4045ff89ac2bSmrg # The more standards-conforming stlport4 library is 4046ff89ac2bSmrg # incompatible with the Cstd library. Avoid specifying 4047ff89ac2bSmrg # it if it's in CXXFLAGS. Ignore libCrun as 4048ff89ac2bSmrg # -library=stlport4 depends on it. 4049ff89ac2bSmrg case " $CXX $CXXFLAGS " in 4050ff89ac2bSmrg *" -library=stlport4 "*) 4051ff89ac2bSmrg solaris_use_stlport4=yes 4052ff89ac2bSmrg ;; 4053ff89ac2bSmrg esac 4054ff89ac2bSmrg 405595b296d0Smrg # Adding this requires a known-good setup of shared libraries for 405695b296d0Smrg # Sun compiler versions before 5.6, else PIC objects from an old 405795b296d0Smrg # archive will be linked into the output, leading to subtle bugs. 4058ff89ac2bSmrg if test "$solaris_use_stlport4" != yes; then 4059ff89ac2bSmrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 4060ff89ac2bSmrg fi 406195b296d0Smrg ;; 406295b296d0Smrg esac 406395b296d0Smrg ;; 406495b296d0Smrgesac 406595b296d0Smrg]) 406695b296d0Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 406795b296d0Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 406895b296d0Smrgesac 406995b296d0Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 407095b296d0Smrg 407195b296d0Smrg# AC_LIBTOOL_LANG_F77_CONFIG 407295b296d0Smrg# -------------------------- 407395b296d0Smrg# Ensure that the configuration vars for the C compiler are 407495b296d0Smrg# suitably defined. Those variables are subsequently used by 407595b296d0Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 407695b296d0SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 407795b296d0SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 407895b296d0Smrg[AC_REQUIRE([AC_PROG_F77]) 407995b296d0SmrgAC_LANG_PUSH(Fortran 77) 408095b296d0Smrg 408195b296d0Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 408295b296d0Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 408395b296d0Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 408495b296d0Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 408595b296d0Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 408695b296d0Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 408795b296d0Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 408895b296d0Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 408995b296d0Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 409095b296d0Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 409195b296d0Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 409295b296d0Smrg_LT_AC_TAGVAR(module_cmds, $1)= 409395b296d0Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 409495b296d0Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 409595b296d0Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 409695b296d0Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 409795b296d0Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 409895b296d0Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 409995b296d0Smrg 410095b296d0Smrg# Source file extension for f77 test sources. 410195b296d0Smrgac_ext=f 410295b296d0Smrg 410395b296d0Smrg# Object file extension for compiled f77 test sources. 410495b296d0Smrgobjext=o 410595b296d0Smrg_LT_AC_TAGVAR(objext, $1)=$objext 410695b296d0Smrg 410795b296d0Smrg# Code to be used in simple compile tests 4108ff89ac2bSmrglt_simple_compile_test_code="\ 4109ff89ac2bSmrg subroutine t 4110ff89ac2bSmrg return 4111ff89ac2bSmrg end 4112ff89ac2bSmrg" 411395b296d0Smrg 411495b296d0Smrg# Code to be used in simple link tests 4115ff89ac2bSmrglt_simple_link_test_code="\ 4116ff89ac2bSmrg program t 4117ff89ac2bSmrg end 4118ff89ac2bSmrg" 411995b296d0Smrg 412095b296d0Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 412195b296d0Smrg_LT_AC_SYS_COMPILER 412295b296d0Smrg 412395b296d0Smrg# save warnings/boilerplate of simple test code 412495b296d0Smrg_LT_COMPILER_BOILERPLATE 412595b296d0Smrg_LT_LINKER_BOILERPLATE 412695b296d0Smrg 412795b296d0Smrg# Allow CC to be a program name with arguments. 412895b296d0Smrglt_save_CC="$CC" 412995b296d0SmrgCC=${F77-"f77"} 413095b296d0Smrgcompiler=$CC 413195b296d0Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 413295b296d0Smrg_LT_CC_BASENAME([$compiler]) 413395b296d0Smrg 413495b296d0SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 413595b296d0SmrgAC_MSG_RESULT([$can_build_shared]) 413695b296d0Smrg 413795b296d0SmrgAC_MSG_CHECKING([whether to build shared libraries]) 413895b296d0Smrgtest "$can_build_shared" = "no" && enable_shared=no 413995b296d0Smrg 414095b296d0Smrg# On AIX, shared libraries and static libraries use the same namespace, and 414195b296d0Smrg# are all built from PIC. 414295b296d0Smrgcase $host_os in 414395b296d0Smrgaix3*) 414495b296d0Smrg test "$enable_shared" = yes && enable_static=no 414595b296d0Smrg if test -n "$RANLIB"; then 414695b296d0Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 414795b296d0Smrg postinstall_cmds='$RANLIB $lib' 414895b296d0Smrg fi 414995b296d0Smrg ;; 4150ff89ac2bSmrgaix[[4-9]]*) 415195b296d0Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 415295b296d0Smrg test "$enable_shared" = yes && enable_static=no 415395b296d0Smrg fi 415495b296d0Smrg ;; 415595b296d0Smrgesac 415695b296d0SmrgAC_MSG_RESULT([$enable_shared]) 415795b296d0Smrg 415895b296d0SmrgAC_MSG_CHECKING([whether to build static libraries]) 415995b296d0Smrg# Make sure either enable_shared or enable_static is yes. 416095b296d0Smrgtest "$enable_shared" = yes || enable_static=yes 416195b296d0SmrgAC_MSG_RESULT([$enable_static]) 416295b296d0Smrg 416395b296d0Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 416495b296d0Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 416595b296d0Smrg 416695b296d0SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 416795b296d0SmrgAC_LIBTOOL_PROG_CC_C_O($1) 416895b296d0SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 416995b296d0SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 417095b296d0SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 417195b296d0SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 417295b296d0Smrg 417395b296d0SmrgAC_LIBTOOL_CONFIG($1) 417495b296d0Smrg 417595b296d0SmrgAC_LANG_POP 417695b296d0SmrgCC="$lt_save_CC" 417795b296d0Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 417895b296d0Smrg 417995b296d0Smrg 418095b296d0Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 418195b296d0Smrg# -------------------------- 418295b296d0Smrg# Ensure that the configuration vars for the C compiler are 418395b296d0Smrg# suitably defined. Those variables are subsequently used by 418495b296d0Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 418595b296d0SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 418695b296d0SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 418795b296d0Smrg[AC_LANG_SAVE 418895b296d0Smrg 418995b296d0Smrg# Source file extension for Java test sources. 419095b296d0Smrgac_ext=java 419195b296d0Smrg 419295b296d0Smrg# Object file extension for compiled Java test sources. 419395b296d0Smrgobjext=o 419495b296d0Smrg_LT_AC_TAGVAR(objext, $1)=$objext 419595b296d0Smrg 419695b296d0Smrg# Code to be used in simple compile tests 4197ff89ac2bSmrglt_simple_compile_test_code="class foo {}" 419895b296d0Smrg 419995b296d0Smrg# Code to be used in simple link tests 4200ff89ac2bSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 420195b296d0Smrg 420295b296d0Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 420395b296d0Smrg_LT_AC_SYS_COMPILER 420495b296d0Smrg 420595b296d0Smrg# save warnings/boilerplate of simple test code 420695b296d0Smrg_LT_COMPILER_BOILERPLATE 420795b296d0Smrg_LT_LINKER_BOILERPLATE 420895b296d0Smrg 420995b296d0Smrg# Allow CC to be a program name with arguments. 421095b296d0Smrglt_save_CC="$CC" 421195b296d0SmrgCC=${GCJ-"gcj"} 421295b296d0Smrgcompiler=$CC 421395b296d0Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 421495b296d0Smrg_LT_CC_BASENAME([$compiler]) 421595b296d0Smrg 421695b296d0Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 421795b296d0Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 421895b296d0Smrg 421995b296d0Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 422095b296d0Smrg 422195b296d0SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 422295b296d0SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 422395b296d0SmrgAC_LIBTOOL_PROG_CC_C_O($1) 422495b296d0SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 422595b296d0SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 422695b296d0SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 422795b296d0SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 422895b296d0Smrg 422995b296d0SmrgAC_LIBTOOL_CONFIG($1) 423095b296d0Smrg 423195b296d0SmrgAC_LANG_RESTORE 423295b296d0SmrgCC="$lt_save_CC" 423395b296d0Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 423495b296d0Smrg 423595b296d0Smrg 423695b296d0Smrg# AC_LIBTOOL_LANG_RC_CONFIG 423795b296d0Smrg# ------------------------- 423895b296d0Smrg# Ensure that the configuration vars for the Windows resource compiler are 423995b296d0Smrg# suitably defined. Those variables are subsequently used by 424095b296d0Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 424195b296d0SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 424295b296d0SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 424395b296d0Smrg[AC_LANG_SAVE 424495b296d0Smrg 424595b296d0Smrg# Source file extension for RC test sources. 424695b296d0Smrgac_ext=rc 424795b296d0Smrg 424895b296d0Smrg# Object file extension for compiled RC test sources. 424995b296d0Smrgobjext=o 425095b296d0Smrg_LT_AC_TAGVAR(objext, $1)=$objext 425195b296d0Smrg 425295b296d0Smrg# Code to be used in simple compile tests 4253ff89ac2bSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 425495b296d0Smrg 425595b296d0Smrg# Code to be used in simple link tests 425695b296d0Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 425795b296d0Smrg 425895b296d0Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 425995b296d0Smrg_LT_AC_SYS_COMPILER 426095b296d0Smrg 426195b296d0Smrg# save warnings/boilerplate of simple test code 426295b296d0Smrg_LT_COMPILER_BOILERPLATE 426395b296d0Smrg_LT_LINKER_BOILERPLATE 426495b296d0Smrg 426595b296d0Smrg# Allow CC to be a program name with arguments. 426695b296d0Smrglt_save_CC="$CC" 426795b296d0SmrgCC=${RC-"windres"} 426895b296d0Smrgcompiler=$CC 426995b296d0Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 427095b296d0Smrg_LT_CC_BASENAME([$compiler]) 427195b296d0Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 427295b296d0Smrg 427395b296d0SmrgAC_LIBTOOL_CONFIG($1) 427495b296d0Smrg 427595b296d0SmrgAC_LANG_RESTORE 427695b296d0SmrgCC="$lt_save_CC" 427795b296d0Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 427895b296d0Smrg 427995b296d0Smrg 428095b296d0Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 428195b296d0Smrg# ---------------------------- 428295b296d0Smrg# If TAGNAME is not passed, then create an initial libtool script 428395b296d0Smrg# with a default configuration from the untagged config vars. Otherwise 428495b296d0Smrg# add code to config.status for appending the configuration named by 428595b296d0Smrg# TAGNAME from the matching tagged config vars. 428695b296d0SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 428795b296d0Smrg[# The else clause should only fire when bootstrapping the 428895b296d0Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 428995b296d0Smrg# with your package, and you will get complaints that there are 429095b296d0Smrg# no rules to generate ltmain.sh. 429195b296d0Smrgif test -f "$ltmain"; then 429295b296d0Smrg # See if we are running on zsh, and set the options which allow our commands through 429395b296d0Smrg # without removal of \ escapes. 429495b296d0Smrg if test -n "${ZSH_VERSION+set}" ; then 429595b296d0Smrg setopt NO_GLOB_SUBST 429695b296d0Smrg fi 429795b296d0Smrg # Now quote all the things that may contain metacharacters while being 429895b296d0Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 429995b296d0Smrg # variables and quote the copies for generation of the libtool script. 430095b296d0Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 430195b296d0Smrg SED SHELL STRIP \ 430295b296d0Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 430395b296d0Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 430495b296d0Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 430595b296d0Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 430695b296d0Smrg lt_cv_sys_global_symbol_to_c_name_address \ 430795b296d0Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 430895b296d0Smrg old_postinstall_cmds old_postuninstall_cmds \ 430995b296d0Smrg _LT_AC_TAGVAR(compiler, $1) \ 431095b296d0Smrg _LT_AC_TAGVAR(CC, $1) \ 431195b296d0Smrg _LT_AC_TAGVAR(LD, $1) \ 431295b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 431395b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 431495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 431595b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 431695b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 431795b296d0Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 431895b296d0Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 431995b296d0Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 432095b296d0Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 432195b296d0Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 432295b296d0Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 432395b296d0Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 432495b296d0Smrg _LT_AC_TAGVAR(predeps, $1) \ 432595b296d0Smrg _LT_AC_TAGVAR(postdeps, $1) \ 432695b296d0Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4327ff89ac2bSmrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 432895b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 432995b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 433095b296d0Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 433195b296d0Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 433295b296d0Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 433395b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 433495b296d0Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 433595b296d0Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 433695b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 433795b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 433895b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 433995b296d0Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 434095b296d0Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 434195b296d0Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 434295b296d0Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 4343ff89ac2bSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 434495b296d0Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 434595b296d0Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 434695b296d0Smrg 434795b296d0Smrg case $var in 434895b296d0Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 434995b296d0Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 435095b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 435195b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 435295b296d0Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 435395b296d0Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 435495b296d0Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 435595b296d0Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 435695b296d0Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 435795b296d0Smrg postinstall_cmds | postuninstall_cmds | \ 435895b296d0Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 435995b296d0Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 436095b296d0Smrg # Double-quote double-evaled strings. 436195b296d0Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 436295b296d0Smrg ;; 436395b296d0Smrg *) 436495b296d0Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 436595b296d0Smrg ;; 436695b296d0Smrg esac 436795b296d0Smrg done 436895b296d0Smrg 436995b296d0Smrg case $lt_echo in 437095b296d0Smrg *'\[$]0 --fallback-echo"') 437195b296d0Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 437295b296d0Smrg ;; 437395b296d0Smrg esac 437495b296d0Smrg 437595b296d0Smrgifelse([$1], [], 437695b296d0Smrg [cfgfile="${ofile}T" 437795b296d0Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 437895b296d0Smrg $rm -f "$cfgfile" 437995b296d0Smrg AC_MSG_NOTICE([creating $ofile])], 438095b296d0Smrg [cfgfile="$ofile"]) 438195b296d0Smrg 438295b296d0Smrg cat <<__EOF__ >> "$cfgfile" 438395b296d0Smrgifelse([$1], [], 438495b296d0Smrg[#! $SHELL 438595b296d0Smrg 438695b296d0Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 438795b296d0Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 438895b296d0Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 438995b296d0Smrg# 4390ff89ac2bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 439195b296d0Smrg# Free Software Foundation, Inc. 439295b296d0Smrg# 439395b296d0Smrg# This file is part of GNU Libtool: 439495b296d0Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 439595b296d0Smrg# 439695b296d0Smrg# This program is free software; you can redistribute it and/or modify 439795b296d0Smrg# it under the terms of the GNU General Public License as published by 439895b296d0Smrg# the Free Software Foundation; either version 2 of the License, or 439995b296d0Smrg# (at your option) any later version. 440095b296d0Smrg# 440195b296d0Smrg# This program is distributed in the hope that it will be useful, but 440295b296d0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 440395b296d0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 440495b296d0Smrg# General Public License for more details. 440595b296d0Smrg# 440695b296d0Smrg# You should have received a copy of the GNU General Public License 440795b296d0Smrg# along with this program; if not, write to the Free Software 440895b296d0Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 440995b296d0Smrg# 441095b296d0Smrg# As a special exception to the GNU General Public License, if you 441195b296d0Smrg# distribute this file as part of a program that contains a 441295b296d0Smrg# configuration script generated by Autoconf, you may include it under 441395b296d0Smrg# the same distribution terms that you use for the rest of that program. 441495b296d0Smrg 441595b296d0Smrg# A sed program that does not truncate output. 441695b296d0SmrgSED=$lt_SED 441795b296d0Smrg 441895b296d0Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 441995b296d0SmrgXsed="$SED -e 1s/^X//" 442095b296d0Smrg 442195b296d0Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 442295b296d0Smrg# if CDPATH is set. 442395b296d0Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 442495b296d0Smrg 442595b296d0Smrg# The names of the tagged configurations supported by this script. 442695b296d0Smrgavailable_tags= 442795b296d0Smrg 442895b296d0Smrg# ### BEGIN LIBTOOL CONFIG], 442995b296d0Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 443095b296d0Smrg 443195b296d0Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 443295b296d0Smrg 443395b296d0Smrg# Shell to use when invoking shell scripts. 443495b296d0SmrgSHELL=$lt_SHELL 443595b296d0Smrg 443695b296d0Smrg# Whether or not to build shared libraries. 443795b296d0Smrgbuild_libtool_libs=$enable_shared 443895b296d0Smrg 443995b296d0Smrg# Whether or not to build static libraries. 444095b296d0Smrgbuild_old_libs=$enable_static 444195b296d0Smrg 444295b296d0Smrg# Whether or not to add -lc for building shared libraries. 444395b296d0Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 444495b296d0Smrg 444595b296d0Smrg# Whether or not to disallow shared libs when runtime libs are static 444695b296d0Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 444795b296d0Smrg 444895b296d0Smrg# Whether or not to optimize for fast installation. 444995b296d0Smrgfast_install=$enable_fast_install 445095b296d0Smrg 445195b296d0Smrg# The host system. 445295b296d0Smrghost_alias=$host_alias 445395b296d0Smrghost=$host 445495b296d0Smrghost_os=$host_os 445595b296d0Smrg 445695b296d0Smrg# The build system. 445795b296d0Smrgbuild_alias=$build_alias 445895b296d0Smrgbuild=$build 445995b296d0Smrgbuild_os=$build_os 446095b296d0Smrg 446195b296d0Smrg# An echo program that does not interpret backslashes. 446295b296d0Smrgecho=$lt_echo 446395b296d0Smrg 446495b296d0Smrg# The archiver. 446595b296d0SmrgAR=$lt_AR 446695b296d0SmrgAR_FLAGS=$lt_AR_FLAGS 446795b296d0Smrg 446895b296d0Smrg# A C compiler. 446995b296d0SmrgLTCC=$lt_LTCC 447095b296d0Smrg 447195b296d0Smrg# LTCC compiler flags. 447295b296d0SmrgLTCFLAGS=$lt_LTCFLAGS 447395b296d0Smrg 447495b296d0Smrg# A language-specific compiler. 447595b296d0SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 447695b296d0Smrg 447795b296d0Smrg# Is the compiler the GNU C compiler? 447895b296d0Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 447995b296d0Smrg 448095b296d0Smrg# An ERE matcher. 448195b296d0SmrgEGREP=$lt_EGREP 448295b296d0Smrg 448395b296d0Smrg# The linker used to build libraries. 448495b296d0SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 448595b296d0Smrg 448695b296d0Smrg# Whether we need hard or soft links. 448795b296d0SmrgLN_S=$lt_LN_S 448895b296d0Smrg 448995b296d0Smrg# A BSD-compatible nm program. 449095b296d0SmrgNM=$lt_NM 449195b296d0Smrg 449295b296d0Smrg# A symbol stripping program 449395b296d0SmrgSTRIP=$lt_STRIP 449495b296d0Smrg 449595b296d0Smrg# Used to examine libraries when file_magic_cmd begins "file" 449695b296d0SmrgMAGIC_CMD=$MAGIC_CMD 449795b296d0Smrg 449895b296d0Smrg# Used on cygwin: DLL creation program. 449995b296d0SmrgDLLTOOL="$DLLTOOL" 450095b296d0Smrg 450195b296d0Smrg# Used on cygwin: object dumper. 450295b296d0SmrgOBJDUMP="$OBJDUMP" 450395b296d0Smrg 450495b296d0Smrg# Used on cygwin: assembler. 450595b296d0SmrgAS="$AS" 450695b296d0Smrg 450795b296d0Smrg# The name of the directory that contains temporary libtool files. 450895b296d0Smrgobjdir=$objdir 450995b296d0Smrg 451095b296d0Smrg# How to create reloadable object files. 451195b296d0Smrgreload_flag=$lt_reload_flag 451295b296d0Smrgreload_cmds=$lt_reload_cmds 451395b296d0Smrg 451495b296d0Smrg# How to pass a linker flag through the compiler. 451595b296d0Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 451695b296d0Smrg 451795b296d0Smrg# Object file suffix (normally "o"). 451895b296d0Smrgobjext="$ac_objext" 451995b296d0Smrg 452095b296d0Smrg# Old archive suffix (normally "a"). 452195b296d0Smrglibext="$libext" 452295b296d0Smrg 452395b296d0Smrg# Shared library suffix (normally ".so"). 452495b296d0Smrgshrext_cmds='$shrext_cmds' 452595b296d0Smrg 452695b296d0Smrg# Executable file suffix (normally ""). 452795b296d0Smrgexeext="$exeext" 452895b296d0Smrg 452995b296d0Smrg# Additional compiler flags for building library objects. 453095b296d0Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 453195b296d0Smrgpic_mode=$pic_mode 453295b296d0Smrg 453395b296d0Smrg# What is the maximum length of a command? 453495b296d0Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 453595b296d0Smrg 453695b296d0Smrg# Does compiler simultaneously support -c and -o options? 453795b296d0Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 453895b296d0Smrg 453995b296d0Smrg# Must we lock files when doing compilation? 454095b296d0Smrgneed_locks=$lt_need_locks 454195b296d0Smrg 454295b296d0Smrg# Do we need the lib prefix for modules? 454395b296d0Smrgneed_lib_prefix=$need_lib_prefix 454495b296d0Smrg 454595b296d0Smrg# Do we need a version for libraries? 454695b296d0Smrgneed_version=$need_version 454795b296d0Smrg 454895b296d0Smrg# Whether dlopen is supported. 454995b296d0Smrgdlopen_support=$enable_dlopen 455095b296d0Smrg 455195b296d0Smrg# Whether dlopen of programs is supported. 455295b296d0Smrgdlopen_self=$enable_dlopen_self 455395b296d0Smrg 455495b296d0Smrg# Whether dlopen of statically linked programs is supported. 455595b296d0Smrgdlopen_self_static=$enable_dlopen_self_static 455695b296d0Smrg 455795b296d0Smrg# Compiler flag to prevent dynamic linking. 455895b296d0Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 455995b296d0Smrg 456095b296d0Smrg# Compiler flag to turn off builtin functions. 456195b296d0Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 456295b296d0Smrg 456395b296d0Smrg# Compiler flag to allow reflexive dlopens. 456495b296d0Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 456595b296d0Smrg 456695b296d0Smrg# Compiler flag to generate shared objects directly from archives. 456795b296d0Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 456895b296d0Smrg 456995b296d0Smrg# Compiler flag to generate thread-safe objects. 457095b296d0Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 457195b296d0Smrg 457295b296d0Smrg# Library versioning type. 457395b296d0Smrgversion_type=$version_type 457495b296d0Smrg 457595b296d0Smrg# Format of library name prefix. 457695b296d0Smrglibname_spec=$lt_libname_spec 457795b296d0Smrg 457895b296d0Smrg# List of archive names. First name is the real one, the rest are links. 457995b296d0Smrg# The last name is the one that the linker finds with -lNAME. 458095b296d0Smrglibrary_names_spec=$lt_library_names_spec 458195b296d0Smrg 458295b296d0Smrg# The coded name of the library, if different from the real name. 458395b296d0Smrgsoname_spec=$lt_soname_spec 458495b296d0Smrg 458595b296d0Smrg# Commands used to build and install an old-style archive. 458695b296d0SmrgRANLIB=$lt_RANLIB 458795b296d0Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 458895b296d0Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 458995b296d0Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 459095b296d0Smrg 459195b296d0Smrg# Create an old-style archive from a shared archive. 459295b296d0Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 459395b296d0Smrg 459495b296d0Smrg# Create a temporary old-style archive to link instead of a shared archive. 459595b296d0Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 459695b296d0Smrg 459795b296d0Smrg# Commands used to build and install a shared archive. 459895b296d0Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 459995b296d0Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 460095b296d0Smrgpostinstall_cmds=$lt_postinstall_cmds 460195b296d0Smrgpostuninstall_cmds=$lt_postuninstall_cmds 460295b296d0Smrg 460395b296d0Smrg# Commands used to build a loadable module (assumed same as above if empty) 460495b296d0Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 460595b296d0Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 460695b296d0Smrg 460795b296d0Smrg# Commands to strip libraries. 460895b296d0Smrgold_striplib=$lt_old_striplib 460995b296d0Smrgstriplib=$lt_striplib 461095b296d0Smrg 461195b296d0Smrg# Dependencies to place before the objects being linked to create a 461295b296d0Smrg# shared library. 461395b296d0Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 461495b296d0Smrg 461595b296d0Smrg# Dependencies to place after the objects being linked to create a 461695b296d0Smrg# shared library. 461795b296d0Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 461895b296d0Smrg 461995b296d0Smrg# Dependencies to place before the objects being linked to create a 462095b296d0Smrg# shared library. 462195b296d0Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 462295b296d0Smrg 462395b296d0Smrg# Dependencies to place after the objects being linked to create a 462495b296d0Smrg# shared library. 462595b296d0Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 462695b296d0Smrg 4627ff89ac2bSmrg# The directories searched by this compiler when creating a shared 4628ff89ac2bSmrg# library 4629ff89ac2bSmrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 4630ff89ac2bSmrg 463195b296d0Smrg# The library search path used internally by the compiler when linking 463295b296d0Smrg# a shared library. 463395b296d0Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 463495b296d0Smrg 463595b296d0Smrg# Method to check whether dependent libraries are shared objects. 463695b296d0Smrgdeplibs_check_method=$lt_deplibs_check_method 463795b296d0Smrg 463895b296d0Smrg# Command to use when deplibs_check_method == file_magic. 463995b296d0Smrgfile_magic_cmd=$lt_file_magic_cmd 464095b296d0Smrg 464195b296d0Smrg# Flag that allows shared libraries with undefined symbols to be built. 464295b296d0Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 464395b296d0Smrg 464495b296d0Smrg# Flag that forces no undefined symbols. 464595b296d0Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 464695b296d0Smrg 464795b296d0Smrg# Commands used to finish a libtool library installation in a directory. 464895b296d0Smrgfinish_cmds=$lt_finish_cmds 464995b296d0Smrg 465095b296d0Smrg# Same as above, but a single script fragment to be evaled but not shown. 465195b296d0Smrgfinish_eval=$lt_finish_eval 465295b296d0Smrg 465395b296d0Smrg# Take the output of nm and produce a listing of raw symbols and C names. 465495b296d0Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 465595b296d0Smrg 465695b296d0Smrg# Transform the output of nm in a proper C declaration 465795b296d0Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 465895b296d0Smrg 465995b296d0Smrg# Transform the output of nm in a C name address pair 466095b296d0Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 466195b296d0Smrg 466295b296d0Smrg# This is the shared library runtime path variable. 466395b296d0Smrgrunpath_var=$runpath_var 466495b296d0Smrg 466595b296d0Smrg# This is the shared library path variable. 466695b296d0Smrgshlibpath_var=$shlibpath_var 466795b296d0Smrg 466895b296d0Smrg# Is shlibpath searched before the hard-coded library search path? 466995b296d0Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 467095b296d0Smrg 467195b296d0Smrg# How to hardcode a shared library path into an executable. 467295b296d0Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 467395b296d0Smrg 467495b296d0Smrg# Whether we should hardcode library paths into libraries. 467595b296d0Smrghardcode_into_libs=$hardcode_into_libs 467695b296d0Smrg 467795b296d0Smrg# Flag to hardcode \$libdir into a binary during linking. 467895b296d0Smrg# This must work even if \$libdir does not exist. 467995b296d0Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 468095b296d0Smrg 468195b296d0Smrg# If ld is used when linking, flag to hardcode \$libdir into 468295b296d0Smrg# a binary during linking. This must work even if \$libdir does 468395b296d0Smrg# not exist. 468495b296d0Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 468595b296d0Smrg 468695b296d0Smrg# Whether we need a single -rpath flag with a separated argument. 468795b296d0Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 468895b296d0Smrg 468995b296d0Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 469095b296d0Smrg# resulting binary. 469195b296d0Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 469295b296d0Smrg 469395b296d0Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 469495b296d0Smrg# resulting binary. 469595b296d0Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 469695b296d0Smrg 469795b296d0Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 469895b296d0Smrg# the resulting binary. 469995b296d0Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 470095b296d0Smrg 470195b296d0Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 470295b296d0Smrg# and all subsequent libraries and executables linked against it. 470395b296d0Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 470495b296d0Smrg 470595b296d0Smrg# Variables whose values should be saved in libtool wrapper scripts and 470695b296d0Smrg# restored at relink time. 470795b296d0Smrgvariables_saved_for_relink="$variables_saved_for_relink" 470895b296d0Smrg 470995b296d0Smrg# Whether libtool must link a program against all its dependency libraries. 471095b296d0Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 471195b296d0Smrg 471295b296d0Smrg# Compile-time system search path for libraries 471395b296d0Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 471495b296d0Smrg 471595b296d0Smrg# Run-time system search path for libraries 471695b296d0Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 471795b296d0Smrg 471895b296d0Smrg# Fix the shell variable \$srcfile for the compiler. 4719ff89ac2bSmrgfix_srcfile_path=$lt_fix_srcfile_path 472095b296d0Smrg 472195b296d0Smrg# Set to yes if exported symbols are required. 472295b296d0Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 472395b296d0Smrg 472495b296d0Smrg# The commands to list exported symbols. 472595b296d0Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 472695b296d0Smrg 472795b296d0Smrg# The commands to extract the exported symbol list from a shared archive. 472895b296d0Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 472995b296d0Smrg 473095b296d0Smrg# Symbols that should not be listed in the preloaded symbols. 473195b296d0Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 473295b296d0Smrg 473395b296d0Smrg# Symbols that must always be exported. 473495b296d0Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 473595b296d0Smrg 473695b296d0Smrgifelse([$1],[], 473795b296d0Smrg[# ### END LIBTOOL CONFIG], 473895b296d0Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 473995b296d0Smrg 474095b296d0Smrg__EOF__ 474195b296d0Smrg 474295b296d0Smrgifelse([$1],[], [ 474395b296d0Smrg case $host_os in 474495b296d0Smrg aix3*) 474595b296d0Smrg cat <<\EOF >> "$cfgfile" 474695b296d0Smrg 474795b296d0Smrg# AIX sometimes has problems with the GCC collect2 program. For some 474895b296d0Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 474995b296d0Smrg# vanish in a puff of smoke. 475095b296d0Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 475195b296d0Smrg COLLECT_NAMES= 475295b296d0Smrg export COLLECT_NAMES 475395b296d0Smrgfi 475495b296d0SmrgEOF 475595b296d0Smrg ;; 475695b296d0Smrg esac 475795b296d0Smrg 475895b296d0Smrg # We use sed instead of cat because bash on DJGPP gets confused if 475995b296d0Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 476095b296d0Smrg # text mode, it properly converts lines to CR/LF. This bash problem 476195b296d0Smrg # is reportedly fixed, but why not run on old versions too? 476295b296d0Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 476395b296d0Smrg 476495b296d0Smrg mv -f "$cfgfile" "$ofile" || \ 476595b296d0Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 476695b296d0Smrg chmod +x "$ofile" 476795b296d0Smrg]) 476895b296d0Smrgelse 476995b296d0Smrg # If there is no Makefile yet, we rely on a make rule to execute 477095b296d0Smrg # `config.status --recheck' to rerun these tests and create the 477195b296d0Smrg # libtool script then. 477295b296d0Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 477395b296d0Smrg if test -f "$ltmain_in"; then 477495b296d0Smrg test -f Makefile && make "$ltmain" 477595b296d0Smrg fi 477695b296d0Smrgfi 477795b296d0Smrg])# AC_LIBTOOL_CONFIG 477895b296d0Smrg 477995b296d0Smrg 478095b296d0Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 478195b296d0Smrg# ------------------------------------------- 478295b296d0SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 478395b296d0Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 478495b296d0Smrg 478595b296d0Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 478695b296d0Smrg 478795b296d0Smrgif test "$GCC" = yes; then 478895b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 478995b296d0Smrg 479095b296d0Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 479195b296d0Smrg lt_cv_prog_compiler_rtti_exceptions, 479295b296d0Smrg [-fno-rtti -fno-exceptions], [], 479395b296d0Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 479495b296d0Smrgfi 479595b296d0Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 479695b296d0Smrg 479795b296d0Smrg 479895b296d0Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 479995b296d0Smrg# --------------------------------- 480095b296d0SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 480195b296d0Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 4802ff89ac2bSmrgAC_REQUIRE([LT_AC_PROG_SED]) 480395b296d0SmrgAC_REQUIRE([AC_PROG_NM]) 480495b296d0SmrgAC_REQUIRE([AC_OBJEXT]) 480595b296d0Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 480695b296d0SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 480795b296d0SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 480895b296d0Smrg[ 480995b296d0Smrg# These are sane defaults that work on at least a few old systems. 481095b296d0Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 481195b296d0Smrg 481295b296d0Smrg# Character class describing NM global symbol codes. 481395b296d0Smrgsymcode='[[BCDEGRST]]' 481495b296d0Smrg 481595b296d0Smrg# Regexp to match symbols that can be accessed directly from C. 481695b296d0Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 481795b296d0Smrg 481895b296d0Smrg# Transform an extracted symbol line into a proper C declaration 481995b296d0Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 482095b296d0Smrg 482195b296d0Smrg# Transform an extracted symbol line into symbol name and symbol address 482295b296d0Smrglt_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'" 482395b296d0Smrg 482495b296d0Smrg# Define system-specific variables. 482595b296d0Smrgcase $host_os in 482695b296d0Smrgaix*) 482795b296d0Smrg symcode='[[BCDT]]' 482895b296d0Smrg ;; 482995b296d0Smrgcygwin* | mingw* | pw32*) 483095b296d0Smrg symcode='[[ABCDGISTW]]' 483195b296d0Smrg ;; 483295b296d0Smrghpux*) # Its linker distinguishes data from code symbols 483395b296d0Smrg if test "$host_cpu" = ia64; then 483495b296d0Smrg symcode='[[ABCDEGRST]]' 483595b296d0Smrg fi 483695b296d0Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 483795b296d0Smrg 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'" 483895b296d0Smrg ;; 4839ff89ac2bSmrglinux* | k*bsd*-gnu) 484095b296d0Smrg if test "$host_cpu" = ia64; then 484195b296d0Smrg symcode='[[ABCDGIRSTW]]' 484295b296d0Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 484395b296d0Smrg 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'" 484495b296d0Smrg fi 484595b296d0Smrg ;; 484695b296d0Smrgirix* | nonstopux*) 484795b296d0Smrg symcode='[[BCDEGRST]]' 484895b296d0Smrg ;; 484995b296d0Smrgosf*) 485095b296d0Smrg symcode='[[BCDEGQRST]]' 485195b296d0Smrg ;; 485295b296d0Smrgsolaris*) 485395b296d0Smrg symcode='[[BDRT]]' 485495b296d0Smrg ;; 485595b296d0Smrgsco3.2v5*) 485695b296d0Smrg symcode='[[DT]]' 485795b296d0Smrg ;; 485895b296d0Smrgsysv4.2uw2*) 485995b296d0Smrg symcode='[[DT]]' 486095b296d0Smrg ;; 486195b296d0Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 486295b296d0Smrg symcode='[[ABDT]]' 486395b296d0Smrg ;; 486495b296d0Smrgsysv4) 486595b296d0Smrg symcode='[[DFNSTU]]' 486695b296d0Smrg ;; 486795b296d0Smrgesac 486895b296d0Smrg 486995b296d0Smrg# Handle CRLF in mingw tool chain 487095b296d0Smrgopt_cr= 487195b296d0Smrgcase $build_os in 487295b296d0Smrgmingw*) 487395b296d0Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 487495b296d0Smrg ;; 487595b296d0Smrgesac 487695b296d0Smrg 487795b296d0Smrg# If we're using GNU nm, then use its standard symbol codes. 487895b296d0Smrgcase `$NM -V 2>&1` in 487995b296d0Smrg*GNU* | *'with BFD'*) 488095b296d0Smrg symcode='[[ABCDGIRSTW]]' ;; 488195b296d0Smrgesac 488295b296d0Smrg 488395b296d0Smrg# Try without a prefix undercore, then with it. 488495b296d0Smrgfor ac_symprfx in "" "_"; do 488595b296d0Smrg 488695b296d0Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 488795b296d0Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 488895b296d0Smrg 488995b296d0Smrg # Write the raw and C identifiers. 489095b296d0Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 489195b296d0Smrg 489295b296d0Smrg # Check to see that the pipe works correctly. 489395b296d0Smrg pipe_works=no 489495b296d0Smrg 489595b296d0Smrg rm -f conftest* 489695b296d0Smrg cat > conftest.$ac_ext <<EOF 489795b296d0Smrg#ifdef __cplusplus 489895b296d0Smrgextern "C" { 489995b296d0Smrg#endif 490095b296d0Smrgchar nm_test_var; 490195b296d0Smrgvoid nm_test_func(){} 490295b296d0Smrg#ifdef __cplusplus 490395b296d0Smrg} 490495b296d0Smrg#endif 490595b296d0Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 490695b296d0SmrgEOF 490795b296d0Smrg 490895b296d0Smrg if AC_TRY_EVAL(ac_compile); then 490995b296d0Smrg # Now try to grab the symbols. 491095b296d0Smrg nlist=conftest.nm 491195b296d0Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 491295b296d0Smrg # Try sorting and uniquifying the output. 491395b296d0Smrg if sort "$nlist" | uniq > "$nlist"T; then 491495b296d0Smrg mv -f "$nlist"T "$nlist" 491595b296d0Smrg else 491695b296d0Smrg rm -f "$nlist"T 491795b296d0Smrg fi 491895b296d0Smrg 491995b296d0Smrg # Make sure that we snagged all the symbols we need. 492095b296d0Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 492195b296d0Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 492295b296d0Smrg cat <<EOF > conftest.$ac_ext 492395b296d0Smrg#ifdef __cplusplus 492495b296d0Smrgextern "C" { 492595b296d0Smrg#endif 492695b296d0Smrg 492795b296d0SmrgEOF 492895b296d0Smrg # Now generate the symbol file. 492995b296d0Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 493095b296d0Smrg 493195b296d0Smrg cat <<EOF >> conftest.$ac_ext 493295b296d0Smrg#if defined (__STDC__) && __STDC__ 493395b296d0Smrg# define lt_ptr_t void * 493495b296d0Smrg#else 493595b296d0Smrg# define lt_ptr_t char * 493695b296d0Smrg# define const 493795b296d0Smrg#endif 493895b296d0Smrg 493995b296d0Smrg/* The mapping between symbol names and symbols. */ 494095b296d0Smrgconst struct { 494195b296d0Smrg const char *name; 494295b296d0Smrg lt_ptr_t address; 494395b296d0Smrg} 494495b296d0Smrglt_preloaded_symbols[[]] = 494595b296d0Smrg{ 494695b296d0SmrgEOF 494795b296d0Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 494895b296d0Smrg cat <<\EOF >> conftest.$ac_ext 494995b296d0Smrg {0, (lt_ptr_t) 0} 495095b296d0Smrg}; 495195b296d0Smrg 495295b296d0Smrg#ifdef __cplusplus 495395b296d0Smrg} 495495b296d0Smrg#endif 495595b296d0SmrgEOF 495695b296d0Smrg # Now try linking the two files. 495795b296d0Smrg mv conftest.$ac_objext conftstm.$ac_objext 495895b296d0Smrg lt_save_LIBS="$LIBS" 495995b296d0Smrg lt_save_CFLAGS="$CFLAGS" 496095b296d0Smrg LIBS="conftstm.$ac_objext" 496195b296d0Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 496295b296d0Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 496395b296d0Smrg pipe_works=yes 496495b296d0Smrg fi 496595b296d0Smrg LIBS="$lt_save_LIBS" 496695b296d0Smrg CFLAGS="$lt_save_CFLAGS" 496795b296d0Smrg else 496895b296d0Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 496995b296d0Smrg fi 497095b296d0Smrg else 497195b296d0Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 497295b296d0Smrg fi 497395b296d0Smrg else 497495b296d0Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 497595b296d0Smrg fi 497695b296d0Smrg else 497795b296d0Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 497895b296d0Smrg cat conftest.$ac_ext >&5 497995b296d0Smrg fi 4980ff89ac2bSmrg rm -rf conftest* conftst* 498195b296d0Smrg 498295b296d0Smrg # Do not use the global_symbol_pipe unless it works. 498395b296d0Smrg if test "$pipe_works" = yes; then 498495b296d0Smrg break 498595b296d0Smrg else 498695b296d0Smrg lt_cv_sys_global_symbol_pipe= 498795b296d0Smrg fi 498895b296d0Smrgdone 498995b296d0Smrg]) 499095b296d0Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 499195b296d0Smrg lt_cv_sys_global_symbol_to_cdecl= 499295b296d0Smrgfi 499395b296d0Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 499495b296d0Smrg AC_MSG_RESULT(failed) 499595b296d0Smrgelse 499695b296d0Smrg AC_MSG_RESULT(ok) 499795b296d0Smrgfi 499895b296d0Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 499995b296d0Smrg 500095b296d0Smrg 500195b296d0Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 500295b296d0Smrg# --------------------------------------- 500395b296d0SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 500495b296d0Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 500595b296d0Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 500695b296d0Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 500795b296d0Smrg 500895b296d0SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 500995b296d0Smrg ifelse([$1],[CXX],[ 501095b296d0Smrg # C++ specific cases for pic, static, wl, etc. 501195b296d0Smrg if test "$GXX" = yes; then 501295b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 501395b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 501495b296d0Smrg 501595b296d0Smrg case $host_os in 501695b296d0Smrg aix*) 501795b296d0Smrg # All AIX code is PIC. 501895b296d0Smrg if test "$host_cpu" = ia64; then 501995b296d0Smrg # AIX 5 now supports IA64 processor 502095b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 502195b296d0Smrg fi 502295b296d0Smrg ;; 502395b296d0Smrg amigaos*) 502495b296d0Smrg # FIXME: we need at least 68020 code to build shared libraries, but 502595b296d0Smrg # adding the `-m68020' flag to GCC prevents building anything better, 502695b296d0Smrg # like `-m68040'. 502795b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 502895b296d0Smrg ;; 5029ff89ac2bSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 503095b296d0Smrg # PIC is the default for these OSes. 503195b296d0Smrg ;; 5032ff89ac2bSmrg mingw* | cygwin* | os2* | pw32*) 503395b296d0Smrg # This hack is so that the source file can tell whether it is being 503495b296d0Smrg # built for inclusion in a dll (and should export symbols for example). 5035ff89ac2bSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5036ff89ac2bSmrg # (--disable-auto-import) libraries 5037ff89ac2bSmrg m4_if([$1], [GCJ], [], 5038ff89ac2bSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 503995b296d0Smrg ;; 504095b296d0Smrg darwin* | rhapsody*) 504195b296d0Smrg # PIC is the default on this platform 504295b296d0Smrg # Common symbols not allowed in MH_DYLIB files 504395b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 504495b296d0Smrg ;; 504595b296d0Smrg *djgpp*) 504695b296d0Smrg # DJGPP does not support shared libraries at all 504795b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 504895b296d0Smrg ;; 5049ff89ac2bSmrg interix[[3-9]]*) 505095b296d0Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 505195b296d0Smrg # Instead, we relocate shared libraries at runtime. 505295b296d0Smrg ;; 505395b296d0Smrg sysv4*MP*) 505495b296d0Smrg if test -d /usr/nec; then 505595b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 505695b296d0Smrg fi 505795b296d0Smrg ;; 505895b296d0Smrg hpux*) 505995b296d0Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 506095b296d0Smrg # not for PA HP-UX. 506195b296d0Smrg case $host_cpu in 506295b296d0Smrg hppa*64*|ia64*) 506395b296d0Smrg ;; 506495b296d0Smrg *) 506595b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 506695b296d0Smrg ;; 506795b296d0Smrg esac 506895b296d0Smrg ;; 506995b296d0Smrg *) 507095b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 507195b296d0Smrg ;; 507295b296d0Smrg esac 507395b296d0Smrg else 507495b296d0Smrg case $host_os in 5075ff89ac2bSmrg aix[[4-9]]*) 507695b296d0Smrg # All AIX code is PIC. 507795b296d0Smrg if test "$host_cpu" = ia64; then 507895b296d0Smrg # AIX 5 now supports IA64 processor 507995b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 508095b296d0Smrg else 508195b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 508295b296d0Smrg fi 508395b296d0Smrg ;; 508495b296d0Smrg chorus*) 508595b296d0Smrg case $cc_basename in 508695b296d0Smrg cxch68*) 508795b296d0Smrg # Green Hills C++ Compiler 508895b296d0Smrg # _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" 508995b296d0Smrg ;; 509095b296d0Smrg esac 509195b296d0Smrg ;; 509295b296d0Smrg darwin*) 509395b296d0Smrg # PIC is the default on this platform 509495b296d0Smrg # Common symbols not allowed in MH_DYLIB files 509595b296d0Smrg case $cc_basename in 509695b296d0Smrg xlc*) 509795b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 509895b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 509995b296d0Smrg ;; 510095b296d0Smrg esac 510195b296d0Smrg ;; 510295b296d0Smrg dgux*) 510395b296d0Smrg case $cc_basename in 510495b296d0Smrg ec++*) 510595b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 510695b296d0Smrg ;; 510795b296d0Smrg ghcx*) 510895b296d0Smrg # Green Hills C++ Compiler 510995b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 511095b296d0Smrg ;; 511195b296d0Smrg *) 511295b296d0Smrg ;; 511395b296d0Smrg esac 511495b296d0Smrg ;; 5115ff89ac2bSmrg freebsd* | dragonfly*) 511695b296d0Smrg # FreeBSD uses GNU C++ 511795b296d0Smrg ;; 511895b296d0Smrg hpux9* | hpux10* | hpux11*) 511995b296d0Smrg case $cc_basename in 512095b296d0Smrg CC*) 512195b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 512295b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 512395b296d0Smrg if test "$host_cpu" != ia64; then 512495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 512595b296d0Smrg fi 512695b296d0Smrg ;; 512795b296d0Smrg aCC*) 512895b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 512995b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 513095b296d0Smrg case $host_cpu in 513195b296d0Smrg hppa*64*|ia64*) 513295b296d0Smrg # +Z the default 513395b296d0Smrg ;; 513495b296d0Smrg *) 513595b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 513695b296d0Smrg ;; 513795b296d0Smrg esac 513895b296d0Smrg ;; 513995b296d0Smrg *) 514095b296d0Smrg ;; 514195b296d0Smrg esac 514295b296d0Smrg ;; 514395b296d0Smrg interix*) 514495b296d0Smrg # This is c89, which is MS Visual C++ (no shared libs) 514595b296d0Smrg # Anyone wants to do a port? 514695b296d0Smrg ;; 514795b296d0Smrg irix5* | irix6* | nonstopux*) 514895b296d0Smrg case $cc_basename in 514995b296d0Smrg CC*) 515095b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 515195b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 515295b296d0Smrg # CC pic flag -KPIC is the default. 515395b296d0Smrg ;; 515495b296d0Smrg *) 515595b296d0Smrg ;; 515695b296d0Smrg esac 515795b296d0Smrg ;; 5158ff89ac2bSmrg linux* | k*bsd*-gnu) 515995b296d0Smrg case $cc_basename in 516095b296d0Smrg KCC*) 516195b296d0Smrg # KAI C++ Compiler 516295b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 516395b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 516495b296d0Smrg ;; 516595b296d0Smrg icpc* | ecpc*) 516695b296d0Smrg # Intel C++ 516795b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 516895b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 516995b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 517095b296d0Smrg ;; 5171ff89ac2bSmrg pgCC* | pgcpp*) 517295b296d0Smrg # Portland Group C++ compiler. 517395b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 517495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 517595b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 517695b296d0Smrg ;; 517795b296d0Smrg cxx*) 517895b296d0Smrg # Compaq C++ 517995b296d0Smrg # Make sure the PIC flag is empty. It appears that all Alpha 518095b296d0Smrg # Linux and Compaq Tru64 Unix objects are PIC. 518195b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 518295b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 518395b296d0Smrg ;; 518495b296d0Smrg *) 5185ff89ac2bSmrg case `$CC -V 2>&1 | sed 5q` in 5186ff89ac2bSmrg *Sun\ C*) 5187ff89ac2bSmrg # Sun C++ 5.9 5188ff89ac2bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5189ff89ac2bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5190ff89ac2bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5191ff89ac2bSmrg ;; 5192ff89ac2bSmrg esac 519395b296d0Smrg ;; 519495b296d0Smrg esac 519595b296d0Smrg ;; 519695b296d0Smrg lynxos*) 519795b296d0Smrg ;; 519895b296d0Smrg m88k*) 519995b296d0Smrg ;; 520095b296d0Smrg mvs*) 520195b296d0Smrg case $cc_basename in 520295b296d0Smrg cxx*) 520395b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 520495b296d0Smrg ;; 520595b296d0Smrg *) 520695b296d0Smrg ;; 520795b296d0Smrg esac 520895b296d0Smrg ;; 520995b296d0Smrg netbsd*) 521095b296d0Smrg ;; 521195b296d0Smrg osf3* | osf4* | osf5*) 521295b296d0Smrg case $cc_basename in 521395b296d0Smrg KCC*) 521495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 521595b296d0Smrg ;; 521695b296d0Smrg RCC*) 521795b296d0Smrg # Rational C++ 2.4.1 521895b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 521995b296d0Smrg ;; 522095b296d0Smrg cxx*) 522195b296d0Smrg # Digital/Compaq C++ 522295b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 522395b296d0Smrg # Make sure the PIC flag is empty. It appears that all Alpha 522495b296d0Smrg # Linux and Compaq Tru64 Unix objects are PIC. 522595b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 522695b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 522795b296d0Smrg ;; 522895b296d0Smrg *) 522995b296d0Smrg ;; 523095b296d0Smrg esac 523195b296d0Smrg ;; 523295b296d0Smrg psos*) 523395b296d0Smrg ;; 523495b296d0Smrg solaris*) 523595b296d0Smrg case $cc_basename in 523695b296d0Smrg CC*) 523795b296d0Smrg # Sun C++ 4.2, 5.x and Centerline C++ 523895b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 523995b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 524095b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 524195b296d0Smrg ;; 524295b296d0Smrg gcx*) 524395b296d0Smrg # Green Hills C++ Compiler 524495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 524595b296d0Smrg ;; 524695b296d0Smrg *) 524795b296d0Smrg ;; 524895b296d0Smrg esac 524995b296d0Smrg ;; 525095b296d0Smrg sunos4*) 525195b296d0Smrg case $cc_basename in 525295b296d0Smrg CC*) 525395b296d0Smrg # Sun C++ 4.x 525495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 525595b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 525695b296d0Smrg ;; 525795b296d0Smrg lcc*) 525895b296d0Smrg # Lucid 525995b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 526095b296d0Smrg ;; 526195b296d0Smrg *) 526295b296d0Smrg ;; 526395b296d0Smrg esac 526495b296d0Smrg ;; 526595b296d0Smrg tandem*) 526695b296d0Smrg case $cc_basename in 526795b296d0Smrg NCC*) 526895b296d0Smrg # NonStop-UX NCC 3.20 526995b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 527095b296d0Smrg ;; 527195b296d0Smrg *) 527295b296d0Smrg ;; 527395b296d0Smrg esac 527495b296d0Smrg ;; 527595b296d0Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 527695b296d0Smrg case $cc_basename in 527795b296d0Smrg CC*) 527895b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 527995b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 528095b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 528195b296d0Smrg ;; 528295b296d0Smrg esac 528395b296d0Smrg ;; 528495b296d0Smrg vxworks*) 528595b296d0Smrg ;; 528695b296d0Smrg *) 528795b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 528895b296d0Smrg ;; 528995b296d0Smrg esac 529095b296d0Smrg fi 529195b296d0Smrg], 529295b296d0Smrg[ 529395b296d0Smrg if test "$GCC" = yes; then 529495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 529595b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 529695b296d0Smrg 529795b296d0Smrg case $host_os in 529895b296d0Smrg aix*) 529995b296d0Smrg # All AIX code is PIC. 530095b296d0Smrg if test "$host_cpu" = ia64; then 530195b296d0Smrg # AIX 5 now supports IA64 processor 530295b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 530395b296d0Smrg fi 530495b296d0Smrg ;; 530595b296d0Smrg 530695b296d0Smrg amigaos*) 530795b296d0Smrg # FIXME: we need at least 68020 code to build shared libraries, but 530895b296d0Smrg # adding the `-m68020' flag to GCC prevents building anything better, 530995b296d0Smrg # like `-m68040'. 531095b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 531195b296d0Smrg ;; 531295b296d0Smrg 5313ff89ac2bSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 531495b296d0Smrg # PIC is the default for these OSes. 531595b296d0Smrg ;; 531695b296d0Smrg 5317ff89ac2bSmrg mingw* | cygwin* | pw32* | os2*) 531895b296d0Smrg # This hack is so that the source file can tell whether it is being 531995b296d0Smrg # built for inclusion in a dll (and should export symbols for example). 5320ff89ac2bSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5321ff89ac2bSmrg # (--disable-auto-import) libraries 5322ff89ac2bSmrg m4_if([$1], [GCJ], [], 5323ff89ac2bSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 532495b296d0Smrg ;; 532595b296d0Smrg 532695b296d0Smrg darwin* | rhapsody*) 532795b296d0Smrg # PIC is the default on this platform 532895b296d0Smrg # Common symbols not allowed in MH_DYLIB files 532995b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 533095b296d0Smrg ;; 533195b296d0Smrg 5332ff89ac2bSmrg interix[[3-9]]*) 533395b296d0Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 533495b296d0Smrg # Instead, we relocate shared libraries at runtime. 533595b296d0Smrg ;; 533695b296d0Smrg 533795b296d0Smrg msdosdjgpp*) 533895b296d0Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 533995b296d0Smrg # on systems that don't support them. 534095b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 534195b296d0Smrg enable_shared=no 534295b296d0Smrg ;; 534395b296d0Smrg 534495b296d0Smrg sysv4*MP*) 534595b296d0Smrg if test -d /usr/nec; then 534695b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 534795b296d0Smrg fi 534895b296d0Smrg ;; 534995b296d0Smrg 535095b296d0Smrg hpux*) 535195b296d0Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 535295b296d0Smrg # not for PA HP-UX. 535395b296d0Smrg case $host_cpu in 535495b296d0Smrg hppa*64*|ia64*) 535595b296d0Smrg # +Z the default 535695b296d0Smrg ;; 535795b296d0Smrg *) 535895b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 535995b296d0Smrg ;; 536095b296d0Smrg esac 536195b296d0Smrg ;; 536295b296d0Smrg 536395b296d0Smrg *) 536495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 536595b296d0Smrg ;; 536695b296d0Smrg esac 536795b296d0Smrg else 536895b296d0Smrg # PORTME Check for flag to pass linker flags through the system compiler. 536995b296d0Smrg case $host_os in 537095b296d0Smrg aix*) 537195b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 537295b296d0Smrg if test "$host_cpu" = ia64; then 537395b296d0Smrg # AIX 5 now supports IA64 processor 537495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 537595b296d0Smrg else 537695b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 537795b296d0Smrg fi 537895b296d0Smrg ;; 537995b296d0Smrg darwin*) 538095b296d0Smrg # PIC is the default on this platform 538195b296d0Smrg # Common symbols not allowed in MH_DYLIB files 538295b296d0Smrg case $cc_basename in 538395b296d0Smrg xlc*) 538495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 538595b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 538695b296d0Smrg ;; 538795b296d0Smrg esac 538895b296d0Smrg ;; 538995b296d0Smrg 5390ff89ac2bSmrg mingw* | cygwin* | pw32* | os2*) 539195b296d0Smrg # This hack is so that the source file can tell whether it is being 539295b296d0Smrg # built for inclusion in a dll (and should export symbols for example). 5393ff89ac2bSmrg m4_if([$1], [GCJ], [], 5394ff89ac2bSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 539595b296d0Smrg ;; 539695b296d0Smrg 539795b296d0Smrg hpux9* | hpux10* | hpux11*) 539895b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 539995b296d0Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 540095b296d0Smrg # not for PA HP-UX. 540195b296d0Smrg case $host_cpu in 540295b296d0Smrg hppa*64*|ia64*) 540395b296d0Smrg # +Z the default 540495b296d0Smrg ;; 540595b296d0Smrg *) 540695b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 540795b296d0Smrg ;; 540895b296d0Smrg esac 540995b296d0Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 541095b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 541195b296d0Smrg ;; 541295b296d0Smrg 541395b296d0Smrg irix5* | irix6* | nonstopux*) 541495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 541595b296d0Smrg # PIC (with -KPIC) is the default. 541695b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 541795b296d0Smrg ;; 541895b296d0Smrg 541995b296d0Smrg newsos6) 542095b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 542195b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 542295b296d0Smrg ;; 542395b296d0Smrg 5424ff89ac2bSmrg linux* | k*bsd*-gnu) 542595b296d0Smrg case $cc_basename in 542695b296d0Smrg icc* | ecc*) 542795b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 542895b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 542995b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 543095b296d0Smrg ;; 543195b296d0Smrg pgcc* | pgf77* | pgf90* | pgf95*) 543295b296d0Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 543395b296d0Smrg # which looks to be a dead project) 543495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 543595b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 543695b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 543795b296d0Smrg ;; 543895b296d0Smrg ccc*) 543995b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 544095b296d0Smrg # All Alpha code is PIC. 544195b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 544295b296d0Smrg ;; 5443ff89ac2bSmrg *) 5444ff89ac2bSmrg case `$CC -V 2>&1 | sed 5q` in 5445ff89ac2bSmrg *Sun\ C*) 5446ff89ac2bSmrg # Sun C 5.9 5447ff89ac2bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5448ff89ac2bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5449ff89ac2bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5450ff89ac2bSmrg ;; 5451ff89ac2bSmrg *Sun\ F*) 5452ff89ac2bSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 5453ff89ac2bSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5454ff89ac2bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5455ff89ac2bSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 5456ff89ac2bSmrg ;; 5457ff89ac2bSmrg esac 5458ff89ac2bSmrg ;; 545995b296d0Smrg esac 546095b296d0Smrg ;; 546195b296d0Smrg 546295b296d0Smrg osf3* | osf4* | osf5*) 546395b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 546495b296d0Smrg # All OSF/1 code is PIC. 546595b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 546695b296d0Smrg ;; 546795b296d0Smrg 5468ff89ac2bSmrg rdos*) 5469ff89ac2bSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5470ff89ac2bSmrg ;; 5471ff89ac2bSmrg 547295b296d0Smrg solaris*) 547395b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 547495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 547595b296d0Smrg case $cc_basename in 547695b296d0Smrg f77* | f90* | f95*) 547795b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 547895b296d0Smrg *) 547995b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 548095b296d0Smrg esac 548195b296d0Smrg ;; 548295b296d0Smrg 548395b296d0Smrg sunos4*) 548495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 548595b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 548695b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 548795b296d0Smrg ;; 548895b296d0Smrg 548995b296d0Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 549095b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 549195b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 549295b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 549395b296d0Smrg ;; 549495b296d0Smrg 549595b296d0Smrg sysv4*MP*) 549695b296d0Smrg if test -d /usr/nec ;then 549795b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 549895b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 549995b296d0Smrg fi 550095b296d0Smrg ;; 550195b296d0Smrg 550295b296d0Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 550395b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 550495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 550595b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 550695b296d0Smrg ;; 550795b296d0Smrg 550895b296d0Smrg unicos*) 550995b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 551095b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 551195b296d0Smrg ;; 551295b296d0Smrg 551395b296d0Smrg uts4*) 551495b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 551595b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 551695b296d0Smrg ;; 551795b296d0Smrg 551895b296d0Smrg *) 551995b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 552095b296d0Smrg ;; 552195b296d0Smrg esac 552295b296d0Smrg fi 552395b296d0Smrg]) 552495b296d0SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 552595b296d0Smrg 552695b296d0Smrg# 552795b296d0Smrg# Check to make sure the PIC flag actually works. 552895b296d0Smrg# 552995b296d0Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 553095b296d0Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 5531ff89ac2bSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 553295b296d0Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 553395b296d0Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 553495b296d0Smrg "" | " "*) ;; 553595b296d0Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 553695b296d0Smrg esac], 553795b296d0Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 553895b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 553995b296d0Smrgfi 554095b296d0Smrgcase $host_os in 554195b296d0Smrg # For platforms which do not support PIC, -DPIC is meaningless: 554295b296d0Smrg *djgpp*) 554395b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 554495b296d0Smrg ;; 554595b296d0Smrg *) 554695b296d0Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 554795b296d0Smrg ;; 554895b296d0Smrgesac 554995b296d0Smrg 555095b296d0Smrg# 555195b296d0Smrg# Check to make sure the static flag actually works. 555295b296d0Smrg# 555395b296d0Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 555495b296d0SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5555ff89ac2bSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 555695b296d0Smrg $lt_tmp_static_flag, 555795b296d0Smrg [], 555895b296d0Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 555995b296d0Smrg]) 556095b296d0Smrg 556195b296d0Smrg 556295b296d0Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 556395b296d0Smrg# ------------------------------------ 556495b296d0Smrg# See if the linker supports building shared libraries. 556595b296d0SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 5566ff89ac2bSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 5567ff89ac2bSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 556895b296d0Smrgifelse([$1],[CXX],[ 556995b296d0Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 557095b296d0Smrg case $host_os in 5571ff89ac2bSmrg aix[[4-9]]*) 557295b296d0Smrg # If we're using GNU nm, then we don't want the "-C" option. 557395b296d0Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 557495b296d0Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 557595b296d0Smrg _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' 557695b296d0Smrg else 557795b296d0Smrg _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' 557895b296d0Smrg fi 557995b296d0Smrg ;; 558095b296d0Smrg pw32*) 558195b296d0Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 558295b296d0Smrg ;; 558395b296d0Smrg cygwin* | mingw*) 5584ff89ac2bSmrg _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' 558595b296d0Smrg ;; 558695b296d0Smrg *) 558795b296d0Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 558895b296d0Smrg ;; 558995b296d0Smrg esac 5590ff89ac2bSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 559195b296d0Smrg],[ 559295b296d0Smrg runpath_var= 559395b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 559495b296d0Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 559595b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 559695b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 559795b296d0Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 559895b296d0Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 559995b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 560095b296d0Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 560195b296d0Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 560295b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 560395b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 560495b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 560595b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 560695b296d0Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 560795b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 560895b296d0Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 560995b296d0Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 561095b296d0Smrg _LT_AC_TAGVAR(module_cmds, $1)= 561195b296d0Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 561295b296d0Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 561395b296d0Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 561495b296d0Smrg # include_expsyms should be a list of space-separated symbols to be *always* 561595b296d0Smrg # included in the symbol list 561695b296d0Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 561795b296d0Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 561895b296d0Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 561995b296d0Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 562095b296d0Smrg # as well as any symbol that contains `d'. 5621ff89ac2bSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 562295b296d0Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 562395b296d0Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 562495b296d0Smrg # the symbol is explicitly referenced. Since portable code cannot 562595b296d0Smrg # rely on this symbol name, it's probably fine to never include it in 562695b296d0Smrg # preloaded symbol tables. 5627ff89ac2bSmrg # Exclude shared library initialization/finalization symbols. 5628ff89ac2bSmrgdnl Note also adjust exclude_expsyms for C++ above. 562995b296d0Smrg extract_expsyms_cmds= 563095b296d0Smrg # Just being paranoid about ensuring that cc_basename is set. 563195b296d0Smrg _LT_CC_BASENAME([$compiler]) 563295b296d0Smrg case $host_os in 563395b296d0Smrg cygwin* | mingw* | pw32*) 563495b296d0Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 563595b296d0Smrg # When not using gcc, we currently assume that we are using 563695b296d0Smrg # Microsoft Visual C++. 563795b296d0Smrg if test "$GCC" != yes; then 563895b296d0Smrg with_gnu_ld=no 563995b296d0Smrg fi 564095b296d0Smrg ;; 564195b296d0Smrg interix*) 564295b296d0Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 564395b296d0Smrg with_gnu_ld=yes 564495b296d0Smrg ;; 564595b296d0Smrg openbsd*) 564695b296d0Smrg with_gnu_ld=no 564795b296d0Smrg ;; 564895b296d0Smrg esac 564995b296d0Smrg 565095b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 565195b296d0Smrg if test "$with_gnu_ld" = yes; then 565295b296d0Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 565395b296d0Smrg wlarc='${wl}' 565495b296d0Smrg 565595b296d0Smrg # Set some defaults for GNU ld with shared library support. These 565695b296d0Smrg # are reset later if shared libraries are not supported. Putting them 565795b296d0Smrg # here allows them to be overridden if necessary. 565895b296d0Smrg runpath_var=LD_RUN_PATH 565995b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 566095b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 566195b296d0Smrg # ancient GNU ld didn't support --whole-archive et. al. 566295b296d0Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 566395b296d0Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 566495b296d0Smrg else 566595b296d0Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 566695b296d0Smrg fi 566795b296d0Smrg supports_anon_versioning=no 566895b296d0Smrg case `$LD -v 2>/dev/null` in 566995b296d0Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 567095b296d0Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 567195b296d0Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 567295b296d0Smrg *\ 2.11.*) ;; # other 2.11 versions 567395b296d0Smrg *) supports_anon_versioning=yes ;; 567495b296d0Smrg esac 567595b296d0Smrg 567695b296d0Smrg # See if GNU ld supports shared libraries. 567795b296d0Smrg case $host_os in 5678ff89ac2bSmrg aix[[3-9]]*) 567995b296d0Smrg # On AIX/PPC, the GNU linker is very broken 568095b296d0Smrg if test "$host_cpu" != ia64; then 568195b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 568295b296d0Smrg cat <<EOF 1>&2 568395b296d0Smrg 568495b296d0Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 568595b296d0Smrg*** to be unable to reliably create shared libraries on AIX. 568695b296d0Smrg*** Therefore, libtool is disabling shared libraries support. If you 568795b296d0Smrg*** really care for shared libraries, you may want to modify your PATH 568895b296d0Smrg*** so that a non-GNU linker is found, and then restart. 568995b296d0Smrg 569095b296d0SmrgEOF 569195b296d0Smrg fi 569295b296d0Smrg ;; 569395b296d0Smrg 569495b296d0Smrg amigaos*) 569595b296d0Smrg _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)' 569695b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 569795b296d0Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 569895b296d0Smrg 569995b296d0Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 570095b296d0Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 570195b296d0Smrg # to version 4, is to share data among multiple programs linked 570295b296d0Smrg # with the same dynamic library. Since this doesn't match the 570395b296d0Smrg # behavior of shared libraries on other platforms, we can't use 570495b296d0Smrg # them. 570595b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 570695b296d0Smrg ;; 570795b296d0Smrg 570895b296d0Smrg beos*) 570995b296d0Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 571095b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 571195b296d0Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 571295b296d0Smrg # support --undefined. This deserves some investigation. FIXME 571395b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 571495b296d0Smrg else 571595b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 571695b296d0Smrg fi 571795b296d0Smrg ;; 571895b296d0Smrg 571995b296d0Smrg cygwin* | mingw* | pw32*) 572095b296d0Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 572195b296d0Smrg # as there is no search path for DLLs. 572295b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 572395b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 572495b296d0Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 572595b296d0Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5726ff89ac2bSmrg _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' 572795b296d0Smrg 572895b296d0Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 572995b296d0Smrg _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' 573095b296d0Smrg # If the export-symbols file already is a .def file (1st line 573195b296d0Smrg # is EXPORTS), use it as is; otherwise, prepend... 573295b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 573395b296d0Smrg cp $export_symbols $output_objdir/$soname.def; 573495b296d0Smrg else 573595b296d0Smrg echo EXPORTS > $output_objdir/$soname.def; 573695b296d0Smrg cat $export_symbols >> $output_objdir/$soname.def; 573795b296d0Smrg fi~ 573895b296d0Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 573995b296d0Smrg else 574095b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 574195b296d0Smrg fi 574295b296d0Smrg ;; 574395b296d0Smrg 5744ff89ac2bSmrg interix[[3-9]]*) 574595b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 574695b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 574795b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 574895b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 574995b296d0Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 575095b296d0Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 575195b296d0Smrg # default) and relocated if they conflict, which is a slow very memory 575295b296d0Smrg # consuming and fragmenting process. To avoid this, we pick a random, 575395b296d0Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 575495b296d0Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 575595b296d0Smrg _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' 575695b296d0Smrg _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' 575795b296d0Smrg ;; 575895b296d0Smrg 5759ff89ac2bSmrg gnu* | linux* | k*bsd*-gnu) 576095b296d0Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 576195b296d0Smrg tmp_addflag= 576295b296d0Smrg case $cc_basename,$host_cpu in 576395b296d0Smrg pgcc*) # Portland Group C compiler 576495b296d0Smrg _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' 576595b296d0Smrg tmp_addflag=' $pic_flag' 576695b296d0Smrg ;; 576795b296d0Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 576895b296d0Smrg _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' 576995b296d0Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 577095b296d0Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 577195b296d0Smrg tmp_addflag=' -i_dynamic' ;; 577295b296d0Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 577395b296d0Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 577495b296d0Smrg ifc* | ifort*) # Intel Fortran compiler 577595b296d0Smrg tmp_addflag=' -nofor_main' ;; 577695b296d0Smrg esac 5777ff89ac2bSmrg case `$CC -V 2>&1 | sed 5q` in 5778ff89ac2bSmrg *Sun\ C*) # Sun C 5.9 5779ff89ac2bSmrg _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' 5780ff89ac2bSmrg tmp_sharedflag='-G' ;; 5781ff89ac2bSmrg *Sun\ F*) # Sun Fortran 8.3 5782ff89ac2bSmrg tmp_sharedflag='-G' ;; 5783ff89ac2bSmrg *) 5784ff89ac2bSmrg tmp_sharedflag='-shared' ;; 5785ff89ac2bSmrg esac 5786ff89ac2bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 578795b296d0Smrg 578895b296d0Smrg if test $supports_anon_versioning = yes; then 578995b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 579095b296d0Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 579195b296d0Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 5792ff89ac2bSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 579395b296d0Smrg fi 579495b296d0Smrg else 579595b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 579695b296d0Smrg fi 579795b296d0Smrg ;; 579895b296d0Smrg 579995b296d0Smrg netbsd*) 580095b296d0Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 580195b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 580295b296d0Smrg wlarc= 580395b296d0Smrg else 580495b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 580595b296d0Smrg _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' 580695b296d0Smrg fi 580795b296d0Smrg ;; 580895b296d0Smrg 580995b296d0Smrg solaris*) 581095b296d0Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 581195b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 581295b296d0Smrg cat <<EOF 1>&2 581395b296d0Smrg 581495b296d0Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 581595b296d0Smrg*** create shared libraries on Solaris systems. Therefore, libtool 581695b296d0Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 581795b296d0Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 581895b296d0Smrg*** your PATH or compiler configuration so that the native linker is 581995b296d0Smrg*** used, and then restart. 582095b296d0Smrg 582195b296d0SmrgEOF 582295b296d0Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 582395b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 582495b296d0Smrg _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' 582595b296d0Smrg else 582695b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 582795b296d0Smrg fi 582895b296d0Smrg ;; 582995b296d0Smrg 583095b296d0Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 583195b296d0Smrg case `$LD -v 2>&1` in 5832ff89ac2bSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 583395b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 583495b296d0Smrg cat <<_LT_EOF 1>&2 583595b296d0Smrg 583695b296d0Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 583795b296d0Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 583895b296d0Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 583995b296d0Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 584095b296d0Smrg*** your PATH or compiler configuration so that the native linker is 584195b296d0Smrg*** used, and then restart. 584295b296d0Smrg 584395b296d0Smrg_LT_EOF 584495b296d0Smrg ;; 584595b296d0Smrg *) 584695b296d0Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 584795b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 584895b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 584995b296d0Smrg _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' 585095b296d0Smrg else 585195b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 585295b296d0Smrg fi 585395b296d0Smrg ;; 585495b296d0Smrg esac 585595b296d0Smrg ;; 585695b296d0Smrg 585795b296d0Smrg sunos4*) 585895b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 585995b296d0Smrg wlarc= 586095b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 586195b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 586295b296d0Smrg ;; 586395b296d0Smrg 586495b296d0Smrg *) 586595b296d0Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 586695b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 586795b296d0Smrg _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' 586895b296d0Smrg else 586995b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 587095b296d0Smrg fi 587195b296d0Smrg ;; 587295b296d0Smrg esac 587395b296d0Smrg 587495b296d0Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 587595b296d0Smrg runpath_var= 587695b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 587795b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 587895b296d0Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 587995b296d0Smrg fi 588095b296d0Smrg else 588195b296d0Smrg # PORTME fill in a description of your system's linker (not GNU ld) 588295b296d0Smrg case $host_os in 588395b296d0Smrg aix3*) 588495b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 588595b296d0Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 588695b296d0Smrg _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' 588795b296d0Smrg # Note: this linker hardcodes the directories in LIBPATH if there 588895b296d0Smrg # are no directories specified by -L. 588995b296d0Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 589095b296d0Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 589195b296d0Smrg # Neither direct hardcoding nor static linking is supported with a 589295b296d0Smrg # broken collect2. 589395b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 589495b296d0Smrg fi 589595b296d0Smrg ;; 589695b296d0Smrg 5897ff89ac2bSmrg aix[[4-9]]*) 589895b296d0Smrg if test "$host_cpu" = ia64; then 589995b296d0Smrg # On IA64, the linker does run time linking by default, so we don't 590095b296d0Smrg # have to do anything special. 590195b296d0Smrg aix_use_runtimelinking=no 590295b296d0Smrg exp_sym_flag='-Bexport' 590395b296d0Smrg no_entry_flag="" 590495b296d0Smrg else 590595b296d0Smrg # If we're using GNU nm, then we don't want the "-C" option. 590695b296d0Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 590795b296d0Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 590895b296d0Smrg _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' 590995b296d0Smrg else 591095b296d0Smrg _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' 591195b296d0Smrg fi 591295b296d0Smrg aix_use_runtimelinking=no 591395b296d0Smrg 591495b296d0Smrg # Test if we are trying to use run time linking or normal 591595b296d0Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 591695b296d0Smrg # need to do runtime linking. 5917ff89ac2bSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 591895b296d0Smrg for ld_flag in $LDFLAGS; do 591995b296d0Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 592095b296d0Smrg aix_use_runtimelinking=yes 592195b296d0Smrg break 592295b296d0Smrg fi 592395b296d0Smrg done 592495b296d0Smrg ;; 592595b296d0Smrg esac 592695b296d0Smrg 592795b296d0Smrg exp_sym_flag='-bexport' 592895b296d0Smrg no_entry_flag='-bnoentry' 592995b296d0Smrg fi 593095b296d0Smrg 593195b296d0Smrg # When large executables or shared objects are built, AIX ld can 593295b296d0Smrg # have problems creating the table of contents. If linking a library 593395b296d0Smrg # or program results in "error TOC overflow" add -mminimal-toc to 593495b296d0Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 593595b296d0Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 593695b296d0Smrg 593795b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 593895b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 593995b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 594095b296d0Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 594195b296d0Smrg 594295b296d0Smrg if test "$GCC" = yes; then 594395b296d0Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 594495b296d0Smrg # We only want to do this on AIX 4.2 and lower, the check 594595b296d0Smrg # below for broken collect2 doesn't work under 4.3+ 594695b296d0Smrg collect2name=`${CC} -print-prog-name=collect2` 594795b296d0Smrg if test -f "$collect2name" && \ 594895b296d0Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 594995b296d0Smrg then 595095b296d0Smrg # We have reworked collect2 5951ff89ac2bSmrg : 595295b296d0Smrg else 595395b296d0Smrg # We have old collect2 595495b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 595595b296d0Smrg # It fails to find uninstalled libraries when the uninstalled 595695b296d0Smrg # path is not listed in the libpath. Setting hardcode_minus_L 595795b296d0Smrg # to unsupported forces relinking 595895b296d0Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 595995b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 596095b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 596195b296d0Smrg fi 596295b296d0Smrg ;; 596395b296d0Smrg esac 596495b296d0Smrg shared_flag='-shared' 596595b296d0Smrg if test "$aix_use_runtimelinking" = yes; then 596695b296d0Smrg shared_flag="$shared_flag "'${wl}-G' 596795b296d0Smrg fi 596895b296d0Smrg else 596995b296d0Smrg # not using gcc 597095b296d0Smrg if test "$host_cpu" = ia64; then 597195b296d0Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 597295b296d0Smrg # chokes on -Wl,-G. The following line is correct: 597395b296d0Smrg shared_flag='-G' 597495b296d0Smrg else 597595b296d0Smrg if test "$aix_use_runtimelinking" = yes; then 597695b296d0Smrg shared_flag='${wl}-G' 597795b296d0Smrg else 597895b296d0Smrg shared_flag='${wl}-bM:SRE' 597995b296d0Smrg fi 598095b296d0Smrg fi 598195b296d0Smrg fi 598295b296d0Smrg 598395b296d0Smrg # It seems that -bexpall does not export symbols beginning with 598495b296d0Smrg # underscore (_), so it is better to generate a list of symbols to export. 598595b296d0Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 598695b296d0Smrg if test "$aix_use_runtimelinking" = yes; then 598795b296d0Smrg # Warning - without using the other runtime loading flags (-brtl), 598895b296d0Smrg # -berok will link without error, but may produce a broken library. 598995b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 599095b296d0Smrg # Determine the default libpath from the value encoded in an empty executable. 599195b296d0Smrg _LT_AC_SYS_LIBPATH_AIX 599295b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 599395b296d0Smrg _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" 599495b296d0Smrg else 599595b296d0Smrg if test "$host_cpu" = ia64; then 599695b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 599795b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 599895b296d0Smrg _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" 599995b296d0Smrg else 600095b296d0Smrg # Determine the default libpath from the value encoded in an empty executable. 600195b296d0Smrg _LT_AC_SYS_LIBPATH_AIX 600295b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 600395b296d0Smrg # Warning - without using the other run time loading flags, 600495b296d0Smrg # -berok will link without error, but may produce a broken library. 600595b296d0Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 600695b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 600795b296d0Smrg # Exported symbols can be pulled into shared objects from archives 600895b296d0Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 600995b296d0Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 601095b296d0Smrg # This is similar to how AIX traditionally builds its shared libraries. 601195b296d0Smrg _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' 601295b296d0Smrg fi 601395b296d0Smrg fi 601495b296d0Smrg ;; 601595b296d0Smrg 601695b296d0Smrg amigaos*) 601795b296d0Smrg _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)' 601895b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 601995b296d0Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 602095b296d0Smrg # see comment about different semantics on the GNU ld section 602195b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 602295b296d0Smrg ;; 602395b296d0Smrg 602495b296d0Smrg bsdi[[45]]*) 602595b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 602695b296d0Smrg ;; 602795b296d0Smrg 602895b296d0Smrg cygwin* | mingw* | pw32*) 602995b296d0Smrg # When not using gcc, we currently assume that we are using 603095b296d0Smrg # Microsoft Visual C++. 603195b296d0Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 603295b296d0Smrg # no search path for DLLs. 603395b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 603495b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 603595b296d0Smrg # Tell ltmain to make .lib files, not .a files. 603695b296d0Smrg libext=lib 603795b296d0Smrg # Tell ltmain to make .dll files, not .so files. 603895b296d0Smrg shrext_cmds=".dll" 603995b296d0Smrg # FIXME: Setting linknames here is a bad hack. 604095b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 604195b296d0Smrg # The linker will automatically build a .lib file if we build a DLL. 604295b296d0Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 604395b296d0Smrg # FIXME: Should let the user specify the lib program. 6044ff89ac2bSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 604595b296d0Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 604695b296d0Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 604795b296d0Smrg ;; 604895b296d0Smrg 604995b296d0Smrg darwin* | rhapsody*) 605095b296d0Smrg case $host_os in 605195b296d0Smrg rhapsody* | darwin1.[[012]]) 605295b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 605395b296d0Smrg ;; 605495b296d0Smrg *) # Darwin 1.3 on 605595b296d0Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 605695b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 605795b296d0Smrg else 605895b296d0Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 605995b296d0Smrg 10.[[012]]) 606095b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 606195b296d0Smrg ;; 606295b296d0Smrg 10.*) 606395b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 606495b296d0Smrg ;; 606595b296d0Smrg esac 606695b296d0Smrg fi 606795b296d0Smrg ;; 606895b296d0Smrg esac 606995b296d0Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 607095b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 607195b296d0Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 607295b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 607395b296d0Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 607495b296d0Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 607595b296d0Smrg if test "$GCC" = yes ; then 607695b296d0Smrg output_verbose_link_cmd='echo' 6077ff89ac2bSmrg _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}" 6078ff89ac2bSmrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 6079ff89ac2bSmrg _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}" 6080ff89ac2bSmrg _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}" 608195b296d0Smrg else 608295b296d0Smrg case $cc_basename in 608395b296d0Smrg xlc*) 608495b296d0Smrg output_verbose_link_cmd='echo' 6085ff89ac2bSmrg _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' 608695b296d0Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 608795b296d0Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 6088ff89ac2bSmrg _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}' 608995b296d0Smrg _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}' 609095b296d0Smrg ;; 609195b296d0Smrg *) 609295b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 609395b296d0Smrg ;; 609495b296d0Smrg esac 609595b296d0Smrg fi 609695b296d0Smrg ;; 609795b296d0Smrg 609895b296d0Smrg dgux*) 609995b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 610095b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 610195b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 610295b296d0Smrg ;; 610395b296d0Smrg 610495b296d0Smrg freebsd1*) 610595b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 610695b296d0Smrg ;; 610795b296d0Smrg 610895b296d0Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 610995b296d0Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 611095b296d0Smrg # does not break anything, and helps significantly (at the cost of a little 611195b296d0Smrg # extra space). 611295b296d0Smrg freebsd2.2*) 611395b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 611495b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 611595b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 611695b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 611795b296d0Smrg ;; 611895b296d0Smrg 611995b296d0Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 612095b296d0Smrg freebsd2*) 612195b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 612295b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 612395b296d0Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 612495b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 612595b296d0Smrg ;; 612695b296d0Smrg 612795b296d0Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6128ff89ac2bSmrg freebsd* | dragonfly*) 612995b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 613095b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 613195b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 613295b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 613395b296d0Smrg ;; 613495b296d0Smrg 613595b296d0Smrg hpux9*) 613695b296d0Smrg if test "$GCC" = yes; then 613795b296d0Smrg _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' 613895b296d0Smrg else 613995b296d0Smrg _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' 614095b296d0Smrg fi 614195b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 614295b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 614395b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 614495b296d0Smrg 614595b296d0Smrg # hardcode_minus_L: Not really in the search PATH, 614695b296d0Smrg # but as the default location of the library. 614795b296d0Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 614895b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 614995b296d0Smrg ;; 615095b296d0Smrg 615195b296d0Smrg hpux10*) 615295b296d0Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 615395b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 615495b296d0Smrg else 615595b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 615695b296d0Smrg fi 615795b296d0Smrg if test "$with_gnu_ld" = no; then 615895b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 615995b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 616095b296d0Smrg 616195b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 616295b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 616395b296d0Smrg 616495b296d0Smrg # hardcode_minus_L: Not really in the search PATH, 616595b296d0Smrg # but as the default location of the library. 616695b296d0Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 616795b296d0Smrg fi 616895b296d0Smrg ;; 616995b296d0Smrg 617095b296d0Smrg hpux11*) 617195b296d0Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 617295b296d0Smrg case $host_cpu in 617395b296d0Smrg hppa*64*) 617495b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 617595b296d0Smrg ;; 617695b296d0Smrg ia64*) 617795b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 617895b296d0Smrg ;; 617995b296d0Smrg *) 618095b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 618195b296d0Smrg ;; 618295b296d0Smrg esac 618395b296d0Smrg else 618495b296d0Smrg case $host_cpu in 618595b296d0Smrg hppa*64*) 618695b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 618795b296d0Smrg ;; 618895b296d0Smrg ia64*) 618995b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 619095b296d0Smrg ;; 619195b296d0Smrg *) 619295b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 619395b296d0Smrg ;; 619495b296d0Smrg esac 619595b296d0Smrg fi 619695b296d0Smrg if test "$with_gnu_ld" = no; then 619795b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 619895b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 619995b296d0Smrg 620095b296d0Smrg case $host_cpu in 620195b296d0Smrg hppa*64*|ia64*) 620295b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 620395b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 620495b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 620595b296d0Smrg ;; 620695b296d0Smrg *) 620795b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 620895b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 620995b296d0Smrg 621095b296d0Smrg # hardcode_minus_L: Not really in the search PATH, 621195b296d0Smrg # but as the default location of the library. 621295b296d0Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 621395b296d0Smrg ;; 621495b296d0Smrg esac 621595b296d0Smrg fi 621695b296d0Smrg ;; 621795b296d0Smrg 621895b296d0Smrg irix5* | irix6* | nonstopux*) 621995b296d0Smrg if test "$GCC" = yes; then 622095b296d0Smrg _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' 622195b296d0Smrg else 622295b296d0Smrg _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' 622395b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 622495b296d0Smrg fi 622595b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 622695b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 622795b296d0Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 622895b296d0Smrg ;; 622995b296d0Smrg 623095b296d0Smrg netbsd*) 623195b296d0Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 623295b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 623395b296d0Smrg else 623495b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 623595b296d0Smrg fi 623695b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 623795b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 623895b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 623995b296d0Smrg ;; 624095b296d0Smrg 624195b296d0Smrg newsos6) 624295b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 624395b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 624495b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 624595b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 624695b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 624795b296d0Smrg ;; 624895b296d0Smrg 624995b296d0Smrg openbsd*) 6250ff89ac2bSmrg if test -f /usr/libexec/ld.so; then 6251ff89ac2bSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6252ff89ac2bSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6253ff89ac2bSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6254ff89ac2bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6255ff89ac2bSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6256ff89ac2bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6257ff89ac2bSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6258ff89ac2bSmrg else 6259ff89ac2bSmrg case $host_os in 6260ff89ac2bSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6261ff89ac2bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6262ff89ac2bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6263ff89ac2bSmrg ;; 6264ff89ac2bSmrg *) 6265ff89ac2bSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6266ff89ac2bSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6267ff89ac2bSmrg ;; 6268ff89ac2bSmrg esac 6269ff89ac2bSmrg fi 627095b296d0Smrg else 6271ff89ac2bSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 627295b296d0Smrg fi 627395b296d0Smrg ;; 627495b296d0Smrg 627595b296d0Smrg os2*) 627695b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 627795b296d0Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 627895b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 627995b296d0Smrg _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' 628095b296d0Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 628195b296d0Smrg ;; 628295b296d0Smrg 628395b296d0Smrg osf3*) 628495b296d0Smrg if test "$GCC" = yes; then 628595b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 628695b296d0Smrg _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' 628795b296d0Smrg else 628895b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 628995b296d0Smrg _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' 629095b296d0Smrg fi 629195b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 629295b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 629395b296d0Smrg ;; 629495b296d0Smrg 629595b296d0Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 629695b296d0Smrg if test "$GCC" = yes; then 629795b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 629895b296d0Smrg _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' 629995b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 630095b296d0Smrg else 630195b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 630295b296d0Smrg _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' 630395b296d0Smrg _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~ 630495b296d0Smrg $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' 630595b296d0Smrg 630695b296d0Smrg # Both c and cxx compiler support -rpath directly 630795b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 630895b296d0Smrg fi 630995b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 631095b296d0Smrg ;; 631195b296d0Smrg 631295b296d0Smrg solaris*) 631395b296d0Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 631495b296d0Smrg if test "$GCC" = yes; then 631595b296d0Smrg wlarc='${wl}' 631695b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 631795b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 631895b296d0Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 631995b296d0Smrg else 632095b296d0Smrg wlarc='' 632195b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 632295b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 632395b296d0Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 632495b296d0Smrg fi 632595b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 632695b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 632795b296d0Smrg case $host_os in 632895b296d0Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 632995b296d0Smrg *) 6330ff89ac2bSmrg # The compiler driver will combine and reorder linker options, 6331ff89ac2bSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 6332ff89ac2bSmrg # but is careful enough not to reorder. 633395b296d0Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6334ff89ac2bSmrg if test "$GCC" = yes; then 6335ff89ac2bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6336ff89ac2bSmrg else 6337ff89ac2bSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6338ff89ac2bSmrg fi 6339ff89ac2bSmrg ;; 634095b296d0Smrg esac 634195b296d0Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 634295b296d0Smrg ;; 634395b296d0Smrg 634495b296d0Smrg sunos4*) 634595b296d0Smrg if test "x$host_vendor" = xsequent; then 634695b296d0Smrg # Use $CC to link under sequent, because it throws in some extra .o 634795b296d0Smrg # files that make .init and .fini sections work. 634895b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 634995b296d0Smrg else 635095b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 635195b296d0Smrg fi 635295b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 635395b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 635495b296d0Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 635595b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 635695b296d0Smrg ;; 635795b296d0Smrg 635895b296d0Smrg sysv4) 635995b296d0Smrg case $host_vendor in 636095b296d0Smrg sni) 636195b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 636295b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 636395b296d0Smrg ;; 636495b296d0Smrg siemens) 636595b296d0Smrg ## LD is ld it makes a PLAMLIB 636695b296d0Smrg ## CC just makes a GrossModule. 636795b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 636895b296d0Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 636995b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 637095b296d0Smrg ;; 637195b296d0Smrg motorola) 637295b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 637395b296d0Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 637495b296d0Smrg ;; 637595b296d0Smrg esac 637695b296d0Smrg runpath_var='LD_RUN_PATH' 637795b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 637895b296d0Smrg ;; 637995b296d0Smrg 638095b296d0Smrg sysv4.3*) 638195b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 638295b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 638395b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 638495b296d0Smrg ;; 638595b296d0Smrg 638695b296d0Smrg sysv4*MP*) 638795b296d0Smrg if test -d /usr/nec; then 638895b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 638995b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 639095b296d0Smrg runpath_var=LD_RUN_PATH 639195b296d0Smrg hardcode_runpath_var=yes 639295b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 639395b296d0Smrg fi 639495b296d0Smrg ;; 639595b296d0Smrg 6396ff89ac2bSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 639795b296d0Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 639895b296d0Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 639995b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 640095b296d0Smrg runpath_var='LD_RUN_PATH' 640195b296d0Smrg 640295b296d0Smrg if test "$GCC" = yes; then 640395b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 640495b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 640595b296d0Smrg else 640695b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 640795b296d0Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 640895b296d0Smrg fi 640995b296d0Smrg ;; 641095b296d0Smrg 641195b296d0Smrg sysv5* | sco3.2v5* | sco5v6*) 641295b296d0Smrg # Note: We can NOT use -z defs as we might desire, because we do not 641395b296d0Smrg # link with -lc, and that would cause any symbols used from libc to 641495b296d0Smrg # always be unresolved, which means just about no library would 641595b296d0Smrg # ever link correctly. If we're not using GNU ld we use -z text 641695b296d0Smrg # though, which does catch some bad symbols but isn't as heavy-handed 641795b296d0Smrg # as -z defs. 641895b296d0Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 641995b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 642095b296d0Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 642195b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 642295b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 642395b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 642495b296d0Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 642595b296d0Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 642695b296d0Smrg runpath_var='LD_RUN_PATH' 642795b296d0Smrg 642895b296d0Smrg if test "$GCC" = yes; then 642995b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 643095b296d0Smrg _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' 643195b296d0Smrg else 643295b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 643395b296d0Smrg _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' 643495b296d0Smrg fi 643595b296d0Smrg ;; 643695b296d0Smrg 643795b296d0Smrg uts4*) 643895b296d0Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 643995b296d0Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 644095b296d0Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 644195b296d0Smrg ;; 644295b296d0Smrg 644395b296d0Smrg *) 644495b296d0Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 644595b296d0Smrg ;; 644695b296d0Smrg esac 644795b296d0Smrg fi 644895b296d0Smrg]) 644995b296d0SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 645095b296d0Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 645195b296d0Smrg 645295b296d0Smrg# 645395b296d0Smrg# Do we need to explicitly link libc? 645495b296d0Smrg# 645595b296d0Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 645695b296d0Smrgx|xyes) 645795b296d0Smrg # Assume -lc should be added 645895b296d0Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 645995b296d0Smrg 646095b296d0Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 646195b296d0Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 646295b296d0Smrg *'~'*) 646395b296d0Smrg # FIXME: we may have to deal with multi-command sequences. 646495b296d0Smrg ;; 646595b296d0Smrg '$CC '*) 646695b296d0Smrg # Test whether the compiler implicitly links with -lc since on some 646795b296d0Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 646895b296d0Smrg # to ld, don't add -lc before -lgcc. 646995b296d0Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 647095b296d0Smrg $rm conftest* 6471ff89ac2bSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 647295b296d0Smrg 647395b296d0Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 647495b296d0Smrg soname=conftest 647595b296d0Smrg lib=conftest 647695b296d0Smrg libobjs=conftest.$ac_objext 647795b296d0Smrg deplibs= 647895b296d0Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 647995b296d0Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 648095b296d0Smrg compiler_flags=-v 648195b296d0Smrg linker_flags=-v 648295b296d0Smrg verstring= 648395b296d0Smrg output_objdir=. 648495b296d0Smrg libname=conftest 648595b296d0Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 648695b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 648795b296d0Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 648895b296d0Smrg then 648995b296d0Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 649095b296d0Smrg else 649195b296d0Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 649295b296d0Smrg fi 649395b296d0Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 649495b296d0Smrg else 649595b296d0Smrg cat conftest.err 1>&5 649695b296d0Smrg fi 649795b296d0Smrg $rm conftest* 649895b296d0Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 649995b296d0Smrg ;; 650095b296d0Smrg esac 650195b296d0Smrg fi 650295b296d0Smrg ;; 650395b296d0Smrgesac 650495b296d0Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 650595b296d0Smrg 650695b296d0Smrg 650795b296d0Smrg# _LT_AC_FILE_LTDLL_C 650895b296d0Smrg# ------------------- 650995b296d0Smrg# Be careful that the start marker always follows a newline. 651095b296d0SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 651195b296d0Smrg# /* ltdll.c starts here */ 651295b296d0Smrg# #define WIN32_LEAN_AND_MEAN 651395b296d0Smrg# #include <windows.h> 651495b296d0Smrg# #undef WIN32_LEAN_AND_MEAN 651595b296d0Smrg# #include <stdio.h> 651695b296d0Smrg# 651795b296d0Smrg# #ifndef __CYGWIN__ 651895b296d0Smrg# # ifdef __CYGWIN32__ 651995b296d0Smrg# # define __CYGWIN__ __CYGWIN32__ 652095b296d0Smrg# # endif 652195b296d0Smrg# #endif 652295b296d0Smrg# 652395b296d0Smrg# #ifdef __cplusplus 652495b296d0Smrg# extern "C" { 652595b296d0Smrg# #endif 652695b296d0Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 652795b296d0Smrg# #ifdef __cplusplus 652895b296d0Smrg# } 652995b296d0Smrg# #endif 653095b296d0Smrg# 653195b296d0Smrg# #ifdef __CYGWIN__ 653295b296d0Smrg# #include <cygwin/cygwin_dll.h> 653395b296d0Smrg# DECLARE_CYGWIN_DLL( DllMain ); 653495b296d0Smrg# #endif 653595b296d0Smrg# HINSTANCE __hDllInstance_base; 653695b296d0Smrg# 653795b296d0Smrg# BOOL APIENTRY 653895b296d0Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 653995b296d0Smrg# { 654095b296d0Smrg# __hDllInstance_base = hInst; 654195b296d0Smrg# return TRUE; 654295b296d0Smrg# } 654395b296d0Smrg# /* ltdll.c ends here */ 654495b296d0Smrg])# _LT_AC_FILE_LTDLL_C 654595b296d0Smrg 654695b296d0Smrg 654795b296d0Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 654895b296d0Smrg# --------------------------------- 654995b296d0SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 655095b296d0Smrg 655195b296d0Smrg 655295b296d0Smrg# old names 655395b296d0SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 655495b296d0SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 655595b296d0SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 655695b296d0SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 655795b296d0SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 655895b296d0SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 655995b296d0SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 656095b296d0Smrg 656195b296d0Smrg# This is just to silence aclocal about the macro not being used 656295b296d0Smrgifelse([AC_DISABLE_FAST_INSTALL]) 656395b296d0Smrg 656495b296d0SmrgAC_DEFUN([LT_AC_PROG_GCJ], 656595b296d0Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 656695b296d0Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 656795b296d0Smrg AC_SUBST(GCJFLAGS) 656895b296d0Smrg]) 656995b296d0Smrg 657095b296d0SmrgAC_DEFUN([LT_AC_PROG_RC], 657195b296d0Smrg[AC_CHECK_TOOL(RC, windres, no) 657295b296d0Smrg]) 657395b296d0Smrg 6574ff89ac2bSmrg 6575ff89ac2bSmrg# Cheap backport of AS_EXECUTABLE_P and required macros 6576ff89ac2bSmrg# from Autoconf 2.59; we should not use $as_executable_p directly. 6577ff89ac2bSmrg 6578ff89ac2bSmrg# _AS_TEST_PREPARE 6579ff89ac2bSmrg# ---------------- 6580ff89ac2bSmrgm4_ifndef([_AS_TEST_PREPARE], 6581ff89ac2bSmrg[m4_defun([_AS_TEST_PREPARE], 6582ff89ac2bSmrg[if test -x / >/dev/null 2>&1; then 6583ff89ac2bSmrg as_executable_p='test -x' 6584ff89ac2bSmrgelse 6585ff89ac2bSmrg as_executable_p='test -f' 6586ff89ac2bSmrgfi 6587ff89ac2bSmrg])])# _AS_TEST_PREPARE 6588ff89ac2bSmrg 6589ff89ac2bSmrg# AS_EXECUTABLE_P 6590ff89ac2bSmrg# --------------- 6591ff89ac2bSmrg# Check whether a file is executable. 6592ff89ac2bSmrgm4_ifndef([AS_EXECUTABLE_P], 6593ff89ac2bSmrg[m4_defun([AS_EXECUTABLE_P], 6594ff89ac2bSmrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl 6595ff89ac2bSmrg$as_executable_p $1[]dnl 6596ff89ac2bSmrg])])# AS_EXECUTABLE_P 6597ff89ac2bSmrg 659895b296d0Smrg# NOTE: This macro has been submitted for inclusion into # 659995b296d0Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 660095b296d0Smrg# a released version of Autoconf we should remove this # 660195b296d0Smrg# macro and use it instead. # 660295b296d0Smrg# LT_AC_PROG_SED 660395b296d0Smrg# -------------- 660495b296d0Smrg# Check for a fully-functional sed program, that truncates 660595b296d0Smrg# as few characters as possible. Prefer GNU sed if found. 660695b296d0SmrgAC_DEFUN([LT_AC_PROG_SED], 660795b296d0Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 660895b296d0SmrgAC_CACHE_VAL(lt_cv_path_SED, 660995b296d0Smrg[# Loop through the user's path and test for sed and gsed. 661095b296d0Smrg# Then use that list of sed's as ones to test for truncation. 661195b296d0Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 661295b296d0Smrgfor as_dir in $PATH 661395b296d0Smrgdo 661495b296d0Smrg IFS=$as_save_IFS 661595b296d0Smrg test -z "$as_dir" && as_dir=. 661695b296d0Smrg for lt_ac_prog in sed gsed; do 661795b296d0Smrg for ac_exec_ext in '' $ac_executable_extensions; do 6618ff89ac2bSmrg if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 661995b296d0Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 662095b296d0Smrg fi 662195b296d0Smrg done 662295b296d0Smrg done 662395b296d0Smrgdone 6624ff89ac2bSmrgIFS=$as_save_IFS 662595b296d0Smrglt_ac_max=0 662695b296d0Smrglt_ac_count=0 662795b296d0Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 662895b296d0Smrg# along with /bin/sed that truncates output. 662995b296d0Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 663095b296d0Smrg test ! -f $lt_ac_sed && continue 663195b296d0Smrg cat /dev/null > conftest.in 663295b296d0Smrg lt_ac_count=0 663395b296d0Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 663495b296d0Smrg # Check for GNU sed and select it if it is found. 663595b296d0Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 663695b296d0Smrg lt_cv_path_SED=$lt_ac_sed 663795b296d0Smrg break 663895b296d0Smrg fi 663995b296d0Smrg while true; do 664095b296d0Smrg cat conftest.in conftest.in >conftest.tmp 664195b296d0Smrg mv conftest.tmp conftest.in 664295b296d0Smrg cp conftest.in conftest.nl 664395b296d0Smrg echo >>conftest.nl 664495b296d0Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 664595b296d0Smrg cmp -s conftest.out conftest.nl || break 664695b296d0Smrg # 10000 chars as input seems more than enough 664795b296d0Smrg test $lt_ac_count -gt 10 && break 664895b296d0Smrg lt_ac_count=`expr $lt_ac_count + 1` 664995b296d0Smrg if test $lt_ac_count -gt $lt_ac_max; then 665095b296d0Smrg lt_ac_max=$lt_ac_count 665195b296d0Smrg lt_cv_path_SED=$lt_ac_sed 665295b296d0Smrg fi 665395b296d0Smrg done 665495b296d0Smrgdone 665595b296d0Smrg]) 665695b296d0SmrgSED=$lt_cv_path_SED 6657ff89ac2bSmrgAC_SUBST([SED]) 665895b296d0SmrgAC_MSG_RESULT([$SED]) 665995b296d0Smrg]) 666095b296d0Smrg 666195b296d0Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 666295b296d0Smrg# 666395b296d0Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 666495b296d0Smrg# 666595b296d0Smrg# This program is free software; you can redistribute it and/or modify 666695b296d0Smrg# it under the terms of the GNU General Public License as published by 666795b296d0Smrg# the Free Software Foundation; either version 2 of the License, or 666895b296d0Smrg# (at your option) any later version. 666995b296d0Smrg# 667095b296d0Smrg# This program is distributed in the hope that it will be useful, but 667195b296d0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 667295b296d0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 667395b296d0Smrg# General Public License for more details. 667495b296d0Smrg# 667595b296d0Smrg# You should have received a copy of the GNU General Public License 667695b296d0Smrg# along with this program; if not, write to the Free Software 667795b296d0Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 667895b296d0Smrg# 667995b296d0Smrg# As a special exception to the GNU General Public License, if you 668095b296d0Smrg# distribute this file as part of a program that contains a 668195b296d0Smrg# configuration script generated by Autoconf, you may include it under 668295b296d0Smrg# the same distribution terms that you use for the rest of that program. 668395b296d0Smrg 668495b296d0Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 668595b296d0Smrg# ---------------------------------- 668695b296d0SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 668795b296d0Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 668895b296d0Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 668995b296d0SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 669095b296d0Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 669195b296d0Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 669295b296d0Smrgfi 669395b296d0Smrgif test -n "$PKG_CONFIG"; then 669495b296d0Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 669595b296d0Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 669695b296d0Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 669795b296d0Smrg AC_MSG_RESULT([yes]) 669895b296d0Smrg else 669995b296d0Smrg AC_MSG_RESULT([no]) 670095b296d0Smrg PKG_CONFIG="" 670195b296d0Smrg fi 670295b296d0Smrg 670395b296d0Smrgfi[]dnl 670495b296d0Smrg])# PKG_PROG_PKG_CONFIG 670595b296d0Smrg 670695b296d0Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 670795b296d0Smrg# 670895b296d0Smrg# Check to see whether a particular set of modules exists. Similar 670995b296d0Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 671095b296d0Smrg# 671195b296d0Smrg# 671295b296d0Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 671395b296d0Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 671495b296d0Smrg# PKG_CHECK_EXISTS manually 671595b296d0Smrg# -------------------------------------------------------------- 671695b296d0SmrgAC_DEFUN([PKG_CHECK_EXISTS], 671795b296d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 671895b296d0Smrgif test -n "$PKG_CONFIG" && \ 671995b296d0Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 672095b296d0Smrg m4_ifval([$2], [$2], [:]) 672195b296d0Smrgm4_ifvaln([$3], [else 672295b296d0Smrg $3])dnl 672395b296d0Smrgfi]) 672495b296d0Smrg 672595b296d0Smrg 672695b296d0Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 672795b296d0Smrg# --------------------------------------------- 672895b296d0Smrgm4_define([_PKG_CONFIG], 6729ff89ac2bSmrg[if test -n "$$1"; then 6730ff89ac2bSmrg pkg_cv_[]$1="$$1" 6731ff89ac2bSmrg elif test -n "$PKG_CONFIG"; then 6732ff89ac2bSmrg PKG_CHECK_EXISTS([$3], 6733ff89ac2bSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 6734ff89ac2bSmrg [pkg_failed=yes]) 6735ff89ac2bSmrg else 6736ff89ac2bSmrg pkg_failed=untried 673795b296d0Smrgfi[]dnl 673895b296d0Smrg])# _PKG_CONFIG 673995b296d0Smrg 674095b296d0Smrg# _PKG_SHORT_ERRORS_SUPPORTED 674195b296d0Smrg# ----------------------------- 674295b296d0SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 674395b296d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 674495b296d0Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 674595b296d0Smrg _pkg_short_errors_supported=yes 674695b296d0Smrgelse 674795b296d0Smrg _pkg_short_errors_supported=no 674895b296d0Smrgfi[]dnl 674995b296d0Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 675095b296d0Smrg 675195b296d0Smrg 675295b296d0Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 675395b296d0Smrg# [ACTION-IF-NOT-FOUND]) 675495b296d0Smrg# 675595b296d0Smrg# 675695b296d0Smrg# Note that if there is a possibility the first call to 675795b296d0Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 675895b296d0Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 675995b296d0Smrg# 676095b296d0Smrg# 676195b296d0Smrg# -------------------------------------------------------------- 676295b296d0SmrgAC_DEFUN([PKG_CHECK_MODULES], 676395b296d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 676495b296d0SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 676595b296d0SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 676695b296d0Smrg 676795b296d0Smrgpkg_failed=no 676895b296d0SmrgAC_MSG_CHECKING([for $1]) 676995b296d0Smrg 677095b296d0Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 677195b296d0Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 677295b296d0Smrg 677395b296d0Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 677495b296d0Smrgand $1[]_LIBS to avoid the need to call pkg-config. 677595b296d0SmrgSee the pkg-config man page for more details.]) 677695b296d0Smrg 677795b296d0Smrgif test $pkg_failed = yes; then 677895b296d0Smrg _PKG_SHORT_ERRORS_SUPPORTED 677995b296d0Smrg if test $_pkg_short_errors_supported = yes; then 6780ff89ac2bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 678195b296d0Smrg else 6782ff89ac2bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 678395b296d0Smrg fi 678495b296d0Smrg # Put the nasty error message in config.log where it belongs 678595b296d0Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 678695b296d0Smrg 678795b296d0Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 678895b296d0Smrg[Package requirements ($2) were not met: 678995b296d0Smrg 679095b296d0Smrg$$1_PKG_ERRORS 679195b296d0Smrg 679295b296d0SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 679395b296d0Smrginstalled software in a non-standard prefix. 679495b296d0Smrg 679595b296d0Smrg_PKG_TEXT 679695b296d0Smrg])], 6797ff89ac2bSmrg [AC_MSG_RESULT([no]) 6798ff89ac2bSmrg $4]) 679995b296d0Smrgelif test $pkg_failed = untried; then 680095b296d0Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 680195b296d0Smrg[The pkg-config script could not be found or is too old. Make sure it 680295b296d0Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 680395b296d0Smrgpath to pkg-config. 680495b296d0Smrg 680595b296d0Smrg_PKG_TEXT 680695b296d0Smrg 6807ff89ac2bSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 680895b296d0Smrg [$4]) 680995b296d0Smrgelse 681095b296d0Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 681195b296d0Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 681295b296d0Smrg AC_MSG_RESULT([yes]) 681395b296d0Smrg ifelse([$3], , :, [$3]) 681495b296d0Smrgfi[]dnl 681595b296d0Smrg])# PKG_CHECK_MODULES 681695b296d0Smrg 681795b296d0Smrgdnl 681895b296d0Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 681995b296d0Smrgdnl 682095b296d0Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 682195b296d0Smrgdnl copy of this software and associated documentation files (the 682295b296d0Smrgdnl "Software"), to deal in the Software without restriction, including 682395b296d0Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 682495b296d0Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 682595b296d0Smrgdnl to whom the Software is furnished to do so, provided that the above 682695b296d0Smrgdnl copyright notice(s) and this permission notice appear in all copies of 682795b296d0Smrgdnl the Software and that both the above copyright notice(s) and this 682895b296d0Smrgdnl permission notice appear in supporting documentation. 682995b296d0Smrgdnl 683095b296d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 683195b296d0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 683295b296d0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 683395b296d0Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 683495b296d0Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 683595b296d0Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 683695b296d0Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 683795b296d0Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 683895b296d0Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 683995b296d0Smrgdnl 684095b296d0Smrgdnl Except as contained in this notice, the name of a copyright holder 684195b296d0Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 684295b296d0Smrgdnl or other dealings in this Software without prior written authorization 684395b296d0Smrgdnl of the copyright holder. 684495b296d0Smrg 684595b296d0Smrg# XORG_MACROS_VERSION(required-version) 684695b296d0Smrg# ------------------------------------- 684795b296d0Smrg# Minimum version: 1.1.0 684895b296d0Smrg# 684995b296d0Smrg# If you're using a macro added in Version 1.1 or newer, include this in 685095b296d0Smrg# your configure.ac with the minimum required version, such as: 685195b296d0Smrg# XORG_MACROS_VERSION(1.1) 685295b296d0Smrg# 685395b296d0Smrg# To force at least a version with this macro defined, also add: 685495b296d0Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 685595b296d0Smrg# 685695b296d0Smrg# 685795b296d0Smrg# See the "minimum version" comment for each macro you use to see what 685895b296d0Smrg# version you require. 685995b296d0SmrgAC_DEFUN([XORG_MACROS_VERSION],[ 686095b296d0Smrg [XORG_MACROS_needed_version=$1 686195b296d0Smrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 686295b296d0Smrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 686395b296d0Smrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 6864ff89ac2bSmrg [XORG_MACROS_version=1.1.6 686595b296d0Smrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 686695b296d0Smrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 686795b296d0Smrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 686895b296d0Smrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 686995b296d0Smrg fi 687095b296d0Smrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 687195b296d0Smrg 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]) 687295b296d0Smrg fi 687395b296d0Smrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 687495b296d0Smrg]) # XORG_MACROS_VERSION 687595b296d0Smrg 687695b296d0Smrg# XORG_PROG_RAWCPP() 687795b296d0Smrg# ------------------ 687895b296d0Smrg# Minimum version: 1.0.0 687995b296d0Smrg# 688095b296d0Smrg# Find cpp program and necessary flags for use in pre-processing text files 688195b296d0Smrg# such as man pages and config files 688295b296d0SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 688395b296d0SmrgAC_REQUIRE([AC_PROG_CPP]) 688495b296d0SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 688595b296d0Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 688695b296d0Smrg 688795b296d0Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 688895b296d0Smrg# which is not the best choice for supporting other OS'es, but covers most 688995b296d0Smrg# of the ones we need for now. 689095b296d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 689195b296d0SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 689295b296d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 689395b296d0Smrg AC_MSG_RESULT([no]) 689495b296d0Smrgelse 689595b296d0Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 689695b296d0Smrg RAWCPPFLAGS=-undef 689795b296d0Smrg AC_MSG_RESULT([yes]) 689895b296d0Smrg else 689995b296d0Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 690095b296d0Smrg fi 690195b296d0Smrgfi 690295b296d0Smrgrm -f conftest.$ac_ext 690395b296d0Smrg 690495b296d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 690595b296d0SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 690695b296d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 690795b296d0Smrg AC_MSG_RESULT([no]) 690895b296d0Smrgelse 690995b296d0Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 691095b296d0Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 691195b296d0Smrg AC_MSG_RESULT([yes]) 691295b296d0Smrg else 691395b296d0Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 691495b296d0Smrg fi 691595b296d0Smrgfi 691695b296d0Smrgrm -f conftest.$ac_ext 691795b296d0SmrgAC_SUBST(RAWCPPFLAGS) 691895b296d0Smrg]) # XORG_PROG_RAWCPP 691995b296d0Smrg 692095b296d0Smrg# XORG_MANPAGE_SECTIONS() 692195b296d0Smrg# ----------------------- 692295b296d0Smrg# Minimum version: 1.0.0 692395b296d0Smrg# 692495b296d0Smrg# Determine which sections man pages go in for the different man page types 692595b296d0Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 692695b296d0Smrg# Not sure if there's any better way than just hardcoding by OS name. 692795b296d0Smrg# Override default settings by setting environment variables 692895b296d0Smrg 692995b296d0SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 693095b296d0SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 693195b296d0Smrg 693295b296d0Smrgif test x$APP_MAN_SUFFIX = x ; then 6933ff89ac2bSmrg APP_MAN_SUFFIX=1 693495b296d0Smrgfi 693595b296d0Smrgif test x$APP_MAN_DIR = x ; then 6936ff89ac2bSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 693795b296d0Smrgfi 693895b296d0Smrg 693995b296d0Smrgif test x$LIB_MAN_SUFFIX = x ; then 6940ff89ac2bSmrg LIB_MAN_SUFFIX=3 694195b296d0Smrgfi 694295b296d0Smrgif test x$LIB_MAN_DIR = x ; then 6943ff89ac2bSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 694495b296d0Smrgfi 694595b296d0Smrg 694695b296d0Smrgif test x$FILE_MAN_SUFFIX = x ; then 694795b296d0Smrg case $host_os in 694895b296d0Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 694995b296d0Smrg *) FILE_MAN_SUFFIX=5 ;; 695095b296d0Smrg esac 695195b296d0Smrgfi 695295b296d0Smrgif test x$FILE_MAN_DIR = x ; then 6953ff89ac2bSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 695495b296d0Smrgfi 695595b296d0Smrg 695695b296d0Smrgif test x$MISC_MAN_SUFFIX = x ; then 695795b296d0Smrg case $host_os in 695895b296d0Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 695995b296d0Smrg *) MISC_MAN_SUFFIX=7 ;; 696095b296d0Smrg esac 696195b296d0Smrgfi 696295b296d0Smrgif test x$MISC_MAN_DIR = x ; then 6963ff89ac2bSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 696495b296d0Smrgfi 696595b296d0Smrg 696695b296d0Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 696795b296d0Smrg case $host_os in 696895b296d0Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 696995b296d0Smrg *) DRIVER_MAN_SUFFIX=4 ;; 697095b296d0Smrg esac 697195b296d0Smrgfi 697295b296d0Smrgif test x$DRIVER_MAN_DIR = x ; then 6973ff89ac2bSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 697495b296d0Smrgfi 697595b296d0Smrg 697695b296d0Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 697795b296d0Smrg case $host_os in 697895b296d0Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 697995b296d0Smrg *) ADMIN_MAN_SUFFIX=8 ;; 698095b296d0Smrg esac 698195b296d0Smrgfi 698295b296d0Smrgif test x$ADMIN_MAN_DIR = x ; then 698395b296d0Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 698495b296d0Smrgfi 698595b296d0Smrg 698695b296d0Smrg 698795b296d0SmrgAC_SUBST([APP_MAN_SUFFIX]) 698895b296d0SmrgAC_SUBST([LIB_MAN_SUFFIX]) 698995b296d0SmrgAC_SUBST([FILE_MAN_SUFFIX]) 699095b296d0SmrgAC_SUBST([MISC_MAN_SUFFIX]) 699195b296d0SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 699295b296d0SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 699395b296d0SmrgAC_SUBST([APP_MAN_DIR]) 699495b296d0SmrgAC_SUBST([LIB_MAN_DIR]) 699595b296d0SmrgAC_SUBST([FILE_MAN_DIR]) 699695b296d0SmrgAC_SUBST([MISC_MAN_DIR]) 699795b296d0SmrgAC_SUBST([DRIVER_MAN_DIR]) 699895b296d0SmrgAC_SUBST([ADMIN_MAN_DIR]) 699995b296d0Smrg]) # XORG_MANPAGE_SECTIONS 700095b296d0Smrg 700195b296d0Smrg# XORG_CHECK_LINUXDOC 700295b296d0Smrg# ------------------- 700395b296d0Smrg# Minimum version: 1.0.0 700495b296d0Smrg# 700595b296d0Smrg# Defines the variable MAKE_TEXT if the necessary tools and 700695b296d0Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 700795b296d0Smrg# Whether or not the necessary tools and files are found can be checked 700895b296d0Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 700995b296d0SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 7010ff89ac2bSmrgXORG_SGML_PATH=$prefix/share/sgml 7011ff89ac2bSmrgHAVE_DEFS_ENT= 7012ff89ac2bSmrg 7013ff89ac2bSmrgif test x"$cross_compiling" = x"yes" ; then 7014ff89ac2bSmrg HAVE_DEFS_ENT=no 7015ff89ac2bSmrgelse 7016ff89ac2bSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 7017ff89ac2bSmrgfi 701895b296d0Smrg 701995b296d0SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 702095b296d0SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 702195b296d0Smrg 702295b296d0SmrgAC_MSG_CHECKING([Whether to build documentation]) 702395b296d0Smrg 7024ff89ac2bSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 702595b296d0Smrg BUILDDOC=yes 702695b296d0Smrgelse 702795b296d0Smrg BUILDDOC=no 702895b296d0Smrgfi 702995b296d0Smrg 703095b296d0SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 703195b296d0Smrg 703295b296d0SmrgAC_MSG_RESULT([$BUILDDOC]) 703395b296d0Smrg 703495b296d0SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 703595b296d0Smrg 7036ff89ac2bSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 703795b296d0Smrg BUILDPDFDOC=yes 703895b296d0Smrgelse 703995b296d0Smrg BUILDPDFDOC=no 704095b296d0Smrgfi 704195b296d0Smrg 704295b296d0SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 704395b296d0Smrg 704495b296d0SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 704595b296d0Smrg 7046ff89ac2bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 7047ff89ac2bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 704895b296d0SmrgMAKE_PDF="$PS2PDF" 7049ff89ac2bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 705095b296d0Smrg 705195b296d0SmrgAC_SUBST(MAKE_TEXT) 705295b296d0SmrgAC_SUBST(MAKE_PS) 705395b296d0SmrgAC_SUBST(MAKE_PDF) 705495b296d0SmrgAC_SUBST(MAKE_HTML) 705595b296d0Smrg]) # XORG_CHECK_LINUXDOC 705695b296d0Smrg 7057ff89ac2bSmrg# XORG_CHECK_DOCBOOK 7058ff89ac2bSmrg# ------------------- 7059ff89ac2bSmrg# Minimum version: 1.0.0 7060ff89ac2bSmrg# 7061ff89ac2bSmrg# Checks for the ability to build output formats from SGML DocBook source. 7062ff89ac2bSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 7063ff89ac2bSmrg# indicates whether the necessary tools and files are found and, if set, 7064ff89ac2bSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 7065ff89ac2bSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 7066ff89ac2bSmrgXORG_SGML_PATH=$prefix/share/sgml 7067ff89ac2bSmrgHAVE_DEFS_ENT= 7068ff89ac2bSmrgBUILDTXTDOC=no 7069ff89ac2bSmrgBUILDPDFDOC=no 7070ff89ac2bSmrgBUILDPSDOC=no 7071ff89ac2bSmrgBUILDHTMLDOC=no 7072ff89ac2bSmrg 7073ff89ac2bSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 7074ff89ac2bSmrg 7075ff89ac2bSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 7076ff89ac2bSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 7077ff89ac2bSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 7078ff89ac2bSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 7079ff89ac2bSmrg 7080ff89ac2bSmrgAC_MSG_CHECKING([Whether to build text documentation]) 7081ff89ac2bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 7082ff89ac2bSmrg test x$BUILD_TXTDOC != xno; then 7083ff89ac2bSmrg BUILDTXTDOC=yes 7084ff89ac2bSmrgfi 7085ff89ac2bSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 7086ff89ac2bSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 7087ff89ac2bSmrg 7088ff89ac2bSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 7089ff89ac2bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 7090ff89ac2bSmrg test x$BUILD_PDFDOC != xno; then 7091ff89ac2bSmrg BUILDPDFDOC=yes 7092ff89ac2bSmrgfi 7093ff89ac2bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 7094ff89ac2bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 7095ff89ac2bSmrg 7096ff89ac2bSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 7097ff89ac2bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 7098ff89ac2bSmrg test x$BUILD_PSDOC != xno; then 7099ff89ac2bSmrg BUILDPSDOC=yes 7100ff89ac2bSmrgfi 7101ff89ac2bSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 7102ff89ac2bSmrgAC_MSG_RESULT([$BUILDPSDOC]) 7103ff89ac2bSmrg 7104ff89ac2bSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 7105ff89ac2bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 7106ff89ac2bSmrg test x$BUILD_HTMLDOC != xno; then 7107ff89ac2bSmrg BUILDHTMLDOC=yes 7108ff89ac2bSmrgfi 7109ff89ac2bSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 7110ff89ac2bSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 7111ff89ac2bSmrg 7112ff89ac2bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 7113ff89ac2bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 7114ff89ac2bSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 7115ff89ac2bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 7116ff89ac2bSmrg 7117ff89ac2bSmrgAC_SUBST(MAKE_TEXT) 7118ff89ac2bSmrgAC_SUBST(MAKE_PS) 7119ff89ac2bSmrgAC_SUBST(MAKE_PDF) 7120ff89ac2bSmrgAC_SUBST(MAKE_HTML) 7121ff89ac2bSmrg]) # XORG_CHECK_DOCBOOK 7122ff89ac2bSmrg 712395b296d0Smrg# XORG_CHECK_MALLOC_ZERO 712495b296d0Smrg# ---------------------- 712595b296d0Smrg# Minimum version: 1.0.0 712695b296d0Smrg# 712795b296d0Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 712895b296d0Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 712995b296d0Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 713095b296d0SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 713195b296d0SmrgAC_ARG_ENABLE(malloc0returnsnull, 713295b296d0Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 713395b296d0Smrg [malloc(0) returns NULL (default: auto)]), 713495b296d0Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 713595b296d0Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 713695b296d0Smrg 713795b296d0SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 713895b296d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 713995b296d0Smrg AC_RUN_IFELSE([ 714095b296d0Smrgchar *malloc(); 714195b296d0Smrgchar *realloc(); 714295b296d0Smrgchar *calloc(); 714395b296d0Smrgmain() { 714495b296d0Smrg char *m0, *r0, *c0, *p; 714595b296d0Smrg m0 = malloc(0); 714695b296d0Smrg p = malloc(10); 714795b296d0Smrg r0 = realloc(p,0); 714895b296d0Smrg c0 = calloc(0); 714995b296d0Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 715095b296d0Smrg}], 715195b296d0Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 715295b296d0Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 715395b296d0Smrgfi 715495b296d0SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 715595b296d0Smrg 715695b296d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 715795b296d0Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 715895b296d0Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 715995b296d0Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 716095b296d0Smrgelse 716195b296d0Smrg MALLOC_ZERO_CFLAGS="" 716295b296d0Smrg XMALLOC_ZERO_CFLAGS="" 716395b296d0Smrg XTMALLOC_ZERO_CFLAGS="" 716495b296d0Smrgfi 716595b296d0Smrg 716695b296d0SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 716795b296d0SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 716895b296d0SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 716995b296d0Smrg]) # XORG_CHECK_MALLOC_ZERO 717095b296d0Smrg 717195b296d0Smrg# XORG_WITH_LINT() 717295b296d0Smrg# ---------------- 717395b296d0Smrg# Minimum version: 1.1.0 717495b296d0Smrg# 717595b296d0Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 717695b296d0Smrg# is specified. (Use --with-lint=sparse for sparse.) 717795b296d0Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 717895b296d0Smrg# Sets $LINT_FLAGS to flags to pass to source checker 717995b296d0Smrg# Sets LINT automake conditional if enabled (default: disabled) 718095b296d0Smrg# 718195b296d0SmrgAC_DEFUN([XORG_WITH_LINT],[ 718295b296d0Smrg 718395b296d0Smrg# Allow checking code with lint, sparse, etc. 718495b296d0SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 718595b296d0Smrg [Use a lint-style source code checker (default: disabled)])], 718695b296d0Smrg [use_lint=$withval], [use_lint=no]) 718795b296d0Smrgif test "x$use_lint" = "xyes" ; then 718895b296d0Smrg LINT="lint" 718995b296d0Smrgelse 719095b296d0Smrg LINT="$use_lint" 719195b296d0Smrgfi 719295b296d0Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 719395b296d0Smrg case $LINT in 719495b296d0Smrg lint|*/lint) 719595b296d0Smrg case $host_os in 719695b296d0Smrg solaris*) 719795b296d0Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 719895b296d0Smrg ;; 719995b296d0Smrg esac 720095b296d0Smrg ;; 720195b296d0Smrg esac 720295b296d0Smrgfi 720395b296d0Smrg 720495b296d0SmrgAC_SUBST(LINT) 720595b296d0SmrgAC_SUBST(LINT_FLAGS) 720695b296d0SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 720795b296d0Smrg 720895b296d0Smrg]) # XORG_WITH_LINT 720995b296d0Smrg 721095b296d0Smrg# XORG_LINT_LIBRARY(LIBNAME) 721195b296d0Smrg# -------------------------- 721295b296d0Smrg# Minimum version: 1.1.0 721395b296d0Smrg# 721495b296d0Smrg# Sets up flags for building lint libraries for checking programs that call 721595b296d0Smrg# functions in the library. 721695b296d0Smrg# Disabled by default, enable with --enable-lint-library 721795b296d0Smrg# Sets: 721895b296d0Smrg# @LINTLIB@ - name of lint library file to make 721995b296d0Smrg# MAKE_LINT_LIB - automake conditional 722095b296d0Smrg# 722195b296d0Smrg 722295b296d0SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 722395b296d0SmrgAC_REQUIRE([XORG_WITH_LINT]) 722495b296d0Smrg# Build lint "library" for more indepth checks of programs calling this library 722595b296d0SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 722695b296d0Smrg [Create lint library (default: disabled)])], 722795b296d0Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 722895b296d0Smrgif test "x$make_lint_lib" != "xno" ; then 722995b296d0Smrg if test "x$LINT" = "xno" ; then 723095b296d0Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 723195b296d0Smrg fi 723295b296d0Smrg if test "x$make_lint_lib" = "xyes" ; then 723395b296d0Smrg LINTLIB=llib-l$1.ln 723495b296d0Smrg else 723595b296d0Smrg LINTLIB=$make_lint_lib 723695b296d0Smrg fi 723795b296d0Smrgfi 723895b296d0SmrgAC_SUBST(LINTLIB) 723995b296d0SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 724095b296d0Smrg 724195b296d0Smrg]) # XORG_LINT_LIBRARY 724295b296d0Smrg 724395b296d0Smrgdnl Copyright 2005 Red Hat, Inc 724495b296d0Smrgdnl 724595b296d0Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 724695b296d0Smrgdnl documentation for any purpose is hereby granted without fee, provided that 724795b296d0Smrgdnl the above copyright notice appear in all copies and that both that 724895b296d0Smrgdnl copyright notice and this permission notice appear in supporting 724995b296d0Smrgdnl documentation. 725095b296d0Smrgdnl 725195b296d0Smrgdnl The above copyright notice and this permission notice shall be included 725295b296d0Smrgdnl in all copies or substantial portions of the Software. 725395b296d0Smrgdnl 725495b296d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 725595b296d0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 725695b296d0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 725795b296d0Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 725895b296d0Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 725995b296d0Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 726095b296d0Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 726195b296d0Smrgdnl 726295b296d0Smrgdnl Except as contained in this notice, the name of the copyright holders shall 726395b296d0Smrgdnl not be used in advertising or otherwise to promote the sale, use or 726495b296d0Smrgdnl other dealings in this Software without prior written authorization 726595b296d0Smrgdnl from the copyright holders. 726695b296d0Smrgdnl 726795b296d0Smrg 726895b296d0Smrg# XORG_DRIVER_CHECK_EXT() 726995b296d0Smrg# -------------------------- 727095b296d0Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 727195b296d0Smrg# is defined, then add $1 to $REQUIRED_MODULES. 727295b296d0Smrg 727395b296d0SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 727495b296d0Smrg SAVE_CFLAGS="$CFLAGS" 727595b296d0Smrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 727695b296d0Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 727795b296d0Smrg#include "xorg-server.h" 727895b296d0Smrg#if !defined $1 727995b296d0Smrg#error $1 not defined 728095b296d0Smrg#endif 728195b296d0Smrg ]])], 728295b296d0Smrg [_EXT_CHECK=yes], 728395b296d0Smrg [_EXT_CHECK=no]) 728495b296d0Smrg CFLAGS="$SAVE_CFLAGS" 728595b296d0Smrg AC_MSG_CHECKING([if $1 is defined]) 728695b296d0Smrg AC_MSG_RESULT([$_EXT_CHECK]) 728795b296d0Smrg if test "$_EXT_CHECK" != no; then 728895b296d0Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 728995b296d0Smrg fi 729095b296d0Smrg]) 729195b296d0Smrg 729295b296d0Smrgdnl Copyright 2005 Red Hat, Inc 729395b296d0Smrgdnl 729495b296d0Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 729595b296d0Smrgdnl documentation for any purpose is hereby granted without fee, provided that 729695b296d0Smrgdnl the above copyright notice appear in all copies and that both that 729795b296d0Smrgdnl copyright notice and this permission notice appear in supporting 729895b296d0Smrgdnl documentation. 729995b296d0Smrgdnl 730095b296d0Smrgdnl The above copyright notice and this permission notice shall be included 730195b296d0Smrgdnl in all copies or substantial portions of the Software. 730295b296d0Smrgdnl 730395b296d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 730495b296d0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 730595b296d0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 730695b296d0Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 730795b296d0Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 730895b296d0Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 730995b296d0Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 731095b296d0Smrgdnl 731195b296d0Smrgdnl Except as contained in this notice, the name of the copyright holders shall 731295b296d0Smrgdnl not be used in advertising or otherwise to promote the sale, use or 731395b296d0Smrgdnl other dealings in this Software without prior written authorization 731495b296d0Smrgdnl from the copyright holders. 731595b296d0Smrgdnl 731695b296d0Smrg 731795b296d0Smrg# XORG_RELEASE_VERSION 731895b296d0Smrg# -------------------- 731995b296d0Smrg# Adds --with/without-release-string and changes the PACKAGE and 732095b296d0Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 7321ff89ac2bSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 7322ff89ac2bSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 732395b296d0Smrg 732495b296d0SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 732595b296d0Smrg AC_ARG_WITH(release-version, 732695b296d0Smrg AC_HELP_STRING([--with-release-version=STRING], 732795b296d0Smrg [Use release version string in package name]), 732895b296d0Smrg [RELEASE_VERSION="$withval"], 732995b296d0Smrg [RELEASE_VERSION=""]) 733095b296d0Smrg if test "x$RELEASE_VERSION" != "x"; then 733195b296d0Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 733295b296d0Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 733395b296d0Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 733495b296d0Smrg fi 7335ff89ac2bSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 7336ff89ac2bSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 7337ff89ac2bSmrg [Major version of this package]) 7338ff89ac2bSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 7339ff89ac2bSmrg if test "x$PVM" = "x"; then 7340ff89ac2bSmrg PVM="0" 7341ff89ac2bSmrg fi 7342ff89ac2bSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 7343ff89ac2bSmrg [$PVM], 7344ff89ac2bSmrg [Minor version of this package]) 7345ff89ac2bSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 7346ff89ac2bSmrg if test "x$PVP" = "x"; then 7347ff89ac2bSmrg PVP="0" 7348ff89ac2bSmrg fi 7349ff89ac2bSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 7350ff89ac2bSmrg [$PVP], 7351ff89ac2bSmrg [Patch version of this package]) 735295b296d0Smrg]) 735395b296d0Smrg 7354ff89ac2bSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. 735595b296d0Smrg# 735695b296d0Smrg# This file is free software; the Free Software Foundation 735795b296d0Smrg# gives unlimited permission to copy and/or distribute it, 735895b296d0Smrg# with or without modifications, as long as this notice is preserved. 735995b296d0Smrg 736095b296d0Smrg# AM_AUTOMAKE_VERSION(VERSION) 736195b296d0Smrg# ---------------------------- 736295b296d0Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 736395b296d0Smrg# generated from the m4 files accompanying Automake X.Y. 7364ff89ac2bSmrg# (This private macro should not be called outside this file.) 7365ff89ac2bSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 7366ff89ac2bSmrg[am__api_version='1.10' 7367ff89ac2bSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 7368ff89ac2bSmrgdnl require some minimum version. Point them to the right macro. 7369ff89ac2bSmrgm4_if([$1], [1.10.1], [], 7370ff89ac2bSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 7371ff89ac2bSmrg]) 7372ff89ac2bSmrg 7373ff89ac2bSmrg# _AM_AUTOCONF_VERSION(VERSION) 7374ff89ac2bSmrg# ----------------------------- 7375ff89ac2bSmrg# aclocal traces this macro to find the Autoconf version. 7376ff89ac2bSmrg# This is a private macro too. Using m4_define simplifies 7377ff89ac2bSmrg# the logic in aclocal, which can simply ignore this definition. 7378ff89ac2bSmrgm4_define([_AM_AUTOCONF_VERSION], []) 737995b296d0Smrg 738095b296d0Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 738195b296d0Smrg# ------------------------------- 7382ff89ac2bSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 738395b296d0Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 738495b296d0SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 7385ff89ac2bSmrg[AM_AUTOMAKE_VERSION([1.10.1])dnl 7386ff89ac2bSmrgm4_ifndef([AC_AUTOCONF_VERSION], 7387ff89ac2bSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 7388ff89ac2bSmrg_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) 738995b296d0Smrg 739095b296d0Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 739195b296d0Smrg 739295b296d0Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 739395b296d0Smrg# 739495b296d0Smrg# This file is free software; the Free Software Foundation 739595b296d0Smrg# gives unlimited permission to copy and/or distribute it, 739695b296d0Smrg# with or without modifications, as long as this notice is preserved. 739795b296d0Smrg 739895b296d0Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 739995b296d0Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 740095b296d0Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 740195b296d0Smrg# 740295b296d0Smrg# Of course, Automake must honor this variable whenever it calls a 740395b296d0Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 740495b296d0Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 740595b296d0Smrg# depending on how configure is run. This is pretty annoying, since 740695b296d0Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 740795b296d0Smrg# source directory, any form will work fine, but in subdirectories a 740895b296d0Smrg# relative path needs to be adjusted first. 740995b296d0Smrg# 741095b296d0Smrg# $ac_aux_dir/missing 741195b296d0Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 741295b296d0Smrg# $top_srcdir/$ac_aux_dir/missing 741395b296d0Smrg# fails if $ac_aux_dir is absolute, 741495b296d0Smrg# fails when called from a subdirectory in a VPATH build with 741595b296d0Smrg# a relative $ac_aux_dir 741695b296d0Smrg# 741795b296d0Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 741895b296d0Smrg# are both prefixed by $srcdir. In an in-source build this is usually 741995b296d0Smrg# harmless because $srcdir is `.', but things will broke when you 742095b296d0Smrg# start a VPATH build or use an absolute $srcdir. 742195b296d0Smrg# 742295b296d0Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 742395b296d0Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 742495b296d0Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 742595b296d0Smrg# and then we would define $MISSING as 742695b296d0Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 742795b296d0Smrg# This will work as long as MISSING is not called from configure, because 742895b296d0Smrg# unfortunately $(top_srcdir) has no meaning in configure. 742995b296d0Smrg# However there are other variables, like CC, which are often used in 743095b296d0Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 743195b296d0Smrg# 743295b296d0Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 743395b296d0Smrg# absolute PATH. The drawback is that using absolute paths prevent a 743495b296d0Smrg# configured tree to be moved without reconfiguration. 743595b296d0Smrg 743695b296d0SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 743795b296d0Smrg[dnl Rely on autoconf to set up CDPATH properly. 743895b296d0SmrgAC_PREREQ([2.50])dnl 743995b296d0Smrg# expand $ac_aux_dir to an absolute path 744095b296d0Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 744195b296d0Smrg]) 744295b296d0Smrg 744395b296d0Smrg# AM_CONDITIONAL -*- Autoconf -*- 744495b296d0Smrg 7445ff89ac2bSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 744695b296d0Smrg# Free Software Foundation, Inc. 744795b296d0Smrg# 744895b296d0Smrg# This file is free software; the Free Software Foundation 744995b296d0Smrg# gives unlimited permission to copy and/or distribute it, 745095b296d0Smrg# with or without modifications, as long as this notice is preserved. 745195b296d0Smrg 7452ff89ac2bSmrg# serial 8 745395b296d0Smrg 745495b296d0Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 745595b296d0Smrg# ------------------------------------- 745695b296d0Smrg# Define a conditional. 745795b296d0SmrgAC_DEFUN([AM_CONDITIONAL], 745895b296d0Smrg[AC_PREREQ(2.52)dnl 745995b296d0Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 746095b296d0Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 7461ff89ac2bSmrgAC_SUBST([$1_TRUE])dnl 7462ff89ac2bSmrgAC_SUBST([$1_FALSE])dnl 7463ff89ac2bSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 7464ff89ac2bSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 746595b296d0Smrgif $2; then 746695b296d0Smrg $1_TRUE= 746795b296d0Smrg $1_FALSE='#' 746895b296d0Smrgelse 746995b296d0Smrg $1_TRUE='#' 747095b296d0Smrg $1_FALSE= 747195b296d0Smrgfi 747295b296d0SmrgAC_CONFIG_COMMANDS_PRE( 747395b296d0Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 747495b296d0Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 747595b296d0SmrgUsually this means the macro was only invoked conditionally.]]) 747695b296d0Smrgfi])]) 747795b296d0Smrg 7478ff89ac2bSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 747995b296d0Smrg# Free Software Foundation, Inc. 748095b296d0Smrg# 748195b296d0Smrg# This file is free software; the Free Software Foundation 748295b296d0Smrg# gives unlimited permission to copy and/or distribute it, 748395b296d0Smrg# with or without modifications, as long as this notice is preserved. 748495b296d0Smrg 7485ff89ac2bSmrg# serial 9 748695b296d0Smrg 748795b296d0Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 748895b296d0Smrg# written in clear, in which case automake, when reading aclocal.m4, 748995b296d0Smrg# will think it sees a *use*, and therefore will trigger all it's 749095b296d0Smrg# C support machinery. Also note that it means that autoscan, seeing 749195b296d0Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 749295b296d0Smrg 749395b296d0Smrg 749495b296d0Smrg# _AM_DEPENDENCIES(NAME) 749595b296d0Smrg# ---------------------- 749695b296d0Smrg# See how the compiler implements dependency checking. 749795b296d0Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 749895b296d0Smrg# We try a few techniques and use that to set a single cache variable. 749995b296d0Smrg# 750095b296d0Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 750195b296d0Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 750295b296d0Smrg# dependency, and given that the user is not expected to run this macro, 750395b296d0Smrg# just rely on AC_PROG_CC. 750495b296d0SmrgAC_DEFUN([_AM_DEPENDENCIES], 750595b296d0Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 750695b296d0SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 750795b296d0SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 750895b296d0SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 750995b296d0Smrg 751095b296d0Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 751195b296d0Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 751295b296d0Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 7513ff89ac2bSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 751495b296d0Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 751595b296d0Smrg [depcc="$$1" am_compiler_list=]) 751695b296d0Smrg 751795b296d0SmrgAC_CACHE_CHECK([dependency style of $depcc], 751895b296d0Smrg [am_cv_$1_dependencies_compiler_type], 751995b296d0Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 752095b296d0Smrg # We make a subdir and do the tests there. Otherwise we can end up 752195b296d0Smrg # making bogus files that we don't know about and never remove. For 752295b296d0Smrg # instance it was reported that on HP-UX the gcc test will end up 752395b296d0Smrg # making a dummy file named `D' -- because `-MD' means `put the output 752495b296d0Smrg # in D'. 752595b296d0Smrg mkdir conftest.dir 752695b296d0Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 752795b296d0Smrg # using a relative directory. 752895b296d0Smrg cp "$am_depcomp" conftest.dir 752995b296d0Smrg cd conftest.dir 753095b296d0Smrg # We will build objects and dependencies in a subdirectory because 753195b296d0Smrg # it helps to detect inapplicable dependency modes. For instance 753295b296d0Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 753395b296d0Smrg # side effect of compilation, but ICC will put the dependencies in 753495b296d0Smrg # the current directory while Tru64 will put them in the object 753595b296d0Smrg # directory. 753695b296d0Smrg mkdir sub 753795b296d0Smrg 753895b296d0Smrg am_cv_$1_dependencies_compiler_type=none 753995b296d0Smrg if test "$am_compiler_list" = ""; then 754095b296d0Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 754195b296d0Smrg fi 754295b296d0Smrg for depmode in $am_compiler_list; do 754395b296d0Smrg # Setup a source with many dependencies, because some compilers 754495b296d0Smrg # like to wrap large dependency lists on column 80 (with \), and 754595b296d0Smrg # we should not choose a depcomp mode which is confused by this. 754695b296d0Smrg # 754795b296d0Smrg # We need to recreate these files for each test, as the compiler may 754895b296d0Smrg # overwrite some of them when testing with obscure command lines. 754995b296d0Smrg # This happens at least with the AIX C compiler. 755095b296d0Smrg : > sub/conftest.c 755195b296d0Smrg for i in 1 2 3 4 5 6; do 755295b296d0Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 755395b296d0Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 755495b296d0Smrg # Solaris 8's {/usr,}/bin/sh. 755595b296d0Smrg touch sub/conftst$i.h 755695b296d0Smrg done 755795b296d0Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 755895b296d0Smrg 755995b296d0Smrg case $depmode in 756095b296d0Smrg nosideeffect) 756195b296d0Smrg # after this tag, mechanisms are not by side-effect, so they'll 756295b296d0Smrg # only be used when explicitly requested 756395b296d0Smrg if test "x$enable_dependency_tracking" = xyes; then 756495b296d0Smrg continue 756595b296d0Smrg else 756695b296d0Smrg break 756795b296d0Smrg fi 756895b296d0Smrg ;; 756995b296d0Smrg none) break ;; 757095b296d0Smrg esac 757195b296d0Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 757295b296d0Smrg # mode. It turns out that the SunPro C++ compiler does not properly 757395b296d0Smrg # handle `-M -o', and we need to detect this. 757495b296d0Smrg if depmode=$depmode \ 757595b296d0Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 757695b296d0Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 757795b296d0Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 757895b296d0Smrg >/dev/null 2>conftest.err && 7579ff89ac2bSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 758095b296d0Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 758195b296d0Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 758295b296d0Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 758395b296d0Smrg # icc doesn't choke on unknown options, it will just issue warnings 758495b296d0Smrg # or remarks (even with -Werror). So we grep stderr for any message 758595b296d0Smrg # that says an option was ignored or not supported. 758695b296d0Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 758795b296d0Smrg # icc: Command line warning: ignoring option '-M'; no argument required 758895b296d0Smrg # The diagnosis changed in icc 8.0: 758995b296d0Smrg # icc: Command line remark: option '-MP' not supported 759095b296d0Smrg if (grep 'ignoring option' conftest.err || 759195b296d0Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 759295b296d0Smrg am_cv_$1_dependencies_compiler_type=$depmode 759395b296d0Smrg break 759495b296d0Smrg fi 759595b296d0Smrg fi 759695b296d0Smrg done 759795b296d0Smrg 759895b296d0Smrg cd .. 759995b296d0Smrg rm -rf conftest.dir 760095b296d0Smrgelse 760195b296d0Smrg am_cv_$1_dependencies_compiler_type=none 760295b296d0Smrgfi 760395b296d0Smrg]) 760495b296d0SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 760595b296d0SmrgAM_CONDITIONAL([am__fastdep$1], [ 760695b296d0Smrg test "x$enable_dependency_tracking" != xno \ 760795b296d0Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 760895b296d0Smrg]) 760995b296d0Smrg 761095b296d0Smrg 761195b296d0Smrg# AM_SET_DEPDIR 761295b296d0Smrg# ------------- 761395b296d0Smrg# Choose a directory name for dependency files. 761495b296d0Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 761595b296d0SmrgAC_DEFUN([AM_SET_DEPDIR], 761695b296d0Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 761795b296d0SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 761895b296d0Smrg]) 761995b296d0Smrg 762095b296d0Smrg 762195b296d0Smrg# AM_DEP_TRACK 762295b296d0Smrg# ------------ 762395b296d0SmrgAC_DEFUN([AM_DEP_TRACK], 762495b296d0Smrg[AC_ARG_ENABLE(dependency-tracking, 762595b296d0Smrg[ --disable-dependency-tracking speeds up one-time build 762695b296d0Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 762795b296d0Smrgif test "x$enable_dependency_tracking" != xno; then 762895b296d0Smrg am_depcomp="$ac_aux_dir/depcomp" 762995b296d0Smrg AMDEPBACKSLASH='\' 763095b296d0Smrgfi 763195b296d0SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 7632ff89ac2bSmrgAC_SUBST([AMDEPBACKSLASH])dnl 7633ff89ac2bSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 763495b296d0Smrg]) 763595b296d0Smrg 763695b296d0Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 763795b296d0Smrg 763895b296d0Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 763995b296d0Smrg# Free Software Foundation, Inc. 764095b296d0Smrg# 764195b296d0Smrg# This file is free software; the Free Software Foundation 764295b296d0Smrg# gives unlimited permission to copy and/or distribute it, 764395b296d0Smrg# with or without modifications, as long as this notice is preserved. 764495b296d0Smrg 764595b296d0Smrg#serial 3 764695b296d0Smrg 764795b296d0Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 764895b296d0Smrg# ------------------------------ 764995b296d0SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 765095b296d0Smrg[for mf in $CONFIG_FILES; do 765195b296d0Smrg # Strip MF so we end up with the name of the file. 765295b296d0Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 765395b296d0Smrg # Check whether this is an Automake generated Makefile or not. 765495b296d0Smrg # We used to match only the files named `Makefile.in', but 765595b296d0Smrg # some people rename them; so instead we look at the file content. 765695b296d0Smrg # Grep'ing the first line is not enough: some people post-process 765795b296d0Smrg # each Makefile.in and add a new line on top of each file to say so. 7658ff89ac2bSmrg # Grep'ing the whole file is not good either: AIX grep has a line 7659ff89ac2bSmrg # limit of 2048, but all sed's we know have understand at least 4000. 7660ff89ac2bSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 766195b296d0Smrg dirpart=`AS_DIRNAME("$mf")` 766295b296d0Smrg else 766395b296d0Smrg continue 766495b296d0Smrg fi 766595b296d0Smrg # Extract the definition of DEPDIR, am__include, and am__quote 766695b296d0Smrg # from the Makefile without running `make'. 766795b296d0Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 766895b296d0Smrg test -z "$DEPDIR" && continue 766995b296d0Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 767095b296d0Smrg test -z "am__include" && continue 767195b296d0Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 767295b296d0Smrg # When using ansi2knr, U may be empty or an underscore; expand it 767395b296d0Smrg U=`sed -n 's/^U = //p' < "$mf"` 767495b296d0Smrg # Find all dependency output files, they are included files with 767595b296d0Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 767695b296d0Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 767795b296d0Smrg # expansion. 767895b296d0Smrg for file in `sed -n " 767995b296d0Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 768095b296d0Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 768195b296d0Smrg # Make sure the directory exists. 768295b296d0Smrg test -f "$dirpart/$file" && continue 768395b296d0Smrg fdir=`AS_DIRNAME(["$file"])` 768495b296d0Smrg AS_MKDIR_P([$dirpart/$fdir]) 768595b296d0Smrg # echo "creating $dirpart/$file" 768695b296d0Smrg echo '# dummy' > "$dirpart/$file" 768795b296d0Smrg done 768895b296d0Smrgdone 768995b296d0Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 769095b296d0Smrg 769195b296d0Smrg 769295b296d0Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 769395b296d0Smrg# ----------------------------- 769495b296d0Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 769595b296d0Smrg# 769695b296d0Smrg# This code is only required when automatic dependency tracking 769795b296d0Smrg# is enabled. FIXME. This creates each `.P' file that we will 769895b296d0Smrg# need in order to bootstrap the dependency handling code. 769995b296d0SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 770095b296d0Smrg[AC_CONFIG_COMMANDS([depfiles], 770195b296d0Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 770295b296d0Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 770395b296d0Smrg]) 770495b296d0Smrg 770595b296d0Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 770695b296d0Smrg# Free Software Foundation, Inc. 770795b296d0Smrg# 770895b296d0Smrg# This file is free software; the Free Software Foundation 770995b296d0Smrg# gives unlimited permission to copy and/or distribute it, 771095b296d0Smrg# with or without modifications, as long as this notice is preserved. 771195b296d0Smrg 771295b296d0Smrg# serial 8 771395b296d0Smrg 771495b296d0Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 771595b296d0SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 771695b296d0Smrg 771795b296d0Smrg# Do all the work for Automake. -*- Autoconf -*- 771895b296d0Smrg 7719ff89ac2bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 7720ff89ac2bSmrg# 2005, 2006, 2008 Free Software Foundation, Inc. 772195b296d0Smrg# 772295b296d0Smrg# This file is free software; the Free Software Foundation 772395b296d0Smrg# gives unlimited permission to copy and/or distribute it, 772495b296d0Smrg# with or without modifications, as long as this notice is preserved. 772595b296d0Smrg 7726ff89ac2bSmrg# serial 13 772795b296d0Smrg 772895b296d0Smrg# This macro actually does too much. Some checks are only needed if 772995b296d0Smrg# your package does certain things. But this isn't really a big deal. 773095b296d0Smrg 773195b296d0Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 773295b296d0Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 773395b296d0Smrg# ----------------------------------------------- 773495b296d0Smrg# The call with PACKAGE and VERSION arguments is the old style 773595b296d0Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 773695b296d0Smrg# and VERSION should now be passed to AC_INIT and removed from 773795b296d0Smrg# the call to AM_INIT_AUTOMAKE. 773895b296d0Smrg# We support both call styles for the transition. After 773995b296d0Smrg# the next Automake release, Autoconf can make the AC_INIT 774095b296d0Smrg# arguments mandatory, and then we can depend on a new Autoconf 774195b296d0Smrg# release and drop the old call support. 774295b296d0SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 7743ff89ac2bSmrg[AC_PREREQ([2.60])dnl 774495b296d0Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 774595b296d0Smrgdnl the ones we care about. 774695b296d0Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 774795b296d0SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 774895b296d0SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 7749ff89ac2bSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 7750ff89ac2bSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 7751ff89ac2bSmrg # is not polluted with repeated "-I." 7752ff89ac2bSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 7753ff89ac2bSmrg # test to see if srcdir already configured 7754ff89ac2bSmrg if test -f $srcdir/config.status; then 7755ff89ac2bSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 7756ff89ac2bSmrg fi 775795b296d0Smrgfi 775895b296d0Smrg 775995b296d0Smrg# test whether we have cygpath 776095b296d0Smrgif test -z "$CYGPATH_W"; then 776195b296d0Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 776295b296d0Smrg CYGPATH_W='cygpath -w' 776395b296d0Smrg else 776495b296d0Smrg CYGPATH_W=echo 776595b296d0Smrg fi 776695b296d0Smrgfi 776795b296d0SmrgAC_SUBST([CYGPATH_W]) 776895b296d0Smrg 776995b296d0Smrg# Define the identity of the package. 777095b296d0Smrgdnl Distinguish between old-style and new-style calls. 777195b296d0Smrgm4_ifval([$2], 777295b296d0Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 777395b296d0Smrg AC_SUBST([PACKAGE], [$1])dnl 777495b296d0Smrg AC_SUBST([VERSION], [$2])], 777595b296d0Smrg[_AM_SET_OPTIONS([$1])dnl 7776ff89ac2bSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 7777ff89ac2bSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 7778ff89ac2bSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 777995b296d0Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 778095b296d0Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 778195b296d0Smrg 778295b296d0Smrg_AM_IF_OPTION([no-define],, 778395b296d0Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 778495b296d0Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 778595b296d0Smrg 778695b296d0Smrg# Some tools Automake needs. 778795b296d0SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 778895b296d0SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 778995b296d0SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 779095b296d0SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 779195b296d0SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 779295b296d0SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 779395b296d0SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 779495b296d0SmrgAM_PROG_INSTALL_SH 779595b296d0SmrgAM_PROG_INSTALL_STRIP 779695b296d0SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 779795b296d0Smrg# We need awk for the "check" target. The system "awk" is bad on 779895b296d0Smrg# some platforms. 779995b296d0SmrgAC_REQUIRE([AC_PROG_AWK])dnl 780095b296d0SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 780195b296d0SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 780295b296d0Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 780395b296d0Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 780495b296d0Smrg [_AM_PROG_TAR([v7])])]) 780595b296d0Smrg_AM_IF_OPTION([no-dependencies],, 780695b296d0Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 780795b296d0Smrg [_AM_DEPENDENCIES(CC)], 780895b296d0Smrg [define([AC_PROG_CC], 780995b296d0Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 781095b296d0SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 781195b296d0Smrg [_AM_DEPENDENCIES(CXX)], 781295b296d0Smrg [define([AC_PROG_CXX], 781395b296d0Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 7814ff89ac2bSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 7815ff89ac2bSmrg [_AM_DEPENDENCIES(OBJC)], 7816ff89ac2bSmrg [define([AC_PROG_OBJC], 7817ff89ac2bSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 781895b296d0Smrg]) 781995b296d0Smrg]) 782095b296d0Smrg 782195b296d0Smrg 782295b296d0Smrg# When config.status generates a header, we must update the stamp-h file. 782395b296d0Smrg# This file resides in the same directory as the config header 782495b296d0Smrg# that is generated. The stamp files are numbered to have different names. 782595b296d0Smrg 782695b296d0Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 782795b296d0Smrg# loop where config.status creates the headers, so we can generate 782895b296d0Smrg# our stamp files there. 782995b296d0SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 783095b296d0Smrg[# Compute $1's index in $config_headers. 7831ff89ac2bSmrg_am_arg=$1 783295b296d0Smrg_am_stamp_count=1 783395b296d0Smrgfor _am_header in $config_headers :; do 783495b296d0Smrg case $_am_header in 7835ff89ac2bSmrg $_am_arg | $_am_arg:* ) 783695b296d0Smrg break ;; 783795b296d0Smrg * ) 783895b296d0Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 783995b296d0Smrg esac 784095b296d0Smrgdone 7841ff89ac2bSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 784295b296d0Smrg 784395b296d0Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 784495b296d0Smrg# 784595b296d0Smrg# This file is free software; the Free Software Foundation 784695b296d0Smrg# gives unlimited permission to copy and/or distribute it, 784795b296d0Smrg# with or without modifications, as long as this notice is preserved. 784895b296d0Smrg 784995b296d0Smrg# AM_PROG_INSTALL_SH 785095b296d0Smrg# ------------------ 785195b296d0Smrg# Define $install_sh. 785295b296d0SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 785395b296d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7854ff89ac2bSmrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 785595b296d0SmrgAC_SUBST(install_sh)]) 785695b296d0Smrg 785795b296d0Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 785895b296d0Smrg# 785995b296d0Smrg# This file is free software; the Free Software Foundation 786095b296d0Smrg# gives unlimited permission to copy and/or distribute it, 786195b296d0Smrg# with or without modifications, as long as this notice is preserved. 786295b296d0Smrg 786395b296d0Smrg# serial 2 786495b296d0Smrg 786595b296d0Smrg# Check whether the underlying file-system supports filenames 786695b296d0Smrg# with a leading dot. For instance MS-DOS doesn't. 786795b296d0SmrgAC_DEFUN([AM_SET_LEADING_DOT], 786895b296d0Smrg[rm -rf .tst 2>/dev/null 786995b296d0Smrgmkdir .tst 2>/dev/null 787095b296d0Smrgif test -d .tst; then 787195b296d0Smrg am__leading_dot=. 787295b296d0Smrgelse 787395b296d0Smrg am__leading_dot=_ 787495b296d0Smrgfi 787595b296d0Smrgrmdir .tst 2>/dev/null 787695b296d0SmrgAC_SUBST([am__leading_dot])]) 787795b296d0Smrg 787895b296d0Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 787995b296d0Smrg# From Jim Meyering 788095b296d0Smrg 788195b296d0Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 788295b296d0Smrg# Free Software Foundation, Inc. 788395b296d0Smrg# 788495b296d0Smrg# This file is free software; the Free Software Foundation 788595b296d0Smrg# gives unlimited permission to copy and/or distribute it, 788695b296d0Smrg# with or without modifications, as long as this notice is preserved. 788795b296d0Smrg 788895b296d0Smrg# serial 4 788995b296d0Smrg 789095b296d0SmrgAC_DEFUN([AM_MAINTAINER_MODE], 789195b296d0Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 789295b296d0Smrg dnl maintainer-mode is disabled by default 789395b296d0Smrg AC_ARG_ENABLE(maintainer-mode, 789495b296d0Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 789595b296d0Smrg (and sometimes confusing) to the casual installer], 789695b296d0Smrg USE_MAINTAINER_MODE=$enableval, 789795b296d0Smrg USE_MAINTAINER_MODE=no) 789895b296d0Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 789995b296d0Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 790095b296d0Smrg MAINT=$MAINTAINER_MODE_TRUE 790195b296d0Smrg AC_SUBST(MAINT)dnl 790295b296d0Smrg] 790395b296d0Smrg) 790495b296d0Smrg 790595b296d0SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 790695b296d0Smrg 790795b296d0Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 790895b296d0Smrg 790995b296d0Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 791095b296d0Smrg# 791195b296d0Smrg# This file is free software; the Free Software Foundation 791295b296d0Smrg# gives unlimited permission to copy and/or distribute it, 791395b296d0Smrg# with or without modifications, as long as this notice is preserved. 791495b296d0Smrg 791595b296d0Smrg# serial 3 791695b296d0Smrg 791795b296d0Smrg# AM_MAKE_INCLUDE() 791895b296d0Smrg# ----------------- 791995b296d0Smrg# Check to see how make treats includes. 792095b296d0SmrgAC_DEFUN([AM_MAKE_INCLUDE], 792195b296d0Smrg[am_make=${MAKE-make} 792295b296d0Smrgcat > confinc << 'END' 792395b296d0Smrgam__doit: 792495b296d0Smrg @echo done 792595b296d0Smrg.PHONY: am__doit 792695b296d0SmrgEND 792795b296d0Smrg# If we don't find an include directive, just comment out the code. 792895b296d0SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 792995b296d0Smrgam__include="#" 793095b296d0Smrgam__quote= 793195b296d0Smrg_am_result=none 793295b296d0Smrg# First try GNU make style include. 793395b296d0Smrgecho "include confinc" > confmf 793495b296d0Smrg# We grep out `Entering directory' and `Leaving directory' 793595b296d0Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 793695b296d0Smrg# In particular we don't look at `^make:' because GNU make might 793795b296d0Smrg# be invoked under some other name (usually "gmake"), in which 793895b296d0Smrg# case it prints its new name instead of `make'. 793995b296d0Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 794095b296d0Smrg am__include=include 794195b296d0Smrg am__quote= 794295b296d0Smrg _am_result=GNU 794395b296d0Smrgfi 794495b296d0Smrg# Now try BSD make style include. 794595b296d0Smrgif test "$am__include" = "#"; then 794695b296d0Smrg echo '.include "confinc"' > confmf 794795b296d0Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 794895b296d0Smrg am__include=.include 794995b296d0Smrg am__quote="\"" 795095b296d0Smrg _am_result=BSD 795195b296d0Smrg fi 795295b296d0Smrgfi 795395b296d0SmrgAC_SUBST([am__include]) 795495b296d0SmrgAC_SUBST([am__quote]) 795595b296d0SmrgAC_MSG_RESULT([$_am_result]) 795695b296d0Smrgrm -f confinc confmf 795795b296d0Smrg]) 795895b296d0Smrg 795995b296d0Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 796095b296d0Smrg 7961ff89ac2bSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 796295b296d0Smrg# Free Software Foundation, Inc. 796395b296d0Smrg# 796495b296d0Smrg# This file is free software; the Free Software Foundation 796595b296d0Smrg# gives unlimited permission to copy and/or distribute it, 796695b296d0Smrg# with or without modifications, as long as this notice is preserved. 796795b296d0Smrg 7968ff89ac2bSmrg# serial 5 796995b296d0Smrg 797095b296d0Smrg# AM_MISSING_PROG(NAME, PROGRAM) 797195b296d0Smrg# ------------------------------ 797295b296d0SmrgAC_DEFUN([AM_MISSING_PROG], 797395b296d0Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 797495b296d0Smrg$1=${$1-"${am_missing_run}$2"} 797595b296d0SmrgAC_SUBST($1)]) 797695b296d0Smrg 797795b296d0Smrg 797895b296d0Smrg# AM_MISSING_HAS_RUN 797995b296d0Smrg# ------------------ 798095b296d0Smrg# Define MISSING if not defined so far and test if it supports --run. 798195b296d0Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 798295b296d0SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 798395b296d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7984ff89ac2bSmrgAC_REQUIRE_AUX_FILE([missing])dnl 798595b296d0Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 798695b296d0Smrg# Use eval to expand $SHELL 798795b296d0Smrgif eval "$MISSING --run true"; then 798895b296d0Smrg am_missing_run="$MISSING --run " 798995b296d0Smrgelse 799095b296d0Smrg am_missing_run= 799195b296d0Smrg AC_MSG_WARN([`missing' script is too old or missing]) 799295b296d0Smrgfi 799395b296d0Smrg]) 799495b296d0Smrg 7995ff89ac2bSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 799695b296d0Smrg# 799795b296d0Smrg# This file is free software; the Free Software Foundation 799895b296d0Smrg# gives unlimited permission to copy and/or distribute it, 799995b296d0Smrg# with or without modifications, as long as this notice is preserved. 800095b296d0Smrg 800195b296d0Smrg# AM_PROG_MKDIR_P 800295b296d0Smrg# --------------- 8003ff89ac2bSmrg# Check for `mkdir -p'. 800495b296d0SmrgAC_DEFUN([AM_PROG_MKDIR_P], 8005ff89ac2bSmrg[AC_PREREQ([2.60])dnl 8006ff89ac2bSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 8007ff89ac2bSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 8008ff89ac2bSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 8009ff89ac2bSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 8010ff89ac2bSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 8011ff89ac2bSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 8012ff89ac2bSmrgdnl adjustment using top_builddir (which is defined more often than 8013ff89ac2bSmrgdnl MKDIR_P). 8014ff89ac2bSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 8015ff89ac2bSmrgcase $mkdir_p in 8016ff89ac2bSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 8017ff89ac2bSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 8018ff89ac2bSmrgesac 8019ff89ac2bSmrg]) 802095b296d0Smrg 802195b296d0Smrg# Helper functions for option handling. -*- Autoconf -*- 802295b296d0Smrg 802395b296d0Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 802495b296d0Smrg# 802595b296d0Smrg# This file is free software; the Free Software Foundation 802695b296d0Smrg# gives unlimited permission to copy and/or distribute it, 802795b296d0Smrg# with or without modifications, as long as this notice is preserved. 802895b296d0Smrg 802995b296d0Smrg# serial 3 803095b296d0Smrg 803195b296d0Smrg# _AM_MANGLE_OPTION(NAME) 803295b296d0Smrg# ----------------------- 803395b296d0SmrgAC_DEFUN([_AM_MANGLE_OPTION], 803495b296d0Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 803595b296d0Smrg 803695b296d0Smrg# _AM_SET_OPTION(NAME) 803795b296d0Smrg# ------------------------------ 803895b296d0Smrg# Set option NAME. Presently that only means defining a flag for this option. 803995b296d0SmrgAC_DEFUN([_AM_SET_OPTION], 804095b296d0Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 804195b296d0Smrg 804295b296d0Smrg# _AM_SET_OPTIONS(OPTIONS) 804395b296d0Smrg# ---------------------------------- 804495b296d0Smrg# OPTIONS is a space-separated list of Automake options. 804595b296d0SmrgAC_DEFUN([_AM_SET_OPTIONS], 804695b296d0Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 804795b296d0Smrg 804895b296d0Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 804995b296d0Smrg# ------------------------------------------- 805095b296d0Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 805195b296d0SmrgAC_DEFUN([_AM_IF_OPTION], 805295b296d0Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 805395b296d0Smrg 805495b296d0Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 805595b296d0Smrg 805695b296d0Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 805795b296d0Smrg# Free Software Foundation, Inc. 805895b296d0Smrg# 805995b296d0Smrg# This file is free software; the Free Software Foundation 806095b296d0Smrg# gives unlimited permission to copy and/or distribute it, 806195b296d0Smrg# with or without modifications, as long as this notice is preserved. 806295b296d0Smrg 806395b296d0Smrg# serial 4 806495b296d0Smrg 806595b296d0Smrg# AM_SANITY_CHECK 806695b296d0Smrg# --------------- 806795b296d0SmrgAC_DEFUN([AM_SANITY_CHECK], 806895b296d0Smrg[AC_MSG_CHECKING([whether build environment is sane]) 806995b296d0Smrg# Just in case 807095b296d0Smrgsleep 1 807195b296d0Smrgecho timestamp > conftest.file 807295b296d0Smrg# Do `set' in a subshell so we don't clobber the current shell's 807395b296d0Smrg# arguments. Must try -L first in case configure is actually a 807495b296d0Smrg# symlink; some systems play weird games with the mod time of symlinks 807595b296d0Smrg# (eg FreeBSD returns the mod time of the symlink's containing 807695b296d0Smrg# directory). 807795b296d0Smrgif ( 807895b296d0Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 807995b296d0Smrg if test "$[*]" = "X"; then 808095b296d0Smrg # -L didn't work. 808195b296d0Smrg set X `ls -t $srcdir/configure conftest.file` 808295b296d0Smrg fi 808395b296d0Smrg rm -f conftest.file 808495b296d0Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 808595b296d0Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 808695b296d0Smrg 808795b296d0Smrg # If neither matched, then we have a broken ls. This can happen 808895b296d0Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 808995b296d0Smrg # broken ls alias from the environment. This has actually 809095b296d0Smrg # happened. Such a system could not be considered "sane". 809195b296d0Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 809295b296d0Smrgalias in your environment]) 809395b296d0Smrg fi 809495b296d0Smrg 809595b296d0Smrg test "$[2]" = conftest.file 809695b296d0Smrg ) 809795b296d0Smrgthen 809895b296d0Smrg # Ok. 809995b296d0Smrg : 810095b296d0Smrgelse 810195b296d0Smrg AC_MSG_ERROR([newly created file is older than distributed files! 810295b296d0SmrgCheck your system clock]) 810395b296d0Smrgfi 810495b296d0SmrgAC_MSG_RESULT(yes)]) 810595b296d0Smrg 810695b296d0Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 810795b296d0Smrg# 810895b296d0Smrg# This file is free software; the Free Software Foundation 810995b296d0Smrg# gives unlimited permission to copy and/or distribute it, 811095b296d0Smrg# with or without modifications, as long as this notice is preserved. 811195b296d0Smrg 811295b296d0Smrg# AM_PROG_INSTALL_STRIP 811395b296d0Smrg# --------------------- 811495b296d0Smrg# One issue with vendor `install' (even GNU) is that you can't 811595b296d0Smrg# specify the program used to strip binaries. This is especially 811695b296d0Smrg# annoying in cross-compiling environments, where the build's strip 811795b296d0Smrg# is unlikely to handle the host's binaries. 811895b296d0Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 811995b296d0Smrg# always use install-sh in `make install-strip', and initialize 812095b296d0Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 812195b296d0SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 812295b296d0Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 812395b296d0Smrg# Installed binaries are usually stripped using `strip' when the user 812495b296d0Smrg# run `make install-strip'. However `strip' might not be the right 812595b296d0Smrg# tool to use in cross-compilation environments, therefore Automake 812695b296d0Smrg# will honor the `STRIP' environment variable to overrule this program. 812795b296d0Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 812895b296d0Smrgif test "$cross_compiling" != no; then 812995b296d0Smrg AC_CHECK_TOOL([STRIP], [strip], :) 813095b296d0Smrgfi 8131ff89ac2bSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 813295b296d0SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 813395b296d0Smrg 8134ff89ac2bSmrg# Copyright (C) 2006 Free Software Foundation, Inc. 8135ff89ac2bSmrg# 8136ff89ac2bSmrg# This file is free software; the Free Software Foundation 8137ff89ac2bSmrg# gives unlimited permission to copy and/or distribute it, 8138ff89ac2bSmrg# with or without modifications, as long as this notice is preserved. 8139ff89ac2bSmrg 8140ff89ac2bSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 8141ff89ac2bSmrg# --------------------------- 8142ff89ac2bSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 8143ff89ac2bSmrg# This macro is traced by Automake. 8144ff89ac2bSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 8145ff89ac2bSmrg 814695b296d0Smrg# Check how to create a tarball. -*- Autoconf -*- 814795b296d0Smrg 814895b296d0Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 814995b296d0Smrg# 815095b296d0Smrg# This file is free software; the Free Software Foundation 815195b296d0Smrg# gives unlimited permission to copy and/or distribute it, 815295b296d0Smrg# with or without modifications, as long as this notice is preserved. 815395b296d0Smrg 815495b296d0Smrg# serial 2 815595b296d0Smrg 815695b296d0Smrg# _AM_PROG_TAR(FORMAT) 815795b296d0Smrg# -------------------- 815895b296d0Smrg# Check how to create a tarball in format FORMAT. 815995b296d0Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 816095b296d0Smrg# 816195b296d0Smrg# Substitute a variable $(am__tar) that is a command 816295b296d0Smrg# writing to stdout a FORMAT-tarball containing the directory 816395b296d0Smrg# $tardir. 816495b296d0Smrg# tardir=directory && $(am__tar) > result.tar 816595b296d0Smrg# 816695b296d0Smrg# Substitute a variable $(am__untar) that extract such 816795b296d0Smrg# a tarball read from stdin. 816895b296d0Smrg# $(am__untar) < result.tar 816995b296d0SmrgAC_DEFUN([_AM_PROG_TAR], 817095b296d0Smrg[# Always define AMTAR for backward compatibility. 817195b296d0SmrgAM_MISSING_PROG([AMTAR], [tar]) 817295b296d0Smrgm4_if([$1], [v7], 817395b296d0Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 817495b296d0Smrg [m4_case([$1], [ustar],, [pax],, 817595b296d0Smrg [m4_fatal([Unknown tar format])]) 817695b296d0SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 817795b296d0Smrg# Loop over all known methods to create a tar archive until one works. 817895b296d0Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 817995b296d0Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 818095b296d0Smrg# Do not fold the above two line into one, because Tru64 sh and 818195b296d0Smrg# Solaris sh will not grok spaces in the rhs of `-'. 818295b296d0Smrgfor _am_tool in $_am_tools 818395b296d0Smrgdo 818495b296d0Smrg case $_am_tool in 818595b296d0Smrg gnutar) 818695b296d0Smrg for _am_tar in tar gnutar gtar; 818795b296d0Smrg do 818895b296d0Smrg AM_RUN_LOG([$_am_tar --version]) && break 818995b296d0Smrg done 819095b296d0Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 819195b296d0Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 819295b296d0Smrg am__untar="$_am_tar -xf -" 819395b296d0Smrg ;; 819495b296d0Smrg plaintar) 819595b296d0Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 819695b296d0Smrg # ustar tarball either. 819795b296d0Smrg (tar --version) >/dev/null 2>&1 && continue 819895b296d0Smrg am__tar='tar chf - "$$tardir"' 819995b296d0Smrg am__tar_='tar chf - "$tardir"' 820095b296d0Smrg am__untar='tar xf -' 820195b296d0Smrg ;; 820295b296d0Smrg pax) 820395b296d0Smrg am__tar='pax -L -x $1 -w "$$tardir"' 820495b296d0Smrg am__tar_='pax -L -x $1 -w "$tardir"' 820595b296d0Smrg am__untar='pax -r' 820695b296d0Smrg ;; 820795b296d0Smrg cpio) 820895b296d0Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 820995b296d0Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 821095b296d0Smrg am__untar='cpio -i -H $1 -d' 821195b296d0Smrg ;; 821295b296d0Smrg none) 821395b296d0Smrg am__tar=false 821495b296d0Smrg am__tar_=false 821595b296d0Smrg am__untar=false 821695b296d0Smrg ;; 821795b296d0Smrg esac 821895b296d0Smrg 821995b296d0Smrg # If the value was cached, stop now. We just wanted to have am__tar 822095b296d0Smrg # and am__untar set. 822195b296d0Smrg test -n "${am_cv_prog_tar_$1}" && break 822295b296d0Smrg 822395b296d0Smrg # tar/untar a dummy directory, and stop if the command works 822495b296d0Smrg rm -rf conftest.dir 822595b296d0Smrg mkdir conftest.dir 822695b296d0Smrg echo GrepMe > conftest.dir/file 822795b296d0Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 822895b296d0Smrg rm -rf conftest.dir 822995b296d0Smrg if test -s conftest.tar; then 823095b296d0Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 823195b296d0Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 823295b296d0Smrg fi 823395b296d0Smrgdone 823495b296d0Smrgrm -rf conftest.dir 823595b296d0Smrg 823695b296d0SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 823795b296d0SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 823895b296d0SmrgAC_SUBST([am__tar]) 823995b296d0SmrgAC_SUBST([am__untar]) 824095b296d0Smrg]) # _AM_PROG_TAR 824195b296d0Smrg 8242