aclocal.m4 revision 643b027f
1643b027fSmrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 2fe5e51b7Smrg 3fe5e51b7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4643b027fSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5fe5e51b7Smrg# This file is free software; the Free Software Foundation 6fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 7fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 8fe5e51b7Smrg 9fe5e51b7Smrg# This program is distributed in the hope that it will be useful, 10fe5e51b7Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11fe5e51b7Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12fe5e51b7Smrg# PARTICULAR PURPOSE. 13fe5e51b7Smrg 14eda3803bSmrgm4_ifndef([AC_AUTOCONF_VERSION], 15eda3803bSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16eda3803bSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 17eda3803bSmrg[m4_warning([this file was generated for autoconf 2.63. 18eda3803bSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19eda3803bSmrgIf you have problems, you may need to regenerate the build system entirely. 20eda3803bSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21fe5e51b7Smrg 22fe5e51b7Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23fe5e51b7Smrg 24643b027fSmrg# serial 52 AC_PROG_LIBTOOL 25fe5e51b7Smrg 26fe5e51b7Smrg 27643b027fSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 28643b027fSmrg# ----------------------------------------------------------- 29643b027fSmrg# If this macro is not defined by Autoconf, define it here. 30643b027fSmrgm4_ifdef([AC_PROVIDE_IFELSE], 31643b027fSmrg [], 32643b027fSmrg [m4_define([AC_PROVIDE_IFELSE], 33643b027fSmrg [m4_ifdef([AC_PROVIDE_$1], 34643b027fSmrg [$2], [$3])])]) 35eda3803bSmrg 36eda3803bSmrg 37643b027fSmrg# AC_PROG_LIBTOOL 38643b027fSmrg# --------------- 39643b027fSmrgAC_DEFUN([AC_PROG_LIBTOOL], 40643b027fSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 41643b027fSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 42643b027fSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 43643b027fSmrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 44643b027fSmrg [AC_LIBTOOL_CXX], 45643b027fSmrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 46643b027fSmrg ])]) 47643b027fSmrgdnl And a similar setup for Fortran 77 support 48643b027fSmrg AC_PROVIDE_IFELSE([AC_PROG_F77], 49643b027fSmrg [AC_LIBTOOL_F77], 50643b027fSmrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 51643b027fSmrg])]) 52643b027fSmrg 53643b027fSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 54643b027fSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 55643b027fSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 56643b027fSmrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 57643b027fSmrg [AC_LIBTOOL_GCJ], 58643b027fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 59643b027fSmrg [AC_LIBTOOL_GCJ], 60643b027fSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 61643b027fSmrg [AC_LIBTOOL_GCJ], 62643b027fSmrg [ifdef([AC_PROG_GCJ], 63643b027fSmrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 64643b027fSmrg ifdef([A][M_PROG_GCJ], 65643b027fSmrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 66643b027fSmrg ifdef([LT_AC_PROG_GCJ], 67643b027fSmrg [define([LT_AC_PROG_GCJ], 68643b027fSmrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 69643b027fSmrg])])# AC_PROG_LIBTOOL 70643b027fSmrg 71643b027fSmrg 72643b027fSmrg# _AC_PROG_LIBTOOL 73643b027fSmrg# ---------------- 74643b027fSmrgAC_DEFUN([_AC_PROG_LIBTOOL], 75643b027fSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 76643b027fSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 77643b027fSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 78643b027fSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 79fe5e51b7Smrg 80fe5e51b7Smrg# This can be used to rebuild libtool when needed 81643b027fSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 82fe5e51b7Smrg 83fe5e51b7Smrg# Always use our own libtool. 84fe5e51b7SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 85fe5e51b7SmrgAC_SUBST(LIBTOOL)dnl 86fe5e51b7Smrg 87643b027fSmrg# Prevent multiple expansion 88643b027fSmrgdefine([AC_PROG_LIBTOOL], []) 89643b027fSmrg])# _AC_PROG_LIBTOOL 90eda3803bSmrg 91eda3803bSmrg 92643b027fSmrg# AC_LIBTOOL_SETUP 93643b027fSmrg# ---------------- 94643b027fSmrgAC_DEFUN([AC_LIBTOOL_SETUP], 95643b027fSmrg[AC_PREREQ(2.50)dnl 96643b027fSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 97643b027fSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 98643b027fSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 99643b027fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 100fe5e51b7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 101fe5e51b7SmrgAC_REQUIRE([AC_PROG_CC])dnl 102643b027fSmrgAC_REQUIRE([AC_PROG_LD])dnl 103643b027fSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 104643b027fSmrgAC_REQUIRE([AC_PROG_NM])dnl 105643b027fSmrg 106fe5e51b7SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 107643b027fSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 108643b027fSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 109643b027fSmrgAC_REQUIRE([AC_OBJEXT])dnl 110643b027fSmrgAC_REQUIRE([AC_EXEEXT])dnl 111eda3803bSmrgdnl 112643b027fSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 113643b027fSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 114643b027fSmrgAC_LIBTOOL_OBJDIR 115fe5e51b7Smrg 116643b027fSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 117643b027fSmrg_LT_AC_PROG_ECHO_BACKSLASH 118fe5e51b7Smrg 119fe5e51b7Smrgcase $host_os in 120fe5e51b7Smrgaix3*) 121fe5e51b7Smrg # AIX sometimes has problems with the GCC collect2 program. For some 122fe5e51b7Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 123fe5e51b7Smrg # vanish in a puff of smoke. 124fe5e51b7Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 125fe5e51b7Smrg COLLECT_NAMES= 126fe5e51b7Smrg export COLLECT_NAMES 127fe5e51b7Smrg fi 128fe5e51b7Smrg ;; 129fe5e51b7Smrgesac 130fe5e51b7Smrg 131fe5e51b7Smrg# Sed substitution that helps us do robust quoting. It backslashifies 132fe5e51b7Smrg# metacharacters that are still active within double-quoted strings. 133643b027fSmrgXsed='sed -e 1s/^X//' 134643b027fSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 135fe5e51b7Smrg 136fe5e51b7Smrg# Same as above, but do not quote variable references. 137643b027fSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 138fe5e51b7Smrg 139fe5e51b7Smrg# Sed substitution to delay expansion of an escaped shell variable in a 140fe5e51b7Smrg# double_quote_subst'ed string. 141fe5e51b7Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 142fe5e51b7Smrg 143fe5e51b7Smrg# Sed substitution to avoid accidental globbing in evaled expressions 144fe5e51b7Smrgno_glob_subst='s/\*/\\\*/g' 145fe5e51b7Smrg 146643b027fSmrg# Constants: 147643b027fSmrgrm="rm -f" 148643b027fSmrg 149fe5e51b7Smrg# Global variables: 150643b027fSmrgdefault_ofile=libtool 151fe5e51b7Smrgcan_build_shared=yes 152fe5e51b7Smrg 153fe5e51b7Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 154fe5e51b7Smrg# which needs '.lib'). 155fe5e51b7Smrglibext=a 156643b027fSmrgltmain="$ac_aux_dir/ltmain.sh" 157643b027fSmrgofile="$default_ofile" 158eda3803bSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 159fe5e51b7Smrg 160643b027fSmrgAC_CHECK_TOOL(AR, ar, false) 161643b027fSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 162643b027fSmrgAC_CHECK_TOOL(STRIP, strip, :) 163643b027fSmrg 164fe5e51b7Smrgold_CC="$CC" 165fe5e51b7Smrgold_CFLAGS="$CFLAGS" 166fe5e51b7Smrg 167fe5e51b7Smrg# Set sane defaults for various variables 168643b027fSmrgtest -z "$AR" && AR=ar 169643b027fSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 170643b027fSmrgtest -z "$AS" && AS=as 171fe5e51b7Smrgtest -z "$CC" && CC=cc 172fe5e51b7Smrgtest -z "$LTCC" && LTCC=$CC 173fe5e51b7Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 174643b027fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 175fe5e51b7Smrgtest -z "$LD" && LD=ld 176643b027fSmrgtest -z "$LN_S" && LN_S="ln -s" 177643b027fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 178643b027fSmrgtest -z "$NM" && NM=nm 179643b027fSmrgtest -z "$SED" && SED=sed 180643b027fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 181643b027fSmrgtest -z "$RANLIB" && RANLIB=: 182643b027fSmrgtest -z "$STRIP" && STRIP=: 183fe5e51b7Smrgtest -z "$ac_objext" && ac_objext=o 184fe5e51b7Smrg 185643b027fSmrg# Determine commands to create old-style static archives. 186643b027fSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 187643b027fSmrgold_postinstall_cmds='chmod 644 $oldlib' 188643b027fSmrgold_postuninstall_cmds= 189643b027fSmrg 190643b027fSmrgif test -n "$RANLIB"; then 191643b027fSmrg case $host_os in 192643b027fSmrg openbsd*) 193643b027fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 194643b027fSmrg ;; 195643b027fSmrg *) 196643b027fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 197643b027fSmrg ;; 198643b027fSmrg esac 199643b027fSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 200643b027fSmrgfi 201643b027fSmrg 202fe5e51b7Smrg_LT_CC_BASENAME([$compiler]) 203fe5e51b7Smrg 204fe5e51b7Smrg# Only perform the check for file, if the check method requires it 205fe5e51b7Smrgcase $deplibs_check_method in 206fe5e51b7Smrgfile_magic*) 207fe5e51b7Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 208643b027fSmrg AC_PATH_MAGIC 209fe5e51b7Smrg fi 210fe5e51b7Smrg ;; 211fe5e51b7Smrgesac 212fe5e51b7Smrg 213643b027fSmrg_LT_REQUIRED_DARWIN_CHECKS 214eda3803bSmrg 215643b027fSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 216643b027fSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 217643b027fSmrgenable_win32_dll=yes, enable_win32_dll=no) 218eda3803bSmrg 219643b027fSmrgAC_ARG_ENABLE([libtool-lock], 220643b027fSmrg [AC_HELP_STRING([--disable-libtool-lock], 221643b027fSmrg [avoid locking (might break parallel builds)])]) 222643b027fSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 223eda3803bSmrg 224643b027fSmrgAC_ARG_WITH([pic], 225643b027fSmrg [AC_HELP_STRING([--with-pic], 226643b027fSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 227643b027fSmrg [pic_mode="$withval"], 228643b027fSmrg [pic_mode=default]) 229643b027fSmrgtest -z "$pic_mode" && pic_mode=default 230eda3803bSmrg 231643b027fSmrg# Use C for the default configuration in the libtool script 232643b027fSmrgtagname= 233643b027fSmrgAC_LIBTOOL_LANG_C_CONFIG 234643b027fSmrg_LT_AC_TAGCONFIG 235643b027fSmrg])# AC_LIBTOOL_SETUP 236eda3803bSmrg 237eda3803bSmrg 238643b027fSmrg# _LT_AC_SYS_COMPILER 239fe5e51b7Smrg# ------------------- 240643b027fSmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 241fe5e51b7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 242fe5e51b7Smrg 243fe5e51b7Smrg# If no C compiler was specified, use CC. 244fe5e51b7SmrgLTCC=${LTCC-"$CC"} 245fe5e51b7Smrg 246fe5e51b7Smrg# If no C compiler flags were specified, use CFLAGS. 247fe5e51b7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 248fe5e51b7Smrg 249fe5e51b7Smrg# Allow CC to be a program name with arguments. 250fe5e51b7Smrgcompiler=$CC 251643b027fSmrg])# _LT_AC_SYS_COMPILER 252643b027fSmrg 253643b027fSmrg 254643b027fSmrg# _LT_CC_BASENAME(CC) 255643b027fSmrg# ------------------- 256643b027fSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 257643b027fSmrgAC_DEFUN([_LT_CC_BASENAME], 258643b027fSmrg[for cc_temp in $1""; do 259643b027fSmrg case $cc_temp in 260643b027fSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 261643b027fSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 262643b027fSmrg \-*) ;; 263643b027fSmrg *) break;; 264643b027fSmrg esac 265643b027fSmrgdone 266643b027fSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 267643b027fSmrg]) 268fe5e51b7Smrg 269fe5e51b7Smrg 270fe5e51b7Smrg# _LT_COMPILER_BOILERPLATE 271fe5e51b7Smrg# ------------------------ 272fe5e51b7Smrg# Check for compiler boilerplate output or warnings with 273fe5e51b7Smrg# the simple compiler test code. 274643b027fSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 275643b027fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 276fe5e51b7Smrgac_outfile=conftest.$ac_objext 277fe5e51b7Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 278fe5e51b7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 279fe5e51b7Smrg_lt_compiler_boilerplate=`cat conftest.err` 280643b027fSmrg$rm conftest* 281fe5e51b7Smrg])# _LT_COMPILER_BOILERPLATE 282fe5e51b7Smrg 283fe5e51b7Smrg 284fe5e51b7Smrg# _LT_LINKER_BOILERPLATE 285fe5e51b7Smrg# ---------------------- 286fe5e51b7Smrg# Check for linker boilerplate output or warnings with 287fe5e51b7Smrg# the simple link test code. 288643b027fSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 289643b027fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 290fe5e51b7Smrgac_outfile=conftest.$ac_objext 291fe5e51b7Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 292fe5e51b7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 293fe5e51b7Smrg_lt_linker_boilerplate=`cat conftest.err` 294643b027fSmrg$rm -r conftest* 295fe5e51b7Smrg])# _LT_LINKER_BOILERPLATE 296fe5e51b7Smrg 297eda3803bSmrg# _LT_REQUIRED_DARWIN_CHECKS 298643b027fSmrg# -------------------------- 299643b027fSmrg# Check for some things on darwin 300643b027fSmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ 301eda3803bSmrg case $host_os in 302eda3803bSmrg rhapsody* | darwin*) 303eda3803bSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 304eda3803bSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 305eda3803bSmrg 306eda3803bSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 307eda3803bSmrg [lt_cv_apple_cc_single_mod=no 308eda3803bSmrg if test -z "${LT_MULTI_MODULE}"; then 309643b027fSmrg # By default we will add the -single_module flag. You can override 310643b027fSmrg # by either setting the environment variable LT_MULTI_MODULE 311643b027fSmrg # non-empty at configure time, or by adding -multi_module to the 312643b027fSmrg # link flags. 313643b027fSmrg echo "int foo(void){return 1;}" > conftest.c 314643b027fSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 315643b027fSmrg -dynamiclib ${wl}-single_module conftest.c 316643b027fSmrg if test -f libconftest.dylib; then 317643b027fSmrg lt_cv_apple_cc_single_mod=yes 318643b027fSmrg rm -rf libconftest.dylib* 319643b027fSmrg fi 320643b027fSmrg rm conftest.c 321eda3803bSmrg fi]) 322eda3803bSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 323eda3803bSmrg [lt_cv_ld_exported_symbols_list], 324eda3803bSmrg [lt_cv_ld_exported_symbols_list=no 325eda3803bSmrg save_LDFLAGS=$LDFLAGS 326eda3803bSmrg echo "_main" > conftest.sym 327eda3803bSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 328eda3803bSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 329643b027fSmrg [lt_cv_ld_exported_symbols_list=yes], 330643b027fSmrg [lt_cv_ld_exported_symbols_list=no]) 331643b027fSmrg LDFLAGS="$save_LDFLAGS" 332eda3803bSmrg ]) 333eda3803bSmrg case $host_os in 334643b027fSmrg rhapsody* | darwin1.[[0123]]) 335eda3803bSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 336eda3803bSmrg darwin1.*) 337643b027fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 338643b027fSmrg darwin*) 339eda3803bSmrg # if running on 10.5 or later, the deployment target defaults 340eda3803bSmrg # to the OS version, if on x86, and 10.4, the deployment 341eda3803bSmrg # target defaults to 10.4. Don't you love it? 342eda3803bSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 343643b027fSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 344643b027fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 345643b027fSmrg 10.[[012]]*) 346643b027fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 347643b027fSmrg 10.*) 348643b027fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 349eda3803bSmrg esac 350eda3803bSmrg ;; 351eda3803bSmrg esac 352eda3803bSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 353eda3803bSmrg _lt_dar_single_mod='$single_module' 354eda3803bSmrg fi 355eda3803bSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 356eda3803bSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 357eda3803bSmrg else 358643b027fSmrg _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 359eda3803bSmrg fi 360eda3803bSmrg if test "$DSYMUTIL" != ":"; then 361643b027fSmrg _lt_dsymutil="~$DSYMUTIL \$lib || :" 362eda3803bSmrg else 363eda3803bSmrg _lt_dsymutil= 364eda3803bSmrg fi 365eda3803bSmrg ;; 366eda3803bSmrg esac 367eda3803bSmrg]) 368eda3803bSmrg 369643b027fSmrg# _LT_AC_SYS_LIBPATH_AIX 370643b027fSmrg# ---------------------- 371fe5e51b7Smrg# Links a minimal program and checks the executable 372fe5e51b7Smrg# for the system default hardcoded library path. In most cases, 373fe5e51b7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 374fe5e51b7Smrg# the location of the communication and MPI libs are included too. 375fe5e51b7Smrg# If we don't find anything, use the default library path according 376fe5e51b7Smrg# to the aix ld manual. 377643b027fSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 378643b027fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 379fe5e51b7SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 380fe5e51b7Smrglt_aix_libpath_sed=' 381fe5e51b7Smrg /Import File Strings/,/^$/ { 382fe5e51b7Smrg /^0/ { 383fe5e51b7Smrg s/^0 *\(.*\)$/\1/ 384fe5e51b7Smrg p 385fe5e51b7Smrg } 386fe5e51b7Smrg }' 387fe5e51b7Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 388fe5e51b7Smrg# Check for a 64-bit object if we didn't find anything. 389fe5e51b7Smrgif test -z "$aix_libpath"; then 390fe5e51b7Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 391fe5e51b7Smrgfi],[]) 392fe5e51b7Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 393643b027fSmrg])# _LT_AC_SYS_LIBPATH_AIX 394fe5e51b7Smrg 395fe5e51b7Smrg 396643b027fSmrg# _LT_AC_SHELL_INIT(ARG) 397643b027fSmrg# ---------------------- 398643b027fSmrgAC_DEFUN([_LT_AC_SHELL_INIT], 399fe5e51b7Smrg[ifdef([AC_DIVERSION_NOTICE], 400fe5e51b7Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 401fe5e51b7Smrg [AC_DIVERT_PUSH(NOTICE)]) 402fe5e51b7Smrg$1 403fe5e51b7SmrgAC_DIVERT_POP 404643b027fSmrg])# _LT_AC_SHELL_INIT 405fe5e51b7Smrg 406fe5e51b7Smrg 407643b027fSmrg# _LT_AC_PROG_ECHO_BACKSLASH 408643b027fSmrg# -------------------------- 409fe5e51b7Smrg# Add some code to the start of the generated configure script which 410fe5e51b7Smrg# will find an echo command which doesn't interpret backslashes. 411643b027fSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 412643b027fSmrg[_LT_AC_SHELL_INIT([ 413fe5e51b7Smrg# Check that we are running under the correct shell. 414fe5e51b7SmrgSHELL=${CONFIG_SHELL-/bin/sh} 415fe5e51b7Smrg 416643b027fSmrgcase X$ECHO in 417fe5e51b7SmrgX*--fallback-echo) 418fe5e51b7Smrg # Remove one level of quotation (which was required for Make). 419643b027fSmrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 420fe5e51b7Smrg ;; 421fe5e51b7Smrgesac 422fe5e51b7Smrg 423643b027fSmrgecho=${ECHO-echo} 424fe5e51b7Smrgif test "X[$]1" = X--no-reexec; then 425fe5e51b7Smrg # Discard the --no-reexec flag, and continue. 426fe5e51b7Smrg shift 427fe5e51b7Smrgelif test "X[$]1" = X--fallback-echo; then 428fe5e51b7Smrg # Avoid inline document here, it may be left over 429fe5e51b7Smrg : 430643b027fSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 431643b027fSmrg # Yippee, $echo works! 432fe5e51b7Smrg : 433fe5e51b7Smrgelse 434fe5e51b7Smrg # Restart under the correct shell. 435fe5e51b7Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 436fe5e51b7Smrgfi 437fe5e51b7Smrg 438fe5e51b7Smrgif test "X[$]1" = X--fallback-echo; then 439fe5e51b7Smrg # used as fallback echo 440fe5e51b7Smrg shift 441643b027fSmrg cat <<EOF 442fe5e51b7Smrg[$]* 443643b027fSmrgEOF 444fe5e51b7Smrg exit 0 445fe5e51b7Smrgfi 446fe5e51b7Smrg 447fe5e51b7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 448fe5e51b7Smrg# if CDPATH is set. 449fe5e51b7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 450fe5e51b7Smrg 451643b027fSmrgif test -z "$ECHO"; then 452643b027fSmrgif test "X${echo_test_string+set}" != Xset; then 453643b027fSmrg# find a string as large as possible, as long as the shell can cope with it 454643b027fSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 455643b027fSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 456643b027fSmrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 457643b027fSmrg echo_test_string=`eval $cmd` && 458643b027fSmrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 459643b027fSmrg then 460643b027fSmrg break 461643b027fSmrg fi 462643b027fSmrg done 463643b027fSmrgfi 464fe5e51b7Smrg 465643b027fSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 466643b027fSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 467643b027fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 468643b027fSmrg : 469643b027fSmrgelse 470643b027fSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 471643b027fSmrg # backslashes. This makes it impossible to quote backslashes using 472643b027fSmrg # echo "$something" | sed 's/\\/\\\\/g' 473643b027fSmrg # 474643b027fSmrg # So, first we look for a working echo in the user's PATH. 475fe5e51b7Smrg 476643b027fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 477643b027fSmrg for dir in $PATH /usr/ucb; do 478fe5e51b7Smrg IFS="$lt_save_ifs" 479643b027fSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 480643b027fSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 481643b027fSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 482643b027fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 483643b027fSmrg echo="$dir/echo" 484643b027fSmrg break 485643b027fSmrg fi 486643b027fSmrg done 487643b027fSmrg IFS="$lt_save_ifs" 488fe5e51b7Smrg 489643b027fSmrg if test "X$echo" = Xecho; then 490643b027fSmrg # We didn't find a better echo, so look for alternatives. 491643b027fSmrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 492643b027fSmrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 493643b027fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 494643b027fSmrg # This shell has a builtin print -r that does the trick. 495643b027fSmrg echo='print -r' 496643b027fSmrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 497643b027fSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 498643b027fSmrg # If we have ksh, try running configure again with it. 499643b027fSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 500643b027fSmrg export ORIGINAL_CONFIG_SHELL 501643b027fSmrg CONFIG_SHELL=/bin/ksh 502643b027fSmrg export CONFIG_SHELL 503643b027fSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 504643b027fSmrg else 505643b027fSmrg # Try using printf. 506643b027fSmrg echo='printf %s\n' 507643b027fSmrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 508643b027fSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 509643b027fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 510643b027fSmrg # Cool, printf works 511643b027fSmrg : 512643b027fSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 513643b027fSmrg test "X$echo_testing_string" = 'X\t' && 514643b027fSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 515eda3803bSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 516643b027fSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 517643b027fSmrg export CONFIG_SHELL 518643b027fSmrg SHELL="$CONFIG_SHELL" 519643b027fSmrg export SHELL 520643b027fSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 521643b027fSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 522643b027fSmrg test "X$echo_testing_string" = 'X\t' && 523643b027fSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 524643b027fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 525643b027fSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 526643b027fSmrg else 527643b027fSmrg # maybe with a smaller string... 528643b027fSmrg prev=: 529fe5e51b7Smrg 530643b027fSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 531643b027fSmrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 532643b027fSmrg then 533643b027fSmrg break 534eda3803bSmrg fi 535643b027fSmrg prev="$cmd" 536643b027fSmrg done 537643b027fSmrg 538643b027fSmrg if test "$prev" != 'sed 50q "[$]0"'; then 539643b027fSmrg echo_test_string=`eval $prev` 540643b027fSmrg export echo_test_string 541643b027fSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 542643b027fSmrg else 543643b027fSmrg # Oops. We lost completely, so just stick with echo. 544643b027fSmrg echo=echo 545643b027fSmrg fi 546fe5e51b7Smrg fi 547fe5e51b7Smrg fi 548fe5e51b7Smrg fi 549fe5e51b7Smrgfi 550643b027fSmrgfi 551fe5e51b7Smrg 552fe5e51b7Smrg# Copy echo and quote the copy suitably for passing to libtool from 553fe5e51b7Smrg# the Makefile, instead of quoting the original, which is used later. 554643b027fSmrgECHO=$echo 555643b027fSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 556643b027fSmrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 557fe5e51b7Smrgfi 558fe5e51b7Smrg 559643b027fSmrgAC_SUBST(ECHO) 560643b027fSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH 561fe5e51b7Smrg 562fe5e51b7Smrg 563643b027fSmrg# _LT_AC_LOCK 564643b027fSmrg# ----------- 565643b027fSmrgAC_DEFUN([_LT_AC_LOCK], 566fe5e51b7Smrg[AC_ARG_ENABLE([libtool-lock], 567643b027fSmrg [AC_HELP_STRING([--disable-libtool-lock], 568643b027fSmrg [avoid locking (might break parallel builds)])]) 569fe5e51b7Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 570fe5e51b7Smrg 571fe5e51b7Smrg# Some flags need to be propagated to the compiler or linker for good 572fe5e51b7Smrg# libtool support. 573fe5e51b7Smrgcase $host in 574fe5e51b7Smrgia64-*-hpux*) 575fe5e51b7Smrg # Find out which ABI we are using. 576fe5e51b7Smrg echo 'int i;' > conftest.$ac_ext 577fe5e51b7Smrg if AC_TRY_EVAL(ac_compile); then 578fe5e51b7Smrg case `/usr/bin/file conftest.$ac_objext` in 579643b027fSmrg *ELF-32*) 580643b027fSmrg HPUX_IA64_MODE="32" 581643b027fSmrg ;; 582643b027fSmrg *ELF-64*) 583643b027fSmrg HPUX_IA64_MODE="64" 584643b027fSmrg ;; 585fe5e51b7Smrg esac 586fe5e51b7Smrg fi 587fe5e51b7Smrg rm -rf conftest* 588fe5e51b7Smrg ;; 589fe5e51b7Smrg*-*-irix6*) 590fe5e51b7Smrg # Find out which ABI we are using. 591fe5e51b7Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 592fe5e51b7Smrg if AC_TRY_EVAL(ac_compile); then 593643b027fSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 594643b027fSmrg case `/usr/bin/file conftest.$ac_objext` in 595643b027fSmrg *32-bit*) 596643b027fSmrg LD="${LD-ld} -melf32bsmip" 597643b027fSmrg ;; 598643b027fSmrg *N32*) 599643b027fSmrg LD="${LD-ld} -melf32bmipn32" 600643b027fSmrg ;; 601643b027fSmrg *64-bit*) 602643b027fSmrg LD="${LD-ld} -melf64bmip" 603643b027fSmrg ;; 604643b027fSmrg esac 605643b027fSmrg else 606643b027fSmrg case `/usr/bin/file conftest.$ac_objext` in 607643b027fSmrg *32-bit*) 608643b027fSmrg LD="${LD-ld} -32" 609643b027fSmrg ;; 610643b027fSmrg *N32*) 611643b027fSmrg LD="${LD-ld} -n32" 612643b027fSmrg ;; 613643b027fSmrg *64-bit*) 614643b027fSmrg LD="${LD-ld} -64" 615643b027fSmrg ;; 616643b027fSmrg esac 617643b027fSmrg fi 618fe5e51b7Smrg fi 619fe5e51b7Smrg rm -rf conftest* 620fe5e51b7Smrg ;; 621fe5e51b7Smrg 622fe5e51b7Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 623643b027fSmrgs390*-*linux*|sparc*-*linux*) 624fe5e51b7Smrg # Find out which ABI we are using. 625fe5e51b7Smrg echo 'int i;' > conftest.$ac_ext 626fe5e51b7Smrg if AC_TRY_EVAL(ac_compile); then 627fe5e51b7Smrg case `/usr/bin/file conftest.o` in 628643b027fSmrg *32-bit*) 629643b027fSmrg case $host in 630643b027fSmrg x86_64-*kfreebsd*-gnu) 631643b027fSmrg LD="${LD-ld} -m elf_i386_fbsd" 632643b027fSmrg ;; 633643b027fSmrg x86_64-*linux*) 634643b027fSmrg LD="${LD-ld} -m elf_i386" 635643b027fSmrg ;; 636643b027fSmrg ppc64-*linux*|powerpc64-*linux*) 637643b027fSmrg LD="${LD-ld} -m elf32ppclinux" 638643b027fSmrg ;; 639643b027fSmrg s390x-*linux*) 640643b027fSmrg LD="${LD-ld} -m elf_s390" 641643b027fSmrg ;; 642643b027fSmrg sparc64-*linux*) 643643b027fSmrg LD="${LD-ld} -m elf32_sparc" 644643b027fSmrg ;; 645643b027fSmrg esac 646643b027fSmrg ;; 647643b027fSmrg *64-bit*) 648643b027fSmrg libsuff=64 649643b027fSmrg case $host in 650643b027fSmrg x86_64-*kfreebsd*-gnu) 651643b027fSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 652643b027fSmrg ;; 653643b027fSmrg x86_64-*linux*) 654643b027fSmrg LD="${LD-ld} -m elf_x86_64" 655643b027fSmrg ;; 656643b027fSmrg ppc*-*linux*|powerpc*-*linux*) 657643b027fSmrg LD="${LD-ld} -m elf64ppc" 658643b027fSmrg ;; 659643b027fSmrg s390*-*linux*) 660643b027fSmrg LD="${LD-ld} -m elf64_s390" 661643b027fSmrg ;; 662643b027fSmrg sparc*-*linux*) 663643b027fSmrg LD="${LD-ld} -m elf64_sparc" 664643b027fSmrg ;; 665643b027fSmrg esac 666643b027fSmrg ;; 667fe5e51b7Smrg esac 668fe5e51b7Smrg fi 669fe5e51b7Smrg rm -rf conftest* 670fe5e51b7Smrg ;; 671fe5e51b7Smrg 672fe5e51b7Smrg*-*-sco3.2v5*) 673fe5e51b7Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 674fe5e51b7Smrg SAVE_CFLAGS="$CFLAGS" 675fe5e51b7Smrg CFLAGS="$CFLAGS -belf" 676fe5e51b7Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 677fe5e51b7Smrg [AC_LANG_PUSH(C) 678643b027fSmrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 679fe5e51b7Smrg AC_LANG_POP]) 680fe5e51b7Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 681fe5e51b7Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 682fe5e51b7Smrg CFLAGS="$SAVE_CFLAGS" 683fe5e51b7Smrg fi 684fe5e51b7Smrg ;; 685fe5e51b7Smrgsparc*-*solaris*) 686fe5e51b7Smrg # Find out which ABI we are using. 687fe5e51b7Smrg echo 'int i;' > conftest.$ac_ext 688fe5e51b7Smrg if AC_TRY_EVAL(ac_compile); then 689fe5e51b7Smrg case `/usr/bin/file conftest.o` in 690fe5e51b7Smrg *64-bit*) 691fe5e51b7Smrg case $lt_cv_prog_gnu_ld in 692fe5e51b7Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 693eda3803bSmrg *) 694643b027fSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 695eda3803bSmrg LD="${LD-ld} -64" 696eda3803bSmrg fi 697eda3803bSmrg ;; 698fe5e51b7Smrg esac 699fe5e51b7Smrg ;; 700fe5e51b7Smrg esac 701fe5e51b7Smrg fi 702fe5e51b7Smrg rm -rf conftest* 703fe5e51b7Smrg ;; 704643b027fSmrg 705643b027fSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 706643b027fSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 707643b027fSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 708643b027fSmrg AC_CHECK_TOOL(AS, as, false) 709643b027fSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 710643b027fSmrg ;; 711643b027fSmrg ]) 712fe5e51b7Smrgesac 713fe5e51b7Smrg 714fe5e51b7Smrgneed_locks="$enable_libtool_lock" 715eda3803bSmrg 716643b027fSmrg])# _LT_AC_LOCK 717fe5e51b7Smrg 718fe5e51b7Smrg 719643b027fSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 720fe5e51b7Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 721fe5e51b7Smrg# ---------------------------------------------------------------- 722fe5e51b7Smrg# Check whether the given compiler option works 723643b027fSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 724643b027fSmrg[AC_REQUIRE([LT_AC_PROG_SED]) 725fe5e51b7SmrgAC_CACHE_CHECK([$1], [$2], 726fe5e51b7Smrg [$2=no 727643b027fSmrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 728fe5e51b7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 729fe5e51b7Smrg lt_compiler_flag="$3" 730fe5e51b7Smrg # Insert the option either (1) after the last *FLAGS variable, or 731fe5e51b7Smrg # (2) before a word containing "conftest.", or (3) at the end. 732fe5e51b7Smrg # Note that $ac_compile itself does not contain backslashes and begins 733fe5e51b7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 734fe5e51b7Smrg # The option is referenced via a variable to avoid confusing sed. 735fe5e51b7Smrg lt_compile=`echo "$ac_compile" | $SED \ 736fe5e51b7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 737fe5e51b7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 738fe5e51b7Smrg -e 's:$: $lt_compiler_flag:'` 739fe5e51b7Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 740fe5e51b7Smrg (eval "$lt_compile" 2>conftest.err) 741fe5e51b7Smrg ac_status=$? 742fe5e51b7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 743fe5e51b7Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 744fe5e51b7Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 745fe5e51b7Smrg # The compiler can only warn and ignore the option if not recognized 746fe5e51b7Smrg # So say no if there are warnings other than the usual output. 747643b027fSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 748fe5e51b7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 749fe5e51b7Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 750fe5e51b7Smrg $2=yes 751fe5e51b7Smrg fi 752fe5e51b7Smrg fi 753643b027fSmrg $rm conftest* 754fe5e51b7Smrg]) 755fe5e51b7Smrg 756fe5e51b7Smrgif test x"[$]$2" = xyes; then 757643b027fSmrg ifelse([$5], , :, [$5]) 758fe5e51b7Smrgelse 759643b027fSmrg ifelse([$6], , :, [$6]) 760fe5e51b7Smrgfi 761643b027fSmrg])# AC_LIBTOOL_COMPILER_OPTION 762fe5e51b7Smrg 763eda3803bSmrg 764643b027fSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 765643b027fSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 766643b027fSmrg# ------------------------------------------------------------ 767643b027fSmrg# Check whether the given compiler option works 768643b027fSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 769643b027fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 770fe5e51b7SmrgAC_CACHE_CHECK([$1], [$2], 771fe5e51b7Smrg [$2=no 772fe5e51b7Smrg save_LDFLAGS="$LDFLAGS" 773fe5e51b7Smrg LDFLAGS="$LDFLAGS $3" 774fe5e51b7Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 775fe5e51b7Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 776fe5e51b7Smrg # The linker can only warn and ignore the option if not recognized 777fe5e51b7Smrg # So say no if there are warnings 778fe5e51b7Smrg if test -s conftest.err; then 779fe5e51b7Smrg # Append any errors to the config.log. 780fe5e51b7Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 781643b027fSmrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 782fe5e51b7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 783fe5e51b7Smrg if diff conftest.exp conftest.er2 >/dev/null; then 784fe5e51b7Smrg $2=yes 785fe5e51b7Smrg fi 786fe5e51b7Smrg else 787fe5e51b7Smrg $2=yes 788fe5e51b7Smrg fi 789fe5e51b7Smrg fi 790643b027fSmrg $rm -r conftest* 791fe5e51b7Smrg LDFLAGS="$save_LDFLAGS" 792fe5e51b7Smrg]) 793fe5e51b7Smrg 794fe5e51b7Smrgif test x"[$]$2" = xyes; then 795643b027fSmrg ifelse([$4], , :, [$4]) 796fe5e51b7Smrgelse 797643b027fSmrg ifelse([$5], , :, [$5]) 798fe5e51b7Smrgfi 799643b027fSmrg])# AC_LIBTOOL_LINKER_OPTION 800fe5e51b7Smrg 801fe5e51b7Smrg 802643b027fSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 803643b027fSmrg# -------------------------- 804643b027fSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 805643b027fSmrg[# find the maximum length of command line arguments 806fe5e51b7SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 807fe5e51b7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 808fe5e51b7Smrg i=0 809fe5e51b7Smrg teststring="ABCD" 810fe5e51b7Smrg 811fe5e51b7Smrg case $build_os in 812fe5e51b7Smrg msdosdjgpp*) 813fe5e51b7Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 814fe5e51b7Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 815fe5e51b7Smrg # during glob expansion). Even if it were fixed, the result of this 816fe5e51b7Smrg # check would be larger than it should be. 817fe5e51b7Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 818fe5e51b7Smrg ;; 819fe5e51b7Smrg 820fe5e51b7Smrg gnu*) 821fe5e51b7Smrg # Under GNU Hurd, this test is not required because there is 822fe5e51b7Smrg # no limit to the length of command line arguments. 823fe5e51b7Smrg # Libtool will interpret -1 as no limit whatsoever 824fe5e51b7Smrg lt_cv_sys_max_cmd_len=-1; 825fe5e51b7Smrg ;; 826fe5e51b7Smrg 827643b027fSmrg cygwin* | mingw*) 828fe5e51b7Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 829fe5e51b7Smrg # about 5 minutes as the teststring grows exponentially. 830fe5e51b7Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 831fe5e51b7Smrg # you end up with a "frozen" computer, even though with patience 832fe5e51b7Smrg # the test eventually succeeds (with a max line length of 256k). 833fe5e51b7Smrg # Instead, let's just punt: use the minimum linelength reported by 834fe5e51b7Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 835fe5e51b7Smrg lt_cv_sys_max_cmd_len=8192; 836fe5e51b7Smrg ;; 837fe5e51b7Smrg 838fe5e51b7Smrg amigaos*) 839fe5e51b7Smrg # On AmigaOS with pdksh, this test takes hours, literally. 840fe5e51b7Smrg # So we just punt and use a minimum line length of 8192. 841fe5e51b7Smrg lt_cv_sys_max_cmd_len=8192; 842fe5e51b7Smrg ;; 843fe5e51b7Smrg 844fe5e51b7Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 845fe5e51b7Smrg # This has been around since 386BSD, at least. Likely further. 846fe5e51b7Smrg if test -x /sbin/sysctl; then 847fe5e51b7Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 848fe5e51b7Smrg elif test -x /usr/sbin/sysctl; then 849fe5e51b7Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 850fe5e51b7Smrg else 851fe5e51b7Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 852fe5e51b7Smrg fi 853fe5e51b7Smrg # And add a safety zone 854fe5e51b7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 855fe5e51b7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 856fe5e51b7Smrg ;; 857fe5e51b7Smrg 858fe5e51b7Smrg interix*) 859fe5e51b7Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 860fe5e51b7Smrg lt_cv_sys_max_cmd_len=196608 861fe5e51b7Smrg ;; 862fe5e51b7Smrg 863fe5e51b7Smrg osf*) 864fe5e51b7Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 865fe5e51b7Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 866fe5e51b7Smrg # nice to cause kernel panics so lets avoid the loop below. 867fe5e51b7Smrg # First set a reasonable default. 868fe5e51b7Smrg lt_cv_sys_max_cmd_len=16384 869fe5e51b7Smrg # 870fe5e51b7Smrg if test -x /sbin/sysconfig; then 871fe5e51b7Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 872fe5e51b7Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 873fe5e51b7Smrg esac 874fe5e51b7Smrg fi 875fe5e51b7Smrg ;; 876fe5e51b7Smrg sco3.2v5*) 877fe5e51b7Smrg lt_cv_sys_max_cmd_len=102400 878fe5e51b7Smrg ;; 879fe5e51b7Smrg sysv5* | sco5v6* | sysv4.2uw2*) 880fe5e51b7Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 881fe5e51b7Smrg if test -n "$kargmax"; then 882643b027fSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 883fe5e51b7Smrg else 884fe5e51b7Smrg lt_cv_sys_max_cmd_len=32768 885fe5e51b7Smrg fi 886fe5e51b7Smrg ;; 887fe5e51b7Smrg *) 888fe5e51b7Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 889fe5e51b7Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 890fe5e51b7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 891fe5e51b7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 892fe5e51b7Smrg else 893fe5e51b7Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 894643b027fSmrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 895643b027fSmrg = "XX$teststring") >/dev/null 2>&1 && 896643b027fSmrg new_result=`expr "X$teststring" : ".*" 2>&1` && 897643b027fSmrg lt_cv_sys_max_cmd_len=$new_result && 898fe5e51b7Smrg test $i != 17 # 1/2 MB should be enough 899fe5e51b7Smrg do 900fe5e51b7Smrg i=`expr $i + 1` 901fe5e51b7Smrg teststring=$teststring$teststring 902fe5e51b7Smrg done 903fe5e51b7Smrg teststring= 904643b027fSmrg # Add a significant safety factor because C++ compilers can tack on massive 905643b027fSmrg # amounts of additional arguments before passing them to the linker. 906643b027fSmrg # It appears as though 1/2 is a usable value. 907fe5e51b7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 908fe5e51b7Smrg fi 909fe5e51b7Smrg ;; 910fe5e51b7Smrg esac 911fe5e51b7Smrg]) 912fe5e51b7Smrgif test -n $lt_cv_sys_max_cmd_len ; then 913fe5e51b7Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 914fe5e51b7Smrgelse 915fe5e51b7Smrg AC_MSG_RESULT(none) 916fe5e51b7Smrgfi 917643b027fSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 918fe5e51b7Smrg 919fe5e51b7Smrg 920643b027fSmrg# _LT_AC_CHECK_DLFCN 921643b027fSmrg# ------------------ 922643b027fSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 923643b027fSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl 924643b027fSmrg])# _LT_AC_CHECK_DLFCN 925fe5e51b7Smrg 926fe5e51b7Smrg 927643b027fSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 928643b027fSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 929643b027fSmrg# --------------------------------------------------------------------- 930643b027fSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 931643b027fSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 932fe5e51b7Smrgif test "$cross_compiling" = yes; then : 933fe5e51b7Smrg [$4] 934fe5e51b7Smrgelse 935fe5e51b7Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 936fe5e51b7Smrg lt_status=$lt_dlunknown 937643b027fSmrg cat > conftest.$ac_ext <<EOF 938fe5e51b7Smrg[#line __oline__ "configure" 939fe5e51b7Smrg#include "confdefs.h" 940fe5e51b7Smrg 941fe5e51b7Smrg#if HAVE_DLFCN_H 942fe5e51b7Smrg#include <dlfcn.h> 943fe5e51b7Smrg#endif 944fe5e51b7Smrg 945fe5e51b7Smrg#include <stdio.h> 946fe5e51b7Smrg 947fe5e51b7Smrg#ifdef RTLD_GLOBAL 948fe5e51b7Smrg# define LT_DLGLOBAL RTLD_GLOBAL 949fe5e51b7Smrg#else 950fe5e51b7Smrg# ifdef DL_GLOBAL 951fe5e51b7Smrg# define LT_DLGLOBAL DL_GLOBAL 952fe5e51b7Smrg# else 953fe5e51b7Smrg# define LT_DLGLOBAL 0 954fe5e51b7Smrg# endif 955fe5e51b7Smrg#endif 956fe5e51b7Smrg 957fe5e51b7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 958fe5e51b7Smrg find out it does not work in some platform. */ 959fe5e51b7Smrg#ifndef LT_DLLAZY_OR_NOW 960fe5e51b7Smrg# ifdef RTLD_LAZY 961fe5e51b7Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 962fe5e51b7Smrg# else 963fe5e51b7Smrg# ifdef DL_LAZY 964fe5e51b7Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 965fe5e51b7Smrg# else 966fe5e51b7Smrg# ifdef RTLD_NOW 967fe5e51b7Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 968fe5e51b7Smrg# else 969fe5e51b7Smrg# ifdef DL_NOW 970fe5e51b7Smrg# define LT_DLLAZY_OR_NOW DL_NOW 971fe5e51b7Smrg# else 972fe5e51b7Smrg# define LT_DLLAZY_OR_NOW 0 973fe5e51b7Smrg# endif 974fe5e51b7Smrg# endif 975fe5e51b7Smrg# endif 976fe5e51b7Smrg# endif 977fe5e51b7Smrg#endif 978fe5e51b7Smrg 979643b027fSmrg#ifdef __cplusplus 980643b027fSmrgextern "C" void exit (int); 981643b027fSmrg#endif 982643b027fSmrg 983fe5e51b7Smrgvoid fnord() { int i=42;} 984fe5e51b7Smrgint main () 985fe5e51b7Smrg{ 986fe5e51b7Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 987fe5e51b7Smrg int status = $lt_dlunknown; 988fe5e51b7Smrg 989fe5e51b7Smrg if (self) 990fe5e51b7Smrg { 991fe5e51b7Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 992fe5e51b7Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 993fe5e51b7Smrg /* dlclose (self); */ 994fe5e51b7Smrg } 995fe5e51b7Smrg else 996fe5e51b7Smrg puts (dlerror ()); 997fe5e51b7Smrg 998643b027fSmrg exit (status); 999fe5e51b7Smrg}] 1000643b027fSmrgEOF 1001fe5e51b7Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1002fe5e51b7Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1003fe5e51b7Smrg lt_status=$? 1004fe5e51b7Smrg case x$lt_status in 1005fe5e51b7Smrg x$lt_dlno_uscore) $1 ;; 1006fe5e51b7Smrg x$lt_dlneed_uscore) $2 ;; 1007fe5e51b7Smrg x$lt_dlunknown|x*) $3 ;; 1008fe5e51b7Smrg esac 1009fe5e51b7Smrg else : 1010fe5e51b7Smrg # compilation failed 1011fe5e51b7Smrg $3 1012fe5e51b7Smrg fi 1013fe5e51b7Smrgfi 1014fe5e51b7Smrgrm -fr conftest* 1015643b027fSmrg])# _LT_AC_TRY_DLOPEN_SELF 1016fe5e51b7Smrg 1017fe5e51b7Smrg 1018643b027fSmrg# AC_LIBTOOL_DLOPEN_SELF 1019643b027fSmrg# ---------------------- 1020643b027fSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 1021643b027fSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 1022fe5e51b7Smrgif test "x$enable_dlopen" != xyes; then 1023fe5e51b7Smrg enable_dlopen=unknown 1024fe5e51b7Smrg enable_dlopen_self=unknown 1025fe5e51b7Smrg enable_dlopen_self_static=unknown 1026fe5e51b7Smrgelse 1027fe5e51b7Smrg lt_cv_dlopen=no 1028fe5e51b7Smrg lt_cv_dlopen_libs= 1029fe5e51b7Smrg 1030fe5e51b7Smrg case $host_os in 1031fe5e51b7Smrg beos*) 1032fe5e51b7Smrg lt_cv_dlopen="load_add_on" 1033fe5e51b7Smrg lt_cv_dlopen_libs= 1034fe5e51b7Smrg lt_cv_dlopen_self=yes 1035fe5e51b7Smrg ;; 1036fe5e51b7Smrg 1037643b027fSmrg mingw* | pw32*) 1038fe5e51b7Smrg lt_cv_dlopen="LoadLibrary" 1039fe5e51b7Smrg lt_cv_dlopen_libs= 1040643b027fSmrg ;; 1041fe5e51b7Smrg 1042fe5e51b7Smrg cygwin*) 1043fe5e51b7Smrg lt_cv_dlopen="dlopen" 1044fe5e51b7Smrg lt_cv_dlopen_libs= 1045643b027fSmrg ;; 1046fe5e51b7Smrg 1047fe5e51b7Smrg darwin*) 1048fe5e51b7Smrg # if libdl is installed we need to link against it 1049fe5e51b7Smrg AC_CHECK_LIB([dl], [dlopen], 1050fe5e51b7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1051fe5e51b7Smrg lt_cv_dlopen="dyld" 1052fe5e51b7Smrg lt_cv_dlopen_libs= 1053fe5e51b7Smrg lt_cv_dlopen_self=yes 1054fe5e51b7Smrg ]) 1055643b027fSmrg ;; 1056fe5e51b7Smrg 1057fe5e51b7Smrg *) 1058fe5e51b7Smrg AC_CHECK_FUNC([shl_load], 1059fe5e51b7Smrg [lt_cv_dlopen="shl_load"], 1060fe5e51b7Smrg [AC_CHECK_LIB([dld], [shl_load], 1061eda3803bSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1062fe5e51b7Smrg [AC_CHECK_FUNC([dlopen], 1063fe5e51b7Smrg [lt_cv_dlopen="dlopen"], 1064fe5e51b7Smrg [AC_CHECK_LIB([dl], [dlopen], 1065fe5e51b7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1066fe5e51b7Smrg [AC_CHECK_LIB([svld], [dlopen], 1067fe5e51b7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1068fe5e51b7Smrg [AC_CHECK_LIB([dld], [dld_link], 1069eda3803bSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1070fe5e51b7Smrg ]) 1071fe5e51b7Smrg ]) 1072fe5e51b7Smrg ]) 1073fe5e51b7Smrg ]) 1074fe5e51b7Smrg ]) 1075fe5e51b7Smrg ;; 1076fe5e51b7Smrg esac 1077fe5e51b7Smrg 1078fe5e51b7Smrg if test "x$lt_cv_dlopen" != xno; then 1079fe5e51b7Smrg enable_dlopen=yes 1080fe5e51b7Smrg else 1081fe5e51b7Smrg enable_dlopen=no 1082fe5e51b7Smrg fi 1083fe5e51b7Smrg 1084fe5e51b7Smrg case $lt_cv_dlopen in 1085fe5e51b7Smrg dlopen) 1086fe5e51b7Smrg save_CPPFLAGS="$CPPFLAGS" 1087fe5e51b7Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1088fe5e51b7Smrg 1089fe5e51b7Smrg save_LDFLAGS="$LDFLAGS" 1090fe5e51b7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1091fe5e51b7Smrg 1092fe5e51b7Smrg save_LIBS="$LIBS" 1093fe5e51b7Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 1094fe5e51b7Smrg 1095fe5e51b7Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 1096fe5e51b7Smrg lt_cv_dlopen_self, [dnl 1097643b027fSmrg _LT_AC_TRY_DLOPEN_SELF( 1098fe5e51b7Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1099fe5e51b7Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1100fe5e51b7Smrg ]) 1101fe5e51b7Smrg 1102fe5e51b7Smrg if test "x$lt_cv_dlopen_self" = xyes; then 1103fe5e51b7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1104fe5e51b7Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1105643b027fSmrg lt_cv_dlopen_self_static, [dnl 1106643b027fSmrg _LT_AC_TRY_DLOPEN_SELF( 1107fe5e51b7Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1108fe5e51b7Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1109fe5e51b7Smrg ]) 1110fe5e51b7Smrg fi 1111fe5e51b7Smrg 1112fe5e51b7Smrg CPPFLAGS="$save_CPPFLAGS" 1113fe5e51b7Smrg LDFLAGS="$save_LDFLAGS" 1114fe5e51b7Smrg LIBS="$save_LIBS" 1115fe5e51b7Smrg ;; 1116fe5e51b7Smrg esac 1117fe5e51b7Smrg 1118fe5e51b7Smrg case $lt_cv_dlopen_self in 1119fe5e51b7Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1120fe5e51b7Smrg *) enable_dlopen_self=unknown ;; 1121fe5e51b7Smrg esac 1122fe5e51b7Smrg 1123fe5e51b7Smrg case $lt_cv_dlopen_self_static in 1124fe5e51b7Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1125fe5e51b7Smrg *) enable_dlopen_self_static=unknown ;; 1126fe5e51b7Smrg esac 1127fe5e51b7Smrgfi 1128643b027fSmrg])# AC_LIBTOOL_DLOPEN_SELF 1129fe5e51b7Smrg 1130eda3803bSmrg 1131643b027fSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 1132643b027fSmrg# --------------------------------- 1133643b027fSmrg# Check to see if options -c and -o are simultaneously supported by compiler 1134643b027fSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 1135643b027fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1136643b027fSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1137fe5e51b7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1138643b027fSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1139643b027fSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1140643b027fSmrg $rm -r conftest 2>/dev/null 1141fe5e51b7Smrg mkdir conftest 1142fe5e51b7Smrg cd conftest 1143fe5e51b7Smrg mkdir out 1144fe5e51b7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1145fe5e51b7Smrg 1146fe5e51b7Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1147fe5e51b7Smrg # Insert the option either (1) after the last *FLAGS variable, or 1148fe5e51b7Smrg # (2) before a word containing "conftest.", or (3) at the end. 1149fe5e51b7Smrg # Note that $ac_compile itself does not contain backslashes and begins 1150fe5e51b7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1151fe5e51b7Smrg lt_compile=`echo "$ac_compile" | $SED \ 1152fe5e51b7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1153fe5e51b7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1154fe5e51b7Smrg -e 's:$: $lt_compiler_flag:'` 1155fe5e51b7Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1156fe5e51b7Smrg (eval "$lt_compile" 2>out/conftest.err) 1157fe5e51b7Smrg ac_status=$? 1158fe5e51b7Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 1159fe5e51b7Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1160fe5e51b7Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 1161fe5e51b7Smrg then 1162fe5e51b7Smrg # The compiler can only warn and ignore the option if not recognized 1163fe5e51b7Smrg # So say no if there are warnings 1164643b027fSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1165fe5e51b7Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1166fe5e51b7Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1167643b027fSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1168fe5e51b7Smrg fi 1169fe5e51b7Smrg fi 1170fe5e51b7Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1171643b027fSmrg $rm conftest* 1172fe5e51b7Smrg # SGI C++ compiler will create directory out/ii_files/ for 1173fe5e51b7Smrg # template instantiation 1174643b027fSmrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1175643b027fSmrg $rm out/* && rmdir out 1176fe5e51b7Smrg cd .. 1177643b027fSmrg rmdir conftest 1178643b027fSmrg $rm conftest* 1179fe5e51b7Smrg]) 1180643b027fSmrg])# AC_LIBTOOL_PROG_CC_C_O 1181fe5e51b7Smrg 1182fe5e51b7Smrg 1183643b027fSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1184643b027fSmrg# ----------------------------------------- 1185fe5e51b7Smrg# Check to see if we can do hard links to lock some files if needed 1186643b027fSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1187643b027fSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl 1188fe5e51b7Smrg 1189fe5e51b7Smrghard_links="nottested" 1190643b027fSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1191fe5e51b7Smrg # do not overwrite the value of need_locks provided by the user 1192fe5e51b7Smrg AC_MSG_CHECKING([if we can lock with hard links]) 1193fe5e51b7Smrg hard_links=yes 1194643b027fSmrg $rm conftest* 1195fe5e51b7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1196fe5e51b7Smrg touch conftest.a 1197fe5e51b7Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 1198fe5e51b7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1199fe5e51b7Smrg AC_MSG_RESULT([$hard_links]) 1200fe5e51b7Smrg if test "$hard_links" = no; then 1201fe5e51b7Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1202fe5e51b7Smrg need_locks=warn 1203fe5e51b7Smrg fi 1204fe5e51b7Smrgelse 1205fe5e51b7Smrg need_locks=no 1206fe5e51b7Smrgfi 1207643b027fSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1208fe5e51b7Smrg 1209fe5e51b7Smrg 1210643b027fSmrg# AC_LIBTOOL_OBJDIR 1211643b027fSmrg# ----------------- 1212643b027fSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 1213fe5e51b7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1214fe5e51b7Smrg[rm -f .libs 2>/dev/null 1215fe5e51b7Smrgmkdir .libs 2>/dev/null 1216fe5e51b7Smrgif test -d .libs; then 1217fe5e51b7Smrg lt_cv_objdir=.libs 1218fe5e51b7Smrgelse 1219fe5e51b7Smrg # MS-DOS does not allow filenames that begin with a dot. 1220fe5e51b7Smrg lt_cv_objdir=_libs 1221fe5e51b7Smrgfi 1222fe5e51b7Smrgrmdir .libs 2>/dev/null]) 1223fe5e51b7Smrgobjdir=$lt_cv_objdir 1224643b027fSmrg])# AC_LIBTOOL_OBJDIR 1225fe5e51b7Smrg 1226fe5e51b7Smrg 1227643b027fSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1228643b027fSmrg# ---------------------------------------------- 1229fe5e51b7Smrg# Check hardcoding attributes. 1230643b027fSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 1231fe5e51b7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1232643b027fSmrg_LT_AC_TAGVAR(hardcode_action, $1)= 1233643b027fSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1234643b027fSmrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 1235643b027fSmrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1236fe5e51b7Smrg 1237643b027fSmrg # We can hardcode non-existant directories. 1238643b027fSmrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 1239fe5e51b7Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 1240fe5e51b7Smrg # have to relink, otherwise we might link with an installed library 1241fe5e51b7Smrg # when we should be linking with a yet-to-be-installed one 1242643b027fSmrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1243643b027fSmrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 1244fe5e51b7Smrg # Linking always hardcodes the temporary library directory. 1245643b027fSmrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 1246fe5e51b7Smrg else 1247fe5e51b7Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1248643b027fSmrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 1249fe5e51b7Smrg fi 1250fe5e51b7Smrgelse 1251fe5e51b7Smrg # We cannot hardcode anything, or else we can only hardcode existing 1252fe5e51b7Smrg # directories. 1253643b027fSmrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1254fe5e51b7Smrgfi 1255643b027fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1256fe5e51b7Smrg 1257643b027fSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 1258fe5e51b7Smrg # Fast installation is not supported 1259fe5e51b7Smrg enable_fast_install=no 1260fe5e51b7Smrgelif test "$shlibpath_overrides_runpath" = yes || 1261fe5e51b7Smrg test "$enable_shared" = no; then 1262fe5e51b7Smrg # Fast installation is not necessary 1263fe5e51b7Smrg enable_fast_install=needless 1264fe5e51b7Smrgfi 1265643b027fSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 1266fe5e51b7Smrg 1267fe5e51b7Smrg 1268643b027fSmrg# AC_LIBTOOL_SYS_LIB_STRIP 1269643b027fSmrg# ------------------------ 1270643b027fSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1271643b027fSmrg[striplib= 1272fe5e51b7Smrgold_striplib= 1273fe5e51b7SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 1274643b027fSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 1275fe5e51b7Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 1276fe5e51b7Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 1277fe5e51b7Smrg AC_MSG_RESULT([yes]) 1278fe5e51b7Smrgelse 1279fe5e51b7Smrg# FIXME - insert some real tests, host_os isn't really good enough 1280fe5e51b7Smrg case $host_os in 1281643b027fSmrg darwin*) 1282643b027fSmrg if test -n "$STRIP" ; then 1283643b027fSmrg striplib="$STRIP -x" 1284643b027fSmrg old_striplib="$STRIP -S" 1285643b027fSmrg AC_MSG_RESULT([yes]) 1286643b027fSmrg else 1287643b027fSmrg AC_MSG_RESULT([no]) 1288643b027fSmrgfi 1289643b027fSmrg ;; 1290643b027fSmrg *) 1291643b027fSmrg AC_MSG_RESULT([no]) 1292fe5e51b7Smrg ;; 1293fe5e51b7Smrg esac 1294fe5e51b7Smrgfi 1295643b027fSmrg])# AC_LIBTOOL_SYS_LIB_STRIP 1296fe5e51b7Smrg 1297fe5e51b7Smrg 1298643b027fSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1299fe5e51b7Smrg# ----------------------------- 1300fe5e51b7Smrg# PORTME Fill in your ld.so characteristics 1301643b027fSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1302643b027fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1303fe5e51b7SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 1304643b027fSmrglibrary_names_spec= 1305643b027fSmrglibname_spec='lib$name' 1306643b027fSmrgsoname_spec= 1307643b027fSmrgshrext_cmds=".so" 1308643b027fSmrgpostinstall_cmds= 1309643b027fSmrgpostuninstall_cmds= 1310643b027fSmrgfinish_cmds= 1311643b027fSmrgfinish_eval= 1312643b027fSmrgshlibpath_var= 1313643b027fSmrgshlibpath_overrides_runpath=unknown 1314643b027fSmrgversion_type=none 1315643b027fSmrgdynamic_linker="$host_os ld.so" 1316643b027fSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 1317643b027fSmrgm4_if($1,[],[ 1318fe5e51b7Smrgif test "$GCC" = yes; then 1319fe5e51b7Smrg case $host_os in 1320fe5e51b7Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 1321fe5e51b7Smrg *) lt_awk_arg="/^libraries:/" ;; 1322fe5e51b7Smrg esac 1323fe5e51b7Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1324643b027fSmrg if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 1325fe5e51b7Smrg # if the path contains ";" then we assume it to be the separator 1326fe5e51b7Smrg # otherwise default to the standard path separator (i.e. ":") - it is 1327fe5e51b7Smrg # assumed that no part of a normal pathname contains ";" but that should 1328fe5e51b7Smrg # okay in the real world where ";" in dirpaths is itself problematic. 1329643b027fSmrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 1330fe5e51b7Smrg else 1331643b027fSmrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1332fe5e51b7Smrg fi 1333fe5e51b7Smrg # Ok, now we have the path, separated by spaces, we can step through it 1334fe5e51b7Smrg # and add multilib dir if necessary. 1335fe5e51b7Smrg lt_tmp_lt_search_path_spec= 1336fe5e51b7Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 1337fe5e51b7Smrg for lt_sys_path in $lt_search_path_spec; do 1338fe5e51b7Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 1339fe5e51b7Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 1340fe5e51b7Smrg else 1341fe5e51b7Smrg test -d "$lt_sys_path" && \ 1342fe5e51b7Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 1343fe5e51b7Smrg fi 1344fe5e51b7Smrg done 1345643b027fSmrg lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 1346fe5e51b7SmrgBEGIN {RS=" "; FS="/|\n";} { 1347fe5e51b7Smrg lt_foo=""; 1348fe5e51b7Smrg lt_count=0; 1349fe5e51b7Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 1350fe5e51b7Smrg if ($lt_i != "" && $lt_i != ".") { 1351fe5e51b7Smrg if ($lt_i == "..") { 1352fe5e51b7Smrg lt_count++; 1353fe5e51b7Smrg } else { 1354fe5e51b7Smrg if (lt_count == 0) { 1355fe5e51b7Smrg lt_foo="/" $lt_i lt_foo; 1356fe5e51b7Smrg } else { 1357fe5e51b7Smrg lt_count--; 1358fe5e51b7Smrg } 1359fe5e51b7Smrg } 1360fe5e51b7Smrg } 1361fe5e51b7Smrg } 1362fe5e51b7Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 1363fe5e51b7Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 1364fe5e51b7Smrg}'` 1365643b027fSmrg sys_lib_search_path_spec=`echo $lt_search_path_spec` 1366fe5e51b7Smrgelse 1367fe5e51b7Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 1368fe5e51b7Smrgfi]) 1369fe5e51b7Smrgneed_lib_prefix=unknown 1370fe5e51b7Smrghardcode_into_libs=no 1371fe5e51b7Smrg 1372fe5e51b7Smrg# when you set need_version to no, make sure it does not cause -set_version 1373fe5e51b7Smrg# flags to be left without arguments 1374fe5e51b7Smrgneed_version=unknown 1375fe5e51b7Smrg 1376fe5e51b7Smrgcase $host_os in 1377fe5e51b7Smrgaix3*) 1378fe5e51b7Smrg version_type=linux 1379fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 1380fe5e51b7Smrg shlibpath_var=LIBPATH 1381fe5e51b7Smrg 1382fe5e51b7Smrg # AIX 3 has no versioning support, so we append a major version to the name. 1383fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1384fe5e51b7Smrg ;; 1385fe5e51b7Smrg 1386eda3803bSmrgaix[[4-9]]*) 1387fe5e51b7Smrg version_type=linux 1388fe5e51b7Smrg need_lib_prefix=no 1389fe5e51b7Smrg need_version=no 1390fe5e51b7Smrg hardcode_into_libs=yes 1391fe5e51b7Smrg if test "$host_cpu" = ia64; then 1392fe5e51b7Smrg # AIX 5 supports IA64 1393fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 1394fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1395fe5e51b7Smrg else 1396fe5e51b7Smrg # With GCC up to 2.95.x, collect2 would create an import file 1397fe5e51b7Smrg # for dependence libraries. The import file would start with 1398fe5e51b7Smrg # the line `#! .'. This would cause the generated library to 1399fe5e51b7Smrg # depend on `.', always an invalid library. This was fixed in 1400fe5e51b7Smrg # development snapshots of GCC prior to 3.0. 1401fe5e51b7Smrg case $host_os in 1402fe5e51b7Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 1403fe5e51b7Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 1404fe5e51b7Smrg echo ' yes ' 1405643b027fSmrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 1406fe5e51b7Smrg : 1407fe5e51b7Smrg else 1408fe5e51b7Smrg can_build_shared=no 1409fe5e51b7Smrg fi 1410fe5e51b7Smrg ;; 1411fe5e51b7Smrg esac 1412fe5e51b7Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 1413fe5e51b7Smrg # soname into executable. Probably we can add versioning support to 1414fe5e51b7Smrg # collect2, so additional links can be useful in future. 1415fe5e51b7Smrg if test "$aix_use_runtimelinking" = yes; then 1416fe5e51b7Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 1417fe5e51b7Smrg # instead of lib<name>.a to let people know that these are not 1418fe5e51b7Smrg # typical AIX shared libraries. 1419fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1420fe5e51b7Smrg else 1421fe5e51b7Smrg # We preserve .a as extension for shared libraries through AIX4.2 1422fe5e51b7Smrg # and later when we are not doing run time linking. 1423fe5e51b7Smrg library_names_spec='${libname}${release}.a $libname.a' 1424fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1425fe5e51b7Smrg fi 1426fe5e51b7Smrg shlibpath_var=LIBPATH 1427fe5e51b7Smrg fi 1428fe5e51b7Smrg ;; 1429fe5e51b7Smrg 1430fe5e51b7Smrgamigaos*) 1431643b027fSmrg library_names_spec='$libname.ixlibrary $libname.a' 1432643b027fSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 1433643b027fSmrg 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' 1434fe5e51b7Smrg ;; 1435fe5e51b7Smrg 1436fe5e51b7Smrgbeos*) 1437fe5e51b7Smrg library_names_spec='${libname}${shared_ext}' 1438fe5e51b7Smrg dynamic_linker="$host_os ld.so" 1439fe5e51b7Smrg shlibpath_var=LIBRARY_PATH 1440fe5e51b7Smrg ;; 1441fe5e51b7Smrg 1442fe5e51b7Smrgbsdi[[45]]*) 1443fe5e51b7Smrg version_type=linux 1444fe5e51b7Smrg need_version=no 1445fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1446fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1447fe5e51b7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 1448fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1449fe5e51b7Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 1450fe5e51b7Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 1451fe5e51b7Smrg # the default ld.so.conf also contains /usr/contrib/lib and 1452fe5e51b7Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 1453fe5e51b7Smrg # libtool to hard-code these into programs 1454fe5e51b7Smrg ;; 1455fe5e51b7Smrg 1456643b027fSmrgcygwin* | mingw* | pw32*) 1457fe5e51b7Smrg version_type=windows 1458fe5e51b7Smrg shrext_cmds=".dll" 1459fe5e51b7Smrg need_version=no 1460fe5e51b7Smrg need_lib_prefix=no 1461fe5e51b7Smrg 1462fe5e51b7Smrg case $GCC,$host_os in 1463643b027fSmrg yes,cygwin* | yes,mingw* | yes,pw32*) 1464fe5e51b7Smrg library_names_spec='$libname.dll.a' 1465fe5e51b7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 1466fe5e51b7Smrg postinstall_cmds='base_file=`basename \${file}`~ 1467643b027fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 1468fe5e51b7Smrg dldir=$destdir/`dirname \$dlpath`~ 1469fe5e51b7Smrg test -d \$dldir || mkdir -p \$dldir~ 1470fe5e51b7Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 1471643b027fSmrg chmod a+x \$dldir/$dlname' 1472fe5e51b7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 1473fe5e51b7Smrg dlpath=$dir/\$dldll~ 1474643b027fSmrg $rm \$dlpath' 1475fe5e51b7Smrg shlibpath_overrides_runpath=yes 1476fe5e51b7Smrg 1477fe5e51b7Smrg case $host_os in 1478fe5e51b7Smrg cygwin*) 1479fe5e51b7Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 1480fe5e51b7Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1481fe5e51b7Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 1482fe5e51b7Smrg ;; 1483643b027fSmrg mingw*) 1484fe5e51b7Smrg # MinGW DLLs use traditional 'lib' prefix 1485fe5e51b7Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1486643b027fSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1487643b027fSmrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 1488fe5e51b7Smrg # It is most probably a Windows format PATH printed by 1489fe5e51b7Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 1490fe5e51b7Smrg # path with ; separators, and with drive letters. We can handle the 1491fe5e51b7Smrg # drive letters (cygwin fileutils understands them), so leave them, 1492fe5e51b7Smrg # especially as we might pass files found there to a mingw objdump, 1493fe5e51b7Smrg # which wouldn't understand a cygwinified path. Ahh. 1494643b027fSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1495fe5e51b7Smrg else 1496643b027fSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1497fe5e51b7Smrg fi 1498fe5e51b7Smrg ;; 1499fe5e51b7Smrg pw32*) 1500fe5e51b7Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 1501fe5e51b7Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1502fe5e51b7Smrg ;; 1503fe5e51b7Smrg esac 1504fe5e51b7Smrg ;; 1505fe5e51b7Smrg 1506fe5e51b7Smrg *) 1507fe5e51b7Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 1508fe5e51b7Smrg ;; 1509fe5e51b7Smrg esac 1510fe5e51b7Smrg dynamic_linker='Win32 ld.exe' 1511fe5e51b7Smrg # FIXME: first we should search . and the directory the executable is in 1512fe5e51b7Smrg shlibpath_var=PATH 1513fe5e51b7Smrg ;; 1514fe5e51b7Smrg 1515fe5e51b7Smrgdarwin* | rhapsody*) 1516fe5e51b7Smrg dynamic_linker="$host_os dyld" 1517fe5e51b7Smrg version_type=darwin 1518fe5e51b7Smrg need_lib_prefix=no 1519fe5e51b7Smrg need_version=no 1520643b027fSmrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 1521fe5e51b7Smrg soname_spec='${libname}${release}${major}$shared_ext' 1522fe5e51b7Smrg shlibpath_overrides_runpath=yes 1523fe5e51b7Smrg shlibpath_var=DYLD_LIBRARY_PATH 1524fe5e51b7Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 1525643b027fSmrg m4_if([$1], [],[ 1526643b027fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 1527fe5e51b7Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 1528fe5e51b7Smrg ;; 1529fe5e51b7Smrg 1530fe5e51b7Smrgdgux*) 1531fe5e51b7Smrg version_type=linux 1532fe5e51b7Smrg need_lib_prefix=no 1533fe5e51b7Smrg need_version=no 1534fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 1535fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1536fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1537fe5e51b7Smrg ;; 1538fe5e51b7Smrg 1539fe5e51b7Smrgfreebsd1*) 1540fe5e51b7Smrg dynamic_linker=no 1541fe5e51b7Smrg ;; 1542fe5e51b7Smrg 1543fe5e51b7Smrgfreebsd* | dragonfly*) 1544fe5e51b7Smrg # DragonFly does not have aout. When/if they implement a new 1545fe5e51b7Smrg # versioning mechanism, adjust this. 1546fe5e51b7Smrg if test -x /usr/bin/objformat; then 1547fe5e51b7Smrg objformat=`/usr/bin/objformat` 1548fe5e51b7Smrg else 1549fe5e51b7Smrg case $host_os in 1550fe5e51b7Smrg freebsd[[123]]*) objformat=aout ;; 1551fe5e51b7Smrg *) objformat=elf ;; 1552fe5e51b7Smrg esac 1553fe5e51b7Smrg fi 1554fe5e51b7Smrg version_type=freebsd-$objformat 1555fe5e51b7Smrg case $version_type in 1556fe5e51b7Smrg freebsd-elf*) 1557fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1558fe5e51b7Smrg need_version=no 1559fe5e51b7Smrg need_lib_prefix=no 1560fe5e51b7Smrg ;; 1561fe5e51b7Smrg freebsd-*) 1562fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 1563fe5e51b7Smrg need_version=yes 1564fe5e51b7Smrg ;; 1565fe5e51b7Smrg esac 1566fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1567fe5e51b7Smrg case $host_os in 1568fe5e51b7Smrg freebsd2*) 1569fe5e51b7Smrg shlibpath_overrides_runpath=yes 1570fe5e51b7Smrg ;; 1571fe5e51b7Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 1572fe5e51b7Smrg shlibpath_overrides_runpath=yes 1573fe5e51b7Smrg hardcode_into_libs=yes 1574fe5e51b7Smrg ;; 1575fe5e51b7Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 1576fe5e51b7Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 1577fe5e51b7Smrg shlibpath_overrides_runpath=no 1578fe5e51b7Smrg hardcode_into_libs=yes 1579fe5e51b7Smrg ;; 1580fe5e51b7Smrg *) # from 4.6 on, and DragonFly 1581fe5e51b7Smrg shlibpath_overrides_runpath=yes 1582fe5e51b7Smrg hardcode_into_libs=yes 1583fe5e51b7Smrg ;; 1584fe5e51b7Smrg esac 1585fe5e51b7Smrg ;; 1586fe5e51b7Smrg 1587fe5e51b7Smrggnu*) 1588fe5e51b7Smrg version_type=linux 1589fe5e51b7Smrg need_lib_prefix=no 1590fe5e51b7Smrg need_version=no 1591fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 1592fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1593fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1594fe5e51b7Smrg hardcode_into_libs=yes 1595fe5e51b7Smrg ;; 1596fe5e51b7Smrg 1597fe5e51b7Smrghpux9* | hpux10* | hpux11*) 1598fe5e51b7Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 1599fe5e51b7Smrg # link against other versions. 1600fe5e51b7Smrg version_type=sunos 1601fe5e51b7Smrg need_lib_prefix=no 1602fe5e51b7Smrg need_version=no 1603fe5e51b7Smrg case $host_cpu in 1604fe5e51b7Smrg ia64*) 1605fe5e51b7Smrg shrext_cmds='.so' 1606fe5e51b7Smrg hardcode_into_libs=yes 1607fe5e51b7Smrg dynamic_linker="$host_os dld.so" 1608fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1609fe5e51b7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1610fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1611fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1612fe5e51b7Smrg if test "X$HPUX_IA64_MODE" = X32; then 1613fe5e51b7Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 1614fe5e51b7Smrg else 1615fe5e51b7Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 1616fe5e51b7Smrg fi 1617fe5e51b7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1618fe5e51b7Smrg ;; 1619643b027fSmrg hppa*64*) 1620643b027fSmrg shrext_cmds='.sl' 1621643b027fSmrg hardcode_into_libs=yes 1622643b027fSmrg dynamic_linker="$host_os dld.sl" 1623643b027fSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1624643b027fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1625643b027fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1626643b027fSmrg soname_spec='${libname}${release}${shared_ext}$major' 1627643b027fSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1628643b027fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1629643b027fSmrg ;; 1630643b027fSmrg *) 1631fe5e51b7Smrg shrext_cmds='.sl' 1632fe5e51b7Smrg dynamic_linker="$host_os dld.sl" 1633fe5e51b7Smrg shlibpath_var=SHLIB_PATH 1634fe5e51b7Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 1635fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1636fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1637fe5e51b7Smrg ;; 1638fe5e51b7Smrg esac 1639fe5e51b7Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 1640fe5e51b7Smrg postinstall_cmds='chmod 555 $lib' 1641fe5e51b7Smrg ;; 1642fe5e51b7Smrg 1643fe5e51b7Smrginterix[[3-9]]*) 1644fe5e51b7Smrg version_type=linux 1645fe5e51b7Smrg need_lib_prefix=no 1646fe5e51b7Smrg need_version=no 1647fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1648fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1649fe5e51b7Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 1650fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1651fe5e51b7Smrg shlibpath_overrides_runpath=no 1652fe5e51b7Smrg hardcode_into_libs=yes 1653fe5e51b7Smrg ;; 1654fe5e51b7Smrg 1655fe5e51b7Smrgirix5* | irix6* | nonstopux*) 1656fe5e51b7Smrg case $host_os in 1657fe5e51b7Smrg nonstopux*) version_type=nonstopux ;; 1658fe5e51b7Smrg *) 1659fe5e51b7Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 1660fe5e51b7Smrg version_type=linux 1661fe5e51b7Smrg else 1662fe5e51b7Smrg version_type=irix 1663fe5e51b7Smrg fi ;; 1664fe5e51b7Smrg esac 1665fe5e51b7Smrg need_lib_prefix=no 1666fe5e51b7Smrg need_version=no 1667fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1668fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 1669fe5e51b7Smrg case $host_os in 1670fe5e51b7Smrg irix5* | nonstopux*) 1671fe5e51b7Smrg libsuff= shlibsuff= 1672fe5e51b7Smrg ;; 1673fe5e51b7Smrg *) 1674fe5e51b7Smrg case $LD in # libtool.m4 will add one of these switches to LD 1675fe5e51b7Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 1676fe5e51b7Smrg libsuff= shlibsuff= libmagic=32-bit;; 1677fe5e51b7Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 1678fe5e51b7Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 1679fe5e51b7Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 1680fe5e51b7Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 1681fe5e51b7Smrg *) libsuff= shlibsuff= libmagic=never-match;; 1682fe5e51b7Smrg esac 1683fe5e51b7Smrg ;; 1684fe5e51b7Smrg esac 1685fe5e51b7Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 1686fe5e51b7Smrg shlibpath_overrides_runpath=no 1687fe5e51b7Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1688fe5e51b7Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1689fe5e51b7Smrg hardcode_into_libs=yes 1690fe5e51b7Smrg ;; 1691fe5e51b7Smrg 1692fe5e51b7Smrg# No shared lib support for Linux oldld, aout, or coff. 1693fe5e51b7Smrglinux*oldld* | linux*aout* | linux*coff*) 1694fe5e51b7Smrg dynamic_linker=no 1695fe5e51b7Smrg ;; 1696fe5e51b7Smrg 1697fe5e51b7Smrg# This must be Linux ELF. 1698fe5e51b7Smrglinux* | k*bsd*-gnu) 1699fe5e51b7Smrg version_type=linux 1700fe5e51b7Smrg need_lib_prefix=no 1701fe5e51b7Smrg need_version=no 1702fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1703fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1704fe5e51b7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 1705fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1706fe5e51b7Smrg shlibpath_overrides_runpath=no 1707fe5e51b7Smrg # This implies no fast_install, which is unacceptable. 1708fe5e51b7Smrg # Some rework will be needed to allow for fast_install 1709fe5e51b7Smrg # before this can be enabled. 1710fe5e51b7Smrg hardcode_into_libs=yes 1711643b027fSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1712643b027fSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1713eda3803bSmrg 1714fe5e51b7Smrg # Append ld.so.conf contents to the search path 1715fe5e51b7Smrg if test -f /etc/ld.so.conf; then 1716643b027fSmrg 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' ' '` 1717eda3803bSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 1718fe5e51b7Smrg fi 1719fe5e51b7Smrg 1720fe5e51b7Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 1721fe5e51b7Smrg # powerpc, because MkLinux only supported shared libraries with the 1722fe5e51b7Smrg # GNU dynamic linker. Since this was broken with cross compilers, 1723fe5e51b7Smrg # most powerpc-linux boxes support dynamic linking these days and 1724fe5e51b7Smrg # people can always --disable-shared, the test was removed, and we 1725fe5e51b7Smrg # assume the GNU/Linux dynamic linker is in use. 1726fe5e51b7Smrg dynamic_linker='GNU/Linux ld.so' 1727fe5e51b7Smrg ;; 1728fe5e51b7Smrg 1729fe5e51b7Smrgnetbsd*) 1730fe5e51b7Smrg version_type=sunos 1731fe5e51b7Smrg need_lib_prefix=no 1732fe5e51b7Smrg need_version=no 1733643b027fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 1734fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1735fe5e51b7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1736fe5e51b7Smrg dynamic_linker='NetBSD (a.out) ld.so' 1737fe5e51b7Smrg else 1738fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1739fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1740fe5e51b7Smrg dynamic_linker='NetBSD ld.elf_so' 1741fe5e51b7Smrg fi 1742fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1743fe5e51b7Smrg shlibpath_overrides_runpath=yes 1744fe5e51b7Smrg hardcode_into_libs=yes 1745fe5e51b7Smrg ;; 1746fe5e51b7Smrg 1747fe5e51b7Smrgnewsos6) 1748fe5e51b7Smrg version_type=linux 1749fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1750fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1751fe5e51b7Smrg shlibpath_overrides_runpath=yes 1752fe5e51b7Smrg ;; 1753fe5e51b7Smrg 1754643b027fSmrgnto-qnx*) 1755643b027fSmrg version_type=linux 1756fe5e51b7Smrg need_lib_prefix=no 1757fe5e51b7Smrg need_version=no 1758fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1759fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1760fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1761643b027fSmrg shlibpath_overrides_runpath=yes 1762fe5e51b7Smrg ;; 1763fe5e51b7Smrg 1764fe5e51b7Smrgopenbsd*) 1765fe5e51b7Smrg version_type=sunos 1766fe5e51b7Smrg sys_lib_dlsearch_path_spec="/usr/lib" 1767fe5e51b7Smrg need_lib_prefix=no 1768fe5e51b7Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 1769fe5e51b7Smrg case $host_os in 1770643b027fSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 1771643b027fSmrg *) need_version=no ;; 1772fe5e51b7Smrg esac 1773fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1774fe5e51b7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1775fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1776643b027fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 1777fe5e51b7Smrg case $host_os in 1778fe5e51b7Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 1779fe5e51b7Smrg shlibpath_overrides_runpath=no 1780fe5e51b7Smrg ;; 1781fe5e51b7Smrg *) 1782fe5e51b7Smrg shlibpath_overrides_runpath=yes 1783fe5e51b7Smrg ;; 1784fe5e51b7Smrg esac 1785fe5e51b7Smrg else 1786fe5e51b7Smrg shlibpath_overrides_runpath=yes 1787fe5e51b7Smrg fi 1788fe5e51b7Smrg ;; 1789fe5e51b7Smrg 1790fe5e51b7Smrgos2*) 1791fe5e51b7Smrg libname_spec='$name' 1792fe5e51b7Smrg shrext_cmds=".dll" 1793fe5e51b7Smrg need_lib_prefix=no 1794fe5e51b7Smrg library_names_spec='$libname${shared_ext} $libname.a' 1795fe5e51b7Smrg dynamic_linker='OS/2 ld.exe' 1796fe5e51b7Smrg shlibpath_var=LIBPATH 1797fe5e51b7Smrg ;; 1798fe5e51b7Smrg 1799fe5e51b7Smrgosf3* | osf4* | osf5*) 1800fe5e51b7Smrg version_type=osf 1801fe5e51b7Smrg need_lib_prefix=no 1802fe5e51b7Smrg need_version=no 1803fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1804fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1805fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1806fe5e51b7Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 1807fe5e51b7Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 1808fe5e51b7Smrg ;; 1809fe5e51b7Smrg 1810fe5e51b7Smrgrdos*) 1811fe5e51b7Smrg dynamic_linker=no 1812fe5e51b7Smrg ;; 1813fe5e51b7Smrg 1814fe5e51b7Smrgsolaris*) 1815fe5e51b7Smrg version_type=linux 1816fe5e51b7Smrg need_lib_prefix=no 1817fe5e51b7Smrg need_version=no 1818fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1819fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1820fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1821fe5e51b7Smrg shlibpath_overrides_runpath=yes 1822fe5e51b7Smrg hardcode_into_libs=yes 1823fe5e51b7Smrg # ldd complains unless libraries are executable 1824fe5e51b7Smrg postinstall_cmds='chmod +x $lib' 1825fe5e51b7Smrg ;; 1826fe5e51b7Smrg 1827fe5e51b7Smrgsunos4*) 1828fe5e51b7Smrg version_type=sunos 1829fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1830fe5e51b7Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 1831fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1832fe5e51b7Smrg shlibpath_overrides_runpath=yes 1833fe5e51b7Smrg if test "$with_gnu_ld" = yes; then 1834fe5e51b7Smrg need_lib_prefix=no 1835fe5e51b7Smrg fi 1836fe5e51b7Smrg need_version=yes 1837fe5e51b7Smrg ;; 1838fe5e51b7Smrg 1839fe5e51b7Smrgsysv4 | sysv4.3*) 1840fe5e51b7Smrg version_type=linux 1841fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1842fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1843fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1844fe5e51b7Smrg case $host_vendor in 1845fe5e51b7Smrg sni) 1846fe5e51b7Smrg shlibpath_overrides_runpath=no 1847fe5e51b7Smrg need_lib_prefix=no 1848643b027fSmrg export_dynamic_flag_spec='${wl}-Blargedynsym' 1849fe5e51b7Smrg runpath_var=LD_RUN_PATH 1850fe5e51b7Smrg ;; 1851fe5e51b7Smrg siemens) 1852fe5e51b7Smrg need_lib_prefix=no 1853fe5e51b7Smrg ;; 1854fe5e51b7Smrg motorola) 1855fe5e51b7Smrg need_lib_prefix=no 1856fe5e51b7Smrg need_version=no 1857fe5e51b7Smrg shlibpath_overrides_runpath=no 1858fe5e51b7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 1859fe5e51b7Smrg ;; 1860fe5e51b7Smrg esac 1861fe5e51b7Smrg ;; 1862fe5e51b7Smrg 1863fe5e51b7Smrgsysv4*MP*) 1864fe5e51b7Smrg if test -d /usr/nec ;then 1865fe5e51b7Smrg version_type=linux 1866fe5e51b7Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 1867fe5e51b7Smrg soname_spec='$libname${shared_ext}.$major' 1868fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1869fe5e51b7Smrg fi 1870fe5e51b7Smrg ;; 1871fe5e51b7Smrg 1872fe5e51b7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 1873fe5e51b7Smrg version_type=freebsd-elf 1874fe5e51b7Smrg need_lib_prefix=no 1875fe5e51b7Smrg need_version=no 1876fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1877fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 1878fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 1879fe5e51b7Smrg hardcode_into_libs=yes 1880fe5e51b7Smrg if test "$with_gnu_ld" = yes; then 1881fe5e51b7Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 1882643b027fSmrg shlibpath_overrides_runpath=no 1883fe5e51b7Smrg else 1884fe5e51b7Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 1885643b027fSmrg shlibpath_overrides_runpath=yes 1886fe5e51b7Smrg case $host_os in 1887fe5e51b7Smrg sco3.2v5*) 1888fe5e51b7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 1889fe5e51b7Smrg ;; 1890fe5e51b7Smrg esac 1891fe5e51b7Smrg fi 1892fe5e51b7Smrg sys_lib_dlsearch_path_spec='/usr/lib' 1893fe5e51b7Smrg ;; 1894fe5e51b7Smrg 1895eda3803bSmrguts4*) 1896eda3803bSmrg version_type=linux 1897eda3803bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1898eda3803bSmrg soname_spec='${libname}${release}${shared_ext}$major' 1899eda3803bSmrg shlibpath_var=LD_LIBRARY_PATH 1900eda3803bSmrg ;; 1901fe5e51b7Smrg 1902fe5e51b7Smrg*) 1903fe5e51b7Smrg dynamic_linker=no 1904fe5e51b7Smrg ;; 1905fe5e51b7Smrgesac 1906fe5e51b7SmrgAC_MSG_RESULT([$dynamic_linker]) 1907fe5e51b7Smrgtest "$dynamic_linker" = no && can_build_shared=no 1908fe5e51b7Smrg 1909643b027fSmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 1910643b027fSmrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 1911643b027fSmrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 1912643b027fSmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 1913643b027fSmrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 1914643b027fSmrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 1915643b027fSmrg 1916fe5e51b7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 1917fe5e51b7Smrgif test "$GCC" = yes; then 1918fe5e51b7Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 1919fe5e51b7Smrgfi 1920643b027fSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1921fe5e51b7Smrg 1922fe5e51b7Smrg 1923643b027fSmrg# _LT_AC_TAGCONFIG 1924643b027fSmrg# ---------------- 1925643b027fSmrgAC_DEFUN([_LT_AC_TAGCONFIG], 1926643b027fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 1927643b027fSmrgAC_ARG_WITH([tags], 1928643b027fSmrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 1929643b027fSmrg [include additional configurations @<:@automatic@:>@])], 1930643b027fSmrg [tagnames="$withval"]) 1931643b027fSmrg 1932643b027fSmrgif test -f "$ltmain" && test -n "$tagnames"; then 1933643b027fSmrg if test ! -f "${ofile}"; then 1934643b027fSmrg AC_MSG_WARN([output file `$ofile' does not exist]) 1935643b027fSmrg fi 1936643b027fSmrg 1937643b027fSmrg if test -z "$LTCC"; then 1938643b027fSmrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 1939643b027fSmrg if test -z "$LTCC"; then 1940643b027fSmrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 1941643b027fSmrg else 1942643b027fSmrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 1943643b027fSmrg fi 1944643b027fSmrg fi 1945643b027fSmrg if test -z "$LTCFLAGS"; then 1946643b027fSmrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 1947643b027fSmrg fi 1948643b027fSmrg 1949643b027fSmrg # Extract list of available tagged configurations in $ofile. 1950643b027fSmrg # Note that this assumes the entire list is on one line. 1951643b027fSmrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 1952643b027fSmrg 1953643b027fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1954643b027fSmrg for tagname in $tagnames; do 1955643b027fSmrg IFS="$lt_save_ifs" 1956643b027fSmrg # Check whether tagname contains only valid characters 1957643b027fSmrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 1958643b027fSmrg "") ;; 1959643b027fSmrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 1960643b027fSmrg ;; 1961643b027fSmrg esac 1962643b027fSmrg 1963643b027fSmrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 1964643b027fSmrg then 1965643b027fSmrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 1966643b027fSmrg fi 1967643b027fSmrg 1968643b027fSmrg # Update the list of available tags. 1969643b027fSmrg if test -n "$tagname"; then 1970643b027fSmrg echo appending configuration tag \"$tagname\" to $ofile 1971643b027fSmrg 1972643b027fSmrg case $tagname in 1973643b027fSmrg CXX) 1974643b027fSmrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 1975643b027fSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 1976643b027fSmrg (test "X$CXX" != "Xg++"))) ; then 1977643b027fSmrg AC_LIBTOOL_LANG_CXX_CONFIG 1978643b027fSmrg else 1979643b027fSmrg tagname="" 1980643b027fSmrg fi 1981643b027fSmrg ;; 1982643b027fSmrg 1983643b027fSmrg F77) 1984643b027fSmrg if test -n "$F77" && test "X$F77" != "Xno"; then 1985643b027fSmrg AC_LIBTOOL_LANG_F77_CONFIG 1986643b027fSmrg else 1987643b027fSmrg tagname="" 1988643b027fSmrg fi 1989643b027fSmrg ;; 1990643b027fSmrg 1991643b027fSmrg GCJ) 1992643b027fSmrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 1993643b027fSmrg AC_LIBTOOL_LANG_GCJ_CONFIG 1994643b027fSmrg else 1995643b027fSmrg tagname="" 1996643b027fSmrg fi 1997643b027fSmrg ;; 1998643b027fSmrg 1999643b027fSmrg RC) 2000643b027fSmrg AC_LIBTOOL_LANG_RC_CONFIG 2001643b027fSmrg ;; 2002643b027fSmrg 2003643b027fSmrg *) 2004643b027fSmrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 2005643b027fSmrg ;; 2006643b027fSmrg esac 2007643b027fSmrg 2008643b027fSmrg # Append the new tag name to the list of available tags. 2009643b027fSmrg if test -n "$tagname" ; then 2010643b027fSmrg available_tags="$available_tags $tagname" 2011643b027fSmrg fi 2012643b027fSmrg fi 2013643b027fSmrg done 2014643b027fSmrg IFS="$lt_save_ifs" 2015643b027fSmrg 2016643b027fSmrg # Now substitute the updated list of available tags. 2017643b027fSmrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 2018643b027fSmrg mv "${ofile}T" "$ofile" 2019643b027fSmrg chmod +x "$ofile" 2020643b027fSmrg else 2021643b027fSmrg rm -f "${ofile}T" 2022643b027fSmrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 2023643b027fSmrg fi 2024643b027fSmrgfi 2025643b027fSmrg])# _LT_AC_TAGCONFIG 2026643b027fSmrg 2027643b027fSmrg 2028643b027fSmrg# AC_LIBTOOL_DLOPEN 2029643b027fSmrg# ----------------- 2030643b027fSmrg# enable checks for dlopen support 2031643b027fSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 2032643b027fSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 2033643b027fSmrg])# AC_LIBTOOL_DLOPEN 2034643b027fSmrg 2035643b027fSmrg 2036643b027fSmrg# AC_LIBTOOL_WIN32_DLL 2037643b027fSmrg# -------------------- 2038643b027fSmrg# declare package support for building win32 DLLs 2039643b027fSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 2040643b027fSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 2041643b027fSmrg])# AC_LIBTOOL_WIN32_DLL 2042643b027fSmrg 2043643b027fSmrg 2044643b027fSmrg# AC_ENABLE_SHARED([DEFAULT]) 2045643b027fSmrg# --------------------------- 2046643b027fSmrg# implement the --enable-shared flag 2047643b027fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2048643b027fSmrgAC_DEFUN([AC_ENABLE_SHARED], 2049643b027fSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 2050643b027fSmrgAC_ARG_ENABLE([shared], 2051643b027fSmrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 2052643b027fSmrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 2053643b027fSmrg [p=${PACKAGE-default} 2054643b027fSmrg case $enableval in 2055643b027fSmrg yes) enable_shared=yes ;; 2056643b027fSmrg no) enable_shared=no ;; 2057643b027fSmrg *) 2058643b027fSmrg enable_shared=no 2059643b027fSmrg # Look at the argument we got. We use all the common list separators. 2060643b027fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2061643b027fSmrg for pkg in $enableval; do 2062643b027fSmrg IFS="$lt_save_ifs" 2063643b027fSmrg if test "X$pkg" = "X$p"; then 2064643b027fSmrg enable_shared=yes 2065643b027fSmrg fi 2066643b027fSmrg done 2067643b027fSmrg IFS="$lt_save_ifs" 2068643b027fSmrg ;; 2069643b027fSmrg esac], 2070643b027fSmrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 2071643b027fSmrg])# AC_ENABLE_SHARED 2072643b027fSmrg 2073643b027fSmrg 2074643b027fSmrg# AC_DISABLE_SHARED 2075643b027fSmrg# ----------------- 2076643b027fSmrg# set the default shared flag to --disable-shared 2077643b027fSmrgAC_DEFUN([AC_DISABLE_SHARED], 2078643b027fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2079643b027fSmrgAC_ENABLE_SHARED(no) 2080643b027fSmrg])# AC_DISABLE_SHARED 2081643b027fSmrg 2082643b027fSmrg 2083643b027fSmrg# AC_ENABLE_STATIC([DEFAULT]) 2084643b027fSmrg# --------------------------- 2085643b027fSmrg# implement the --enable-static flag 2086643b027fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2087643b027fSmrgAC_DEFUN([AC_ENABLE_STATIC], 2088643b027fSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 2089643b027fSmrgAC_ARG_ENABLE([static], 2090643b027fSmrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 2091643b027fSmrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 2092643b027fSmrg [p=${PACKAGE-default} 2093643b027fSmrg case $enableval in 2094643b027fSmrg yes) enable_static=yes ;; 2095643b027fSmrg no) enable_static=no ;; 2096643b027fSmrg *) 2097643b027fSmrg enable_static=no 2098643b027fSmrg # Look at the argument we got. We use all the common list separators. 2099643b027fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2100643b027fSmrg for pkg in $enableval; do 2101643b027fSmrg IFS="$lt_save_ifs" 2102643b027fSmrg if test "X$pkg" = "X$p"; then 2103643b027fSmrg enable_static=yes 2104643b027fSmrg fi 2105643b027fSmrg done 2106643b027fSmrg IFS="$lt_save_ifs" 2107643b027fSmrg ;; 2108643b027fSmrg esac], 2109643b027fSmrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 2110643b027fSmrg])# AC_ENABLE_STATIC 2111643b027fSmrg 2112643b027fSmrg 2113643b027fSmrg# AC_DISABLE_STATIC 2114643b027fSmrg# ----------------- 2115643b027fSmrg# set the default static flag to --disable-static 2116643b027fSmrgAC_DEFUN([AC_DISABLE_STATIC], 2117643b027fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2118643b027fSmrgAC_ENABLE_STATIC(no) 2119643b027fSmrg])# AC_DISABLE_STATIC 2120643b027fSmrg 2121643b027fSmrg 2122643b027fSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 2123643b027fSmrg# --------------------------------- 2124643b027fSmrg# implement the --enable-fast-install flag 2125643b027fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2126643b027fSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 2127643b027fSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2128643b027fSmrgAC_ARG_ENABLE([fast-install], 2129643b027fSmrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2130643b027fSmrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2131643b027fSmrg [p=${PACKAGE-default} 2132643b027fSmrg case $enableval in 2133643b027fSmrg yes) enable_fast_install=yes ;; 2134643b027fSmrg no) enable_fast_install=no ;; 2135643b027fSmrg *) 2136643b027fSmrg enable_fast_install=no 2137643b027fSmrg # Look at the argument we got. We use all the common list separators. 2138643b027fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2139643b027fSmrg for pkg in $enableval; do 2140643b027fSmrg IFS="$lt_save_ifs" 2141643b027fSmrg if test "X$pkg" = "X$p"; then 2142643b027fSmrg enable_fast_install=yes 2143643b027fSmrg fi 2144643b027fSmrg done 2145643b027fSmrg IFS="$lt_save_ifs" 2146643b027fSmrg ;; 2147643b027fSmrg esac], 2148643b027fSmrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 2149643b027fSmrg])# AC_ENABLE_FAST_INSTALL 2150643b027fSmrg 2151643b027fSmrg 2152643b027fSmrg# AC_DISABLE_FAST_INSTALL 2153643b027fSmrg# ----------------------- 2154643b027fSmrg# set the default to --disable-fast-install 2155643b027fSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 2156643b027fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2157643b027fSmrgAC_ENABLE_FAST_INSTALL(no) 2158643b027fSmrg])# AC_DISABLE_FAST_INSTALL 2159643b027fSmrg 2160643b027fSmrg 2161643b027fSmrg# AC_LIBTOOL_PICMODE([MODE]) 2162643b027fSmrg# -------------------------- 2163643b027fSmrg# implement the --with-pic flag 2164643b027fSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 2165643b027fSmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 2166643b027fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2167643b027fSmrgpic_mode=ifelse($#,1,$1,default) 2168643b027fSmrg])# AC_LIBTOOL_PICMODE 2169643b027fSmrg 2170643b027fSmrg 2171643b027fSmrg# AC_PROG_EGREP 2172643b027fSmrg# ------------- 2173643b027fSmrg# This is predefined starting with Autoconf 2.54, so this conditional 2174643b027fSmrg# definition can be removed once we require Autoconf 2.54 or later. 2175643b027fSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 2176643b027fSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 2177643b027fSmrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 2178643b027fSmrg then ac_cv_prog_egrep='grep -E' 2179643b027fSmrg else ac_cv_prog_egrep='egrep' 2180643b027fSmrg fi]) 2181643b027fSmrg EGREP=$ac_cv_prog_egrep 2182643b027fSmrg AC_SUBST([EGREP]) 2183643b027fSmrg])]) 2184643b027fSmrg 2185643b027fSmrg 2186643b027fSmrg# AC_PATH_TOOL_PREFIX 2187643b027fSmrg# ------------------- 2188643b027fSmrg# find a file program which can recognize shared library 2189643b027fSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 2190643b027fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2191643b027fSmrgAC_MSG_CHECKING([for $1]) 2192643b027fSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2193643b027fSmrg[case $MAGIC_CMD in 2194fe5e51b7Smrg[[\\/*] | ?:[\\/]*]) 2195fe5e51b7Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2196fe5e51b7Smrg ;; 2197fe5e51b7Smrg*) 2198fe5e51b7Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2199fe5e51b7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2200fe5e51b7Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2201fe5e51b7Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2202fe5e51b7Smrgdnl not every word. This closes a longstanding sh security hole. 2203643b027fSmrg ac_dummy="ifelse([$2], , $PATH, [$2])" 2204fe5e51b7Smrg for ac_dir in $ac_dummy; do 2205fe5e51b7Smrg IFS="$lt_save_ifs" 2206fe5e51b7Smrg test -z "$ac_dir" && ac_dir=. 2207fe5e51b7Smrg if test -f $ac_dir/$1; then 2208fe5e51b7Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2209fe5e51b7Smrg if test -n "$file_magic_test_file"; then 2210fe5e51b7Smrg case $deplibs_check_method in 2211fe5e51b7Smrg "file_magic "*) 2212fe5e51b7Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2213fe5e51b7Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2214fe5e51b7Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2215fe5e51b7Smrg $EGREP "$file_magic_regex" > /dev/null; then 2216fe5e51b7Smrg : 2217fe5e51b7Smrg else 2218643b027fSmrg cat <<EOF 1>&2 2219fe5e51b7Smrg 2220fe5e51b7Smrg*** Warning: the command libtool uses to detect shared libraries, 2221fe5e51b7Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2222fe5e51b7Smrg*** The result is that libtool may fail to recognize shared libraries 2223fe5e51b7Smrg*** as such. This will affect the creation of libtool libraries that 2224fe5e51b7Smrg*** depend on shared libraries, but programs linked with such libtool 2225fe5e51b7Smrg*** libraries will work regardless of this problem. Nevertheless, you 2226fe5e51b7Smrg*** may want to report the problem to your system manager and/or to 2227fe5e51b7Smrg*** bug-libtool@gnu.org 2228fe5e51b7Smrg 2229643b027fSmrgEOF 2230fe5e51b7Smrg fi ;; 2231fe5e51b7Smrg esac 2232fe5e51b7Smrg fi 2233fe5e51b7Smrg break 2234fe5e51b7Smrg fi 2235fe5e51b7Smrg done 2236fe5e51b7Smrg IFS="$lt_save_ifs" 2237fe5e51b7Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2238fe5e51b7Smrg ;; 2239fe5e51b7Smrgesac]) 2240fe5e51b7SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2241fe5e51b7Smrgif test -n "$MAGIC_CMD"; then 2242fe5e51b7Smrg AC_MSG_RESULT($MAGIC_CMD) 2243fe5e51b7Smrgelse 2244fe5e51b7Smrg AC_MSG_RESULT(no) 2245fe5e51b7Smrgfi 2246643b027fSmrg])# AC_PATH_TOOL_PREFIX 2247fe5e51b7Smrg 2248eda3803bSmrg 2249643b027fSmrg# AC_PATH_MAGIC 2250643b027fSmrg# ------------- 2251fe5e51b7Smrg# find a file program which can recognize a shared library 2252643b027fSmrgAC_DEFUN([AC_PATH_MAGIC], 2253643b027fSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2254fe5e51b7Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 2255fe5e51b7Smrg if test -n "$ac_tool_prefix"; then 2256643b027fSmrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2257fe5e51b7Smrg else 2258fe5e51b7Smrg MAGIC_CMD=: 2259fe5e51b7Smrg fi 2260fe5e51b7Smrgfi 2261643b027fSmrg])# AC_PATH_MAGIC 2262fe5e51b7Smrg 2263fe5e51b7Smrg 2264643b027fSmrg# AC_PROG_LD 2265fe5e51b7Smrg# ---------- 2266fe5e51b7Smrg# find the pathname to the GNU or non-GNU linker 2267643b027fSmrgAC_DEFUN([AC_PROG_LD], 2268643b027fSmrg[AC_ARG_WITH([gnu-ld], 2269643b027fSmrg [AC_HELP_STRING([--with-gnu-ld], 2270eda3803bSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2271eda3803bSmrg [test "$withval" = no || with_gnu_ld=yes], 2272643b027fSmrg [with_gnu_ld=no]) 2273643b027fSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 2274643b027fSmrgAC_REQUIRE([AC_PROG_CC])dnl 2275643b027fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2276643b027fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2277fe5e51b7Smrgac_prog=ld 2278fe5e51b7Smrgif test "$GCC" = yes; then 2279fe5e51b7Smrg # Check if gcc -print-prog-name=ld gives a path. 2280fe5e51b7Smrg AC_MSG_CHECKING([for ld used by $CC]) 2281fe5e51b7Smrg case $host in 2282fe5e51b7Smrg *-*-mingw*) 2283fe5e51b7Smrg # gcc leaves a trailing carriage return which upsets mingw 2284fe5e51b7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2285fe5e51b7Smrg *) 2286fe5e51b7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2287fe5e51b7Smrg esac 2288fe5e51b7Smrg case $ac_prog in 2289fe5e51b7Smrg # Accept absolute paths. 2290fe5e51b7Smrg [[\\/]]* | ?:[[\\/]]*) 2291fe5e51b7Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 2292fe5e51b7Smrg # Canonicalize the pathname of ld 2293643b027fSmrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2294643b027fSmrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2295643b027fSmrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 2296fe5e51b7Smrg done 2297fe5e51b7Smrg test -z "$LD" && LD="$ac_prog" 2298fe5e51b7Smrg ;; 2299fe5e51b7Smrg "") 2300fe5e51b7Smrg # If it fails, then pretend we aren't using GCC. 2301fe5e51b7Smrg ac_prog=ld 2302fe5e51b7Smrg ;; 2303fe5e51b7Smrg *) 2304fe5e51b7Smrg # If it is relative, then search for the first ld in PATH. 2305fe5e51b7Smrg with_gnu_ld=unknown 2306fe5e51b7Smrg ;; 2307fe5e51b7Smrg esac 2308fe5e51b7Smrgelif test "$with_gnu_ld" = yes; then 2309fe5e51b7Smrg AC_MSG_CHECKING([for GNU ld]) 2310fe5e51b7Smrgelse 2311fe5e51b7Smrg AC_MSG_CHECKING([for non-GNU ld]) 2312fe5e51b7Smrgfi 2313fe5e51b7SmrgAC_CACHE_VAL(lt_cv_path_LD, 2314fe5e51b7Smrg[if test -z "$LD"; then 2315fe5e51b7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2316fe5e51b7Smrg for ac_dir in $PATH; do 2317fe5e51b7Smrg IFS="$lt_save_ifs" 2318fe5e51b7Smrg test -z "$ac_dir" && ac_dir=. 2319fe5e51b7Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2320fe5e51b7Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 2321fe5e51b7Smrg # Check to see if the program is GNU ld. I'd rather use --version, 2322fe5e51b7Smrg # but apparently some variants of GNU ld only accept -v. 2323fe5e51b7Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 2324fe5e51b7Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2325fe5e51b7Smrg *GNU* | *'with BFD'*) 2326fe5e51b7Smrg test "$with_gnu_ld" != no && break 2327fe5e51b7Smrg ;; 2328fe5e51b7Smrg *) 2329fe5e51b7Smrg test "$with_gnu_ld" != yes && break 2330fe5e51b7Smrg ;; 2331fe5e51b7Smrg esac 2332fe5e51b7Smrg fi 2333fe5e51b7Smrg done 2334fe5e51b7Smrg IFS="$lt_save_ifs" 2335fe5e51b7Smrgelse 2336fe5e51b7Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 2337fe5e51b7Smrgfi]) 2338fe5e51b7SmrgLD="$lt_cv_path_LD" 2339fe5e51b7Smrgif test -n "$LD"; then 2340fe5e51b7Smrg AC_MSG_RESULT($LD) 2341fe5e51b7Smrgelse 2342fe5e51b7Smrg AC_MSG_RESULT(no) 2343fe5e51b7Smrgfi 2344fe5e51b7Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2345643b027fSmrgAC_PROG_LD_GNU 2346643b027fSmrg])# AC_PROG_LD 2347fe5e51b7Smrg 2348fe5e51b7Smrg 2349643b027fSmrg# AC_PROG_LD_GNU 2350643b027fSmrg# -------------- 2351643b027fSmrgAC_DEFUN([AC_PROG_LD_GNU], 2352643b027fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 2353643b027fSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2354fe5e51b7Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2355fe5e51b7Smrgcase `$LD -v 2>&1 </dev/null` in 2356fe5e51b7Smrg*GNU* | *'with BFD'*) 2357fe5e51b7Smrg lt_cv_prog_gnu_ld=yes 2358fe5e51b7Smrg ;; 2359fe5e51b7Smrg*) 2360fe5e51b7Smrg lt_cv_prog_gnu_ld=no 2361fe5e51b7Smrg ;; 2362fe5e51b7Smrgesac]) 2363fe5e51b7Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2364643b027fSmrg])# AC_PROG_LD_GNU 2365fe5e51b7Smrg 2366fe5e51b7Smrg 2367643b027fSmrg# AC_PROG_LD_RELOAD_FLAG 2368643b027fSmrg# ---------------------- 2369fe5e51b7Smrg# find reload flag for linker 2370fe5e51b7Smrg# -- PORTME Some linkers may need a different reload flag. 2371643b027fSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 2372fe5e51b7Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 2373fe5e51b7Smrg lt_cv_ld_reload_flag, 2374fe5e51b7Smrg [lt_cv_ld_reload_flag='-r']) 2375fe5e51b7Smrgreload_flag=$lt_cv_ld_reload_flag 2376fe5e51b7Smrgcase $reload_flag in 2377fe5e51b7Smrg"" | " "*) ;; 2378fe5e51b7Smrg*) reload_flag=" $reload_flag" ;; 2379fe5e51b7Smrgesac 2380fe5e51b7Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 2381fe5e51b7Smrgcase $host_os in 2382fe5e51b7Smrg darwin*) 2383fe5e51b7Smrg if test "$GCC" = yes; then 2384fe5e51b7Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2385fe5e51b7Smrg else 2386fe5e51b7Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 2387fe5e51b7Smrg fi 2388fe5e51b7Smrg ;; 2389fe5e51b7Smrgesac 2390643b027fSmrg])# AC_PROG_LD_RELOAD_FLAG 2391fe5e51b7Smrg 2392fe5e51b7Smrg 2393643b027fSmrg# AC_DEPLIBS_CHECK_METHOD 2394643b027fSmrg# ----------------------- 2395fe5e51b7Smrg# how to check for library dependencies 2396fe5e51b7Smrg# -- PORTME fill in with the dynamic library characteristics 2397643b027fSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2398643b027fSmrg[AC_CACHE_CHECK([how to recognize dependent libraries], 2399fe5e51b7Smrglt_cv_deplibs_check_method, 2400fe5e51b7Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 2401fe5e51b7Smrglt_cv_file_magic_test_file= 2402fe5e51b7Smrglt_cv_deplibs_check_method='unknown' 2403fe5e51b7Smrg# Need to set the preceding variable on all platforms that support 2404fe5e51b7Smrg# interlibrary dependencies. 2405fe5e51b7Smrg# 'none' -- dependencies not supported. 2406fe5e51b7Smrg# `unknown' -- same as none, but documents that we really don't know. 2407fe5e51b7Smrg# 'pass_all' -- all dependencies passed with no checks. 2408fe5e51b7Smrg# 'test_compile' -- check by making test program. 2409fe5e51b7Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 2410fe5e51b7Smrg# which responds to the $file_magic_cmd with a given extended regex. 2411fe5e51b7Smrg# If you have `file' or equivalent on your system and you're not sure 2412fe5e51b7Smrg# whether `pass_all' will *always* work, you probably want this one. 2413fe5e51b7Smrg 2414fe5e51b7Smrgcase $host_os in 2415eda3803bSmrgaix[[4-9]]*) 2416fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 2417fe5e51b7Smrg ;; 2418fe5e51b7Smrg 2419fe5e51b7Smrgbeos*) 2420fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 2421fe5e51b7Smrg ;; 2422fe5e51b7Smrg 2423fe5e51b7Smrgbsdi[[45]]*) 2424fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 2425fe5e51b7Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 2426fe5e51b7Smrg lt_cv_file_magic_test_file=/shlib/libc.so 2427fe5e51b7Smrg ;; 2428fe5e51b7Smrg 2429fe5e51b7Smrgcygwin*) 2430fe5e51b7Smrg # func_win32_libid is a shell function defined in ltmain.sh 2431fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2432fe5e51b7Smrg lt_cv_file_magic_cmd='func_win32_libid' 2433fe5e51b7Smrg ;; 2434fe5e51b7Smrg 2435fe5e51b7Smrgmingw* | pw32*) 2436fe5e51b7Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 2437fe5e51b7Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 2438fe5e51b7Smrg # unless we find 'file', for example because we are cross-compiling. 2439fe5e51b7Smrg if ( file / ) >/dev/null 2>&1; then 2440fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2441fe5e51b7Smrg lt_cv_file_magic_cmd='func_win32_libid' 2442fe5e51b7Smrg else 2443fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 2444fe5e51b7Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 2445fe5e51b7Smrg fi 2446fe5e51b7Smrg ;; 2447fe5e51b7Smrg 2448fe5e51b7Smrgdarwin* | rhapsody*) 2449fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 2450fe5e51b7Smrg ;; 2451fe5e51b7Smrg 2452fe5e51b7Smrgfreebsd* | dragonfly*) 2453643b027fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2454fe5e51b7Smrg case $host_cpu in 2455fe5e51b7Smrg i*86 ) 2456fe5e51b7Smrg # Not sure whether the presence of OpenBSD here was a mistake. 2457fe5e51b7Smrg # Let's accept both of them until this is cleared up. 2458fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 2459fe5e51b7Smrg lt_cv_file_magic_cmd=/usr/bin/file 2460fe5e51b7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2461fe5e51b7Smrg ;; 2462fe5e51b7Smrg esac 2463fe5e51b7Smrg else 2464fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 2465fe5e51b7Smrg fi 2466fe5e51b7Smrg ;; 2467fe5e51b7Smrg 2468fe5e51b7Smrggnu*) 2469fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 2470fe5e51b7Smrg ;; 2471fe5e51b7Smrg 2472fe5e51b7Smrghpux10.20* | hpux11*) 2473fe5e51b7Smrg lt_cv_file_magic_cmd=/usr/bin/file 2474fe5e51b7Smrg case $host_cpu in 2475fe5e51b7Smrg ia64*) 2476fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 2477fe5e51b7Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 2478fe5e51b7Smrg ;; 2479fe5e51b7Smrg hppa*64*) 2480fe5e51b7Smrg [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]'] 2481fe5e51b7Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 2482fe5e51b7Smrg ;; 2483fe5e51b7Smrg *) 2484fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 2485fe5e51b7Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 2486fe5e51b7Smrg ;; 2487fe5e51b7Smrg esac 2488fe5e51b7Smrg ;; 2489fe5e51b7Smrg 2490fe5e51b7Smrginterix[[3-9]]*) 2491fe5e51b7Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 2492fe5e51b7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 2493fe5e51b7Smrg ;; 2494fe5e51b7Smrg 2495fe5e51b7Smrgirix5* | irix6* | nonstopux*) 2496fe5e51b7Smrg case $LD in 2497fe5e51b7Smrg *-32|*"-32 ") libmagic=32-bit;; 2498fe5e51b7Smrg *-n32|*"-n32 ") libmagic=N32;; 2499fe5e51b7Smrg *-64|*"-64 ") libmagic=64-bit;; 2500fe5e51b7Smrg *) libmagic=never-match;; 2501fe5e51b7Smrg esac 2502fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 2503fe5e51b7Smrg ;; 2504fe5e51b7Smrg 2505fe5e51b7Smrg# This must be Linux ELF. 2506fe5e51b7Smrglinux* | k*bsd*-gnu) 2507fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 2508fe5e51b7Smrg ;; 2509fe5e51b7Smrg 2510fe5e51b7Smrgnetbsd*) 2511643b027fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2512fe5e51b7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2513fe5e51b7Smrg else 2514fe5e51b7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 2515fe5e51b7Smrg fi 2516fe5e51b7Smrg ;; 2517fe5e51b7Smrg 2518fe5e51b7Smrgnewos6*) 2519fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 2520fe5e51b7Smrg lt_cv_file_magic_cmd=/usr/bin/file 2521fe5e51b7Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 2522fe5e51b7Smrg ;; 2523fe5e51b7Smrg 2524643b027fSmrgnto-qnx*) 2525643b027fSmrg lt_cv_deplibs_check_method=unknown 2526fe5e51b7Smrg ;; 2527fe5e51b7Smrg 2528fe5e51b7Smrgopenbsd*) 2529643b027fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2530fe5e51b7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 2531fe5e51b7Smrg else 2532fe5e51b7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2533fe5e51b7Smrg fi 2534fe5e51b7Smrg ;; 2535fe5e51b7Smrg 2536fe5e51b7Smrgosf3* | osf4* | osf5*) 2537fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 2538fe5e51b7Smrg ;; 2539fe5e51b7Smrg 2540fe5e51b7Smrgrdos*) 2541fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 2542fe5e51b7Smrg ;; 2543fe5e51b7Smrg 2544fe5e51b7Smrgsolaris*) 2545fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 2546fe5e51b7Smrg ;; 2547fe5e51b7Smrg 2548fe5e51b7Smrgsysv4 | sysv4.3*) 2549fe5e51b7Smrg case $host_vendor in 2550fe5e51b7Smrg motorola) 2551fe5e51b7Smrg 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]]' 2552fe5e51b7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 2553fe5e51b7Smrg ;; 2554fe5e51b7Smrg ncr) 2555fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 2556fe5e51b7Smrg ;; 2557fe5e51b7Smrg sequent) 2558fe5e51b7Smrg lt_cv_file_magic_cmd='/bin/file' 2559fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 2560fe5e51b7Smrg ;; 2561fe5e51b7Smrg sni) 2562fe5e51b7Smrg lt_cv_file_magic_cmd='/bin/file' 2563fe5e51b7Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 2564fe5e51b7Smrg lt_cv_file_magic_test_file=/lib/libc.so 2565fe5e51b7Smrg ;; 2566fe5e51b7Smrg siemens) 2567fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 2568fe5e51b7Smrg ;; 2569fe5e51b7Smrg pc) 2570fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 2571fe5e51b7Smrg ;; 2572fe5e51b7Smrg esac 2573fe5e51b7Smrg ;; 2574fe5e51b7Smrg 2575643b027fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2576fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 2577fe5e51b7Smrg ;; 2578fe5e51b7Smrgesac 2579fe5e51b7Smrg]) 2580fe5e51b7Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 2581fe5e51b7Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 2582fe5e51b7Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 2583643b027fSmrg])# AC_DEPLIBS_CHECK_METHOD 2584eda3803bSmrg 2585fe5e51b7Smrg 2586643b027fSmrg# AC_PROG_NM 2587fe5e51b7Smrg# ---------- 2588643b027fSmrg# find the pathname to a BSD-compatible name lister 2589643b027fSmrgAC_DEFUN([AC_PROG_NM], 2590643b027fSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 2591fe5e51b7Smrg[if test -n "$NM"; then 2592fe5e51b7Smrg # Let the user override the test. 2593fe5e51b7Smrg lt_cv_path_NM="$NM" 2594fe5e51b7Smrgelse 2595fe5e51b7Smrg lt_nm_to_check="${ac_tool_prefix}nm" 2596fe5e51b7Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 2597fe5e51b7Smrg lt_nm_to_check="$lt_nm_to_check nm" 2598fe5e51b7Smrg fi 2599fe5e51b7Smrg for lt_tmp_nm in $lt_nm_to_check; do 2600fe5e51b7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2601fe5e51b7Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 2602fe5e51b7Smrg IFS="$lt_save_ifs" 2603fe5e51b7Smrg test -z "$ac_dir" && ac_dir=. 2604fe5e51b7Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 2605fe5e51b7Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 2606fe5e51b7Smrg # Check to see if the nm accepts a BSD-compat flag. 2607fe5e51b7Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 2608fe5e51b7Smrg # nm: unknown option "B" ignored 2609fe5e51b7Smrg # Tru64's nm complains that /dev/null is an invalid object file 2610fe5e51b7Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 2611fe5e51b7Smrg */dev/null* | *'Invalid file or object type'*) 2612fe5e51b7Smrg lt_cv_path_NM="$tmp_nm -B" 2613fe5e51b7Smrg break 2614fe5e51b7Smrg ;; 2615fe5e51b7Smrg *) 2616fe5e51b7Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 2617fe5e51b7Smrg */dev/null*) 2618fe5e51b7Smrg lt_cv_path_NM="$tmp_nm -p" 2619fe5e51b7Smrg break 2620fe5e51b7Smrg ;; 2621fe5e51b7Smrg *) 2622fe5e51b7Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 2623fe5e51b7Smrg continue # so that we can try to find one that supports BSD flags 2624fe5e51b7Smrg ;; 2625fe5e51b7Smrg esac 2626fe5e51b7Smrg ;; 2627fe5e51b7Smrg esac 2628fe5e51b7Smrg fi 2629fe5e51b7Smrg done 2630fe5e51b7Smrg IFS="$lt_save_ifs" 2631fe5e51b7Smrg done 2632643b027fSmrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 2633fe5e51b7Smrgfi]) 2634643b027fSmrgNM="$lt_cv_path_NM" 2635643b027fSmrg])# AC_PROG_NM 2636fe5e51b7Smrg 2637eda3803bSmrg 2638643b027fSmrg# AC_CHECK_LIBM 2639643b027fSmrg# ------------- 2640fe5e51b7Smrg# check for math library 2641643b027fSmrgAC_DEFUN([AC_CHECK_LIBM], 2642fe5e51b7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2643fe5e51b7SmrgLIBM= 2644fe5e51b7Smrgcase $host in 2645fe5e51b7Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 2646fe5e51b7Smrg # These system don't have libm, or don't need it 2647fe5e51b7Smrg ;; 2648fe5e51b7Smrg*-ncr-sysv4.3*) 2649fe5e51b7Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 2650fe5e51b7Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 2651fe5e51b7Smrg ;; 2652fe5e51b7Smrg*) 2653fe5e51b7Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 2654fe5e51b7Smrg ;; 2655fe5e51b7Smrgesac 2656643b027fSmrg])# AC_CHECK_LIBM 2657fe5e51b7Smrg 2658fe5e51b7Smrg 2659643b027fSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 2660643b027fSmrg# ----------------------------------- 2661643b027fSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and 2662643b027fSmrg# LTDLINCL to the include flags for the libltdl header and adds 2663643b027fSmrg# --enable-ltdl-convenience to the configure arguments. Note that 2664643b027fSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2665643b027fSmrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 2666643b027fSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 2667643b027fSmrg# (note the single quotes!). If your package is not flat and you're not 2668643b027fSmrg# using automake, define top_builddir and top_srcdir appropriately in 2669643b027fSmrg# the Makefiles. 2670643b027fSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 2671643b027fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2672643b027fSmrg case $enable_ltdl_convenience in 2673643b027fSmrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2674643b027fSmrg "") enable_ltdl_convenience=yes 2675643b027fSmrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2676643b027fSmrg esac 2677643b027fSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2678643b027fSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2679643b027fSmrg # For backwards non-gettext consistent compatibility... 2680643b027fSmrg INCLTDL="$LTDLINCL" 2681643b027fSmrg])# AC_LIBLTDL_CONVENIENCE 2682fe5e51b7Smrg 2683fe5e51b7Smrg 2684643b027fSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 2685643b027fSmrg# ----------------------------------- 2686643b027fSmrg# sets LIBLTDL to the link flags for the libltdl installable library and 2687643b027fSmrg# LTDLINCL to the include flags for the libltdl header and adds 2688643b027fSmrg# --enable-ltdl-install to the configure arguments. Note that 2689643b027fSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 2690643b027fSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 2691643b027fSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 2692643b027fSmrg# '${top_srcdir}/' (note the single quotes!). If your package is not 2693643b027fSmrg# flat and you're not using automake, define top_builddir and top_srcdir 2694643b027fSmrg# appropriately in the Makefiles. 2695643b027fSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2696643b027fSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 2697643b027fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2698643b027fSmrg AC_CHECK_LIB(ltdl, lt_dlinit, 2699643b027fSmrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2700643b027fSmrg [if test x"$enable_ltdl_install" = xno; then 2701643b027fSmrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 2702643b027fSmrg else 2703643b027fSmrg enable_ltdl_install=yes 2704643b027fSmrg fi 2705643b027fSmrg ]) 2706643b027fSmrg if test x"$enable_ltdl_install" = x"yes"; then 2707643b027fSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 2708643b027fSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2709643b027fSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2710643b027fSmrg else 2711643b027fSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2712643b027fSmrg LIBLTDL="-lltdl" 2713643b027fSmrg LTDLINCL= 2714643b027fSmrg fi 2715643b027fSmrg # For backwards non-gettext consistent compatibility... 2716643b027fSmrg INCLTDL="$LTDLINCL" 2717643b027fSmrg])# AC_LIBLTDL_INSTALLABLE 2718fe5e51b7Smrg 2719fe5e51b7Smrg 2720643b027fSmrg# AC_LIBTOOL_CXX 2721643b027fSmrg# -------------- 2722643b027fSmrg# enable support for C++ libraries 2723643b027fSmrgAC_DEFUN([AC_LIBTOOL_CXX], 2724643b027fSmrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 2725643b027fSmrg])# AC_LIBTOOL_CXX 2726fe5e51b7Smrg 2727fe5e51b7Smrg 2728643b027fSmrg# _LT_AC_LANG_CXX 2729643b027fSmrg# --------------- 2730643b027fSmrgAC_DEFUN([_LT_AC_LANG_CXX], 2731643b027fSmrg[AC_REQUIRE([AC_PROG_CXX]) 2732643b027fSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2733643b027fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 2734643b027fSmrg])# _LT_AC_LANG_CXX 2735fe5e51b7Smrg 2736643b027fSmrg# _LT_AC_PROG_CXXCPP 2737643b027fSmrg# ------------------ 2738643b027fSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 2739fe5e51b7Smrg[ 2740643b027fSmrgAC_REQUIRE([AC_PROG_CXX]) 2741643b027fSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 2742643b027fSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 2743643b027fSmrg (test "X$CXX" != "Xg++"))) ; then 2744643b027fSmrg AC_PROG_CXXCPP 2745643b027fSmrgfi 2746643b027fSmrg])# _LT_AC_PROG_CXXCPP 2747fe5e51b7Smrg 2748643b027fSmrg# AC_LIBTOOL_F77 2749643b027fSmrg# -------------- 2750643b027fSmrg# enable support for Fortran 77 libraries 2751643b027fSmrgAC_DEFUN([AC_LIBTOOL_F77], 2752643b027fSmrg[AC_REQUIRE([_LT_AC_LANG_F77]) 2753643b027fSmrg])# AC_LIBTOOL_F77 2754fe5e51b7Smrg 2755fe5e51b7Smrg 2756643b027fSmrg# _LT_AC_LANG_F77 2757643b027fSmrg# --------------- 2758643b027fSmrgAC_DEFUN([_LT_AC_LANG_F77], 2759643b027fSmrg[AC_REQUIRE([AC_PROG_F77]) 2760643b027fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 2761643b027fSmrg])# _LT_AC_LANG_F77 2762fe5e51b7Smrg 2763fe5e51b7Smrg 2764643b027fSmrg# AC_LIBTOOL_GCJ 2765643b027fSmrg# -------------- 2766643b027fSmrg# enable support for GCJ libraries 2767643b027fSmrgAC_DEFUN([AC_LIBTOOL_GCJ], 2768643b027fSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 2769643b027fSmrg])# AC_LIBTOOL_GCJ 2770fe5e51b7Smrg 2771fe5e51b7Smrg 2772643b027fSmrg# _LT_AC_LANG_GCJ 2773643b027fSmrg# --------------- 2774643b027fSmrgAC_DEFUN([_LT_AC_LANG_GCJ], 2775643b027fSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 2776643b027fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 2777643b027fSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 2778643b027fSmrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 2779643b027fSmrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 2780643b027fSmrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 2781643b027fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 2782643b027fSmrg])# _LT_AC_LANG_GCJ 2783643b027fSmrg 2784643b027fSmrg 2785643b027fSmrg# AC_LIBTOOL_RC 2786643b027fSmrg# ------------- 2787643b027fSmrg# enable support for Windows resource files 2788643b027fSmrgAC_DEFUN([AC_LIBTOOL_RC], 2789643b027fSmrg[AC_REQUIRE([LT_AC_PROG_RC]) 2790643b027fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 2791643b027fSmrg])# AC_LIBTOOL_RC 2792fe5e51b7Smrg 2793fe5e51b7Smrg 2794643b027fSmrg# AC_LIBTOOL_LANG_C_CONFIG 2795643b027fSmrg# ------------------------ 2796643b027fSmrg# Ensure that the configuration vars for the C compiler are 2797643b027fSmrg# suitably defined. Those variables are subsequently used by 2798643b027fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2799643b027fSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 2800643b027fSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 2801643b027fSmrg[lt_save_CC="$CC" 2802643b027fSmrgAC_LANG_PUSH(C) 2803fe5e51b7Smrg 2804643b027fSmrg# Source file extension for C test sources. 2805643b027fSmrgac_ext=c 2806643b027fSmrg 2807643b027fSmrg# Object file extension for compiled C test sources. 2808643b027fSmrgobjext=o 2809643b027fSmrg_LT_AC_TAGVAR(objext, $1)=$objext 2810643b027fSmrg 2811643b027fSmrg# Code to be used in simple compile tests 2812643b027fSmrglt_simple_compile_test_code="int some_variable = 0;" 2813643b027fSmrg 2814643b027fSmrg# Code to be used in simple link tests 2815643b027fSmrglt_simple_link_test_code='int main(){return(0);}' 2816643b027fSmrg 2817643b027fSmrg_LT_AC_SYS_COMPILER 2818643b027fSmrg 2819643b027fSmrg# save warnings/boilerplate of simple test code 2820643b027fSmrg_LT_COMPILER_BOILERPLATE 2821643b027fSmrg_LT_LINKER_BOILERPLATE 2822643b027fSmrg 2823643b027fSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 2824643b027fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 2825643b027fSmrgAC_LIBTOOL_PROG_CC_C_O($1) 2826643b027fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 2827643b027fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 2828643b027fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 2829643b027fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 2830643b027fSmrgAC_LIBTOOL_SYS_LIB_STRIP 2831643b027fSmrgAC_LIBTOOL_DLOPEN_SELF 2832643b027fSmrg 2833643b027fSmrg# Report which library types will actually be built 2834643b027fSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 2835643b027fSmrgAC_MSG_RESULT([$can_build_shared]) 2836643b027fSmrg 2837643b027fSmrgAC_MSG_CHECKING([whether to build shared libraries]) 2838643b027fSmrgtest "$can_build_shared" = "no" && enable_shared=no 2839643b027fSmrg 2840643b027fSmrg# On AIX, shared libraries and static libraries use the same namespace, and 2841643b027fSmrg# are all built from PIC. 2842643b027fSmrgcase $host_os in 2843643b027fSmrgaix3*) 2844643b027fSmrg test "$enable_shared" = yes && enable_static=no 2845643b027fSmrg if test -n "$RANLIB"; then 2846643b027fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 2847643b027fSmrg postinstall_cmds='$RANLIB $lib' 2848eda3803bSmrg fi 2849643b027fSmrg ;; 2850fe5e51b7Smrg 2851643b027fSmrgaix[[4-9]]*) 2852643b027fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 2853643b027fSmrg test "$enable_shared" = yes && enable_static=no 2854643b027fSmrg fi 2855643b027fSmrg ;; 2856643b027fSmrgesac 2857643b027fSmrgAC_MSG_RESULT([$enable_shared]) 2858fe5e51b7Smrg 2859643b027fSmrgAC_MSG_CHECKING([whether to build static libraries]) 2860643b027fSmrg# Make sure either enable_shared or enable_static is yes. 2861643b027fSmrgtest "$enable_shared" = yes || enable_static=yes 2862643b027fSmrgAC_MSG_RESULT([$enable_static]) 2863fe5e51b7Smrg 2864643b027fSmrgAC_LIBTOOL_CONFIG($1) 2865fe5e51b7Smrg 2866643b027fSmrgAC_LANG_POP 2867643b027fSmrgCC="$lt_save_CC" 2868643b027fSmrg])# AC_LIBTOOL_LANG_C_CONFIG 2869fe5e51b7Smrg 2870fe5e51b7Smrg 2871643b027fSmrg# AC_LIBTOOL_LANG_CXX_CONFIG 2872643b027fSmrg# -------------------------- 2873643b027fSmrg# Ensure that the configuration vars for the C compiler are 2874643b027fSmrg# suitably defined. Those variables are subsequently used by 2875643b027fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2876643b027fSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 2877643b027fSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 2878643b027fSmrg[AC_LANG_PUSH(C++) 2879643b027fSmrgAC_REQUIRE([AC_PROG_CXX]) 2880643b027fSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 2881643b027fSmrg 2882643b027fSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 2883643b027fSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 2884643b027fSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 2885643b027fSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 2886643b027fSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 2887643b027fSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 2888643b027fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 2889643b027fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 2890643b027fSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 2891643b027fSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 2892643b027fSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2893643b027fSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 2894643b027fSmrg_LT_AC_TAGVAR(module_cmds, $1)= 2895643b027fSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 2896643b027fSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 2897643b027fSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 2898643b027fSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 2899643b027fSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2900643b027fSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 2901fe5e51b7Smrg 2902643b027fSmrg# Dependencies to place before and after the object being linked: 2903643b027fSmrg_LT_AC_TAGVAR(predep_objects, $1)= 2904643b027fSmrg_LT_AC_TAGVAR(postdep_objects, $1)= 2905643b027fSmrg_LT_AC_TAGVAR(predeps, $1)= 2906643b027fSmrg_LT_AC_TAGVAR(postdeps, $1)= 2907643b027fSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 2908643b027fSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 2909fe5e51b7Smrg 2910643b027fSmrg# Source file extension for C++ test sources. 2911643b027fSmrgac_ext=cpp 2912fe5e51b7Smrg 2913643b027fSmrg# Object file extension for compiled C++ test sources. 2914643b027fSmrgobjext=o 2915643b027fSmrg_LT_AC_TAGVAR(objext, $1)=$objext 2916643b027fSmrg 2917643b027fSmrg# Code to be used in simple compile tests 2918643b027fSmrglt_simple_compile_test_code="int some_variable = 0;" 2919643b027fSmrg 2920643b027fSmrg# Code to be used in simple link tests 2921643b027fSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 2922643b027fSmrg 2923643b027fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 2924643b027fSmrg_LT_AC_SYS_COMPILER 2925643b027fSmrg 2926643b027fSmrg# save warnings/boilerplate of simple test code 2927643b027fSmrg_LT_COMPILER_BOILERPLATE 2928643b027fSmrg_LT_LINKER_BOILERPLATE 2929643b027fSmrg 2930643b027fSmrg# Allow CC to be a program name with arguments. 2931643b027fSmrglt_save_CC=$CC 2932643b027fSmrglt_save_LD=$LD 2933643b027fSmrglt_save_GCC=$GCC 2934643b027fSmrgGCC=$GXX 2935643b027fSmrglt_save_with_gnu_ld=$with_gnu_ld 2936643b027fSmrglt_save_path_LD=$lt_cv_path_LD 2937643b027fSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 2938643b027fSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 2939643b027fSmrgelse 2940643b027fSmrg $as_unset lt_cv_prog_gnu_ld 2941643b027fSmrgfi 2942643b027fSmrgif test -n "${lt_cv_path_LDCXX+set}"; then 2943643b027fSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 2944643b027fSmrgelse 2945643b027fSmrg $as_unset lt_cv_path_LD 2946643b027fSmrgfi 2947643b027fSmrgtest -z "${LDCXX+set}" || LD=$LDCXX 2948643b027fSmrgCC=${CXX-"c++"} 2949643b027fSmrgcompiler=$CC 2950643b027fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 2951643b027fSmrg_LT_CC_BASENAME([$compiler]) 2952643b027fSmrg 2953643b027fSmrg# We don't want -fno-exception wen compiling C++ code, so set the 2954643b027fSmrg# no_builtin_flag separately 2955643b027fSmrgif test "$GXX" = yes; then 2956643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 2957643b027fSmrgelse 2958643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 2959643b027fSmrgfi 2960643b027fSmrg 2961643b027fSmrgif test "$GXX" = yes; then 2962643b027fSmrg # Set up default GNU C++ configuration 2963643b027fSmrg 2964643b027fSmrg AC_PROG_LD 2965643b027fSmrg 2966643b027fSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 2967643b027fSmrg # archiving commands below assume that GNU ld is being used. 2968643b027fSmrg if test "$with_gnu_ld" = yes; then 2969643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 2970643b027fSmrg _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' 2971643b027fSmrg 2972643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 2973643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 2974643b027fSmrg 2975643b027fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 2976643b027fSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 2977643b027fSmrg # investigate it a little bit more. (MM) 2978643b027fSmrg wlarc='${wl}' 2979643b027fSmrg 2980643b027fSmrg # ancient GNU ld didn't support --whole-archive et. al. 2981643b027fSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 2982643b027fSmrg grep 'no-whole-archive' > /dev/null; then 2983643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 2984fe5e51b7Smrg else 2985643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 2986fe5e51b7Smrg fi 2987fe5e51b7Smrg else 2988643b027fSmrg with_gnu_ld=no 2989643b027fSmrg wlarc= 2990643b027fSmrg 2991643b027fSmrg # A generic and very simple default shared library creation 2992643b027fSmrg # command for GNU C++ for the case where it uses the native 2993643b027fSmrg # linker, instead of GNU ld. If possible, this setting should 2994643b027fSmrg # overridden to take advantage of the native linker features on 2995643b027fSmrg # the platform it is being used on. 2996643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 2997fe5e51b7Smrg fi 2998fe5e51b7Smrg 2999643b027fSmrg # Commands to make compiler produce verbose output that lists 3000643b027fSmrg # what "hidden" libraries, object files and flags are used when 3001643b027fSmrg # linking a shared library. 3002643b027fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3003643b027fSmrg 3004fe5e51b7Smrgelse 3005643b027fSmrg GXX=no 3006643b027fSmrg with_gnu_ld=no 3007643b027fSmrg wlarc= 3008fe5e51b7Smrgfi 3009fe5e51b7Smrg 3010643b027fSmrg# PORTME: fill in a description of your system's C++ link characteristics 3011643b027fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 3012643b027fSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 3013643b027fSmrgcase $host_os in 3014643b027fSmrg aix3*) 3015643b027fSmrg # FIXME: insert proper C++ library support 3016643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3017643b027fSmrg ;; 3018643b027fSmrg aix[[4-9]]*) 3019643b027fSmrg if test "$host_cpu" = ia64; then 3020643b027fSmrg # On IA64, the linker does run time linking by default, so we don't 3021643b027fSmrg # have to do anything special. 3022643b027fSmrg aix_use_runtimelinking=no 3023643b027fSmrg exp_sym_flag='-Bexport' 3024643b027fSmrg no_entry_flag="" 3025643b027fSmrg else 3026643b027fSmrg aix_use_runtimelinking=no 3027643b027fSmrg 3028643b027fSmrg # Test if we are trying to use run time linking or normal 3029643b027fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 3030643b027fSmrg # need to do runtime linking. 3031643b027fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 3032643b027fSmrg for ld_flag in $LDFLAGS; do 3033643b027fSmrg case $ld_flag in 3034643b027fSmrg *-brtl*) 3035643b027fSmrg aix_use_runtimelinking=yes 3036643b027fSmrg break 3037643b027fSmrg ;; 3038643b027fSmrg esac 3039643b027fSmrg done 3040643b027fSmrg ;; 3041643b027fSmrg esac 3042fe5e51b7Smrg 3043643b027fSmrg exp_sym_flag='-bexport' 3044643b027fSmrg no_entry_flag='-bnoentry' 3045643b027fSmrg fi 3046fe5e51b7Smrg 3047643b027fSmrg # When large executables or shared objects are built, AIX ld can 3048643b027fSmrg # have problems creating the table of contents. If linking a library 3049643b027fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 3050643b027fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 3051643b027fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 3052fe5e51b7Smrg 3053643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 3054643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3055643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3056643b027fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3057fe5e51b7Smrg 3058643b027fSmrg if test "$GXX" = yes; then 3059643b027fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 3060643b027fSmrg # We only want to do this on AIX 4.2 and lower, the check 3061643b027fSmrg # below for broken collect2 doesn't work under 4.3+ 3062643b027fSmrg collect2name=`${CC} -print-prog-name=collect2` 3063643b027fSmrg if test -f "$collect2name" && \ 3064643b027fSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 3065643b027fSmrg then 3066643b027fSmrg # We have reworked collect2 3067643b027fSmrg : 3068643b027fSmrg else 3069643b027fSmrg # We have old collect2 3070643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 3071643b027fSmrg # It fails to find uninstalled libraries when the uninstalled 3072643b027fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 3073643b027fSmrg # to unsupported forces relinking 3074643b027fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 3075643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3076643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3077643b027fSmrg fi 3078643b027fSmrg ;; 3079643b027fSmrg esac 3080643b027fSmrg shared_flag='-shared' 3081643b027fSmrg if test "$aix_use_runtimelinking" = yes; then 3082643b027fSmrg shared_flag="$shared_flag "'${wl}-G' 3083643b027fSmrg fi 3084643b027fSmrg else 3085643b027fSmrg # not using gcc 3086fe5e51b7Smrg if test "$host_cpu" = ia64; then 3087643b027fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 3088643b027fSmrg # chokes on -Wl,-G. The following line is correct: 3089643b027fSmrg shared_flag='-G' 3090643b027fSmrg else 3091643b027fSmrg if test "$aix_use_runtimelinking" = yes; then 3092643b027fSmrg shared_flag='${wl}-G' 3093643b027fSmrg else 3094643b027fSmrg shared_flag='${wl}-bM:SRE' 3095643b027fSmrg fi 3096643b027fSmrg fi 3097643b027fSmrg fi 3098643b027fSmrg 3099643b027fSmrg # It seems that -bexpall does not export symbols beginning with 3100643b027fSmrg # underscore (_), so it is better to generate a list of symbols to export. 3101643b027fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 3102643b027fSmrg if test "$aix_use_runtimelinking" = yes; then 3103643b027fSmrg # Warning - without using the other runtime loading flags (-brtl), 3104643b027fSmrg # -berok will link without error, but may produce a broken library. 3105643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 3106643b027fSmrg # Determine the default libpath from the value encoded in an empty executable. 3107643b027fSmrg _LT_AC_SYS_LIBPATH_AIX 3108643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3109643b027fSmrg 3110643b027fSmrg _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" 3111643b027fSmrg else 3112643b027fSmrg if test "$host_cpu" = ia64; then 3113643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 3114643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 3115643b027fSmrg _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" 3116643b027fSmrg else 3117643b027fSmrg # Determine the default libpath from the value encoded in an empty executable. 3118643b027fSmrg _LT_AC_SYS_LIBPATH_AIX 3119643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3120643b027fSmrg # Warning - without using the other run time loading flags, 3121643b027fSmrg # -berok will link without error, but may produce a broken library. 3122643b027fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 3123643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 3124643b027fSmrg # Exported symbols can be pulled into shared objects from archives 3125643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 3126643b027fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 3127643b027fSmrg # This is similar to how AIX traditionally builds its shared libraries. 3128643b027fSmrg _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' 3129643b027fSmrg fi 3130643b027fSmrg fi 3131643b027fSmrg ;; 3132643b027fSmrg 3133643b027fSmrg beos*) 3134643b027fSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 3135643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3136643b027fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 3137643b027fSmrg # support --undefined. This deserves some investigation. FIXME 3138643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3139643b027fSmrg else 3140643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3141643b027fSmrg fi 3142643b027fSmrg ;; 3143643b027fSmrg 3144643b027fSmrg chorus*) 3145643b027fSmrg case $cc_basename in 3146643b027fSmrg *) 3147643b027fSmrg # FIXME: insert proper C++ library support 3148643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3149643b027fSmrg ;; 3150643b027fSmrg esac 3151643b027fSmrg ;; 3152643b027fSmrg 3153643b027fSmrg cygwin* | mingw* | pw32*) 3154643b027fSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 3155643b027fSmrg # as there is no search path for DLLs. 3156643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3157643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3158643b027fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 3159643b027fSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 3160643b027fSmrg 3161643b027fSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 3162643b027fSmrg _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' 3163643b027fSmrg # If the export-symbols file already is a .def file (1st line 3164643b027fSmrg # is EXPORTS), use it as is; otherwise, prepend... 3165643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 3166643b027fSmrg cp $export_symbols $output_objdir/$soname.def; 3167643b027fSmrg else 3168643b027fSmrg echo EXPORTS > $output_objdir/$soname.def; 3169643b027fSmrg cat $export_symbols >> $output_objdir/$soname.def; 3170643b027fSmrg fi~ 3171643b027fSmrg $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' 3172643b027fSmrg else 3173643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3174643b027fSmrg fi 3175643b027fSmrg ;; 3176643b027fSmrg darwin* | rhapsody*) 3177643b027fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3178643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3179643b027fSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 3180643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3181643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 3182643b027fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3183643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3184643b027fSmrg if test "$GXX" = yes ; then 3185643b027fSmrg output_verbose_link_cmd='echo' 3186643b027fSmrg _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}" 3187643b027fSmrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3188643b027fSmrg _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}" 3189643b027fSmrg _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}" 3190643b027fSmrg if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3191643b027fSmrg _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}" 3192643b027fSmrg _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}" 3193643b027fSmrg fi 3194643b027fSmrg else 3195643b027fSmrg case $cc_basename in 3196643b027fSmrg xlc*) 3197643b027fSmrg output_verbose_link_cmd='echo' 3198643b027fSmrg _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' 3199643b027fSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3200643b027fSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 3201643b027fSmrg _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}' 3202643b027fSmrg _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}' 3203643b027fSmrg ;; 3204643b027fSmrg *) 3205643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3206643b027fSmrg ;; 3207643b027fSmrg esac 3208643b027fSmrg fi 3209643b027fSmrg ;; 3210643b027fSmrg 3211643b027fSmrg dgux*) 3212643b027fSmrg case $cc_basename in 3213643b027fSmrg ec++*) 3214643b027fSmrg # FIXME: insert proper C++ library support 3215643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3216643b027fSmrg ;; 3217643b027fSmrg ghcx*) 3218643b027fSmrg # Green Hills C++ Compiler 3219643b027fSmrg # FIXME: insert proper C++ library support 3220643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3221643b027fSmrg ;; 3222643b027fSmrg *) 3223643b027fSmrg # FIXME: insert proper C++ library support 3224643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3225643b027fSmrg ;; 3226643b027fSmrg esac 3227643b027fSmrg ;; 3228643b027fSmrg freebsd[[12]]*) 3229643b027fSmrg # C++ shared libraries reported to be fairly broken before switch to ELF 3230643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3231643b027fSmrg ;; 3232643b027fSmrg freebsd-elf*) 3233643b027fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3234643b027fSmrg ;; 3235643b027fSmrg freebsd* | dragonfly*) 3236643b027fSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 3237643b027fSmrg # conventions 3238643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 3239643b027fSmrg ;; 3240643b027fSmrg gnu*) 3241643b027fSmrg ;; 3242643b027fSmrg hpux9*) 3243643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3244643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3245643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3246643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3247643b027fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3248643b027fSmrg # but as the default 3249643b027fSmrg # location of the library. 3250643b027fSmrg 3251643b027fSmrg case $cc_basename in 3252643b027fSmrg CC*) 3253643b027fSmrg # FIXME: insert proper C++ library support 3254643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3255643b027fSmrg ;; 3256643b027fSmrg aCC*) 3257643b027fSmrg _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' 3258643b027fSmrg # Commands to make compiler produce verbose output that lists 3259643b027fSmrg # what "hidden" libraries, object files and flags are used when 3260643b027fSmrg # linking a shared library. 3261643b027fSmrg # 3262643b027fSmrg # There doesn't appear to be a way to prevent this compiler from 3263643b027fSmrg # explicitly linking system object files so we need to strip them 3264643b027fSmrg # from the output so that they don't get included in the library 3265643b027fSmrg # dependencies. 3266643b027fSmrg 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' 3267643b027fSmrg ;; 3268643b027fSmrg *) 3269643b027fSmrg if test "$GXX" = yes; then 3270643b027fSmrg _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' 3271643b027fSmrg else 3272643b027fSmrg # FIXME: insert proper C++ library support 3273643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3274fe5e51b7Smrg fi 3275fe5e51b7Smrg ;; 3276643b027fSmrg esac 3277643b027fSmrg ;; 3278643b027fSmrg hpux10*|hpux11*) 3279643b027fSmrg if test $with_gnu_ld = no; then 3280643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3281643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3282fe5e51b7Smrg 3283fe5e51b7Smrg case $host_cpu in 3284643b027fSmrg hppa*64*|ia64*) ;; 3285643b027fSmrg *) 3286643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3287fe5e51b7Smrg ;; 3288fe5e51b7Smrg esac 3289643b027fSmrg fi 3290643b027fSmrg case $host_cpu in 3291643b027fSmrg hppa*64*|ia64*) 3292643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3293643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3294643b027fSmrg ;; 3295643b027fSmrg *) 3296643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3297643b027fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3298643b027fSmrg # but as the default 3299643b027fSmrg # location of the library. 3300eda3803bSmrg ;; 3301643b027fSmrg esac 3302eda3803bSmrg 3303643b027fSmrg case $cc_basename in 3304643b027fSmrg CC*) 3305643b027fSmrg # FIXME: insert proper C++ library support 3306643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3307fe5e51b7Smrg ;; 3308643b027fSmrg aCC*) 3309643b027fSmrg case $host_cpu in 3310643b027fSmrg hppa*64*) 3311643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3312643b027fSmrg ;; 3313643b027fSmrg ia64*) 3314643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3315643b027fSmrg ;; 3316643b027fSmrg *) 3317643b027fSmrg _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' 3318fe5e51b7Smrg ;; 3319fe5e51b7Smrg esac 3320643b027fSmrg # Commands to make compiler produce verbose output that lists 3321643b027fSmrg # what "hidden" libraries, object files and flags are used when 3322643b027fSmrg # linking a shared library. 3323643b027fSmrg # 3324643b027fSmrg # There doesn't appear to be a way to prevent this compiler from 3325643b027fSmrg # explicitly linking system object files so we need to strip them 3326643b027fSmrg # from the output so that they don't get included in the library 3327643b027fSmrg # dependencies. 3328643b027fSmrg 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' 3329fe5e51b7Smrg ;; 3330643b027fSmrg *) 3331643b027fSmrg if test "$GXX" = yes; then 3332643b027fSmrg if test $with_gnu_ld = no; then 3333fe5e51b7Smrg case $host_cpu in 3334643b027fSmrg hppa*64*) 3335643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3336643b027fSmrg ;; 3337643b027fSmrg ia64*) 3338643b027fSmrg _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' 3339fe5e51b7Smrg ;; 3340fe5e51b7Smrg *) 3341643b027fSmrg _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' 3342fe5e51b7Smrg ;; 3343fe5e51b7Smrg esac 3344643b027fSmrg fi 3345643b027fSmrg else 3346643b027fSmrg # FIXME: insert proper C++ library support 3347643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3348643b027fSmrg fi 3349fe5e51b7Smrg ;; 3350643b027fSmrg esac 3351643b027fSmrg ;; 3352643b027fSmrg interix[[3-9]]*) 3353643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 3354643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3355643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3356643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3357643b027fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 3358643b027fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 3359643b027fSmrg # default) and relocated if they conflict, which is a slow very memory 3360643b027fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 3361643b027fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 3362643b027fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 3363643b027fSmrg _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' 3364643b027fSmrg _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' 3365643b027fSmrg ;; 3366643b027fSmrg irix5* | irix6*) 3367643b027fSmrg case $cc_basename in 3368643b027fSmrg CC*) 3369643b027fSmrg # SGI C++ 3370643b027fSmrg _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' 3371643b027fSmrg 3372643b027fSmrg # Archives containing C++ object files must be created using 3373643b027fSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 3374643b027fSmrg # necessary to make sure instantiated templates are included 3375643b027fSmrg # in the archive. 3376643b027fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 3377fe5e51b7Smrg ;; 3378643b027fSmrg *) 3379643b027fSmrg if test "$GXX" = yes; then 3380643b027fSmrg if test "$with_gnu_ld" = no; then 3381643b027fSmrg _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' 3382643b027fSmrg else 3383643b027fSmrg _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' 3384643b027fSmrg fi 3385643b027fSmrg fi 3386643b027fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3387643b027fSmrg ;; 3388643b027fSmrg esac 3389643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3390643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3391643b027fSmrg ;; 3392643b027fSmrg linux* | k*bsd*-gnu) 3393643b027fSmrg case $cc_basename in 3394643b027fSmrg KCC*) 3395643b027fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3396643b027fSmrg 3397643b027fSmrg # KCC will only create a shared library if the output file 3398643b027fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3399643b027fSmrg # to its proper name (with version) after linking. 3400643b027fSmrg _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' 3401643b027fSmrg _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' 3402643b027fSmrg # Commands to make compiler produce verbose output that lists 3403643b027fSmrg # what "hidden" libraries, object files and flags are used when 3404643b027fSmrg # linking a shared library. 3405643b027fSmrg # 3406643b027fSmrg # There doesn't appear to be a way to prevent this compiler from 3407643b027fSmrg # explicitly linking system object files so we need to strip them 3408643b027fSmrg # from the output so that they don't get included in the library 3409643b027fSmrg # dependencies. 3410643b027fSmrg 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' 3411643b027fSmrg 3412643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 3413643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3414643b027fSmrg 3415643b027fSmrg # Archives containing C++ object files must be created using 3416643b027fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3417643b027fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3418643b027fSmrg ;; 3419643b027fSmrg icpc*) 3420643b027fSmrg # Intel C++ 3421643b027fSmrg with_gnu_ld=yes 3422643b027fSmrg # version 8.0 and above of icpc choke on multiply defined symbols 3423643b027fSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 3424643b027fSmrg # earlier do not add the objects themselves. 3425643b027fSmrg case `$CC -V 2>&1` in 3426643b027fSmrg *"Version 7."*) 3427643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3428643b027fSmrg _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' 3429643b027fSmrg ;; 3430643b027fSmrg *) # Version 8.0 or newer 3431643b027fSmrg tmp_idyn= 3432643b027fSmrg case $host_cpu in 3433643b027fSmrg ia64*) tmp_idyn=' -i_dynamic';; 3434643b027fSmrg esac 3435643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 3436643b027fSmrg _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' 3437643b027fSmrg ;; 3438fe5e51b7Smrg esac 3439643b027fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3440643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3441643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3442643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 3443fe5e51b7Smrg ;; 3444643b027fSmrg pgCC* | pgcpp*) 3445643b027fSmrg # Portland Group C++ compiler 3446643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 3447643b027fSmrg _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' 3448643b027fSmrg 3449643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3450643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3451643b027fSmrg _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' 3452643b027fSmrg ;; 3453643b027fSmrg cxx*) 3454643b027fSmrg # Compaq C++ 3455643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3456643b027fSmrg _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' 3457643b027fSmrg 3458643b027fSmrg runpath_var=LD_RUN_PATH 3459643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3460643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3461643b027fSmrg 3462643b027fSmrg # Commands to make compiler produce verbose output that lists 3463643b027fSmrg # what "hidden" libraries, object files and flags are used when 3464643b027fSmrg # linking a shared library. 3465643b027fSmrg # 3466643b027fSmrg # There doesn't appear to be a way to prevent this compiler from 3467643b027fSmrg # explicitly linking system object files so we need to strip them 3468643b027fSmrg # from the output so that they don't get included in the library 3469643b027fSmrg # dependencies. 3470643b027fSmrg 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' 3471643b027fSmrg ;; 3472643b027fSmrg *) 3473643b027fSmrg case `$CC -V 2>&1 | sed 5q` in 3474643b027fSmrg *Sun\ C*) 3475643b027fSmrg # Sun C++ 5.9 3476643b027fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3477643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3478643b027fSmrg _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' 3479643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3480643b027fSmrg _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' 3481643b027fSmrg 3482643b027fSmrg # Not sure whether something based on 3483643b027fSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 3484643b027fSmrg # would be better. 3485643b027fSmrg output_verbose_link_cmd='echo' 3486643b027fSmrg 3487643b027fSmrg # Archives containing C++ object files must be created using 3488643b027fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 3489643b027fSmrg # necessary to make sure instantiated templates are included 3490643b027fSmrg # in the archive. 3491643b027fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3492643b027fSmrg ;; 3493eda3803bSmrg esac 3494fe5e51b7Smrg ;; 3495643b027fSmrg esac 3496643b027fSmrg ;; 3497643b027fSmrg lynxos*) 3498643b027fSmrg # FIXME: insert proper C++ library support 3499643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3500643b027fSmrg ;; 3501643b027fSmrg m88k*) 3502643b027fSmrg # FIXME: insert proper C++ library support 3503643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3504643b027fSmrg ;; 3505643b027fSmrg mvs*) 3506643b027fSmrg case $cc_basename in 3507643b027fSmrg cxx*) 3508643b027fSmrg # FIXME: insert proper C++ library support 3509643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3510fe5e51b7Smrg ;; 3511643b027fSmrg *) 3512643b027fSmrg # FIXME: insert proper C++ library support 3513643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3514fe5e51b7Smrg ;; 3515643b027fSmrg esac 3516643b027fSmrg ;; 3517643b027fSmrg netbsd*) 3518643b027fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3519643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 3520643b027fSmrg wlarc= 3521643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3522643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3523643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3524643b027fSmrg fi 3525643b027fSmrg # Workaround some broken pre-1.5 toolchains 3526643b027fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 3527643b027fSmrg ;; 3528643b027fSmrg openbsd2*) 3529643b027fSmrg # C++ shared libraries are fairly broken 3530643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3531643b027fSmrg ;; 3532643b027fSmrg openbsd*) 3533643b027fSmrg if test -f /usr/libexec/ld.so; then 3534643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3535643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3536643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3537643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3538643b027fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3539643b027fSmrg _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' 3540643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3541643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3542643b027fSmrg fi 3543643b027fSmrg output_verbose_link_cmd='echo' 3544643b027fSmrg else 3545643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3546643b027fSmrg fi 3547643b027fSmrg ;; 3548643b027fSmrg osf3*) 3549643b027fSmrg case $cc_basename in 3550643b027fSmrg KCC*) 3551643b027fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3552643b027fSmrg 3553643b027fSmrg # KCC will only create a shared library if the output file 3554643b027fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3555643b027fSmrg # to its proper name (with version) after linking. 3556643b027fSmrg _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' 3557643b027fSmrg 3558643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3559643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3560643b027fSmrg 3561643b027fSmrg # Archives containing C++ object files must be created using 3562643b027fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3563643b027fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3564643b027fSmrg 3565fe5e51b7Smrg ;; 3566643b027fSmrg RCC*) 3567643b027fSmrg # Rational C++ 2.4.1 3568643b027fSmrg # FIXME: insert proper C++ library support 3569643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3570fe5e51b7Smrg ;; 3571643b027fSmrg cxx*) 3572643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3573643b027fSmrg _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' 3574643b027fSmrg 3575643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3576643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3577643b027fSmrg 3578643b027fSmrg # Commands to make compiler produce verbose output that lists 3579643b027fSmrg # what "hidden" libraries, object files and flags are used when 3580643b027fSmrg # linking a shared library. 3581643b027fSmrg # 3582643b027fSmrg # There doesn't appear to be a way to prevent this compiler from 3583643b027fSmrg # explicitly linking system object files so we need to strip them 3584643b027fSmrg # from the output so that they don't get included in the library 3585643b027fSmrg # dependencies. 3586643b027fSmrg 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' 3587fe5e51b7Smrg ;; 3588643b027fSmrg *) 3589643b027fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3590643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3591643b027fSmrg _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' 3592643b027fSmrg 3593643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3594643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3595643b027fSmrg 3596643b027fSmrg # Commands to make compiler produce verbose output that lists 3597643b027fSmrg # what "hidden" libraries, object files and flags are used when 3598643b027fSmrg # linking a shared library. 3599643b027fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3600643b027fSmrg 3601643b027fSmrg else 3602643b027fSmrg # FIXME: insert proper C++ library support 3603643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3604643b027fSmrg fi 3605fe5e51b7Smrg ;; 3606643b027fSmrg esac 3607643b027fSmrg ;; 3608643b027fSmrg osf4* | osf5*) 3609643b027fSmrg case $cc_basename in 3610643b027fSmrg KCC*) 3611643b027fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 3612643b027fSmrg 3613643b027fSmrg # KCC will only create a shared library if the output file 3614643b027fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 3615643b027fSmrg # to its proper name (with version) after linking. 3616643b027fSmrg _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' 3617643b027fSmrg 3618643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3619643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3620643b027fSmrg 3621643b027fSmrg # Archives containing C++ object files must be created using 3622643b027fSmrg # the KAI C++ compiler. 3623643b027fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 3624fe5e51b7Smrg ;; 3625643b027fSmrg RCC*) 3626643b027fSmrg # Rational C++ 2.4.1 3627643b027fSmrg # FIXME: insert proper C++ library support 3628643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3629fe5e51b7Smrg ;; 3630643b027fSmrg cxx*) 3631643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 3632643b027fSmrg _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' 3633643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 3634643b027fSmrg echo "-hidden">> $lib.exp~ 3635643b027fSmrg $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~ 3636643b027fSmrg $rm $lib.exp' 3637643b027fSmrg 3638643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3639643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3640643b027fSmrg 3641643b027fSmrg # Commands to make compiler produce verbose output that lists 3642643b027fSmrg # what "hidden" libraries, object files and flags are used when 3643643b027fSmrg # linking a shared library. 3644643b027fSmrg # 3645643b027fSmrg # There doesn't appear to be a way to prevent this compiler from 3646643b027fSmrg # explicitly linking system object files so we need to strip them 3647643b027fSmrg # from the output so that they don't get included in the library 3648643b027fSmrg # dependencies. 3649643b027fSmrg 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' 3650fe5e51b7Smrg ;; 3651643b027fSmrg *) 3652643b027fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3653643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3654643b027fSmrg _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' 3655643b027fSmrg 3656643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3657643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3658643b027fSmrg 3659643b027fSmrg # Commands to make compiler produce verbose output that lists 3660643b027fSmrg # what "hidden" libraries, object files and flags are used when 3661643b027fSmrg # linking a shared library. 3662643b027fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3663643b027fSmrg 3664643b027fSmrg else 3665643b027fSmrg # FIXME: insert proper C++ library support 3666643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3667643b027fSmrg fi 3668643b027fSmrg ;; 3669643b027fSmrg esac 3670643b027fSmrg ;; 3671643b027fSmrg psos*) 3672643b027fSmrg # FIXME: insert proper C++ library support 3673643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3674643b027fSmrg ;; 3675643b027fSmrg sunos4*) 3676643b027fSmrg case $cc_basename in 3677643b027fSmrg CC*) 3678643b027fSmrg # Sun C++ 4.x 3679643b027fSmrg # FIXME: insert proper C++ library support 3680643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3681643b027fSmrg ;; 3682643b027fSmrg lcc*) 3683643b027fSmrg # Lucid 3684643b027fSmrg # FIXME: insert proper C++ library support 3685643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3686643b027fSmrg ;; 3687643b027fSmrg *) 3688643b027fSmrg # FIXME: insert proper C++ library support 3689643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3690643b027fSmrg ;; 3691643b027fSmrg esac 3692643b027fSmrg ;; 3693643b027fSmrg solaris*) 3694643b027fSmrg case $cc_basename in 3695643b027fSmrg CC*) 3696643b027fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 3697643b027fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 3698643b027fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3699643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3700643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3701643b027fSmrg $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' 3702643b027fSmrg 3703643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3704643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3705643b027fSmrg case $host_os in 3706643b027fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3707fe5e51b7Smrg *) 3708643b027fSmrg # The compiler driver will combine and reorder linker options, 3709643b027fSmrg # but understands `-z linker_flag'. 3710643b027fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 3711643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 3712fe5e51b7Smrg ;; 3713fe5e51b7Smrg esac 3714643b027fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3715643b027fSmrg 3716643b027fSmrg output_verbose_link_cmd='echo' 3717643b027fSmrg 3718643b027fSmrg # Archives containing C++ object files must be created using 3719643b027fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 3720643b027fSmrg # necessary to make sure instantiated templates are included 3721643b027fSmrg # in the archive. 3722643b027fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3723fe5e51b7Smrg ;; 3724643b027fSmrg gcx*) 3725643b027fSmrg # Green Hills C++ Compiler 3726643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3727643b027fSmrg 3728643b027fSmrg # The C++ compiler must be used to create the archive. 3729643b027fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 3730fe5e51b7Smrg ;; 3731fe5e51b7Smrg *) 3732643b027fSmrg # GNU C++ compiler with Solaris linker 3733643b027fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3734643b027fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 3735643b027fSmrg if $CC --version | grep -v '^2\.7' > /dev/null; then 3736643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3737643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3738643b027fSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3739fe5e51b7Smrg 3740643b027fSmrg # Commands to make compiler produce verbose output that lists 3741643b027fSmrg # what "hidden" libraries, object files and flags are used when 3742643b027fSmrg # linking a shared library. 3743643b027fSmrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3744643b027fSmrg else 3745643b027fSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 3746643b027fSmrg # platform. 3747643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3748643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3749643b027fSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3750eda3803bSmrg 3751643b027fSmrg # Commands to make compiler produce verbose output that lists 3752643b027fSmrg # what "hidden" libraries, object files and flags are used when 3753643b027fSmrg # linking a shared library. 3754643b027fSmrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3755643b027fSmrg fi 3756eda3803bSmrg 3757643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 3758643b027fSmrg case $host_os in 3759643b027fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 3760643b027fSmrg *) 3761643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 3762643b027fSmrg ;; 3763643b027fSmrg esac 3764643b027fSmrg fi 3765643b027fSmrg ;; 3766643b027fSmrg esac 3767643b027fSmrg ;; 3768643b027fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 3769643b027fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3770643b027fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3771643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3772643b027fSmrg runpath_var='LD_RUN_PATH' 3773643b027fSmrg 3774643b027fSmrg case $cc_basename in 3775643b027fSmrg CC*) 3776643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3777643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3778fe5e51b7Smrg ;; 3779fe5e51b7Smrg *) 3780643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3781643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 3782fe5e51b7Smrg ;; 3783fe5e51b7Smrg esac 3784643b027fSmrg ;; 3785643b027fSmrg sysv5* | sco3.2v5* | sco5v6*) 3786643b027fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 3787643b027fSmrg # link with -lc, and that would cause any symbols used from libc to 3788643b027fSmrg # always be unresolved, which means just about no library would 3789643b027fSmrg # ever link correctly. If we're not using GNU ld we use -z text 3790643b027fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 3791643b027fSmrg # as -z defs. 3792643b027fSmrg # For security reasons, it is highly recommended that you always 3793643b027fSmrg # use absolute paths for naming shared libraries, and exclude the 3794643b027fSmrg # DT_RUNPATH tag from executables and libraries. But doing so 3795643b027fSmrg # requires that you compile everything twice, which is a pain. 3796643b027fSmrg # So that behaviour is only enabled if SCOABSPATH is set to a 3797643b027fSmrg # non-empty value in the environment. Most likely only useful for 3798643b027fSmrg # creating official distributions of packages. 3799643b027fSmrg # This is a hack until libtool officially supports absolute path 3800643b027fSmrg # names for shared libraries. 3801643b027fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 3802643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 3803643b027fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3804643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3805643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 3806643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3807643b027fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3808643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 3809643b027fSmrg runpath_var='LD_RUN_PATH' 3810643b027fSmrg 3811643b027fSmrg case $cc_basename in 3812643b027fSmrg CC*) 3813643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3814643b027fSmrg _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' 3815fe5e51b7Smrg ;; 3816fe5e51b7Smrg *) 3817643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 3818643b027fSmrg _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' 3819eda3803bSmrg ;; 3820643b027fSmrg esac 3821643b027fSmrg ;; 3822643b027fSmrg tandem*) 3823643b027fSmrg case $cc_basename in 3824643b027fSmrg NCC*) 3825643b027fSmrg # NonStop-UX NCC 3.20 3826643b027fSmrg # FIXME: insert proper C++ library support 3827643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3828fe5e51b7Smrg ;; 3829fe5e51b7Smrg *) 3830643b027fSmrg # FIXME: insert proper C++ library support 3831643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3832fe5e51b7Smrg ;; 3833643b027fSmrg esac 3834643b027fSmrg ;; 3835643b027fSmrg vxworks*) 3836643b027fSmrg # FIXME: insert proper C++ library support 3837643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3838643b027fSmrg ;; 3839643b027fSmrg *) 3840643b027fSmrg # FIXME: insert proper C++ library support 3841643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 3842643b027fSmrg ;; 3843643b027fSmrgesac 3844643b027fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 3845643b027fSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 3846fe5e51b7Smrg 3847643b027fSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 3848643b027fSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 3849fe5e51b7Smrg 3850643b027fSmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 3851643b027fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 3852643b027fSmrgAC_LIBTOOL_PROG_CC_C_O($1) 3853643b027fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3854643b027fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 3855643b027fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3856643b027fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3857fe5e51b7Smrg 3858643b027fSmrgAC_LIBTOOL_CONFIG($1) 3859fe5e51b7Smrg 3860643b027fSmrgAC_LANG_POP 3861643b027fSmrgCC=$lt_save_CC 3862643b027fSmrgLDCXX=$LD 3863643b027fSmrgLD=$lt_save_LD 3864643b027fSmrgGCC=$lt_save_GCC 3865643b027fSmrgwith_gnu_ldcxx=$with_gnu_ld 3866643b027fSmrgwith_gnu_ld=$lt_save_with_gnu_ld 3867643b027fSmrglt_cv_path_LDCXX=$lt_cv_path_LD 3868643b027fSmrglt_cv_path_LD=$lt_save_path_LD 3869643b027fSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 3870643b027fSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 3871643b027fSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG 3872643b027fSmrg 3873643b027fSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 3874643b027fSmrg# ------------------------------------ 3875643b027fSmrg# Figure out "hidden" library dependencies from verbose 3876643b027fSmrg# compiler output when linking a shared library. 3877643b027fSmrg# Parse the compiler output and extract the necessary 3878643b027fSmrg# objects, libraries and library flags. 3879643b027fSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 3880643b027fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 3881643b027fSmrgdnl we can't use the lt_simple_compile_test_code here, 3882643b027fSmrgdnl because it contains code intended for an executable, 3883643b027fSmrgdnl not a library. It's possible we should let each 3884643b027fSmrgdnl tag define a new lt_????_link_test_code variable, 3885643b027fSmrgdnl but it's only used here... 3886643b027fSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 3887643b027fSmrgint a; 3888643b027fSmrgvoid foo (void) { a = 0; } 3889643b027fSmrgEOF 3890643b027fSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 3891643b027fSmrgclass Foo 3892643b027fSmrg{ 3893643b027fSmrgpublic: 3894643b027fSmrg Foo (void) { a = 0; } 3895643b027fSmrgprivate: 3896643b027fSmrg int a; 3897643b027fSmrg}; 3898643b027fSmrgEOF 3899643b027fSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 3900643b027fSmrg subroutine foo 3901643b027fSmrg implicit none 3902643b027fSmrg integer*4 a 3903643b027fSmrg a=0 3904643b027fSmrg return 3905643b027fSmrg end 3906643b027fSmrgEOF 3907643b027fSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 3908643b027fSmrgpublic class foo { 3909643b027fSmrg private int a; 3910643b027fSmrg public void bar (void) { 3911643b027fSmrg a = 0; 3912643b027fSmrg } 3913643b027fSmrg}; 3914643b027fSmrgEOF 3915643b027fSmrg]) 3916643b027fSmrgdnl Parse the compiler output and extract the necessary 3917643b027fSmrgdnl objects, libraries and library flags. 3918643b027fSmrgif AC_TRY_EVAL(ac_compile); then 3919643b027fSmrg # Parse the compiler output and extract the necessary 3920643b027fSmrg # objects, libraries and library flags. 3921fe5e51b7Smrg 3922643b027fSmrg # Sentinel used to keep track of whether or not we are before 3923643b027fSmrg # the conftest object file. 3924643b027fSmrg pre_test_object_deps_done=no 3925fe5e51b7Smrg 3926643b027fSmrg # The `*' in the case matches for architectures that use `case' in 3927643b027fSmrg # $output_verbose_cmd can trigger glob expansion during the loop 3928643b027fSmrg # eval without this substitution. 3929643b027fSmrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 3930fe5e51b7Smrg 3931643b027fSmrg for p in `eval $output_verbose_link_cmd`; do 3932643b027fSmrg case $p in 3933fe5e51b7Smrg 3934643b027fSmrg -L* | -R* | -l*) 3935643b027fSmrg # Some compilers place space between "-{L,R}" and the path. 3936643b027fSmrg # Remove the space. 3937643b027fSmrg if test $p = "-L" \ 3938643b027fSmrg || test $p = "-R"; then 3939643b027fSmrg prev=$p 3940643b027fSmrg continue 3941643b027fSmrg else 3942643b027fSmrg prev= 3943643b027fSmrg fi 3944fe5e51b7Smrg 3945643b027fSmrg if test "$pre_test_object_deps_done" = no; then 3946643b027fSmrg case $p in 3947643b027fSmrg -L* | -R*) 3948643b027fSmrg # Internal compiler library paths should come after those 3949643b027fSmrg # provided the user. The postdeps already come after the 3950643b027fSmrg # user supplied libs so there is no need to process them. 3951643b027fSmrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 3952643b027fSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 3953643b027fSmrg else 3954643b027fSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 3955643b027fSmrg fi 3956643b027fSmrg ;; 3957643b027fSmrg # The "-l" case would never come before the object being 3958643b027fSmrg # linked, so don't bother handling this case. 3959643b027fSmrg esac 3960643b027fSmrg else 3961643b027fSmrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 3962643b027fSmrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 3963643b027fSmrg else 3964643b027fSmrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 3965643b027fSmrg fi 3966643b027fSmrg fi 3967643b027fSmrg ;; 3968fe5e51b7Smrg 3969643b027fSmrg *.$objext) 3970643b027fSmrg # This assumes that the test object file only shows up 3971643b027fSmrg # once in the compiler output. 3972643b027fSmrg if test "$p" = "conftest.$objext"; then 3973643b027fSmrg pre_test_object_deps_done=yes 3974643b027fSmrg continue 3975643b027fSmrg fi 3976fe5e51b7Smrg 3977643b027fSmrg if test "$pre_test_object_deps_done" = no; then 3978643b027fSmrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 3979643b027fSmrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 3980643b027fSmrg else 3981643b027fSmrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 3982643b027fSmrg fi 3983643b027fSmrg else 3984643b027fSmrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 3985643b027fSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 3986643b027fSmrg else 3987643b027fSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 3988643b027fSmrg fi 3989643b027fSmrg fi 3990643b027fSmrg ;; 3991643b027fSmrg 3992643b027fSmrg *) ;; # Ignore the rest. 3993fe5e51b7Smrg 3994fe5e51b7Smrg esac 3995643b027fSmrg done 3996fe5e51b7Smrg 3997643b027fSmrg # Clean up. 3998643b027fSmrg rm -f a.out a.exe 3999643b027fSmrgelse 4000643b027fSmrg echo "libtool.m4: error: problem compiling $1 test program" 4001fe5e51b7Smrgfi 4002fe5e51b7Smrg 4003643b027fSmrg$rm -f confest.$objext 4004fe5e51b7Smrg 4005643b027fSmrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 4006643b027fSmrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 4007643b027fSmrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 4008643b027fSmrgfi 4009fe5e51b7Smrg 4010643b027fSmrg# PORTME: override above test on systems where it is broken 4011643b027fSmrgifelse([$1],[CXX], 4012643b027fSmrg[case $host_os in 4013643b027fSmrginterix[[3-9]]*) 4014643b027fSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 4015643b027fSmrg # hack all around it, let's just trust "g++" to DTRT. 4016643b027fSmrg _LT_AC_TAGVAR(predep_objects,$1)= 4017643b027fSmrg _LT_AC_TAGVAR(postdep_objects,$1)= 4018643b027fSmrg _LT_AC_TAGVAR(postdeps,$1)= 4019643b027fSmrg ;; 4020643b027fSmrg 4021643b027fSmrglinux*) 4022643b027fSmrg case `$CC -V 2>&1 | sed 5q` in 4023643b027fSmrg *Sun\ C*) 4024643b027fSmrg # Sun C++ 5.9 4025643b027fSmrg # 4026643b027fSmrg # The more standards-conforming stlport4 library is 4027643b027fSmrg # incompatible with the Cstd library. Avoid specifying 4028643b027fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 4029643b027fSmrg # -library=stlport4 depends on it. 4030643b027fSmrg case " $CXX $CXXFLAGS " in 4031643b027fSmrg *" -library=stlport4 "*) 4032643b027fSmrg solaris_use_stlport4=yes 4033643b027fSmrg ;; 4034643b027fSmrg esac 4035643b027fSmrg if test "$solaris_use_stlport4" != yes; then 4036643b027fSmrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 4037fe5e51b7Smrg fi 4038fe5e51b7Smrg ;; 4039eda3803bSmrg esac 4040643b027fSmrg ;; 4041fe5e51b7Smrg 4042643b027fSmrgsolaris*) 4043643b027fSmrg case $cc_basename in 4044643b027fSmrg CC*) 4045643b027fSmrg # The more standards-conforming stlport4 library is 4046643b027fSmrg # incompatible with the Cstd library. Avoid specifying 4047643b027fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 4048643b027fSmrg # -library=stlport4 depends on it. 4049643b027fSmrg case " $CXX $CXXFLAGS " in 4050643b027fSmrg *" -library=stlport4 "*) 4051643b027fSmrg solaris_use_stlport4=yes 4052643b027fSmrg ;; 4053643b027fSmrg esac 4054643b027fSmrg 4055643b027fSmrg # Adding this requires a known-good setup of shared libraries for 4056643b027fSmrg # Sun compiler versions before 5.6, else PIC objects from an old 4057643b027fSmrg # archive will be linked into the output, leading to subtle bugs. 4058643b027fSmrg if test "$solaris_use_stlport4" != yes; then 4059643b027fSmrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 4060fe5e51b7Smrg fi 4061fe5e51b7Smrg ;; 4062fe5e51b7Smrg esac 4063643b027fSmrg ;; 4064643b027fSmrgesac 4065643b027fSmrg]) 4066643b027fSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 4067643b027fSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 4068643b027fSmrgesac 4069643b027fSmrg])# AC_LIBTOOL_POSTDEP_PREDEP 4070fe5e51b7Smrg 4071643b027fSmrg# AC_LIBTOOL_LANG_F77_CONFIG 4072643b027fSmrg# -------------------------- 4073643b027fSmrg# Ensure that the configuration vars for the C compiler are 4074643b027fSmrg# suitably defined. Those variables are subsequently used by 4075643b027fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4076643b027fSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 4077643b027fSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 4078643b027fSmrg[AC_REQUIRE([AC_PROG_F77]) 4079643b027fSmrgAC_LANG_PUSH(Fortran 77) 4080fe5e51b7Smrg 4081643b027fSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4082643b027fSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4083643b027fSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 4084643b027fSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4085643b027fSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4086643b027fSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 4087643b027fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4088643b027fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4089643b027fSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4090643b027fSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4091643b027fSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4092643b027fSmrg_LT_AC_TAGVAR(module_cmds, $1)= 4093643b027fSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4094643b027fSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4095643b027fSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4096643b027fSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 4097643b027fSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4098643b027fSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4099fe5e51b7Smrg 4100643b027fSmrg# Source file extension for f77 test sources. 4101643b027fSmrgac_ext=f 4102fe5e51b7Smrg 4103643b027fSmrg# Object file extension for compiled f77 test sources. 4104643b027fSmrgobjext=o 4105643b027fSmrg_LT_AC_TAGVAR(objext, $1)=$objext 4106fe5e51b7Smrg 4107643b027fSmrg# Code to be used in simple compile tests 4108643b027fSmrglt_simple_compile_test_code="\ 4109643b027fSmrg subroutine t 4110643b027fSmrg return 4111643b027fSmrg end 4112643b027fSmrg" 4113fe5e51b7Smrg 4114643b027fSmrg# Code to be used in simple link tests 4115643b027fSmrglt_simple_link_test_code="\ 4116643b027fSmrg program t 4117643b027fSmrg end 4118643b027fSmrg" 4119fe5e51b7Smrg 4120643b027fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4121643b027fSmrg_LT_AC_SYS_COMPILER 4122fe5e51b7Smrg 4123643b027fSmrg# save warnings/boilerplate of simple test code 4124643b027fSmrg_LT_COMPILER_BOILERPLATE 4125643b027fSmrg_LT_LINKER_BOILERPLATE 4126fe5e51b7Smrg 4127643b027fSmrg# Allow CC to be a program name with arguments. 4128643b027fSmrglt_save_CC="$CC" 4129643b027fSmrgCC=${F77-"f77"} 4130643b027fSmrgcompiler=$CC 4131643b027fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 4132643b027fSmrg_LT_CC_BASENAME([$compiler]) 4133fe5e51b7Smrg 4134643b027fSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 4135643b027fSmrgAC_MSG_RESULT([$can_build_shared]) 4136fe5e51b7Smrg 4137643b027fSmrgAC_MSG_CHECKING([whether to build shared libraries]) 4138643b027fSmrgtest "$can_build_shared" = "no" && enable_shared=no 4139fe5e51b7Smrg 4140643b027fSmrg# On AIX, shared libraries and static libraries use the same namespace, and 4141643b027fSmrg# are all built from PIC. 4142643b027fSmrgcase $host_os in 4143643b027fSmrgaix3*) 4144643b027fSmrg test "$enable_shared" = yes && enable_static=no 4145643b027fSmrg if test -n "$RANLIB"; then 4146643b027fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 4147643b027fSmrg postinstall_cmds='$RANLIB $lib' 4148643b027fSmrg fi 4149643b027fSmrg ;; 4150643b027fSmrgaix[[4-9]]*) 4151643b027fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 4152643b027fSmrg test "$enable_shared" = yes && enable_static=no 4153643b027fSmrg fi 4154643b027fSmrg ;; 4155643b027fSmrgesac 4156643b027fSmrgAC_MSG_RESULT([$enable_shared]) 4157fe5e51b7Smrg 4158643b027fSmrgAC_MSG_CHECKING([whether to build static libraries]) 4159643b027fSmrg# Make sure either enable_shared or enable_static is yes. 4160643b027fSmrgtest "$enable_shared" = yes || enable_static=yes 4161643b027fSmrgAC_MSG_RESULT([$enable_static]) 4162fe5e51b7Smrg 4163643b027fSmrg_LT_AC_TAGVAR(GCC, $1)="$G77" 4164643b027fSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 4165fe5e51b7Smrg 4166643b027fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4167643b027fSmrgAC_LIBTOOL_PROG_CC_C_O($1) 4168643b027fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4169643b027fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4170643b027fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4171643b027fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4172fe5e51b7Smrg 4173643b027fSmrgAC_LIBTOOL_CONFIG($1) 4174fe5e51b7Smrg 4175643b027fSmrgAC_LANG_POP 4176643b027fSmrgCC="$lt_save_CC" 4177643b027fSmrg])# AC_LIBTOOL_LANG_F77_CONFIG 4178fe5e51b7Smrg 4179fe5e51b7Smrg 4180643b027fSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG 4181643b027fSmrg# -------------------------- 4182643b027fSmrg# Ensure that the configuration vars for the C compiler are 4183643b027fSmrg# suitably defined. Those variables are subsequently used by 4184643b027fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4185643b027fSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 4186643b027fSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 4187643b027fSmrg[AC_LANG_SAVE 4188fe5e51b7Smrg 4189643b027fSmrg# Source file extension for Java test sources. 4190643b027fSmrgac_ext=java 4191fe5e51b7Smrg 4192643b027fSmrg# Object file extension for compiled Java test sources. 4193643b027fSmrgobjext=o 4194643b027fSmrg_LT_AC_TAGVAR(objext, $1)=$objext 4195fe5e51b7Smrg 4196643b027fSmrg# Code to be used in simple compile tests 4197643b027fSmrglt_simple_compile_test_code="class foo {}" 4198fe5e51b7Smrg 4199643b027fSmrg# Code to be used in simple link tests 4200643b027fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 4201fe5e51b7Smrg 4202643b027fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4203643b027fSmrg_LT_AC_SYS_COMPILER 4204fe5e51b7Smrg 4205643b027fSmrg# save warnings/boilerplate of simple test code 4206643b027fSmrg_LT_COMPILER_BOILERPLATE 4207643b027fSmrg_LT_LINKER_BOILERPLATE 4208fe5e51b7Smrg 4209643b027fSmrg# Allow CC to be a program name with arguments. 4210643b027fSmrglt_save_CC="$CC" 4211643b027fSmrgCC=${GCJ-"gcj"} 4212643b027fSmrgcompiler=$CC 4213643b027fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 4214643b027fSmrg_LT_CC_BASENAME([$compiler]) 4215fe5e51b7Smrg 4216643b027fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 4217643b027fSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4218fe5e51b7Smrg 4219643b027fSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4220fe5e51b7Smrg 4221643b027fSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4222643b027fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4223643b027fSmrgAC_LIBTOOL_PROG_CC_C_O($1) 4224643b027fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4225643b027fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4226643b027fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4227643b027fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4228fe5e51b7Smrg 4229643b027fSmrgAC_LIBTOOL_CONFIG($1) 4230fe5e51b7Smrg 4231643b027fSmrgAC_LANG_RESTORE 4232643b027fSmrgCC="$lt_save_CC" 4233643b027fSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 4234fe5e51b7Smrg 4235fe5e51b7Smrg 4236643b027fSmrg# AC_LIBTOOL_LANG_RC_CONFIG 4237643b027fSmrg# ------------------------- 4238643b027fSmrg# Ensure that the configuration vars for the Windows resource compiler are 4239643b027fSmrg# suitably defined. Those variables are subsequently used by 4240643b027fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4241643b027fSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 4242643b027fSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 4243643b027fSmrg[AC_LANG_SAVE 4244fe5e51b7Smrg 4245643b027fSmrg# Source file extension for RC test sources. 4246643b027fSmrgac_ext=rc 4247fe5e51b7Smrg 4248643b027fSmrg# Object file extension for compiled RC test sources. 4249643b027fSmrgobjext=o 4250643b027fSmrg_LT_AC_TAGVAR(objext, $1)=$objext 4251fe5e51b7Smrg 4252643b027fSmrg# Code to be used in simple compile tests 4253643b027fSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 4254fe5e51b7Smrg 4255643b027fSmrg# Code to be used in simple link tests 4256643b027fSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 4257fe5e51b7Smrg 4258643b027fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4259643b027fSmrg_LT_AC_SYS_COMPILER 4260fe5e51b7Smrg 4261643b027fSmrg# save warnings/boilerplate of simple test code 4262643b027fSmrg_LT_COMPILER_BOILERPLATE 4263643b027fSmrg_LT_LINKER_BOILERPLATE 4264fe5e51b7Smrg 4265643b027fSmrg# Allow CC to be a program name with arguments. 4266643b027fSmrglt_save_CC="$CC" 4267643b027fSmrgCC=${RC-"windres"} 4268643b027fSmrgcompiler=$CC 4269643b027fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 4270643b027fSmrg_LT_CC_BASENAME([$compiler]) 4271643b027fSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4272fe5e51b7Smrg 4273643b027fSmrgAC_LIBTOOL_CONFIG($1) 4274fe5e51b7Smrg 4275643b027fSmrgAC_LANG_RESTORE 4276643b027fSmrgCC="$lt_save_CC" 4277643b027fSmrg])# AC_LIBTOOL_LANG_RC_CONFIG 4278fe5e51b7Smrg 4279fe5e51b7Smrg 4280643b027fSmrg# AC_LIBTOOL_CONFIG([TAGNAME]) 4281643b027fSmrg# ---------------------------- 4282643b027fSmrg# If TAGNAME is not passed, then create an initial libtool script 4283643b027fSmrg# with a default configuration from the untagged config vars. Otherwise 4284643b027fSmrg# add code to config.status for appending the configuration named by 4285643b027fSmrg# TAGNAME from the matching tagged config vars. 4286643b027fSmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 4287643b027fSmrg[# The else clause should only fire when bootstrapping the 4288643b027fSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh 4289643b027fSmrg# with your package, and you will get complaints that there are 4290643b027fSmrg# no rules to generate ltmain.sh. 4291643b027fSmrgif test -f "$ltmain"; then 4292643b027fSmrg # See if we are running on zsh, and set the options which allow our commands through 4293643b027fSmrg # without removal of \ escapes. 4294643b027fSmrg if test -n "${ZSH_VERSION+set}" ; then 4295643b027fSmrg setopt NO_GLOB_SUBST 4296643b027fSmrg fi 4297643b027fSmrg # Now quote all the things that may contain metacharacters while being 4298643b027fSmrg # careful not to overquote the AC_SUBSTed values. We take copies of the 4299643b027fSmrg # variables and quote the copies for generation of the libtool script. 4300643b027fSmrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 4301643b027fSmrg SED SHELL STRIP \ 4302643b027fSmrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 4303643b027fSmrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 4304643b027fSmrg deplibs_check_method reload_flag reload_cmds need_locks \ 4305643b027fSmrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 4306643b027fSmrg lt_cv_sys_global_symbol_to_c_name_address \ 4307643b027fSmrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4308643b027fSmrg old_postinstall_cmds old_postuninstall_cmds \ 4309643b027fSmrg _LT_AC_TAGVAR(compiler, $1) \ 4310643b027fSmrg _LT_AC_TAGVAR(CC, $1) \ 4311643b027fSmrg _LT_AC_TAGVAR(LD, $1) \ 4312643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4313643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4314643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4315643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4316643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4317643b027fSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4318643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4319643b027fSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4320643b027fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4321643b027fSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4322643b027fSmrg _LT_AC_TAGVAR(predep_objects, $1) \ 4323643b027fSmrg _LT_AC_TAGVAR(postdep_objects, $1) \ 4324643b027fSmrg _LT_AC_TAGVAR(predeps, $1) \ 4325643b027fSmrg _LT_AC_TAGVAR(postdeps, $1) \ 4326643b027fSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4327643b027fSmrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 4328643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1) \ 4329643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4330643b027fSmrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4331643b027fSmrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4332643b027fSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 4333643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 4334643b027fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 4335643b027fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 4336643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 4337643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 4338643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 4339643b027fSmrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 4340643b027fSmrg _LT_AC_TAGVAR(module_cmds, $1) \ 4341643b027fSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 4342643b027fSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 4343643b027fSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 4344643b027fSmrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 4345643b027fSmrg _LT_AC_TAGVAR(include_expsyms, $1); do 4346643b027fSmrg 4347643b027fSmrg case $var in 4348643b027fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 4349643b027fSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 4350643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 4351643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 4352643b027fSmrg _LT_AC_TAGVAR(module_cmds, $1) | \ 4353643b027fSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 4354643b027fSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 4355643b027fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 4356643b027fSmrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 4357643b027fSmrg postinstall_cmds | postuninstall_cmds | \ 4358643b027fSmrg old_postinstall_cmds | old_postuninstall_cmds | \ 4359643b027fSmrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 4360643b027fSmrg # Double-quote double-evaled strings. 4361643b027fSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 4362eda3803bSmrg ;; 4363643b027fSmrg *) 4364643b027fSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 4365fe5e51b7Smrg ;; 4366643b027fSmrg esac 4367643b027fSmrg done 4368eda3803bSmrg 4369643b027fSmrg case $lt_echo in 4370643b027fSmrg *'\[$]0 --fallback-echo"') 4371643b027fSmrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 4372643b027fSmrg ;; 4373643b027fSmrg esac 4374fe5e51b7Smrg 4375643b027fSmrgifelse([$1], [], 4376643b027fSmrg [cfgfile="${ofile}T" 4377643b027fSmrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 4378643b027fSmrg $rm -f "$cfgfile" 4379643b027fSmrg AC_MSG_NOTICE([creating $ofile])], 4380643b027fSmrg [cfgfile="$ofile"]) 4381fe5e51b7Smrg 4382643b027fSmrg cat <<__EOF__ >> "$cfgfile" 4383643b027fSmrgifelse([$1], [], 4384643b027fSmrg[#! $SHELL 4385fe5e51b7Smrg 4386643b027fSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 4387643b027fSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 4388643b027fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4389643b027fSmrg# 4390643b027fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 4391643b027fSmrg# Free Software Foundation, Inc. 4392643b027fSmrg# 4393643b027fSmrg# This file is part of GNU Libtool: 4394643b027fSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4395643b027fSmrg# 4396643b027fSmrg# This program is free software; you can redistribute it and/or modify 4397643b027fSmrg# it under the terms of the GNU General Public License as published by 4398643b027fSmrg# the Free Software Foundation; either version 2 of the License, or 4399643b027fSmrg# (at your option) any later version. 4400643b027fSmrg# 4401643b027fSmrg# This program is distributed in the hope that it will be useful, but 4402643b027fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 4403643b027fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4404643b027fSmrg# General Public License for more details. 4405643b027fSmrg# 4406643b027fSmrg# You should have received a copy of the GNU General Public License 4407643b027fSmrg# along with this program; if not, write to the Free Software 4408643b027fSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 4409643b027fSmrg# 4410643b027fSmrg# As a special exception to the GNU General Public License, if you 4411643b027fSmrg# distribute this file as part of a program that contains a 4412643b027fSmrg# configuration script generated by Autoconf, you may include it under 4413643b027fSmrg# the same distribution terms that you use for the rest of that program. 4414fe5e51b7Smrg 4415643b027fSmrg# A sed program that does not truncate output. 4416643b027fSmrgSED=$lt_SED 4417fe5e51b7Smrg 4418643b027fSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 4419643b027fSmrgXsed="$SED -e 1s/^X//" 4420fe5e51b7Smrg 4421643b027fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 4422643b027fSmrg# if CDPATH is set. 4423643b027fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4424fe5e51b7Smrg 4425643b027fSmrg# The names of the tagged configurations supported by this script. 4426643b027fSmrgavailable_tags= 4427fe5e51b7Smrg 4428643b027fSmrg# ### BEGIN LIBTOOL CONFIG], 4429643b027fSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 4430fe5e51b7Smrg 4431643b027fSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4432fe5e51b7Smrg 4433643b027fSmrg# Shell to use when invoking shell scripts. 4434643b027fSmrgSHELL=$lt_SHELL 4435fe5e51b7Smrg 4436643b027fSmrg# Whether or not to build shared libraries. 4437643b027fSmrgbuild_libtool_libs=$enable_shared 4438fe5e51b7Smrg 4439643b027fSmrg# Whether or not to build static libraries. 4440643b027fSmrgbuild_old_libs=$enable_static 4441fe5e51b7Smrg 4442643b027fSmrg# Whether or not to add -lc for building shared libraries. 4443643b027fSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 4444fe5e51b7Smrg 4445643b027fSmrg# Whether or not to disallow shared libs when runtime libs are static 4446643b027fSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 4447fe5e51b7Smrg 4448643b027fSmrg# Whether or not to optimize for fast installation. 4449643b027fSmrgfast_install=$enable_fast_install 4450fe5e51b7Smrg 4451643b027fSmrg# The host system. 4452643b027fSmrghost_alias=$host_alias 4453643b027fSmrghost=$host 4454643b027fSmrghost_os=$host_os 4455fe5e51b7Smrg 4456643b027fSmrg# The build system. 4457643b027fSmrgbuild_alias=$build_alias 4458643b027fSmrgbuild=$build 4459643b027fSmrgbuild_os=$build_os 4460fe5e51b7Smrg 4461643b027fSmrg# An echo program that does not interpret backslashes. 4462643b027fSmrgecho=$lt_echo 4463fe5e51b7Smrg 4464643b027fSmrg# The archiver. 4465643b027fSmrgAR=$lt_AR 4466643b027fSmrgAR_FLAGS=$lt_AR_FLAGS 4467fe5e51b7Smrg 4468643b027fSmrg# A C compiler. 4469643b027fSmrgLTCC=$lt_LTCC 4470fe5e51b7Smrg 4471643b027fSmrg# LTCC compiler flags. 4472643b027fSmrgLTCFLAGS=$lt_LTCFLAGS 4473fe5e51b7Smrg 4474643b027fSmrg# A language-specific compiler. 4475643b027fSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 4476fe5e51b7Smrg 4477643b027fSmrg# Is the compiler the GNU C compiler? 4478643b027fSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 4479fe5e51b7Smrg 4480643b027fSmrg# An ERE matcher. 4481643b027fSmrgEGREP=$lt_EGREP 4482fe5e51b7Smrg 4483643b027fSmrg# The linker used to build libraries. 4484643b027fSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 4485fe5e51b7Smrg 4486643b027fSmrg# Whether we need hard or soft links. 4487643b027fSmrgLN_S=$lt_LN_S 4488fe5e51b7Smrg 4489643b027fSmrg# A BSD-compatible nm program. 4490643b027fSmrgNM=$lt_NM 4491fe5e51b7Smrg 4492643b027fSmrg# A symbol stripping program 4493643b027fSmrgSTRIP=$lt_STRIP 4494fe5e51b7Smrg 4495643b027fSmrg# Used to examine libraries when file_magic_cmd begins "file" 4496643b027fSmrgMAGIC_CMD=$MAGIC_CMD 4497fe5e51b7Smrg 4498643b027fSmrg# Used on cygwin: DLL creation program. 4499643b027fSmrgDLLTOOL="$DLLTOOL" 4500fe5e51b7Smrg 4501643b027fSmrg# Used on cygwin: object dumper. 4502643b027fSmrgOBJDUMP="$OBJDUMP" 4503fe5e51b7Smrg 4504643b027fSmrg# Used on cygwin: assembler. 4505643b027fSmrgAS="$AS" 4506fe5e51b7Smrg 4507643b027fSmrg# The name of the directory that contains temporary libtool files. 4508643b027fSmrgobjdir=$objdir 4509fe5e51b7Smrg 4510643b027fSmrg# How to create reloadable object files. 4511643b027fSmrgreload_flag=$lt_reload_flag 4512643b027fSmrgreload_cmds=$lt_reload_cmds 4513fe5e51b7Smrg 4514643b027fSmrg# How to pass a linker flag through the compiler. 4515643b027fSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 4516fe5e51b7Smrg 4517643b027fSmrg# Object file suffix (normally "o"). 4518643b027fSmrgobjext="$ac_objext" 4519fe5e51b7Smrg 4520643b027fSmrg# Old archive suffix (normally "a"). 4521643b027fSmrglibext="$libext" 4522fe5e51b7Smrg 4523643b027fSmrg# Shared library suffix (normally ".so"). 4524643b027fSmrgshrext_cmds='$shrext_cmds' 4525fe5e51b7Smrg 4526643b027fSmrg# Executable file suffix (normally ""). 4527643b027fSmrgexeext="$exeext" 4528fe5e51b7Smrg 4529643b027fSmrg# Additional compiler flags for building library objects. 4530643b027fSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 4531643b027fSmrgpic_mode=$pic_mode 4532fe5e51b7Smrg 4533643b027fSmrg# What is the maximum length of a command? 4534643b027fSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 4535fe5e51b7Smrg 4536643b027fSmrg# Does compiler simultaneously support -c and -o options? 4537643b027fSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 4538fe5e51b7Smrg 4539643b027fSmrg# Must we lock files when doing compilation? 4540643b027fSmrgneed_locks=$lt_need_locks 4541fe5e51b7Smrg 4542643b027fSmrg# Do we need the lib prefix for modules? 4543643b027fSmrgneed_lib_prefix=$need_lib_prefix 4544fe5e51b7Smrg 4545643b027fSmrg# Do we need a version for libraries? 4546643b027fSmrgneed_version=$need_version 4547fe5e51b7Smrg 4548643b027fSmrg# Whether dlopen is supported. 4549643b027fSmrgdlopen_support=$enable_dlopen 4550fe5e51b7Smrg 4551643b027fSmrg# Whether dlopen of programs is supported. 4552643b027fSmrgdlopen_self=$enable_dlopen_self 4553fe5e51b7Smrg 4554643b027fSmrg# Whether dlopen of statically linked programs is supported. 4555643b027fSmrgdlopen_self_static=$enable_dlopen_self_static 4556fe5e51b7Smrg 4557643b027fSmrg# Compiler flag to prevent dynamic linking. 4558643b027fSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 4559fe5e51b7Smrg 4560643b027fSmrg# Compiler flag to turn off builtin functions. 4561643b027fSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 4562fe5e51b7Smrg 4563643b027fSmrg# Compiler flag to allow reflexive dlopens. 4564643b027fSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 4565fe5e51b7Smrg 4566643b027fSmrg# Compiler flag to generate shared objects directly from archives. 4567643b027fSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 4568fe5e51b7Smrg 4569643b027fSmrg# Compiler flag to generate thread-safe objects. 4570643b027fSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 4571fe5e51b7Smrg 4572643b027fSmrg# Library versioning type. 4573643b027fSmrgversion_type=$version_type 4574fe5e51b7Smrg 4575643b027fSmrg# Format of library name prefix. 4576643b027fSmrglibname_spec=$lt_libname_spec 4577fe5e51b7Smrg 4578643b027fSmrg# List of archive names. First name is the real one, the rest are links. 4579643b027fSmrg# The last name is the one that the linker finds with -lNAME. 4580643b027fSmrglibrary_names_spec=$lt_library_names_spec 4581fe5e51b7Smrg 4582643b027fSmrg# The coded name of the library, if different from the real name. 4583643b027fSmrgsoname_spec=$lt_soname_spec 4584fe5e51b7Smrg 4585643b027fSmrg# Commands used to build and install an old-style archive. 4586643b027fSmrgRANLIB=$lt_RANLIB 4587643b027fSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 4588643b027fSmrgold_postinstall_cmds=$lt_old_postinstall_cmds 4589643b027fSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 4590fe5e51b7Smrg 4591643b027fSmrg# Create an old-style archive from a shared archive. 4592643b027fSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 4593fe5e51b7Smrg 4594643b027fSmrg# Create a temporary old-style archive to link instead of a shared archive. 4595643b027fSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 4596fe5e51b7Smrg 4597643b027fSmrg# Commands used to build and install a shared archive. 4598643b027fSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 4599643b027fSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 4600643b027fSmrgpostinstall_cmds=$lt_postinstall_cmds 4601643b027fSmrgpostuninstall_cmds=$lt_postuninstall_cmds 4602fe5e51b7Smrg 4603643b027fSmrg# Commands used to build a loadable module (assumed same as above if empty) 4604643b027fSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 4605643b027fSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 4606fe5e51b7Smrg 4607643b027fSmrg# Commands to strip libraries. 4608643b027fSmrgold_striplib=$lt_old_striplib 4609643b027fSmrgstriplib=$lt_striplib 4610fe5e51b7Smrg 4611643b027fSmrg# Dependencies to place before the objects being linked to create a 4612643b027fSmrg# shared library. 4613643b027fSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 4614fe5e51b7Smrg 4615643b027fSmrg# Dependencies to place after the objects being linked to create a 4616643b027fSmrg# shared library. 4617643b027fSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 4618fe5e51b7Smrg 4619643b027fSmrg# Dependencies to place before the objects being linked to create a 4620643b027fSmrg# shared library. 4621643b027fSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 4622fe5e51b7Smrg 4623643b027fSmrg# Dependencies to place after the objects being linked to create a 4624643b027fSmrg# shared library. 4625643b027fSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 4626fe5e51b7Smrg 4627643b027fSmrg# The directories searched by this compiler when creating a shared 4628643b027fSmrg# library 4629643b027fSmrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 4630fe5e51b7Smrg 4631643b027fSmrg# The library search path used internally by the compiler when linking 4632643b027fSmrg# a shared library. 4633643b027fSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 4634fe5e51b7Smrg 4635643b027fSmrg# Method to check whether dependent libraries are shared objects. 4636643b027fSmrgdeplibs_check_method=$lt_deplibs_check_method 4637fe5e51b7Smrg 4638643b027fSmrg# Command to use when deplibs_check_method == file_magic. 4639643b027fSmrgfile_magic_cmd=$lt_file_magic_cmd 4640fe5e51b7Smrg 4641643b027fSmrg# Flag that allows shared libraries with undefined symbols to be built. 4642643b027fSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 4643fe5e51b7Smrg 4644643b027fSmrg# Flag that forces no undefined symbols. 4645643b027fSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 4646fe5e51b7Smrg 4647643b027fSmrg# Commands used to finish a libtool library installation in a directory. 4648643b027fSmrgfinish_cmds=$lt_finish_cmds 4649fe5e51b7Smrg 4650643b027fSmrg# Same as above, but a single script fragment to be evaled but not shown. 4651643b027fSmrgfinish_eval=$lt_finish_eval 4652fe5e51b7Smrg 4653643b027fSmrg# Take the output of nm and produce a listing of raw symbols and C names. 4654643b027fSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 4655fe5e51b7Smrg 4656643b027fSmrg# Transform the output of nm in a proper C declaration 4657643b027fSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 4658fe5e51b7Smrg 4659643b027fSmrg# Transform the output of nm in a C name address pair 4660643b027fSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 4661fe5e51b7Smrg 4662643b027fSmrg# This is the shared library runtime path variable. 4663643b027fSmrgrunpath_var=$runpath_var 4664fe5e51b7Smrg 4665643b027fSmrg# This is the shared library path variable. 4666643b027fSmrgshlibpath_var=$shlibpath_var 4667fe5e51b7Smrg 4668643b027fSmrg# Is shlibpath searched before the hard-coded library search path? 4669643b027fSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 4670fe5e51b7Smrg 4671643b027fSmrg# How to hardcode a shared library path into an executable. 4672643b027fSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 4673fe5e51b7Smrg 4674643b027fSmrg# Whether we should hardcode library paths into libraries. 4675643b027fSmrghardcode_into_libs=$hardcode_into_libs 4676fe5e51b7Smrg 4677643b027fSmrg# Flag to hardcode \$libdir into a binary during linking. 4678643b027fSmrg# This must work even if \$libdir does not exist. 4679643b027fSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 4680fe5e51b7Smrg 4681643b027fSmrg# If ld is used when linking, flag to hardcode \$libdir into 4682643b027fSmrg# a binary during linking. This must work even if \$libdir does 4683643b027fSmrg# not exist. 4684643b027fSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 4685fe5e51b7Smrg 4686643b027fSmrg# Whether we need a single -rpath flag with a separated argument. 4687643b027fSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 4688fe5e51b7Smrg 4689643b027fSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 4690643b027fSmrg# resulting binary. 4691643b027fSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 4692fe5e51b7Smrg 4693643b027fSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 4694643b027fSmrg# resulting binary. 4695643b027fSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 4696fe5e51b7Smrg 4697643b027fSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 4698643b027fSmrg# the resulting binary. 4699643b027fSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 4700fe5e51b7Smrg 4701643b027fSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library 4702643b027fSmrg# and all subsequent libraries and executables linked against it. 4703643b027fSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 4704fe5e51b7Smrg 4705643b027fSmrg# Variables whose values should be saved in libtool wrapper scripts and 4706643b027fSmrg# restored at relink time. 4707643b027fSmrgvariables_saved_for_relink="$variables_saved_for_relink" 4708fe5e51b7Smrg 4709643b027fSmrg# Whether libtool must link a program against all its dependency libraries. 4710643b027fSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 4711fe5e51b7Smrg 4712643b027fSmrg# Compile-time system search path for libraries 4713643b027fSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 4714fe5e51b7Smrg 4715643b027fSmrg# Run-time system search path for libraries 4716643b027fSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 4717fe5e51b7Smrg 4718643b027fSmrg# Fix the shell variable \$srcfile for the compiler. 4719643b027fSmrgfix_srcfile_path=$lt_fix_srcfile_path 4720fe5e51b7Smrg 4721643b027fSmrg# Set to yes if exported symbols are required. 4722643b027fSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 4723fe5e51b7Smrg 4724643b027fSmrg# The commands to list exported symbols. 4725643b027fSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 4726fe5e51b7Smrg 4727643b027fSmrg# The commands to extract the exported symbol list from a shared archive. 4728643b027fSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 4729fe5e51b7Smrg 4730643b027fSmrg# Symbols that should not be listed in the preloaded symbols. 4731643b027fSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 4732fe5e51b7Smrg 4733643b027fSmrg# Symbols that must always be exported. 4734643b027fSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 4735fe5e51b7Smrg 4736643b027fSmrgifelse([$1],[], 4737643b027fSmrg[# ### END LIBTOOL CONFIG], 4738643b027fSmrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 4739fe5e51b7Smrg 4740643b027fSmrg__EOF__ 4741fe5e51b7Smrg 4742643b027fSmrgifelse([$1],[], [ 4743643b027fSmrg case $host_os in 4744643b027fSmrg aix3*) 4745643b027fSmrg cat <<\EOF >> "$cfgfile" 4746fe5e51b7Smrg 4747643b027fSmrg# AIX sometimes has problems with the GCC collect2 program. For some 4748643b027fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4749643b027fSmrg# vanish in a puff of smoke. 4750643b027fSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 4751643b027fSmrg COLLECT_NAMES= 4752643b027fSmrg export COLLECT_NAMES 4753643b027fSmrgfi 4754643b027fSmrgEOF 4755643b027fSmrg ;; 4756643b027fSmrg esac 4757fe5e51b7Smrg 4758643b027fSmrg # We use sed instead of cat because bash on DJGPP gets confused if 4759643b027fSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4760643b027fSmrg # text mode, it properly converts lines to CR/LF. This bash problem 4761643b027fSmrg # is reportedly fixed, but why not run on old versions too? 4762643b027fSmrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 4763fe5e51b7Smrg 4764643b027fSmrg mv -f "$cfgfile" "$ofile" || \ 4765643b027fSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4766643b027fSmrg chmod +x "$ofile" 4767643b027fSmrg]) 4768eda3803bSmrgelse 4769643b027fSmrg # If there is no Makefile yet, we rely on a make rule to execute 4770643b027fSmrg # `config.status --recheck' to rerun these tests and create the 4771643b027fSmrg # libtool script then. 4772643b027fSmrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 4773643b027fSmrg if test -f "$ltmain_in"; then 4774643b027fSmrg test -f Makefile && make "$ltmain" 4775643b027fSmrg fi 4776fe5e51b7Smrgfi 4777643b027fSmrg])# AC_LIBTOOL_CONFIG 4778fe5e51b7Smrg 4779fe5e51b7Smrg 4780643b027fSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 4781643b027fSmrg# ------------------------------------------- 4782643b027fSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 4783643b027fSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 4784eda3803bSmrg 4785643b027fSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4786fe5e51b7Smrg 4787643b027fSmrgif test "$GCC" = yes; then 4788643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4789fe5e51b7Smrg 4790643b027fSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4791643b027fSmrg lt_cv_prog_compiler_rtti_exceptions, 4792643b027fSmrg [-fno-rtti -fno-exceptions], [], 4793643b027fSmrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4794eda3803bSmrgfi 4795643b027fSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 4796fe5e51b7Smrg 4797fe5e51b7Smrg 4798643b027fSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4799643b027fSmrg# --------------------------------- 4800643b027fSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 4801643b027fSmrg[AC_REQUIRE([AC_CANONICAL_HOST]) 4802643b027fSmrgAC_REQUIRE([LT_AC_PROG_SED]) 4803643b027fSmrgAC_REQUIRE([AC_PROG_NM]) 4804643b027fSmrgAC_REQUIRE([AC_OBJEXT]) 4805643b027fSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 4806643b027fSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4807643b027fSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4808643b027fSmrg[ 4809643b027fSmrg# These are sane defaults that work on at least a few old systems. 4810643b027fSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4811fe5e51b7Smrg 4812643b027fSmrg# Character class describing NM global symbol codes. 4813643b027fSmrgsymcode='[[BCDEGRST]]' 4814fe5e51b7Smrg 4815643b027fSmrg# Regexp to match symbols that can be accessed directly from C. 4816643b027fSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4817fe5e51b7Smrg 4818643b027fSmrg# Transform an extracted symbol line into a proper C declaration 4819643b027fSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 4820eda3803bSmrg 4821643b027fSmrg# Transform an extracted symbol line into symbol name and symbol address 4822643b027fSmrglt_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'" 4823fe5e51b7Smrg 4824643b027fSmrg# Define system-specific variables. 4825643b027fSmrgcase $host_os in 4826643b027fSmrgaix*) 4827643b027fSmrg symcode='[[BCDT]]' 4828643b027fSmrg ;; 4829643b027fSmrgcygwin* | mingw* | pw32*) 4830643b027fSmrg symcode='[[ABCDGISTW]]' 4831643b027fSmrg ;; 4832643b027fSmrghpux*) # Its linker distinguishes data from code symbols 4833643b027fSmrg if test "$host_cpu" = ia64; then 4834643b027fSmrg symcode='[[ABCDEGRST]]' 4835643b027fSmrg fi 4836643b027fSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4837643b027fSmrg 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'" 4838643b027fSmrg ;; 4839643b027fSmrglinux* | k*bsd*-gnu) 4840643b027fSmrg if test "$host_cpu" = ia64; then 4841643b027fSmrg symcode='[[ABCDGIRSTW]]' 4842643b027fSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4843643b027fSmrg 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'" 4844643b027fSmrg fi 4845643b027fSmrg ;; 4846643b027fSmrgirix* | nonstopux*) 4847643b027fSmrg symcode='[[BCDEGRST]]' 4848643b027fSmrg ;; 4849643b027fSmrgosf*) 4850643b027fSmrg symcode='[[BCDEGQRST]]' 4851643b027fSmrg ;; 4852643b027fSmrgsolaris*) 4853643b027fSmrg symcode='[[BDRT]]' 4854643b027fSmrg ;; 4855643b027fSmrgsco3.2v5*) 4856643b027fSmrg symcode='[[DT]]' 4857643b027fSmrg ;; 4858643b027fSmrgsysv4.2uw2*) 4859643b027fSmrg symcode='[[DT]]' 4860643b027fSmrg ;; 4861643b027fSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 4862643b027fSmrg symcode='[[ABDT]]' 4863643b027fSmrg ;; 4864643b027fSmrgsysv4) 4865643b027fSmrg symcode='[[DFNSTU]]' 4866643b027fSmrg ;; 4867643b027fSmrgesac 4868eda3803bSmrg 4869643b027fSmrg# Handle CRLF in mingw tool chain 4870643b027fSmrgopt_cr= 4871643b027fSmrgcase $build_os in 4872643b027fSmrgmingw*) 4873643b027fSmrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4874643b027fSmrg ;; 4875643b027fSmrgesac 4876eda3803bSmrg 4877643b027fSmrg# If we're using GNU nm, then use its standard symbol codes. 4878643b027fSmrgcase `$NM -V 2>&1` in 4879643b027fSmrg*GNU* | *'with BFD'*) 4880643b027fSmrg symcode='[[ABCDGIRSTW]]' ;; 4881643b027fSmrgesac 4882fe5e51b7Smrg 4883643b027fSmrg# Try without a prefix undercore, then with it. 4884643b027fSmrgfor ac_symprfx in "" "_"; do 4885fe5e51b7Smrg 4886643b027fSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4887643b027fSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4888fe5e51b7Smrg 4889643b027fSmrg # Write the raw and C identifiers. 4890643b027fSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4891eda3803bSmrg 4892643b027fSmrg # Check to see that the pipe works correctly. 4893643b027fSmrg pipe_works=no 4894eda3803bSmrg 4895643b027fSmrg rm -f conftest* 4896643b027fSmrg cat > conftest.$ac_ext <<EOF 4897643b027fSmrg#ifdef __cplusplus 4898643b027fSmrgextern "C" { 4899643b027fSmrg#endif 4900643b027fSmrgchar nm_test_var; 4901643b027fSmrgvoid nm_test_func(){} 4902643b027fSmrg#ifdef __cplusplus 4903643b027fSmrg} 4904643b027fSmrg#endif 4905643b027fSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 4906643b027fSmrgEOF 4907eda3803bSmrg 4908643b027fSmrg if AC_TRY_EVAL(ac_compile); then 4909643b027fSmrg # Now try to grab the symbols. 4910643b027fSmrg nlist=conftest.nm 4911643b027fSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 4912643b027fSmrg # Try sorting and uniquifying the output. 4913643b027fSmrg if sort "$nlist" | uniq > "$nlist"T; then 4914643b027fSmrg mv -f "$nlist"T "$nlist" 4915643b027fSmrg else 4916643b027fSmrg rm -f "$nlist"T 4917643b027fSmrg fi 4918eda3803bSmrg 4919643b027fSmrg # Make sure that we snagged all the symbols we need. 4920643b027fSmrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 4921643b027fSmrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 4922643b027fSmrg cat <<EOF > conftest.$ac_ext 4923643b027fSmrg#ifdef __cplusplus 4924643b027fSmrgextern "C" { 4925643b027fSmrg#endif 4926fe5e51b7Smrg 4927643b027fSmrgEOF 4928643b027fSmrg # Now generate the symbol file. 4929643b027fSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 4930eda3803bSmrg 4931643b027fSmrg cat <<EOF >> conftest.$ac_ext 4932643b027fSmrg#if defined (__STDC__) && __STDC__ 4933643b027fSmrg# define lt_ptr_t void * 4934643b027fSmrg#else 4935643b027fSmrg# define lt_ptr_t char * 4936643b027fSmrg# define const 4937643b027fSmrg#endif 4938eda3803bSmrg 4939643b027fSmrg/* The mapping between symbol names and symbols. */ 4940643b027fSmrgconst struct { 4941643b027fSmrg const char *name; 4942643b027fSmrg lt_ptr_t address; 4943643b027fSmrg} 4944643b027fSmrglt_preloaded_symbols[[]] = 4945643b027fSmrg{ 4946643b027fSmrgEOF 4947643b027fSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 4948643b027fSmrg cat <<\EOF >> conftest.$ac_ext 4949643b027fSmrg {0, (lt_ptr_t) 0} 4950643b027fSmrg}; 4951eda3803bSmrg 4952643b027fSmrg#ifdef __cplusplus 4953643b027fSmrg} 4954643b027fSmrg#endif 4955643b027fSmrgEOF 4956643b027fSmrg # Now try linking the two files. 4957643b027fSmrg mv conftest.$ac_objext conftstm.$ac_objext 4958643b027fSmrg lt_save_LIBS="$LIBS" 4959643b027fSmrg lt_save_CFLAGS="$CFLAGS" 4960643b027fSmrg LIBS="conftstm.$ac_objext" 4961643b027fSmrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4962643b027fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4963643b027fSmrg pipe_works=yes 4964643b027fSmrg fi 4965643b027fSmrg LIBS="$lt_save_LIBS" 4966643b027fSmrg CFLAGS="$lt_save_CFLAGS" 4967643b027fSmrg else 4968643b027fSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4969fe5e51b7Smrg fi 4970643b027fSmrg else 4971643b027fSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4972643b027fSmrg fi 4973643b027fSmrg else 4974643b027fSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4975643b027fSmrg fi 4976643b027fSmrg else 4977643b027fSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4978643b027fSmrg cat conftest.$ac_ext >&5 4979643b027fSmrg fi 4980643b027fSmrg rm -rf conftest* conftst* 4981fe5e51b7Smrg 4982643b027fSmrg # Do not use the global_symbol_pipe unless it works. 4983643b027fSmrg if test "$pipe_works" = yes; then 4984643b027fSmrg break 4985643b027fSmrg else 4986643b027fSmrg lt_cv_sys_global_symbol_pipe= 4987643b027fSmrg fi 4988643b027fSmrgdone 4989643b027fSmrg]) 4990643b027fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4991643b027fSmrg lt_cv_sys_global_symbol_to_cdecl= 4992643b027fSmrgfi 4993643b027fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4994643b027fSmrg AC_MSG_RESULT(failed) 4995643b027fSmrgelse 4996643b027fSmrg AC_MSG_RESULT(ok) 4997643b027fSmrgfi 4998643b027fSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4999fe5e51b7Smrg 5000fe5e51b7Smrg 5001643b027fSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 5002643b027fSmrg# --------------------------------------- 5003643b027fSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 5004643b027fSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 5005643b027fSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5006643b027fSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 5007fe5e51b7Smrg 5008643b027fSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 5009643b027fSmrg ifelse([$1],[CXX],[ 5010643b027fSmrg # C++ specific cases for pic, static, wl, etc. 5011643b027fSmrg if test "$GXX" = yes; then 5012643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5013643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5014fe5e51b7Smrg 5015643b027fSmrg case $host_os in 5016643b027fSmrg aix*) 5017643b027fSmrg # All AIX code is PIC. 5018643b027fSmrg if test "$host_cpu" = ia64; then 5019643b027fSmrg # AIX 5 now supports IA64 processor 5020643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5021643b027fSmrg fi 5022643b027fSmrg ;; 5023643b027fSmrg amigaos*) 5024643b027fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 5025643b027fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 5026643b027fSmrg # like `-m68040'. 5027643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5028643b027fSmrg ;; 5029643b027fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5030643b027fSmrg # PIC is the default for these OSes. 5031643b027fSmrg ;; 5032643b027fSmrg mingw* | cygwin* | os2* | pw32*) 5033643b027fSmrg # This hack is so that the source file can tell whether it is being 5034643b027fSmrg # built for inclusion in a dll (and should export symbols for example). 5035643b027fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5036643b027fSmrg # (--disable-auto-import) libraries 5037643b027fSmrg m4_if([$1], [GCJ], [], 5038643b027fSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5039643b027fSmrg ;; 5040643b027fSmrg darwin* | rhapsody*) 5041643b027fSmrg # PIC is the default on this platform 5042643b027fSmrg # Common symbols not allowed in MH_DYLIB files 5043643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5044643b027fSmrg ;; 5045643b027fSmrg *djgpp*) 5046643b027fSmrg # DJGPP does not support shared libraries at all 5047643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5048643b027fSmrg ;; 5049643b027fSmrg interix[[3-9]]*) 5050643b027fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5051643b027fSmrg # Instead, we relocate shared libraries at runtime. 5052643b027fSmrg ;; 5053643b027fSmrg sysv4*MP*) 5054643b027fSmrg if test -d /usr/nec; then 5055643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5056643b027fSmrg fi 5057643b027fSmrg ;; 5058643b027fSmrg hpux*) 5059643b027fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5060643b027fSmrg # not for PA HP-UX. 5061643b027fSmrg case $host_cpu in 5062643b027fSmrg hppa*64*|ia64*) 5063643b027fSmrg ;; 5064643b027fSmrg *) 5065643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5066643b027fSmrg ;; 5067643b027fSmrg esac 5068643b027fSmrg ;; 5069643b027fSmrg *) 5070643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5071643b027fSmrg ;; 5072643b027fSmrg esac 5073643b027fSmrg else 5074643b027fSmrg case $host_os in 5075643b027fSmrg aix[[4-9]]*) 5076643b027fSmrg # All AIX code is PIC. 5077643b027fSmrg if test "$host_cpu" = ia64; then 5078643b027fSmrg # AIX 5 now supports IA64 processor 5079643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5080643b027fSmrg else 5081643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5082643b027fSmrg fi 5083643b027fSmrg ;; 5084643b027fSmrg chorus*) 5085643b027fSmrg case $cc_basename in 5086643b027fSmrg cxch68*) 5087643b027fSmrg # Green Hills C++ Compiler 5088643b027fSmrg # _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" 5089643b027fSmrg ;; 5090643b027fSmrg esac 5091643b027fSmrg ;; 5092643b027fSmrg darwin*) 5093643b027fSmrg # PIC is the default on this platform 5094643b027fSmrg # Common symbols not allowed in MH_DYLIB files 5095643b027fSmrg case $cc_basename in 5096643b027fSmrg xlc*) 5097643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5098643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5099643b027fSmrg ;; 5100643b027fSmrg esac 5101643b027fSmrg ;; 5102643b027fSmrg dgux*) 5103643b027fSmrg case $cc_basename in 5104643b027fSmrg ec++*) 5105643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5106643b027fSmrg ;; 5107643b027fSmrg ghcx*) 5108643b027fSmrg # Green Hills C++ Compiler 5109643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5110643b027fSmrg ;; 5111643b027fSmrg *) 5112643b027fSmrg ;; 5113643b027fSmrg esac 5114643b027fSmrg ;; 5115643b027fSmrg freebsd* | dragonfly*) 5116643b027fSmrg # FreeBSD uses GNU C++ 5117643b027fSmrg ;; 5118643b027fSmrg hpux9* | hpux10* | hpux11*) 5119643b027fSmrg case $cc_basename in 5120643b027fSmrg CC*) 5121643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5122643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5123643b027fSmrg if test "$host_cpu" != ia64; then 5124643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5125643b027fSmrg fi 5126643b027fSmrg ;; 5127643b027fSmrg aCC*) 5128643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5129643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5130643b027fSmrg case $host_cpu in 5131643b027fSmrg hppa*64*|ia64*) 5132643b027fSmrg # +Z the default 5133643b027fSmrg ;; 5134643b027fSmrg *) 5135643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5136643b027fSmrg ;; 5137643b027fSmrg esac 5138643b027fSmrg ;; 5139643b027fSmrg *) 5140643b027fSmrg ;; 5141643b027fSmrg esac 5142643b027fSmrg ;; 5143643b027fSmrg interix*) 5144643b027fSmrg # This is c89, which is MS Visual C++ (no shared libs) 5145643b027fSmrg # Anyone wants to do a port? 5146643b027fSmrg ;; 5147643b027fSmrg irix5* | irix6* | nonstopux*) 5148643b027fSmrg case $cc_basename in 5149643b027fSmrg CC*) 5150643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5151643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5152643b027fSmrg # CC pic flag -KPIC is the default. 5153643b027fSmrg ;; 5154643b027fSmrg *) 5155643b027fSmrg ;; 5156643b027fSmrg esac 5157643b027fSmrg ;; 5158643b027fSmrg linux* | k*bsd*-gnu) 5159643b027fSmrg case $cc_basename in 5160643b027fSmrg KCC*) 5161643b027fSmrg # KAI C++ Compiler 5162643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5163643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5164643b027fSmrg ;; 5165643b027fSmrg icpc* | ecpc*) 5166643b027fSmrg # Intel C++ 5167643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5168643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5169643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5170643b027fSmrg ;; 5171643b027fSmrg pgCC* | pgcpp*) 5172643b027fSmrg # Portland Group C++ compiler. 5173643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5174643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5175643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5176643b027fSmrg ;; 5177643b027fSmrg cxx*) 5178643b027fSmrg # Compaq C++ 5179643b027fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 5180643b027fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 5181643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5182643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5183643b027fSmrg ;; 5184643b027fSmrg *) 5185643b027fSmrg case `$CC -V 2>&1 | sed 5q` in 5186643b027fSmrg *Sun\ C*) 5187643b027fSmrg # Sun C++ 5.9 5188643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5189643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5190643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5191643b027fSmrg ;; 5192643b027fSmrg esac 5193643b027fSmrg ;; 5194643b027fSmrg esac 5195643b027fSmrg ;; 5196643b027fSmrg lynxos*) 5197643b027fSmrg ;; 5198643b027fSmrg m88k*) 5199643b027fSmrg ;; 5200643b027fSmrg mvs*) 5201643b027fSmrg case $cc_basename in 5202643b027fSmrg cxx*) 5203643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5204643b027fSmrg ;; 5205643b027fSmrg *) 5206643b027fSmrg ;; 5207643b027fSmrg esac 5208643b027fSmrg ;; 5209643b027fSmrg netbsd*) 5210643b027fSmrg ;; 5211643b027fSmrg osf3* | osf4* | osf5*) 5212643b027fSmrg case $cc_basename in 5213643b027fSmrg KCC*) 5214643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5215643b027fSmrg ;; 5216643b027fSmrg RCC*) 5217643b027fSmrg # Rational C++ 2.4.1 5218643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5219643b027fSmrg ;; 5220643b027fSmrg cxx*) 5221643b027fSmrg # Digital/Compaq C++ 5222643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5223643b027fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 5224643b027fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 5225643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5226643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5227643b027fSmrg ;; 5228643b027fSmrg *) 5229643b027fSmrg ;; 5230643b027fSmrg esac 5231643b027fSmrg ;; 5232643b027fSmrg psos*) 5233643b027fSmrg ;; 5234643b027fSmrg solaris*) 5235643b027fSmrg case $cc_basename in 5236643b027fSmrg CC*) 5237643b027fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 5238643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5239643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5240643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5241643b027fSmrg ;; 5242643b027fSmrg gcx*) 5243643b027fSmrg # Green Hills C++ Compiler 5244643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5245643b027fSmrg ;; 5246643b027fSmrg *) 5247643b027fSmrg ;; 5248643b027fSmrg esac 5249643b027fSmrg ;; 5250643b027fSmrg sunos4*) 5251643b027fSmrg case $cc_basename in 5252643b027fSmrg CC*) 5253643b027fSmrg # Sun C++ 4.x 5254643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5255643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5256643b027fSmrg ;; 5257643b027fSmrg lcc*) 5258643b027fSmrg # Lucid 5259643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5260643b027fSmrg ;; 5261643b027fSmrg *) 5262643b027fSmrg ;; 5263643b027fSmrg esac 5264643b027fSmrg ;; 5265643b027fSmrg tandem*) 5266643b027fSmrg case $cc_basename in 5267643b027fSmrg NCC*) 5268643b027fSmrg # NonStop-UX NCC 3.20 5269643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5270643b027fSmrg ;; 5271643b027fSmrg *) 5272643b027fSmrg ;; 5273643b027fSmrg esac 5274643b027fSmrg ;; 5275643b027fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5276643b027fSmrg case $cc_basename in 5277643b027fSmrg CC*) 5278643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5279643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5280643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5281643b027fSmrg ;; 5282643b027fSmrg esac 5283643b027fSmrg ;; 5284643b027fSmrg vxworks*) 5285643b027fSmrg ;; 5286643b027fSmrg *) 5287643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5288643b027fSmrg ;; 5289643b027fSmrg esac 5290643b027fSmrg fi 5291643b027fSmrg], 5292643b027fSmrg[ 5293643b027fSmrg if test "$GCC" = yes; then 5294643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5295643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5296eda3803bSmrg 5297643b027fSmrg case $host_os in 5298643b027fSmrg aix*) 5299643b027fSmrg # All AIX code is PIC. 5300643b027fSmrg if test "$host_cpu" = ia64; then 5301643b027fSmrg # AIX 5 now supports IA64 processor 5302643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5303643b027fSmrg fi 5304643b027fSmrg ;; 5305eda3803bSmrg 5306643b027fSmrg amigaos*) 5307643b027fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 5308643b027fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 5309643b027fSmrg # like `-m68040'. 5310643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5311643b027fSmrg ;; 5312eda3803bSmrg 5313643b027fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5314643b027fSmrg # PIC is the default for these OSes. 5315643b027fSmrg ;; 5316eda3803bSmrg 5317643b027fSmrg mingw* | cygwin* | pw32* | os2*) 5318643b027fSmrg # This hack is so that the source file can tell whether it is being 5319643b027fSmrg # built for inclusion in a dll (and should export symbols for example). 5320643b027fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5321643b027fSmrg # (--disable-auto-import) libraries 5322643b027fSmrg m4_if([$1], [GCJ], [], 5323643b027fSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5324643b027fSmrg ;; 5325eda3803bSmrg 5326643b027fSmrg darwin* | rhapsody*) 5327643b027fSmrg # PIC is the default on this platform 5328643b027fSmrg # Common symbols not allowed in MH_DYLIB files 5329643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5330643b027fSmrg ;; 5331eda3803bSmrg 5332643b027fSmrg interix[[3-9]]*) 5333643b027fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5334643b027fSmrg # Instead, we relocate shared libraries at runtime. 5335643b027fSmrg ;; 5336eda3803bSmrg 5337643b027fSmrg msdosdjgpp*) 5338643b027fSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 5339643b027fSmrg # on systems that don't support them. 5340643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5341643b027fSmrg enable_shared=no 5342643b027fSmrg ;; 5343fe5e51b7Smrg 5344643b027fSmrg sysv4*MP*) 5345643b027fSmrg if test -d /usr/nec; then 5346643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5347643b027fSmrg fi 5348643b027fSmrg ;; 5349fe5e51b7Smrg 5350643b027fSmrg hpux*) 5351643b027fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5352643b027fSmrg # not for PA HP-UX. 5353643b027fSmrg case $host_cpu in 5354643b027fSmrg hppa*64*|ia64*) 5355643b027fSmrg # +Z the default 5356643b027fSmrg ;; 5357643b027fSmrg *) 5358643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5359643b027fSmrg ;; 5360643b027fSmrg esac 5361643b027fSmrg ;; 5362fe5e51b7Smrg 5363643b027fSmrg *) 5364643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5365643b027fSmrg ;; 5366643b027fSmrg esac 5367643b027fSmrg else 5368643b027fSmrg # PORTME Check for flag to pass linker flags through the system compiler. 5369643b027fSmrg case $host_os in 5370643b027fSmrg aix*) 5371643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5372643b027fSmrg if test "$host_cpu" = ia64; then 5373643b027fSmrg # AIX 5 now supports IA64 processor 5374643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5375643b027fSmrg else 5376643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5377643b027fSmrg fi 5378643b027fSmrg ;; 5379643b027fSmrg darwin*) 5380643b027fSmrg # PIC is the default on this platform 5381643b027fSmrg # Common symbols not allowed in MH_DYLIB files 5382643b027fSmrg case $cc_basename in 5383643b027fSmrg xlc*) 5384643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5385643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5386643b027fSmrg ;; 5387643b027fSmrg esac 5388643b027fSmrg ;; 5389fe5e51b7Smrg 5390643b027fSmrg mingw* | cygwin* | pw32* | os2*) 5391643b027fSmrg # This hack is so that the source file can tell whether it is being 5392643b027fSmrg # built for inclusion in a dll (and should export symbols for example). 5393643b027fSmrg m4_if([$1], [GCJ], [], 5394643b027fSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5395643b027fSmrg ;; 5396fe5e51b7Smrg 5397643b027fSmrg hpux9* | hpux10* | hpux11*) 5398643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5399643b027fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5400643b027fSmrg # not for PA HP-UX. 5401643b027fSmrg case $host_cpu in 5402643b027fSmrg hppa*64*|ia64*) 5403643b027fSmrg # +Z the default 5404643b027fSmrg ;; 5405643b027fSmrg *) 5406643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5407643b027fSmrg ;; 5408643b027fSmrg esac 5409643b027fSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 5410643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5411643b027fSmrg ;; 5412fe5e51b7Smrg 5413643b027fSmrg irix5* | irix6* | nonstopux*) 5414643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5415643b027fSmrg # PIC (with -KPIC) is the default. 5416643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5417643b027fSmrg ;; 5418fe5e51b7Smrg 5419643b027fSmrg newsos6) 5420643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5421643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5422643b027fSmrg ;; 5423fe5e51b7Smrg 5424643b027fSmrg linux* | k*bsd*-gnu) 5425643b027fSmrg case $cc_basename in 5426643b027fSmrg icc* | ecc*) 5427643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5428643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5429643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5430643b027fSmrg ;; 5431643b027fSmrg pgcc* | pgf77* | pgf90* | pgf95*) 5432643b027fSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 5433643b027fSmrg # which looks to be a dead project) 5434643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5435643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5436643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5437643b027fSmrg ;; 5438643b027fSmrg ccc*) 5439643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5440643b027fSmrg # All Alpha code is PIC. 5441643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5442643b027fSmrg ;; 5443643b027fSmrg *) 5444643b027fSmrg case `$CC -V 2>&1 | sed 5q` in 5445643b027fSmrg *Sun\ C*) 5446643b027fSmrg # Sun C 5.9 5447643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5448643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5449643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5450643b027fSmrg ;; 5451643b027fSmrg *Sun\ F*) 5452643b027fSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 5453643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5454643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5455643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 5456643b027fSmrg ;; 5457643b027fSmrg esac 5458643b027fSmrg ;; 5459643b027fSmrg esac 5460643b027fSmrg ;; 5461fe5e51b7Smrg 5462643b027fSmrg osf3* | osf4* | osf5*) 5463643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5464643b027fSmrg # All OSF/1 code is PIC. 5465643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5466643b027fSmrg ;; 5467fe5e51b7Smrg 5468643b027fSmrg rdos*) 5469643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5470643b027fSmrg ;; 5471fe5e51b7Smrg 5472643b027fSmrg solaris*) 5473643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5474643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5475643b027fSmrg case $cc_basename in 5476643b027fSmrg f77* | f90* | f95*) 5477643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5478643b027fSmrg *) 5479643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5480643b027fSmrg esac 5481643b027fSmrg ;; 5482fe5e51b7Smrg 5483643b027fSmrg sunos4*) 5484643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5485643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5486643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5487643b027fSmrg ;; 5488fe5e51b7Smrg 5489643b027fSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 5490643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5491643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5492643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5493643b027fSmrg ;; 5494fe5e51b7Smrg 5495643b027fSmrg sysv4*MP*) 5496643b027fSmrg if test -d /usr/nec ;then 5497643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5498643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5499643b027fSmrg fi 5500643b027fSmrg ;; 5501fe5e51b7Smrg 5502643b027fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5503643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5504643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5505643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5506643b027fSmrg ;; 5507eda3803bSmrg 5508643b027fSmrg unicos*) 5509643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5510643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5511643b027fSmrg ;; 5512eda3803bSmrg 5513643b027fSmrg uts4*) 5514643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5515643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5516643b027fSmrg ;; 5517eda3803bSmrg 5518643b027fSmrg *) 5519643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5520643b027fSmrg ;; 5521643b027fSmrg esac 5522fe5e51b7Smrg fi 5523fe5e51b7Smrg]) 5524643b027fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 5525fe5e51b7Smrg 5526643b027fSmrg# 5527643b027fSmrg# Check to make sure the PIC flag actually works. 5528643b027fSmrg# 5529643b027fSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 5530643b027fSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 5531643b027fSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 5532643b027fSmrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 5533643b027fSmrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 5534643b027fSmrg "" | " "*) ;; 5535643b027fSmrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5536643b027fSmrg esac], 5537643b027fSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5538643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5539fe5e51b7Smrgfi 5540643b027fSmrgcase $host_os in 5541643b027fSmrg # For platforms which do not support PIC, -DPIC is meaningless: 5542643b027fSmrg *djgpp*) 5543643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5544643b027fSmrg ;; 5545643b027fSmrg *) 5546643b027fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 5547643b027fSmrg ;; 5548fe5e51b7Smrgesac 5549eda3803bSmrg 5550643b027fSmrg# 5551643b027fSmrg# Check to make sure the static flag actually works. 5552643b027fSmrg# 5553643b027fSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 5554643b027fSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5555643b027fSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5556643b027fSmrg $lt_tmp_static_flag, 5557643b027fSmrg [], 5558643b027fSmrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 5559643b027fSmrg]) 5560eda3803bSmrg 5561eda3803bSmrg 5562643b027fSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 5563643b027fSmrg# ------------------------------------ 5564643b027fSmrg# See if the linker supports building shared libraries. 5565643b027fSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 5566643b027fSmrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 5567643b027fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5568643b027fSmrgifelse([$1],[CXX],[ 5569643b027fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5570643b027fSmrg case $host_os in 5571643b027fSmrg aix[[4-9]]*) 5572643b027fSmrg # If we're using GNU nm, then we don't want the "-C" option. 5573643b027fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5574643b027fSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5575643b027fSmrg _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' 5576643b027fSmrg else 5577643b027fSmrg _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' 5578643b027fSmrg fi 5579643b027fSmrg ;; 5580643b027fSmrg pw32*) 5581643b027fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5582643b027fSmrg ;; 5583643b027fSmrg cygwin* | mingw*) 5584643b027fSmrg _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' 5585643b027fSmrg ;; 5586643b027fSmrg *) 5587643b027fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5588643b027fSmrg ;; 5589eda3803bSmrg esac 5590643b027fSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5591643b027fSmrg],[ 5592643b027fSmrg runpath_var= 5593643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 5594643b027fSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5595643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)= 5596643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5597643b027fSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 5598643b027fSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5599643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5600643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5601643b027fSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 5602643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5603643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5604643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5605643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5606643b027fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5607643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5608643b027fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5609643b027fSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 5610643b027fSmrg _LT_AC_TAGVAR(module_cmds, $1)= 5611643b027fSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 5612643b027fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5613643b027fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5614643b027fSmrg # include_expsyms should be a list of space-separated symbols to be *always* 5615643b027fSmrg # included in the symbol list 5616643b027fSmrg _LT_AC_TAGVAR(include_expsyms, $1)= 5617643b027fSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 5618643b027fSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 5619643b027fSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5620643b027fSmrg # as well as any symbol that contains `d'. 5621643b027fSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5622643b027fSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5623643b027fSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 5624643b027fSmrg # the symbol is explicitly referenced. Since portable code cannot 5625643b027fSmrg # rely on this symbol name, it's probably fine to never include it in 5626643b027fSmrg # preloaded symbol tables. 5627643b027fSmrg # Exclude shared library initialization/finalization symbols. 5628643b027fSmrgdnl Note also adjust exclude_expsyms for C++ above. 5629643b027fSmrg extract_expsyms_cmds= 5630643b027fSmrg # Just being paranoid about ensuring that cc_basename is set. 5631643b027fSmrg _LT_CC_BASENAME([$compiler]) 5632643b027fSmrg case $host_os in 5633643b027fSmrg cygwin* | mingw* | pw32*) 5634643b027fSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5635643b027fSmrg # When not using gcc, we currently assume that we are using 5636643b027fSmrg # Microsoft Visual C++. 5637643b027fSmrg if test "$GCC" != yes; then 5638643b027fSmrg with_gnu_ld=no 5639643b027fSmrg fi 5640643b027fSmrg ;; 5641643b027fSmrg interix*) 5642643b027fSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5643643b027fSmrg with_gnu_ld=yes 5644643b027fSmrg ;; 5645643b027fSmrg openbsd*) 5646643b027fSmrg with_gnu_ld=no 5647fe5e51b7Smrg ;; 5648fe5e51b7Smrg esac 5649fe5e51b7Smrg 5650643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5651643b027fSmrg if test "$with_gnu_ld" = yes; then 5652643b027fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5653643b027fSmrg wlarc='${wl}' 5654fe5e51b7Smrg 5655643b027fSmrg # Set some defaults for GNU ld with shared library support. These 5656643b027fSmrg # are reset later if shared libraries are not supported. Putting them 5657643b027fSmrg # here allows them to be overridden if necessary. 5658643b027fSmrg runpath_var=LD_RUN_PATH 5659643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5660643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5661643b027fSmrg # ancient GNU ld didn't support --whole-archive et. al. 5662643b027fSmrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 5663643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5664643b027fSmrg else 5665643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5666643b027fSmrg fi 5667643b027fSmrg supports_anon_versioning=no 5668643b027fSmrg case `$LD -v 2>/dev/null` in 5669643b027fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5670643b027fSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5671643b027fSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5672643b027fSmrg *\ 2.11.*) ;; # other 2.11 versions 5673643b027fSmrg *) supports_anon_versioning=yes ;; 5674643b027fSmrg esac 5675fe5e51b7Smrg 5676643b027fSmrg # See if GNU ld supports shared libraries. 5677643b027fSmrg case $host_os in 5678643b027fSmrg aix[[3-9]]*) 5679643b027fSmrg # On AIX/PPC, the GNU linker is very broken 5680643b027fSmrg if test "$host_cpu" != ia64; then 5681643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5682643b027fSmrg cat <<EOF 1>&2 5683fe5e51b7Smrg 5684643b027fSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 5685643b027fSmrg*** to be unable to reliably create shared libraries on AIX. 5686643b027fSmrg*** Therefore, libtool is disabling shared libraries support. If you 5687643b027fSmrg*** really care for shared libraries, you may want to modify your PATH 5688643b027fSmrg*** so that a non-GNU linker is found, and then restart. 5689fe5e51b7Smrg 5690643b027fSmrgEOF 5691643b027fSmrg fi 5692643b027fSmrg ;; 5693fe5e51b7Smrg 5694643b027fSmrg amigaos*) 5695643b027fSmrg _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)' 5696643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5697643b027fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5698643b027fSmrg 5699643b027fSmrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 5700643b027fSmrg # that the semantics of dynamic libraries on AmigaOS, at least up 5701643b027fSmrg # to version 4, is to share data among multiple programs linked 5702643b027fSmrg # with the same dynamic library. Since this doesn't match the 5703643b027fSmrg # behavior of shared libraries on other platforms, we can't use 5704643b027fSmrg # them. 5705643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5706643b027fSmrg ;; 5707fe5e51b7Smrg 5708643b027fSmrg beos*) 5709643b027fSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5710643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5711643b027fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5712643b027fSmrg # support --undefined. This deserves some investigation. FIXME 5713643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5714643b027fSmrg else 5715643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5716643b027fSmrg fi 5717643b027fSmrg ;; 5718fe5e51b7Smrg 5719643b027fSmrg cygwin* | mingw* | pw32*) 5720643b027fSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5721643b027fSmrg # as there is no search path for DLLs. 5722643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5723643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5724643b027fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5725643b027fSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5726643b027fSmrg _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' 5727643b027fSmrg 5728643b027fSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5729643b027fSmrg _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' 5730643b027fSmrg # If the export-symbols file already is a .def file (1st line 5731643b027fSmrg # is EXPORTS), use it as is; otherwise, prepend... 5732643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5733643b027fSmrg cp $export_symbols $output_objdir/$soname.def; 5734643b027fSmrg else 5735643b027fSmrg echo EXPORTS > $output_objdir/$soname.def; 5736643b027fSmrg cat $export_symbols >> $output_objdir/$soname.def; 5737643b027fSmrg fi~ 5738643b027fSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5739643b027fSmrg else 5740643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5741643b027fSmrg fi 5742643b027fSmrg ;; 5743fe5e51b7Smrg 5744643b027fSmrg interix[[3-9]]*) 5745643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5746643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5747643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5748643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5749643b027fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5750643b027fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5751643b027fSmrg # default) and relocated if they conflict, which is a slow very memory 5752643b027fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 5753643b027fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5754643b027fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5755643b027fSmrg _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' 5756643b027fSmrg _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' 5757643b027fSmrg ;; 5758fe5e51b7Smrg 5759643b027fSmrg gnu* | linux* | k*bsd*-gnu) 5760643b027fSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5761643b027fSmrg tmp_addflag= 5762643b027fSmrg case $cc_basename,$host_cpu in 5763643b027fSmrg pgcc*) # Portland Group C compiler 5764643b027fSmrg _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' 5765643b027fSmrg tmp_addflag=' $pic_flag' 5766643b027fSmrg ;; 5767643b027fSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 5768643b027fSmrg _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' 5769643b027fSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 5770643b027fSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5771643b027fSmrg tmp_addflag=' -i_dynamic' ;; 5772643b027fSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5773643b027fSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5774643b027fSmrg ifc* | ifort*) # Intel Fortran compiler 5775643b027fSmrg tmp_addflag=' -nofor_main' ;; 5776643b027fSmrg esac 5777643b027fSmrg case `$CC -V 2>&1 | sed 5q` in 5778643b027fSmrg *Sun\ C*) # Sun C 5.9 5779643b027fSmrg _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' 5780643b027fSmrg tmp_sharedflag='-G' ;; 5781643b027fSmrg *Sun\ F*) # Sun Fortran 8.3 5782643b027fSmrg tmp_sharedflag='-G' ;; 5783643b027fSmrg *) 5784643b027fSmrg tmp_sharedflag='-shared' ;; 5785643b027fSmrg esac 5786643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5787fe5e51b7Smrg 5788643b027fSmrg if test $supports_anon_versioning = yes; then 5789643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 5790643b027fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5791643b027fSmrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 5792643b027fSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5793643b027fSmrg fi 5794643b027fSmrg else 5795643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5796643b027fSmrg fi 5797643b027fSmrg ;; 5798fe5e51b7Smrg 5799643b027fSmrg netbsd*) 5800643b027fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5801643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5802643b027fSmrg wlarc= 5803643b027fSmrg else 5804643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5805643b027fSmrg _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' 5806643b027fSmrg fi 5807643b027fSmrg ;; 5808fe5e51b7Smrg 5809643b027fSmrg solaris*) 5810643b027fSmrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 5811643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5812643b027fSmrg cat <<EOF 1>&2 5813fe5e51b7Smrg 5814643b027fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5815643b027fSmrg*** create shared libraries on Solaris systems. Therefore, libtool 5816643b027fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5817643b027fSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 5818643b027fSmrg*** your PATH or compiler configuration so that the native linker is 5819643b027fSmrg*** used, and then restart. 5820fe5e51b7Smrg 5821643b027fSmrgEOF 5822643b027fSmrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5823643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5824643b027fSmrg _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' 5825643b027fSmrg else 5826643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5827643b027fSmrg fi 5828643b027fSmrg ;; 5829fe5e51b7Smrg 5830643b027fSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5831643b027fSmrg case `$LD -v 2>&1` in 5832643b027fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5833643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5834643b027fSmrg cat <<_LT_EOF 1>&2 5835fe5e51b7Smrg 5836643b027fSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5837643b027fSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5838643b027fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5839643b027fSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5840643b027fSmrg*** your PATH or compiler configuration so that the native linker is 5841643b027fSmrg*** used, and then restart. 5842fe5e51b7Smrg 5843643b027fSmrg_LT_EOF 5844643b027fSmrg ;; 5845643b027fSmrg *) 5846643b027fSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5847643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 5848643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 5849643b027fSmrg _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' 5850643b027fSmrg else 5851643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5852643b027fSmrg fi 5853643b027fSmrg ;; 5854643b027fSmrg esac 5855643b027fSmrg ;; 5856fe5e51b7Smrg 5857643b027fSmrg sunos4*) 5858643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5859643b027fSmrg wlarc= 5860643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5861643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5862643b027fSmrg ;; 5863fe5e51b7Smrg 5864643b027fSmrg *) 5865643b027fSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5866643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5867643b027fSmrg _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' 5868643b027fSmrg else 5869643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5870643b027fSmrg fi 5871643b027fSmrg ;; 5872643b027fSmrg esac 5873fe5e51b7Smrg 5874643b027fSmrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 5875643b027fSmrg runpath_var= 5876643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5877643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5878643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5879643b027fSmrg fi 5880643b027fSmrg else 5881643b027fSmrg # PORTME fill in a description of your system's linker (not GNU ld) 5882643b027fSmrg case $host_os in 5883643b027fSmrg aix3*) 5884643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5885643b027fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5886643b027fSmrg _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' 5887643b027fSmrg # Note: this linker hardcodes the directories in LIBPATH if there 5888643b027fSmrg # are no directories specified by -L. 5889643b027fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5890643b027fSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 5891643b027fSmrg # Neither direct hardcoding nor static linking is supported with a 5892643b027fSmrg # broken collect2. 5893643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5894643b027fSmrg fi 5895643b027fSmrg ;; 5896fe5e51b7Smrg 5897643b027fSmrg aix[[4-9]]*) 5898643b027fSmrg if test "$host_cpu" = ia64; then 5899643b027fSmrg # On IA64, the linker does run time linking by default, so we don't 5900643b027fSmrg # have to do anything special. 5901643b027fSmrg aix_use_runtimelinking=no 5902643b027fSmrg exp_sym_flag='-Bexport' 5903643b027fSmrg no_entry_flag="" 5904643b027fSmrg else 5905643b027fSmrg # If we're using GNU nm, then we don't want the "-C" option. 5906643b027fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5907643b027fSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5908643b027fSmrg _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' 5909643b027fSmrg else 5910643b027fSmrg _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' 5911643b027fSmrg fi 5912643b027fSmrg aix_use_runtimelinking=no 5913fe5e51b7Smrg 5914643b027fSmrg # Test if we are trying to use run time linking or normal 5915643b027fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5916643b027fSmrg # need to do runtime linking. 5917643b027fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5918643b027fSmrg for ld_flag in $LDFLAGS; do 5919643b027fSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5920643b027fSmrg aix_use_runtimelinking=yes 5921643b027fSmrg break 5922643b027fSmrg fi 5923643b027fSmrg done 5924643b027fSmrg ;; 5925643b027fSmrg esac 5926fe5e51b7Smrg 5927643b027fSmrg exp_sym_flag='-bexport' 5928643b027fSmrg no_entry_flag='-bnoentry' 5929643b027fSmrg fi 5930fe5e51b7Smrg 5931643b027fSmrg # When large executables or shared objects are built, AIX ld can 5932643b027fSmrg # have problems creating the table of contents. If linking a library 5933643b027fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5934643b027fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5935643b027fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5936eda3803bSmrg 5937643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 5938643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5939643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5940643b027fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5941eda3803bSmrg 5942643b027fSmrg if test "$GCC" = yes; then 5943643b027fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5944643b027fSmrg # We only want to do this on AIX 4.2 and lower, the check 5945643b027fSmrg # below for broken collect2 doesn't work under 4.3+ 5946643b027fSmrg collect2name=`${CC} -print-prog-name=collect2` 5947643b027fSmrg if test -f "$collect2name" && \ 5948643b027fSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 5949643b027fSmrg then 5950643b027fSmrg # We have reworked collect2 5951643b027fSmrg : 5952643b027fSmrg else 5953643b027fSmrg # We have old collect2 5954643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5955643b027fSmrg # It fails to find uninstalled libraries when the uninstalled 5956643b027fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5957643b027fSmrg # to unsupported forces relinking 5958643b027fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5959643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5960643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5961643b027fSmrg fi 5962643b027fSmrg ;; 5963643b027fSmrg esac 5964643b027fSmrg shared_flag='-shared' 5965643b027fSmrg if test "$aix_use_runtimelinking" = yes; then 5966643b027fSmrg shared_flag="$shared_flag "'${wl}-G' 5967643b027fSmrg fi 5968643b027fSmrg else 5969643b027fSmrg # not using gcc 5970643b027fSmrg if test "$host_cpu" = ia64; then 5971643b027fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5972643b027fSmrg # chokes on -Wl,-G. The following line is correct: 5973643b027fSmrg shared_flag='-G' 5974643b027fSmrg else 5975643b027fSmrg if test "$aix_use_runtimelinking" = yes; then 5976643b027fSmrg shared_flag='${wl}-G' 5977643b027fSmrg else 5978643b027fSmrg shared_flag='${wl}-bM:SRE' 5979643b027fSmrg fi 5980643b027fSmrg fi 5981643b027fSmrg fi 5982eda3803bSmrg 5983643b027fSmrg # It seems that -bexpall does not export symbols beginning with 5984643b027fSmrg # underscore (_), so it is better to generate a list of symbols to export. 5985643b027fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5986643b027fSmrg if test "$aix_use_runtimelinking" = yes; then 5987643b027fSmrg # Warning - without using the other runtime loading flags (-brtl), 5988643b027fSmrg # -berok will link without error, but may produce a broken library. 5989643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5990643b027fSmrg # Determine the default libpath from the value encoded in an empty executable. 5991643b027fSmrg _LT_AC_SYS_LIBPATH_AIX 5992643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5993643b027fSmrg _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" 5994643b027fSmrg else 5995643b027fSmrg if test "$host_cpu" = ia64; then 5996643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5997643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5998643b027fSmrg _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" 5999643b027fSmrg else 6000643b027fSmrg # Determine the default libpath from the value encoded in an empty executable. 6001643b027fSmrg _LT_AC_SYS_LIBPATH_AIX 6002643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6003643b027fSmrg # Warning - without using the other run time loading flags, 6004643b027fSmrg # -berok will link without error, but may produce a broken library. 6005643b027fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6006643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6007643b027fSmrg # Exported symbols can be pulled into shared objects from archives 6008643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6009643b027fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6010643b027fSmrg # This is similar to how AIX traditionally builds its shared libraries. 6011643b027fSmrg _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' 6012643b027fSmrg fi 6013643b027fSmrg fi 6014643b027fSmrg ;; 6015eda3803bSmrg 6016643b027fSmrg amigaos*) 6017643b027fSmrg _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)' 6018643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6019643b027fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6020643b027fSmrg # see comment about different semantics on the GNU ld section 6021643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6022643b027fSmrg ;; 6023fe5e51b7Smrg 6024643b027fSmrg bsdi[[45]]*) 6025643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6026643b027fSmrg ;; 6027fe5e51b7Smrg 6028643b027fSmrg cygwin* | mingw* | pw32*) 6029643b027fSmrg # When not using gcc, we currently assume that we are using 6030643b027fSmrg # Microsoft Visual C++. 6031643b027fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6032643b027fSmrg # no search path for DLLs. 6033643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6034643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6035643b027fSmrg # Tell ltmain to make .lib files, not .a files. 6036643b027fSmrg libext=lib 6037643b027fSmrg # Tell ltmain to make .dll files, not .so files. 6038643b027fSmrg shrext_cmds=".dll" 6039643b027fSmrg # FIXME: Setting linknames here is a bad hack. 6040643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 6041643b027fSmrg # The linker will automatically build a .lib file if we build a DLL. 6042643b027fSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 6043643b027fSmrg # FIXME: Should let the user specify the lib program. 6044643b027fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6045643b027fSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 6046643b027fSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6047643b027fSmrg ;; 6048fe5e51b7Smrg 6049643b027fSmrg darwin* | rhapsody*) 6050643b027fSmrg case $host_os in 6051643b027fSmrg rhapsody* | darwin1.[[012]]) 6052643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 6053643b027fSmrg ;; 6054643b027fSmrg *) # Darwin 1.3 on 6055643b027fSmrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 6056643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6057643b027fSmrg else 6058643b027fSmrg case ${MACOSX_DEPLOYMENT_TARGET} in 6059643b027fSmrg 10.[[012]]) 6060643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6061643b027fSmrg ;; 6062643b027fSmrg 10.*) 6063643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 6064643b027fSmrg ;; 6065643b027fSmrg esac 6066643b027fSmrg fi 6067643b027fSmrg ;; 6068643b027fSmrg esac 6069643b027fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6070643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6071643b027fSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 6072643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6073643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 6074643b027fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6075643b027fSmrg if test "$GCC" = yes ; then 6076643b027fSmrg output_verbose_link_cmd='echo' 6077643b027fSmrg _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}" 6078643b027fSmrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 6079643b027fSmrg _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}" 6080643b027fSmrg _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}" 6081643b027fSmrg else 6082643b027fSmrg case $cc_basename in 6083643b027fSmrg xlc*) 6084643b027fSmrg output_verbose_link_cmd='echo' 6085643b027fSmrg _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' 6086643b027fSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 6087643b027fSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 6088643b027fSmrg _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}' 6089643b027fSmrg _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}' 6090643b027fSmrg ;; 6091643b027fSmrg *) 6092643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6093643b027fSmrg ;; 6094643b027fSmrg esac 6095643b027fSmrg fi 6096643b027fSmrg ;; 6097fe5e51b7Smrg 6098643b027fSmrg dgux*) 6099643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6100643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6101643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6102643b027fSmrg ;; 6103fe5e51b7Smrg 6104643b027fSmrg freebsd1*) 6105643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6106643b027fSmrg ;; 6107fe5e51b7Smrg 6108643b027fSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6109643b027fSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 6110643b027fSmrg # does not break anything, and helps significantly (at the cost of a little 6111643b027fSmrg # extra space). 6112643b027fSmrg freebsd2.2*) 6113643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6114643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6115643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6116643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6117643b027fSmrg ;; 6118fe5e51b7Smrg 6119643b027fSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6120643b027fSmrg freebsd2*) 6121643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6122643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6123643b027fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6124643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6125fe5e51b7Smrg ;; 6126fe5e51b7Smrg 6127643b027fSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6128643b027fSmrg freebsd* | dragonfly*) 6129643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 6130643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6131643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6132643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6133643b027fSmrg ;; 6134fe5e51b7Smrg 6135643b027fSmrg hpux9*) 6136643b027fSmrg if test "$GCC" = yes; then 6137643b027fSmrg _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' 6138643b027fSmrg else 6139643b027fSmrg _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' 6140643b027fSmrg fi 6141643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6142643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6143643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6144fe5e51b7Smrg 6145643b027fSmrg # hardcode_minus_L: Not really in the search PATH, 6146643b027fSmrg # but as the default location of the library. 6147643b027fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6148643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6149643b027fSmrg ;; 6150fe5e51b7Smrg 6151643b027fSmrg hpux10*) 6152643b027fSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6153643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6154643b027fSmrg else 6155643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6156643b027fSmrg fi 6157643b027fSmrg if test "$with_gnu_ld" = no; then 6158643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6159643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6160fe5e51b7Smrg 6161643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6162643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6163fe5e51b7Smrg 6164643b027fSmrg # hardcode_minus_L: Not really in the search PATH, 6165643b027fSmrg # but as the default location of the library. 6166643b027fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6167643b027fSmrg fi 6168643b027fSmrg ;; 6169fe5e51b7Smrg 6170643b027fSmrg hpux11*) 6171643b027fSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6172643b027fSmrg case $host_cpu in 6173643b027fSmrg hppa*64*) 6174643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6175643b027fSmrg ;; 6176643b027fSmrg ia64*) 6177643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6178643b027fSmrg ;; 6179643b027fSmrg *) 6180643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6181643b027fSmrg ;; 6182643b027fSmrg esac 6183643b027fSmrg else 6184643b027fSmrg case $host_cpu in 6185643b027fSmrg hppa*64*) 6186643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6187643b027fSmrg ;; 6188643b027fSmrg ia64*) 6189643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6190643b027fSmrg ;; 6191643b027fSmrg *) 6192643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6193643b027fSmrg ;; 6194643b027fSmrg esac 6195643b027fSmrg fi 6196643b027fSmrg if test "$with_gnu_ld" = no; then 6197643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6198643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6199fe5e51b7Smrg 6200643b027fSmrg case $host_cpu in 6201643b027fSmrg hppa*64*|ia64*) 6202643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 6203643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6204643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6205643b027fSmrg ;; 6206643b027fSmrg *) 6207643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6208643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6209fe5e51b7Smrg 6210643b027fSmrg # hardcode_minus_L: Not really in the search PATH, 6211643b027fSmrg # but as the default location of the library. 6212643b027fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6213643b027fSmrg ;; 6214643b027fSmrg esac 6215643b027fSmrg fi 6216fe5e51b7Smrg ;; 6217fe5e51b7Smrg 6218643b027fSmrg irix5* | irix6* | nonstopux*) 6219643b027fSmrg if test "$GCC" = yes; then 6220643b027fSmrg _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' 6221643b027fSmrg else 6222643b027fSmrg _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' 6223643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6224643b027fSmrg fi 6225643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6226643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6227643b027fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6228643b027fSmrg ;; 6229fe5e51b7Smrg 6230643b027fSmrg netbsd*) 6231643b027fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6232643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6233643b027fSmrg else 6234643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6235643b027fSmrg fi 6236643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6237643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6238643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6239643b027fSmrg ;; 6240fe5e51b7Smrg 6241643b027fSmrg newsos6) 6242643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6243643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6244643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6245643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6246643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6247643b027fSmrg ;; 6248fe5e51b7Smrg 6249643b027fSmrg openbsd*) 6250643b027fSmrg if test -f /usr/libexec/ld.so; then 6251643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6252643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6253643b027fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6254643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6255643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6256643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6257643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6258643b027fSmrg else 6259643b027fSmrg case $host_os in 6260643b027fSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6261643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6262643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6263643b027fSmrg ;; 6264643b027fSmrg *) 6265643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6266643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6267643b027fSmrg ;; 6268643b027fSmrg esac 6269643b027fSmrg fi 6270643b027fSmrg else 6271643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6272643b027fSmrg fi 6273643b027fSmrg ;; 6274fe5e51b7Smrg 6275643b027fSmrg os2*) 6276643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6277643b027fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6278643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6279643b027fSmrg _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' 6280643b027fSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6281643b027fSmrg ;; 6282fe5e51b7Smrg 6283643b027fSmrg osf3*) 6284643b027fSmrg if test "$GCC" = yes; then 6285643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6286643b027fSmrg _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' 6287643b027fSmrg else 6288643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6289643b027fSmrg _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' 6290643b027fSmrg fi 6291643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6292643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6293643b027fSmrg ;; 6294fe5e51b7Smrg 6295643b027fSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 6296643b027fSmrg if test "$GCC" = yes; then 6297643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6298643b027fSmrg _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' 6299643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6300643b027fSmrg else 6301643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6302643b027fSmrg _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' 6303643b027fSmrg _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~ 6304643b027fSmrg $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' 6305fe5e51b7Smrg 6306643b027fSmrg # Both c and cxx compiler support -rpath directly 6307643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6308643b027fSmrg fi 6309643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6310643b027fSmrg ;; 6311fe5e51b7Smrg 6312643b027fSmrg solaris*) 6313643b027fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6314643b027fSmrg if test "$GCC" = yes; then 6315643b027fSmrg wlarc='${wl}' 6316643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6317643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6318643b027fSmrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 6319643b027fSmrg else 6320643b027fSmrg wlarc='' 6321643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6322643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6323643b027fSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6324643b027fSmrg fi 6325643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6326643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6327643b027fSmrg case $host_os in 6328643b027fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6329643b027fSmrg *) 6330643b027fSmrg # The compiler driver will combine and reorder linker options, 6331643b027fSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 6332643b027fSmrg # but is careful enough not to reorder. 6333643b027fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6334643b027fSmrg if test "$GCC" = yes; then 6335643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6336643b027fSmrg else 6337643b027fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6338eda3803bSmrg fi 6339643b027fSmrg ;; 6340643b027fSmrg esac 6341643b027fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6342fe5e51b7Smrg ;; 6343fe5e51b7Smrg 6344643b027fSmrg sunos4*) 6345643b027fSmrg if test "x$host_vendor" = xsequent; then 6346643b027fSmrg # Use $CC to link under sequent, because it throws in some extra .o 6347643b027fSmrg # files that make .init and .fini sections work. 6348643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6349643b027fSmrg else 6350643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6351643b027fSmrg fi 6352643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6353643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6354643b027fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6355643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6356643b027fSmrg ;; 6357fe5e51b7Smrg 6358643b027fSmrg sysv4) 6359643b027fSmrg case $host_vendor in 6360643b027fSmrg sni) 6361643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6362643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6363643b027fSmrg ;; 6364643b027fSmrg siemens) 6365643b027fSmrg ## LD is ld it makes a PLAMLIB 6366643b027fSmrg ## CC just makes a GrossModule. 6367643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6368643b027fSmrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6369643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6370643b027fSmrg ;; 6371643b027fSmrg motorola) 6372643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6373643b027fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6374643b027fSmrg ;; 6375643b027fSmrg esac 6376643b027fSmrg runpath_var='LD_RUN_PATH' 6377643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6378643b027fSmrg ;; 6379fe5e51b7Smrg 6380643b027fSmrg sysv4.3*) 6381643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6382643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6383643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6384643b027fSmrg ;; 6385fe5e51b7Smrg 6386643b027fSmrg sysv4*MP*) 6387643b027fSmrg if test -d /usr/nec; then 6388643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6389643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6390643b027fSmrg runpath_var=LD_RUN_PATH 6391643b027fSmrg hardcode_runpath_var=yes 6392643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6393643b027fSmrg fi 6394643b027fSmrg ;; 6395fe5e51b7Smrg 6396643b027fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6397643b027fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6398643b027fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6399643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6400643b027fSmrg runpath_var='LD_RUN_PATH' 6401fe5e51b7Smrg 6402643b027fSmrg if test "$GCC" = yes; then 6403643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6404643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6405643b027fSmrg else 6406643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6407643b027fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6408643b027fSmrg fi 6409643b027fSmrg ;; 6410fe5e51b7Smrg 6411643b027fSmrg sysv5* | sco3.2v5* | sco5v6*) 6412643b027fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 6413643b027fSmrg # link with -lc, and that would cause any symbols used from libc to 6414643b027fSmrg # always be unresolved, which means just about no library would 6415643b027fSmrg # ever link correctly. If we're not using GNU ld we use -z text 6416643b027fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6417643b027fSmrg # as -z defs. 6418643b027fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6419643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6420643b027fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6421643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6422643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 6423643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 6424643b027fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6425643b027fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6426643b027fSmrg runpath_var='LD_RUN_PATH' 6427fe5e51b7Smrg 6428643b027fSmrg if test "$GCC" = yes; then 6429643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6430643b027fSmrg _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' 6431643b027fSmrg else 6432643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 6433643b027fSmrg _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' 6434643b027fSmrg fi 6435643b027fSmrg ;; 6436eda3803bSmrg 6437643b027fSmrg uts4*) 6438643b027fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6439643b027fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6440643b027fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6441643b027fSmrg ;; 6442eda3803bSmrg 6443643b027fSmrg *) 6444643b027fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6445643b027fSmrg ;; 6446643b027fSmrg esac 6447643b027fSmrg fi 6448fe5e51b7Smrg]) 6449643b027fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 6450643b027fSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6451fe5e51b7Smrg 6452643b027fSmrg# 6453643b027fSmrg# Do we need to explicitly link libc? 6454643b027fSmrg# 6455643b027fSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6456643b027fSmrgx|xyes) 6457643b027fSmrg # Assume -lc should be added 6458643b027fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6459fe5e51b7Smrg 6460643b027fSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 6461643b027fSmrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 6462643b027fSmrg *'~'*) 6463643b027fSmrg # FIXME: we may have to deal with multi-command sequences. 6464643b027fSmrg ;; 6465643b027fSmrg '$CC '*) 6466643b027fSmrg # Test whether the compiler implicitly links with -lc since on some 6467643b027fSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6468643b027fSmrg # to ld, don't add -lc before -lgcc. 6469643b027fSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6470643b027fSmrg $rm conftest* 6471643b027fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6472fe5e51b7Smrg 6473643b027fSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6474643b027fSmrg soname=conftest 6475643b027fSmrg lib=conftest 6476643b027fSmrg libobjs=conftest.$ac_objext 6477643b027fSmrg deplibs= 6478643b027fSmrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6479643b027fSmrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 6480643b027fSmrg compiler_flags=-v 6481643b027fSmrg linker_flags=-v 6482643b027fSmrg verstring= 6483643b027fSmrg output_objdir=. 6484643b027fSmrg libname=conftest 6485643b027fSmrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 6486643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6487643b027fSmrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 6488643b027fSmrg then 6489643b027fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6490643b027fSmrg else 6491643b027fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6492643b027fSmrg fi 6493643b027fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6494643b027fSmrg else 6495643b027fSmrg cat conftest.err 1>&5 6496643b027fSmrg fi 6497643b027fSmrg $rm conftest* 6498643b027fSmrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 6499643b027fSmrg ;; 6500643b027fSmrg esac 6501643b027fSmrg fi 6502643b027fSmrg ;; 6503643b027fSmrgesac 6504643b027fSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS 6505fe5e51b7Smrg 6506fe5e51b7Smrg 6507643b027fSmrg# _LT_AC_FILE_LTDLL_C 6508643b027fSmrg# ------------------- 6509643b027fSmrg# Be careful that the start marker always follows a newline. 6510643b027fSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 6511643b027fSmrg# /* ltdll.c starts here */ 6512643b027fSmrg# #define WIN32_LEAN_AND_MEAN 6513643b027fSmrg# #include <windows.h> 6514643b027fSmrg# #undef WIN32_LEAN_AND_MEAN 6515643b027fSmrg# #include <stdio.h> 6516fe5e51b7Smrg# 6517643b027fSmrg# #ifndef __CYGWIN__ 6518643b027fSmrg# # ifdef __CYGWIN32__ 6519643b027fSmrg# # define __CYGWIN__ __CYGWIN32__ 6520643b027fSmrg# # endif 6521643b027fSmrg# #endif 6522fe5e51b7Smrg# 6523643b027fSmrg# #ifdef __cplusplus 6524643b027fSmrg# extern "C" { 6525643b027fSmrg# #endif 6526643b027fSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 6527643b027fSmrg# #ifdef __cplusplus 6528643b027fSmrg# } 6529643b027fSmrg# #endif 6530fe5e51b7Smrg# 6531643b027fSmrg# #ifdef __CYGWIN__ 6532643b027fSmrg# #include <cygwin/cygwin_dll.h> 6533643b027fSmrg# DECLARE_CYGWIN_DLL( DllMain ); 6534643b027fSmrg# #endif 6535643b027fSmrg# HINSTANCE __hDllInstance_base; 6536643b027fSmrg# 6537643b027fSmrg# BOOL APIENTRY 6538643b027fSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 6539643b027fSmrg# { 6540643b027fSmrg# __hDllInstance_base = hInst; 6541643b027fSmrg# return TRUE; 6542643b027fSmrg# } 6543643b027fSmrg# /* ltdll.c ends here */ 6544643b027fSmrg])# _LT_AC_FILE_LTDLL_C 6545fe5e51b7Smrg 6546eda3803bSmrg 6547643b027fSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 6548643b027fSmrg# --------------------------------- 6549643b027fSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 6550fe5e51b7Smrg 6551fe5e51b7Smrg 6552643b027fSmrg# old names 6553643b027fSmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 6554643b027fSmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 6555643b027fSmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 6556643b027fSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 6557643b027fSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 6558643b027fSmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 6559643b027fSmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 6560fe5e51b7Smrg 6561643b027fSmrg# This is just to silence aclocal about the macro not being used 6562643b027fSmrgifelse([AC_DISABLE_FAST_INSTALL]) 6563fe5e51b7Smrg 6564643b027fSmrgAC_DEFUN([LT_AC_PROG_GCJ], 6565643b027fSmrg[AC_CHECK_TOOL(GCJ, gcj, no) 6566643b027fSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6567643b027fSmrg AC_SUBST(GCJFLAGS) 6568643b027fSmrg]) 6569fe5e51b7Smrg 6570643b027fSmrgAC_DEFUN([LT_AC_PROG_RC], 6571643b027fSmrg[AC_CHECK_TOOL(RC, windres, no) 6572fe5e51b7Smrg]) 6573fe5e51b7Smrg 6574fe5e51b7Smrg 6575643b027fSmrg# Cheap backport of AS_EXECUTABLE_P and required macros 6576643b027fSmrg# from Autoconf 2.59; we should not use $as_executable_p directly. 6577fe5e51b7Smrg 6578643b027fSmrg# _AS_TEST_PREPARE 6579643b027fSmrg# ---------------- 6580643b027fSmrgm4_ifndef([_AS_TEST_PREPARE], 6581643b027fSmrg[m4_defun([_AS_TEST_PREPARE], 6582643b027fSmrg[if test -x / >/dev/null 2>&1; then 6583643b027fSmrg as_executable_p='test -x' 6584643b027fSmrgelse 6585643b027fSmrg as_executable_p='test -f' 6586643b027fSmrgfi 6587643b027fSmrg])])# _AS_TEST_PREPARE 6588fe5e51b7Smrg 6589643b027fSmrg# AS_EXECUTABLE_P 6590643b027fSmrg# --------------- 6591643b027fSmrg# Check whether a file is executable. 6592643b027fSmrgm4_ifndef([AS_EXECUTABLE_P], 6593643b027fSmrg[m4_defun([AS_EXECUTABLE_P], 6594643b027fSmrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl 6595643b027fSmrg$as_executable_p $1[]dnl 6596643b027fSmrg])])# AS_EXECUTABLE_P 6597fe5e51b7Smrg 6598643b027fSmrg# NOTE: This macro has been submitted for inclusion into # 6599643b027fSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 6600643b027fSmrg# a released version of Autoconf we should remove this # 6601643b027fSmrg# macro and use it instead. # 6602643b027fSmrg# LT_AC_PROG_SED 6603643b027fSmrg# -------------- 6604643b027fSmrg# Check for a fully-functional sed program, that truncates 6605643b027fSmrg# as few characters as possible. Prefer GNU sed if found. 6606643b027fSmrgAC_DEFUN([LT_AC_PROG_SED], 6607643b027fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 6608643b027fSmrgAC_CACHE_VAL(lt_cv_path_SED, 6609643b027fSmrg[# Loop through the user's path and test for sed and gsed. 6610643b027fSmrg# Then use that list of sed's as ones to test for truncation. 6611643b027fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6612643b027fSmrgfor as_dir in $PATH 6613643b027fSmrgdo 6614643b027fSmrg IFS=$as_save_IFS 6615643b027fSmrg test -z "$as_dir" && as_dir=. 6616643b027fSmrg for lt_ac_prog in sed gsed; do 6617643b027fSmrg for ac_exec_ext in '' $ac_executable_extensions; do 6618643b027fSmrg if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 6619643b027fSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 6620643b027fSmrg fi 6621643b027fSmrg done 6622643b027fSmrg done 6623643b027fSmrgdone 6624643b027fSmrgIFS=$as_save_IFS 6625643b027fSmrglt_ac_max=0 6626643b027fSmrglt_ac_count=0 6627643b027fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 6628643b027fSmrg# along with /bin/sed that truncates output. 6629643b027fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 6630643b027fSmrg test ! -f $lt_ac_sed && continue 6631643b027fSmrg cat /dev/null > conftest.in 6632643b027fSmrg lt_ac_count=0 6633643b027fSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 6634643b027fSmrg # Check for GNU sed and select it if it is found. 6635643b027fSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 6636643b027fSmrg lt_cv_path_SED=$lt_ac_sed 6637643b027fSmrg break 6638643b027fSmrg fi 6639643b027fSmrg while true; do 6640643b027fSmrg cat conftest.in conftest.in >conftest.tmp 6641643b027fSmrg mv conftest.tmp conftest.in 6642643b027fSmrg cp conftest.in conftest.nl 6643643b027fSmrg echo >>conftest.nl 6644643b027fSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 6645643b027fSmrg cmp -s conftest.out conftest.nl || break 6646643b027fSmrg # 10000 chars as input seems more than enough 6647643b027fSmrg test $lt_ac_count -gt 10 && break 6648643b027fSmrg lt_ac_count=`expr $lt_ac_count + 1` 6649643b027fSmrg if test $lt_ac_count -gt $lt_ac_max; then 6650643b027fSmrg lt_ac_max=$lt_ac_count 6651643b027fSmrg lt_cv_path_SED=$lt_ac_sed 6652643b027fSmrg fi 6653643b027fSmrg done 6654643b027fSmrgdone 6655643b027fSmrg]) 6656643b027fSmrgSED=$lt_cv_path_SED 6657643b027fSmrgAC_SUBST([SED]) 6658643b027fSmrgAC_MSG_RESULT([$SED]) 6659fe5e51b7Smrg]) 6660eda3803bSmrg 6661fe5e51b7Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 6662fe5e51b7Smrg# 6663fe5e51b7Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 6664fe5e51b7Smrg# 6665fe5e51b7Smrg# This program is free software; you can redistribute it and/or modify 6666fe5e51b7Smrg# it under the terms of the GNU General Public License as published by 6667fe5e51b7Smrg# the Free Software Foundation; either version 2 of the License, or 6668fe5e51b7Smrg# (at your option) any later version. 6669fe5e51b7Smrg# 6670fe5e51b7Smrg# This program is distributed in the hope that it will be useful, but 6671fe5e51b7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 6672fe5e51b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 6673fe5e51b7Smrg# General Public License for more details. 6674fe5e51b7Smrg# 6675fe5e51b7Smrg# You should have received a copy of the GNU General Public License 6676fe5e51b7Smrg# along with this program; if not, write to the Free Software 6677fe5e51b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 6678fe5e51b7Smrg# 6679fe5e51b7Smrg# As a special exception to the GNU General Public License, if you 6680fe5e51b7Smrg# distribute this file as part of a program that contains a 6681fe5e51b7Smrg# configuration script generated by Autoconf, you may include it under 6682fe5e51b7Smrg# the same distribution terms that you use for the rest of that program. 6683fe5e51b7Smrg 6684fe5e51b7Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 6685fe5e51b7Smrg# ---------------------------------- 6686fe5e51b7SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 6687fe5e51b7Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 6688fe5e51b7Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 6689fe5e51b7SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 6690fe5e51b7Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 6691fe5e51b7Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 6692fe5e51b7Smrgfi 6693fe5e51b7Smrgif test -n "$PKG_CONFIG"; then 6694fe5e51b7Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 6695fe5e51b7Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 6696fe5e51b7Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 6697fe5e51b7Smrg AC_MSG_RESULT([yes]) 6698fe5e51b7Smrg else 6699fe5e51b7Smrg AC_MSG_RESULT([no]) 6700fe5e51b7Smrg PKG_CONFIG="" 6701fe5e51b7Smrg fi 6702fe5e51b7Smrg 6703fe5e51b7Smrgfi[]dnl 6704fe5e51b7Smrg])# PKG_PROG_PKG_CONFIG 6705fe5e51b7Smrg 6706fe5e51b7Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 6707fe5e51b7Smrg# 6708fe5e51b7Smrg# Check to see whether a particular set of modules exists. Similar 6709fe5e51b7Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 6710fe5e51b7Smrg# 6711fe5e51b7Smrg# 6712fe5e51b7Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 6713fe5e51b7Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 6714fe5e51b7Smrg# PKG_CHECK_EXISTS manually 6715fe5e51b7Smrg# -------------------------------------------------------------- 6716fe5e51b7SmrgAC_DEFUN([PKG_CHECK_EXISTS], 6717fe5e51b7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 6718fe5e51b7Smrgif test -n "$PKG_CONFIG" && \ 6719fe5e51b7Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 6720fe5e51b7Smrg m4_ifval([$2], [$2], [:]) 6721fe5e51b7Smrgm4_ifvaln([$3], [else 6722fe5e51b7Smrg $3])dnl 6723fe5e51b7Smrgfi]) 6724fe5e51b7Smrg 6725fe5e51b7Smrg 6726fe5e51b7Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 6727fe5e51b7Smrg# --------------------------------------------- 6728fe5e51b7Smrgm4_define([_PKG_CONFIG], 6729eda3803bSmrg[if test -n "$$1"; then 6730eda3803bSmrg pkg_cv_[]$1="$$1" 6731eda3803bSmrg elif test -n "$PKG_CONFIG"; then 6732eda3803bSmrg PKG_CHECK_EXISTS([$3], 6733eda3803bSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 6734eda3803bSmrg [pkg_failed=yes]) 6735eda3803bSmrg else 6736eda3803bSmrg pkg_failed=untried 6737fe5e51b7Smrgfi[]dnl 6738fe5e51b7Smrg])# _PKG_CONFIG 6739fe5e51b7Smrg 6740fe5e51b7Smrg# _PKG_SHORT_ERRORS_SUPPORTED 6741fe5e51b7Smrg# ----------------------------- 6742fe5e51b7SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 6743fe5e51b7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 6744fe5e51b7Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 6745fe5e51b7Smrg _pkg_short_errors_supported=yes 6746fe5e51b7Smrgelse 6747fe5e51b7Smrg _pkg_short_errors_supported=no 6748fe5e51b7Smrgfi[]dnl 6749fe5e51b7Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 6750fe5e51b7Smrg 6751fe5e51b7Smrg 6752fe5e51b7Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 6753fe5e51b7Smrg# [ACTION-IF-NOT-FOUND]) 6754fe5e51b7Smrg# 6755fe5e51b7Smrg# 6756fe5e51b7Smrg# Note that if there is a possibility the first call to 6757fe5e51b7Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 6758fe5e51b7Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 6759fe5e51b7Smrg# 6760fe5e51b7Smrg# 6761fe5e51b7Smrg# -------------------------------------------------------------- 6762fe5e51b7SmrgAC_DEFUN([PKG_CHECK_MODULES], 6763fe5e51b7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 6764fe5e51b7SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 6765fe5e51b7SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 6766fe5e51b7Smrg 6767fe5e51b7Smrgpkg_failed=no 6768fe5e51b7SmrgAC_MSG_CHECKING([for $1]) 6769fe5e51b7Smrg 6770fe5e51b7Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 6771fe5e51b7Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 6772fe5e51b7Smrg 6773fe5e51b7Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 6774fe5e51b7Smrgand $1[]_LIBS to avoid the need to call pkg-config. 6775fe5e51b7SmrgSee the pkg-config man page for more details.]) 6776fe5e51b7Smrg 6777fe5e51b7Smrgif test $pkg_failed = yes; then 6778fe5e51b7Smrg _PKG_SHORT_ERRORS_SUPPORTED 6779fe5e51b7Smrg if test $_pkg_short_errors_supported = yes; then 6780eda3803bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 6781fe5e51b7Smrg else 6782eda3803bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 6783fe5e51b7Smrg fi 6784fe5e51b7Smrg # Put the nasty error message in config.log where it belongs 6785fe5e51b7Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 6786fe5e51b7Smrg 6787fe5e51b7Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 6788fe5e51b7Smrg[Package requirements ($2) were not met: 6789fe5e51b7Smrg 6790fe5e51b7Smrg$$1_PKG_ERRORS 6791fe5e51b7Smrg 6792fe5e51b7SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 6793fe5e51b7Smrginstalled software in a non-standard prefix. 6794fe5e51b7Smrg 6795fe5e51b7Smrg_PKG_TEXT 6796fe5e51b7Smrg])], 6797fe5e51b7Smrg [AC_MSG_RESULT([no]) 6798fe5e51b7Smrg $4]) 6799fe5e51b7Smrgelif test $pkg_failed = untried; then 6800fe5e51b7Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 6801fe5e51b7Smrg[The pkg-config script could not be found or is too old. Make sure it 6802fe5e51b7Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 6803fe5e51b7Smrgpath to pkg-config. 6804fe5e51b7Smrg 6805fe5e51b7Smrg_PKG_TEXT 6806fe5e51b7Smrg 6807fe5e51b7SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 6808fe5e51b7Smrg [$4]) 6809fe5e51b7Smrgelse 6810fe5e51b7Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 6811fe5e51b7Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 6812fe5e51b7Smrg AC_MSG_RESULT([yes]) 6813fe5e51b7Smrg ifelse([$3], , :, [$3]) 6814fe5e51b7Smrgfi[]dnl 6815fe5e51b7Smrg])# PKG_CHECK_MODULES 6816fe5e51b7Smrg 6817eda3803bSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 6818fe5e51b7Smrgdnl 6819fe5e51b7Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 6820fe5e51b7Smrgdnl 6821fe5e51b7Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 6822fe5e51b7Smrgdnl copy of this software and associated documentation files (the 6823fe5e51b7Smrgdnl "Software"), to deal in the Software without restriction, including 6824fe5e51b7Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 6825fe5e51b7Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 6826fe5e51b7Smrgdnl to whom the Software is furnished to do so, provided that the above 6827fe5e51b7Smrgdnl copyright notice(s) and this permission notice appear in all copies of 6828fe5e51b7Smrgdnl the Software and that both the above copyright notice(s) and this 6829fe5e51b7Smrgdnl permission notice appear in supporting documentation. 6830fe5e51b7Smrgdnl 6831fe5e51b7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 6832fe5e51b7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 6833fe5e51b7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 6834fe5e51b7Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 6835fe5e51b7Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 6836fe5e51b7Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 6837fe5e51b7Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 6838fe5e51b7Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 6839fe5e51b7Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 6840fe5e51b7Smrgdnl 6841fe5e51b7Smrgdnl Except as contained in this notice, the name of a copyright holder 6842fe5e51b7Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 6843fe5e51b7Smrgdnl or other dealings in this Software without prior written authorization 6844fe5e51b7Smrgdnl of the copyright holder. 6845fe5e51b7Smrg 6846fe5e51b7Smrg# XORG_MACROS_VERSION(required-version) 6847fe5e51b7Smrg# ------------------------------------- 6848fe5e51b7Smrg# Minimum version: 1.1.0 6849fe5e51b7Smrg# 6850fe5e51b7Smrg# If you're using a macro added in Version 1.1 or newer, include this in 6851fe5e51b7Smrg# your configure.ac with the minimum required version, such as: 6852fe5e51b7Smrg# XORG_MACROS_VERSION(1.1) 6853fe5e51b7Smrg# 6854fe5e51b7Smrg# To force at least a version with this macro defined, also add: 6855fe5e51b7Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 6856fe5e51b7Smrg# 6857fe5e51b7Smrg# 6858fe5e51b7Smrg# See the "minimum version" comment for each macro you use to see what 6859fe5e51b7Smrg# version you require. 6860fe5e51b7SmrgAC_DEFUN([XORG_MACROS_VERSION],[ 6861fe5e51b7Smrg [XORG_MACROS_needed_version=$1 6862fe5e51b7Smrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 6863fe5e51b7Smrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 6864fe5e51b7Smrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 6865eda3803bSmrg [XORG_MACROS_version=1.2.1 6866fe5e51b7Smrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 6867fe5e51b7Smrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 6868fe5e51b7Smrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 6869fe5e51b7Smrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 6870fe5e51b7Smrg fi 6871fe5e51b7Smrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 6872fe5e51b7Smrg 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]) 6873fe5e51b7Smrg fi 6874fe5e51b7Smrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 6875fe5e51b7Smrg]) # XORG_MACROS_VERSION 6876fe5e51b7Smrg 6877fe5e51b7Smrg# XORG_PROG_RAWCPP() 6878fe5e51b7Smrg# ------------------ 6879fe5e51b7Smrg# Minimum version: 1.0.0 6880fe5e51b7Smrg# 6881fe5e51b7Smrg# Find cpp program and necessary flags for use in pre-processing text files 6882fe5e51b7Smrg# such as man pages and config files 6883fe5e51b7SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 6884fe5e51b7SmrgAC_REQUIRE([AC_PROG_CPP]) 6885fe5e51b7SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 6886fe5e51b7Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 6887fe5e51b7Smrg 6888fe5e51b7Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 6889fe5e51b7Smrg# which is not the best choice for supporting other OS'es, but covers most 6890fe5e51b7Smrg# of the ones we need for now. 6891fe5e51b7SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 6892fe5e51b7SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 6893fe5e51b7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 6894fe5e51b7Smrg AC_MSG_RESULT([no]) 6895fe5e51b7Smrgelse 6896fe5e51b7Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 6897fe5e51b7Smrg RAWCPPFLAGS=-undef 6898fe5e51b7Smrg AC_MSG_RESULT([yes]) 6899eda3803bSmrg # under Cygwin unix is still defined even with -undef 6900eda3803bSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 6901eda3803bSmrg RAWCPPFLAGS="-undef -ansi" 6902eda3803bSmrg AC_MSG_RESULT([yes, with -ansi]) 6903fe5e51b7Smrg else 6904fe5e51b7Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 6905fe5e51b7Smrg fi 6906fe5e51b7Smrgfi 6907fe5e51b7Smrgrm -f conftest.$ac_ext 6908fe5e51b7Smrg 6909fe5e51b7SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 6910fe5e51b7SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 6911fe5e51b7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 6912fe5e51b7Smrg AC_MSG_RESULT([no]) 6913fe5e51b7Smrgelse 6914fe5e51b7Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 6915fe5e51b7Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 6916fe5e51b7Smrg AC_MSG_RESULT([yes]) 6917fe5e51b7Smrg else 6918fe5e51b7Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 6919fe5e51b7Smrg fi 6920fe5e51b7Smrgfi 6921fe5e51b7Smrgrm -f conftest.$ac_ext 6922fe5e51b7SmrgAC_SUBST(RAWCPPFLAGS) 6923fe5e51b7Smrg]) # XORG_PROG_RAWCPP 6924fe5e51b7Smrg 6925fe5e51b7Smrg# XORG_MANPAGE_SECTIONS() 6926fe5e51b7Smrg# ----------------------- 6927fe5e51b7Smrg# Minimum version: 1.0.0 6928fe5e51b7Smrg# 6929fe5e51b7Smrg# Determine which sections man pages go in for the different man page types 6930fe5e51b7Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 6931fe5e51b7Smrg# Not sure if there's any better way than just hardcoding by OS name. 6932fe5e51b7Smrg# Override default settings by setting environment variables 6933fe5e51b7Smrg 6934fe5e51b7SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 6935fe5e51b7SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 6936fe5e51b7Smrg 6937fe5e51b7Smrgif test x$APP_MAN_SUFFIX = x ; then 6938fe5e51b7Smrg APP_MAN_SUFFIX=1 6939fe5e51b7Smrgfi 6940fe5e51b7Smrgif test x$APP_MAN_DIR = x ; then 6941fe5e51b7Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 6942fe5e51b7Smrgfi 6943fe5e51b7Smrg 6944fe5e51b7Smrgif test x$LIB_MAN_SUFFIX = x ; then 6945fe5e51b7Smrg LIB_MAN_SUFFIX=3 6946fe5e51b7Smrgfi 6947fe5e51b7Smrgif test x$LIB_MAN_DIR = x ; then 6948fe5e51b7Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 6949fe5e51b7Smrgfi 6950fe5e51b7Smrg 6951fe5e51b7Smrgif test x$FILE_MAN_SUFFIX = x ; then 6952fe5e51b7Smrg case $host_os in 6953fe5e51b7Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 6954fe5e51b7Smrg *) FILE_MAN_SUFFIX=5 ;; 6955fe5e51b7Smrg esac 6956fe5e51b7Smrgfi 6957fe5e51b7Smrgif test x$FILE_MAN_DIR = x ; then 6958fe5e51b7Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 6959fe5e51b7Smrgfi 6960fe5e51b7Smrg 6961fe5e51b7Smrgif test x$MISC_MAN_SUFFIX = x ; then 6962fe5e51b7Smrg case $host_os in 6963fe5e51b7Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 6964fe5e51b7Smrg *) MISC_MAN_SUFFIX=7 ;; 6965fe5e51b7Smrg esac 6966fe5e51b7Smrgfi 6967fe5e51b7Smrgif test x$MISC_MAN_DIR = x ; then 6968fe5e51b7Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 6969fe5e51b7Smrgfi 6970fe5e51b7Smrg 6971fe5e51b7Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 6972fe5e51b7Smrg case $host_os in 6973fe5e51b7Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 6974fe5e51b7Smrg *) DRIVER_MAN_SUFFIX=4 ;; 6975fe5e51b7Smrg esac 6976fe5e51b7Smrgfi 6977fe5e51b7Smrgif test x$DRIVER_MAN_DIR = x ; then 6978fe5e51b7Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 6979fe5e51b7Smrgfi 6980fe5e51b7Smrg 6981fe5e51b7Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 6982fe5e51b7Smrg case $host_os in 6983fe5e51b7Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 6984fe5e51b7Smrg *) ADMIN_MAN_SUFFIX=8 ;; 6985fe5e51b7Smrg esac 6986fe5e51b7Smrgfi 6987fe5e51b7Smrgif test x$ADMIN_MAN_DIR = x ; then 6988fe5e51b7Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 6989fe5e51b7Smrgfi 6990fe5e51b7Smrg 6991fe5e51b7Smrg 6992fe5e51b7SmrgAC_SUBST([APP_MAN_SUFFIX]) 6993fe5e51b7SmrgAC_SUBST([LIB_MAN_SUFFIX]) 6994fe5e51b7SmrgAC_SUBST([FILE_MAN_SUFFIX]) 6995fe5e51b7SmrgAC_SUBST([MISC_MAN_SUFFIX]) 6996fe5e51b7SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 6997fe5e51b7SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 6998fe5e51b7SmrgAC_SUBST([APP_MAN_DIR]) 6999fe5e51b7SmrgAC_SUBST([LIB_MAN_DIR]) 7000fe5e51b7SmrgAC_SUBST([FILE_MAN_DIR]) 7001fe5e51b7SmrgAC_SUBST([MISC_MAN_DIR]) 7002fe5e51b7SmrgAC_SUBST([DRIVER_MAN_DIR]) 7003fe5e51b7SmrgAC_SUBST([ADMIN_MAN_DIR]) 7004fe5e51b7Smrg]) # XORG_MANPAGE_SECTIONS 7005fe5e51b7Smrg 7006fe5e51b7Smrg# XORG_CHECK_LINUXDOC 7007fe5e51b7Smrg# ------------------- 7008fe5e51b7Smrg# Minimum version: 1.0.0 7009fe5e51b7Smrg# 7010fe5e51b7Smrg# Defines the variable MAKE_TEXT if the necessary tools and 7011fe5e51b7Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 7012fe5e51b7Smrg# Whether or not the necessary tools and files are found can be checked 7013fe5e51b7Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 7014fe5e51b7SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 7015eda3803bSmrgif test x$XORG_SGML_PATH = x ; then 7016eda3803bSmrg XORG_SGML_PATH=$prefix/share/sgml 7017eda3803bSmrgfi 7018fe5e51b7SmrgHAVE_DEFS_ENT= 7019fe5e51b7Smrg 7020eda3803bSmrgif test x"$cross_compiling" = x"yes" ; then 7021eda3803bSmrg HAVE_DEFS_ENT=no 7022eda3803bSmrgelse 7023eda3803bSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 7024eda3803bSmrgfi 7025fe5e51b7Smrg 7026fe5e51b7SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 7027fe5e51b7SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 7028fe5e51b7Smrg 7029fe5e51b7SmrgAC_MSG_CHECKING([Whether to build documentation]) 7030fe5e51b7Smrg 7031fe5e51b7Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 7032fe5e51b7Smrg BUILDDOC=yes 7033fe5e51b7Smrgelse 7034fe5e51b7Smrg BUILDDOC=no 7035fe5e51b7Smrgfi 7036fe5e51b7Smrg 7037fe5e51b7SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 7038fe5e51b7Smrg 7039fe5e51b7SmrgAC_MSG_RESULT([$BUILDDOC]) 7040fe5e51b7Smrg 7041fe5e51b7SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 7042fe5e51b7Smrg 7043fe5e51b7Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 7044fe5e51b7Smrg BUILDPDFDOC=yes 7045fe5e51b7Smrgelse 7046fe5e51b7Smrg BUILDPDFDOC=no 7047fe5e51b7Smrgfi 7048fe5e51b7Smrg 7049fe5e51b7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 7050fe5e51b7Smrg 7051fe5e51b7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 7052fe5e51b7Smrg 7053fe5e51b7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 7054fe5e51b7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 7055fe5e51b7SmrgMAKE_PDF="$PS2PDF" 7056fe5e51b7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 7057fe5e51b7Smrg 7058fe5e51b7SmrgAC_SUBST(MAKE_TEXT) 7059fe5e51b7SmrgAC_SUBST(MAKE_PS) 7060fe5e51b7SmrgAC_SUBST(MAKE_PDF) 7061fe5e51b7SmrgAC_SUBST(MAKE_HTML) 7062fe5e51b7Smrg]) # XORG_CHECK_LINUXDOC 7063fe5e51b7Smrg 7064fe5e51b7Smrg# XORG_CHECK_DOCBOOK 7065fe5e51b7Smrg# ------------------- 7066fe5e51b7Smrg# Minimum version: 1.0.0 7067fe5e51b7Smrg# 7068fe5e51b7Smrg# Checks for the ability to build output formats from SGML DocBook source. 7069fe5e51b7Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 7070fe5e51b7Smrg# indicates whether the necessary tools and files are found and, if set, 7071fe5e51b7Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 7072fe5e51b7SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 7073eda3803bSmrgif test x$XORG_SGML_PATH = x ; then 7074eda3803bSmrg XORG_SGML_PATH=$prefix/share/sgml 7075eda3803bSmrgfi 7076fe5e51b7SmrgHAVE_DEFS_ENT= 7077fe5e51b7SmrgBUILDTXTDOC=no 7078fe5e51b7SmrgBUILDPDFDOC=no 7079fe5e51b7SmrgBUILDPSDOC=no 7080fe5e51b7SmrgBUILDHTMLDOC=no 7081fe5e51b7Smrg 7082fe5e51b7SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 7083fe5e51b7Smrg 7084fe5e51b7SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 7085fe5e51b7SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 7086fe5e51b7SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 7087fe5e51b7SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 7088fe5e51b7Smrg 7089fe5e51b7SmrgAC_MSG_CHECKING([Whether to build text documentation]) 7090fe5e51b7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 7091fe5e51b7Smrg test x$BUILD_TXTDOC != xno; then 7092fe5e51b7Smrg BUILDTXTDOC=yes 7093fe5e51b7Smrgfi 7094fe5e51b7SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 7095fe5e51b7SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 7096fe5e51b7Smrg 7097fe5e51b7SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 7098fe5e51b7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 7099fe5e51b7Smrg test x$BUILD_PDFDOC != xno; then 7100fe5e51b7Smrg BUILDPDFDOC=yes 7101fe5e51b7Smrgfi 7102fe5e51b7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 7103fe5e51b7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 7104fe5e51b7Smrg 7105fe5e51b7SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 7106fe5e51b7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 7107fe5e51b7Smrg test x$BUILD_PSDOC != xno; then 7108fe5e51b7Smrg BUILDPSDOC=yes 7109fe5e51b7Smrgfi 7110fe5e51b7SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 7111fe5e51b7SmrgAC_MSG_RESULT([$BUILDPSDOC]) 7112fe5e51b7Smrg 7113fe5e51b7SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 7114fe5e51b7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 7115fe5e51b7Smrg test x$BUILD_HTMLDOC != xno; then 7116fe5e51b7Smrg BUILDHTMLDOC=yes 7117fe5e51b7Smrgfi 7118fe5e51b7SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 7119fe5e51b7SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 7120fe5e51b7Smrg 7121fe5e51b7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 7122fe5e51b7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 7123fe5e51b7SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 7124fe5e51b7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 7125fe5e51b7Smrg 7126fe5e51b7SmrgAC_SUBST(MAKE_TEXT) 7127fe5e51b7SmrgAC_SUBST(MAKE_PS) 7128fe5e51b7SmrgAC_SUBST(MAKE_PDF) 7129fe5e51b7SmrgAC_SUBST(MAKE_HTML) 7130fe5e51b7Smrg]) # XORG_CHECK_DOCBOOK 7131fe5e51b7Smrg 7132fe5e51b7Smrg# XORG_CHECK_MALLOC_ZERO 7133fe5e51b7Smrg# ---------------------- 7134fe5e51b7Smrg# Minimum version: 1.0.0 7135fe5e51b7Smrg# 7136fe5e51b7Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 7137fe5e51b7Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 7138fe5e51b7Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 7139fe5e51b7SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 7140fe5e51b7SmrgAC_ARG_ENABLE(malloc0returnsnull, 7141fe5e51b7Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 7142fe5e51b7Smrg [malloc(0) returns NULL (default: auto)]), 7143fe5e51b7Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 7144fe5e51b7Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 7145fe5e51b7Smrg 7146fe5e51b7SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 7147fe5e51b7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 7148fe5e51b7Smrg AC_RUN_IFELSE([ 7149fe5e51b7Smrgchar *malloc(); 7150fe5e51b7Smrgchar *realloc(); 7151fe5e51b7Smrgchar *calloc(); 7152fe5e51b7Smrgmain() { 7153fe5e51b7Smrg char *m0, *r0, *c0, *p; 7154fe5e51b7Smrg m0 = malloc(0); 7155fe5e51b7Smrg p = malloc(10); 7156fe5e51b7Smrg r0 = realloc(p,0); 7157fe5e51b7Smrg c0 = calloc(0); 7158fe5e51b7Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 7159fe5e51b7Smrg}], 7160fe5e51b7Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 7161fe5e51b7Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 7162fe5e51b7Smrgfi 7163fe5e51b7SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 7164fe5e51b7Smrg 7165fe5e51b7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 7166fe5e51b7Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 7167fe5e51b7Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 7168fe5e51b7Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 7169fe5e51b7Smrgelse 7170fe5e51b7Smrg MALLOC_ZERO_CFLAGS="" 7171fe5e51b7Smrg XMALLOC_ZERO_CFLAGS="" 7172fe5e51b7Smrg XTMALLOC_ZERO_CFLAGS="" 7173fe5e51b7Smrgfi 7174fe5e51b7Smrg 7175fe5e51b7SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 7176fe5e51b7SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 7177fe5e51b7SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 7178fe5e51b7Smrg]) # XORG_CHECK_MALLOC_ZERO 7179fe5e51b7Smrg 7180fe5e51b7Smrg# XORG_WITH_LINT() 7181fe5e51b7Smrg# ---------------- 7182fe5e51b7Smrg# Minimum version: 1.1.0 7183fe5e51b7Smrg# 7184fe5e51b7Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 7185fe5e51b7Smrg# is specified. (Use --with-lint=sparse for sparse.) 7186fe5e51b7Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 7187fe5e51b7Smrg# Sets $LINT_FLAGS to flags to pass to source checker 7188fe5e51b7Smrg# Sets LINT automake conditional if enabled (default: disabled) 7189fe5e51b7Smrg# 7190fe5e51b7SmrgAC_DEFUN([XORG_WITH_LINT],[ 7191fe5e51b7Smrg 7192fe5e51b7Smrg# Allow checking code with lint, sparse, etc. 7193fe5e51b7SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 7194fe5e51b7Smrg [Use a lint-style source code checker (default: disabled)])], 7195fe5e51b7Smrg [use_lint=$withval], [use_lint=no]) 7196fe5e51b7Smrgif test "x$use_lint" = "xyes" ; then 7197fe5e51b7Smrg LINT="lint" 7198fe5e51b7Smrgelse 7199fe5e51b7Smrg LINT="$use_lint" 7200fe5e51b7Smrgfi 7201fe5e51b7Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 7202fe5e51b7Smrg case $LINT in 7203fe5e51b7Smrg lint|*/lint) 7204fe5e51b7Smrg case $host_os in 7205fe5e51b7Smrg solaris*) 7206fe5e51b7Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 7207fe5e51b7Smrg ;; 7208fe5e51b7Smrg esac 7209fe5e51b7Smrg ;; 7210fe5e51b7Smrg esac 7211fe5e51b7Smrgfi 7212fe5e51b7Smrg 7213fe5e51b7SmrgAC_SUBST(LINT) 7214fe5e51b7SmrgAC_SUBST(LINT_FLAGS) 7215fe5e51b7SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 7216fe5e51b7Smrg 7217fe5e51b7Smrg]) # XORG_WITH_LINT 7218fe5e51b7Smrg 7219fe5e51b7Smrg# XORG_LINT_LIBRARY(LIBNAME) 7220fe5e51b7Smrg# -------------------------- 7221fe5e51b7Smrg# Minimum version: 1.1.0 7222fe5e51b7Smrg# 7223fe5e51b7Smrg# Sets up flags for building lint libraries for checking programs that call 7224fe5e51b7Smrg# functions in the library. 7225fe5e51b7Smrg# Disabled by default, enable with --enable-lint-library 7226fe5e51b7Smrg# Sets: 7227fe5e51b7Smrg# @LINTLIB@ - name of lint library file to make 7228fe5e51b7Smrg# MAKE_LINT_LIB - automake conditional 7229fe5e51b7Smrg# 7230fe5e51b7Smrg 7231fe5e51b7SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 7232fe5e51b7SmrgAC_REQUIRE([XORG_WITH_LINT]) 7233fe5e51b7Smrg# Build lint "library" for more indepth checks of programs calling this library 7234fe5e51b7SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 7235fe5e51b7Smrg [Create lint library (default: disabled)])], 7236fe5e51b7Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 7237fe5e51b7Smrgif test "x$make_lint_lib" != "xno" ; then 7238fe5e51b7Smrg if test "x$LINT" = "xno" ; then 7239fe5e51b7Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 7240fe5e51b7Smrg fi 7241fe5e51b7Smrg if test "x$make_lint_lib" = "xyes" ; then 7242fe5e51b7Smrg LINTLIB=llib-l$1.ln 7243fe5e51b7Smrg else 7244fe5e51b7Smrg LINTLIB=$make_lint_lib 7245fe5e51b7Smrg fi 7246fe5e51b7Smrgfi 7247fe5e51b7SmrgAC_SUBST(LINTLIB) 7248fe5e51b7SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 7249fe5e51b7Smrg 7250fe5e51b7Smrg]) # XORG_LINT_LIBRARY 7251fe5e51b7Smrg 7252eda3803bSmrg# XORG_CWARNFLAGS 7253eda3803bSmrg# --------------- 7254eda3803bSmrg# Minimum version: 1.2.0 7255eda3803bSmrg# 7256eda3803bSmrg# Defines CWARNFLAGS to enable C compiler warnings. 7257eda3803bSmrg# 7258eda3803bSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 7259eda3803bSmrgAC_REQUIRE([AC_PROG_CC]) 7260eda3803bSmrgif test "x$GCC" = xyes ; then 7261eda3803bSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 7262eda3803bSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 7263eda3803bSmrg-Wbad-function-cast" 7264eda3803bSmrg case `gcc -dumpversion` in 7265eda3803bSmrg 3.4.* | 4.*) 7266eda3803bSmrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 7267eda3803bSmrg ;; 7268eda3803bSmrg esac 7269eda3803bSmrgelse 7270eda3803bSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 7271eda3803bSmrg if test "x$SUNCC" = "xyes"; then 7272eda3803bSmrg CWARNFLAGS="-v" 7273eda3803bSmrg fi 7274eda3803bSmrgfi 7275eda3803bSmrgAC_SUBST(CWARNFLAGS) 7276eda3803bSmrg]) # XORG_CWARNFLAGS 7277fe5e51b7Smrgdnl Copyright 2005 Red Hat, Inc 7278fe5e51b7Smrgdnl 7279fe5e51b7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 7280fe5e51b7Smrgdnl documentation for any purpose is hereby granted without fee, provided that 7281fe5e51b7Smrgdnl the above copyright notice appear in all copies and that both that 7282fe5e51b7Smrgdnl copyright notice and this permission notice appear in supporting 7283fe5e51b7Smrgdnl documentation. 7284fe5e51b7Smrgdnl 7285fe5e51b7Smrgdnl The above copyright notice and this permission notice shall be included 7286fe5e51b7Smrgdnl in all copies or substantial portions of the Software. 7287fe5e51b7Smrgdnl 7288fe5e51b7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 7289fe5e51b7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 7290fe5e51b7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7291fe5e51b7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 7292fe5e51b7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 7293fe5e51b7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 7294fe5e51b7Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 7295fe5e51b7Smrgdnl 7296fe5e51b7Smrgdnl Except as contained in this notice, the name of the copyright holders shall 7297fe5e51b7Smrgdnl not be used in advertising or otherwise to promote the sale, use or 7298fe5e51b7Smrgdnl other dealings in this Software without prior written authorization 7299fe5e51b7Smrgdnl from the copyright holders. 7300fe5e51b7Smrgdnl 7301fe5e51b7Smrg 7302fe5e51b7Smrg# XORG_RELEASE_VERSION 7303fe5e51b7Smrg# -------------------- 7304fe5e51b7Smrg# Adds --with/without-release-string and changes the PACKAGE and 7305fe5e51b7Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 7306fe5e51b7Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 7307fe5e51b7Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 7308fe5e51b7Smrg 7309fe5e51b7SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 7310fe5e51b7Smrg AC_ARG_WITH(release-version, 7311fe5e51b7Smrg AC_HELP_STRING([--with-release-version=STRING], 7312fe5e51b7Smrg [Use release version string in package name]), 7313fe5e51b7Smrg [RELEASE_VERSION="$withval"], 7314fe5e51b7Smrg [RELEASE_VERSION=""]) 7315fe5e51b7Smrg if test "x$RELEASE_VERSION" != "x"; then 7316fe5e51b7Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 7317fe5e51b7Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 7318fe5e51b7Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 7319fe5e51b7Smrg fi 7320fe5e51b7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 7321fe5e51b7Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 7322fe5e51b7Smrg [Major version of this package]) 7323eda3803bSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 7324fe5e51b7Smrg if test "x$PVM" = "x"; then 7325fe5e51b7Smrg PVM="0" 7326fe5e51b7Smrg fi 7327fe5e51b7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 7328fe5e51b7Smrg [$PVM], 7329fe5e51b7Smrg [Minor version of this package]) 7330eda3803bSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 7331fe5e51b7Smrg if test "x$PVP" = "x"; then 7332fe5e51b7Smrg PVP="0" 7333fe5e51b7Smrg fi 7334fe5e51b7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 7335fe5e51b7Smrg [$PVP], 7336fe5e51b7Smrg [Patch version of this package]) 7337fe5e51b7Smrg]) 7338fe5e51b7Smrg 7339eda3803bSmrg# XORG_CHANGELOG() 7340eda3803bSmrg# ---------------- 7341eda3803bSmrg# Minimum version: 1.2.0 7342eda3803bSmrg# 7343eda3803bSmrg# Defines the variable CHANGELOG_CMD as the command to generate 7344eda3803bSmrg# ChangeLog from git. 7345eda3803bSmrg# 7346eda3803bSmrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 7347eda3803bSmrg# 7348eda3803bSmrgAC_DEFUN([XORG_CHANGELOG], [ 7349eda3803bSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 7350eda3803bSmrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 7351eda3803bSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 7352eda3803bSmrgAC_SUBST([CHANGELOG_CMD]) 7353eda3803bSmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 7354eda3803bSmrg]) # XORG_CHANGELOG 7355eda3803bSmrg 7356eda3803bSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 7357fe5e51b7Smrg# 7358fe5e51b7Smrg# This file is free software; the Free Software Foundation 7359fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 7360fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 7361fe5e51b7Smrg 7362fe5e51b7Smrg# AM_AUTOMAKE_VERSION(VERSION) 7363fe5e51b7Smrg# ---------------------------- 7364fe5e51b7Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 7365fe5e51b7Smrg# generated from the m4 files accompanying Automake X.Y. 7366fe5e51b7Smrg# (This private macro should not be called outside this file.) 7367fe5e51b7SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 7368643b027fSmrg[am__api_version='1.11' 7369fe5e51b7Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 7370fe5e51b7Smrgdnl require some minimum version. Point them to the right macro. 7371643b027fSmrgm4_if([$1], [1.11], [], 7372fe5e51b7Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 7373fe5e51b7Smrg]) 7374fe5e51b7Smrg 7375fe5e51b7Smrg# _AM_AUTOCONF_VERSION(VERSION) 7376fe5e51b7Smrg# ----------------------------- 7377fe5e51b7Smrg# aclocal traces this macro to find the Autoconf version. 7378fe5e51b7Smrg# This is a private macro too. Using m4_define simplifies 7379fe5e51b7Smrg# the logic in aclocal, which can simply ignore this definition. 7380fe5e51b7Smrgm4_define([_AM_AUTOCONF_VERSION], []) 7381fe5e51b7Smrg 7382fe5e51b7Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 7383fe5e51b7Smrg# ------------------------------- 7384fe5e51b7Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 7385eda3803bSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 7386fe5e51b7SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 7387643b027fSmrg[AM_AUTOMAKE_VERSION([1.11])dnl 7388eda3803bSmrgm4_ifndef([AC_AUTOCONF_VERSION], 7389eda3803bSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 7390eda3803bSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 7391fe5e51b7Smrg 7392fe5e51b7Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 7393fe5e51b7Smrg 7394fe5e51b7Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7395fe5e51b7Smrg# 7396fe5e51b7Smrg# This file is free software; the Free Software Foundation 7397fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 7398fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 7399fe5e51b7Smrg 7400fe5e51b7Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 7401fe5e51b7Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 7402fe5e51b7Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 7403fe5e51b7Smrg# 7404fe5e51b7Smrg# Of course, Automake must honor this variable whenever it calls a 7405fe5e51b7Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 7406fe5e51b7Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7407fe5e51b7Smrg# depending on how configure is run. This is pretty annoying, since 7408fe5e51b7Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7409fe5e51b7Smrg# source directory, any form will work fine, but in subdirectories a 7410fe5e51b7Smrg# relative path needs to be adjusted first. 7411fe5e51b7Smrg# 7412fe5e51b7Smrg# $ac_aux_dir/missing 7413fe5e51b7Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 7414fe5e51b7Smrg# $top_srcdir/$ac_aux_dir/missing 7415fe5e51b7Smrg# fails if $ac_aux_dir is absolute, 7416fe5e51b7Smrg# fails when called from a subdirectory in a VPATH build with 7417fe5e51b7Smrg# a relative $ac_aux_dir 7418fe5e51b7Smrg# 7419fe5e51b7Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 7420fe5e51b7Smrg# are both prefixed by $srcdir. In an in-source build this is usually 7421fe5e51b7Smrg# harmless because $srcdir is `.', but things will broke when you 7422fe5e51b7Smrg# start a VPATH build or use an absolute $srcdir. 7423fe5e51b7Smrg# 7424fe5e51b7Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 7425fe5e51b7Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 7426fe5e51b7Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 7427fe5e51b7Smrg# and then we would define $MISSING as 7428fe5e51b7Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 7429fe5e51b7Smrg# This will work as long as MISSING is not called from configure, because 7430fe5e51b7Smrg# unfortunately $(top_srcdir) has no meaning in configure. 7431fe5e51b7Smrg# However there are other variables, like CC, which are often used in 7432fe5e51b7Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 7433fe5e51b7Smrg# 7434fe5e51b7Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 7435fe5e51b7Smrg# absolute PATH. The drawback is that using absolute paths prevent a 7436fe5e51b7Smrg# configured tree to be moved without reconfiguration. 7437fe5e51b7Smrg 7438fe5e51b7SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 7439fe5e51b7Smrg[dnl Rely on autoconf to set up CDPATH properly. 7440fe5e51b7SmrgAC_PREREQ([2.50])dnl 7441fe5e51b7Smrg# expand $ac_aux_dir to an absolute path 7442fe5e51b7Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 7443fe5e51b7Smrg]) 7444fe5e51b7Smrg 7445fe5e51b7Smrg# AM_CONDITIONAL -*- Autoconf -*- 7446fe5e51b7Smrg 7447643b027fSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 7448fe5e51b7Smrg# Free Software Foundation, Inc. 7449fe5e51b7Smrg# 7450fe5e51b7Smrg# This file is free software; the Free Software Foundation 7451fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 7452fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 7453fe5e51b7Smrg 7454643b027fSmrg# serial 9 7455fe5e51b7Smrg 7456fe5e51b7Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 7457fe5e51b7Smrg# ------------------------------------- 7458fe5e51b7Smrg# Define a conditional. 7459fe5e51b7SmrgAC_DEFUN([AM_CONDITIONAL], 7460fe5e51b7Smrg[AC_PREREQ(2.52)dnl 7461fe5e51b7Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 7462fe5e51b7Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 7463fe5e51b7SmrgAC_SUBST([$1_TRUE])dnl 7464fe5e51b7SmrgAC_SUBST([$1_FALSE])dnl 7465fe5e51b7Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 7466fe5e51b7Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 7467643b027fSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 7468fe5e51b7Smrgif $2; then 7469fe5e51b7Smrg $1_TRUE= 7470fe5e51b7Smrg $1_FALSE='#' 7471fe5e51b7Smrgelse 7472fe5e51b7Smrg $1_TRUE='#' 7473fe5e51b7Smrg $1_FALSE= 7474fe5e51b7Smrgfi 7475fe5e51b7SmrgAC_CONFIG_COMMANDS_PRE( 7476fe5e51b7Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 7477fe5e51b7Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 7478fe5e51b7SmrgUsually this means the macro was only invoked conditionally.]]) 7479fe5e51b7Smrgfi])]) 7480fe5e51b7Smrg 7481643b027fSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 7482fe5e51b7Smrg# Free Software Foundation, Inc. 7483fe5e51b7Smrg# 7484fe5e51b7Smrg# This file is free software; the Free Software Foundation 7485fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 7486fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 7487fe5e51b7Smrg 7488643b027fSmrg# serial 10 7489fe5e51b7Smrg 7490fe5e51b7Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 7491fe5e51b7Smrg# written in clear, in which case automake, when reading aclocal.m4, 7492fe5e51b7Smrg# will think it sees a *use*, and therefore will trigger all it's 7493fe5e51b7Smrg# C support machinery. Also note that it means that autoscan, seeing 7494fe5e51b7Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 7495fe5e51b7Smrg 7496fe5e51b7Smrg 7497fe5e51b7Smrg# _AM_DEPENDENCIES(NAME) 7498fe5e51b7Smrg# ---------------------- 7499fe5e51b7Smrg# See how the compiler implements dependency checking. 7500fe5e51b7Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 7501fe5e51b7Smrg# We try a few techniques and use that to set a single cache variable. 7502fe5e51b7Smrg# 7503fe5e51b7Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 7504fe5e51b7Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 7505fe5e51b7Smrg# dependency, and given that the user is not expected to run this macro, 7506fe5e51b7Smrg# just rely on AC_PROG_CC. 7507fe5e51b7SmrgAC_DEFUN([_AM_DEPENDENCIES], 7508fe5e51b7Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 7509fe5e51b7SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 7510fe5e51b7SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 7511fe5e51b7SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 7512fe5e51b7Smrg 7513fe5e51b7Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 7514fe5e51b7Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 7515fe5e51b7Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 7516fe5e51b7Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 7517fe5e51b7Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 7518fe5e51b7Smrg [depcc="$$1" am_compiler_list=]) 7519fe5e51b7Smrg 7520fe5e51b7SmrgAC_CACHE_CHECK([dependency style of $depcc], 7521fe5e51b7Smrg [am_cv_$1_dependencies_compiler_type], 7522fe5e51b7Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 7523fe5e51b7Smrg # We make a subdir and do the tests there. Otherwise we can end up 7524fe5e51b7Smrg # making bogus files that we don't know about and never remove. For 7525fe5e51b7Smrg # instance it was reported that on HP-UX the gcc test will end up 7526fe5e51b7Smrg # making a dummy file named `D' -- because `-MD' means `put the output 7527fe5e51b7Smrg # in D'. 7528fe5e51b7Smrg mkdir conftest.dir 7529fe5e51b7Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 7530fe5e51b7Smrg # using a relative directory. 7531fe5e51b7Smrg cp "$am_depcomp" conftest.dir 7532fe5e51b7Smrg cd conftest.dir 7533fe5e51b7Smrg # We will build objects and dependencies in a subdirectory because 7534fe5e51b7Smrg # it helps to detect inapplicable dependency modes. For instance 7535fe5e51b7Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 7536fe5e51b7Smrg # side effect of compilation, but ICC will put the dependencies in 7537fe5e51b7Smrg # the current directory while Tru64 will put them in the object 7538fe5e51b7Smrg # directory. 7539fe5e51b7Smrg mkdir sub 7540fe5e51b7Smrg 7541fe5e51b7Smrg am_cv_$1_dependencies_compiler_type=none 7542fe5e51b7Smrg if test "$am_compiler_list" = ""; then 7543fe5e51b7Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 7544fe5e51b7Smrg fi 7545643b027fSmrg am__universal=false 7546643b027fSmrg m4_case([$1], [CC], 7547643b027fSmrg [case " $depcc " in #( 7548643b027fSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 7549643b027fSmrg esac], 7550643b027fSmrg [CXX], 7551643b027fSmrg [case " $depcc " in #( 7552643b027fSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 7553643b027fSmrg esac]) 7554643b027fSmrg 7555fe5e51b7Smrg for depmode in $am_compiler_list; do 7556fe5e51b7Smrg # Setup a source with many dependencies, because some compilers 7557fe5e51b7Smrg # like to wrap large dependency lists on column 80 (with \), and 7558fe5e51b7Smrg # we should not choose a depcomp mode which is confused by this. 7559fe5e51b7Smrg # 7560fe5e51b7Smrg # We need to recreate these files for each test, as the compiler may 7561fe5e51b7Smrg # overwrite some of them when testing with obscure command lines. 7562fe5e51b7Smrg # This happens at least with the AIX C compiler. 7563fe5e51b7Smrg : > sub/conftest.c 7564fe5e51b7Smrg for i in 1 2 3 4 5 6; do 7565fe5e51b7Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 7566fe5e51b7Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 7567fe5e51b7Smrg # Solaris 8's {/usr,}/bin/sh. 7568fe5e51b7Smrg touch sub/conftst$i.h 7569fe5e51b7Smrg done 7570fe5e51b7Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 7571fe5e51b7Smrg 7572643b027fSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 7573643b027fSmrg # mode. It turns out that the SunPro C++ compiler does not properly 7574643b027fSmrg # handle `-M -o', and we need to detect this. Also, some Intel 7575643b027fSmrg # versions had trouble with output in subdirs 7576643b027fSmrg am__obj=sub/conftest.${OBJEXT-o} 7577643b027fSmrg am__minus_obj="-o $am__obj" 7578fe5e51b7Smrg case $depmode in 7579643b027fSmrg gcc) 7580643b027fSmrg # This depmode causes a compiler race in universal mode. 7581643b027fSmrg test "$am__universal" = false || continue 7582643b027fSmrg ;; 7583fe5e51b7Smrg nosideeffect) 7584fe5e51b7Smrg # after this tag, mechanisms are not by side-effect, so they'll 7585fe5e51b7Smrg # only be used when explicitly requested 7586fe5e51b7Smrg if test "x$enable_dependency_tracking" = xyes; then 7587fe5e51b7Smrg continue 7588fe5e51b7Smrg else 7589fe5e51b7Smrg break 7590fe5e51b7Smrg fi 7591fe5e51b7Smrg ;; 7592643b027fSmrg msvisualcpp | msvcmsys) 7593643b027fSmrg # This compiler won't grok `-c -o', but also, the minuso test has 7594643b027fSmrg # not run yet. These depmodes are late enough in the game, and 7595643b027fSmrg # so weak that their functioning should not be impacted. 7596643b027fSmrg am__obj=conftest.${OBJEXT-o} 7597643b027fSmrg am__minus_obj= 7598643b027fSmrg ;; 7599fe5e51b7Smrg none) break ;; 7600fe5e51b7Smrg esac 7601fe5e51b7Smrg if depmode=$depmode \ 7602643b027fSmrg source=sub/conftest.c object=$am__obj \ 7603fe5e51b7Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 7604643b027fSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 7605fe5e51b7Smrg >/dev/null 2>conftest.err && 7606fe5e51b7Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 7607fe5e51b7Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 7608643b027fSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 7609fe5e51b7Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 7610fe5e51b7Smrg # icc doesn't choke on unknown options, it will just issue warnings 7611fe5e51b7Smrg # or remarks (even with -Werror). So we grep stderr for any message 7612fe5e51b7Smrg # that says an option was ignored or not supported. 7613fe5e51b7Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 7614fe5e51b7Smrg # icc: Command line warning: ignoring option '-M'; no argument required 7615fe5e51b7Smrg # The diagnosis changed in icc 8.0: 7616fe5e51b7Smrg # icc: Command line remark: option '-MP' not supported 7617fe5e51b7Smrg if (grep 'ignoring option' conftest.err || 7618fe5e51b7Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 7619fe5e51b7Smrg am_cv_$1_dependencies_compiler_type=$depmode 7620fe5e51b7Smrg break 7621fe5e51b7Smrg fi 7622fe5e51b7Smrg fi 7623fe5e51b7Smrg done 7624fe5e51b7Smrg 7625fe5e51b7Smrg cd .. 7626fe5e51b7Smrg rm -rf conftest.dir 7627fe5e51b7Smrgelse 7628fe5e51b7Smrg am_cv_$1_dependencies_compiler_type=none 7629fe5e51b7Smrgfi 7630fe5e51b7Smrg]) 7631fe5e51b7SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 7632fe5e51b7SmrgAM_CONDITIONAL([am__fastdep$1], [ 7633fe5e51b7Smrg test "x$enable_dependency_tracking" != xno \ 7634fe5e51b7Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 7635fe5e51b7Smrg]) 7636fe5e51b7Smrg 7637fe5e51b7Smrg 7638fe5e51b7Smrg# AM_SET_DEPDIR 7639fe5e51b7Smrg# ------------- 7640fe5e51b7Smrg# Choose a directory name for dependency files. 7641fe5e51b7Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 7642fe5e51b7SmrgAC_DEFUN([AM_SET_DEPDIR], 7643fe5e51b7Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 7644fe5e51b7SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 7645fe5e51b7Smrg]) 7646fe5e51b7Smrg 7647fe5e51b7Smrg 7648fe5e51b7Smrg# AM_DEP_TRACK 7649fe5e51b7Smrg# ------------ 7650fe5e51b7SmrgAC_DEFUN([AM_DEP_TRACK], 7651fe5e51b7Smrg[AC_ARG_ENABLE(dependency-tracking, 7652fe5e51b7Smrg[ --disable-dependency-tracking speeds up one-time build 7653fe5e51b7Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 7654fe5e51b7Smrgif test "x$enable_dependency_tracking" != xno; then 7655fe5e51b7Smrg am_depcomp="$ac_aux_dir/depcomp" 7656fe5e51b7Smrg AMDEPBACKSLASH='\' 7657fe5e51b7Smrgfi 7658fe5e51b7SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 7659fe5e51b7SmrgAC_SUBST([AMDEPBACKSLASH])dnl 7660fe5e51b7Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 7661fe5e51b7Smrg]) 7662fe5e51b7Smrg 7663fe5e51b7Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 7664fe5e51b7Smrg 7665eda3803bSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 7666fe5e51b7Smrg# Free Software Foundation, Inc. 7667fe5e51b7Smrg# 7668fe5e51b7Smrg# This file is free software; the Free Software Foundation 7669fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 7670fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 7671fe5e51b7Smrg 7672643b027fSmrg#serial 5 7673fe5e51b7Smrg 7674fe5e51b7Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 7675fe5e51b7Smrg# ------------------------------ 7676fe5e51b7SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 7677643b027fSmrg[{ 7678643b027fSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 7679643b027fSmrg # are listed without --file. Let's play safe and only enable the eval 7680643b027fSmrg # if we detect the quoting. 7681643b027fSmrg case $CONFIG_FILES in 7682643b027fSmrg *\'*) eval set x "$CONFIG_FILES" ;; 7683643b027fSmrg *) set x $CONFIG_FILES ;; 7684643b027fSmrg esac 7685643b027fSmrg shift 7686643b027fSmrg for mf 7687643b027fSmrg do 7688643b027fSmrg # Strip MF so we end up with the name of the file. 7689643b027fSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 7690643b027fSmrg # Check whether this is an Automake generated Makefile or not. 7691643b027fSmrg # We used to match only the files named `Makefile.in', but 7692643b027fSmrg # some people rename them; so instead we look at the file content. 7693643b027fSmrg # Grep'ing the first line is not enough: some people post-process 7694643b027fSmrg # each Makefile.in and add a new line on top of each file to say so. 7695643b027fSmrg # Grep'ing the whole file is not good either: AIX grep has a line 7696643b027fSmrg # limit of 2048, but all sed's we know have understand at least 4000. 7697643b027fSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 7698643b027fSmrg dirpart=`AS_DIRNAME("$mf")` 7699643b027fSmrg else 7700643b027fSmrg continue 7701643b027fSmrg fi 7702643b027fSmrg # Extract the definition of DEPDIR, am__include, and am__quote 7703643b027fSmrg # from the Makefile without running `make'. 7704643b027fSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 7705643b027fSmrg test -z "$DEPDIR" && continue 7706643b027fSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 7707643b027fSmrg test -z "am__include" && continue 7708643b027fSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 7709643b027fSmrg # When using ansi2knr, U may be empty or an underscore; expand it 7710643b027fSmrg U=`sed -n 's/^U = //p' < "$mf"` 7711643b027fSmrg # Find all dependency output files, they are included files with 7712643b027fSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 7713643b027fSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 7714643b027fSmrg # expansion. 7715643b027fSmrg for file in `sed -n " 7716643b027fSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 7717643b027fSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 7718643b027fSmrg # Make sure the directory exists. 7719643b027fSmrg test -f "$dirpart/$file" && continue 7720643b027fSmrg fdir=`AS_DIRNAME(["$file"])` 7721643b027fSmrg AS_MKDIR_P([$dirpart/$fdir]) 7722643b027fSmrg # echo "creating $dirpart/$file" 7723643b027fSmrg echo '# dummy' > "$dirpart/$file" 7724643b027fSmrg done 7725fe5e51b7Smrg done 7726643b027fSmrg} 7727fe5e51b7Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 7728fe5e51b7Smrg 7729fe5e51b7Smrg 7730fe5e51b7Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 7731fe5e51b7Smrg# ----------------------------- 7732fe5e51b7Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 7733fe5e51b7Smrg# 7734fe5e51b7Smrg# This code is only required when automatic dependency tracking 7735fe5e51b7Smrg# is enabled. FIXME. This creates each `.P' file that we will 7736fe5e51b7Smrg# need in order to bootstrap the dependency handling code. 7737fe5e51b7SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 7738fe5e51b7Smrg[AC_CONFIG_COMMANDS([depfiles], 7739fe5e51b7Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 7740fe5e51b7Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 7741fe5e51b7Smrg]) 7742fe5e51b7Smrg 7743fe5e51b7Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 7744fe5e51b7Smrg# Free Software Foundation, Inc. 7745fe5e51b7Smrg# 7746fe5e51b7Smrg# This file is free software; the Free Software Foundation 7747fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 7748fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 7749fe5e51b7Smrg 7750fe5e51b7Smrg# serial 8 7751fe5e51b7Smrg 7752fe5e51b7Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 7753fe5e51b7SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 7754fe5e51b7Smrg 7755fe5e51b7Smrg# Do all the work for Automake. -*- Autoconf -*- 7756fe5e51b7Smrg 7757fe5e51b7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 7758643b027fSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 7759fe5e51b7Smrg# 7760fe5e51b7Smrg# This file is free software; the Free Software Foundation 7761fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 7762fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 7763fe5e51b7Smrg 7764643b027fSmrg# serial 16 7765fe5e51b7Smrg 7766fe5e51b7Smrg# This macro actually does too much. Some checks are only needed if 7767fe5e51b7Smrg# your package does certain things. But this isn't really a big deal. 7768fe5e51b7Smrg 7769fe5e51b7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 7770fe5e51b7Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 7771fe5e51b7Smrg# ----------------------------------------------- 7772fe5e51b7Smrg# The call with PACKAGE and VERSION arguments is the old style 7773fe5e51b7Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 7774fe5e51b7Smrg# and VERSION should now be passed to AC_INIT and removed from 7775fe5e51b7Smrg# the call to AM_INIT_AUTOMAKE. 7776fe5e51b7Smrg# We support both call styles for the transition. After 7777fe5e51b7Smrg# the next Automake release, Autoconf can make the AC_INIT 7778fe5e51b7Smrg# arguments mandatory, and then we can depend on a new Autoconf 7779fe5e51b7Smrg# release and drop the old call support. 7780fe5e51b7SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 7781643b027fSmrg[AC_PREREQ([2.62])dnl 7782fe5e51b7Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 7783fe5e51b7Smrgdnl the ones we care about. 7784fe5e51b7Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 7785fe5e51b7SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 7786fe5e51b7SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 7787fe5e51b7Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 7788fe5e51b7Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 7789fe5e51b7Smrg # is not polluted with repeated "-I." 7790fe5e51b7Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 7791fe5e51b7Smrg # test to see if srcdir already configured 7792fe5e51b7Smrg if test -f $srcdir/config.status; then 7793fe5e51b7Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 7794fe5e51b7Smrg fi 7795fe5e51b7Smrgfi 7796fe5e51b7Smrg 7797fe5e51b7Smrg# test whether we have cygpath 7798fe5e51b7Smrgif test -z "$CYGPATH_W"; then 7799fe5e51b7Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 7800fe5e51b7Smrg CYGPATH_W='cygpath -w' 7801fe5e51b7Smrg else 7802fe5e51b7Smrg CYGPATH_W=echo 7803fe5e51b7Smrg fi 7804fe5e51b7Smrgfi 7805fe5e51b7SmrgAC_SUBST([CYGPATH_W]) 7806fe5e51b7Smrg 7807fe5e51b7Smrg# Define the identity of the package. 7808fe5e51b7Smrgdnl Distinguish between old-style and new-style calls. 7809fe5e51b7Smrgm4_ifval([$2], 7810fe5e51b7Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 7811fe5e51b7Smrg AC_SUBST([PACKAGE], [$1])dnl 7812fe5e51b7Smrg AC_SUBST([VERSION], [$2])], 7813fe5e51b7Smrg[_AM_SET_OPTIONS([$1])dnl 7814fe5e51b7Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 7815fe5e51b7Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 7816fe5e51b7Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 7817fe5e51b7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 7818fe5e51b7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 7819fe5e51b7Smrg 7820fe5e51b7Smrg_AM_IF_OPTION([no-define],, 7821fe5e51b7Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 7822fe5e51b7Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 7823fe5e51b7Smrg 7824fe5e51b7Smrg# Some tools Automake needs. 7825fe5e51b7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 7826fe5e51b7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 7827fe5e51b7SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 7828fe5e51b7SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 7829fe5e51b7SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 7830fe5e51b7SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 7831fe5e51b7SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 7832643b027fSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 7833643b027fSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 7834fe5e51b7SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 7835fe5e51b7Smrg# We need awk for the "check" target. The system "awk" is bad on 7836fe5e51b7Smrg# some platforms. 7837fe5e51b7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 7838fe5e51b7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 7839fe5e51b7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 7840fe5e51b7Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 7841643b027fSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 7842643b027fSmrg [_AM_PROG_TAR([v7])])]) 7843fe5e51b7Smrg_AM_IF_OPTION([no-dependencies],, 7844fe5e51b7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 7845643b027fSmrg [_AM_DEPENDENCIES(CC)], 7846643b027fSmrg [define([AC_PROG_CC], 7847643b027fSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 7848fe5e51b7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 7849643b027fSmrg [_AM_DEPENDENCIES(CXX)], 7850643b027fSmrg [define([AC_PROG_CXX], 7851643b027fSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 7852fe5e51b7SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 7853643b027fSmrg [_AM_DEPENDENCIES(OBJC)], 7854643b027fSmrg [define([AC_PROG_OBJC], 7855643b027fSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 7856fe5e51b7Smrg]) 7857643b027fSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 7858643b027fSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 7859643b027fSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 7860643b027fSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 7861643b027fSmrgAC_CONFIG_COMMANDS_PRE(dnl 7862643b027fSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 7863643b027fSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 7864fe5e51b7Smrg]) 7865fe5e51b7Smrg 7866643b027fSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 7867643b027fSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 7868643b027fSmrgdnl mangled by Autoconf and run in a shell conditional statement. 7869643b027fSmrgm4_define([_AC_COMPILER_EXEEXT], 7870643b027fSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 7871643b027fSmrg 7872fe5e51b7Smrg 7873fe5e51b7Smrg# When config.status generates a header, we must update the stamp-h file. 7874fe5e51b7Smrg# This file resides in the same directory as the config header 7875fe5e51b7Smrg# that is generated. The stamp files are numbered to have different names. 7876fe5e51b7Smrg 7877fe5e51b7Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 7878fe5e51b7Smrg# loop where config.status creates the headers, so we can generate 7879fe5e51b7Smrg# our stamp files there. 7880fe5e51b7SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 7881fe5e51b7Smrg[# Compute $1's index in $config_headers. 7882eda3803bSmrg_am_arg=$1 7883fe5e51b7Smrg_am_stamp_count=1 7884fe5e51b7Smrgfor _am_header in $config_headers :; do 7885fe5e51b7Smrg case $_am_header in 7886eda3803bSmrg $_am_arg | $_am_arg:* ) 7887fe5e51b7Smrg break ;; 7888fe5e51b7Smrg * ) 7889fe5e51b7Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 7890fe5e51b7Smrg esac 7891fe5e51b7Smrgdone 7892eda3803bSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 7893fe5e51b7Smrg 7894643b027fSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 7895fe5e51b7Smrg# 7896fe5e51b7Smrg# This file is free software; the Free Software Foundation 7897fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 7898fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 7899fe5e51b7Smrg 7900fe5e51b7Smrg# AM_PROG_INSTALL_SH 7901fe5e51b7Smrg# ------------------ 7902fe5e51b7Smrg# Define $install_sh. 7903fe5e51b7SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 7904fe5e51b7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7905643b027fSmrgif test x"${install_sh}" != xset; then 7906643b027fSmrg case $am_aux_dir in 7907643b027fSmrg *\ * | *\ *) 7908643b027fSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 7909643b027fSmrg *) 7910643b027fSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 7911643b027fSmrg esac 7912643b027fSmrgfi 7913fe5e51b7SmrgAC_SUBST(install_sh)]) 7914fe5e51b7Smrg 7915fe5e51b7Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 7916fe5e51b7Smrg# 7917fe5e51b7Smrg# This file is free software; the Free Software Foundation 7918fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 7919fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 7920fe5e51b7Smrg 7921fe5e51b7Smrg# serial 2 7922fe5e51b7Smrg 7923fe5e51b7Smrg# Check whether the underlying file-system supports filenames 7924fe5e51b7Smrg# with a leading dot. For instance MS-DOS doesn't. 7925fe5e51b7SmrgAC_DEFUN([AM_SET_LEADING_DOT], 7926fe5e51b7Smrg[rm -rf .tst 2>/dev/null 7927fe5e51b7Smrgmkdir .tst 2>/dev/null 7928fe5e51b7Smrgif test -d .tst; then 7929fe5e51b7Smrg am__leading_dot=. 7930fe5e51b7Smrgelse 7931fe5e51b7Smrg am__leading_dot=_ 7932fe5e51b7Smrgfi 7933fe5e51b7Smrgrmdir .tst 2>/dev/null 7934fe5e51b7SmrgAC_SUBST([am__leading_dot])]) 7935fe5e51b7Smrg 7936fe5e51b7Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 7937fe5e51b7Smrg# From Jim Meyering 7938fe5e51b7Smrg 7939643b027fSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 7940fe5e51b7Smrg# Free Software Foundation, Inc. 7941fe5e51b7Smrg# 7942fe5e51b7Smrg# This file is free software; the Free Software Foundation 7943fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 7944fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 7945fe5e51b7Smrg 7946643b027fSmrg# serial 5 7947fe5e51b7Smrg 7948643b027fSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 7949643b027fSmrg# ---------------------------------- 7950643b027fSmrg# Control maintainer-specific portions of Makefiles. 7951643b027fSmrg# Default is to disable them, unless `enable' is passed literally. 7952643b027fSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 7953643b027fSmrg# can override the default with the --enable/--disable switch. 7954fe5e51b7SmrgAC_DEFUN([AM_MAINTAINER_MODE], 7955643b027fSmrg[m4_case(m4_default([$1], [disable]), 7956643b027fSmrg [enable], [m4_define([am_maintainer_other], [disable])], 7957643b027fSmrg [disable], [m4_define([am_maintainer_other], [enable])], 7958643b027fSmrg [m4_define([am_maintainer_other], [enable]) 7959643b027fSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 7960643b027fSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 7961643b027fSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 7962643b027fSmrg AC_ARG_ENABLE([maintainer-mode], 7963643b027fSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 7964fe5e51b7Smrg (and sometimes confusing) to the casual installer], 7965643b027fSmrg [USE_MAINTAINER_MODE=$enableval], 7966643b027fSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 7967fe5e51b7Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 7968643b027fSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 7969fe5e51b7Smrg MAINT=$MAINTAINER_MODE_TRUE 7970643b027fSmrg AC_SUBST([MAINT])dnl 7971fe5e51b7Smrg] 7972fe5e51b7Smrg) 7973fe5e51b7Smrg 7974fe5e51b7SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 7975fe5e51b7Smrg 7976fe5e51b7Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 7977fe5e51b7Smrg 7978643b027fSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 7979fe5e51b7Smrg# 7980fe5e51b7Smrg# This file is free software; the Free Software Foundation 7981fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 7982fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 7983fe5e51b7Smrg 7984643b027fSmrg# serial 4 7985fe5e51b7Smrg 7986fe5e51b7Smrg# AM_MAKE_INCLUDE() 7987fe5e51b7Smrg# ----------------- 7988fe5e51b7Smrg# Check to see how make treats includes. 7989fe5e51b7SmrgAC_DEFUN([AM_MAKE_INCLUDE], 7990fe5e51b7Smrg[am_make=${MAKE-make} 7991fe5e51b7Smrgcat > confinc << 'END' 7992fe5e51b7Smrgam__doit: 7993643b027fSmrg @echo this is the am__doit target 7994fe5e51b7Smrg.PHONY: am__doit 7995fe5e51b7SmrgEND 7996fe5e51b7Smrg# If we don't find an include directive, just comment out the code. 7997fe5e51b7SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 7998fe5e51b7Smrgam__include="#" 7999fe5e51b7Smrgam__quote= 8000fe5e51b7Smrg_am_result=none 8001fe5e51b7Smrg# First try GNU make style include. 8002fe5e51b7Smrgecho "include confinc" > confmf 8003643b027fSmrg# Ignore all kinds of additional output from `make'. 8004643b027fSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 8005643b027fSmrg*the\ am__doit\ target*) 8006643b027fSmrg am__include=include 8007643b027fSmrg am__quote= 8008643b027fSmrg _am_result=GNU 8009643b027fSmrg ;; 8010643b027fSmrgesac 8011fe5e51b7Smrg# Now try BSD make style include. 8012fe5e51b7Smrgif test "$am__include" = "#"; then 8013fe5e51b7Smrg echo '.include "confinc"' > confmf 8014643b027fSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 8015643b027fSmrg *the\ am__doit\ target*) 8016643b027fSmrg am__include=.include 8017643b027fSmrg am__quote="\"" 8018643b027fSmrg _am_result=BSD 8019643b027fSmrg ;; 8020643b027fSmrg esac 8021fe5e51b7Smrgfi 8022fe5e51b7SmrgAC_SUBST([am__include]) 8023fe5e51b7SmrgAC_SUBST([am__quote]) 8024fe5e51b7SmrgAC_MSG_RESULT([$_am_result]) 8025fe5e51b7Smrgrm -f confinc confmf 8026fe5e51b7Smrg]) 8027fe5e51b7Smrg 8028fe5e51b7Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 8029fe5e51b7Smrg 8030643b027fSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 8031fe5e51b7Smrg# Free Software Foundation, Inc. 8032fe5e51b7Smrg# 8033fe5e51b7Smrg# This file is free software; the Free Software Foundation 8034fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 8035fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 8036fe5e51b7Smrg 8037643b027fSmrg# serial 6 8038fe5e51b7Smrg 8039fe5e51b7Smrg# AM_MISSING_PROG(NAME, PROGRAM) 8040fe5e51b7Smrg# ------------------------------ 8041fe5e51b7SmrgAC_DEFUN([AM_MISSING_PROG], 8042fe5e51b7Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 8043fe5e51b7Smrg$1=${$1-"${am_missing_run}$2"} 8044fe5e51b7SmrgAC_SUBST($1)]) 8045fe5e51b7Smrg 8046fe5e51b7Smrg 8047fe5e51b7Smrg# AM_MISSING_HAS_RUN 8048fe5e51b7Smrg# ------------------ 8049fe5e51b7Smrg# Define MISSING if not defined so far and test if it supports --run. 8050fe5e51b7Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 8051fe5e51b7SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 8052fe5e51b7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 8053fe5e51b7SmrgAC_REQUIRE_AUX_FILE([missing])dnl 8054643b027fSmrgif test x"${MISSING+set}" != xset; then 8055643b027fSmrg case $am_aux_dir in 8056643b027fSmrg *\ * | *\ *) 8057643b027fSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 8058643b027fSmrg *) 8059643b027fSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 8060643b027fSmrg esac 8061643b027fSmrgfi 8062fe5e51b7Smrg# Use eval to expand $SHELL 8063fe5e51b7Smrgif eval "$MISSING --run true"; then 8064fe5e51b7Smrg am_missing_run="$MISSING --run " 8065fe5e51b7Smrgelse 8066fe5e51b7Smrg am_missing_run= 8067fe5e51b7Smrg AC_MSG_WARN([`missing' script is too old or missing]) 8068fe5e51b7Smrgfi 8069fe5e51b7Smrg]) 8070fe5e51b7Smrg 8071fe5e51b7Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 8072fe5e51b7Smrg# 8073fe5e51b7Smrg# This file is free software; the Free Software Foundation 8074fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 8075fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 8076fe5e51b7Smrg 8077fe5e51b7Smrg# AM_PROG_MKDIR_P 8078fe5e51b7Smrg# --------------- 8079fe5e51b7Smrg# Check for `mkdir -p'. 8080fe5e51b7SmrgAC_DEFUN([AM_PROG_MKDIR_P], 8081fe5e51b7Smrg[AC_PREREQ([2.60])dnl 8082fe5e51b7SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 8083fe5e51b7Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 8084fe5e51b7Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 8085fe5e51b7Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 8086fe5e51b7Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 8087fe5e51b7Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 8088fe5e51b7Smrgdnl adjustment using top_builddir (which is defined more often than 8089fe5e51b7Smrgdnl MKDIR_P). 8090fe5e51b7SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 8091fe5e51b7Smrgcase $mkdir_p in 8092fe5e51b7Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 8093fe5e51b7Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 8094fe5e51b7Smrgesac 8095fe5e51b7Smrg]) 8096fe5e51b7Smrg 8097fe5e51b7Smrg# Helper functions for option handling. -*- Autoconf -*- 8098fe5e51b7Smrg 8099eda3803bSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 8100fe5e51b7Smrg# 8101fe5e51b7Smrg# This file is free software; the Free Software Foundation 8102fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 8103fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 8104fe5e51b7Smrg 8105eda3803bSmrg# serial 4 8106fe5e51b7Smrg 8107fe5e51b7Smrg# _AM_MANGLE_OPTION(NAME) 8108fe5e51b7Smrg# ----------------------- 8109fe5e51b7SmrgAC_DEFUN([_AM_MANGLE_OPTION], 8110fe5e51b7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 8111fe5e51b7Smrg 8112fe5e51b7Smrg# _AM_SET_OPTION(NAME) 8113fe5e51b7Smrg# ------------------------------ 8114fe5e51b7Smrg# Set option NAME. Presently that only means defining a flag for this option. 8115fe5e51b7SmrgAC_DEFUN([_AM_SET_OPTION], 8116fe5e51b7Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 8117fe5e51b7Smrg 8118fe5e51b7Smrg# _AM_SET_OPTIONS(OPTIONS) 8119fe5e51b7Smrg# ---------------------------------- 8120fe5e51b7Smrg# OPTIONS is a space-separated list of Automake options. 8121fe5e51b7SmrgAC_DEFUN([_AM_SET_OPTIONS], 8122eda3803bSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 8123fe5e51b7Smrg 8124fe5e51b7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 8125fe5e51b7Smrg# ------------------------------------------- 8126fe5e51b7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8127fe5e51b7SmrgAC_DEFUN([_AM_IF_OPTION], 8128fe5e51b7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 8129fe5e51b7Smrg 8130fe5e51b7Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8131fe5e51b7Smrg 8132643b027fSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 8133fe5e51b7Smrg# Free Software Foundation, Inc. 8134fe5e51b7Smrg# 8135fe5e51b7Smrg# This file is free software; the Free Software Foundation 8136fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 8137fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 8138fe5e51b7Smrg 8139643b027fSmrg# serial 5 8140fe5e51b7Smrg 8141fe5e51b7Smrg# AM_SANITY_CHECK 8142fe5e51b7Smrg# --------------- 8143fe5e51b7SmrgAC_DEFUN([AM_SANITY_CHECK], 8144fe5e51b7Smrg[AC_MSG_CHECKING([whether build environment is sane]) 8145fe5e51b7Smrg# Just in case 8146fe5e51b7Smrgsleep 1 8147fe5e51b7Smrgecho timestamp > conftest.file 8148643b027fSmrg# Reject unsafe characters in $srcdir or the absolute working directory 8149643b027fSmrg# name. Accept space and tab only in the latter. 8150643b027fSmrgam_lf=' 8151643b027fSmrg' 8152643b027fSmrgcase `pwd` in 8153643b027fSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8154643b027fSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8155643b027fSmrgesac 8156643b027fSmrgcase $srcdir in 8157643b027fSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8158643b027fSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 8159643b027fSmrgesac 8160643b027fSmrg 8161fe5e51b7Smrg# Do `set' in a subshell so we don't clobber the current shell's 8162fe5e51b7Smrg# arguments. Must try -L first in case configure is actually a 8163fe5e51b7Smrg# symlink; some systems play weird games with the mod time of symlinks 8164fe5e51b7Smrg# (eg FreeBSD returns the mod time of the symlink's containing 8165fe5e51b7Smrg# directory). 8166fe5e51b7Smrgif ( 8167643b027fSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8168fe5e51b7Smrg if test "$[*]" = "X"; then 8169fe5e51b7Smrg # -L didn't work. 8170643b027fSmrg set X `ls -t "$srcdir/configure" conftest.file` 8171fe5e51b7Smrg fi 8172fe5e51b7Smrg rm -f conftest.file 8173fe5e51b7Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8174fe5e51b7Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8175fe5e51b7Smrg 8176fe5e51b7Smrg # If neither matched, then we have a broken ls. This can happen 8177fe5e51b7Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8178fe5e51b7Smrg # broken ls alias from the environment. This has actually 8179fe5e51b7Smrg # happened. Such a system could not be considered "sane". 8180fe5e51b7Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8181fe5e51b7Smrgalias in your environment]) 8182fe5e51b7Smrg fi 8183fe5e51b7Smrg 8184fe5e51b7Smrg test "$[2]" = conftest.file 8185fe5e51b7Smrg ) 8186fe5e51b7Smrgthen 8187fe5e51b7Smrg # Ok. 8188fe5e51b7Smrg : 8189fe5e51b7Smrgelse 8190fe5e51b7Smrg AC_MSG_ERROR([newly created file is older than distributed files! 8191fe5e51b7SmrgCheck your system clock]) 8192fe5e51b7Smrgfi 8193fe5e51b7SmrgAC_MSG_RESULT(yes)]) 8194fe5e51b7Smrg 8195fe5e51b7Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8196fe5e51b7Smrg# 8197fe5e51b7Smrg# This file is free software; the Free Software Foundation 8198fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 8199fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 8200fe5e51b7Smrg 8201fe5e51b7Smrg# AM_PROG_INSTALL_STRIP 8202fe5e51b7Smrg# --------------------- 8203fe5e51b7Smrg# One issue with vendor `install' (even GNU) is that you can't 8204fe5e51b7Smrg# specify the program used to strip binaries. This is especially 8205fe5e51b7Smrg# annoying in cross-compiling environments, where the build's strip 8206fe5e51b7Smrg# is unlikely to handle the host's binaries. 8207fe5e51b7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 8208fe5e51b7Smrg# always use install-sh in `make install-strip', and initialize 8209fe5e51b7Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 8210fe5e51b7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 8211fe5e51b7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 8212fe5e51b7Smrg# Installed binaries are usually stripped using `strip' when the user 8213fe5e51b7Smrg# run `make install-strip'. However `strip' might not be the right 8214fe5e51b7Smrg# tool to use in cross-compilation environments, therefore Automake 8215fe5e51b7Smrg# will honor the `STRIP' environment variable to overrule this program. 8216fe5e51b7Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 8217fe5e51b7Smrgif test "$cross_compiling" != no; then 8218fe5e51b7Smrg AC_CHECK_TOOL([STRIP], [strip], :) 8219fe5e51b7Smrgfi 8220fe5e51b7SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 8221fe5e51b7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 8222fe5e51b7Smrg 8223643b027fSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 8224fe5e51b7Smrg# 8225fe5e51b7Smrg# This file is free software; the Free Software Foundation 8226fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 8227fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 8228fe5e51b7Smrg 8229643b027fSmrg# serial 2 8230643b027fSmrg 8231fe5e51b7Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 8232fe5e51b7Smrg# --------------------------- 8233eda3803bSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 8234fe5e51b7Smrg# This macro is traced by Automake. 8235fe5e51b7SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 8236fe5e51b7Smrg 8237643b027fSmrg# AM_SUBST_NOTMAKE(VARIABLE) 8238643b027fSmrg# --------------------------- 8239643b027fSmrg# Public sister of _AM_SUBST_NOTMAKE. 8240643b027fSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 8241643b027fSmrg 8242fe5e51b7Smrg# Check how to create a tarball. -*- Autoconf -*- 8243fe5e51b7Smrg 8244fe5e51b7Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 8245fe5e51b7Smrg# 8246fe5e51b7Smrg# This file is free software; the Free Software Foundation 8247fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 8248fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 8249fe5e51b7Smrg 8250fe5e51b7Smrg# serial 2 8251fe5e51b7Smrg 8252fe5e51b7Smrg# _AM_PROG_TAR(FORMAT) 8253fe5e51b7Smrg# -------------------- 8254fe5e51b7Smrg# Check how to create a tarball in format FORMAT. 8255fe5e51b7Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 8256fe5e51b7Smrg# 8257fe5e51b7Smrg# Substitute a variable $(am__tar) that is a command 8258fe5e51b7Smrg# writing to stdout a FORMAT-tarball containing the directory 8259fe5e51b7Smrg# $tardir. 8260fe5e51b7Smrg# tardir=directory && $(am__tar) > result.tar 8261fe5e51b7Smrg# 8262fe5e51b7Smrg# Substitute a variable $(am__untar) that extract such 8263fe5e51b7Smrg# a tarball read from stdin. 8264fe5e51b7Smrg# $(am__untar) < result.tar 8265fe5e51b7SmrgAC_DEFUN([_AM_PROG_TAR], 8266fe5e51b7Smrg[# Always define AMTAR for backward compatibility. 8267fe5e51b7SmrgAM_MISSING_PROG([AMTAR], [tar]) 8268fe5e51b7Smrgm4_if([$1], [v7], 8269fe5e51b7Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 8270fe5e51b7Smrg [m4_case([$1], [ustar],, [pax],, 8271fe5e51b7Smrg [m4_fatal([Unknown tar format])]) 8272fe5e51b7SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 8273fe5e51b7Smrg# Loop over all known methods to create a tar archive until one works. 8274fe5e51b7Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 8275fe5e51b7Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 8276fe5e51b7Smrg# Do not fold the above two line into one, because Tru64 sh and 8277fe5e51b7Smrg# Solaris sh will not grok spaces in the rhs of `-'. 8278fe5e51b7Smrgfor _am_tool in $_am_tools 8279fe5e51b7Smrgdo 8280fe5e51b7Smrg case $_am_tool in 8281fe5e51b7Smrg gnutar) 8282fe5e51b7Smrg for _am_tar in tar gnutar gtar; 8283fe5e51b7Smrg do 8284fe5e51b7Smrg AM_RUN_LOG([$_am_tar --version]) && break 8285fe5e51b7Smrg done 8286fe5e51b7Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 8287fe5e51b7Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 8288fe5e51b7Smrg am__untar="$_am_tar -xf -" 8289fe5e51b7Smrg ;; 8290fe5e51b7Smrg plaintar) 8291fe5e51b7Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 8292fe5e51b7Smrg # ustar tarball either. 8293fe5e51b7Smrg (tar --version) >/dev/null 2>&1 && continue 8294fe5e51b7Smrg am__tar='tar chf - "$$tardir"' 8295fe5e51b7Smrg am__tar_='tar chf - "$tardir"' 8296fe5e51b7Smrg am__untar='tar xf -' 8297fe5e51b7Smrg ;; 8298fe5e51b7Smrg pax) 8299fe5e51b7Smrg am__tar='pax -L -x $1 -w "$$tardir"' 8300fe5e51b7Smrg am__tar_='pax -L -x $1 -w "$tardir"' 8301fe5e51b7Smrg am__untar='pax -r' 8302fe5e51b7Smrg ;; 8303fe5e51b7Smrg cpio) 8304fe5e51b7Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 8305fe5e51b7Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 8306fe5e51b7Smrg am__untar='cpio -i -H $1 -d' 8307fe5e51b7Smrg ;; 8308fe5e51b7Smrg none) 8309fe5e51b7Smrg am__tar=false 8310fe5e51b7Smrg am__tar_=false 8311fe5e51b7Smrg am__untar=false 8312fe5e51b7Smrg ;; 8313fe5e51b7Smrg esac 8314fe5e51b7Smrg 8315fe5e51b7Smrg # If the value was cached, stop now. We just wanted to have am__tar 8316fe5e51b7Smrg # and am__untar set. 8317fe5e51b7Smrg test -n "${am_cv_prog_tar_$1}" && break 8318fe5e51b7Smrg 8319fe5e51b7Smrg # tar/untar a dummy directory, and stop if the command works 8320fe5e51b7Smrg rm -rf conftest.dir 8321fe5e51b7Smrg mkdir conftest.dir 8322fe5e51b7Smrg echo GrepMe > conftest.dir/file 8323fe5e51b7Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 8324fe5e51b7Smrg rm -rf conftest.dir 8325fe5e51b7Smrg if test -s conftest.tar; then 8326fe5e51b7Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 8327fe5e51b7Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 8328fe5e51b7Smrg fi 8329fe5e51b7Smrgdone 8330fe5e51b7Smrgrm -rf conftest.dir 8331fe5e51b7Smrg 8332fe5e51b7SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 8333fe5e51b7SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 8334fe5e51b7SmrgAC_SUBST([am__tar]) 8335fe5e51b7SmrgAC_SUBST([am__untar]) 8336fe5e51b7Smrg]) # _AM_PROG_TAR 8337fe5e51b7Smrg 8338643b027fSmrgdnl Copyright 2005 Red Hat, Inc 8339643b027fSmrgdnl 8340643b027fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 8341643b027fSmrgdnl documentation for any purpose is hereby granted without fee, provided that 8342643b027fSmrgdnl the above copyright notice appear in all copies and that both that 8343643b027fSmrgdnl copyright notice and this permission notice appear in supporting 8344643b027fSmrgdnl documentation. 8345643b027fSmrgdnl 8346643b027fSmrgdnl The above copyright notice and this permission notice shall be included 8347643b027fSmrgdnl in all copies or substantial portions of the Software. 8348643b027fSmrgdnl 8349643b027fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 8350643b027fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 8351643b027fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 8352643b027fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 8353643b027fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 8354643b027fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 8355643b027fSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 8356643b027fSmrgdnl 8357643b027fSmrgdnl Except as contained in this notice, the name of the copyright holders shall 8358643b027fSmrgdnl not be used in advertising or otherwise to promote the sale, use or 8359643b027fSmrgdnl other dealings in this Software without prior written authorization 8360643b027fSmrgdnl from the copyright holders. 8361643b027fSmrgdnl 8362643b027fSmrg 8363643b027fSmrg# XORG_DRIVER_CHECK_EXT() 8364643b027fSmrg# -------------------------- 8365643b027fSmrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 8366643b027fSmrg# is defined, then add $1 to $REQUIRED_MODULES. 8367643b027fSmrg 8368643b027fSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 8369643b027fSmrg SAVE_CFLAGS="$CFLAGS" 8370643b027fSmrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 8371643b027fSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 8372643b027fSmrg#include "xorg-server.h" 8373643b027fSmrg#if !defined $1 8374643b027fSmrg#error $1 not defined 8375643b027fSmrg#endif 8376643b027fSmrg ]])], 8377643b027fSmrg [_EXT_CHECK=yes], 8378643b027fSmrg [_EXT_CHECK=no]) 8379643b027fSmrg CFLAGS="$SAVE_CFLAGS" 8380643b027fSmrg AC_MSG_CHECKING([if $1 is defined]) 8381643b027fSmrg AC_MSG_RESULT([$_EXT_CHECK]) 8382643b027fSmrg if test "$_EXT_CHECK" != no; then 8383643b027fSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 8384643b027fSmrg fi 8385643b027fSmrg]) 8386643b027fSmrg 8387