aclocal.m4 revision 6aab59a7
1659607e0Smrg# generated automatically by aclocal 1.10 -*- Autoconf -*- 2659607e0Smrg 3659607e0Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4659607e0Smrg# 2005, 2006 Free Software Foundation, Inc. 5659607e0Smrg# This file is free software; the Free Software Foundation 6659607e0Smrg# gives unlimited permission to copy and/or distribute it, 7659607e0Smrg# with or without modifications, as long as this notice is preserved. 8659607e0Smrg 9659607e0Smrg# This program is distributed in the hope that it will be useful, 10659607e0Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11659607e0Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12659607e0Smrg# PARTICULAR PURPOSE. 13659607e0Smrg 14659607e0Smrgm4_if(m4_PACKAGE_VERSION, [2.61],, 15659607e0Smrg[m4_fatal([this file was generated for autoconf 2.61. 16659607e0SmrgYou have another version of autoconf. If you want to use that, 17659607e0Smrgyou should regenerate the build system entirely.], [63])]) 18659607e0Smrg 196aab59a7Smrg# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. 206aab59a7Smrg# 216aab59a7Smrg# This file is free software; the Free Software Foundation 226aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 236aab59a7Smrg# with or without modifications, as long as this notice is preserved. 24659607e0Smrg 256aab59a7Smrg# AM_AUTOMAKE_VERSION(VERSION) 266aab59a7Smrg# ---------------------------- 276aab59a7Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 286aab59a7Smrg# generated from the m4 files accompanying Automake X.Y. 296aab59a7Smrg# (This private macro should not be called outside this file.) 306aab59a7SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 316aab59a7Smrg[am__api_version='1.10' 326aab59a7Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 336aab59a7Smrgdnl require some minimum version. Point them to the right macro. 346aab59a7Smrgm4_if([$1], [1.10], [], 356aab59a7Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 366aab59a7Smrg]) 37659607e0Smrg 386aab59a7Smrg# _AM_AUTOCONF_VERSION(VERSION) 396aab59a7Smrg# ----------------------------- 406aab59a7Smrg# aclocal traces this macro to find the Autoconf version. 416aab59a7Smrg# This is a private macro too. Using m4_define simplifies 426aab59a7Smrg# the logic in aclocal, which can simply ignore this definition. 436aab59a7Smrgm4_define([_AM_AUTOCONF_VERSION], []) 44659607e0Smrg 456aab59a7Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 466aab59a7Smrg# ------------------------------- 476aab59a7Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 486aab59a7Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 496aab59a7SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 506aab59a7Smrg[AM_AUTOMAKE_VERSION([1.10])dnl 516aab59a7Smrg_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) 52659607e0Smrg 536aab59a7Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 54659607e0Smrg 556aab59a7Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 566aab59a7Smrg# 576aab59a7Smrg# This file is free software; the Free Software Foundation 586aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 596aab59a7Smrg# with or without modifications, as long as this notice is preserved. 60659607e0Smrg 616aab59a7Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 626aab59a7Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 636aab59a7Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 646aab59a7Smrg# 656aab59a7Smrg# Of course, Automake must honor this variable whenever it calls a 666aab59a7Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 676aab59a7Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 686aab59a7Smrg# depending on how configure is run. This is pretty annoying, since 696aab59a7Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 706aab59a7Smrg# source directory, any form will work fine, but in subdirectories a 716aab59a7Smrg# relative path needs to be adjusted first. 726aab59a7Smrg# 736aab59a7Smrg# $ac_aux_dir/missing 746aab59a7Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 756aab59a7Smrg# $top_srcdir/$ac_aux_dir/missing 766aab59a7Smrg# fails if $ac_aux_dir is absolute, 776aab59a7Smrg# fails when called from a subdirectory in a VPATH build with 786aab59a7Smrg# a relative $ac_aux_dir 796aab59a7Smrg# 806aab59a7Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 816aab59a7Smrg# are both prefixed by $srcdir. In an in-source build this is usually 826aab59a7Smrg# harmless because $srcdir is `.', but things will broke when you 836aab59a7Smrg# start a VPATH build or use an absolute $srcdir. 846aab59a7Smrg# 856aab59a7Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 866aab59a7Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 876aab59a7Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 886aab59a7Smrg# and then we would define $MISSING as 896aab59a7Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 906aab59a7Smrg# This will work as long as MISSING is not called from configure, because 916aab59a7Smrg# unfortunately $(top_srcdir) has no meaning in configure. 926aab59a7Smrg# However there are other variables, like CC, which are often used in 936aab59a7Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 946aab59a7Smrg# 956aab59a7Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 966aab59a7Smrg# absolute PATH. The drawback is that using absolute paths prevent a 976aab59a7Smrg# configured tree to be moved without reconfiguration. 98659607e0Smrg 996aab59a7SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1006aab59a7Smrg[dnl Rely on autoconf to set up CDPATH properly. 1016aab59a7SmrgAC_PREREQ([2.50])dnl 1026aab59a7Smrg# expand $ac_aux_dir to an absolute path 1036aab59a7Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 1046aab59a7Smrg]) 105659607e0Smrg 1066aab59a7Smrg# AM_CONDITIONAL -*- Autoconf -*- 107659607e0Smrg 1086aab59a7Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 1096aab59a7Smrg# Free Software Foundation, Inc. 1106aab59a7Smrg# 1116aab59a7Smrg# This file is free software; the Free Software Foundation 1126aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 1136aab59a7Smrg# with or without modifications, as long as this notice is preserved. 114659607e0Smrg 1156aab59a7Smrg# serial 8 116659607e0Smrg 1176aab59a7Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1186aab59a7Smrg# ------------------------------------- 1196aab59a7Smrg# Define a conditional. 1206aab59a7SmrgAC_DEFUN([AM_CONDITIONAL], 1216aab59a7Smrg[AC_PREREQ(2.52)dnl 1226aab59a7Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1236aab59a7Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1246aab59a7SmrgAC_SUBST([$1_TRUE])dnl 1256aab59a7SmrgAC_SUBST([$1_FALSE])dnl 1266aab59a7Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1276aab59a7Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1286aab59a7Smrgif $2; then 1296aab59a7Smrg $1_TRUE= 1306aab59a7Smrg $1_FALSE='#' 1316aab59a7Smrgelse 1326aab59a7Smrg $1_TRUE='#' 1336aab59a7Smrg $1_FALSE= 1346aab59a7Smrgfi 1356aab59a7SmrgAC_CONFIG_COMMANDS_PRE( 1366aab59a7Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1376aab59a7Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 1386aab59a7SmrgUsually this means the macro was only invoked conditionally.]]) 1396aab59a7Smrgfi])]) 140659607e0Smrg 1416aab59a7Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 1426aab59a7Smrg# Free Software Foundation, Inc. 1436aab59a7Smrg# 1446aab59a7Smrg# This file is free software; the Free Software Foundation 1456aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 1466aab59a7Smrg# with or without modifications, as long as this notice is preserved. 147659607e0Smrg 1486aab59a7Smrg# serial 9 149659607e0Smrg 1506aab59a7Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 1516aab59a7Smrg# written in clear, in which case automake, when reading aclocal.m4, 1526aab59a7Smrg# will think it sees a *use*, and therefore will trigger all it's 1536aab59a7Smrg# C support machinery. Also note that it means that autoscan, seeing 1546aab59a7Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 155659607e0Smrg 156659607e0Smrg 1576aab59a7Smrg# _AM_DEPENDENCIES(NAME) 1586aab59a7Smrg# ---------------------- 1596aab59a7Smrg# See how the compiler implements dependency checking. 1606aab59a7Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 1616aab59a7Smrg# We try a few techniques and use that to set a single cache variable. 1626aab59a7Smrg# 1636aab59a7Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1646aab59a7Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1656aab59a7Smrg# dependency, and given that the user is not expected to run this macro, 1666aab59a7Smrg# just rely on AC_PROG_CC. 1676aab59a7SmrgAC_DEFUN([_AM_DEPENDENCIES], 1686aab59a7Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1696aab59a7SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1706aab59a7SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1716aab59a7SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 172659607e0Smrg 1736aab59a7Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 1746aab59a7Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 1756aab59a7Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1766aab59a7Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 1776aab59a7Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1786aab59a7Smrg [depcc="$$1" am_compiler_list=]) 179659607e0Smrg 1806aab59a7SmrgAC_CACHE_CHECK([dependency style of $depcc], 1816aab59a7Smrg [am_cv_$1_dependencies_compiler_type], 1826aab59a7Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1836aab59a7Smrg # We make a subdir and do the tests there. Otherwise we can end up 1846aab59a7Smrg # making bogus files that we don't know about and never remove. For 1856aab59a7Smrg # instance it was reported that on HP-UX the gcc test will end up 1866aab59a7Smrg # making a dummy file named `D' -- because `-MD' means `put the output 1876aab59a7Smrg # in D'. 1886aab59a7Smrg mkdir conftest.dir 1896aab59a7Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 1906aab59a7Smrg # using a relative directory. 1916aab59a7Smrg cp "$am_depcomp" conftest.dir 1926aab59a7Smrg cd conftest.dir 1936aab59a7Smrg # We will build objects and dependencies in a subdirectory because 1946aab59a7Smrg # it helps to detect inapplicable dependency modes. For instance 1956aab59a7Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 1966aab59a7Smrg # side effect of compilation, but ICC will put the dependencies in 1976aab59a7Smrg # the current directory while Tru64 will put them in the object 1986aab59a7Smrg # directory. 1996aab59a7Smrg mkdir sub 200659607e0Smrg 2016aab59a7Smrg am_cv_$1_dependencies_compiler_type=none 2026aab59a7Smrg if test "$am_compiler_list" = ""; then 2036aab59a7Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2046aab59a7Smrg fi 2056aab59a7Smrg for depmode in $am_compiler_list; do 2066aab59a7Smrg # Setup a source with many dependencies, because some compilers 2076aab59a7Smrg # like to wrap large dependency lists on column 80 (with \), and 2086aab59a7Smrg # we should not choose a depcomp mode which is confused by this. 2096aab59a7Smrg # 2106aab59a7Smrg # We need to recreate these files for each test, as the compiler may 2116aab59a7Smrg # overwrite some of them when testing with obscure command lines. 2126aab59a7Smrg # This happens at least with the AIX C compiler. 2136aab59a7Smrg : > sub/conftest.c 2146aab59a7Smrg for i in 1 2 3 4 5 6; do 2156aab59a7Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2166aab59a7Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 2176aab59a7Smrg # Solaris 8's {/usr,}/bin/sh. 2186aab59a7Smrg touch sub/conftst$i.h 2196aab59a7Smrg done 2206aab59a7Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 221659607e0Smrg 2226aab59a7Smrg case $depmode in 2236aab59a7Smrg nosideeffect) 2246aab59a7Smrg # after this tag, mechanisms are not by side-effect, so they'll 2256aab59a7Smrg # only be used when explicitly requested 2266aab59a7Smrg if test "x$enable_dependency_tracking" = xyes; then 2276aab59a7Smrg continue 2286aab59a7Smrg else 2296aab59a7Smrg break 2306aab59a7Smrg fi 2316aab59a7Smrg ;; 2326aab59a7Smrg none) break ;; 2336aab59a7Smrg esac 2346aab59a7Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 2356aab59a7Smrg # mode. It turns out that the SunPro C++ compiler does not properly 2366aab59a7Smrg # handle `-M -o', and we need to detect this. 2376aab59a7Smrg if depmode=$depmode \ 2386aab59a7Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 2396aab59a7Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2406aab59a7Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 2416aab59a7Smrg >/dev/null 2>conftest.err && 2426aab59a7Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2436aab59a7Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2446aab59a7Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 2456aab59a7Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2466aab59a7Smrg # icc doesn't choke on unknown options, it will just issue warnings 2476aab59a7Smrg # or remarks (even with -Werror). So we grep stderr for any message 2486aab59a7Smrg # that says an option was ignored or not supported. 2496aab59a7Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2506aab59a7Smrg # icc: Command line warning: ignoring option '-M'; no argument required 2516aab59a7Smrg # The diagnosis changed in icc 8.0: 2526aab59a7Smrg # icc: Command line remark: option '-MP' not supported 2536aab59a7Smrg if (grep 'ignoring option' conftest.err || 2546aab59a7Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2556aab59a7Smrg am_cv_$1_dependencies_compiler_type=$depmode 2566aab59a7Smrg break 2576aab59a7Smrg fi 2586aab59a7Smrg fi 2596aab59a7Smrg done 260659607e0Smrg 2616aab59a7Smrg cd .. 2626aab59a7Smrg rm -rf conftest.dir 2636aab59a7Smrgelse 2646aab59a7Smrg am_cv_$1_dependencies_compiler_type=none 265659607e0Smrgfi 2666aab59a7Smrg]) 2676aab59a7SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2686aab59a7SmrgAM_CONDITIONAL([am__fastdep$1], [ 2696aab59a7Smrg test "x$enable_dependency_tracking" != xno \ 2706aab59a7Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 2716aab59a7Smrg]) 272659607e0Smrg 273659607e0Smrg 2746aab59a7Smrg# AM_SET_DEPDIR 2756aab59a7Smrg# ------------- 2766aab59a7Smrg# Choose a directory name for dependency files. 2776aab59a7Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 2786aab59a7SmrgAC_DEFUN([AM_SET_DEPDIR], 2796aab59a7Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 2806aab59a7SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 2816aab59a7Smrg]) 282659607e0Smrg 283659607e0Smrg 2846aab59a7Smrg# AM_DEP_TRACK 2856aab59a7Smrg# ------------ 2866aab59a7SmrgAC_DEFUN([AM_DEP_TRACK], 2876aab59a7Smrg[AC_ARG_ENABLE(dependency-tracking, 2886aab59a7Smrg[ --disable-dependency-tracking speeds up one-time build 2896aab59a7Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 2906aab59a7Smrgif test "x$enable_dependency_tracking" != xno; then 2916aab59a7Smrg am_depcomp="$ac_aux_dir/depcomp" 2926aab59a7Smrg AMDEPBACKSLASH='\' 2936aab59a7Smrgfi 2946aab59a7SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 2956aab59a7SmrgAC_SUBST([AMDEPBACKSLASH])dnl 2966aab59a7Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 2976aab59a7Smrg]) 298659607e0Smrg 2996aab59a7Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 300659607e0Smrg 3016aab59a7Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 3026aab59a7Smrg# Free Software Foundation, Inc. 3036aab59a7Smrg# 3046aab59a7Smrg# This file is free software; the Free Software Foundation 3056aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 3066aab59a7Smrg# with or without modifications, as long as this notice is preserved. 307659607e0Smrg 3086aab59a7Smrg#serial 3 309659607e0Smrg 3106aab59a7Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3116aab59a7Smrg# ------------------------------ 3126aab59a7SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3136aab59a7Smrg[for mf in $CONFIG_FILES; do 3146aab59a7Smrg # Strip MF so we end up with the name of the file. 3156aab59a7Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 3166aab59a7Smrg # Check whether this is an Automake generated Makefile or not. 3176aab59a7Smrg # We used to match only the files named `Makefile.in', but 3186aab59a7Smrg # some people rename them; so instead we look at the file content. 3196aab59a7Smrg # Grep'ing the first line is not enough: some people post-process 3206aab59a7Smrg # each Makefile.in and add a new line on top of each file to say so. 3216aab59a7Smrg # Grep'ing the whole file is not good either: AIX grep has a line 3226aab59a7Smrg # limit of 2048, but all sed's we know have understand at least 4000. 3236aab59a7Smrg if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then 3246aab59a7Smrg dirpart=`AS_DIRNAME("$mf")` 3256aab59a7Smrg else 3266aab59a7Smrg continue 3276aab59a7Smrg fi 3286aab59a7Smrg # Extract the definition of DEPDIR, am__include, and am__quote 3296aab59a7Smrg # from the Makefile without running `make'. 3306aab59a7Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 3316aab59a7Smrg test -z "$DEPDIR" && continue 3326aab59a7Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 3336aab59a7Smrg test -z "am__include" && continue 3346aab59a7Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 3356aab59a7Smrg # When using ansi2knr, U may be empty or an underscore; expand it 3366aab59a7Smrg U=`sed -n 's/^U = //p' < "$mf"` 3376aab59a7Smrg # Find all dependency output files, they are included files with 3386aab59a7Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 3396aab59a7Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 3406aab59a7Smrg # expansion. 3416aab59a7Smrg for file in `sed -n " 3426aab59a7Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 3436aab59a7Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 3446aab59a7Smrg # Make sure the directory exists. 3456aab59a7Smrg test -f "$dirpart/$file" && continue 3466aab59a7Smrg fdir=`AS_DIRNAME(["$file"])` 3476aab59a7Smrg AS_MKDIR_P([$dirpart/$fdir]) 3486aab59a7Smrg # echo "creating $dirpart/$file" 3496aab59a7Smrg echo '# dummy' > "$dirpart/$file" 3506aab59a7Smrg done 3516aab59a7Smrgdone 3526aab59a7Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 353659607e0Smrg 354659607e0Smrg 3556aab59a7Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 3566aab59a7Smrg# ----------------------------- 3576aab59a7Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 3586aab59a7Smrg# 3596aab59a7Smrg# This code is only required when automatic dependency tracking 3606aab59a7Smrg# is enabled. FIXME. This creates each `.P' file that we will 3616aab59a7Smrg# need in order to bootstrap the dependency handling code. 3626aab59a7SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 3636aab59a7Smrg[AC_CONFIG_COMMANDS([depfiles], 3646aab59a7Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 3656aab59a7Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 3666aab59a7Smrg]) 367659607e0Smrg 3686aab59a7Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 3696aab59a7Smrg# Free Software Foundation, Inc. 3706aab59a7Smrg# 3716aab59a7Smrg# This file is free software; the Free Software Foundation 3726aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 3736aab59a7Smrg# with or without modifications, as long as this notice is preserved. 374659607e0Smrg 3756aab59a7Smrg# serial 8 376659607e0Smrg 3776aab59a7Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 3786aab59a7SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 379659607e0Smrg 3806aab59a7Smrg# Do all the work for Automake. -*- Autoconf -*- 381659607e0Smrg 3826aab59a7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3836aab59a7Smrg# 2005, 2006 Free Software Foundation, Inc. 3846aab59a7Smrg# 3856aab59a7Smrg# This file is free software; the Free Software Foundation 3866aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 3876aab59a7Smrg# with or without modifications, as long as this notice is preserved. 388659607e0Smrg 3896aab59a7Smrg# serial 12 390659607e0Smrg 3916aab59a7Smrg# This macro actually does too much. Some checks are only needed if 3926aab59a7Smrg# your package does certain things. But this isn't really a big deal. 393659607e0Smrg 3946aab59a7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 3956aab59a7Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 3966aab59a7Smrg# ----------------------------------------------- 3976aab59a7Smrg# The call with PACKAGE and VERSION arguments is the old style 3986aab59a7Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 3996aab59a7Smrg# and VERSION should now be passed to AC_INIT and removed from 4006aab59a7Smrg# the call to AM_INIT_AUTOMAKE. 4016aab59a7Smrg# We support both call styles for the transition. After 4026aab59a7Smrg# the next Automake release, Autoconf can make the AC_INIT 4036aab59a7Smrg# arguments mandatory, and then we can depend on a new Autoconf 4046aab59a7Smrg# release and drop the old call support. 4056aab59a7SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4066aab59a7Smrg[AC_PREREQ([2.60])dnl 4076aab59a7Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4086aab59a7Smrgdnl the ones we care about. 4096aab59a7Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4106aab59a7SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4116aab59a7SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4126aab59a7Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4136aab59a7Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4146aab59a7Smrg # is not polluted with repeated "-I." 4156aab59a7Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4166aab59a7Smrg # test to see if srcdir already configured 4176aab59a7Smrg if test -f $srcdir/config.status; then 4186aab59a7Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4196aab59a7Smrg fi 4206aab59a7Smrgfi 421659607e0Smrg 4226aab59a7Smrg# test whether we have cygpath 4236aab59a7Smrgif test -z "$CYGPATH_W"; then 4246aab59a7Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 4256aab59a7Smrg CYGPATH_W='cygpath -w' 4266aab59a7Smrg else 4276aab59a7Smrg CYGPATH_W=echo 4286aab59a7Smrg fi 4296aab59a7Smrgfi 4306aab59a7SmrgAC_SUBST([CYGPATH_W]) 431659607e0Smrg 4326aab59a7Smrg# Define the identity of the package. 4336aab59a7Smrgdnl Distinguish between old-style and new-style calls. 4346aab59a7Smrgm4_ifval([$2], 4356aab59a7Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4366aab59a7Smrg AC_SUBST([PACKAGE], [$1])dnl 4376aab59a7Smrg AC_SUBST([VERSION], [$2])], 4386aab59a7Smrg[_AM_SET_OPTIONS([$1])dnl 4396aab59a7Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4406aab59a7Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 4416aab59a7Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4426aab59a7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4436aab59a7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 444659607e0Smrg 4456aab59a7Smrg_AM_IF_OPTION([no-define],, 4466aab59a7Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 4476aab59a7Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 448659607e0Smrg 4496aab59a7Smrg# Some tools Automake needs. 4506aab59a7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4516aab59a7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4526aab59a7SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 4536aab59a7SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 4546aab59a7SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 4556aab59a7SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 4566aab59a7SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 4576aab59a7SmrgAM_PROG_INSTALL_SH 4586aab59a7SmrgAM_PROG_INSTALL_STRIP 4596aab59a7SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 4606aab59a7Smrg# We need awk for the "check" target. The system "awk" is bad on 4616aab59a7Smrg# some platforms. 4626aab59a7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 4636aab59a7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 4646aab59a7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 4656aab59a7Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 4666aab59a7Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 4676aab59a7Smrg [_AM_PROG_TAR([v7])])]) 4686aab59a7Smrg_AM_IF_OPTION([no-dependencies],, 4696aab59a7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 4706aab59a7Smrg [_AM_DEPENDENCIES(CC)], 4716aab59a7Smrg [define([AC_PROG_CC], 4726aab59a7Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 4736aab59a7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 4746aab59a7Smrg [_AM_DEPENDENCIES(CXX)], 4756aab59a7Smrg [define([AC_PROG_CXX], 4766aab59a7Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 4776aab59a7SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 4786aab59a7Smrg [_AM_DEPENDENCIES(OBJC)], 4796aab59a7Smrg [define([AC_PROG_OBJC], 4806aab59a7Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 4816aab59a7Smrg]) 4826aab59a7Smrg]) 483659607e0Smrg 484659607e0Smrg 4856aab59a7Smrg# When config.status generates a header, we must update the stamp-h file. 4866aab59a7Smrg# This file resides in the same directory as the config header 4876aab59a7Smrg# that is generated. The stamp files are numbered to have different names. 488659607e0Smrg 4896aab59a7Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 4906aab59a7Smrg# loop where config.status creates the headers, so we can generate 4916aab59a7Smrg# our stamp files there. 4926aab59a7SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 4936aab59a7Smrg[# Compute $1's index in $config_headers. 4946aab59a7Smrg_am_stamp_count=1 4956aab59a7Smrgfor _am_header in $config_headers :; do 4966aab59a7Smrg case $_am_header in 4976aab59a7Smrg $1 | $1:* ) 4986aab59a7Smrg break ;; 4996aab59a7Smrg * ) 5006aab59a7Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 5016aab59a7Smrg esac 5026aab59a7Smrgdone 5036aab59a7Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 504659607e0Smrg 5056aab59a7Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 5066aab59a7Smrg# 5076aab59a7Smrg# This file is free software; the Free Software Foundation 5086aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 5096aab59a7Smrg# with or without modifications, as long as this notice is preserved. 510659607e0Smrg 5116aab59a7Smrg# AM_PROG_INSTALL_SH 5126aab59a7Smrg# ------------------ 5136aab59a7Smrg# Define $install_sh. 5146aab59a7SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 5156aab59a7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 5166aab59a7Smrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 5176aab59a7SmrgAC_SUBST(install_sh)]) 518659607e0Smrg 5196aab59a7Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 5206aab59a7Smrg# 5216aab59a7Smrg# This file is free software; the Free Software Foundation 5226aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 5236aab59a7Smrg# with or without modifications, as long as this notice is preserved. 524659607e0Smrg 5256aab59a7Smrg# serial 2 526659607e0Smrg 5276aab59a7Smrg# Check whether the underlying file-system supports filenames 5286aab59a7Smrg# with a leading dot. For instance MS-DOS doesn't. 5296aab59a7SmrgAC_DEFUN([AM_SET_LEADING_DOT], 5306aab59a7Smrg[rm -rf .tst 2>/dev/null 5316aab59a7Smrgmkdir .tst 2>/dev/null 5326aab59a7Smrgif test -d .tst; then 5336aab59a7Smrg am__leading_dot=. 5346aab59a7Smrgelse 5356aab59a7Smrg am__leading_dot=_ 536659607e0Smrgfi 5376aab59a7Smrgrmdir .tst 2>/dev/null 5386aab59a7SmrgAC_SUBST([am__leading_dot])]) 539659607e0Smrg 5406aab59a7Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 5416aab59a7Smrg# From Jim Meyering 542659607e0Smrg 5436aab59a7Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 5446aab59a7Smrg# Free Software Foundation, Inc. 5456aab59a7Smrg# 5466aab59a7Smrg# This file is free software; the Free Software Foundation 5476aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 5486aab59a7Smrg# with or without modifications, as long as this notice is preserved. 549659607e0Smrg 5506aab59a7Smrg# serial 4 551659607e0Smrg 5526aab59a7SmrgAC_DEFUN([AM_MAINTAINER_MODE], 5536aab59a7Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 5546aab59a7Smrg dnl maintainer-mode is disabled by default 5556aab59a7Smrg AC_ARG_ENABLE(maintainer-mode, 5566aab59a7Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 5576aab59a7Smrg (and sometimes confusing) to the casual installer], 5586aab59a7Smrg USE_MAINTAINER_MODE=$enableval, 5596aab59a7Smrg USE_MAINTAINER_MODE=no) 5606aab59a7Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 5616aab59a7Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 5626aab59a7Smrg MAINT=$MAINTAINER_MODE_TRUE 5636aab59a7Smrg AC_SUBST(MAINT)dnl 5646aab59a7Smrg] 5656aab59a7Smrg) 566659607e0Smrg 5676aab59a7SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 568659607e0Smrg 5696aab59a7Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 570659607e0Smrg 5716aab59a7Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 5726aab59a7Smrg# 5736aab59a7Smrg# This file is free software; the Free Software Foundation 5746aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 5756aab59a7Smrg# with or without modifications, as long as this notice is preserved. 576659607e0Smrg 5776aab59a7Smrg# serial 3 578659607e0Smrg 5796aab59a7Smrg# AM_MAKE_INCLUDE() 5806aab59a7Smrg# ----------------- 5816aab59a7Smrg# Check to see how make treats includes. 5826aab59a7SmrgAC_DEFUN([AM_MAKE_INCLUDE], 5836aab59a7Smrg[am_make=${MAKE-make} 5846aab59a7Smrgcat > confinc << 'END' 5856aab59a7Smrgam__doit: 5866aab59a7Smrg @echo done 5876aab59a7Smrg.PHONY: am__doit 5886aab59a7SmrgEND 5896aab59a7Smrg# If we don't find an include directive, just comment out the code. 5906aab59a7SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 5916aab59a7Smrgam__include="#" 5926aab59a7Smrgam__quote= 5936aab59a7Smrg_am_result=none 5946aab59a7Smrg# First try GNU make style include. 5956aab59a7Smrgecho "include confinc" > confmf 5966aab59a7Smrg# We grep out `Entering directory' and `Leaving directory' 5976aab59a7Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 5986aab59a7Smrg# In particular we don't look at `^make:' because GNU make might 5996aab59a7Smrg# be invoked under some other name (usually "gmake"), in which 6006aab59a7Smrg# case it prints its new name instead of `make'. 6016aab59a7Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 6026aab59a7Smrg am__include=include 6036aab59a7Smrg am__quote= 6046aab59a7Smrg _am_result=GNU 6056aab59a7Smrgfi 6066aab59a7Smrg# Now try BSD make style include. 6076aab59a7Smrgif test "$am__include" = "#"; then 6086aab59a7Smrg echo '.include "confinc"' > confmf 6096aab59a7Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 6106aab59a7Smrg am__include=.include 6116aab59a7Smrg am__quote="\"" 6126aab59a7Smrg _am_result=BSD 6136aab59a7Smrg fi 6146aab59a7Smrgfi 6156aab59a7SmrgAC_SUBST([am__include]) 6166aab59a7SmrgAC_SUBST([am__quote]) 6176aab59a7SmrgAC_MSG_RESULT([$_am_result]) 6186aab59a7Smrgrm -f confinc confmf 6196aab59a7Smrg]) 620659607e0Smrg 6216aab59a7Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 622659607e0Smrg 6236aab59a7Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 6246aab59a7Smrg# Free Software Foundation, Inc. 6256aab59a7Smrg# 6266aab59a7Smrg# This file is free software; the Free Software Foundation 6276aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 6286aab59a7Smrg# with or without modifications, as long as this notice is preserved. 629659607e0Smrg 6306aab59a7Smrg# serial 5 631659607e0Smrg 6326aab59a7Smrg# AM_MISSING_PROG(NAME, PROGRAM) 6336aab59a7Smrg# ------------------------------ 6346aab59a7SmrgAC_DEFUN([AM_MISSING_PROG], 6356aab59a7Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 6366aab59a7Smrg$1=${$1-"${am_missing_run}$2"} 6376aab59a7SmrgAC_SUBST($1)]) 6386aab59a7Smrg 6396aab59a7Smrg 6406aab59a7Smrg# AM_MISSING_HAS_RUN 6416aab59a7Smrg# ------------------ 6426aab59a7Smrg# Define MISSING if not defined so far and test if it supports --run. 6436aab59a7Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 6446aab59a7SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 6456aab59a7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 6466aab59a7SmrgAC_REQUIRE_AUX_FILE([missing])dnl 6476aab59a7Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 6486aab59a7Smrg# Use eval to expand $SHELL 6496aab59a7Smrgif eval "$MISSING --run true"; then 6506aab59a7Smrg am_missing_run="$MISSING --run " 651659607e0Smrgelse 6526aab59a7Smrg am_missing_run= 6536aab59a7Smrg AC_MSG_WARN([`missing' script is too old or missing]) 654659607e0Smrgfi 6556aab59a7Smrg]) 656659607e0Smrg 6576aab59a7Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 6586aab59a7Smrg# 6596aab59a7Smrg# This file is free software; the Free Software Foundation 6606aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 6616aab59a7Smrg# with or without modifications, as long as this notice is preserved. 662659607e0Smrg 6636aab59a7Smrg# AM_PROG_MKDIR_P 6646aab59a7Smrg# --------------- 6656aab59a7Smrg# Check for `mkdir -p'. 6666aab59a7SmrgAC_DEFUN([AM_PROG_MKDIR_P], 6676aab59a7Smrg[AC_PREREQ([2.60])dnl 6686aab59a7SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 6696aab59a7Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 6706aab59a7Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 6716aab59a7Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 6726aab59a7Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 6736aab59a7Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 6746aab59a7Smrgdnl adjustment using top_builddir (which is defined more often than 6756aab59a7Smrgdnl MKDIR_P). 6766aab59a7SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 6776aab59a7Smrgcase $mkdir_p in 6786aab59a7Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 6796aab59a7Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 6806aab59a7Smrgesac 681659607e0Smrg]) 682659607e0Smrg 6836aab59a7Smrg# Helper functions for option handling. -*- Autoconf -*- 684659607e0Smrg 6856aab59a7Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 6866aab59a7Smrg# 6876aab59a7Smrg# This file is free software; the Free Software Foundation 6886aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 6896aab59a7Smrg# with or without modifications, as long as this notice is preserved. 690659607e0Smrg 6916aab59a7Smrg# serial 3 692659607e0Smrg 6936aab59a7Smrg# _AM_MANGLE_OPTION(NAME) 6946aab59a7Smrg# ----------------------- 6956aab59a7SmrgAC_DEFUN([_AM_MANGLE_OPTION], 6966aab59a7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 697659607e0Smrg 6986aab59a7Smrg# _AM_SET_OPTION(NAME) 6996aab59a7Smrg# ------------------------------ 7006aab59a7Smrg# Set option NAME. Presently that only means defining a flag for this option. 7016aab59a7SmrgAC_DEFUN([_AM_SET_OPTION], 7026aab59a7Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 703659607e0Smrg 7046aab59a7Smrg# _AM_SET_OPTIONS(OPTIONS) 7056aab59a7Smrg# ---------------------------------- 7066aab59a7Smrg# OPTIONS is a space-separated list of Automake options. 7076aab59a7SmrgAC_DEFUN([_AM_SET_OPTIONS], 7086aab59a7Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 709659607e0Smrg 7106aab59a7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7116aab59a7Smrg# ------------------------------------------- 7126aab59a7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7136aab59a7SmrgAC_DEFUN([_AM_IF_OPTION], 7146aab59a7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 715659607e0Smrg 7166aab59a7Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 717659607e0Smrg 7186aab59a7Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 7196aab59a7Smrg# Free Software Foundation, Inc. 7206aab59a7Smrg# 7216aab59a7Smrg# This file is free software; the Free Software Foundation 7226aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 7236aab59a7Smrg# with or without modifications, as long as this notice is preserved. 724659607e0Smrg 7256aab59a7Smrg# serial 4 726659607e0Smrg 7276aab59a7Smrg# AM_SANITY_CHECK 7286aab59a7Smrg# --------------- 7296aab59a7SmrgAC_DEFUN([AM_SANITY_CHECK], 7306aab59a7Smrg[AC_MSG_CHECKING([whether build environment is sane]) 7316aab59a7Smrg# Just in case 7326aab59a7Smrgsleep 1 7336aab59a7Smrgecho timestamp > conftest.file 7346aab59a7Smrg# Do `set' in a subshell so we don't clobber the current shell's 7356aab59a7Smrg# arguments. Must try -L first in case configure is actually a 7366aab59a7Smrg# symlink; some systems play weird games with the mod time of symlinks 7376aab59a7Smrg# (eg FreeBSD returns the mod time of the symlink's containing 7386aab59a7Smrg# directory). 7396aab59a7Smrgif ( 7406aab59a7Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 7416aab59a7Smrg if test "$[*]" = "X"; then 7426aab59a7Smrg # -L didn't work. 7436aab59a7Smrg set X `ls -t $srcdir/configure conftest.file` 7446aab59a7Smrg fi 7456aab59a7Smrg rm -f conftest.file 7466aab59a7Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 7476aab59a7Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 748659607e0Smrg 7496aab59a7Smrg # If neither matched, then we have a broken ls. This can happen 7506aab59a7Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 7516aab59a7Smrg # broken ls alias from the environment. This has actually 7526aab59a7Smrg # happened. Such a system could not be considered "sane". 7536aab59a7Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 7546aab59a7Smrgalias in your environment]) 7556aab59a7Smrg fi 756659607e0Smrg 7576aab59a7Smrg test "$[2]" = conftest.file 7586aab59a7Smrg ) 7596aab59a7Smrgthen 7606aab59a7Smrg # Ok. 7616aab59a7Smrg : 762659607e0Smrgelse 7636aab59a7Smrg AC_MSG_ERROR([newly created file is older than distributed files! 7646aab59a7SmrgCheck your system clock]) 7656aab59a7Smrgfi 7666aab59a7SmrgAC_MSG_RESULT(yes)]) 767659607e0Smrg 7686aab59a7Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7696aab59a7Smrg# 7706aab59a7Smrg# This file is free software; the Free Software Foundation 7716aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 7726aab59a7Smrg# with or without modifications, as long as this notice is preserved. 773659607e0Smrg 7746aab59a7Smrg# AM_PROG_INSTALL_STRIP 7756aab59a7Smrg# --------------------- 7766aab59a7Smrg# One issue with vendor `install' (even GNU) is that you can't 7776aab59a7Smrg# specify the program used to strip binaries. This is especially 7786aab59a7Smrg# annoying in cross-compiling environments, where the build's strip 7796aab59a7Smrg# is unlikely to handle the host's binaries. 7806aab59a7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 7816aab59a7Smrg# always use install-sh in `make install-strip', and initialize 7826aab59a7Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 7836aab59a7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 7846aab59a7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 7856aab59a7Smrg# Installed binaries are usually stripped using `strip' when the user 7866aab59a7Smrg# run `make install-strip'. However `strip' might not be the right 7876aab59a7Smrg# tool to use in cross-compilation environments, therefore Automake 7886aab59a7Smrg# will honor the `STRIP' environment variable to overrule this program. 7896aab59a7Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 7906aab59a7Smrgif test "$cross_compiling" != no; then 7916aab59a7Smrg AC_CHECK_TOOL([STRIP], [strip], :) 792659607e0Smrgfi 7936aab59a7SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 7946aab59a7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 795659607e0Smrg 7966aab59a7Smrg# Copyright (C) 2006 Free Software Foundation, Inc. 7976aab59a7Smrg# 7986aab59a7Smrg# This file is free software; the Free Software Foundation 7996aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 8006aab59a7Smrg# with or without modifications, as long as this notice is preserved. 801659607e0Smrg 8026aab59a7Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 8036aab59a7Smrg# --------------------------- 8046aab59a7Smrg# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. 8056aab59a7Smrg# This macro is traced by Automake. 8066aab59a7SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 807659607e0Smrg 8086aab59a7Smrg# Check how to create a tarball. -*- Autoconf -*- 809659607e0Smrg 8106aab59a7Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 8116aab59a7Smrg# 8126aab59a7Smrg# This file is free software; the Free Software Foundation 8136aab59a7Smrg# gives unlimited permission to copy and/or distribute it, 8146aab59a7Smrg# with or without modifications, as long as this notice is preserved. 815659607e0Smrg 8166aab59a7Smrg# serial 2 817659607e0Smrg 8186aab59a7Smrg# _AM_PROG_TAR(FORMAT) 8196aab59a7Smrg# -------------------- 8206aab59a7Smrg# Check how to create a tarball in format FORMAT. 8216aab59a7Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 8226aab59a7Smrg# 8236aab59a7Smrg# Substitute a variable $(am__tar) that is a command 8246aab59a7Smrg# writing to stdout a FORMAT-tarball containing the directory 8256aab59a7Smrg# $tardir. 8266aab59a7Smrg# tardir=directory && $(am__tar) > result.tar 8276aab59a7Smrg# 8286aab59a7Smrg# Substitute a variable $(am__untar) that extract such 8296aab59a7Smrg# a tarball read from stdin. 8306aab59a7Smrg# $(am__untar) < result.tar 8316aab59a7SmrgAC_DEFUN([_AM_PROG_TAR], 8326aab59a7Smrg[# Always define AMTAR for backward compatibility. 8336aab59a7SmrgAM_MISSING_PROG([AMTAR], [tar]) 8346aab59a7Smrgm4_if([$1], [v7], 8356aab59a7Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 8366aab59a7Smrg [m4_case([$1], [ustar],, [pax],, 8376aab59a7Smrg [m4_fatal([Unknown tar format])]) 8386aab59a7SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 8396aab59a7Smrg# Loop over all known methods to create a tar archive until one works. 8406aab59a7Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 8416aab59a7Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 8426aab59a7Smrg# Do not fold the above two line into one, because Tru64 sh and 8436aab59a7Smrg# Solaris sh will not grok spaces in the rhs of `-'. 8446aab59a7Smrgfor _am_tool in $_am_tools 8456aab59a7Smrgdo 8466aab59a7Smrg case $_am_tool in 8476aab59a7Smrg gnutar) 8486aab59a7Smrg for _am_tar in tar gnutar gtar; 8496aab59a7Smrg do 8506aab59a7Smrg AM_RUN_LOG([$_am_tar --version]) && break 8516aab59a7Smrg done 8526aab59a7Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 8536aab59a7Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 8546aab59a7Smrg am__untar="$_am_tar -xf -" 8556aab59a7Smrg ;; 8566aab59a7Smrg plaintar) 8576aab59a7Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 8586aab59a7Smrg # ustar tarball either. 8596aab59a7Smrg (tar --version) >/dev/null 2>&1 && continue 8606aab59a7Smrg am__tar='tar chf - "$$tardir"' 8616aab59a7Smrg am__tar_='tar chf - "$tardir"' 8626aab59a7Smrg am__untar='tar xf -' 8636aab59a7Smrg ;; 8646aab59a7Smrg pax) 8656aab59a7Smrg am__tar='pax -L -x $1 -w "$$tardir"' 8666aab59a7Smrg am__tar_='pax -L -x $1 -w "$tardir"' 8676aab59a7Smrg am__untar='pax -r' 8686aab59a7Smrg ;; 8696aab59a7Smrg cpio) 8706aab59a7Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 8716aab59a7Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 8726aab59a7Smrg am__untar='cpio -i -H $1 -d' 8736aab59a7Smrg ;; 8746aab59a7Smrg none) 8756aab59a7Smrg am__tar=false 8766aab59a7Smrg am__tar_=false 8776aab59a7Smrg am__untar=false 878659607e0Smrg ;; 879659607e0Smrg esac 880659607e0Smrg 8816aab59a7Smrg # If the value was cached, stop now. We just wanted to have am__tar 8826aab59a7Smrg # and am__untar set. 8836aab59a7Smrg test -n "${am_cv_prog_tar_$1}" && break 8846aab59a7Smrg 8856aab59a7Smrg # tar/untar a dummy directory, and stop if the command works 8866aab59a7Smrg rm -rf conftest.dir 8876aab59a7Smrg mkdir conftest.dir 8886aab59a7Smrg echo GrepMe > conftest.dir/file 8896aab59a7Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 8906aab59a7Smrg rm -rf conftest.dir 8916aab59a7Smrg if test -s conftest.tar; then 8926aab59a7Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 8936aab59a7Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 894659607e0Smrg fi 8956aab59a7Smrgdone 8966aab59a7Smrgrm -rf conftest.dir 897659607e0Smrg 8986aab59a7SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 8996aab59a7SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 9006aab59a7SmrgAC_SUBST([am__tar]) 9016aab59a7SmrgAC_SUBST([am__untar]) 9026aab59a7Smrg]) # _AM_PROG_TAR 903659607e0Smrg 9046aab59a7Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9056aab59a7Smrgdnl 9066aab59a7Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 9076aab59a7Smrgdnl 9086aab59a7Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9096aab59a7Smrgdnl copy of this software and associated documentation files (the 9106aab59a7Smrgdnl "Software"), to deal in the Software without restriction, including 9116aab59a7Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 9126aab59a7Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 9136aab59a7Smrgdnl to whom the Software is furnished to do so, provided that the above 9146aab59a7Smrgdnl copyright notice(s) and this permission notice appear in all copies of 9156aab59a7Smrgdnl the Software and that both the above copyright notice(s) and this 9166aab59a7Smrgdnl permission notice appear in supporting documentation. 9176aab59a7Smrgdnl 9186aab59a7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 9196aab59a7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 9206aab59a7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 9216aab59a7Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 9226aab59a7Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 9236aab59a7Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 9246aab59a7Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 9256aab59a7Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 9266aab59a7Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 9276aab59a7Smrgdnl 9286aab59a7Smrgdnl Except as contained in this notice, the name of a copyright holder 9296aab59a7Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 9306aab59a7Smrgdnl or other dealings in this Software without prior written authorization 9316aab59a7Smrgdnl of the copyright holder. 932659607e0Smrg 9336aab59a7Smrg# XORG_MACROS_VERSION(required-version) 9346aab59a7Smrg# ------------------------------------- 9356aab59a7Smrg# Minimum version: 1.1.0 9366aab59a7Smrg# 9376aab59a7Smrg# If you're using a macro added in Version 1.1 or newer, include this in 9386aab59a7Smrg# your configure.ac with the minimum required version, such as: 9396aab59a7Smrg# XORG_MACROS_VERSION(1.1) 9406aab59a7Smrg# 9416aab59a7Smrg# To force at least a version with this macro defined, also add: 9426aab59a7Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9436aab59a7Smrg# 9446aab59a7Smrg# 9456aab59a7Smrg# See the "minimum version" comment for each macro you use to see what 9466aab59a7Smrg# version you require. 9476aab59a7SmrgAC_DEFUN([XORG_MACROS_VERSION],[ 9486aab59a7Smrg [XORG_MACROS_needed_version=$1 9496aab59a7Smrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 9506aab59a7Smrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 9516aab59a7Smrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 9526aab59a7Smrg [XORG_MACROS_version=1.2.1 9536aab59a7Smrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 9546aab59a7Smrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 9556aab59a7Smrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 9566aab59a7Smrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 9576aab59a7Smrg fi 9586aab59a7Smrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 9596aab59a7Smrg 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]) 9606aab59a7Smrg fi 9616aab59a7Smrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 9626aab59a7Smrg]) # XORG_MACROS_VERSION 963659607e0Smrg 9646aab59a7Smrg# XORG_PROG_RAWCPP() 9656aab59a7Smrg# ------------------ 9666aab59a7Smrg# Minimum version: 1.0.0 9676aab59a7Smrg# 9686aab59a7Smrg# Find cpp program and necessary flags for use in pre-processing text files 9696aab59a7Smrg# such as man pages and config files 9706aab59a7SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9716aab59a7SmrgAC_REQUIRE([AC_PROG_CPP]) 9726aab59a7SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9736aab59a7Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 974659607e0Smrg 9756aab59a7Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9766aab59a7Smrg# which is not the best choice for supporting other OS'es, but covers most 9776aab59a7Smrg# of the ones we need for now. 9786aab59a7SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9796aab59a7SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 9806aab59a7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9816aab59a7Smrg AC_MSG_RESULT([no]) 9826aab59a7Smrgelse 9836aab59a7Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9846aab59a7Smrg RAWCPPFLAGS=-undef 9856aab59a7Smrg AC_MSG_RESULT([yes]) 9866aab59a7Smrg # under Cygwin unix is still defined even with -undef 9876aab59a7Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9886aab59a7Smrg RAWCPPFLAGS="-undef -ansi" 9896aab59a7Smrg AC_MSG_RESULT([yes, with -ansi]) 9906aab59a7Smrg else 9916aab59a7Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9926aab59a7Smrg fi 9936aab59a7Smrgfi 9946aab59a7Smrgrm -f conftest.$ac_ext 995659607e0Smrg 9966aab59a7SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9976aab59a7SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 9986aab59a7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9996aab59a7Smrg AC_MSG_RESULT([no]) 10006aab59a7Smrgelse 10016aab59a7Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 10026aab59a7Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 10036aab59a7Smrg AC_MSG_RESULT([yes]) 10046aab59a7Smrg else 10056aab59a7Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 10066aab59a7Smrg fi 10076aab59a7Smrgfi 10086aab59a7Smrgrm -f conftest.$ac_ext 10096aab59a7SmrgAC_SUBST(RAWCPPFLAGS) 10106aab59a7Smrg]) # XORG_PROG_RAWCPP 1011659607e0Smrg 10126aab59a7Smrg# XORG_MANPAGE_SECTIONS() 10136aab59a7Smrg# ----------------------- 10146aab59a7Smrg# Minimum version: 1.0.0 10156aab59a7Smrg# 10166aab59a7Smrg# Determine which sections man pages go in for the different man page types 10176aab59a7Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 10186aab59a7Smrg# Not sure if there's any better way than just hardcoding by OS name. 10196aab59a7Smrg# Override default settings by setting environment variables 1020659607e0Smrg 10216aab59a7SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 10226aab59a7SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10236aab59a7Smrg 10246aab59a7Smrgif test x$APP_MAN_SUFFIX = x ; then 10256aab59a7Smrg APP_MAN_SUFFIX=1 10266aab59a7Smrgfi 10276aab59a7Smrgif test x$APP_MAN_DIR = x ; then 10286aab59a7Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1029659607e0Smrgfi 1030659607e0Smrg 10316aab59a7Smrgif test x$LIB_MAN_SUFFIX = x ; then 10326aab59a7Smrg LIB_MAN_SUFFIX=3 10336aab59a7Smrgfi 10346aab59a7Smrgif test x$LIB_MAN_DIR = x ; then 10356aab59a7Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 10366aab59a7Smrgfi 1037659607e0Smrg 10386aab59a7Smrgif test x$FILE_MAN_SUFFIX = x ; then 10396aab59a7Smrg case $host_os in 10406aab59a7Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 10416aab59a7Smrg *) FILE_MAN_SUFFIX=5 ;; 10426aab59a7Smrg esac 10436aab59a7Smrgfi 10446aab59a7Smrgif test x$FILE_MAN_DIR = x ; then 10456aab59a7Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 10466aab59a7Smrgfi 1047659607e0Smrg 10486aab59a7Smrgif test x$MISC_MAN_SUFFIX = x ; then 10496aab59a7Smrg case $host_os in 10506aab59a7Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 10516aab59a7Smrg *) MISC_MAN_SUFFIX=7 ;; 10526aab59a7Smrg esac 10536aab59a7Smrgfi 10546aab59a7Smrgif test x$MISC_MAN_DIR = x ; then 10556aab59a7Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 10566aab59a7Smrgfi 1057659607e0Smrg 10586aab59a7Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 10596aab59a7Smrg case $host_os in 10606aab59a7Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 10616aab59a7Smrg *) DRIVER_MAN_SUFFIX=4 ;; 10626aab59a7Smrg esac 10636aab59a7Smrgfi 10646aab59a7Smrgif test x$DRIVER_MAN_DIR = x ; then 10656aab59a7Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 10666aab59a7Smrgfi 1067659607e0Smrg 10686aab59a7Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 10696aab59a7Smrg case $host_os in 10706aab59a7Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 10716aab59a7Smrg *) ADMIN_MAN_SUFFIX=8 ;; 10726aab59a7Smrg esac 10736aab59a7Smrgfi 10746aab59a7Smrgif test x$ADMIN_MAN_DIR = x ; then 10756aab59a7Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1076659607e0Smrgfi 1077659607e0Smrg 1078659607e0Smrg 10796aab59a7SmrgAC_SUBST([APP_MAN_SUFFIX]) 10806aab59a7SmrgAC_SUBST([LIB_MAN_SUFFIX]) 10816aab59a7SmrgAC_SUBST([FILE_MAN_SUFFIX]) 10826aab59a7SmrgAC_SUBST([MISC_MAN_SUFFIX]) 10836aab59a7SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 10846aab59a7SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 10856aab59a7SmrgAC_SUBST([APP_MAN_DIR]) 10866aab59a7SmrgAC_SUBST([LIB_MAN_DIR]) 10876aab59a7SmrgAC_SUBST([FILE_MAN_DIR]) 10886aab59a7SmrgAC_SUBST([MISC_MAN_DIR]) 10896aab59a7SmrgAC_SUBST([DRIVER_MAN_DIR]) 10906aab59a7SmrgAC_SUBST([ADMIN_MAN_DIR]) 10916aab59a7Smrg]) # XORG_MANPAGE_SECTIONS 10926aab59a7Smrg 10936aab59a7Smrg# XORG_CHECK_LINUXDOC 10946aab59a7Smrg# ------------------- 10956aab59a7Smrg# Minimum version: 1.0.0 10966aab59a7Smrg# 10976aab59a7Smrg# Defines the variable MAKE_TEXT if the necessary tools and 10986aab59a7Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 10996aab59a7Smrg# Whether or not the necessary tools and files are found can be checked 11006aab59a7Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 11016aab59a7SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 11026aab59a7Smrgif test x$XORG_SGML_PATH = x ; then 11036aab59a7Smrg XORG_SGML_PATH=$prefix/share/sgml 11046aab59a7Smrgfi 11056aab59a7SmrgHAVE_DEFS_ENT= 11066aab59a7Smrg 11076aab59a7Smrgif test x"$cross_compiling" = x"yes" ; then 11086aab59a7Smrg HAVE_DEFS_ENT=no 1109659607e0Smrgelse 11106aab59a7Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1111659607e0Smrgfi 1112659607e0Smrg 11136aab59a7SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 11146aab59a7SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 1115659607e0Smrg 11166aab59a7SmrgAC_MSG_CHECKING([Whether to build documentation]) 1117659607e0Smrg 11186aab59a7Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 11196aab59a7Smrg BUILDDOC=yes 1120659607e0Smrgelse 11216aab59a7Smrg BUILDDOC=no 1122659607e0Smrgfi 1123659607e0Smrg 11246aab59a7SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1125659607e0Smrg 11266aab59a7SmrgAC_MSG_RESULT([$BUILDDOC]) 1127659607e0Smrg 11286aab59a7SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 11296aab59a7Smrg 11306aab59a7Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 11316aab59a7Smrg BUILDPDFDOC=yes 1132659607e0Smrgelse 11336aab59a7Smrg BUILDPDFDOC=no 1134659607e0Smrgfi 1135659607e0Smrg 11366aab59a7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1137659607e0Smrg 11386aab59a7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1139659607e0Smrg 11406aab59a7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 11416aab59a7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 11426aab59a7SmrgMAKE_PDF="$PS2PDF" 11436aab59a7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1144659607e0Smrg 11456aab59a7SmrgAC_SUBST(MAKE_TEXT) 11466aab59a7SmrgAC_SUBST(MAKE_PS) 11476aab59a7SmrgAC_SUBST(MAKE_PDF) 11486aab59a7SmrgAC_SUBST(MAKE_HTML) 11496aab59a7Smrg]) # XORG_CHECK_LINUXDOC 1150659607e0Smrg 11516aab59a7Smrg# XORG_CHECK_DOCBOOK 11526aab59a7Smrg# ------------------- 11536aab59a7Smrg# Minimum version: 1.0.0 11546aab59a7Smrg# 11556aab59a7Smrg# Checks for the ability to build output formats from SGML DocBook source. 11566aab59a7Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 11576aab59a7Smrg# indicates whether the necessary tools and files are found and, if set, 11586aab59a7Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 11596aab59a7SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 11606aab59a7Smrgif test x$XORG_SGML_PATH = x ; then 11616aab59a7Smrg XORG_SGML_PATH=$prefix/share/sgml 11626aab59a7Smrgfi 11636aab59a7SmrgHAVE_DEFS_ENT= 11646aab59a7SmrgBUILDTXTDOC=no 11656aab59a7SmrgBUILDPDFDOC=no 11666aab59a7SmrgBUILDPSDOC=no 11676aab59a7SmrgBUILDHTMLDOC=no 1168659607e0Smrg 11696aab59a7SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1170659607e0Smrg 11716aab59a7SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 11726aab59a7SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 11736aab59a7SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 11746aab59a7SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1175659607e0Smrg 11766aab59a7SmrgAC_MSG_CHECKING([Whether to build text documentation]) 11776aab59a7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 11786aab59a7Smrg test x$BUILD_TXTDOC != xno; then 11796aab59a7Smrg BUILDTXTDOC=yes 11806aab59a7Smrgfi 11816aab59a7SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 11826aab59a7SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1183659607e0Smrg 11846aab59a7SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 11856aab59a7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 11866aab59a7Smrg test x$BUILD_PDFDOC != xno; then 11876aab59a7Smrg BUILDPDFDOC=yes 11886aab59a7Smrgfi 11896aab59a7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 11906aab59a7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1191659607e0Smrg 11926aab59a7SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 11936aab59a7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 11946aab59a7Smrg test x$BUILD_PSDOC != xno; then 11956aab59a7Smrg BUILDPSDOC=yes 11966aab59a7Smrgfi 11976aab59a7SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 11986aab59a7SmrgAC_MSG_RESULT([$BUILDPSDOC]) 1199659607e0Smrg 12006aab59a7SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 12016aab59a7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 12026aab59a7Smrg test x$BUILD_HTMLDOC != xno; then 12036aab59a7Smrg BUILDHTMLDOC=yes 12046aab59a7Smrgfi 12056aab59a7SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 12066aab59a7SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1207659607e0Smrg 12086aab59a7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 12096aab59a7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 12106aab59a7SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 12116aab59a7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1212659607e0Smrg 12136aab59a7SmrgAC_SUBST(MAKE_TEXT) 12146aab59a7SmrgAC_SUBST(MAKE_PS) 12156aab59a7SmrgAC_SUBST(MAKE_PDF) 12166aab59a7SmrgAC_SUBST(MAKE_HTML) 12176aab59a7Smrg]) # XORG_CHECK_DOCBOOK 1218659607e0Smrg 12196aab59a7Smrg# XORG_CHECK_MALLOC_ZERO 12206aab59a7Smrg# ---------------------- 12216aab59a7Smrg# Minimum version: 1.0.0 12226aab59a7Smrg# 12236aab59a7Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 12246aab59a7Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 12256aab59a7Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 12266aab59a7SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 12276aab59a7SmrgAC_ARG_ENABLE(malloc0returnsnull, 12286aab59a7Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 12296aab59a7Smrg [malloc(0) returns NULL (default: auto)]), 12306aab59a7Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 12316aab59a7Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1232659607e0Smrg 12336aab59a7SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 12346aab59a7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 12356aab59a7Smrg AC_RUN_IFELSE([ 12366aab59a7Smrgchar *malloc(); 12376aab59a7Smrgchar *realloc(); 12386aab59a7Smrgchar *calloc(); 12396aab59a7Smrgmain() { 12406aab59a7Smrg char *m0, *r0, *c0, *p; 12416aab59a7Smrg m0 = malloc(0); 12426aab59a7Smrg p = malloc(10); 12436aab59a7Smrg r0 = realloc(p,0); 12446aab59a7Smrg c0 = calloc(0); 12456aab59a7Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 12466aab59a7Smrg}], 12476aab59a7Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 12486aab59a7Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 12496aab59a7Smrgfi 12506aab59a7SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1251659607e0Smrg 12526aab59a7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 12536aab59a7Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 12546aab59a7Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 12556aab59a7Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 12566aab59a7Smrgelse 12576aab59a7Smrg MALLOC_ZERO_CFLAGS="" 12586aab59a7Smrg XMALLOC_ZERO_CFLAGS="" 12596aab59a7Smrg XTMALLOC_ZERO_CFLAGS="" 12606aab59a7Smrgfi 1261659607e0Smrg 12626aab59a7SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 12636aab59a7SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 12646aab59a7SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 12656aab59a7Smrg]) # XORG_CHECK_MALLOC_ZERO 1266659607e0Smrg 12676aab59a7Smrg# XORG_WITH_LINT() 12686aab59a7Smrg# ---------------- 12696aab59a7Smrg# Minimum version: 1.1.0 12706aab59a7Smrg# 12716aab59a7Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 12726aab59a7Smrg# is specified. (Use --with-lint=sparse for sparse.) 12736aab59a7Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 12746aab59a7Smrg# Sets $LINT_FLAGS to flags to pass to source checker 12756aab59a7Smrg# Sets LINT automake conditional if enabled (default: disabled) 12766aab59a7Smrg# 12776aab59a7SmrgAC_DEFUN([XORG_WITH_LINT],[ 1278659607e0Smrg 12796aab59a7Smrg# Allow checking code with lint, sparse, etc. 12806aab59a7SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 12816aab59a7Smrg [Use a lint-style source code checker (default: disabled)])], 12826aab59a7Smrg [use_lint=$withval], [use_lint=no]) 12836aab59a7Smrgif test "x$use_lint" = "xyes" ; then 12846aab59a7Smrg LINT="lint" 12856aab59a7Smrgelse 12866aab59a7Smrg LINT="$use_lint" 12876aab59a7Smrgfi 12886aab59a7Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 12896aab59a7Smrg case $LINT in 12906aab59a7Smrg lint|*/lint) 12916aab59a7Smrg case $host_os in 12926aab59a7Smrg solaris*) 12936aab59a7Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 12946aab59a7Smrg ;; 12956aab59a7Smrg esac 12966aab59a7Smrg ;; 1297659607e0Smrg esac 12986aab59a7Smrgfi 1299659607e0Smrg 13006aab59a7SmrgAC_SUBST(LINT) 13016aab59a7SmrgAC_SUBST(LINT_FLAGS) 13026aab59a7SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 1303659607e0Smrg 13046aab59a7Smrg]) # XORG_WITH_LINT 1305659607e0Smrg 13066aab59a7Smrg# XORG_LINT_LIBRARY(LIBNAME) 13076aab59a7Smrg# -------------------------- 13086aab59a7Smrg# Minimum version: 1.1.0 13096aab59a7Smrg# 13106aab59a7Smrg# Sets up flags for building lint libraries for checking programs that call 13116aab59a7Smrg# functions in the library. 13126aab59a7Smrg# Disabled by default, enable with --enable-lint-library 13136aab59a7Smrg# Sets: 13146aab59a7Smrg# @LINTLIB@ - name of lint library file to make 13156aab59a7Smrg# MAKE_LINT_LIB - automake conditional 13166aab59a7Smrg# 1317659607e0Smrg 13186aab59a7SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 13196aab59a7SmrgAC_REQUIRE([XORG_WITH_LINT]) 13206aab59a7Smrg# Build lint "library" for more indepth checks of programs calling this library 13216aab59a7SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 13226aab59a7Smrg [Create lint library (default: disabled)])], 13236aab59a7Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 13246aab59a7Smrgif test "x$make_lint_lib" != "xno" ; then 13256aab59a7Smrg if test "x$LINT" = "xno" ; then 13266aab59a7Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 13276aab59a7Smrg fi 13286aab59a7Smrg if test "x$make_lint_lib" = "xyes" ; then 13296aab59a7Smrg LINTLIB=llib-l$1.ln 13306aab59a7Smrg else 13316aab59a7Smrg LINTLIB=$make_lint_lib 13326aab59a7Smrg fi 13336aab59a7Smrgfi 13346aab59a7SmrgAC_SUBST(LINTLIB) 13356aab59a7SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1336659607e0Smrg 13376aab59a7Smrg]) # XORG_LINT_LIBRARY 1338659607e0Smrg 13396aab59a7Smrg# XORG_CWARNFLAGS 13406aab59a7Smrg# --------------- 13416aab59a7Smrg# Minimum version: 1.2.0 13426aab59a7Smrg# 13436aab59a7Smrg# Defines CWARNFLAGS to enable C compiler warnings. 13446aab59a7Smrg# 13456aab59a7SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 13466aab59a7SmrgAC_REQUIRE([AC_PROG_CC]) 13476aab59a7Smrgif test "x$GCC" = xyes ; then 13486aab59a7Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 13496aab59a7Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 13506aab59a7Smrg-Wbad-function-cast" 13516aab59a7Smrg case `gcc -dumpversion` in 13526aab59a7Smrg 3.4.* | 4.*) 13536aab59a7Smrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 1354659607e0Smrg ;; 13556aab59a7Smrg esac 13566aab59a7Smrgelse 13576aab59a7Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 13586aab59a7Smrg if test "x$SUNCC" = "xyes"; then 13596aab59a7Smrg CWARNFLAGS="-v" 13606aab59a7Smrg fi 13616aab59a7Smrgfi 13626aab59a7SmrgAC_SUBST(CWARNFLAGS) 13636aab59a7Smrg]) # XORG_CWARNFLAGS 13646aab59a7Smrgdnl Copyright 2005 Red Hat, Inc 13656aab59a7Smrgdnl 13666aab59a7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 13676aab59a7Smrgdnl documentation for any purpose is hereby granted without fee, provided that 13686aab59a7Smrgdnl the above copyright notice appear in all copies and that both that 13696aab59a7Smrgdnl copyright notice and this permission notice appear in supporting 13706aab59a7Smrgdnl documentation. 13716aab59a7Smrgdnl 13726aab59a7Smrgdnl The above copyright notice and this permission notice shall be included 13736aab59a7Smrgdnl in all copies or substantial portions of the Software. 13746aab59a7Smrgdnl 13756aab59a7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 13766aab59a7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 13776aab59a7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 13786aab59a7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 13796aab59a7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 13806aab59a7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 13816aab59a7Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 13826aab59a7Smrgdnl 13836aab59a7Smrgdnl Except as contained in this notice, the name of the copyright holders shall 13846aab59a7Smrgdnl not be used in advertising or otherwise to promote the sale, use or 13856aab59a7Smrgdnl other dealings in this Software without prior written authorization 13866aab59a7Smrgdnl from the copyright holders. 13876aab59a7Smrgdnl 1388659607e0Smrg 13896aab59a7Smrg# XORG_RELEASE_VERSION 13906aab59a7Smrg# -------------------- 13916aab59a7Smrg# Adds --with/without-release-string and changes the PACKAGE and 13926aab59a7Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 13936aab59a7Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 13946aab59a7Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 13956aab59a7Smrg 13966aab59a7SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 13976aab59a7Smrg AC_ARG_WITH(release-version, 13986aab59a7Smrg AC_HELP_STRING([--with-release-version=STRING], 13996aab59a7Smrg [Use release version string in package name]), 14006aab59a7Smrg [RELEASE_VERSION="$withval"], 14016aab59a7Smrg [RELEASE_VERSION=""]) 14026aab59a7Smrg if test "x$RELEASE_VERSION" != "x"; then 14036aab59a7Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 14046aab59a7Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 14056aab59a7Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 14066aab59a7Smrg fi 14076aab59a7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 14086aab59a7Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 14096aab59a7Smrg [Major version of this package]) 14106aab59a7Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 14116aab59a7Smrg if test "x$PVM" = "x"; then 14126aab59a7Smrg PVM="0" 14136aab59a7Smrg fi 14146aab59a7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 14156aab59a7Smrg [$PVM], 14166aab59a7Smrg [Minor version of this package]) 14176aab59a7Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 14186aab59a7Smrg if test "x$PVP" = "x"; then 14196aab59a7Smrg PVP="0" 14206aab59a7Smrg fi 14216aab59a7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 14226aab59a7Smrg [$PVP], 14236aab59a7Smrg [Patch version of this package]) 14246aab59a7Smrg]) 1425659607e0Smrg 14266aab59a7Smrg# XORG_CHANGELOG() 14276aab59a7Smrg# ---------------- 14286aab59a7Smrg# Minimum version: 1.2.0 14296aab59a7Smrg# 14306aab59a7Smrg# Defines the variable CHANGELOG_CMD as the command to generate 14316aab59a7Smrg# ChangeLog from git. 14326aab59a7Smrg# 14336aab59a7Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 14346aab59a7Smrg# 14356aab59a7SmrgAC_DEFUN([XORG_CHANGELOG], [ 14366aab59a7SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 14376aab59a7Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 14386aab59a7Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 14396aab59a7SmrgAC_SUBST([CHANGELOG_CMD]) 14406aab59a7SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 14416aab59a7Smrg]) # XORG_CHANGELOG 1442659607e0Smrg 14436aab59a7Smrgdnl Copyright 2005 Red Hat, Inc 14446aab59a7Smrgdnl 14456aab59a7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 14466aab59a7Smrgdnl documentation for any purpose is hereby granted without fee, provided that 14476aab59a7Smrgdnl the above copyright notice appear in all copies and that both that 14486aab59a7Smrgdnl copyright notice and this permission notice appear in supporting 14496aab59a7Smrgdnl documentation. 14506aab59a7Smrgdnl 14516aab59a7Smrgdnl The above copyright notice and this permission notice shall be included 14526aab59a7Smrgdnl in all copies or substantial portions of the Software. 14536aab59a7Smrgdnl 14546aab59a7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 14556aab59a7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 14566aab59a7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 14576aab59a7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 14586aab59a7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 14596aab59a7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 14606aab59a7Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 14616aab59a7Smrgdnl 14626aab59a7Smrgdnl Except as contained in this notice, the name of the copyright holders shall 14636aab59a7Smrgdnl not be used in advertising or otherwise to promote the sale, use or 14646aab59a7Smrgdnl other dealings in this Software without prior written authorization 14656aab59a7Smrgdnl from the copyright holders. 14666aab59a7Smrgdnl 1467659607e0Smrg 14686aab59a7Smrg# XORG_DRIVER_CHECK_EXT() 14696aab59a7Smrg# -------------------------- 14706aab59a7Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 14716aab59a7Smrg# is defined, then add $1 to $REQUIRED_MODULES. 1472659607e0Smrg 14736aab59a7SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 14746aab59a7Smrg SAVE_CFLAGS="$CFLAGS" 14756aab59a7Smrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 14766aab59a7Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 14776aab59a7Smrg#include "xorg-server.h" 14786aab59a7Smrg#if !defined $1 14796aab59a7Smrg#error $1 not defined 14806aab59a7Smrg#endif 14816aab59a7Smrg ]])], 14826aab59a7Smrg [_EXT_CHECK=yes], 14836aab59a7Smrg [_EXT_CHECK=no]) 14846aab59a7Smrg CFLAGS="$SAVE_CFLAGS" 14856aab59a7Smrg AC_MSG_CHECKING([if $1 is defined]) 14866aab59a7Smrg AC_MSG_RESULT([$_EXT_CHECK]) 14876aab59a7Smrg if test "$_EXT_CHECK" != no; then 14886aab59a7Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 14896aab59a7Smrg fi 14906aab59a7Smrg]) 1491659607e0Smrg 14926aab59a7Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1493659607e0Smrg 14946aab59a7Smrg# serial 48 AC_PROG_LIBTOOL 1495659607e0Smrg 1496659607e0Smrg 14976aab59a7Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 14986aab59a7Smrg# ----------------------------------------------------------- 14996aab59a7Smrg# If this macro is not defined by Autoconf, define it here. 15006aab59a7Smrgm4_ifdef([AC_PROVIDE_IFELSE], 15016aab59a7Smrg [], 15026aab59a7Smrg [m4_define([AC_PROVIDE_IFELSE], 15036aab59a7Smrg [m4_ifdef([AC_PROVIDE_$1], 15046aab59a7Smrg [$2], [$3])])]) 1505659607e0Smrg 1506659607e0Smrg 15076aab59a7Smrg# AC_PROG_LIBTOOL 15086aab59a7Smrg# --------------- 15096aab59a7SmrgAC_DEFUN([AC_PROG_LIBTOOL], 15106aab59a7Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 15116aab59a7Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 15126aab59a7Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 15136aab59a7Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 15146aab59a7Smrg [AC_LIBTOOL_CXX], 15156aab59a7Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 15166aab59a7Smrg ])]) 15176aab59a7Smrgdnl And a similar setup for Fortran 77 support 15186aab59a7Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 15196aab59a7Smrg [AC_LIBTOOL_F77], 15206aab59a7Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 15216aab59a7Smrg])]) 15226aab59a7Smrg 15236aab59a7Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 15246aab59a7Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 15256aab59a7Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 15266aab59a7Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 15276aab59a7Smrg [AC_LIBTOOL_GCJ], 15286aab59a7Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 15296aab59a7Smrg [AC_LIBTOOL_GCJ], 15306aab59a7Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 15316aab59a7Smrg [AC_LIBTOOL_GCJ], 15326aab59a7Smrg [ifdef([AC_PROG_GCJ], 15336aab59a7Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 15346aab59a7Smrg ifdef([A][M_PROG_GCJ], 15356aab59a7Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 15366aab59a7Smrg ifdef([LT_AC_PROG_GCJ], 15376aab59a7Smrg [define([LT_AC_PROG_GCJ], 15386aab59a7Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 15396aab59a7Smrg])])# AC_PROG_LIBTOOL 1540659607e0Smrg 1541659607e0Smrg 15426aab59a7Smrg# _AC_PROG_LIBTOOL 1543659607e0Smrg# ---------------- 15446aab59a7SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 15456aab59a7Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 15466aab59a7SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 15476aab59a7SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 15486aab59a7SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 1549659607e0Smrg 15506aab59a7Smrg# This can be used to rebuild libtool when needed 15516aab59a7SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 1552659607e0Smrg 15536aab59a7Smrg# Always use our own libtool. 15546aab59a7SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 15556aab59a7SmrgAC_SUBST(LIBTOOL)dnl 1556659607e0Smrg 15576aab59a7Smrg# Prevent multiple expansion 15586aab59a7Smrgdefine([AC_PROG_LIBTOOL], []) 15596aab59a7Smrg])# _AC_PROG_LIBTOOL 1560659607e0Smrg 1561659607e0Smrg 15626aab59a7Smrg# AC_LIBTOOL_SETUP 15636aab59a7Smrg# ---------------- 15646aab59a7SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 15656aab59a7Smrg[AC_PREREQ(2.50)dnl 15666aab59a7SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 15676aab59a7SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 15686aab59a7SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 15696aab59a7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 15706aab59a7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 15716aab59a7SmrgAC_REQUIRE([AC_PROG_CC])dnl 15726aab59a7SmrgAC_REQUIRE([AC_PROG_LD])dnl 15736aab59a7SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 15746aab59a7SmrgAC_REQUIRE([AC_PROG_NM])dnl 1575659607e0Smrg 15766aab59a7SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 15776aab59a7SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 15786aab59a7Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 15796aab59a7SmrgAC_REQUIRE([AC_OBJEXT])dnl 15806aab59a7SmrgAC_REQUIRE([AC_EXEEXT])dnl 15816aab59a7Smrgdnl 1582659607e0Smrg 15836aab59a7SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 15846aab59a7SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 15856aab59a7SmrgAC_LIBTOOL_OBJDIR 1586659607e0Smrg 15876aab59a7SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 15886aab59a7Smrg_LT_AC_PROG_ECHO_BACKSLASH 1589659607e0Smrg 15906aab59a7Smrgcase $host_os in 15916aab59a7Smrgaix3*) 15926aab59a7Smrg # AIX sometimes has problems with the GCC collect2 program. For some 15936aab59a7Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 15946aab59a7Smrg # vanish in a puff of smoke. 15956aab59a7Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 15966aab59a7Smrg COLLECT_NAMES= 15976aab59a7Smrg export COLLECT_NAMES 15986aab59a7Smrg fi 15996aab59a7Smrg ;; 16006aab59a7Smrgesac 1601659607e0Smrg 16026aab59a7Smrg# Sed substitution that helps us do robust quoting. It backslashifies 16036aab59a7Smrg# metacharacters that are still active within double-quoted strings. 16046aab59a7SmrgXsed='sed -e 1s/^X//' 16056aab59a7Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 1606659607e0Smrg 16076aab59a7Smrg# Same as above, but do not quote variable references. 16086aab59a7Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 1609659607e0Smrg 16106aab59a7Smrg# Sed substitution to delay expansion of an escaped shell variable in a 16116aab59a7Smrg# double_quote_subst'ed string. 16126aab59a7Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1613659607e0Smrg 16146aab59a7Smrg# Sed substitution to avoid accidental globbing in evaled expressions 16156aab59a7Smrgno_glob_subst='s/\*/\\\*/g' 1616659607e0Smrg 16176aab59a7Smrg# Constants: 16186aab59a7Smrgrm="rm -f" 1619659607e0Smrg 16206aab59a7Smrg# Global variables: 16216aab59a7Smrgdefault_ofile=libtool 16226aab59a7Smrgcan_build_shared=yes 1623659607e0Smrg 16246aab59a7Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 16256aab59a7Smrg# which needs '.lib'). 16266aab59a7Smrglibext=a 16276aab59a7Smrgltmain="$ac_aux_dir/ltmain.sh" 16286aab59a7Smrgofile="$default_ofile" 16296aab59a7Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1630659607e0Smrg 16316aab59a7SmrgAC_CHECK_TOOL(AR, ar, false) 16326aab59a7SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 16336aab59a7SmrgAC_CHECK_TOOL(STRIP, strip, :) 1634659607e0Smrg 16356aab59a7Smrgold_CC="$CC" 16366aab59a7Smrgold_CFLAGS="$CFLAGS" 1637659607e0Smrg 16386aab59a7Smrg# Set sane defaults for various variables 16396aab59a7Smrgtest -z "$AR" && AR=ar 16406aab59a7Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 16416aab59a7Smrgtest -z "$AS" && AS=as 16426aab59a7Smrgtest -z "$CC" && CC=cc 16436aab59a7Smrgtest -z "$LTCC" && LTCC=$CC 16446aab59a7Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 16456aab59a7Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 16466aab59a7Smrgtest -z "$LD" && LD=ld 16476aab59a7Smrgtest -z "$LN_S" && LN_S="ln -s" 16486aab59a7Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 16496aab59a7Smrgtest -z "$NM" && NM=nm 16506aab59a7Smrgtest -z "$SED" && SED=sed 16516aab59a7Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 16526aab59a7Smrgtest -z "$RANLIB" && RANLIB=: 16536aab59a7Smrgtest -z "$STRIP" && STRIP=: 16546aab59a7Smrgtest -z "$ac_objext" && ac_objext=o 1655659607e0Smrg 16566aab59a7Smrg# Determine commands to create old-style static archives. 16576aab59a7Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 16586aab59a7Smrgold_postinstall_cmds='chmod 644 $oldlib' 16596aab59a7Smrgold_postuninstall_cmds= 1660659607e0Smrg 16616aab59a7Smrgif test -n "$RANLIB"; then 16626aab59a7Smrg case $host_os in 16636aab59a7Smrg openbsd*) 16646aab59a7Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 16656aab59a7Smrg ;; 16666aab59a7Smrg *) 16676aab59a7Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 16686aab59a7Smrg ;; 16696aab59a7Smrg esac 16706aab59a7Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 16716aab59a7Smrgfi 1672659607e0Smrg 16736aab59a7Smrg_LT_CC_BASENAME([$compiler]) 1674659607e0Smrg 16756aab59a7Smrg# Only perform the check for file, if the check method requires it 16766aab59a7Smrgcase $deplibs_check_method in 16776aab59a7Smrgfile_magic*) 16786aab59a7Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 16796aab59a7Smrg AC_PATH_MAGIC 16806aab59a7Smrg fi 16816aab59a7Smrg ;; 16826aab59a7Smrgesac 1683659607e0Smrg 16846aab59a7SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 16856aab59a7SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 16866aab59a7Smrgenable_win32_dll=yes, enable_win32_dll=no) 1687659607e0Smrg 16886aab59a7SmrgAC_ARG_ENABLE([libtool-lock], 16896aab59a7Smrg [AC_HELP_STRING([--disable-libtool-lock], 16906aab59a7Smrg [avoid locking (might break parallel builds)])]) 16916aab59a7Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1692659607e0Smrg 16936aab59a7SmrgAC_ARG_WITH([pic], 16946aab59a7Smrg [AC_HELP_STRING([--with-pic], 16956aab59a7Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 16966aab59a7Smrg [pic_mode="$withval"], 16976aab59a7Smrg [pic_mode=default]) 16986aab59a7Smrgtest -z "$pic_mode" && pic_mode=default 1699659607e0Smrg 17006aab59a7Smrg# Use C for the default configuration in the libtool script 17016aab59a7Smrgtagname= 17026aab59a7SmrgAC_LIBTOOL_LANG_C_CONFIG 17036aab59a7Smrg_LT_AC_TAGCONFIG 17046aab59a7Smrg])# AC_LIBTOOL_SETUP 1705659607e0Smrg 1706659607e0Smrg 17076aab59a7Smrg# _LT_AC_SYS_COMPILER 17086aab59a7Smrg# ------------------- 17096aab59a7SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 17106aab59a7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 1711659607e0Smrg 17126aab59a7Smrg# If no C compiler was specified, use CC. 17136aab59a7SmrgLTCC=${LTCC-"$CC"} 1714659607e0Smrg 17156aab59a7Smrg# If no C compiler flags were specified, use CFLAGS. 17166aab59a7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 1717659607e0Smrg 17186aab59a7Smrg# Allow CC to be a program name with arguments. 17196aab59a7Smrgcompiler=$CC 17206aab59a7Smrg])# _LT_AC_SYS_COMPILER 1721659607e0Smrg 1722659607e0Smrg 17236aab59a7Smrg# _LT_CC_BASENAME(CC) 1724659607e0Smrg# ------------------- 17256aab59a7Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 17266aab59a7SmrgAC_DEFUN([_LT_CC_BASENAME], 17276aab59a7Smrg[for cc_temp in $1""; do 17286aab59a7Smrg case $cc_temp in 17296aab59a7Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 17306aab59a7Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 17316aab59a7Smrg \-*) ;; 17326aab59a7Smrg *) break;; 17336aab59a7Smrg esac 17346aab59a7Smrgdone 17356aab59a7Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 17366aab59a7Smrg]) 1737659607e0Smrg 1738659607e0Smrg 17396aab59a7Smrg# _LT_COMPILER_BOILERPLATE 17406aab59a7Smrg# ------------------------ 17416aab59a7Smrg# Check for compiler boilerplate output or warnings with 17426aab59a7Smrg# the simple compiler test code. 17436aab59a7SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 17446aab59a7Smrg[ac_outfile=conftest.$ac_objext 17456aab59a7Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext 17466aab59a7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 17476aab59a7Smrg_lt_compiler_boilerplate=`cat conftest.err` 17486aab59a7Smrg$rm conftest* 17496aab59a7Smrg])# _LT_COMPILER_BOILERPLATE 1750659607e0Smrg 1751659607e0Smrg 17526aab59a7Smrg# _LT_LINKER_BOILERPLATE 17536aab59a7Smrg# ---------------------- 17546aab59a7Smrg# Check for linker boilerplate output or warnings with 17556aab59a7Smrg# the simple link test code. 17566aab59a7SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 17576aab59a7Smrg[ac_outfile=conftest.$ac_objext 17586aab59a7Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext 17596aab59a7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 17606aab59a7Smrg_lt_linker_boilerplate=`cat conftest.err` 17616aab59a7Smrg$rm conftest* 17626aab59a7Smrg])# _LT_LINKER_BOILERPLATE 1763659607e0Smrg 1764659607e0Smrg 17656aab59a7Smrg# _LT_AC_SYS_LIBPATH_AIX 17666aab59a7Smrg# ---------------------- 17676aab59a7Smrg# Links a minimal program and checks the executable 17686aab59a7Smrg# for the system default hardcoded library path. In most cases, 17696aab59a7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 17706aab59a7Smrg# the location of the communication and MPI libs are included too. 17716aab59a7Smrg# If we don't find anything, use the default library path according 17726aab59a7Smrg# to the aix ld manual. 17736aab59a7SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 17746aab59a7Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 17756aab59a7Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 17766aab59a7Smrg}'` 17776aab59a7Smrg# Check for a 64-bit object if we didn't find anything. 17786aab59a7Smrgif test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 17796aab59a7Smrg}'`; fi],[]) 17806aab59a7Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 17816aab59a7Smrg])# _LT_AC_SYS_LIBPATH_AIX 1782659607e0Smrg 1783659607e0Smrg 17846aab59a7Smrg# _LT_AC_SHELL_INIT(ARG) 1785659607e0Smrg# ---------------------- 17866aab59a7SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 17876aab59a7Smrg[ifdef([AC_DIVERSION_NOTICE], 17886aab59a7Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 17896aab59a7Smrg [AC_DIVERT_PUSH(NOTICE)]) 17906aab59a7Smrg$1 17916aab59a7SmrgAC_DIVERT_POP 17926aab59a7Smrg])# _LT_AC_SHELL_INIT 1793659607e0Smrg 1794659607e0Smrg 17956aab59a7Smrg# _LT_AC_PROG_ECHO_BACKSLASH 17966aab59a7Smrg# -------------------------- 17976aab59a7Smrg# Add some code to the start of the generated configure script which 17986aab59a7Smrg# will find an echo command which doesn't interpret backslashes. 17996aab59a7SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 18006aab59a7Smrg[_LT_AC_SHELL_INIT([ 18016aab59a7Smrg# Check that we are running under the correct shell. 18026aab59a7SmrgSHELL=${CONFIG_SHELL-/bin/sh} 1803659607e0Smrg 18046aab59a7Smrgcase X$ECHO in 18056aab59a7SmrgX*--fallback-echo) 18066aab59a7Smrg # Remove one level of quotation (which was required for Make). 18076aab59a7Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 1808659607e0Smrg ;; 18096aab59a7Smrgesac 1810659607e0Smrg 18116aab59a7Smrgecho=${ECHO-echo} 18126aab59a7Smrgif test "X[$]1" = X--no-reexec; then 18136aab59a7Smrg # Discard the --no-reexec flag, and continue. 18146aab59a7Smrg shift 18156aab59a7Smrgelif test "X[$]1" = X--fallback-echo; then 18166aab59a7Smrg # Avoid inline document here, it may be left over 18176aab59a7Smrg : 18186aab59a7Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 18196aab59a7Smrg # Yippee, $echo works! 18206aab59a7Smrg : 18216aab59a7Smrgelse 18226aab59a7Smrg # Restart under the correct shell. 18236aab59a7Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 18246aab59a7Smrgfi 1825659607e0Smrg 18266aab59a7Smrgif test "X[$]1" = X--fallback-echo; then 18276aab59a7Smrg # used as fallback echo 18286aab59a7Smrg shift 18296aab59a7Smrg cat <<EOF 18306aab59a7Smrg[$]* 18316aab59a7SmrgEOF 18326aab59a7Smrg exit 0 18336aab59a7Smrgfi 1834659607e0Smrg 18356aab59a7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 18366aab59a7Smrg# if CDPATH is set. 18376aab59a7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1838659607e0Smrg 18396aab59a7Smrgif test -z "$ECHO"; then 18406aab59a7Smrgif test "X${echo_test_string+set}" != Xset; then 18416aab59a7Smrg# find a string as large as possible, as long as the shell can cope with it 18426aab59a7Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 18436aab59a7Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 18446aab59a7Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 18456aab59a7Smrg echo_test_string=`eval $cmd` && 18466aab59a7Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 18476aab59a7Smrg then 18486aab59a7Smrg break 18496aab59a7Smrg fi 18506aab59a7Smrg done 18516aab59a7Smrgfi 1852659607e0Smrg 18536aab59a7Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 18546aab59a7Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 18556aab59a7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 18566aab59a7Smrg : 18576aab59a7Smrgelse 18586aab59a7Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 18596aab59a7Smrg # backslashes. This makes it impossible to quote backslashes using 18606aab59a7Smrg # echo "$something" | sed 's/\\/\\\\/g' 18616aab59a7Smrg # 18626aab59a7Smrg # So, first we look for a working echo in the user's PATH. 1863659607e0Smrg 18646aab59a7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 18656aab59a7Smrg for dir in $PATH /usr/ucb; do 18666aab59a7Smrg IFS="$lt_save_ifs" 18676aab59a7Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 18686aab59a7Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 18696aab59a7Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 18706aab59a7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 18716aab59a7Smrg echo="$dir/echo" 18726aab59a7Smrg break 18736aab59a7Smrg fi 18746aab59a7Smrg done 18756aab59a7Smrg IFS="$lt_save_ifs" 1876659607e0Smrg 18776aab59a7Smrg if test "X$echo" = Xecho; then 18786aab59a7Smrg # We didn't find a better echo, so look for alternatives. 18796aab59a7Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 18806aab59a7Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 18816aab59a7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 18826aab59a7Smrg # This shell has a builtin print -r that does the trick. 18836aab59a7Smrg echo='print -r' 18846aab59a7Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 18856aab59a7Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 18866aab59a7Smrg # If we have ksh, try running configure again with it. 18876aab59a7Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 18886aab59a7Smrg export ORIGINAL_CONFIG_SHELL 18896aab59a7Smrg CONFIG_SHELL=/bin/ksh 18906aab59a7Smrg export CONFIG_SHELL 18916aab59a7Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 18926aab59a7Smrg else 18936aab59a7Smrg # Try using printf. 18946aab59a7Smrg echo='printf %s\n' 18956aab59a7Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 18966aab59a7Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 18976aab59a7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 18986aab59a7Smrg # Cool, printf works 18996aab59a7Smrg : 19006aab59a7Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 19016aab59a7Smrg test "X$echo_testing_string" = 'X\t' && 19026aab59a7Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 19036aab59a7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 19046aab59a7Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 19056aab59a7Smrg export CONFIG_SHELL 19066aab59a7Smrg SHELL="$CONFIG_SHELL" 19076aab59a7Smrg export SHELL 19086aab59a7Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 19096aab59a7Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 19106aab59a7Smrg test "X$echo_testing_string" = 'X\t' && 19116aab59a7Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 19126aab59a7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 19136aab59a7Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 19146aab59a7Smrg else 19156aab59a7Smrg # maybe with a smaller string... 19166aab59a7Smrg prev=: 1917659607e0Smrg 19186aab59a7Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 19196aab59a7Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 19206aab59a7Smrg then 19216aab59a7Smrg break 19226aab59a7Smrg fi 19236aab59a7Smrg prev="$cmd" 19246aab59a7Smrg done 1925659607e0Smrg 19266aab59a7Smrg if test "$prev" != 'sed 50q "[$]0"'; then 19276aab59a7Smrg echo_test_string=`eval $prev` 19286aab59a7Smrg export echo_test_string 19296aab59a7Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 19306aab59a7Smrg else 19316aab59a7Smrg # Oops. We lost completely, so just stick with echo. 19326aab59a7Smrg echo=echo 19336aab59a7Smrg fi 19346aab59a7Smrg fi 19356aab59a7Smrg fi 19366aab59a7Smrg fi 19376aab59a7Smrgfi 19386aab59a7Smrgfi 1939659607e0Smrg 19406aab59a7Smrg# Copy echo and quote the copy suitably for passing to libtool from 19416aab59a7Smrg# the Makefile, instead of quoting the original, which is used later. 19426aab59a7SmrgECHO=$echo 19436aab59a7Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 19446aab59a7Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 19456aab59a7Smrgfi 1946659607e0Smrg 19476aab59a7SmrgAC_SUBST(ECHO) 19486aab59a7Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 1949659607e0Smrg 1950659607e0Smrg 19516aab59a7Smrg# _LT_AC_LOCK 19526aab59a7Smrg# ----------- 19536aab59a7SmrgAC_DEFUN([_LT_AC_LOCK], 19546aab59a7Smrg[AC_ARG_ENABLE([libtool-lock], 19556aab59a7Smrg [AC_HELP_STRING([--disable-libtool-lock], 19566aab59a7Smrg [avoid locking (might break parallel builds)])]) 19576aab59a7Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1958659607e0Smrg 19596aab59a7Smrg# Some flags need to be propagated to the compiler or linker for good 19606aab59a7Smrg# libtool support. 19616aab59a7Smrgcase $host in 19626aab59a7Smrgia64-*-hpux*) 19636aab59a7Smrg # Find out which ABI we are using. 19646aab59a7Smrg echo 'int i;' > conftest.$ac_ext 19656aab59a7Smrg if AC_TRY_EVAL(ac_compile); then 19666aab59a7Smrg case `/usr/bin/file conftest.$ac_objext` in 19676aab59a7Smrg *ELF-32*) 19686aab59a7Smrg HPUX_IA64_MODE="32" 19696aab59a7Smrg ;; 19706aab59a7Smrg *ELF-64*) 19716aab59a7Smrg HPUX_IA64_MODE="64" 19726aab59a7Smrg ;; 19736aab59a7Smrg esac 1974659607e0Smrg fi 19756aab59a7Smrg rm -rf conftest* 1976659607e0Smrg ;; 19776aab59a7Smrg*-*-irix6*) 19786aab59a7Smrg # Find out which ABI we are using. 19796aab59a7Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 19806aab59a7Smrg if AC_TRY_EVAL(ac_compile); then 19816aab59a7Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 19826aab59a7Smrg case `/usr/bin/file conftest.$ac_objext` in 19836aab59a7Smrg *32-bit*) 19846aab59a7Smrg LD="${LD-ld} -melf32bsmip" 19856aab59a7Smrg ;; 19866aab59a7Smrg *N32*) 19876aab59a7Smrg LD="${LD-ld} -melf32bmipn32" 19886aab59a7Smrg ;; 19896aab59a7Smrg *64-bit*) 19906aab59a7Smrg LD="${LD-ld} -melf64bmip" 19916aab59a7Smrg ;; 19926aab59a7Smrg esac 19936aab59a7Smrg else 19946aab59a7Smrg case `/usr/bin/file conftest.$ac_objext` in 19956aab59a7Smrg *32-bit*) 19966aab59a7Smrg LD="${LD-ld} -32" 19976aab59a7Smrg ;; 19986aab59a7Smrg *N32*) 19996aab59a7Smrg LD="${LD-ld} -n32" 20006aab59a7Smrg ;; 20016aab59a7Smrg *64-bit*) 20026aab59a7Smrg LD="${LD-ld} -64" 20036aab59a7Smrg ;; 20046aab59a7Smrg esac 20056aab59a7Smrg fi 20066aab59a7Smrg fi 20076aab59a7Smrg rm -rf conftest* 2008659607e0Smrg ;; 2009659607e0Smrg 20106aab59a7Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 20116aab59a7Smrg # Find out which ABI we are using. 20126aab59a7Smrg echo 'int i;' > conftest.$ac_ext 20136aab59a7Smrg if AC_TRY_EVAL(ac_compile); then 20146aab59a7Smrg case `/usr/bin/file conftest.o` in 20156aab59a7Smrg *32-bit*) 20166aab59a7Smrg case $host in 20176aab59a7Smrg x86_64-*linux*) 20186aab59a7Smrg LD="${LD-ld} -m elf_i386" 20196aab59a7Smrg ;; 20206aab59a7Smrg ppc64-*linux*|powerpc64-*linux*) 20216aab59a7Smrg LD="${LD-ld} -m elf32ppclinux" 20226aab59a7Smrg ;; 20236aab59a7Smrg s390x-*linux*) 20246aab59a7Smrg LD="${LD-ld} -m elf_s390" 20256aab59a7Smrg ;; 20266aab59a7Smrg sparc64-*linux*) 20276aab59a7Smrg LD="${LD-ld} -m elf32_sparc" 20286aab59a7Smrg ;; 20296aab59a7Smrg esac 20306aab59a7Smrg ;; 20316aab59a7Smrg *64-bit*) 20326aab59a7Smrg case $host in 20336aab59a7Smrg x86_64-*linux*) 20346aab59a7Smrg LD="${LD-ld} -m elf_x86_64" 20356aab59a7Smrg ;; 20366aab59a7Smrg ppc*-*linux*|powerpc*-*linux*) 20376aab59a7Smrg LD="${LD-ld} -m elf64ppc" 20386aab59a7Smrg ;; 20396aab59a7Smrg s390*-*linux*) 20406aab59a7Smrg LD="${LD-ld} -m elf64_s390" 20416aab59a7Smrg ;; 20426aab59a7Smrg sparc*-*linux*) 20436aab59a7Smrg LD="${LD-ld} -m elf64_sparc" 20446aab59a7Smrg ;; 20456aab59a7Smrg esac 20466aab59a7Smrg ;; 20476aab59a7Smrg esac 20486aab59a7Smrg fi 20496aab59a7Smrg rm -rf conftest* 2050659607e0Smrg ;; 2051659607e0Smrg 20526aab59a7Smrg*-*-sco3.2v5*) 20536aab59a7Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 20546aab59a7Smrg SAVE_CFLAGS="$CFLAGS" 20556aab59a7Smrg CFLAGS="$CFLAGS -belf" 20566aab59a7Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 20576aab59a7Smrg [AC_LANG_PUSH(C) 20586aab59a7Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 20596aab59a7Smrg AC_LANG_POP]) 20606aab59a7Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 20616aab59a7Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 20626aab59a7Smrg CFLAGS="$SAVE_CFLAGS" 20636aab59a7Smrg fi 2064659607e0Smrg ;; 20656aab59a7Smrgsparc*-*solaris*) 20666aab59a7Smrg # Find out which ABI we are using. 20676aab59a7Smrg echo 'int i;' > conftest.$ac_ext 20686aab59a7Smrg if AC_TRY_EVAL(ac_compile); then 20696aab59a7Smrg case `/usr/bin/file conftest.o` in 20706aab59a7Smrg *64-bit*) 20716aab59a7Smrg case $lt_cv_prog_gnu_ld in 20726aab59a7Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 20736aab59a7Smrg *) LD="${LD-ld} -64" ;; 20746aab59a7Smrg esac 20756aab59a7Smrg ;; 20766aab59a7Smrg esac 20776aab59a7Smrg fi 20786aab59a7Smrg rm -rf conftest* 2079659607e0Smrg ;; 2080659607e0Smrg 20816aab59a7SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 20826aab59a7Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 20836aab59a7Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 20846aab59a7Smrg AC_CHECK_TOOL(AS, as, false) 20856aab59a7Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 2086659607e0Smrg ;; 20876aab59a7Smrg ]) 2088659607e0Smrgesac 2089659607e0Smrg 20906aab59a7Smrgneed_locks="$enable_libtool_lock" 2091659607e0Smrg 20926aab59a7Smrg])# _LT_AC_LOCK 20936aab59a7Smrg 20946aab59a7Smrg 20956aab59a7Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 20966aab59a7Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 20976aab59a7Smrg# ---------------------------------------------------------------- 20986aab59a7Smrg# Check whether the given compiler option works 20996aab59a7SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 21006aab59a7Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 21016aab59a7SmrgAC_CACHE_CHECK([$1], [$2], 21026aab59a7Smrg [$2=no 21036aab59a7Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 21046aab59a7Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 21056aab59a7Smrg lt_compiler_flag="$3" 21066aab59a7Smrg # Insert the option either (1) after the last *FLAGS variable, or 21076aab59a7Smrg # (2) before a word containing "conftest.", or (3) at the end. 21086aab59a7Smrg # Note that $ac_compile itself does not contain backslashes and begins 21096aab59a7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 21106aab59a7Smrg # The option is referenced via a variable to avoid confusing sed. 21116aab59a7Smrg lt_compile=`echo "$ac_compile" | $SED \ 21126aab59a7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 21136aab59a7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 21146aab59a7Smrg -e 's:$: $lt_compiler_flag:'` 21156aab59a7Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 21166aab59a7Smrg (eval "$lt_compile" 2>conftest.err) 21176aab59a7Smrg ac_status=$? 21186aab59a7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21196aab59a7Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 21206aab59a7Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 21216aab59a7Smrg # The compiler can only warn and ignore the option if not recognized 21226aab59a7Smrg # So say no if there are warnings other than the usual output. 21236aab59a7Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 21246aab59a7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 21256aab59a7Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 21266aab59a7Smrg $2=yes 21276aab59a7Smrg fi 21286aab59a7Smrg fi 21296aab59a7Smrg $rm conftest* 21306aab59a7Smrg]) 21316aab59a7Smrg 21326aab59a7Smrgif test x"[$]$2" = xyes; then 21336aab59a7Smrg ifelse([$5], , :, [$5]) 2134659607e0Smrgelse 21356aab59a7Smrg ifelse([$6], , :, [$6]) 21366aab59a7Smrgfi 21376aab59a7Smrg])# AC_LIBTOOL_COMPILER_OPTION 2138659607e0Smrg 2139659607e0Smrg 21406aab59a7Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 21416aab59a7Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 21426aab59a7Smrg# ------------------------------------------------------------ 21436aab59a7Smrg# Check whether the given compiler option works 21446aab59a7SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 21456aab59a7Smrg[AC_CACHE_CHECK([$1], [$2], 21466aab59a7Smrg [$2=no 21476aab59a7Smrg save_LDFLAGS="$LDFLAGS" 21486aab59a7Smrg LDFLAGS="$LDFLAGS $3" 21496aab59a7Smrg printf "$lt_simple_link_test_code" > conftest.$ac_ext 21506aab59a7Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 21516aab59a7Smrg # The linker can only warn and ignore the option if not recognized 21526aab59a7Smrg # So say no if there are warnings 21536aab59a7Smrg if test -s conftest.err; then 21546aab59a7Smrg # Append any errors to the config.log. 21556aab59a7Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 21566aab59a7Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 21576aab59a7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 21586aab59a7Smrg if diff conftest.exp conftest.er2 >/dev/null; then 21596aab59a7Smrg $2=yes 21606aab59a7Smrg fi 21616aab59a7Smrg else 21626aab59a7Smrg $2=yes 21636aab59a7Smrg fi 21646aab59a7Smrg fi 21656aab59a7Smrg $rm conftest* 21666aab59a7Smrg LDFLAGS="$save_LDFLAGS" 21676aab59a7Smrg]) 2168659607e0Smrg 21696aab59a7Smrgif test x"[$]$2" = xyes; then 21706aab59a7Smrg ifelse([$4], , :, [$4]) 21716aab59a7Smrgelse 21726aab59a7Smrg ifelse([$5], , :, [$5]) 21736aab59a7Smrgfi 21746aab59a7Smrg])# AC_LIBTOOL_LINKER_OPTION 2175659607e0Smrg 2176659607e0Smrg 21776aab59a7Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 21786aab59a7Smrg# -------------------------- 21796aab59a7SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 21806aab59a7Smrg[# find the maximum length of command line arguments 21816aab59a7SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 21826aab59a7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 21836aab59a7Smrg i=0 21846aab59a7Smrg teststring="ABCD" 2185659607e0Smrg 21866aab59a7Smrg case $build_os in 21876aab59a7Smrg msdosdjgpp*) 21886aab59a7Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 21896aab59a7Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 21906aab59a7Smrg # during glob expansion). Even if it were fixed, the result of this 21916aab59a7Smrg # check would be larger than it should be. 21926aab59a7Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 21936aab59a7Smrg ;; 2194659607e0Smrg 21956aab59a7Smrg gnu*) 21966aab59a7Smrg # Under GNU Hurd, this test is not required because there is 21976aab59a7Smrg # no limit to the length of command line arguments. 21986aab59a7Smrg # Libtool will interpret -1 as no limit whatsoever 21996aab59a7Smrg lt_cv_sys_max_cmd_len=-1; 22006aab59a7Smrg ;; 2201659607e0Smrg 22026aab59a7Smrg cygwin* | mingw*) 22036aab59a7Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 22046aab59a7Smrg # about 5 minutes as the teststring grows exponentially. 22056aab59a7Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 22066aab59a7Smrg # you end up with a "frozen" computer, even though with patience 22076aab59a7Smrg # the test eventually succeeds (with a max line length of 256k). 22086aab59a7Smrg # Instead, let's just punt: use the minimum linelength reported by 22096aab59a7Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 22106aab59a7Smrg lt_cv_sys_max_cmd_len=8192; 22116aab59a7Smrg ;; 2212659607e0Smrg 22136aab59a7Smrg amigaos*) 22146aab59a7Smrg # On AmigaOS with pdksh, this test takes hours, literally. 22156aab59a7Smrg # So we just punt and use a minimum line length of 8192. 22166aab59a7Smrg lt_cv_sys_max_cmd_len=8192; 22176aab59a7Smrg ;; 2218659607e0Smrg 22196aab59a7Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 22206aab59a7Smrg # This has been around since 386BSD, at least. Likely further. 22216aab59a7Smrg if test -x /sbin/sysctl; then 22226aab59a7Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 22236aab59a7Smrg elif test -x /usr/sbin/sysctl; then 22246aab59a7Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 22256aab59a7Smrg else 22266aab59a7Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 22276aab59a7Smrg fi 22286aab59a7Smrg # And add a safety zone 22296aab59a7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 22306aab59a7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 22316aab59a7Smrg ;; 2232659607e0Smrg 22336aab59a7Smrg interix*) 22346aab59a7Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 22356aab59a7Smrg lt_cv_sys_max_cmd_len=196608 22366aab59a7Smrg ;; 2237659607e0Smrg 22386aab59a7Smrg osf*) 22396aab59a7Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 22406aab59a7Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 22416aab59a7Smrg # nice to cause kernel panics so lets avoid the loop below. 22426aab59a7Smrg # First set a reasonable default. 22436aab59a7Smrg lt_cv_sys_max_cmd_len=16384 22446aab59a7Smrg # 22456aab59a7Smrg if test -x /sbin/sysconfig; then 22466aab59a7Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 22476aab59a7Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 22486aab59a7Smrg esac 22496aab59a7Smrg fi 22506aab59a7Smrg ;; 22516aab59a7Smrg sco3.2v5*) 22526aab59a7Smrg lt_cv_sys_max_cmd_len=102400 22536aab59a7Smrg ;; 22546aab59a7Smrg sysv5* | sco5v6* | sysv4.2uw2*) 22556aab59a7Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 22566aab59a7Smrg if test -n "$kargmax"; then 22576aab59a7Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 22586aab59a7Smrg else 22596aab59a7Smrg lt_cv_sys_max_cmd_len=32768 22606aab59a7Smrg fi 22616aab59a7Smrg ;; 22626aab59a7Smrg *) 22636aab59a7Smrg # If test is not a shell built-in, we'll probably end up computing a 22646aab59a7Smrg # maximum length that is only half of the actual maximum length, but 22656aab59a7Smrg # we can't tell. 22666aab59a7Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 22676aab59a7Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 22686aab59a7Smrg = "XX$teststring") >/dev/null 2>&1 && 22696aab59a7Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 22706aab59a7Smrg lt_cv_sys_max_cmd_len=$new_result && 22716aab59a7Smrg test $i != 17 # 1/2 MB should be enough 22726aab59a7Smrg do 22736aab59a7Smrg i=`expr $i + 1` 22746aab59a7Smrg teststring=$teststring$teststring 22756aab59a7Smrg done 22766aab59a7Smrg teststring= 22776aab59a7Smrg # Add a significant safety factor because C++ compilers can tack on massive 22786aab59a7Smrg # amounts of additional arguments before passing them to the linker. 22796aab59a7Smrg # It appears as though 1/2 is a usable value. 22806aab59a7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 22816aab59a7Smrg ;; 22826aab59a7Smrg esac 22836aab59a7Smrg]) 22846aab59a7Smrgif test -n $lt_cv_sys_max_cmd_len ; then 22856aab59a7Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 22866aab59a7Smrgelse 22876aab59a7Smrg AC_MSG_RESULT(none) 22886aab59a7Smrgfi 22896aab59a7Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 2290659607e0Smrg 2291659607e0Smrg 22926aab59a7Smrg# _LT_AC_CHECK_DLFCN 22936aab59a7Smrg# ------------------ 22946aab59a7SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 22956aab59a7Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 22966aab59a7Smrg])# _LT_AC_CHECK_DLFCN 2297659607e0Smrg 2298659607e0Smrg 22996aab59a7Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 23006aab59a7Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 23016aab59a7Smrg# --------------------------------------------------------------------- 23026aab59a7SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 23036aab59a7Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 23046aab59a7Smrgif test "$cross_compiling" = yes; then : 23056aab59a7Smrg [$4] 23066aab59a7Smrgelse 23076aab59a7Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 23086aab59a7Smrg lt_status=$lt_dlunknown 23096aab59a7Smrg cat > conftest.$ac_ext <<EOF 23106aab59a7Smrg[#line __oline__ "configure" 23116aab59a7Smrg#include "confdefs.h" 2312659607e0Smrg 23136aab59a7Smrg#if HAVE_DLFCN_H 23146aab59a7Smrg#include <dlfcn.h> 23156aab59a7Smrg#endif 2316659607e0Smrg 23176aab59a7Smrg#include <stdio.h> 2318659607e0Smrg 23196aab59a7Smrg#ifdef RTLD_GLOBAL 23206aab59a7Smrg# define LT_DLGLOBAL RTLD_GLOBAL 23216aab59a7Smrg#else 23226aab59a7Smrg# ifdef DL_GLOBAL 23236aab59a7Smrg# define LT_DLGLOBAL DL_GLOBAL 23246aab59a7Smrg# else 23256aab59a7Smrg# define LT_DLGLOBAL 0 23266aab59a7Smrg# endif 23276aab59a7Smrg#endif 2328659607e0Smrg 23296aab59a7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 23306aab59a7Smrg find out it does not work in some platform. */ 23316aab59a7Smrg#ifndef LT_DLLAZY_OR_NOW 23326aab59a7Smrg# ifdef RTLD_LAZY 23336aab59a7Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 23346aab59a7Smrg# else 23356aab59a7Smrg# ifdef DL_LAZY 23366aab59a7Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 23376aab59a7Smrg# else 23386aab59a7Smrg# ifdef RTLD_NOW 23396aab59a7Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 23406aab59a7Smrg# else 23416aab59a7Smrg# ifdef DL_NOW 23426aab59a7Smrg# define LT_DLLAZY_OR_NOW DL_NOW 23436aab59a7Smrg# else 23446aab59a7Smrg# define LT_DLLAZY_OR_NOW 0 23456aab59a7Smrg# endif 23466aab59a7Smrg# endif 23476aab59a7Smrg# endif 23486aab59a7Smrg# endif 23496aab59a7Smrg#endif 2350659607e0Smrg 23516aab59a7Smrg#ifdef __cplusplus 23526aab59a7Smrgextern "C" void exit (int); 23536aab59a7Smrg#endif 2354659607e0Smrg 23556aab59a7Smrgvoid fnord() { int i=42;} 23566aab59a7Smrgint main () 23576aab59a7Smrg{ 23586aab59a7Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 23596aab59a7Smrg int status = $lt_dlunknown; 2360659607e0Smrg 23616aab59a7Smrg if (self) 23626aab59a7Smrg { 23636aab59a7Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 23646aab59a7Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 23656aab59a7Smrg /* dlclose (self); */ 23666aab59a7Smrg } 23676aab59a7Smrg else 23686aab59a7Smrg puts (dlerror ()); 2369659607e0Smrg 23706aab59a7Smrg exit (status); 23716aab59a7Smrg}] 23726aab59a7SmrgEOF 23736aab59a7Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 23746aab59a7Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 23756aab59a7Smrg lt_status=$? 23766aab59a7Smrg case x$lt_status in 23776aab59a7Smrg x$lt_dlno_uscore) $1 ;; 23786aab59a7Smrg x$lt_dlneed_uscore) $2 ;; 23796aab59a7Smrg x$lt_dlunknown|x*) $3 ;; 23806aab59a7Smrg esac 23816aab59a7Smrg else : 23826aab59a7Smrg # compilation failed 23836aab59a7Smrg $3 2384659607e0Smrg fi 23856aab59a7Smrgfi 23866aab59a7Smrgrm -fr conftest* 23876aab59a7Smrg])# _LT_AC_TRY_DLOPEN_SELF 2388659607e0Smrg 2389659607e0Smrg 23906aab59a7Smrg# AC_LIBTOOL_DLOPEN_SELF 23916aab59a7Smrg# ---------------------- 23926aab59a7SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 23936aab59a7Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 23946aab59a7Smrgif test "x$enable_dlopen" != xyes; then 23956aab59a7Smrg enable_dlopen=unknown 23966aab59a7Smrg enable_dlopen_self=unknown 23976aab59a7Smrg enable_dlopen_self_static=unknown 23986aab59a7Smrgelse 23996aab59a7Smrg lt_cv_dlopen=no 24006aab59a7Smrg lt_cv_dlopen_libs= 2401659607e0Smrg 24026aab59a7Smrg case $host_os in 24036aab59a7Smrg beos*) 24046aab59a7Smrg lt_cv_dlopen="load_add_on" 24056aab59a7Smrg lt_cv_dlopen_libs= 24066aab59a7Smrg lt_cv_dlopen_self=yes 24076aab59a7Smrg ;; 2408659607e0Smrg 24096aab59a7Smrg mingw* | pw32*) 24106aab59a7Smrg lt_cv_dlopen="LoadLibrary" 24116aab59a7Smrg lt_cv_dlopen_libs= 24126aab59a7Smrg ;; 2413659607e0Smrg 24146aab59a7Smrg cygwin*) 24156aab59a7Smrg lt_cv_dlopen="dlopen" 24166aab59a7Smrg lt_cv_dlopen_libs= 24176aab59a7Smrg ;; 2418659607e0Smrg 24196aab59a7Smrg darwin*) 24206aab59a7Smrg # if libdl is installed we need to link against it 24216aab59a7Smrg AC_CHECK_LIB([dl], [dlopen], 24226aab59a7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 24236aab59a7Smrg lt_cv_dlopen="dyld" 24246aab59a7Smrg lt_cv_dlopen_libs= 24256aab59a7Smrg lt_cv_dlopen_self=yes 24266aab59a7Smrg ]) 24276aab59a7Smrg ;; 2428659607e0Smrg 24296aab59a7Smrg *) 24306aab59a7Smrg AC_CHECK_FUNC([shl_load], 24316aab59a7Smrg [lt_cv_dlopen="shl_load"], 24326aab59a7Smrg [AC_CHECK_LIB([dld], [shl_load], 24336aab59a7Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 24346aab59a7Smrg [AC_CHECK_FUNC([dlopen], 24356aab59a7Smrg [lt_cv_dlopen="dlopen"], 24366aab59a7Smrg [AC_CHECK_LIB([dl], [dlopen], 24376aab59a7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 24386aab59a7Smrg [AC_CHECK_LIB([svld], [dlopen], 24396aab59a7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 24406aab59a7Smrg [AC_CHECK_LIB([dld], [dld_link], 24416aab59a7Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 24426aab59a7Smrg ]) 24436aab59a7Smrg ]) 24446aab59a7Smrg ]) 24456aab59a7Smrg ]) 24466aab59a7Smrg ]) 24476aab59a7Smrg ;; 24486aab59a7Smrg esac 2449659607e0Smrg 24506aab59a7Smrg if test "x$lt_cv_dlopen" != xno; then 24516aab59a7Smrg enable_dlopen=yes 24526aab59a7Smrg else 24536aab59a7Smrg enable_dlopen=no 24546aab59a7Smrg fi 2455659607e0Smrg 24566aab59a7Smrg case $lt_cv_dlopen in 24576aab59a7Smrg dlopen) 24586aab59a7Smrg save_CPPFLAGS="$CPPFLAGS" 24596aab59a7Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2460659607e0Smrg 24616aab59a7Smrg save_LDFLAGS="$LDFLAGS" 24626aab59a7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2463659607e0Smrg 24646aab59a7Smrg save_LIBS="$LIBS" 24656aab59a7Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 2466659607e0Smrg 24676aab59a7Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 24686aab59a7Smrg lt_cv_dlopen_self, [dnl 24696aab59a7Smrg _LT_AC_TRY_DLOPEN_SELF( 24706aab59a7Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 24716aab59a7Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 24726aab59a7Smrg ]) 2473659607e0Smrg 24746aab59a7Smrg if test "x$lt_cv_dlopen_self" = xyes; then 24756aab59a7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 24766aab59a7Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 24776aab59a7Smrg lt_cv_dlopen_self_static, [dnl 24786aab59a7Smrg _LT_AC_TRY_DLOPEN_SELF( 24796aab59a7Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 24806aab59a7Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 24816aab59a7Smrg ]) 24826aab59a7Smrg fi 2483659607e0Smrg 24846aab59a7Smrg CPPFLAGS="$save_CPPFLAGS" 24856aab59a7Smrg LDFLAGS="$save_LDFLAGS" 24866aab59a7Smrg LIBS="$save_LIBS" 24876aab59a7Smrg ;; 24886aab59a7Smrg esac 2489659607e0Smrg 24906aab59a7Smrg case $lt_cv_dlopen_self in 24916aab59a7Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 24926aab59a7Smrg *) enable_dlopen_self=unknown ;; 24936aab59a7Smrg esac 2494659607e0Smrg 24956aab59a7Smrg case $lt_cv_dlopen_self_static in 24966aab59a7Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 24976aab59a7Smrg *) enable_dlopen_self_static=unknown ;; 24986aab59a7Smrg esac 2499659607e0Smrgfi 25006aab59a7Smrg])# AC_LIBTOOL_DLOPEN_SELF 2501659607e0Smrg 2502659607e0Smrg 25036aab59a7Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 25046aab59a7Smrg# --------------------------------- 25056aab59a7Smrg# Check to see if options -c and -o are simultaneously supported by compiler 25066aab59a7SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 25076aab59a7Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 25086aab59a7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 25096aab59a7Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 25106aab59a7Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 25116aab59a7Smrg $rm -r conftest 2>/dev/null 25126aab59a7Smrg mkdir conftest 25136aab59a7Smrg cd conftest 25146aab59a7Smrg mkdir out 25156aab59a7Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 2516659607e0Smrg 25176aab59a7Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 25186aab59a7Smrg # Insert the option either (1) after the last *FLAGS variable, or 25196aab59a7Smrg # (2) before a word containing "conftest.", or (3) at the end. 25206aab59a7Smrg # Note that $ac_compile itself does not contain backslashes and begins 25216aab59a7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 25226aab59a7Smrg lt_compile=`echo "$ac_compile" | $SED \ 25236aab59a7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 25246aab59a7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 25256aab59a7Smrg -e 's:$: $lt_compiler_flag:'` 25266aab59a7Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 25276aab59a7Smrg (eval "$lt_compile" 2>out/conftest.err) 25286aab59a7Smrg ac_status=$? 25296aab59a7Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 25306aab59a7Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 25316aab59a7Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 25326aab59a7Smrg then 25336aab59a7Smrg # The compiler can only warn and ignore the option if not recognized 25346aab59a7Smrg # So say no if there are warnings 25356aab59a7Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 25366aab59a7Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 25376aab59a7Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 25386aab59a7Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 25396aab59a7Smrg fi 25406aab59a7Smrg fi 25416aab59a7Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 25426aab59a7Smrg $rm conftest* 25436aab59a7Smrg # SGI C++ compiler will create directory out/ii_files/ for 25446aab59a7Smrg # template instantiation 25456aab59a7Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 25466aab59a7Smrg $rm out/* && rmdir out 25476aab59a7Smrg cd .. 25486aab59a7Smrg rmdir conftest 25496aab59a7Smrg $rm conftest* 25506aab59a7Smrg]) 25516aab59a7Smrg])# AC_LIBTOOL_PROG_CC_C_O 2552659607e0Smrg 2553659607e0Smrg 25546aab59a7Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 25556aab59a7Smrg# ----------------------------------------- 25566aab59a7Smrg# Check to see if we can do hard links to lock some files if needed 25576aab59a7SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 25586aab59a7Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 25596aab59a7Smrg 25606aab59a7Smrghard_links="nottested" 25616aab59a7Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 25626aab59a7Smrg # do not overwrite the value of need_locks provided by the user 25636aab59a7Smrg AC_MSG_CHECKING([if we can lock with hard links]) 25646aab59a7Smrg hard_links=yes 25656aab59a7Smrg $rm conftest* 25666aab59a7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 25676aab59a7Smrg touch conftest.a 25686aab59a7Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 25696aab59a7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 25706aab59a7Smrg AC_MSG_RESULT([$hard_links]) 25716aab59a7Smrg if test "$hard_links" = no; then 25726aab59a7Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 25736aab59a7Smrg need_locks=warn 2574659607e0Smrg fi 25756aab59a7Smrgelse 25766aab59a7Smrg need_locks=no 25776aab59a7Smrgfi 25786aab59a7Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 2579659607e0Smrg 2580659607e0Smrg 25816aab59a7Smrg# AC_LIBTOOL_OBJDIR 25826aab59a7Smrg# ----------------- 25836aab59a7SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 25846aab59a7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 25856aab59a7Smrg[rm -f .libs 2>/dev/null 25866aab59a7Smrgmkdir .libs 2>/dev/null 25876aab59a7Smrgif test -d .libs; then 25886aab59a7Smrg lt_cv_objdir=.libs 2589659607e0Smrgelse 25906aab59a7Smrg # MS-DOS does not allow filenames that begin with a dot. 25916aab59a7Smrg lt_cv_objdir=_libs 2592659607e0Smrgfi 25936aab59a7Smrgrmdir .libs 2>/dev/null]) 25946aab59a7Smrgobjdir=$lt_cv_objdir 25956aab59a7Smrg])# AC_LIBTOOL_OBJDIR 2596659607e0Smrg 2597659607e0Smrg 25986aab59a7Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 25996aab59a7Smrg# ---------------------------------------------- 26006aab59a7Smrg# Check hardcoding attributes. 26016aab59a7SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 26026aab59a7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 26036aab59a7Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 26046aab59a7Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 26056aab59a7Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 26066aab59a7Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2607659607e0Smrg 26086aab59a7Smrg # We can hardcode non-existant directories. 26096aab59a7Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 26106aab59a7Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 26116aab59a7Smrg # have to relink, otherwise we might link with an installed library 26126aab59a7Smrg # when we should be linking with a yet-to-be-installed one 26136aab59a7Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 26146aab59a7Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 26156aab59a7Smrg # Linking always hardcodes the temporary library directory. 26166aab59a7Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 26176aab59a7Smrg else 26186aab59a7Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 26196aab59a7Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 26206aab59a7Smrg fi 26216aab59a7Smrgelse 26226aab59a7Smrg # We cannot hardcode anything, or else we can only hardcode existing 26236aab59a7Smrg # directories. 26246aab59a7Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 26256aab59a7Smrgfi 26266aab59a7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 2627659607e0Smrg 26286aab59a7Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 26296aab59a7Smrg # Fast installation is not supported 26306aab59a7Smrg enable_fast_install=no 26316aab59a7Smrgelif test "$shlibpath_overrides_runpath" = yes || 26326aab59a7Smrg test "$enable_shared" = no; then 26336aab59a7Smrg # Fast installation is not necessary 26346aab59a7Smrg enable_fast_install=needless 26356aab59a7Smrgfi 26366aab59a7Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 2637659607e0Smrg 2638659607e0Smrg 26396aab59a7Smrg# AC_LIBTOOL_SYS_LIB_STRIP 26406aab59a7Smrg# ------------------------ 26416aab59a7SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 26426aab59a7Smrg[striplib= 26436aab59a7Smrgold_striplib= 26446aab59a7SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 26456aab59a7Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 26466aab59a7Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 26476aab59a7Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 26486aab59a7Smrg AC_MSG_RESULT([yes]) 26496aab59a7Smrgelse 26506aab59a7Smrg# FIXME - insert some real tests, host_os isn't really good enough 26516aab59a7Smrg case $host_os in 26526aab59a7Smrg darwin*) 26536aab59a7Smrg if test -n "$STRIP" ; then 26546aab59a7Smrg striplib="$STRIP -x" 26556aab59a7Smrg AC_MSG_RESULT([yes]) 26566aab59a7Smrg else 26576aab59a7Smrg AC_MSG_RESULT([no]) 26586aab59a7Smrgfi 26596aab59a7Smrg ;; 26606aab59a7Smrg *) 26616aab59a7Smrg AC_MSG_RESULT([no]) 26626aab59a7Smrg ;; 26636aab59a7Smrg esac 26646aab59a7Smrgfi 26656aab59a7Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 2666659607e0Smrg 2667659607e0Smrg 26686aab59a7Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 26696aab59a7Smrg# ----------------------------- 26706aab59a7Smrg# PORTME Fill in your ld.so characteristics 26716aab59a7SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 26726aab59a7Smrg[AC_MSG_CHECKING([dynamic linker characteristics]) 26736aab59a7Smrglibrary_names_spec= 26746aab59a7Smrglibname_spec='lib$name' 26756aab59a7Smrgsoname_spec= 26766aab59a7Smrgshrext_cmds=".so" 26776aab59a7Smrgpostinstall_cmds= 26786aab59a7Smrgpostuninstall_cmds= 26796aab59a7Smrgfinish_cmds= 26806aab59a7Smrgfinish_eval= 26816aab59a7Smrgshlibpath_var= 26826aab59a7Smrgshlibpath_overrides_runpath=unknown 26836aab59a7Smrgversion_type=none 26846aab59a7Smrgdynamic_linker="$host_os ld.so" 26856aab59a7Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 26866aab59a7Smrgif test "$GCC" = yes; then 26876aab59a7Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 26886aab59a7Smrg if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 26896aab59a7Smrg # if the path contains ";" then we assume it to be the separator 26906aab59a7Smrg # otherwise default to the standard path separator (i.e. ":") - it is 26916aab59a7Smrg # assumed that no part of a normal pathname contains ";" but that should 26926aab59a7Smrg # okay in the real world where ";" in dirpaths is itself problematic. 26936aab59a7Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 26946aab59a7Smrg else 26956aab59a7Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26966aab59a7Smrg fi 26976aab59a7Smrgelse 26986aab59a7Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 26996aab59a7Smrgfi 27006aab59a7Smrgneed_lib_prefix=unknown 27016aab59a7Smrghardcode_into_libs=no 2702659607e0Smrg 27036aab59a7Smrg# when you set need_version to no, make sure it does not cause -set_version 27046aab59a7Smrg# flags to be left without arguments 27056aab59a7Smrgneed_version=unknown 2706659607e0Smrg 27076aab59a7Smrgcase $host_os in 27086aab59a7Smrgaix3*) 27096aab59a7Smrg version_type=linux 27106aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 27116aab59a7Smrg shlibpath_var=LIBPATH 2712659607e0Smrg 27136aab59a7Smrg # AIX 3 has no versioning support, so we append a major version to the name. 27146aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 27156aab59a7Smrg ;; 2716659607e0Smrg 27176aab59a7Smrgaix4* | aix5*) 27186aab59a7Smrg version_type=linux 27196aab59a7Smrg need_lib_prefix=no 27206aab59a7Smrg need_version=no 27216aab59a7Smrg hardcode_into_libs=yes 27226aab59a7Smrg if test "$host_cpu" = ia64; then 27236aab59a7Smrg # AIX 5 supports IA64 27246aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 27256aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 27266aab59a7Smrg else 27276aab59a7Smrg # With GCC up to 2.95.x, collect2 would create an import file 27286aab59a7Smrg # for dependence libraries. The import file would start with 27296aab59a7Smrg # the line `#! .'. This would cause the generated library to 27306aab59a7Smrg # depend on `.', always an invalid library. This was fixed in 27316aab59a7Smrg # development snapshots of GCC prior to 3.0. 27326aab59a7Smrg case $host_os in 27336aab59a7Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 27346aab59a7Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 27356aab59a7Smrg echo ' yes ' 27366aab59a7Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 27376aab59a7Smrg : 2738659607e0Smrg else 27396aab59a7Smrg can_build_shared=no 27406aab59a7Smrg fi 27416aab59a7Smrg ;; 27426aab59a7Smrg esac 27436aab59a7Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 27446aab59a7Smrg # soname into executable. Probably we can add versioning support to 27456aab59a7Smrg # collect2, so additional links can be useful in future. 27466aab59a7Smrg if test "$aix_use_runtimelinking" = yes; then 27476aab59a7Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 27486aab59a7Smrg # instead of lib<name>.a to let people know that these are not 27496aab59a7Smrg # typical AIX shared libraries. 27506aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2751659607e0Smrg else 27526aab59a7Smrg # We preserve .a as extension for shared libraries through AIX4.2 27536aab59a7Smrg # and later when we are not doing run time linking. 27546aab59a7Smrg library_names_spec='${libname}${release}.a $libname.a' 27556aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2756659607e0Smrg fi 27576aab59a7Smrg shlibpath_var=LIBPATH 27586aab59a7Smrg fi 2759659607e0Smrg ;; 2760659607e0Smrg 27616aab59a7Smrgamigaos*) 27626aab59a7Smrg library_names_spec='$libname.ixlibrary $libname.a' 27636aab59a7Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 27646aab59a7Smrg 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' 27656aab59a7Smrg ;; 2766659607e0Smrg 27676aab59a7Smrgbeos*) 27686aab59a7Smrg library_names_spec='${libname}${shared_ext}' 27696aab59a7Smrg dynamic_linker="$host_os ld.so" 27706aab59a7Smrg shlibpath_var=LIBRARY_PATH 27716aab59a7Smrg ;; 2772659607e0Smrg 27736aab59a7Smrgbsdi[[45]]*) 27746aab59a7Smrg version_type=linux 27756aab59a7Smrg need_version=no 27766aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27776aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 27786aab59a7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 27796aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 27806aab59a7Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 27816aab59a7Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 27826aab59a7Smrg # the default ld.so.conf also contains /usr/contrib/lib and 27836aab59a7Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 27846aab59a7Smrg # libtool to hard-code these into programs 27856aab59a7Smrg ;; 27866aab59a7Smrg 27876aab59a7Smrgcygwin* | mingw* | pw32*) 27886aab59a7Smrg version_type=windows 27896aab59a7Smrg shrext_cmds=".dll" 27906aab59a7Smrg need_version=no 27916aab59a7Smrg need_lib_prefix=no 27926aab59a7Smrg 27936aab59a7Smrg case $GCC,$host_os in 27946aab59a7Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 27956aab59a7Smrg library_names_spec='$libname.dll.a' 27966aab59a7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 27976aab59a7Smrg postinstall_cmds='base_file=`basename \${file}`~ 27986aab59a7Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 27996aab59a7Smrg dldir=$destdir/`dirname \$dlpath`~ 28006aab59a7Smrg test -d \$dldir || mkdir -p \$dldir~ 28016aab59a7Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 28026aab59a7Smrg chmod a+x \$dldir/$dlname' 28036aab59a7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 28046aab59a7Smrg dlpath=$dir/\$dldll~ 28056aab59a7Smrg $rm \$dlpath' 28066aab59a7Smrg shlibpath_overrides_runpath=yes 28076aab59a7Smrg 28086aab59a7Smrg case $host_os in 28096aab59a7Smrg cygwin*) 28106aab59a7Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 28116aab59a7Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 28126aab59a7Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 2813659607e0Smrg ;; 28146aab59a7Smrg mingw*) 28156aab59a7Smrg # MinGW DLLs use traditional 'lib' prefix 28166aab59a7Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 28176aab59a7Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 28186aab59a7Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 28196aab59a7Smrg # It is most probably a Windows format PATH printed by 28206aab59a7Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 28216aab59a7Smrg # path with ; separators, and with drive letters. We can handle the 28226aab59a7Smrg # drive letters (cygwin fileutils understands them), so leave them, 28236aab59a7Smrg # especially as we might pass files found there to a mingw objdump, 28246aab59a7Smrg # which wouldn't understand a cygwinified path. Ahh. 28256aab59a7Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2826659607e0Smrg else 28276aab59a7Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2828659607e0Smrg fi 2829659607e0Smrg ;; 28306aab59a7Smrg pw32*) 28316aab59a7Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 28326aab59a7Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2833659607e0Smrg ;; 2834659607e0Smrg esac 2835659607e0Smrg ;; 2836659607e0Smrg 28376aab59a7Smrg *) 28386aab59a7Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2839659607e0Smrg ;; 28406aab59a7Smrg esac 28416aab59a7Smrg dynamic_linker='Win32 ld.exe' 28426aab59a7Smrg # FIXME: first we should search . and the directory the executable is in 28436aab59a7Smrg shlibpath_var=PATH 28446aab59a7Smrg ;; 2845659607e0Smrg 28466aab59a7Smrgdarwin* | rhapsody*) 28476aab59a7Smrg dynamic_linker="$host_os dyld" 28486aab59a7Smrg version_type=darwin 28496aab59a7Smrg need_lib_prefix=no 28506aab59a7Smrg need_version=no 28516aab59a7Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 28526aab59a7Smrg soname_spec='${libname}${release}${major}$shared_ext' 28536aab59a7Smrg shlibpath_overrides_runpath=yes 28546aab59a7Smrg shlibpath_var=DYLD_LIBRARY_PATH 28556aab59a7Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 28566aab59a7Smrg # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 28576aab59a7Smrg if test "$GCC" = yes; then 28586aab59a7Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` 28596aab59a7Smrg else 28606aab59a7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 28616aab59a7Smrg fi 28626aab59a7Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 28636aab59a7Smrg ;; 2864659607e0Smrg 28656aab59a7Smrgdgux*) 28666aab59a7Smrg version_type=linux 28676aab59a7Smrg need_lib_prefix=no 28686aab59a7Smrg need_version=no 28696aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 28706aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 28716aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 28726aab59a7Smrg ;; 2873659607e0Smrg 28746aab59a7Smrgfreebsd1*) 28756aab59a7Smrg dynamic_linker=no 28766aab59a7Smrg ;; 2877659607e0Smrg 28786aab59a7Smrgkfreebsd*-gnu) 28796aab59a7Smrg version_type=linux 28806aab59a7Smrg need_lib_prefix=no 28816aab59a7Smrg need_version=no 28826aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 28836aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 28846aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 28856aab59a7Smrg shlibpath_overrides_runpath=no 28866aab59a7Smrg hardcode_into_libs=yes 28876aab59a7Smrg dynamic_linker='GNU ld.so' 28886aab59a7Smrg ;; 2889659607e0Smrg 28906aab59a7Smrgfreebsd* | dragonfly*) 28916aab59a7Smrg # DragonFly does not have aout. When/if they implement a new 28926aab59a7Smrg # versioning mechanism, adjust this. 28936aab59a7Smrg if test -x /usr/bin/objformat; then 28946aab59a7Smrg objformat=`/usr/bin/objformat` 28956aab59a7Smrg else 28966aab59a7Smrg case $host_os in 28976aab59a7Smrg freebsd[[123]]*) objformat=aout ;; 28986aab59a7Smrg *) objformat=elf ;; 2899659607e0Smrg esac 29006aab59a7Smrg fi 29016aab59a7Smrg version_type=freebsd-$objformat 29026aab59a7Smrg case $version_type in 29036aab59a7Smrg freebsd-elf*) 29046aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 29056aab59a7Smrg need_version=no 29066aab59a7Smrg need_lib_prefix=no 29076aab59a7Smrg ;; 29086aab59a7Smrg freebsd-*) 29096aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 29106aab59a7Smrg need_version=yes 29116aab59a7Smrg ;; 29126aab59a7Smrg esac 29136aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 29146aab59a7Smrg case $host_os in 29156aab59a7Smrg freebsd2*) 29166aab59a7Smrg shlibpath_overrides_runpath=yes 2917659607e0Smrg ;; 29186aab59a7Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 29196aab59a7Smrg shlibpath_overrides_runpath=yes 29206aab59a7Smrg hardcode_into_libs=yes 2921659607e0Smrg ;; 29226aab59a7Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 29236aab59a7Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 29246aab59a7Smrg shlibpath_overrides_runpath=no 29256aab59a7Smrg hardcode_into_libs=yes 2926659607e0Smrg ;; 29276aab59a7Smrg freebsd*) # from 4.6 on 29286aab59a7Smrg shlibpath_overrides_runpath=yes 29296aab59a7Smrg hardcode_into_libs=yes 2930659607e0Smrg ;; 29316aab59a7Smrg esac 29326aab59a7Smrg ;; 29336aab59a7Smrg 29346aab59a7Smrggnu*) 29356aab59a7Smrg version_type=linux 29366aab59a7Smrg need_lib_prefix=no 29376aab59a7Smrg need_version=no 29386aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 29396aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 29406aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 29416aab59a7Smrg hardcode_into_libs=yes 29426aab59a7Smrg ;; 29436aab59a7Smrg 29446aab59a7Smrghpux9* | hpux10* | hpux11*) 29456aab59a7Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 29466aab59a7Smrg # link against other versions. 29476aab59a7Smrg version_type=sunos 29486aab59a7Smrg need_lib_prefix=no 29496aab59a7Smrg need_version=no 29506aab59a7Smrg case $host_cpu in 29516aab59a7Smrg ia64*) 29526aab59a7Smrg shrext_cmds='.so' 29536aab59a7Smrg hardcode_into_libs=yes 29546aab59a7Smrg dynamic_linker="$host_os dld.so" 29556aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 29566aab59a7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 29576aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 29586aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 29596aab59a7Smrg if test "X$HPUX_IA64_MODE" = X32; then 29606aab59a7Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2961659607e0Smrg else 29626aab59a7Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2963659607e0Smrg fi 29646aab59a7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2965659607e0Smrg ;; 29666aab59a7Smrg hppa*64*) 29676aab59a7Smrg shrext_cmds='.sl' 29686aab59a7Smrg hardcode_into_libs=yes 29696aab59a7Smrg dynamic_linker="$host_os dld.sl" 29706aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 29716aab59a7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 29726aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 29736aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 29746aab59a7Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 29756aab59a7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 29766aab59a7Smrg ;; 29776aab59a7Smrg *) 29786aab59a7Smrg shrext_cmds='.sl' 29796aab59a7Smrg dynamic_linker="$host_os dld.sl" 29806aab59a7Smrg shlibpath_var=SHLIB_PATH 29816aab59a7Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 29826aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 29836aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 29846aab59a7Smrg ;; 29856aab59a7Smrg esac 29866aab59a7Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 29876aab59a7Smrg postinstall_cmds='chmod 555 $lib' 29886aab59a7Smrg ;; 2989659607e0Smrg 29906aab59a7Smrginterix3*) 29916aab59a7Smrg version_type=linux 29926aab59a7Smrg need_lib_prefix=no 29936aab59a7Smrg need_version=no 29946aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 29956aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 29966aab59a7Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 29976aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 29986aab59a7Smrg shlibpath_overrides_runpath=no 29996aab59a7Smrg hardcode_into_libs=yes 30006aab59a7Smrg ;; 3001659607e0Smrg 30026aab59a7Smrgirix5* | irix6* | nonstopux*) 30036aab59a7Smrg case $host_os in 30046aab59a7Smrg nonstopux*) version_type=nonstopux ;; 30056aab59a7Smrg *) 30066aab59a7Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 30076aab59a7Smrg version_type=linux 30086aab59a7Smrg else 30096aab59a7Smrg version_type=irix 30106aab59a7Smrg fi ;; 30116aab59a7Smrg esac 30126aab59a7Smrg need_lib_prefix=no 30136aab59a7Smrg need_version=no 30146aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 30156aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 30166aab59a7Smrg case $host_os in 30176aab59a7Smrg irix5* | nonstopux*) 30186aab59a7Smrg libsuff= shlibsuff= 30196aab59a7Smrg ;; 30206aab59a7Smrg *) 30216aab59a7Smrg case $LD in # libtool.m4 will add one of these switches to LD 30226aab59a7Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 30236aab59a7Smrg libsuff= shlibsuff= libmagic=32-bit;; 30246aab59a7Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 30256aab59a7Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 30266aab59a7Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 30276aab59a7Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 30286aab59a7Smrg *) libsuff= shlibsuff= libmagic=never-match;; 30296aab59a7Smrg esac 30306aab59a7Smrg ;; 30316aab59a7Smrg esac 30326aab59a7Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 30336aab59a7Smrg shlibpath_overrides_runpath=no 30346aab59a7Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 30356aab59a7Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 30366aab59a7Smrg hardcode_into_libs=yes 30376aab59a7Smrg ;; 3038659607e0Smrg 30396aab59a7Smrg# No shared lib support for Linux oldld, aout, or coff. 30406aab59a7Smrglinux*oldld* | linux*aout* | linux*coff*) 30416aab59a7Smrg dynamic_linker=no 30426aab59a7Smrg ;; 3043659607e0Smrg 30446aab59a7Smrg# This must be Linux ELF. 30456aab59a7Smrglinux*) 30466aab59a7Smrg version_type=linux 30476aab59a7Smrg need_lib_prefix=no 30486aab59a7Smrg need_version=no 30496aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 30506aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 30516aab59a7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 30526aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 30536aab59a7Smrg shlibpath_overrides_runpath=no 30546aab59a7Smrg # This implies no fast_install, which is unacceptable. 30556aab59a7Smrg # Some rework will be needed to allow for fast_install 30566aab59a7Smrg # before this can be enabled. 30576aab59a7Smrg hardcode_into_libs=yes 3058659607e0Smrg 30596aab59a7Smrg # Append ld.so.conf contents to the search path 30606aab59a7Smrg if test -f /etc/ld.so.conf; then 30616aab59a7Smrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 30626aab59a7Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 30636aab59a7Smrg fi 3064659607e0Smrg 30656aab59a7Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 30666aab59a7Smrg # powerpc, because MkLinux only supported shared libraries with the 30676aab59a7Smrg # GNU dynamic linker. Since this was broken with cross compilers, 30686aab59a7Smrg # most powerpc-linux boxes support dynamic linking these days and 30696aab59a7Smrg # people can always --disable-shared, the test was removed, and we 30706aab59a7Smrg # assume the GNU/Linux dynamic linker is in use. 30716aab59a7Smrg dynamic_linker='GNU/Linux ld.so' 30726aab59a7Smrg ;; 3073659607e0Smrg 30746aab59a7Smrgknetbsd*-gnu) 30756aab59a7Smrg version_type=linux 30766aab59a7Smrg need_lib_prefix=no 30776aab59a7Smrg need_version=no 30786aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 30796aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 30806aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 30816aab59a7Smrg shlibpath_overrides_runpath=no 30826aab59a7Smrg hardcode_into_libs=yes 30836aab59a7Smrg dynamic_linker='GNU ld.so' 30846aab59a7Smrg ;; 3085659607e0Smrg 30866aab59a7Smrgnetbsd*) 30876aab59a7Smrg version_type=sunos 30886aab59a7Smrg need_lib_prefix=no 30896aab59a7Smrg need_version=no 30906aab59a7Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 30916aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 30926aab59a7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 30936aab59a7Smrg dynamic_linker='NetBSD (a.out) ld.so' 30946aab59a7Smrg else 30956aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 30966aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 30976aab59a7Smrg dynamic_linker='NetBSD ld.elf_so' 30986aab59a7Smrg fi 30996aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 31006aab59a7Smrg shlibpath_overrides_runpath=yes 31016aab59a7Smrg hardcode_into_libs=yes 31026aab59a7Smrg ;; 3103659607e0Smrg 31046aab59a7Smrgnewsos6) 31056aab59a7Smrg version_type=linux 31066aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 31076aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 31086aab59a7Smrg shlibpath_overrides_runpath=yes 31096aab59a7Smrg ;; 3110659607e0Smrg 31116aab59a7Smrgnto-qnx*) 31126aab59a7Smrg version_type=linux 31136aab59a7Smrg need_lib_prefix=no 31146aab59a7Smrg need_version=no 31156aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 31166aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 31176aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 31186aab59a7Smrg shlibpath_overrides_runpath=yes 31196aab59a7Smrg ;; 3120659607e0Smrg 31216aab59a7Smrgopenbsd*) 31226aab59a7Smrg version_type=sunos 31236aab59a7Smrg sys_lib_dlsearch_path_spec="/usr/lib" 31246aab59a7Smrg need_lib_prefix=no 31256aab59a7Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 31266aab59a7Smrg case $host_os in 31276aab59a7Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 31286aab59a7Smrg *) need_version=no ;; 31296aab59a7Smrg esac 31306aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 31316aab59a7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 31326aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 31336aab59a7Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 31346aab59a7Smrg case $host_os in 31356aab59a7Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 31366aab59a7Smrg shlibpath_overrides_runpath=no 3137659607e0Smrg ;; 31386aab59a7Smrg *) 31396aab59a7Smrg shlibpath_overrides_runpath=yes 3140659607e0Smrg ;; 31416aab59a7Smrg esac 31426aab59a7Smrg else 31436aab59a7Smrg shlibpath_overrides_runpath=yes 31446aab59a7Smrg fi 31456aab59a7Smrg ;; 3146659607e0Smrg 31476aab59a7Smrgos2*) 31486aab59a7Smrg libname_spec='$name' 31496aab59a7Smrg shrext_cmds=".dll" 31506aab59a7Smrg need_lib_prefix=no 31516aab59a7Smrg library_names_spec='$libname${shared_ext} $libname.a' 31526aab59a7Smrg dynamic_linker='OS/2 ld.exe' 31536aab59a7Smrg shlibpath_var=LIBPATH 31546aab59a7Smrg ;; 3155659607e0Smrg 31566aab59a7Smrgosf3* | osf4* | osf5*) 31576aab59a7Smrg version_type=osf 31586aab59a7Smrg need_lib_prefix=no 31596aab59a7Smrg need_version=no 31606aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 31616aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 31626aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 31636aab59a7Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 31646aab59a7Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 31656aab59a7Smrg ;; 3166659607e0Smrg 31676aab59a7Smrgsolaris*) 31686aab59a7Smrg version_type=linux 31696aab59a7Smrg need_lib_prefix=no 31706aab59a7Smrg need_version=no 31716aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 31726aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 31736aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 31746aab59a7Smrg shlibpath_overrides_runpath=yes 31756aab59a7Smrg hardcode_into_libs=yes 31766aab59a7Smrg # ldd complains unless libraries are executable 31776aab59a7Smrg postinstall_cmds='chmod +x $lib' 31786aab59a7Smrg ;; 3179659607e0Smrg 31806aab59a7Smrgsunos4*) 31816aab59a7Smrg version_type=sunos 31826aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 31836aab59a7Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 31846aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 31856aab59a7Smrg shlibpath_overrides_runpath=yes 31866aab59a7Smrg if test "$with_gnu_ld" = yes; then 31876aab59a7Smrg need_lib_prefix=no 31886aab59a7Smrg fi 31896aab59a7Smrg need_version=yes 31906aab59a7Smrg ;; 3191659607e0Smrg 31926aab59a7Smrgsysv4 | sysv4.3*) 31936aab59a7Smrg version_type=linux 31946aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 31956aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 31966aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 31976aab59a7Smrg case $host_vendor in 31986aab59a7Smrg sni) 31996aab59a7Smrg shlibpath_overrides_runpath=no 32006aab59a7Smrg need_lib_prefix=no 32016aab59a7Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 32026aab59a7Smrg runpath_var=LD_RUN_PATH 32036aab59a7Smrg ;; 32046aab59a7Smrg siemens) 32056aab59a7Smrg need_lib_prefix=no 32066aab59a7Smrg ;; 32076aab59a7Smrg motorola) 32086aab59a7Smrg need_lib_prefix=no 32096aab59a7Smrg need_version=no 32106aab59a7Smrg shlibpath_overrides_runpath=no 32116aab59a7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 32126aab59a7Smrg ;; 32136aab59a7Smrg esac 32146aab59a7Smrg ;; 32156aab59a7Smrg 32166aab59a7Smrgsysv4*MP*) 32176aab59a7Smrg if test -d /usr/nec ;then 32186aab59a7Smrg version_type=linux 32196aab59a7Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 32206aab59a7Smrg soname_spec='$libname${shared_ext}.$major' 32216aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 32226aab59a7Smrg fi 32236aab59a7Smrg ;; 32246aab59a7Smrg 32256aab59a7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 32266aab59a7Smrg version_type=freebsd-elf 32276aab59a7Smrg need_lib_prefix=no 32286aab59a7Smrg need_version=no 32296aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 32306aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 32316aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 32326aab59a7Smrg hardcode_into_libs=yes 32336aab59a7Smrg if test "$with_gnu_ld" = yes; then 32346aab59a7Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 32356aab59a7Smrg shlibpath_overrides_runpath=no 32366aab59a7Smrg else 32376aab59a7Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 32386aab59a7Smrg shlibpath_overrides_runpath=yes 32396aab59a7Smrg case $host_os in 32406aab59a7Smrg sco3.2v5*) 32416aab59a7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3242659607e0Smrg ;; 3243659607e0Smrg esac 32446aab59a7Smrg fi 32456aab59a7Smrg sys_lib_dlsearch_path_spec='/usr/lib' 32466aab59a7Smrg ;; 3247659607e0Smrg 32486aab59a7Smrguts4*) 32496aab59a7Smrg version_type=linux 32506aab59a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 32516aab59a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 32526aab59a7Smrg shlibpath_var=LD_LIBRARY_PATH 32536aab59a7Smrg ;; 3254659607e0Smrg 32556aab59a7Smrg*) 32566aab59a7Smrg dynamic_linker=no 32576aab59a7Smrg ;; 32586aab59a7Smrgesac 32596aab59a7SmrgAC_MSG_RESULT([$dynamic_linker]) 32606aab59a7Smrgtest "$dynamic_linker" = no && can_build_shared=no 3261659607e0Smrg 32626aab59a7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 32636aab59a7Smrgif test "$GCC" = yes; then 32646aab59a7Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 32656aab59a7Smrgfi 32666aab59a7Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 3267659607e0Smrg 3268659607e0Smrg 32696aab59a7Smrg# _LT_AC_TAGCONFIG 32706aab59a7Smrg# ---------------- 32716aab59a7SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 32726aab59a7Smrg[AC_ARG_WITH([tags], 32736aab59a7Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 32746aab59a7Smrg [include additional configurations @<:@automatic@:>@])], 32756aab59a7Smrg [tagnames="$withval"]) 3276659607e0Smrg 32776aab59a7Smrgif test -f "$ltmain" && test -n "$tagnames"; then 32786aab59a7Smrg if test ! -f "${ofile}"; then 32796aab59a7Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 32806aab59a7Smrg fi 3281659607e0Smrg 32826aab59a7Smrg if test -z "$LTCC"; then 32836aab59a7Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 32846aab59a7Smrg if test -z "$LTCC"; then 32856aab59a7Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 32866aab59a7Smrg else 32876aab59a7Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 32886aab59a7Smrg fi 32896aab59a7Smrg fi 32906aab59a7Smrg if test -z "$LTCFLAGS"; then 32916aab59a7Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 32926aab59a7Smrg fi 32936aab59a7Smrg 32946aab59a7Smrg # Extract list of available tagged configurations in $ofile. 32956aab59a7Smrg # Note that this assumes the entire list is on one line. 32966aab59a7Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 32976aab59a7Smrg 32986aab59a7Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 32996aab59a7Smrg for tagname in $tagnames; do 33006aab59a7Smrg IFS="$lt_save_ifs" 33016aab59a7Smrg # Check whether tagname contains only valid characters 33026aab59a7Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 33036aab59a7Smrg "") ;; 33046aab59a7Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 3305659607e0Smrg ;; 3306659607e0Smrg esac 3307659607e0Smrg 33086aab59a7Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 33096aab59a7Smrg then 33106aab59a7Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 33116aab59a7Smrg fi 33126aab59a7Smrg 33136aab59a7Smrg # Update the list of available tags. 33146aab59a7Smrg if test -n "$tagname"; then 33156aab59a7Smrg echo appending configuration tag \"$tagname\" to $ofile 33166aab59a7Smrg 33176aab59a7Smrg case $tagname in 33186aab59a7Smrg CXX) 33196aab59a7Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 33206aab59a7Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 33216aab59a7Smrg (test "X$CXX" != "Xg++"))) ; then 33226aab59a7Smrg AC_LIBTOOL_LANG_CXX_CONFIG 33236aab59a7Smrg else 33246aab59a7Smrg tagname="" 33256aab59a7Smrg fi 3326659607e0Smrg ;; 3327659607e0Smrg 33286aab59a7Smrg F77) 33296aab59a7Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 33306aab59a7Smrg AC_LIBTOOL_LANG_F77_CONFIG 33316aab59a7Smrg else 33326aab59a7Smrg tagname="" 33336aab59a7Smrg fi 3334659607e0Smrg ;; 33356aab59a7Smrg 33366aab59a7Smrg GCJ) 33376aab59a7Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 33386aab59a7Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 33396aab59a7Smrg else 33406aab59a7Smrg tagname="" 33416aab59a7Smrg fi 3342659607e0Smrg ;; 33436aab59a7Smrg 33446aab59a7Smrg RC) 33456aab59a7Smrg AC_LIBTOOL_LANG_RC_CONFIG 3346659607e0Smrg ;; 33476aab59a7Smrg 3348659607e0Smrg *) 33496aab59a7Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 3350659607e0Smrg ;; 33516aab59a7Smrg esac 3352659607e0Smrg 33536aab59a7Smrg # Append the new tag name to the list of available tags. 33546aab59a7Smrg if test -n "$tagname" ; then 33556aab59a7Smrg available_tags="$available_tags $tagname" 33566aab59a7Smrg fi 33576aab59a7Smrg fi 33586aab59a7Smrg done 33596aab59a7Smrg IFS="$lt_save_ifs" 3360659607e0Smrg 33616aab59a7Smrg # Now substitute the updated list of available tags. 33626aab59a7Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 33636aab59a7Smrg mv "${ofile}T" "$ofile" 33646aab59a7Smrg chmod +x "$ofile" 33656aab59a7Smrg else 33666aab59a7Smrg rm -f "${ofile}T" 33676aab59a7Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 33686aab59a7Smrg fi 33696aab59a7Smrgfi 33706aab59a7Smrg])# _LT_AC_TAGCONFIG 3371659607e0Smrg 3372659607e0Smrg 33736aab59a7Smrg# AC_LIBTOOL_DLOPEN 33746aab59a7Smrg# ----------------- 33756aab59a7Smrg# enable checks for dlopen support 33766aab59a7SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 33776aab59a7Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 33786aab59a7Smrg])# AC_LIBTOOL_DLOPEN 3379659607e0Smrg 3380659607e0Smrg 33816aab59a7Smrg# AC_LIBTOOL_WIN32_DLL 33826aab59a7Smrg# -------------------- 33836aab59a7Smrg# declare package support for building win32 DLLs 33846aab59a7SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 33856aab59a7Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 33866aab59a7Smrg])# AC_LIBTOOL_WIN32_DLL 3387659607e0Smrg 3388659607e0Smrg 33896aab59a7Smrg# AC_ENABLE_SHARED([DEFAULT]) 33906aab59a7Smrg# --------------------------- 33916aab59a7Smrg# implement the --enable-shared flag 33926aab59a7Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 33936aab59a7SmrgAC_DEFUN([AC_ENABLE_SHARED], 33946aab59a7Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 33956aab59a7SmrgAC_ARG_ENABLE([shared], 33966aab59a7Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 33976aab59a7Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 33986aab59a7Smrg [p=${PACKAGE-default} 33996aab59a7Smrg case $enableval in 34006aab59a7Smrg yes) enable_shared=yes ;; 34016aab59a7Smrg no) enable_shared=no ;; 34026aab59a7Smrg *) 34036aab59a7Smrg enable_shared=no 34046aab59a7Smrg # Look at the argument we got. We use all the common list separators. 34056aab59a7Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 34066aab59a7Smrg for pkg in $enableval; do 34076aab59a7Smrg IFS="$lt_save_ifs" 34086aab59a7Smrg if test "X$pkg" = "X$p"; then 34096aab59a7Smrg enable_shared=yes 34106aab59a7Smrg fi 34116aab59a7Smrg done 34126aab59a7Smrg IFS="$lt_save_ifs" 34136aab59a7Smrg ;; 34146aab59a7Smrg esac], 34156aab59a7Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 34166aab59a7Smrg])# AC_ENABLE_SHARED 3417659607e0Smrg 3418659607e0Smrg 34196aab59a7Smrg# AC_DISABLE_SHARED 34206aab59a7Smrg# ----------------- 34216aab59a7Smrg# set the default shared flag to --disable-shared 34226aab59a7SmrgAC_DEFUN([AC_DISABLE_SHARED], 34236aab59a7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 34246aab59a7SmrgAC_ENABLE_SHARED(no) 34256aab59a7Smrg])# AC_DISABLE_SHARED 3426659607e0Smrg 3427659607e0Smrg 34286aab59a7Smrg# AC_ENABLE_STATIC([DEFAULT]) 34296aab59a7Smrg# --------------------------- 34306aab59a7Smrg# implement the --enable-static flag 34316aab59a7Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 34326aab59a7SmrgAC_DEFUN([AC_ENABLE_STATIC], 34336aab59a7Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 34346aab59a7SmrgAC_ARG_ENABLE([static], 34356aab59a7Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 34366aab59a7Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 34376aab59a7Smrg [p=${PACKAGE-default} 34386aab59a7Smrg case $enableval in 34396aab59a7Smrg yes) enable_static=yes ;; 34406aab59a7Smrg no) enable_static=no ;; 34416aab59a7Smrg *) 34426aab59a7Smrg enable_static=no 34436aab59a7Smrg # Look at the argument we got. We use all the common list separators. 34446aab59a7Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 34456aab59a7Smrg for pkg in $enableval; do 34466aab59a7Smrg IFS="$lt_save_ifs" 34476aab59a7Smrg if test "X$pkg" = "X$p"; then 34486aab59a7Smrg enable_static=yes 34496aab59a7Smrg fi 34506aab59a7Smrg done 34516aab59a7Smrg IFS="$lt_save_ifs" 34526aab59a7Smrg ;; 34536aab59a7Smrg esac], 34546aab59a7Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 34556aab59a7Smrg])# AC_ENABLE_STATIC 3456659607e0Smrg 3457659607e0Smrg 34586aab59a7Smrg# AC_DISABLE_STATIC 34596aab59a7Smrg# ----------------- 34606aab59a7Smrg# set the default static flag to --disable-static 34616aab59a7SmrgAC_DEFUN([AC_DISABLE_STATIC], 34626aab59a7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 34636aab59a7SmrgAC_ENABLE_STATIC(no) 34646aab59a7Smrg])# AC_DISABLE_STATIC 3465659607e0Smrg 3466659607e0Smrg 34676aab59a7Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 34686aab59a7Smrg# --------------------------------- 34696aab59a7Smrg# implement the --enable-fast-install flag 34706aab59a7Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 34716aab59a7SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 34726aab59a7Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 34736aab59a7SmrgAC_ARG_ENABLE([fast-install], 34746aab59a7Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 34756aab59a7Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 34766aab59a7Smrg [p=${PACKAGE-default} 34776aab59a7Smrg case $enableval in 34786aab59a7Smrg yes) enable_fast_install=yes ;; 34796aab59a7Smrg no) enable_fast_install=no ;; 34806aab59a7Smrg *) 34816aab59a7Smrg enable_fast_install=no 34826aab59a7Smrg # Look at the argument we got. We use all the common list separators. 34836aab59a7Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 34846aab59a7Smrg for pkg in $enableval; do 34856aab59a7Smrg IFS="$lt_save_ifs" 34866aab59a7Smrg if test "X$pkg" = "X$p"; then 34876aab59a7Smrg enable_fast_install=yes 34886aab59a7Smrg fi 34896aab59a7Smrg done 34906aab59a7Smrg IFS="$lt_save_ifs" 34916aab59a7Smrg ;; 34926aab59a7Smrg esac], 34936aab59a7Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 34946aab59a7Smrg])# AC_ENABLE_FAST_INSTALL 3495659607e0Smrg 3496659607e0Smrg 34976aab59a7Smrg# AC_DISABLE_FAST_INSTALL 34986aab59a7Smrg# ----------------------- 34996aab59a7Smrg# set the default to --disable-fast-install 35006aab59a7SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 35016aab59a7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 35026aab59a7SmrgAC_ENABLE_FAST_INSTALL(no) 35036aab59a7Smrg])# AC_DISABLE_FAST_INSTALL 3504659607e0Smrg 3505659607e0Smrg 35066aab59a7Smrg# AC_LIBTOOL_PICMODE([MODE]) 3507659607e0Smrg# -------------------------- 35086aab59a7Smrg# implement the --with-pic flag 35096aab59a7Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 35106aab59a7SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 35116aab59a7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 35126aab59a7Smrgpic_mode=ifelse($#,1,$1,default) 35136aab59a7Smrg])# AC_LIBTOOL_PICMODE 3514659607e0Smrg 3515659607e0Smrg 35166aab59a7Smrg# AC_PROG_EGREP 35176aab59a7Smrg# ------------- 35186aab59a7Smrg# This is predefined starting with Autoconf 2.54, so this conditional 35196aab59a7Smrg# definition can be removed once we require Autoconf 2.54 or later. 35206aab59a7Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 35216aab59a7Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 35226aab59a7Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 35236aab59a7Smrg then ac_cv_prog_egrep='grep -E' 35246aab59a7Smrg else ac_cv_prog_egrep='egrep' 35256aab59a7Smrg fi]) 35266aab59a7Smrg EGREP=$ac_cv_prog_egrep 35276aab59a7Smrg AC_SUBST([EGREP]) 35286aab59a7Smrg])]) 3529659607e0Smrg 3530659607e0Smrg 35316aab59a7Smrg# AC_PATH_TOOL_PREFIX 35326aab59a7Smrg# ------------------- 35336aab59a7Smrg# find a file program which can recognise shared library 35346aab59a7SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 35356aab59a7Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 35366aab59a7SmrgAC_MSG_CHECKING([for $1]) 35376aab59a7SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 35386aab59a7Smrg[case $MAGIC_CMD in 35396aab59a7Smrg[[\\/*] | ?:[\\/]*]) 35406aab59a7Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 3541659607e0Smrg ;; 35426aab59a7Smrg*) 35436aab59a7Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 35446aab59a7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 35456aab59a7Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 35466aab59a7Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 35476aab59a7Smrgdnl not every word. This closes a longstanding sh security hole. 35486aab59a7Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 35496aab59a7Smrg for ac_dir in $ac_dummy; do 35506aab59a7Smrg IFS="$lt_save_ifs" 35516aab59a7Smrg test -z "$ac_dir" && ac_dir=. 35526aab59a7Smrg if test -f $ac_dir/$1; then 35536aab59a7Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 35546aab59a7Smrg if test -n "$file_magic_test_file"; then 35556aab59a7Smrg case $deplibs_check_method in 35566aab59a7Smrg "file_magic "*) 35576aab59a7Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 35586aab59a7Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 35596aab59a7Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 35606aab59a7Smrg $EGREP "$file_magic_regex" > /dev/null; then 35616aab59a7Smrg : 35626aab59a7Smrg else 35636aab59a7Smrg cat <<EOF 1>&2 3564659607e0Smrg 35656aab59a7Smrg*** Warning: the command libtool uses to detect shared libraries, 35666aab59a7Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 35676aab59a7Smrg*** The result is that libtool may fail to recognize shared libraries 35686aab59a7Smrg*** as such. This will affect the creation of libtool libraries that 35696aab59a7Smrg*** depend on shared libraries, but programs linked with such libtool 35706aab59a7Smrg*** libraries will work regardless of this problem. Nevertheless, you 35716aab59a7Smrg*** may want to report the problem to your system manager and/or to 35726aab59a7Smrg*** bug-libtool@gnu.org 3573659607e0Smrg 35746aab59a7SmrgEOF 35756aab59a7Smrg fi ;; 35766aab59a7Smrg esac 35776aab59a7Smrg fi 35786aab59a7Smrg break 35796aab59a7Smrg fi 35806aab59a7Smrg done 35816aab59a7Smrg IFS="$lt_save_ifs" 35826aab59a7Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 35836aab59a7Smrg ;; 35846aab59a7Smrgesac]) 35856aab59a7SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 35866aab59a7Smrgif test -n "$MAGIC_CMD"; then 35876aab59a7Smrg AC_MSG_RESULT($MAGIC_CMD) 35886aab59a7Smrgelse 35896aab59a7Smrg AC_MSG_RESULT(no) 35906aab59a7Smrgfi 35916aab59a7Smrg])# AC_PATH_TOOL_PREFIX 3592659607e0Smrg 3593659607e0Smrg 35946aab59a7Smrg# AC_PATH_MAGIC 35956aab59a7Smrg# ------------- 35966aab59a7Smrg# find a file program which can recognise a shared library 35976aab59a7SmrgAC_DEFUN([AC_PATH_MAGIC], 35986aab59a7Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 35996aab59a7Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 36006aab59a7Smrg if test -n "$ac_tool_prefix"; then 36016aab59a7Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 36026aab59a7Smrg else 36036aab59a7Smrg MAGIC_CMD=: 36046aab59a7Smrg fi 36056aab59a7Smrgfi 36066aab59a7Smrg])# AC_PATH_MAGIC 3607659607e0Smrg 3608659607e0Smrg 36096aab59a7Smrg# AC_PROG_LD 36106aab59a7Smrg# ---------- 36116aab59a7Smrg# find the pathname to the GNU or non-GNU linker 36126aab59a7SmrgAC_DEFUN([AC_PROG_LD], 36136aab59a7Smrg[AC_ARG_WITH([gnu-ld], 36146aab59a7Smrg [AC_HELP_STRING([--with-gnu-ld], 36156aab59a7Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 36166aab59a7Smrg [test "$withval" = no || with_gnu_ld=yes], 36176aab59a7Smrg [with_gnu_ld=no]) 36186aab59a7SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 36196aab59a7SmrgAC_REQUIRE([AC_PROG_CC])dnl 36206aab59a7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 36216aab59a7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 36226aab59a7Smrgac_prog=ld 36236aab59a7Smrgif test "$GCC" = yes; then 36246aab59a7Smrg # Check if gcc -print-prog-name=ld gives a path. 36256aab59a7Smrg AC_MSG_CHECKING([for ld used by $CC]) 36266aab59a7Smrg case $host in 36276aab59a7Smrg *-*-mingw*) 36286aab59a7Smrg # gcc leaves a trailing carriage return which upsets mingw 36296aab59a7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 36306aab59a7Smrg *) 36316aab59a7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 36326aab59a7Smrg esac 36336aab59a7Smrg case $ac_prog in 36346aab59a7Smrg # Accept absolute paths. 36356aab59a7Smrg [[\\/]]* | ?:[[\\/]]*) 36366aab59a7Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 36376aab59a7Smrg # Canonicalize the pathname of ld 36386aab59a7Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 36396aab59a7Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 36406aab59a7Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 36416aab59a7Smrg done 36426aab59a7Smrg test -z "$LD" && LD="$ac_prog" 36436aab59a7Smrg ;; 36446aab59a7Smrg "") 36456aab59a7Smrg # If it fails, then pretend we aren't using GCC. 36466aab59a7Smrg ac_prog=ld 36476aab59a7Smrg ;; 36486aab59a7Smrg *) 36496aab59a7Smrg # If it is relative, then search for the first ld in PATH. 36506aab59a7Smrg with_gnu_ld=unknown 36516aab59a7Smrg ;; 36526aab59a7Smrg esac 36536aab59a7Smrgelif test "$with_gnu_ld" = yes; then 36546aab59a7Smrg AC_MSG_CHECKING([for GNU ld]) 36556aab59a7Smrgelse 36566aab59a7Smrg AC_MSG_CHECKING([for non-GNU ld]) 36576aab59a7Smrgfi 36586aab59a7SmrgAC_CACHE_VAL(lt_cv_path_LD, 36596aab59a7Smrg[if test -z "$LD"; then 36606aab59a7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 36616aab59a7Smrg for ac_dir in $PATH; do 36626aab59a7Smrg IFS="$lt_save_ifs" 36636aab59a7Smrg test -z "$ac_dir" && ac_dir=. 36646aab59a7Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 36656aab59a7Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 36666aab59a7Smrg # Check to see if the program is GNU ld. I'd rather use --version, 36676aab59a7Smrg # but apparently some variants of GNU ld only accept -v. 36686aab59a7Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 36696aab59a7Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 36706aab59a7Smrg *GNU* | *'with BFD'*) 36716aab59a7Smrg test "$with_gnu_ld" != no && break 36726aab59a7Smrg ;; 36736aab59a7Smrg *) 36746aab59a7Smrg test "$with_gnu_ld" != yes && break 36756aab59a7Smrg ;; 36766aab59a7Smrg esac 36776aab59a7Smrg fi 36786aab59a7Smrg done 36796aab59a7Smrg IFS="$lt_save_ifs" 36806aab59a7Smrgelse 36816aab59a7Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 36826aab59a7Smrgfi]) 36836aab59a7SmrgLD="$lt_cv_path_LD" 36846aab59a7Smrgif test -n "$LD"; then 36856aab59a7Smrg AC_MSG_RESULT($LD) 36866aab59a7Smrgelse 36876aab59a7Smrg AC_MSG_RESULT(no) 36886aab59a7Smrgfi 36896aab59a7Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 36906aab59a7SmrgAC_PROG_LD_GNU 36916aab59a7Smrg])# AC_PROG_LD 3692659607e0Smrg 3693659607e0Smrg 36946aab59a7Smrg# AC_PROG_LD_GNU 36956aab59a7Smrg# -------------- 36966aab59a7SmrgAC_DEFUN([AC_PROG_LD_GNU], 36976aab59a7Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 36986aab59a7SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 36996aab59a7Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 37006aab59a7Smrgcase `$LD -v 2>&1 </dev/null` in 37016aab59a7Smrg*GNU* | *'with BFD'*) 37026aab59a7Smrg lt_cv_prog_gnu_ld=yes 37036aab59a7Smrg ;; 37046aab59a7Smrg*) 37056aab59a7Smrg lt_cv_prog_gnu_ld=no 37066aab59a7Smrg ;; 37076aab59a7Smrgesac]) 37086aab59a7Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 37096aab59a7Smrg])# AC_PROG_LD_GNU 3710659607e0Smrg 3711659607e0Smrg 37126aab59a7Smrg# AC_PROG_LD_RELOAD_FLAG 37136aab59a7Smrg# ---------------------- 37146aab59a7Smrg# find reload flag for linker 37156aab59a7Smrg# -- PORTME Some linkers may need a different reload flag. 37166aab59a7SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 37176aab59a7Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 37186aab59a7Smrg lt_cv_ld_reload_flag, 37196aab59a7Smrg [lt_cv_ld_reload_flag='-r']) 37206aab59a7Smrgreload_flag=$lt_cv_ld_reload_flag 37216aab59a7Smrgcase $reload_flag in 37226aab59a7Smrg"" | " "*) ;; 37236aab59a7Smrg*) reload_flag=" $reload_flag" ;; 37246aab59a7Smrgesac 37256aab59a7Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 37266aab59a7Smrgcase $host_os in 37276aab59a7Smrg darwin*) 37286aab59a7Smrg if test "$GCC" = yes; then 37296aab59a7Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 37306aab59a7Smrg else 37316aab59a7Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 37326aab59a7Smrg fi 37336aab59a7Smrg ;; 37346aab59a7Smrgesac 37356aab59a7Smrg])# AC_PROG_LD_RELOAD_FLAG 3736659607e0Smrg 3737659607e0Smrg 37386aab59a7Smrg# AC_DEPLIBS_CHECK_METHOD 37396aab59a7Smrg# ----------------------- 37406aab59a7Smrg# how to check for library dependencies 37416aab59a7Smrg# -- PORTME fill in with the dynamic library characteristics 37426aab59a7SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 37436aab59a7Smrg[AC_CACHE_CHECK([how to recognise dependent libraries], 37446aab59a7Smrglt_cv_deplibs_check_method, 37456aab59a7Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 37466aab59a7Smrglt_cv_file_magic_test_file= 37476aab59a7Smrglt_cv_deplibs_check_method='unknown' 37486aab59a7Smrg# Need to set the preceding variable on all platforms that support 37496aab59a7Smrg# interlibrary dependencies. 37506aab59a7Smrg# 'none' -- dependencies not supported. 37516aab59a7Smrg# `unknown' -- same as none, but documents that we really don't know. 37526aab59a7Smrg# 'pass_all' -- all dependencies passed with no checks. 37536aab59a7Smrg# 'test_compile' -- check by making test program. 37546aab59a7Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 37556aab59a7Smrg# which responds to the $file_magic_cmd with a given extended regex. 37566aab59a7Smrg# If you have `file' or equivalent on your system and you're not sure 37576aab59a7Smrg# whether `pass_all' will *always* work, you probably want this one. 3758659607e0Smrg 37596aab59a7Smrgcase $host_os in 37606aab59a7Smrgaix4* | aix5*) 37616aab59a7Smrg lt_cv_deplibs_check_method=pass_all 37626aab59a7Smrg ;; 3763659607e0Smrg 37646aab59a7Smrgbeos*) 37656aab59a7Smrg lt_cv_deplibs_check_method=pass_all 37666aab59a7Smrg ;; 3767659607e0Smrg 37686aab59a7Smrgbsdi[[45]]*) 37696aab59a7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 37706aab59a7Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 37716aab59a7Smrg lt_cv_file_magic_test_file=/shlib/libc.so 37726aab59a7Smrg ;; 3773659607e0Smrg 37746aab59a7Smrgcygwin*) 37756aab59a7Smrg # func_win32_libid is a shell function defined in ltmain.sh 37766aab59a7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 37776aab59a7Smrg lt_cv_file_magic_cmd='func_win32_libid' 37786aab59a7Smrg ;; 3779659607e0Smrg 37806aab59a7Smrgmingw* | pw32*) 37816aab59a7Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 37826aab59a7Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump'. 37836aab59a7Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 37846aab59a7Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 37856aab59a7Smrg ;; 3786659607e0Smrg 37876aab59a7Smrgdarwin* | rhapsody*) 37886aab59a7Smrg lt_cv_deplibs_check_method=pass_all 37896aab59a7Smrg ;; 3790659607e0Smrg 37916aab59a7Smrgfreebsd* | kfreebsd*-gnu | dragonfly*) 37926aab59a7Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 37936aab59a7Smrg case $host_cpu in 37946aab59a7Smrg i*86 ) 37956aab59a7Smrg # Not sure whether the presence of OpenBSD here was a mistake. 37966aab59a7Smrg # Let's accept both of them until this is cleared up. 37976aab59a7Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 37986aab59a7Smrg lt_cv_file_magic_cmd=/usr/bin/file 37996aab59a7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 38006aab59a7Smrg ;; 38016aab59a7Smrg esac 38026aab59a7Smrg else 38036aab59a7Smrg lt_cv_deplibs_check_method=pass_all 38046aab59a7Smrg fi 38056aab59a7Smrg ;; 3806659607e0Smrg 38076aab59a7Smrggnu*) 38086aab59a7Smrg lt_cv_deplibs_check_method=pass_all 38096aab59a7Smrg ;; 3810659607e0Smrg 38116aab59a7Smrghpux10.20* | hpux11*) 38126aab59a7Smrg lt_cv_file_magic_cmd=/usr/bin/file 38136aab59a7Smrg case $host_cpu in 38146aab59a7Smrg ia64*) 38156aab59a7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 38166aab59a7Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 38176aab59a7Smrg ;; 38186aab59a7Smrg hppa*64*) 38196aab59a7Smrg [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]'] 38206aab59a7Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 38216aab59a7Smrg ;; 38226aab59a7Smrg *) 38236aab59a7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 38246aab59a7Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3825659607e0Smrg ;; 3826659607e0Smrg esac 38276aab59a7Smrg ;; 3828659607e0Smrg 38296aab59a7Smrginterix3*) 38306aab59a7Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 38316aab59a7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 38326aab59a7Smrg ;; 3833659607e0Smrg 38346aab59a7Smrgirix5* | irix6* | nonstopux*) 38356aab59a7Smrg case $LD in 38366aab59a7Smrg *-32|*"-32 ") libmagic=32-bit;; 38376aab59a7Smrg *-n32|*"-n32 ") libmagic=N32;; 38386aab59a7Smrg *-64|*"-64 ") libmagic=64-bit;; 38396aab59a7Smrg *) libmagic=never-match;; 38406aab59a7Smrg esac 38416aab59a7Smrg lt_cv_deplibs_check_method=pass_all 38426aab59a7Smrg ;; 3843659607e0Smrg 38446aab59a7Smrg# This must be Linux ELF. 38456aab59a7Smrglinux*) 38466aab59a7Smrg lt_cv_deplibs_check_method=pass_all 38476aab59a7Smrg ;; 3848659607e0Smrg 38496aab59a7Smrgnetbsd*) 38506aab59a7Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 38516aab59a7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 38526aab59a7Smrg else 38536aab59a7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 38546aab59a7Smrg fi 38556aab59a7Smrg ;; 3856659607e0Smrg 38576aab59a7Smrgnewos6*) 38586aab59a7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 38596aab59a7Smrg lt_cv_file_magic_cmd=/usr/bin/file 38606aab59a7Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 38616aab59a7Smrg ;; 3862659607e0Smrg 38636aab59a7Smrgnto-qnx*) 38646aab59a7Smrg lt_cv_deplibs_check_method=unknown 38656aab59a7Smrg ;; 3866659607e0Smrg 38676aab59a7Smrgopenbsd*) 38686aab59a7Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 38696aab59a7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 38706aab59a7Smrg else 38716aab59a7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 38726aab59a7Smrg fi 38736aab59a7Smrg ;; 3874659607e0Smrg 38756aab59a7Smrgosf3* | osf4* | osf5*) 38766aab59a7Smrg lt_cv_deplibs_check_method=pass_all 38776aab59a7Smrg ;; 3878659607e0Smrg 38796aab59a7Smrgsolaris*) 38806aab59a7Smrg lt_cv_deplibs_check_method=pass_all 38816aab59a7Smrg ;; 3882659607e0Smrg 38836aab59a7Smrgsysv4 | sysv4.3*) 38846aab59a7Smrg case $host_vendor in 38856aab59a7Smrg motorola) 38866aab59a7Smrg 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]]' 38876aab59a7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 38886aab59a7Smrg ;; 38896aab59a7Smrg ncr) 38906aab59a7Smrg lt_cv_deplibs_check_method=pass_all 38916aab59a7Smrg ;; 38926aab59a7Smrg sequent) 38936aab59a7Smrg lt_cv_file_magic_cmd='/bin/file' 38946aab59a7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 38956aab59a7Smrg ;; 38966aab59a7Smrg sni) 38976aab59a7Smrg lt_cv_file_magic_cmd='/bin/file' 38986aab59a7Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 38996aab59a7Smrg lt_cv_file_magic_test_file=/lib/libc.so 39006aab59a7Smrg ;; 39016aab59a7Smrg siemens) 39026aab59a7Smrg lt_cv_deplibs_check_method=pass_all 39036aab59a7Smrg ;; 39046aab59a7Smrg pc) 39056aab59a7Smrg lt_cv_deplibs_check_method=pass_all 39066aab59a7Smrg ;; 39076aab59a7Smrg esac 39086aab59a7Smrg ;; 3909659607e0Smrg 39106aab59a7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 39116aab59a7Smrg lt_cv_deplibs_check_method=pass_all 39126aab59a7Smrg ;; 39136aab59a7Smrgesac 39146aab59a7Smrg]) 39156aab59a7Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 39166aab59a7Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 39176aab59a7Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 39186aab59a7Smrg])# AC_DEPLIBS_CHECK_METHOD 3919659607e0Smrg 3920659607e0Smrg 39216aab59a7Smrg# AC_PROG_NM 39226aab59a7Smrg# ---------- 39236aab59a7Smrg# find the pathname to a BSD-compatible name lister 39246aab59a7SmrgAC_DEFUN([AC_PROG_NM], 39256aab59a7Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 39266aab59a7Smrg[if test -n "$NM"; then 39276aab59a7Smrg # Let the user override the test. 39286aab59a7Smrg lt_cv_path_NM="$NM" 39296aab59a7Smrgelse 39306aab59a7Smrg lt_nm_to_check="${ac_tool_prefix}nm" 39316aab59a7Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 39326aab59a7Smrg lt_nm_to_check="$lt_nm_to_check nm" 39336aab59a7Smrg fi 39346aab59a7Smrg for lt_tmp_nm in $lt_nm_to_check; do 39356aab59a7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 39366aab59a7Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 39376aab59a7Smrg IFS="$lt_save_ifs" 39386aab59a7Smrg test -z "$ac_dir" && ac_dir=. 39396aab59a7Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 39406aab59a7Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 39416aab59a7Smrg # Check to see if the nm accepts a BSD-compat flag. 39426aab59a7Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 39436aab59a7Smrg # nm: unknown option "B" ignored 39446aab59a7Smrg # Tru64's nm complains that /dev/null is an invalid object file 39456aab59a7Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 39466aab59a7Smrg */dev/null* | *'Invalid file or object type'*) 39476aab59a7Smrg lt_cv_path_NM="$tmp_nm -B" 39486aab59a7Smrg break 39496aab59a7Smrg ;; 39506aab59a7Smrg *) 39516aab59a7Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 39526aab59a7Smrg */dev/null*) 39536aab59a7Smrg lt_cv_path_NM="$tmp_nm -p" 39546aab59a7Smrg break 39556aab59a7Smrg ;; 39566aab59a7Smrg *) 39576aab59a7Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 39586aab59a7Smrg continue # so that we can try to find one that supports BSD flags 39596aab59a7Smrg ;; 39606aab59a7Smrg esac 39616aab59a7Smrg ;; 39626aab59a7Smrg esac 39636aab59a7Smrg fi 39646aab59a7Smrg done 39656aab59a7Smrg IFS="$lt_save_ifs" 39666aab59a7Smrg done 39676aab59a7Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 39686aab59a7Smrgfi]) 39696aab59a7SmrgNM="$lt_cv_path_NM" 39706aab59a7Smrg])# AC_PROG_NM 3971659607e0Smrg 3972659607e0Smrg 39736aab59a7Smrg# AC_CHECK_LIBM 39746aab59a7Smrg# ------------- 39756aab59a7Smrg# check for math library 39766aab59a7SmrgAC_DEFUN([AC_CHECK_LIBM], 39776aab59a7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 39786aab59a7SmrgLIBM= 39796aab59a7Smrgcase $host in 39806aab59a7Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 39816aab59a7Smrg # These system don't have libm, or don't need it 39826aab59a7Smrg ;; 39836aab59a7Smrg*-ncr-sysv4.3*) 39846aab59a7Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 39856aab59a7Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 39866aab59a7Smrg ;; 39876aab59a7Smrg*) 39886aab59a7Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 39896aab59a7Smrg ;; 39906aab59a7Smrgesac 39916aab59a7Smrg])# AC_CHECK_LIBM 3992659607e0Smrg 3993659607e0Smrg 39946aab59a7Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 39956aab59a7Smrg# ----------------------------------- 39966aab59a7Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 39976aab59a7Smrg# LTDLINCL to the include flags for the libltdl header and adds 39986aab59a7Smrg# --enable-ltdl-convenience to the configure arguments. Note that 39996aab59a7Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 40006aab59a7Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 40016aab59a7Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 40026aab59a7Smrg# (note the single quotes!). If your package is not flat and you're not 40036aab59a7Smrg# using automake, define top_builddir and top_srcdir appropriately in 40046aab59a7Smrg# the Makefiles. 40056aab59a7SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 40066aab59a7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 40076aab59a7Smrg case $enable_ltdl_convenience in 40086aab59a7Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 40096aab59a7Smrg "") enable_ltdl_convenience=yes 40106aab59a7Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 40116aab59a7Smrg esac 40126aab59a7Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 40136aab59a7Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 40146aab59a7Smrg # For backwards non-gettext consistent compatibility... 40156aab59a7Smrg INCLTDL="$LTDLINCL" 40166aab59a7Smrg])# AC_LIBLTDL_CONVENIENCE 4017659607e0Smrg 4018659607e0Smrg 40196aab59a7Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 40206aab59a7Smrg# ----------------------------------- 40216aab59a7Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 40226aab59a7Smrg# LTDLINCL to the include flags for the libltdl header and adds 40236aab59a7Smrg# --enable-ltdl-install to the configure arguments. Note that 40246aab59a7Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 40256aab59a7Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 40266aab59a7Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 40276aab59a7Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 40286aab59a7Smrg# flat and you're not using automake, define top_builddir and top_srcdir 40296aab59a7Smrg# appropriately in the Makefiles. 40306aab59a7Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 40316aab59a7SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 40326aab59a7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 40336aab59a7Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 40346aab59a7Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 40356aab59a7Smrg [if test x"$enable_ltdl_install" = xno; then 40366aab59a7Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 40376aab59a7Smrg else 40386aab59a7Smrg enable_ltdl_install=yes 40396aab59a7Smrg fi 40406aab59a7Smrg ]) 40416aab59a7Smrg if test x"$enable_ltdl_install" = x"yes"; then 40426aab59a7Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 40436aab59a7Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 40446aab59a7Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 40456aab59a7Smrg else 40466aab59a7Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 40476aab59a7Smrg LIBLTDL="-lltdl" 40486aab59a7Smrg LTDLINCL= 40496aab59a7Smrg fi 40506aab59a7Smrg # For backwards non-gettext consistent compatibility... 40516aab59a7Smrg INCLTDL="$LTDLINCL" 40526aab59a7Smrg])# AC_LIBLTDL_INSTALLABLE 4053659607e0Smrg 4054659607e0Smrg 40556aab59a7Smrg# AC_LIBTOOL_CXX 40566aab59a7Smrg# -------------- 40576aab59a7Smrg# enable support for C++ libraries 40586aab59a7SmrgAC_DEFUN([AC_LIBTOOL_CXX], 40596aab59a7Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 40606aab59a7Smrg])# AC_LIBTOOL_CXX 4061659607e0Smrg 4062659607e0Smrg 40636aab59a7Smrg# _LT_AC_LANG_CXX 40646aab59a7Smrg# --------------- 40656aab59a7SmrgAC_DEFUN([_LT_AC_LANG_CXX], 40666aab59a7Smrg[AC_REQUIRE([AC_PROG_CXX]) 40676aab59a7SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 40686aab59a7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 40696aab59a7Smrg])# _LT_AC_LANG_CXX 4070659607e0Smrg 40716aab59a7Smrg# _LT_AC_PROG_CXXCPP 40726aab59a7Smrg# ------------------ 40736aab59a7SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 40746aab59a7Smrg[ 40756aab59a7SmrgAC_REQUIRE([AC_PROG_CXX]) 40766aab59a7Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 40776aab59a7Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 40786aab59a7Smrg (test "X$CXX" != "Xg++"))) ; then 40796aab59a7Smrg AC_PROG_CXXCPP 40806aab59a7Smrgfi 40816aab59a7Smrg])# _LT_AC_PROG_CXXCPP 4082659607e0Smrg 40836aab59a7Smrg# AC_LIBTOOL_F77 40846aab59a7Smrg# -------------- 40856aab59a7Smrg# enable support for Fortran 77 libraries 40866aab59a7SmrgAC_DEFUN([AC_LIBTOOL_F77], 40876aab59a7Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 40886aab59a7Smrg])# AC_LIBTOOL_F77 4089659607e0Smrg 4090659607e0Smrg 40916aab59a7Smrg# _LT_AC_LANG_F77 40926aab59a7Smrg# --------------- 40936aab59a7SmrgAC_DEFUN([_LT_AC_LANG_F77], 40946aab59a7Smrg[AC_REQUIRE([AC_PROG_F77]) 40956aab59a7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 40966aab59a7Smrg])# _LT_AC_LANG_F77 4097659607e0Smrg 4098659607e0Smrg 40996aab59a7Smrg# AC_LIBTOOL_GCJ 41006aab59a7Smrg# -------------- 41016aab59a7Smrg# enable support for GCJ libraries 41026aab59a7SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 41036aab59a7Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 41046aab59a7Smrg])# AC_LIBTOOL_GCJ 4105659607e0Smrg 4106659607e0Smrg 41076aab59a7Smrg# _LT_AC_LANG_GCJ 41086aab59a7Smrg# --------------- 41096aab59a7SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 41106aab59a7Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 41116aab59a7Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 41126aab59a7Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 41136aab59a7Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 41146aab59a7Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 41156aab59a7Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 41166aab59a7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 41176aab59a7Smrg])# _LT_AC_LANG_GCJ 4118659607e0Smrg 4119659607e0Smrg 41206aab59a7Smrg# AC_LIBTOOL_RC 41216aab59a7Smrg# ------------- 41226aab59a7Smrg# enable support for Windows resource files 41236aab59a7SmrgAC_DEFUN([AC_LIBTOOL_RC], 41246aab59a7Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 41256aab59a7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 41266aab59a7Smrg])# AC_LIBTOOL_RC 4127659607e0Smrg 4128659607e0Smrg 41296aab59a7Smrg# AC_LIBTOOL_LANG_C_CONFIG 41306aab59a7Smrg# ------------------------ 41316aab59a7Smrg# Ensure that the configuration vars for the C compiler are 41326aab59a7Smrg# suitably defined. Those variables are subsequently used by 41336aab59a7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 41346aab59a7SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 41356aab59a7SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 41366aab59a7Smrg[lt_save_CC="$CC" 41376aab59a7SmrgAC_LANG_PUSH(C) 4138659607e0Smrg 41396aab59a7Smrg# Source file extension for C test sources. 41406aab59a7Smrgac_ext=c 4141659607e0Smrg 41426aab59a7Smrg# Object file extension for compiled C test sources. 41436aab59a7Smrgobjext=o 41446aab59a7Smrg_LT_AC_TAGVAR(objext, $1)=$objext 4145659607e0Smrg 41466aab59a7Smrg# Code to be used in simple compile tests 41476aab59a7Smrglt_simple_compile_test_code="int some_variable = 0;\n" 4148659607e0Smrg 41496aab59a7Smrg# Code to be used in simple link tests 41506aab59a7Smrglt_simple_link_test_code='int main(){return(0);}\n' 4151659607e0Smrg 41526aab59a7Smrg_LT_AC_SYS_COMPILER 4153659607e0Smrg 41546aab59a7Smrg# save warnings/boilerplate of simple test code 41556aab59a7Smrg_LT_COMPILER_BOILERPLATE 41566aab59a7Smrg_LT_LINKER_BOILERPLATE 4157659607e0Smrg 41586aab59a7SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 41596aab59a7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 41606aab59a7SmrgAC_LIBTOOL_PROG_CC_C_O($1) 41616aab59a7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 41626aab59a7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 41636aab59a7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 41646aab59a7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 41656aab59a7SmrgAC_LIBTOOL_SYS_LIB_STRIP 41666aab59a7SmrgAC_LIBTOOL_DLOPEN_SELF 4167659607e0Smrg 41686aab59a7Smrg# Report which library types will actually be built 41696aab59a7SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 41706aab59a7SmrgAC_MSG_RESULT([$can_build_shared]) 4171659607e0Smrg 41726aab59a7SmrgAC_MSG_CHECKING([whether to build shared libraries]) 41736aab59a7Smrgtest "$can_build_shared" = "no" && enable_shared=no 4174659607e0Smrg 41756aab59a7Smrg# On AIX, shared libraries and static libraries use the same namespace, and 41766aab59a7Smrg# are all built from PIC. 41776aab59a7Smrgcase $host_os in 41786aab59a7Smrgaix3*) 41796aab59a7Smrg test "$enable_shared" = yes && enable_static=no 41806aab59a7Smrg if test -n "$RANLIB"; then 41816aab59a7Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 41826aab59a7Smrg postinstall_cmds='$RANLIB $lib' 41836aab59a7Smrg fi 41846aab59a7Smrg ;; 4185659607e0Smrg 41866aab59a7Smrgaix4* | aix5*) 41876aab59a7Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 41886aab59a7Smrg test "$enable_shared" = yes && enable_static=no 41896aab59a7Smrg fi 41906aab59a7Smrg ;; 41916aab59a7Smrgesac 41926aab59a7SmrgAC_MSG_RESULT([$enable_shared]) 4193659607e0Smrg 41946aab59a7SmrgAC_MSG_CHECKING([whether to build static libraries]) 41956aab59a7Smrg# Make sure either enable_shared or enable_static is yes. 41966aab59a7Smrgtest "$enable_shared" = yes || enable_static=yes 41976aab59a7SmrgAC_MSG_RESULT([$enable_static]) 4198659607e0Smrg 41996aab59a7SmrgAC_LIBTOOL_CONFIG($1) 4200659607e0Smrg 42016aab59a7SmrgAC_LANG_POP 42026aab59a7SmrgCC="$lt_save_CC" 42036aab59a7Smrg])# AC_LIBTOOL_LANG_C_CONFIG 4204659607e0Smrg 4205659607e0Smrg 42066aab59a7Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 42076aab59a7Smrg# -------------------------- 42086aab59a7Smrg# Ensure that the configuration vars for the C compiler are 42096aab59a7Smrg# suitably defined. Those variables are subsequently used by 42106aab59a7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 42116aab59a7SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 42126aab59a7SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 42136aab59a7Smrg[AC_LANG_PUSH(C++) 42146aab59a7SmrgAC_REQUIRE([AC_PROG_CXX]) 42156aab59a7SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 4216659607e0Smrg 42176aab59a7Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 42186aab59a7Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 42196aab59a7Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 42206aab59a7Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 42216aab59a7Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 42226aab59a7Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 42236aab59a7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 42246aab59a7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 42256aab59a7Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 42266aab59a7Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 42276aab59a7Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 42286aab59a7Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 42296aab59a7Smrg_LT_AC_TAGVAR(module_cmds, $1)= 42306aab59a7Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 42316aab59a7Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 42326aab59a7Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 42336aab59a7Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 42346aab59a7Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 42356aab59a7Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4236659607e0Smrg 42376aab59a7Smrg# Dependencies to place before and after the object being linked: 42386aab59a7Smrg_LT_AC_TAGVAR(predep_objects, $1)= 42396aab59a7Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 42406aab59a7Smrg_LT_AC_TAGVAR(predeps, $1)= 42416aab59a7Smrg_LT_AC_TAGVAR(postdeps, $1)= 42426aab59a7Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 4243659607e0Smrg 42446aab59a7Smrg# Source file extension for C++ test sources. 42456aab59a7Smrgac_ext=cpp 4246659607e0Smrg 42476aab59a7Smrg# Object file extension for compiled C++ test sources. 42486aab59a7Smrgobjext=o 42496aab59a7Smrg_LT_AC_TAGVAR(objext, $1)=$objext 4250659607e0Smrg 42516aab59a7Smrg# Code to be used in simple compile tests 42526aab59a7Smrglt_simple_compile_test_code="int some_variable = 0;\n" 4253659607e0Smrg 42546aab59a7Smrg# Code to be used in simple link tests 42556aab59a7Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' 4256659607e0Smrg 42576aab59a7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 42586aab59a7Smrg_LT_AC_SYS_COMPILER 4259659607e0Smrg 42606aab59a7Smrg# save warnings/boilerplate of simple test code 42616aab59a7Smrg_LT_COMPILER_BOILERPLATE 42626aab59a7Smrg_LT_LINKER_BOILERPLATE 4263659607e0Smrg 42646aab59a7Smrg# Allow CC to be a program name with arguments. 42656aab59a7Smrglt_save_CC=$CC 42666aab59a7Smrglt_save_LD=$LD 42676aab59a7Smrglt_save_GCC=$GCC 42686aab59a7SmrgGCC=$GXX 42696aab59a7Smrglt_save_with_gnu_ld=$with_gnu_ld 42706aab59a7Smrglt_save_path_LD=$lt_cv_path_LD 42716aab59a7Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 42726aab59a7Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 42736aab59a7Smrgelse 42746aab59a7Smrg $as_unset lt_cv_prog_gnu_ld 42756aab59a7Smrgfi 42766aab59a7Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 42776aab59a7Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 42786aab59a7Smrgelse 42796aab59a7Smrg $as_unset lt_cv_path_LD 42806aab59a7Smrgfi 42816aab59a7Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 42826aab59a7SmrgCC=${CXX-"c++"} 42836aab59a7Smrgcompiler=$CC 42846aab59a7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 42856aab59a7Smrg_LT_CC_BASENAME([$compiler]) 4286659607e0Smrg 42876aab59a7Smrg# We don't want -fno-exception wen compiling C++ code, so set the 42886aab59a7Smrg# no_builtin_flag separately 42896aab59a7Smrgif test "$GXX" = yes; then 42906aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 42916aab59a7Smrgelse 42926aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 42936aab59a7Smrgfi 4294659607e0Smrg 42956aab59a7Smrgif test "$GXX" = yes; then 42966aab59a7Smrg # Set up default GNU C++ configuration 4297659607e0Smrg 42986aab59a7Smrg AC_PROG_LD 4299659607e0Smrg 43006aab59a7Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 43016aab59a7Smrg # archiving commands below assume that GNU ld is being used. 43026aab59a7Smrg if test "$with_gnu_ld" = yes; then 43036aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 43046aab59a7Smrg _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' 4305659607e0Smrg 43066aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 43076aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4308659607e0Smrg 43096aab59a7Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 43106aab59a7Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 43116aab59a7Smrg # investigate it a little bit more. (MM) 43126aab59a7Smrg wlarc='${wl}' 4313659607e0Smrg 43146aab59a7Smrg # ancient GNU ld didn't support --whole-archive et. al. 43156aab59a7Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 43166aab59a7Smrg grep 'no-whole-archive' > /dev/null; then 43176aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 43186aab59a7Smrg else 43196aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 43206aab59a7Smrg fi 43216aab59a7Smrg else 43226aab59a7Smrg with_gnu_ld=no 43236aab59a7Smrg wlarc= 4324659607e0Smrg 43256aab59a7Smrg # A generic and very simple default shared library creation 43266aab59a7Smrg # command for GNU C++ for the case where it uses the native 43276aab59a7Smrg # linker, instead of GNU ld. If possible, this setting should 43286aab59a7Smrg # overridden to take advantage of the native linker features on 43296aab59a7Smrg # the platform it is being used on. 43306aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 43316aab59a7Smrg fi 4332659607e0Smrg 43336aab59a7Smrg # Commands to make compiler produce verbose output that lists 43346aab59a7Smrg # what "hidden" libraries, object files and flags are used when 43356aab59a7Smrg # linking a shared library. 43366aab59a7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 4337659607e0Smrg 43386aab59a7Smrgelse 43396aab59a7Smrg GXX=no 43406aab59a7Smrg with_gnu_ld=no 43416aab59a7Smrg wlarc= 43426aab59a7Smrgfi 4343659607e0Smrg 43446aab59a7Smrg# PORTME: fill in a description of your system's C++ link characteristics 43456aab59a7SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 43466aab59a7Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 43476aab59a7Smrgcase $host_os in 43486aab59a7Smrg aix3*) 43496aab59a7Smrg # FIXME: insert proper C++ library support 43506aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 43516aab59a7Smrg ;; 43526aab59a7Smrg aix4* | aix5*) 43536aab59a7Smrg if test "$host_cpu" = ia64; then 43546aab59a7Smrg # On IA64, the linker does run time linking by default, so we don't 43556aab59a7Smrg # have to do anything special. 43566aab59a7Smrg aix_use_runtimelinking=no 43576aab59a7Smrg exp_sym_flag='-Bexport' 43586aab59a7Smrg no_entry_flag="" 43596aab59a7Smrg else 43606aab59a7Smrg aix_use_runtimelinking=no 4361659607e0Smrg 43626aab59a7Smrg # Test if we are trying to use run time linking or normal 43636aab59a7Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 43646aab59a7Smrg # need to do runtime linking. 43656aab59a7Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 43666aab59a7Smrg for ld_flag in $LDFLAGS; do 43676aab59a7Smrg case $ld_flag in 43686aab59a7Smrg *-brtl*) 43696aab59a7Smrg aix_use_runtimelinking=yes 43706aab59a7Smrg break 43716aab59a7Smrg ;; 43726aab59a7Smrg esac 43736aab59a7Smrg done 43746aab59a7Smrg ;; 43756aab59a7Smrg esac 4376659607e0Smrg 43776aab59a7Smrg exp_sym_flag='-bexport' 43786aab59a7Smrg no_entry_flag='-bnoentry' 43796aab59a7Smrg fi 4380659607e0Smrg 43816aab59a7Smrg # When large executables or shared objects are built, AIX ld can 43826aab59a7Smrg # have problems creating the table of contents. If linking a library 43836aab59a7Smrg # or program results in "error TOC overflow" add -mminimal-toc to 43846aab59a7Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 43856aab59a7Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4386659607e0Smrg 43876aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 43886aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 43896aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 43906aab59a7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4391659607e0Smrg 43926aab59a7Smrg if test "$GXX" = yes; then 43936aab59a7Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 43946aab59a7Smrg # We only want to do this on AIX 4.2 and lower, the check 43956aab59a7Smrg # below for broken collect2 doesn't work under 4.3+ 43966aab59a7Smrg collect2name=`${CC} -print-prog-name=collect2` 43976aab59a7Smrg if test -f "$collect2name" && \ 43986aab59a7Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 43996aab59a7Smrg then 44006aab59a7Smrg # We have reworked collect2 44016aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 44026aab59a7Smrg else 44036aab59a7Smrg # We have old collect2 44046aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 44056aab59a7Smrg # It fails to find uninstalled libraries when the uninstalled 44066aab59a7Smrg # path is not listed in the libpath. Setting hardcode_minus_L 44076aab59a7Smrg # to unsupported forces relinking 44086aab59a7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 44096aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 44106aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 44116aab59a7Smrg fi 44126aab59a7Smrg ;; 44136aab59a7Smrg esac 44146aab59a7Smrg shared_flag='-shared' 44156aab59a7Smrg if test "$aix_use_runtimelinking" = yes; then 44166aab59a7Smrg shared_flag="$shared_flag "'${wl}-G' 44176aab59a7Smrg fi 44186aab59a7Smrg else 44196aab59a7Smrg # not using gcc 44206aab59a7Smrg if test "$host_cpu" = ia64; then 44216aab59a7Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 44226aab59a7Smrg # chokes on -Wl,-G. The following line is correct: 44236aab59a7Smrg shared_flag='-G' 44246aab59a7Smrg else 44256aab59a7Smrg if test "$aix_use_runtimelinking" = yes; then 44266aab59a7Smrg shared_flag='${wl}-G' 44276aab59a7Smrg else 44286aab59a7Smrg shared_flag='${wl}-bM:SRE' 44296aab59a7Smrg fi 44306aab59a7Smrg fi 44316aab59a7Smrg fi 4432659607e0Smrg 44336aab59a7Smrg # It seems that -bexpall does not export symbols beginning with 44346aab59a7Smrg # underscore (_), so it is better to generate a list of symbols to export. 44356aab59a7Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 44366aab59a7Smrg if test "$aix_use_runtimelinking" = yes; then 44376aab59a7Smrg # Warning - without using the other runtime loading flags (-brtl), 44386aab59a7Smrg # -berok will link without error, but may produce a broken library. 44396aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 44406aab59a7Smrg # Determine the default libpath from the value encoded in an empty executable. 44416aab59a7Smrg _LT_AC_SYS_LIBPATH_AIX 44426aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4443659607e0Smrg 44446aab59a7Smrg _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" 44456aab59a7Smrg else 44466aab59a7Smrg if test "$host_cpu" = ia64; then 44476aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 44486aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 44496aab59a7Smrg _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" 44506aab59a7Smrg else 44516aab59a7Smrg # Determine the default libpath from the value encoded in an empty executable. 44526aab59a7Smrg _LT_AC_SYS_LIBPATH_AIX 44536aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 44546aab59a7Smrg # Warning - without using the other run time loading flags, 44556aab59a7Smrg # -berok will link without error, but may produce a broken library. 44566aab59a7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 44576aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 44586aab59a7Smrg # Exported symbols can be pulled into shared objects from archives 44596aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 44606aab59a7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 44616aab59a7Smrg # This is similar to how AIX traditionally builds its shared libraries. 44626aab59a7Smrg _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' 44636aab59a7Smrg fi 44646aab59a7Smrg fi 44656aab59a7Smrg ;; 4466659607e0Smrg 44676aab59a7Smrg beos*) 44686aab59a7Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 44696aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 44706aab59a7Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 44716aab59a7Smrg # support --undefined. This deserves some investigation. FIXME 44726aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 44736aab59a7Smrg else 44746aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 44756aab59a7Smrg fi 44766aab59a7Smrg ;; 4477659607e0Smrg 44786aab59a7Smrg chorus*) 44796aab59a7Smrg case $cc_basename in 44806aab59a7Smrg *) 44816aab59a7Smrg # FIXME: insert proper C++ library support 44826aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 44836aab59a7Smrg ;; 44846aab59a7Smrg esac 44856aab59a7Smrg ;; 4486659607e0Smrg 44876aab59a7Smrg cygwin* | mingw* | pw32*) 44886aab59a7Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 44896aab59a7Smrg # as there is no search path for DLLs. 44906aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 44916aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 44926aab59a7Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 44936aab59a7Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4494659607e0Smrg 44956aab59a7Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 44966aab59a7Smrg _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' 44976aab59a7Smrg # If the export-symbols file already is a .def file (1st line 44986aab59a7Smrg # is EXPORTS), use it as is; otherwise, prepend... 44996aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 45006aab59a7Smrg cp $export_symbols $output_objdir/$soname.def; 45016aab59a7Smrg else 45026aab59a7Smrg echo EXPORTS > $output_objdir/$soname.def; 45036aab59a7Smrg cat $export_symbols >> $output_objdir/$soname.def; 45046aab59a7Smrg fi~ 45056aab59a7Smrg $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' 45066aab59a7Smrg else 45076aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 45086aab59a7Smrg fi 45096aab59a7Smrg ;; 45106aab59a7Smrg darwin* | rhapsody*) 45116aab59a7Smrg case $host_os in 45126aab59a7Smrg rhapsody* | darwin1.[[012]]) 45136aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 45146aab59a7Smrg ;; 45156aab59a7Smrg *) # Darwin 1.3 on 45166aab59a7Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 45176aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 45186aab59a7Smrg else 45196aab59a7Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 45206aab59a7Smrg 10.[[012]]) 45216aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 45226aab59a7Smrg ;; 45236aab59a7Smrg 10.*) 45246aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 45256aab59a7Smrg ;; 45266aab59a7Smrg esac 45276aab59a7Smrg fi 45286aab59a7Smrg ;; 45296aab59a7Smrg esac 45306aab59a7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 45316aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 45326aab59a7Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 45336aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 45346aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 45356aab59a7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4536659607e0Smrg 45376aab59a7Smrg if test "$GXX" = yes ; then 45386aab59a7Smrg lt_int_apple_cc_single_mod=no 45396aab59a7Smrg output_verbose_link_cmd='echo' 45406aab59a7Smrg if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 45416aab59a7Smrg lt_int_apple_cc_single_mod=yes 45426aab59a7Smrg fi 45436aab59a7Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 45446aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 45456aab59a7Smrg else 45466aab59a7Smrg _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' 45476aab59a7Smrg fi 45486aab59a7Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 45496aab59a7Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 45506aab59a7Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 45516aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 45526aab59a7Smrg else 45536aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 45546aab59a7Smrg fi 45556aab59a7Smrg _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}' 45566aab59a7Smrg else 45576aab59a7Smrg case $cc_basename in 45586aab59a7Smrg xlc*) 45596aab59a7Smrg output_verbose_link_cmd='echo' 45606aab59a7Smrg _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` $verstring' 45616aab59a7Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 45626aab59a7Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 45636aab59a7Smrg _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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 45646aab59a7Smrg _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}' 45656aab59a7Smrg ;; 45666aab59a7Smrg *) 45676aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 45686aab59a7Smrg ;; 45696aab59a7Smrg esac 45706aab59a7Smrg fi 45716aab59a7Smrg ;; 4572659607e0Smrg 45736aab59a7Smrg dgux*) 45746aab59a7Smrg case $cc_basename in 45756aab59a7Smrg ec++*) 45766aab59a7Smrg # FIXME: insert proper C++ library support 45776aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 45786aab59a7Smrg ;; 45796aab59a7Smrg ghcx*) 45806aab59a7Smrg # Green Hills C++ Compiler 45816aab59a7Smrg # FIXME: insert proper C++ library support 45826aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 45836aab59a7Smrg ;; 45846aab59a7Smrg *) 45856aab59a7Smrg # FIXME: insert proper C++ library support 45866aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 45876aab59a7Smrg ;; 45886aab59a7Smrg esac 45896aab59a7Smrg ;; 45906aab59a7Smrg freebsd[[12]]*) 45916aab59a7Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 45926aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 45936aab59a7Smrg ;; 45946aab59a7Smrg freebsd-elf*) 45956aab59a7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 45966aab59a7Smrg ;; 45976aab59a7Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 45986aab59a7Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 45996aab59a7Smrg # conventions 46006aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 46016aab59a7Smrg ;; 46026aab59a7Smrg gnu*) 46036aab59a7Smrg ;; 46046aab59a7Smrg hpux9*) 46056aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 46066aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 46076aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 46086aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 46096aab59a7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 46106aab59a7Smrg # but as the default 46116aab59a7Smrg # location of the library. 4612659607e0Smrg 46136aab59a7Smrg case $cc_basename in 46146aab59a7Smrg CC*) 46156aab59a7Smrg # FIXME: insert proper C++ library support 46166aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 46176aab59a7Smrg ;; 46186aab59a7Smrg aCC*) 46196aab59a7Smrg _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' 46206aab59a7Smrg # Commands to make compiler produce verbose output that lists 46216aab59a7Smrg # what "hidden" libraries, object files and flags are used when 46226aab59a7Smrg # linking a shared library. 46236aab59a7Smrg # 46246aab59a7Smrg # There doesn't appear to be a way to prevent this compiler from 46256aab59a7Smrg # explicitly linking system object files so we need to strip them 46266aab59a7Smrg # from the output so that they don't get included in the library 46276aab59a7Smrg # dependencies. 46286aab59a7Smrg 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' 46296aab59a7Smrg ;; 46306aab59a7Smrg *) 46316aab59a7Smrg if test "$GXX" = yes; then 46326aab59a7Smrg _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' 46336aab59a7Smrg else 46346aab59a7Smrg # FIXME: insert proper C++ library support 46356aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 46366aab59a7Smrg fi 46376aab59a7Smrg ;; 46386aab59a7Smrg esac 46396aab59a7Smrg ;; 46406aab59a7Smrg hpux10*|hpux11*) 46416aab59a7Smrg if test $with_gnu_ld = no; then 46426aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 46436aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4644659607e0Smrg 46456aab59a7Smrg case $host_cpu in 46466aab59a7Smrg hppa*64*|ia64*) 46476aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 46486aab59a7Smrg ;; 46496aab59a7Smrg *) 46506aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 46516aab59a7Smrg ;; 46526aab59a7Smrg esac 46536aab59a7Smrg fi 46546aab59a7Smrg case $host_cpu in 46556aab59a7Smrg hppa*64*|ia64*) 46566aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 46576aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 46586aab59a7Smrg ;; 46596aab59a7Smrg *) 46606aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 46616aab59a7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 46626aab59a7Smrg # but as the default 46636aab59a7Smrg # location of the library. 46646aab59a7Smrg ;; 46656aab59a7Smrg esac 4666659607e0Smrg 46676aab59a7Smrg case $cc_basename in 46686aab59a7Smrg CC*) 46696aab59a7Smrg # FIXME: insert proper C++ library support 46706aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 46716aab59a7Smrg ;; 46726aab59a7Smrg aCC*) 46736aab59a7Smrg case $host_cpu in 46746aab59a7Smrg hppa*64*) 46756aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 46766aab59a7Smrg ;; 46776aab59a7Smrg ia64*) 46786aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 46796aab59a7Smrg ;; 46806aab59a7Smrg *) 46816aab59a7Smrg _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' 46826aab59a7Smrg ;; 46836aab59a7Smrg esac 46846aab59a7Smrg # Commands to make compiler produce verbose output that lists 46856aab59a7Smrg # what "hidden" libraries, object files and flags are used when 46866aab59a7Smrg # linking a shared library. 46876aab59a7Smrg # 46886aab59a7Smrg # There doesn't appear to be a way to prevent this compiler from 46896aab59a7Smrg # explicitly linking system object files so we need to strip them 46906aab59a7Smrg # from the output so that they don't get included in the library 46916aab59a7Smrg # dependencies. 46926aab59a7Smrg 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' 46936aab59a7Smrg ;; 46946aab59a7Smrg *) 46956aab59a7Smrg if test "$GXX" = yes; then 46966aab59a7Smrg if test $with_gnu_ld = no; then 46976aab59a7Smrg case $host_cpu in 46986aab59a7Smrg hppa*64*) 46996aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 47006aab59a7Smrg ;; 47016aab59a7Smrg ia64*) 47026aab59a7Smrg _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' 47036aab59a7Smrg ;; 47046aab59a7Smrg *) 47056aab59a7Smrg _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' 47066aab59a7Smrg ;; 47076aab59a7Smrg esac 47086aab59a7Smrg fi 47096aab59a7Smrg else 47106aab59a7Smrg # FIXME: insert proper C++ library support 47116aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 47126aab59a7Smrg fi 47136aab59a7Smrg ;; 47146aab59a7Smrg esac 4715659607e0Smrg ;; 47166aab59a7Smrg interix3*) 47176aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 47186aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 47196aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 47206aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 47216aab59a7Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 47226aab59a7Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 47236aab59a7Smrg # default) and relocated if they conflict, which is a slow very memory 47246aab59a7Smrg # consuming and fragmenting process. To avoid this, we pick a random, 47256aab59a7Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 47266aab59a7Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 47276aab59a7Smrg _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' 47286aab59a7Smrg _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' 47296aab59a7Smrg ;; 47306aab59a7Smrg irix5* | irix6*) 47316aab59a7Smrg case $cc_basename in 47326aab59a7Smrg CC*) 47336aab59a7Smrg # SGI C++ 47346aab59a7Smrg _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' 4735659607e0Smrg 47366aab59a7Smrg # Archives containing C++ object files must be created using 47376aab59a7Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 47386aab59a7Smrg # necessary to make sure instantiated templates are included 47396aab59a7Smrg # in the archive. 47406aab59a7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 47416aab59a7Smrg ;; 47426aab59a7Smrg *) 47436aab59a7Smrg if test "$GXX" = yes; then 47446aab59a7Smrg if test "$with_gnu_ld" = no; then 47456aab59a7Smrg _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' 47466aab59a7Smrg else 47476aab59a7Smrg _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' 47486aab59a7Smrg fi 47496aab59a7Smrg fi 47506aab59a7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 47516aab59a7Smrg ;; 47526aab59a7Smrg esac 47536aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 47546aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 47556aab59a7Smrg ;; 47566aab59a7Smrg linux*) 47576aab59a7Smrg case $cc_basename in 47586aab59a7Smrg KCC*) 47596aab59a7Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 4760659607e0Smrg 47616aab59a7Smrg # KCC will only create a shared library if the output file 47626aab59a7Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 47636aab59a7Smrg # to its proper name (with version) after linking. 47646aab59a7Smrg _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' 47656aab59a7Smrg _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' 47666aab59a7Smrg # Commands to make compiler produce verbose output that lists 47676aab59a7Smrg # what "hidden" libraries, object files and flags are used when 47686aab59a7Smrg # linking a shared library. 47696aab59a7Smrg # 47706aab59a7Smrg # There doesn't appear to be a way to prevent this compiler from 47716aab59a7Smrg # explicitly linking system object files so we need to strip them 47726aab59a7Smrg # from the output so that they don't get included in the library 47736aab59a7Smrg # dependencies. 47746aab59a7Smrg 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' 4775659607e0Smrg 47766aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 47776aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4778659607e0Smrg 47796aab59a7Smrg # Archives containing C++ object files must be created using 47806aab59a7Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 47816aab59a7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 47826aab59a7Smrg ;; 47836aab59a7Smrg icpc*) 47846aab59a7Smrg # Intel C++ 47856aab59a7Smrg with_gnu_ld=yes 47866aab59a7Smrg # version 8.0 and above of icpc choke on multiply defined symbols 47876aab59a7Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 47886aab59a7Smrg # earlier do not add the objects themselves. 47896aab59a7Smrg case `$CC -V 2>&1` in 47906aab59a7Smrg *"Version 7."*) 47916aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 47926aab59a7Smrg _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' 47936aab59a7Smrg ;; 47946aab59a7Smrg *) # Version 8.0 or newer 47956aab59a7Smrg tmp_idyn= 47966aab59a7Smrg case $host_cpu in 47976aab59a7Smrg ia64*) tmp_idyn=' -i_dynamic';; 47986aab59a7Smrg esac 47996aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 48006aab59a7Smrg _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' 48016aab59a7Smrg ;; 48026aab59a7Smrg esac 48036aab59a7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 48046aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 48056aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 48066aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 48076aab59a7Smrg ;; 48086aab59a7Smrg pgCC*) 48096aab59a7Smrg # Portland Group C++ compiler 48106aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 48116aab59a7Smrg _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' 4812659607e0Smrg 48136aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 48146aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 48156aab59a7Smrg _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' 48166aab59a7Smrg ;; 48176aab59a7Smrg cxx*) 48186aab59a7Smrg # Compaq C++ 48196aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 48206aab59a7Smrg _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' 4821659607e0Smrg 48226aab59a7Smrg runpath_var=LD_RUN_PATH 48236aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 48246aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4825659607e0Smrg 48266aab59a7Smrg # Commands to make compiler produce verbose output that lists 48276aab59a7Smrg # what "hidden" libraries, object files and flags are used when 48286aab59a7Smrg # linking a shared library. 48296aab59a7Smrg # 48306aab59a7Smrg # There doesn't appear to be a way to prevent this compiler from 48316aab59a7Smrg # explicitly linking system object files so we need to strip them 48326aab59a7Smrg # from the output so that they don't get included in the library 48336aab59a7Smrg # dependencies. 48346aab59a7Smrg 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' 48356aab59a7Smrg ;; 48366aab59a7Smrg esac 48376aab59a7Smrg ;; 48386aab59a7Smrg lynxos*) 48396aab59a7Smrg # FIXME: insert proper C++ library support 48406aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 48416aab59a7Smrg ;; 48426aab59a7Smrg m88k*) 48436aab59a7Smrg # FIXME: insert proper C++ library support 48446aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 48456aab59a7Smrg ;; 48466aab59a7Smrg mvs*) 48476aab59a7Smrg case $cc_basename in 48486aab59a7Smrg cxx*) 48496aab59a7Smrg # FIXME: insert proper C++ library support 48506aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 48516aab59a7Smrg ;; 48526aab59a7Smrg *) 48536aab59a7Smrg # FIXME: insert proper C++ library support 48546aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 48556aab59a7Smrg ;; 48566aab59a7Smrg esac 48576aab59a7Smrg ;; 48586aab59a7Smrg netbsd*) 48596aab59a7Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 48606aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 48616aab59a7Smrg wlarc= 48626aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 48636aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 48646aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 48656aab59a7Smrg fi 48666aab59a7Smrg # Workaround some broken pre-1.5 toolchains 48676aab59a7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 48686aab59a7Smrg ;; 48696aab59a7Smrg openbsd2*) 48706aab59a7Smrg # C++ shared libraries are fairly broken 48716aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 48726aab59a7Smrg ;; 48736aab59a7Smrg openbsd*) 48746aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 48756aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 48766aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 48776aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 48786aab59a7Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 48796aab59a7Smrg _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' 48806aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 48816aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 48826aab59a7Smrg fi 48836aab59a7Smrg output_verbose_link_cmd='echo' 48846aab59a7Smrg ;; 48856aab59a7Smrg osf3*) 48866aab59a7Smrg case $cc_basename in 48876aab59a7Smrg KCC*) 48886aab59a7Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 4889659607e0Smrg 48906aab59a7Smrg # KCC will only create a shared library if the output file 48916aab59a7Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 48926aab59a7Smrg # to its proper name (with version) after linking. 48936aab59a7Smrg _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' 4894659607e0Smrg 48956aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 48966aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4897659607e0Smrg 48986aab59a7Smrg # Archives containing C++ object files must be created using 48996aab59a7Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 49006aab59a7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 4901659607e0Smrg 49026aab59a7Smrg ;; 49036aab59a7Smrg RCC*) 49046aab59a7Smrg # Rational C++ 2.4.1 49056aab59a7Smrg # FIXME: insert proper C++ library support 49066aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 49076aab59a7Smrg ;; 49086aab59a7Smrg cxx*) 49096aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 49106aab59a7Smrg _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' 4911659607e0Smrg 49126aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49136aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4914659607e0Smrg 49156aab59a7Smrg # Commands to make compiler produce verbose output that lists 49166aab59a7Smrg # what "hidden" libraries, object files and flags are used when 49176aab59a7Smrg # linking a shared library. 49186aab59a7Smrg # 49196aab59a7Smrg # There doesn't appear to be a way to prevent this compiler from 49206aab59a7Smrg # explicitly linking system object files so we need to strip them 49216aab59a7Smrg # from the output so that they don't get included in the library 49226aab59a7Smrg # dependencies. 49236aab59a7Smrg 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' 49246aab59a7Smrg ;; 49256aab59a7Smrg *) 49266aab59a7Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 49276aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 49286aab59a7Smrg _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' 4929659607e0Smrg 49306aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49316aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4932659607e0Smrg 49336aab59a7Smrg # Commands to make compiler produce verbose output that lists 49346aab59a7Smrg # what "hidden" libraries, object files and flags are used when 49356aab59a7Smrg # linking a shared library. 49366aab59a7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 4937659607e0Smrg 49386aab59a7Smrg else 49396aab59a7Smrg # FIXME: insert proper C++ library support 49406aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 49416aab59a7Smrg fi 49426aab59a7Smrg ;; 49436aab59a7Smrg esac 49446aab59a7Smrg ;; 49456aab59a7Smrg osf4* | osf5*) 49466aab59a7Smrg case $cc_basename in 49476aab59a7Smrg KCC*) 49486aab59a7Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 4949659607e0Smrg 49506aab59a7Smrg # KCC will only create a shared library if the output file 49516aab59a7Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 49526aab59a7Smrg # to its proper name (with version) after linking. 49536aab59a7Smrg _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' 4954659607e0Smrg 49556aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 49566aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4957659607e0Smrg 49586aab59a7Smrg # Archives containing C++ object files must be created using 49596aab59a7Smrg # the KAI C++ compiler. 49606aab59a7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 49616aab59a7Smrg ;; 49626aab59a7Smrg RCC*) 49636aab59a7Smrg # Rational C++ 2.4.1 49646aab59a7Smrg # FIXME: insert proper C++ library support 49656aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 49666aab59a7Smrg ;; 49676aab59a7Smrg cxx*) 49686aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 49696aab59a7Smrg _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' 49706aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 49716aab59a7Smrg echo "-hidden">> $lib.exp~ 49726aab59a7Smrg $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~ 49736aab59a7Smrg $rm $lib.exp' 4974659607e0Smrg 49756aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 49766aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4977659607e0Smrg 49786aab59a7Smrg # Commands to make compiler produce verbose output that lists 49796aab59a7Smrg # what "hidden" libraries, object files and flags are used when 49806aab59a7Smrg # linking a shared library. 49816aab59a7Smrg # 49826aab59a7Smrg # There doesn't appear to be a way to prevent this compiler from 49836aab59a7Smrg # explicitly linking system object files so we need to strip them 49846aab59a7Smrg # from the output so that they don't get included in the library 49856aab59a7Smrg # dependencies. 49866aab59a7Smrg 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' 49876aab59a7Smrg ;; 49886aab59a7Smrg *) 49896aab59a7Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 49906aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 49916aab59a7Smrg _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' 4992659607e0Smrg 49936aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49946aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4995659607e0Smrg 49966aab59a7Smrg # Commands to make compiler produce verbose output that lists 49976aab59a7Smrg # what "hidden" libraries, object files and flags are used when 49986aab59a7Smrg # linking a shared library. 49996aab59a7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 5000659607e0Smrg 5001659607e0Smrg else 50026aab59a7Smrg # FIXME: insert proper C++ library support 50036aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5004659607e0Smrg fi 50056aab59a7Smrg ;; 50066aab59a7Smrg esac 50076aab59a7Smrg ;; 50086aab59a7Smrg psos*) 50096aab59a7Smrg # FIXME: insert proper C++ library support 50106aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 50116aab59a7Smrg ;; 50126aab59a7Smrg sunos4*) 50136aab59a7Smrg case $cc_basename in 50146aab59a7Smrg CC*) 50156aab59a7Smrg # Sun C++ 4.x 50166aab59a7Smrg # FIXME: insert proper C++ library support 50176aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 50186aab59a7Smrg ;; 50196aab59a7Smrg lcc*) 50206aab59a7Smrg # Lucid 50216aab59a7Smrg # FIXME: insert proper C++ library support 50226aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 50236aab59a7Smrg ;; 50246aab59a7Smrg *) 50256aab59a7Smrg # FIXME: insert proper C++ library support 50266aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 50276aab59a7Smrg ;; 50286aab59a7Smrg esac 50296aab59a7Smrg ;; 50306aab59a7Smrg solaris*) 50316aab59a7Smrg case $cc_basename in 50326aab59a7Smrg CC*) 50336aab59a7Smrg # Sun C++ 4.2, 5.x and Centerline C++ 50346aab59a7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 50356aab59a7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 50366aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 50376aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 50386aab59a7Smrg $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' 5039659607e0Smrg 50406aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 50416aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 50426aab59a7Smrg case $host_os in 50436aab59a7Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 50446aab59a7Smrg *) 50456aab59a7Smrg # The C++ compiler is used as linker so we must use $wl 50466aab59a7Smrg # flag to pass the commands to the underlying system 50476aab59a7Smrg # linker. We must also pass each convience library through 50486aab59a7Smrg # to the system linker between allextract/defaultextract. 50496aab59a7Smrg # The C++ compiler will combine linker options so we 50506aab59a7Smrg # cannot just pass the convience library names through 50516aab59a7Smrg # without $wl. 50526aab59a7Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 50536aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' 50546aab59a7Smrg ;; 50556aab59a7Smrg esac 50566aab59a7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5057659607e0Smrg 50586aab59a7Smrg output_verbose_link_cmd='echo' 5059659607e0Smrg 50606aab59a7Smrg # Archives containing C++ object files must be created using 50616aab59a7Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 50626aab59a7Smrg # necessary to make sure instantiated templates are included 50636aab59a7Smrg # in the archive. 50646aab59a7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 50656aab59a7Smrg ;; 50666aab59a7Smrg gcx*) 50676aab59a7Smrg # Green Hills C++ Compiler 50686aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 5069659607e0Smrg 50706aab59a7Smrg # The C++ compiler must be used to create the archive. 50716aab59a7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 5072659607e0Smrg ;; 5073659607e0Smrg *) 50746aab59a7Smrg # GNU C++ compiler with Solaris linker 50756aab59a7Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 50766aab59a7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 50776aab59a7Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 50786aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 50796aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 50806aab59a7Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 50816aab59a7Smrg 50826aab59a7Smrg # Commands to make compiler produce verbose output that lists 50836aab59a7Smrg # what "hidden" libraries, object files and flags are used when 50846aab59a7Smrg # linking a shared library. 50856aab59a7Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 50866aab59a7Smrg else 50876aab59a7Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 50886aab59a7Smrg # platform. 50896aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 50906aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 50916aab59a7Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 50926aab59a7Smrg 50936aab59a7Smrg # Commands to make compiler produce verbose output that lists 50946aab59a7Smrg # what "hidden" libraries, object files and flags are used when 50956aab59a7Smrg # linking a shared library. 50966aab59a7Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 50976aab59a7Smrg fi 50986aab59a7Smrg 50996aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 51006aab59a7Smrg fi 5101659607e0Smrg ;; 5102659607e0Smrg esac 51036aab59a7Smrg ;; 51046aab59a7Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 51056aab59a7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 51066aab59a7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 51076aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 51086aab59a7Smrg runpath_var='LD_RUN_PATH' 51096aab59a7Smrg 51106aab59a7Smrg case $cc_basename in 51116aab59a7Smrg CC*) 51126aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 51136aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5114659607e0Smrg ;; 51156aab59a7Smrg *) 51166aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 51176aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5118659607e0Smrg ;; 51196aab59a7Smrg esac 51206aab59a7Smrg ;; 51216aab59a7Smrg sysv5* | sco3.2v5* | sco5v6*) 51226aab59a7Smrg # Note: We can NOT use -z defs as we might desire, because we do not 51236aab59a7Smrg # link with -lc, and that would cause any symbols used from libc to 51246aab59a7Smrg # always be unresolved, which means just about no library would 51256aab59a7Smrg # ever link correctly. If we're not using GNU ld we use -z text 51266aab59a7Smrg # though, which does catch some bad symbols but isn't as heavy-handed 51276aab59a7Smrg # as -z defs. 51286aab59a7Smrg # For security reasons, it is highly recommended that you always 51296aab59a7Smrg # use absolute paths for naming shared libraries, and exclude the 51306aab59a7Smrg # DT_RUNPATH tag from executables and libraries. But doing so 51316aab59a7Smrg # requires that you compile everything twice, which is a pain. 51326aab59a7Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 51336aab59a7Smrg # non-empty value in the environment. Most likely only useful for 51346aab59a7Smrg # creating official distributions of packages. 51356aab59a7Smrg # This is a hack until libtool officially supports absolute path 51366aab59a7Smrg # names for shared libraries. 51376aab59a7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 51386aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 51396aab59a7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 51406aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 51416aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 51426aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 51436aab59a7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 51446aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 51456aab59a7Smrg runpath_var='LD_RUN_PATH' 51466aab59a7Smrg 51476aab59a7Smrg case $cc_basename in 51486aab59a7Smrg CC*) 51496aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 51506aab59a7Smrg _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' 5151659607e0Smrg ;; 51526aab59a7Smrg *) 51536aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 51546aab59a7Smrg _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' 5155659607e0Smrg ;; 51566aab59a7Smrg esac 51576aab59a7Smrg ;; 51586aab59a7Smrg tandem*) 51596aab59a7Smrg case $cc_basename in 51606aab59a7Smrg NCC*) 51616aab59a7Smrg # NonStop-UX NCC 3.20 51626aab59a7Smrg # FIXME: insert proper C++ library support 51636aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5164659607e0Smrg ;; 5165659607e0Smrg *) 51666aab59a7Smrg # FIXME: insert proper C++ library support 51676aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5168659607e0Smrg ;; 5169659607e0Smrg esac 51706aab59a7Smrg ;; 51716aab59a7Smrg vxworks*) 51726aab59a7Smrg # FIXME: insert proper C++ library support 51736aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 51746aab59a7Smrg ;; 51756aab59a7Smrg *) 51766aab59a7Smrg # FIXME: insert proper C++ library support 51776aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 51786aab59a7Smrg ;; 51796aab59a7Smrgesac 51806aab59a7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 51816aab59a7Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5182659607e0Smrg 51836aab59a7Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 51846aab59a7Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 5185659607e0Smrg 51866aab59a7SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 51876aab59a7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 51886aab59a7SmrgAC_LIBTOOL_PROG_CC_C_O($1) 51896aab59a7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 51906aab59a7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 51916aab59a7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 51926aab59a7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 5193659607e0Smrg 51946aab59a7SmrgAC_LIBTOOL_CONFIG($1) 5195659607e0Smrg 51966aab59a7SmrgAC_LANG_POP 51976aab59a7SmrgCC=$lt_save_CC 51986aab59a7SmrgLDCXX=$LD 51996aab59a7SmrgLD=$lt_save_LD 52006aab59a7SmrgGCC=$lt_save_GCC 52016aab59a7Smrgwith_gnu_ldcxx=$with_gnu_ld 52026aab59a7Smrgwith_gnu_ld=$lt_save_with_gnu_ld 52036aab59a7Smrglt_cv_path_LDCXX=$lt_cv_path_LD 52046aab59a7Smrglt_cv_path_LD=$lt_save_path_LD 52056aab59a7Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 52066aab59a7Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 52076aab59a7Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 5208659607e0Smrg 52096aab59a7Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 52106aab59a7Smrg# ------------------------------------ 52116aab59a7Smrg# Figure out "hidden" library dependencies from verbose 52126aab59a7Smrg# compiler output when linking a shared library. 52136aab59a7Smrg# Parse the compiler output and extract the necessary 52146aab59a7Smrg# objects, libraries and library flags. 52156aab59a7SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 52166aab59a7Smrgdnl we can't use the lt_simple_compile_test_code here, 52176aab59a7Smrgdnl because it contains code intended for an executable, 52186aab59a7Smrgdnl not a library. It's possible we should let each 52196aab59a7Smrgdnl tag define a new lt_????_link_test_code variable, 52206aab59a7Smrgdnl but it's only used here... 52216aab59a7Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 52226aab59a7Smrgint a; 52236aab59a7Smrgvoid foo (void) { a = 0; } 52246aab59a7SmrgEOF 52256aab59a7Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 52266aab59a7Smrgclass Foo 52276aab59a7Smrg{ 52286aab59a7Smrgpublic: 52296aab59a7Smrg Foo (void) { a = 0; } 52306aab59a7Smrgprivate: 52316aab59a7Smrg int a; 52326aab59a7Smrg}; 52336aab59a7SmrgEOF 52346aab59a7Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 52356aab59a7Smrg subroutine foo 52366aab59a7Smrg implicit none 52376aab59a7Smrg integer*4 a 52386aab59a7Smrg a=0 52396aab59a7Smrg return 52406aab59a7Smrg end 52416aab59a7SmrgEOF 52426aab59a7Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 52436aab59a7Smrgpublic class foo { 52446aab59a7Smrg private int a; 52456aab59a7Smrg public void bar (void) { 52466aab59a7Smrg a = 0; 52476aab59a7Smrg } 52486aab59a7Smrg}; 52496aab59a7SmrgEOF 52506aab59a7Smrg]) 52516aab59a7Smrgdnl Parse the compiler output and extract the necessary 52526aab59a7Smrgdnl objects, libraries and library flags. 52536aab59a7Smrgif AC_TRY_EVAL(ac_compile); then 52546aab59a7Smrg # Parse the compiler output and extract the necessary 52556aab59a7Smrg # objects, libraries and library flags. 5256659607e0Smrg 52576aab59a7Smrg # Sentinel used to keep track of whether or not we are before 52586aab59a7Smrg # the conftest object file. 52596aab59a7Smrg pre_test_object_deps_done=no 5260659607e0Smrg 52616aab59a7Smrg # The `*' in the case matches for architectures that use `case' in 52626aab59a7Smrg # $output_verbose_cmd can trigger glob expansion during the loop 52636aab59a7Smrg # eval without this substitution. 52646aab59a7Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 5265659607e0Smrg 52666aab59a7Smrg for p in `eval $output_verbose_link_cmd`; do 52676aab59a7Smrg case $p in 5268659607e0Smrg 52696aab59a7Smrg -L* | -R* | -l*) 52706aab59a7Smrg # Some compilers place space between "-{L,R}" and the path. 52716aab59a7Smrg # Remove the space. 52726aab59a7Smrg if test $p = "-L" \ 52736aab59a7Smrg || test $p = "-R"; then 52746aab59a7Smrg prev=$p 52756aab59a7Smrg continue 52766aab59a7Smrg else 52776aab59a7Smrg prev= 52786aab59a7Smrg fi 5279659607e0Smrg 52806aab59a7Smrg if test "$pre_test_object_deps_done" = no; then 52816aab59a7Smrg case $p in 52826aab59a7Smrg -L* | -R*) 52836aab59a7Smrg # Internal compiler library paths should come after those 52846aab59a7Smrg # provided the user. The postdeps already come after the 52856aab59a7Smrg # user supplied libs so there is no need to process them. 52866aab59a7Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 52876aab59a7Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 52886aab59a7Smrg else 52896aab59a7Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 52906aab59a7Smrg fi 52916aab59a7Smrg ;; 52926aab59a7Smrg # The "-l" case would never come before the object being 52936aab59a7Smrg # linked, so don't bother handling this case. 52946aab59a7Smrg esac 52956aab59a7Smrg else 52966aab59a7Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 52976aab59a7Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 52986aab59a7Smrg else 52996aab59a7Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 53006aab59a7Smrg fi 53016aab59a7Smrg fi 5302659607e0Smrg ;; 5303659607e0Smrg 53046aab59a7Smrg *.$objext) 53056aab59a7Smrg # This assumes that the test object file only shows up 53066aab59a7Smrg # once in the compiler output. 53076aab59a7Smrg if test "$p" = "conftest.$objext"; then 53086aab59a7Smrg pre_test_object_deps_done=yes 53096aab59a7Smrg continue 53106aab59a7Smrg fi 5311659607e0Smrg 53126aab59a7Smrg if test "$pre_test_object_deps_done" = no; then 53136aab59a7Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 53146aab59a7Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 53156aab59a7Smrg else 53166aab59a7Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 53176aab59a7Smrg fi 53186aab59a7Smrg else 53196aab59a7Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 53206aab59a7Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 53216aab59a7Smrg else 53226aab59a7Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 53236aab59a7Smrg fi 53246aab59a7Smrg fi 53256aab59a7Smrg ;; 5326659607e0Smrg 53276aab59a7Smrg *) ;; # Ignore the rest. 5328659607e0Smrg 53296aab59a7Smrg esac 53306aab59a7Smrg done 5331659607e0Smrg 53326aab59a7Smrg # Clean up. 53336aab59a7Smrg rm -f a.out a.exe 53346aab59a7Smrgelse 53356aab59a7Smrg echo "libtool.m4: error: problem compiling $1 test program" 53366aab59a7Smrgfi 5337659607e0Smrg 53386aab59a7Smrg$rm -f confest.$objext 5339659607e0Smrg 53406aab59a7Smrg# PORTME: override above test on systems where it is broken 53416aab59a7Smrgifelse([$1],[CXX], 53426aab59a7Smrg[case $host_os in 53436aab59a7Smrginterix3*) 53446aab59a7Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 53456aab59a7Smrg # hack all around it, let's just trust "g++" to DTRT. 53466aab59a7Smrg _LT_AC_TAGVAR(predep_objects,$1)= 53476aab59a7Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 53486aab59a7Smrg _LT_AC_TAGVAR(postdeps,$1)= 53496aab59a7Smrg ;; 5350659607e0Smrg 53516aab59a7Smrgsolaris*) 53526aab59a7Smrg case $cc_basename in 53536aab59a7Smrg CC*) 53546aab59a7Smrg # Adding this requires a known-good setup of shared libraries for 53556aab59a7Smrg # Sun compiler versions before 5.6, else PIC objects from an old 53566aab59a7Smrg # archive will be linked into the output, leading to subtle bugs. 53576aab59a7Smrg _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 53586aab59a7Smrg ;; 53596aab59a7Smrg esac 53606aab59a7Smrg ;; 53616aab59a7Smrgesac 53626aab59a7Smrg]) 5363659607e0Smrg 53646aab59a7Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 53656aab59a7Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 53666aab59a7Smrgesac 53676aab59a7Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 5368659607e0Smrg 53696aab59a7Smrg# AC_LIBTOOL_LANG_F77_CONFIG 53706aab59a7Smrg# -------------------------- 53716aab59a7Smrg# Ensure that the configuration vars for the C compiler are 53726aab59a7Smrg# suitably defined. Those variables are subsequently used by 53736aab59a7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 53746aab59a7SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 53756aab59a7SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 53766aab59a7Smrg[AC_REQUIRE([AC_PROG_F77]) 53776aab59a7SmrgAC_LANG_PUSH(Fortran 77) 5378659607e0Smrg 53796aab59a7Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 53806aab59a7Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 53816aab59a7Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 53826aab59a7Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 53836aab59a7Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 53846aab59a7Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 53856aab59a7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 53866aab59a7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 53876aab59a7Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 53886aab59a7Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 53896aab59a7Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 53906aab59a7Smrg_LT_AC_TAGVAR(module_cmds, $1)= 53916aab59a7Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 53926aab59a7Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 53936aab59a7Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 53946aab59a7Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 53956aab59a7Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 53966aab59a7Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5397659607e0Smrg 53986aab59a7Smrg# Source file extension for f77 test sources. 53996aab59a7Smrgac_ext=f 5400659607e0Smrg 54016aab59a7Smrg# Object file extension for compiled f77 test sources. 54026aab59a7Smrgobjext=o 54036aab59a7Smrg_LT_AC_TAGVAR(objext, $1)=$objext 5404659607e0Smrg 54056aab59a7Smrg# Code to be used in simple compile tests 54066aab59a7Smrglt_simple_compile_test_code=" subroutine t\n return\n end\n" 5407659607e0Smrg 54086aab59a7Smrg# Code to be used in simple link tests 54096aab59a7Smrglt_simple_link_test_code=" program t\n end\n" 5410659607e0Smrg 54116aab59a7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 54126aab59a7Smrg_LT_AC_SYS_COMPILER 5413659607e0Smrg 54146aab59a7Smrg# save warnings/boilerplate of simple test code 54156aab59a7Smrg_LT_COMPILER_BOILERPLATE 54166aab59a7Smrg_LT_LINKER_BOILERPLATE 5417659607e0Smrg 54186aab59a7Smrg# Allow CC to be a program name with arguments. 54196aab59a7Smrglt_save_CC="$CC" 54206aab59a7SmrgCC=${F77-"f77"} 54216aab59a7Smrgcompiler=$CC 54226aab59a7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 54236aab59a7Smrg_LT_CC_BASENAME([$compiler]) 5424659607e0Smrg 54256aab59a7SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 54266aab59a7SmrgAC_MSG_RESULT([$can_build_shared]) 5427659607e0Smrg 54286aab59a7SmrgAC_MSG_CHECKING([whether to build shared libraries]) 54296aab59a7Smrgtest "$can_build_shared" = "no" && enable_shared=no 5430659607e0Smrg 54316aab59a7Smrg# On AIX, shared libraries and static libraries use the same namespace, and 54326aab59a7Smrg# are all built from PIC. 54336aab59a7Smrgcase $host_os in 54346aab59a7Smrgaix3*) 54356aab59a7Smrg test "$enable_shared" = yes && enable_static=no 54366aab59a7Smrg if test -n "$RANLIB"; then 54376aab59a7Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 54386aab59a7Smrg postinstall_cmds='$RANLIB $lib' 54396aab59a7Smrg fi 54406aab59a7Smrg ;; 54416aab59a7Smrgaix4* | aix5*) 54426aab59a7Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 54436aab59a7Smrg test "$enable_shared" = yes && enable_static=no 54446aab59a7Smrg fi 54456aab59a7Smrg ;; 54466aab59a7Smrgesac 54476aab59a7SmrgAC_MSG_RESULT([$enable_shared]) 5448659607e0Smrg 54496aab59a7SmrgAC_MSG_CHECKING([whether to build static libraries]) 54506aab59a7Smrg# Make sure either enable_shared or enable_static is yes. 54516aab59a7Smrgtest "$enable_shared" = yes || enable_static=yes 54526aab59a7SmrgAC_MSG_RESULT([$enable_static]) 5453659607e0Smrg 54546aab59a7Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 54556aab59a7Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 5456659607e0Smrg 54576aab59a7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 54586aab59a7SmrgAC_LIBTOOL_PROG_CC_C_O($1) 54596aab59a7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 54606aab59a7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 54616aab59a7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 54626aab59a7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 5463659607e0Smrg 54646aab59a7SmrgAC_LIBTOOL_CONFIG($1) 5465659607e0Smrg 54666aab59a7SmrgAC_LANG_POP 54676aab59a7SmrgCC="$lt_save_CC" 54686aab59a7Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 5469659607e0Smrg 5470659607e0Smrg 54716aab59a7Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 54726aab59a7Smrg# -------------------------- 54736aab59a7Smrg# Ensure that the configuration vars for the C compiler are 54746aab59a7Smrg# suitably defined. Those variables are subsequently used by 54756aab59a7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 54766aab59a7SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 54776aab59a7SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 54786aab59a7Smrg[AC_LANG_SAVE 5479659607e0Smrg 54806aab59a7Smrg# Source file extension for Java test sources. 54816aab59a7Smrgac_ext=java 5482659607e0Smrg 54836aab59a7Smrg# Object file extension for compiled Java test sources. 54846aab59a7Smrgobjext=o 54856aab59a7Smrg_LT_AC_TAGVAR(objext, $1)=$objext 5486659607e0Smrg 54876aab59a7Smrg# Code to be used in simple compile tests 54886aab59a7Smrglt_simple_compile_test_code="class foo {}\n" 5489659607e0Smrg 54906aab59a7Smrg# Code to be used in simple link tests 54916aab59a7Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 5492659607e0Smrg 54936aab59a7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 54946aab59a7Smrg_LT_AC_SYS_COMPILER 5495659607e0Smrg 54966aab59a7Smrg# save warnings/boilerplate of simple test code 54976aab59a7Smrg_LT_COMPILER_BOILERPLATE 54986aab59a7Smrg_LT_LINKER_BOILERPLATE 5499659607e0Smrg 55006aab59a7Smrg# Allow CC to be a program name with arguments. 55016aab59a7Smrglt_save_CC="$CC" 55026aab59a7SmrgCC=${GCJ-"gcj"} 55036aab59a7Smrgcompiler=$CC 55046aab59a7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 55056aab59a7Smrg_LT_CC_BASENAME([$compiler]) 5506659607e0Smrg 55076aab59a7Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 55086aab59a7Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5509659607e0Smrg 55106aab59a7Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5511659607e0Smrg 55126aab59a7SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 55136aab59a7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 55146aab59a7SmrgAC_LIBTOOL_PROG_CC_C_O($1) 55156aab59a7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 55166aab59a7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 55176aab59a7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 55186aab59a7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 5519659607e0Smrg 55206aab59a7SmrgAC_LIBTOOL_CONFIG($1) 5521659607e0Smrg 55226aab59a7SmrgAC_LANG_RESTORE 55236aab59a7SmrgCC="$lt_save_CC" 55246aab59a7Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 5525659607e0Smrg 5526659607e0Smrg 55276aab59a7Smrg# AC_LIBTOOL_LANG_RC_CONFIG 55286aab59a7Smrg# ------------------------- 55296aab59a7Smrg# Ensure that the configuration vars for the Windows resource compiler are 55306aab59a7Smrg# suitably defined. Those variables are subsequently used by 55316aab59a7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 55326aab59a7SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 55336aab59a7SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 55346aab59a7Smrg[AC_LANG_SAVE 5535659607e0Smrg 55366aab59a7Smrg# Source file extension for RC test sources. 55376aab59a7Smrgac_ext=rc 5538659607e0Smrg 55396aab59a7Smrg# Object file extension for compiled RC test sources. 55406aab59a7Smrgobjext=o 55416aab59a7Smrg_LT_AC_TAGVAR(objext, $1)=$objext 5542659607e0Smrg 55436aab59a7Smrg# Code to be used in simple compile tests 55446aab59a7Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 5545659607e0Smrg 55466aab59a7Smrg# Code to be used in simple link tests 55476aab59a7Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 5548659607e0Smrg 55496aab59a7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 55506aab59a7Smrg_LT_AC_SYS_COMPILER 5551659607e0Smrg 55526aab59a7Smrg# save warnings/boilerplate of simple test code 55536aab59a7Smrg_LT_COMPILER_BOILERPLATE 55546aab59a7Smrg_LT_LINKER_BOILERPLATE 5555659607e0Smrg 55566aab59a7Smrg# Allow CC to be a program name with arguments. 55576aab59a7Smrglt_save_CC="$CC" 55586aab59a7SmrgCC=${RC-"windres"} 55596aab59a7Smrgcompiler=$CC 55606aab59a7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 55616aab59a7Smrg_LT_CC_BASENAME([$compiler]) 55626aab59a7Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5563659607e0Smrg 55646aab59a7SmrgAC_LIBTOOL_CONFIG($1) 5565659607e0Smrg 55666aab59a7SmrgAC_LANG_RESTORE 55676aab59a7SmrgCC="$lt_save_CC" 55686aab59a7Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 5569659607e0Smrg 5570659607e0Smrg 55716aab59a7Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 55726aab59a7Smrg# ---------------------------- 55736aab59a7Smrg# If TAGNAME is not passed, then create an initial libtool script 55746aab59a7Smrg# with a default configuration from the untagged config vars. Otherwise 55756aab59a7Smrg# add code to config.status for appending the configuration named by 55766aab59a7Smrg# TAGNAME from the matching tagged config vars. 55776aab59a7SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 55786aab59a7Smrg[# The else clause should only fire when bootstrapping the 55796aab59a7Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 55806aab59a7Smrg# with your package, and you will get complaints that there are 55816aab59a7Smrg# no rules to generate ltmain.sh. 55826aab59a7Smrgif test -f "$ltmain"; then 55836aab59a7Smrg # See if we are running on zsh, and set the options which allow our commands through 55846aab59a7Smrg # without removal of \ escapes. 55856aab59a7Smrg if test -n "${ZSH_VERSION+set}" ; then 55866aab59a7Smrg setopt NO_GLOB_SUBST 55876aab59a7Smrg fi 55886aab59a7Smrg # Now quote all the things that may contain metacharacters while being 55896aab59a7Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 55906aab59a7Smrg # variables and quote the copies for generation of the libtool script. 55916aab59a7Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 55926aab59a7Smrg SED SHELL STRIP \ 55936aab59a7Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 55946aab59a7Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 55956aab59a7Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 55966aab59a7Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 55976aab59a7Smrg lt_cv_sys_global_symbol_to_c_name_address \ 55986aab59a7Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 55996aab59a7Smrg old_postinstall_cmds old_postuninstall_cmds \ 56006aab59a7Smrg _LT_AC_TAGVAR(compiler, $1) \ 56016aab59a7Smrg _LT_AC_TAGVAR(CC, $1) \ 56026aab59a7Smrg _LT_AC_TAGVAR(LD, $1) \ 56036aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 56046aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 56056aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 56066aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 56076aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 56086aab59a7Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 56096aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 56106aab59a7Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 56116aab59a7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 56126aab59a7Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 56136aab59a7Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 56146aab59a7Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 56156aab59a7Smrg _LT_AC_TAGVAR(predeps, $1) \ 56166aab59a7Smrg _LT_AC_TAGVAR(postdeps, $1) \ 56176aab59a7Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 56186aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 56196aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 56206aab59a7Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 56216aab59a7Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 56226aab59a7Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 56236aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 56246aab59a7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 56256aab59a7Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 56266aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 56276aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 56286aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 56296aab59a7Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 56306aab59a7Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 56316aab59a7Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 56326aab59a7Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 56336aab59a7Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 56346aab59a7Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 5635659607e0Smrg 56366aab59a7Smrg case $var in 56376aab59a7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 56386aab59a7Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 56396aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 56406aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 56416aab59a7Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 56426aab59a7Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 56436aab59a7Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 56446aab59a7Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 56456aab59a7Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 56466aab59a7Smrg postinstall_cmds | postuninstall_cmds | \ 56476aab59a7Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 56486aab59a7Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 56496aab59a7Smrg # Double-quote double-evaled strings. 56506aab59a7Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 5651659607e0Smrg ;; 56526aab59a7Smrg *) 56536aab59a7Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 5654659607e0Smrg ;; 56556aab59a7Smrg esac 56566aab59a7Smrg done 5657659607e0Smrg 56586aab59a7Smrg case $lt_echo in 56596aab59a7Smrg *'\[$]0 --fallback-echo"') 56606aab59a7Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 56616aab59a7Smrg ;; 56626aab59a7Smrg esac 5663659607e0Smrg 56646aab59a7Smrgifelse([$1], [], 56656aab59a7Smrg [cfgfile="${ofile}T" 56666aab59a7Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 56676aab59a7Smrg $rm -f "$cfgfile" 56686aab59a7Smrg AC_MSG_NOTICE([creating $ofile])], 56696aab59a7Smrg [cfgfile="$ofile"]) 5670659607e0Smrg 56716aab59a7Smrg cat <<__EOF__ >> "$cfgfile" 56726aab59a7Smrgifelse([$1], [], 56736aab59a7Smrg[#! $SHELL 5674659607e0Smrg 56756aab59a7Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 56766aab59a7Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 56776aab59a7Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 56786aab59a7Smrg# 56796aab59a7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 56806aab59a7Smrg# Free Software Foundation, Inc. 56816aab59a7Smrg# 56826aab59a7Smrg# This file is part of GNU Libtool: 56836aab59a7Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 56846aab59a7Smrg# 56856aab59a7Smrg# This program is free software; you can redistribute it and/or modify 56866aab59a7Smrg# it under the terms of the GNU General Public License as published by 56876aab59a7Smrg# the Free Software Foundation; either version 2 of the License, or 56886aab59a7Smrg# (at your option) any later version. 56896aab59a7Smrg# 56906aab59a7Smrg# This program is distributed in the hope that it will be useful, but 56916aab59a7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 56926aab59a7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 56936aab59a7Smrg# General Public License for more details. 56946aab59a7Smrg# 56956aab59a7Smrg# You should have received a copy of the GNU General Public License 56966aab59a7Smrg# along with this program; if not, write to the Free Software 56976aab59a7Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 56986aab59a7Smrg# 56996aab59a7Smrg# As a special exception to the GNU General Public License, if you 57006aab59a7Smrg# distribute this file as part of a program that contains a 57016aab59a7Smrg# configuration script generated by Autoconf, you may include it under 57026aab59a7Smrg# the same distribution terms that you use for the rest of that program. 5703659607e0Smrg 57046aab59a7Smrg# A sed program that does not truncate output. 57056aab59a7SmrgSED=$lt_SED 5706659607e0Smrg 57076aab59a7Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 57086aab59a7SmrgXsed="$SED -e 1s/^X//" 5709659607e0Smrg 57106aab59a7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 57116aab59a7Smrg# if CDPATH is set. 57126aab59a7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5713659607e0Smrg 57146aab59a7Smrg# The names of the tagged configurations supported by this script. 57156aab59a7Smrgavailable_tags= 5716659607e0Smrg 57176aab59a7Smrg# ### BEGIN LIBTOOL CONFIG], 57186aab59a7Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 5719659607e0Smrg 57206aab59a7Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 5721659607e0Smrg 57226aab59a7Smrg# Shell to use when invoking shell scripts. 57236aab59a7SmrgSHELL=$lt_SHELL 5724659607e0Smrg 57256aab59a7Smrg# Whether or not to build shared libraries. 57266aab59a7Smrgbuild_libtool_libs=$enable_shared 5727659607e0Smrg 57286aab59a7Smrg# Whether or not to build static libraries. 57296aab59a7Smrgbuild_old_libs=$enable_static 5730659607e0Smrg 57316aab59a7Smrg# Whether or not to add -lc for building shared libraries. 57326aab59a7Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 5733659607e0Smrg 57346aab59a7Smrg# Whether or not to disallow shared libs when runtime libs are static 57356aab59a7Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 5736659607e0Smrg 57376aab59a7Smrg# Whether or not to optimize for fast installation. 57386aab59a7Smrgfast_install=$enable_fast_install 5739659607e0Smrg 57406aab59a7Smrg# The host system. 57416aab59a7Smrghost_alias=$host_alias 57426aab59a7Smrghost=$host 57436aab59a7Smrghost_os=$host_os 5744659607e0Smrg 57456aab59a7Smrg# The build system. 57466aab59a7Smrgbuild_alias=$build_alias 57476aab59a7Smrgbuild=$build 57486aab59a7Smrgbuild_os=$build_os 5749659607e0Smrg 57506aab59a7Smrg# An echo program that does not interpret backslashes. 57516aab59a7Smrgecho=$lt_echo 5752659607e0Smrg 57536aab59a7Smrg# The archiver. 57546aab59a7SmrgAR=$lt_AR 57556aab59a7SmrgAR_FLAGS=$lt_AR_FLAGS 5756659607e0Smrg 57576aab59a7Smrg# A C compiler. 57586aab59a7SmrgLTCC=$lt_LTCC 5759659607e0Smrg 57606aab59a7Smrg# LTCC compiler flags. 57616aab59a7SmrgLTCFLAGS=$lt_LTCFLAGS 5762659607e0Smrg 57636aab59a7Smrg# A language-specific compiler. 57646aab59a7SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 5765659607e0Smrg 57666aab59a7Smrg# Is the compiler the GNU C compiler? 57676aab59a7Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 5768659607e0Smrg 57696aab59a7Smrg# An ERE matcher. 57706aab59a7SmrgEGREP=$lt_EGREP 5771659607e0Smrg 57726aab59a7Smrg# The linker used to build libraries. 57736aab59a7SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 5774659607e0Smrg 57756aab59a7Smrg# Whether we need hard or soft links. 57766aab59a7SmrgLN_S=$lt_LN_S 5777659607e0Smrg 57786aab59a7Smrg# A BSD-compatible nm program. 57796aab59a7SmrgNM=$lt_NM 5780659607e0Smrg 57816aab59a7Smrg# A symbol stripping program 57826aab59a7SmrgSTRIP=$lt_STRIP 5783659607e0Smrg 57846aab59a7Smrg# Used to examine libraries when file_magic_cmd begins "file" 57856aab59a7SmrgMAGIC_CMD=$MAGIC_CMD 5786659607e0Smrg 57876aab59a7Smrg# Used on cygwin: DLL creation program. 57886aab59a7SmrgDLLTOOL="$DLLTOOL" 5789659607e0Smrg 57906aab59a7Smrg# Used on cygwin: object dumper. 57916aab59a7SmrgOBJDUMP="$OBJDUMP" 5792659607e0Smrg 57936aab59a7Smrg# Used on cygwin: assembler. 57946aab59a7SmrgAS="$AS" 5795659607e0Smrg 57966aab59a7Smrg# The name of the directory that contains temporary libtool files. 57976aab59a7Smrgobjdir=$objdir 5798659607e0Smrg 57996aab59a7Smrg# How to create reloadable object files. 58006aab59a7Smrgreload_flag=$lt_reload_flag 58016aab59a7Smrgreload_cmds=$lt_reload_cmds 5802659607e0Smrg 58036aab59a7Smrg# How to pass a linker flag through the compiler. 58046aab59a7Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 5805659607e0Smrg 58066aab59a7Smrg# Object file suffix (normally "o"). 58076aab59a7Smrgobjext="$ac_objext" 5808659607e0Smrg 58096aab59a7Smrg# Old archive suffix (normally "a"). 58106aab59a7Smrglibext="$libext" 5811659607e0Smrg 58126aab59a7Smrg# Shared library suffix (normally ".so"). 58136aab59a7Smrgshrext_cmds='$shrext_cmds' 5814659607e0Smrg 58156aab59a7Smrg# Executable file suffix (normally ""). 58166aab59a7Smrgexeext="$exeext" 5817659607e0Smrg 58186aab59a7Smrg# Additional compiler flags for building library objects. 58196aab59a7Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 58206aab59a7Smrgpic_mode=$pic_mode 5821659607e0Smrg 58226aab59a7Smrg# What is the maximum length of a command? 58236aab59a7Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5824659607e0Smrg 58256aab59a7Smrg# Does compiler simultaneously support -c and -o options? 58266aab59a7Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 5827659607e0Smrg 58286aab59a7Smrg# Must we lock files when doing compilation? 58296aab59a7Smrgneed_locks=$lt_need_locks 5830659607e0Smrg 58316aab59a7Smrg# Do we need the lib prefix for modules? 58326aab59a7Smrgneed_lib_prefix=$need_lib_prefix 5833659607e0Smrg 58346aab59a7Smrg# Do we need a version for libraries? 58356aab59a7Smrgneed_version=$need_version 5836659607e0Smrg 58376aab59a7Smrg# Whether dlopen is supported. 58386aab59a7Smrgdlopen_support=$enable_dlopen 5839659607e0Smrg 58406aab59a7Smrg# Whether dlopen of programs is supported. 58416aab59a7Smrgdlopen_self=$enable_dlopen_self 5842659607e0Smrg 58436aab59a7Smrg# Whether dlopen of statically linked programs is supported. 58446aab59a7Smrgdlopen_self_static=$enable_dlopen_self_static 5845659607e0Smrg 58466aab59a7Smrg# Compiler flag to prevent dynamic linking. 58476aab59a7Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 5848659607e0Smrg 58496aab59a7Smrg# Compiler flag to turn off builtin functions. 58506aab59a7Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 5851659607e0Smrg 58526aab59a7Smrg# Compiler flag to allow reflexive dlopens. 58536aab59a7Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 5854659607e0Smrg 58556aab59a7Smrg# Compiler flag to generate shared objects directly from archives. 58566aab59a7Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 5857659607e0Smrg 58586aab59a7Smrg# Compiler flag to generate thread-safe objects. 58596aab59a7Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 5860659607e0Smrg 58616aab59a7Smrg# Library versioning type. 58626aab59a7Smrgversion_type=$version_type 5863659607e0Smrg 58646aab59a7Smrg# Format of library name prefix. 58656aab59a7Smrglibname_spec=$lt_libname_spec 5866659607e0Smrg 58676aab59a7Smrg# List of archive names. First name is the real one, the rest are links. 58686aab59a7Smrg# The last name is the one that the linker finds with -lNAME. 58696aab59a7Smrglibrary_names_spec=$lt_library_names_spec 5870659607e0Smrg 58716aab59a7Smrg# The coded name of the library, if different from the real name. 58726aab59a7Smrgsoname_spec=$lt_soname_spec 5873659607e0Smrg 58746aab59a7Smrg# Commands used to build and install an old-style archive. 58756aab59a7SmrgRANLIB=$lt_RANLIB 58766aab59a7Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 58776aab59a7Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 58786aab59a7Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 5879659607e0Smrg 58806aab59a7Smrg# Create an old-style archive from a shared archive. 58816aab59a7Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 5882659607e0Smrg 58836aab59a7Smrg# Create a temporary old-style archive to link instead of a shared archive. 58846aab59a7Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 5885659607e0Smrg 58866aab59a7Smrg# Commands used to build and install a shared archive. 58876aab59a7Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 58886aab59a7Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 58896aab59a7Smrgpostinstall_cmds=$lt_postinstall_cmds 58906aab59a7Smrgpostuninstall_cmds=$lt_postuninstall_cmds 5891659607e0Smrg 58926aab59a7Smrg# Commands used to build a loadable module (assumed same as above if empty) 58936aab59a7Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 58946aab59a7Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 5895659607e0Smrg 58966aab59a7Smrg# Commands to strip libraries. 58976aab59a7Smrgold_striplib=$lt_old_striplib 58986aab59a7Smrgstriplib=$lt_striplib 5899659607e0Smrg 59006aab59a7Smrg# Dependencies to place before the objects being linked to create a 59016aab59a7Smrg# shared library. 59026aab59a7Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 5903659607e0Smrg 59046aab59a7Smrg# Dependencies to place after the objects being linked to create a 59056aab59a7Smrg# shared library. 59066aab59a7Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 5907659607e0Smrg 59086aab59a7Smrg# Dependencies to place before the objects being linked to create a 59096aab59a7Smrg# shared library. 59106aab59a7Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 5911659607e0Smrg 59126aab59a7Smrg# Dependencies to place after the objects being linked to create a 59136aab59a7Smrg# shared library. 59146aab59a7Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 5915659607e0Smrg 59166aab59a7Smrg# The library search path used internally by the compiler when linking 59176aab59a7Smrg# a shared library. 59186aab59a7Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 5919659607e0Smrg 59206aab59a7Smrg# Method to check whether dependent libraries are shared objects. 59216aab59a7Smrgdeplibs_check_method=$lt_deplibs_check_method 5922659607e0Smrg 59236aab59a7Smrg# Command to use when deplibs_check_method == file_magic. 59246aab59a7Smrgfile_magic_cmd=$lt_file_magic_cmd 5925659607e0Smrg 59266aab59a7Smrg# Flag that allows shared libraries with undefined symbols to be built. 59276aab59a7Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 5928659607e0Smrg 59296aab59a7Smrg# Flag that forces no undefined symbols. 59306aab59a7Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 5931659607e0Smrg 59326aab59a7Smrg# Commands used to finish a libtool library installation in a directory. 59336aab59a7Smrgfinish_cmds=$lt_finish_cmds 5934659607e0Smrg 59356aab59a7Smrg# Same as above, but a single script fragment to be evaled but not shown. 59366aab59a7Smrgfinish_eval=$lt_finish_eval 5937659607e0Smrg 59386aab59a7Smrg# Take the output of nm and produce a listing of raw symbols and C names. 59396aab59a7Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 5940659607e0Smrg 59416aab59a7Smrg# Transform the output of nm in a proper C declaration 59426aab59a7Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 5943659607e0Smrg 59446aab59a7Smrg# Transform the output of nm in a C name address pair 59456aab59a7Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 5946659607e0Smrg 59476aab59a7Smrg# This is the shared library runtime path variable. 59486aab59a7Smrgrunpath_var=$runpath_var 5949659607e0Smrg 59506aab59a7Smrg# This is the shared library path variable. 59516aab59a7Smrgshlibpath_var=$shlibpath_var 59526aab59a7Smrg 59536aab59a7Smrg# Is shlibpath searched before the hard-coded library search path? 59546aab59a7Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 59556aab59a7Smrg 59566aab59a7Smrg# How to hardcode a shared library path into an executable. 59576aab59a7Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 59586aab59a7Smrg 59596aab59a7Smrg# Whether we should hardcode library paths into libraries. 59606aab59a7Smrghardcode_into_libs=$hardcode_into_libs 59616aab59a7Smrg 59626aab59a7Smrg# Flag to hardcode \$libdir into a binary during linking. 59636aab59a7Smrg# This must work even if \$libdir does not exist. 59646aab59a7Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 59656aab59a7Smrg 59666aab59a7Smrg# If ld is used when linking, flag to hardcode \$libdir into 59676aab59a7Smrg# a binary during linking. This must work even if \$libdir does 59686aab59a7Smrg# not exist. 59696aab59a7Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 59706aab59a7Smrg 59716aab59a7Smrg# Whether we need a single -rpath flag with a separated argument. 59726aab59a7Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 59736aab59a7Smrg 59746aab59a7Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 59756aab59a7Smrg# resulting binary. 59766aab59a7Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 59776aab59a7Smrg 59786aab59a7Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 59796aab59a7Smrg# resulting binary. 59806aab59a7Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 59816aab59a7Smrg 59826aab59a7Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 59836aab59a7Smrg# the resulting binary. 59846aab59a7Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 59856aab59a7Smrg 59866aab59a7Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 59876aab59a7Smrg# and all subsequent libraries and executables linked against it. 59886aab59a7Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 59896aab59a7Smrg 59906aab59a7Smrg# Variables whose values should be saved in libtool wrapper scripts and 59916aab59a7Smrg# restored at relink time. 59926aab59a7Smrgvariables_saved_for_relink="$variables_saved_for_relink" 59936aab59a7Smrg 59946aab59a7Smrg# Whether libtool must link a program against all its dependency libraries. 59956aab59a7Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 59966aab59a7Smrg 59976aab59a7Smrg# Compile-time system search path for libraries 59986aab59a7Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 59996aab59a7Smrg 60006aab59a7Smrg# Run-time system search path for libraries 60016aab59a7Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 60026aab59a7Smrg 60036aab59a7Smrg# Fix the shell variable \$srcfile for the compiler. 60046aab59a7Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 60056aab59a7Smrg 60066aab59a7Smrg# Set to yes if exported symbols are required. 60076aab59a7Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 60086aab59a7Smrg 60096aab59a7Smrg# The commands to list exported symbols. 60106aab59a7Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 60116aab59a7Smrg 60126aab59a7Smrg# The commands to extract the exported symbol list from a shared archive. 60136aab59a7Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 60146aab59a7Smrg 60156aab59a7Smrg# Symbols that should not be listed in the preloaded symbols. 60166aab59a7Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 60176aab59a7Smrg 60186aab59a7Smrg# Symbols that must always be exported. 60196aab59a7Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 60206aab59a7Smrg 60216aab59a7Smrgifelse([$1],[], 60226aab59a7Smrg[# ### END LIBTOOL CONFIG], 60236aab59a7Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 60246aab59a7Smrg 60256aab59a7Smrg__EOF__ 60266aab59a7Smrg 60276aab59a7Smrgifelse([$1],[], [ 60286aab59a7Smrg case $host_os in 60296aab59a7Smrg aix3*) 60306aab59a7Smrg cat <<\EOF >> "$cfgfile" 60316aab59a7Smrg 60326aab59a7Smrg# AIX sometimes has problems with the GCC collect2 program. For some 60336aab59a7Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 60346aab59a7Smrg# vanish in a puff of smoke. 60356aab59a7Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 60366aab59a7Smrg COLLECT_NAMES= 60376aab59a7Smrg export COLLECT_NAMES 60386aab59a7Smrgfi 60396aab59a7SmrgEOF 60406aab59a7Smrg ;; 60416aab59a7Smrg esac 60426aab59a7Smrg 60436aab59a7Smrg # We use sed instead of cat because bash on DJGPP gets confused if 60446aab59a7Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 60456aab59a7Smrg # text mode, it properly converts lines to CR/LF. This bash problem 60466aab59a7Smrg # is reportedly fixed, but why not run on old versions too? 60476aab59a7Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 60486aab59a7Smrg 60496aab59a7Smrg mv -f "$cfgfile" "$ofile" || \ 60506aab59a7Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 60516aab59a7Smrg chmod +x "$ofile" 60526aab59a7Smrg]) 6053659607e0Smrgelse 60546aab59a7Smrg # If there is no Makefile yet, we rely on a make rule to execute 60556aab59a7Smrg # `config.status --recheck' to rerun these tests and create the 60566aab59a7Smrg # libtool script then. 60576aab59a7Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 60586aab59a7Smrg if test -f "$ltmain_in"; then 60596aab59a7Smrg test -f Makefile && make "$ltmain" 60606aab59a7Smrg fi 6061659607e0Smrgfi 60626aab59a7Smrg])# AC_LIBTOOL_CONFIG 6063659607e0Smrg 6064659607e0Smrg 60656aab59a7Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 60666aab59a7Smrg# ------------------------------------------- 60676aab59a7SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 60686aab59a7Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 6069659607e0Smrg 60706aab59a7Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6071659607e0Smrg 60726aab59a7Smrgif test "$GCC" = yes; then 60736aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 60746aab59a7Smrg 60756aab59a7Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 60766aab59a7Smrg lt_cv_prog_compiler_rtti_exceptions, 60776aab59a7Smrg [-fno-rtti -fno-exceptions], [], 60786aab59a7Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 6079659607e0Smrgfi 60806aab59a7Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 6081659607e0Smrg 6082659607e0Smrg 60836aab59a7Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 60846aab59a7Smrg# --------------------------------- 60856aab59a7SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 60866aab59a7Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 60876aab59a7SmrgAC_REQUIRE([AC_PROG_NM]) 60886aab59a7SmrgAC_REQUIRE([AC_OBJEXT]) 60896aab59a7Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 60906aab59a7SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 60916aab59a7SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 60926aab59a7Smrg[ 60936aab59a7Smrg# These are sane defaults that work on at least a few old systems. 60946aab59a7Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 6095659607e0Smrg 60966aab59a7Smrg# Character class describing NM global symbol codes. 60976aab59a7Smrgsymcode='[[BCDEGRST]]' 6098659607e0Smrg 60996aab59a7Smrg# Regexp to match symbols that can be accessed directly from C. 61006aab59a7Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 61016aab59a7Smrg 61026aab59a7Smrg# Transform an extracted symbol line into a proper C declaration 61036aab59a7Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 61046aab59a7Smrg 61056aab59a7Smrg# Transform an extracted symbol line into symbol name and symbol address 61066aab59a7Smrglt_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'" 61076aab59a7Smrg 61086aab59a7Smrg# Define system-specific variables. 61096aab59a7Smrgcase $host_os in 61106aab59a7Smrgaix*) 61116aab59a7Smrg symcode='[[BCDT]]' 61126aab59a7Smrg ;; 61136aab59a7Smrgcygwin* | mingw* | pw32*) 61146aab59a7Smrg symcode='[[ABCDGISTW]]' 61156aab59a7Smrg ;; 61166aab59a7Smrghpux*) # Its linker distinguishes data from code symbols 61176aab59a7Smrg if test "$host_cpu" = ia64; then 61186aab59a7Smrg symcode='[[ABCDEGRST]]' 61196aab59a7Smrg fi 61206aab59a7Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 61216aab59a7Smrg 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'" 61226aab59a7Smrg ;; 61236aab59a7Smrglinux*) 61246aab59a7Smrg if test "$host_cpu" = ia64; then 61256aab59a7Smrg symcode='[[ABCDGIRSTW]]' 61266aab59a7Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 61276aab59a7Smrg 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'" 61286aab59a7Smrg fi 61296aab59a7Smrg ;; 61306aab59a7Smrgirix* | nonstopux*) 61316aab59a7Smrg symcode='[[BCDEGRST]]' 61326aab59a7Smrg ;; 61336aab59a7Smrgosf*) 61346aab59a7Smrg symcode='[[BCDEGQRST]]' 61356aab59a7Smrg ;; 61366aab59a7Smrgsolaris*) 61376aab59a7Smrg symcode='[[BDRT]]' 61386aab59a7Smrg ;; 61396aab59a7Smrgsco3.2v5*) 61406aab59a7Smrg symcode='[[DT]]' 61416aab59a7Smrg ;; 61426aab59a7Smrgsysv4.2uw2*) 61436aab59a7Smrg symcode='[[DT]]' 61446aab59a7Smrg ;; 61456aab59a7Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 61466aab59a7Smrg symcode='[[ABDT]]' 61476aab59a7Smrg ;; 61486aab59a7Smrgsysv4) 61496aab59a7Smrg symcode='[[DFNSTU]]' 61506aab59a7Smrg ;; 61516aab59a7Smrgesac 61526aab59a7Smrg 61536aab59a7Smrg# Handle CRLF in mingw tool chain 61546aab59a7Smrgopt_cr= 61556aab59a7Smrgcase $build_os in 61566aab59a7Smrgmingw*) 61576aab59a7Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 61586aab59a7Smrg ;; 61596aab59a7Smrgesac 61606aab59a7Smrg 61616aab59a7Smrg# If we're using GNU nm, then use its standard symbol codes. 61626aab59a7Smrgcase `$NM -V 2>&1` in 61636aab59a7Smrg*GNU* | *'with BFD'*) 61646aab59a7Smrg symcode='[[ABCDGIRSTW]]' ;; 61656aab59a7Smrgesac 61666aab59a7Smrg 61676aab59a7Smrg# Try without a prefix undercore, then with it. 61686aab59a7Smrgfor ac_symprfx in "" "_"; do 61696aab59a7Smrg 61706aab59a7Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 61716aab59a7Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 61726aab59a7Smrg 61736aab59a7Smrg # Write the raw and C identifiers. 61746aab59a7Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 61756aab59a7Smrg 61766aab59a7Smrg # Check to see that the pipe works correctly. 61776aab59a7Smrg pipe_works=no 61786aab59a7Smrg 61796aab59a7Smrg rm -f conftest* 61806aab59a7Smrg cat > conftest.$ac_ext <<EOF 61816aab59a7Smrg#ifdef __cplusplus 61826aab59a7Smrgextern "C" { 61836aab59a7Smrg#endif 61846aab59a7Smrgchar nm_test_var; 61856aab59a7Smrgvoid nm_test_func(){} 61866aab59a7Smrg#ifdef __cplusplus 61876aab59a7Smrg} 61886aab59a7Smrg#endif 61896aab59a7Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 61906aab59a7SmrgEOF 61916aab59a7Smrg 61926aab59a7Smrg if AC_TRY_EVAL(ac_compile); then 61936aab59a7Smrg # Now try to grab the symbols. 61946aab59a7Smrg nlist=conftest.nm 61956aab59a7Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 61966aab59a7Smrg # Try sorting and uniquifying the output. 61976aab59a7Smrg if sort "$nlist" | uniq > "$nlist"T; then 61986aab59a7Smrg mv -f "$nlist"T "$nlist" 61996aab59a7Smrg else 62006aab59a7Smrg rm -f "$nlist"T 62016aab59a7Smrg fi 62026aab59a7Smrg 62036aab59a7Smrg # Make sure that we snagged all the symbols we need. 62046aab59a7Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 62056aab59a7Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 62066aab59a7Smrg cat <<EOF > conftest.$ac_ext 62076aab59a7Smrg#ifdef __cplusplus 62086aab59a7Smrgextern "C" { 62096aab59a7Smrg#endif 62106aab59a7Smrg 62116aab59a7SmrgEOF 62126aab59a7Smrg # Now generate the symbol file. 62136aab59a7Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 62146aab59a7Smrg 62156aab59a7Smrg cat <<EOF >> conftest.$ac_ext 62166aab59a7Smrg#if defined (__STDC__) && __STDC__ 62176aab59a7Smrg# define lt_ptr_t void * 62186aab59a7Smrg#else 62196aab59a7Smrg# define lt_ptr_t char * 62206aab59a7Smrg# define const 62216aab59a7Smrg#endif 62226aab59a7Smrg 62236aab59a7Smrg/* The mapping between symbol names and symbols. */ 62246aab59a7Smrgconst struct { 62256aab59a7Smrg const char *name; 62266aab59a7Smrg lt_ptr_t address; 62276aab59a7Smrg} 62286aab59a7Smrglt_preloaded_symbols[[]] = 62296aab59a7Smrg{ 62306aab59a7SmrgEOF 62316aab59a7Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 62326aab59a7Smrg cat <<\EOF >> conftest.$ac_ext 62336aab59a7Smrg {0, (lt_ptr_t) 0} 62346aab59a7Smrg}; 62356aab59a7Smrg 62366aab59a7Smrg#ifdef __cplusplus 62376aab59a7Smrg} 62386aab59a7Smrg#endif 62396aab59a7SmrgEOF 62406aab59a7Smrg # Now try linking the two files. 62416aab59a7Smrg mv conftest.$ac_objext conftstm.$ac_objext 62426aab59a7Smrg lt_save_LIBS="$LIBS" 62436aab59a7Smrg lt_save_CFLAGS="$CFLAGS" 62446aab59a7Smrg LIBS="conftstm.$ac_objext" 62456aab59a7Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 62466aab59a7Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 62476aab59a7Smrg pipe_works=yes 62486aab59a7Smrg fi 62496aab59a7Smrg LIBS="$lt_save_LIBS" 62506aab59a7Smrg CFLAGS="$lt_save_CFLAGS" 62516aab59a7Smrg else 62526aab59a7Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 62536aab59a7Smrg fi 62546aab59a7Smrg else 62556aab59a7Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 62566aab59a7Smrg fi 62576aab59a7Smrg else 62586aab59a7Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 62596aab59a7Smrg fi 62606aab59a7Smrg else 62616aab59a7Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 62626aab59a7Smrg cat conftest.$ac_ext >&5 62636aab59a7Smrg fi 62646aab59a7Smrg rm -f conftest* conftst* 62656aab59a7Smrg 62666aab59a7Smrg # Do not use the global_symbol_pipe unless it works. 62676aab59a7Smrg if test "$pipe_works" = yes; then 62686aab59a7Smrg break 62696aab59a7Smrg else 62706aab59a7Smrg lt_cv_sys_global_symbol_pipe= 62716aab59a7Smrg fi 62726aab59a7Smrgdone 62736aab59a7Smrg]) 62746aab59a7Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 62756aab59a7Smrg lt_cv_sys_global_symbol_to_cdecl= 62766aab59a7Smrgfi 62776aab59a7Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 62786aab59a7Smrg AC_MSG_RESULT(failed) 62796aab59a7Smrgelse 62806aab59a7Smrg AC_MSG_RESULT(ok) 62816aab59a7Smrgfi 62826aab59a7Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 62836aab59a7Smrg 62846aab59a7Smrg 62856aab59a7Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 62866aab59a7Smrg# --------------------------------------- 62876aab59a7SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 62886aab59a7Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 62896aab59a7Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 62906aab59a7Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 62916aab59a7Smrg 62926aab59a7SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 62936aab59a7Smrg ifelse([$1],[CXX],[ 62946aab59a7Smrg # C++ specific cases for pic, static, wl, etc. 62956aab59a7Smrg if test "$GXX" = yes; then 62966aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 62976aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 62986aab59a7Smrg 62996aab59a7Smrg case $host_os in 63006aab59a7Smrg aix*) 63016aab59a7Smrg # All AIX code is PIC. 63026aab59a7Smrg if test "$host_cpu" = ia64; then 63036aab59a7Smrg # AIX 5 now supports IA64 processor 63046aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 63056aab59a7Smrg fi 63066aab59a7Smrg ;; 63076aab59a7Smrg amigaos*) 63086aab59a7Smrg # FIXME: we need at least 68020 code to build shared libraries, but 63096aab59a7Smrg # adding the `-m68020' flag to GCC prevents building anything better, 63106aab59a7Smrg # like `-m68040'. 63116aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 63126aab59a7Smrg ;; 63136aab59a7Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 63146aab59a7Smrg # PIC is the default for these OSes. 63156aab59a7Smrg ;; 63166aab59a7Smrg mingw* | os2* | pw32*) 63176aab59a7Smrg # This hack is so that the source file can tell whether it is being 63186aab59a7Smrg # built for inclusion in a dll (and should export symbols for example). 63196aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 63206aab59a7Smrg ;; 63216aab59a7Smrg darwin* | rhapsody*) 63226aab59a7Smrg # PIC is the default on this platform 63236aab59a7Smrg # Common symbols not allowed in MH_DYLIB files 63246aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 63256aab59a7Smrg ;; 63266aab59a7Smrg *djgpp*) 63276aab59a7Smrg # DJGPP does not support shared libraries at all 63286aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 63296aab59a7Smrg ;; 63306aab59a7Smrg interix3*) 63316aab59a7Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 63326aab59a7Smrg # Instead, we relocate shared libraries at runtime. 63336aab59a7Smrg ;; 63346aab59a7Smrg sysv4*MP*) 63356aab59a7Smrg if test -d /usr/nec; then 63366aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 63376aab59a7Smrg fi 63386aab59a7Smrg ;; 63396aab59a7Smrg hpux*) 63406aab59a7Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 63416aab59a7Smrg # not for PA HP-UX. 63426aab59a7Smrg case $host_cpu in 63436aab59a7Smrg hppa*64*|ia64*) 63446aab59a7Smrg ;; 63456aab59a7Smrg *) 63466aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 63476aab59a7Smrg ;; 63486aab59a7Smrg esac 63496aab59a7Smrg ;; 63506aab59a7Smrg *) 63516aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 63526aab59a7Smrg ;; 63536aab59a7Smrg esac 63546aab59a7Smrg else 63556aab59a7Smrg case $host_os in 63566aab59a7Smrg aix4* | aix5*) 63576aab59a7Smrg # All AIX code is PIC. 63586aab59a7Smrg if test "$host_cpu" = ia64; then 63596aab59a7Smrg # AIX 5 now supports IA64 processor 63606aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 63616aab59a7Smrg else 63626aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 63636aab59a7Smrg fi 63646aab59a7Smrg ;; 63656aab59a7Smrg chorus*) 63666aab59a7Smrg case $cc_basename in 63676aab59a7Smrg cxch68*) 63686aab59a7Smrg # Green Hills C++ Compiler 63696aab59a7Smrg # _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" 63706aab59a7Smrg ;; 63716aab59a7Smrg esac 63726aab59a7Smrg ;; 63736aab59a7Smrg darwin*) 63746aab59a7Smrg # PIC is the default on this platform 63756aab59a7Smrg # Common symbols not allowed in MH_DYLIB files 63766aab59a7Smrg case $cc_basename in 63776aab59a7Smrg xlc*) 63786aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 63796aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 63806aab59a7Smrg ;; 63816aab59a7Smrg esac 63826aab59a7Smrg ;; 63836aab59a7Smrg dgux*) 63846aab59a7Smrg case $cc_basename in 63856aab59a7Smrg ec++*) 63866aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 63876aab59a7Smrg ;; 63886aab59a7Smrg ghcx*) 63896aab59a7Smrg # Green Hills C++ Compiler 63906aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 63916aab59a7Smrg ;; 63926aab59a7Smrg *) 63936aab59a7Smrg ;; 63946aab59a7Smrg esac 63956aab59a7Smrg ;; 63966aab59a7Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 63976aab59a7Smrg # FreeBSD uses GNU C++ 63986aab59a7Smrg ;; 63996aab59a7Smrg hpux9* | hpux10* | hpux11*) 64006aab59a7Smrg case $cc_basename in 64016aab59a7Smrg CC*) 64026aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 64036aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 64046aab59a7Smrg if test "$host_cpu" != ia64; then 64056aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 64066aab59a7Smrg fi 64076aab59a7Smrg ;; 64086aab59a7Smrg aCC*) 64096aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 64106aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 64116aab59a7Smrg case $host_cpu in 64126aab59a7Smrg hppa*64*|ia64*) 64136aab59a7Smrg # +Z the default 64146aab59a7Smrg ;; 64156aab59a7Smrg *) 64166aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 64176aab59a7Smrg ;; 64186aab59a7Smrg esac 64196aab59a7Smrg ;; 64206aab59a7Smrg *) 64216aab59a7Smrg ;; 64226aab59a7Smrg esac 64236aab59a7Smrg ;; 64246aab59a7Smrg interix*) 64256aab59a7Smrg # This is c89, which is MS Visual C++ (no shared libs) 64266aab59a7Smrg # Anyone wants to do a port? 64276aab59a7Smrg ;; 64286aab59a7Smrg irix5* | irix6* | nonstopux*) 64296aab59a7Smrg case $cc_basename in 64306aab59a7Smrg CC*) 64316aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 64326aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 64336aab59a7Smrg # CC pic flag -KPIC is the default. 64346aab59a7Smrg ;; 64356aab59a7Smrg *) 64366aab59a7Smrg ;; 64376aab59a7Smrg esac 64386aab59a7Smrg ;; 64396aab59a7Smrg linux*) 64406aab59a7Smrg case $cc_basename in 64416aab59a7Smrg KCC*) 64426aab59a7Smrg # KAI C++ Compiler 64436aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 64446aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 64456aab59a7Smrg ;; 64466aab59a7Smrg icpc* | ecpc*) 64476aab59a7Smrg # Intel C++ 64486aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 64496aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 64506aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 64516aab59a7Smrg ;; 64526aab59a7Smrg pgCC*) 64536aab59a7Smrg # Portland Group C++ compiler. 64546aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 64556aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 64566aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 64576aab59a7Smrg ;; 64586aab59a7Smrg cxx*) 64596aab59a7Smrg # Compaq C++ 64606aab59a7Smrg # Make sure the PIC flag is empty. It appears that all Alpha 64616aab59a7Smrg # Linux and Compaq Tru64 Unix objects are PIC. 64626aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 64636aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 64646aab59a7Smrg ;; 64656aab59a7Smrg *) 64666aab59a7Smrg ;; 64676aab59a7Smrg esac 64686aab59a7Smrg ;; 64696aab59a7Smrg lynxos*) 64706aab59a7Smrg ;; 64716aab59a7Smrg m88k*) 64726aab59a7Smrg ;; 64736aab59a7Smrg mvs*) 64746aab59a7Smrg case $cc_basename in 64756aab59a7Smrg cxx*) 64766aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 64776aab59a7Smrg ;; 64786aab59a7Smrg *) 64796aab59a7Smrg ;; 64806aab59a7Smrg esac 64816aab59a7Smrg ;; 64826aab59a7Smrg netbsd*) 64836aab59a7Smrg ;; 64846aab59a7Smrg osf3* | osf4* | osf5*) 64856aab59a7Smrg case $cc_basename in 64866aab59a7Smrg KCC*) 64876aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 64886aab59a7Smrg ;; 64896aab59a7Smrg RCC*) 64906aab59a7Smrg # Rational C++ 2.4.1 64916aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 64926aab59a7Smrg ;; 64936aab59a7Smrg cxx*) 64946aab59a7Smrg # Digital/Compaq C++ 64956aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 64966aab59a7Smrg # Make sure the PIC flag is empty. It appears that all Alpha 64976aab59a7Smrg # Linux and Compaq Tru64 Unix objects are PIC. 64986aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 64996aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 65006aab59a7Smrg ;; 65016aab59a7Smrg *) 65026aab59a7Smrg ;; 65036aab59a7Smrg esac 65046aab59a7Smrg ;; 65056aab59a7Smrg psos*) 65066aab59a7Smrg ;; 65076aab59a7Smrg solaris*) 65086aab59a7Smrg case $cc_basename in 65096aab59a7Smrg CC*) 65106aab59a7Smrg # Sun C++ 4.2, 5.x and Centerline C++ 65116aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 65126aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 65136aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 65146aab59a7Smrg ;; 65156aab59a7Smrg gcx*) 65166aab59a7Smrg # Green Hills C++ Compiler 65176aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 65186aab59a7Smrg ;; 65196aab59a7Smrg *) 65206aab59a7Smrg ;; 65216aab59a7Smrg esac 65226aab59a7Smrg ;; 65236aab59a7Smrg sunos4*) 65246aab59a7Smrg case $cc_basename in 65256aab59a7Smrg CC*) 65266aab59a7Smrg # Sun C++ 4.x 65276aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 65286aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 65296aab59a7Smrg ;; 65306aab59a7Smrg lcc*) 65316aab59a7Smrg # Lucid 65326aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 65336aab59a7Smrg ;; 65346aab59a7Smrg *) 65356aab59a7Smrg ;; 65366aab59a7Smrg esac 65376aab59a7Smrg ;; 65386aab59a7Smrg tandem*) 65396aab59a7Smrg case $cc_basename in 65406aab59a7Smrg NCC*) 65416aab59a7Smrg # NonStop-UX NCC 3.20 65426aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 65436aab59a7Smrg ;; 65446aab59a7Smrg *) 65456aab59a7Smrg ;; 65466aab59a7Smrg esac 65476aab59a7Smrg ;; 65486aab59a7Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 65496aab59a7Smrg case $cc_basename in 65506aab59a7Smrg CC*) 65516aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 65526aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 65536aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 65546aab59a7Smrg ;; 65556aab59a7Smrg esac 65566aab59a7Smrg ;; 65576aab59a7Smrg vxworks*) 65586aab59a7Smrg ;; 65596aab59a7Smrg *) 65606aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 65616aab59a7Smrg ;; 65626aab59a7Smrg esac 65636aab59a7Smrg fi 65646aab59a7Smrg], 65656aab59a7Smrg[ 65666aab59a7Smrg if test "$GCC" = yes; then 65676aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 65686aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 65696aab59a7Smrg 65706aab59a7Smrg case $host_os in 65716aab59a7Smrg aix*) 65726aab59a7Smrg # All AIX code is PIC. 65736aab59a7Smrg if test "$host_cpu" = ia64; then 65746aab59a7Smrg # AIX 5 now supports IA64 processor 65756aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 65766aab59a7Smrg fi 65776aab59a7Smrg ;; 6578659607e0Smrg 65796aab59a7Smrg amigaos*) 65806aab59a7Smrg # FIXME: we need at least 68020 code to build shared libraries, but 65816aab59a7Smrg # adding the `-m68020' flag to GCC prevents building anything better, 65826aab59a7Smrg # like `-m68040'. 65836aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 65846aab59a7Smrg ;; 6585659607e0Smrg 65866aab59a7Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 65876aab59a7Smrg # PIC is the default for these OSes. 65886aab59a7Smrg ;; 6589659607e0Smrg 65906aab59a7Smrg mingw* | pw32* | os2*) 65916aab59a7Smrg # This hack is so that the source file can tell whether it is being 65926aab59a7Smrg # built for inclusion in a dll (and should export symbols for example). 65936aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 65946aab59a7Smrg ;; 6595659607e0Smrg 65966aab59a7Smrg darwin* | rhapsody*) 65976aab59a7Smrg # PIC is the default on this platform 65986aab59a7Smrg # Common symbols not allowed in MH_DYLIB files 65996aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 66006aab59a7Smrg ;; 6601659607e0Smrg 66026aab59a7Smrg interix3*) 66036aab59a7Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 66046aab59a7Smrg # Instead, we relocate shared libraries at runtime. 66056aab59a7Smrg ;; 6606659607e0Smrg 66076aab59a7Smrg msdosdjgpp*) 66086aab59a7Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 66096aab59a7Smrg # on systems that don't support them. 66106aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 66116aab59a7Smrg enable_shared=no 66126aab59a7Smrg ;; 6613659607e0Smrg 66146aab59a7Smrg sysv4*MP*) 66156aab59a7Smrg if test -d /usr/nec; then 66166aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 66176aab59a7Smrg fi 66186aab59a7Smrg ;; 6619659607e0Smrg 66206aab59a7Smrg hpux*) 66216aab59a7Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 66226aab59a7Smrg # not for PA HP-UX. 66236aab59a7Smrg case $host_cpu in 66246aab59a7Smrg hppa*64*|ia64*) 66256aab59a7Smrg # +Z the default 66266aab59a7Smrg ;; 66276aab59a7Smrg *) 66286aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 66296aab59a7Smrg ;; 66306aab59a7Smrg esac 66316aab59a7Smrg ;; 6632659607e0Smrg 66336aab59a7Smrg *) 66346aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 66356aab59a7Smrg ;; 66366aab59a7Smrg esac 66376aab59a7Smrg else 66386aab59a7Smrg # PORTME Check for flag to pass linker flags through the system compiler. 66396aab59a7Smrg case $host_os in 66406aab59a7Smrg aix*) 66416aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 66426aab59a7Smrg if test "$host_cpu" = ia64; then 66436aab59a7Smrg # AIX 5 now supports IA64 processor 66446aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 66456aab59a7Smrg else 66466aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 66476aab59a7Smrg fi 66486aab59a7Smrg ;; 66496aab59a7Smrg darwin*) 66506aab59a7Smrg # PIC is the default on this platform 66516aab59a7Smrg # Common symbols not allowed in MH_DYLIB files 66526aab59a7Smrg case $cc_basename in 66536aab59a7Smrg xlc*) 66546aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 66556aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 66566aab59a7Smrg ;; 66576aab59a7Smrg esac 66586aab59a7Smrg ;; 6659659607e0Smrg 66606aab59a7Smrg mingw* | pw32* | os2*) 66616aab59a7Smrg # This hack is so that the source file can tell whether it is being 66626aab59a7Smrg # built for inclusion in a dll (and should export symbols for example). 66636aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 66646aab59a7Smrg ;; 6665659607e0Smrg 66666aab59a7Smrg hpux9* | hpux10* | hpux11*) 66676aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 66686aab59a7Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 66696aab59a7Smrg # not for PA HP-UX. 66706aab59a7Smrg case $host_cpu in 66716aab59a7Smrg hppa*64*|ia64*) 66726aab59a7Smrg # +Z the default 66736aab59a7Smrg ;; 66746aab59a7Smrg *) 66756aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 66766aab59a7Smrg ;; 66776aab59a7Smrg esac 66786aab59a7Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 66796aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 66806aab59a7Smrg ;; 6681659607e0Smrg 66826aab59a7Smrg irix5* | irix6* | nonstopux*) 66836aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 66846aab59a7Smrg # PIC (with -KPIC) is the default. 66856aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 66866aab59a7Smrg ;; 6687659607e0Smrg 66886aab59a7Smrg newsos6) 66896aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 66906aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 66916aab59a7Smrg ;; 6692659607e0Smrg 66936aab59a7Smrg linux*) 66946aab59a7Smrg case $cc_basename in 66956aab59a7Smrg icc* | ecc*) 66966aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 66976aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 66986aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 66996aab59a7Smrg ;; 67006aab59a7Smrg pgcc* | pgf77* | pgf90* | pgf95*) 67016aab59a7Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 67026aab59a7Smrg # which looks to be a dead project) 67036aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 67046aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 67056aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 67066aab59a7Smrg ;; 67076aab59a7Smrg ccc*) 67086aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 67096aab59a7Smrg # All Alpha code is PIC. 67106aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 67116aab59a7Smrg ;; 67126aab59a7Smrg esac 67136aab59a7Smrg ;; 6714659607e0Smrg 67156aab59a7Smrg osf3* | osf4* | osf5*) 67166aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 67176aab59a7Smrg # All OSF/1 code is PIC. 67186aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 67196aab59a7Smrg ;; 6720659607e0Smrg 67216aab59a7Smrg solaris*) 67226aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 67236aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 67246aab59a7Smrg case $cc_basename in 67256aab59a7Smrg f77* | f90* | f95*) 67266aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 67276aab59a7Smrg *) 67286aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 67296aab59a7Smrg esac 67306aab59a7Smrg ;; 6731659607e0Smrg 67326aab59a7Smrg sunos4*) 67336aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 67346aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 67356aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 67366aab59a7Smrg ;; 6737659607e0Smrg 67386aab59a7Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 67396aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 67406aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 67416aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 67426aab59a7Smrg ;; 6743659607e0Smrg 67446aab59a7Smrg sysv4*MP*) 67456aab59a7Smrg if test -d /usr/nec ;then 67466aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 67476aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 67486aab59a7Smrg fi 67496aab59a7Smrg ;; 6750659607e0Smrg 67516aab59a7Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 67526aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 67536aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 67546aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 67556aab59a7Smrg ;; 6756659607e0Smrg 67576aab59a7Smrg unicos*) 67586aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 67596aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 67606aab59a7Smrg ;; 6761659607e0Smrg 67626aab59a7Smrg uts4*) 67636aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 67646aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 67656aab59a7Smrg ;; 6766659607e0Smrg 67676aab59a7Smrg *) 67686aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 67696aab59a7Smrg ;; 67706aab59a7Smrg esac 67716aab59a7Smrg fi 6772659607e0Smrg]) 67736aab59a7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 6774659607e0Smrg 67756aab59a7Smrg# 67766aab59a7Smrg# Check to make sure the PIC flag actually works. 67776aab59a7Smrg# 67786aab59a7Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 67796aab59a7Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 67806aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 67816aab59a7Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 67826aab59a7Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 67836aab59a7Smrg "" | " "*) ;; 67846aab59a7Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 67856aab59a7Smrg esac], 67866aab59a7Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 67876aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 67886aab59a7Smrgfi 67896aab59a7Smrgcase $host_os in 67906aab59a7Smrg # For platforms which do not support PIC, -DPIC is meaningless: 67916aab59a7Smrg *djgpp*) 67926aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 67936aab59a7Smrg ;; 67946aab59a7Smrg *) 67956aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 67966aab59a7Smrg ;; 67976aab59a7Smrgesac 6798659607e0Smrg 67996aab59a7Smrg# 68006aab59a7Smrg# Check to make sure the static flag actually works. 68016aab59a7Smrg# 68026aab59a7Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 68036aab59a7SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 68046aab59a7Smrg _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 68056aab59a7Smrg $lt_tmp_static_flag, 68066aab59a7Smrg [], 68076aab59a7Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 6808659607e0Smrg]) 6809659607e0Smrg 6810659607e0Smrg 68116aab59a7Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 68126aab59a7Smrg# ------------------------------------ 68136aab59a7Smrg# See if the linker supports building shared libraries. 68146aab59a7SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 68156aab59a7Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 68166aab59a7Smrgifelse([$1],[CXX],[ 68176aab59a7Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 68186aab59a7Smrg case $host_os in 68196aab59a7Smrg aix4* | aix5*) 68206aab59a7Smrg # If we're using GNU nm, then we don't want the "-C" option. 68216aab59a7Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 68226aab59a7Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 68236aab59a7Smrg _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' 68246aab59a7Smrg else 68256aab59a7Smrg _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' 68266aab59a7Smrg fi 68276aab59a7Smrg ;; 68286aab59a7Smrg pw32*) 68296aab59a7Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 68306aab59a7Smrg ;; 68316aab59a7Smrg cygwin* | mingw*) 68326aab59a7Smrg _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' 68336aab59a7Smrg ;; 68346aab59a7Smrg *) 68356aab59a7Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 68366aab59a7Smrg ;; 68376aab59a7Smrg esac 68386aab59a7Smrg],[ 68396aab59a7Smrg runpath_var= 68406aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 68416aab59a7Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 68426aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 68436aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 68446aab59a7Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 68456aab59a7Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 68466aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 68476aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 68486aab59a7Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 68496aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 68506aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 68516aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 68526aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 68536aab59a7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 68546aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 68556aab59a7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 68566aab59a7Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 68576aab59a7Smrg _LT_AC_TAGVAR(module_cmds, $1)= 68586aab59a7Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 68596aab59a7Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 68606aab59a7Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 68616aab59a7Smrg # include_expsyms should be a list of space-separated symbols to be *always* 68626aab59a7Smrg # included in the symbol list 68636aab59a7Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 68646aab59a7Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 68656aab59a7Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 68666aab59a7Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 68676aab59a7Smrg # as well as any symbol that contains `d'. 68686aab59a7Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 68696aab59a7Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 68706aab59a7Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 68716aab59a7Smrg # the symbol is explicitly referenced. Since portable code cannot 68726aab59a7Smrg # rely on this symbol name, it's probably fine to never include it in 68736aab59a7Smrg # preloaded symbol tables. 68746aab59a7Smrg extract_expsyms_cmds= 68756aab59a7Smrg # Just being paranoid about ensuring that cc_basename is set. 68766aab59a7Smrg _LT_CC_BASENAME([$compiler]) 68776aab59a7Smrg case $host_os in 68786aab59a7Smrg cygwin* | mingw* | pw32*) 68796aab59a7Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 68806aab59a7Smrg # When not using gcc, we currently assume that we are using 68816aab59a7Smrg # Microsoft Visual C++. 68826aab59a7Smrg if test "$GCC" != yes; then 68836aab59a7Smrg with_gnu_ld=no 68846aab59a7Smrg fi 68856aab59a7Smrg ;; 68866aab59a7Smrg interix*) 68876aab59a7Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 68886aab59a7Smrg with_gnu_ld=yes 68896aab59a7Smrg ;; 68906aab59a7Smrg openbsd*) 68916aab59a7Smrg with_gnu_ld=no 68926aab59a7Smrg ;; 68936aab59a7Smrg esac 68946aab59a7Smrg 68956aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 68966aab59a7Smrg if test "$with_gnu_ld" = yes; then 68976aab59a7Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 68986aab59a7Smrg wlarc='${wl}' 68996aab59a7Smrg 69006aab59a7Smrg # Set some defaults for GNU ld with shared library support. These 69016aab59a7Smrg # are reset later if shared libraries are not supported. Putting them 69026aab59a7Smrg # here allows them to be overridden if necessary. 69036aab59a7Smrg runpath_var=LD_RUN_PATH 69046aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 69056aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 69066aab59a7Smrg # ancient GNU ld didn't support --whole-archive et. al. 69076aab59a7Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 69086aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 69096aab59a7Smrg else 69106aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 69116aab59a7Smrg fi 69126aab59a7Smrg supports_anon_versioning=no 69136aab59a7Smrg case `$LD -v 2>/dev/null` in 69146aab59a7Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 69156aab59a7Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 69166aab59a7Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 69176aab59a7Smrg *\ 2.11.*) ;; # other 2.11 versions 69186aab59a7Smrg *) supports_anon_versioning=yes ;; 69196aab59a7Smrg esac 6920659607e0Smrg 69216aab59a7Smrg # See if GNU ld supports shared libraries. 69226aab59a7Smrg case $host_os in 69236aab59a7Smrg aix3* | aix4* | aix5*) 69246aab59a7Smrg # On AIX/PPC, the GNU linker is very broken 69256aab59a7Smrg if test "$host_cpu" != ia64; then 69266aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 69276aab59a7Smrg cat <<EOF 1>&2 6928659607e0Smrg 69296aab59a7Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 69306aab59a7Smrg*** to be unable to reliably create shared libraries on AIX. 69316aab59a7Smrg*** Therefore, libtool is disabling shared libraries support. If you 69326aab59a7Smrg*** really care for shared libraries, you may want to modify your PATH 69336aab59a7Smrg*** so that a non-GNU linker is found, and then restart. 6934659607e0Smrg 69356aab59a7SmrgEOF 69366aab59a7Smrg fi 69376aab59a7Smrg ;; 6938659607e0Smrg 69396aab59a7Smrg amigaos*) 69406aab59a7Smrg _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)' 69416aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 69426aab59a7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6943659607e0Smrg 69446aab59a7Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 69456aab59a7Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 69466aab59a7Smrg # to version 4, is to share data among multiple programs linked 69476aab59a7Smrg # with the same dynamic library. Since this doesn't match the 69486aab59a7Smrg # behavior of shared libraries on other platforms, we can't use 69496aab59a7Smrg # them. 69506aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 69516aab59a7Smrg ;; 6952659607e0Smrg 69536aab59a7Smrg beos*) 69546aab59a7Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 69556aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 69566aab59a7Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 69576aab59a7Smrg # support --undefined. This deserves some investigation. FIXME 69586aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 69596aab59a7Smrg else 69606aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 69616aab59a7Smrg fi 69626aab59a7Smrg ;; 6963659607e0Smrg 69646aab59a7Smrg cygwin* | mingw* | pw32*) 69656aab59a7Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 69666aab59a7Smrg # as there is no search path for DLLs. 69676aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 69686aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 69696aab59a7Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 69706aab59a7Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 69716aab59a7Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' 6972659607e0Smrg 69736aab59a7Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 69746aab59a7Smrg _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' 69756aab59a7Smrg # If the export-symbols file already is a .def file (1st line 69766aab59a7Smrg # is EXPORTS), use it as is; otherwise, prepend... 69776aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 69786aab59a7Smrg cp $export_symbols $output_objdir/$soname.def; 69796aab59a7Smrg else 69806aab59a7Smrg echo EXPORTS > $output_objdir/$soname.def; 69816aab59a7Smrg cat $export_symbols >> $output_objdir/$soname.def; 69826aab59a7Smrg fi~ 69836aab59a7Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 69846aab59a7Smrg else 69856aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 69866aab59a7Smrg fi 69876aab59a7Smrg ;; 6988659607e0Smrg 69896aab59a7Smrg interix3*) 69906aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 69916aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 69926aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 69936aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 69946aab59a7Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 69956aab59a7Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 69966aab59a7Smrg # default) and relocated if they conflict, which is a slow very memory 69976aab59a7Smrg # consuming and fragmenting process. To avoid this, we pick a random, 69986aab59a7Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 69996aab59a7Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 70006aab59a7Smrg _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' 70016aab59a7Smrg _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' 70026aab59a7Smrg ;; 7003659607e0Smrg 70046aab59a7Smrg linux*) 70056aab59a7Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 70066aab59a7Smrg tmp_addflag= 70076aab59a7Smrg case $cc_basename,$host_cpu in 70086aab59a7Smrg pgcc*) # Portland Group C compiler 70096aab59a7Smrg _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' 70106aab59a7Smrg tmp_addflag=' $pic_flag' 70116aab59a7Smrg ;; 70126aab59a7Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 70136aab59a7Smrg _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' 70146aab59a7Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 70156aab59a7Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 70166aab59a7Smrg tmp_addflag=' -i_dynamic' ;; 70176aab59a7Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 70186aab59a7Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 70196aab59a7Smrg ifc* | ifort*) # Intel Fortran compiler 70206aab59a7Smrg tmp_addflag=' -nofor_main' ;; 70216aab59a7Smrg esac 70226aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7023659607e0Smrg 70246aab59a7Smrg if test $supports_anon_versioning = yes; then 70256aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 70266aab59a7Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 70276aab59a7Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 70286aab59a7Smrg $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 70296aab59a7Smrg fi 70306aab59a7Smrg else 70316aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 70326aab59a7Smrg fi 70336aab59a7Smrg ;; 7034659607e0Smrg 70356aab59a7Smrg netbsd*) 70366aab59a7Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 70376aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 70386aab59a7Smrg wlarc= 70396aab59a7Smrg else 70406aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 70416aab59a7Smrg _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' 70426aab59a7Smrg fi 70436aab59a7Smrg ;; 7044659607e0Smrg 70456aab59a7Smrg solaris*) 70466aab59a7Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 70476aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 70486aab59a7Smrg cat <<EOF 1>&2 7049659607e0Smrg 70506aab59a7Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 70516aab59a7Smrg*** create shared libraries on Solaris systems. Therefore, libtool 70526aab59a7Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 70536aab59a7Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 70546aab59a7Smrg*** your PATH or compiler configuration so that the native linker is 70556aab59a7Smrg*** used, and then restart. 7056659607e0Smrg 70576aab59a7SmrgEOF 70586aab59a7Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 70596aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 70606aab59a7Smrg _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' 70616aab59a7Smrg else 70626aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 70636aab59a7Smrg fi 70646aab59a7Smrg ;; 7065659607e0Smrg 70666aab59a7Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 70676aab59a7Smrg case `$LD -v 2>&1` in 70686aab59a7Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 70696aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 70706aab59a7Smrg cat <<_LT_EOF 1>&2 7071659607e0Smrg 70726aab59a7Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 70736aab59a7Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 70746aab59a7Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 70756aab59a7Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 70766aab59a7Smrg*** your PATH or compiler configuration so that the native linker is 70776aab59a7Smrg*** used, and then restart. 7078659607e0Smrg 70796aab59a7Smrg_LT_EOF 70806aab59a7Smrg ;; 70816aab59a7Smrg *) 70826aab59a7Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 70836aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 70846aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 70856aab59a7Smrg _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' 70866aab59a7Smrg else 70876aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 70886aab59a7Smrg fi 70896aab59a7Smrg ;; 70906aab59a7Smrg esac 70916aab59a7Smrg ;; 7092659607e0Smrg 70936aab59a7Smrg sunos4*) 70946aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 70956aab59a7Smrg wlarc= 70966aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 70976aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 70986aab59a7Smrg ;; 70996aab59a7Smrg 71006aab59a7Smrg *) 71016aab59a7Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 71026aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 71036aab59a7Smrg _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' 7104659607e0Smrg else 71056aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7106659607e0Smrg fi 7107659607e0Smrg ;; 7108659607e0Smrg esac 7109659607e0Smrg 71106aab59a7Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 71116aab59a7Smrg runpath_var= 71126aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 71136aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 71146aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 71156aab59a7Smrg fi 71166aab59a7Smrg else 71176aab59a7Smrg # PORTME fill in a description of your system's linker (not GNU ld) 71186aab59a7Smrg case $host_os in 71196aab59a7Smrg aix3*) 71206aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 71216aab59a7Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 71226aab59a7Smrg _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' 71236aab59a7Smrg # Note: this linker hardcodes the directories in LIBPATH if there 71246aab59a7Smrg # are no directories specified by -L. 71256aab59a7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 71266aab59a7Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 71276aab59a7Smrg # Neither direct hardcoding nor static linking is supported with a 71286aab59a7Smrg # broken collect2. 71296aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 71306aab59a7Smrg fi 71316aab59a7Smrg ;; 7132659607e0Smrg 71336aab59a7Smrg aix4* | aix5*) 71346aab59a7Smrg if test "$host_cpu" = ia64; then 71356aab59a7Smrg # On IA64, the linker does run time linking by default, so we don't 71366aab59a7Smrg # have to do anything special. 71376aab59a7Smrg aix_use_runtimelinking=no 71386aab59a7Smrg exp_sym_flag='-Bexport' 71396aab59a7Smrg no_entry_flag="" 71406aab59a7Smrg else 71416aab59a7Smrg # If we're using GNU nm, then we don't want the "-C" option. 71426aab59a7Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 71436aab59a7Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 71446aab59a7Smrg _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' 71456aab59a7Smrg else 71466aab59a7Smrg _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' 71476aab59a7Smrg fi 71486aab59a7Smrg aix_use_runtimelinking=no 7149659607e0Smrg 71506aab59a7Smrg # Test if we are trying to use run time linking or normal 71516aab59a7Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 71526aab59a7Smrg # need to do runtime linking. 71536aab59a7Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 71546aab59a7Smrg for ld_flag in $LDFLAGS; do 71556aab59a7Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 71566aab59a7Smrg aix_use_runtimelinking=yes 71576aab59a7Smrg break 71586aab59a7Smrg fi 71596aab59a7Smrg done 71606aab59a7Smrg ;; 71616aab59a7Smrg esac 7162659607e0Smrg 71636aab59a7Smrg exp_sym_flag='-bexport' 71646aab59a7Smrg no_entry_flag='-bnoentry' 71656aab59a7Smrg fi 7166659607e0Smrg 71676aab59a7Smrg # When large executables or shared objects are built, AIX ld can 71686aab59a7Smrg # have problems creating the table of contents. If linking a library 71696aab59a7Smrg # or program results in "error TOC overflow" add -mminimal-toc to 71706aab59a7Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 71716aab59a7Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7172659607e0Smrg 71736aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 71746aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 71756aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 71766aab59a7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7177659607e0Smrg 71786aab59a7Smrg if test "$GCC" = yes; then 71796aab59a7Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 71806aab59a7Smrg # We only want to do this on AIX 4.2 and lower, the check 71816aab59a7Smrg # below for broken collect2 doesn't work under 4.3+ 71826aab59a7Smrg collect2name=`${CC} -print-prog-name=collect2` 71836aab59a7Smrg if test -f "$collect2name" && \ 71846aab59a7Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 71856aab59a7Smrg then 71866aab59a7Smrg # We have reworked collect2 71876aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 71886aab59a7Smrg else 71896aab59a7Smrg # We have old collect2 71906aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 71916aab59a7Smrg # It fails to find uninstalled libraries when the uninstalled 71926aab59a7Smrg # path is not listed in the libpath. Setting hardcode_minus_L 71936aab59a7Smrg # to unsupported forces relinking 71946aab59a7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 71956aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 71966aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 71976aab59a7Smrg fi 71986aab59a7Smrg ;; 71996aab59a7Smrg esac 72006aab59a7Smrg shared_flag='-shared' 72016aab59a7Smrg if test "$aix_use_runtimelinking" = yes; then 72026aab59a7Smrg shared_flag="$shared_flag "'${wl}-G' 72036aab59a7Smrg fi 72046aab59a7Smrg else 72056aab59a7Smrg # not using gcc 72066aab59a7Smrg if test "$host_cpu" = ia64; then 72076aab59a7Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 72086aab59a7Smrg # chokes on -Wl,-G. The following line is correct: 72096aab59a7Smrg shared_flag='-G' 72106aab59a7Smrg else 72116aab59a7Smrg if test "$aix_use_runtimelinking" = yes; then 72126aab59a7Smrg shared_flag='${wl}-G' 72136aab59a7Smrg else 72146aab59a7Smrg shared_flag='${wl}-bM:SRE' 72156aab59a7Smrg fi 72166aab59a7Smrg fi 72176aab59a7Smrg fi 7218659607e0Smrg 72196aab59a7Smrg # It seems that -bexpall does not export symbols beginning with 72206aab59a7Smrg # underscore (_), so it is better to generate a list of symbols to export. 72216aab59a7Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 72226aab59a7Smrg if test "$aix_use_runtimelinking" = yes; then 72236aab59a7Smrg # Warning - without using the other runtime loading flags (-brtl), 72246aab59a7Smrg # -berok will link without error, but may produce a broken library. 72256aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 72266aab59a7Smrg # Determine the default libpath from the value encoded in an empty executable. 72276aab59a7Smrg _LT_AC_SYS_LIBPATH_AIX 72286aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 72296aab59a7Smrg _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" 72306aab59a7Smrg else 72316aab59a7Smrg if test "$host_cpu" = ia64; then 72326aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 72336aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 72346aab59a7Smrg _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" 72356aab59a7Smrg else 72366aab59a7Smrg # Determine the default libpath from the value encoded in an empty executable. 72376aab59a7Smrg _LT_AC_SYS_LIBPATH_AIX 72386aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 72396aab59a7Smrg # Warning - without using the other run time loading flags, 72406aab59a7Smrg # -berok will link without error, but may produce a broken library. 72416aab59a7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 72426aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 72436aab59a7Smrg # Exported symbols can be pulled into shared objects from archives 72446aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 72456aab59a7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 72466aab59a7Smrg # This is similar to how AIX traditionally builds its shared libraries. 72476aab59a7Smrg _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' 72486aab59a7Smrg fi 72496aab59a7Smrg fi 72506aab59a7Smrg ;; 7251659607e0Smrg 72526aab59a7Smrg amigaos*) 72536aab59a7Smrg _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)' 72546aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 72556aab59a7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 72566aab59a7Smrg # see comment about different semantics on the GNU ld section 72576aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 72586aab59a7Smrg ;; 7259659607e0Smrg 72606aab59a7Smrg bsdi[[45]]*) 72616aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 72626aab59a7Smrg ;; 7263659607e0Smrg 72646aab59a7Smrg cygwin* | mingw* | pw32*) 72656aab59a7Smrg # When not using gcc, we currently assume that we are using 72666aab59a7Smrg # Microsoft Visual C++. 72676aab59a7Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 72686aab59a7Smrg # no search path for DLLs. 72696aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 72706aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 72716aab59a7Smrg # Tell ltmain to make .lib files, not .a files. 72726aab59a7Smrg libext=lib 72736aab59a7Smrg # Tell ltmain to make .dll files, not .so files. 72746aab59a7Smrg shrext_cmds=".dll" 72756aab59a7Smrg # FIXME: Setting linknames here is a bad hack. 72766aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 72776aab59a7Smrg # The linker will automatically build a .lib file if we build a DLL. 72786aab59a7Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 72796aab59a7Smrg # FIXME: Should let the user specify the lib program. 72806aab59a7Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 72816aab59a7Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 72826aab59a7Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 72836aab59a7Smrg ;; 7284659607e0Smrg 72856aab59a7Smrg darwin* | rhapsody*) 72866aab59a7Smrg case $host_os in 72876aab59a7Smrg rhapsody* | darwin1.[[012]]) 72886aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 72896aab59a7Smrg ;; 72906aab59a7Smrg *) # Darwin 1.3 on 72916aab59a7Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 72926aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 72936aab59a7Smrg else 72946aab59a7Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 72956aab59a7Smrg 10.[[012]]) 72966aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 72976aab59a7Smrg ;; 72986aab59a7Smrg 10.*) 72996aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 73006aab59a7Smrg ;; 73016aab59a7Smrg esac 73026aab59a7Smrg fi 73036aab59a7Smrg ;; 73046aab59a7Smrg esac 73056aab59a7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 73066aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 73076aab59a7Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 73086aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 73096aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 73106aab59a7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 73116aab59a7Smrg if test "$GCC" = yes ; then 73126aab59a7Smrg output_verbose_link_cmd='echo' 73136aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 73146aab59a7Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 73156aab59a7Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 73166aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 73176aab59a7Smrg _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}' 73186aab59a7Smrg else 73196aab59a7Smrg case $cc_basename in 73206aab59a7Smrg xlc*) 73216aab59a7Smrg output_verbose_link_cmd='echo' 73226aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' 73236aab59a7Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 73246aab59a7Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 73256aab59a7Smrg _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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 73266aab59a7Smrg _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}' 73276aab59a7Smrg ;; 73286aab59a7Smrg *) 73296aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 73306aab59a7Smrg ;; 73316aab59a7Smrg esac 73326aab59a7Smrg fi 73336aab59a7Smrg ;; 73346aab59a7Smrg 73356aab59a7Smrg dgux*) 73366aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 73376aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 73386aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 73396aab59a7Smrg ;; 7340659607e0Smrg 73416aab59a7Smrg freebsd1*) 73426aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 73436aab59a7Smrg ;; 7344659607e0Smrg 73456aab59a7Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 73466aab59a7Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 73476aab59a7Smrg # does not break anything, and helps significantly (at the cost of a little 73486aab59a7Smrg # extra space). 73496aab59a7Smrg freebsd2.2*) 73506aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 73516aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 73526aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 73536aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 73546aab59a7Smrg ;; 7355659607e0Smrg 73566aab59a7Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 73576aab59a7Smrg freebsd2*) 73586aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 73596aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 73606aab59a7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 73616aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 73626aab59a7Smrg ;; 7363659607e0Smrg 73646aab59a7Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 73656aab59a7Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 73666aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 73676aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 73686aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 73696aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 73706aab59a7Smrg ;; 7371659607e0Smrg 73726aab59a7Smrg hpux9*) 73736aab59a7Smrg if test "$GCC" = yes; then 73746aab59a7Smrg _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' 73756aab59a7Smrg else 73766aab59a7Smrg _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' 73776aab59a7Smrg fi 73786aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 73796aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 73806aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7381659607e0Smrg 73826aab59a7Smrg # hardcode_minus_L: Not really in the search PATH, 73836aab59a7Smrg # but as the default location of the library. 73846aab59a7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 73856aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73866aab59a7Smrg ;; 7387659607e0Smrg 73886aab59a7Smrg hpux10*) 73896aab59a7Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 73906aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 73916aab59a7Smrg else 73926aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 73936aab59a7Smrg fi 73946aab59a7Smrg if test "$with_gnu_ld" = no; then 73956aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 73966aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7397659607e0Smrg 73986aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 73996aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7400659607e0Smrg 74016aab59a7Smrg # hardcode_minus_L: Not really in the search PATH, 74026aab59a7Smrg # but as the default location of the library. 74036aab59a7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 74046aab59a7Smrg fi 74056aab59a7Smrg ;; 7406659607e0Smrg 74076aab59a7Smrg hpux11*) 74086aab59a7Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 74096aab59a7Smrg case $host_cpu in 74106aab59a7Smrg hppa*64*) 74116aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 74126aab59a7Smrg ;; 74136aab59a7Smrg ia64*) 74146aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 74156aab59a7Smrg ;; 74166aab59a7Smrg *) 74176aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 74186aab59a7Smrg ;; 74196aab59a7Smrg esac 74206aab59a7Smrg else 74216aab59a7Smrg case $host_cpu in 74226aab59a7Smrg hppa*64*) 74236aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 74246aab59a7Smrg ;; 74256aab59a7Smrg ia64*) 74266aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 74276aab59a7Smrg ;; 74286aab59a7Smrg *) 74296aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 74306aab59a7Smrg ;; 74316aab59a7Smrg esac 74326aab59a7Smrg fi 74336aab59a7Smrg if test "$with_gnu_ld" = no; then 74346aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 74356aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7436659607e0Smrg 74376aab59a7Smrg case $host_cpu in 74386aab59a7Smrg hppa*64*|ia64*) 74396aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 74406aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 74416aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 74426aab59a7Smrg ;; 74436aab59a7Smrg *) 74446aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 74456aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7446659607e0Smrg 74476aab59a7Smrg # hardcode_minus_L: Not really in the search PATH, 74486aab59a7Smrg # but as the default location of the library. 74496aab59a7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 74506aab59a7Smrg ;; 74516aab59a7Smrg esac 74526aab59a7Smrg fi 74536aab59a7Smrg ;; 7454659607e0Smrg 74556aab59a7Smrg irix5* | irix6* | nonstopux*) 74566aab59a7Smrg if test "$GCC" = yes; then 74576aab59a7Smrg _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' 74586aab59a7Smrg else 74596aab59a7Smrg _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' 74606aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 74616aab59a7Smrg fi 74626aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 74636aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 74646aab59a7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 74656aab59a7Smrg ;; 7466659607e0Smrg 74676aab59a7Smrg netbsd*) 74686aab59a7Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 74696aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 74706aab59a7Smrg else 74716aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 74726aab59a7Smrg fi 74736aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 74746aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 74756aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 74766aab59a7Smrg ;; 7477659607e0Smrg 74786aab59a7Smrg newsos6) 74796aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 74806aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 74816aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 74826aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 74836aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 74846aab59a7Smrg ;; 7485659607e0Smrg 74866aab59a7Smrg openbsd*) 74876aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 74886aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 74896aab59a7Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 74906aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 74916aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 74926aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74936aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74946aab59a7Smrg else 74956aab59a7Smrg case $host_os in 74966aab59a7Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 74976aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 74986aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 74996aab59a7Smrg ;; 75006aab59a7Smrg *) 75016aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 75026aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75036aab59a7Smrg ;; 75046aab59a7Smrg esac 75056aab59a7Smrg fi 75066aab59a7Smrg ;; 7507659607e0Smrg 75086aab59a7Smrg os2*) 75096aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 75106aab59a7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 75116aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 75126aab59a7Smrg _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' 75136aab59a7Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 75146aab59a7Smrg ;; 7515659607e0Smrg 75166aab59a7Smrg osf3*) 75176aab59a7Smrg if test "$GCC" = yes; then 75186aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 75196aab59a7Smrg _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' 75206aab59a7Smrg else 75216aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 75226aab59a7Smrg _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' 75236aab59a7Smrg fi 75246aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 75256aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 75266aab59a7Smrg ;; 7527659607e0Smrg 75286aab59a7Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 75296aab59a7Smrg if test "$GCC" = yes; then 75306aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 75316aab59a7Smrg _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' 75326aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 75336aab59a7Smrg else 75346aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 75356aab59a7Smrg _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' 75366aab59a7Smrg _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~ 75376aab59a7Smrg $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' 7538659607e0Smrg 75396aab59a7Smrg # Both c and cxx compiler support -rpath directly 75406aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 75416aab59a7Smrg fi 75426aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 75436aab59a7Smrg ;; 7544659607e0Smrg 75456aab59a7Smrg solaris*) 75466aab59a7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 75476aab59a7Smrg if test "$GCC" = yes; then 75486aab59a7Smrg wlarc='${wl}' 75496aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 75506aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 75516aab59a7Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 75526aab59a7Smrg else 75536aab59a7Smrg wlarc='' 75546aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 75556aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 75566aab59a7Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 75576aab59a7Smrg fi 75586aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 75596aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 75606aab59a7Smrg case $host_os in 75616aab59a7Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 75626aab59a7Smrg *) 75636aab59a7Smrg # The compiler driver will combine linker options so we 75646aab59a7Smrg # cannot just pass the convience library names through 75656aab59a7Smrg # without $wl, iff we do not link with $LD. 75666aab59a7Smrg # Luckily, gcc supports the same syntax we need for Sun Studio. 75676aab59a7Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 75686aab59a7Smrg case $wlarc in 75696aab59a7Smrg '') 75706aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 75716aab59a7Smrg *) 75726aab59a7Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; 75736aab59a7Smrg esac ;; 75746aab59a7Smrg esac 75756aab59a7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 75766aab59a7Smrg ;; 7577659607e0Smrg 75786aab59a7Smrg sunos4*) 75796aab59a7Smrg if test "x$host_vendor" = xsequent; then 75806aab59a7Smrg # Use $CC to link under sequent, because it throws in some extra .o 75816aab59a7Smrg # files that make .init and .fini sections work. 75826aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 75836aab59a7Smrg else 75846aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 75856aab59a7Smrg fi 75866aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 75876aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 75886aab59a7Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 75896aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 75906aab59a7Smrg ;; 7591659607e0Smrg 75926aab59a7Smrg sysv4) 75936aab59a7Smrg case $host_vendor in 75946aab59a7Smrg sni) 75956aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 75966aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 75976aab59a7Smrg ;; 75986aab59a7Smrg siemens) 75996aab59a7Smrg ## LD is ld it makes a PLAMLIB 76006aab59a7Smrg ## CC just makes a GrossModule. 76016aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 76026aab59a7Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 76036aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 76046aab59a7Smrg ;; 76056aab59a7Smrg motorola) 76066aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 76076aab59a7Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 76086aab59a7Smrg ;; 76096aab59a7Smrg esac 76106aab59a7Smrg runpath_var='LD_RUN_PATH' 76116aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 76126aab59a7Smrg ;; 7613659607e0Smrg 76146aab59a7Smrg sysv4.3*) 76156aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 76166aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 76176aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 76186aab59a7Smrg ;; 7619659607e0Smrg 76206aab59a7Smrg sysv4*MP*) 76216aab59a7Smrg if test -d /usr/nec; then 76226aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 76236aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 76246aab59a7Smrg runpath_var=LD_RUN_PATH 76256aab59a7Smrg hardcode_runpath_var=yes 76266aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 76276aab59a7Smrg fi 76286aab59a7Smrg ;; 7629659607e0Smrg 76306aab59a7Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) 76316aab59a7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 76326aab59a7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 76336aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 76346aab59a7Smrg runpath_var='LD_RUN_PATH' 7635659607e0Smrg 76366aab59a7Smrg if test "$GCC" = yes; then 76376aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 76386aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 76396aab59a7Smrg else 76406aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 76416aab59a7Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 76426aab59a7Smrg fi 76436aab59a7Smrg ;; 7644659607e0Smrg 76456aab59a7Smrg sysv5* | sco3.2v5* | sco5v6*) 76466aab59a7Smrg # Note: We can NOT use -z defs as we might desire, because we do not 76476aab59a7Smrg # link with -lc, and that would cause any symbols used from libc to 76486aab59a7Smrg # always be unresolved, which means just about no library would 76496aab59a7Smrg # ever link correctly. If we're not using GNU ld we use -z text 76506aab59a7Smrg # though, which does catch some bad symbols but isn't as heavy-handed 76516aab59a7Smrg # as -z defs. 76526aab59a7Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 76536aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 76546aab59a7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 76556aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 76566aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 76576aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 76586aab59a7Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 76596aab59a7Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 76606aab59a7Smrg runpath_var='LD_RUN_PATH' 7661659607e0Smrg 76626aab59a7Smrg if test "$GCC" = yes; then 76636aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 76646aab59a7Smrg _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' 76656aab59a7Smrg else 76666aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 76676aab59a7Smrg _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' 76686aab59a7Smrg fi 76696aab59a7Smrg ;; 7670659607e0Smrg 76716aab59a7Smrg uts4*) 76726aab59a7Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 76736aab59a7Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 76746aab59a7Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 76756aab59a7Smrg ;; 7676659607e0Smrg 76776aab59a7Smrg *) 76786aab59a7Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 76796aab59a7Smrg ;; 76806aab59a7Smrg esac 76816aab59a7Smrg fi 7682659607e0Smrg]) 76836aab59a7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 76846aab59a7Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7685659607e0Smrg 7686659607e0Smrg# 76876aab59a7Smrg# Do we need to explicitly link libc? 76886aab59a7Smrg# 76896aab59a7Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 76906aab59a7Smrgx|xyes) 76916aab59a7Smrg # Assume -lc should be added 76926aab59a7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 7693659607e0Smrg 76946aab59a7Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 76956aab59a7Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 76966aab59a7Smrg *'~'*) 76976aab59a7Smrg # FIXME: we may have to deal with multi-command sequences. 76986aab59a7Smrg ;; 76996aab59a7Smrg '$CC '*) 77006aab59a7Smrg # Test whether the compiler implicitly links with -lc since on some 77016aab59a7Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 77026aab59a7Smrg # to ld, don't add -lc before -lgcc. 77036aab59a7Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 77046aab59a7Smrg $rm conftest* 77056aab59a7Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 77066aab59a7Smrg 77076aab59a7Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 77086aab59a7Smrg soname=conftest 77096aab59a7Smrg lib=conftest 77106aab59a7Smrg libobjs=conftest.$ac_objext 77116aab59a7Smrg deplibs= 77126aab59a7Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 77136aab59a7Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 77146aab59a7Smrg compiler_flags=-v 77156aab59a7Smrg linker_flags=-v 77166aab59a7Smrg verstring= 77176aab59a7Smrg output_objdir=. 77186aab59a7Smrg libname=conftest 77196aab59a7Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 77206aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 77216aab59a7Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 77226aab59a7Smrg then 77236aab59a7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 77246aab59a7Smrg else 77256aab59a7Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 77266aab59a7Smrg fi 77276aab59a7Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 77286aab59a7Smrg else 77296aab59a7Smrg cat conftest.err 1>&5 77306aab59a7Smrg fi 77316aab59a7Smrg $rm conftest* 77326aab59a7Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 77336aab59a7Smrg ;; 77346aab59a7Smrg esac 77356aab59a7Smrg fi 77366aab59a7Smrg ;; 7737659607e0Smrgesac 77386aab59a7Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 7739659607e0Smrg 7740659607e0Smrg 77416aab59a7Smrg# _LT_AC_FILE_LTDLL_C 77426aab59a7Smrg# ------------------- 77436aab59a7Smrg# Be careful that the start marker always follows a newline. 77446aab59a7SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 77456aab59a7Smrg# /* ltdll.c starts here */ 77466aab59a7Smrg# #define WIN32_LEAN_AND_MEAN 77476aab59a7Smrg# #include <windows.h> 77486aab59a7Smrg# #undef WIN32_LEAN_AND_MEAN 77496aab59a7Smrg# #include <stdio.h> 7750659607e0Smrg# 77516aab59a7Smrg# #ifndef __CYGWIN__ 77526aab59a7Smrg# # ifdef __CYGWIN32__ 77536aab59a7Smrg# # define __CYGWIN__ __CYGWIN32__ 77546aab59a7Smrg# # endif 77556aab59a7Smrg# #endif 77566aab59a7Smrg# 77576aab59a7Smrg# #ifdef __cplusplus 77586aab59a7Smrg# extern "C" { 77596aab59a7Smrg# #endif 77606aab59a7Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 77616aab59a7Smrg# #ifdef __cplusplus 77626aab59a7Smrg# } 77636aab59a7Smrg# #endif 77646aab59a7Smrg# 77656aab59a7Smrg# #ifdef __CYGWIN__ 77666aab59a7Smrg# #include <cygwin/cygwin_dll.h> 77676aab59a7Smrg# DECLARE_CYGWIN_DLL( DllMain ); 77686aab59a7Smrg# #endif 77696aab59a7Smrg# HINSTANCE __hDllInstance_base; 77706aab59a7Smrg# 77716aab59a7Smrg# BOOL APIENTRY 77726aab59a7Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 77736aab59a7Smrg# { 77746aab59a7Smrg# __hDllInstance_base = hInst; 77756aab59a7Smrg# return TRUE; 77766aab59a7Smrg# } 77776aab59a7Smrg# /* ltdll.c ends here */ 77786aab59a7Smrg])# _LT_AC_FILE_LTDLL_C 7779659607e0Smrg 7780659607e0Smrg 77816aab59a7Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 77826aab59a7Smrg# --------------------------------- 77836aab59a7SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 7784659607e0Smrg 7785659607e0Smrg 77866aab59a7Smrg# old names 77876aab59a7SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 77886aab59a7SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 77896aab59a7SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 77906aab59a7SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 77916aab59a7SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 77926aab59a7SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 77936aab59a7SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 7794659607e0Smrg 77956aab59a7Smrg# This is just to silence aclocal about the macro not being used 77966aab59a7Smrgifelse([AC_DISABLE_FAST_INSTALL]) 7797659607e0Smrg 77986aab59a7SmrgAC_DEFUN([LT_AC_PROG_GCJ], 77996aab59a7Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 78006aab59a7Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 78016aab59a7Smrg AC_SUBST(GCJFLAGS) 78026aab59a7Smrg]) 7803659607e0Smrg 78046aab59a7SmrgAC_DEFUN([LT_AC_PROG_RC], 78056aab59a7Smrg[AC_CHECK_TOOL(RC, windres, no) 78066aab59a7Smrg]) 78076aab59a7Smrg 78086aab59a7Smrg# NOTE: This macro has been submitted for inclusion into # 78096aab59a7Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 78106aab59a7Smrg# a released version of Autoconf we should remove this # 78116aab59a7Smrg# macro and use it instead. # 78126aab59a7Smrg# LT_AC_PROG_SED 78136aab59a7Smrg# -------------- 78146aab59a7Smrg# Check for a fully-functional sed program, that truncates 78156aab59a7Smrg# as few characters as possible. Prefer GNU sed if found. 78166aab59a7SmrgAC_DEFUN([LT_AC_PROG_SED], 78176aab59a7Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 78186aab59a7SmrgAC_CACHE_VAL(lt_cv_path_SED, 78196aab59a7Smrg[# Loop through the user's path and test for sed and gsed. 78206aab59a7Smrg# Then use that list of sed's as ones to test for truncation. 78216aab59a7Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 78226aab59a7Smrgfor as_dir in $PATH 78236aab59a7Smrgdo 78246aab59a7Smrg IFS=$as_save_IFS 78256aab59a7Smrg test -z "$as_dir" && as_dir=. 78266aab59a7Smrg for lt_ac_prog in sed gsed; do 78276aab59a7Smrg for ac_exec_ext in '' $ac_executable_extensions; do 78286aab59a7Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 78296aab59a7Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 78306aab59a7Smrg fi 78316aab59a7Smrg done 78326aab59a7Smrg done 78336aab59a7Smrgdone 78346aab59a7Smrglt_ac_max=0 78356aab59a7Smrglt_ac_count=0 78366aab59a7Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 78376aab59a7Smrg# along with /bin/sed that truncates output. 78386aab59a7Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 78396aab59a7Smrg test ! -f $lt_ac_sed && continue 78406aab59a7Smrg cat /dev/null > conftest.in 78416aab59a7Smrg lt_ac_count=0 78426aab59a7Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 78436aab59a7Smrg # Check for GNU sed and select it if it is found. 78446aab59a7Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 78456aab59a7Smrg lt_cv_path_SED=$lt_ac_sed 78466aab59a7Smrg break 78476aab59a7Smrg fi 78486aab59a7Smrg while true; do 78496aab59a7Smrg cat conftest.in conftest.in >conftest.tmp 78506aab59a7Smrg mv conftest.tmp conftest.in 78516aab59a7Smrg cp conftest.in conftest.nl 78526aab59a7Smrg echo >>conftest.nl 78536aab59a7Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 78546aab59a7Smrg cmp -s conftest.out conftest.nl || break 78556aab59a7Smrg # 10000 chars as input seems more than enough 78566aab59a7Smrg test $lt_ac_count -gt 10 && break 78576aab59a7Smrg lt_ac_count=`expr $lt_ac_count + 1` 78586aab59a7Smrg if test $lt_ac_count -gt $lt_ac_max; then 78596aab59a7Smrg lt_ac_max=$lt_ac_count 78606aab59a7Smrg lt_cv_path_SED=$lt_ac_sed 78616aab59a7Smrg fi 78626aab59a7Smrg done 78636aab59a7Smrgdone 78646aab59a7Smrg]) 78656aab59a7SmrgSED=$lt_cv_path_SED 78666aab59a7SmrgAC_MSG_RESULT([$SED]) 78676aab59a7Smrg]) 78686aab59a7Smrg 78696aab59a7Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 78706aab59a7Smrg# 78716aab59a7Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 78726aab59a7Smrg# 78736aab59a7Smrg# This program is free software; you can redistribute it and/or modify 78746aab59a7Smrg# it under the terms of the GNU General Public License as published by 78756aab59a7Smrg# the Free Software Foundation; either version 2 of the License, or 78766aab59a7Smrg# (at your option) any later version. 78776aab59a7Smrg# 78786aab59a7Smrg# This program is distributed in the hope that it will be useful, but 78796aab59a7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 78806aab59a7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 78816aab59a7Smrg# General Public License for more details. 78826aab59a7Smrg# 78836aab59a7Smrg# You should have received a copy of the GNU General Public License 78846aab59a7Smrg# along with this program; if not, write to the Free Software 78856aab59a7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 7886659607e0Smrg# 78876aab59a7Smrg# As a special exception to the GNU General Public License, if you 78886aab59a7Smrg# distribute this file as part of a program that contains a 78896aab59a7Smrg# configuration script generated by Autoconf, you may include it under 78906aab59a7Smrg# the same distribution terms that you use for the rest of that program. 7891659607e0Smrg 78926aab59a7Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 78936aab59a7Smrg# ---------------------------------- 78946aab59a7SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 78956aab59a7Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 78966aab59a7Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 78976aab59a7SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 78986aab59a7Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 78996aab59a7Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 79006aab59a7Smrgfi 79016aab59a7Smrgif test -n "$PKG_CONFIG"; then 79026aab59a7Smrg _pkg_min_version=m4_ifval([$1], [$1], [0.9.0]) 79036aab59a7Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 79046aab59a7Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 79056aab59a7Smrg AC_MSG_RESULT([yes]) 79066aab59a7Smrg else 79076aab59a7Smrg AC_MSG_RESULT([no]) 79086aab59a7Smrg PKG_CONFIG="" 79096aab59a7Smrg fi 79106aab59a7Smrg 79116aab59a7Smrgfi[]dnl 79126aab59a7Smrg])# PKG_PROG_PKG_CONFIG 7913659607e0Smrg 79146aab59a7Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 79156aab59a7Smrg# 79166aab59a7Smrg# Check to see whether a particular set of modules exists. Similar 79176aab59a7Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 79186aab59a7Smrg# 79196aab59a7Smrg# 79206aab59a7Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 79216aab59a7Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 79226aab59a7Smrg# PKG_CHECK_EXISTS manually 79236aab59a7Smrg# -------------------------------------------------------------- 79246aab59a7SmrgAC_DEFUN([PKG_CHECK_EXISTS], 79256aab59a7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 79266aab59a7Smrgif test -n "$PKG_CONFIG" && \ 79276aab59a7Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 79286aab59a7Smrg m4_ifval([$2], [$2], [:]) 79296aab59a7Smrgm4_ifvaln([$3], [else 79306aab59a7Smrg $3])dnl 79316aab59a7Smrgfi]) 7932659607e0Smrg 7933659607e0Smrg 79346aab59a7Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 79356aab59a7Smrg# --------------------------------------------- 79366aab59a7Smrgm4_define([_PKG_CONFIG], 79376aab59a7Smrg[if test -n "$PKG_CONFIG"; then 79386aab59a7Smrg PKG_CHECK_EXISTS([$3], 79396aab59a7Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 79406aab59a7Smrg [pkg_failed=yes]) 7941659607e0Smrgelse 79426aab59a7Smrg pkg_failed=untried 79436aab59a7Smrgfi[]dnl 79446aab59a7Smrg])# _PKG_CONFIG 7945659607e0Smrg 79466aab59a7Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 79476aab59a7Smrg# [ACTION-IF-NOT-FOUND]) 7948659607e0Smrg# 7949659607e0Smrg# 79506aab59a7Smrg# Note that if there is a possibility the first call to 79516aab59a7Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 79526aab59a7Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 79536aab59a7Smrg# 79546aab59a7Smrg# 79556aab59a7Smrg# -------------------------------------------------------------- 79566aab59a7SmrgAC_DEFUN([PKG_CHECK_MODULES], 79576aab59a7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 79586aab59a7SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 79596aab59a7SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 7960659607e0Smrg 79616aab59a7Smrgpkg_failed=no 79626aab59a7SmrgAC_MSG_CHECKING([for $1]) 7963659607e0Smrg 79646aab59a7Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 79656aab59a7Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 7966659607e0Smrg 79676aab59a7Smrgif test $pkg_failed = yes; then 79686aab59a7Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 79696aab59a7Smrg # Put the nasty error message in config.log where it belongs 79706aab59a7Smrg echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD 7971659607e0Smrg 79726aab59a7Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 79736aab59a7Smrg[Package requirements ($2) were not met. 79746aab59a7SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 79756aab59a7Smrginstalled software in a non-standard prefix. 7976659607e0Smrg 79776aab59a7SmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables 79786aab59a7Smrgto avoid the need to call pkg-config. See the pkg-config man page for 79796aab59a7Smrgmore details.])], 79806aab59a7Smrg [$4]) 79816aab59a7Smrgelif test $pkg_failed = untried; then 79826aab59a7Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 79836aab59a7Smrg[The pkg-config script could not be found or is too old. Make sure it 79846aab59a7Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 79856aab59a7Smrgpath to pkg-config. 7986659607e0Smrg 79876aab59a7SmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables 79886aab59a7Smrgto avoid the need to call pkg-config. See the pkg-config man page for 79896aab59a7Smrgmore details. 7990659607e0Smrg 79916aab59a7SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 79926aab59a7Smrg [$4]) 79936aab59a7Smrgelse 79946aab59a7Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 79956aab59a7Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 79966aab59a7Smrg AC_MSG_RESULT([yes]) 79976aab59a7Smrg ifelse([$3], , :, [$3]) 79986aab59a7Smrgfi[]dnl 79996aab59a7Smrg])# PKG_CHECK_MODULES 8000659607e0Smrg 8001